mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
3 lines
1.0 MiB
3 lines
1.0 MiB
/*! For license information please see component---src-pages-index-tsx-e9841f60244f992a6cff.js.LICENSE.txt */
|
||
(self.webpackChunkchainlist=self.webpackChunkchainlist||[]).push([[691],{3877:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new 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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8677).Buffer}catch(R){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var c=t.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(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&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),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),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l<a;l+=n)u=c(t,l,l+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(t,l,t.length,e),l=0;l<s;l++)f*=e;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){l(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(R){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","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"],d=[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],p=[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){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-u.length]+u+r:u+r}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&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?m+r:h[c-m.length]+m+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,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(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;e<this.length;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(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;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;r<e.length;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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;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(;o<r.length;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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,M=0|s[4],A=8191&M,E=M>>>13,x=0|s[5],k=8191&x,S=x>>>13,R=0|s[6],I=8191&R,P=R>>>13,C=0|s[7],T=8191&C,O=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,j=0|s[9],q=8191&j,U=j>>>13,F=0|a[0],D=8191&F,z=F>>>13,H=0|a[1],K=8191&H,G=H>>>13,W=0|a[2],V=8191&W,Z=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ft=8191<,ht=lt>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(m,D)|0,o=Math.imul(m,z);var yt=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(v,D)|0,o=Math.imul(v,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var vt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var wt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(P,D)|0,o=Math.imul(P,z),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(T,D),i=(i=Math.imul(T,z))+Math.imul(O,D)|0,o=Math.imul(O,z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var At=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,D),i=(i=Math.imul(B,z))+Math.imul(L,D)|0,o=Math.imul(L,z),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var Et=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(q,D),i=(i=Math.imul(q,z))+Math.imul(U,D)|0,o=Math.imul(U,z),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(q,K),i=(i=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(v,ft)|0,o=o+Math.imul(v,ht)|0;var kt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,Q))+Math.imul(U,Y)|0,o=Math.imul(U,Q),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ht)|0;var It=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(q,rt),i=(i=Math.imul(q,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ct)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ht)|0;var Ct=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(q,ut),i=(i=Math.imul(q,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,ft)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(q,ft),i=(i=Math.imul(q,ht))+Math.imul(U,ft)|0,o=Math.imul(U,ht);var Ot=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Nt=(c+(n=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=yt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=Et,u[9]=xt,u[10]=kt,u[11]=St,u[12]=Rt,u[13]=It,u[14]=Pt,u[15]=Ct,u[16]=Tt,u[17]=Ot,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,f=(0|t.words[l])*(0|e.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return y(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?y(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],m=n[l+d],g=r[l+d+s],y=n[l+d+s],v=f*g-h*y;y=f*y+h*g,g=v,r[l+d]=p+g,n[l+d]=m+y,r[l+d+s]=p-g,n[l+d+s]=m-y,d!==a&&(v=u*f-c*h,h=u*h+c*f,f=v)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;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}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,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=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),v(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():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=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;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 s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;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){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&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"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(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;e<this.length&&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(t<67108864),t<0)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&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;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,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}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){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},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 o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},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(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}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 e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-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 e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.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){n<i?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-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},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 k(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 w={k256:null,p224:null,p192:null,p25519:null};function _(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 M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(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 S(t){k.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)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;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(A,_),i(E,_),i(x,_),x.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;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){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new A;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return w[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.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")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.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)},k.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},k.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)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return h},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,k),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.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?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2500:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new 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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(2808).Buffer}catch(R){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var c=t.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(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&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),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),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l<a;l+=n)u=c(t,l,l+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(t,l,t.length,e),l=0;l<s;l++)f*=e;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){l(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(R){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","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"],d=[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],p=[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){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-u.length]+u+r:u+r}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&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?m+r:h[c-m.length]+m+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,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(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;e<this.length;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(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;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;r<e.length;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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;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(;o<r.length;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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,M=0|s[4],A=8191&M,E=M>>>13,x=0|s[5],k=8191&x,S=x>>>13,R=0|s[6],I=8191&R,P=R>>>13,C=0|s[7],T=8191&C,O=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,j=0|s[9],q=8191&j,U=j>>>13,F=0|a[0],D=8191&F,z=F>>>13,H=0|a[1],K=8191&H,G=H>>>13,W=0|a[2],V=8191&W,Z=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ft=8191<,ht=lt>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(m,D)|0,o=Math.imul(m,z);var yt=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(v,D)|0,o=Math.imul(v,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var vt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var wt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(P,D)|0,o=Math.imul(P,z),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(T,D),i=(i=Math.imul(T,z))+Math.imul(O,D)|0,o=Math.imul(O,z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var At=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,D),i=(i=Math.imul(B,z))+Math.imul(L,D)|0,o=Math.imul(L,z),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var Et=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(q,D),i=(i=Math.imul(q,z))+Math.imul(U,D)|0,o=Math.imul(U,z),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(q,K),i=(i=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(v,ft)|0,o=o+Math.imul(v,ht)|0;var kt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,Q))+Math.imul(U,Y)|0,o=Math.imul(U,Q),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ht)|0;var It=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(q,rt),i=(i=Math.imul(q,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ct)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ht)|0;var Ct=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(q,ut),i=(i=Math.imul(q,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,ft)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(q,ft),i=(i=Math.imul(q,ht))+Math.imul(U,ft)|0,o=Math.imul(U,ht);var Ot=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Nt=(c+(n=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=yt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=Et,u[9]=xt,u[10]=kt,u[11]=St,u[12]=Rt,u[13]=It,u[14]=Pt,u[15]=Ct,u[16]=Tt,u[17]=Ot,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,f=(0|t.words[l])*(0|e.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return y(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?y(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],m=n[l+d],g=r[l+d+s],y=n[l+d+s],v=f*g-h*y;y=f*y+h*g,g=v,r[l+d]=p+g,n[l+d]=m+y,r[l+d+s]=p-g,n[l+d+s]=m-y,d!==a&&(v=u*f-c*h,h=u*h+c*f,f=v)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;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}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,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=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),v(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():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=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;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 s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;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){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&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"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(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;e<this.length&&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(t<67108864),t<0)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&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;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,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}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){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},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 o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},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(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}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 e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-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 e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.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){n<i?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-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},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 k(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 w={k256:null,p224:null,p192:null,p25519:null};function _(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 M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(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 S(t){k.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)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;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(A,_),i(E,_),i(x,_),x.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;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){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new A;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return w[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.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")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.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)},k.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},k.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)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return h},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,k),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.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?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},9394:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(7187);function i(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout((()=>{throw n}))}}class o extends n.EventEmitter{emit(t,...e){let r="error"===t;const n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const r=new Error("Unhandled error."+(t?` (${t.message})`:""));throw r.context=t,r}const o=n[t];if(void 0===o)return!1;if("function"==typeof o)i(o,this,e);else{const t=o.length,r=function(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}(o);for(let n=0;n<t;n+=1)i(r[n],this,e)}return!0}}e.default=o},5522:function(t,e,r){"use strict";r.r(e),r.d(e,{detectEnv:function(){return v},detectOS:function(){return b},formatIOSMobile:function(){return K},formatMobileRegistry:function(){return X},formatMobileRegistryEntry:function(){return Q},getClientMeta:function(){return j},getCrypto:function(){return N},getCryptoOrThrow:function(){return O},getDappRegistryUrl:function(){return Y},getDocument:function(){return R},getDocumentOrThrow:function(){return S},getFromWindow:function(){return x},getFromWindowOrThrow:function(){return k},getLocal:function(){return D},getLocalStorage:function(){return L},getLocalStorageOrThrow:function(){return B},getLocation:function(){return T},getLocationOrThrow:function(){return C},getMobileLinkRegistry:function(){return V},getMobileRegistryEntry:function(){return W},getNavigator:function(){return P},getNavigatorOrThrow:function(){return I},getWalletRegistryUrl:function(){return J},isAndroid:function(){return w},isBrowser:function(){return E},isIOS:function(){return _},isMobile:function(){return M},isNode:function(){return A},mobileLinkChoiceKey:function(){return H},removeLocal:function(){return z},safeJsonParse:function(){return q},safeJsonStringify:function(){return U},saveMobileLinkInfo:function(){return G},setLocal:function(){return F}});var n=r(5755),i=r(2873),o=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n},s=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},a=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},u=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},c=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},l=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},f=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,h=3,d=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],p=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function m(t){return t?y(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new l:"undefined"!=typeof navigator?y(navigator.userAgent):function(){var t="undefined"!=typeof process&&process.version;return t?new a(process.version.slice(1)):null}()}function g(t){return""!==t&&d.reduce((function(e,r){var n=r[0],i=r[1];if(e)return e;var o=i.exec(t);return!!o&&[n,o]}),!1)}function y(t){var e=g(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new c;var i=n[1]&&n[1].split(/[._]/).slice(0,3);i?i.length<h&&(i=o(i,function(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}(h-i.length))):i=[];var a=i.join("."),l=function(t){for(var e=0,r=p.length;e<r;e++){var n=p[e],i=n[0];if(n[1].exec(t))return i}return null}(t),d=f.exec(t);return d&&d[1]?new u(r,a,l,d[1]):new s(r,a,l)}function v(t){return m(t)}function b(){const t=v();return t&&t.os?t.os:void 0}function w(){const t=b();return!!t&&t.toLowerCase().includes("android")}function _(){const t=b();return!!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function M(){return!!b()&&(w()||_())}function A(){const t=v();return!(!t||!t.name)&&"node"===t.name.toLowerCase()}function E(){return!A()&&!!P()}const x=i.getFromWindow,k=i.getFromWindowOrThrow,S=i.getDocumentOrThrow,R=i.getDocument,I=i.getNavigatorOrThrow,P=i.getNavigator,C=i.getLocationOrThrow,T=i.getLocation,O=i.getCryptoOrThrow,N=i.getCrypto,B=i.getLocalStorageOrThrow,L=i.getLocalStorage;function j(){return n.D()}const q=function(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch(e){return t}},U=function(t){return"string"==typeof t?t:JSON.stringify(t)};function F(t,e){const r=U(e),n=L();n&&n.setItem(t,r)}function D(t){let e=null,r=null;const n=L();return n&&(r=n.getItem(t)),e=r?q(r):r,e}function z(t){const e=L();e&&e.removeItem(t)}const H="WALLETCONNECT_DEEPLINK_CHOICE";function K(t,e){const r=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${r}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function G(t){const e=t.href.split("?")[0];F(H,Object.assign(Object.assign({},t),{href:e}))}function W(t,e){return t.filter((t=>t.name.toLowerCase().includes(e.toLowerCase())))[0]}function V(t,e){let r=t;return e&&(r=e.map((e=>W(t,e))).filter(Boolean)),r}const Z="https://registry.walletconnect.com";function J(){return Z+"/api/v2/wallets"}function Y(){return Z+"/api/v2/dapps"}function Q(t,e="mobile"){var r;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:null!==(r=t.image_url.sm)&&void 0!==r?r:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function X(t,e="mobile"){return Object.values(t).filter((t=>!!t[e].universal||!!t[e].native)).map((t=>Q(t,e)))}},926:function(t,e,r){"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){const t=n();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=n,e.getSubtleCrypto=i,e.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},8618:function(t,e){"use strict";function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=r,e.isNode=n,e.isBrowser=function(){return!r()&&!n()}},1468:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(4308);n.__exportStar(r(926),e),n.__exportStar(r(8618),e)},4308:function(t,e,r){"use strict";r.r(e),r.d(e,{__assign:function(){return o},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return _},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return k},__createBinding:function(){return h},__decorate:function(){return a},__exportStar:function(){return d},__extends:function(){return i},__generator:function(){return f},__importDefault:function(){return E},__importStar:function(){return A},__makeTemplateObject:function(){return M},__metadata:function(){return c},__param:function(){return u},__read:function(){return m},__rest:function(){return s},__spread:function(){return g},__spreadArrays:function(){return y},__values:function(){return p}});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function u(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function f(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(a){o=[6,a],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function h(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}function d(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||(e[r]=t[r])}function p(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(m(arguments[e]));return t}function y(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function v(t){return this instanceof v?(this.v=t,this):new v(t)}function b(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){o.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof v?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(n){l(o[0][3],n)}var r}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function w(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:v(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function _(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function M(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}function x(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function k(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},4337:function(t,e,r){function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var i=r(5522),o=n(r(2592)),s=n(r(640)),a=r(5776);var u=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n';"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var c="data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",l="WalletConnect",f=300,h="rgb(64, 153, 255)",d="walletconnect-wrapper",p="walletconnect-style-sheet",m="walletconnect-qrcode-modal",g="walletconnect-qrcode-close",y="walletconnect-qrcode-text",v="walletconnect-connect-button";function b(t){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:c,className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,l),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:t.onClose},a.createElement("div",{id:g,className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function w(t){return a.createElement("a",{className:"walletconnect-connect__button",href:t.href,id:v+"-"+t.name,onClick:t.onClick,rel:"noopener noreferrer",style:{backgroundColor:t.color},target:"_blank"},t.name)}var _="data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E";function M(t){var e=t.color,r=t.href,n=t.name,i=t.logo,o=t.onClick;return a.createElement("a",{className:"walletconnect-modal__base__row",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},n),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+i+"') "+e,backgroundSize:"100%"}}),a.createElement("img",{src:_,className:"walletconnect-modal__base__row__right__caret"})))}function A(t){var e=t.color,r=t.href,n=t.name,i=t.logo,o=t.onClick,s=window.innerWidth<768?(n.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+i+"') "+e,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:s},className:"walletconnect-connect__button__text"},n))}var E=5,x=12;function k(t){var e=i.isAndroid(),r=a.useState(""),n=r[0],o=r[1],s=a.useState(""),u=s[0],c=s[1],l=a.useState(1),f=l[0],d=l[1],p=u?t.links.filter((function(t){return t.name.toLowerCase().includes(u.toLowerCase())})):t.links,m=t.errorMessage,g=u||p.length>E,v=Math.ceil(p.length/x),b=[(f-1)*x+1,f*x],_=p.length?p.filter((function(t,e){return e+1>=b[0]&&e+1<=b[1]})):[],k=!(e||!(v>1)),S=void 0;return a.createElement("div",null,a.createElement("p",{id:y,className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:function(t){o(t.target.value),clearTimeout(S),t.target.value?S=setTimeout((function(){c(t.target.value),d(1)}),1e3):(o(""),c(""),d(1))}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":g&&p.length?"__wrap":"")},e?a.createElement(w,{name:t.text.connect,color:h,href:t.uri,onClick:a.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:t.uri})}),[])}):_.length?_.map((function(e){var r=e.color,n=e.name,o=e.shortName,s=e.logo,u=i.formatIOSMobile(t.uri,e),c=a.useCallback((function(){i.saveMobileLinkInfo({name:n,href:u})}),[_]);return g?a.createElement(A,{color:r,href:u,name:o||n,logo:s,onClick:c}):a.createElement(M,{color:r,href:u,name:n,logo:s,onClick:c})})):a.createElement(a.Fragment,null,a.createElement("p",null,m.length?t.errorMessage:t.links.length&&!p.length?t.text.no_wallets_found:t.text.loading))),k&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(v).fill(0).map((function(t,e){var r=e+1,n=f===r;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:n?"bold":"normal"},onClick:function(){return d(r)}},r)}))))}function S(t){var e=!!t.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}var R=function(t){try{var e="";return Promise.resolve(o.toString(t,{margin:0,type:"svg"})).then((function(t){return"string"==typeof t&&(e=t.replace("<svg",'<svg class="walletconnect-qrcode__image"')),e}))}catch(r){return Promise.reject(r)}};function I(t){var e=a.useState(""),r=e[0],n=e[1],i=a.useState(""),o=i[0],u=i[1];a.useEffect((function(){try{return Promise.resolve(R(t.uri)).then((function(t){u(t)}))}catch(e){Promise.reject(e)}}),[]);return a.createElement("div",null,a.createElement("p",{id:y,className:"walletconnect-qrcode__text"},t.text.scan_qrcode_with_wallet),a.createElement("div",{dangerouslySetInnerHTML:{__html:o}}),a.createElement("div",{className:"walletconnect-modal__footer"},a.createElement("a",{onClick:function(){s(t.uri)?(n(t.text.copied_to_clipboard),setInterval((function(){return n("")}),1200)):(n("Error"),setInterval((function(){return n("")}),1200))}},t.text.copy_to_clipboard)),a.createElement(S,{message:r}))}function P(t){var e=i.isAndroid(),r=i.isMobile(),n=r?t.qrcodeModalOptions&&t.qrcodeModalOptions.mobileLinks?t.qrcodeModalOptions.mobileLinks:void 0:t.qrcodeModalOptions&&t.qrcodeModalOptions.desktopLinks?t.qrcodeModalOptions.desktopLinks:void 0,o=a.useState(!1),s=o[0],u=o[1],c=a.useState(!1),l=c[0],f=c[1],h=a.useState(!r),d=h[0],p=h[1],g={mobile:r,text:t.text,uri:t.uri,qrcodeModalOptions:t.qrcodeModalOptions},y=a.useState(""),v=y[0],w=y[1],_=a.useState(!1),M=_[0],A=_[1],E=a.useState([]),x=E[0],S=E[1],R=a.useState(""),P=R[0],C=R[1],T=function(){l||s||n&&!n.length||x.length>0||a.useEffect((function(){!function(){try{if(e)return Promise.resolve();u(!0);var o=function(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}((function(){var e=t.qrcodeModalOptions&&t.qrcodeModalOptions.registryUrl?t.qrcodeModalOptions.registryUrl:i.getWalletRegistryUrl();return Promise.resolve(fetch(e)).then((function(e){return Promise.resolve(e.json()).then((function(e){var o=e.listings,s=r?"mobile":"desktop",a=i.getMobileLinkRegistry(i.formatMobileRegistry(o,s),n);u(!1),f(!0),C(a.length?"":t.text.no_supported_wallets),S(a);var c=1===a.length;c&&(w(i.formatIOSMobile(t.uri,a[0])),p(!0)),A(c)}))}))}),(function(e){u(!1),f(!0),C(t.text.something_went_wrong),console.error(e)}));return Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(s){return Promise.reject(s)}}()}))};T();var O=r?d:!d;return a.createElement("div",{id:m,className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(b,{onClose:t.onClose}),M&&d?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:x[0].name,href:v})},href:v,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(M?x[0].name:"")+" ›")):e||s||!s&&x.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(O?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return p(!1),T()}},t.text.mobile),a.createElement("a",{onClick:function(){return p(!0)}},t.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return p(!0)}},t.text.qrcode),a.createElement("a",{onClick:function(){return p(!1),T()}},t.text.desktop))):null,a.createElement("div",null,d||!e&&!s&&!x.length?a.createElement(I,Object.assign({},g)):a.createElement(k,Object.assign({},g,{links:x,errorMessage:P})))))}var C={de:{choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},ko:{choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},fa:{choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"}};function T(){var t=i.getDocumentOrThrow(),e=t.getElementById(m);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout((function(){var e=t.getElementById(d);e&&t.body.removeChild(e)}),f))}function O(t){return function(){T(),t&&t()}}function N(t,e,r){!function(){var t=i.getDocumentOrThrow(),e=t.getElementById(p);e&&t.head.removeChild(e);var r=t.createElement("style");r.setAttribute("id",p),r.innerText=u,t.head.appendChild(r)}();var n,o=function(){var t=i.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id",d),t.body.appendChild(e),e}();a.render(a.createElement(P,{text:(n=i.getNavigatorOrThrow().language.split("-")[0]||"en",C[n]||C.en),uri:t,onClose:O(e),qrcodeModalOptions:r}),o)}var B=function(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node};var L={open:function(t,e,r){console.log(t),B()?function(t){o.toString(t,{type:"terminal"}).then(console.log)}(t):N(t,e,r)},close:function(){B()||T()}};t.exports=L},8007:function(t){"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},1460:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new 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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(6563).Buffer}catch(E){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[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){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),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),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(t,l,l+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var f=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)f*=e;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;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(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],l=[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],f=[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];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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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&&t<=36){var h=l[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+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!==s),this.toArrayLike(s,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(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(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;e<this.length;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(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;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;r<e.length;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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;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(;o<r.length;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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,M=0|s[4],A=8191&M,E=M>>>13,x=0|s[5],k=8191&x,S=x>>>13,R=0|s[6],I=8191&R,P=R>>>13,C=0|s[7],T=8191&C,O=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,j=0|s[9],q=8191&j,U=j>>>13,F=0|a[0],D=8191&F,z=F>>>13,H=0|a[1],K=8191&H,G=H>>>13,W=0|a[2],V=8191&W,Z=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ft=8191<,ht=lt>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(m,D)|0,o=Math.imul(m,z);var yt=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(v,D)|0,o=Math.imul(v,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var vt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var wt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(P,D)|0,o=Math.imul(P,z),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(T,D),i=(i=Math.imul(T,z))+Math.imul(O,D)|0,o=Math.imul(O,z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var At=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,D),i=(i=Math.imul(B,z))+Math.imul(L,D)|0,o=Math.imul(L,z),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var Et=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(q,D),i=(i=Math.imul(q,z))+Math.imul(U,D)|0,o=Math.imul(U,z),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(q,K),i=(i=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(v,ft)|0,o=o+Math.imul(v,ht)|0;var kt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,Q))+Math.imul(U,Y)|0,o=Math.imul(U,Q),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ht)|0;var It=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(q,rt),i=(i=Math.imul(q,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ct)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ht)|0;var Ct=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(q,ut),i=(i=Math.imul(q,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,ft)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(q,ft),i=(i=Math.imul(q,ht))+Math.imul(U,ft)|0,o=Math.imul(U,ht);var Ot=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Nt=(c+(n=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=yt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=Et,u[9]=xt,u[10]=kt,u[11]=St,u[12]=Rt,u[13]=It,u[14]=Pt,u[15]=Ct,u[16]=Tt,u[17]=Ot,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,f=(0|t.words[l])*(0|e.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],m=n[l+d],g=r[l+d+s],y=n[l+d+s],v=f*g-h*y;y=f*y+h*g,g=v,r[l+d]=p+g,n[l+d]=m+y,r[l+d+s]=p-g,n[l+d+s]=m-y,d!==a&&(v=u*f-c*h,h=u*h+c*f,f=v)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;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}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,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=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;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=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;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 s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;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){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&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"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(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;e<this.length&&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(t<67108864),t<0)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&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;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,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}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){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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);var i,s,a},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 o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);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(t<=67108863);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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},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(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}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 e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-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 e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.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){n<i?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-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},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 M(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 g={k256:null,p224:null,p192:null,p25519:null};function y(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 v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(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 A(t){M.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)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(v,y),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;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(b,y),i(w,y),i(_,y),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;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){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.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")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return h},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.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?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2873:function(t,e){"use strict";function r(t){let e;return"undefined"!=typeof window&&void 0!==window[t]&&(e=window[t]),e}function n(t){const e=r(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=r,e.getFromWindowOrThrow=n,e.getDocumentOrThrow=function(){return n("document")},e.getDocument=function(){return r("document")},e.getNavigatorOrThrow=function(){return n("navigator")},e.getNavigator=function(){return r("navigator")},e.getLocationOrThrow=function(){return n("location")},e.getLocation=function(){return r("location")},e.getCryptoOrThrow=function(){return n("crypto")},e.getCrypto=function(){return r("crypto")},e.getLocalStorageOrThrow=function(){return n("localStorage")},e.getLocalStorage=function(){return r("localStorage")}},5755:function(t,e,r){"use strict";e.D=void 0;const n=r(2873);e.D=function(){let t,e;try{t=n.getDocumentOrThrow(),e=n.getLocationOrThrow()}catch(o){return null}function r(...e){const r=t.getElementsByTagName("meta");for(let t=0;t<r.length;t++){const n=r[t],i=["itemprop","property","name"].map((t=>n.getAttribute(t))).filter((t=>!!t&&e.includes(t)));if(i.length&&i){const t=n.getAttribute("content");if(t)return t}}return""}const i=function(){let e=r("name","og:site_name","og:title","twitter:title");return e||(e=t.title),e}();return{description:r("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){const r=t.getElementsByTagName("link"),n=[];for(let t=0;t<r.length;t++){const i=r[t],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const t=i.getAttribute("href");if(t)if(-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let r=e.protocol+"//"+e.host;if(0===t.indexOf("/"))r+=t;else{const n=e.pathname.split("/");n.pop();r+=n.join("/")+"/"+t}n.push(r)}else if(0===t.indexOf("//")){const r=e.protocol+t;n.push(r)}else n.push(t)}}return n}(),name:i}}},9282:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i,o,s=r(2136).codes,a=s.ERR_AMBIGUOUS_ARGUMENT,u=s.ERR_INVALID_ARG_TYPE,c=s.ERR_INVALID_ARG_VALUE,l=s.ERR_INVALID_RETURN_VALUE,f=s.ERR_MISSING_ARGS,h=r(5961),d=r(9539).inspect,p=r(9539).types,m=p.isPromise,g=p.isRegExp,y=Object.assign?Object.assign:r(8091).assign,v=Object.is?Object.is:r(609);new Map;function b(){var t=r(9158);i=t.isDeepEqual,o=t.isDeepStrictEqual}var w=!1,_=t.exports=x,M={};function A(t){if(t.message instanceof Error)throw t.message;throw new h(t)}function E(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new h({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function x(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];E.apply(void 0,[x,e.length].concat(e))}_.fail=function t(e,r,n,i,o){var s,a=arguments.length;if(0===a)s="Failed";else if(1===a)n=e,e=void 0;else{if(!1===w)w=!0,(process.emitWarning?process.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===a&&(i="!=")}if(n instanceof Error)throw n;var u={actual:e,expected:r,operator:void 0===i?"fail":i,stackStartFn:o||t};void 0!==n&&(u.message=n);var c=new h(u);throw s&&(c.message=s,c.generatedMessage=!0),c},_.AssertionError=h,_.ok=x,_.equal=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");e!=r&&A({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},_.notEqual=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");e==r&&A({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},_.deepEqual=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===i&&b(),i(e,r)||A({actual:e,expected:r,message:n,operator:"deepEqual",stackStartFn:t})},_.notDeepEqual=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===i&&b(),i(e,r)&&A({actual:e,expected:r,message:n,operator:"notDeepEqual",stackStartFn:t})},_.deepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===i&&b(),o(e,r)||A({actual:e,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:t})},_.notDeepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===i&&b();o(e,r)&&A({actual:e,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:t})},_.strictEqual=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");v(e,r)||A({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},_.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new f("actual","expected");v(e,r)&&A({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var k=function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&g(e[t])&&e[t].test(n[t])?i[t]=n[t]:i[t]=e[t])}))};function S(t,e,r,s){if("function"!=typeof e){if(g(e))return e.test(t);if(2===arguments.length)throw new u("expected",["Function","RegExp"],e);if("object"!==n(t)||null===t){var a=new h({actual:t,expected:e,message:r,operator:"deepStrictEqual",stackStartFn:s});throw a.operator=s.name,a}var l=Object.keys(e);if(e instanceof Error)l.push("name","message");else if(0===l.length)throw new c("error",e,"may not be an empty object");return void 0===i&&b(),l.forEach((function(n){"string"==typeof t[n]&&g(e[n])&&e[n].test(t[n])||function(t,e,r,n,i,s){if(!(r in t)||!o(t[r],e[r])){if(!n){var a=new k(t,i),u=new k(e,i,t),c=new h({actual:a,expected:u,operator:"deepStrictEqual",stackStartFn:s});throw c.actual=t,c.expected=e,c.operator=s.name,c}A({actual:t,expected:e,message:n,operator:s.name,stackStartFn:s})}}(t,e,n,r,l,s)})),!0}return void 0!==e.prototype&&t instanceof e||!Error.isPrototypeOf(e)&&!0===e.call({},t)}function R(t){if("function"!=typeof t)throw new u("fn","Function",t);try{t()}catch(e){return e}return M}function I(t){return m(t)||null!==t&&"object"===n(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function P(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!I(e=t()))throw new l("instance of Promise","promiseFn",e)}else{if(!I(t))throw new u("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return M})).catch((function(t){return t}))}))}function C(t,e,r,i){if("string"==typeof r){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===n(e)&&null!==e){if(e.message===r)throw new a("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===r)throw new a("error/message",'The error "'.concat(e,'" is identical to the message.'));i=r,r=void 0}else if(null!=r&&"object"!==n(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(e===M){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=i?": ".concat(i):".";var s="rejects"===t.name?"rejection":"exception";A({actual:void 0,expected:r,operator:t.name,message:"Missing expected ".concat(s).concat(o),stackStartFn:t})}if(r&&!S(e,r,i,t))throw e}function T(t,e,r,n){if(e!==M){if("string"==typeof r&&(n=r,r=void 0),!r||S(e,r)){var i=n?": ".concat(n):".",o="doesNotReject"===t.name?"rejection":"exception";A({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function O(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];E.apply(void 0,[O,e.length].concat(e))}_.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];C.apply(void 0,[t,R(e)].concat(n))},_.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return P(e).then((function(e){return C.apply(void 0,[t,e].concat(n))}))},_.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];T.apply(void 0,[t,R(e)].concat(n))},_.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return P(e).then((function(e){return T.apply(void 0,[t,e].concat(n))}))},_.ifError=function t(e){if(null!=e){var r="ifError got unwanted exception: ";"object"===n(e)&&"string"==typeof e.message?0===e.message.length&&e.constructor?r+=e.constructor.name:r+=e.message:r+=d(e);var i=new h({actual:e,expected:null,operator:"ifError",message:r,stackStartFn:t}),o=e.stack;if("string"==typeof o){var s=o.split("\n");s.shift();for(var a=i.stack.split("\n"),u=0;u<s.length;u++){var c=a.indexOf(s[u]);if(-1!==c){a=a.slice(0,c);break}}i.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw i}},_.strict=y(O,_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict},5961:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?s(t):e}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return u(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,t)},a(t)}function u(t,e,r){return u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&c(i,r.prototype),i},u.apply(null,arguments)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}var h=r(9539).inspect,d=r(2136).codes.ERR_INVALID_ARG_TYPE;function p(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var m="",g="",y="",v="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function _(t){return h(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(t,e,r){var n="",i="",o=0,s="",a=!1,u=_(t),c=u.split("\n"),l=_(e).split("\n"),h=0,d="";if("strictEqual"===r&&"object"===f(t)&&"object"===f(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===c.length&&1===l.length&&c[0]!==l[0]){var w=c[0].length+l[0].length;if(w<=10){if(!("object"===f(t)&&null!==t||"object"===f(e)&&null!==e||0===t&&0===e))return"".concat(b[r],"\n\n")+"".concat(c[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==r){if(w<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;c[0][h]===l[0][h];)h++;h>2&&(d="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",h),"^"),h=0)}}}for(var M=c[c.length-1],A=l[l.length-1];M===A&&(h++<2?s="\n ".concat(M).concat(s):n=M,c.pop(),l.pop(),0!==c.length&&0!==l.length);)M=c[c.length-1],A=l[l.length-1];var E=Math.max(c.length,l.length);if(0===E){var x=u.split("\n");if(x.length>30)for(x[26]="".concat(m,"...").concat(v);x.length>27;)x.pop();return"".concat(b.notIdentical,"\n\n").concat(x.join("\n"),"\n")}h>3&&(s="\n".concat(m,"...").concat(v).concat(s),a=!0),""!==n&&(s="\n ".concat(n).concat(s),n="");var k=0,S=b[r]+"\n".concat(g,"+ actual").concat(v," ").concat(y,"- expected").concat(v),R=" ".concat(m,"...").concat(v," Lines skipped");for(h=0;h<E;h++){var I=h-o;if(c.length<h+1)I>1&&h>2&&(I>4?(i+="\n".concat(m,"...").concat(v),a=!0):I>3&&(i+="\n ".concat(l[h-2]),k++),i+="\n ".concat(l[h-1]),k++),o=h,n+="\n".concat(y,"-").concat(v," ").concat(l[h]),k++;else if(l.length<h+1)I>1&&h>2&&(I>4?(i+="\n".concat(m,"...").concat(v),a=!0):I>3&&(i+="\n ".concat(c[h-2]),k++),i+="\n ".concat(c[h-1]),k++),o=h,i+="\n".concat(g,"+").concat(v," ").concat(c[h]),k++;else{var P=l[h],C=c[h],T=C!==P&&(!p(C,",")||C.slice(0,-1)!==P);T&&p(P,",")&&P.slice(0,-1)===C&&(T=!1,C+=","),T?(I>1&&h>2&&(I>4?(i+="\n".concat(m,"...").concat(v),a=!0):I>3&&(i+="\n ".concat(c[h-2]),k++),i+="\n ".concat(c[h-1]),k++),o=h,i+="\n".concat(g,"+").concat(v," ").concat(C),n+="\n".concat(y,"-").concat(v," ").concat(P),k+=2):(i+=n,n="",1!==I&&0!==h||(i+="\n ".concat(C),k++))}if(k>20&&h<E-2)return"".concat(S).concat(R,"\n").concat(i,"\n").concat(m,"...").concat(v).concat(n,"\n")+"".concat(m,"...").concat(v)}return"".concat(S).concat(a?R:"","\n").concat(i).concat(n).concat(s).concat(d)}var A=function(t){function e(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==f(t)||null===t)throw new d("options","Object",t);var n=t.message,i=t.operator,a=t.stackStartFn,u=t.actual,c=t.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)r=o(this,l(e).call(this,String(n)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(m="[34m",g="[32m",v="[39m",y="[31m"):(m="",g="",v="",y="")),"object"===f(u)&&null!==u&&"object"===f(c)&&null!==c&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=w(u),c=w(c)),"deepStrictEqual"===i||"strictEqual"===i)r=o(this,l(e).call(this,M(u,c,i)));else if("notDeepStrictEqual"===i||"notStrictEqual"===i){var p=b[i],A=_(u).split("\n");if("notStrictEqual"===i&&"object"===f(u)&&null!==u&&(p=b.notStrictEqualObject),A.length>30)for(A[26]="".concat(m,"...").concat(v);A.length>27;)A.pop();r=1===A.length?o(this,l(e).call(this,"".concat(p," ").concat(A[0]))):o(this,l(e).call(this,"".concat(p,"\n\n").concat(A.join("\n"),"\n")))}else{var E=_(u),x="",k=b[i];"notDeepEqual"===i||"notEqual"===i?(E="".concat(b[i],"\n\n").concat(E)).length>1024&&(E="".concat(E.slice(0,1021),"...")):(x="".concat(_(c)),E.length>512&&(E="".concat(E.slice(0,509),"...")),x.length>512&&(x="".concat(x.slice(0,509),"...")),"deepEqual"===i||"equal"===i?E="".concat(k,"\n\n").concat(E,"\n\nshould equal\n\n"):x=" ".concat(i," ").concat(x)),r=o(this,l(e).call(this,"".concat(E).concat(x)))}return Error.stackTraceLimit=h,r.generatedMessage=!n,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=u,r.expected=c,r.operator=i,Error.captureStackTrace&&Error.captureStackTrace(s(r),a),r.stack,r.name="AssertionError",o(r)}var r,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,t),r=e,a=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:h.custom,value:function(t,e){return h(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),i.forEach((function(e){n(t,e,r[e])}))}return t}({},e,{customInspect:!1,depth:0}))}}],a&&i(r.prototype,a),u&&i(r,u),e}(a(Error));t.exports=A},2136:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var a,u,c={};function l(t,e,r){r||(r=Error);var n=function(r){function n(r,s,a){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),u=i(this,o(n).call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,s,a))),u.code=t,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(n,r),n}(r);c[t]=n}function f(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,s,u,c;if(void 0===a&&(a=r(9282)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(!u||u<0?0:+u,s.length)===s)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))c="The ".concat(t," ").concat(o," ").concat(f(e,"type"));else{var l=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";c='The "'.concat(t,'" ').concat(l," ").concat(o," ").concat(f(e,"type"))}return c+=". Received type ".concat(n(i))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=r(9539));var i=u.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];void 0===a&&(a=r(9282)),a(e.length>0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=c},9158:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var o=void 0!==/a/g.flags,s=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},a=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},u=Object.is?Object.is:r(609),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(360);function f(t){return t.call.bind(t)}var h=f(Object.prototype.hasOwnProperty),d=f(Object.prototype.propertyIsEnumerable),p=f(Object.prototype.toString),m=r(9539).types,g=m.isAnyArrayBuffer,y=m.isArrayBufferView,v=m.isDate,b=m.isMap,w=m.isRegExp,_=m.isSet,M=m.isNativeError,A=m.isBoxedPrimitive,E=m.isNumberObject,x=m.isStringObject,k=m.isBooleanObject,S=m.isBigIntObject,R=m.isSymbolObject,I=m.isFloat32Array,P=m.isFloat64Array;function C(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function T(t){return Object.keys(t).filter(C).concat(c(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function O(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}var N=0,B=1,L=2,j=3;function q(t,e,r,n){if(t===e)return 0!==t||(!r||u(t,e));if(r){if("object"!==i(t))return"number"==typeof t&&l(t)&&l(e);if("object"!==i(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==i(t))return(null===e||"object"!==i(e))&&t==e;if(null===e||"object"!==i(e))return!1}var s,a,c,f,h=p(t);if(h!==p(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var d=T(t),m=T(e);return d.length===m.length&&F(t,e,r,n,B,d)}if("[object Object]"===h&&(!b(t)&&b(e)||!_(t)&&_(e)))return!1;if(v(t)){if(!v(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(w(t)){if(!w(e)||(c=t,f=e,!(o?c.source===f.source&&c.flags===f.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(f))))return!1}else if(M(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(y(t)){if(r||!I(t)&&!P(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===O(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var C=T(t),q=T(e);return C.length===q.length&&F(t,e,r,n,N,C)}if(_(t))return!(!_(e)||t.size!==e.size)&&F(t,e,r,n,L);if(b(t))return!(!b(e)||t.size!==e.size)&&F(t,e,r,n,j);if(g(t)){if(a=e,(s=t).byteLength!==a.byteLength||0!==O(new Uint8Array(s),new Uint8Array(a)))return!1}else if(A(t)&&!function(t,e){return E(t)?E(e)&&u(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):x(t)?x(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):k(t)?k(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):S(t)?S(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):R(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return F(t,e,r,n,N)}function U(t,e){return e.filter((function(e){return d(t,e)}))}function F(t,e,r,o,u,l){if(5===arguments.length){l=Object.keys(t);var f=Object.keys(e);if(l.length!==f.length)return!1}for(var p=0;p<l.length;p++)if(!h(e,l[p]))return!1;if(r&&5===arguments.length){var m=c(t);if(0!==m.length){var g=0;for(p=0;p<m.length;p++){var y=m[p];if(d(t,y)){if(!d(e,y))return!1;l.push(y),g++}else if(d(e,y))return!1}var v=c(e);if(m.length!==v.length&&U(e,v).length!==g)return!1}else{var b=c(e);if(0!==b.length&&0!==U(e,b).length)return!1}}if(0===l.length&&(u===N||u===B&&0===t.length||0===t.size))return!0;if(void 0===o)o={val1:new Map,val2:new Map,position:0};else{var w=o.val1.get(t);if(void 0!==w){var _=o.val2.get(e);if(void 0!==_)return w===_}o.position++}o.val1.set(t,o.position),o.val2.set(e,o.position);var M=function(t,e,r,o,u,c){var l=0;if(c===L){if(!function(t,e,r,n){for(var o=null,a=s(t),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!e.has(c)){if(r)return!1;if(!H(t,e,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var l=s(e),f=0;f<l.length;f++){var h=l[f];if("object"===i(h)&&null!==h){if(!D(o,h,r,n))return!1}else if(!r&&!t.has(h)&&!D(o,h,r,n))return!1}return 0===o.size}return!0}(t,e,r,u))return!1}else if(c===j){if(!function(t,e,r,o){for(var s=null,u=a(t),c=0;c<u.length;c++){var l=n(u[c],2),f=l[0],h=l[1];if("object"===i(f)&&null!==f)null===s&&(s=new Set),s.add(f);else{var d=e.get(f);if(void 0===d&&!e.has(f)||!q(h,d,r,o)){if(r)return!1;if(!K(t,e,f,h,o))return!1;null===s&&(s=new Set),s.add(f)}}}if(null!==s){for(var p=a(e),m=0;m<p.length;m++){var g=n(p[m],2),y=(f=g[0],g[1]);if("object"===i(f)&&null!==f){if(!G(s,t,f,y,r,o))return!1}else if(!(r||t.has(f)&&q(t.get(f),y,!1,o)||G(s,t,f,y,!1,o)))return!1}return 0===s.size}return!0}(t,e,r,u))return!1}else if(c===B)for(;l<t.length;l++){if(!h(t,l)){if(h(e,l))return!1;for(var f=Object.keys(t);l<f.length;l++){var d=f[l];if(!h(e,d)||!q(t[d],e[d],r,u))return!1}return f.length===Object.keys(e).length}if(!h(e,l)||!q(t[l],e[l],r,u))return!1}for(l=0;l<o.length;l++){var p=o[l];if(!q(t[p],e[p],r,u))return!1}return!0}(t,e,r,l,o,u);return o.val1.delete(t),o.val2.delete(e),M}function D(t,e,r,n){for(var i=s(t),o=0;o<i.length;o++){var a=i[o];if(q(e,a,r,n))return t.delete(a),!0}return!1}function z(t){switch(i(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(l(t))return!1}return!0}function H(t,e,r){var n=z(r);return null!=n?n:e.has(n)&&!t.has(n)}function K(t,e,r,n,i){var o=z(r);if(null!=o)return o;var s=e.get(o);return!(void 0===s&&!e.has(o)||!q(n,s,!1,i))&&(!t.has(o)&&q(n,s,!1,i))}function G(t,e,r,n,i,o){for(var a=s(t),u=0;u<a.length;u++){var c=a[u];if(q(r,c,i,o)&&q(n,e.get(c),i,o))return t.delete(c),!0}return!1}t.exports={isDeepEqual:function(t,e){return q(t,e,false)},isDeepStrictEqual:function(t,e){return q(t,e,true)}}},5078:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(655),i=r(2403),o=function(){function t(){this._semaphore=new i.default(1)}return t.prototype.acquire=function(){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();e.default=o},2403:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(655),i=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),r=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),r},t.prototype.runExclusive=function(t){return n.__awaiter(this,void 0,void 0,(function(){var e,r,i;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:e=n.sent(),r=e[0],i=e[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,t(r)];case 3:return[2,n.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var r=!1;this._currentReleaser=function(){r||(r=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}();e.default=i},8125:function(t,e,r){"use strict";e.WU=void 0;var n=r(5078);Object.defineProperty(e,"WU",{enumerable:!0,get:function(){return n.default}});var i=r(2403);var o=r(1960)},1960:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=void 0;var n=r(655);e.withTimeout=function(t,e,r){var i=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(o,s){return n.__awaiter(i,void 0,void 0,(function(){var i,a;return n.__generator(this,(function(n){switch(n.label){case 0:return i=!1,setTimeout((function(){i=!0,s(r)}),e),[4,t.acquire()];case 1:return a=n.sent(),i?(Array.isArray(a)?a[1]:a)():o(a),[2]}}))}))}))},runExclusive:function(t){return n.__awaiter(this,void 0,void 0,(function(){var e,r;return n.__generator(this,(function(n){switch(n.label){case 0:e=function(){},n.label=1;case 1:return n.trys.push([1,,7,8]),[4,this.acquire()];case 2:return r=n.sent(),Array.isArray(r)?(e=r[1],[4,t(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return e=r,[4,t()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}},4409:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,i.default)((function(e,r){var i;try{i=t.apply(this,e)}catch(o){return r(o)}(0,n.default)(i)&&"function"==typeof i.then?i.then((function(t){a(r,null,t)}),(function(t){a(r,t.message?t:new Error(t))})):r(null,i)}))};var n=s(r(3218)),i=s(r(3519)),o=s(r(3111));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e,r){try{t(e,r)}catch(n){(0,o.default)(u,n)}}function u(t){throw t}t.exports=e.default},4338:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,s){(0,n.default)(e)(t,(0,i.default)((0,o.default)(r)),s)};var n=s(r(6954)),i=s(r(6529)),o=s(r(8993));function s(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},1846:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){((0,n.default)(t)?h:d)(t,(0,l.default)(e),r)};var n=f(r(1240)),i=f(r(1605)),o=f(r(7388)),s=f(r(3875)),a=f(r(308)),u=f(r(6979)),c=f(r(3362)),l=f(r(8993));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e,r){r=(0,u.default)(r||a.default);var n=0,o=0,s=t.length;function l(t,e){t?r(t):++o!==s&&e!==i.default||r(null)}for(0===s&&r(null);n<s;n++)e(t[n],n,(0,c.default)(l))}var d=(0,s.default)(o.default,1/0);t.exports=e.default},7388:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,o){(0,n.default)(e)(t,(0,i.default)(r),o)};var n=o(r(6954)),i=o(r(8993));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},4282:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(4338)),i=o(r(3875));function o(t){return t&&t.__esModule?t:{default:t}}e.default=(0,i.default)(n.default,1),t.exports=e.default},1605:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={},t.exports=e.default},3875:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return function(r,n,i){return t(r,e,n,i)}},t.exports=e.default},8468:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,o){return t(n.default,e,(0,i.default)(r),o)}};var n=o(r(1846)),i=o(r(8993));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},6954:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,u){if(u=(0,i.default)(u||n.default),t<=0||!e)return u(null);var c=(0,o.default)(e),l=!1,f=0,h=!1;function d(t,e){if(f-=1,t)l=!0,u(t);else{if(e===a.default||l&&f<=0)return l=!0,u(null);h||p()}}function p(){for(h=!0;f<t&&!l;){var e=c();if(null===e)return l=!0,void(f<=0&&u(null));f+=1,r(e.value,e.key,(0,s.default)(d))}h=!1}p()}};var n=u(r(308)),i=u(r(6979)),o=u(r(9733)),s=u(r(3362)),a=u(r(1605));function u(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},7818:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return r&&t[r]&&t[r]()};var r="function"==typeof Symbol&&Symbol.iterator;t.exports=e.default},3519:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=(0,o.default)(arguments),r=e.pop();t.call(this,e,r)}};var n,i=r(3033),o=(n=i)&&n.__esModule?n:{default:n};t.exports=e.default},9733:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if((0,n.default)(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e=(0,i.default)(t);return e?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(e):(r=t,s=(0,o.default)(r),a=-1,u=s.length,function(){var t=s[++a];return a<u?{value:r[t],key:t}:null});var r,s,a,u};var n=s(r(1240)),i=s(r(7818)),o=s(r(3674));function s(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},7662:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,o){o=o||n.default,e=e||[];var s=[],a=0,u=(0,i.default)(r);t(e,(function(t,e,r){var n=a++;u(t,(function(t,e){s[n]=e,r(t)}))}),(function(t){o(t,s)}))};var n=o(r(308)),i=o(r(8993));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},6979:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null!==t){var e=t;t=null,e.apply(this,arguments)}}},t.exports=e.default},3362:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}},t.exports=e.default},3409:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){r=r||n.default;var a=(0,i.default)(e)?[]:{};t(e,(function(t,e,r){(0,s.default)(t)((function(t,n){arguments.length>2&&(n=(0,o.default)(arguments,1)),a[e]=n,r(t)}))}),(function(t){r(t,a)}))};var n=a(r(308)),i=a(r(1240)),o=a(r(3033)),s=a(r(8993));function a(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},3111:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasNextTick=e.hasSetImmediate=void 0,e.fallback=c,e.wrap=l;var n,i=r(3033),o=(n=i)&&n.__esModule?n:{default:n};var s,a=e.hasSetImmediate="function"==typeof setImmediate&&setImmediate,u=e.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function c(t){setTimeout(t,0)}function l(t){return function(e){var r=(0,o.default)(arguments,1);t((function(){e.apply(null,r)}))}}s=a?setImmediate:u?process.nextTick:c,e.default=l(s)},3033:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){e|=0;for(var r=Math.max(t.length-e,0),n=Array(r),i=0;i<r;i++)n[i]=t[e+i];return n},t.exports=e.default},6529:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,n){return t(e,n)}},t.exports=e.default},8993:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=void 0;var n,i=r(4409),o=(n=i)&&n.__esModule?n:{default:n};var s="function"==typeof Symbol;function a(t){return s&&"AsyncFunction"===t[Symbol.toStringTag]}e.default=function(t){return a(t)?(0,o.default)(t):t},e.isAsync=a},4005:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(8468)),i=o(r(7662));function o(t){return t&&t.__esModule?t:{default:t}}e.default=(0,n.default)(i.default),t.exports=e.default},47:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,i.default)(n.default,t,e)};var n=o(r(1846)),i=o(r(3409));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},7879:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(e=(0,o.default)(e||i.default),!(0,n.default)(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function c(e){var n=(0,u.default)(t[r++]);e.push((0,a.default)(l)),n.apply(null,e)}function l(n){if(n||r===t.length)return e.apply(null,arguments);c((0,s.default)(arguments,1))}c([])};var n=c(r(1469)),i=c(r(308)),o=c(r(6979)),s=c(r(3033)),a=c(r(3362)),u=c(r(8993));function c(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},9742:function(t,e){"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),l=0,f=u>0?s-4:s;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(u(t,a,a+s>c?c:a+s));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3173:function(t){"use strict";for(var e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=e.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(t){var e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function s(t){for(var e=1,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=o(e)^n>>5}for(e=o(e),r=0;r<t.length;++r){var i=t.charCodeAt(r);e=o(e)^31&i}return e}function a(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)return"Mixed-case string "+t;var a=(t=n).lastIndexOf("1");if(-1===a)return"No separator character for "+t;if(0===a)return"Missing prefix for "+t;var u=t.slice(0,a),c=t.slice(a+1);if(c.length<6)return"Data too short";var l=s(u);if("string"==typeof l)return l;for(var f=[],h=0;h<c.length;++h){var d=c.charAt(h),p=r[d];if(void 0===p)return"Unknown character "+d;l=o(l)^p,h+6>=c.length||f.push(p)}return 1!==l?"Invalid checksum for "+t:{prefix:u,words:f}}function u(t,e,r,n){for(var i=0,o=0,s=(1<<r)-1,a=[],u=0;u<t.length;++u)for(i=i<<e|t[u],o+=e;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=e)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}t.exports={decodeUnsafe:function(){var t=a.apply(null,arguments);if("object"==typeof t)return t},decode:function(t){var e=a.apply(null,arguments);if("object"==typeof e)return e;throw new Error(e)},encode:function(t,r,n){if(n=n||90,t.length+7+r.length>n)throw new TypeError("Exceeds length limit");var i=s(t=t.toLowerCase());if("string"==typeof i)throw new Error(i);for(var a=t+"1",u=0;u<r.length;++u){var c=r[u];if(c>>5!=0)throw new Error("Non 5-bit word");i=o(i)^c,a+=e.charAt(c)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){a+=e.charAt(i>>5*(5-u)&31)}return a},toWordsUnsafe:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},3550:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new 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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(x){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),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),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l<a;l+=n)u=c(t,l,l+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(t,l,t.length,e),l=0;l<s;l++)f*=e;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;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(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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"],f=[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],h=[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];function d(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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&&t<=36){var c=f[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[c-m.length]+m+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!==s),this.toArrayLike(s,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(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(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;e<this.length;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(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;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;r<e.length;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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;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(;o<r.length;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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,M=0|s[4],A=8191&M,E=M>>>13,x=0|s[5],k=8191&x,S=x>>>13,R=0|s[6],I=8191&R,P=R>>>13,C=0|s[7],T=8191&C,O=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,j=0|s[9],q=8191&j,U=j>>>13,F=0|a[0],D=8191&F,z=F>>>13,H=0|a[1],K=8191&H,G=H>>>13,W=0|a[2],V=8191&W,Z=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ft=8191<,ht=lt>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(m,D)|0,o=Math.imul(m,z);var yt=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(v,D)|0,o=Math.imul(v,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var vt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var wt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(P,D)|0,o=Math.imul(P,z),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(T,D),i=(i=Math.imul(T,z))+Math.imul(O,D)|0,o=Math.imul(O,z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var At=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,D),i=(i=Math.imul(B,z))+Math.imul(L,D)|0,o=Math.imul(L,z),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var Et=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(q,D),i=(i=Math.imul(q,z))+Math.imul(U,D)|0,o=Math.imul(U,z),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(q,K),i=(i=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(v,ft)|0,o=o+Math.imul(v,ht)|0;var kt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,Q))+Math.imul(U,Y)|0,o=Math.imul(U,Q),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ht)|0;var It=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(q,rt),i=(i=Math.imul(q,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ct)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ht)|0;var Ct=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(q,ut),i=(i=Math.imul(q,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,ft)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(q,ft),i=(i=Math.imul(q,ht))+Math.imul(U,ft)|0,o=Math.imul(U,ht);var Ot=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Nt=(c+(n=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=yt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=Et,u[9]=xt,u[10]=kt,u[11]=St,u[12]=Rt,u[13]=It,u[14]=Pt,u[15]=Ct,u[16]=Tt,u[17]=Ot,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,f=(0|t.words[l])*(0|e.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],m=n[l+d],g=r[l+d+s],y=n[l+d+s],v=f*g-h*y;y=f*y+h*g,g=v,r[l+d]=p+g,n[l+d]=m+y,r[l+d+s]=p-g,n[l+d+s]=m-y,d!==a&&(v=u*f-c*h,h=u*h+c*f,f=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;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}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,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=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;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=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;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 s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;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){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&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"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(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;e<this.length&&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(t<67108864),t<0)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&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;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,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}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){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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);var i,s,a},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 o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);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(t<=67108863);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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},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(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}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 e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-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 e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.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){n<i?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-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},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 A(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 y={k256:null,p224:null,p192:null,p25519:null};function v(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 b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(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 E(t){A.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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;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(w,v),i(_,v),i(M,v),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;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){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return y[t]=e,e},A.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},A.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")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.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)},A.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},A.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)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return h},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,A),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.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?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},7376:function(t,e,r){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(9214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(s){}},8764:function(t,e,r){"use strict";var n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;var s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=a(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(D(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(D(t,ArrayBuffer)||t&&D(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(D(t,SharedArrayBuffer)||t&&D(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);var i=function(t){if(u.isBuffer(t)){var e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||z(t.length)?a(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),a(t<0?0:0|p(t))}function h(t){for(var e=t.length<0?0:0|p(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||D(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return-1}function w(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(z(a))return s;t[r+s]=a}return s}function _(t,e,r,n){return F(q(e,t.length-r),t,r,n)}function M(t,e,r,n){return F(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return F(U(e),t,r,n)}function E(t,e,r,n){return F(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(r){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(D(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),D(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(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}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(D(o,Uint8Array))i+o.length>n.length?u.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.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;e<t;e+=2)y(this,e,e+1);return this},u.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;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.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;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(D(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],s=l[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},u.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 new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,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&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return M(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function P(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H[t[o]];return i}function C(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:u.from(t,n),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var j=/[^+/0-9A-Za-z-_]/g;function q(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function D(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function z(t){return t!=t}var H=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},584:function(t){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},1924:function(t,e,r){"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},5559:function(t,e,r){"use strict";var n=r(8612),i=r(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(h){c=null}t.exports=function(t){var e=a(n,s,arguments);u&&c&&(u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}));return e};var f=function(){return a(n,o,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},1027:function(t,e,r){var n=r(9509).Buffer,i=r(2830).Transform,o=r(6941).s;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(5717)(s,i),s.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){n=i}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},7866:function(t,e){!function(){"use strict";function t(e,r,n,i){return this instanceof t?(this.domain=e||void 0,this.path=r||"/",this.secure=!!n,this.script=!!i,this):new t(e,r,n,i)}function r(t,e,n){return t instanceof r?t:this instanceof r?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(n||"/"),this.explicit_path=!1,this.domain=e||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,t&&this.parse(t,e,n),this):new r(t,e,n)}t.All=Object.freeze(Object.create(null)),e.CookieAccessInfo=t,e.Cookie=r,r.prototype.toString=function(){var t=[this.name+"="+this.value];return this.expiration_date!==1/0&&t.push("expires="+new Date(this.expiration_date).toGMTString()),this.domain&&t.push("domain="+this.domain),this.path&&t.push("path="+this.path),this.secure&&t.push("secure"),this.noscript&&t.push("httponly"),t.join("; ")},r.prototype.toValueString=function(){return this.name+"="+this.value};var n=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;function i(){var t,e;return this instanceof i?(t=Object.create(null),this.setCookie=function(n,i,o){var s,a;if(s=(n=new r(n,i,o)).expiration_date<=Date.now(),void 0!==t[n.name]){for(e=t[n.name],a=0;a<e.length;a+=1)if(e[a].collidesWith(n))return s?(e.splice(a,1),0===e.length&&delete t[n.name],!1):(e[a]=n,n);return!s&&(e.push(n),n)}return!s&&(t[n.name]=[n],t[n.name])},this.getCookie=function(r,n){var i,o;if(e=t[r])for(o=0;o<e.length;o+=1)if((i=e[o]).expiration_date<=Date.now())0===e.length&&delete t[i.name];else if(i.matches(n))return i},this.getCookies=function(e){var r,n,i=[];for(r in t)(n=this.getCookie(r,e))&&i.push(n);return i.toString=function(){return i.join(":")},i.toValueString=function(){return i.map((function(t){return t.toValueString()})).join("; ")},i},this):new i}r.prototype.parse=function(t,e,n){if(this instanceof r){if(t.length>32768)return void console.warn("Cookie too long for parsing (>32768 characters)");var i,o=t.split(";").filter((function(t){return!!t})),s=o[0].match(/([^=]+)=([\s\S]*)/);if(!s)return void console.warn("Invalid cookie header encountered. Header: '"+t+"'");var a=s[1],u=s[2];if("string"!=typeof a||0===a.length||"string"!=typeof u)return void console.warn("Unable to extract values from cookie header. Cookie: '"+t+"'");for(this.name=a,this.value=u,i=1;i<o.length;i+=1)switch(a=(s=o[i].match(/([^=]+)(?:=([\s\S]*))?/))[1].trim().toLowerCase(),u=s[2],a){case"httponly":this.noscript=!0;break;case"expires":this.expiration_date=u?Number(Date.parse(u)):1/0;break;case"path":this.path=u?u.trim():"",this.explicit_path=!0;break;case"domain":this.domain=u?u.trim():"",this.explicit_domain=!!this.domain;break;case"secure":this.secure=!0}return this.explicit_path||(this.path=n||"/"),this.explicit_domain||(this.domain=e),this}return(new r).parse(t,e,n)},r.prototype.matches=function(e){return e===t.All||!(this.noscript&&e.script||this.secure&&!e.secure||!this.collidesWith(e))},r.prototype.collidesWith=function(t){if(this.path&&!t.path||this.domain&&!t.domain)return!1;if(this.path&&0!==t.path.indexOf(this.path))return!1;if(this.explicit_path&&0!==t.path.indexOf(this.path))return!1;var e=t.domain&&t.domain.replace(/^[\.]/,""),r=this.domain&&this.domain.replace(/^[\.]/,"");if(r===e)return!0;if(r){if(!this.explicit_domain)return!1;var n=e.indexOf(r);return-1!==n&&n===e.length-r.length}return!0},e.CookieJar=i,i.prototype.setCookies=function(t,e,i){var o,s,a=[];for(t=(t=Array.isArray(t)?t:t.split(n)).map((function(t){return new r(t,e,i)})),o=0;o<t.length;o+=1)s=t[o],this.setCookie(s,e,i)&&a.push(s);return a}}()},640:function(t,e,r){"use strict";var n=r(1742),i={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var r,o,s,a,u,c,l=!1;e||(e={}),r=e.debug||!1;try{if(s=n(),a=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=t,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(n){if(n.stopPropagation(),e.format)if(n.preventDefault(),void 0===n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[e.format]||i.default;window.clipboardData.setData(o,t)}else n.clipboardData.clearData(),n.clipboardData.setData(e.format,t);e.onCopy&&(n.preventDefault(),e.onCopy(n.clipboardData))})),document.body.appendChild(c),a.selectNodeContents(c),u.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),o=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,t)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(a):u.removeAllRanges()),c&&document.body.removeChild(c),s()}return l}},3482:function(t,e,r){"use strict";var n=r(5717),i=r(2318),o=r(9785),s=r(9072),a=r(1027);function u(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},4020:function(t){"use strict";var e="%[a-f0-9]{2}",r=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function i(t,e){try{return[decodeURIComponent(t.join(""))]}catch(o){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],i(r),i(n))}function o(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r)||[],n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r)||[];return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var r={"%FE%FF":"<22><>","%FF%FE":"<22><>"},i=n.exec(t);i;){try{r[i[0]]=decodeURIComponent(i[0])}catch(e){var s=o(i[0]);s!==i[0]&&(r[i[0]]=s)}i=n.exec(t)}r["%C2"]="<22>";for(var a=Object.keys(r),u=0;u<a.length;u++){var c=a[u];t=t.replace(new RegExp(c,"g"),r[c])}return t}(t)}}},4289:function(t,e,r){"use strict";var n=r(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,u=r(1044)(),c=a&&u,l=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(c?a(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)l(t,o[a],e[o[a]],r[o[a]])};f.supportsDescriptors=!!c,t.exports=f},5987:function(t){"use strict";var e={single_source_shortest_paths:function(t,r,n){var i={},o={};o[r]=0;var s,a,u,c,l,f,h,d=e.PriorityQueue.make();for(d.push(r,0);!d.empty();)for(u in a=(s=d.pop()).value,c=s.cost,l=t[a]||{})l.hasOwnProperty(u)&&(f=c+l[u],h=o[u],(void 0===o[u]||h>f)&&(o[u]=f,d.push(u,f),i[u]=a));if(void 0!==n&&void 0===o[n]){var p=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e;n;)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,r,n){var i=e.single_source_shortest_paths(t,r,n);return e.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(t){var r,n=e.PriorityQueue,i={};for(r in t=t||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},6266:function(t,e,r){"use strict";var n=e;n.version=r(8597).i8,n.utils=r(953),n.rand=r(7376),n.curve=r(8254),n.curves=r(5427),n.ec=r(7954),n.eddsa=r(5980)},4918:function(t,e,r){"use strict";var n=r(3550),i=r(953),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,u,c=[];for(s=0;s<n.length;s+=r.step){u=0;for(var l=s+r.step-1;l>=s;l--)u=(u<<1)+n[l];c.push(u)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s<c.length;s++)(u=c[s])===d?h=h.mixedAdd(r.points[s]):u===-d&&(h=h.mixedAdd(r.points[s].neg()));f=f.add(h)}return f.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var l=0;c>=0&&0===s[c];c--)l++;if(c>=0&&l++,u=u.dblp(l),c<0)break;var f=s[c];a(0!==f),u="affine"===t.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var a,u,c,l=this._wnafT1,f=this._wnafT2,h=this._wnafT3,d=0;for(a=0;a<n;a++){var p=(c=e[a])._getNAFPoints(t);l[a]=p.wnd,f[a]=p.points}for(a=n-1;a>=1;a-=2){var m=a-1,g=a;if(1===l[m]&&1===l[g]){var y=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(y[1]=e[m].add(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].add(e[g].neg())):(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=s(r[m],r[g]);for(d=Math.max(b[0].length,d),h[m]=new Array(d),h[g]=new Array(d),u=0;u<d;u++){var w=0|b[0][u],_=0|b[1][u];h[m][u]=v[3*(w+1)+(_+1)],h[g][u]=0,f[m]=y}}else h[m]=o(r[m],l[m],this._bitLength),h[g]=o(r[g],l[g],this._bitLength),d=Math.max(h[m].length,d),d=Math.max(h[g].length,d)}var M=this.jpoint(null,null,null),A=this._wnafT4;for(a=d;a>=0;a--){for(var E=0;a>=0;){var x=!0;for(u=0;u<n;u++)A[u]=0|h[u][a],0!==A[u]&&(x=!1);if(!x)break;E++,a--}if(a>=0&&E++,M=M.dblp(E),a<0)break;for(u=0;u<n;u++){var k=A[u];0!==k&&(k>0?c=f[u][k-1>>1]:k<0&&(c=f[u][-k-1>>1].neg()),M="affine"===c.type?M.mixedAdd(c):M.add(c))}}for(a=0;a<n;a++)f[a]=null;return i?M:M.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},1138:function(t,e,r){"use strict";var n=r(953),i=r(3550),o=r(5717),s=r(4918),a=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,r,n,o){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(c,s.BasePoint),u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new c(this,t,e,r,n)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),c=o.redMul(a),l=i.redMul(a),f=s.redMul(o);return this.curve.point(u,c,f,l)},c.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(t=s.redSub(a).redSub(u).redMul(c.redSub(this.curve.two)),e=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),t=s.redSub(a).redISub(u).redMul(o),e=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),c=o.redMul(s),l=a.redMul(u),f=o.redMul(u),h=s.redMul(a);return this.curve.point(c,l,h,f)},c.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),c=i.redAdd(a),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),f=n.redMul(u).redMul(l);return this.curve.twisted?(e=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(c)):(e=n.redMul(c).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,e,r)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},8254:function(t,e,r){"use strict";var n=e;n.base=r(4918),n.short=r(6673),n.mont=r(2881),n.edwards=r(1138)},2881:function(t,e,r){"use strict";var n=r(3550),i=r(5717),o=r(4918),s=r(953);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:function(t,e,r){"use strict";var n=r(953),i=r(3550),o=r(5717),s=r(4918),a=n.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,c,l,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,d=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),y=new i(1),v=0;0!==h.cmpn(0);){var b=d.div(h);c=d.sub(b.mul(h)),l=g.sub(b.mul(p));var w=y.sub(b.mul(m));if(!n&&c.cmp(f)<0)e=u.neg(),r=p,n=c.neg(),o=l;else if(n&&2==++v)break;u=c,d=h,h=c,g=p,p=l,y=m,m=w}s=c.neg(),a=l;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(c).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),l=0;l<2*o;l++)n[l]=null,i[l]=null;return c},o(c,s.BasePoint),u.prototype.point=function(t,e,r){return new c(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new l(this,t,e,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),f=n.redMul(c),h=u.redSqr().redIAdd(l).redISub(f).redISub(f),d=u.redMul(f.redISub(h)).redISub(o.redMul(l)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(h,d,p)},l.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=r.redMul(u),f=a.redSqr().redIAdd(c).redISub(l).redISub(l),h=a.redMul(l.redISub(f)).redISub(i.redMul(c)),d=this.z.redMul(s);return this.curve.jpoint(f,h,d)},l.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),c=s.redAdd(s);for(e=0;e<t;e++){var l=o.redSqr(),f=c.redSqr(),h=f.redSqr(),d=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=o.redMul(f),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(h);var v=c.redMul(a);e+1<t&&(u=u.redMul(h)),o=m,a=v,c=y}return this.curve.jpoint(o,c.redMul(i),a)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),h=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(l).redISub(h);d=d.redIAdd(d);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),g=h.redIAdd(h);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},l.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),h=this.x.redMul(f),d=this.x.redSub(l).redMul(this.x.redAdd(l));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l);var g=f.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},l.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(s),l=a.redSqr().redISub(c.redAdd(c)),f=c.redISub(l),h=s.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=a.redMul(f).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,d,p)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),l=e.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.x.redMul(a).redISub(l);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,h,d)},l.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},l.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},l.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:function(t,e,r){"use strict";var n,i=e,o=r(3715),s=r(8254),a=r(953).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(1037)}catch(l){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},7954:function(t,e,r){"use strict";var n=r(3550),i=r(2156),o=r(953),s=r(5427),a=r(7376),u=o.assert,c=r(1251),l=r(611);function f(t){if(!(this instanceof f))return new f(t);"string"==typeof t&&(u(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=f,f.prototype.keyPair=function(t){return new c(this,t)},f.prototype.keyFromPrivate=function(t,e){return c.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return c.fromPublic(this,t,e)},f.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},f.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=t.toArray("be",s),c=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new n(1)),h=0;;h++){var d=o.k?o.k(h):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(f)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=d.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new l({r:g,s:y,recoveryParam:v})}}}}}},f.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new l(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),c=u.mul(t).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new l(e,i);var o=this.n,s=new n(t),a=e.r,c=e.s,f=1&r,h=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");a=h?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var d=e.r.invm(o),p=o.sub(s).mul(d).umod(o),m=c.mul(d).umod(o);return this.g.mulAdd(p,a,m)},f.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new l(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},1251:function(t,e,r){"use strict";var n=r(3550),i=r(953).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},611:function(t,e,r){"use strict";var n=r(3550),i=r(953),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function l(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=u(t,r);if(!1===s)return!1;var c=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var l=u(t,r);if(!1===l)return!1;if(t.length!==l+r.place)return!1;var f=t.slice(r.place,l+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(c),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];l(n,e.length),(n=n.concat(e)).push(2),l(n,r.length);var o=n.concat(r),s=[48];return l(s,o.length),s=s.concat(o),i.encode(s,t)}},5980:function(t,e,r){"use strict";var n=r(3715),i=r(5427),o=r(953),s=o.assert,a=o.parseBytes,u=r(9087),c=r(3622);function l(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof l))return new l(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=l,l.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},l.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},l.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},l.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},l.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},l.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},l.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(t){return o.intFromLE(t)},l.prototype.isPoint=function(t){return t instanceof this.pointClass}},9087:function(t,e,r){"use strict";var n=r(953),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},3622:function(t,e,r){"use strict";var n=r(3550),i=r(953),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},1037:function(t){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},953:function(t,e,r){"use strict";var n=e,i=r(3550),o=r(9746),s=r(4504);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,c=e.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),s=0==(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(s),a=0==(1&c)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},8091:function(t){"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),s=0,a=o.length;s<a;s++){var u=o[s],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(r[u]=i[u])}}return r}t.exports={assign:e,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:e})}}},2696:function(t,e,r){r(5682),r(2352);const n=r(7253),i=(t,e)=>t+e,o=["sync","latest"];function s(t){return Number.parseInt(t,16)}t.exports=class extends n{constructor(t={}){super(),this._blockResetDuration=t.blockResetDuration||2e4,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return o.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&s(t)<=s(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},5012:function(t,e,r){const n=r(2352),i=r(2696);function o(t,e){return new Promise((r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()}))}t.exports=class extends i{constructor(t={}){if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,r=t.retryTimeout||e/10,n=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=r,this._keepEventLoopActive=n,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const r=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${t.stack}`);try{this.emit("error",r)}catch(e){console.error(r)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await n((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${e.error}`);return e.result}}},3256:function(t,e,r){const n=r(6622);t.exports=class extends n{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},6622:function(t,e,r){const n=r(9394).default;t.exports=class extends n{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach((t=>this.emit("update",t)))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}}},2785:function(t,e,r){const n=r(6622),i=r(207),{incrementHexInt:o}=r(8112);t.exports=class extends n{constructor({provider:t,params:e}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:e}){const r=e,n=o(t),s=(await i({provider:this.provider,fromBlock:n,toBlock:r})).map((t=>t.hash));this.addResults(s)}}},207:function(t){function e(t){return null==t?t:Number.parseInt(t,16)}function r(t){if(null==t)return t;return"0x"+t.toString(16)}t.exports=async function({provider:t,fromBlock:n,toBlock:i}){n||(n=i);const o=e(n),s=e(i),a=Array(s-o+1).fill().map(((t,e)=>o+e)).map(r);return await Promise.all(a.map((e=>function(t,e,r){return new Promise(((n,i)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:r},((t,e)=>{if(t)return i(t);n(e.result)}))}))}(t,"eth_getBlockByNumber",[e,!1]))))}},8112:function(t){function e(t){return t.sort(((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e)))}function r(t){return null==t?t:Number.parseInt(t,16)}function n(t){if(null==t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function i(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...t){return e(t)[0]},maxBlockRef:function(...t){const r=e(t);return r[r.length-1]},sortBlockRefs:e,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){if(null==t)return t;return n(r(t)+1)},intToHex:n,unsafeRandomBytes:function(t){let e="0x";for(let r=0;r<t;r++)e+=i(),e+=i();return e}}},8406:function(t,e,r){const n=r(8125).WU,{createAsyncMiddleware:i}=r(8320),o=r(7688),s=r(1663),a=r(2785),u=r(5792),{intToHex:c,hexToInt:l}=r(8112);function f(t){return h((async(...e)=>{const r=await t(...e);return c(r.id)}))}function h(t){return i((async(e,r)=>{const n=await t.apply(null,e.params);r.result=n}))}function d(t,e){const r=[];for(let n in t)r.push(t[n]);return r}t.exports=function({blockTracker:t,provider:e}){let r=0,i={};const p=new n,m=function({mutex:t}){return e=>async(r,n,i,o)=>{(await t.acquire())(),e(r,n,i,o)}}({mutex:p}),g=o({eth_newFilter:m(f(v)),eth_newBlockFilter:m(f(b)),eth_newPendingTransactionFilter:m(f(w)),eth_uninstallFilter:m(h(A)),eth_getFilterChanges:m(h(_)),eth_getFilterLogs:m(h(M))}),y=async({oldBlock:t,newBlock:e})=>{if(0===i.length)return;const r=await p.acquire();try{await Promise.all(d(i).map((async r=>{try{await r.update({oldBlock:t,newBlock:e})}catch(n){console.error(n)}})))}catch(n){console.error(n)}r()};return g.newLogFilter=v,g.newBlockFilter=b,g.newPendingTransactionFilter=w,g.uninstallFilter=A,g.getFilterChanges=_,g.getFilterLogs=M,g.destroy=()=>{!async function(){const t=d(i).length;i={},x({prevFilterCount:t,newFilterCount:0})}()},g;async function v(t){const r=new s({provider:e,params:t});await E(r);return r}async function b(){const t=new a({provider:e});await E(t);return t}async function w(){const t=new u({provider:e});await E(t);return t}async function _(t){const e=l(t),r=i[e];if(!r)throw new Error(`No filter for index "${e}"`);return r.getChangesAndClear()}async function M(t){const e=l(t),r=i[e];if(!r)throw new Error(`No filter for index "${e}"`);return"log"===r.type?results=r.getAllResults():results=[],results}async function A(t){const e=l(t),r=i[e],n=Boolean(r);return n&&await async function(t){const e=d(i).length;delete i[t];const r=d(i).length;x({prevFilterCount:e,newFilterCount:r})}(e),n}async function E(e){const n=d(i).length,o=await t.getLatestBlock();await e.initialize({currentBlock:o}),r++,i[r]=e,e.id=r,e.idHex=c(r);return x({prevFilterCount:n,newFilterCount:d(i).length}),r}function x({prevFilterCount:e,newFilterCount:r}){0===e&&r>0?t.on("sync",y):e>0&&0===r&&t.removeListener("sync",y)}}},1663:function(t,e,r){const n=r(5682),i=r(6417),o=r(3256),{bnToHex:s,hexToInt:a,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=r(8112);t.exports=class extends o{constructor({provider:t,params:e}){super(),this.type="log",this.ethQuery=new n(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},e),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize({currentBlock:t}){let e=this.params.fromBlock;["latest","pending"].includes(e)&&(e=t),"earliest"===e&&(e="0x0"),this.params.fromBlock=e;const r=c(this.params.toBlock,t),n=Object.assign({},this.params,{toBlock:r}),i=await this._fetchLogs(n);this.addInitialResults(i)}async update({oldBlock:t,newBlock:e}){const r=e;let n;n=t?u(t):e;const i=Object.assign({},this.params,{fromBlock:n,toBlock:r}),o=(await this._fetchLogs(i)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(a(this.params.fromBlock)>=a(t.blockNumber))return!1;if(l(this.params.toBlock)&&a(this.params.toBlock)<=a(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();if(this.params.address&&e&&!this.params.address.includes(e))return!1;return this.params.topics.every(((e,r)=>{let n=t.topics[r];if(!n)return!1;n=n.toLowerCase();let i=Array.isArray(e)?e:[e];if(i.includes(null))return!0;i=i.map((t=>t.toLowerCase()));return i.includes(n)}))}}},5232:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const n=r(4445);class i extends Error{constructor(t,e,r){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==r&&(this.data=r)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return n.default(this.serialize(),o,2)}}e.EthereumRpcError=i;function o(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,r){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,r)}}},4971:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},6339:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const n=r(5232),i=r(1299),o=r(4971);function s(t,e){const[r,o]=u(e);return new n.EthereumRpcError(t,r||i.getMessageFromCode(t),o)}function a(t,e){const[r,o]=u(e);return new n.EthereumProviderError(t,r||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:t=>s(o.errorCodes.rpc.parse,t),invalidRequest:t=>s(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>s(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>s(o.errorCodes.rpc.methodNotFound,t),internal:t=>s(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(e,t)},invalidInput:t=>s(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>s(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>s(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>s(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>s(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>s(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>a(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>a(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>a(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>a(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>a(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:i}=t;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(e,r,i)}}}},9313:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const n=r(5232);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=r(1299);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=r(6339);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=r(4971);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},1299:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(4971),i=r(5232),o=n.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",a={code:o,message:u(o)};function u(t,r=s){if(Number.isInteger(t)){const r=t.toString();if(h(n.errorValues,r))return n.errorValues[r].message;if(l(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!n.errorValues[e]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function f(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=u,e.isValidCode=c,e.serializeError=function(t,{fallbackError:e=a,shouldIncludeStack:r=!1}={}){var n,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const s={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&c(t.code)){const e=t;s.code=e.code,e.message&&"string"==typeof e.message?(s.message=e.message,h(e,"data")&&(s.data=e.data)):(s.message=u(s.code),s.data={originalError:f(t)})}else{s.code=e.code;const r=null===(n=t)||void 0===n?void 0:n.message;s.message=r&&"string"==typeof r?r:e.message,s.data={originalError:f(t)}}const l=null===(o=t)||void 0===o?void 0:o.stack;return r&&t&&l&&"string"==typeof l&&(s.stack=l),s}},6739:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const i=n(r(9394)),o=r(9313);class s extends i.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,r,n)=>{try{const[i,o,a]=await s._runAllMiddleware(t,e,this._middleware);return o?(await s._runReturnHandlers(a),n(i)):r((async t=>{try{await s._runReturnHandlers(a)}catch(e){return t(e)}return t()}))}catch(i){return n(i)}}}async _handleBatch(t,e){try{const r=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,r):r}catch(r){if(e)return e(r);throw r}}_promiseHandle(t){return new Promise((e=>{this._handle(t,((t,r)=>{e(r)}))}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const r=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!=typeof t.method){const r=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(r,{id:t.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},t),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(s){i=s}return i&&(delete n.result,n.error||(n.error=o.serializeError(i))),e(i,n)}async _processRequest(t,e){const[r,n,i]=await s._runAllMiddleware(t,e,this._middleware);if(s._checkForCompletion(t,e,n),await s._runReturnHandlers(i),r)throw r}static async _runAllMiddleware(t,e,r){const n=[];let i=null,o=!1;for(const a of r)if([i,o]=await s._runMiddleware(t,e,a,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(t,e,r,n){return new Promise((i=>{const s=t=>{const r=t||e.error;r&&(e.error=o.serializeError(r)),i([r,!0])},u=r=>{e.error?s(e.error):(r&&("function"!=typeof r&&s(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${a(t)}`,{request:t})),n.push(r)),i([null,!1]))};try{r(t,e,u,s)}catch(c){s(c)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,r)=>{e((e=>e?r(e):t()))}))}static _checkForCompletion(t,e,r){if(!("result"in e)&&!("error"in e))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(t)}`,{request:t});if(!r)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(t)}`,{request:t})}}function a(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=s},1152:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,r,n,i)=>{let o;const s=new Promise((t=>{o=t}));let a=null,u=!1;const c=async()=>{u=!0,n((t=>{a=t,o()})),await s};try{await t(e,r,c),u?(await s,a(null)):i(null)}catch(l){a?a(l):i(l)}}}},4980:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,r,n,i)=>{const o=t[e.method];return void 0===o?n():"function"==typeof o?o(e,r,n,i):(r.result=o,i())}}},1084:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;const r=4294967295;let n=Math.floor(Math.random()*r);e.getUniqueId=function(){return n=(n+1)%r,n}},8104:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const n=r(1084);e.createIdRemapMiddleware=function(){return(t,e,r,i)=>{const o=t.id,s=n.getUniqueId();t.id=s,e.id=s,r((r=>{t.id=o,e.id=o,r()}))}}},8320:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(8104),e),i(r(1152),e),i(r(4980),e),i(r(1084),e),i(r(6739),e),i(r(8175),e)},8175:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const n=r(6739);e.mergeMiddleware=function(t){const e=new n.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},6417:function(t){"use strict";const e=(t,e,r,n)=>function(...i){return new(0,e.promiseModule)(((o,s)=>{e.multiArgs?i.push(((...t)=>{e.errorFirst?t[0]?s(t):(t.shift(),o(t)):o(t)})):e.errorFirst?i.push(((t,e)=>{t?s(t):o(e)})):i.push(o);const a=this===r?n:this;Reflect.apply(t,a,i)}))},r=new WeakMap;t.exports=(t,n)=>{n={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...n};const i=typeof t;if(null===t||"object"!==i&&"function"!==i)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":i}\``);const o=new WeakMap,s=new Proxy(t,{apply(t,r,i){const a=o.get(t);if(a)return Reflect.apply(a,r,i);const u=n.excludeMain?t:e(t,n,s,t);return o.set(t,u),Reflect.apply(u,r,i)},get(t,i){const a=t[i];if(!((t,e)=>{let i=r.get(t);if(i||(i={},r.set(t,i)),e in i)return i[e];const o=t=>"string"==typeof t||"symbol"==typeof e?e===t:t.test(e),s=Reflect.getOwnPropertyDescriptor(t,e),a=void 0===s||s.writable||s.configurable,u=(n.include?n.include.some(o):!n.exclude.some(o))&&a;return i[e]=u,u})(t,i)||a===Function.prototype[i])return a;const u=o.get(a);if(u)return u;if("function"==typeof a){const r=e(a,n,s,t);return o.set(a,r),r}return a}});return s}},8961:function(t,e,r){const n=r(9394).default,i=r(7688),{createAsyncMiddleware:o}=r(8320),s=r(8406),{unsafeRandomBytes:a,incrementHexInt:u}=r(8112),c=r(207);function l(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function({blockTracker:t,provider:e}){const r={},f=s({blockTracker:t,provider:e});let h=!1;const d=new n,p=i({eth_subscribe:o((async function(n,i){if(h)throw new Error("SubscriptionManager - attempting to use after destroying");const o=n.params[0],s=a(16);let d;switch(o){case"newHeads":d=p({subId:s});break;case"logs":const t=n.params[1];d=g({subId:s,filter:await f.newLogFilter(t)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return r[s]=d,void(i.result=s);function p({subId:r}){const n={type:o,destroy:async()=>{t.removeListener("sync",n.update)},update:async({oldBlock:t,newBlock:n})=>{const i=n,o=u(t);(await c({provider:e,fromBlock:o,toBlock:i})).map(l).forEach((t=>{m(r,t)}))}};return t.on("sync",n.update),n}function g({subId:t,filter:e}){e.on("update",(e=>m(t,e)));return{type:o,destroy:async()=>await f.uninstallFilter(e.idHex)}}})),eth_unsubscribe:o((async function(t,e){if(h)throw new Error("SubscriptionManager - attempting to use after destroying");const n=t.params[0],i=r[n];if(!i)return void(e.result=!1);delete r[n],await i.destroy(),e.result=!0}))});return p.destroy=function(){d.removeAllListeners();for(const t in r)r[t].destroy(),delete r[t];h=!0},{events:d,middleware:p};function m(t,e){d.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},5792:function(t,e,r){const n=r(6622),i=r(207),{incrementHexInt:o}=r(8112);t.exports=class extends n{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const e=t,r=o(t),n=await i({provider:this.provider,fromBlock:r,toBlock:e}),s=[];for(const i of n)s.push(...i.transactions);this.addResults(s)}}},7870:function(t,e,r){const n=r(1625),i=r(1497),o=[void 0,null,"<nil>"];t.exports=function(t={}){const{blockTracker:e}=t;if(!e)throw new Error("createBlockCacheMiddleware - No BlockTracker specified");const r=new s,o={perma:r,block:r,fork:r};return i((async(t,i,s)=>{if(t.skipCache)return s();const a=n.cacheTypeForPayload(t),u=o[a];if(!u)return s();if(!u.canCacheRequest(t))return s();let c,l=n.blockTagForPayload(t);if(l||(l="latest"),"earliest"===l)c="0x00";else if("latest"===l){const t=await e.getLatestBlock();r.clearBefore(t),c=t}else c=l;const f=await u.get(t,c);void 0===f?(await s(),await u.set(t,c,i.result)):i.result=f}))};class s{constructor(){this.cache={}}getBlockCacheForPayload(t,e){const r=Number.parseInt(e,16);let n=this.cache[r];if(!n){const t={};this.cache[r]=t,n=t}return n}async get(t,e){const r=this.getBlockCacheForPayload(t,e);if(!r)return;return r[n.cacheIdentifierForPayload(t,!0)]}async set(t,e,r){if(!this.canCacheResult(t,r))return;this.getBlockCacheForPayload(t,e)[n.cacheIdentifierForPayload(t,!0)]=r}canCacheRequest(t){if(!n.canCache(t))return!1;return"pending"!==n.blockTagForPayload(t)}canCacheResult(t,e){if(!o.includes(e))return!!(!["eth_getTransactionByHash","eth_getTransactionReceipt"].includes(t.method)||e&&e.blockHash&&"0x0000000000000000000000000000000000000000000000000000000000000000"!==e.blockHash)}clearBefore(t){const e=this,r=Number.parseInt(t,16);Object.keys(e.cache).map(Number).filter((t=>t<r)).forEach((t=>delete e.cache[t]))}}},1625:function(t,e,r){const n=r(7266);function i(t){return"never"!==a(t)}function o(t){const e=s(t);return e>=t.params.length?t.params:"eth_getBlockByNumber"===t.method?t.params.slice(1):t.params.slice(0,e)}function s(t){switch(t.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":return 1;case"eth_getBlockByNumber":return 0;default:return}}function a(t){switch(t.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":case"test_permaCache":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":case"test_forkCache":return"fork";case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"test_blockCache":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":case"test_neverCache":return"never"}}t.exports={cacheIdentifierForPayload:function(t,e){const r=e?o(t):t.params;return i(t)?t.method+":"+n(r):null},canCache:i,blockTagForPayload:function(t){let e=s(t);if(e>=t.params.length)return null;return t.params[e]},paramsWithoutBlockTag:o,blockTagParamIndex:s,cacheTypeForPayload:a}},7688:function(t,e,r){t.exports=r(2121)},5682:function(t,e,r){const n=r(7529),i=r(3420)();function o(t){this.currentProvider=t}function s(t){return function(){var e=[].slice.call(arguments),r=e.pop();this.sendAsync({method:t,params:e},r)}}function a(t,e){return function(){var r=[].slice.call(arguments),n=r.pop();r.length<t&&r.push("latest"),this.sendAsync({method:e,params:r},n)}}t.exports=o,o.prototype.getBalance=a(2,"eth_getBalance"),o.prototype.getCode=a(2,"eth_getCode"),o.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),o.prototype.getStorageAt=a(3,"eth_getStorageAt"),o.prototype.call=a(2,"eth_call"),o.prototype.protocolVersion=s("eth_protocolVersion"),o.prototype.syncing=s("eth_syncing"),o.prototype.coinbase=s("eth_coinbase"),o.prototype.mining=s("eth_mining"),o.prototype.hashrate=s("eth_hashrate"),o.prototype.gasPrice=s("eth_gasPrice"),o.prototype.accounts=s("eth_accounts"),o.prototype.blockNumber=s("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=s("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=s("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=s("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=s("eth_getUncleCountByBlockNumber"),o.prototype.sign=s("eth_sign"),o.prototype.sendTransaction=s("eth_sendTransaction"),o.prototype.sendRawTransaction=s("eth_sendRawTransaction"),o.prototype.estimateGas=s("eth_estimateGas"),o.prototype.getBlockByHash=s("eth_getBlockByHash"),o.prototype.getBlockByNumber=s("eth_getBlockByNumber"),o.prototype.getTransactionByHash=s("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=s("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=s("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=s("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=s("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=s("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=s("eth_getCompilers"),o.prototype.compileLLL=s("eth_compileLLL"),o.prototype.compileSolidity=s("eth_compileSolidity"),o.prototype.compileSerpent=s("eth_compileSerpent"),o.prototype.newFilter=s("eth_newFilter"),o.prototype.newBlockFilter=s("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=s("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=s("eth_uninstallFilter"),o.prototype.getFilterChanges=s("eth_getFilterChanges"),o.prototype.getFilterLogs=s("eth_getFilterLogs"),o.prototype.getLogs=s("eth_getLogs"),o.prototype.getWork=s("eth_getWork"),o.prototype.submitWork=s("eth_submitWork"),o.prototype.submitHashrate=s("eth_submitHashrate"),o.prototype.sendAsync=function(t,e){var r;this.currentProvider.sendAsync((r=t,n({id:i(),jsonrpc:"2.0",params:[]},r)),(function(t,r){if(!t&&r.error&&(t=new Error("EthQuery - RPC Error - "+r.error.message)),t)return e(t);e(null,r.result)}))}},2843:function(t,e,r){const n=r(1964),i=r(8142);function o(t){const e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;const r=t.map((function(t){return"bytes"===t.type?n.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),s=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),s),i.soliditySHA3(o,r)])}function s(t,e){const r=n.toBuffer(e),i=n.fromRpcSig(r);return n.ecrecover(t,i.v,i.r,i.s)}function a(t){const e=n.toBuffer(t.data);return s(n.hashPersonalMessage(e),t.sig)}function u(t,e){for(var r=""+t;r.length<e;)r="0"+r;return r}t.exports={concatSig:function(t,e,r){const i=n.fromSigned(e),o=n.fromSigned(r),s=n.bufferToInt(t),a=u(n.toUnsigned(i).toString("hex"),64),c=u(n.toUnsigned(o).toString("hex"),64),l=n.stripHexPrefix(n.intToHex(s));return n.addHexPrefix(a.concat(c,l)).toString("hex")},normalize:function(t){if(t){if("number"==typeof t){const e=n.toBuffer(t);t=n.bufferToHex(e)}if("string"!=typeof t){var e="eth-sig-util.normalize() requires hex string or integer input.";throw new Error(e+=" received "+typeof t+": "+t)}return n.addHexPrefix(t.toLowerCase())}},personalSign:function(t,e){var r=n.toBuffer(e.data),i=n.hashPersonalMessage(r),o=n.ecsign(i,t);return n.bufferToHex(this.concatSig(o.v,o.r,o.s))},recoverPersonalSignature:function(t){const e=a(t),r=n.publicToAddress(e);return n.bufferToHex(r)},extractPublicKey:function(t){return"0x"+a(t).toString("hex")},typedSignatureHash:function(t){const e=o(t);return n.bufferToHex(e)},signTypedData:function(t,e){const r=o(e.data),i=n.ecsign(r,t);return n.bufferToHex(this.concatSig(i.v,i.r,i.s))},recoverTypedSignature:function(t){const e=s(o(t.data),t.sig),r=n.publicToAddress(e);return n.bufferToHex(r)}}},5443:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.createHashFunction=function(t){return function(e){var r=t();return r.update(e),n.from(r.digest())}}},2192:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(5443),i=r(5811);e.keccak224=n.createHashFunction((function(){return i("keccak224")})),e.keccak256=n.createHashFunction((function(){return i("keccak256")})),e.keccak384=n.createHashFunction((function(){return i("keccak384")})),e.keccak512=n.createHashFunction((function(){return i("keccak512")}))},472:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1798);e.getRandomBytes=function(t){return new Promise((function(e,r){n(t,(function(t,n){t?r(t):e(n)}))}))},e.getRandomBytesSync=function(t){return n(t)}},5053:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(a){o=[6,a],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7221),s=r(472);e.createPrivateKey=function(){return n(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,s.getRandomBytes(32)];case 1:return t=e.sent(),o.privateKeyVerify(t)?[2,t]:[3,0];case 2:return[2]}}))}))},e.createPrivateKeySync=function(){for(;;){var t=s.getRandomBytesSync(32);if(o.privateKeyVerify(t))return t}},function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(7221))},8142:function(t,e,r){t.exports=r(5437)},5437:function(t,e,r){var n=r(8764).Buffer;const i=r(6589),o=r(3550);var s=function(){};function a(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function u(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function c(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function l(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function f(t){var e=typeof t;if("string"===e)return i.isHexPrefixed(t)?new o(i.stripHexPrefix(t),16):new o(t,10);if("number"===e)return new o(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function h(t){var e=/^(\w+)\((.*)\)$/.exec(t);if(3!==e.length)throw new Error("Invalid method signature");var r=/^(.+)\):\((.+)$/.exec(e[2]);if(null!==r&&3===r.length)return{method:e[1],args:r[1].split(","),retargs:r[2].split(",")};var n=e[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:e[1],args:n}}function d(t,e){var r,s,a,h;if("address"===t)return d("uint160",f(e));if("bool"===t)return d("uint8",e?1:0);if("string"===t)return d("bytes",n.from(e,"utf8"));if(y(t)){if(void 0===e.length)throw new Error("Not an array?");if("dynamic"!==(r=l(t))&&0!==r&&e.length>r)throw new Error("Elements exceed array size: "+r);for(h in a=[],t=t.slice(0,t.lastIndexOf("[")),"string"==typeof e&&(e=JSON.parse(e)),e)a.push(d(t,e[h]));if("dynamic"===r){var p=d("uint256",e.length);a.unshift(p)}return n.concat(a)}if("bytes"===t)return e=n.from(e),a=n.concat([d("uint256",e.length),e]),e.length%32!=0&&(a=n.concat([a,i.zeros(32-e.length%32)])),a;if(t.startsWith("bytes")){if((r=u(t))<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return i.setLengthRight(e,32)}if(t.startsWith("uint")){if((r=u(t))%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if((s=f(e)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+s.bitLength());if(s<0)throw new Error("Supplied uint is negative");return s.toArrayLike(n,"be",32)}if(t.startsWith("int")){if((r=u(t))%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if((s=f(e)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+s.bitLength());return s.toTwos(256).toArrayLike(n,"be",32)}if(t.startsWith("ufixed")){if(r=c(t),(s=f(e))<0)throw new Error("Supplied ufixed is negative");return d("uint256",s.mul(new o(2).pow(new o(r[1]))))}if(t.startsWith("fixed"))return r=c(t),d("int256",f(e).mul(new o(2).pow(new o(r[1]))));throw new Error("Unsupported or invalid type: "+t)}function p(t,e,r){var i,s,a,u;if("string"==typeof t&&(t=m(t)),"address"===t.name)return p(t.rawType,e,r).toArrayLike(n,"be",20).toString("hex");if("bool"===t.name)return p(t.rawType,e,r).toString()===new o(1).toString();if("string"===t.name){var c=p(t.rawType,e,r);return n.from(c,"utf8").toString()}if(t.isArray){for(a=[],i=t.size,"dynamic"===t.size&&(r=p("uint256",e,r).toNumber(),i=p("uint256",e,r).toNumber(),r+=32),u=0;u<i;u++){var l=p(t.subArray,e,r);a.push(l),r+=t.subArray.memoryUsage}return a}if("bytes"===t.name)return r=p("uint256",e,r).toNumber(),i=p("uint256",e,r).toNumber(),e.slice(r+32,r+32+i);if(t.name.startsWith("bytes"))return e.slice(r,r+t.size);if(t.name.startsWith("uint")){if((s=new o(e.slice(r,r+32),16,"be")).bitLength()>t.size)throw new Error("Decoded int exceeds width: "+t.size+" vs "+s.bitLength());return s}if(t.name.startsWith("int")){if((s=new o(e.slice(r,r+32),16,"be").fromTwos(256)).bitLength()>t.size)throw new Error("Decoded uint exceeds width: "+t.size+" vs "+s.bitLength());return s}if(t.name.startsWith("ufixed")){if(i=new o(2).pow(new o(t.size[1])),!(s=p("uint256",e,r)).mod(i).isZero())throw new Error("Decimals not supported yet");return s.div(i)}if(t.name.startsWith("fixed")){if(i=new o(2).pow(new o(t.size[1])),!(s=p("int256",e,r)).mod(i).isZero())throw new Error("Decimals not supported yet");return s.div(i)}throw new Error("Unsupported or invalid type: "+t.name)}function m(t){var e,r,n;if(y(t)){e=l(t);var i=t.slice(0,t.lastIndexOf("["));return i=m(i),r={isArray:!0,name:t,size:e,memoryUsage:"dynamic"===e?32:i.memoryUsage*e,subArray:i}}switch(t){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(r={rawType:n,name:t,memoryUsage:32},t.startsWith("bytes")&&"bytes"!==t||t.startsWith("uint")||t.startsWith("int")?r.size=u(t):(t.startsWith("ufixed")||t.startsWith("fixed"))&&(r.size=c(t)),t.startsWith("bytes")&&"bytes"!==t&&(r.size<1||r.size>32))throw new Error("Invalid bytes<N> width: "+r.size);if((t.startsWith("uint")||t.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint<N> width: "+r.size);return r}function g(t){return"string"===t||"bytes"===t||"dynamic"===l(t)}function y(t){return t.lastIndexOf("]")===t.length-1}function v(t,e){return t.startsWith("address")||t.startsWith("bytes")?"0x"+e.toString("hex"):e.toString()}s.eventID=function(t,e){var r=t+"("+e.map(a).join(",")+")";return i.keccak256(n.from(r))},s.methodID=function(t,e){return s.eventID(t,e).slice(0,4)},s.rawEncode=function(t,e){var r=[],i=[],o=0;t.forEach((function(t){if(y(t)){var e=l(t);o+="dynamic"!==e?32*e:32}else o+=32}));for(var s=0;s<t.length;s++){var u=a(t[s]),c=d(u,e[s]);g(u)?(r.push(d("uint256",o)),i.push(c),o+=c.length):r.push(c)}return n.concat(r.concat(i))},s.rawDecode=function(t,e){var r=[];e=n.from(e);for(var i=0,o=0;o<t.length;o++){var s=m(a(t[o])),u=p(s,e,i);i+=s.memoryUsage,r.push(u)}return r},s.simpleEncode=function(t){var e=Array.prototype.slice.call(arguments).slice(1),r=h(t);if(e.length!==r.args.length)throw new Error("Argument count mismatch");return n.concat([s.methodID(r.method,r.args),s.rawEncode(r.args,e)])},s.simpleDecode=function(t,e){var r=h(t);if(!r.retargs)throw new Error("No return values in method");return s.rawDecode(r.retargs,e)},s.stringify=function(t,e){var r=[];for(var n in t){var i=t[n],o=e[n];o=/^[^\[]+\[.*\]$/.test(i)?o.map((function(t){return v(i,t)})).join(", "):v(i,o),r.push(o)}return r},s.solidityHexValue=function(t,e,r){var o,a;if(y(t)){var c=t.replace(/\[.*?\]/,"");if(!y(c)){var h=l(t);if("dynamic"!==h&&0!==h&&e.length>h)throw new Error("Elements exceed array size: "+h)}var d=e.map((function(t){return s.solidityHexValue(c,t,256)}));return n.concat(d)}if("bytes"===t)return e;if("string"===t)return n.from(e,"utf8");if("bool"===t){r=r||8;var p=Array(r/4).join("0");return n.from(e?p+"1":p+"0","hex")}if("address"===t){var m=20;return r&&(m=r/8),i.setLengthLeft(e,m)}if(t.startsWith("bytes")){if((o=u(t))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return i.setLengthRight(e,o)}if(t.startsWith("uint")){if((o=u(t))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((a=f(e)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+a.bitLength());return r=r||o,a.toArrayLike(n,"be",r/8)}if(t.startsWith("int")){if((o=u(t))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((a=f(e)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+a.bitLength());return r=r||o,a.toTwos(o).toArrayLike(n,"be",r/8)}throw new Error("Unsupported or invalid type: "+t)},s.solidityPack=function(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r=[],i=0;i<t.length;i++){var o=a(t[i]),u=e[i];r.push(s.solidityHexValue(o,u,null))}return n.concat(r)},s.soliditySHA3=function(t,e){return i.keccak256(s.solidityPack(t,e))},s.soliditySHA256=function(t,e){return i.sha256(s.solidityPack(t,e))},s.solidityRIPEMD160=function(t,e){return i.ripemd160(s.solidityPack(t,e),!0)},s.fromSerpent=function(t){for(var e,r=[],n=0;n<t.length;n++){var i=t[n];if("s"===i)r.push("bytes");else if("b"===i){for(var o="bytes",s=n+1;s<t.length&&((e=t[s])>="0"&&e<="9");)o+=t[s]-"0",s++;n=s-1,r.push(o)}else if("i"===i)r.push("int256");else{if("a"!==i)throw new Error("Unsupported or invalid type: "+i);r.push("int256[]")}}return r},s.toSerpent=function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if("bytes"===n)e.push("s");else if(n.startsWith("bytes"))e.push("b"+u(n));else if("int256"===n)e.push("i");else{if("int256[]"!==n)throw new Error("Unsupported or invalid type: "+n);e.push("a")}}return e.join("")},t.exports=s},248:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.importPublic=e.privateToPublic=e.privateToAddress=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.isPrecompiled=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isZeroAddress=e.isValidAddress=e.zeroAddress=void 0;var i=r(9282),o=r(884),s=r(3230),a=r(3550),u=r(7124),c=r(1550);e.zeroAddress=function(){var t=u.zeros(20);return u.bufferToHex(t)},e.isValidAddress=function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)},e.isZeroAddress=function(t){return e.zeroAddress()===u.addHexPrefix(t)},e.toChecksumAddress=function(t,e){t=o.stripHexPrefix(t).toLowerCase();for(var r=void 0!==e?e.toString()+"0x":"",n=c.keccak(r+t).toString("hex"),i="0x",s=0;s<t.length;s++)parseInt(n[s],16)>=8?i+=t[s].toUpperCase():i+=t[s];return i},e.isValidChecksumAddress=function(t,r){return e.isValidAddress(t)&&e.toChecksumAddress(t,r)===t},e.generateAddress=function(t,e){t=u.toBuffer(t);var r=new a(e);return r.isZero()?c.rlphash([t,null]).slice(-20):c.rlphash([t,n.from(r.toArray())]).slice(-20)},e.generateAddress2=function(t,e,r){var o=u.toBuffer(t),s=u.toBuffer(e),a=u.toBuffer(r);return i(20===o.length),i(32===s.length),c.keccak256(n.concat([n.from("ff","hex"),o,s,c.keccak256(a)])).slice(-20)},e.isPrecompiled=function(t){var e=u.unpad(t);return 1===e.length&&e[0]>=1&&e[0]<=8},e.isValidPrivate=function(t){return s.privateKeyVerify(t)},e.isValidPublic=function(t,e){return void 0===e&&(e=!1),64===t.length?s.publicKeyVerify(n.concat([n.from([4]),t])):!!e&&s.publicKeyVerify(t)},e.pubToAddress=function(t,e){return void 0===e&&(e=!1),t=u.toBuffer(t),e&&64!==t.length&&(t=s.publicKeyConvert(t,!1).slice(1)),i(64===t.length),c.keccak(t).slice(-20)},e.publicToAddress=e.pubToAddress,e.privateToAddress=function(t){return e.publicToAddress(e.privateToPublic(t))},e.privateToPublic=function(t){return t=u.toBuffer(t),s.publicKeyCreate(t,!1).slice(1)},e.importPublic=function(t){return 64!==(t=u.toBuffer(t)).length&&(t=s.publicKeyConvert(t,!1).slice(1)),t}},7124:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.baToJSON=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.stripZeros=e.unpad=e.setLengthRight=e.setLength=e.setLengthLeft=e.zeros=void 0;var i=r(884),o=r(3550);e.zeros=function(t){return n.allocUnsafe(t).fill(0)},e.setLengthLeft=function(t,r,n){void 0===n&&(n=!1);var i=e.zeros(r);return t=e.toBuffer(t),n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)},e.setLength=e.setLengthLeft,e.setLengthRight=function(t,r){return e.setLength(t,r,!0)},e.unpad=function(t){for(var e=(t=i.stripHexPrefix(t))[0];t.length>0&&"0"===e.toString();)e=(t=t.slice(1))[0];return t},e.stripZeros=e.unpad,e.toBuffer=function(t){if(!n.isBuffer(t))if(Array.isArray(t))t=n.from(t);else if("string"==typeof t){if(!i.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=n.from(i.padToEven(i.stripHexPrefix(t)),"hex")}else if("number"==typeof t)t=i.intToBuffer(t);else if(null==t)t=n.allocUnsafe(0);else if(o.isBN(t))t=t.toArrayLike(n);else{if(!t.toArray)throw new Error("invalid type");t=n.from(t.toArray())}return t},e.bufferToInt=function(t){return new o(e.toBuffer(t)).toNumber()},e.bufferToHex=function(t){return"0x"+(t=e.toBuffer(t)).toString("hex")},e.fromSigned=function(t){return new o(t).fromTwos(256)},e.toUnsigned=function(t){return n.from(t.toTwos(256).toArray())},e.addHexPrefix=function(t){return"string"!=typeof t||i.isHexPrefixed(t)?t:"0x"+t},e.baToJSON=function(t){if(n.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var r=[],i=0;i<t.length;i++)r.push(e.baToJSON(t[i]));return r}}},6649:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=void 0;var i=r(3550);e.MAX_INTEGER=new i("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new i("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=n.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=n.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=n.from(e.KECCAK256_RLP_S,"hex")},1550:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160=e.sha256=e.keccak256=e.keccak=void 0;var i=r(2192),o=i.keccak224,s=i.keccak384,a=i.keccak256,u=i.keccak512,c=r(3482),l=r(884),f=r(1675),h=r(7124);e.keccak=function(t,e){switch(void 0===e&&(e=256),t="string"!=typeof t||l.isHexString(t)?h.toBuffer(t):n.from(t,"utf8"),e||(e=256),e){case 224:return o(t);case 256:return a(t);case 384:return s(t);case 512:return u(t);default:throw new Error("Invald algorithm: keccak"+e)}},e.keccak256=function(t){return e.keccak(t)},e.sha256=function(t){return t=h.toBuffer(t),c("sha256").update(t).digest()},e.ripemd160=function(t,e){t=h.toBuffer(t);var r=c("rmd160").update(t).digest();return!0===e?h.setLength(r,32):r},e.rlphash=function(t){return e.keccak(f.encode(t))}},6589:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=e.rlp=e.BN=void 0;var o=r(3230);e.secp256k1=o;var s=r(884),a=r(3550);e.BN=a;var u=r(1675);e.rlp=u,Object.assign(e,s),i(r(6649),e),i(r(248),e),i(r(1550),e),i(r(6232),e),i(r(7124),e),i(r(1113),e)},1113:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.defineProperties=void 0;var i=r(9282),o=r(884),s=r(1675),a=r(7124);e.defineProperties=function(t,e,r){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return a.baToJSON(t.raw)},t.serialize=function(){return s.encode(t.raw)},e.forEach((function(e,r){function o(){return t.raw[r]}function s(o){"00"!==(o=a.toBuffer(o)).toString("hex")||e.allowZero||(o=n.allocUnsafe(0)),e.allowLess&&e.length?(o=a.stripZeros(o),i(e.length>=o.length,"The field "+e.name+" must not have more "+e.length+" bytes")):e.allowZero&&0===o.length||!e.length||i(e.length===o.length,"The field "+e.name+" must have byte length of "+e.length),t.raw[r]=o}t._fields.push(e.name),Object.defineProperty(t,e.name,{enumerable:!0,configurable:!0,get:o,set:s}),e.default&&(t[e.name]=e.default),e.alias&&Object.defineProperty(t,e.alias,{enumerable:!1,configurable:!0,set:s,get:o})})),r)if("string"==typeof r&&(r=n.from(o.stripHexPrefix(r),"hex")),n.isBuffer(r)&&(r=s.decode(r)),Array.isArray(r)){if(r.length>t._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(e,r){t[t._fields[r]]=a.toBuffer(e)}))}else{if("object"!=typeof r)throw new Error("invalid data");var u=Object.keys(r);e.forEach((function(e){-1!==u.indexOf(e.name)&&(t[e.name]=r[e.name]),-1!==u.indexOf(e.alias)&&(t[e.alias]=r[e.alias])}))}}},3230:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.ecdhUnsafe=e.ecdh=e.recover=e.verify=e.sign=e.signatureImportLax=e.signatureImport=e.signatureExport=e.signatureNormalize=e.publicKeyCombine=e.publicKeyTweakMul=e.publicKeyTweakAdd=e.publicKeyVerify=e.publicKeyConvert=e.publicKeyCreate=e.privateKeyTweakMul=e.privateKeyTweakAdd=e.privateKeyModInverse=e.privateKeyNegate=e.privateKeyImport=e.privateKeyExport=e.privateKeyVerify=void 0;var i=r(5053),o=r(8427),s=r(3646);e.privateKeyVerify=function(t){return 32===t.length&&i.privateKeyVerify(Uint8Array.from(t))},e.privateKeyExport=function(t,e){if(32!==t.length)throw new RangeError("private key length is invalid");var r=o.privateKeyExport(t,e);return s.privateKeyExport(t,r,e)},e.privateKeyImport=function(t){if(null!==(t=s.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error("couldn't import from DER format")},e.privateKeyNegate=function(t){return n.from(i.privateKeyNegate(Uint8Array.from(t)))},e.privateKeyModInverse=function(t){if(32!==t.length)throw new Error("private key length is invalid");return n.from(o.privateKeyModInverse(Uint8Array.from(t)))},e.privateKeyTweakAdd=function(t,e){return n.from(i.privateKeyTweakAdd(Uint8Array.from(t),e))},e.privateKeyTweakMul=function(t,e){return n.from(i.privateKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e)))},e.publicKeyCreate=function(t,e){return n.from(i.publicKeyCreate(Uint8Array.from(t),e))},e.publicKeyConvert=function(t,e){return n.from(i.publicKeyConvert(Uint8Array.from(t),e))},e.publicKeyVerify=function(t){return(33===t.length||65===t.length)&&i.publicKeyVerify(Uint8Array.from(t))},e.publicKeyTweakAdd=function(t,e,r){return n.from(i.publicKeyTweakAdd(Uint8Array.from(t),Uint8Array.from(e),r))},e.publicKeyTweakMul=function(t,e,r){return n.from(i.publicKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e),r))},e.publicKeyCombine=function(t,e){var r=[];return t.forEach((function(t){r.push(Uint8Array.from(t))})),n.from(i.publicKeyCombine(r,e))},e.signatureNormalize=function(t){return n.from(i.signatureNormalize(Uint8Array.from(t)))},e.signatureExport=function(t){return n.from(i.signatureExport(Uint8Array.from(t)))},e.signatureImport=function(t){return n.from(i.signatureImport(Uint8Array.from(t)))},e.signatureImportLax=function(t){if(0===t.length)throw new RangeError("signature length is invalid");var e=s.signatureImportLax(t);if(null===e)throw new Error("couldn't parse DER signature");return o.signatureImport(e)},e.sign=function(t,e,r){if(null===r)throw new TypeError("options should be an Object");var o=void 0;if(r){if(o={},null===r.data)throw new TypeError("options.data should be a Buffer");if(r.data){if(32!=r.data.length)throw new RangeError("options.data length is invalid");o.data=new Uint8Array(r.data)}if(null===r.noncefn)throw new TypeError("options.noncefn should be a Function");r.noncefn&&(o.noncefn=function(t,e,i,o,s){var a=null!=i?n.from(i):null,u=null!=o?n.from(o):null,c=n.from("");return r.noncefn&&(c=r.noncefn(n.from(t),n.from(e),a,u,s)),new Uint8Array(c)})}var s=i.ecdsaSign(Uint8Array.from(t),Uint8Array.from(e),o);return{signature:n.from(s.signature),recovery:s.recid}},e.verify=function(t,e,r){return i.ecdsaVerify(Uint8Array.from(e),Uint8Array.from(t),r)},e.recover=function(t,e,r,o){return n.from(i.ecdsaRecover(Uint8Array.from(e),r,Uint8Array.from(t),o))},e.ecdh=function(t,e){return n.from(i.ecdh(Uint8Array.from(t),Uint8Array.from(e),{}))},e.ecdhUnsafe=function(t,e,r){if(33!==t.length&&65!==t.length)throw new RangeError("public key length is invalid");if(32!==e.length)throw new RangeError("private key length is invalid");return n.from(o.ecdhUnsafe(Uint8Array.from(t),Uint8Array.from(e),r))}},3646:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0});var i=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),o=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e.privateKeyExport=function(t,e,r){void 0===r&&(r=!0);var s=n.from(r?i:o);return t.copy(s,r?8:9),e.copy(s,r?181:214),s},e.privateKeyImport=function(t){var e=t.length,r=0;if(e<r+1||48!==t[r])return null;if(e<(r+=1)+1||!(128&t[r]))return null;var n=127&t[r];if(n<1||n>2)return null;if(e<(r+=1)+n)return null;var i=t[r+n-1]|(n>1?t[r+n-2]<<8:0);return e<(r+=n)+i||e<r+3||2!==t[r]||1!==t[r+1]||1!==t[r+2]||e<(r+=3)+2||4!==t[r]||t[r+1]>32||e<r+2+t[r+1]?null:t.slice(r+2,r+2+t[r+1])},e.signatureImportLax=function(t){var e=n.alloc(32,0),r=n.alloc(32,0),i=t.length,o=0;if(48!==t[o++])return null;var s=t[o++];if(128&s&&(o+=s-128)>i)return null;if(2!==t[o++])return null;var a=t[o++];if(128&a){if(o+(s=a-128)>i)return null;for(;s>0&&0===t[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+t[o]}if(a>i-o)return null;var u=o;if(o+=a,2!==t[o++])return null;var c=t[o++];if(128&c){if(o+(s=c-128)>i)return null;for(;s>0&&0===t[o];o+=1,s-=1);for(c=0;s>0;o+=1,s-=1)c=(c<<8)+t[o]}if(c>i-o)return null;var l=o;for(o+=c;a>0&&0===t[u];a-=1,u+=1);if(a>32)return null;var f=t.slice(u,u+a);for(f.copy(e,32-f.length);c>0&&0===t[l];c-=1,l+=1);if(c>32)return null;var h=t.slice(l,l+c);return h.copy(r,32-h.length),{r:e,s:r}}},8427:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0});var i=r(3550),o=new(0,r(6266).ec)("secp256k1"),s=o.curve;e.privateKeyExport=function(t,e){void 0===e&&(e=!0);var r=new i(t);if(r.ucmp(s.n)>=0)throw new Error("couldn't export to DER format");var n=o.g.mul(r);return a(n.getX(),n.getY(),e)},e.privateKeyModInverse=function(t){var e=new i(t);if(e.ucmp(s.n)>=0||e.isZero())throw new Error("private key range is invalid");return e.invm(s.n).toArrayLike(n,"be",32)},e.signatureImport=function(t){var e=new i(t.r);e.ucmp(s.n)>=0&&(e=new i(0));var r=new i(t.s);return r.ucmp(s.n)>=0&&(r=new i(0)),n.concat([e.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},e.ecdhUnsafe=function(t,e,r){void 0===r&&(r=!0);var n=o.keyFromPublic(t),u=new i(e);if(u.ucmp(s.n)>=0||u.isZero())throw new Error("scalar was invalid (zero or overflow)");var c=n.pub.mul(u);return a(c.getX(),c.getY(),r)};var a=function(t,e,r){var i;return r?((i=n.alloc(33))[0]=e.isOdd()?3:2,t.toArrayLike(n,"be",32).copy(i,1)):((i=n.alloc(65))[0]=4,t.toArrayLike(n,"be",32).copy(i,1),e.toArrayLike(n,"be",32).copy(i,33)),i}},6232:function(t,e,r){"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;var i=r(3230),o=r(3550),s=r(7124),a=r(1550);function u(t,e){return e?t-(2*e+35):t-27}function c(t){return 0===t||1===t}e.ecsign=function(t,e,r){var n=i.sign(t,e),o=n.recovery;return{r:n.signature.slice(0,32),s:n.signature.slice(32,64),v:r?o+(2*r+35):o+27}},e.ecrecover=function(t,e,r,o,a){var l=n.concat([s.setLength(r,32),s.setLength(o,32)],64),f=u(e,a);if(!c(f))throw new Error("Invalid signature v value");var h=i.recover(t,l,f);return i.publicKeyConvert(h,!1).slice(1)},e.toRpcSig=function(t,e,r,i){if(!c(u(t,i)))throw new Error("Invalid signature v value");return s.bufferToHex(n.concat([s.setLengthLeft(e,32),s.setLengthLeft(r,32),s.toBuffer(t)]))},e.fromRpcSig=function(t){var e=s.toBuffer(t);if(65!==e.length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},e.isValidSignature=function(t,e,r,n,i){void 0===n&&(n=!0);var s=new o("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),a=new o("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==e.length||32!==r.length)return!1;if(!c(u(t,i)))return!1;var l=new o(e),f=new o(r);return!(l.isZero()||l.gt(a)||f.isZero()||f.gt(a))&&(!n||1!==f.cmp(s))},e.hashPersonalMessage=function(t){var e=n.from("Ethereum Signed Message:\n"+t.length.toString(),"utf-8");return a.keccak(n.concat([e,t]))}},9847:function(t,e,r){"use strict";var n=r(8764).Buffer;var i=r(1964),o=r(7381),s=i.BN,a=new s("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{};var r=[{name:"nonce",length:32,allowLess:!0,default:new n([])},{name:"gasPrice",length:32,allowLess:!0,default:new n([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new n([])},{name:"to",allowZero:!0,length:20,default:new n([])},{name:"value",length:32,allowLess:!0,default:new n([])},{name:"data",alias:"input",allowZero:!0,default:new n([])},{name:"v",allowZero:!0,default:new n([28])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new n([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new n([])}];i.defineProperties(this,r,e),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var o=i.bufferToInt(this.v),s=Math.floor((o-35)/2);s<0&&(s=0),this._chainId=s||e.chainId||0,this._homestead=!0}return t.prototype.toCreationAddress=function(){return""===this.to.toString("hex")},t.prototype.hash=function(t){void 0===t&&(t=!0);var e=void 0;if(t)e=this.raw;else if(this._chainId>0){var r=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,e=this.raw,this.raw=r}else e=this.raw.slice(0,6);return i.rlphash(e)},t.prototype.getChainId=function(){return this._chainId},t.prototype.getSenderAddress=function(){if(this._from)return this._from;var t=this.getSenderPublicKey();return this._from=i.publicToAddress(t),this._from},t.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},t.prototype.verifySignature=function(){var t=this.hash(!1);if(this._homestead&&1===new s(this.s).cmp(a))return!1;try{var e=i.bufferToInt(this.v);this._chainId>0&&(e-=2*this._chainId+8),this._senderPubKey=i.ecrecover(t,e,this.r,this.s)}catch(r){return!1}return!!this._senderPubKey},t.prototype.sign=function(t){var e=this.hash(!1),r=i.ecsign(e,t);this._chainId>0&&(r.v+=2*this._chainId+8),Object.assign(this,r)},t.prototype.getDataFee=function(){for(var t=this.raw[5],e=new s(0),r=0;r<t.length;r++)0===t[r]?e.iaddn(o.txDataZeroGas.v):e.iaddn(o.txDataNonZeroGas.v);return e},t.prototype.getBaseFee=function(){var t=this.getDataFee().iaddn(o.txGas.v);return this._homestead&&this.toCreationAddress()&&t.iaddn(o.txCreation.v),t},t.prototype.getUpfrontCost=function(){return new s(this.gasLimit).imul(new s(this.gasPrice)).iadd(new s(this.value))},t.prototype.validate=function(t){var e=[];return this.verifySignature()||e.push("Invalid Signature"),this.getBaseFee().cmp(new s(this.gasLimit))>0&&e.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===t||!1===t?0===e.length:e.join(" ")},t}();t.exports=u},1964:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(2192),o=i.keccak224,s=i.keccak384,a=i.keccak256,u=i.keccak512,c=r(4565),l=r(9282),f=r(1675),h=r(3550),d=r(3482),p=r(9509).Buffer;Object.assign(e,r(884)),e.MAX_INTEGER=new h("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new h("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.SHA3_NULL_S=e.KECCAK256_NULL_S,e.KECCAK256_NULL=p.from(e.KECCAK256_NULL_S,"hex"),e.SHA3_NULL=e.KECCAK256_NULL,e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.SHA3_RLP_ARRAY_S=e.KECCAK256_RLP_ARRAY_S,e.KECCAK256_RLP_ARRAY=p.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.SHA3_RLP_ARRAY=e.KECCAK256_RLP_ARRAY,e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.SHA3_RLP_S=e.KECCAK256_RLP_S,e.KECCAK256_RLP=p.from(e.KECCAK256_RLP_S,"hex"),e.SHA3_RLP=e.KECCAK256_RLP,e.BN=h,e.rlp=f,e.secp256k1=c,e.zeros=function(t){return p.allocUnsafe(t).fill(0)},e.zeroAddress=function(){var t=e.zeros(20);return e.bufferToHex(t)},e.setLengthLeft=e.setLength=function(t,r,n){var i=e.zeros(r);return t=e.toBuffer(t),n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)},e.setLengthRight=function(t,r){return e.setLength(t,r,!0)},e.unpad=e.stripZeros=function(t){for(var r=(t=e.stripHexPrefix(t))[0];t.length>0&&"0"===r.toString();)r=(t=t.slice(1))[0];return t},e.toBuffer=function(t){if(!p.isBuffer(t))if(Array.isArray(t))t=p.from(t);else if("string"==typeof t)t=e.isHexString(t)?p.from(e.padToEven(e.stripHexPrefix(t)),"hex"):p.from(t);else if("number"==typeof t)t=e.intToBuffer(t);else if(null==t)t=p.allocUnsafe(0);else if(h.isBN(t))t=t.toArrayLike(p);else{if(!t.toArray)throw new Error("invalid type");t=p.from(t.toArray())}return t},e.bufferToInt=function(t){return new h(e.toBuffer(t)).toNumber()},e.bufferToHex=function(t){return"0x"+(t=e.toBuffer(t)).toString("hex")},e.fromSigned=function(t){return new h(t).fromTwos(256)},e.toUnsigned=function(t){return p.from(t.toTwos(256).toArray())},e.keccak=function(t,r){switch(t=e.toBuffer(t),r||(r=256),r){case 224:return o(t);case 256:return a(t);case 384:return s(t);case 512:return u(t);default:throw new Error("Invald algorithm: keccak"+r)}},e.keccak256=function(t){return e.keccak(t)},e.sha3=e.keccak,e.sha256=function(t){return t=e.toBuffer(t),d("sha256").update(t).digest()},e.ripemd160=function(t,r){t=e.toBuffer(t);var n=d("rmd160").update(t).digest();return!0===r?e.setLength(n,32):n},e.rlphash=function(t){return e.keccak(f.encode(t))},e.isValidPrivate=function(t){return c.privateKeyVerify(t)},e.isValidPublic=function(t,e){return 64===t.length?c.publicKeyVerify(p.concat([p.from([4]),t])):!!e&&c.publicKeyVerify(t)},e.pubToAddress=e.publicToAddress=function(t,r){return t=e.toBuffer(t),r&&64!==t.length&&(t=c.publicKeyConvert(t,!1).slice(1)),l(64===t.length),e.keccak(t).slice(-20)};var m=e.privateToPublic=function(t){return t=e.toBuffer(t),c.publicKeyCreate(t,!1).slice(1)};e.importPublic=function(t){return 64!==(t=e.toBuffer(t)).length&&(t=c.publicKeyConvert(t,!1).slice(1)),t},e.ecsign=function(t,e){var r=c.sign(t,e),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},e.hashPersonalMessage=function(t){var r=e.toBuffer("Ethereum Signed Message:\n"+t.length.toString());return e.keccak(p.concat([r,t]))},e.ecrecover=function(t,r,n,i){var o=p.concat([e.setLength(n,32),e.setLength(i,32)],64),s=r-27;if(0!==s&&1!==s)throw new Error("Invalid signature v value");var a=c.recover(t,o,s);return c.publicKeyConvert(a,!1).slice(1)},e.toRpcSig=function(t,r,n){if(27!==t&&28!==t)throw new Error("Invalid recovery id");return e.bufferToHex(p.concat([e.setLengthLeft(r,32),e.setLengthLeft(n,32),e.toBuffer(t-27)]))},e.fromRpcSig=function(t){if(65!==(t=e.toBuffer(t)).length)throw new Error("Invalid signature length");var r=t[64];return r<27&&(r+=27),{v:r,r:t.slice(0,32),s:t.slice(32,64)}},e.privateToAddress=function(t){return e.publicToAddress(m(t))},e.isValidAddress=function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)},e.isZeroAddress=function(t){return e.zeroAddress()===e.addHexPrefix(t)},e.toChecksumAddress=function(t){t=e.stripHexPrefix(t).toLowerCase();for(var r=e.keccak(t).toString("hex"),n="0x",i=0;i<t.length;i++)parseInt(r[i],16)>=8?n+=t[i].toUpperCase():n+=t[i];return n},e.isValidChecksumAddress=function(t){return e.isValidAddress(t)&&e.toChecksumAddress(t)===t},e.generateAddress=function(t,r){return t=e.toBuffer(t),r=(r=new h(r)).isZero()?null:p.from(r.toArray()),e.rlphash([t,r]).slice(-20)},e.isPrecompiled=function(t){var r=e.unpad(t);return 1===r.length&&r[0]>=1&&r[0]<=8},e.addHexPrefix=function(t){return"string"!=typeof t||e.isHexPrefixed(t)?t:"0x"+t},e.isValidSignature=function(t,e,r,n){var i=new h("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new h("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===e.length&&32===r.length&&((27===t||28===t)&&(e=new h(e),r=new h(r),!(e.isZero()||e.gt(o)||r.isZero()||r.gt(o))&&(!1!==n||1!==new h(r).cmp(i))))},e.baToJSON=function(t){if(p.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var r=[],n=0;n<t.length;n++)r.push(e.baToJSON(t[n]));return r}},e.defineProperties=function(t,r,i){if(t.raw=[],t._fields=[],t.toJSON=function(r){if(r){var n={};return t._fields.forEach((function(e){n[e]="0x"+t[e].toString("hex")})),n}return e.baToJSON(this.raw)},t.serialize=function(){return f.encode(t.raw)},r.forEach((function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=e.toBuffer(i)).toString("hex")||r.allowZero||(i=p.allocUnsafe(0)),r.allowLess&&r.length?(i=e.stripZeros(i),l(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||l(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"==typeof i&&(i=p.from(e.stripHexPrefix(i),"hex")),p.isBuffer(i)&&(i=f.decode(i)),Array.isArray(i)){if(i.length>t._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(r,n){t[t._fields[n]]=e.toBuffer(r)}))}else{if("object"!==(void 0===i?"undefined":n(i)))throw new Error("invalid data");var o=Object.keys(i);r.forEach((function(e){-1!==o.indexOf(e.name)&&(t[e.name]=i[e.name]),-1!==o.indexOf(e.alias)&&(t[e.alias]=i[e.alias])}))}}},4565:function(t,e,r){"use strict";var n=r(8764).Buffer,i=r(5053),o=r(7587),s=r(5484),a=function(t){return 32===t.length&&i.privateKeyVerify(Uint8Array.from(t))};t.exports={privateKeyVerify:a,privateKeyExport:function(t,e){if(32!==t.length)throw new RangeError("private key length is invalid");var r=o.privateKeyExport(t,e);return s.privateKeyExport(t,r,e)},privateKeyImport:function(t){if(null!==(t=s.privateKeyImport(t))&&32===t.length&&a(t))return t;throw new Error("couldn't import from DER format")},privateKeyNegate:function(t){return n.from(i.privateKeyNegate(Uint8Array.from(t)))},privateKeyModInverse:function(t){if(32!==t.length)throw new Error("private key length is invalid");return n.from(o.privateKeyModInverse(Uint8Array.from(t)))},privateKeyTweakAdd:function(t,e){return n.from(i.privateKeyTweakAdd(Uint8Array.from(t),e))},privateKeyTweakMul:function(t,e){return n.from(i.privateKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e)))},publicKeyCreate:function(t,e){return n.from(i.publicKeyCreate(Uint8Array.from(t),e))},publicKeyConvert:function(t,e){return n.from(i.publicKeyConvert(Uint8Array.from(t),e))},publicKeyVerify:function(t){return(33===t.length||65===t.length)&&i.publicKeyVerify(Uint8Array.from(t))},publicKeyTweakAdd:function(t,e,r){return n.from(i.publicKeyTweakAdd(Uint8Array.from(t),Uint8Array.from(e),r))},publicKeyTweakMul:function(t,e,r){return n.from(i.publicKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e),r))},publicKeyCombine:function(t,e){var r=[];return t.forEach((function(t){r.push(Uint8Array.from(t))})),n.from(i.publicKeyCombine(r,e))},signatureNormalize:function(t){return n.from(i.signatureNormalize(Uint8Array.from(t)))},signatureExport:function(t){return n.from(i.signatureExport(Uint8Array.from(t)))},signatureImport:function(t){return n.from(i.signatureImport(Uint8Array.from(t)))},signatureImportLax:function(t){if(0===t.length)throw new RangeError("signature length is invalid");var e=s.signatureImportLax(t);if(null===e)throw new Error("couldn't parse DER signature");return o.signatureImport(e)},sign:function(t,e,r){if(null===r)throw new TypeError("options should be an Object");var o=void 0;if(r){if(o={},null===r.data)throw new TypeError("options.data should be a Buffer");if(r.data){if(32!==r.data.length)throw new RangeError("options.data length is invalid");o.data=new Uint8Array(r.data)}if(null===r.noncefn)throw new TypeError("options.noncefn should be a Function");r.noncefn&&(o.noncefn=function(t,e,i,o,s){var a=null!=i?n.from(i):null,u=null!=o?n.from(o):null,c=n.from("");return r.noncefn&&(c=r.noncefn(n.from(t),n.from(e),a,u,s)),Uint8Array.from(c)})}var s=i.ecdsaSign(Uint8Array.from(t),Uint8Array.from(e),o);return{signature:n.from(s.signature),recovery:s.recid}},verify:function(t,e,r){return i.ecdsaVerify(Uint8Array.from(e),Uint8Array.from(t),r)},recover:function(t,e,r,o){return n.from(i.ecdsaRecover(Uint8Array.from(e),r,Uint8Array.from(t),o))},ecdh:function(t,e){return n.from(i.ecdh(Uint8Array.from(t),Uint8Array.from(e),{}))},ecdhUnsafe:function(t,e,r){if(33!==t.length&&65!==t.length)throw new RangeError("public key length is invalid");if(32!==e.length)throw new RangeError("private key length is invalid");return n.from(o.ecdhUnsafe(Uint8Array.from(t),Uint8Array.from(e),r))}}},5484:function(t,e,r){"use strict";var n=r(8764).Buffer,i=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),o=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e.privateKeyExport=function(t,e,r){var s=n.from(r?i:o);return t.copy(s,r?8:9),e.copy(s,r?181:214),s},e.privateKeyImport=function(t){var e=t.length,r=0;if(e<r+1||48!==t[r])return null;if(e<(r+=1)+1||!(128&t[r]))return null;var n=127&t[r];if(n<1||n>2)return null;if(e<(r+=1)+n)return null;var i=t[r+n-1]|(n>1?t[r+n-2]<<8:0);return e<(r+=n)+i||e<r+3||2!==t[r]||1!==t[r+1]||1!==t[r+2]||e<(r+=3)+2||4!==t[r]||t[r+1]>32||e<r+2+t[r+1]?null:t.slice(r+2,r+2+t[r+1])},e.signatureImportLax=function(t){var e=n.alloc(32,0),r=n.alloc(32,0),i=t.length,o=0;if(48!==t[o++])return null;var s=t[o++];if(128&s&&(o+=s-128)>i)return null;if(2!==t[o++])return null;var a=t[o++];if(128&a){if(o+(s=a-128)>i)return null;for(;s>0&&0===t[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+t[o]}if(a>i-o)return null;var u=o;if(o+=a,2!==t[o++])return null;var c=t[o++];if(128&c){if(o+(s=c-128)>i)return null;for(;s>0&&0===t[o];o+=1,s-=1);for(c=0;s>0;o+=1,s-=1)c=(c<<8)+t[o]}if(c>i-o)return null;var l=o;for(o+=c;a>0&&0===t[u];a-=1,u+=1);if(a>32)return null;var f=t.slice(u,u+a);for(f.copy(e,32-f.length);c>0&&0===t[l];c-=1,l+=1);if(c>32)return null;var h=t.slice(l,l+c);return h.copy(r,32-h.length),{r:e,s:r}}},7587:function(t,e,r){"use strict";var n=r(8764).Buffer,i=r(3550),o=new(0,r(6266).ec)("secp256k1"),s=o.curve;e.privateKeyExport=function(t,e){var r=new i(t);if(r.ucmp(s.n)>=0)throw new Error("couldn't export to DER format");var n=o.g.mul(r);return a(n.getX(),n.getY(),e)},e.privateKeyModInverse=function(t){var e=new i(t);if(e.ucmp(s.n)>=0||e.isZero())throw new Error("private key range is invalid");return e.invm(s.n).toArrayLike(n,"be",32)},e.signatureImport=function(t){var e=new i(t.r);e.ucmp(s.n)>=0&&(e=new i(0));var r=new i(t.s);return r.ucmp(s.n)>=0&&(r=new i(0)),n.concat([e.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},e.ecdhUnsafe=function(t,e,r){var n=o.keyFromPublic(t),u=new i(e);if(u.ucmp(s.n)>=0||u.isZero())throw new Error("scalar was invalid (zero or overflow)");var c=n.pub.mul(u);return a(c.getX(),c.getY(),r)};var a=function(t,e,r){var i=void 0;return r?((i=n.alloc(33))[0]=e.isOdd()?3:2,t.toArrayLike(n,"be",32).copy(i,1)):((i=n.alloc(65))[0]=4,t.toArrayLike(n,"be",32).copy(i,1),e.toArrayLike(n,"be",32).copy(i,33)),i}},884:function(t,e,r){"use strict";var n=r(8764).Buffer,i=r(3944),o=r(9604);function s(t){var e=t;if("string"!=typeof e)throw new 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 a(t){return"0x"+t.toString(16)}t.exports={arrayContainsArray:function(t,e,r){if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof t+"'");if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof e+"'");return e[Boolean(r)?"some":"every"]((function(e){return t.indexOf(e)>=0}))},intToBuffer:function(t){var e=a(t);return new n(s(e.slice(2)),"hex")},getBinarySize:function(t){if("string"!=typeof t)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof t+"'.");return n.byteLength(t,"utf8")},isHexPrefixed:i,stripHexPrefix:o,padToEven:s,intToHex:a,fromAscii:function(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},fromUtf8:function(t){return"0x"+s(new n(t,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(t){var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);r<n;r+=2){var i=parseInt(t.substr(r,2),16);e+=String.fromCharCode(i)}return e},toUtf8:function(t){return new n(s(o(t).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(t,e,r){if(!Array.isArray(t))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof t+"'");if("string"!=typeof e)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof e+"'.");for(var n=[],i=0;i<t.length;i++){var o=t[i][e];if(r&&!o)o="";else if("string"!=typeof o)throw new Error("invalid abi");n.push(o)}return n},isHexString:function(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}}},6729:function(t){"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||t,s),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var u,c,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,i),!0;case 5:return l.fn.call(l.context,e,n,i,o),!0;case 6:return l.fn.call(l.context,e,n,i,o,s),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==e||i&&!a[u].once||n&&a[u].context!==n)&&c.push(a[u]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a},7187:function(t){"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&m(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,s,c;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function m(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,f(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,f(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},4445:function(t){t.exports=s,s.default=s,s.stable=l,s.stableStringify=l;var e="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var a;void 0===s&&(s=o()),u(t,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(t,e,r):JSON.stringify(t,h(e),r)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(t,e,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:t}),n.push([o,r,e,s])):i.push([e,r,t]):(o[r]=t,n.push([o,r,e]))}function u(t,n,i,o,s,c,l){var f;if(c+=1,"object"==typeof t&&null!==t){for(f=0;f<o.length;f++)if(o[f]===t)return void a(r,t,n,s);if(void 0!==l.depthLimit&&c>l.depthLimit)return void a(e,t,n,s);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void a(e,t,n,s);if(o.push(t),Array.isArray(t))for(f=0;f<t.length;f++)u(t[f],f,f,o,t,c,l);else{var h=Object.keys(t);for(f=0;f<h.length;f++){var d=h[f];u(t[d],d,f,o,t,c,l)}}o.pop()}}function c(t,e){return t<e?-1:t>e?1:0}function l(t,e,r,s){void 0===s&&(s=o());var a,u=f(t,"",0,[],void 0,0,s)||t;try{a=0===i.length?JSON.stringify(u,e,r):JSON.stringify(u,h(e),r)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function f(t,i,o,s,u,l,h){var d;if(l+=1,"object"==typeof t&&null!==t){for(d=0;d<s.length;d++)if(s[d]===t)return void a(r,t,i,u);try{if("function"==typeof t.toJSON)return}catch(y){return}if(void 0!==h.depthLimit&&l>h.depthLimit)return void a(e,t,i,u);if(void 0!==h.edgesLimit&&o+1>h.edgesLimit)return void a(e,t,i,u);if(s.push(t),Array.isArray(t))for(d=0;d<t.length;d++)f(t[d],d,d,s,t,l,h);else{var p={},m=Object.keys(t).sort(c);for(d=0;d<m.length;d++){var g=m[d];f(t[g],g,d,s,t,l,h),p[g]=t[g]}if(void 0===u)return p;n.push([u,i,t]),u[i]=p}s.pop()}}function h(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===e&&o[0]===r){r=o[2],i.splice(n,1);break}}return t.call(this,e,r)}}},4029:function(t,e,r){"use strict";var n=r(5320),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,s):function(t,e,r){for(var n in t)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s)}},7648:function(t){"use strict";var e=Array.prototype.slice,r=Object.prototype.toString;t.exports=function(t){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,o=e.call(arguments,1),s=Math.max(0,n.length-o.length),a=[],u=0;u<s;u++)a.push("$"+u);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var r=n.apply(this,o.concat(e.call(arguments)));return Object(r)===r?r:this}return n.apply(t,o.concat(e.call(arguments)))})),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i}},8612:function(t,e,r){"use strict";var n=r(7648);t.exports=Function.prototype.bind||n},4852:function(t){"use strict";t.exports=Object.assign},8032:function(t,e,r){"use strict";r.d(e,{G:function(){return N},L:function(){return p},M:function(){return M},P:function(){return _},_:function(){return a},a:function(){return s},b:function(){return l},g:function(){return f},h:function(){return u}});var n=r(7294),i=(r(2369),r(5697)),o=r.n(i);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(this,arguments)}function a(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)e.indexOf(r=o[n])>=0||(i[r]=t[r]);return i}const u=()=>"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype;function c(t,e,r){const n={};let i="gatsby-image-wrapper";return"fixed"===r?(n.width=t,n.height=e):"constrained"===r&&(i="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:i,"data-gatsby-image-wrapper":"",style:n}}function l(t,e,r,n,i){return void 0===i&&(i={}),s({},r,{loading:n,shouldLoad:t,"data-main-image":"",style:s({},i,{opacity:e?1:0})})}function f(t,e,r,n,i,o,a,u){const c={};o&&(c.backgroundColor=o,"fixed"===r?(c.width=n,c.height=i,c.backgroundColor=o,c.position="relative"):("constrained"===r||"fullWidth"===r)&&(c.position="absolute",c.top=0,c.left=0,c.bottom=0,c.right=0)),a&&(c.objectFit=a),u&&(c.objectPosition=u);const l=s({},t,{"aria-hidden":!0,"data-placeholder-image":"",style:s({opacity:e?0:1,transition:"opacity 500ms linear"},c)});return l}const h=["children"],d=function(t){let{layout:e,width:r,height:i}=t;return"fullWidth"===e?n.createElement("div",{"aria-hidden":!0,style:{paddingTop:i/r*100+"%"}}):"constrained"===e?n.createElement("div",{style:{maxWidth:r,display:"block"}},n.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg%20height='"+i+"'%20width='"+r+"'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}})):null},p=function(t){let{children:e}=t,r=a(t,h);return n.createElement(n.Fragment,null,n.createElement(d,s({},r)),e,null)},m=["src","srcSet","loading","alt","shouldLoad"],g=["fallback","sources","shouldLoad"],y=function(t){let{src:e,srcSet:r,loading:i,alt:o="",shouldLoad:u}=t,c=a(t,m);return n.createElement("img",s({},c,{decoding:"async",loading:i,src:u?e:void 0,"data-src":u?void 0:e,srcSet:u?r:void 0,"data-srcset":u?void 0:r,alt:o}))},v=function(t){let{fallback:e,sources:r=[],shouldLoad:i=!0}=t,o=a(t,g);const u=o.sizes||(null==e?void 0:e.sizes),c=n.createElement(y,s({},o,e,{sizes:u,shouldLoad:i}));return r.length?n.createElement("picture",null,r.map((t=>{let{media:e,srcSet:r,type:o}=t;return n.createElement("source",{key:e+"-"+o+"-"+r,type:o,media:e,srcSet:i?r:void 0,"data-srcset":i?void 0:r,sizes:u})})),c):c};var b;y.propTypes={src:i.string.isRequired,alt:i.string.isRequired,sizes:i.string,srcSet:i.string,shouldLoad:i.bool},v.displayName="Picture",v.propTypes={alt:i.string.isRequired,shouldLoad:i.bool,fallback:i.exact({src:i.string.isRequired,srcSet:i.string,sizes:i.string}),sources:i.arrayOf(i.oneOfType([i.exact({media:i.string.isRequired,type:i.string,sizes:i.string,srcSet:i.string.isRequired}),i.exact({media:i.string,type:i.string.isRequired,sizes:i.string,srcSet:i.string.isRequired})]))};const w=["fallback"],_=function(t){let{fallback:e}=t,r=a(t,w);return e?n.createElement(v,s({},r,{fallback:{src:e},"aria-hidden":!0,alt:""})):n.createElement("div",s({},r))};_.displayName="Placeholder",_.propTypes={fallback:i.string,sources:null==(b=v.propTypes)?void 0:b.sources,alt:function(t,e,r){return t[e]?new Error("Invalid prop `"+e+"` supplied to `"+r+"`. Validation failed."):null}};const M=function(t){return n.createElement(n.Fragment,null,n.createElement(v,s({},t)),n.createElement("noscript",null,n.createElement(v,s({},t,{shouldLoad:!0}))))};M.displayName="MainImage",M.propTypes=v.propTypes;const A=["as","className","class","style","image","loading","imgClassName","imgStyle","backgroundColor","objectFit","objectPosition"],E=["style","className"],x=t=>t.replace(/\n/g,""),k=function(t,e,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),s=3;s<n;s++)i[s-3]=arguments[s];return t.alt||""===t.alt?o().string.apply(o(),[t,e,r].concat(i)):new Error('The "alt" prop is required in '+r+'. If the image is purely presentational then pass an empty string: e.g. alt="". Learn more: https://a11y-style-guide.com/style-guide/section-media.html')},S={image:o().object.isRequired,alt:k},R=["as","image","style","backgroundColor","className","class","onStartLoad","onLoad","onError"],I=["style","className"],P=new Set;let C,T;const O=function(t){let{as:e="div",image:i,style:o,backgroundColor:l,className:f,class:h,onStartLoad:d,onLoad:p,onError:m}=t,g=a(t,R);const{width:y,height:v,layout:b}=i,w=c(y,v,b),{style:_,className:M}=w,A=a(w,I),E=(0,n.useRef)(),x=(0,n.useMemo)((()=>JSON.stringify(i.images)),[i.images]);h&&(f=h);const k=function(t,e,r){let n="";return"fullWidth"===t&&(n='<div aria-hidden="true" style="padding-top: '+r/e*100+'%;"></div>'),"constrained"===t&&(n='<div style="max-width: '+e+'px; display: block;"><img alt="" role="presentation" aria-hidden="true" src="data:image/svg+xml;charset=utf-8,%3Csvg%20height=\''+r+"'%20width='"+e+"'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%3E%3C/svg%3E\" style=\"max-width: 100%; display: block; position: static;\"></div>"),n}(b,y,v);return(0,n.useEffect)((()=>{C||(C=r.e(731).then(r.bind(r,6731)).then((t=>{let{renderImageToString:e,swapPlaceholderImage:r}=t;return T=e,{renderImageToString:e,swapPlaceholderImage:r}})));const t=E.current.querySelector("[data-gatsby-image-ssr]");if(t&&u())return t.complete?(null==d||d({wasCached:!0}),null==p||p({wasCached:!0}),setTimeout((()=>{t.removeAttribute("data-gatsby-image-ssr")}),0)):(null==d||d({wasCached:!0}),t.addEventListener("load",(function e(){t.removeEventListener("load",e),null==p||p({wasCached:!0}),setTimeout((()=>{t.removeAttribute("data-gatsby-image-ssr")}),0)}))),void P.add(x);if(T&&P.has(x))return;let e,n;return C.then((t=>{let{renderImageToString:r,swapPlaceholderImage:a}=t;E.current&&(E.current.innerHTML=r(s({isLoading:!0,isLoaded:P.has(x),image:i},g)),P.has(x)||(e=requestAnimationFrame((()=>{E.current&&(n=a(E.current,x,P,o,d,p,m))}))))})),()=>{e&&cancelAnimationFrame(e),n&&n()}}),[i]),(0,n.useLayoutEffect)((()=>{P.has(x)&&T&&(E.current.innerHTML=T(s({isLoading:P.has(x),isLoaded:P.has(x),image:i},g)),null==d||d({wasCached:!0}),null==p||p({wasCached:!0}))}),[i]),(0,n.createElement)(e,s({},A,{style:s({},_,o,{backgroundColor:l}),className:M+(f?" "+f:""),ref:E,dangerouslySetInnerHTML:{__html:k},suppressHydrationWarning:!0}))},N=(0,n.memo)((function(t){return t.image?(0,n.createElement)(O,t):null}));N.propTypes=S,N.displayName="GatsbyImage";const B=["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions","breakpoints","outputPixelDensities"];function L(t){return function(e){let{src:r,__imageData:i,__error:o}=e,u=a(e,B);return o&&console.warn(o),i?n.createElement(t,s({image:i},u)):(console.warn("Image not loaded",r),null)}}const j=L((function(t){let{as:e="div",className:r,class:i,style:o,image:u,loading:h="lazy",imgClassName:d,imgStyle:m,backgroundColor:g,objectFit:y,objectPosition:v}=t,b=a(t,A);if(!u)return console.warn("[gatsby-plugin-image] Missing image prop"),null;i&&(r=i),m=s({objectFit:y,objectPosition:v,backgroundColor:g},m);const{width:w,height:k,layout:S,images:R,placeholder:I,backgroundColor:P}=u,C=c(w,k,S),{style:T,className:O}=C,N=a(C,E),B={fallback:void 0,sources:[]};return R.fallback&&(B.fallback=s({},R.fallback,{srcSet:R.fallback.srcSet?x(R.fallback.srcSet):void 0})),R.sources&&(B.sources=R.sources.map((t=>s({},t,{srcSet:x(t.srcSet)})))),n.createElement(e,s({},N,{style:s({},T,o,{backgroundColor:g}),className:O+(r?" "+r:"")}),n.createElement(p,{layout:S,width:w,height:k},n.createElement(_,s({},f(I,!1,S,w,k,P,y,v))),n.createElement(M,s({"data-gatsby-image-ssr":"",className:d},b,l("eager"===h,!1,B,h,m)))))})),q=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return"fullWidth"!==t.layout||"width"!==e&&"height"!==e||!t[e]?o().number.apply(o(),[t,e].concat(n)):new Error('"'+e+'" '+t[e]+" may not be passed when layout is fullWidth.")},U=new Set(["fixed","fullWidth","constrained"]),F={src:o().string.isRequired,alt:k,width:q,height:q,sizes:o().string,layout:t=>{if(void 0!==t.layout&&!U.has(t.layout))return new Error("Invalid value "+t.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}};j.displayName="StaticImage",j.propTypes=F;const D=L(N);D.displayName="StaticImage",D.propTypes=F},2369:function(t){"use strict";const e=/[\p{Lu}]/u,r=/[\p{Ll}]/u,n=/^[\p{Lu}](?![\p{Lu}])/gu,i=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,s=new RegExp("^"+o.source),a=new RegExp(o.source+i.source,"gu"),u=new RegExp("\\d+"+i.source,"gu"),c=(t,i)=>{if("string"!=typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");if(i={pascalCase:!1,preserveConsecutiveUppercase:!1,...i},0===(t=Array.isArray(t)?t.map((t=>t.trim())).filter((t=>t.length)).join("-"):t.trim()).length)return"";const o=!1===i.locale?t=>t.toLowerCase():t=>t.toLocaleLowerCase(i.locale),c=!1===i.locale?t=>t.toUpperCase():t=>t.toLocaleUpperCase(i.locale);if(1===t.length)return i.pascalCase?c(t):o(t);return t!==o(t)&&(t=((t,n,i)=>{let o=!1,s=!1,a=!1;for(let u=0;u<t.length;u++){const c=t[u];o&&e.test(c)?(t=t.slice(0,u)+"-"+t.slice(u),o=!1,a=s,s=!0,u++):s&&a&&r.test(c)?(t=t.slice(0,u-1)+"-"+t.slice(u-1),a=s,s=!1,o=!0):(o=n(c)===c&&i(c)!==c,a=s,s=i(c)===c&&n(c)!==c)}return t})(t,o,c)),t=t.replace(s,""),t=i.preserveConsecutiveUppercase?((t,e)=>(n.lastIndex=0,t.replace(n,(t=>e(t)))))(t,o):o(t),i.pascalCase&&(t=c(t.charAt(0))+t.slice(1)),((t,e)=>(a.lastIndex=0,u.lastIndex=0,t.replace(a,((t,r)=>e(r))).replace(u,(t=>e(t)))))(t,c)};t.exports=c,t.exports.default=c},6038:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return nf}});var n={};r.r(n),r.d(n,{decrypt:function(){return fe},encrypt:function(){return le},generateKey:function(){return ue},verifyHmac:function(){return ce}});var i=r(3100),o=r(4160),s=r(7294),a=r(7462),u=r(5059),c=r(9931),l=r(5893),f=(0,u.G)((function(t,e){const{templateAreas:r,gap:n,rowGap:i,columnGap:o,column:s,row:a,autoFlow:u,autoRows:f,templateRows:h,autoColumns:d,templateColumns:p,...m}=t,g={display:"grid",gridTemplateAreas:r,gridGap:n,gridRowGap:i,gridColumnGap:o,gridAutoColumns:d,gridColumn:s,gridRow:a,gridAutoFlow:u,gridAutoRows:f,gridTemplateRows:h,gridTemplateColumns:p};return(0,l.jsx)(c.m.div,{ref:e,__css:g,...m})}));f.displayName="Grid";var h=r(5119),d=r(4629),p=r(5432);Object.freeze(["base","sm","md","lg","xl","2xl"]);function m(t,e){return Array.isArray(t)?t.map((t=>null===t?null:e(t))):(0,p.Kn)(t)?Object.keys(t).reduce(((r,n)=>(r[n]=e(t[n]),r)),{}):null!=t?e(t):null}var g=(0,u.G)((function(t,e){const{columns:r,spacingX:n,spacingY:i,spacing:o,minChildWidth:s,...a}=t,u=(0,h.F)(),c=s?function(t,e){return m(t,(t=>{const r=(0,d.LP)("sizes",t,"number"==typeof(n=t)?`${n}px`:n)(e);var n;return null===t?null:`repeat(auto-fit, minmax(${r}, 1fr))`}))}(s,u):m(r,(t=>null===t?null:`repeat(${t}, minmax(0, 1fr))`));return(0,l.jsx)(f,{ref:e,gap:o,columnGap:n,rowGap:i,templateColumns:c,...a})}));g.displayName="SimpleGrid";var y=(0,u.G)((function(t,e){const{direction:r,align:n,justify:i,wrap:o,basis:s,grow:a,shrink:u,...f}=t,h={display:"flex",flexDirection:r,alignItems:n,justifyContent:i,flexWrap:o,flexBasis:s,flexGrow:a,flexShrink:u};return(0,l.jsx)(c.m.div,{ref:e,__css:h,...f})}));y.displayName="Flex";var v=r(8911),b=(0,u.G)((function(t,e){return(0,l.jsx)(c.m.div,{...t,ref:e,role:"group",className:(0,p.cx)("chakra-stat__group",t.className),__css:{display:"flex",flexWrap:"wrap",justifyContent:"space-around",alignItems:"flex-start"}})}));b.displayName="StatGroup";var w=r(5227),_=r(1639),M=r(3179),[A,E]=(0,w.k)({name:"StatStylesContext",errorMessage:"useStatStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Stat />\" "}),x=(0,u.G)((function(t,e){const r=(0,_.jC)("Stat",t),n={position:"relative",flex:"1 1 0%",...r.container},{className:i,children:o,...s}=(0,M.Lr)(t);return(0,l.jsx)(A,{value:r,children:(0,l.jsx)(c.m.div,{ref:e,...s,className:(0,p.cx)("chakra-stat",i),__css:n,children:(0,l.jsx)("dl",{children:o})})})}));x.displayName="Stat";var k=(0,u.G)((function(t,e){const r=E();return(0,l.jsx)(c.m.dt,{ref:e,...t,className:(0,p.cx)("chakra-stat__label",t.className),__css:r.label})}));k.displayName="StatLabel";var S=(0,u.G)((function(t,e){const r=E();return(0,l.jsx)(c.m.dd,{ref:e,...t,className:(0,p.cx)("chakra-stat__number",t.className),__css:{...r.number,fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"}})}));S.displayName="StatNumber";var R=r(7754);var[I,P]=(0,w.k)({strict:!1,name:"ButtonGroupContext"});function C(t){const{children:e,className:r,...n}=t,i=(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{"aria-hidden":!0,focusable:!1}):e,o=(0,p.cx)("chakra-button__icon",r);return(0,l.jsx)(c.m.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...n,className:o,children:i})}C.displayName="ButtonIcon";var T=r(295);function O(t){const{label:e,placement:r,spacing:n="0.5rem",children:i=(0,l.jsx)(T.$,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...u}=t,f=(0,p.cx)("chakra-button__spinner",o),h="start"===r?"marginEnd":"marginStart",d=(0,s.useMemo)((()=>({display:"flex",alignItems:"center",position:e?"relative":"absolute",[h]:e?n:0,fontSize:"1em",lineHeight:"normal",...a})),[a,e,h,n]);return(0,l.jsx)(c.m.div,{className:f,...u,__css:d,children:i})}function N(...t){return e=>{t.forEach((t=>{!function(t,e){if(null!=t)if("function"!=typeof t)try{t.current=e}catch(r){throw new Error(`Cannot assign value '${e}' to ref '${t}'`)}else t(e)}(t,e)}))}}function B(...t){return(0,s.useMemo)((()=>N(...t)),t)}O.displayName="ButtonSpinner";var L=(0,u.G)(((t,e)=>{const r=P(),n=(0,_.mq)("Button",{...r,...t}),{isDisabled:i=(null==r?void 0:r.isDisabled),isLoading:o,isActive:a,children:u,leftIcon:f,rightIcon:h,loadingText:d,iconSpacing:m="0.5rem",type:g,spinner:y,spinnerPlacement:v="start",className:b,as:w,...A}=(0,M.Lr)(t),E=(0,s.useMemo)((()=>{const t={...null==n?void 0:n._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...n,...!!r&&{_focus:t}}}),[n,r]),{ref:x,type:k}=function(t){const[e,r]=(0,s.useState)(!t);return{ref:(0,s.useCallback)((t=>{t&&r("BUTTON"===t.tagName)}),[]),type:e?"button":void 0}}(w),S={rightIcon:h,leftIcon:f,iconSpacing:m,children:u};return(0,l.jsxs)(c.m.button,{ref:B(e,x),as:w,type:null!=g?g:k,"data-active":(0,p.PB)(a),"data-loading":(0,p.PB)(o),__css:E,className:(0,p.cx)("chakra-button",b),...A,disabled:i||o,children:[o&&"start"===v&&(0,l.jsx)(O,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:m,children:y}),o?d||(0,l.jsx)(c.m.span,{opacity:0,children:(0,l.jsx)(j,{...S})}):(0,l.jsx)(j,{...S}),o&&"end"===v&&(0,l.jsx)(O,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:m,children:y})]})}));function j(t){const{leftIcon:e,rightIcon:r,children:n,iconSpacing:i}=t;return(0,l.jsxs)(l.Fragment,{children:[e&&(0,l.jsx)(C,{marginEnd:i,children:e}),n,r&&(0,l.jsx)(C,{marginStart:i,children:r})]})}L.displayName="Button";var q=r(5522);const U=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],F=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],D={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};var z=r(1460),H=r.n(z),K=(r(4501),r(5054)),G=r.n(K),W=r(8764).Buffer;const V="hex",Z="utf8",J="0";function Y(t){return new Uint8Array(t)}function Q(t,e=!1){const r=t.toString(V);return e?lt(r):r}function X(t){return t.toString(Z)}function $(t){return G()(t)}function tt(t,e=!1){return Q($(t),e)}function et(t){return X($(t))}function rt(t){return W.from(ct(t),V)}function nt(t){return Y(rt(t))}function it(t){return W.from(t,Z)}function ot(t){return Y(it(t))}function st(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function at(...t){let e=[];return t.forEach((t=>e=e.concat(Array.from(t)))),new Uint8Array([...e])}function ut(t,e=8,r=J){return function(t,e,r=J){return ht(t,e,!0,r)}(t,function(t,e=8){const r=t%e;return r?(t-r)/e*e+e:t}(t.length,e),r)}function ct(t){return t.replace(/^0x/,"")}function lt(t){return t.startsWith("0x")?t:`0x${t}`}function ft(t){return(t=ut(t=ct(t),2))&&(t=lt(t)),t}function ht(t,e,r,n=J){const i=e-t.length;let o=t;if(i>0){const e=n.repeat(i);o=r?e+t:t+e}return o}function dt(t){return $(new Uint8Array(t))}function pt(t,e){return function(t,e=!1){return Q(it(t),e)}(t,!e)}function mt(t,e){const r=ct(ft(new(H())(t).toString(16)));return e?r:lt(r)}var gt=r(1094),yt=r.n(gt);var vt=r(1468);function bt(t=3){return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))}function wt(t){return ft(t)}function _t(t){return function(t){const e=t.startsWith("0x");return t=(t=ct(t)).startsWith(J)?t.substring(1):t,e?lt(t):t}(lt(t))}const Mt=bt;function At(){return((t,e)=>{for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e})()}function Et(t,e){let r;const n=function(t,e){let r;const n=D[t];return n&&(r=`https://${n}.infura.io/v3/${e}`),r}(t,e.infuraId);return e.custom&&e.custom[t]?r=e.custom[t]:n&&(r=n),r}function xt(t,e){return st(t,e)}function kt(t){return void 0!==t.result}function St(t){return void 0!==t.error}function Rt(t){return void 0!==t.event}function It(t){t=ct(t.toLowerCase());const e=ct((0,gt.keccak_256)(it(t)));let r="";for(let n=0;n<t.length;n++)parseInt(e[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return lt(r)}function Pt(t){var e;return(e=t)&&e.length&&!xt(t[0])&&(t[0]=pt(t[0])),t}function Ct(t){if(void 0!==t.type&&"0"!==t.type)return t;if(void 0===t.from||(!(e=t.from)||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==It(e)))throw new Error("Transaction object must include a valid 'from' value.");var e;function r(t){let e=t;return("number"==typeof t||"string"==typeof t&&!function(t){return""===t||"string"==typeof t&&""===t.trim()}(t))&&(xt(t)?"string"==typeof t&&(e=wt(t)):e=mt(t)),"string"==typeof e&&(e=_t(e)),e}const n={from:wt(t.from),to:void 0===t.to?void 0:wt(t.to),gasPrice:void 0===t.gasPrice?"":r(t.gasPrice),gas:void 0===t.gas?void 0===t.gasLimit?"":r(t.gasLimit):r(t.gas),value:void 0===t.value?"":r(t.value),nonce:void 0===t.nonce?"":r(t.nonce),data:void 0===t.data?"":wt(t.data)||"0x"},i=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach((t=>{(void 0===n[t]||"string"==typeof n[t]&&!n[t].trim().length)&&i.includes(t)&&delete n[t]})),n}var Tt=r(7563);function Ot(t,e){let r=Nt(t);return r=Object.assign(Object.assign({},r),e),t=function(t){return Tt.stringify(t)}(r),t}function Nt(t){return Tt.parse(t)}var Bt=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(t,e){this._eventEmitters.push({event:t,callback:e})}trigger(t){let e=[];t&&(e=this._eventEmitters.filter((e=>e.event===t))),e.forEach((t=>{t.callback()}))}};const Lt=void 0!==r.g.WebSocket?r.g.WebSocket:r(8007);var jt=class{constructor(t){if(this.opts=t,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=t.protocol,this._version=t.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=t.subscriptions||[],this._netMonitor=t.netMonitor||new Bt,!t.url||"string"!=typeof t.url)throw new Error("Missing or invalid WebSocket url");this._url=t.url,this._netMonitor.on("online",(()=>this._socketCreate()))}set readyState(t){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(t){}get connecting(){return 0===this.readyState}set connected(t){}get connected(){return 1===this.readyState}set closing(t){}get closing(){return 2===this.readyState}set closed(t){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(t,e,r){if(!e||"string"!=typeof e)throw new Error("Missing or invalid topic field");this._socketSend({topic:e,type:"pub",payload:t,silent:!!r})}subscribe(t){this._socketSend({topic:t,type:"sub",payload:"",silent:!0})}on(t,e){this._events.push({event:t,callback:e})}_socketCreate(){if(this._nextSocket)return;const t=function(t,e,r){var n,i;const o=t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t,s=o.split("?"),a=(0,q.isBrowser)()?{protocol:e,version:r,env:"browser",host:(null===(n=(0,q.getLocation)())||void 0===n?void 0:n.host)||""}:{protocol:e,version:r,env:(null===(i=(0,q.detectEnv)())||void 0===i?void 0:i.name)||""},u=Ot(function(t){const e=-1!==t.indexOf("?")?t.indexOf("?"):void 0;return void 0!==e?t.substr(e):""}(s[1]||""),a);return s[0]+"?"+u}(this._url,this._protocol,this._version);if(this._nextSocket=new Lt(t),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=t=>this._socketReceive(t),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=t=>this._socketError(t),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(t){const e=JSON.stringify(t);this._socket&&1===this._socket.readyState?this._socket.send(e):(this._setToQueue(t),this._socketCreate())}async _socketReceive(t){let e;try{e=JSON.parse(t.data)}catch(r){return}if(this._socketSend({topic:e.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const t=this._events.filter((t=>"message"===t.event));t&&t.length&&t.forEach((t=>t.callback(e)))}}_socketError(t){const e=this._events.filter((t=>"error"===t.event));e&&e.length&&e.forEach((e=>e.callback(t)))}_queueSubscriptions(){this._subscriptions.forEach((t=>this._queue.push({topic:t,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(t){this._queue.push(t)}_pushQueue(){this._queue.forEach((t=>this._socketSend(t))),this._queue=[]}};const qt="Session currently connected",Ut="Session currently disconnected",Ft="JSON RPC response format is invalid",Dt="User close QRCode Modal";var zt=class{constructor(){this._eventEmitters=[]}subscribe(t){this._eventEmitters.push(t)}unsubscribe(t){this._eventEmitters=this._eventEmitters.filter((e=>e.event!==t))}trigger(t){let e,r=[];e=void 0!==t.method?t.method:kt(t)||St(t)?`response:${t.id}`:Rt(t)?t.event:"",e&&(r=this._eventEmitters.filter((t=>t.event===e))),r&&r.length||function(t){return U.includes(t)||t.startsWith("wc_")}(e)||Rt(e)||(r=this._eventEmitters.filter((t=>"call_request"===t.event))),r.forEach((e=>{if(St(t)){const r=new Error(t.error.message);e.callback(r,null)}else e.callback(null,t)}))}};var Ht=class{constructor(t="walletconnect"){this.storageId=t}getSession(){let t=null;const e=(0,q.getLocal)(this.storageId);return e&&void 0!==e.bridge&&(t=e),t}setSession(t){return(0,q.setLocal)(this.storageId,t),t}removeSession(){(0,q.removeLocal)(this.storageId)}};const Kt="walletconnect.org",Gt="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((t=>`https://${t}.bridge.walletconnect.org`));function Wt(){return Gt[Math.floor(Math.random()*Gt.length)]}function Vt(t){return function(t){return function(t){return function(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}(t).split(".").slice(-2).join(".")}(t)===Kt}(t)?Wt():t}var Zt=class{constructor(t){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new zt,this._clientMeta=(0,q.getClientMeta)()||t.connectorOpts.clientMeta||null,this._cryptoLib=t.cryptoLib,this._sessionStorage=t.sessionStorage||new Ht(t.connectorOpts.storageId),this._qrcodeModal=t.connectorOpts.qrcodeModal,this._qrcodeModalOptions=t.connectorOpts.qrcodeModalOptions,this._signingMethods=[...F,...t.connectorOpts.signingMethods||[]],!t.connectorOpts.bridge&&!t.connectorOpts.uri&&!t.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");t.connectorOpts.bridge&&(this.bridge=Vt(t.connectorOpts.bridge)),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);const e=t.connectorOpts.session||this._getStorageSession();e&&(this.session=e),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new jt({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts)}set bridge(t){t&&(this._bridge=t)}get bridge(){return this._bridge}set key(t){if(!t)return;const e=nt(t).buffer;this._key=e}get key(){if(this._key){return t=this._key,e=!0,tt(new Uint8Array(t),!e)}var t,e;return""}set clientId(t){t&&(this._clientId=t)}get clientId(){let t=this._clientId;return t||(t=this._clientId=At()),this._clientId}set peerId(t){t&&(this._peerId=t)}get peerId(){return this._peerId}set clientMeta(t){}get clientMeta(){let t=this._clientMeta;return t||(t=this._clientMeta=(0,q.getClientMeta)()),t}set peerMeta(t){this._peerMeta=t}get peerMeta(){return this._peerMeta}set handshakeTopic(t){t&&(this._handshakeTopic=t)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(t){t&&(this._handshakeId=t)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(t){if(!t)return;const{handshakeTopic:e,bridge:r,key:n}=this._parseUri(t);this.handshakeTopic=e,this.bridge=r,this.key=n}set chainId(t){this._chainId=t}get chainId(){return this._chainId}set networkId(t){this._networkId=t}get networkId(){return this._networkId}set accounts(t){this._accounts=t}get accounts(){return this._accounts}set rpcUrl(t){this._rpcUrl=t}get rpcUrl(){return this._rpcUrl}set connected(t){}get connected(){return this._connected}set pending(t){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(t){t&&(this._connected=t.connected,this.accounts=t.accounts,this.chainId=t.chainId,this.bridge=t.bridge,this.key=t.key,this.clientId=t.clientId,this.clientMeta=t.clientMeta,this.peerId=t.peerId,this.peerMeta=t.peerMeta,this.handshakeId=t.handshakeId,this.handshakeTopic=t.handshakeTopic)}on(t,e){const r={event:t,callback:e};this._eventManager.subscribe(r)}off(t){this._eventManager.unsubscribe(t)}async createInstantRequest(t){this._key=await this._generateKey();const e=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(t)}]});this.handshakeId=e.id,this.handshakeTopic=At(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(()=>{throw new Error(Dt)}));const r=()=>{this.killSession()};try{const t=await this._sendCallRequest(e);return t&&r(),t}catch(n){throw r(),n}}async connect(t){if(!this._qrcodeModal)throw new Error("QRCode Modal not provided");return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(t),new Promise((async(t,e)=>{this.on("modal_closed",(()=>e(new Error(Dt)))),this.on("connect",((r,n)=>{if(r)return e(r);t(n.params[0])}))})))}async createSession(t){if(this._connected)throw new Error(qt);if(this.pending)return;this._key=await this._generateKey();const e=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:t&&t.chainId?t.chainId:null}]});this.handshakeId=e.id,this.handshakeTopic=At(),this._sendSessionRequest(e,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(t){if(this._connected)throw new Error(qt);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:e};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(t){if(this._connected)throw new Error(qt);const e=t&&t.message?t.message:"Session Rejected",r=this._formatResponse({id:this.handshakeId,error:{message:e}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession()}updateSession(t){if(!this._connected)throw new Error(Ut);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[e]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(t){const e=t?t.message:"Session Disconnected",r=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(r),this._handleSessionDisconnect(e)}async sendTransaction(t){if(!this._connected)throw new Error(Ut);const e=Ct(t),r=this._formatRequest({method:"eth_sendTransaction",params:[e]});return await this._sendCallRequest(r)}async signTransaction(t){if(!this._connected)throw new Error(Ut);const e=Ct(t),r=this._formatRequest({method:"eth_signTransaction",params:[e]});return await this._sendCallRequest(r)}async signMessage(t){if(!this._connected)throw new Error(Ut);const e=this._formatRequest({method:"eth_sign",params:t});return await this._sendCallRequest(e)}async signPersonalMessage(t){if(!this._connected)throw new Error(Ut);t=Pt(t);const e=this._formatRequest({method:"personal_sign",params:t});return await this._sendCallRequest(e)}async signTypedData(t){if(!this._connected)throw new Error(Ut);const e=this._formatRequest({method:"eth_signTypedData",params:t});return await this._sendCallRequest(e)}async updateChain(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"wallet_updateChain",params:[t]});return await this._sendCallRequest(e)}unsafeSend(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),new Promise(((e,r)=>{this._subscribeToResponse(t.id,((t,n)=>{if(t)r(t);else{if(!n)throw new Error("Missing JSON RPC response");e(n)}}))}))}async sendCustomRequest(t,e){if(!this._connected)throw new Error(Ut);switch(t.method){case"eth_accounts":return this.accounts;case"eth_chainId":return mt(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":t.params&&(t.params[0]=Ct(t.params[0]));break;case"personal_sign":t.params&&(t.params=Pt(t.params))}const r=this._formatRequest(t);return await this._sendCallRequest(r,e)}approveRequest(t){if(!kt(t))throw new Error('JSON-RPC success response must include "result" field');{const e=this._formatResponse(t);this._sendResponse(e)}}rejectRequest(t){if(!St(t))throw new Error('JSON-RPC error response must include "error" field');{const e=this._formatResponse(t);this._sendResponse(e)}}transportClose(){this._transport.close()}async _sendRequest(t,e){const r=this._formatRequest(t),n=await this._encrypt(r),i=void 0!==(null==e?void 0:e.topic)?e.topic:this.peerId,o=JSON.stringify(n),s=void 0!==(null==e?void 0:e.forcePushNotification)?!e.forcePushNotification:function(t){return!!t.method.startsWith("wc_")||!F.includes(t.method)}(r);this._transport.send(o,i,s)}async _sendResponse(t){const e=await this._encrypt(t),r=this.peerId,n=JSON.stringify(e);this._transport.send(n,r,!0)}async _sendSessionRequest(t,e,r){this._sendRequest(t,r),this._subscribeToSessionResponse(t.id,e)}_sendCallRequest(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),this._subscribeToCallResponse(t.id)}_formatRequest(t){if(void 0===t.method)throw new Error('JSON RPC request must have valid "method" value');return{id:void 0===t.id?Mt():t.id,jsonrpc:"2.0",method:t.method,params:void 0===t.params?[]:t.params}}_formatResponse(t){if(void 0===t.id)throw new Error('JSON RPC request must have valid "id" value');const e={id:t.id,jsonrpc:"2.0"};if(St(t)){const r=function(t){const e=t.message||"Failed or Rejected Request";let r=-32e3;if(t&&!t.code)switch(e){case"Parse error":r=-32700;break;case"Invalid request":r=-32600;break;case"Method not found":r=-32601;break;case"Invalid params":r=-32602;break;case"Internal error":r=-32603;break;default:r=-32e3}const n={code:r,message:e};return t.data&&(n.data=t.data),n}(t.error);return Object.assign(Object.assign(Object.assign({},e),t),{error:r})}if(kt(t)){return Object.assign(Object.assign({},e),t)}throw new Error(Ft)}_handleSessionDisconnect(t){const e=t||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),(0,q.removeLocal)(q.mobileLinkChoiceKey)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(t,e){e&&e.approved?(this._connected?(e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(t)}async _handleIncomingMessages(t){if(![this.clientId,this.handshakeTopic].includes(t.topic))return;let e;try{e=JSON.parse(t.payload)}catch(n){return}const r=await this._decrypt(e);r&&this._eventManager.trigger(r)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(t,e){this.on(`response:${t}`,e)}_subscribeToSessionResponse(t,e){this._subscribeToResponse(t,((t,r)=>{t?this._handleSessionResponse(t.message):kt(r)?this._handleSessionResponse(e,r.result):r.error&&r.error.message?this._handleSessionResponse(r.error.message):this._handleSessionResponse(e)}))}_subscribeToCallResponse(t){return new Promise(((e,r)=>{this._subscribeToResponse(t,((t,n)=>{t?r(t):kt(n)?e(n.result):n.error&&n.error.message?r(n.error):r(new Error(Ft))}))}))}_subscribeToInternalEvents(){this.on("display_uri",(()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,(()=>{this._eventManager.trigger({event:"modal_closed",params:[]})}),this._qrcodeModalOptions)})),this.on("connect",(()=>{this._qrcodeModal&&this._qrcodeModal.close()})),this.on("call_request_sent",((t,e)=>{const{request:r}=e.params[0];if((0,q.isMobile)()&&this._signingMethods.includes(r.method)){const t=(0,q.getLocal)(q.mobileLinkChoiceKey);t&&(window.location.href=t.href)}})),this.on("wc_sessionRequest",((t,e)=>{t&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:t.toString()}]}),this.handshakeId=e.id,this.peerId=e.params[0].peerId,this.peerMeta=e.params[0].peerMeta;const r=Object.assign(Object.assign({},e),{method:"session_request"});this._eventManager.trigger(r)})),this.on("wc_sessionUpdate",((t,e)=>{t&&this._handleSessionResponse(t.message),this._handleSessionResponse("Session disconnected",e.params[0])}))}_initTransport(){this._transport.on("message",(t=>this._handleIncomingMessages(t))),this._transport.on("open",(()=>this._eventManager.trigger({event:"transport_open",params:[]}))),this._transport.on("close",(()=>this._eventManager.trigger({event:"transport_close",params:[]}))),this._transport.on("error",(()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]}))),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(t){const e=function(t){const e=t.indexOf(":"),r=-1!==t.indexOf("?")?t.indexOf("?"):void 0,n=t.substring(0,e),i=function(t){const e=t.split("@");return{handshakeTopic:e[0],version:parseInt(e[1],10)}}(t.substring(e+1,r)),o=function(t){const e=Nt(t);return{key:e.key||"",bridge:e.bridge||""}}(void 0!==r?t.substr(r):"");return Object.assign(Object.assign({protocol:n},i),o)}(t);if(e.protocol===this.protocol){if(!e.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const t=e.handshakeTopic;if(!e.bridge)throw Error("Invalid or missing bridge url parameter value");const r=decodeURIComponent(e.bridge);if(!e.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:t,bridge:r,key:e.key}}throw new Error("URI format is invalid")}async _generateKey(){if(this._cryptoLib){return await this._cryptoLib.generateKey()}return null}async _encrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.encrypt(t,e)}return null}async _decrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.decrypt(t,e)}return null}_getStorageSession(){let t=null;return this._sessionStorage&&(t=this._sessionStorage.getSession()),t}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(t){if(!t.url||"string"!=typeof t.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!t.type||"string"!=typeof t.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!t.token||"string"!=typeof t.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const e={bridge:this.bridge,topic:this.clientId,type:t.type,token:t.token,peerName:"",language:t.language||""};this.on("connect",(async(r,n)=>{if(r)throw r;if(t.peerMeta){const t=n.params[0].peerMeta.name;e.peerName=t}try{const r=await fetch(`${t.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});if(!(await r.json()).success)throw Error("Failed to register in Push Server")}catch(r){throw Error("Failed to register in Push Server")}}))}};const Jt=256,Yt=256,Qt="AES-CBC",Xt=`SHA-${Jt}`,$t="HMAC",te="encrypt",ee="decrypt",re="sign",ne="verify";async function ie(t,e=Qt){return vt.getSubtleCrypto().importKey("raw",t,function(t){return t===Qt?{length:Jt,name:Qt}:{hash:{name:Xt},name:$t}}(e),!0,function(t){return t===Qt?[te,ee]:[re,ne]}(e))}function oe(t,e,r){return async function(t,e,r){const n=vt.getSubtleCrypto(),i=await ie(e,Qt),o=await n.encrypt({iv:t,name:Qt},i,r);return new Uint8Array(o)}(t,e,r)}function se(t,e,r){return async function(t,e,r){const n=vt.getSubtleCrypto(),i=await ie(e,Qt),o=await n.decrypt({iv:t,name:Qt},i,r);return new Uint8Array(o)}(t,e,r)}async function ae(t,e){const r=await async function(t,e){const r=vt.getSubtleCrypto(),n=await ie(t,$t),i=await r.sign({length:Yt,name:$t},n,e);return new Uint8Array(i)}(t,e);return r}async function ue(t){const e=function(t){return vt.getBrowerCrypto().getRandomValues(new Uint8Array(t))}((t||256)/8);return Y($(e)).buffer}async function ce(t,e){const r=nt(t.data),n=nt(t.iv),i=tt(nt(t.hmac),!1),o=at(r,n),s=tt(await ae(e,o),!1);return ct(i)===ct(s)}async function le(t,e,r){const n=Y(dt(e)),i=Y(dt(r||await ue(128))),o=tt(i,!1),s=ot(JSON.stringify(t)),a=await oe(i,n,s),u=tt(a,!1),c=at(a,i);return{data:u,hmac:tt(await ae(n,c),!1),iv:o}}async function fe(t,e){const r=Y(dt(e));if(!r)throw new Error("Missing key: required for decryption");if(!await ce(t,r))return null;const n=nt(t.data),i=nt(t.iv),o=et(await se(i,r,n));let s;try{s=JSON.parse(o)}catch(a){return null}return s}var he=class extends Zt{constructor(t,e){super({cryptoLib:n,connectorOpts:t,pushServerOpts:e})}},de=r(4337),pe=r.n(de),me=r(6729),ge=r.n(me),ye=r(9536);const ve=(0,q.getFromWindow)("XMLHttpRequest")||ye.XMLHttpRequest;class be extends(ge()){constructor(t){super(),this.url=t}formatError(t,e,r=-1){return{error:{message:e,code:r},id:t.id,jsonrpc:t.jsonrpc}}send(t,e){return new Promise((r=>{if("eth_subscribe"===t.method){const e=this.formatError(t,"Subscriptions are not supported by this HTTP endpoint");return this.emit("error",e),r(e)}const n=new ve;let i=!1;const o=(o,s)=>{if(!i)if(n.abort(),i=!0,e)e(o,s);else{const{id:e,jsonrpc:n}=t,i=o?{id:e,jsonrpc:n,error:{message:o.message,code:o.code}}:{id:e,jsonrpc:n,result:s};this.emit("payload",i),r(i)}};n.open("POST",this.url,!0),n.setRequestHeader("Content-Type","application/json"),n.timeout=6e4,n.onerror=o,n.ontimeout=o,n.onreadystatechange=()=>{if(4===n.readyState)try{const t=JSON.parse(n.responseText);o(t.error,t.result)}catch(t){o(t)}},n.send(JSON.stringify(t))}))}}var we=be;const _e=r(2906),Me=r(1955),Ae=r(2110),Ee=r(2455),xe=r(8747),ke=r(3621),Se=r(8191);var Re=class extends _e{constructor(t){if(super({pollingInterval:t.pollingInterval||8e3}),this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModal=pe(),this.qrcodeModalOptions=void 0,this.rpc=null,this.infuraId="",this.http=null,this.isConnecting=!1,this.connected=!1,this.connectCallbacks=[],this.accounts=[],this.chainId=1,this.rpcUrl="",this.enable=async()=>{const t=await this.getWalletConnector();if(t)return this.start(),this.subscribeWalletConnector(),t.accounts;throw new Error("Failed to connect to WalleConnect")},this.request=async t=>this.send(t),this.send=async(t,e)=>{var r;if("string"==typeof t){const r=t;let n=e;return"personal_sign"===r&&(n=Pt(n)),this.sendAsyncPromise(r,n)}if("personal_sign"===(t=Object.assign({id:Mt(),jsonrpc:"2.0"},t)).method&&(t.params=Pt(t.params)),!e){if("eth_signTypedData_v4"===t.method&&"MetaMask"===(null===(r=this.walletMeta)||void 0===r?void 0:r.name)){const{result:e}=await this.handleOtherRequests(t);return e}return this.sendAsyncPromise(t.method,t.params)}this.sendAsync(t,e)},this.onConnect=t=>{this.connectCallbacks.push(t)},this.triggerConnect=t=>{this.connectCallbacks&&this.connectCallbacks.length&&this.connectCallbacks.forEach((e=>e(t)))},this.bridge=t.connector?t.connector.bridge:t.bridge||"https://bridge.walletconnect.org",this.qrcode=void 0===t.qrcode||!1!==t.qrcode,this.qrcodeModal=t.qrcodeModal||this.qrcodeModal,this.qrcodeModalOptions=t.qrcodeModalOptions,this.wc=t.connector||new he({bridge:this.bridge,qrcodeModal:this.qrcode?this.qrcodeModal:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null==t?void 0:t.storageId,signingMethods:null==t?void 0:t.signingMethods,clientMeta:null==t?void 0:t.clientMeta}),this.rpc=t.rpc||null,!(this.rpc||t.infuraId&&"string"==typeof t.infuraId&&t.infuraId.trim()))throw new Error("Missing one of the required parameters: rpc or infuraId");this.infuraId=t.infuraId||"",this.chainId=(null==t?void 0:t.chainId)||this.chainId,this.initialize()}get isWalletConnect(){return!0}get connector(){return this.wc}get walletMeta(){return this.wc.peerMeta}async disconnect(){this.close()}async close(){const t=await this.getWalletConnector({disableSessionCreation:!0});await t.killSession(),await this.onDisconnect()}async handleRequest(t){try{let e,r=null;const n=await this.getWalletConnector();switch(t.method){case"wc_killSession":await this.close(),r=null;break;case"eth_accounts":r=n.accounts;break;case"eth_coinbase":r=n.accounts[0];break;case"eth_chainId":case"net_version":r=n.chainId;break;case"eth_uninstallFilter":this.sendAsync(t,(t=>t)),r=!0;break;default:e=await this.handleOtherRequests(t)}return e||this.formatResponse(t,r)}catch(e){throw this.emit("error",e),e}}async handleOtherRequests(t){if(!F.includes(t.method)&&t.method.startsWith("eth_"))return this.handleReadRequests(t);const e=await this.getWalletConnector(),r=await e.sendCustomRequest(t);return this.formatResponse(t,r)}async handleReadRequests(t){if(!this.http){const t=new Error("HTTP Connection not available");throw this.emit("error",t),t}return this.http.send(t)}formatResponse(t,e){return{id:t.id,jsonrpc:t.jsonrpc,result:e}}getWalletConnector(t={}){const{disableSessionCreation:e=!1}=t;return new Promise(((t,r)=>{const n=this.wc;this.isConnecting?this.onConnect((e=>t(e))):n.connected||e?(this.connected||(this.connected=!0,this.updateState(n.session)),t(n)):(this.isConnecting=!0,n.on("modal_closed",(()=>{r(new Error("User closed modal"))})),n.createSession({chainId:this.chainId}).then((()=>{n.on("connect",((e,i)=>{if(e)return this.isConnecting=!1,r(e);this.isConnecting=!1,this.connected=!0,i&&this.updateState(i.params[0]),this.emit("connect"),this.triggerConnect(n),t(n)}))})).catch((t=>{this.isConnecting=!1,r(t)})))}))}async subscribeWalletConnector(){const t=await this.getWalletConnector();t.on("disconnect",(t=>{t?this.emit("error",t):this.onDisconnect()})),t.on("session_update",((t,e)=>{t?this.emit("error",t):this.updateState(e.params[0])}))}async onDisconnect(){await this.stop(),this.emit("close",1e3,"Connection closed"),this.emit("disconnect",1e3,"Connection disconnected"),this.connected=!1}async updateState(t){const{accounts:e,chainId:r,networkId:n,rpcUrl:i}=t;(!this.accounts||e&&this.accounts!==e)&&(this.accounts=e,this.emit("accountsChanged",e)),(!this.chainId||r&&this.chainId!==r)&&(this.chainId=r,this.emit("chainChanged",r)),(!this.networkId||n&&this.networkId!==n)&&(this.networkId=n,this.emit("networkChanged",n)),this.updateRpcUrl(this.chainId,i||"")}updateRpcUrl(t,e=""){const r={infuraId:this.infuraId,custom:this.rpc||void 0};(e=e||Et(t,r))?(this.rpcUrl=e,this.updateHttpConnection()):this.emit("error",new Error(`No RPC Url available for chainId: ${t}`))}updateHttpConnection(){this.rpcUrl&&(this.http=new we(this.rpcUrl),this.http.on("payload",(t=>this.emit("payload",t))),this.http.on("error",(t=>this.emit("error",t))))}sendAsyncPromise(t,e){return new Promise(((r,n)=>{this.sendAsync({id:Mt(),jsonrpc:"2.0",method:t,params:e||[]},((t,e)=>{t?n(t):r(e.result)}))}))}initialize(){this.updateRpcUrl(this.chainId),this.addProvider(new Ae({eth_hashrate:"0x00",eth_mining:!1,eth_syncing:!0,net_listening:!0,web3_clientVersion:"WalletConnect/v1.x.x/javascript"})),this.addProvider(new Me),this.addProvider(new Se),this.addProvider(new Ee),this.addProvider(new ke),this.addProvider(new xe(this.configWallet())),this.addProvider({handleRequest:async(t,e,r)=>{try{const{error:e,result:n}=await this.handleRequest(t);r(e,n)}catch(n){r(n)}},setEngine:t=>t})}configWallet(){return{getAccounts:async t=>{try{const e=(await this.getWalletConnector()).accounts;e&&e.length?t(null,e):t(new Error("Failed to get accounts"))}catch(e){t(e)}},processMessage:async(t,e)=>{try{const r=await this.getWalletConnector();e(null,await r.signMessage([t.from,t.data]))}catch(r){e(r)}},processPersonalMessage:async(t,e)=>{try{const r=await this.getWalletConnector();e(null,await r.signPersonalMessage([t.data,t.from]))}catch(r){e(r)}},processSignTransaction:async(t,e)=>{try{const r=await this.getWalletConnector();e(null,await r.signTransaction(t))}catch(r){e(r)}},processTransaction:async(t,e)=>{try{const r=await this.getWalletConnector();e(null,await r.sendTransaction(t))}catch(r){e(r)}},processTypedMessage:async(t,e)=>{try{const r=await this.getWalletConnector();e(null,await r.signTypedData([t.from,t.data]))}catch(r){e(r)}}}}};let Ie=!1,Pe=!1;const Ce={debug:1,default:2,info:2,warning:3,error:4,off:5};let Te=Ce.default,Oe=null;const Ne=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var Be,Le;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(Be||(Be={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(Le||(Le={}));const je="0123456789abcdef";class qe{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==Ce[r]&&this.throwArgumentError("invalid log level name","logLevel",t),Te>Ce[r]||console.log.apply(console,e)}debug(...t){this._log(qe.levels.DEBUG,t)}info(...t){this._log(qe.levels.INFO,t)}warn(...t){this._log(qe.levels.WARNING,t)}makeError(t,e,r){if(Pe)return this.makeError("censored error",e,{});e||(e=qe.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((t=>{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t<e.length;t++)r+=je[e[t]>>4],r+=je[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(s){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push(`code=${e}`),n.push(`version=${this.version}`);const i=t;let o="";switch(e){case Le.NUMERIC_FAULT:{o="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":o+="-"+e;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case Le.CALL_EXCEPTION:case Le.INSUFFICIENT_FUNDS:case Le.MISSING_NEW:case Le.NONCE_EXPIRED:case Le.REPLACEMENT_UNDERPRICED:case Le.TRANSACTION_REPLACED:case Le.UNPREDICTABLE_GAS_LIMIT:o=e}o&&(t+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const s=new Error(t);return s.reason=i,s.code=e,Object.keys(r).forEach((function(t){s[t]=r[t]})),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,qe.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),Ne&&this.throwError("platform missing String.prototype.normalize",qe.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ne})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,qe.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,qe.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,qe.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,qe.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",qe.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",qe.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",qe.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return Oe||(Oe=new qe("logger/5.7.0")),Oe}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",qe.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ie){if(!t)return;this.globalLogger().throwError("error censorship permanent",qe.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Pe=!!t,Ie=!!e}static setLogLevel(t){const e=Ce[t.toLowerCase()];null!=e?Te=e:qe.globalLogger().warn("invalid log level - "+t)}static from(t){return new qe(t)}}qe.errors=Le,qe.levels=Be;var Ue=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Fe=new qe("properties/5.7.0");function De(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ze(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!=typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function He(t){return Ue(this,void 0,void 0,(function*(){const e=Object.keys(t).map((e=>{const r=t[e];return Promise.resolve(r).then((t=>({key:e,value:t})))}));return(yield Promise.all(e)).reduce(((t,e)=>(t[e.key]=e.value,t)),{})}))}function Ke(t){const e={};for(const r in t)e[r]=t[r];return e}const Ge={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function We(t){if(null==t||Ge[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;const r=Object.keys(t);for(let n=0;n<r.length;n++){let i=null;try{i=t[r[n]]}catch(e){continue}if(!We(i))return!1}return!0}return Fe.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function Ve(t){if(We(t))return t;if(Array.isArray(t))return Object.freeze(t.map((t=>Ze(t))));if("object"==typeof t){const e={};for(const r in t){const n=t[r];void 0!==n&&De(e,r,Ze(n))}return e}return Fe.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function Ze(t){return Ve(t)}class Je{constructor(t){for(const e in t)this[e]=Ze(t[e])}}const Ye="providers/5.7.2";var Qe=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Xe=new qe("abstract-signer/5.7.0"),$e=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],tr=[qe.errors.INSUFFICIENT_FUNDS,qe.errors.NONCE_EXPIRED,qe.errors.REPLACEMENT_UNDERPRICED];class er{constructor(){Xe.checkAbstract(new.target,er),De(this,"_isSigner",!0)}getBalance(t){return Qe(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)}))}getTransactionCount(t){return Qe(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)}))}estimateGas(t){return Qe(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const e=yield He(this.checkTransaction(t));return yield this.provider.estimateGas(e)}))}call(t,e){return Qe(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield He(this.checkTransaction(t));return yield this.provider.call(r,e)}))}sendTransaction(t){return Qe(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const e=yield this.populateTransaction(t),r=yield this.signTransaction(e);return yield this.provider.sendTransaction(r)}))}getChainId(){return Qe(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return Qe(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return Qe(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(t){return Qe(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)}))}checkTransaction(t){for(const r in t)-1===$e.indexOf(r)&&Xe.throwArgumentError("invalid transaction key: "+r,"transaction",t);const e=Ke(t);return null==e.from?e.from=this.getAddress():e.from=Promise.all([Promise.resolve(e.from),this.getAddress()]).then((e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&Xe.throwArgumentError("from address mismatch","transaction",t),e[0]))),e}populateTransaction(t){return Qe(this,void 0,void 0,(function*(){const e=yield He(this.checkTransaction(t));null!=e.to&&(e.to=Promise.resolve(e.to).then((t=>Qe(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.resolveName(t);return null==e&&Xe.throwArgumentError("provided ENS name resolves to null","tx.to",t),e})))),e.to.catch((t=>{})));const r=null!=e.maxFeePerGas||null!=e.maxPriorityFeePerGas;if(null==e.gasPrice||2!==e.type&&!r?0!==e.type&&1!==e.type||!r||Xe.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):Xe.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==e.type&&null!=e.type||null==e.maxFeePerGas||null==e.maxPriorityFeePerGas)if(0===e.type||1===e.type)null==e.gasPrice&&(e.gasPrice=this.getGasPrice());else{const t=yield this.getFeeData();if(null==e.type)if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)if(e.type=2,null!=e.gasPrice){const t=e.gasPrice;delete e.gasPrice,e.maxFeePerGas=t,e.maxPriorityFeePerGas=t}else null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas);else null!=t.gasPrice?(r&&Xe.throwError("network does not support EIP-1559",qe.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==e.gasPrice&&(e.gasPrice=t.gasPrice),e.type=0):Xe.throwError("failed to get consistent fee data",qe.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===e.type&&(null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}else e.type=2;return null==e.nonce&&(e.nonce=this.getTransactionCount("pending")),null==e.gasLimit&&(e.gasLimit=this.estimateGas(e).catch((t=>{if(tr.indexOf(t.code)>=0)throw t;return Xe.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",qe.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:e})}))),null==e.chainId?e.chainId=this.getChainId():e.chainId=Promise.all([Promise.resolve(e.chainId),this.getChainId()]).then((e=>(0!==e[1]&&e[0]!==e[1]&&Xe.throwArgumentError("chainId address mismatch","transaction",t),e[0]))),yield He(e)}))}_checkProvider(t){this.provider||Xe.throwError("missing provider",qe.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!(!t||!t._isSigner)}}var rr=r(3877),nr=r.n(rr);const ir=new qe("bytes/5.7.0");function or(t){return!!t.toHexString}function sr(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return sr(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function ar(t){return dr(t)&&!(t.length%2)||cr(t)}function ur(t){return"number"==typeof t&&t==t&&t%1==0}function cr(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t)return!1;if(!ur(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const r=t[e];if(!ur(r)||r<0||r>=256)return!1}return!0}function lr(t,e){if(e||(e={}),"number"==typeof t){ir.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),sr(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),or(t)&&(t=t.toHexString()),dr(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":ir.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let t=0;t<r.length;t+=2)n.push(parseInt(r.substring(t,t+2),16));return sr(new Uint8Array(n))}return cr(t)?sr(new Uint8Array(t)):ir.throwArgumentError("invalid arrayify value","value",t)}function fr(t){const e=t.map((t=>lr(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),sr(n)}function hr(t){let e=lr(t);if(0===e.length)return e;let r=0;for(;r<e.length&&0===e[r];)r++;return r&&(e=e.slice(r)),e}function dr(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const pr="0123456789abcdef";function mr(t,e){if(e||(e={}),"number"==typeof t){ir.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=pr[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"==typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),or(t))return t.toHexString();if(dr(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":ir.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(cr(t)){let e="0x";for(let r=0;r<t.length;r++){let n=t[r];e+=pr[(240&n)>>4]+pr[15&n]}return e}return ir.throwArgumentError("invalid hexlify value","value",t)}function gr(t){if("string"!=typeof t)t=mr(t);else if(!dr(t)||t.length%2)return null;return(t.length-2)/2}function yr(t,e,r){return"string"!=typeof t?t=mr(t):(!dr(t)||t.length%2)&&ir.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function vr(t){let e="0x";return t.forEach((t=>{e+=mr(t).substring(2)})),e}function br(t){const e=function(t){"string"!=typeof t&&(t=mr(t));dr(t)||ir.throwArgumentError("invalid hex string","value",t);t=t.substring(2);let e=0;for(;e<t.length&&"0"===t[e];)e++;return"0x"+t.substring(e)}(mr(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function wr(t,e){for("string"!=typeof t?t=mr(t):dr(t)||ir.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&ir.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function _r(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ar(t)){let r=lr(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=mr(r.slice(0,32)),e.s=mr(r.slice(32,64))):65===r.length?(e.r=mr(r.slice(0,32)),e.s=mr(r.slice(32,64)),e.v=r[64]):ir.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:ir.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=mr(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=function(t,e){(t=lr(t)).length>e&&ir.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),sr(r)}(lr(e._vs),32);e._vs=mr(r);const n=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=n:e.recoveryParam!==n&&ir.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const i=mr(r);null==e.s?e.s=i:e.s!==i&&ir.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?ir.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&ir.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&dr(e.r)?e.r=wr(e.r,32):ir.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&dr(e.s)?e.s=wr(e.s,32):ir.throwArgumentError("signature missing or invalid s","signature",t);const r=lr(e.s);r[0]>=128&&ir.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=mr(r);e._vs&&(dr(e._vs)||ir.throwArgumentError("signature invalid _vs","signature",t),e._vs=wr(e._vs,32)),null==e._vs?e._vs=n:e._vs!==n&&ir.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}var Mr=nr().BN;const Ar=new qe("bignumber/5.7.0"),Er={},xr=9007199254740991;let kr=!1;class Sr{constructor(t,e){t!==Er&&Ar.throwError("cannot call constructor directly; use BigNumber.from",qe.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return Ir(Pr(this).fromTwos(t))}toTwos(t){return Ir(Pr(this).toTwos(t))}abs(){return"-"===this._hex[0]?Sr.from(this._hex.substring(1)):this}add(t){return Ir(Pr(this).add(Pr(t)))}sub(t){return Ir(Pr(this).sub(Pr(t)))}div(t){return Sr.from(t).isZero()&&Cr("division-by-zero","div"),Ir(Pr(this).div(Pr(t)))}mul(t){return Ir(Pr(this).mul(Pr(t)))}mod(t){const e=Pr(t);return e.isNeg()&&Cr("division-by-zero","mod"),Ir(Pr(this).umod(e))}pow(t){const e=Pr(t);return e.isNeg()&&Cr("negative-power","pow"),Ir(Pr(this).pow(e))}and(t){const e=Pr(t);return(this.isNegative()||e.isNeg())&&Cr("unbound-bitwise-result","and"),Ir(Pr(this).and(e))}or(t){const e=Pr(t);return(this.isNegative()||e.isNeg())&&Cr("unbound-bitwise-result","or"),Ir(Pr(this).or(e))}xor(t){const e=Pr(t);return(this.isNegative()||e.isNeg())&&Cr("unbound-bitwise-result","xor"),Ir(Pr(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&Cr("negative-width","mask"),Ir(Pr(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&Cr("negative-width","shl"),Ir(Pr(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&Cr("negative-width","shr"),Ir(Pr(this).shrn(t))}eq(t){return Pr(this).eq(Pr(t))}lt(t){return Pr(this).lt(Pr(t))}lte(t){return Pr(this).lte(Pr(t))}gt(t){return Pr(this).gt(Pr(t))}gte(t){return Pr(this).gte(Pr(t))}isNegative(){return"-"===this._hex[0]}isZero(){return Pr(this).isZero()}toNumber(){try{return Pr(this).toNumber()}catch(t){Cr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return Ar.throwError("this platform does not support BigInt",qe.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?kr||(kr=!0,Ar.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?Ar.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",qe.errors.UNEXPECTED_ARGUMENT,{}):Ar.throwError("BigNumber.toString does not accept parameters",qe.errors.UNEXPECTED_ARGUMENT,{})),Pr(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof Sr)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new Sr(Er,Rr(t)):t.match(/^-?[0-9]+$/)?new Sr(Er,Rr(new Mr(t))):Ar.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&Cr("underflow","BigNumber.from",t),(t>=xr||t<=-xr)&&Cr("overflow","BigNumber.from",t),Sr.from(String(t));const e=t;if("bigint"==typeof e)return Sr.from(e.toString());if(cr(e))return Sr.from(mr(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"==typeof t)return Sr.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"==typeof t&&(dr(t)||"-"===t[0]&&dr(t.substring(1))))return Sr.from(t)}return Ar.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function Rr(t){if("string"!=typeof t)return Rr(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&Ar.throwArgumentError("invalid hex","value",t),"0x00"===(t=Rr(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function Ir(t){return Sr.from(Rr(t))}function Pr(t){const e=Sr.from(t).toHexString();return"-"===e[0]?new Mr("-"+e.substring(3),16):new Mr(e.substring(2),16)}function Cr(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),Ar.throwError(t,qe.errors.NUMERIC_FAULT,n)}function Tr(t){return"0x"+yt().keccak_256(lr(t))}const Or=new qe("rlp/5.7.0");function Nr(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function Br(t,e,r){let n=0;for(let i=0;i<r;i++)n=256*n+t[e+i];return n}function Lr(t){if(Array.isArray(t)){let e=[];if(t.forEach((function(t){e=e.concat(Lr(t))})),e.length<=55)return e.unshift(192+e.length),e;const r=Nr(e.length);return r.unshift(247+r.length),r.concat(e)}ar(t)||Or.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call(lr(t));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=Nr(e.length);return r.unshift(183+r.length),r.concat(e)}function jr(t){return mr(Lr(t))}function qr(t,e,r,n){const i=[];for(;r<e+1+n;){const o=Ur(t,r);i.push(o.result),(r+=o.consumed)>e+1+n&&Or.throwError("child data too short",qe.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Ur(t,e){if(0===t.length&&Or.throwError("data too short",qe.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Or.throwError("data short segment too short",qe.errors.BUFFER_OVERRUN,{});const n=Br(t,e+1,r);return e+1+r+n>t.length&&Or.throwError("data long segment too short",qe.errors.BUFFER_OVERRUN,{}),qr(t,e,e+1+r,r+n)}if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Or.throwError("data array too short",qe.errors.BUFFER_OVERRUN,{}),qr(t,e,e+1,r)}if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Or.throwError("data array too short",qe.errors.BUFFER_OVERRUN,{});const n=Br(t,e+1,r);e+1+r+n>t.length&&Or.throwError("data array too short",qe.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:mr(t.slice(e+1+r,e+1+r+n))}}if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&Or.throwError("data too short",qe.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:mr(t.slice(e+1,e+1+r))}}return{consumed:1,result:mr(t[e])}}function Fr(t){const e=lr(t),r=Ur(e,0);return r.consumed!==e.length&&Or.throwArgumentError("invalid rlp data","data",t),r.result}const Dr=new qe("address/5.7.0");function zr(t){dr(t,20)||Dr.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=lr(Tr(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&n[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Hr={};for(let of=0;of<10;of++)Hr[String(of)]=String(of);for(let of=0;of<26;of++)Hr[String.fromCharCode(65+of)]=String(10+of);const Kr=Math.floor((Gr=9007199254740991,Math.log10?Math.log10(Gr):Math.log(Gr)/Math.LN10));var Gr;function Wr(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>Hr[t])).join("");for(;e.length>=Kr;){let t=e.substring(0,Kr);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function Vr(t){let e=null;if("string"!=typeof t&&Dr.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=zr(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Dr.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Wr(t)&&Dr.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new Mr(r,36).toString(16);e.length<40;)e="0"+e;e=zr("0x"+e)}else Dr.throwArgumentError("invalid address","address",t);var r;return e}const Zr="hash/5.7.0",Jr=new qe("strings/5.7.0");var Yr,Qr;function Xr(t,e,r,n,i){if(t===Qr.BAD_PREFIX||t===Qr.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n<r.length&&r[n]>>6==2;n++)t++;return t}return t===Qr.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(Yr||(Yr={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(Qr||(Qr={}));const $r=Object.freeze({error:function(t,e,r,n,i){return Jr.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:Xr,replace:function(t,e,r,n,i){return t===Qr.OVERLONG?(n.push(i),0):(n.push(65533),Xr(t,e,r))}});function tn(t,e){null==e&&(e=$r.error),t=lr(t);const r=[];let n=0;for(;n<t.length;){const i=t[n++];if(i>>7==0){r.push(i);continue}let o=null,s=null;if(192==(224&i))o=1,s=127;else if(224==(240&i))o=2,s=2047;else{if(240!=(248&i)){n+=e(128==(192&i)?Qr.UNEXPECTED_CONTINUE:Qr.BAD_PREFIX,n-1,t,r);continue}o=3,s=65535}if(n-1+o>=t.length){n+=e(Qr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-o-1)-1;for(let u=0;u<o;u++){let i=t[n];if(128!=(192&i)){n+=e(Qr.MISSING_CONTINUE,n,t,r),a=null;break}a=a<<6|63&i,n++}null!==a&&(a>1114111?n+=e(Qr.OUT_OF_RANGE,n-1-o,t,r,a):a>=55296&&a<=57343?n+=e(Qr.UTF16_SURROGATE,n-1-o,t,r,a):a<=s?n+=e(Qr.OVERLONG,n-1-o,t,r,a):r.push(a))}return r}function en(t,e=Yr.current){e!=Yr.current&&(Jr.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const e=t.charCodeAt(n);if(e<128)r.push(e);else if(e<2048)r.push(e>>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return lr(r)}function rn(t,e){return tn(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function nn(t){return Tr(en(t))}var on=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const sn=new qe(Zr),an=new Uint8Array(32);an.fill(0);const un=Sr.from(-1),cn=Sr.from(0),ln=Sr.from(1),fn=Sr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const hn=wr(ln.toHexString(),32),dn=wr(cn.toHexString(),32),pn={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},mn=["name","version","chainId","verifyingContract","salt"];function gn(t){return function(e){return"string"!=typeof e&&sn.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const yn={name:gn("name"),version:gn("version"),chainId:function(t){try{return Sr.from(t).toString()}catch(e){}return sn.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Vr(t).toLowerCase()}catch(e){}return sn.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=lr(t);if(32!==e.length)throw new Error("bad length");return mr(e)}catch(e){}return sn.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function vn(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=""===e[1],n=parseInt(e[2]||"256");(n%8!=0||n>256||e[2]&&e[2]!==String(n))&&sn.throwArgumentError("invalid numeric width","type",t);const i=fn.mask(r?n-1:n),o=r?i.add(ln).mul(un):cn;return function(e){const r=Sr.from(e);return(r.lt(o)||r.gt(i))&&sn.throwArgumentError(`value out-of-bounds for ${t}`,"value",e),wr(r.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(0===r||r>32||e[1]!==String(r))&&sn.throwArgumentError("invalid bytes width","type",t),function(e){return lr(e).length!==r&&sn.throwArgumentError(`invalid length for ${t}`,"value",e),function(t){const e=lr(t),r=e.length%32;return r?vr([e,an.slice(r)]):mr(e)}(e)}}}switch(t){case"address":return function(t){return wr(Vr(t),32)};case"bool":return function(t){return t?hn:dn};case"bytes":return function(t){return Tr(t)};case"string":return function(t){return nn(t)}}return null}function bn(t,e){return`${t}(${e.map((({name:t,type:e})=>e+" "+t)).join(",")})`}class wn{constructor(t){De(this,"types",Object.freeze(Ze(t))),De(this,"_encoderCache",{}),De(this,"_types",{});const e={},r={},n={};Object.keys(t).forEach((t=>{e[t]={},r[t]=[],n[t]={}}));for(const o in t){const n={};t[o].forEach((i=>{n[i.name]&&sn.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(o)}`,"types",t),n[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===o&&sn.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",t);vn(s)||(r[s]||sn.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",t),r[s].push(o),e[o][s]=!0)}))}const i=Object.keys(r).filter((t=>0===r[t].length));0===i.length?sn.throwArgumentError("missing primary type","types",t):i.length>1&&sn.throwArgumentError(`ambiguous primary types or unused types: ${i.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),De(this,"primaryType",i[0]),function i(o,s){s[o]&&sn.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",t),s[o]=!0,Object.keys(e[o]).forEach((t=>{r[t]&&(i(t,s),Object.keys(s).forEach((e=>{n[e][t]=!0})))})),delete s[o]}(this.primaryType,{});for(const o in n){const e=Object.keys(n[o]);e.sort(),this._types[o]=bn(o,t[o])+e.map((e=>bn(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=vn(t);if(e)return e}const e=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(e){const t=e[1],r=this.getEncoder(t),n=parseInt(e[3]);return e=>{n>=0&&e.length!==n&&sn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);let i=e.map(r);return this._types[t]&&(i=i.map(Tr)),Tr(vr(i))}}const r=this.types[t];if(r){const e=nn(this._types[t]);return t=>{const n=r.map((({name:e,type:r})=>{const n=this.getEncoder(r)(t[e]);return this._types[r]?Tr(n):n}));return n.unshift(e),vr(n)}}return sn.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const e=this._types[t];return e||sn.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return Tr(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(vn(t))return r(t,e);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=parseInt(n[3]);return i>=0&&e.length!==i&&sn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,r)))}const i=this.types[t];return i?i.reduce(((t,{name:n,type:i})=>(t[n]=this._visit(i,e[n],r),t)),{}):sn.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new wn(t)}static getPrimaryType(t){return wn.from(t).primaryType}static hashStruct(t,e,r){return wn.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){const n=pn[r];n||sn.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:n})}return e.sort(((t,e)=>mn.indexOf(t.name)-mn.indexOf(e.name))),wn.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return vr(["0x1901",wn.hashDomain(t),wn.from(e).hash(r)])}static hash(t,e,r){return Tr(wn.encode(t,e,r))}static resolveNames(t,e,r,n){return on(this,void 0,void 0,(function*(){t=Ke(t);const i={};t.verifyingContract&&!dr(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const o=wn.from(e);o.visit(r,((t,e)=>("address"!==t||dr(e,20)||(i[e]="0x"),e)));for(const t in i)i[t]=yield n(t);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),r=o.visit(r,((t,e)=>"address"===t&&i[e]?i[e]:e)),{domain:t,value:r}}))}static getPayload(t,e,r){wn.hashDomain(t);const n={},i=[];mn.forEach((e=>{const r=t[e];null!=r&&(n[e]=yn[e](r),i.push({name:e,type:pn[e]}))}));const o=wn.from(e),s=Ke(e);return s.EIP712Domain?sn.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e):s.EIP712Domain=i,o.encode(r),{types:s,domain:n,primaryType:o.primaryType,message:o.visit(r,((t,e)=>{if(t.match(/^bytes(\d*)/))return mr(lr(e));if(t.match(/^u?int/))return Sr.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!=typeof e&&sn.throwArgumentError("invalid string","value",e),e}return sn.throwArgumentError("unsupported type","type",t)}))}}}const _n=Sr.from(0);var Mn=r(2500),An=r.n(Mn),En=r(3715),xn=r.n(En);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;function kn(t,e,r){return r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},t(r,r.exports),r.exports}var Sn=Rn;function Rn(t,e){if(!t)throw new Error(e||"Assertion failed")}Rn.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var In=kn((function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}})),Pn=kn((function(t,e){var r=e;r.assert=Sn,r.toArray=In.toArray,r.zero2=In.zero2,r.toHex=In.toHex,r.encode=In.encode,r.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,c=e.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),s=0==(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(s),a=0==(1&c)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new(An())(t,"hex","le")}})),Cn=Pn.getNAF,Tn=Pn.getJSF,On=Pn.assert;function Nn(t,e){this.type=t,this.p=new(An())(e.p,16),this.red=e.prime?An().red(e.prime):An().mont(this.p),this.zero=new(An())(0).toRed(this.red),this.one=new(An())(1).toRed(this.red),this.two=new(An())(2).toRed(this.red),this.n=e.n&&new(An())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Bn=Nn;function Ln(t,e){this.curve=t,this.type=e,this.precomputed=null}Nn.prototype.point=function(){throw new Error("Not implemented")},Nn.prototype.validate=function(){throw new Error("Not implemented")},Nn.prototype._fixedNafMul=function(t,e){On(t.precomputed);var r=t._getDoubles(),n=Cn(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var o,s,a=[];for(o=0;o<n.length;o+=r.step){s=0;for(var u=o+r.step-1;u>=o;u--)s=(s<<1)+n[u];a.push(s)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o<a.length;o++)(s=a[o])===f?l=l.mixedAdd(r.points[o]):s===-f&&(l=l.mixedAdd(r.points[o].neg()));c=c.add(l)}return c.toP()},Nn.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=Cn(e,r,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var u=0;a>=0&&0===o[a];a--)u++;if(a>=0&&u++,s=s.dblp(u),a<0)break;var c=o[a];On(0!==c),s="affine"===t.type?c>0?s.mixedAdd(i[c-1>>1]):s.mixedAdd(i[-c-1>>1].neg()):c>0?s.add(i[c-1>>1]):s.add(i[-c-1>>1].neg())}return"affine"===t.type?s.toP():s},Nn.prototype._wnafMulAdd=function(t,e,r,n,i){var o,s,a,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(o=0;o<n;o++){var h=(a=e[o])._getNAFPoints(t);u[o]=h.wnd,c[o]=h.points}for(o=n-1;o>=1;o-=2){var d=o-1,p=o;if(1===u[d]&&1===u[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=Tn(r[d],r[p]);for(f=Math.max(y[0].length,f),l[d]=new Array(f),l[p]=new Array(f),s=0;s<f;s++){var v=0|y[0][s],b=0|y[1][s];l[d][s]=g[3*(v+1)+(b+1)],l[p][s]=0,c[d]=m}}else l[d]=Cn(r[d],u[d],this._bitLength),l[p]=Cn(r[p],u[p],this._bitLength),f=Math.max(l[d].length,f),f=Math.max(l[p].length,f)}var w=this.jpoint(null,null,null),_=this._wnafT4;for(o=f;o>=0;o--){for(var M=0;o>=0;){var A=!0;for(s=0;s<n;s++)_[s]=0|l[s][o],0!==_[s]&&(A=!1);if(!A)break;M++,o--}if(o>=0&&M++,w=w.dblp(M),o<0)break;for(s=0;s<n;s++){var E=_[s];0!==E&&(E>0?a=c[s][E-1>>1]:E<0&&(a=c[s][-E-1>>1].neg()),w="affine"===a.type?w.mixedAdd(a):w.add(a))}}for(o=0;o<n;o++)c[o]=null;return i?w:w.toP()},Nn.BasePoint=Ln,Ln.prototype.eq=function(){throw new Error("Not implemented")},Ln.prototype.validate=function(){return this.curve.validate(this)},Nn.prototype.decodePoint=function(t,e){t=Pn.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?On(t[t.length-1]%2==0):7===t[0]&&On(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},Ln.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Ln.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},Ln.prototype.encode=function(t,e){return Pn.encode(this._encode(e),t)},Ln.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Ln.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},Ln.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},Ln.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},Ln.prototype._getBeta=function(){return null},Ln.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var jn=kn((function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}})),qn=Pn.assert;function Un(t){Bn.call(this,"short",t),this.a=new(An())(t.a,16).toRed(this.red),this.b=new(An())(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}jn(Un,Bn);var Fn=Un;function Dn(t,e,r,n){Bn.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new(An())(e,16),this.y=new(An())(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function zn(t,e,r,n){Bn.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(An())(0)):(this.x=new(An())(e,16),this.y=new(An())(r,16),this.z=new(An())(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Un.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new(An())(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new(An())(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],qn(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new(An())(t.a,16),b:new(An())(t.b,16)}})):this._getEndoBasis(r)}}},Un.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:An().mont(t),r=new(An())(2).toRed(e).redInvm(),n=r.redNeg(),i=new(An())(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},Un.prototype._getEndoBasis=function(t){for(var e,r,n,i,o,s,a,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=t,h=this.n.clone(),d=new(An())(1),p=new(An())(0),m=new(An())(0),g=new(An())(1),y=0;0!==f.cmpn(0);){var v=h.div(f);u=h.sub(v.mul(f)),c=m.sub(v.mul(d));var b=g.sub(v.mul(p));if(!n&&u.cmp(l)<0)e=a.neg(),r=d,n=u.neg(),i=c;else if(n&&2==++y)break;a=u,h=f,f=u,m=d,d=c,g=p,p=b}o=u.neg(),s=c;var w=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=e,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},Un.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(c).neg()}},Un.prototype.pointFromX=function(t,e){(t=new(An())(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},Un.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},Un.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),l=0;l<2*o;l++)n[l]=null,i[l]=null;return c},jn(Dn,Bn.BasePoint),Un.prototype.point=function(t,e,r){return new Dn(this,t,e,r)},Un.prototype.pointFromJSON=function(t,e){return Dn.fromJSON(this,t,e)},Dn.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},Dn.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Dn.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},Dn.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Dn.prototype.isInfinity=function(){return this.inf},Dn.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Dn.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},Dn.prototype.getX=function(){return this.x.fromRed()},Dn.prototype.getY=function(){return this.y.fromRed()},Dn.prototype.mul=function(t){return t=new(An())(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},Dn.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Dn.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Dn.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},Dn.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},Dn.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},jn(zn,Bn.BasePoint),Un.prototype.jpoint=function(t,e,r){return new zn(this,t,e,r)},zn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},zn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},zn.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),f=n.redMul(c),h=u.redSqr().redIAdd(l).redISub(f).redISub(f),d=u.redMul(f.redISub(h)).redISub(o.redMul(l)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(h,d,p)},zn.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=r.redMul(u),f=a.redSqr().redIAdd(c).redISub(l).redISub(l),h=a.redMul(l.redISub(f)).redISub(i.redMul(c)),d=this.z.redMul(s);return this.curve.jpoint(f,h,d)},zn.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),c=s.redAdd(s);for(e=0;e<t;e++){var l=o.redSqr(),f=c.redSqr(),h=f.redSqr(),d=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=o.redMul(f),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(h);var v=c.redMul(a);e+1<t&&(u=u.redMul(h)),o=m,a=v,c=y}return this.curve.jpoint(o,c.redMul(i),a)},zn.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},zn.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),h=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(l).redISub(h);d=d.redIAdd(d);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),g=h.redIAdd(h);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},zn.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),h=this.x.redMul(f),d=this.x.redSub(l).redMul(this.x.redAdd(l));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l);var g=f.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},zn.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(s),l=a.redSqr().redISub(c.redAdd(c)),f=c.redISub(l),h=s.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=a.redMul(f).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,d,p)},zn.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),l=e.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.x.redMul(a).redISub(l);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,h,d)},zn.prototype.mul=function(t,e){return t=new(An())(t,e),this.curve._wnafMul(this,t)},zn.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},zn.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},zn.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},zn.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Hn=kn((function(t,e){var r=e;r.base=Bn,r.short=Fn,r.mont=null,r.edwards=null})),Kn=kn((function(t,e){var r,n=e,i=Pn.assert;function o(t){"short"===t.type?this.curve=new Hn.short(t):"edwards"===t.type?this.curve=new Hn.edwards(t):this.curve=new Hn.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new o(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:xn().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:xn().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:xn().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:xn().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:xn().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:xn().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:xn().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(a){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:xn().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function Gn(t){if(!(this instanceof Gn))return new Gn(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=In.toArray(t.entropy,t.entropyEnc||"hex"),r=In.toArray(t.nonce,t.nonceEnc||"hex"),n=In.toArray(t.pers,t.persEnc||"hex");Sn(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var Wn=Gn;Gn.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},Gn.prototype._hmac=function(){return new(xn().hmac)(this.hash,this.K)},Gn.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},Gn.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=In.toArray(t,e),r=In.toArray(r,n),Sn(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},Gn.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=In.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,t);return this._update(r),this._reseed++,In.encode(o,e)};var Vn=Pn.assert;function Zn(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var Jn=Zn;Zn.fromPublic=function(t,e,r){return e instanceof Zn?e:new Zn(t,{pub:e,pubEnc:r})},Zn.fromPrivate=function(t,e,r){return e instanceof Zn?e:new Zn(t,{priv:e,privEnc:r})},Zn.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Zn.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},Zn.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},Zn.prototype._importPrivate=function(t,e){this.priv=new(An())(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},Zn.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?Vn(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Vn(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},Zn.prototype.derive=function(t){return t.validate()||Vn(t.validate(),"public point not validated"),t.mul(this.priv).getX()},Zn.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},Zn.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},Zn.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Yn=Pn.assert;function Qn(t,e){if(t instanceof Qn)return t;this._importDER(t,e)||(Yn(t.r&&t.s,"Signature without r or s"),this.r=new(An())(t.r,16),this.s=new(An())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Xn=Qn;function $n(){this.place=0}function ti(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function ei(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function ri(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}Qn.prototype._importDER=function(t,e){t=Pn.toArray(t,e);var r=new $n;if(48!==t[r.place++])return!1;var n=ti(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=ti(t,r);if(!1===i)return!1;var o=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var s=ti(t,r);if(!1===s)return!1;if(t.length!==s+r.place)return!1;var a=t.slice(r.place,s+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new(An())(o),this.s=new(An())(a),this.recoveryParam=null,!0},Qn.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=ei(e),r=ei(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];ri(n,e.length),(n=n.concat(e)).push(2),ri(n,r.length);var i=n.concat(r),o=[48];return ri(o,i.length),o=o.concat(i),Pn.encode(o,t)};var ni=function(){throw new Error("unsupported")},ii=Pn.assert;function oi(t){if(!(this instanceof oi))return new oi(t);"string"==typeof t&&(ii(Object.prototype.hasOwnProperty.call(Kn,t),"Unknown curve "+t),t=Kn[t]),t instanceof Kn.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var si=oi;oi.prototype.keyPair=function(t){return new Jn(this,t)},oi.prototype.keyFromPrivate=function(t,e){return Jn.fromPrivate(this,t,e)},oi.prototype.keyFromPublic=function(t,e){return Jn.fromPublic(this,t,e)},oi.prototype.genKeyPair=function(t){t||(t={});for(var e=new Wn({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||ni(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(An())(2));;){var i=new(An())(e.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},oi.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},oi.prototype.sign=function(t,e,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new(An())(t,16));for(var i=this.n.byteLength(),o=e.getPrivate().toArray("be",i),s=t.toArray("be",i),a=new Wn({hash:this.hash,entropy:o,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(An())(1)),c=0;;c++){var l=n.k?n.k(c):new(An())(a.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(u)>=0)){var f=this.g.mul(l);if(!f.isInfinity()){var h=f.getX(),d=h.umod(this.n);if(0!==d.cmpn(0)){var p=l.invm(this.n).mul(d.mul(e.getPrivate()).iadd(t));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(f.getY().isOdd()?1:0)|(0!==h.cmp(d)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new Xn({r:d,s:p,recoveryParam:m})}}}}}},oi.prototype.verify=function(t,e,r,n){t=this._truncateToN(new(An())(t,16)),r=this.keyFromPublic(r,n);var i=(e=new Xn(e,"hex")).r,o=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,a=o.invm(this.n),u=a.mul(t).umod(this.n),c=a.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},oi.prototype.recoverPubKey=function(t,e,r,n){ii((3&r)===r,"The recovery param is more than two bits"),e=new Xn(e,n);var i=this.n,o=new(An())(t),s=e.r,a=e.s,u=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var l=e.r.invm(i),f=i.sub(o).mul(l).umod(i),h=a.mul(l).umod(i);return this.g.mulAdd(f,s,h)},oi.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new Xn(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var ai=kn((function(t,e){var r=e;r.version="6.5.4",r.utils=Pn,r.rand=function(){throw new Error("unsupported")},r.curve=Hn,r.curves=Kn,r.ec=si,r.eddsa=null})).ec;const ui=new qe("signing-key/5.7.0");let ci=null;function li(){return ci||(ci=new ai("secp256k1")),ci}class fi{constructor(t){De(this,"curve","secp256k1"),De(this,"privateKey",mr(t)),32!==gr(this.privateKey)&&ui.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=li().keyFromPrivate(lr(this.privateKey));De(this,"publicKey","0x"+e.getPublic(!1,"hex")),De(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),De(this,"_isSigningKey",!0)}_addPoint(t){const e=li().keyFromPublic(lr(this.publicKey)),r=li().keyFromPublic(lr(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){const e=li().keyFromPrivate(lr(this.privateKey)),r=lr(t);32!==r.length&&ui.throwArgumentError("bad digest length","digest",t);const n=e.sign(r,{canonical:!0});return _r({recoveryParam:n.recoveryParam,r:wr("0x"+n.r.toString(16),32),s:wr("0x"+n.s.toString(16),32)})}computeSharedSecret(t){const e=li().keyFromPrivate(lr(this.privateKey)),r=li().keyFromPublic(lr(hi(t)));return wr("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}function hi(t,e){const r=lr(t);if(32===r.length){const t=new fi(r);return e?"0x"+li().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?mr(r):"0x"+li().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+li().keyFromPublic(r).getPublic(!0,"hex"):mr(r):ui.throwArgumentError("invalid public or private key","key","[REDACTED]")}const di=new qe("transactions/5.7.0");var pi;function mi(t){return"0x"===t?null:Vr(t)}function gi(t){return"0x"===t?_n:Sr.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(pi||(pi={}));function yi(t,e){return function(t){return Vr(yr(Tr(yr(hi(t),1)),12))}(function(t,e){const r=_r(e),n={r:lr(r.r),s:lr(r.s)};return"0x"+li().recoverPubKey(lr(t),n,r.recoveryParam).encode("hex",!1)}(lr(t),e))}function vi(t,e){const r=hr(Sr.from(t).toHexString());return r.length>32&&di.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function bi(t,e){return{address:Vr(t),storageKeys:(e||[]).map(((e,r)=>(32!==gr(e)&&di.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase())))}}function wi(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&di.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),bi(t[0],t[1])):bi(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return bi(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function _i(t){return wi(t).map((t=>[t.address,t.storageKeys]))}function Mi(t,e){if(null!=t.gasPrice){const e=Sr.from(t.gasPrice),r=Sr.from(t.maxFeePerGas||0);e.eq(r)||di.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}const r=[vi(t.chainId||0,"chainId"),vi(t.nonce||0,"nonce"),vi(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),vi(t.maxFeePerGas||0,"maxFeePerGas"),vi(t.gasLimit||0,"gasLimit"),null!=t.to?Vr(t.to):"0x",vi(t.value||0,"value"),t.data||"0x",_i(t.accessList||[])];if(e){const t=_r(e);r.push(vi(t.recoveryParam,"recoveryParam")),r.push(hr(t.r)),r.push(hr(t.s))}return vr(["0x02",jr(r)])}function Ai(t,e){const r=[vi(t.chainId||0,"chainId"),vi(t.nonce||0,"nonce"),vi(t.gasPrice||0,"gasPrice"),vi(t.gasLimit||0,"gasLimit"),null!=t.to?Vr(t.to):"0x",vi(t.value||0,"value"),t.data||"0x",_i(t.accessList||[])];if(e){const t=_r(e);r.push(vi(t.recoveryParam,"recoveryParam")),r.push(hr(t.r)),r.push(hr(t.s))}return vr(["0x01",jr(r)])}function Ei(t,e,r){try{const r=gi(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch(n){di.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=wr(e[1],32),t.s=wr(e[2],32);try{const e=Tr(r(t));t.from=yi(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(n){}}function xi(t){const e=lr(t);if(e[0]>127)return function(t){const e=Fr(t);9!==e.length&&6!==e.length&&di.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:gi(e[0]).toNumber(),gasPrice:gi(e[1]),gasLimit:gi(e[2]),to:mi(e[3]),value:gi(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=Sr.from(e[6]).toNumber()}catch(n){return r}if(r.r=wr(e[7],32),r.s=wr(e[8],32),Sr.from(r.r).isZero()&&Sr.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const o=e.slice(0,6);0!==r.chainId&&(o.push(mr(r.chainId)),o.push("0x"),o.push("0x"),i-=2*r.chainId+8);const s=Tr(jr(o));try{r.from=yi(s,{r:mr(r.r),s:mr(r.s),recoveryParam:i})}catch(n){}r.hash=Tr(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){const e=Fr(t.slice(1));8!==e.length&&11!==e.length&&di.throwArgumentError("invalid component count for transaction type: 1","payload",mr(t));const r={type:1,chainId:gi(e[0]).toNumber(),nonce:gi(e[1]).toNumber(),gasPrice:gi(e[2]),gasLimit:gi(e[3]),to:mi(e[4]),value:gi(e[5]),data:e[6],accessList:wi(e[7])};return 8===e.length||(r.hash=Tr(t),Ei(r,e.slice(8),Ai)),r}(e);case 2:return function(t){const e=Fr(t.slice(1));9!==e.length&&12!==e.length&&di.throwArgumentError("invalid component count for transaction type: 2","payload",mr(t));const r=gi(e[2]),n=gi(e[3]),i={type:2,chainId:gi(e[0]).toNumber(),nonce:gi(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:gi(e[4]),to:mi(e[5]),value:gi(e[6]),data:e[7],accessList:wi(e[8])};return 9===e.length||(i.hash=Tr(t),Ei(i,e.slice(9),Mi)),i}(e)}return di.throwError(`unsupported transaction type: ${e[0]}`,qe.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function ki(t){t=atob(t);const e=[];for(let r=0;r<t.length;r++)e.push(t.charCodeAt(r));return lr(e)}function Si(t){t=lr(t);let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}var Ri=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};function Ii(t,e){return Ri(this,void 0,void 0,(function*(){null==e&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(!0!==e.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=e.fetchOptions){const t=e.fetchOptions;t.mode&&(r.mode=t.mode),t.cache&&(r.cache=t.cache),t.credentials&&(r.credentials=t.credentials),t.redirect&&(r.redirect=t.redirect),t.referrer&&(r.referrer=t.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach(((t,e)=>{o[e.toLowerCase()]=t})):n.headers.keys().forEach((t=>{o[t.toLowerCase()]=n.headers.get(t)})),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:lr(new Uint8Array(i))}}))}var Pi=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Ci=new qe("web/5.7.1");function Ti(t){return new Promise((e=>{setTimeout(e,t)}))}function Oi(t,e){if(null==t)return null;if("string"==typeof t)return t;if(ar(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return rn(t)}catch(r){}return mr(t)}return t}function Ni(t,e,r){let n=null;if(null!=e){n=en(e);const r="string"==typeof t?{url:t}:Ke(t);if(r.headers){0!==Object.keys(r.headers).filter((t=>"content-type"===t.toLowerCase())).length||(r.headers=Ke(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return function(t,e,r){const n="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;Ci.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const i="object"==typeof t?t.throttleCallback:null,o="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;Ci.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s="object"==typeof t&&!!t.errorPassThrough,a={};let u=null;const c={method:"GET"};let l=!1,f=12e4;if("string"==typeof t)u=t;else if("object"==typeof t){if(null!=t&&null!=t.url||Ci.throwArgumentError("missing URL","connection.url",t),u=t.url,"number"==typeof t.timeout&&t.timeout>0&&(f=t.timeout),t.headers)for(const e in t.headers)a[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(l=!0);if(c.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==u.substring(0,6)&&!0!==t.allowInsecureAuthentication&&Ci.throwError("basic authentication requires a secure https url",qe.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+Si(en(e))}}null!=t.skipFetchSetup&&(c.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(c.fetchOptions=Ke(t.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),d=u?u.match(h):null;if(d)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":d[1]||"text/plain"},body:d[2]?ki(d[3]):(p=d[3],en(p.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(v){Ci.throwError("processing response error",qe.errors.SERVER_ERROR,{body:Oi(d[1],d[2]),error:v,requestBody:null,requestMethod:"GET",url:u})}var p;e&&(c.method="POST",c.body=e,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const m={};Object.keys(a).forEach((t=>{const e=a[t];m[e.key]=e.value})),c.headers=m;const g=function(){let t=null;return{promise:new Promise((function(e,r){f&&(t=setTimeout((()=>{null!=t&&(t=null,r(Ci.makeError("timeout",qe.errors.TIMEOUT,{requestBody:Oi(c.body,m["content-type"]),requestMethod:c.method,timeout:f,url:u})))}),f))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),y=function(){return Pi(this,void 0,void 0,(function*(){for(let t=0;t<n;t++){let e=null;try{if(e=yield Ii(u,c),t<n)if(301===e.statusCode||302===e.statusCode){const t=e.headers.location||"";if("GET"===c.method&&t.match(/^https:/)){u=e.headers.location;continue}}else if(429===e.statusCode){let r=!0;if(i&&(r=yield i(t,u)),r){let r=0;const n=e.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):o*parseInt(String(Math.random()*Math.pow(2,t))),yield Ti(r);continue}}}catch(v){e=v.response,null==e&&(g.cancel(),Ci.throwError("missing response",qe.errors.SERVER_ERROR,{requestBody:Oi(c.body,m["content-type"]),requestMethod:c.method,serverError:v,url:u}))}let a=e.body;if(l&&304===e.statusCode?a=null:!s&&(e.statusCode<200||e.statusCode>=300)&&(g.cancel(),Ci.throwError("bad response",qe.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:Oi(a,e.headers?e.headers["content-type"]:null),requestBody:Oi(c.body,m["content-type"]),requestMethod:c.method,url:u})),r)try{const t=yield r(a,e);return g.cancel(),t}catch(v){if(v.throttleRetry&&t<n){let e=!0;if(i&&(e=yield i(t,u)),e){const e=o*parseInt(String(Math.random()*Math.pow(2,t)));yield Ti(e);continue}}g.cancel(),Ci.throwError("processing response error",qe.errors.SERVER_ERROR,{body:Oi(a,e.headers?e.headers["content-type"]:null),error:v,requestBody:Oi(c.body,m["content-type"]),requestMethod:c.method,url:u})}return g.cancel(),a}return Ci.throwError("failed response",qe.errors.SERVER_ERROR,{requestBody:Oi(c.body,m["content-type"]),requestMethod:c.method,url:u})}))}();return Promise.race([g.promise,y])}(t,n,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse(rn(t))}catch(i){Ci.throwError("invalid JSON",qe.errors.SERVER_ERROR,{body:t,error:i})}return r&&(n=r(n,e)),n}))}function Bi(t,e){return e||(e={}),null==(e=Ke(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout((()=>{s()&&n(new Error("timeout"))}),e.timeout));const a=e.retryLimit;let u=0;!function i(){return t().then((function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(u++,u>a)return void(s()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));t<e.floor&&(t=e.floor),t>e.ceiling&&(t=e.ceiling),setTimeout(i,t)}return null}),(function(t){s()&&n(t)}))}()}))}var Li=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const ji=new qe("abstract-provider/5.7.0");class qi extends Je{static isForkEvent(t){return!(!t||!t._isForkEvent)}}class Ui{constructor(){ji.checkAbstract(new.target,Ui),De(this,"_isProvider",!0)}getFeeData(){return Li(this,void 0,void 0,(function*(){const{block:t,gasPrice:e}=yield He({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((t=>null))});let r=null,n=null,i=null;return t&&t.baseFeePerGas&&(r=t.baseFeePerGas,i=Sr.from("1500000000"),n=t.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:r,maxFeePerGas:n,maxPriorityFeePerGas:i,gasPrice:e}}))}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}static isProvider(t){return!(!t||!t._isProvider)}}class Fi{constructor(t){De(this,"alphabet",t),De(this,"base",t.length),De(this,"_alphabetMap",{}),De(this,"_leader",t.charAt(0));for(let e=0;e<t.length;e++)this._alphabetMap[t.charAt(e)]=e}encode(t){let e=lr(t);if(0===e.length)return"";let r=[0];for(let i=0;i<e.length;++i){let t=e[i];for(let e=0;e<r.length;++e)t+=r[e]<<8,r[e]=t%this.base,t=t/this.base|0;for(;t>0;)r.push(t%this.base),t=t/this.base|0}let n="";for(let i=0;0===e[i]&&i<e.length-1;++i)n+=this._leader;for(let i=r.length-1;i>=0;--i)n+=this.alphabet[r[i]];return n}decode(t){if("string"!=typeof t)throw new TypeError("Expected String");let e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(let r=0;r<t.length;r++){let n=this._alphabetMap[t[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let i=n;for(let t=0;t<e.length;++t)i+=e[t]*this.base,e[t]=255&i,i>>=8;for(;i>0;)e.push(255&i),i>>=8}for(let r=0;t[r]===this._leader&&r<t.length-1;++r)e.push(0);return lr(new Uint8Array(e.reverse()))}}new Fi("abcdefghijklmnopqrstuvwxyz234567");const Di=new Fi("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function zi(t,e){null==e&&(e=1);const r=[],n=r.forEach,i=function(t,e){n.call(t,(function(t){e>0&&Array.isArray(t)?i(t,e-1):r.push(t)}))};return i(t,e),r}function Hi(t){return function(t){let e=0;return()=>t[e++]}(function(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let w=1;w<n;w++)o.push(i+=r());let s=r(),a=e;e+=s;let u=0,c=0;function l(){return 0==u&&(c=c<<8|t[e++],u=8),c>>--u&1}const f=Math.pow(2,31),h=f>>>1,d=h>>1,p=f-1;let m=0;for(let w=0;w<31;w++)m=m<<1|l();let g=[],y=0,v=f;for(;;){let t=Math.floor(((m-y+1)*i-1)/v),e=0,r=n;for(;r-e>1;){let n=e+r>>>1;t<o[n]?r=n:e=n}if(0==e)break;g.push(e);let s=y+Math.floor(v*o[e]/i),a=y+Math.floor(v*o[e+1]/i)-1;for(;0==((s^a)&h);)m=m<<1&p|l(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&d;)m=m&h|m<<1&p>>>1|l(),s=s<<1^h,a=(a^h)<<1|h|1;y=s,v=1+a-s}let b=n-4;return g.map((e=>{switch(e-b){case 3:return b+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return b+256+(t[a++]<<8|t[a++]);case 1:return b+t[a++];default:return e-1}}))}(t))}function Ki(t){return 1&t?~t>>1:t>>1}function Gi(t,e){let r=Array(t);for(let n=0,i=-1;n<t;n++)r[n]=i+=1+e();return r}function Wi(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=Ki(e());return r}function Vi(t,e){let r=Gi(t(),t),n=t(),i=Gi(n,t),o=function(t,e){let r=Array(t);for(let n=0;n<t;n++)r[n]=1+e();return r}(n,t);for(let s=0;s<n;s++)for(let t=0;t<o[s];t++)r.push(i[s]+t);return e?r.map((t=>e[t])):r}function Zi(t,e,r){let n=Array(t).fill(void 0).map((()=>[]));for(let i=0;i<e;i++)Wi(t,r).forEach(((t,e)=>n[e].push(t)));return n}function Ji(t,e){let r=1+e(),n=e(),i=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(r)}return e}(e);return zi(Zi(i.length,1+t,e).map(((t,e)=>{const o=t[0],s=t.slice(1);return Array(i[e]).fill(void 0).map(((t,e)=>{let i=e*n;return[o+e*r,s.map((t=>t+i))]}))})))}function Yi(t,e){return Zi(1+e(),1+t,e).map((t=>[t[0],t.slice(1)]))}const Qi=Hi(ki("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),Xi=new Set(Vi(Qi)),$i=new Set(Vi(Qi)),to=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(Ji(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Yi(r,t))}return function(t){const e={};for(let r=0;r<t.length;r++){const n=t[r];e[n[0]]=n[1]}return e}(zi(e))}(Qi),eo=function(t){let e=Vi(t).sort(((t,e)=>t-e));return function r(){let n=[];for(;;){let i=Vi(t,e);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((t,e)=>e.set.size-t.set.size));let i=t(),o=i%3;i=i/3|0;let s=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:s,save:1==i,check:2==i}}()}(Qi),ro=45,no=95;function io(t){return function(t,e=Yr.current){return tn(en(t,e))}(t)}function oo(t){return t.filter((t=>65039!=t))}function so(t){for(let r of t.split(".")){let t=io(r);try{for(let e=t.lastIndexOf(no)-1;e>=0;e--)if(t[e]!==no)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every((t=>t<128))&&t[2]===ro&&t[3]===ro)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${r}": ${e.message}`)}}return t}function ao(t){return so(function(t,e){let r=io(t).reverse(),n=[];for(;r.length;){let t=uo(r);if(t){n.push(...e(t));continue}let i=r.pop();if(Xi.has(i)){n.push(i);continue}if($i.has(i))continue;let o=to[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return so((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(t,oo))}function uo(t,e){var r;let n,i,o=eo,s=[],a=t.length;for(e&&(e.length=0);a;){let u=t[--a];if(o=null===(r=o.branches.find((t=>t.set.has(u))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=u;else if(o.check&&u===i)break;s.push(u),o.fe0f&&(s.push(65039),a>0&&65039==t[a-1]&&a--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return n}const co=new qe(Zr),lo=new Uint8Array(32);function fo(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function ho(t){const e=en(ao(t)),r=[];if(0===t.length)return r;let n=0;for(let i=0;i<e.length;i++){46===e[i]&&(r.push(fo(e.slice(n,i))),n=i+1)}if(n>=e.length)throw new Error("invalid ENS name; empty component");return r.push(fo(e.slice(n))),r}function po(t){"string"!=typeof t&&co.throwArgumentError("invalid ENS name; not a string","name",t);let e=lo;const r=ho(t);for(;r.length;)e=Tr(fr([e,Tr(r.pop())]));return mr(e)}lo.fill(0);const mo=new qe("networks/5.7.1");function go(t){const e=function(e,r){null==r&&(r={});const n=[];if(e.InfuraProvider&&"-"!==r.infura)try{n.push(new e.InfuraProvider(t,r.infura))}catch(i){}if(e.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(i){}if(e.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(i){}if(e.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new e.PocketProvider(t,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(i){}}if(e.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new e.CloudflareProvider(t))}catch(i){}if(e.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new e.AnkrProvider(t,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(i){}if(0===n.length)return null;if(e.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===t&&(i=2),new e.FallbackProvider(n,i)}return n[0]};return e.renetwork=function(t){return go(t)},e}function yo(t,e){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return yo(t,e)},r}const vo={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:go("homestead")},bo={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:go("ropsten")},wo={chainId:63,name:"classicMordor",_defaultProvider:yo("https://www.ethercluster.com/mordor","classicMordor")},_o={unspecified:{chainId:0,name:"unspecified"},homestead:vo,mainnet:vo,morden:{chainId:2,name:"morden"},ropsten:bo,testnet:bo,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:go("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:go("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:go("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:go("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:yo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:wo,classicTestnet:wo,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:yo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:go("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:go("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};new qe("sha2/5.7.0");function Mo(t){return"0x"+xn().sha256().update(lr(t)).digest("hex")}var Ao=r(3173),Eo=r.n(Ao);const xo=new qe(Ye);class ko{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const t={},e=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),u=this.type.bind(this);return t.transaction={hash:o,type:u,accessList:ko.allowNull(this.accessList.bind(this),null),blockHash:ko.allowNull(o,null),blockNumber:ko.allowNull(a,null),transactionIndex:ko.allowNull(a,null),confirmations:ko.allowNull(a,null),from:e,gasPrice:ko.allowNull(r),maxPriorityFeePerGas:ko.allowNull(r),maxFeePerGas:ko.allowNull(r),gasLimit:r,to:ko.allowNull(e,null),value:r,nonce:a,data:i,r:ko.allowNull(this.uint256),s:ko.allowNull(this.uint256),v:ko.allowNull(a),creates:ko.allowNull(e,null),raw:ko.allowNull(i)},t.transactionRequest={from:ko.allowNull(e),nonce:ko.allowNull(a),gasLimit:ko.allowNull(r),gasPrice:ko.allowNull(r),maxPriorityFeePerGas:ko.allowNull(r),maxFeePerGas:ko.allowNull(r),to:ko.allowNull(e),value:ko.allowNull(r),data:ko.allowNull((t=>this.data(t,!0))),type:ko.allowNull(a),accessList:ko.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:o,address:e,topics:ko.arrayOf(o),data:i,logIndex:a,blockHash:o},t.receipt={to:ko.allowNull(this.address,null),from:ko.allowNull(this.address,null),contractAddress:ko.allowNull(e,null),transactionIndex:a,root:ko.allowNull(s),gasUsed:r,logsBloom:ko.allowNull(i),blockHash:o,transactionHash:o,logs:ko.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:ko.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:ko.allowNull(r),status:ko.allowNull(a),type:u},t.block={hash:ko.allowNull(o),parentHash:o,number:a,timestamp:a,nonce:ko.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:ko.allowNull(e),extraData:i,transactions:ko.allowNull(ko.arrayOf(o)),baseFeePerGas:ko.allowNull(r)},t.blockWithTransactions=Ke(t.block),t.blockWithTransactions.transactions=ko.allowNull(ko.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:ko.allowNull(n,void 0),toBlock:ko.allowNull(n,void 0),blockHash:ko.allowNull(o,void 0),address:ko.allowNull(e,void 0),topics:ko.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:ko.allowNull(a),blockHash:ko.allowNull(o),transactionIndex:a,removed:ko.allowNull(this.boolean.bind(this)),address:e,data:ko.allowFalsish(i,"0x"),topics:ko.arrayOf(o),transactionHash:o,logIndex:a},t}accessList(t){return wi(t||[])}number(t){return"0x"===t?0:Sr.from(t).toNumber()}type(t){return"0x"===t||null==t?0:Sr.from(t).toNumber()}bigNumber(t){return Sr.from(t)}boolean(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}hex(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),dr(t))?t.toLowerCase():xo.throwArgumentError("invalid hash","value",t)}data(t,e){const r=this.hex(t,e);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+t);return r}address(t){return Vr(t)}callAddress(t){if(!dr(t,32))return null;const e=Vr(yr(t,12));return"0x0000000000000000000000000000000000000000"===e?null:e}contractAddress(t){return function(t){let e=null;try{e=Vr(t.from)}catch(r){Dr.throwArgumentError("missing from address","transaction",t)}return Vr(yr(Tr(jr([e,hr(lr(Sr.from(t.nonce).toHexString()))])),12))}(t)}blockTag(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"==typeof t||dr(t))return br(t);throw new Error("invalid blockTag")}hash(t,e){const r=this.hex(t,e);return 32!==gr(r)?xo.throwArgumentError("invalid hash","value",t):r}difficulty(t){if(null==t)return null;const e=Sr.from(t);try{return e.toNumber()}catch(r){}return null}uint256(t){if(!dr(t))throw new Error("invalid uint256");return wr(t,32)}_block(t,e){null!=t.author&&null==t.miner&&(t.miner=t.author);const r=null!=t._difficulty?t._difficulty:t.difficulty,n=ko.check(e,t);return n._difficulty=null==r?null:Sr.from(r),n}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return ko.check(this.formats.transactionRequest,t)}transactionResponse(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&Sr.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);const e=ko.check(this.formats.transaction,t);if(null!=t.chainId){let r=t.chainId;dr(r)&&(r=Sr.from(r).toNumber()),e.chainId=r}else{let r=t.networkId;null==r&&null==e.v&&(r=t.chainId),dr(r)&&(r=Sr.from(r).toNumber()),"number"!=typeof r&&null!=e.v&&(r=(e.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),e.chainId=r}return e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}transaction(t){return xi(t)}receiptLog(t){return ko.check(this.formats.receiptLog,t)}receipt(t){const e=ko.check(this.formats.receipt,t);if(null!=e.root)if(e.root.length<=4){const t=Sr.from(e.root).toNumber();0===t||1===t?(null!=e.status&&e.status!==t&&xo.throwArgumentError("alt-root-status/status mismatch","value",{root:e.root,status:e.status}),e.status=t,delete e.root):xo.throwArgumentError("invalid alt-root-status","value.root",e.root)}else 66!==e.root.length&&xo.throwArgumentError("invalid root hash","value.root",e.root);return null!=e.status&&(e.byzantium=!0),e}topics(t){return Array.isArray(t)?t.map((t=>this.topics(t))):null!=t?this.hash(t,!0):null}filter(t){return ko.check(this.formats.filter,t)}filterLog(t){return ko.check(this.formats.filterLog,t)}static check(t,e){const r={};for(const i in t)try{const n=t[i](e[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=e[i],n}return r}static allowNull(t,e){return function(r){return null==r?e:t(r)}}static allowFalsish(t,e){return function(r){return r?t(r):e}}static arrayOf(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");const r=[];return e.forEach((function(e){r.push(t(e))})),r}}}var So=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Ro=new qe(Ye);function Io(t){return null==t?"null":(32!==gr(t)&&Ro.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Po(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((t=>{if(Array.isArray(t)){const e={};t.forEach((t=>{e[Io(t)]=!0}));const r=Object.keys(e);return r.sort(),r.join("|")}return Io(t)})).join("&")}function Co(t){if("string"==typeof t){if(32===gr(t=t.toLowerCase()))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+Po(t);if(qi.isForkEvent(t))throw Ro.warn("not implemented"),new Error("not implemented");if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+Po(t.topics||[])}throw new Error("invalid event - "+t)}function To(){return(new Date).getTime()}function Oo(t){return new Promise((e=>{setTimeout(e,t)}))}const No=["block","network","pending","poll"];class Bo{constructor(t,e,r){De(this,"tag",t),De(this,"listener",e),De(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}get filter(){const t=this.tag.split(":");if("filter"!==t[0])return null;const e=t[1],r=""===(n=t[2])?[]:n.split(/&/g).map((t=>{if(""===t)return[];const e=t.split("|").map((t=>"null"===t?null:t));return 1===e.length?e[0]:e}));var n;const i={};return r.length>0&&(i.topics=r),e&&"*"!==e&&(i.address=e),i}pollable(){return this.tag.indexOf(":")>=0||No.indexOf(this.tag)>=0}}const Lo={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function jo(t){return wr(Sr.from(t).toHexString(),32)}function qo(t){return Di.encode(fr([t,yr(Mo(Mo(t)),0,4)]))}const Uo=new RegExp("^(ipfs)://(.*)$","i"),Fo=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Uo,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Do(t,e){try{return rn(zo(t,e))}catch(r){}return null}function zo(t,e){if("0x"===t)return null;const r=Sr.from(yr(t,e,e+32)).toNumber(),n=Sr.from(yr(t,r,r+32)).toNumber();return yr(t,r+32,r+32+n)}function Ho(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ro.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function Ko(t){const e=lr(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function Go(t){if(t.length%32==0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function Wo(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(null),r+=32;for(let n=0;n<t.length;n++){const i=lr(t[n]);e[n]=Ko(r),e.push(Ko(i.length)),e.push(Go(i)),r+=32+32*Math.ceil(i.length/32)}return vr(e)}class Vo{constructor(t,e,r,n){De(this,"provider",t),De(this,"name",r),De(this,"address",t.formatter.address(e)),De(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((t=>Sr.from(t).eq(1))).catch((t=>{if(t.code===qe.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,t}))),this._supportsEip2544}_fetch(t,e){return So(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:vr([t,po(this.name),e||"0x"])};let n=!1;var i;(yield this.supportsWildcard())&&(n=!0,r.data=vr(["0x9061b923",Wo([(i=this.name,mr(fr(ho(i).map((t=>{if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e}))))+"00"),r.data])]));try{let t=yield this.provider.call(r);return lr(t).length%32==4&&Ro.throwError("resolver threw error",qe.errors.CALL_EXCEPTION,{transaction:r,data:t}),n&&(t=zo(t,0)),t}catch(o){if(o.code===qe.errors.CALL_EXCEPTION)return null;throw o}}))}_fetchBytes(t,e){return So(this,void 0,void 0,(function*(){const r=yield this._fetch(t,e);return null!=r?zo(r,0):null}))}_getAddress(t,e){const r=Lo[String(t)];if(null==r&&Ro.throwError(`unsupported coin type: ${t}`,qe.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`}),"eth"===r.ilk)return this.provider.formatter.address(e);const n=lr(e);if(null!=r.p2pkh){const t=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return qo(fr([[r.p2pkh],"0x"+t[2]]))}}if(null!=r.p2sh){const t=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return qo(fr([[r.p2sh],"0x"+t[2]]))}}if(null!=r.prefix){const t=n[1];let e=n[0];if(0===e?20!==t&&32!==t&&(e=-1):e=-1,e>=0&&n.length===2+t&&t>=1&&t<=75){const t=Eo().toWords(n.slice(2));return t.unshift(e),Eo().encode(r.prefix,t)}}return null}getAddress(t){return So(this,void 0,void 0,(function*(){if(null==t&&(t=60),60===t)try{const t=yield this._fetch("0x3b3b57de");return"0x"===t||"0x0000000000000000000000000000000000000000000000000000000000000000"===t?null:this.provider.formatter.callAddress(t)}catch(n){if(n.code===qe.errors.CALL_EXCEPTION)return null;throw n}const e=yield this._fetchBytes("0xf1cb7e06",jo(t));if(null==e||"0x"===e)return null;const r=this._getAddress(t,e);return null==r&&Ro.throwError("invalid or unsupported coin data",qe.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`,coinType:t,data:e}),r}))}getAvatar(){return So(this,void 0,void 0,(function*(){const t=[{type:"name",content:this.name}];try{const e=yield this.getText("avatar");if(null==e)return null;for(let r=0;r<Fo.length;r++){const n=e.match(Fo[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":return t.push({type:"url",content:e}),{linkage:t,url:e};case"data":return t.push({type:"data",content:e}),{linkage:t,url:e};case"ipfs":return t.push({type:"ipfs",content:e}),{linkage:t,url:Ho(e)};case"erc721":case"erc1155":{const r="erc721"===i?"0xc87b56dd":"0x0e89341c";t.push({type:i,content:e});const o=this._resolvedAddress||(yield this.getAddress()),s=(n[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),u=wr(Sr.from(s[1]).toHexString(),32);if("erc721"===i){const e=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:vr(["0x6352211e",u])}));if(o!==e)return null;t.push({type:"owner",content:e})}else if("erc1155"===i){const e=Sr.from(yield this.provider.call({to:a,data:vr(["0x00fdd58e",wr(o,32),u])}));if(e.isZero())return null;t.push({type:"balance",content:e.toString()})}const c={to:this.provider.formatter.address(s[0]),data:vr([r,u])};let l=Do(yield this.provider.call(c),0);if(null==l)return null;t.push({type:"metadata-url-base",content:l}),"erc1155"===i&&(l=l.replace("{id}",u.substring(2)),t.push({type:"metadata-url-expanded",content:l})),l.match(/^ipfs:/i)&&(l=Ho(l)),t.push({type:"metadata-url",content:l});const f=yield Ni(l);if(!f)return null;t.push({type:"metadata",content:JSON.stringify(f)});let h=f.image;if("string"!=typeof h)return null;if(h.match(/^(https:\/\/|data:)/i));else{if(null==h.match(Uo))return null;t.push({type:"url-ipfs",content:h}),h=Ho(h)}return t.push({type:"url",content:h}),{linkage:t,url:h}}}}}catch(e){}return null}))}getContentHash(){return So(this,void 0,void 0,(function*(){const t=yield this._fetchBytes("0xbc1c58d1");if(null==t||"0x"===t)return null;const e=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const t=parseInt(e[3],16);if(e[4].length===2*t)return"ipfs://"+Di.encode("0x"+e[1])}const r=t.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const t=parseInt(r[3],16);if(r[4].length===2*t)return"ipns://"+Di.encode("0x"+r[1])}const n=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const i=t.match(/^0x90b2c605([0-9a-f]*)$/);if(i&&68===i[1].length){const t={"=":"","+":"-","/":"_"};return"sia://"+Si("0x"+i[1]).replace(/[=+\/]/g,(e=>t[e]))}return Ro.throwError("invalid or unsupported content hash data",qe.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})}))}getText(t){return So(this,void 0,void 0,(function*(){let e=en(t);e=fr([jo(64),jo(e.length),e]),e.length%32!=0&&(e=fr([e,wr("0x",32-t.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",mr(e));return null==r||"0x"===r?null:rn(r)}))}}let Zo=null,Jo=1;class Yo extends Ui{constructor(t){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),De(this,"anyNetwork","any"===t),this.anyNetwork&&(t=this.detectNetwork()),t instanceof Promise)this._networkPromise=t,t.catch((t=>{})),this._ready().catch((t=>{}));else{const e=ze(new.target,"getNetwork")(t);e?(De(this,"_network",e),this.emit("network",e,null)):Ro.throwArgumentError("invalid network","network",t)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return So(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(t){}null==e&&(e=yield this.detectNetwork()),e||Ro.throwError("no network detected",qe.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:De(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return Bi((()=>this._ready().then((t=>t),(t=>{if(t.code!==qe.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))))}static getFormatter(){return null==Zo&&(Zo=new ko),Zo}static getNetwork(t){return function(t){if(null==t)return null;if("number"==typeof t){for(const e in _o){const r=_o[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){const e=_o[t];return null==e?null:{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress,_defaultProvider:e._defaultProvider||null}}const e=_o[t.name];if(!e)return"number"!=typeof t.chainId&&mo.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&mo.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;var n;return null==r&&e._defaultProvider&&(r=(n=e._defaultProvider)&&"function"==typeof n.renetwork?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}(null==t?"homestead":t)}ccipReadFetch(t,e,r){return So(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=t.to.toLowerCase(),i=e.toLowerCase(),o=[];for(let t=0;t<r.length;t++){const e=r[t],s=e.replace("{sender}",n).replace("{data}",i),a=e.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:n}),u=yield Ni({url:s,errorPassThrough:!0},a,((t,e)=>(t.status=e.statusCode,t)));if(u.data)return u.data;const c=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ro.throwError(`response not found during CCIP fetch: ${c}`,qe.errors.SERVER_ERROR,{url:e,errorMessage:c});o.push(c)}return Ro.throwError(`error encountered during CCIP fetch: ${o.map((t=>JSON.stringify(t))).join(", ")}`,qe.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(t){return So(this,void 0,void 0,(function*(){if(yield this._ready(),t>0)for(;this._internalBlockNumber;){const e=this._internalBlockNumber;try{const r=yield e;if(To()-r.respTime<=t)return r.blockNumber;break}catch(n){if(this._internalBlockNumber===e)break}}const e=To(),r=He({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((t=>null),(t=>t))}).then((({blockNumber:t,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=To();return(t=Sr.from(t).toNumber())<this._maxInternalBlockNumber&&(t=this._maxInternalBlockNumber),this._maxInternalBlockNumber=t,this._setFastBlockNumber(t),{blockNumber:t,reqTime:e,respTime:i}}));return this._internalBlockNumber=r,r.catch((t=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return So(this,void 0,void 0,(function*(){const t=Jo++,e=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(n){return void this.emit("error",n)}if(this._setFastBlockNumber(r),this.emit("poll",t,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Ro.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",Ro.makeError("network block skew detected",qe.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let t=this._emitted.block+1;t<=r;t++)this.emit("block",t);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((t=>{if("block"===t)return;const e=this._emitted[t];"pending"!==e&&r-e>12&&delete this._emitted[t]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((t=>{switch(t.type){case"tx":{const r=t.hash;let n=this.getTransactionReceipt(r).then((t=>t&&null!=t.blockNumber?(this._emitted["t:"+r]=t.blockNumber,this.emit(r,t),null):null)).catch((t=>{this.emit("error",t)}));e.push(n);break}case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=r-1);const n=t.filter;n.fromBlock=t._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((e=>{t._inflight=!1,0!==e.length&&e.forEach((e=>{e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),this._emitted["b:"+e.blockHash]=e.blockNumber,this._emitted["t:"+e.transactionHash]=e.blockNumber,this.emit(n,e)}))})).catch((e=>{this.emit("error",e),t._inflight=!1}));e.push(o)}}})),this._lastBlockNumber=r,Promise.all(e).then((()=>{this.emit("didPoll",t)})).catch((t=>{this.emit("error",t)}))}else this.emit("didPoll",t)}))}resetEventsBlock(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return So(this,void 0,void 0,(function*(){return Ro.throwError("provider does not support network detection",qe.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return So(this,void 0,void 0,(function*(){const t=yield this._ready(),e=yield this.detectNetwork();if(t.chainId!==e.chainId){if(this.anyNetwork)return this._network=e,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",e,t),yield Oo(0),this._network;const r=Ro.makeError("underlying network changed",qe.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:e});throw this.emit("error",r),r}return t}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((t=>{this._setFastBlockNumber(t)}),(t=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(t){t&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(t){if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const t=To();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((t=>((null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=To(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}waitForTransaction(t,e,r){return So(this,void 0,void 0,(function*(){return this._waitForTransaction(t,null==e?1:e,r||0,null)}))}_waitForTransaction(t,e,r,n){return So(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(t);return(i?i.confirmations:0)>=e?i:new Promise(((i,o)=>{const s=[];let a=!1;const u=function(){return!!a||(a=!0,s.forEach((t=>{t()})),!1)},c=t=>{t.confirmations<e||u()||i(t)};if(this.on(t,c),s.push((()=>{this.removeListener(t,c)})),n){let r=n.startBlock,i=null;const c=s=>So(this,void 0,void 0,(function*(){a||(yield Oo(1e3),this.getTransactionCount(n.from).then((l=>So(this,void 0,void 0,(function*(){if(!a){if(l<=n.nonce)r=s;else{{const e=yield this.getTransaction(t);if(e&&null!=e.blockNumber)return}for(null==i&&(i=r-3,i<n.startBlock&&(i=n.startBlock));i<=s;){if(a)return;const r=yield this.getBlockWithTransactions(i);for(let i=0;i<r.transactions.length;i++){const s=r.transactions[i];if(s.hash===t)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,e);if(u())return;let i="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?i="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(i="cancelled"),void o(Ro.makeError("transaction was replaced",qe.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(s),hash:t,receipt:r}))}}i++}}a||this.once("block",c)}}))),(t=>{a||this.once("block",c)})))}));if(a)return;this.once("block",c),s.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const t=setTimeout((()=>{u()||o(Ro.makeError("timeout exceeded",qe.errors.TIMEOUT,{timeout:r}))}),r);t.unref&&t.unref(),s.push((()=>{clearTimeout(t)}))}}))}))}getBlockNumber(){return So(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield this.perform("getGasPrice",{});try{return Sr.from(t)}catch(e){return Ro.throwError("bad result from backend",qe.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e})}}))}getBalance(t,e){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield He({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getBalance",r);try{return Sr.from(n)}catch(i){return Ro.throwError("bad result from backend",qe.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:i})}}))}getTransactionCount(t,e){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield He({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getTransactionCount",r);try{return Sr.from(n).toNumber()}catch(i){return Ro.throwError("bad result from backend",qe.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:i})}}))}getCode(t,e){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield He({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getCode",r);try{return mr(n)}catch(i){return Ro.throwError("bad result from backend",qe.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:i})}}))}getStorageAt(t,e,r){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield He({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then((t=>br(t)))}),i=yield this.perform("getStorageAt",n);try{return mr(i)}catch(o){return Ro.throwError("bad result from backend",qe.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:o})}}))}_wrapTransaction(t,e,r){if(null!=e&&32!==gr(e))throw new Error("invalid response - sendTransaction");const n=t;return null!=e&&t.hash!==e&&Ro.throwError("Transaction hash mismatch from Provider.sendTransaction.",qe.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),n.wait=(e,n)=>So(this,void 0,void 0,(function*(){let i;null==e&&(e=1),null==n&&(n=0),0!==e&&null!=r&&(i={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r});const o=yield this._waitForTransaction(t.hash,e,n,i);return null==o&&0===e?null:(this._emitted["t:"+t.hash]=o.blockNumber,0===o.status&&Ro.throwError("transaction failed",qe.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:o}),o)})),n}sendTransaction(t){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield Promise.resolve(t).then((t=>mr(t))),r=this.formatter.transaction(t);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const t=yield this.perform("sendTransaction",{signedTransaction:e});return this._wrapTransaction(r,t,n)}catch(i){throw i.transaction=r,i.transactionHash=r.hash,i}}))}_getTransactionRequest(t){return So(this,void 0,void 0,(function*(){const e=yield t,r={};return["from","to"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?this._getAddress(t):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?Sr.from(t):null)))})),["type"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>null!=t?t:null)))})),e.accessList&&(r.accessList=this.formatter.accessList(e.accessList)),["data"].forEach((t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then((t=>t?mr(t):null)))})),this.formatter.transactionRequest(yield He(r))}))}_getFilter(t){return So(this,void 0,void 0,(function*(){t=yield t;const e={};return null!=t.address&&(e.address=this._getAddress(t.address)),["blockHash","topics"].forEach((r=>{null!=t[r]&&(e[r]=t[r])})),["fromBlock","toBlock"].forEach((r=>{null!=t[r]&&(e[r]=this._getBlockTag(t[r]))})),this.formatter.filter(yield He(e))}))}_call(t,e,r){return So(this,void 0,void 0,(function*(){r>=10&&Ro.throwError("CCIP read exceeded maximum redirections",qe.errors.SERVER_ERROR,{redirects:r,transaction:t});const n=t.to,i=yield this.perform("call",{transaction:t,blockTag:e});if(r>=0&&"latest"===e&&null!=n&&"0x556f1830"===i.substring(0,10)&&gr(i)%32==4)try{const o=yr(i,4),s=yr(o,0,32);Sr.from(s).eq(n)||Ro.throwError("CCIP Read sender did not match",qe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i});const a=[],u=Sr.from(yr(o,32,64)).toNumber(),c=Sr.from(yr(o,u,u+32)).toNumber(),l=yr(o,u+32);for(let e=0;e<c;e++){const r=Do(l,32*e);null==r&&Ro.throwError("CCIP Read contained corrupt URL string",qe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),a.push(r)}const f=zo(o,64);Sr.from(yr(o,100,128)).isZero()||Ro.throwError("CCIP Read callback selector included junk",qe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i});const h=yr(o,96,100),d=zo(o,128),p=yield this.ccipReadFetch(t,f,a);null==p&&Ro.throwError("CCIP Read disabled or provided no URLs",qe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i});const m={to:n,data:vr([h,Wo([p,d])])};return this._call(m,e,r+1)}catch(o){if(o.code===qe.errors.SERVER_ERROR)throw o}try{return mr(i)}catch(o){return Ro.throwError("bad result from backend",qe.errors.SERVER_ERROR,{method:"call",params:{transaction:t,blockTag:e},result:i,error:o})}}))}call(t,e){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield He({transaction:this._getTransactionRequest(t),blockTag:this._getBlockTag(e),ccipReadEnabled:Promise.resolve(t.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(t){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield He({transaction:this._getTransactionRequest(t)}),r=yield this.perform("estimateGas",e);try{return Sr.from(r)}catch(n){return Ro.throwError("bad result from backend",qe.errors.SERVER_ERROR,{method:"estimateGas",params:e,result:r,error:n})}}))}_getAddress(t){return So(this,void 0,void 0,(function*(){"string"!=typeof(t=yield t)&&Ro.throwArgumentError("invalid address or ENS name","name",t);const e=yield this.resolveName(t);return null==e&&Ro.throwError("ENS name not configured",qe.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(t)})`}),e}))}_getBlock(t,e){return So(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;let r=-128;const n={includeTransactions:!!e};if(dr(t,32))n.blockHash=t;else try{n.blockTag=yield this._getBlockTag(t),dr(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(i){Ro.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",t)}return Bi((()=>So(this,void 0,void 0,(function*(){const t=yield this.perform("getBlock",n);if(null==t)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(e){let e=null;for(let n=0;n<t.transactions.length;n++){const r=t.transactions[n];if(null==r.blockNumber)r.confirmations=0;else if(null==r.confirmations){null==e&&(e=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let t=e-r.blockNumber+1;t<=0&&(t=1),r.confirmations=t}}const r=this.formatter.blockWithTransactions(t);return r.transactions=r.transactions.map((t=>this._wrapTransaction(t))),r}return this.formatter.block(t)}))),{oncePoll:this})}))}getBlock(t){return this._getBlock(t,!1)}getBlockWithTransactions(t){return this._getBlock(t,!0)}getTransaction(t){return So(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return Bi((()=>So(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(t){return So(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return Bi((()=>So(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return n}))),{oncePoll:this})}))}getLogs(t){return So(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield He({filter:this._getFilter(t)}),r=yield this.perform("getLogs",e);return r.forEach((t=>{null==t.removed&&(t.removed=!1)})),ko.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return So(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(t){return So(this,void 0,void 0,(function*(){if("number"==typeof(t=yield t)&&t<0){t%1&&Ro.throwArgumentError("invalid BlockTag","blockTag",t);let e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return e+=t,e<0&&(e=0),this.formatter.blockTag(e)}return this.formatter.blockTag(t)}))}getResolver(t){return So(this,void 0,void 0,(function*(){let e=t;for(;;){if(""===e||"."===e)return null;if("eth"!==t&&"eth"===e)return null;const r=yield this._getResolver(e,"getResolver");if(null!=r){const n=new Vo(this,r,t);return e===t||(yield n.supportsWildcard())?n:null}e=e.split(".").slice(1).join(".")}}))}_getResolver(t,e){return So(this,void 0,void 0,(function*(){null==e&&(e="ENS");const r=yield this.getNetwork();r.ensAddress||Ro.throwError("network does not support ENS",qe.errors.UNSUPPORTED_OPERATION,{operation:e,network:r.name});try{const e=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+po(t).substring(2)});return this.formatter.callAddress(e)}catch(n){}return null}))}resolveName(t){return So(this,void 0,void 0,(function*(){t=yield t;try{return Promise.resolve(this.formatter.address(t))}catch(r){if(dr(t))throw r}"string"!=typeof t&&Ro.throwArgumentError("invalid ENS name","name",t);const e=yield this.getResolver(t);return e?yield e.getAddress():null}))}lookupAddress(t){return So(this,void 0,void 0,(function*(){t=yield t;const e=(t=this.formatter.address(t)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(e,"lookupAddress");if(null==r)return null;const n=Do(yield this.call({to:r,data:"0x691f3431"+po(e).substring(2)}),0);return(yield this.resolveName(n))!=t?null:n}))}getAvatar(t){return So(this,void 0,void 0,(function*(){let e=null;if(dr(t)){const r=this.formatter.address(t).substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(r,"getAvatar");if(!i)return null;e=new Vo(this,i,r);try{const t=yield e.getAvatar();if(t)return t.url}catch(n){if(n.code!==qe.errors.CALL_EXCEPTION)throw n}try{const t=Do(yield this.call({to:i,data:"0x691f3431"+po(r).substring(2)}),0);e=yield this.getResolver(t)}catch(n){if(n.code!==qe.errors.CALL_EXCEPTION)throw n;return null}}else if(e=yield this.getResolver(t),!e)return null;const r=yield e.getAvatar();return null==r?null:r.url}))}perform(t,e){return Ro.throwError(t+" not implemented",qe.errors.NOT_IMPLEMENTED,{operation:t})}_startEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_stopEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_addEventListener(t,e,r){const n=new Bo(Co(t),e,r);return this._events.push(n),this._startEvent(n),this}on(t,e){return this._addEventListener(t,e,!1)}once(t,e){return this._addEventListener(t,e,!0)}emit(t,...e){let r=!1,n=[],i=Co(t);return this._events=this._events.filter((t=>t.tag!==i||(setTimeout((()=>{t.listener.apply(this,e)}),0),r=!0,!t.once||(n.push(t),!1)))),n.forEach((t=>{this._stopEvent(t)})),r}listenerCount(t){if(!t)return this._events.length;let e=Co(t);return this._events.filter((t=>t.tag===e)).length}listeners(t){if(null==t)return this._events.map((t=>t.listener));let e=Co(t);return this._events.filter((t=>t.tag===e)).map((t=>t.listener))}off(t,e){if(null==e)return this.removeAllListeners(t);const r=[];let n=!1,i=Co(t);return this._events=this._events.filter((t=>t.tag!==i||t.listener!=e||(!!n||(n=!0,r.push(t),!1)))),r.forEach((t=>{this._stopEvent(t)})),this}removeAllListeners(t){let e=[];if(null==t)e=this._events,this._events=[];else{const r=Co(t);this._events=this._events.filter((t=>t.tag!==r||(e.push(t),!1)))}return e.forEach((t=>{this._stopEvent(t)})),this}}var Qo=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const Xo=new qe(Ye),$o=["call","estimateGas"];function ts(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){const r=dr(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"==typeof t){for(const r in t){const n=ts(t[r],e);if(n)return n}return null}if("string"==typeof t)try{return ts(JSON.parse(t),e)}catch(r){}return null}function es(t,e,r){const n=r.transaction||r.signedTransaction;if("call"===t){const t=ts(e,!0);if(t)return t.data;Xo.throwError("missing revert data in call exception; Transaction reverted without a reason string",qe.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if("estimateGas"===t){let r=ts(e.body,!1);null==r&&(r=ts(e,!1)),r&&Xo.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",qe.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===qe.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?i=e.error.message:"string"==typeof e.body?i=e.body:"string"==typeof e.responseText&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Xo.throwError("insufficient funds for intrinsic transaction cost",qe.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Xo.throwError("nonce has already been used",qe.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Xo.throwError("replacement fee too low",qe.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Xo.throwError("legacy pre-eip-155 transactions not supported",qe.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),$o.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Xo.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",qe.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function rs(t){return new Promise((function(e){setTimeout(e,t)}))}function ns(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function is(t){return t?t.toLowerCase():t}const os={};class ss extends er{constructor(t,e,r){if(super(),t!==os)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");De(this,"provider",e),null==r&&(r=0),"string"==typeof r?(De(this,"_address",this.provider.formatter.address(r)),De(this,"_index",null)):"number"==typeof r?(De(this,"_index",r),De(this,"_address",null)):Xo.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(t){return Xo.throwError("cannot alter JSON-RPC Signer connection",qe.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new as(os,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((t=>(t.length<=this._index&&Xo.throwError("unknown account #"+this._index,qe.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(t[this._index]))))}sendUncheckedTransaction(t){t=Ke(t);const e=this.getAddress().then((t=>(t&&(t=t.toLowerCase()),t)));if(null==t.gasLimit){const r=Ke(t);r.from=e,t.gasLimit=this.provider.estimateGas(r)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((t=>Qo(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.provider.resolveName(t);return null==e&&Xo.throwArgumentError("provided ENS name resolves to null","tx.to",t),e}))))),He({tx:He(t),sender:e}).then((({tx:e,sender:r})=>{null!=e.from?e.from.toLowerCase()!==r&&Xo.throwArgumentError("from address mismatch","transaction",t):e.from=r;const n=this.provider.constructor.hexlifyTransaction(e,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((t=>t),(t=>("string"==typeof t.message&&t.message.match(/user denied/i)&&Xo.throwError("user rejected transaction",qe.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:e}),es("sendTransaction",t,n))))}))}signTransaction(t){return Xo.throwError("signing transactions is unsupported",qe.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(t){return Qo(this,void 0,void 0,(function*(){const e=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(t);try{return yield Bi((()=>Qo(this,void 0,void 0,(function*(){const t=yield this.provider.getTransaction(r);if(null!==t)return this.provider._wrapTransaction(t,r,e)}))),{oncePoll:this.provider})}catch(n){throw n.transactionHash=r,n}}))}signMessage(t){return Qo(this,void 0,void 0,(function*(){const e="string"==typeof t?en(t):t,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[mr(e),r.toLowerCase()])}catch(n){throw"string"==typeof n.message&&n.message.match(/user denied/i)&&Xo.throwError("user rejected signing",qe.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:t}),n}}))}_legacySignMessage(t){return Qo(this,void 0,void 0,(function*(){const e="string"==typeof t?en(t):t,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),mr(e)])}catch(n){throw"string"==typeof n.message&&n.message.match(/user denied/i)&&Xo.throwError("user rejected signing",qe.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:t}),n}}))}_signTypedData(t,e,r){return Qo(this,void 0,void 0,(function*(){const n=yield wn.resolveNames(t,e,r,(t=>this.provider.resolveName(t))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(wn.getPayload(n.domain,e,n.value))])}catch(o){throw"string"==typeof o.message&&o.message.match(/user denied/i)&&Xo.throwError("user rejected signing",qe.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:e,value:n.value}}),o}}))}unlock(t){return Qo(this,void 0,void 0,(function*(){const e=this.provider,r=yield this.getAddress();return e.send("personal_unlockAccount",[r.toLowerCase(),t,null])}))}}class as extends ss{sendTransaction(t){return this.sendUncheckedTransaction(t).then((t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:e=>this.provider.waitForTransaction(t,e)})))}}const us={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class cs extends Yo{constructor(t,e){let r=e;null==r&&(r=new Promise(((t,e)=>{setTimeout((()=>{this.detectNetwork().then((e=>{t(e)}),(t=>{e(t)}))}),0)}))),super(r),t||(t=ze(this.constructor,"defaultUrl")()),De(this,"connection","string"==typeof t?Object.freeze({url:t}):Object.freeze(Ke(t))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Qo(this,void 0,void 0,(function*(){yield rs(0);let t=null;try{t=yield this.send("eth_chainId",[])}catch(e){try{t=yield this.send("net_version",[])}catch(e){}}if(null!=t){const r=ze(this.constructor,"getNetwork");try{return r(Sr.from(t).toNumber())}catch(e){return Xo.throwError("could not detect network",qe.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e})}}return Xo.throwError("could not detect network",qe.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(t){return new ss(os,this,t)}getUncheckedSigner(t){return this.getSigner(t).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((t=>t.map((t=>this.formatter.address(t)))))}send(t,e){const r={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Ze(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(n&&this._cache[t])return this._cache[t];const i=Ni(this.connection,JSON.stringify(r),ns).then((t=>(this.emit("debug",{action:"response",request:r,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",error:t,request:r,provider:this}),t}));return n&&(this._cache[t]=i,setTimeout((()=>{this._cache[t]=null}),0)),i}prepareRequest(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[is(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[is(e.address),e.blockTag]];case"getCode":return["eth_getCode",[is(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[is(e.address),wr(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[ze(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[ze(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=is(e.filter.address)),["eth_getLogs",[e.filter]]}return null}perform(t,e){return Qo(this,void 0,void 0,(function*(){if("call"===t||"estimateGas"===t){const t=e.transaction;if(t&&null!=t.type&&Sr.from(t.type).isZero()&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((e=Ke(e)).transaction=Ke(t),delete e.transaction.type)}}const r=this.prepareRequest(t,e);null==r&&Xo.throwError(t+" not implemented",qe.errors.NOT_IMPLEMENTED,{operation:t});try{return yield this.send(r[0],r[1])}catch(n){return es(t,n,e)}}))}_startEvent(t){"pending"===t.tag&&this._startPending(),super._startEvent(t)}_startPending(){if(null!=this._pendingFilter)return;const t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;let n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return rs(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){n()}),0),null;t.send("eth_uninstallFilter",[r])})).catch((t=>{}))}(),r})).catch((t=>{}))}_stopEvent(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(t)}static hexlifyTransaction(t,e){const r=Ke(us);if(e)for(const s in e)e[s]&&(r[s]=!0);var n,i;i=r,(n=t)&&"object"==typeof n||Fe.throwArgumentError("invalid object","object",n),Object.keys(n).forEach((t=>{i[t]||Fe.throwArgumentError("invalid object key - "+t,"transaction:"+t,n)}));const o={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null==t[e])return;const r=br(Sr.from(t[e]));"gasLimit"===e&&(e="gas"),o[e]=r})),["from","to","data"].forEach((function(e){null!=t[e]&&(o[e]=mr(t[e]))})),t.accessList&&(o.accessList=wi(t.accessList)),o}}const ls=new qe(Ye);let fs=1;function hs(t,e){const r="Web3LegacyFetcher";return function(t,n){const i={method:t,params:n,id:fs++,jsonrpc:"2.0"};return new Promise(((t,n)=>{this.emit("debug",{action:"request",fetcher:r,request:Ze(i),provider:this}),e(i,((e,o)=>{if(e)return this.emit("debug",{action:"response",fetcher:r,error:e,request:i,provider:this}),n(e);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const t=new Error(o.error.message);return t.code=o.error.code,t.data=o.error.data,n(t)}t(o.result)}))}))}}class ds extends cs{constructor(t,e){null==t&&ls.throwArgumentError("missing provider","provider",t);let r=null,n=null,i=null;"function"==typeof t?(r="unknown:",n=t):(r=t.host||t.path||"",!r&&t.isMetaMask&&(r="metamask"),i=t,t.request?(""===r&&(r="eip-1193:"),n=function(t){return function(e,r){null==r&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ze(n),provider:this}),t.request(n).then((t=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:t,provider:this}),t}))}}(t)):t.sendAsync?n=hs(0,t.sendAsync.bind(t)):t.send?n=hs(0,t.send.bind(t)):ls.throwArgumentError("unsupported provider","provider",t),r||(r="unknown:")),super(r,e),De(this,"jsonRpcFetchFunc",n),De(this,"provider",i)}send(t,e){return this.jsonRpcFetchFunc(t,e)}}var ps=r(917);const ms="undefined"!=typeof window?r(2484):null,gs=(0,s.createContext)({}),ys=t=>{let{children:e}=t;const{0:r,1:n}=(0,s.useState)(void 0),{0:i,1:o}=(0,s.useState)(void 0),a={walletconnect:{package:Re,options:{infuraId:"854b581018fe44a59897b53ee6a19551"}}},u=ms&&new ms.default({cacheProvider:!0,providerOptions:a}),c=void 0!==r,l=c&&new ds(r,"any"),f=l&&l.getSigner(),h=()=>{f.getAddress().then((t=>o(t)))};return(0,s.useEffect)((()=>{r&&(h(),r.on("accountsChanged",h),r.on("chainChanged",h))}),[r]),(0,ps.tZ)(gs.Provider,{value:{web3:r,setWeb3:n,handleConnect:()=>{u.connect().then(n)},isConnected:c,handleAddChain:t=>{var e;l.send("wallet_addEthereumChain",[{chainId:"0x"+t.chainId.toString(16),chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:t.rpc,blockExplorerUrls:null===(e=t.explorers)||void 0===e?void 0:e.map((t=>t.url))}])},address:i}},e)};var vs=r(8032);const bs=t=>{let{name:e,chainId:r,nativeCurrency:n,icon:i,...o}=t;const{isConnected:a,handleConnect:u,handleAddChain:c}=(0,s.useContext)(gs);return(0,ps.tZ)(y,{flexDirection:"column",px:"5",py:"4",borderWidth:"1px",rounded:"md",boxShadow:"base"},(0,ps.tZ)(y,{justifyContent:"space-between"},(0,ps.tZ)(y,{flexDirection:"column",minW:"200px"},(0,ps.tZ)(y,{mb:"2"},(0,ps.tZ)(v.x,{fontSize:"lg",fontWeight:"semibold",lineHeight:"short",isTruncated:!0,verticalAlign:"middle"},e)),(0,ps.tZ)(b,{mb:"2"},(0,ps.tZ)(x,null,(0,ps.tZ)(k,null,"Chain ID"),(0,ps.tZ)(S,{fontSize:"md"},r)),(0,ps.tZ)(x,null,(0,ps.tZ)(k,null,"Currency"),(0,ps.tZ)(S,{fontSize:"md"},n.symbol)))),i&&(0,ps.tZ)(y,null,(0,ps.tZ)(vs.G,{objectFit:"scale-down",image:i,alt:e}))),(0,ps.tZ)(R.M,{mt:"auto"},a?(0,ps.tZ)(L,{onClick:()=>{c({name:e,chainId:r,nativeCurrency:n,...o})}},"Add Chain"):(0,ps.tZ)(L,{onClick:u},"Connect Wallet")))},ws=(0,s.createContext)({}),_s=t=>{let{children:e}=t;const{0:r,1:n}=(0,s.useState)(""),{0:i,1:o}=(0,s.useState)(!1),{0:a,1:u}=(0,s.useState)(!1);return(0,ps.tZ)(ws.Provider,{value:{query:r,setQuery:n,showTestnets:i,setShowTestnets:o,showDeprecated:a,setShowDeprecated:u}},e)},Ms=t=>{let{chains:e}=t;const{query:r,showTestnets:n,showDeprecated:i}=(0,s.useContext)(ws),o=r.toLowerCase(),u=e.filter((t=>{const e=t.name.toLowerCase(),s=!n&&(t.faucets.length>0||e.includes("testnet")),a=!i&&"deprecated"===t.status;return!s&&!a&&(!(r.length>0)||(t.name.toLowerCase().includes(o)||t.chainId.toString().includes(r)||t.nativeCurrency.symbol.toLowerCase().includes(o)))}));return(0,ps.tZ)(g,{minChildWidth:"300px",spacing:4},u.map((t=>(0,ps.tZ)(bs,(0,a.Z)({key:t.id},t)))))};var As=r(4418),Es={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function xs(t){return null!=t&&"object"==typeof t&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE}function ks(t){var e;if(!xs(t))return!1;return t instanceof(null!=(e=t.ownerDocument.defaultView)?e:window).HTMLElement}function Ss(t){return xs(t)?t.ownerDocument:document}function Rs(t){return["html","body","#document"].includes(t.localName)?t.ownerDocument.body:ks(t)&&function(t){const e=t.ownerDocument.defaultView||window,{overflow:r,overflowX:n,overflowY:i}=e.getComputedStyle(t);return/auto|scroll|overlay|hidden/.test(r+i+n)}(t)?t:Rs(function(t){return"html"===t.localName?t:t.assignedSlot||t.parentElement||t.ownerDocument.documentElement}(t))}var Is=(t,e)=>({var:t,varRef:e?`var(${t}, ${e})`:`var(${t})`}),Ps={arrowShadowColor:Is("--popper-arrow-shadow-color"),arrowSize:Is("--popper-arrow-size","8px"),arrowSizeHalf:Is("--popper-arrow-size-half"),arrowBg:Is("--popper-arrow-bg"),transformOrigin:Is("--popper-transform-origin"),arrowOffset:Is("--popper-arrow-offset")};var Cs={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Ts={scroll:!0,resize:!0};function Os(t){let e;return e="object"==typeof t?{enabled:!0,options:{...Ts,...t}}:{enabled:t,options:Ts},e}var Ns={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:t})=>{t.styles.popper.width=`${t.rects.reference.width}px`},effect:({state:t})=>()=>{const e=t.elements.reference;t.elements.popper.style.width=`${e.offsetWidth}px`}},Bs={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:t})=>{Ls(t)},effect:({state:t})=>()=>{Ls(t)}},Ls=t=>{var e;t.elements.popper.style.setProperty(Ps.transformOrigin.var,(e=t.placement,Cs[e]))},js={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:t})=>{qs(t)}},qs=t=>{var e;if(!t.placement)return;const r=Us(t.placement);if((null==(e=t.elements)?void 0:e.arrow)&&r){Object.assign(t.elements.arrow.style,{[r.property]:r.value,width:Ps.arrowSize.varRef,height:Ps.arrowSize.varRef,zIndex:-1});const e={[Ps.arrowSizeHalf.var]:`calc(${Ps.arrowSize.varRef} / 2 - 1px)`,[Ps.arrowOffset.var]:`calc(${Ps.arrowSizeHalf.varRef} * -1)`};for(const r in e)t.elements.arrow.style.setProperty(r,e[r])}},Us=t=>t.startsWith("top")?{property:"bottom",value:Ps.arrowOffset.varRef}:t.startsWith("bottom")?{property:"top",value:Ps.arrowOffset.varRef}:t.startsWith("left")?{property:"right",value:Ps.arrowOffset.varRef}:t.startsWith("right")?{property:"left",value:Ps.arrowOffset.varRef}:void 0,Fs={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:t})=>{Ds(t)},effect:({state:t})=>()=>{Ds(t)}},Ds=t=>{if(!t.elements.arrow)return;const e=t.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!e)return;const r=(n=t.placement).includes("top")?"1px 1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("bottom")?"-1px -1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("right")?"-1px 1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("left")?"1px -1px 0px 0 var(--popper-arrow-shadow-color)":void 0;var n;r&&e.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(e.style,{transform:"rotate(45deg)",background:Ps.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},zs={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Hs={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Ks(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Gs(t){return t instanceof Ks(t).Element||t instanceof Element}function Ws(t){return t instanceof Ks(t).HTMLElement||t instanceof HTMLElement}function Vs(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ks(t).ShadowRoot||t instanceof ShadowRoot)}var Zs=Math.max,Js=Math.min,Ys=Math.round;function Qs(t,e){void 0===e&&(e=!1);var r=t.getBoundingClientRect(),n=1,i=1;if(Ws(t)&&e){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(n=Ys(r.width)/s||1),o>0&&(i=Ys(r.height)/o||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function Xs(t){var e=Ks(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $s(t){return t?(t.nodeName||"").toLowerCase():null}function ta(t){return((Gs(t)?t.ownerDocument:t.document)||window.document).documentElement}function ea(t){return Qs(ta(t)).left+Xs(t).scrollLeft}function ra(t){return Ks(t).getComputedStyle(t)}function na(t){var e=ra(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ia(t,e,r){void 0===r&&(r=!1);var n,i,o=Ws(e),s=Ws(e)&&function(t){var e=t.getBoundingClientRect(),r=Ys(e.width)/t.offsetWidth||1,n=Ys(e.height)/t.offsetHeight||1;return 1!==r||1!==n}(e),a=ta(e),u=Qs(t,s),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!r)&&(("body"!==$s(e)||na(a))&&(c=(n=e)!==Ks(n)&&Ws(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:Xs(n)),Ws(e)?((l=Qs(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=ea(a))),{x:u.left+c.scrollLeft-l.x,y:u.top+c.scrollTop-l.y,width:u.width,height:u.height}}function oa(t){var e=Qs(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function sa(t){return"html"===$s(t)?t:t.assignedSlot||t.parentNode||(Vs(t)?t.host:null)||ta(t)}function aa(t){return["html","body","#document"].indexOf($s(t))>=0?t.ownerDocument.body:Ws(t)&&na(t)?t:aa(sa(t))}function ua(t,e){var r;void 0===e&&(e=[]);var n=aa(t),i=n===(null==(r=t.ownerDocument)?void 0:r.body),o=Ks(n),s=i?[o].concat(o.visualViewport||[],na(n)?n:[]):n,a=e.concat(s);return i?a:a.concat(ua(sa(s)))}function ca(t){return["table","td","th"].indexOf($s(t))>=0}function la(t){return Ws(t)&&"fixed"!==ra(t).position?t.offsetParent:null}function fa(t){for(var e=Ks(t),r=la(t);r&&ca(r)&&"static"===ra(r).position;)r=la(r);return r&&("html"===$s(r)||"body"===$s(r)&&"static"===ra(r).position)?e:r||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Ws(t)&&"fixed"===ra(t).position)return null;for(var r=sa(t);Ws(r)&&["html","body"].indexOf($s(r))<0;){var n=ra(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(t)||e}var ha="top",da="bottom",pa="right",ma="left",ga="auto",ya=[ha,da,pa,ma],va="start",ba="end",wa="clippingParents",_a="viewport",Ma="popper",Aa="reference",Ea=ya.reduce((function(t,e){return t.concat([e+"-"+va,e+"-"+ba])}),[]),xa=[].concat(ya,[ga]).reduce((function(t,e){return t.concat([e,e+"-"+va,e+"-"+ba])}),[]),ka=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Sa(t){var e=new Map,r=new Set,n=[];function i(t){r.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!r.has(t)){var n=e.get(t);n&&i(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){r.has(t.name)||i(t)})),n}var Ra={placement:"bottom",modifiers:[],strategy:"absolute"};function Ia(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Pa(t){void 0===t&&(t={});var e=t,r=e.defaultModifiers,n=void 0===r?[]:r,i=e.defaultOptions,o=void 0===i?Ra:i;return function(t,e,r){void 0===r&&(r=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ra,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(r){var i="function"==typeof r?r(a.options):r;f(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:Gs(t)?ua(t):t.contextElement?ua(t.contextElement):[],popper:ua(e)};var s=function(t){var e=Sa(t);return ka.reduce((function(t,r){return t.concat(e.filter((function(t){return t.phase===r})))}),[])}(function(t){var e=t.reduce((function(t,e){var r=t[e.name];return t[e.name]=r?Object.assign({},r,e,{options:Object.assign({},r.options,e.options),data:Object.assign({},r.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,a.options.modifiers)));return a.orderedModifiers=s.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,r=t.options,n=void 0===r?{}:r,i=t.effect;if("function"==typeof i){var o=i({state:a,name:e,instance:l,options:n}),s=function(){};u.push(o||s)}})),l.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,r=t.popper;if(Ia(e,r)){a.rects={reference:ia(e,fa(r),"fixed"===a.options.strategy),popper:oa(r)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var i=a.orderedModifiers[n],o=i.fn,s=i.options,u=void 0===s?{}:s,f=i.name;"function"==typeof o&&(a=o({state:a,options:u,name:f,instance:l})||a)}else a.reset=!1,n=-1}}},update:(i=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(i())}))}))),s}),destroy:function(){f(),c=!0}};if(!Ia(t,e))return l;function f(){u.forEach((function(t){return t()})),u=[]}return l.setOptions(r).then((function(t){!c&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l}}var Ca={passive:!0};function Ta(t){return t.split("-")[0]}function Oa(t){return t.split("-")[1]}function Na(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ba(t){var e,r=t.reference,n=t.element,i=t.placement,o=i?Ta(i):null,s=i?Oa(i):null,a=r.x+r.width/2-n.width/2,u=r.y+r.height/2-n.height/2;switch(o){case ha:e={x:a,y:r.y-n.height};break;case da:e={x:a,y:r.y+r.height};break;case pa:e={x:r.x+r.width,y:u};break;case ma:e={x:r.x-n.width,y:u};break;default:e={x:r.x,y:r.y}}var c=o?Na(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case va:e[c]=e[c]-(r[l]/2-n[l]/2);break;case ba:e[c]=e[c]+(r[l]/2-n[l]/2)}}return e}var La={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ja(t){var e,r=t.popper,n=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,l=t.roundOffsets,f=t.isFixed,h=s.x,d=void 0===h?0:h,p=s.y,m=void 0===p?0:p,g="function"==typeof l?l({x:d,y:m}):{x:d,y:m};d=g.x,m=g.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),b=ma,w=ha,_=window;if(c){var M=fa(r),A="clientHeight",E="clientWidth";if(M===Ks(r)&&"static"!==ra(M=ta(r)).position&&"absolute"===a&&(A="scrollHeight",E="scrollWidth"),i===ha||(i===ma||i===pa)&&o===ba)w=da,m-=(f&&_.visualViewport?_.visualViewport.height:M[A])-n.height,m*=u?1:-1;if(i===ma||(i===ha||i===da)&&o===ba)b=pa,d-=(f&&_.visualViewport?_.visualViewport.width:M[E])-n.width,d*=u?1:-1}var x,k=Object.assign({position:a},c&&La),S=!0===l?function(t){var e=t.x,r=t.y,n=window.devicePixelRatio||1;return{x:Ys(e*n)/n||0,y:Ys(r*n)/n||0}}({x:d,y:m}):{x:d,y:m};return d=S.x,m=S.y,u?Object.assign({},k,((x={})[w]=v?"0":"",x[b]=y?"0":"",x.transform=(_.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",x)):Object.assign({},k,((e={})[w]=v?m+"px":"",e[b]=y?d+"px":"",e.transform="",e))}var qa={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,r=t.options,n=t.name,i=r.offset,o=void 0===i?[0,0]:i,s=xa.reduce((function(t,r){return t[r]=function(t,e,r){var n=Ta(t),i=[ma,ha].indexOf(n)>=0?-1:1,o="function"==typeof r?r(Object.assign({},e,{placement:t})):r,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[ma,pa].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(r,e.rects,o),t}),{}),a=s[e.placement],u=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},Ua={left:"right",right:"left",bottom:"top",top:"bottom"};function Fa(t){return t.replace(/left|right|bottom|top/g,(function(t){return Ua[t]}))}var Da={start:"end",end:"start"};function za(t){return t.replace(/start|end/g,(function(t){return Da[t]}))}function Ha(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&Vs(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ka(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ga(t,e){return e===_a?Ka(function(t){var e=Ks(t),r=ta(t),n=e.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,a=0;return n&&(i=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,a=n.offsetTop)),{width:i,height:o,x:s+ea(t),y:a}}(t)):Gs(e)?function(t){var e=Qs(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Ka(function(t){var e,r=ta(t),n=Xs(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=Zs(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Zs(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-n.scrollLeft+ea(t),u=-n.scrollTop;return"rtl"===ra(i||r).direction&&(a+=Zs(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(ta(t)))}function Wa(t,e,r){var n="clippingParents"===e?function(t){var e=ua(sa(t)),r=["absolute","fixed"].indexOf(ra(t).position)>=0&&Ws(t)?fa(t):t;return Gs(r)?e.filter((function(t){return Gs(t)&&Ha(t,r)&&"body"!==$s(t)})):[]}(t):[].concat(e),i=[].concat(n,[r]),o=i[0],s=i.reduce((function(e,r){var n=Ga(t,r);return e.top=Zs(n.top,e.top),e.right=Js(n.right,e.right),e.bottom=Js(n.bottom,e.bottom),e.left=Zs(n.left,e.left),e}),Ga(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Va(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Za(t,e){return e.reduce((function(e,r){return e[r]=t,e}),{})}function Ja(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=void 0===n?t.placement:n,o=r.boundary,s=void 0===o?wa:o,a=r.rootBoundary,u=void 0===a?_a:a,c=r.elementContext,l=void 0===c?Ma:c,f=r.altBoundary,h=void 0!==f&&f,d=r.padding,p=void 0===d?0:d,m=Va("number"!=typeof p?p:Za(p,ya)),g=l===Ma?Aa:Ma,y=t.rects.popper,v=t.elements[h?g:l],b=Wa(Gs(v)?v:v.contextElement||ta(t.elements.popper),s,u),w=Qs(t.elements.reference),_=Ba({reference:w,element:y,strategy:"absolute",placement:i}),M=Ka(Object.assign({},y,_)),A=l===Ma?M:w,E={top:b.top-A.top+m.top,bottom:A.bottom-b.bottom+m.bottom,left:b.left-A.left+m.left,right:A.right-b.right+m.right},x=t.modifiersData.offset;if(l===Ma&&x){var k=x[i];Object.keys(E).forEach((function(t){var e=[pa,da].indexOf(t)>=0?1:-1,r=[ha,da].indexOf(t)>=0?"y":"x";E[t]+=k[r]*e}))}return E}var Ya={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,o=void 0===i||i,s=r.altAxis,a=void 0===s||s,u=r.fallbackPlacements,c=r.padding,l=r.boundary,f=r.rootBoundary,h=r.altBoundary,d=r.flipVariations,p=void 0===d||d,m=r.allowedAutoPlacements,g=e.options.placement,y=Ta(g),v=u||(y===g||!p?[Fa(g)]:function(t){if(Ta(t)===ga)return[];var e=Fa(t);return[za(t),e,za(e)]}(g)),b=[g].concat(v).reduce((function(t,r){return t.concat(Ta(r)===ga?function(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,a=r.flipVariations,u=r.allowedAutoPlacements,c=void 0===u?xa:u,l=Oa(n),f=l?a?Ea:Ea.filter((function(t){return Oa(t)===l})):ya,h=f.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=f);var d=h.reduce((function(e,r){return e[r]=Ja(t,{placement:r,boundary:i,rootBoundary:o,padding:s})[Ta(r)],e}),{});return Object.keys(d).sort((function(t,e){return d[t]-d[e]}))}(e,{placement:r,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:m}):r)}),[]),w=e.rects.reference,_=e.rects.popper,M=new Map,A=!0,E=b[0],x=0;x<b.length;x++){var k=b[x],S=Ta(k),R=Oa(k)===va,I=[ha,da].indexOf(S)>=0,P=I?"width":"height",C=Ja(e,{placement:k,boundary:l,rootBoundary:f,altBoundary:h,padding:c}),T=I?R?pa:ma:R?da:ha;w[P]>_[P]&&(T=Fa(T));var O=Fa(T),N=[];if(o&&N.push(C[S]<=0),a&&N.push(C[T]<=0,C[O]<=0),N.every((function(t){return t}))){E=k,A=!1;break}M.set(k,N)}if(A)for(var B=function(t){var e=b.find((function(e){var r=M.get(e);if(r)return r.slice(0,t).every((function(t){return t}))}));if(e)return E=e,"break"},L=p?3:1;L>0;L--){if("break"===B(L))break}e.placement!==E&&(e.modifiersData[n]._skip=!0,e.placement=E,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Qa(t,e,r){return Zs(t,Js(e,r))}var Xa={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,o=void 0===i||i,s=r.altAxis,a=void 0!==s&&s,u=r.boundary,c=r.rootBoundary,l=r.altBoundary,f=r.padding,h=r.tether,d=void 0===h||h,p=r.tetherOffset,m=void 0===p?0:p,g=Ja(e,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=Ta(e.placement),v=Oa(e.placement),b=!v,w=Na(y),_="x"===w?"y":"x",M=e.modifiersData.popperOffsets,A=e.rects.reference,E=e.rects.popper,x="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,k="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(M){if(o){var I,P="y"===w?ha:ma,C="y"===w?da:pa,T="y"===w?"height":"width",O=M[w],N=O+g[P],B=O-g[C],L=d?-E[T]/2:0,j=v===va?A[T]:E[T],q=v===va?-E[T]:-A[T],U=e.elements.arrow,F=d&&U?oa(U):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=D[P],H=D[C],K=Qa(0,A[T],F[T]),G=b?A[T]/2-L-K-z-k.mainAxis:j-K-z-k.mainAxis,W=b?-A[T]/2+L+K+H+k.mainAxis:q+K+H+k.mainAxis,V=e.elements.arrow&&fa(e.elements.arrow),Z=V?"y"===w?V.clientTop||0:V.clientLeft||0:0,J=null!=(I=null==S?void 0:S[w])?I:0,Y=O+W-J,Q=Qa(d?Js(N,O+G-J-Z):N,O,d?Zs(B,Y):B);M[w]=Q,R[w]=Q-O}if(a){var X,$="x"===w?ha:ma,tt="x"===w?da:pa,et=M[_],rt="y"===_?"height":"width",nt=et+g[$],it=et-g[tt],ot=-1!==[ha,ma].indexOf(y),st=null!=(X=null==S?void 0:S[_])?X:0,at=ot?nt:et-A[rt]-E[rt]-st+k.altAxis,ut=ot?et+A[rt]+E[rt]-st-k.altAxis:it,ct=d&&ot?function(t,e,r){var n=Qa(t,e,r);return n>r?r:n}(at,et,ut):Qa(d?at:nt,et,d?ut:it);M[_]=ct,R[_]=ct-et}e.modifiersData[n]=R}},requiresIfExists:["offset"]};var $a={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,n=t.name,i=t.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,a=Ta(r.placement),u=Na(a),c=[ma,pa].indexOf(a)>=0?"height":"width";if(o&&s){var l=function(t,e){return Va("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Za(t,ya))}(i.padding,r),f=oa(o),h="y"===u?ha:ma,d="y"===u?da:pa,p=r.rects.reference[c]+r.rects.reference[u]-s[u]-r.rects.popper[c],m=s[u]-r.rects.reference[u],g=fa(o),y=g?"y"===u?g.clientHeight||0:g.clientWidth||0:0,v=p/2-m/2,b=l[h],w=y-f[c]-l[d],_=y/2-f[c]/2+v,M=Qa(b,_,w),A=u;r.modifiersData[n]=((e={})[A]=M,e.centerOffset=M-_,e)}},effect:function(t){var e=t.state,r=t.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Ha(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tu(t,e,r){return void 0===r&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function eu(t){return[ha,pa,da,ma].some((function(e){return t[e]>=0}))}var ru=Pa({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=void 0===i||i,s=n.resize,a=void 0===s||s,u=Ks(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",r.update,Ca)})),a&&u.addEventListener("resize",r.update,Ca),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",r.update,Ca)})),a&&u.removeEventListener("resize",r.update,Ca)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,r=t.name;e.modifiersData[r]=Ba({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=void 0===n||n,o=r.adaptive,s=void 0===o||o,a=r.roundOffsets,u=void 0===a||a,c={placement:Ta(e.placement),variation:Oa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ja(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:u})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ja(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},i=e.elements[t];Ws(i)&&$s(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(t){var e=n[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:r[t]).reduce((function(t,e){return t[e]="",t}),{});Ws(n)&&$s(n)&&(Object.assign(n.style,o),Object.keys(i).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]},qa,Ya,Xa,$a,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Ja(e,{elementContext:"reference"}),a=Ja(e,{altBoundary:!0}),u=tu(s,n),c=tu(a,i,o),l=eu(u),f=eu(c);e.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]});function nu(t={}){const{enabled:e=!0,modifiers:r,placement:n="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:u,gutter:c=8,flip:l=!0,boundary:f="clippingParents",preventOverflow:h=!0,matchWidth:d,direction:p="ltr"}=t,m=(0,s.useRef)(null),g=(0,s.useRef)(null),y=(0,s.useRef)(null),v=function(t,e="ltr"){var r,n;const i=(null==(r=zs[t])?void 0:r[e])||t;return"ltr"===e?i:null!=(n=Hs[t])?n:i}(n,p),b=(0,s.useRef)((()=>{})),w=(0,s.useCallback)((()=>{var t;e&&m.current&&g.current&&(null==(t=b.current)||t.call(b),y.current=ru(m.current,g.current,{placement:v,modifiers:[Fs,js,Bs,{...Ns,enabled:!!d},{name:"eventListeners",...Os(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:null!=u?u:[0,c]}},{name:"flip",enabled:!!l,options:{padding:8}},{name:"preventOverflow",enabled:!!h,options:{boundary:f}},...null!=r?r:[]],strategy:i}),y.current.forceUpdate(),b.current=y.current.destroy)}),[v,e,r,d,a,o,u,c,l,h,f,i]);(0,s.useEffect)((()=>()=>{var t;m.current||g.current||(null==(t=y.current)||t.destroy(),y.current=null)}),[]);const _=(0,s.useCallback)((t=>{m.current=t,w()}),[w]),M=(0,s.useCallback)(((t={},e=null)=>({...t,ref:N(_,e)})),[_]),A=(0,s.useCallback)((t=>{g.current=t,w()}),[w]),E=(0,s.useCallback)(((t={},e=null)=>({...t,ref:N(A,e),style:{...t.style,position:i,minWidth:d?void 0:"max-content",inset:"0 auto auto 0"}})),[i,A,d]),x=(0,s.useCallback)(((t={},e=null)=>{const{size:r,shadowColor:n,bg:i,style:o,...s}=t;return{...s,ref:e,"data-popper-arrow":"",style:iu(t)}}),[]),k=(0,s.useCallback)(((t={},e=null)=>({...t,ref:e,"data-popper-arrow-inner":""})),[]);return{update(){var t;null==(t=y.current)||t.update()},forceUpdate(){var t;null==(t=y.current)||t.forceUpdate()},transformOrigin:Ps.transformOrigin.varRef,referenceRef:_,popperRef:A,getPopperProps:E,getArrowProps:x,getArrowInnerProps:k,getReferenceProps:M}}function iu(t){const{size:e,shadowColor:r,bg:n,style:i}=t,o={...i,position:"absolute"};return e&&(o["--popper-arrow-size"]=e),r&&(o["--popper-arrow-shadow-color"]=r),n&&(o["--popper-arrow-bg"]=n),o}var ou=r(5155);function su(t={}){const{onClose:e,onOpen:r,isOpen:n,id:i}=t,o=(0,ou.W)(r),a=(0,ou.W)(e),[u,c]=(0,s.useState)(t.defaultIsOpen||!1),l=void 0!==n?n:u,f=void 0!==n,h=(0,s.useId)(),d=null!=i?i:`disclosure-${h}`,p=(0,s.useCallback)((()=>{f||c(!1),null==a||a()}),[f,a]),m=(0,s.useCallback)((()=>{f||c(!0),null==o||o()}),[f,o]),g=(0,s.useCallback)((()=>{l?p():m()}),[l,m,p]);return{isOpen:l,onOpen:m,onClose:p,onToggle:g,isControlled:f,getButtonProps:function(t={}){return{...t,"aria-expanded":l,"aria-controls":d,onClick(e){var r;null==(r=t.onClick)||r.call(t,e),g()}}},getDisclosureProps:function(t={}){return{...t,hidden:!l,id:d}}}}function au(t,e,r,n){const i=(0,ou.W)(r);return(0,s.useEffect)((()=>{const o="function"==typeof t?t():null!=t?t:document;if(r&&o)return o.addEventListener(e,i,n),()=>{o.removeEventListener(e,i,n)}}),[e,t,n,i,r]),()=>{const r="function"==typeof t?t():null!=t?t:document;null==r||r.removeEventListener(e,i,n)}}var uu=t=>{var e;return(null==(e=t.current)?void 0:e.ownerDocument)||document},cu=t=>{var e,r;return(null==(r=null==(e=t.current)?void 0:e.ownerDocument)?void 0:r.defaultView)||window};function lu(t={}){const{openDelay:e=0,closeDelay:r=0,closeOnClick:n=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:u=!0,onOpen:c,onClose:l,placement:f,id:h,isOpen:d,defaultIsOpen:m,arrowSize:g=10,arrowShadowColor:y,arrowPadding:v,modifiers:b,isDisabled:w,gutter:_,offset:M,direction:A,...E}=t,{isOpen:x,onOpen:k,onClose:S}=su({isOpen:d,defaultIsOpen:m,onOpen:c,onClose:l}),{referenceRef:R,getPopperProps:I,getArrowInnerProps:P,getArrowProps:C}=nu({enabled:x,placement:f,arrowPadding:v,modifiers:b,gutter:_,offset:M,direction:A}),T=(0,s.useId)(),O=`tooltip-${null!=h?h:T}`,B=(0,s.useRef)(null),L=(0,s.useRef)(),j=(0,s.useCallback)((()=>{L.current&&(clearTimeout(L.current),L.current=void 0)}),[]),q=(0,s.useRef)(),U=(0,s.useCallback)((()=>{q.current&&(clearTimeout(q.current),q.current=void 0)}),[]),F=(0,s.useCallback)((()=>{U(),S()}),[S,U]),D=function(t,e){return(0,s.useEffect)((()=>{const r=uu(t);return r.addEventListener(fu,e),()=>r.removeEventListener(fu,e)}),[e,t]),()=>{const e=uu(t),r=cu(t);e.dispatchEvent(new r.CustomEvent(fu))}}(B,F),z=(0,s.useCallback)((()=>{if(!w&&!L.current){D();const t=cu(B);L.current=t.setTimeout(k,e)}}),[D,w,k,e]),H=(0,s.useCallback)((()=>{j();const t=cu(B);q.current=t.setTimeout(F,r)}),[r,F,j]),K=(0,s.useCallback)((()=>{x&&n&&H()}),[n,H,x]),G=(0,s.useCallback)((()=>{x&&a&&H()}),[a,H,x]),W=(0,s.useCallback)((t=>{x&&"Escape"===t.key&&H()}),[x,H]);au((()=>uu(B)),"keydown",u?W:void 0),au((()=>{const t=B.current;if(!t)return null;const e=Rs(t);return"body"===e.localName?cu(B):e}),"scroll",(()=>{x&&o&&F()}),{passive:!0,capture:!0}),(0,s.useEffect)((()=>{w&&(j(),x&&S())}),[w,x,S,j]),(0,s.useEffect)((()=>()=>{j(),U()}),[j,U]),au((()=>B.current),"pointerleave",H);const V=(0,s.useCallback)(((t={},e=null)=>({...t,ref:N(B,e,R),onPointerEnter:(0,p.v0)(t.onPointerEnter,(t=>{"touch"!==t.pointerType&&z()})),onClick:(0,p.v0)(t.onClick,K),onPointerDown:(0,p.v0)(t.onPointerDown,G),onFocus:(0,p.v0)(t.onFocus,z),onBlur:(0,p.v0)(t.onBlur,H),"aria-describedby":x?O:void 0})),[z,H,G,x,O,K,R]),Z=(0,s.useCallback)(((t={},e=null)=>I({...t,style:{...t.style,[Ps.arrowSize.var]:g?`${g}px`:void 0,[Ps.arrowShadowColor.var]:y}},e)),[I,g,y]),J=(0,s.useCallback)(((t={},e=null)=>{const r={...t.style,position:"relative",transformOrigin:Ps.transformOrigin.varRef};return{ref:e,...E,...t,id:O,role:"tooltip",style:r}}),[E,O]);return{isOpen:x,show:z,hide:H,getTriggerProps:V,getTooltipProps:J,getTooltipPositionerProps:Z,getArrowProps:C,getArrowInnerProps:P}}var fu="chakra-ui:close-tooltip";var hu=r(9598),du=r(954),pu=r(7828);var mu=(0,c.m)(du.E.div),gu=(0,u.G)(((t,e)=>{var r,n;const i=(0,_.mq)("Tooltip",t),o=(0,M.Lr)(t),a=(0,h.F)(),{children:u,label:f,shouldWrapChildren:d,"aria-label":p,hasArrow:m,bg:g,portalProps:y,background:v,backgroundColor:b,bgColor:w,motionProps:A,...E}=o,x=null!=(n=null!=(r=null!=v?v:b)?r:g)?n:w;if(x){i.bg=x;const t=(0,M.K1)(a,"colors",x);i[Ps.arrowBg.var]=t}const k=lu({...E,direction:a.direction});let S;if("string"==typeof u||d)S=(0,l.jsx)(c.m.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps(),children:u});else{const t=s.Children.only(u);S=(0,s.cloneElement)(t,k.getTriggerProps(t.props,t.ref))}const R=!!p,I=k.getTooltipProps({},e),P=R?function(t,e=[]){const r=Object.assign({},t);for(const n of e)n in r&&delete r[n];return r}(I,["role","id"]):I,C=function(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}(I,["role","id"]);return f?(0,l.jsxs)(l.Fragment,{children:[S,(0,l.jsx)(pu.M,{children:k.isOpen&&(0,l.jsx)(hu.h,{...y,children:(0,l.jsx)(c.m.div,{...k.getTooltipPositionerProps(),__css:{zIndex:i.zIndex,pointerEvents:"none"},children:(0,l.jsxs)(mu,{variants:Es,initial:"exit",animate:"enter",exit:"exit",...A,...P,__css:i,children:[f,R&&(0,l.jsx)(c.m.span,{srOnly:!0,...C,children:p}),m&&(0,l.jsx)(c.m.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,l.jsx)(c.m.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]})})})})]}):(0,l.jsx)(l.Fragment,{children:u})}));gu.displayName="Tooltip";var yu=(0,u.G)((function(t,e){const r=(0,_.mq)("Link",t),{className:n,isExternal:i,...o}=(0,M.Lr)(t);return(0,l.jsx)(c.m.a,{target:i?"_blank":void 0,rel:i?"noopener":void 0,ref:e,className:(0,p.cx)("chakra-link",n),...o,__css:r})}));yu.displayName="Link";var vu=(0,u.G)(((t,e)=>{const{icon:r,children:n,isRound:i,"aria-label":o,...a}=t,u=r||n,c=(0,s.isValidElement)(u)?(0,s.cloneElement)(u,{"aria-hidden":!0,focusable:!1}):null;return(0,l.jsx)(L,{padding:"0",borderRadius:i?"full":void 0,ref:e,"aria-label":o,...a,children:c})}));vu.displayName="IconButton";var bu=r(6877);function wu(t){const{viewBox:e="0 0 24 24",d:r,displayName:n,defaultProps:i={}}=t,o=s.Children.toArray(t.path),a=(0,u.G)(((t,n)=>(0,l.jsx)(bu.J,{ref:n,viewBox:e,...i,...t,children:o.length?o:(0,l.jsx)("path",{fill:"currentColor",d:r})})));return a.displayName=n,a}var _u=wu({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"}),Mu=wu({displayName:"SunIcon",path:(0,l.jsxs)("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"5"}),(0,l.jsx)("path",{d:"M12 1v2"}),(0,l.jsx)("path",{d:"M12 21v2"}),(0,l.jsx)("path",{d:"M4.22 4.22l1.42 1.42"}),(0,l.jsx)("path",{d:"M18.36 18.36l1.42 1.42"}),(0,l.jsx)("path",{d:"M1 12h2"}),(0,l.jsx)("path",{d:"M21 12h2"}),(0,l.jsx)("path",{d:"M4.22 19.78l1.42-1.42"}),(0,l.jsx)("path",{d:"M18.36 5.64l1.42-1.42"})]})}),Au=r(2498);const Eu=t=>{const{colorMode:e,toggleColorMode:r}=(0,Au.If)();return(0,ps.tZ)(gu,{label:"Toggle Dark Mode"},(0,ps.tZ)(vu,(0,a.Z)({},t,{"aria-label":"Toggle Dark Mode",onClick:r,icon:"light"===e?(0,ps.tZ)(_u,null):(0,ps.tZ)(Mu,null)})))};var xu=wu({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});var ku=r(7052),[Su,Ru]=(0,w.k)({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<InputGroup />\" "}),Iu=(0,u.G)((function(t,e){const r=(0,_.jC)("Input",t),{children:n,className:i,...o}=(0,M.Lr)(t),a=(0,p.cx)("chakra-input__group",i),u={},f=function(t){return s.Children.toArray(t).filter((t=>(0,s.isValidElement)(t)))}(n),h=r.field;f.forEach((t=>{var e,n;r&&(h&&"InputLeftElement"===t.type.id&&(u.paddingStart=null!=(e=h.height)?e:h.h),h&&"InputRightElement"===t.type.id&&(u.paddingEnd=null!=(n=h.height)?n:h.h),"InputRightAddon"===t.type.id&&(u.borderEndRadius=0),"InputLeftAddon"===t.type.id&&(u.borderStartRadius=0))}));const d=f.map((e=>{var r,n;const i=(0,ku.o)({size:(null==(r=e.props)?void 0:r.size)||t.size,variant:(null==(n=e.props)?void 0:n.variant)||t.variant});return"Input"!==e.type.id?(0,s.cloneElement)(e,i):(0,s.cloneElement)(e,Object.assign(i,u,e.props))}));return(0,l.jsx)(c.m.div,{className:a,ref:e,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate"},"data-group":!0,...o,children:(0,l.jsx)(Su,{value:r,children:d})})}));Iu.displayName="InputGroup";var Pu=(0,c.m)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Cu=(0,u.G)((function(t,e){var r,n;const{placement:i="left",...o}=t,s=Ru(),a=s.field,u={["left"===i?"insetStart":"insetEnd"]:"0",width:null!=(r=null==a?void 0:a.height)?r:null==a?void 0:a.h,height:null!=(n=null==a?void 0:a.height)?n:null==a?void 0:a.h,fontSize:null==a?void 0:a.fontSize,...s.element};return(0,l.jsx)(Pu,{ref:e,__css:u,...o})}));Cu.id="InputElement",Cu.displayName="InputElement";var Tu=(0,u.G)((function(t,e){const{className:r,...n}=t,i=(0,p.cx)("chakra-input__left-element",r);return(0,l.jsx)(Cu,{ref:e,placement:"left",className:i,...n})}));Tu.id="InputLeftElement",Tu.displayName="InputLeftElement";var Ou=(0,u.G)((function(t,e){const{className:r,...n}=t,i=(0,p.cx)("chakra-input__right-element",r);return(0,l.jsx)(Cu,{ref:e,placement:"right",className:i,...n})}));Ou.id="InputRightElement",Ou.displayName="InputRightElement";var[Nu,Bu]=(0,w.k)({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),[Lu,ju]=(0,w.k)({strict:!1,name:"FormControlContext"});var qu=(0,u.G)((function(t,e){const r=(0,_.jC)("Form",t),n=(0,M.Lr)(t),{getRootProps:i,htmlProps:o,...a}=function(t){const{id:e,isRequired:r,isInvalid:n,isDisabled:i,isReadOnly:o,...a}=t,u=(0,s.useId)(),c=e||`field-${u}`,l=`${c}-label`,f=`${c}-feedback`,h=`${c}-helptext`,[d,m]=(0,s.useState)(!1),[g,y]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),w=(0,s.useCallback)(((t={},e=null)=>({id:h,...t,ref:N(e,(t=>{t&&y(!0)}))})),[h]),_=(0,s.useCallback)(((t={},e=null)=>({...t,ref:e,"data-focus":(0,p.PB)(v),"data-disabled":(0,p.PB)(i),"data-invalid":(0,p.PB)(n),"data-readonly":(0,p.PB)(o),id:void 0!==t.id?t.id:l,htmlFor:void 0!==t.htmlFor?t.htmlFor:c})),[c,i,v,n,o,l]),M=(0,s.useCallback)(((t={},e=null)=>({id:f,...t,ref:N(e,(t=>{t&&m(!0)})),"aria-live":"polite"})),[f]),A=(0,s.useCallback)(((t={},e=null)=>({...t,...a,ref:e,role:"group"})),[a]),E=(0,s.useCallback)(((t={},e=null)=>({...t,ref:e,role:"presentation","aria-hidden":!0,children:t.children||"*"})),[]);return{isRequired:!!r,isInvalid:!!n,isReadOnly:!!o,isDisabled:!!i,isFocused:!!v,onFocus:()=>b(!0),onBlur:()=>b(!1),hasFeedbackText:d,setHasFeedbackText:m,hasHelpText:g,setHasHelpText:y,id:c,labelId:l,feedbackId:f,helpTextId:h,htmlProps:a,getHelpTextProps:w,getErrorMessageProps:M,getRootProps:A,getLabelProps:_,getRequiredIndicatorProps:E}}(n),u=(0,p.cx)("chakra-form-control",t.className);return(0,l.jsx)(Lu,{value:a,children:(0,l.jsx)(Nu,{value:r,children:(0,l.jsx)(c.m.div,{...i({},e),className:u,__css:r.container})})})}));function Uu(t){var e,r,n;const i=ju(),{id:o,disabled:s,readOnly:a,required:u,isRequired:c,isInvalid:l,isReadOnly:f,isDisabled:h,onFocus:d,onBlur:m,...g}=t,y=t["aria-describedby"]?[t["aria-describedby"]]:[];return(null==i?void 0:i.hasFeedbackText)&&(null==i?void 0:i.isInvalid)&&y.push(i.feedbackId),(null==i?void 0:i.hasHelpText)&&y.push(i.helpTextId),{...g,"aria-describedby":y.join(" ")||void 0,id:null!=o?o:null==i?void 0:i.id,isDisabled:null!=(e=null!=s?s:h)?e:null==i?void 0:i.isDisabled,isReadOnly:null!=(r=null!=a?a:f)?r:null==i?void 0:i.isReadOnly,isRequired:null!=(n=null!=u?u:c)?n:null==i?void 0:i.isRequired,isInvalid:null!=l?l:null==i?void 0:i.isInvalid,onFocus:(0,p.v0)(null==i?void 0:i.onFocus,d),onBlur:(0,p.v0)(null==i?void 0:i.onBlur,m)}}qu.displayName="FormControl",(0,u.G)((function(t,e){const r=ju(),n=Bu(),i=(0,p.cx)("chakra-form__helper-text",t.className);return(0,l.jsx)(c.m.div,{...null==r?void 0:r.getHelpTextProps(t,e),__css:n.helperText,className:i})})).displayName="FormHelperText";var Fu=(0,u.G)((function(t,e){const{htmlSize:r,...n}=t,i=(0,_.jC)("Input",n),o=function(t){const{isDisabled:e,isInvalid:r,isReadOnly:n,isRequired:i,...o}=Uu(t);return{...o,disabled:e,readOnly:n,required:i,"aria-invalid":(0,p.Qm)(r),"aria-required":(0,p.Qm)(i),"aria-readonly":(0,p.Qm)(n)}}((0,M.Lr)(n)),s=(0,p.cx)("chakra-input",t.className);return(0,l.jsx)(c.m.input,{size:r,...o,__css:i.field,ref:e,className:s})}));Fu.displayName="Input",Fu.id="Input";const Du=()=>{const{setQuery:t}=(0,s.useContext)(ws),{0:e,1:r}=(0,s.useState)(""),n=((t,e)=>{const{0:r,1:n}=(0,s.useState)(t);return(0,s.useEffect)((()=>{const r=setTimeout((()=>n(t)),e);return()=>{clearTimeout(r)}}),[t,e]),r})(e,250);return(0,s.useEffect)((()=>{t(n)}),[n]),(0,ps.tZ)(Iu,{size:"lg",mx:{base:0,md:"5"},mb:{base:"2",md:0}},(0,ps.tZ)(Tu,{pointerEvents:"none",children:(0,ps.tZ)(xu,{color:"gray.300"})}),(0,ps.tZ)(Fu,{type:"text",placeholder:"Search",value:e,onChange:t=>r(t.target.value)}))};var zu=r(9583),Hu=wu({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});function Ku(t){const{isOpen:e,ref:r}=t,[n,i]=(0,s.useState)(e),[o,a]=(0,s.useState)(!1);(0,s.useEffect)((()=>{o||(i(e),a(!0))}),[e,o,n]),au((()=>r.current),"animationend",(()=>{i(e)}));return{present:!(!e&&!n),onComplete(){var t;const e=function(t){var e,r;return null!=(r=null==(e=Ss(t))?void 0:e.defaultView)?r:window}(r.current),n=new e.CustomEvent("animationend",{bubbles:!0});null==(t=r.current)||t.dispatchEvent(n)}}}var Gu=()=>"undefined"!=typeof window;var Wu=t=>Gu()&&t.test(function(){var t;const e=navigator.userAgentData;return null!=(t=null==e?void 0:e.platform)?t:navigator.platform}()),Vu=()=>{return Wu(/mac|iphone|ipad|ipod/i)&&(t=/apple/i,Gu()&&t.test(navigator.vendor));var t};var Zu=t=>t.hasAttribute("tabindex"),Ju=t=>Zu(t)&&-1===t.tabIndex;function Yu(t){return!(!t.parentElement||!Yu(t.parentElement))||t.hidden}function Qu(t){if(!ks(t)||Yu(t)||function(t){return!0===Boolean(t.getAttribute("disabled"))||!0===Boolean(t.getAttribute("aria-disabled"))}(t))return!1;const{localName:e}=t;if(["input","select","textarea","button"].indexOf(e)>=0)return!0;const r={a:()=>t.hasAttribute("href"),audio:()=>t.hasAttribute("controls"),video:()=>t.hasAttribute("controls")};return e in r?r[e]():!!function(t){const e=t.getAttribute("contenteditable");return"false"!==e&&null!=e}(t)||Zu(t)}var Xu=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join(),$u=t=>t.offsetWidth>0&&t.offsetHeight>0;function tc(t){const e=Array.from(t.querySelectorAll(Xu));return e.unshift(t),e.filter((t=>Qu(t)&&$u(t)))}var ec=r(6245),rc=r(2366);function nc(t){const e=t.current;if(!e)return!1;const r=Ss(e).activeElement;var n;return!!r&&(!e.contains(r)&&!(!((n=r)&&ks(n)&&Qu(n))||Ju(n)))}var ic={preventScroll:!0,shouldFocus:!1};var oc={click:"click",hover:"hover"};function sc(t={}){const{closeOnBlur:e=!0,closeOnEsc:r=!0,initialFocusRef:n,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:u,arrowShadowColor:c,trigger:l=oc.click,openDelay:f=200,closeDelay:h=200,isLazy:d,lazyBehavior:m="unmount",computePositionOnMount:g,...y}=t,{isOpen:v,onClose:b,onOpen:w,onToggle:_}=su(t),M=(0,s.useRef)(null),A=(0,s.useRef)(null),E=(0,s.useRef)(null),x=(0,s.useRef)(!1),k=(0,s.useRef)(!1);v&&(k.current=!0);const[S,R]=(0,s.useState)(!1),[I,P]=(0,s.useState)(!1),C=(0,s.useId)(),T=null!=i?i:C,[O,B,L,j]=["popover-trigger","popover-content","popover-header","popover-body"].map((t=>`${t}-${T}`)),{referenceRef:q,getArrowProps:U,getPopperProps:F,getArrowInnerProps:D,forceUpdate:z}=nu({...y,enabled:v||!!g}),H=Ku({isOpen:v,ref:E});!function(t){const{ref:e,elements:r,enabled:n}=t,i=()=>{var t,r;return null!=(r=null==(t=e.current)?void 0:t.ownerDocument)?r:document};au(i,"pointerdown",(t=>{if(!Vu()||!n)return;const o=t.target,s=(null!=r?r:[e]).some((t=>{const e="current"in t?t.current:t;return(null==e?void 0:e.contains(o))||e===o}));i().activeElement!==o&&s&&(t.preventDefault(),o.focus())}))}({enabled:v,ref:A}),function(t,e){const{shouldFocus:r,visible:n,focusRef:i}=e,o=r&&!n;(0,rc.r)((()=>{if(!o)return;if(nc(t))return;const e=(null==i?void 0:i.current)||t.current;let r;return e?(r=requestAnimationFrame((()=>{e.focus({preventScroll:!0})})),()=>{cancelAnimationFrame(r)}):void 0}),[o,t,i])}(E,{focusRef:A,visible:v,shouldFocus:o&&l===oc.click}),function(t,e=ic){const{focusRef:r,preventScroll:n,shouldFocus:i,visible:o}=e,a="current"in t?t.current:t,u=i&&o,c=(0,s.useRef)(u),l=(0,s.useRef)(o);(0,ec.G)((()=>{!l.current&&o&&(c.current=u),l.current=o}),[o,u]);const f=(0,s.useCallback)((()=>{if(o&&a&&c.current&&(c.current=!1,!a.contains(document.activeElement)))if(null==r?void 0:r.current)requestAnimationFrame((()=>{var t;null==(t=r.current)||t.focus({preventScroll:n})}));else{const t=tc(a);t.length>0&&requestAnimationFrame((()=>{t[0].focus({preventScroll:n})}))}}),[o,n,a,r]);(0,rc.r)((()=>{f()}),[f]),au(a,"transitionend",f)}(E,{focusRef:n,visible:v,shouldFocus:a&&l===oc.click});const K=function(t){const{wasSelected:e,enabled:r,isSelected:n,mode:i="unmount"}=t;return!r||!!n||!("keepMounted"!==i||!e)}({wasSelected:k.current,enabled:d,mode:m,isSelected:H.present}),G=(0,s.useCallback)(((t={},n=null)=>{const i={...t,style:{...t.style,transformOrigin:Ps.transformOrigin.varRef,[Ps.arrowSize.var]:u?`${u}px`:void 0,[Ps.arrowShadowColor.var]:c},ref:N(E,n),children:K?t.children:null,id:B,tabIndex:-1,role:"dialog",onKeyDown:(0,p.v0)(t.onKeyDown,(t=>{r&&"Escape"===t.key&&b()})),onBlur:(0,p.v0)(t.onBlur,(t=>{const r=uc(t),n=ac(E.current,r),i=ac(A.current,r);v&&e&&(!n&&!i)&&b()})),"aria-labelledby":S?L:void 0,"aria-describedby":I?j:void 0};return l===oc.hover&&(i.role="tooltip",i.onMouseEnter=(0,p.v0)(t.onMouseEnter,(()=>{x.current=!0})),i.onMouseLeave=(0,p.v0)(t.onMouseLeave,(t=>{null!==t.nativeEvent.relatedTarget&&(x.current=!1,setTimeout((()=>b()),h))}))),i}),[K,B,S,L,I,j,l,r,b,v,e,h,c,u]),W=(0,s.useCallback)(((t={},e=null)=>F({...t,style:{visibility:v?"visible":"hidden",...t.style}},e)),[v,F]),V=(0,s.useCallback)(((t,e=null)=>({...t,ref:N(e,M,q)})),[M,q]),Z=(0,s.useRef)(),J=(0,s.useRef)(),Y=(0,s.useCallback)((t=>{null==M.current&&q(t)}),[q]),Q=(0,s.useCallback)(((t={},r=null)=>{const n={...t,ref:N(A,r,Y),id:O,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":B};return l===oc.click&&(n.onClick=(0,p.v0)(t.onClick,_)),l===oc.hover&&(n.onFocus=(0,p.v0)(t.onFocus,(()=>{void 0===Z.current&&w()})),n.onBlur=(0,p.v0)(t.onBlur,(t=>{const r=uc(t),n=!ac(E.current,r);v&&e&&n&&b()})),n.onKeyDown=(0,p.v0)(t.onKeyDown,(t=>{"Escape"===t.key&&b()})),n.onMouseEnter=(0,p.v0)(t.onMouseEnter,(()=>{x.current=!0,Z.current=window.setTimeout((()=>w()),f)})),n.onMouseLeave=(0,p.v0)(t.onMouseLeave,(()=>{x.current=!1,Z.current&&(clearTimeout(Z.current),Z.current=void 0),J.current=window.setTimeout((()=>{!1===x.current&&b()}),h)}))),n}),[O,v,B,l,Y,_,w,e,b,f,h]);(0,s.useEffect)((()=>()=>{Z.current&&clearTimeout(Z.current),J.current&&clearTimeout(J.current)}),[]);const X=(0,s.useCallback)(((t={},e=null)=>({...t,id:L,ref:N(e,(t=>{R(!!t)}))})),[L]),$=(0,s.useCallback)(((t={},e=null)=>({...t,id:j,ref:N(e,(t=>{P(!!t)}))})),[j]);return{forceUpdate:z,isOpen:v,onAnimationComplete:H.onComplete,onClose:b,getAnchorProps:V,getArrowProps:U,getArrowInnerProps:D,getPopoverPositionerProps:W,getPopoverProps:G,getTriggerProps:Q,getHeaderProps:X,getBodyProps:$}}function ac(t,e){return t===e||(null==t?void 0:t.contains(e))}function uc(t){var e;const r=t.currentTarget.ownerDocument.activeElement;return null!=(e=t.relatedTarget)?e:r}var[cc,lc]=(0,w.k)({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[fc,hc]=(0,w.k)({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Popover />\" "});function dc(t){const e=(0,_.jC)("Popover",t),{children:r,...n}=(0,M.Lr)(t),i=sc({...n,direction:(0,h.F)().direction});return(0,l.jsx)(cc,{value:i,children:(0,l.jsx)(fc,{value:e,children:(0,p.Pu)(r,{isOpen:i.isOpen,onClose:i.onClose,forceUpdate:i.forceUpdate})})})}function pc(t){const e=s.Children.only(t.children),{getTriggerProps:r}=lc();return(0,s.cloneElement)(e,r(e.props,e.ref))}function mc(t){if(t)return{enter:{...t.enter,visibility:"visible"},exit:{...t.exit,transitionEnd:{visibility:"hidden"}}}}dc.displayName="Popover",pc.displayName="PopoverTrigger";var gc={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},yc=(0,c.m)(du.E.section),vc=(0,u.G)((function(t,e){const{variants:r=gc,...n}=t,{isOpen:i}=lc();return(0,l.jsx)(yc,{ref:e,variants:mc(r),initial:!1,animate:i?"enter":"exit",...n})}));vc.displayName="PopoverTransition";var bc=(0,u.G)((function(t,e){const{rootProps:r,motionProps:n,...i}=t,{getPopoverProps:o,getPopoverPositionerProps:s,onAnimationComplete:a}=lc(),u=hc(),f={position:"relative",display:"flex",flexDirection:"column",...u.content};return(0,l.jsx)(c.m.div,{...s(r),__css:u.popper,className:"chakra-popover__popper",children:(0,l.jsx)(vc,{...n,...o(i,e),onAnimationComplete:(0,p.PP)(a,i.onAnimationComplete),className:(0,p.cx)("chakra-popover__content",t.className),__css:f})})}));bc.displayName="PopoverContent";var wc=(t,e)=>e?`${t}.${e}, ${e}`:void 0;function _c(t){var e;const{bg:r,bgColor:n,backgroundColor:i,shadow:o,boxShadow:s,shadowColor:a}=t,{getArrowProps:u,getArrowInnerProps:f}=lc(),h=hc(),d=null!=(e=null!=r?r:n)?e:i,m=null!=o?o:s;return(0,l.jsx)(c.m.div,{...u(),className:"chakra-popover__arrow-positioner",children:(0,l.jsx)(c.m.div,{className:(0,p.cx)("chakra-popover__arrow",t.className),...f(t),__css:{"--popper-arrow-shadow-color":wc("colors",a),"--popper-arrow-bg":wc("colors",d),"--popper-arrow-shadow":wc("shadows",m),...h.arrow}})})}_c.displayName="PopoverArrow";var Mc=(0,u.G)((function(t,e){const{getBodyProps:r}=lc(),n=hc();return(0,l.jsx)(c.m.div,{...r(t,e),className:(0,p.cx)("chakra-popover__body",t.className),__css:n.body})}));Mc.displayName="PopoverBody";var Ac=(0,u.G)((function(t,e){var r;const n=(0,_.mq)("FormLabel",t),i=(0,M.Lr)(t),{className:o,children:s,requiredIndicator:a=(0,l.jsx)(Ec,{}),optionalIndicator:u=null,...f}=i,h=ju(),d=null!=(r=null==h?void 0:h.getLabelProps(f,e))?r:{ref:e,...f};return(0,l.jsxs)(c.m.label,{...d,className:(0,p.cx)("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...n},children:[s,(null==h?void 0:h.isRequired)?a:u]})}));Ac.displayName="FormLabel";var Ec=(0,u.G)((function(t,e){const r=ju(),n=Bu();if(!(null==r?void 0:r.isRequired))return null;const i=(0,p.cx)("chakra-form__required-indicator",t.className);return(0,l.jsx)(c.m.span,{...null==r?void 0:r.getRequiredIndicatorProps(t,e),__css:n.requiredIndicator,className:i})}));Ec.displayName="RequiredIndicator";var xc={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},kc=!1,Sc=null,Rc=!1,Ic=!1,Pc=new Set;function Cc(t,e){Pc.forEach((r=>r(t,e)))}var Tc="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function Oc(t){var e;Rc=!0,(e=t).metaKey||!Tc&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(Sc="keyboard",Cc("keyboard",t))}function Nc(t){if(Sc="pointer","mousedown"===t.type||"pointerdown"===t.type){Rc=!0;const e=t.composedPath?t.composedPath()[0]:t.target;let r=!1;try{r=e.matches(":focus-visible")}catch{}if(r)return;Cc("pointer",t)}}function Bc(t){var e;(0===(e=t).mozInputSource&&e.isTrusted||0===e.detail&&!e.pointerType)&&(Rc=!0,Sc="virtual")}function Lc(t){t.target!==window&&t.target!==document&&(Rc||Ic||(Sc="virtual",Cc("virtual",t)),Rc=!1,Ic=!1)}function jc(){Rc=!1,Ic=!0}function qc(){return"pointer"!==Sc}function Uc(){if("undefined"==typeof window||kc)return;const{focus:t}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...e){Rc=!0,t.apply(this,e)},document.addEventListener("keydown",Oc,!0),document.addEventListener("keyup",Oc,!0),document.addEventListener("click",Bc,!0),window.addEventListener("focus",Lc,!0),window.addEventListener("blur",jc,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",Nc,!0),document.addEventListener("pointermove",Nc,!0),document.addEventListener("pointerup",Nc,!0)):(document.addEventListener("mousedown",Nc,!0),document.addEventListener("mousemove",Nc,!0),document.addEventListener("mouseup",Nc,!0)),kc=!0}function Fc(t){Uc(),t(qc());const e=()=>t(qc());return Pc.add(e),()=>{Pc.delete(e)}}function Dc(t={}){const e=Uu(t),{isDisabled:r,isReadOnly:n,isRequired:i,isInvalid:o,id:a,onBlur:u,onFocus:c,"aria-describedby":l}=e,{defaultChecked:f,isChecked:h,isFocusable:d,onChange:m,isIndeterminate:g,name:y,value:v,tabIndex:b,"aria-label":w,"aria-labelledby":_,"aria-invalid":M,...A}=t,E=function(t,e=[]){const r=Object.assign({},t);for(const n of e)n in r&&delete r[n];return r}(A,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),x=(0,ou.W)(m),k=(0,ou.W)(u),S=(0,ou.W)(c),[R,I]=(0,s.useState)(!1),[P,C]=(0,s.useState)(!1),[T,O]=(0,s.useState)(!1),[B,L]=(0,s.useState)(!1);(0,s.useEffect)((()=>Fc(I)),[]);const j=(0,s.useRef)(null),[q,U]=(0,s.useState)(!0),[F,D]=(0,s.useState)(!!f),z=void 0!==h,H=z?h:F,K=(0,s.useCallback)((t=>{n||r?t.preventDefault():(z||D(H?t.target.checked:!!g||t.target.checked),null==x||x(t))}),[n,r,H,z,g,x]);(0,ec.G)((()=>{j.current&&(j.current.indeterminate=Boolean(g))}),[g]),(0,rc.r)((()=>{r&&C(!1)}),[r,C]),(0,ec.G)((()=>{const t=j.current;(null==t?void 0:t.form)&&(t.form.onreset=()=>{D(!!f)})}),[]);const G=r&&!d,W=(0,s.useCallback)((t=>{" "===t.key&&L(!0)}),[L]),V=(0,s.useCallback)((t=>{" "===t.key&&L(!1)}),[L]);(0,ec.G)((()=>{if(!j.current)return;j.current.checked!==H&&D(j.current.checked)}),[j.current]);const Z=(0,s.useCallback)(((t={},e=null)=>({...t,ref:e,"data-active":(0,p.PB)(B),"data-hover":(0,p.PB)(T),"data-checked":(0,p.PB)(H),"data-focus":(0,p.PB)(P),"data-focus-visible":(0,p.PB)(P&&R),"data-indeterminate":(0,p.PB)(g),"data-disabled":(0,p.PB)(r),"data-invalid":(0,p.PB)(o),"data-readonly":(0,p.PB)(n),"aria-hidden":!0,onMouseDown:(0,p.v0)(t.onMouseDown,(t=>{P&&t.preventDefault(),L(!0)})),onMouseUp:(0,p.v0)(t.onMouseUp,(()=>L(!1))),onMouseEnter:(0,p.v0)(t.onMouseEnter,(()=>O(!0))),onMouseLeave:(0,p.v0)(t.onMouseLeave,(()=>O(!1)))})),[B,H,r,P,R,T,g,o,n]),J=(0,s.useCallback)(((t={},e=null)=>({...E,...t,ref:N(e,(t=>{t&&U("LABEL"===t.tagName)})),onClick:(0,p.v0)(t.onClick,(()=>{var t;q||(null==(t=j.current)||t.click(),requestAnimationFrame((()=>{var t;null==(t=j.current)||t.focus({preventScroll:!0})})))})),"data-disabled":(0,p.PB)(r),"data-checked":(0,p.PB)(H),"data-invalid":(0,p.PB)(o)})),[E,r,H,o,q]),Y=(0,s.useCallback)(((t={},e=null)=>({...t,ref:N(j,e),type:"checkbox",name:y,value:v,id:a,tabIndex:b,onChange:(0,p.v0)(t.onChange,K),onBlur:(0,p.v0)(t.onBlur,k,(()=>C(!1))),onFocus:(0,p.v0)(t.onFocus,S,(()=>C(!0))),onKeyDown:(0,p.v0)(t.onKeyDown,W),onKeyUp:(0,p.v0)(t.onKeyUp,V),required:i,checked:H,disabled:G,readOnly:n,"aria-label":w,"aria-labelledby":_,"aria-invalid":M?Boolean(M):o,"aria-describedby":l,"aria-disabled":r,style:xc})),[y,v,a,K,k,S,W,V,i,H,G,n,w,_,M,o,l,r,b]),Q=(0,s.useCallback)(((t={},e=null)=>({...t,ref:e,onMouseDown:(0,p.v0)(t.onMouseDown,zc),"data-disabled":(0,p.PB)(r),"data-checked":(0,p.PB)(H),"data-invalid":(0,p.PB)(o)})),[H,r,o]);return{state:{isInvalid:o,isFocused:P,isChecked:H,isActive:B,isHovered:T,isIndeterminate:g,isDisabled:r,isReadOnly:n,isRequired:i},getRootProps:J,getCheckboxProps:Z,getInputProps:Y,getLabelProps:Q,htmlProps:E}}function zc(t){t.preventDefault(),t.stopPropagation()}var Hc=(0,u.G)((function(t,e){const r=(0,_.jC)("Switch",t),{spacing:n="0.5rem",children:i,...o}=(0,M.Lr)(t),{state:a,getInputProps:u,getCheckboxProps:f,getRootProps:h,getLabelProps:d}=Dc(o),m=(0,s.useMemo)((()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container})),[r.container]),g=(0,s.useMemo)((()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track})),[r.track]),y=(0,s.useMemo)((()=>({userSelect:"none",marginStart:n,...r.label})),[n,r.label]);return(0,l.jsxs)(c.m.label,{...h(),className:(0,p.cx)("chakra-switch",t.className),__css:m,children:[(0,l.jsx)("input",{className:"chakra-switch__input",...u({},e)}),(0,l.jsx)(c.m.span,{...f(),className:"chakra-switch__track",__css:g,children:(0,l.jsx)(c.m.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":(0,p.PB)(a.isChecked),"data-hover":(0,p.PB)(a.isHovered)})}),i&&(0,l.jsx)(c.m.span,{className:"chakra-switch__label",...d(),__css:y,children:i})]})}));Hc.displayName="Switch";const Kc=()=>{const{showTestnets:t,showDeprecated:e,setShowTestnets:r,setShowDeprecated:n}=(0,s.useContext)(ws);return(0,ps.tZ)(dc,null,(0,ps.tZ)(gu,{label:"Filters"},(0,ps.tZ)(pc,null,(0,ps.tZ)(vu,{size:"lg","aria-label":"Filters",icon:(0,ps.tZ)(zu.ulB,null),mr:"1"}))),(0,ps.tZ)(hu.h,null,(0,ps.tZ)(bc,{maxW:"220px"},(0,ps.tZ)(_c,null),(0,ps.tZ)(Mc,null,(0,ps.tZ)(qu,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"2"},(0,ps.tZ)(Ac,{htmlFor:"testnet-switch",mb:"0"},"Show Testnets"),(0,ps.tZ)(Hc,{id:"testnet-switch",onChange:()=>{r((t=>!t))},value:t})),(0,ps.tZ)(qu,{display:"flex",alignItems:"center",justifyContent:"space-between"},(0,ps.tZ)(Ac,{htmlFor:"deprecated-switch",mb:"0"},"Show Deprecated"),(0,ps.tZ)(Hc,{id:"deprecated-switch",onChange:()=>{n((t=>!t))},value:e}))))))},Gc=()=>{const{handleConnect:t,isConnected:e,address:r}=(0,s.useContext)(gs);return(0,ps.tZ)(y,{pb:"2",flexDirection:{base:"column",md:"row"},justifyContent:"space-between"},(0,ps.tZ)(As.X,null,"Chainlist"),(0,ps.tZ)(Du,null),(0,ps.tZ)(y,null,(0,ps.tZ)(Kc,null),(0,ps.tZ)(gu,{label:"Add Network"},(0,ps.tZ)(yu,{href:"https://github.com/ethereum-lists/chains/pulls",isExternal:!0},(0,ps.tZ)(vu,{size:"lg","aria-label":"Add",icon:(0,ps.tZ)(Hu,null),mr:"1"}))),(0,ps.tZ)(gu,{label:"GitHub"},(0,ps.tZ)(yu,{href:"https://github.com/FrederikBolding/chainlist",isExternal:!0},(0,ps.tZ)(vu,{size:"lg","aria-label":"GitHub",icon:(0,ps.tZ)(zu.hJX,null),mr:"1"}))),(0,ps.tZ)(Eu,{size:"lg",mr:"1"}),e?(0,ps.tZ)(L,{size:"lg",w:{base:"100%",md:"auto"}},(0,ps.tZ)(v.x,{fontSize:"sm",isTruncated:!0},r)):(0,ps.tZ)(L,{w:{base:"100%",md:"auto"},size:"lg",onClick:t},"Connect Wallet")))};var Wc,Vc,Zc,Jc,Yc=r(5697),Qc=r.n(Yc),Xc=r(3524),$c=r.n(Xc),tl=r(9590),el=r.n(tl),rl=r(4852),nl=r.n(rl),il="bodyAttributes",ol="htmlAttributes",sl="titleAttributes",al={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},ul=(Object.keys(al).map((function(t){return al[t]})),"charset"),cl="cssText",ll="href",fl="http-equiv",hl="innerHTML",dl="itemprop",pl="name",ml="property",gl="rel",yl="src",vl="target",bl={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},wl="defaultTitle",_l="defer",Ml="encodeSpecialCharacters",Al="onChangeClientState",El="titleTemplate",xl=Object.keys(bl).reduce((function(t,e){return t[bl[e]]=e,t}),{}),kl=[al.NOSCRIPT,al.SCRIPT,al.STYLE],Sl="data-react-helmet",Rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Pl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cl=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},Tl=function(t){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},Ol=function(t){var e=ql(t,al.TITLE),r=ql(t,El);if(r&&e)return r.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var n=ql(t,wl);return e||n||void 0},Nl=function(t){return ql(t,Al)||function(){}},Bl=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return Pl({},t,e)}),{})},Ll=function(t,e){return e.filter((function(t){return void 0!==t[al.BASE]})).map((function(t){return t[al.BASE]})).reverse().reduce((function(e,r){if(!e.length)for(var n=Object.keys(r),i=0;i<n.length;i++){var o=n[i].toLowerCase();if(-1!==t.indexOf(o)&&r[o])return e.concat(r)}return e}),[])},jl=function(t,e,r){var n={};return r.filter((function(e){return!!Array.isArray(e[t])||(void 0!==e[t]&&Hl("Helmet: "+t+' should be of type "Array". Instead found type "'+Rl(e[t])+'"'),!1)})).map((function(e){return e[t]})).reverse().reduce((function(t,r){var i={};r.filter((function(t){for(var r=void 0,o=Object.keys(t),s=0;s<o.length;s++){var a=o[s],u=a.toLowerCase();-1===e.indexOf(u)||r===gl&&"canonical"===t[r].toLowerCase()||u===gl&&"stylesheet"===t[u].toLowerCase()||(r=u),-1===e.indexOf(a)||a!==hl&&a!==cl&&a!==dl||(r=a)}if(!r||!t[r])return!1;var c=t[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][c]&&(i[r][c]=!0,!0)})).reverse().forEach((function(e){return t.push(e)}));for(var o=Object.keys(i),s=0;s<o.length;s++){var a=o[s],u=nl()({},n[a],i[a]);n[a]=u}return t}),[]).reverse()},ql=function(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.hasOwnProperty(e))return n[e]}return null},Ul=(Wc=Date.now(),function(t){var e=Date.now();e-Wc>16?(Wc=e,t(e)):setTimeout((function(){Ul(t)}),0)}),Fl=function(t){return clearTimeout(t)},Dl="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Ul:r.g.requestAnimationFrame||Ul,zl="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Fl:r.g.cancelAnimationFrame||Fl,Hl=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},Kl=null,Gl=function(t,e){var r=t.baseTag,n=t.bodyAttributes,i=t.htmlAttributes,o=t.linkTags,s=t.metaTags,a=t.noscriptTags,u=t.onChangeClientState,c=t.scriptTags,l=t.styleTags,f=t.title,h=t.titleAttributes;Zl(al.BODY,n),Zl(al.HTML,i),Vl(f,h);var d={baseTag:Jl(al.BASE,r),linkTags:Jl(al.LINK,o),metaTags:Jl(al.META,s),noscriptTags:Jl(al.NOSCRIPT,a),scriptTags:Jl(al.SCRIPT,c),styleTags:Jl(al.STYLE,l)},p={},m={};Object.keys(d).forEach((function(t){var e=d[t],r=e.newTags,n=e.oldTags;r.length&&(p[t]=r),n.length&&(m[t]=d[t].oldTags)})),e&&e(),u(t,p,m)},Wl=function(t){return Array.isArray(t)?t.join(""):t},Vl=function(t,e){void 0!==t&&document.title!==t&&(document.title=Wl(t)),Zl(al.TITLE,e)},Zl=function(t,e){var r=document.getElementsByTagName(t)[0];if(r){for(var n=r.getAttribute(Sl),i=n?n.split(","):[],o=[].concat(i),s=Object.keys(e),a=0;a<s.length;a++){var u=s[a],c=e[u]||"";r.getAttribute(u)!==c&&r.setAttribute(u,c),-1===i.indexOf(u)&&i.push(u);var l=o.indexOf(u);-1!==l&&o.splice(l,1)}for(var f=o.length-1;f>=0;f--)r.removeAttribute(o[f]);i.length===o.length?r.removeAttribute(Sl):r.getAttribute(Sl)!==s.join(",")&&r.setAttribute(Sl,s.join(","))}},Jl=function(t,e){var r=document.head||document.querySelector(al.HEAD),n=r.querySelectorAll(t+"["+Sl+"]"),i=Array.prototype.slice.call(n),o=[],s=void 0;return e&&e.length&&e.forEach((function(e){var r=document.createElement(t);for(var n in e)if(e.hasOwnProperty(n))if(n===hl)r.innerHTML=e.innerHTML;else if(n===cl)r.styleSheet?r.styleSheet.cssText=e.cssText:r.appendChild(document.createTextNode(e.cssText));else{var a=void 0===e[n]?"":e[n];r.setAttribute(n,a)}r.setAttribute(Sl,"true"),i.some((function(t,e){return s=e,r.isEqualNode(t)}))?i.splice(s,1):o.push(r)})),i.forEach((function(t){return t.parentNode.removeChild(t)})),o.forEach((function(t){return r.appendChild(t)})),{oldTags:i,newTags:o}},Yl=function(t){return Object.keys(t).reduce((function(e,r){var n=void 0!==t[r]?r+'="'+t[r]+'"':""+r;return e?e+" "+n:n}),"")},Ql=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[bl[r]||r]=t[r],e}),e)},Xl=function(t,e,r){switch(t){case al.TITLE:return{toComponent:function(){return t=e.title,r=e.titleAttributes,(n={key:t})[Sl]=!0,i=Ql(r,n),[s.createElement(al.TITLE,i,t)];var t,r,n,i},toString:function(){return function(t,e,r,n){var i=Yl(r),o=Wl(e);return i?"<"+t+" "+Sl+'="true" '+i+">"+Tl(o,n)+"</"+t+">":"<"+t+" "+Sl+'="true">'+Tl(o,n)+"</"+t+">"}(t,e.title,e.titleAttributes,r)}};case il:case ol:return{toComponent:function(){return Ql(e)},toString:function(){return Yl(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,r){var n,i=((n={key:r})[Sl]=!0,n);return Object.keys(e).forEach((function(t){var r=bl[t]||t;if(r===hl||r===cl){var n=e.innerHTML||e.cssText;i.dangerouslySetInnerHTML={__html:n}}else i[r]=e[t]})),s.createElement(t,i)}))}(t,e)},toString:function(){return function(t,e,r){return e.reduce((function(e,n){var i=Object.keys(n).filter((function(t){return!(t===hl||t===cl)})).reduce((function(t,e){var i=void 0===n[e]?e:e+'="'+Tl(n[e],r)+'"';return t?t+" "+i:i}),""),o=n.innerHTML||n.cssText||"",s=-1===kl.indexOf(t);return e+"<"+t+" "+Sl+'="true" '+i+(s?"/>":">"+o+"</"+t+">")}),"")}(t,e,r)}}}},$l=function(t){var e=t.baseTag,r=t.bodyAttributes,n=t.encode,i=t.htmlAttributes,o=t.linkTags,s=t.metaTags,a=t.noscriptTags,u=t.scriptTags,c=t.styleTags,l=t.title,f=void 0===l?"":l,h=t.titleAttributes;return{base:Xl(al.BASE,e,n),bodyAttributes:Xl(il,r,n),htmlAttributes:Xl(ol,i,n),link:Xl(al.LINK,o,n),meta:Xl(al.META,s,n),noscript:Xl(al.NOSCRIPT,a,n),script:Xl(al.SCRIPT,u,n),style:Xl(al.STYLE,c,n),title:Xl(al.TITLE,{title:f,titleAttributes:h},n)}},tf=$c()((function(t){return{baseTag:Ll([ll,vl],t),bodyAttributes:Bl(il,t),defer:ql(t,_l),encode:ql(t,Ml),htmlAttributes:Bl(ol,t),linkTags:jl(al.LINK,[gl,ll],t),metaTags:jl(al.META,[pl,ul,fl,ml,dl],t),noscriptTags:jl(al.NOSCRIPT,[hl],t),onChangeClientState:Nl(t),scriptTags:jl(al.SCRIPT,[yl,hl],t),styleTags:jl(al.STYLE,[cl],t),title:Ol(t),titleAttributes:Bl(sl,t)}}),(function(t){Kl&&zl(Kl),t.defer?Kl=Dl((function(){Gl(t,(function(){Kl=null}))})):(Gl(t),Kl=null)}),$l)((function(){return null})),ef=(Vc=tf,Jc=Zc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!el()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case al.SCRIPT:case al.NOSCRIPT:return{innerHTML:e};case al.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,r=t.child,n=t.arrayTypeChildren,i=t.newChildProps,o=t.nestedChildren;return Pl({},n,((e={})[r.type]=[].concat(n[r.type]||[],[Pl({},i,this.mapNestedChildrenToProps(r,o))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,r,n=t.child,i=t.newProps,o=t.newChildProps,s=t.nestedChildren;switch(n.type){case al.TITLE:return Pl({},i,((e={})[n.type]=s,e.titleAttributes=Pl({},o),e));case al.BODY:return Pl({},i,{bodyAttributes:Pl({},o)});case al.HTML:return Pl({},i,{htmlAttributes:Pl({},o)})}return Pl({},i,((r={})[n.type]=Pl({},o),r))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var r=Pl({},e);return Object.keys(t).forEach((function(e){var n;r=Pl({},r,((n={})[e]=t[e],n))})),r},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var r=this,n={};return s.Children.forEach(t,(function(t){if(t&&t.props){var i=t.props,o=i.children,s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[xl[r]||r]=t[r],e}),e)}(Cl(i,["children"]));switch(r.warnOnInvalidChildren(t,o),t.type){case al.LINK:case al.META:case al.NOSCRIPT:case al.SCRIPT:case al.STYLE:n=r.flattenArrayTypeChildren({child:t,arrayTypeChildren:n,newChildProps:s,nestedChildren:o});break;default:e=r.mapObjectTypeChildren({child:t,newProps:e,newChildProps:s,nestedChildren:o})}}})),e=this.mapArrayTypeChildrenToProps(n,e)},e.prototype.render=function(){var t=this.props,e=t.children,r=Cl(t,["children"]),n=Pl({},r);return e&&(n=this.mapChildrenToProps(e,n)),s.createElement(Vc,n)},Il(e,null,[{key:"canUseDOM",set:function(t){Vc.canUseDOM=t}}]),e}(s.Component),Zc.propTypes={base:Qc().object,bodyAttributes:Qc().object,children:Qc().oneOfType([Qc().arrayOf(Qc().node),Qc().node]),defaultTitle:Qc().string,defer:Qc().bool,encodeSpecialCharacters:Qc().bool,htmlAttributes:Qc().object,link:Qc().arrayOf(Qc().object),meta:Qc().arrayOf(Qc().object),noscript:Qc().arrayOf(Qc().object),onChangeClientState:Qc().func,script:Qc().arrayOf(Qc().object),style:Qc().arrayOf(Qc().object),title:Qc().string,titleAttributes:Qc().object,titleTemplate:Qc().string},Zc.defaultProps={defer:!0,encodeSpecialCharacters:!0},Zc.peek=Vc.peek,Zc.rewind=function(){var t=Vc.rewind();return t||(t=$l({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},Jc);ef.renderStatic=ef.rewind;const rf=t=>{var e,r;let{lang:n="en",meta:i=[]}=t;const{site:s}=(0,o.K2)("63159454"),a=s.siteMetadata.description,u=null===(e=s.siteMetadata)||void 0===e?void 0:e.title;return(0,ps.tZ)(ef,{htmlAttributes:{lang:n},title:u,titleTemplate:"%s",meta:[{name:"description",content:a},{property:"og:title",content:u},{property:"og:description",content:a},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:creator",content:(null===(r=s.siteMetadata)||void 0===r?void 0:r.author)||""},{name:"twitter:title",content:u},{name:"twitter:description",content:a}].concat(i)})};var nf=()=>{const t=(0,o.K2)("3467081199"),e=t.allChain.nodes,r=t.allImageSharp.nodes.reduce(((t,e)=>(t[e.parent.name]=e.gatsbyImageData,t)),{}),n=e.reduce(((t,e,n)=>(t[n].icon=r[e.icon],t)),e);return(0,ps.tZ)(s.Fragment,null,(0,ps.tZ)(rf,null),(0,ps.tZ)(ys,null,(0,ps.tZ)(_s,null,(0,ps.tZ)(i.xu,{py:"4",px:"8"},(0,ps.tZ)(Gc,null),(0,ps.tZ)(Ms,{chains:n})))))}},210:function(t,e,r){"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(I){u=null}var c=function(){throw new s},l=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=r(1405)(),h=Object.getPrototypeOf||function(t){return t.__proto__},d={},p="undefined"==typeof Uint8Array?n:h(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?h(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":p,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};try{null.error}catch(I){var g=h(h(I));m["%Error.prototype%"]=g}var y=function t(e){var r;if("%AsyncFunction%"===e)r=a("async function () {}");else if("%GeneratorFunction%"===e)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=a("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=h(i.prototype))}return m[e]=r,r},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(8612),w=r(7642),_=b.call(Function.call,Array.prototype.concat),M=b.call(Function.apply,Array.prototype.splice),A=b.call(Function.call,String.prototype.replace),E=b.call(Function.call,String.prototype.slice),x=b.call(Function.call,RegExp.prototype.exec),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,R=function(t,e){var r,n=t;if(w(v,n)&&(n="%"+(r=v[n])[0]+"%"),w(m,n)){var o=m[n];if(o===d&&(o=y(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===x(/^%?[^%]*%?$/,t))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=E(t,0,1),r=E(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,k,(function(t,e,r,i){n[n.length]=r?A(i,S,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=R("%"+n+"%",e),a=o.name,c=o.value,l=!1,f=o.alias;f&&(n=f[0],M(r,_([0,1],f)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],g=E(p,0,1),y=E(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(l=!0),w(m,a="%"+(n+="."+p)+"%"))c=m[a];else if(null!=c){if(!(p in c)){if(!e)throw new s("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var v=u(c,p);c=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else d=w(c,p),c=c[p];d&&!l&&(m[a]=c)}}return c}},5275:function(t,e,r){"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}t.exports=n},1044:function(t,e,r){"use strict";var n=r(210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},1405:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},5419:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6410:function(t,e,r){"use strict";var n=r(5419);t.exports=function(){return n()&&!!Symbol.toStringTag}},7642:function(t,e,r){"use strict";var n=r(8612);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},3349:function(t,e,r){"use strict";var n=r(9509).Buffer,i=r(8473).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(5717)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},3715:function(t,e,r){var n=e;n.utils=r(6436),n.common=r(5772),n.sha=r(9041),n.ripemd=r(2949),n.hmac=r(2344),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},5772:function(t,e,r){"use strict";var n=r(6436),i=r(9746);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},2344:function(t,e,r){"use strict";var n=r(6436),i=r(9746);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},2949:function(t,e,r){"use strict";var n=r(6436),i=r(5772),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function h(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(l,c),e.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],v=r,b=n,w=i,_=c,M=l,A=0;A<80;A++){var E=s(o(u(r,f(A,n,i,c),t[p[A]+e],h(A)),g[A]),l);r=l,l=c,c=o(i,10),i=n,n=E,E=s(o(u(v,f(79-A,b,w,_),t[m[A]+e],d(A)),y[A]),M),v=M,M=_,_=o(w,10),w=b,b=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],c,M),this.h[2]=a(this.h[3],l,v),this.h[3]=a(this.h[4],r,b),this.h[4]=a(this.h[0],n,w),this.h[0]=E},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:function(t,e,r){"use strict";e.sha1=r(4761),e.sha224=r(799),e.sha256=r(9344),e.sha384=r(772),e.sha512=r(5900)},4761:function(t,e,r){"use strict";var n=r(6436),i=r(5772),o=r(7038),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,l),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],h=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(s(i,5),c(p,o,l,h),d,r[n],f[p]);d=h,h=l,l=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],l),this.h[3]=a(this.h[3],h),this.h[4]=a(this.h[4],d)},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},799:function(t,e,r){"use strict";var n=r(6436),i=r(9344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},9344:function(t,e,r){"use strict";var n=r(6436),i=r(5772),o=r(7038),s=r(9746),a=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var M=c(_,d(v),l(v,b,w),this.k[n],r[n]),A=a(h(i),f(i,o,g));_=w,w=b,b=v,v=a(y,M),y=g,g=o,o=i,i=a(M,A)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],v),this.h[5]=a(this.h[5],b),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},772:function(t,e,r){"use strict";var n=r(6436),i=r(5900);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},5900:function(t,e,r){"use strict";var n=r(6436),i=r(5772),o=r(9746),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,f=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function M(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function A(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function E(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function k(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function R(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=a(t,e,1)^a(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function P(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function C(t,e){var r=a(t,e,19)^a(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(b,y),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=P(r[n-4],r[n-3]),o=C(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],u=R(r[n-30],r[n-29]),c=I(r[n-30],r[n-29]),l=r[n-32],f=r[n-31];r[n]=d(i,o,s,a,u,c,l,f),r[n+1]=p(i,o,s,a,u,c,l,f)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],u=this.h[4],c=this.h[5],d=this.h[6],p=this.h[7],y=this.h[8],v=this.h[9],b=this.h[10],R=this.h[11],I=this.h[12],P=this.h[13],C=this.h[14],T=this.h[15];o(this.k.length===r.length);for(var O=0;O<r.length;O+=2){var N=C,B=T,L=k(y,v),j=S(y,v),q=w(y,v,b,R,I),U=_(y,v,b,R,I,P),F=this.k[O],D=this.k[O+1],z=r[O],H=r[O+1],K=m(N,B,L,j,q,U,F,D,z,H),G=g(N,B,L,j,q,U,F,D,z,H);N=E(n,i),B=x(n,i),L=M(n,i,s,a,u),j=A(n,i,s,a,u,c);var W=f(N,B,L,j),V=h(N,B,L,j);C=I,T=P,I=b,P=R,b=y,R=v,y=f(d,p,K,G),v=h(p,p,K,G),d=u,p=c,u=s,c=a,s=n,a=i,n=f(K,G,W,V),i=h(K,G,W,V)}l(this.h,0,n,i),l(this.h,2,s,a),l(this.h,4,u,c),l(this.h,6,d,p),l(this.h,8,y,v),l(this.h,10,b,R),l(this.h,12,I,P),l(this.h,14,C,T)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7038:function(t,e,r){"use strict";var n=r(6436).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},6436:function(t,e,r){"use strict";var n=r(9746),i=r(5717);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=a,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var c;c="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=c>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,c=e;return u+=(c=c+n>>>0)<e?1:0,u+=(c=c+o>>>0)<o?1:0,t+r+i+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,c){var l=0,f=e;return l+=(f=f+n>>>0)<e?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+a>>>0)<a?1:0,t+r+i+s+u+(l+=(f=f+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,c){return e+n+o+a+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},2156:function(t,e,r){"use strict";var n=r(3715),i=r(4504),o=r(9746);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},9267:function(t,e,r){var n=r(8501),i=r(8575),o=t.exports;for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);function a(t){if("string"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}o.request=function(t,e){return t=a(t),n.request.call(this,t,e)},o.get=function(t,e){return t=a(t),n.get.call(this,t,e)}},645:function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*m}},5717:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2584:function(t,e,r){"use strict";var n=r(6410)(),i=r(1924)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},s=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},5320:function(t){"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(d){d!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(r){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;u.call(h)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(r){}return!1})}t.exports=i?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(n){if(n!==r)return!1}return!s(t)&&a(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return a(t);if(s(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&a(t)}},8662:function(t,e,r){"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(6410)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},3944:function(t){t.exports=function(t){if("string"!=typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},8611:function(t){"use strict";t.exports=function(t){return t!=t}},360:function(t,e,r){"use strict";var n=r(5559),i=r(4289),o=r(8611),s=r(9415),a=r(3194),u=n(s(),Number);i(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},9415:function(t,e,r){"use strict";var n=r(8611);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},3194:function(t,e,r){"use strict";var n=r(4289),i=r(9415);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},5692:function(t,e,r){"use strict";var n=r(4029),i=r(3083),o=r(1924),s=o("Object.prototype.toString"),a=r(6410)(),u=r(5275),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),f=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},h=o("String.prototype.slice"),d={},p=Object.getPrototypeOf;a&&u&&p&&n(l,(function(t){var e=new c[t];if(Symbol.toStringTag in e){var r=p(e),n=u(r,Symbol.toStringTag);if(!n){var i=p(r);n=u(i,Symbol.toStringTag)}d[t]=n.get}}));t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!a||!(Symbol.toStringTag in t)){var e=h(s(t),8,-1);return f(l,e)>-1}return!!u&&function(t){var e=!1;return n(d,(function(r,n){if(!e)try{e=r.call(t)===n}catch(i){}})),e}(t)}},4501:function(t){t.exports=n,n.strict=i,n.loose=o;var e=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function n(t){return i(t)||o(t)}function i(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function o(t){return r[e.call(t)]}},5826:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},1094:function(t,e,r){var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?s=r.g:a&&(s=self);var u=!s.JS_SHA3_NO_COMMON_JS&&t.exports,c=r.amdO,l=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),h=[4,1024,262144,67108864],d=[0,8,16,24],p=[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],m=[224,256,384,512],g=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!l||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var b=function(t,e,r){return function(n){return new N(t,e,t).update(n)[r]()}},w=function(t,e,r){return function(n,i){return new N(t,e,i).update(n)[r]()}},_=function(t,e,r){return function(e,n,i,o){return k["cshake"+t].update(e,n,i,o)[r]()}},M=function(t,e,r){return function(e,n,i,o){return k["kmac"+t].update(e,n,i,o)[r]()}},A=function(t,e,r,n){for(var i=0;i<y.length;++i){var o=y[i];t[o]=e(r,n,o)}return t},E=function(t,e){var r=b(t,e,"hex");return r.create=function(){return new N(t,e,t)},r.update=function(t){return r.create().update(t)},A(r,b,t,e)},x=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:E},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:E},{name:"shake",padding:[31,7936,2031616,520093696],bits:g,createMethod:function(t,e){var r=w(t,e,"hex");return r.create=function(r){return new N(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},A(r,w,t,e)}},{name:"cshake",padding:h,bits:g,createMethod:function(t,e){var r=v[t],n=_(t,0,"hex");return n.create=function(n,i,o){return i||o?new N(t,e,n).bytepad([i,o],r):k["shake"+t].create(n)},n.update=function(t,e,r,i){return n.create(e,r,i).update(t)},A(n,_,t,e)}},{name:"kmac",padding:h,bits:g,createMethod:function(t,e){var r=v[t],n=M(t,0,"hex");return n.create=function(n,i,o){return new B(t,e,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(t,e,r,i){return n.create(t,r,i).update(e)},A(n,M,t,e)}}],k={},S=[],R=0;R<x.length;++R)for(var I=x[R],P=I.bits,C=0;C<P.length;++C){var T=I.name+"_"+P[C];if(S.push(T),k[T]=I.createMethod(P[C],I.padding),"sha3"!==I.name){var O=I.name+P[C];S.push(O),k[O]=k[T]}}function N(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,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;n<50;++n)this.s[n]=0}function B(t,e,r){N.call(this,t,e,r)}N.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(i);if(null===t)throw new Error(i);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw new Error(i);e=!0}for(var n,o,s=this.blocks,a=this.byteCount,u=t.length,c=this.blockCount,f=0,h=this.s;f<u;){if(this.reset)for(this.reset=!1,s[0]=this.block,n=1;n<c+1;++n)s[n]=0;if(e)for(n=this.start;f<u&&n<a;++f)s[n>>2]|=t[f]<<d[3&n++];else for(n=this.start;f<u&&n<a;++f)(o=t.charCodeAt(f))<128?s[n>>2]|=o<<d[3&n++]:o<2048?(s[n>>2]|=(192|o>>6)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]):o<55296||o>=57344?(s[n>>2]|=(224|o>>12)<<d[3&n++],s[n>>2]|=(128|o>>6&63)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++f)),s[n>>2]|=(240|o>>18)<<d[3&n++],s[n>>2]|=(128|o>>12&63)<<d[3&n++],s[n>>2]|=(128|o>>6&63)<<d[3&n++],s[n>>2]|=(128|63&o)<<d[3&n++]);if(this.lastByteIndex=n,n>=a){for(this.start=n-a,this.block=s[c],n=0;n<c;++n)h[n]^=s[n];L(h),this.reset=!0}else this.start=n}return this},N.prototype.encode=function(t,e){var r=255&t,n=1,i=[r];for(r=255&(t>>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(i);if(null===t)throw new Error(i);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw new Error(i);e=!0}var n=0,o=t.length;if(e)n=o;else for(var s=0;s<t.length;++s){var a=t.charCodeAt(s);a<128?n+=1:a<2048?n+=2:a<55296||a>=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(t),n},N.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n<t.length;++n)r+=this.encodeString(t[n]);var i=e-r%e,o=[];return o.length=i,this.update(o),this},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;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;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];L(n)}},N.prototype.toString=N.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a="";s<n;){for(o=0;o<e&&s<n;++o,++s)t=r[o],a+=f[t>>4&15]+f[15&t]+f[t>>12&15]+f[t>>8&15]+f[t>>20&15]+f[t>>16&15]+f[t>>28&15]+f[t>>24&15];s%e==0&&(L(r),o=0)}return i&&(t=r[o],a+=f[t>>4&15]+f[15&t],i>1&&(a+=f[t>>12&15]+f[t>>8&15]),i>2&&(a+=f[t>>20&15]+f[t>>16&15])),a},N.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s<n;){for(o=0;o<e&&s<n;++o,++s)u[s]=r[o];s%e==0&&L(r)}return i&&(u[o]=r[o],t=t.slice(0,a)),t},N.prototype.buffer=N.prototype.arrayBuffer,N.prototype.digest=N.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,u=[];a<i;){for(s=0;s<r&&a<i;++s,++a)t=a<<2,e=n[s],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r==0&&L(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},B.prototype=new N,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,a,u,c,l,f,h,d,m,g,y,v,b,w,_,M,A,E,x,k,S,R,I,P,C,T,O,N,B,L,j,q,U,F,D,z,H,K,G,W,V,Z,J,Y,Q,X,$,tt,et,rt,nt,it,ot,st,at,ut,ct,lt;for(n=0;n<48;n+=2)i=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],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],e=(h=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>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^(u<<1|c>>>31),r=o^(c<<1|u>>>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=s^(l<<1|f>>>31),r=a^(f<<1|l>>>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=u^(h<<1|d>>>31),r=c^(d<<1|h>>>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=l^(i<<1|o>>>31),r=f^(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],g=t[1],V=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,I=t[20]<<3|t[21]>>>29,P=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,K=t[41]<<18|t[40]>>>14,B=t[2]<<1|t[3]>>>31,L=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Y=t[23]<<10|t[22]>>>22,C=t[33]<<13|t[32]>>>19,T=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,lt=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,j=t[14]<<6|t[15]>>>26,q=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,Q=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,O=t[45]<<29|t[44]>>>3,N=t[44]<<29|t[45]>>>3,x=t[6]<<28|t[7]>>>4,k=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,F=t[27]<<25|t[26]>>>7,_=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,G=t[8]<<27|t[9]>>>5,W=t[9]<<27|t[8]>>>5,S=t[18]<<20|t[19]>>>12,R=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,D=t[38]<<8|t[39]>>>24,z=t[39]<<8|t[38]>>>24,A=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=m^~y&b,t[1]=g^~v&w,t[10]=x^~S&I,t[11]=k^~R&P,t[20]=B^~j&U,t[21]=L^~q&F,t[30]=G^~V&J,t[31]=W^~Z&Y,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=y^~b&_,t[3]=v^~w&M,t[12]=S^~I&C,t[13]=R^~P&T,t[22]=j^~U&D,t[23]=q^~F&z,t[32]=V^~J&Q,t[33]=Z^~Y&X,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=b^~_&A,t[5]=w^~M&E,t[14]=I^~C&O,t[15]=P^~T&N,t[24]=U^~D&H,t[25]=F^~z&K,t[34]=J^~Q&$,t[35]=Y^~X&tt,t[44]=ot^~at&ct,t[45]=st^~ut<,t[6]=_^~A&m,t[7]=M^~E&g,t[16]=C^~O&x,t[17]=T^~N&k,t[26]=D^~H&B,t[27]=z^~K&L,t[36]=Q^~$&G,t[37]=X^~tt&W,t[46]=at^~ct&et,t[47]=ut^~lt&rt,t[8]=A^~m&y,t[9]=E^~g&v,t[18]=O^~x&S,t[19]=N^~k&R,t[28]=H^~B&j,t[29]=K^~L&q,t[38]=$^~G&V,t[39]=tt^~W&Z,t[48]=ct^~et&nt,t[49]=lt^~rt&it,t[0]^=p[n],t[1]^=p[n+1]};if(u)t.exports=k;else{for(R=0;R<S.length;++R)s[S[R]]=k[S[R]];c&&(void 0===(n=function(){return k}.call(e,r,e,t))||(t.exports=n))}}()},1497:function(t){t.exports=function(t){return(e,r,n,i)=>{let o;const s=new Promise((t=>{o=t}));let a,u;t(e,r,(async()=>{u=!0,n((t=>{a=t,o()})),await s})).then((async()=>{u?(await s,a(null)):i(null)})).catch((t=>{a?a(t):i(t)}))}}},2121:function(t){t.exports=function(t){return(e,r,n,i)=>{const o=t[e.method];return void 0===o?n():"function"==typeof o?o(e,r,n,i):(r.result=o,i())}}},3420:function(t){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},7266:function(t,e,r){var n="undefined"!=typeof JSON?JSON:r(8418);t.exports=function(t,e){e||(e={}),"function"==typeof e&&(e={cmp:e});var r=e.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var s,a="boolean"==typeof e.cycles&&e.cycles,u=e.replacer||function(t,e){return e},c=e.cmp&&(s=e.cmp,function(t){return function(e,r){var n={key:e,value:t[e]},i={key:r,value:t[r]};return s(n,i)}}),l=[];return function t(e,s,f,h){var d=r?"\n"+new Array(h+1).join(r):"",p=r?": ":":";if(f&&f.toJSON&&"function"==typeof f.toJSON&&(f=f.toJSON()),void 0!==(f=u.call(e,s,f))){if("object"!=typeof f||null===f)return n.stringify(f);if(i(f)){for(var m=[],g=0;g<f.length;g++){var y=t(f,g,f[g],h+1)||n.stringify(null);m.push(d+r+y)}return"["+m.join(",")+d+"]"}if(-1!==l.indexOf(f)){if(a)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}l.push(f);var v=o(f).sort(c&&c(f));for(m=[],g=0;g<v.length;g++){var b=t(f,s=v[g],f[s],h+1);if(b){var w=n.stringify(s)+p+b;m.push(d+r+w)}}return l.splice(l.indexOf(f),1),"{"+m.join(",")+d+"}"}}({"":t},"",t,0)};var i=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},o=Object.keys||function(t){var e=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in t)e.call(t,n)&&r.push(n);return r}},8418:function(t,e,r){e.parse=r(1396),e.stringify=r(6177)},1396:function(t){var e,r,n,i,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},s=function(t){throw{name:"SyntaxError",message:t,at:e,text:n}},a=function(t){return t&&t!==r&&s("Expected '"+t+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r},u=function(){var t,e="";for("-"===r&&(e="-",a("-"));r>="0"&&r<="9";)e+=r,a();if("."===r)for(e+=".";a()&&r>="0"&&r<="9";)e+=r;if("e"===r||"E"===r)for(e+=r,a(),"-"!==r&&"+"!==r||(e+=r,a());r>="0"&&r<="9";)e+=r,a();if(t=+e,isFinite(t))return t;s("Bad number")},c=function(){var t,e,n,i="";if('"'===r)for(;a();){if('"'===r)return a(),i;if("\\"===r)if(a(),"u"===r){for(n=0,e=0;e<4&&(t=parseInt(a(),16),isFinite(t));e+=1)n=16*n+t;i+=String.fromCharCode(n)}else{if("string"!=typeof o[r])break;i+=o[r]}else i+=r}s("Bad string")},l=function(){for(;r&&r<=" ";)a()};i=function(){switch(l(),r){case"{":return function(){var t,e={};if("{"===r){if(a("{"),l(),"}"===r)return a("}"),e;for(;r;){if(t=c(),l(),a(":"),Object.hasOwnProperty.call(e,t)&&s('Duplicate key "'+t+'"'),e[t]=i(),l(),"}"===r)return a("}"),e;a(","),l()}}s("Bad object")}();case"[":return function(){var t=[];if("["===r){if(a("["),l(),"]"===r)return a("]"),t;for(;r;){if(t.push(i()),l(),"]"===r)return a("]"),t;a(","),l()}}s("Bad array")}();case'"':return c();case"-":return u();default:return r>="0"&&r<="9"?u():function(){switch(r){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}s("Unexpected '"+r+"'")}()}},t.exports=function(t,o){var a;return n=t,e=0,r=" ",a=i(),l(),r&&s("Syntax error"),"function"==typeof o?function t(e,r){var n,i,s=e[r];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(void 0!==(i=t(s,n))?s[n]=i:delete s[n]);return o.call(e,r,s)}({"":a},""):a}},6177:function(t){var e,r,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,(function(t){var e=o[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function a(t,i){var o,u,c,l,f,h=e,d=i[t];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(t)),"function"==typeof n&&(d=n.call(i,t,d)),typeof d){case"string":return s(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(e+=r,f=[],"[object Array]"===Object.prototype.toString.apply(d)){for(l=d.length,o=0;o<l;o+=1)f[o]=a(o,d)||"null";return c=0===f.length?"[]":e?"[\n"+e+f.join(",\n"+e)+"\n"+h+"]":"["+f.join(",")+"]",e=h,c}if(n&&"object"==typeof n)for(l=n.length,o=0;o<l;o+=1)"string"==typeof(u=n[o])&&(c=a(u,d))&&f.push(s(u)+(e?": ":":")+c);else for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c=a(u,d))&&f.push(s(u)+(e?": ":":")+c);return c=0===f.length?"{}":e?"{\n"+e+f.join(",\n"+e)+"\n"+h+"}":"{"+f.join(",")+"}",e=h,c}}t.exports=function(t,i,o){var s;if(e="",r="","number"==typeof o)for(s=0;s<o;s+=1)r+=" ";else"string"==typeof o&&(r=o);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return a("",{"":t})}},5811:function(t,e,r){t.exports=r(6066)(r(9483))},6066:function(t,e,r){const n=r(7016),i=r(5675);t.exports=function(t){const e=n(t),r=i(t);return function(t,n){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+t)}}}},7016:function(t,e,r){var n=r(8764).Buffer;const{Transform:i}=r(8473);t.exports=t=>class e extends i{constructor(e,r,n,i,o){super(o),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(i){n=i}r(n)}_flush(t){let e=null;try{this.push(this.digest())}catch(r){e=r}t(e)}update(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},5675:function(t,e,r){var n=r(8764).Buffer;const{Transform:i}=r(8473);t.exports=t=>class e extends i{constructor(e,r,n,i){super(i),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(i){n=i}r(n)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},4040:function(t,e){const r=[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];e.p1600=function(t){for(let e=0;e<24;++e){const n=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=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],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],f=t[8]^t[18]^t[28]^t[38]^t[48],h=t[9]^t[19]^t[29]^t[39]^t[49];let d=f^(o<<1|s>>>31),p=h^(s<<1|o>>>31);const m=t[0]^d,g=t[1]^p,y=t[10]^d,v=t[11]^p,b=t[20]^d,w=t[21]^p,_=t[30]^d,M=t[31]^p,A=t[40]^d,E=t[41]^p;d=n^(a<<1|u>>>31),p=i^(u<<1|a>>>31);const x=t[2]^d,k=t[3]^p,S=t[12]^d,R=t[13]^p,I=t[22]^d,P=t[23]^p,C=t[32]^d,T=t[33]^p,O=t[42]^d,N=t[43]^p;d=o^(c<<1|l>>>31),p=s^(l<<1|c>>>31);const B=t[4]^d,L=t[5]^p,j=t[14]^d,q=t[15]^p,U=t[24]^d,F=t[25]^p,D=t[34]^d,z=t[35]^p,H=t[44]^d,K=t[45]^p;d=a^(f<<1|h>>>31),p=u^(h<<1|f>>>31);const G=t[6]^d,W=t[7]^p,V=t[16]^d,Z=t[17]^p,J=t[26]^d,Y=t[27]^p,Q=t[36]^d,X=t[37]^p,$=t[46]^d,tt=t[47]^p;d=c^(n<<1|i>>>31),p=l^(i<<1|n>>>31);const et=t[8]^d,rt=t[9]^p,nt=t[18]^d,it=t[19]^p,ot=t[28]^d,st=t[29]^p,at=t[38]^d,ut=t[39]^p,ct=t[48]^d,lt=t[49]^p,ft=m,ht=g,dt=v<<4|y>>>28,pt=y<<4|v>>>28,mt=b<<3|w>>>29,gt=w<<3|b>>>29,yt=M<<9|_>>>23,vt=_<<9|M>>>23,bt=A<<18|E>>>14,wt=E<<18|A>>>14,_t=x<<1|k>>>31,Mt=k<<1|x>>>31,At=R<<12|S>>>20,Et=S<<12|R>>>20,xt=I<<10|P>>>22,kt=P<<10|I>>>22,St=T<<13|C>>>19,Rt=C<<13|T>>>19,It=O<<2|N>>>30,Pt=N<<2|O>>>30,Ct=L<<30|B>>>2,Tt=B<<30|L>>>2,Ot=j<<6|q>>>26,Nt=q<<6|j>>>26,Bt=F<<11|U>>>21,Lt=U<<11|F>>>21,jt=D<<15|z>>>17,qt=z<<15|D>>>17,Ut=K<<29|H>>>3,Ft=H<<29|K>>>3,Dt=G<<28|W>>>4,zt=W<<28|G>>>4,Ht=Z<<23|V>>>9,Kt=V<<23|Z>>>9,Gt=J<<25|Y>>>7,Wt=Y<<25|J>>>7,Vt=Q<<21|X>>>11,Zt=X<<21|Q>>>11,Jt=tt<<24|$>>>8,Yt=$<<24|tt>>>8,Qt=et<<27|rt>>>5,Xt=rt<<27|et>>>5,$t=nt<<20|it>>>12,te=it<<20|nt>>>12,ee=st<<7|ot>>>25,re=ot<<7|st>>>25,ne=at<<8|ut>>>24,ie=ut<<8|at>>>24,oe=ct<<14|lt>>>18,se=lt<<14|ct>>>18;t[0]=ft^~At&Bt,t[1]=ht^~Et&Lt,t[10]=Dt^~$t&mt,t[11]=zt^~te>,t[20]=_t^~Ot&Gt,t[21]=Mt^~Nt&Wt,t[30]=Qt^~dt&xt,t[31]=Xt^~pt&kt,t[40]=Ct^~Ht&ee,t[41]=Tt^~Kt&re,t[2]=At^~Bt&Vt,t[3]=Et^~Lt&Zt,t[12]=$t^~mt&St,t[13]=te^~gt&Rt,t[22]=Ot^~Gt&ne,t[23]=Nt^~Wt&ie,t[32]=dt^~xt&jt,t[33]=pt^~kt&qt,t[42]=Ht^~ee&yt,t[43]=Kt^~re&vt,t[4]=Bt^~Vt&oe,t[5]=Lt^~Zt&se,t[14]=mt^~St&Ut,t[15]=gt^~Rt&Ft,t[24]=Gt^~ne&bt,t[25]=Wt^~ie&wt,t[34]=xt^~jt&Jt,t[35]=kt^~qt&Yt,t[44]=ee^~yt&It,t[45]=re^~vt&Pt,t[6]=Vt^~oe&ft,t[7]=Zt^~se&ht,t[16]=St^~Ut&Dt,t[17]=Rt^~Ft&zt,t[26]=ne^~bt&_t,t[27]=ie^~wt&Mt,t[36]=jt^~Jt&Qt,t[37]=qt^~Yt&Xt,t[46]=yt^~It&Ct,t[47]=vt^~Pt&Tt,t[8]=oe^~ft&At,t[9]=se^~ht&Et,t[18]=Ut^~Dt&$t,t[19]=Ft^~zt&te,t[28]=bt^~_t&Ot,t[29]=wt^~Mt&Nt,t[38]=Jt^~Qt&dt,t[39]=Yt^~Xt&pt,t[48]=It^~Ct&Ht,t[49]=Pt^~Tt&Kt,t[0]^=r[2*e],t[1]^=r[2*e+1]}}},9483:function(t,e,r){var n=r(8764).Buffer;const i=r(4040);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},o.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},o.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=n.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},2705:function(t,e,r){var n=r(5639).Symbol;t.exports=n},4636:function(t,e,r){var n=r(2545),i=r(5694),o=r(1469),s=r(4144),a=r(213),u=r(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),l=!r&&i(t),f=!r&&!l&&s(t),h=!r&&!l&&!f&&u(t),d=r||l||f||h,p=d?n(t.length,String):[],m=p.length;for(var g in t)!e&&!c.call(t,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||p.push(g);return p}},4239:function(t,e,r){var n=r(2705),i=r(9607),o=r(2333),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},9454:function(t,e,r){var n=r(4239),i=r(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},8749:function(t,e,r){var n=r(4239),i=r(1780),o=r(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[n(t)]}},280:function(t,e,r){var n=r(5726),i=r(6916),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},2545:function(t){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},7518:function(t){t.exports=function(t){return function(e){return t(e)}}},1957:function(t,e,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},9607:function(t,e,r){var n=r(2705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(u){}var i=s.call(t);return n&&(e?t[a]=r:delete t[a]),i}},213:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},5726:function(t){var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},6916:function(t,e,r){var n=r(5569)(Object.keys,Object);t.exports=n},1167:function(t,e,r){t=r.nmd(t);var n=r(1957),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i&&n.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=a},2333:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:function(t){t.exports=function(t,e){return function(r){return t(e(r))}}},5639:function(t,e,r){var n=r(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},5694:function(t,e,r){var n=r(9454),i=r(7005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},1469:function(t){var e=Array.isArray;t.exports=e},1240:function(t,e,r){var n=r(3560),i=r(1780);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},4144:function(t,e,r){t=r.nmd(t);var n=r(5639),i=r(5062),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u},3560:function(t,e,r){var n=r(4239),i=r(3218);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},6719:function(t,e,r){var n=r(8749),i=r(7518),o=r(1167),s=o&&o.isTypedArray,a=s?i(s):n;t.exports=a},3674:function(t,e,r){var n=r(4636),i=r(280),o=r(1240);t.exports=function(t){return o(t)?n(t):i(t)}},308:function(t){t.exports=function(){}},5062:function(t){t.exports=function(){return!1}},2318:function(t,e,r){"use strict";var n=r(5717),i=r(3349),o=r(9509).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function c(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,t[0],3614090360,7),o=c(o,r,n,i,t[1],3905402710,12),i=c(i,o,r,n,t[2],606105819,17),n=c(n,i,o,r,t[3],3250441966,22),r=c(r,n,i,o,t[4],4118548399,7),o=c(o,r,n,i,t[5],1200080426,12),i=c(i,o,r,n,t[6],2821735955,17),n=c(n,i,o,r,t[7],4249261313,22),r=c(r,n,i,o,t[8],1770035416,7),o=c(o,r,n,i,t[9],2336552879,12),i=c(i,o,r,n,t[10],4294925233,17),n=c(n,i,o,r,t[11],2304563134,22),r=c(r,n,i,o,t[12],1804603682,7),o=c(o,r,n,i,t[13],4254626195,12),i=c(i,o,r,n,t[14],2792965006,17),r=l(r,n=c(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=l(o,r,n,i,t[6],3225465664,9),i=l(i,o,r,n,t[11],643717713,14),n=l(n,i,o,r,t[0],3921069994,20),r=l(r,n,i,o,t[5],3593408605,5),o=l(o,r,n,i,t[10],38016083,9),i=l(i,o,r,n,t[15],3634488961,14),n=l(n,i,o,r,t[4],3889429448,20),r=l(r,n,i,o,t[9],568446438,5),o=l(o,r,n,i,t[14],3275163606,9),i=l(i,o,r,n,t[3],4107603335,14),n=l(n,i,o,r,t[8],1163531501,20),r=l(r,n,i,o,t[13],2850285829,5),o=l(o,r,n,i,t[2],4243563512,9),i=l(i,o,r,n,t[7],1735328473,14),r=f(r,n=l(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=f(o,r,n,i,t[8],2272392833,11),i=f(i,o,r,n,t[11],1839030562,16),n=f(n,i,o,r,t[14],4259657740,23),r=f(r,n,i,o,t[1],2763975236,4),o=f(o,r,n,i,t[4],1272893353,11),i=f(i,o,r,n,t[7],4139469664,16),n=f(n,i,o,r,t[10],3200236656,23),r=f(r,n,i,o,t[13],681279174,4),o=f(o,r,n,i,t[0],3936430074,11),i=f(i,o,r,n,t[3],3572445317,16),n=f(n,i,o,r,t[6],76029189,23),r=f(r,n,i,o,t[9],3654602809,4),o=f(o,r,n,i,t[12],3873151461,11),i=f(i,o,r,n,t[15],530742520,16),r=h(r,n=f(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,r,n,i,t[7],1126891415,10),i=h(i,o,r,n,t[14],2878612391,15),n=h(n,i,o,r,t[5],4237533241,21),r=h(r,n,i,o,t[12],1700485571,6),o=h(o,r,n,i,t[3],2399980690,10),i=h(i,o,r,n,t[10],4293915773,15),n=h(n,i,o,r,t[1],2240044497,21),r=h(r,n,i,o,t[8],1873313359,6),o=h(o,r,n,i,t[15],4264355552,10),i=h(i,o,r,n,t[6],2734768916,15),n=h(n,i,o,r,t[13],1309151649,21),r=h(r,n,i,o,t[4],4149444226,6),o=h(o,r,n,i,t[11],3174756917,10),i=h(i,o,r,n,t[2],718787259,15),n=h(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},9746:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},4504:function(t,e){"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},4244:function(t){"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},609:function(t,e,r){"use strict";var n=r(4289),i=r(5559),o=r(4244),s=r(5624),a=r(2281),u=i(s(),Object);n(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},5624:function(t,e,r){"use strict";var n=r(4244);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},2281:function(t,e,r){"use strict";var n=r(5624),i=r(4289);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8987:function(t,e,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(1414),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=s(t),a=e&&"[object String]"===o.call(t),h=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(a&&t.length>0&&!i.call(t,0))for(var m=0;m<t.length;++m)h.push(String(m));if(n&&t.length>0)for(var g=0;g<t.length;++g)h.push(String(g));else for(var y in t)p&&"prototype"===y||!i.call(t,y)||h.push(String(y));if(u)for(var v=function(t){if("undefined"==typeof window||!d)return f(t);try{return f(t)}catch(e){return!1}}(t),b=0;b<l.length;++b)v&&"constructor"===l[b]||!i.call(t,l[b])||h.push(l[b]);return h}}t.exports=n},2215:function(t,e,r){"use strict";var n=Array.prototype.slice,i=r(1414),o=Object.keys,s=o?function(t){return o(t)}:r(8987),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(n.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},1414:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},7435:function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},2352:function(t){"use strict";const e=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let t=0;t<arguments.length;t++)n[t]=arguments[t];return new r(((r,i)=>{e.errorFirst?n.push((function(t,n){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):r(e)}else t?i(t):r(n)})):n.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];r(t)}else r(t)})),t.apply(this,n)}))};t.exports=(t,r)=>{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=t=>{const e=e=>"string"==typeof e?t===e:e.test(t);return r.include?r.include.some(e):!r.exclude.some(e)};let i;i="function"==typeof t?function(){return r.excludeMain?t.apply(this,arguments):e(t,r).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const o in t){const s=t[o];i[o]="function"==typeof s&&n(o)?e(s,r):s}return i}},5776:function(t,e,r){"use strict";r.r(e),r.d(e,{Children:function(){return vt},Component:function(){return b},Fragment:function(){return v},PureComponent:function(){return dt},Suspense:function(){return _t},SuspenseList:function(){return Et},cloneElement:function(){return Ft},createContext:function(){return q},createElement:function(){return m},createFactory:function(){return qt},createPortal:function(){return Rt},createRef:function(){return y},default:function(){return Kt},findDOMNode:function(){return zt},forwardRef:function(){return gt},hydrate:function(){return Tt},isValidElement:function(){return Ut},lazy:function(){return At},memo:function(){return pt},render:function(){return Ct},unmountComponentAtNode:function(){return Dt},unstable_batchedUpdates:function(){return Ht},useCallback:function(){return rt},useContext:function(){return nt},useDebugValue:function(){return it},useEffect:function(){return Q},useErrorBoundary:function(){return ot},useImperativeHandle:function(){return tt},useLayoutEffect:function(){return X},useMemo:function(){return et},useReducer:function(){return Y},useRef:function(){return $},useState:function(){return J},version:function(){return jt}});var n,i,o,s,a,u,c,l={},f=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function m(t,e,r){var n,i=arguments,o={};for(n in e)"key"!==n&&"ref"!==n&&(o[n]=e[n]);if(arguments.length>3)for(r=[r],n=3;n<arguments.length;n++)r.push(i[n]);if(null!=r&&(o.children=r),"function"==typeof t&&null!=t.defaultProps)for(n in t.defaultProps)void 0===o[n]&&(o[n]=t.defaultProps[n]);return g(t,o,e&&e.key,e&&e.ref,null)}function g(t,e,r,i,o){var s={type:t,props:e,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(s.__v=s),n.vnode&&n.vnode(s),s}function y(){return{}}function v(t){return t.children}function b(t,e){this.props=t,this.context=e}function w(t,e){if(null==e)return t.__?w(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?w(t):null}function _(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return _(t)}}function M(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!o++||a!==n.debounceRendering)&&((a=n.debounceRendering)||s)(A)}function A(){for(var t;o=i.length;)t=i.sort((function(t,e){return t.__v.__b-e.__v.__b})),i=[],t.some((function(t){var e,r,n,i,o,s,a;t.__d&&(s=(o=(e=t).__v).__e,(a=e.__P)&&(r=[],(n=d({},o)).__v=n,i=I(a,o,n,e.__n,void 0!==a.ownerSVGElement,null,r,null==s?w(o):s),P(r,o),i!=s&&_(o)))}))}function E(t,e,r,n,i,o,s,a,u){var c,h,d,m,g,y,v,b=r&&r.__k||f,_=b.length;if(a==l&&(a=null!=o?o[0]:_?w(r,0):null),c=0,e.__k=x(e.__k,(function(r){if(null!=r){if(r.__=e,r.__b=e.__b+1,null===(d=b[c])||d&&r.key==d.key&&r.type===d.type)b[c]=void 0;else for(h=0;h<_;h++){if((d=b[h])&&r.key==d.key&&r.type===d.type){b[h]=void 0;break}d=null}if(m=I(t,r,d=d||l,n,i,o,s,a,u),(h=r.ref)&&d.ref!=h&&(v||(v=[]),d.ref&&v.push(d.ref,null,r),v.push(h,r.__c||m,r)),null!=m){var f;if(null==y&&(y=m),void 0!==r.__d)f=r.__d,r.__d=void 0;else if(o==d||m!=a||null==m.parentNode){t:if(null==a||a.parentNode!==t)t.appendChild(m),f=null;else{for(g=a,h=0;(g=g.nextSibling)&&h<_;h+=2)if(g==m)break t;t.insertBefore(m,a),f=a}"option"==e.type&&(t.value="")}a=void 0!==f?f:m.nextSibling,"function"==typeof e.type&&(e.__d=a)}else a&&d.__e==a&&a.parentNode!=t&&(a=w(d))}return c++,r})),e.__e=y,null!=o&&"function"!=typeof e.type)for(c=o.length;c--;)null!=o[c]&&p(o[c]);for(c=_;c--;)null!=b[c]&&O(b[c],b[c]);if(v)for(c=0;c<v.length;c++)T(v[c],v[++c],v[++c])}function x(t,e,r){if(null==r&&(r=[]),null==t||"boolean"==typeof t)e&&r.push(e(null));else if(Array.isArray(t))for(var n=0;n<t.length;n++)x(t[n],e,r);else r.push(e?e("string"==typeof t||"number"==typeof t?g(null,t,null,null,t):null!=t.__e||null!=t.__c?g(t.type,t.props,t.key,null,t.__v):t):t);return r}function k(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]="number"==typeof r&&!1===h.test(e)?r+"px":null==r?"":r}function S(t,e,r,n,i){var o,s,a,u,c;if(i?"className"===e&&(e="class"):"class"===e&&(e="className"),"style"===e)if(o=t.style,"string"==typeof r)o.cssText=r;else{if("string"==typeof n&&(o.cssText="",n=null),n)for(u in n)r&&u in r||k(o,u,"");if(r)for(c in r)n&&r[c]===n[c]||k(o,c,r[c])}else"o"===e[0]&&"n"===e[1]?(s=e!==(e=e.replace(/Capture$/,"")),a=e.toLowerCase(),e=(a in t?a:e).slice(2),r?(n||t.addEventListener(e,R,s),(t.l||(t.l={}))[e]=r):t.removeEventListener(e,R,s)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&!i&&e in t?t[e]=null==r?"":r:"function"!=typeof r&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==r||!1===r?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),r):null==r||!1===r&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,r))}function R(t){this.l[t.type](n.event?n.event(t):t)}function I(t,e,r,i,o,s,a,u,c){var l,f,h,p,m,g,y,w,_,M,A=e.type;if(void 0!==e.constructor)return null;(l=n.__b)&&l(e);try{t:if("function"==typeof A){if(w=e.props,_=(l=A.contextType)&&i[l.__c],M=l?_?_.props.value:l.__:i,r.__c?y=(f=e.__c=r.__c).__=f.__E:("prototype"in A&&A.prototype.render?e.__c=f=new A(w,M):(e.__c=f=new b(w,M),f.constructor=A,f.render=N),_&&_.sub(f),f.props=w,f.state||(f.state={}),f.context=M,f.__n=i,h=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=A.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=d({},f.__s)),d(f.__s,A.getDerivedStateFromProps(w,f.__s))),p=f.props,m=f.state,h)null==A.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==A.getDerivedStateFromProps&&w!==p&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(w,M),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(w,f.__s,M)||e.__v===r.__v&&!f.__){for(f.props=w,f.state=f.__s,e.__v!==r.__v&&(f.__d=!1),f.__v=e,e.__e=r.__e,e.__k=r.__k,f.__h.length&&a.push(f),l=0;l<e.__k.length;l++)e.__k[l]&&(e.__k[l].__=e);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(w,f.__s,M),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(p,m,g)}))}f.context=M,f.props=w,f.state=f.__s,(l=n.__r)&&l(e),f.__d=!1,f.__v=e,f.__P=t,l=f.render(f.props,f.state,f.context),e.__k=null!=l&&l.type==v&&null==l.key?l.props.children:Array.isArray(l)?l:[l],null!=f.getChildContext&&(i=d(d({},i),f.getChildContext())),h||null==f.getSnapshotBeforeUpdate||(g=f.getSnapshotBeforeUpdate(p,m)),E(t,e,r,i,o,s,a,u,c),f.base=e.__e,f.__h.length&&a.push(f),y&&(f.__E=f.__=null),f.__e=!1}else null==s&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=C(r.__e,e,r,i,o,s,a,c);(l=n.diffed)&&l(e)}catch(t){e.__v=null,n.__e(t,e,r)}return e.__e}function P(t,e){n.__c&&n.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){n.__e(t,e.__v)}}))}function C(t,e,r,n,i,o,s,a){var u,c,h,d,p,m=r.props,g=e.props;if(i="svg"===e.type||i,null!=o)for(u=0;u<o.length;u++)if(null!=(c=o[u])&&((null===e.type?3===c.nodeType:c.localName===e.type)||t==c)){t=c,o[u]=null;break}if(null==t){if(null===e.type)return document.createTextNode(g);t=i?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,g.is&&{is:g.is}),o=null,a=!1}if(null===e.type)m!==g&&t.data!=g&&(t.data=g);else{if(null!=o&&(o=f.slice.call(t.childNodes)),h=(m=r.props||l).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===l)for(m={},p=0;p<t.attributes.length;p++)m[t.attributes[p].name]=t.attributes[p].value;(d||h)&&(d&&h&&d.__html==h.__html||(t.innerHTML=d&&d.__html||""))}(function(t,e,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in e||S(t,o,null,r[o],n);for(o in e)i&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===e[o]||S(t,o,e[o],r[o],n)})(t,g,m,i,a),d?e.__k=[]:(e.__k=e.props.children,E(t,e,r,n,"foreignObject"!==e.type&&i,o,s,l,a)),a||("value"in g&&void 0!==(u=g.value)&&u!==t.value&&S(t,"value",u,m.value,!1),"checked"in g&&void 0!==(u=g.checked)&&u!==t.checked&&S(t,"checked",u,m.checked,!1))}return t}function T(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){n.__e(t,r)}}function O(t,e,r){var i,o,s;if(n.unmount&&n.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||T(i,null,e)),r||"function"==typeof t.type||(r=null!=(o=t.__e)),t.__e=t.__d=void 0,null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){n.__e(t,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&O(i[s],e,r);null!=o&&p(o)}function N(t,e,r){return this.constructor(t,r)}function B(t,e,r){var i,o,s;n.__&&n.__(t,e),o=(i=r===u)?null:r&&r.__k||e.__k,t=m(v,null,[t]),s=[],I(e,(i?e:r||e).__k=t,o||l,l,void 0!==e.ownerSVGElement,r&&!i?[r]:o?null:f.slice.call(e.childNodes),s,r||l,i),P(s,t)}function L(t,e){B(t,e,u)}function j(t,e){var r,n;for(n in e=d(d({},t.props),e),arguments.length>2&&(e.children=f.slice.call(arguments,2)),r={},e)"key"!==n&&"ref"!==n&&(r[n]=e[n]);return g(t.type,r,e.key||t.key,e.ref||t.ref,null)}function q(t){var e={},r={__c:"__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i=this;return this.getChildContext||(n=[],this.getChildContext=function(){return e[r.__c]=i,e},this.shouldComponentUpdate=function(t){i.props.value!==t.value&&n.some((function(e){e.context=t.value,M(e)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}n={__e:function(t,e){for(var r,n;e=e.__;)if((r=e.__c)&&!r.__)try{if(r.constructor&&null!=r.constructor.getDerivedStateFromError&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(t))),null!=r.componentDidCatch&&(n=!0,r.componentDidCatch(t)),n)return M(r.__E=r)}catch(e){t=e}throw t}},b.prototype.setState=function(t,e){var r;r=this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(r,this.props)),t&&d(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),M(this))},b.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),M(this))},b.prototype.render=v,i=[],o=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=l,c=0;var U,F,D,z=0,H=[],K=n.__r,G=n.diffed,W=n.__c,V=n.unmount;function Z(t,e){n.__h&&n.__h(F,t,z||e),z=0;var r=F.__H||(F.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function J(t){return z=1,Y(lt,t)}function Y(t,e,r){var n=Z(U++,2);return n.__c||(n.__c=F,n.__=[r?r(e):lt(void 0,e),function(e){var r=t(n.__[0],e);n.__[0]!==r&&(n.__[0]=r,n.__c.setState({}))}]),n.__}function Q(t,e){var r=Z(U++,3);!n.__s&&ct(r.__H,e)&&(r.__=t,r.__H=e,F.__H.__h.push(r))}function X(t,e){var r=Z(U++,4);!n.__s&&ct(r.__H,e)&&(r.__=t,r.__H=e,F.__h.push(r))}function $(t){return z=5,et((function(){return{current:t}}),[])}function tt(t,e,r){z=6,X((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))}function et(t,e){var r=Z(U++,7);return ct(r.__H,e)?(r.__H=e,r.__h=t,r.__=t()):r.__}function rt(t,e){return z=8,et((function(){return t}),e)}function nt(t){var e=F.context[t.__c],r=Z(U++,9);return r.__c=t,e?(null==r.__&&(r.__=!0,e.sub(F)),e.props.value):t.__}function it(t,e){n.useDebugValue&&n.useDebugValue(e?e(t):t)}function ot(t){var e=Z(U++,10),r=J();return e.__=t,F.componentDidCatch||(F.componentDidCatch=function(t){e.__&&e.__(t),r[1](t)}),[r[0],function(){r[1](void 0)}]}function st(){H.some((function(t){if(t.__P)try{t.__H.__h.forEach(at),t.__H.__h.forEach(ut),t.__H.__h=[]}catch(i){return t.__H.__h=[],n.__e(i,t.__v),!0}})),H=[]}function at(t){t.t&&t.t()}function ut(t){var e=t.__();"function"==typeof e&&(t.t=e)}function ct(t,e){return!t||e.some((function(e,r){return e!==t[r]}))}function lt(t,e){return"function"==typeof e?e(t):e}function ft(t,e){for(var r in e)t[r]=e[r];return t}function ht(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}n.__r=function(t){K&&K(t),U=0,(F=t.__c).__H&&(F.__H.__h.forEach(at),F.__H.__h.forEach(ut),F.__H.__h=[])},n.diffed=function(t){G&&G(t);var e=t.__c;if(e){var r=e.__H;r&&r.__h.length&&(1!==H.push(e)&&D===n.requestAnimationFrame||((D=n.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);"undefined"!=typeof window&&(e=requestAnimationFrame(r))})(st))}},n.__c=function(t,e){e.some((function(t){try{t.__h.forEach(at),t.__h=t.__h.filter((function(t){return!t.__||ut(t)}))}catch(a){e.some((function(t){t.__h&&(t.__h=[])})),e=[],n.__e(a,t.__v)}})),W&&W(t,e)},n.unmount=function(t){V&&V(t);var e=t.__c;if(e){var r=e.__H;if(r)try{r.__.forEach((function(t){return t.t&&t.t()}))}catch(t){n.__e(t,e.__v)}}};var dt=function(t){var e,r;function n(e){var r;return(r=t.call(this,e)||this).isPureReactComponent=!0,r}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.shouldComponentUpdate=function(t,e){return ht(this.props,t)||ht(this.state,e)},n}(b);function pt(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:ht(this.props,t)}function n(e){return this.shouldComponentUpdate=r,m(t,ft({},e))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(t.displayName||t.name)+")",n.t=!0,n}var mt=n.__b;function gt(t){function e(e){var r=ft({},e);return delete r.ref,t(r,e.ref)}return e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}n.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),mt&&mt(t)};var yt=function(t,e){return t?x(t).reduce((function(t,r,n){return t.concat(e(r,n))}),[]):null},vt={map:yt,forEach:yt,count:function(t){return t?x(t).length:0},only:function(t){if(1!==(t=x(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:x},bt=n.__e;function wt(t){return t&&((t=ft({},t)).__c=null,t.__k=t.__k&&t.__k.map(wt)),t}function _t(){this.__u=0,this.o=null,this.__b=null}function Mt(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function At(t){var e,r,n;function i(i){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return m(r,i)}return i.displayName="Lazy",i.t=!0,i}function Et(){this.i=null,this.l=null}n.__e=function(t,e,r){if(t.then)for(var n,i=e;i=i.__;)if((n=i.__c)&&n.__c)return n.__c(t,e.__c);bt(t,e,r)},(_t.prototype=new b).__c=function(t,e){var r=this;null==r.o&&(r.o=[]),r.o.push(e);var n=Mt(r.__v),i=!1,o=function(){i||(i=!0,n?n(s):s())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){o(),e.__c&&e.__c()};var s=function(){var t;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});t=r.o.pop();)t.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),t.then(o,o)},_t.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=wt(this.__b),this.__b=null),[m(b,null,e.u?null:t.children),e.u&&t.fallback]};var xt=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.i=r=r[2]}};(Et.prototype=new b).u=function(t){var e=this,r=Mt(e.__v),n=e.l.get(t);return n[0]++,function(i){var o=function(){e.props.revealOrder?(n.push(i),xt(e,t,n)):i()};r?r(o):o()}},Et.prototype.render=function(t){this.i=null,this.l=new Map;var e=x(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return t.children},Et.prototype.componentDidUpdate=Et.prototype.componentDidMount=function(){var t=this;t.l.forEach((function(e,r){xt(t,r,e)}))};var kt=function(){function t(){}var e=t.prototype;return e.getChildContext=function(){return this.props.context},e.render=function(t){return t.children},t}();function St(t){var e=this,r=t.container,n=m(kt,{context:e.context},t.vnode);return e.s&&e.s!==r&&(e.v.parentNode&&e.s.removeChild(e.v),O(e.h),e.p=!1),t.vnode?e.p?(r.__k=e.__k,B(n,r),e.__k=r.__k):(e.v=document.createTextNode(""),L("",r),r.appendChild(e.v),e.p=!0,e.s=r,B(n,r,e.v),e.__k=e.v.__k):e.p&&(e.v.parentNode&&e.s.removeChild(e.v),O(e.h)),e.h=n,e.componentWillUnmount=function(){e.v.parentNode&&e.s.removeChild(e.v),O(e.h)},null}function Rt(t,e){return m(St,{vnode:t,container:e})}var It=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;b.prototype.isReactComponent={};var Pt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function Ct(t,e,r){if(null==e.__k)for(;e.firstChild;)e.removeChild(e.firstChild);return B(t,e),"function"==typeof r&&r(),t?t.__c:null}function Tt(t,e,r){return L(t,e),"function"==typeof r&&r(),t?t.__c:null}var Ot=n.event;function Nt(t,e){t["UNSAFE_"+e]&&!t[e]&&Object.defineProperty(t,e,{configurable:!1,get:function(){return this["UNSAFE_"+e]},set:function(t){this["UNSAFE_"+e]=t}})}n.event=function(t){Ot&&(t=Ot(t)),t.persist=function(){};var e=!1,r=!1,n=t.stopPropagation;t.stopPropagation=function(){n.call(t),e=!0};var i=t.preventDefault;return t.preventDefault=function(){i.call(t),r=!0},t.isPropagationStopped=function(){return e},t.isDefaultPrevented=function(){return r},t.nativeEvent=t};var Bt={configurable:!0,get:function(){return this.class}},Lt=n.vnode;n.vnode=function(t){t.$$typeof=Pt;var e=t.type,r=t.props;if(e){if(r.class!=r.className&&(Bt.enumerable="className"in r,null!=r.className&&(r.class=r.className),Object.defineProperty(r,"className",Bt)),"function"!=typeof e){var n,i,o;for(o in r.defaultValue&&void 0!==r.value&&(r.value||0===r.value||(r.value=r.defaultValue),delete r.defaultValue),Array.isArray(r.value)&&r.multiple&&"select"===e&&(x(r.children).forEach((function(t){-1!=r.value.indexOf(t.props.value)&&(t.props.selected=!0)})),delete r.value),r)if(n=It.test(o))break;if(n)for(o in i=t.props={},r)i[It.test(o)?o.replace(/[A-Z0-9]/,"-$&").toLowerCase():o]=r[o]}!function(e){var r=t.type,n=t.props;if(n&&"string"==typeof r){var i={};for(var o in n)/^on(Ani|Tra|Tou)/.test(o)&&(n[o.toLowerCase()]=n[o],delete n[o]),i[o.toLowerCase()]=o;if(i.ondoubleclick&&(n.ondblclick=n[i.ondoubleclick],delete n[i.ondoubleclick]),i.onbeforeinput&&(n.onbeforeinput=n[i.onbeforeinput],delete n[i.onbeforeinput]),i.onchange&&("textarea"===r||"input"===r.toLowerCase()&&!/^fil|che|ra/i.test(n.type))){var s=i.oninput||"oninput";n[s]||(n[s]=n[i.onchange],delete n[i.onchange])}}}(),"function"==typeof e&&!e.m&&e.prototype&&(Nt(e.prototype,"componentWillMount"),Nt(e.prototype,"componentWillReceiveProps"),Nt(e.prototype,"componentWillUpdate"),e.m=!0)}Lt&&Lt(t)};var jt="16.8.0";function qt(t){return m.bind(null,t)}function Ut(t){return!!t&&t.$$typeof===Pt}function Ft(t){return Ut(t)?j.apply(null,arguments):t}function Dt(t){return!!t.__k&&(B(null,t),!0)}function zt(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ht=function(t,e){return t(e)},Kt={useState:J,useReducer:Y,useEffect:Q,useLayoutEffect:X,useRef:$,useImperativeHandle:tt,useMemo:et,useCallback:rt,useContext:nt,useDebugValue:it,version:"16.8.0",Children:vt,render:Ct,hydrate:Ct,unmountComponentAtNode:Dt,createPortal:Rt,createElement:m,createContext:q,createFactory:qt,cloneElement:Ft,createRef:y,Fragment:v,isValidElement:Ut,findDOMNode:zt,Component:b,PureComponent:dt,memo:pt,forwardRef:gt,unstable_batchedUpdates:Ht,Suspense:_t,SuspenseList:Et,lazy:At}},2592:function(t,e,r){var n=r(7138),i=r(5115),o=r(6907),s=r(3776);function a(t,e,r,o,s){var a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!n())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(r=e,e=o=void 0):2!==u||e.getContext||(o=r,r=e,e=void 0),new Promise((function(n,s){try{var a=i.create(r,o);n(t(a,e,o))}catch(u){s(u)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(s=r,r=e,e=o=void 0):3===u&&(e.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=r,r=e,e=void 0));try{var l=i.create(r,o);s(null,t(l,e,o))}catch(f){s(f)}}e.create=i.create,e.toCanvas=a.bind(null,o.render),e.toDataURL=a.bind(null,o.renderToDataURL),e.toString=a.bind(null,(function(t,e,r){return s.render(t,r)}))},7138:function(t){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:function(t,e,r){var n=r(242).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=n(t),i=145===r?26:2*Math.ceil((r-13)/(2*e-2)),o=[r-7],s=1;s<e-1;s++)o[s]=o[s-1]-i;return o.push(6),o.reverse()},e.getPositions=function(t){for(var r=[],n=e.getRowColCoords(t),i=n.length,o=0;o<i;o++)for(var s=0;s<i;s++)0===o&&0===s||0===o&&s===i-1||o===i-1&&0===s||r.push([n[o],n[s]]);return r}},8260:function(t,e,r){var n=r(6910),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=n.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var r=45*i.indexOf(this.data[e]);r+=i.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},t.exports=o},7245:function(t){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},3280:function(t,e,r){var n=r(9131);function i(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}i.prototype.set=function(t,e,r,n){var i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)},i.prototype.get=function(t,e){return this.data[t*this.size+e]},i.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},i.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=i},3424:function(t,e,r){var n=r(9131),i=r(6910);function o(t){this.mode=i.BYTE,this.data=n.from(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)},t.exports=o},5393:function(t,e,r){var n=r(4908),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case n.L:return i[4*(t-1)+0];case n.M:return i[4*(t-1)+1];case n.Q:return i[4*(t-1)+2];case n.H:return i[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return o[4*(t-1)+0];case n.M:return o[4*(t-1)+1];case n.Q:return o[4*(t-1)+2];case n.H:return o[4*(t-1)+3];default:return}}},4908:function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(n){return r}}},6526:function(t,e,r){var n=r(242).getSymbolSize;e.getPositions=function(t){var e=n(t);return[[0,0],[e-7,0],[0,e-7]]}},1642:function(t,e,r){var n=r(242),i=n.getBCHDigit(1335);e.getEncodedBits=function(t,e){for(var r=t.bit<<3|e,o=r<<10;n.getBCHDigit(o)-i>=0;)o^=1335<<n.getBCHDigit(o)-i;return 21522^(r<<10|o)}},2577:function(t,e,r){var n=r(9131),i=n.alloc(512),o=n.alloc(256);!function(){for(var t=1,e=0;e<255;e++)i[e]=t,o[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)i[e]=i[e-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},e.exp=function(t){return i[t]},e.mul=function(t,e){return 0===t||0===e?0:i[o[t]+o[e]]}},5442:function(t,e,r){var n=r(6910),i=r(242);function o(t){this.mode=n.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=i.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},t.exports=o},7126:function(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var r=3,n=3,i=40,o=10;function s(t,r,n){switch(t){case e.Patterns.PATTERN000:return(r+n)%2==0;case e.Patterns.PATTERN001:return r%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(r+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return r*n%2+r*n%3==0;case e.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case e.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,n=0,i=0,o=0,s=null,a=null,u=0;u<e;u++){i=o=0,s=a=null;for(var c=0;c<e;c++){var l=t.get(u,c);l===s?i++:(i>=5&&(n+=r+(i-5)),s=l,i=1),(l=t.get(c,u))===a?o++:(o>=5&&(n+=r+(o-5)),a=l,o=1)}i>=5&&(n+=r+(i-5)),o>=5&&(n+=r+(o-5))}return n},e.getPenaltyN2=function(t){for(var e=t.size,r=0,i=0;i<e-1;i++)for(var o=0;o<e-1;o++){var s=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==s&&0!==s||r++}return r*n},e.getPenaltyN3=function(t){for(var e=t.size,r=0,n=0,o=0,s=0;s<e;s++){n=o=0;for(var a=0;a<e;a++)n=n<<1&2047|t.get(s,a),a>=10&&(1488===n||93===n)&&r++,o=o<<1&2047|t.get(a,s),a>=10&&(1488===o||93===o)&&r++}return r*i},e.getPenaltyN4=function(t){for(var e=0,r=t.data.length,n=0;n<r;n++)e+=t.data[n];return Math.abs(Math.ceil(100*e/r/5)-10)*o},e.applyMask=function(t,e){for(var r=e.size,n=0;n<r;n++)for(var i=0;i<r;i++)e.isReserved(i,n)||e.xor(i,n,s(t,i,n))},e.getBestMask=function(t,r){for(var n=Object.keys(e.Patterns).length,i=0,o=1/0,s=0;s<n;s++){r(s),e.applyMask(s,t);var a=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),a<o&&(o=a,i=s)}return i}},6910:function(t,e,r){var n=r(3114),i=r(7007);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(n){return r}}},1085:function(t,e,r){var n=r(6910);function i(t){this.mode=n.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e,r,n;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),n=parseInt(r,10),t.put(n,10);var i=this.data.length-e;i>0&&(r=this.data.substr(e),n=parseInt(r,10),t.put(n,3*i+1))},t.exports=i},6143:function(t,e,r){var n=r(9131),i=r(2577);e.mul=function(t,e){for(var r=n.alloc(t.length+e.length-1),o=0;o<t.length;o++)for(var s=0;s<e.length;s++)r[o+s]^=i.mul(t[o],e[s]);return r},e.mod=function(t,e){for(var r=n.from(t);r.length-e.length>=0;){for(var o=r[0],s=0;s<e.length;s++)r[s]^=i.mul(e[s],o);for(var a=0;a<r.length&&0===r[a];)a++;r=r.slice(a)}return r},e.generateECPolynomial=function(t){for(var r=n.from([1]),o=0;o<t;o++)r=e.mul(r,[1,i.exp(o)]);return r}},5115:function(t,e,r){var n=r(9131),i=r(242),o=r(4908),s=r(7245),a=r(3280),u=r(1845),c=r(6526),l=r(7126),f=r(5393),h=r(2882),d=r(3103),p=r(1642),m=r(6910),g=r(6130),y=r(5826);function v(t,e,r){var n,i,o=t.size,s=p.getEncodedBits(e,r);for(n=0;n<15;n++)i=1==(s>>n&1),n<6?t.set(n,8,i,!0):n<8?t.set(n+1,8,i,!0):t.set(o-15+n,8,i,!0),n<8?t.set(8,o-n-1,i,!0):n<9?t.set(8,15-n-1+1,i,!0):t.set(8,15-n-1,i,!0);t.set(o-8,8,1,!0)}function b(t,e,r){var o=new s;r.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),m.getCharCountIndicator(e.mode,t)),e.write(o)}));var a=8*(i.getSymbolTotalCodewords(t)-f.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);for(var u=(a-o.getLengthInBits())/8,c=0;c<u;c++)o.put(c%2?17:236,8);return function(t,e,r){for(var o=i.getSymbolTotalCodewords(e),s=f.getTotalCodewordsCount(e,r),a=o-s,u=f.getBlocksCount(e,r),c=u-o%u,l=Math.floor(o/u),d=Math.floor(a/u),p=d+1,m=l-d,g=new h(m),y=0,v=new Array(u),b=new Array(u),w=0,_=n.from(t.buffer),M=0;M<u;M++){var A=M<c?d:p;v[M]=_.slice(y,y+A),b[M]=g.encode(v[M]),y+=A,w=Math.max(w,A)}var E,x,k=n.alloc(o),S=0;for(E=0;E<w;E++)for(x=0;x<u;x++)E<v[x].length&&(k[S++]=v[x][E]);for(E=0;E<m;E++)for(x=0;x<u;x++)k[S++]=b[x][E];return k}(o,t,e)}function w(t,e,r,n){var o;if(y(t))o=g.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var s=e;if(!s){var f=g.rawSplit(t);s=d.getBestVersionForData(f,r)}o=g.fromString(t,s||40)}var h=d.getBestVersionForData(o,r);if(!h)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<h)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+h+".\n")}else e=h;var p=b(e,r,o),m=i.getSymbolSize(e),w=new a(m);return function(t,e){for(var r=t.size,n=c.getPositions(e),i=0;i<n.length;i++)for(var o=n[i][0],s=n[i][1],a=-1;a<=7;a++)if(!(o+a<=-1||r<=o+a))for(var u=-1;u<=7;u++)s+u<=-1||r<=s+u||(a>=0&&a<=6&&(0===u||6===u)||u>=0&&u<=6&&(0===a||6===a)||a>=2&&a<=4&&u>=2&&u<=4?t.set(o+a,s+u,!0,!0):t.set(o+a,s+u,!1,!0))}(w,e),function(t){for(var e=t.size,r=8;r<e-8;r++){var n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(w),function(t,e){for(var r=u.getPositions(e),n=0;n<r.length;n++)for(var i=r[n][0],o=r[n][1],s=-2;s<=2;s++)for(var a=-2;a<=2;a++)-2===s||2===s||-2===a||2===a||0===s&&0===a?t.set(i+s,o+a,!0,!0):t.set(i+s,o+a,!1,!0)}(w,e),v(w,r,0),e>=7&&function(t,e){for(var r,n,i,o=t.size,s=d.getEncodedBits(e),a=0;a<18;a++)r=Math.floor(a/3),n=a%3+o-8-3,i=1==(s>>a&1),t.set(r,n,i,!0),t.set(n,r,i,!0)}(w,e),function(t,e){for(var r=t.size,n=-1,i=r-1,o=7,s=0,a=r-1;a>0;a-=2)for(6===a&&a--;;){for(var u=0;u<2;u++)if(!t.isReserved(i,a-u)){var c=!1;s<e.length&&(c=1==(e[s]>>>o&1)),t.set(i,a-u,c),-1==--o&&(s++,o=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(w,p),isNaN(n)&&(n=l.getBestMask(w,v.bind(null,w,r))),l.applyMask(n,w),v(w,r,n),{modules:w,version:e,errorCorrectionLevel:r,maskPattern:n,segments:o}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var r,n,s=o.M;return void 0!==e&&(s=o.from(e.errorCorrectionLevel,o.M),r=d.from(e.version),n=l.from(e.maskPattern),e.toSJISFunc&&i.setToSJISFunction(e.toSJISFunc)),w(t,r,s,n)}},2882:function(t,e,r){var n=r(9131),i=r(6143),o=r(8764).Buffer;function s(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}s.prototype.initialize=function(t){this.degree=t,this.genPoly=i.generateECPolynomial(this.degree)},s.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=n.alloc(this.degree),r=o.concat([t,e],t.length+this.degree),s=i.mod(r,this.genPoly),a=this.degree-s.length;if(a>0){var u=n.alloc(this.degree);return s.copy(u,a),u}return s},t.exports=s},7007:function(t,e){var r="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";e.KANJI=new RegExp(n,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp(r,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),s=new RegExp("^"+r+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return o.test(t)},e.testNumeric=function(t){return s.test(t)},e.testAlphanumeric=function(t){return a.test(t)}},6130:function(t,e,r){var n=r(6910),i=r(1085),o=r(8260),s=r(3424),a=r(5442),u=r(7007),c=r(242),l=r(5987);function f(t){return unescape(encodeURIComponent(t)).length}function h(t,e,r){for(var n,i=[];null!==(n=t.exec(r));)i.push({data:n[0],index:n.index,mode:e,length:n[0].length});return i}function d(t){var e,r,i=h(u.NUMERIC,n.NUMERIC,t),o=h(u.ALPHANUMERIC,n.ALPHANUMERIC,t);return c.isKanjiModeEnabled()?(e=h(u.BYTE,n.BYTE,t),r=h(u.KANJI,n.KANJI,t)):(e=h(u.BYTE_KANJI,n.BYTE,t),r=[]),i.concat(o,e,r).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function p(t,e){switch(e){case n.NUMERIC:return i.getBitsLength(t);case n.ALPHANUMERIC:return o.getBitsLength(t);case n.KANJI:return a.getBitsLength(t);case n.BYTE:return s.getBitsLength(t)}}function m(t,e){var r,u=n.getBestModeForData(t);if((r=n.from(e,u))!==n.BYTE&&r.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(u));switch(r!==n.KANJI||c.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new i(t);case n.ALPHANUMERIC:return new o(t);case n.KANJI:return new a(t);case n.BYTE:return new s(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(m(e,null)):e.data&&t.push(m(e.data,e.mode)),t}),[])},e.fromString=function(t,r){for(var i=function(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];switch(i.mode){case n.NUMERIC:e.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:e.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:e.push([i,{data:i.data,mode:n.BYTE,length:f(i.data)}]);break;case n.BYTE:e.push([{data:i.data,mode:n.BYTE,length:f(i.data)}])}}return e}(d(t,c.isKanjiModeEnabled())),o=function(t,e){for(var r={},i={start:{}},o=["start"],s=0;s<t.length;s++){for(var a=t[s],u=[],c=0;c<a.length;c++){var l=a[c],f=""+s+c;u.push(f),r[f]={node:l,lastCount:0},i[f]={};for(var h=0;h<o.length;h++){var d=o[h];r[d]&&r[d].node.mode===l.mode?(i[d][f]=p(r[d].lastCount+l.length,l.mode)-p(r[d].lastCount,l.mode),r[d].lastCount+=l.length):(r[d]&&(r[d].lastCount=l.length),i[d][f]=p(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,e))}}o=u}for(h=0;h<o.length;h++)i[o[h]].end=0;return{map:i,table:r}}(i,r),s=l.find_path(o.map,"start","end"),a=[],u=1;u<s.length-1;u++)a.push(o.table[s[u]].node);return e.fromArray(function(t){return t.reduce((function(t,e){var r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(a))},e.rawSplit=function(t){return e.fromArray(d(t,c.isKanjiModeEnabled()))}},242:function(t,e){var r,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return n[t]},e.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');r=t},e.isKanjiModeEnabled=function(){return void 0!==r},e.toSJIS=function(t){return r(t)}},3114:function(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},3103:function(t,e,r){var n=r(242),i=r(5393),o=r(4908),s=r(6910),a=r(3114),u=r(5826),c=n.getBCHDigit(7973);function l(t,e){return s.getCharCountIndicator(t,e)+4}function f(t,e){var r=0;return t.forEach((function(t){var n=l(t.mode,e);r+=n+t.getBitsLength()})),r}e.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,r){if(!a.isValid(t))throw new Error("Invalid QR Code version");void 0===r&&(r=s.BYTE);var o=8*(n.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,e));if(r===s.MIXED)return o;var u=o-l(r,t);switch(r){case s.NUMERIC:return Math.floor(u/10*3);case s.ALPHANUMERIC:return Math.floor(u/11*2);case s.KANJI:return Math.floor(u/13);case s.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,r){var n,i=o.from(r,o.M);if(u(t)){if(t.length>1)return function(t,r){for(var n=1;n<=40;n++)if(f(t,n)<=e.getCapacity(n,r,s.MIXED))return n}(t,i);if(0===t.length)return 1;n=t[0]}else n=t;return function(t,r,n){for(var i=1;i<=40;i++)if(r<=e.getCapacity(i,n,t))return i}(n.mode,n.getLength(),i)},e.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;n.getBCHDigit(e)-c>=0;)e^=7973<<n.getBCHDigit(e)-c;return t<<12|e}},6907:function(t,e,r){var n=r(9653);e.render=function(t,e,r){var i=r,o=e;void 0!==i||e&&e.getContext||(i=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);var s=n.getImageWidth(t.modules.size,i),a=o.getContext("2d"),u=a.createImageData(s,s);return n.qrToImageData(u.data,t,i),function(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}(a,o,s),a.putImageData(u,0,0),o},e.renderToDataURL=function(t,r,n){var i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});var o=e.render(t,r,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},3776:function(t,e,r){var n=r(9653);function i(t,e){var r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(t,e,r){var n=t+e;return void 0!==r&&(n+=" "+r),n}e.render=function(t,e,r){var s=n.getOptions(e),a=t.modules.size,u=t.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+i(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+i(s.color.dark,"stroke")+' d="'+function(t,e,r){for(var n="",i=0,s=!1,a=0,u=0;u<t.length;u++){var c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(n+=s?o("M",c+r,.5+l+r):o("m",i,0),i=0,s=!1),c+1<e&&t[u+1]||(n+=o("h",a),a=0)):i++}return n}(u,a,s.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof r&&r(null,d),d}},9653:function(t,e){function r(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:n,scale:n?4:i,margin:e,color:{dark:r(t.color.dark||"#000000ff"),light:r(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,r){var n=e.getScale(t,r);return Math.floor((t+2*r.margin)*n)},e.qrToImageData=function(t,r,n){for(var i=r.modules.size,o=r.modules.data,s=e.getScale(i,n),a=Math.floor((i+2*n.margin)*s),u=n.margin*s,c=[n.color.light,n.color.dark],l=0;l<a;l++)for(var f=0;f<a;f++){var h=4*(l*a+f),d=n.color.light;if(l>=u&&f>=u&&l<a-u&&f<a-u)d=c[o[Math.floor((l-u)/s)*i+Math.floor((f-u)/s)]?1:0];t[h++]=d.r,t[h++]=d.g,t[h++]=d.b,t[h]=d.a}}},9131:function(t,e,r){"use strict";var n=r(5826);o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}();var i=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(t,e,r){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"==typeof t?u(this,t):function(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);o.TYPED_ARRAY_SUPPORT?i.__proto__=o.prototype:i=c(t,i);return i}(t,e,r,n);if("string"==typeof e)return function(t,e){var r=0|f(e),n=a(t,r),i=n.write(e);i!==r&&(n=n.slice(0,i));return n}(t,e);return function(t,e){if(o.isBuffer(e)){var r=0|s(e.length),n=a(t,r);return 0===n.length||e.copy(n,0,0,r),n}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?a(t,0):c(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return c(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,r):new o(t,e,r)}function s(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function a(t,e){var r;return o.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e)).__proto__=o.prototype:(null===(r=t)&&(r=new o(e)),r.length=e),r}function u(t,e){var r=a(t,e<0?0:0|s(e));if(!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)r[n]=0;return r}function c(t,e){for(var r=e.length<0?0:0|s(e.length),n=a(t,r),i=0;i<r;i+=1)n[i]=255&e[i];return n}function l(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function f(t){return o.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:l(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"==typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,r,n){return function(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}(l(e,t.length-r),t,r,n)}(this,t,e,r)},o.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),o.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var s=0;s<i;++s)r[s]=this[s+t]}return r},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,s=n-r;if(this===t&&r<e&&e<n)for(i=s-1;i>=0;--i)t[i+e]=this[i+r];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+s),e);return s},o.prototype.fill=function(t,e,r){if("string"==typeof t){if("string"==typeof e?(e=0,r=this.length):"string"==typeof r&&(r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=o.isBuffer(t)?t:new o(t),a=s.length;for(i=0;i<r-e;++i)this[i+e]=s[i%a]}return this},o.concat=function(t,e){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a(null,0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=u(null,e),s=0;for(r=0;r<t.length;++r){var c=t[r];if(!o.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(i,s),s+=c.length}return i},o.byteLength=f,o.prototype._isBuffer=!0,o.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.exports.alloc=function(t){var e=new o(t);return e.fill(0),e},t.exports.from=function(t){return new o(t)}},7563:function(t,e,r){"use strict";const n=r(610),i=r(4020),o=r(500);function s(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function u(t,e){return e.decode?i(t):t}function c(t){return Array.isArray(t)?t.sort():"object"==typeof t?c(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function l(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function f(t){const e=(t=l(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function h(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function d(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const i="string"==typeof r&&r.split("").indexOf(t.arrayFormatSeparator)>-1?r.split(t.arrayFormatSeparator).map((e=>u(e,t))):null===r?r:u(r,t);n[e]=i};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const i of t.split("&")){let[t,s]=o(e.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator"].includes(e.arrayFormat)?s:u(s,e),r(u(t,e),s,n)}for(const i of Object.keys(n)){const t=n[i];if("object"==typeof t&&null!==t)for(const r of Object.keys(t))t[r]=h(t[r],e);else n[i]=h(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?t[e]=c(r):t[e]=r,t}),Object.create(null))}e.extract=f,e.parse=d,e.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const r=r=>e.skipNull&&null==t[r]||e.skipEmptyString&&""===t[r],n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[",i,"]"].join("")]:[...r,[a(e,t),"[",a(i,t),"]=",a(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[a(e,t),"[]"].join("")]:[...r,[a(e,t),"[]=",a(n,t)].join("")];case"comma":case"separator":return e=>(r,n)=>null==n||0===n.length?r:0===r.length?[[a(e,t),"=",a(n,t)].join("")]:[[r,a(n,t)].join(t.arrayFormatSeparator)];default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,a(e,t)]:[...r,[a(e,t),"=",a(n,t)].join("")]}}(e),i={};for(const s of Object.keys(t))r(s)||(i[s]=t[s]);const o=Object.keys(i);return!1!==e.sort&&o.sort(e.sort),o.map((r=>{const i=t[r];return void 0===i?"":null===i?a(r,e):Array.isArray(i)?i.reduce(n(r),[]).join("&"):a(r,e)+"="+a(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[r,n]=o(t,"#");return Object.assign({url:r.split("?")[0]||"",query:d(f(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,e)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=l(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query);let u=e.stringify(s,r);u&&(u=`?${u}`);let c=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(c=`#${a(t.fragmentIdentifier,r)}`),`${n}${u}${c}`}},2587:function(t){"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(r);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=t.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var l,f,h,d,p=t[c].replace(s,"%20"),m=p.indexOf(n);m>=0?(l=p.substr(0,m),f=p.substr(m+1)):(l=p,f=""),h=decodeURIComponent(l),d=decodeURIComponent(f),e(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},2182:function(t){"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,n,i){return r=r||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var o=encodeURIComponent(e(i))+n;return Array.isArray(t[i])?t[i].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[i]))})).join(r):i?encodeURIComponent(e(i))+n+encodeURIComponent(e(t)):""}},7673:function(t,e,r){"use strict";e.decode=e.parse=r(2587),e.encode=e.stringify=r(2182)},1798:function(t,e,r){"use strict";var n=65536,i=4294967295;var o=r(9509).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>i)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(t);if(t>0)if(t>n)for(var a=0;a<t;a+=n)s.getRandomValues(r.slice(a,a+n));else s.getRandomValues(r);if("function"==typeof e)return process.nextTick((function(){e(null,r)}));return r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},4405:function(t,e,r){"use strict";r.d(e,{w_:function(){return c}});var n=r(7294),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=n.createContext&&n.createContext(i),s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)},a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r};function u(t){return t&&t.map((function(t,e){return n.createElement(t.tag,s({key:e},t.attr),u(t.child))}))}function c(t){return function(e){return n.createElement(l,s({attr:s({},t.attr)},e),u(t.child))}}function l(t){var e=function(e){var r,i=t.attr,o=t.size,u=t.title,c=a(t,["attr","size","title"]),l=o||e.size||"1em";return e.className&&(r=e.className),t.className&&(r=(r?r+" ":"")+t.className),n.createElement("svg",s({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,c,{className:r,style:s(s({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),u&&n.createElement("title",null,u),t.children)};return void 0!==o?n.createElement(o.Consumer,null,(function(t){return e(t)})):e(i)}},3524:function(t,e,r){"use strict";var n,i=r(7294),o=(n=i)&&"object"==typeof n&&"default"in n?n.default:n;function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,r){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==r&&"function"!=typeof r)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(n){if("function"!=typeof n)throw new Error("Expected WrappedComponent to be a React component.");var u,c=[];function l(){u=t(c.map((function(t){return t.props}))),f.canUseDOM?e(u):r&&(u=r(u))}var f=function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,i.peek=function(){return u},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=u;return u=void 0,c=[],t};var s=i.prototype;return s.UNSAFE_componentWillMount=function(){c.push(this),l()},s.componentDidUpdate=function(){l()},s.componentWillUnmount=function(){var t=c.indexOf(this);c.splice(t,1),l()},s.render=function(){return o.createElement(n,this.props)},i}(i.PureComponent);return s(f,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(n)+")"),s(f,"canUseDOM",a),f}}},4281:function(t){"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,a;if("string"==typeof e&&(o="not ",e.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(n(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:function(t,e,r){"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(9481),o=r(4229);r(5717)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},2725:function(t,e,r){"use strict";t.exports=i;var n=r(4605);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5717)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},9481:function(t,e,r){"use strict";var n;t.exports=E,E.ReadableState=A;r(7187).EventEmitter;var i=function(t,e){return t.listeners(e).length},o=r(2503),s=r(8764).Buffer,a=r.g.Uint8Array||function(){};var u,c=r(4616);u=c&&c.debuglog?c.debuglog("stream"):function(){};var l,f,h,d=r(7327),p=r(1195),m=r(2457).getHighWaterMark,g=r(4281).q,y=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,b=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(E,o);var _=p.errorOrDestroy,M=["error","close","destroy","pause","resume"];function A(t,e,i){n=n||r(6753),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=r(4626).s),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function E(t){if(n=n||r(6753),!(this instanceof E))return new E(t);var e=this instanceof n;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function x(t,e,r,n,i){u("readableAddChunk",e);var o,c=t._readableState;if(null===e)c.reading=!1,function(t,e){if(u("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?I(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,P(t)))}(t,c);else if(i||(o=function(t,e){var r;n=e,s.isBuffer(n)||n instanceof a||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(c,e)),o)_(t,o);else if(c.objectMode||e&&e.length>0)if("string"==typeof e||c.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)c.endEmitted?_(t,new w):k(t,c,e,!0);else if(c.ended)_(t,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(e=c.decoder.write(e),c.objectMode||0!==e.length?k(t,c,e,!1):C(t,c)):k(t,c,e,!1)}else n||(c.reading=!1,C(t,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function k(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&I(t)),C(t,e)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),E.prototype.destroy=p.destroy,E.prototype._undestroy=p.undestroy,E.prototype._destroy=function(t,e){e(t)},E.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=s.from(t,e),e=""),r=!0),x(this,t,e,!1,r)},E.prototype.unshift=function(t){return x(this,t,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){l||(l=r(4626).s);var e=new l(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=S?t=S:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function I(t){var e=t._readableState;u("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(P,t))}function P(t){var e=t._readableState;u("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function C(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(T,t,e))}function T(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(u("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function O(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){u("readable nexttick read 0"),t.read(0)}function B(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function j(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function q(t){var e=t._readableState;u("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(U,e,t))}function U(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}E.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?q(this):I(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&q(this),null;var n,i=e.needReadable;return u("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",i=!0),e.ended||e.reading?u("reading or ended",i=!1):i&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?j(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&q(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(t){_(this,new b("_read()"))},E.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?a:m;function s(e,i){u("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",c),t.removeListener("error",h),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",f),l=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function a(){u("onend"),t.end()}n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);var c=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",c);var l=!1;function f(e){u("ondata");var i=t.write(e);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==F(n.pipes,t))&&!l&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(e){u("onerror",e),m(),t.removeListener("error",h),0===i(t,"error")&&_(t,e)}function d(){t.removeListener("finish",p),m()}function p(){u("onfinish"),t.removeListener("close",d),m()}function m(){u("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",h),t.once("close",d),t.once("finish",p),t.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),t},E.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},E.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?I(this):n.reading||process.nextTick(N,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(O,this),r},E.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(O,this),e},E.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(B,t,e))}(this,t)),t.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<M.length;o++)t.on(M[o],this.emit.bind(this,M[o]));return this._read=function(e){u("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(5850)),f(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),E._fromList=j,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,e){return void 0===h&&(h=r(5167)),h(E,t,e)})},4605:function(t,e,r){"use strict";t.exports=l;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(e,r){h(t,e,r)}))}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5717)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},4229:function(t,e,r){"use strict";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var i;t.exports=E,E.WritableState=A;var o={deprecate:r(4927)},s=r(2503),a=r(8764).Buffer,u=r.g.Uint8Array||function(){};var c,l=r(1195),f=r(2457).getHighWaterMark,h=r(4281).q,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,g=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,b=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;function M(){}function A(t,e,o){i=i||r(6753),t=t||{},"boolean"!=typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(P,t,e),t._writableState.errorEmitted=!0,_(t,n)):(i(n),t._writableState.errorEmitted=!0,_(t,n),P(t,e))}(t,r,n,e,i);else{var o=R(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||S(t,r),n?process.nextTick(k,t,r,o,i):k(t,r,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function E(t){var e=this instanceof(i=i||r(6753));if(!e&&!c.call(E,this))return new E(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function x(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function k(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),P(t,e)}function S(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,o=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,x(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(x(t,e,!1,e.objectMode?1:c.length,c,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function R(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&_(t,r),e.prefinished=!0,t.emit("prefinish"),P(t,e)}))}function P(t,e){var r=R(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(5717)(E,s),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===E&&(t&&t._writableState instanceof A)}})):c=function(t){return t instanceof this},E.prototype.pipe=function(){_(this,new g)},E.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=t,a.isBuffer(n)||n instanceof u);return s&&!a.isBuffer(t)&&(t=function(t){return a.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=M),i.ending?function(t,e){var r=new b;_(t,r),process.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i;return null===r?i=new v:"string"==typeof r||e.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(_(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=a.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var u=e.objectMode?1:n.length;e.length+=u;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else x(t,e,!1,u,n,i,o);return c}(this,i,s,t,e,r)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||S(this,t))},E.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,r){r(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,P(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=l.destroy,E.prototype._undestroy=l.undestroy,E.prototype._destroy=function(t,e){e(t)}},5850:function(t,e,r){"use strict";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(8610),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[h].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){process.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[u]?r(t[u]):e(d(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[f](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[f])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(y,(i(e={},h,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}},7327:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(8764).Buffer,a=r(2361).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&o(e.prototype,r),c&&o(e,c),t}()},1195:function(t){"use strict";function e(t,e){n(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,t)):process.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,t)):process.nextTick(e,o,t):i?(process.nextTick(r,o),i(t)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:function(t,e,r){"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},f=e._readableState&&e._readableState.endEmitted,h=function(){s=!1,f=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!f?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",h),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",h),e.removeListener("error",d),e.removeListener("close",p)}}},5167:function(t){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:function(t,e,r){"use strict";var n;var i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t){t()}function c(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var l,f=function(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var h=e.map((function(t,i){var o=i<e.length-1;return function(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(8610)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}(t,o,i>0,(function(t){l||(l=t),t&&h.forEach(u),o||(h.forEach(u),f(l))}))}));return e.reduce(c)}},2457:function(t,e,r){"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},2503:function(t,e,r){t.exports=r(7187).EventEmitter},4626:function(t,e,r){"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"<22>";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},8473:function(t,e,r){(e=t.exports=r(9481)).Stream=e,e.Readable=e,e.Writable=r(4229),e.Duplex=r(6753),e.Transform=r(4605),e.PassThrough=r(2725),e.finished=r(8610),e.pipeline=r(9946)},9785:function(t,e,r){"use strict";var n=r(8764).Buffer,i=r(5717),o=r(3349),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,r,n,i,o,s,a){return p(t+(e^r^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return p(t+(e&r|~e&n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return p(t+((e|~r)^n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return p(t+(e&n|r&~n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return p(t+(e^(r|~n))+o+s|0,a)+i|0}i(d,o),d.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,A=0|this._d,E=0|this._e,x=0;x<80;x+=1){var k,S;x<16?(k=m(r,n,i,o,d,t[a[x]],f[0],c[x]),S=b(w,_,M,A,E,t[u[x]],h[0],l[x])):x<32?(k=g(r,n,i,o,d,t[a[x]],f[1],c[x]),S=v(w,_,M,A,E,t[u[x]],h[1],l[x])):x<48?(k=y(r,n,i,o,d,t[a[x]],f[2],c[x]),S=y(w,_,M,A,E,t[u[x]],h[2],l[x])):x<64?(k=v(r,n,i,o,d,t[a[x]],f[3],c[x]),S=g(w,_,M,A,E,t[u[x]],h[3],l[x])):(k=b(r,n,i,o,d,t[a[x]],f[4],c[x]),S=m(w,_,M,A,E,t[u[x]],h[4],l[x])),r=d,d=o,o=p(i,10),i=n,n=k,w=E,E=A,A=p(M,10),M=_,_=S}var R=this._b+i+A|0;this._b=this._c+o+E|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+M|0,this._a=R},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},1675:function(t,e,r){"use strict";var n=r(8764).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLength=e.decode=e.encode=void 0;var o=i(r(3493));function s(t,e){if("0"===t[0]&&"0"===t[1])throw new Error("invalid RLP: extra zeros");return parseInt(t,e)}function a(t,e){if(t<56)return n.from([t+e]);var r=l(t),i=l(e+55+r.length/2);return n.from(i+r,"hex")}function u(t){var e,r,i,o,a,c=[],l=t[0];if(l<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(l<=183){if(e=l-127,i=128===l?n.from([]):t.slice(1,e),2===e&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:t.slice(e)}}if(l<=191){if(r=l-182,t.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if((e=s(t.slice(1,r).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((i=t.slice(r,e+r)).length<e)throw new Error("invalid RLP: not enough bytes for string");return{data:i,remainder:t.slice(e+r)}}if(l<=247){for(e=l-191,o=t.slice(1,e);o.length;)a=u(o),c.push(a.data),o=a.remainder;return{data:c,remainder:t.slice(e)}}var f=(r=l-246)+(e=s(t.slice(1,r).toString("hex"),16));if(f>t.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=t.slice(r,f)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)a=u(o),c.push(a.data),o=a.remainder;return{data:c,remainder:t.slice(f)}}function c(t){return"0x"===t.slice(0,2)}function l(t){if(t<0)throw new Error("Invalid integer as argument, must be unsigned!");var e=t.toString(16);return e.length%2?"0"+e:e}function f(t){if(!n.isBuffer(t)){if("string"==typeof t)return c(t)?n.from((r="string"!=typeof(i=t)?i:c(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):n.from(t);if("number"==typeof t||"bigint"==typeof t)return t?(e=l(t),n.from(e,"hex")):n.from([]);if(null==t)return n.from([]);if(t instanceof Uint8Array)return n.from(t);if(o.default.isBN(t))return n.from(t.toArray());throw new Error("invalid type")}var e,r,i;return t}e.encode=function t(e){if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)r.push(t(e[i]));var o=n.concat(r);return n.concat([a(o.length,192),o])}var s=f(e);return 1===s.length&&s[0]<128?s:n.concat([a(s.length,128),s])},e.decode=function(t,e){if(void 0===e&&(e=!1),!t||0===t.length)return n.from([]);var r=u(f(t));if(e)return r;if(0!==r.remainder.length)throw new Error("invalid remainder");return r.data},e.getLength=function(t){if(!t||0===t.length)return n.from([]);var e=f(t),r=e[0];if(r<=127)return e.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var i=r-246;return i+s(e.slice(1,i).toString("hex"),16)}},3493:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new 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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6567).Buffer}catch(R){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var c=t.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(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&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),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),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l<a;l+=n)u=c(t,l,l+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(t,l,t.length,e),l=0;l<s;l++)f*=e;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){l(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(R){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","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"],d=[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],p=[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){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-u.length]+u+r:u+r}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&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?m+r:h[c-m.length]+m+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,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(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;e<this.length;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(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;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;r<e.length;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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;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(;o<r.length;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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,_=b>>>13,M=0|s[4],A=8191&M,E=M>>>13,x=0|s[5],k=8191&x,S=x>>>13,R=0|s[6],I=8191&R,P=R>>>13,C=0|s[7],T=8191&C,O=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,j=0|s[9],q=8191&j,U=j>>>13,F=0|a[0],D=8191&F,z=F>>>13,H=0|a[1],K=8191&H,G=H>>>13,W=0|a[2],V=8191&W,Z=W>>>13,J=0|a[3],Y=8191&J,Q=J>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ft=8191<,ht=lt>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(m,D)|0,o=Math.imul(m,z);var yt=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(v,D)|0,o=Math.imul(v,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var vt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Q)|0;var wt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(P,D)|0,o=Math.imul(P,z),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(T,D),i=(i=Math.imul(T,z))+Math.imul(O,D)|0,o=Math.imul(O,z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var At=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,D),i=(i=Math.imul(B,z))+Math.imul(L,D)|0,o=Math.imul(L,z),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var Et=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(q,D),i=(i=Math.imul(q,z))+Math.imul(U,D)|0,o=Math.imul(U,z),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(q,K),i=(i=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(v,ft)|0,o=o+Math.imul(v,ht)|0;var kt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,Q))+Math.imul(U,Y)|0,o=Math.imul(U,Q),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ht)|0;var It=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(q,rt),i=(i=Math.imul(q,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ct)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ht)|0;var Ct=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(q,ut),i=(i=Math.imul(q,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,ft)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(q,ft),i=(i=Math.imul(q,ht))+Math.imul(U,ft)|0,o=Math.imul(U,ht);var Ot=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Nt=(c+(n=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=yt,u[2]=vt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=Et,u[9]=xt,u[10]=kt,u[11]=St,u[12]=Rt,u[13]=It,u[14]=Pt,u[15]=Ct,u[16]=Tt,u[17]=Ot,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,f=(0|t.words[l])*(0|e.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return y(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?y(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],m=n[l+d],g=r[l+d+s],y=n[l+d+s],v=f*g-h*y;y=f*y+h*g,g=v,r[l+d]=p+g,n[l+d]=m+y,r[l+d+s]=p-g,n[l+d+s]=m-y,d!==a&&(v=u*f-c*h,h=u*h+c*f,f=v)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;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}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,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=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),v(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():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=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;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 s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;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){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&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"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(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;e<this.length&&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(t<67108864),t<0)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&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;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,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}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){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},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 o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},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(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}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 e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-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 e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.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){n<i?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-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},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 k(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 w={k256:null,p224:null,p192:null,p25519:null};function _(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 M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(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 S(t){k.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)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;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(A,_),i(E,_),i(x,_),x.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;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){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new A;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return w[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.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")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.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)},k.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},k.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)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(f,new o(1).iushln(p-g-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return h},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,k),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.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?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},9509:function(t,e,r){var n=r(8764),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},7253:function(t,e,r){const n=r(9539),i=r(7187);var o="object"==typeof Reflect?Reflect:null,s=o&&"function"==typeof o.apply?o.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};function a(){i.call(this)}function u(t,e,r){try{s(t,e,r)}catch(n){setTimeout((()=>{throw n}))}}t.exports=a,n.inherits(a,i),a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[t];if(void 0===a)return!1;if("function"==typeof a)u(a,this,e);else{var c=a.length,l=function(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}(a,c);for(r=0;r<c;++r)u(l[r],this,e)}return!0}},7221:function(t,e,r){t.exports=r(9119)(r(8573))},8573:function(t,e,r){const n=new(0,r(6266).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function s(t){const e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:function(t,e){let r=new o(e);if(r.cmp(i.p)>=0)return null;r=r.toRed(i.red);let s=r.redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===t!==s.isOdd()&&(s=s.redNeg()),n.keyPair({pub:{x:r,y:s}})}(e,t.subarray(1,33));case 4:case 6:case 7:return 65!==t.length?null:function(t,e,r){let s=new o(e),a=new o(r);if(s.cmp(i.p)>=0||a.cmp(i.p)>=0)return null;if(s=s.toRed(i.red),a=a.toRed(i.red),(6===t||7===t)&&a.isOdd()!==(7===t))return null;const u=s.redSqr().redIMul(s);return a.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:s,y:a}}):null}(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function a(t,e){const r=e.encode(null,33===t.length);for(let n=0;n<t.length;++n)t[n]=r[n]}t.exports={contextRandomize(){return 0},privateKeyVerify(t){const e=new o(t);return e.cmp(i.n)<0&&!e.isZero()?0:1},privateKeyNegate(t){const e=new o(t),r=i.n.sub(e).umod(i.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd(t,e){const r=new o(e);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(t)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new o(e);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(t)),r.cmp(i.n)>=0&&(r=r.umod(i.n));const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify(t){return null===s(t)?1:0},publicKeyCreate(t,e){const r=new o(e);if(r.cmp(i.n)>=0||r.isZero())return 1;return a(t,n.keyFromPrivate(e).getPublic()),0},publicKeyConvert(t,e){const r=s(e);if(null===r)return 1;return a(t,r.getPublic()),0},publicKeyNegate(t,e){const r=s(e);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),a(t,n),0},publicKeyCombine(t,e){const r=new Array(e.length);for(let i=0;i<e.length;++i)if(r[i]=s(e[i]),null===r[i])return 1;let n=r[0].getPublic();for(let i=1;i<r.length;++i)n=n.add(r[i].pub);return n.isInfinity()?2:(a(t,n),0)},publicKeyTweakAdd(t,e,r){const n=s(e);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0)return 2;const u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(a(t,u),0)},publicKeyTweakMul(t,e,r){const n=s(e);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0||r.isZero())return 2;return a(t,n.getPublic().mul(r)),0},signatureNormalize(t){const e=new o(t.subarray(0,32)),r=new o(t.subarray(32,64));return e.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&t.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){const r=e.subarray(0,32),n=e.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;const{output:s}=t;let a=s.subarray(4,37);a[0]=0,a.set(r,1);let u=33,c=0;for(;u>1&&0===a[c]&&!(128&a[c+1]);--u,++c);if(a=a.subarray(c),128&a[0])return 1;if(u>1&&0===a[0]&&!(128&a[1]))return 1;let l=s.subarray(39,72);l[0]=0,l.set(n,1);let f=33,h=0;for(;f>1&&0===l[h]&&!(128&l[h+1]);--f,++h);return l=l.subarray(h),128&l[0]||f>1&&0===l[0]&&!(128&l[1])?1:(t.outputlen=6+u+f,s[0]=48,s[1]=t.outputlen-2,s[2]=2,s[3]=a.length,s.set(a,4),s[4+u]=2,s[5+u]=l.length,s.set(l,6+u),0)},signatureImport(t,e){if(e.length<8)return 1;if(e.length>72)return 1;if(48!==e[0])return 1;if(e[1]!==e.length-2)return 1;if(2!==e[2])return 1;const r=e[3];if(0===r)return 1;if(5+r>=e.length)return 1;if(2!==e[4+r])return 1;const n=e[5+r];if(0===n)return 1;if(6+r+n!==e.length)return 1;if(128&e[4])return 1;if(r>1&&0===e[4]&&!(128&e[5]))return 1;if(128&e[r+6])return 1;if(n>1&&0===e[r+6]&&!(128&e[r+7]))return 1;let s=e.subarray(4,4+r);if(33===s.length&&0===s[0]&&(s=s.subarray(1)),s.length>32)return 1;let a=e.subarray(6+r);if(33===a.length&&0===a[0]&&(a=a.slice(1)),a.length>32)throw new Error("S length is too long");let u=new o(s);u.cmp(i.n)>=0&&(u=new o(0));let c=new o(e.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),t.set(u.toArrayLike(Uint8Array,"be",32),0),t.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,s,a){if(a){const t=a;a=n=>{const i=t(e,r,null,s,n);if(!(i instanceof Uint8Array&&32===i.length))throw new Error("This is the way");return new o(i)}}const u=new o(r);if(u.cmp(i.n)>=0||u.isZero())return 1;let c;try{c=n.sign(e,r,{canonical:!0,k:a,pers:s})}catch(l){return 1}return t.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),t.recid=c.recoveryParam,0},ecdsaVerify(t,e,r){const a={r:t.subarray(0,32),s:t.subarray(32,64)},u=new o(a.r),c=new o(a.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;const l=s(r);if(null===l)return 2;const f=l.getPublic();return n.verify(e,a,f)?0:3},ecdsaRecover(t,e,r,s){const u={r:e.slice(0,32),s:e.slice(32,64)},c=new o(u.r),l=new o(u.s);if(c.cmp(i.n)>=0||l.cmp(i.n)>=0)return 1;if(c.isZero()||l.isZero())return 2;let f;try{f=n.recoverPubKey(s,u,r)}catch(h){return 2}return a(t,f),0},ecdh(t,e,r,a,u,c,l){const f=s(e);if(null===f)return 1;const h=new o(r);if(h.cmp(i.n)>=0||h.isZero())return 2;const d=f.getPublic().mul(h);if(void 0===u){const e=d.encode(null,!0),r=n.hash().update(e).digest();for(let n=0;n<32;++n)t[n]=r[n]}else{c||(c=new Uint8Array(32));const e=d.getX().toArray("be",32);for(let t=0;t<32;++t)c[t]=e[t];l||(l=new Uint8Array(32));const r=d.getY().toArray("be",32);for(let t=0;t<32;++t)l[t]=r[t];const n=u(c,l,a);if(!(n instanceof Uint8Array&&n.length===t.length))return 2;t.set(n)}return 0}}},9119:function(t){const e="Impossible case. Please create issue.",r="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",i="Unknow error on context randomization",o="Private Key is invalid",s="Public Key could not be parsed",a="Public Key serialization error",u="The sum of the public keys is not valid",c="Signature could not be parsed",l="The nonce generation function failed, or the private key was invalid",f="Public key could not be recover",h="Scalar was invalid (zero or overflow)";function d(t,e){if(!t)throw new Error(e)}function p(t,e,r){if(d(e instanceof Uint8Array,`Expected ${t} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=`Expected ${t} to be an Uint8Array with length [${r.join(", ")}]`;d(r.includes(e.length),n)}else{const n=`Expected ${t} to be an Uint8Array with length ${r}`;d(e.length===r,n)}}function m(t){d("Boolean"===y(t),"Expected compressed to be a Boolean")}function g(t=(t=>new Uint8Array(t)),e){return"function"==typeof t&&(t=t(e)),p("output",t,e),t}function y(t){return Object.prototype.toString.call(t).slice(8,-1)}t.exports=t=>({contextRandomize(e){if(d(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&p("seed",e,32),1===t.contextRandomize(e))throw new Error(i)},privateKeyVerify(e){return p("private key",e,32),0===t.privateKeyVerify(e)},privateKeyNegate(r){switch(p("private key",r,32),t.privateKeyNegate(r)){case 0:return r;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(p("private key",e,32),p("tweak",n,32),t.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(r)}},privateKeyTweakMul(e,r){switch(p("private key",e,32),p("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify(e){return p("public key",e,[33,65]),0===t.publicKeyVerify(e)},publicKeyCreate(e,r=!0,n){switch(p("private key",e,32),m(r),n=g(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(o);case 2:throw new Error(a)}},publicKeyConvert(e,r=!0,n){switch(p("public key",e,[33,65]),m(r),n=g(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(a)}},publicKeyNegate(r,n=!0,i){switch(p("public key",r,[33,65]),m(n),i=g(i,n?33:65),t.publicKeyNegate(i,r)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(e);case 3:throw new Error(a)}},publicKeyCombine(e,r=!0,n){d(Array.isArray(e),"Expected public keys to be an Array"),d(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)p("public key",t,[33,65]);switch(m(r),n=g(n,r?33:65),t.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(u);case 3:throw new Error(a)}},publicKeyTweakAdd(e,n,i=!0,o){switch(p("public key",e,[33,65]),p("tweak",n,32),m(i),o=g(o,i?33:65),t.publicKeyTweakAdd(o,e,n)){case 0:return o;case 1:throw new Error(s);case 2:throw new Error(r)}},publicKeyTweakMul(e,r,i=!0,o){switch(p("public key",e,[33,65]),p("tweak",r,32),m(i),o=g(o,i?33:65),t.publicKeyTweakMul(o,e,r)){case 0:return o;case 1:throw new Error(s);case 2:throw new Error(n)}},signatureNormalize(e){switch(p("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(c)}},signatureExport(r,n){p("signature",r,64);const i={output:n=g(n,72),outputlen:72};switch(t.signatureExport(i,r)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(c);case 2:throw new Error(e)}},signatureImport(r,n){switch(p("signature",r),n=g(n,64),t.signatureImport(n,r)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(e)}},ecdsaSign(r,n,i={},o){p("message",r,32),p("private key",n,32),d("Object"===y(i),"Expected options to be an Object"),void 0!==i.data&&p("options.data",i.data),void 0!==i.noncefn&&d("Function"===y(i.noncefn),"Expected options.noncefn to be a Function");const s={signature:o=g(o,64),recid:null};switch(t.ecdsaSign(s,r,n,i.data,i.noncefn)){case 0:return s;case 1:throw new Error(l);case 2:throw new Error(e)}},ecdsaVerify(e,r,n){switch(p("signature",e,64),p("message",r,32),p("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(c);case 2:throw new Error(s)}},ecdsaRecover(r,n,i,o=!0,s){switch(p("signature",r,64),d("Number"===y(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),p("message",i,32),m(o),s=g(s,o?33:65),t.ecdsaRecover(s,r,n,i)){case 0:return s;case 1:throw new Error(c);case 2:throw new Error(f);case 3:throw new Error(e)}},ecdh(e,r,n={},i){switch(p("public key",e,[33,65]),p("private key",r,32),d("Object"===y(n),"Expected options to be an Object"),void 0!==n.data&&p("options.data",n.data),void 0!==n.hashfn?(d("Function"===y(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&p("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&p("options.ybuf",n.ybuf,32),p("output",i)):i=g(i,32),t.ecdh(i,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(h)}}})},45:function(t){!function(e){"use strict";var r=function(t){setTimeout(t,0)};"undefined"!=typeof process&&process&&"function"==typeof process.nextTick&&(r=process.nextTick),t.exports=function(t){var e={capacity:t||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===e.firstHere){e.current++,e.firstHere=!0;var t=1}else t=0;var r={n:1};"function"==typeof arguments[0]?r.task=arguments[0]:r.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(e.leave)},e.current+r.n-t>e.capacity)return 1===t&&(e.current--,e.firstHere=!1),e.queue.push(r);e.current+=r.n-t,r.task(e.leave),1===t&&(e.firstHere=!1)},leave:function(t){if(t=t||1,e.current-=t,e.queue.length){var n=e.queue[0];n.n+e.current>e.capacity||(e.queue.shift(),e.current+=n.n,r(n.task))}else if(e.current<0)throw new Error("leave called too many times.")},available:function(t){return t=t||1,e.current+t<=e.capacity}};return e}}()},4189:function(t,e,r){var n=r(9509).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,c=Math.min(o-a,i-u),l=0;l<c;l++)r[u+l]=t[a+l];a+=c,(s+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},9072:function(t,e,r){var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(2349),n.sha1=r(8336),n.sha224=r(8432),n.sha256=r(7499),n.sha384=r(1686),n.sha512=r(7816)},2349:function(t,e,r){var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((e=n)<<5|e>>>27)+l(d,i,o,a)+u+r[h]+s[d];u=a,a=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},8336:function(t,e,r){var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=(e=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=c(n)+f(p,i,o,a)+u+r[d]+s[p]|0;u=a,a=o,o=l(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},8432:function(t,e,r){var n=r(5717),i=r(7499),o=r(4189),s=r(9509).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},7499:function(t,e,r){var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function l(t,e,r){return t&e|r&(t|e)}function f(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=t.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((e=r[y-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var v=0;v<64;++v){var b=g+h(u)+c(u,p,m)+s[v]+r[v]|0,w=f(n)+l(n,i,o)|0;g=m,m=p,p=u,u=a+b|0,a=o,o=i,i=n,n=b+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},1686:function(t,e,r){var n=r(5717),i=r(7816),o=r(4189),s=r(9509).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},7816:function(t,e,r){var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function l(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,A=0|this._dl,E=0|this._el,x=0|this._fl,k=0|this._gl,S=0|this._hl,R=0;R<32;R+=2)e[R]=t.readInt32BE(4*R),e[R+1]=t.readInt32BE(4*R+4);for(;R<160;R+=2){var I=e[R-30],P=e[R-30+1],C=d(I,P),T=p(P,I),O=m(I=e[R-4],P=e[R-4+1]),N=g(P,I),B=e[R-14],L=e[R-14+1],j=e[R-32],q=e[R-32+1],U=T+L|0,F=C+B+y(U,T)|0;F=(F=F+O+y(U=U+N|0,N)|0)+j+y(U=U+q|0,q)|0,e[R]=F,e[R+1]=U}for(var D=0;D<160;D+=2){F=e[D],U=e[D+1];var z=l(r,n,i),H=l(w,_,M),K=f(r,w),G=f(w,r),W=h(a,E),V=h(E,a),Z=s[D],J=s[D+1],Y=c(a,u,v),Q=c(E,x,k),X=S+V|0,$=b+W+y(X,S)|0;$=($=($=$+Y+y(X=X+Q|0,Q)|0)+Z+y(X=X+J|0,J)|0)+F+y(X=X+U|0,U)|0;var tt=G+H|0,et=K+z+y(tt,G)|0;b=v,S=k,v=u,k=x,u=a,x=E,a=o+$+y(E=A+X|0,A)|0,o=i,A=M,i=n,M=_,n=r,_=w,r=$+et+y(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+A|0,this._el=this._el+E|0,this._fl=this._fl+x|0,this._gl=this._gl+k|0,this._hl=this._hl+S|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,_)|0,this._ch=this._ch+i+y(this._cl,M)|0,this._dh=this._dh+o+y(this._dl,A)|0,this._eh=this._eh+a+y(this._el,E)|0,this._fh=this._fh+u+y(this._fl,x)|0,this._gh=this._gh+v+y(this._gl,k)|0,this._hh=this._hh+b+y(this._hl,S)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},500:function(t){"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const r=t.indexOf(e);return-1===r?[t]:[t.slice(0,r),t.slice(r+e.length)]}},2830:function(t,e,r){t.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},8501:function(t,e,r){var n=r(1989),i=r(5676),o=r(7529),s=r(584),a=r(8575),u=e;u.request=function(t,e){t="string"==typeof t?a.parse(t):o(t);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||i,u=t.hostname||t.host,c=t.port,l=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new n(t);return e&&f.on("response",e),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:function(t,e,r){var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(t){n=null}}else n=null;return n}function o(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(r){}return!1}function s(t){return"function"==typeof t}e.fetch=s(r.g.fetch)&&s(r.g.ReadableStream),e.writableStream=s(r.g.WritableStream),e.abortController=s(r.g.AbortController),e.arraybuffer=e.fetch||o("arraybuffer"),e.msstream=!e.fetch&&o("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&s(i().overrideMimeType),n=null},1989:function(t,e,r){var n=r(8764).Buffer,i=r(8725),o=r(5717),s=r(5676),a=r(8473),u=s.IncomingMessage,c=s.readyStates;var l=t.exports=function(t){var e,r=this;a.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+n.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){r.setHeader(e,t.headers[e])}));var o=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!i.abortController)o=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!i.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=function(t,e){return i.fetch&&e?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&t?"arraybuffer":"text"}(e,o),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(l,a.Writable),l.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:t,value:e})},l.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},l.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},l.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&0!==e.timeout&&t.setTimeout(e.timeout);var n=t._headers,o=null;"GET"!==e.method&&"HEAD"!==e.method&&(o=new Blob(t._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(t){var e=n[t].name,r=n[t].value;Array.isArray(r)?r.forEach((function(t){s.push([e,t])})):s.push([e,r])})),"fetch"===t._mode){var a=null;if(i.abortController){var u=new AbortController;a=u.signal,t._fetchAbortController=u,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=r.g.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}r.g.fetch(t._opts.url,{method:t._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:a}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var l=t._xhr=new r.g.XMLHttpRequest;try{l.open(t._opts.method,t._opts.url,!0)}catch(f){return void process.nextTick((function(){t.emit("error",f)}))}"responseType"in l&&(l.responseType=t._mode),"withCredentials"in l&&(l.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(l.timeout=e.requestTimeout,l.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(t){l.setRequestHeader(t[0],t[1])})),t._response=null,l.onreadystatechange=function(){switch(l.readyState){case c.LOADING:case c.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(l.onprogress=function(){t._onXHRProgress()}),l.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{l.send(o)}catch(f){return void process.nextTick((function(){t.emit("error",f)}))}}}},l.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),function(t){try{var e=t.status;return null!==e&&0!==e}catch(r){return!1}}(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))},l.prototype._connect=function(){var t=this;t._destroyed||(t._response=new u(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},l.prototype._write=function(t,e,r){this._body.push(t),r()},l.prototype._resetTimers=function(t){var e=this;r.g.clearTimeout(e._socketTimer),e._socketTimer=null,t?(r.g.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=r.g.setTimeout((function(){e.emit("timeout")}),e._socketTimeout))},l.prototype.abort=l.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)},l.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),a.Writable.prototype.end.call(this,t,e,r)},l.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1)},l.prototype.flushHeaders=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5676:function(t,e,r){var n=r(8764).Buffer,i=r(8725),o=r(5717),s=r(8473),a=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=e.IncomingMessage=function(t,e,r,o){var a=this;if(s.Readable.call(a),a._mode=r,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",(function(){process.nextTick((function(){a.emit("close")}))})),"fetch"===r){if(a._fetchResponse=e,a.url=e.url,a.statusCode=e.status,a.statusMessage=e.statusText,e.headers.forEach((function(t,e){a.headers[e.toLowerCase()]=t,a.rawHeaders.push(e,t)})),i.writableStream){var u=new WritableStream({write:function(t){return o(!1),new Promise((function(e,r){a._destroyed?r():a.push(n.from(t))?e():a._resumeFetch=e}))},close:function(){o(!0),a._destroyed||a.push(null)},abort:function(t){o(!0),a._destroyed||a.emit("error",t)}});try{return void e.body.pipeTo(u).catch((function(t){o(!0),a._destroyed||a.emit("error",t)}))}catch(h){}}var c=e.body.getReader();!function t(){c.read().then((function(e){a._destroyed||(o(e.done),e.done?a.push(null):(a.push(n.from(e.value)),t()))})).catch((function(t){o(!0),a._destroyed||a.emit("error",t)}))}()}else{if(a._xhr=t,a._pos=0,a.url=t.responseURL,a.statusCode=t.status,a.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===a.headers[r]&&(a.headers[r]=[]),a.headers[r].push(e[2])):void 0!==a.headers[r]?a.headers[r]+=", "+e[2]:a.headers[r]=e[2],a.rawHeaders.push(e[1],e[2])}})),a._charset="x-user-defined",!i.overrideMimeType){var l=a.rawHeaders["mime-type"];if(l){var f=l.match(/;\s*charset=([^;])(;|$)/);f&&(a._charset=f[1].toLowerCase())}a._charset||(a._charset="utf-8")}}};o(u,s.Readable),u.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},u.prototype._onXHRProgress=function(t){var e=this,i=e._xhr,o=null;switch(e._mode){case"text":if((o=i.responseText).length>e._pos){var s=o.substr(e._pos);if("x-user-defined"===e._charset){for(var u=n.alloc(s.length),c=0;c<s.length;c++)u[c]=255&s.charCodeAt(c);e.push(u)}else e.push(s,e._charset);e._pos=o.length}break;case"arraybuffer":if(i.readyState!==a.DONE||!i.response)break;o=i.response,e.push(n.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=i.response,i.readyState!==a.LOADING||!o)break;e.push(n.from(new Uint8Array(o)));break;case"ms-stream":if(o=i.response,i.readyState!==a.LOADING)break;var l=new r.g.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(n.from(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){t(!0),e.push(null)},l.readAsArrayBuffer(o)}e._xhr.readyState===a.DONE&&"ms-stream"!==e._mode&&(t(!0),e.push(null))}},610:function(t){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`))},6941:function(t,e,r){var n=r(8764).Buffer,i=n.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var o=e.s=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=u;break;default:return void(this.write=s)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function s(t){return t.toString(this.encoding)}function a(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function u(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(t=t.slice(r,t.length),!((i=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var n=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,n),n-=this.charReceived);var i;n=(e+=t.toString(this.encoding,0,n)).length-1;if((i=e.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,n)}return e},o.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},o.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},9604:function(t,e,r){var n=r(3944);t.exports=function(t){return"string"!=typeof t?t:n(t)?t.slice(2):t}},1742:function(t){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n<t.rangeCount;n++)r.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||r.forEach((function(e){t.addRange(e)})),e&&e.focus()}}},655:function(t,e,r){"use strict";r.r(e),r.d(e,{__assign:function(){return o},__asyncDelegator:function(){return _},__asyncGenerator:function(){return w},__asyncValues:function(){return M},__await:function(){return b},__awaiter:function(){return l},__classPrivateFieldGet:function(){return S},__classPrivateFieldIn:function(){return I},__classPrivateFieldSet:function(){return R},__createBinding:function(){return h},__decorate:function(){return a},__exportStar:function(){return d},__extends:function(){return i},__generator:function(){return f},__importDefault:function(){return k},__importStar:function(){return x},__makeTemplateObject:function(){return A},__metadata:function(){return c},__param:function(){return u},__read:function(){return m},__rest:function(){return s},__spread:function(){return g},__spreadArray:function(){return v},__spreadArrays:function(){return y},__values:function(){return p}});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function u(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function f(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(u){a=[6,u],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var h=Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};function d(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||h(e,t,r)}function p(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(m(arguments[e]));return t}function y(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function v(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function w(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){o.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(n){l(o[0][3],n)}var r}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function _(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function M(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function A(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var E=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function x(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&h(e,t,r);return E(e,t),e}function k(t){return t&&t.__esModule?t:{default:t}}function S(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function R(t,e,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r}function I(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},5054:function(t,e,r){var n=r(8764).Buffer,i=r(4501).strict;t.exports=function(t){if(i(t)){var e=n.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(e=e.slice(t.byteOffset,t.byteOffset+t.byteLength)),e}return n.from(t)}},2511:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,c=1,l=26,f=38,h=700,d=72,p=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=u-c,_=Math.floor,M=String.fromCharCode;function A(t){throw RangeError(b[t])}function E(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function x(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+E((t=t.replace(v,".")).split("."),e).join(".")}function k(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function S(t){return E(t,(function(t){var e="";return t>65535&&(e+=M((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=M(t)})).join("")}function R(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function I(t,e,r){var n=0;for(t=r?_(t/h):t>>1,t+=_(t/e);t>w*l>>1;n+=u)t=_(t/w);return _(n+(w+1)*t/(t+f))}function P(t){var e,r,n,i,o,s,f,h,g,y,v,b=[],w=t.length,M=0,E=p,x=d;for((r=t.lastIndexOf(m))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&A("not-basic"),b.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<w;){for(o=M,s=1,f=u;i>=w&&A("invalid-input"),((h=(v=t.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||h>_((a-M)/s))&&A("overflow"),M+=h*s,!(h<(g=f<=x?c:f>=x+l?l:f-x));f+=u)s>_(a/(y=u-g))&&A("overflow"),s*=y;x=I(M-o,e=b.length+1,0==o),_(M/e)>a-E&&A("overflow"),E+=_(M/e),M%=e,b.splice(M++,0,E)}return S(b)}function C(t){var e,r,n,i,o,s,f,h,g,y,v,b,w,E,x,S=[];for(b=(t=k(t)).length,e=p,r=0,o=d,s=0;s<b;++s)(v=t[s])<128&&S.push(M(v));for(n=i=S.length,i&&S.push(m);n<b;){for(f=a,s=0;s<b;++s)(v=t[s])>=e&&v<f&&(f=v);for(f-e>_((a-r)/(w=n+1))&&A("overflow"),r+=(f-e)*w,e=f,s=0;s<b;++s)if((v=t[s])<e&&++r>a&&A("overflow"),v==e){for(h=r,g=u;!(h<(y=g<=o?c:g>=o+l?l:g-o));g+=u)x=h-y,E=u-y,S.push(M(R(y+x%E,0))),h=_(x/E);S.push(M(R(h,0))),o=I(r,w,n==i),r=0,++n}++r,++e}return S.join("")}s={version:"1.3.2",ucs2:{decode:k,encode:S},decode:P,encode:C,toASCII:function(t){return x(t,(function(t){return y.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return x(t,(function(t){return g.test(t)?P(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return s}.call(e,r,e,t))||(t.exports=n)}()},8575:function(t,e,r){"use strict";var n=r(2511),i=r(2502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=b(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(7673);function b(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(a);c[0]=c[0].replace(/\\/g,"/");var b=t=c.join(a);if(b=b.trim(),!r&&1===t.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=s.exec(b);if(_){var M=(_=_[0]).toLowerCase();this.protocol=M,b=b.substr(_.length)}if(r||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var A="//"===b.substr(0,2);!A||_&&g[_]||(b=b.substr(2),this.slashes=!0)}if(!g[_]&&(A||_&&!y[_])){for(var E,x,k=-1,S=0;S<h.length;S++){-1!==(R=b.indexOf(h[S]))&&(-1===k||R<k)&&(k=R)}-1!==(x=-1===k?b.lastIndexOf("@"):b.lastIndexOf("@",k))&&(E=b.slice(0,x),b=b.slice(x+1),this.auth=decodeURIComponent(E)),k=-1;for(S=0;S<f.length;S++){var R;-1!==(R=b.indexOf(f[S]))&&(-1===k||R<k)&&(k=R)}-1===k&&(k=b.length),this.host=b.slice(0,k),b=b.slice(k),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var P=this.hostname.split(/\./),C=(S=0,P.length);S<C;S++){var T=P[S];if(T&&!T.match(d)){for(var O="",N=0,B=T.length;N<B;N++)T.charCodeAt(N)>127?O+="x":O+=T[N];if(!O.match(d)){var L=P.slice(0,S),j=P.slice(S+1),q=T.match(p);q&&(L.push(q[1]),j.unshift(q[2])),j.length&&(b="/"+j.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[M])for(S=0,C=l.length;S<C;S++){var D=l[S];if(-1!==b.indexOf(D)){var z=encodeURIComponent(D);z===D&&(z=escape(D)),b=b.split(D).join(z)}}var H=b.indexOf("#");-1!==H&&(this.hash=b.substr(H),b=b.slice(0,H));var K=b.indexOf("?");if(-1!==K?(this.search=b.substr(K),this.query=b.substr(K+1),e&&(this.query=v.parse(this.query)),b=b.slice(0,K)):e&&(this.search="",this.query={}),b&&(this.pathname=b),y[M]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var G=this.search||"";this.path=U+G}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=t[l])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var f=Object.keys(t),h=0;h<f.length;h++){var d=f[h];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||g[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||"",v=r.search||"";r.path=m+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||b||r.host&&t.pathname,M=_,A=r.pathname&&r.pathname.split("/")||[],E=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===A[0]?A[0]=r.host:A.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),_=_&&(""===p[0]||""===A[0])),w)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,A=p;else if(p.length)A||(A=[]),A.pop(),A=A.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(E)r.hostname=r.host=A.shift(),(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!A.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=A.slice(-1)[0],k=(r.host||t.host||A.length>1)&&("."===x||".."===x)||""===x,S=0,R=A.length;R>=0;R--)"."===(x=A[R])?A.splice(R,1):".."===x?(A.splice(R,1),S++):S&&(A.splice(R,1),S--);if(!_&&!M)for(;S--;S)A.unshift("..");!_||""===A[0]||A[0]&&"/"===A[0].charAt(0)||A.unshift(""),k&&"/"!==A.join("/").substr(-1)&&A.push("");var I,P=""===A[0]||A[0]&&"/"===A[0].charAt(0);E&&(r.hostname=r.host=P?"":A.length?A.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift()));return(_=_||r.host&&A.length)&&!P&&A.unshift(""),A.length?r.pathname=A.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},2502:function(t){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},4927:function(t,e,r){function n(t){try{if(!r.g.localStorage)return!1}catch(n){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},384:function(t){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},5955:function(t,e,r){"use strict";var n=r(2584),i=r(8662),o=r(6430),s=r(5692);function a(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=a(Object.prototype.toString),f=a(Number.prototype.valueOf),h=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(c)var m=a(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(r){return!1}}function y(t){return"[object Map]"===l(t)}function v(t){return"[object Set]"===l(t)}function b(t){return"[object WeakMap]"===l(t)}function w(t){return"[object WeakSet]"===l(t)}function _(t){return"[object ArrayBuffer]"===l(t)}function M(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function A(t){return"[object DataView]"===l(t)}function E(t){return"undefined"!=typeof DataView&&(A.working?A(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=s,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):s(t)||E(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},y.working="undefined"!=typeof Map&&y(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(y.working?y(t):t instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(v.working?v(t):t instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(b.working?b(t):t instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=M,A.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&A(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=E;var x="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function k(t){return"[object SharedArrayBuffer]"===l(t)}function S(t){return void 0!==x&&(void 0===k.working&&(k.working=k(new x)),k.working?k(t):t instanceof x)}function R(t){return g(t,f)}function I(t){return g(t,h)}function P(t){return g(t,d)}function C(t){return u&&g(t,p)}function T(t){return c&&g(t,m)}e.isSharedArrayBuffer=S,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===l(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===l(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===l(t)},e.isGeneratorObject=function(t){return"[object Generator]"===l(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===l(t)},e.isNumberObject=R,e.isStringObject=I,e.isBooleanObject=P,e.isBigIntObject=C,e.isSymbolObject=T,e.isBoxedPrimitive=function(t){return R(t)||I(t)||P(t)||C(t)||T(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(M(t)||S(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},9539:function(t,e,r){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(u(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}})),a=n[r];r<o;a=n[++r])g(a)||!_(a)?s+=" "+a:s+=" "+u(a);return s},e.deprecate=function(t,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return t;if("undefined"==typeof process)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var o={},s=/^$/;if({}.NODE_DEBUG){var a={}.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+a+"$","i")}function u(t,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function l(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return v(i)||(i=f(t,i,n)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(m(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),A(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(w(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(M(r))return t.stylize(Date.prototype.toString.call(r),"date");if(A(r))return h(r)}var c,l="",_=!1,x=["{","}"];(p(r)&&(_=!0,x=["[","]"]),E(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return w(r)&&(l=" "+RegExp.prototype.toString.call(r)),M(r)&&(l=" "+Date.prototype.toUTCString.call(r)),A(r)&&(l=" "+h(r)),0!==s.length||_&&0!=r.length?n<0?w(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=_?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)R(e,String(s))?o.push(d(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return d(t,r,n,a,e,_)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,l,x)):x[0]+l+x[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function v(t){return"string"==typeof t}function b(t){return void 0===t}function w(t){return _(t)&&"[object RegExp]"===x(t)}function _(t){return"object"==typeof t&&null!==t}function M(t){return _(t)&&"[object Date]"===x(t)}function A(t){return _(t)&&("[object Error]"===x(t)||t instanceof Error)}function E(t){return"function"==typeof t}function x(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(s.test(t)){var r=process.pid;o[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else o[t]=function(){};return o[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(5955),e.isArray=p,e.isBoolean=m,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=w,e.types.isRegExp=w,e.isObject=_,e.isDate=M,e.types.isDate=M,e.isError=A,e.types.isNativeError=A,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(384);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(t=new Date,r=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":"),[t.getDate(),S[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(5717),e._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(I&&t[I]){var e;if("function"!=typeof(e=t[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(s){r(s)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),I&&Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=I,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var n=e.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};t.apply(this,e).then((function(t){process.nextTick(o.bind(null,null,t))}),(function(t){process.nextTick(P.bind(null,t,o))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,n(t)),e}},2906:function(t,e,r){const n=r(7187).EventEmitter,i=r(9539).inherits,o=r(1964),s=r(5012),a=r(4005),u=r(4282),c=r(2698),l=(r(6496),r(9728)),f=function(){};function h(t){const e=this;n.call(e),e.setMaxListeners(30),t=t||{};const r={sendAsync:e._handleAsync.bind(e)},i=t.blockTrackerProvider||r;e._blockTracker=t.blockTracker||new s({provider:i,pollingInterval:t.pollingInterval||4e3,setSkipCacheFlag:!0}),e._ready=new c,e.currentBlock=null,e._providers=[]}t.exports=h,i(h,n),h.prototype.start=function(t=f){const e=this;e._ready.go(),e._blockTracker.on("latest",(t=>{e._getBlockByNumberWithRetry(t,((t,r)=>{if(t)return void this.emit("error",t);if(!r)return console.log(r),void this.emit("error",new Error("Could not find block"));const n=(i=r,{number:o.toBuffer(i.number),hash:o.toBuffer(i.hash),parentHash:o.toBuffer(i.parentHash),nonce:o.toBuffer(i.nonce),mixHash:o.toBuffer(i.mixHash),sha3Uncles:o.toBuffer(i.sha3Uncles),logsBloom:o.toBuffer(i.logsBloom),transactionsRoot:o.toBuffer(i.transactionsRoot),stateRoot:o.toBuffer(i.stateRoot),receiptsRoot:o.toBuffer(i.receiptRoot||i.receiptsRoot),miner:o.toBuffer(i.miner),difficulty:o.toBuffer(i.difficulty),totalDifficulty:o.toBuffer(i.totalDifficulty),size:o.toBuffer(i.size),extraData:o.toBuffer(i.extraData),gasLimit:o.toBuffer(i.gasLimit),gasUsed:o.toBuffer(i.gasUsed),timestamp:o.toBuffer(i.timestamp),transactions:i.transactions});var i;e._setCurrentBlock(n),e.emit("rawBlock",r),e.emit("latest",r)}))})),e._blockTracker.on("sync",e.emit.bind(e,"sync")),e._blockTracker.on("error",e.emit.bind(e,"error")),e._running=!0,e.emit("start")},h.prototype.stop=function(){const t=this;t._blockTracker.removeAllListeners(),t._running=!1,t.emit("stop")},h.prototype.isRunning=function(){return this._running},h.prototype.addProvider=function(t,e){const r=this;"number"==typeof e?r._providers.splice(e,0,t):r._providers.push(t),t.setEngine(this)},h.prototype.removeProvider=function(t){const e=this._providers.indexOf(t);if(e<0)throw new Error("Provider not found.");this._providers.splice(e,1)},h.prototype.send=function(t){throw new Error("Web3ProviderEngine does not support synchronous requests.")},h.prototype.sendAsync=function(t,e){const r=this;r._ready.await((function(){Array.isArray(t)?a(t,r._handleAsync.bind(r),e):r._handleAsync(t,e)}))},h.prototype._getBlockByNumberWithRetry=function(t,e){const r=this;let n=5;return void i();function i(){r._getBlockByNumber(t,o)}function o(t,r){return t?e(t):r?void e(null,r):n>0?(n--,void setTimeout((function(){i()}),1e3)):void e(null,null)}},h.prototype._getBlockByNumber=function(t,e){const r=l({method:"eth_getBlockByNumber",params:[t,!1],skipCache:!0});this._handleAsync(r,((t,r)=>t?e(t):e(null,r.result)))},h.prototype._handleAsync=function(t,e){var r=this,n=-1,i=null,o=null,s=[];function a(r,n){o=r,i=n,u(s,(function(t,e){t?t(o,i,e):e()}),(function(){var r={id:t.id,jsonrpc:t.jsonrpc,result:i};null!=o?(r.error={message:o.stack||o.message||o,code:-32e3},e(o,r)):e(null,r)}))}!function e(i){if(n+=1,s.unshift(i),n>=r._providers.length)a(new Error('Request for method "'+t.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{r._providers[n].handleRequest(t,e,a)}catch(o){a(o)}}()},h.prototype._setCurrentBlock=function(t){this.currentBlock=t,this.emit("block",t)}},1955:function(t,e,r){const n=r(6403),i=r(7870);t.exports=class extends n{constructor(t){super((({blockTracker:e})=>i(Object.assign({blockTracker:e},t))))}}},2455:function(t,e,r){const n=r(6403),i=r(8406);t.exports=class extends n{constructor(){super((({blockTracker:t,provider:e,engine:r})=>i({blockTracker:t,provider:e})))}}},2110:function(t,e,r){const n=r(9539).inherits,i=r(398);function o(t){t=t||{},this.staticResponses=t}t.exports=o,n(o,i),o.prototype.handleRequest=function(t,e,r){var n=this.staticResponses[t.method];"function"==typeof n?n(t,e,r):void 0!==n?setTimeout((()=>r(null,n))):e()}},8747:function(t,e,r){const n=r(7879),i=r(47),o=r(9539).inherits,s=r(1964),a=r(2843),u=r(7529),c=r(45),l=r(398),f=r(8372),h=/^[0-9A-Fa-f]+$/g;function d(t){const e=this;e.nonceLock=c(1),t.getAccounts&&(e.getAccounts=t.getAccounts),t.processTransaction&&(e.processTransaction=t.processTransaction),t.processMessage&&(e.processMessage=t.processMessage),t.processPersonalMessage&&(e.processPersonalMessage=t.processPersonalMessage),t.processTypedMessage&&(e.processTypedMessage=t.processTypedMessage),e.approveTransaction=t.approveTransaction||e.autoApprove,e.approveMessage=t.approveMessage||e.autoApprove,e.approvePersonalMessage=t.approvePersonalMessage||e.autoApprove,e.approveDecryptMessage=t.approveDecryptMessage||e.autoApprove,e.approveEncryptionPublicKey=t.approveEncryptionPublicKey||e.autoApprove,e.approveTypedMessage=t.approveTypedMessage||e.autoApprove,t.signTransaction&&(e.signTransaction=t.signTransaction||v("signTransaction")),t.signMessage&&(e.signMessage=t.signMessage||v("signMessage")),t.signPersonalMessage&&(e.signPersonalMessage=t.signPersonalMessage||v("signPersonalMessage")),t.decryptMessage&&(e.decryptMessage=t.decryptMessage||v("decryptMessage")),t.encryptionPublicKey&&(e.encryptionPublicKey=t.encryptionPublicKey||v("encryptionPublicKey")),t.signTypedMessage&&(e.signTypedMessage=t.signTypedMessage||v("signTypedMessage")),t.recoverPersonalSignature&&(e.recoverPersonalSignature=t.recoverPersonalSignature),t.publishTransaction&&(e.publishTransaction=t.publishTransaction),e.estimateGas=t.estimateGas||e.estimateGas,e.getGasPrice=t.getGasPrice||e.getGasPrice}function p(t){return t.toLowerCase()}function m(t){const e=s.addHexPrefix(t);return s.isValidAddress(e)}function g(t){const e=s.addHexPrefix(t);return!s.isValidAddress(e)&&y(t)}function y(t){if(!("string"==typeof t))return!1;if(!("0x"===t.slice(0,2)))return!1;return t.slice(2).match(h)}function v(t){return function(e,r){r(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+t+'" fn in constructor options'))}}t.exports=d,o(d,l),d.prototype.handleRequest=function(t,e,r){const i=this;let o,s,a,c,l;switch(i._parityRequests={},i._parityRequestCount=0,t.method){case"eth_coinbase":return void i.getAccounts((function(t,e){if(t)return r(t);let n=e[0]||null;r(null,n)}));case"eth_accounts":return void i.getAccounts((function(t,e){if(t)return r(t);r(null,e)}));case"eth_sendTransaction":return o=t.params[0],void n([t=>i.validateTransaction(o,t),t=>i.processTransaction(o,t)],r);case"eth_signTransaction":return o=t.params[0],void n([t=>i.validateTransaction(o,t),t=>i.processSignTransaction(o,t)],r);case"eth_sign":return l=t.params[0],c=t.params[1],a=t.params[2]||{},s=u(a,{from:l,data:c}),void n([t=>i.validateMessage(s,t),t=>i.processMessage(s,t)],r);case"personal_sign":return function(){const e=t.params[0];if(g(t.params[1])&&m(e)){let e="The eth_personalSign method requires params ordered ";e+="[message, address]. This was previously handled incorrectly, ",e+="and has been corrected automatically. ",e+="Please switch this param order for smooth behavior in the future.",console.warn(e),l=t.params[0],c=t.params[1]}else c=t.params[0],l=t.params[1];a=t.params[2]||{},s=u(a,{from:l,data:c}),n([t=>i.validatePersonalMessage(s,t),t=>i.processPersonalMessage(s,t)],r)}();case"eth_decryptMessage":return function(){const e=t.params[0];if(g(t.params[1])&&m(e)){let e="The eth_decryptMessage method requires params ordered ";e+="[message, address]. This was previously handled incorrectly, ",e+="and has been corrected automatically. ",e+="Please switch this param order for smooth behavior in the future.",console.warn(e),l=t.params[0],c=t.params[1]}else c=t.params[0],l=t.params[1];a=t.params[2]||{},s=u(a,{from:l,data:c}),n([t=>i.validateDecryptMessage(s,t),t=>i.processDecryptMessage(s,t)],r)}();case"encryption_public_key":return function(){const e=t.params[0];n([t=>i.validateEncryptionPublicKey(e,t),t=>i.processEncryptionPublicKey(e,t)],r)}();case"personal_ecRecover":return function(){c=t.params[0];let e=t.params[1];a=t.params[2]||{},s=u(a,{sig:e,data:c}),i.recoverPersonalSignature(s,r)}();case"eth_signTypedData":case"eth_signTypedData_v3":case"eth_signTypedData_v4":return function(){const e=t.params[0],o=t.params[1];m(e)?(l=e,c=o):(c=e,l=o),a=t.params[2]||{},s=u(a,{from:l,data:c}),n([t=>i.validateTypedMessage(s,t),t=>i.processTypedMessage(s,t)],r)}();case"parity_postTransaction":return o=t.params[0],void i.parityPostTransaction(o,r);case"parity_postSign":return l=t.params[0],c=t.params[1],void i.parityPostSign(l,c,r);case"parity_checkRequest":return function(){const e=t.params[0];i.parityCheckRequest(e,r)}();case"parity_defaultAccount":return void i.getAccounts((function(t,e){if(t)return r(t);const n=e[0]||null;r(null,n)}));default:return void e()}},d.prototype.getAccounts=function(t){t(null,[])},d.prototype.processTransaction=function(t,e){const r=this;n([e=>r.approveTransaction(t,e),(t,e)=>r.checkApproval("transaction",t,e),e=>r.finalizeAndSubmitTx(t,e)],e)},d.prototype.processSignTransaction=function(t,e){const r=this;n([e=>r.approveTransaction(t,e),(t,e)=>r.checkApproval("transaction",t,e),e=>r.finalizeTx(t,e)],e)},d.prototype.processMessage=function(t,e){const r=this;n([e=>r.approveMessage(t,e),(t,e)=>r.checkApproval("message",t,e),e=>r.signMessage(t,e)],e)},d.prototype.processPersonalMessage=function(t,e){const r=this;n([e=>r.approvePersonalMessage(t,e),(t,e)=>r.checkApproval("message",t,e),e=>r.signPersonalMessage(t,e)],e)},d.prototype.processDecryptMessage=function(t,e){const r=this;n([e=>r.approveDecryptMessage(t,e),(t,e)=>r.checkApproval("decryptMessage",t,e),e=>r.decryptMessage(t,e)],e)},d.prototype.processEncryptionPublicKey=function(t,e){const r=this;n([e=>r.approveEncryptionPublicKey(t,e),(t,e)=>r.checkApproval("encryptionPublicKey",t,e),e=>r.encryptionPublicKey(t,e)],e)},d.prototype.processTypedMessage=function(t,e){const r=this;n([e=>r.approveTypedMessage(t,e),(t,e)=>r.checkApproval("message",t,e),e=>r.signTypedMessage(t,e)],e)},d.prototype.autoApprove=function(t,e){e(null,!0)},d.prototype.checkApproval=function(t,e,r){r(e?null:new Error("User denied "+t+" signature."))},d.prototype.parityPostTransaction=function(t,e){const r=this,n=`0x${r._parityRequestCount.toString(16)}`;r._parityRequestCount++,r.emitPayload({method:"eth_sendTransaction",params:[t]},(function(t,e){if(t)return void(r._parityRequests[n]={error:t});const i=e.result;r._parityRequests[n]=i})),e(null,n)},d.prototype.parityPostSign=function(t,e,r){const n=this,i=`0x${n._parityRequestCount.toString(16)}`;n._parityRequestCount++,n.emitPayload({method:"eth_sign",params:[t,e]},(function(t,e){if(t)return void(n._parityRequests[i]={error:t});const r=e.result;n._parityRequests[i]=r})),r(null,i)},d.prototype.parityCheckRequest=function(t,e){const r=this._parityRequests[t]||null;return r?r.error?e(r.error):void e(null,r):e(null,null)},d.prototype.recoverPersonalSignature=function(t,e){let r;try{r=a.recoverPersonalSignature(t)}catch(n){return e(n)}e(null,r)},d.prototype.validateTransaction=function(t,e){if(void 0===t.from)return e(new Error("Undefined address - from address required to sign transaction."));this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign transaction for this address: "${t.from}"`))}))},d.prototype.validateMessage=function(t,e){if(void 0===t.from)return e(new Error("Undefined address - from address required to sign message."));this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign message for this address: "${t.from}"`))}))},d.prototype.validatePersonalMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to sign personal message.")):void 0===t.data?e(new Error("Undefined message - message required to sign personal message.")):y(t.data)?void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign message for this address: "${t.from}"`))})):e(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},d.prototype.validateDecryptMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to decrypt message.")):void 0===t.data?e(new Error("Undefined message - message required to decrypt message.")):y(t.data)?void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to decrypt message for this address: "${t.from}"`))})):e(new Error("HookedWalletSubprovider - validateDecryptMessage - message was not encoded as hex."))},d.prototype.validateEncryptionPublicKey=function(t,e){this.validateSender(t,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to obtain encryption public key for this address: "${t}"`))}))},d.prototype.validateTypedMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to sign typed data.")):void 0===t.data?e(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign message for this address: "${t.from}"`))}))},d.prototype.validateSender=function(t,e){if(!t)return e(null,!1);this.getAccounts((function(r,n){if(r)return e(r);const i=-1!==n.map(p).indexOf(t.toLowerCase());e(null,i)}))},d.prototype.finalizeAndSubmitTx=function(t,e){const r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,t),r.signTransaction.bind(r),r.publishTransaction.bind(r)],(function(t,n){if(r.nonceLock.leave(),t)return e(t);e(null,n)}))}))},d.prototype.finalizeTx=function(t,e){const r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,t),r.signTransaction.bind(r)],(function(n,i){if(r.nonceLock.leave(),n)return e(n);e(null,{raw:i,tx:t})}))}))},d.prototype.publishTransaction=function(t,e){this.emitPayload({method:"eth_sendRawTransaction",params:[t]},(function(t,r){if(t)return e(t);e(null,r.result)}))},d.prototype.estimateGas=function(t,e){f(this.engine,t,e)},d.prototype.getGasPrice=function(t){this.emitPayload({method:"eth_gasPrice",params:[]},(function(e,r){if(e)return t(e);t(null,r.result)}))},d.prototype.fillInTxExtras=function(t,e){const r=this,n=t.from,o={};void 0===t.gasPrice&&(o.gasPrice=r.getGasPrice.bind(r)),void 0===t.nonce&&(o.nonce=r.emitPayload.bind(r,{method:"eth_getTransactionCount",params:[n,"pending"]})),void 0===t.gas&&(o.gas=r.estimateGas.bind(r,function(t){return{from:t.from,to:t.to,value:t.value,data:t.data,gas:t.gas,gasPrice:t.gasPrice,nonce:t.nonce}}(t))),i(o,(function(r,n){if(r)return e(r);const i={};n.gasPrice&&(i.gasPrice=n.gasPrice),n.nonce&&(i.nonce=n.nonce.result),n.gas&&(i.gas=n.gas),e(null,u(t,i))}))}},6403:function(t,e,r){const n=r(398);t.exports=class extends n{constructor(t){if(super(),!t)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");this._constructorFn=t}setEngine(t){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");const e=t._blockTracker,r=this._constructorFn({engine:t,provider:t,blockTracker:e});if(!r)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!=typeof r)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=r}handleRequest(t,e,r){const n={id:t.id};this.middleware(t,n,(function(t){e(((e,r,i)=>{e?(delete n.result,n.error={message:e.message||e}):n.result=r,t?t(i):i()}))}),(function(t){if(t)return r(t);r(null,n.result)}))}}},3621:function(t,e,r){var n=r(8764).Buffer;const i=r(9539).inherits,o=r(9847),s=r(1964),a=r(398),u=r(6496).blockTagForPayload;function c(t){this.nonceCache={}}t.exports=c,i(c,a),c.prototype.handleRequest=function(t,e,r){const i=this;switch(t.method){case"eth_getTransactionCount":var a=u(t),c=t.params[0].toLowerCase(),l=i.nonceCache[c];return void("pending"===a?l?r(null,l):e((function(t,e,r){if(t)return r();void 0===i.nonceCache[c]&&(i.nonceCache[c]=e),r()})):e());case"eth_sendRawTransaction":return void e((function(e,r,a){if(e)return a();var u=t.params[0],c=(s.stripHexPrefix(u),n.from(s.stripHexPrefix(u),"hex"),new o(n.from(s.stripHexPrefix(u),"hex"))),l="0x"+c.getSenderAddress().toString("hex").toLowerCase(),f=s.bufferToInt(c.nonce),h=(++f).toString(16);h.length%2&&(h="0"+h),h="0x"+h,i.nonceCache[l]=h,a()}));case"evm_revert":return i.nonceCache={},void e();default:return void e()}}},398:function(t,e,r){const n=r(9728);function i(){}t.exports=i,i.prototype.setEngine=function(t){const e=this;e.engine||(e.engine=t,t.on("block",(function(t){e.currentBlock=t})),t.on("start",(function(){e.start()})),t.on("stop",(function(){e.stop()})))},i.prototype.handleRequest=function(t,e,r){throw new Error("Subproviders should override `handleRequest`.")},i.prototype.emitPayload=function(t,e){this.engine.sendAsync(n(t),e)},i.prototype.stop=function(){},i.prototype.start=function(){}},8191:function(t,e,r){const n=r(6403),i=r(8961);t.exports=class extends n{constructor(){super((({blockTracker:t,provider:e,engine:r})=>{const{events:n,middleware:o}=i({blockTracker:t,provider:e});return n.on("notification",(t=>r.emit("data",null,t))),o}))}}},9728:function(t,e,r){const n=r(8620),i=r(7529);t.exports=function(t){return i({id:n(),jsonrpc:"2.0",params:[]},t)}},8372:function(t,e,r){const n=r(9728);t.exports=function(t,e,r){t.sendAsync(n({method:"eth_estimateGas",params:[e]}),(function(t,e){if(t)return"no contract code at given address"===t.message?r(null,"0xcf08"):r(t);r(null,e.result)}))}},8620:function(t){t.exports=function(){return Math.floor(Number.MAX_SAFE_INTEGER*Math.random())}},6496:function(t,e,r){const n=r(7266);function i(t){return"never"!==a(t)}function o(t){var e=s(t);return e>=t.params.length?t.params:"eth_getBlockByNumber"===t.method?t.params.slice(1):t.params.slice(0,e)}function s(t){switch(t.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function a(t){switch(t.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}t.exports={cacheIdentifierForPayload:function(t,e={}){if(!i(t))return null;const{includeBlockRef:r}=e,s=r?t.params:o(t);return t.method+":"+n(s)},canCache:i,blockTagForPayload:function(t){var e=s(t);if(e>=t.params.length)return null;return t.params[e]},paramsWithoutBlockTag:o,blockTagParamIndex:s,cacheTypeForPayload:a}},2698:function(t,e,r){const n=r(7187).EventEmitter,i=r(9539).inherits;function o(){n.call(this),this.isLocked=!0}t.exports=o,i(o,n),o.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},o.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},o.prototype.await=function(t){const e=this;e.isLocked?e.once("unlock",t):setTimeout(t)}},6430:function(t,e,r){"use strict";var n=r(4029),i=r(3083),o=r(1924),s=r(5275),a=o("Object.prototype.toString"),u=r(6410)(),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),f=o("String.prototype.slice"),h={},d=Object.getPrototypeOf;u&&s&&d&&n(l,(function(t){if("function"==typeof c[t]){var e=new c[t];if(Symbol.toStringTag in e){var r=d(e),n=s(r,Symbol.toStringTag);if(!n){var i=d(r);n=s(i,Symbol.toStringTag)}h[t]=n.get}}}));var p=r(5692);t.exports=function(t){return!!p(t)&&(u&&Symbol.toStringTag in t?function(t){var e=!1;return n(h,(function(r,n){if(!e)try{var i=r.call(t);i===n&&(e=i)}catch(o){}})),e}(t):f(a(t),8,-1))}},8355:function(t,e){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.SecurityError=i;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.InvalidStateError=o;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.NetworkError=s;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.SyntaxError=a},9536:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(6763));var n=r(335);e.XMLHttpRequestEventTarget=n.XMLHttpRequestEventTarget},7296:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){this.type=t,this.bubbles=!1,this.cancelable=!1,this.loaded=0,this.lengthComputable=!1,this.total=0};e.ProgressEvent=r},335:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.listeners={}}return t.prototype.addEventListener=function(t,e){t=t.toLowerCase(),this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(e.handleEvent||e)},t.prototype.removeEventListener=function(t,e){if(t=t.toLowerCase(),this.listeners[t]){var r=this.listeners[t].indexOf(e.handleEvent||e);r<0||this.listeners[t].splice(r,1)}},t.prototype.dispatchEvent=function(t){var e=t.type.toLowerCase();if(t.target=this,this.listeners[e])for(var r=0,n=this.listeners[e];r<n.length;r++){n[r].call(this,t)}var i=this["on"+e];return i&&i.call(this,t),!0},t}();e.XMLHttpRequestEventTarget=r},7983:function(t,e,r){"use strict";var n,i=r(8764).Buffer,o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=t.call(this)||this;return e._contentType=null,e._body=null,e._reset(),e}return o(e,t),e.prototype._reset=function(){this._contentType=null,this._body=null},e.prototype._setData=function(t){if(null!=t)if("string"==typeof t)0!==t.length&&(this._contentType="text/plain;charset=UTF-8"),this._body=new i(t,"utf-8");else if(i.isBuffer(t))this._body=t;else if(t instanceof ArrayBuffer){for(var e=new i(t.byteLength),r=new Uint8Array(t),n=0;n<t.byteLength;n++)e[n]=r[n];this._body=e}else{if(!(t.buffer&&t.buffer instanceof ArrayBuffer))throw new Error("Unsupported send() data "+t);e=new i(t.byteLength);var o=t.byteOffset;for(r=new Uint8Array(t.buffer),n=0;n<t.byteLength;n++)e[n]=r[n+o];this._body=e}},e.prototype._finalizeHeaders=function(t,e){this._contentType&&!e["content-type"]&&(t["Content-Type"]=this._contentType),this._body&&(t["Content-Length"]=this._body.length.toString())},e.prototype._startUpload=function(t){this._body&&t.write(this._body),t.end()},e}(r(335).XMLHttpRequestEventTarget);e.XMLHttpRequestUpload=s},6763:function(t,e,r){"use strict";var n,i=r(8764).Buffer,o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};Object.defineProperty(e,"__esModule",{value:!0});var a=r(8501),u=r(9267),c=r(7435),l=r(8575),f=r(7296),h=r(8355),d=r(335),p=r(7983),m=r(7866),g=function(t){function e(r){void 0===r&&(r={});var n=t.call(this)||this;return n.UNSENT=e.UNSENT,n.OPENED=e.OPENED,n.HEADERS_RECEIVED=e.HEADERS_RECEIVED,n.LOADING=e.LOADING,n.DONE=e.DONE,n.onreadystatechange=null,n.readyState=e.UNSENT,n.response=null,n.responseText="",n.responseType="",n.status=0,n.statusText="",n.timeout=0,n.upload=new p.XMLHttpRequestUpload,n.responseUrl="",n.withCredentials=!1,n._method=null,n._url=null,n._sync=!1,n._headers={},n._loweredHeaders={},n._mimeOverride=null,n._request=null,n._response=null,n._responseParts=null,n._responseHeaders=null,n._aborting=null,n._error=null,n._loadedBytes=0,n._totalBytes=0,n._lengthComputable=!1,n._restrictedMethods={CONNECT:!0,TRACE:!0,TRACK:!0},n._restrictedHeaders={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0},n._privateHeaders={"set-cookie":!0,"set-cookie2":!0},n._userAgent="Mozilla/5.0 ("+c.type()+" "+c.arch()+") node.js/"+process.versions.node+" v8/"+process.versions.v8,n._anonymous=r.anon||!1,n}return o(e,t),e.prototype.open=function(t,r,n,i,o){if(void 0===n&&(n=!0),t=t.toUpperCase(),this._restrictedMethods[t])throw new e.SecurityError("HTTP method "+t+" is not allowed in XHR");var s=this._parseUrl(r,i,o);this.readyState===e.HEADERS_RECEIVED||(this.readyState,e.LOADING),this._method=t,this._url=s,this._sync=!n,this._headers={},this._loweredHeaders={},this._mimeOverride=null,this._setReadyState(e.OPENED),this._request=null,this._response=null,this.status=0,this.statusText="",this._responseParts=[],this._responseHeaders=null,this._loadedBytes=0,this._totalBytes=0,this._lengthComputable=!1},e.prototype.setRequestHeader=function(t,r){if(this.readyState!==e.OPENED)throw new e.InvalidStateError("XHR readyState must be OPENED");var n=t.toLowerCase();this._restrictedHeaders[n]||/^sec-/.test(n)||/^proxy-/.test(n)?console.warn('Refused to set unsafe header "'+t+'"'):(r=r.toString(),null!=this._loweredHeaders[n]?(t=this._loweredHeaders[n],this._headers[t]=this._headers[t]+", "+r):(this._loweredHeaders[n]=t,this._headers[t]=r))},e.prototype.send=function(t){if(this.readyState!==e.OPENED)throw new e.InvalidStateError("XHR readyState must be OPENED");if(this._request)throw new e.InvalidStateError("send() already called");switch(this._url.protocol){case"file:":return this._sendFile(t);case"http:":case"https:":return this._sendHttp(t);default:throw new e.NetworkError("Unsupported protocol "+this._url.protocol)}},e.prototype.abort=function(){null!=this._request&&(this._request.abort(),this._setError(),this._dispatchProgress("abort"),this._dispatchProgress("loadend"))},e.prototype.getResponseHeader=function(t){if(null==this._responseHeaders||null==t)return null;var e=t.toLowerCase();return this._responseHeaders.hasOwnProperty(e)?this._responseHeaders[t.toLowerCase()]:null},e.prototype.getAllResponseHeaders=function(){var t=this;return null==this._responseHeaders?"":Object.keys(this._responseHeaders).map((function(e){return e+": "+t._responseHeaders[e]})).join("\r\n")},e.prototype.overrideMimeType=function(t){if(this.readyState===e.LOADING||this.readyState===e.DONE)throw new e.InvalidStateError("overrideMimeType() not allowed in LOADING or DONE");this._mimeOverride=t.toLowerCase()},e.prototype.nodejsSet=function(t){if(this.nodejsHttpAgent=t.httpAgent||this.nodejsHttpAgent,this.nodejsHttpsAgent=t.httpsAgent||this.nodejsHttpsAgent,t.hasOwnProperty("baseUrl")){if(null!=t.baseUrl)if(!l.parse(t.baseUrl,!1,!0).protocol)throw new e.SyntaxError("baseUrl must be an absolute URL");this.nodejsBaseUrl=t.baseUrl}},e.nodejsSet=function(t){e.prototype.nodejsSet(t)},e.prototype._setReadyState=function(t){this.readyState=t,this.dispatchEvent(new f.ProgressEvent("readystatechange"))},e.prototype._sendFile=function(t){throw new Error("Protocol file: not implemented")},e.prototype._sendHttp=function(t){if(this._sync)throw new Error("Synchronous XHR processing not implemented");!t||"GET"!==this._method&&"HEAD"!==this._method?t=t||"":(console.warn("Discarding entity body for "+this._method+" requests"),t=null),this.upload._setData(t),this._finalizeHeaders(),this._sendHxxpRequest()},e.prototype._sendHxxpRequest=function(){var t=this;if(this.withCredentials){var r=e.cookieJar.getCookies(m.CookieAccessInfo(this._url.hostname,this._url.pathname,"https:"===this._url.protocol)).toValueString();this._headers.cookie=this._headers.cookie2=r}var n="http:"===this._url.protocol?[a,this.nodejsHttpAgent]:[u,this.nodejsHttpsAgent],i=n[0],o=n[1],s=i.request.bind(i)({hostname:this._url.hostname,port:+this._url.port,path:this._url.path,auth:this._url.auth,method:this._method,headers:this._headers,agent:o});this._request=s,this.timeout&&s.setTimeout(this.timeout,(function(){return t._onHttpTimeout(s)})),s.on("response",(function(e){return t._onHttpResponse(s,e)})),s.on("error",(function(e){return t._onHttpRequestError(s,e)})),this.upload._startUpload(s),this._request===s&&this._dispatchProgress("loadstart")},e.prototype._finalizeHeaders=function(){this._headers=s({},this._headers,{Connection:"keep-alive",Host:this._url.host,"User-Agent":this._userAgent},this._anonymous?{Referer:"about:blank"}:{}),this.upload._finalizeHeaders(this._headers,this._loweredHeaders)},e.prototype._onHttpResponse=function(t,r){var n=this;if(this._request===t){if(this.withCredentials&&(r.headers["set-cookie"]||r.headers["set-cookie2"])&&e.cookieJar.setCookies(r.headers["set-cookie"]||r.headers["set-cookie2"]),[301,302,303,307,308].indexOf(r.statusCode)>=0)return this._url=this._parseUrl(r.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=r,this._response.on("data",(function(t){return n._onHttpResponseData(r,t)})),this._response.on("end",(function(){return n._onHttpResponseEnd(r)})),this._response.on("close",(function(){return n._onHttpResponseClose(r)})),this.responseUrl=this._url.href.split("#")[0],this.status=r.statusCode,this.statusText=a.STATUS_CODES[this.status],this._parseResponseHeaders(r);var i=this._responseHeaders["content-length"]||"";this._totalBytes=+i,this._lengthComputable=!!i,this._setReadyState(e.HEADERS_RECEIVED)}},e.prototype._onHttpResponseData=function(t,r){this._response===t&&(this._responseParts.push(new i(r)),this._loadedBytes+=r.length,this.readyState!==e.LOADING&&this._setReadyState(e.LOADING),this._dispatchProgress("progress"))},e.prototype._onHttpResponseEnd=function(t){this._response===t&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(e.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},e.prototype._onHttpResponseClose=function(t){if(this._response===t){var r=this._request;this._setError(),r.abort(),this._setReadyState(e.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},e.prototype._onHttpTimeout=function(t){this._request===t&&(this._setError(),t.abort(),this._setReadyState(e.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},e.prototype._onHttpRequestError=function(t,r){this._request===t&&(this._setError(),t.abort(),this._setReadyState(e.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},e.prototype._dispatchProgress=function(t){var r=new e.ProgressEvent(t);r.lengthComputable=this._lengthComputable,r.loaded=this._loadedBytes,r.total=this._totalBytes,this.dispatchEvent(r)},e.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},e.prototype._parseUrl=function(t,e,r){var n=null==this.nodejsBaseUrl?t:l.resolve(this.nodejsBaseUrl,t),i=l.parse(n,!1,!0);i.hash=null;var o=(i.auth||"").split(":"),s=o[0],a=o[1];return(s||a||e||r)&&(i.auth=(e||s||"")+":"+(r||a||"")),i},e.prototype._parseResponseHeaders=function(t){for(var e in this._responseHeaders={},t.headers){var r=e.toLowerCase();this._privateHeaders[r]||(this._responseHeaders[r]=t.headers[e])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},e.prototype._parseResponse=function(){var t=i.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(t.toString("utf-8"))}catch(o){this.response=null}return;case"buffer":return this.responseText=null,void(this.response=t);case"arraybuffer":this.responseText=null;for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n<t.length;n++)r[n]=t[n];return void(this.response=e);default:try{this.responseText=t.toString(this._parseResponseEncoding())}catch(s){this.responseText=t.toString("binary")}this.response=this.responseText}},e.prototype._parseResponseEncoding=function(){return/;\s*charset=(.*)$/.exec(this._responseHeaders["content-type"]||"")[1]||"utf-8"},e.ProgressEvent=f.ProgressEvent,e.InvalidStateError=h.InvalidStateError,e.NetworkError=h.NetworkError,e.SecurityError=h.SecurityError,e.SyntaxError=h.SyntaxError,e.XMLHttpRequestUpload=p.XMLHttpRequestUpload,e.UNSENT=0,e.OPENED=1,e.HEADERS_RECEIVED=2,e.LOADING=3,e.DONE=4,e.cookieJar=m.CookieJar(),e}(d.XMLHttpRequestEventTarget);e.XMLHttpRequest=g,g.prototype.nodejsHttpAgent=a.globalAgent,g.prototype.nodejsHttpsAgent=u.globalAgent,g.prototype.nodejsBaseUrl=null},7529:function(t){t.exports=function(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t};var e=Object.prototype.hasOwnProperty},8677:function(){},2808:function(){},6563:function(){},6601:function(){},9214:function(){},2361:function(){},4616:function(){},6567:function(){},3083:function(t,e,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof i[n[e]]&&(t[t.length]=n[e]);return t}},7754:function(t,e,r){"use strict";r.d(e,{M:function(){return s}});var n=r(9931),i=r(5059),o=r(5893),s=(0,n.m)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});s.displayName="Center";var a={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};(0,i.G)((function(t,e){const{axis:r="both",...i}=t;return(0,o.jsx)(n.m.div,{ref:e,__css:a[r],...i,position:"absolute"})}))},3100:function(t,e,r){"use strict";r.d(e,{xu:function(){return s}});var n=r(9931),i=r(5059),o=r(5893),s=(0,n.m)("div");s.displayName="Box";var a=(0,i.G)((function(t,e){const{size:r,centerContent:n=!0,...i}=t,a=n?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return(0,o.jsx)(s,{ref:e,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...i})}));a.displayName="Square",(0,i.G)((function(t,e){const{size:r,...n}=t;return(0,o.jsx)(a,{size:r,ref:e,borderRadius:"9999px",...n})})).displayName="Circle"},4418:function(t,e,r){"use strict";r.d(e,{X:function(){return c}});var n=r(5059),i=r(1639),o=r(3179),s=r(9931),a=r(5432),u=r(5893),c=(0,n.G)((function(t,e){const r=(0,i.mq)("Heading",t),{className:n,...c}=(0,o.Lr)(t);return(0,u.jsx)(s.m.h2,{ref:e,className:(0,a.cx)("chakra-heading",t.className),...c,__css:r})}));c.displayName="Heading"},8911:function(t,e,r){"use strict";r.d(e,{x:function(){return l}});var n=r(5059),i=r(1639),o=r(3179),s=r(9931),a=r(5432),u=r(7052),c=r(5893),l=(0,n.G)((function(t,e){const r=(0,i.mq)("Text",t),{className:n,align:l,decoration:f,casing:h,...d}=(0,o.Lr)(t),p=(0,u.o)({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return(0,c.jsx)(s.m.p,{ref:e,className:(0,a.cx)("chakra-text",t.className),...p,...d,__css:r})}));l.displayName="Text"},7052:function(t,e,r){"use strict";function n(t){const e=Object.assign({},t);for(let r in e)void 0===e[r]&&delete e[r];return e}r.d(e,{o:function(){return n}})},8597:function(t){"use strict";t.exports={i8:"6.5.4"}},7381:function(t){"use strict";t.exports=JSON.parse('{"genesisGasLimit":{"v":5000,"d":"Gas limit of the Genesis block."},"genesisDifficulty":{"v":17179869184,"d":"Difficulty of the Genesis block."},"genesisNonce":{"v":"0x0000000000000042","d":"the geneis nonce"},"genesisExtraData":{"v":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","d":"extra data "},"genesisHash":{"v":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","d":"genesis hash"},"genesisStateRoot":{"v":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544","d":"the genesis state root"},"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be."},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations."},"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be."},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations."},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not."},"maximumExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis."},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs."},"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed."},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack."},"tierStepGas":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them."},"expGas":{"v":10,"d":"Once per EXP instuction."},"expByteGas":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction."},"sha3Gas":{"v":30,"d":"Once per SHA3 operation."},"sha3WordGas":{"v":6,"d":"Once per word of the SHA3 operation\'s data."},"sloadGas":{"v":50,"d":"Once per SLOAD operation."},"sstoreSetGas":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero."},"sstoreResetGas":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero."},"sstoreRefundGas":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero."},"jumpdestGas":{"v":1,"d":"Refunded gas, once per SSTORE operation if the zeroness changes to zero."},"logGas":{"v":375,"d":"Per LOG* operation."},"logDataGas":{"v":8,"d":"Per byte in a LOG* operation\'s data."},"logTopicGas":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas."},"createGas":{"v":32000,"d":"Once per CREATE operation & contract-creation transaction."},"callGas":{"v":40,"d":"Once per CALL operation & message call transaction."},"callStipend":{"v":2300,"d":"Free gas given at beginning of call."},"callValueTransferGas":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero."},"callNewAccountGas":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior."},"suicideRefundGas":{"v":24000,"d":"Refunded following a suicide operation."},"memoryGas":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL."},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation."},"createDataGas":{"v":200,"d":""},"txGas":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions."},"txCreation":{"v":32000,"d":"the cost of creating a contract via tx"},"txDataZeroGas":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions."},"txDataNonZeroGas":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions."},"copyGas":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added."},"ecrecoverGas":{"v":3000,"d":""},"sha256Gas":{"v":60,"d":""},"sha256WordGas":{"v":12,"d":""},"ripemd160Gas":{"v":600,"d":""},"ripemd160WordGas":{"v":120,"d":""},"identityGas":{"v":15,"d":""},"identityWordGas":{"v":3,"d":""},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"ommerReward":{"v":"625000000000000000","d":"The amount of wei a miner of an uncle block gets for being inculded in the blockchain"},"niblingReward":{"v":"156250000000000000","d":"the amount a miner gets for inculding a uncle"},"homeSteadForkNumber":{"v":1150000,"d":"the block that the Homestead fork started at"},"homesteadRepriceForkNumber":{"v":2463000,"d":"the block that the Homestead Reprice (EIP150) fork started at"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"freeBlockPeriod":{"v":2}}')}}]);
|
||
//# sourceMappingURL=component---src-pages-index-tsx-e9841f60244f992a6cff.js.map |