From 21623a3a5c6dbd9e7d5c0f3637dff2c472c8dc3f Mon Sep 17 00:00:00 2001 From: Thuc Nguyen Duy Date: Tue, 5 Sep 2023 12:21:19 +0700 Subject: [PATCH] [issue-993] Update web-runner version 1.1.10 --- html/PageJs.bundle/page.js | 2 +- html/Web.bundle/site/index.html | 2 +- ...66d8b3d.js => web-runner-5218ec43c616158db3a2.js} | 6 +++--- package.json | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) rename html/Web.bundle/site/{web-runner-82ff6a30707cb66d8b3d.js => web-runner-5218ec43c616158db3a2.js} (60%) diff --git a/html/PageJs.bundle/page.js b/html/PageJs.bundle/page.js index c57c86983..722b3f201 100644 --- a/html/PageJs.bundle/page.js +++ b/html/PageJs.bundle/page.js @@ -1 +1 @@ -(()=>{var t={795:(t,e,i)=>{"use strict";const n=i(699);function r(t,e,i){try{Reflect.apply(t,e,i)}catch(t){setTimeout((()=>{throw t}))}}class o extends n.EventEmitter{emit(t,...e){let i="error"===t;const n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const i=new Error("Unhandled error."+(t?` (${t.message})`:""));throw i.context=t,i}const o=n[t];if(void 0===o)return!1;if("function"==typeof o)r(o,this,e);else{const t=o.length,i=function(t){const e=t.length,i=new Array(e);for(let n=0;n=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void n(!1,"Invalid character in "+t)}function u(t,e,i){var n=h(t,i);return i-1>=e&&(n|=h(t,i-1)<<4),n}function a(t,e,i,r){for(var o=0,s=0,h=Math.min(t.length,i),u=e;u=49?a-49+10:a>=17?a-17+10:a,n(a>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)s=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=s<>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===i)for(r=0,o=0;r>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)r=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=e)n++;n--,r=r/e|0;for(var o=t.length-i,s=o%n,h=Math.min(o,o-s)+i,u=0,l=i;l1&&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(t){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}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"],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],m=[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 p(t,e,i){i.negative=e.negative^t.negative;var n=t.length+e.length|0;i.length=n,n=n-1|0;var r=0|t.words[0],o=0|e.words[0],s=r*o,h=67108863&s,u=s/67108864|0;i.words[0]=h;for(var a=1;a>>26,f=67108863&u,c=Math.min(a,e.length-1),d=Math.max(0,a-t.length+1);d<=c;d++){var m=a-d|0;l+=(s=(r=0|t.words[m])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}i.words[a]=0|f,u=0|l}return 0!==u?i.words[a]=0|u:i.length--,i._strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var r=0,o=0,s=0;s>>24-r&16777215,(r+=2)>=26&&(r-=26,s--),i=0!==o||s!==this.length-1?c[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var a=d[t],l=m[t];i="";var f=this.clone();for(f.negative=0;!f.isZero();){var p=f.modrn(l).toString(t);i=(f=f.idivn(l)).isZero()?p+i:c[a-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}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)},o.prototype.toArrayLike=function(t,e,i){this._strip();var r=this.byteLength(),o=i||Math.max(1,r);n(r<=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,r),s},o.prototype._toArrayLikeLE=function(t,e){for(var i=0,n=0,r=0,o=0;r>8&255),i>16&255),6===o?(i>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i>=0)for(t[i--]=n;i>=0;)t[i--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},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;et.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 i=0;it.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,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var n=0;nt.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),i=t%26;this._expand(e),i>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-i),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 i=t/26|0,r=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,n=t):(i=t,n=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=i.length,0!==r)this.words[this.length]=r,this.length++;else if(i!==this)for(;ot.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 i,n,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(i=this,n=t):(i=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],m=8191&d,p=d>>>13,v=0|s[2],g=8191&v,M=v>>>13,y=0|s[3],w=8191&y,_=y>>>13,E=0|s[4],N=8191&E,b=E>>>13,A=0|s[5],T=8191&A,R=A>>>13,I=0|s[6],O=8191&I,S=I>>>13,C=0|s[7],L=8191&C,D=C>>>13,U=0|s[8],x=8191&U,k=U>>>13,P=0|s[9],G=8191&P,B=P>>>13,K=0|h[0],W=8191&K,j=K>>>13,V=0|h[1],q=8191&V,F=V>>>13,H=0|h[2],X=8191&H,Z=H>>>13,$=0|h[3],z=8191&$,J=$>>>13,Y=0|h[4],Q=8191&Y,tt=Y>>>13,et=0|h[5],it=8191&et,nt=et>>>13,rt=0|h[6],ot=8191&rt,st=rt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,lt=0|h[8],ft=8191<,ct=lt>>>13,dt=0|h[9],mt=8191&dt,pt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var vt=(a+(n=Math.imul(f,W))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(c,W)|0))<<13)|0;a=((o=Math.imul(c,j))+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(m,W),r=(r=Math.imul(m,j))+Math.imul(p,W)|0,o=Math.imul(p,j);var gt=(a+(n=n+Math.imul(f,q)|0)|0)+((8191&(r=(r=r+Math.imul(f,F)|0)+Math.imul(c,q)|0))<<13)|0;a=((o=o+Math.imul(c,F)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,W),r=(r=Math.imul(g,j))+Math.imul(M,W)|0,o=Math.imul(M,j),n=n+Math.imul(m,q)|0,r=(r=r+Math.imul(m,F)|0)+Math.imul(p,q)|0,o=o+Math.imul(p,F)|0;var Mt=(a+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(c,X)|0))<<13)|0;a=((o=o+Math.imul(c,Z)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(w,W),r=(r=Math.imul(w,j))+Math.imul(_,W)|0,o=Math.imul(_,j),n=n+Math.imul(g,q)|0,r=(r=r+Math.imul(g,F)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,F)|0,n=n+Math.imul(m,X)|0,r=(r=r+Math.imul(m,Z)|0)+Math.imul(p,X)|0,o=o+Math.imul(p,Z)|0;var yt=(a+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,J)|0)+Math.imul(c,z)|0))<<13)|0;a=((o=o+Math.imul(c,J)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(N,W),r=(r=Math.imul(N,j))+Math.imul(b,W)|0,o=Math.imul(b,j),n=n+Math.imul(w,q)|0,r=(r=r+Math.imul(w,F)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,F)|0,n=n+Math.imul(g,X)|0,r=(r=r+Math.imul(g,Z)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(m,z)|0,r=(r=r+Math.imul(m,J)|0)+Math.imul(p,z)|0,o=o+Math.imul(p,J)|0;var wt=(a+(n=n+Math.imul(f,Q)|0)|0)+((8191&(r=(r=r+Math.imul(f,tt)|0)+Math.imul(c,Q)|0))<<13)|0;a=((o=o+Math.imul(c,tt)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),r=(r=Math.imul(T,j))+Math.imul(R,W)|0,o=Math.imul(R,j),n=n+Math.imul(N,q)|0,r=(r=r+Math.imul(N,F)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,F)|0,n=n+Math.imul(w,X)|0,r=(r=r+Math.imul(w,Z)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(g,z)|0,r=(r=r+Math.imul(g,J)|0)+Math.imul(M,z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(m,Q)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,Q)|0,o=o+Math.imul(p,tt)|0;var _t=(a+(n=n+Math.imul(f,it)|0)|0)+((8191&(r=(r=r+Math.imul(f,nt)|0)+Math.imul(c,it)|0))<<13)|0;a=((o=o+Math.imul(c,nt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,W),r=(r=Math.imul(O,j))+Math.imul(S,W)|0,o=Math.imul(S,j),n=n+Math.imul(T,q)|0,r=(r=r+Math.imul(T,F)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,F)|0,n=n+Math.imul(N,X)|0,r=(r=r+Math.imul(N,Z)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(w,z)|0,r=(r=r+Math.imul(w,J)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(m,it)|0,r=(r=r+Math.imul(m,nt)|0)+Math.imul(p,it)|0,o=o+Math.imul(p,nt)|0;var Et=(a+(n=n+Math.imul(f,ot)|0)|0)+((8191&(r=(r=r+Math.imul(f,st)|0)+Math.imul(c,ot)|0))<<13)|0;a=((o=o+Math.imul(c,st)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),r=(r=Math.imul(L,j))+Math.imul(D,W)|0,o=Math.imul(D,j),n=n+Math.imul(O,q)|0,r=(r=r+Math.imul(O,F)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,F)|0,n=n+Math.imul(T,X)|0,r=(r=r+Math.imul(T,Z)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(N,z)|0,r=(r=r+Math.imul(N,J)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(w,Q)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(g,it)|0,r=(r=r+Math.imul(g,nt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,o=o+Math.imul(p,st)|0;var Nt=(a+(n=n+Math.imul(f,ut)|0)|0)+((8191&(r=(r=r+Math.imul(f,at)|0)+Math.imul(c,ut)|0))<<13)|0;a=((o=o+Math.imul(c,at)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(x,W),r=(r=Math.imul(x,j))+Math.imul(k,W)|0,o=Math.imul(k,j),n=n+Math.imul(L,q)|0,r=(r=r+Math.imul(L,F)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,F)|0,n=n+Math.imul(O,X)|0,r=(r=r+Math.imul(O,Z)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(T,z)|0,r=(r=r+Math.imul(T,J)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(N,Q)|0,r=(r=r+Math.imul(N,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(w,it)|0,r=(r=r+Math.imul(w,nt)|0)+Math.imul(_,it)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(m,ut)|0,r=(r=r+Math.imul(m,at)|0)+Math.imul(p,ut)|0,o=o+Math.imul(p,at)|0;var bt=(a+(n=n+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,ct)|0)+Math.imul(c,ft)|0))<<13)|0;a=((o=o+Math.imul(c,ct)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(G,W),r=(r=Math.imul(G,j))+Math.imul(B,W)|0,o=Math.imul(B,j),n=n+Math.imul(x,q)|0,r=(r=r+Math.imul(x,F)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,F)|0,n=n+Math.imul(L,X)|0,r=(r=r+Math.imul(L,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(O,z)|0,r=(r=r+Math.imul(O,J)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(T,Q)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(N,it)|0,r=(r=r+Math.imul(N,nt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(g,ut)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,at)|0,n=n+Math.imul(m,ft)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,ft)|0,o=o+Math.imul(p,ct)|0;var At=(a+(n=n+Math.imul(f,mt)|0)|0)+((8191&(r=(r=r+Math.imul(f,pt)|0)+Math.imul(c,mt)|0))<<13)|0;a=((o=o+Math.imul(c,pt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(G,q),r=(r=Math.imul(G,F))+Math.imul(B,q)|0,o=Math.imul(B,F),n=n+Math.imul(x,X)|0,r=(r=r+Math.imul(x,Z)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(L,z)|0,r=(r=r+Math.imul(L,J)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(O,Q)|0,r=(r=r+Math.imul(O,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(T,it)|0,r=(r=r+Math.imul(T,nt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(N,ot)|0,r=(r=r+Math.imul(N,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(w,ut)|0,r=(r=r+Math.imul(w,at)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(g,ft)|0,r=(r=r+Math.imul(g,ct)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,ct)|0;var Tt=(a+(n=n+Math.imul(m,mt)|0)|0)+((8191&(r=(r=r+Math.imul(m,pt)|0)+Math.imul(p,mt)|0))<<13)|0;a=((o=o+Math.imul(p,pt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(G,X),r=(r=Math.imul(G,Z))+Math.imul(B,X)|0,o=Math.imul(B,Z),n=n+Math.imul(x,z)|0,r=(r=r+Math.imul(x,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(L,Q)|0,r=(r=r+Math.imul(L,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(O,it)|0,r=(r=r+Math.imul(O,nt)|0)+Math.imul(S,it)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(N,ut)|0,r=(r=r+Math.imul(N,at)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(w,ft)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ct)|0;var Rt=(a+(n=n+Math.imul(g,mt)|0)|0)+((8191&(r=(r=r+Math.imul(g,pt)|0)+Math.imul(M,mt)|0))<<13)|0;a=((o=o+Math.imul(M,pt)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(G,z),r=(r=Math.imul(G,J))+Math.imul(B,z)|0,o=Math.imul(B,J),n=n+Math.imul(x,Q)|0,r=(r=r+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(L,it)|0,r=(r=r+Math.imul(L,nt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(O,ot)|0,r=(r=r+Math.imul(O,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(T,ut)|0,r=(r=r+Math.imul(T,at)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(N,ft)|0,r=(r=r+Math.imul(N,ct)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ct)|0;var It=(a+(n=n+Math.imul(w,mt)|0)|0)+((8191&(r=(r=r+Math.imul(w,pt)|0)+Math.imul(_,mt)|0))<<13)|0;a=((o=o+Math.imul(_,pt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(G,Q),r=(r=Math.imul(G,tt))+Math.imul(B,Q)|0,o=Math.imul(B,tt),n=n+Math.imul(x,it)|0,r=(r=r+Math.imul(x,nt)|0)+Math.imul(k,it)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(L,ot)|0,r=(r=r+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,n=n+Math.imul(O,ut)|0,r=(r=r+Math.imul(O,at)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(T,ft)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ct)|0;var Ot=(a+(n=n+Math.imul(N,mt)|0)|0)+((8191&(r=(r=r+Math.imul(N,pt)|0)+Math.imul(b,mt)|0))<<13)|0;a=((o=o+Math.imul(b,pt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(G,it),r=(r=Math.imul(G,nt))+Math.imul(B,it)|0,o=Math.imul(B,nt),n=n+Math.imul(x,ot)|0,r=(r=r+Math.imul(x,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(L,ut)|0,r=(r=r+Math.imul(L,at)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(O,ft)|0,r=(r=r+Math.imul(O,ct)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ct)|0;var St=(a+(n=n+Math.imul(T,mt)|0)|0)+((8191&(r=(r=r+Math.imul(T,pt)|0)+Math.imul(R,mt)|0))<<13)|0;a=((o=o+Math.imul(R,pt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(G,ot),r=(r=Math.imul(G,st))+Math.imul(B,ot)|0,o=Math.imul(B,st),n=n+Math.imul(x,ut)|0,r=(r=r+Math.imul(x,at)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(L,ft)|0,r=(r=r+Math.imul(L,ct)|0)+Math.imul(D,ft)|0,o=o+Math.imul(D,ct)|0;var Ct=(a+(n=n+Math.imul(O,mt)|0)|0)+((8191&(r=(r=r+Math.imul(O,pt)|0)+Math.imul(S,mt)|0))<<13)|0;a=((o=o+Math.imul(S,pt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(G,ut),r=(r=Math.imul(G,at))+Math.imul(B,ut)|0,o=Math.imul(B,at),n=n+Math.imul(x,ft)|0,r=(r=r+Math.imul(x,ct)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,ct)|0;var Lt=(a+(n=n+Math.imul(L,mt)|0)|0)+((8191&(r=(r=r+Math.imul(L,pt)|0)+Math.imul(D,mt)|0))<<13)|0;a=((o=o+Math.imul(D,pt)|0)+(r>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(G,ft),r=(r=Math.imul(G,ct))+Math.imul(B,ft)|0,o=Math.imul(B,ct);var Dt=(a+(n=n+Math.imul(x,mt)|0)|0)+((8191&(r=(r=r+Math.imul(x,pt)|0)+Math.imul(k,mt)|0))<<13)|0;a=((o=o+Math.imul(k,pt)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ut=(a+(n=Math.imul(G,mt))|0)+((8191&(r=(r=Math.imul(G,pt))+Math.imul(B,mt)|0))<<13)|0;return a=((o=Math.imul(B,pt))+(r>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=vt,u[1]=gt,u[2]=Mt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Et,u[7]=Nt,u[8]=bt,u[9]=At,u[10]=Tt,u[11]=Rt,u[12]=It,u[13]=Ot,u[14]=St,u[15]=Ct,u[16]=Lt,u[17]=Dt,u[18]=Ut,0!==a&&(u[19]=a,i.length++),i};function g(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var n=0,r=0,o=0;o>>26)|0)>>>26,s&=67108863}i.words[o]=h,n=s,s=r}return 0!==n?i.words[o]=n:i.length--,i._strip()}function M(t,e,i){return g(t,e,i)}function y(t,e){this.x=t,this.y=e}Math.imul||(v=p),o.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,e):i<63?p(this,t,e):i<1024?g(this,t,e):M(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,i,n,r,o){for(var s=0;s>>=1)r++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,i+=o/67108864|0,i+=s>>>26,this.words[r]=67108863&s}return 0!==i&&(this.words[r]=i,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()),i=0;i>>r&1}return e}(t);if(0===e.length)return new o(1);for(var i=this,n=0;n=0);var e,i=t%26,r=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<s)for(this.length-=s,a=0;a=0&&(0!==l||a>=r);a--){var f=0|this.words[a];this.words[a]=l<<26-o|f>>>o,l=f&h}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,i){return n(0===this.negative),this.iushrn(t,e,i)},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,i=(t-e)/26,r=1<=0);var e=t%26,i=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var r=67108863^67108863>>>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>26)-(u/67108864|0),this.words[r+i]=67108863&o}for(;r>26,this.words[r+i]=67108863&o;if(0===h)return this._strip();for(n(-1===h),h=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),n=this.clone(),r=t,s=0|r.words[r.length-1];0!=(i=26-this._countBits(s))&&(r=r.ushln(i),n.iushln(i),s=0|r.words[r.length-1]);var h,u=n.length-r.length;if("mod"!==e){(h=new o(null)).length=u+1,h.words=new Array(h.length);for(var a=0;a=0;f--){var c=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(c=Math.min(c/s|0,67108863),n._ishlnsubmul(r,c,f);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);h&&(h.words[f]=c)}return h&&h._strip(),n._strip(),"div"!==e&&0!==i&&n.iushrn(i),{div:h||null,mod:n}},o.prototype.divmod=function(t,e,i){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(r=h.div.neg()),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:r,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(r=h.div.neg()),{div:r,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===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 r,s,h},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 i=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),r=t.andln(1),o=i.cmp(n);return o<0||1===r&&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 i=(1<<26)%t,r=0,o=this.length-1;o>=0;o--)r=(i*r+(0|this.words[o]))%t;return e?-r:r},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 i=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*i;this.words[r]=o/t|0,i=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,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),s=new o(0),h=new o(0),u=new o(1),a=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++a;for(var l=i.clone(),f=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||s.isOdd())&&(r.iadd(l),s.isub(f)),r.iushrn(1),s.iushrn(1);for(var m=0,p=1;0==(i.words[0]&p)&&m<26;++m,p<<=1);if(m>0)for(i.iushrn(m);m-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(l),u.isub(f)),h.iushrn(1),u.iushrn(1);e.cmp(i)>=0?(e.isub(i),r.isub(h),s.isub(u)):(i.isub(e),h.isub(r),u.isub(s))}return{a:h,b:u,gcd:i.iushln(a)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,s=new o(1),h=new o(0),u=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var a=0,l=1;0==(e.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(e.iushrn(a);a-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,c=1;0==(i.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(i.iushrn(f);f-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(h)):(i.isub(e),h.isub(s))}return(r=0===e.cmpn(1)?s:h).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var n=0;e.isEven()&&i.isEven();n++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var r=e.cmp(i);if(r<0){var o=e;e=i,i=o}else if(0===r||0===i.cmpn(1))break;e.isub(i)}return i.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,i=(t-e)/26,r=1<>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),n(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;i--){var n=0|this.words[i],r=0|t.words[i];if(n!==r){nr&&(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 T(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function N(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(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 R(t){T.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,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},r(E,_),E.prototype.split=function(t,e){for(var i=4194303,n=Math.min(t.length,9),r=0;r>>22,o=s}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=r,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 E;else if("p224"===t)e=new N;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return w[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.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")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},T.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var r=this.m.subn(1),s=0;!r.isZero()&&0===r.andln(1);)s++,r.iushrn(1);n(!r.isZero());var h=new o(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),d=this.pow(t,r),m=s;0!==d.cmp(h);){for(var p=d,v=0;0!==p.cmp(h);v++)p=p.redSqr();n(v=0;n--){for(var a=e.words[n],l=u-1;l>=0;l--){var f=a>>l&1;r!==i[0]&&(r=this.sqr(r)),0!==f||0!==s?(s<<=1,s|=f,(4==++h||0===n&&0===l)&&(r=this.mul(r,i[s]),h=0,s=0)):h=0}u=26}return r},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new R(t)},r(R,T),R.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},R.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},R.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=i.nmd(t),this)},161:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var h=new r(n,o||t,s),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],h]:t._events[u].push(h):(t._events[u]=h,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function h(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),h.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},h.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r{"use strict";var e,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};e=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=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(i,n){function r(i){t.removeListener(e,o),n(i)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",r),i([].slice.call(arguments))}p(t,e,o,{once:!0}),"error"!==e&&function(t,e,i){"function"==typeof t.on&&p(t,"error",e,{once:!0})}(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function h(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 a(t,e,i,n){var r,o,s,a;if(h(i),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]),void 0===s)s=o[e]=i,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=u(t))>0&&s.length>r&&!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,a=l,console&&console.warn&&console.warn(a)}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,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},r=l.bind(n);return r.listener=i,n.wrapFn=r,r}function c(t,e,i){var n=t._events;if(void 0===n)return[];var r=n[e];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(t){for(var e=new Array(t.length),i=0;i0&&(s=e[0]),s instanceof Error)throw s;var h=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw h.context=s,h}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var a=u.length,l=m(u,a);for(i=0;i=0;o--)if(i[o]===e||i[o].listener===e){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return c(this,t,!0)},o.prototype.rawListeners=function(t){return c(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):[]}},196:()=>{}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";const t={NODE_ENV:"production",PKG_NAME:"@subwallet/extension-koni",PKG_VERSION:"1.1.7-0",TARGET_ENV:"extension",TRANSAK_API_KEY:"4b3bfb00-7f7c-44b3-844f-d4504f1065be",TRANSAK_TEST_MODE:!1,BANXA_TEST_MODE:!1,BANXA_SANDBOX_API_KEY:"subwallet@prod202308041731",BANXA_SANBOX_API_SECRET:"plz9j4qlTuxb79ChAzM2G5ds5NNfcrBI"}.EXTENSION_PREFIX||"",e=`${t}koni-page`,n=`${t}koni-content`;class r extends Error{constructor(t,e,i,n){super(e),this.errorType=t,this.code=i,this.data=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}const o={CHAIN_DISCONNECTED:{message:"Chain is disconnected",code:void 0},INVALID_PARAMS:{message:"Invalid params",code:void 0},INTERNAL_ERROR:{message:"Internal error",code:void 0},USER_REJECT:{message:"User reject request",code:void 0}};class s extends r{constructor(t,e,i){const{code:n,message:r}=o[t];super(t,e||r,n,i),this.errorType=t}}let h,u,a,l,f,c,d,m,p,v,g,M,y,w,_,E,N,b,A,T,R,I,O,S,C,L,D;!function(t){t.Web="Web",t.Node="Node",t.ExtensionChrome="Extension (Chrome)",t.ExtensionFirefox="Extension (Firefox)",t.WebWorker="Web Worker",t.ServiceWorker="Service Worker",t.Unknown="Unknown"}(h||(h={})),function(t){t.NOMINATED="nominated",t.POOLED="pooled"}(u||(u={})),function(t){t.PENDING="pending",t.READY="ready",t.CACHED="cached",t.ERROR="error",t.NOT_SUPPORT="not_support"}(a||(a={})),function(t){t.VER_1="1.0.0",t.VER_2="2.0.0"}(l||(l={})),function(t){t.ONGOING="ongoing",t.COMPLETED="completed",t.FAILED="failed"}(f||(f={})),function(t){t.wasm="wasm",t.evm="evm"}(c||(c={})),function(t){t.SEND="send",t.RECEIVED="received"}(d||(d={})),function(t){t.EVM="evm",t.SUBSTRATE="substrate"}(m||(m={})),function(t){t.TRANSFER_BALANCE="transfer.balance",t.TRANSFER_TOKEN="transfer.token",t.TRANSFER_XCM="transfer.xcm",t.SEND_NFT="send_nft",t.CROWDLOAN="crowdloan",t.STAKING_JOIN_POOL="staking.join_pool",t.STAKING_LEAVE_POOL="staking.leave_pool",t.STAKING_POOL_WITHDRAW="staking.pool_withdraw",t.STAKING_BOND="staking.bond",t.STAKING_UNBOND="staking.unbond",t.STAKING_CLAIM_REWARD="staking.claim_reward",t.STAKING_WITHDRAW="staking.withdraw",t.STAKING_COMPOUNDING="staking.compounding",t.STAKING_CANCEL_COMPOUNDING="staking.cancel_compounding",t.STAKING_CANCEL_UNSTAKE="staking.cancel_unstake",t.EVM_EXECUTE="evm.execute",t.UNKNOWN="unknown"}(p||(p={})),function(t){t.QUEUED="queued",t.SUBMITTING="submitting",t.PROCESSING="processing",t.SUCCESS="success",t.FAIL="fail",t.CANCELLED="cancelled",t.UNKNOWN="unknown"}(v||(v={})),function(t){t.NOT_ENOUGH_BALANCE="NOT_ENOUGH_BALANCE",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.DUPLICATE_TRANSACTION="DUPLICATE_TRANSACTION",t.UNABLE_TO_SIGN="UNABLE_TO_SIGN",t.USER_REJECT_REQUEST="USER_REJECT_REQUEST",t.UNABLE_TO_SEND="UNABLE_TO_SEND",t.SEND_TRANSACTION_FAILED="SEND_TRANSACTION_FAILED",t.INTERNAL_ERROR="INTERNAL_ERROR",t.UNSUPPORTED="UNSUPPORTED",t.TIMEOUT="TIMEOUT",t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(g||(g={})),function(t){t.NOT_ENOUGH_MIN_STAKE="NOT_ENOUGH_MIN_STAKE",t.EXCEED_MAX_NOMINATIONS="EXCEED_MAX_NOMINATIONS",t.EXIST_UNSTAKING_REQUEST="EXIST_UNSTAKING_REQUEST",t.INVALID_ACTIVE_STAKE="INVALID_ACTIVE_STAKE",t.EXCEED_MAX_UNSTAKING="EXCEED_MAX_UNSTAKING",t.INACTIVE_NOMINATION_POOL="INACTIVE_NOMINATION_POOL"}(M||(M={})),function(t){t.NOT_ENOUGH_VALUE="NOT_ENOUGH_VALUE",t.NOT_ENOUGH_FEE="NOT_ENOUGH_FEE",t.INVALID_TOKEN="INVALID_TOKEN",t.TRANSFER_ERROR="TRANSFER_ERROR",t.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT="RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(y||(y={})),function(t){t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="notEnoughExistentialDeposit"}(w||(w={})),function(t){t.NETWORK_ERROR="NETWORK_ERROR",t.TOKEN_ERROR="TOKEN_ERROR",t.TIMEOUT="TIMEOUT",t.GET_BALANCE_ERROR="GET_BALANCE_ERROR"}(_||(_={})),function(t){t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR",t.USER_REJECT="USER_REJECT"}(E||(E={})),function(t){t.INVALID_ADDRESS="invalidToAccount",t.KEYRING_ERROR="keyringError",t.UNKNOWN_ERROR="unknownError"}(N||(N={})),function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.FAILED=2]="FAILED",t[t.COMPLETED=3]="COMPLETED"}(b||(b={})),function(t){t.LIGHT="light",t.DARK="dark",t.SUBSPACE="subspace"}(A||(A={})),function(t){t.INVALID_INFO_TYPE="invalidInfoType",t.INJECT_SCRIPT_DETECTED="injectScriptDetected",t.EXISTED_NETWORK="existedNetwork",t.EXISTED_PROVIDER="existedProvider",t.INVALID_PROVIDER="invalidProvider",t.NONE="none",t.CONNECTION_FAILURE="connectionFailure",t.PROVIDER_NOT_SAME_NETWORK="providerNotSameNetwork"}(T||(T={})),function(t){t.CONNECTED="connected",t.CONNECTING="connecting",t.DISCONNECTED="disconnected",t.PENDING="pending"}(R||(R={})),function(t){t.USER_REJECTED_REQUEST="USER_REJECTED_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.UNSUPPORTED_METHOD="UNSUPPORTED_METHOD",t.DISCONNECTED="DISCONNECTED",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR"}(I||(I={})),function(t){t.CLAIMABLE="CLAIMABLE",t.UNLOCKING="UNLOCKING"}(O||(O={})),function(t){t.EARNING_REWARD="EARNING_REWARD",t.PARTIALLY_EARNING="PARTIALLY_EARNING",t.NOT_EARNING="NOT_EARNING",t.WAITING="WAITING",t.NOT_STAKING="NOT_STAKING"}(S||(S={})),function(t){t.EVM="EVM",t.SUBSTRATE="SUBSTRATE",t.UNKNOWN="UNKNOWN",t.MIXED="MIXED"}(C||(C={})),function(t){t.INFO="info",t.SUCCESS="success",t.WARNING="warning",t.ERROR="error"}(L||(L={})),function(t){t.WRONG_PASSWORD="WRONG_PASSWORD",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.SUCCESS="SUCCESS"}(D||(D={}));var U=i(795);let x=!1;class k extends U.Z{isSubWallet=!0;isMetaMask=!1;_connected=!1;constructor(t,e){super(),this.version=e,this.sendMessage=t,this._connected=!0}get connected(){return this._connected}isConnected(){return this._connected}subscribeExtensionEvents(){x||(this.sendMessage("evm(events.subscribe)",null,(({payload:t,type:e})=>{if(["connect","disconnect","accountsChanged","chainChanged","message","data","reconnect","error"].includes(e)){"connect"===e?this._connected=!0:"disconnect"===e&&(this._connected=!1);const i="data"===e?"message":e;this.emit(i,t)}else console.warn("Can not handle event",e,t)})).then((t=>{x=!0})).catch((()=>{x=!1})),x=!0)}async enable(){return this.request({method:"eth_requestAccounts"})}on(t,e){return this.subscribeExtensionEvents(),super.on(t,e),this}once(t,e){return this.subscribeExtensionEvents(),super.once(t,e),this}request({method:t,params:e}){return new Promise("eth_requestAccounts"===t?(t,e)=>{const i=""!==document.title?document.title:window.location.hostname;this.sendMessage("pub(authorize.tabV2)",{origin:i,accountAuthType:"evm"}).then((()=>{this.request({method:"eth_accounts"}).then((e=>{t(e)})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}:(i,n)=>{this.sendMessage("evm(request)",{params:e,method:t}).then((t=>{i(t)})).catch((t=>{n(t)}))})}_sendSync(t){let e;if("net_version"!==t.method)throw new Error(`Not support ${t.method}`);return e=this.version?`SubWallet v${this.version}`:null,{id:t.id,jsonrpc:t.jsonrpc,result:e}}send(t,e){return"string"!=typeof t||e&&!Array.isArray(e)?t&&"object"==typeof t&&"function"==typeof e?this.request(t).then((t=>{e(t)})):this._sendSync(t):this.request({method:t,params:e})}sendAsync(t,e){this.request(t).then((t=>{e(null,{result:t})})).catch((t=>{e(t)}))}}let P,G,B=0;class K{constructor(t){P=t}get(t){return P("pub(accounts.listV2)",{anyType:t,accountAuthType:"substrate"})}subscribe(t){let e=null;return P("pub(accounts.subscribeV2)",{accountAuthType:"substrate"},t).then((t=>{e=t})).catch(console.error),()=>{e&&P("pub(accounts.unsubscribe)",{id:e}).catch(console.error)}}}class W{constructor(t){G=t}get(){return G("pub(metadata.list)")}provide(t){return G("pub(metadata.provide)",t)}addToken(t){return G("pub(token.add)",t)}}const j=i(161),V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function q(t){return t.toString().padStart(2,"0")}var F=i(197);const H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function X(t,e){return void 0===H[t]?e:H[t]}function Z(){return Number.NaN}const $=X("BigInt",Z),z=("function"==typeof $&&$.asIntN,"function"==typeof V.Buffer&&"function"==typeof V.Buffer.isBuffer),J="object"==typeof V.process;function Y(t){return"function"==typeof t}function Q(t){return z&&!!t&&Y(t.readDoubleLE)&&V.Buffer.isBuffer(t)}function tt(t){return(t&&t.constructor)===Uint8Array||t instanceof Uint8Array}const et=new Array(256),it=new Array(65536);for(let t=0;t<256;t++)et[t]=t.toString(16).padStart(2,"0");for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)it[e|i]=et[t]+et[i]}function nt(t,e){const i=t.length%2|0,n=t.length-i|0;for(let i=0;i9&&(ot[0|rt[t].toUpperCase().charCodeAt(0)]=0|t);for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)st[e|i]=ot[t]<<4|ot[i]}const ht=/^0x[\da-fA-F]+$/,ut="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function at(t,e){return void 0===ut[t]?e:ut[t]}class lt{encode(t){const e=t.length,i=new Uint8Array(e);for(let n=0;n0){const i=Math.ceil(e/8);if(t.length>i)return`${nt(t.subarray(0,i/2),n)}…${nt(t.subarray(t.length-i/2),"")}`}return nt(t,n)}(function(t){return tt(t)?Q(t)?new Uint8Array(t):t:function(t,e=-1,i){return"string"==typeof t&&("0x"===t||ht.test(t))&&(-1===e?i||t.length%2==0:t.length===2+Math.ceil(e/4))}(t)?function(t,e=-1){if(!t)return new Uint8Array;let i=t.startsWith("0x")?2:0;const n=Math.ceil((t.length-i)/2),r=Math.ceil(-1===e?n:e/8),o=new Uint8Array(r);for(let e=r>n?r-n:0;e{if(r<=0)return t;const e=`${t}`;return e.lengthpt("debug",e,t,n):ct,error:(...t)=>pt("error",e,t),log:(...t)=>pt("log",e,t),noop:ct,warn:(...t)=>pt("warn",e,t)}}("PostMessageProvider");let wt,_t;class Et{#t;isClonable=!0;#e=!1;#i={};constructor(t){this.#t=new j,wt=t}clone(){return new Et(wt)}async connect(){console.error("PostMessageProvider.disconnect() is not implemented.")}async disconnect(){console.error("PostMessageProvider.disconnect() is not implemented.")}get hasSubscriptions(){return!0}get isConnected(){return this.#e}listProviders(){return wt("pub(rpc.listProviders)",void 0)}on(t,e){return this.#t.on(t,e),()=>{this.#t.removeListener(t,e)}}async send(t,e,i,n){if(n){const{callback:i,type:r}=n,o=await wt("pub(rpc.subscribe)",{method:t,params:e,type:r},(t=>{n.callback(null,t)}));return this.#i[`${r}::${o}`]=i,o}return wt("pub(rpc.send)",{method:t,params:e})}async startProvider(t){this.#e=!1,this.#t.emit("disconnected");const e=await wt("pub(rpc.startProvider)",t);return wt("pub(rpc.subscribeConnected)",null,(t=>(this.#e=t,t?this.#t.emit("connected"):this.#t.emit("disconnected"),!0))),e}subscribe(t,e,i,n){return this.send(e,i,!1,{callback:n,type:t})}async unsubscribe(t,e,i){const n=`${t}::${i}`;return void 0===this.#i[n]?(yt.debug((()=>`Unable to find active subscription=${n}`)),!1):(delete this.#i[n],this.send(e,[i]))}}let Nt=0;class bt{constructor(t){_t=t}async signPayload(t){const e=++Nt;return{...await _t("pub(extrinsic.sign)",t),id:e}}async signRaw(t){const e=++Nt;return{...await _t("pub(bytes.sign)",t),id:e}}}const At={};function Tt(i,n,r){return new Promise(((o,s)=>{const h=`${t}.${Date.now()}.${++B}`;At[h]={reject:s,resolve:o,subscriber:r};const u={id:h,message:i,origin:e,request:n||null};window.postMessage(u,"*")}))}const Rt="1.1.7-0";window.addEventListener("message",(({data:t,source:e})=>{e===window&&t.origin===n&&(t.id?function(t){const e=At[t.id];e?(e.subscriber||delete At[t.id],t.subscription?e.subscriber(t.subscription):t.error?e.reject(new s(E.INTERNAL_ERROR,t.error,t.errorCode)):e.resolve(t.response)):console.error(`Unknown response: ${JSON.stringify(t)}`)}(t):console.error("Missing id for response."))})),function(t,{name:e,version:i}){const n=window;n.injectedWeb3=n.injectedWeb3||{},n.injectedWeb3[e]={enable:e=>t(e),version:i}}((async function(t){return await Tt("pub(authorize.tabV2)",{origin:t}),new class{constructor(t){this.accounts=new K(t),this.metadata=new W(t),this.provider=new Et(t),this.signer=new bt(t),setInterval((()=>{t("pub(ping)",null).catch((()=>{console.error("Extension unavailable, ping failed")}))}),5e3+Math.floor(5e3*Math.random()))}}(Tt)}),{name:"subwallet-js",version:Rt}),function(t){const e=window;e.SubWallet?e.SubWallet.provider=t:e.SubWallet=t,e.dispatchEvent(new Event("subwallet#initialized")),e.addEventListener("load",(()=>{e.ethereum||(e.ethereum=t,e.dispatchEvent(new Event("ethereum#initialized")))}))}(new k(Tt,"1.1.7-0"))})()})(); \ No newline at end of file +(()=>{var t={795:(t,e,i)=>{"use strict";const n=i(699);function r(t,e,i){try{Reflect.apply(t,e,i)}catch(t){setTimeout((()=>{throw t}))}}class o extends n.EventEmitter{emit(t,...e){let i="error"===t;const n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const i=new Error("Unhandled error."+(t?` (${t.message})`:""));throw i.context=t,i}const o=n[t];if(void 0===o)return!1;if("function"==typeof o)r(o,this,e);else{const t=o.length,i=function(t){const e=t.length,i=new Array(e);for(let n=0;n=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void n(!1,"Invalid character in "+t)}function u(t,e,i){var n=h(t,i);return i-1>=e&&(n|=h(t,i-1)<<4),n}function a(t,e,i,r){for(var o=0,s=0,h=Math.min(t.length,i),u=e;u=49?a-49+10:a>=17?a-17+10:a,n(a>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)s=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=s<>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===i)for(r=0,o=0;r>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)r=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=e)n++;n--,r=r/e|0;for(var o=t.length-i,s=o%n,h=Math.min(o,o-s)+i,u=0,l=i;l1&&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(t){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}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"],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],m=[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 p(t,e,i){i.negative=e.negative^t.negative;var n=t.length+e.length|0;i.length=n,n=n-1|0;var r=0|t.words[0],o=0|e.words[0],s=r*o,h=67108863&s,u=s/67108864|0;i.words[0]=h;for(var a=1;a>>26,f=67108863&u,c=Math.min(a,e.length-1),d=Math.max(0,a-t.length+1);d<=c;d++){var m=a-d|0;l+=(s=(r=0|t.words[m])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}i.words[a]=0|f,u=0|l}return 0!==u?i.words[a]=0|u:i.length--,i._strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var r=0,o=0,s=0;s>>24-r&16777215,(r+=2)>=26&&(r-=26,s--),i=0!==o||s!==this.length-1?c[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var a=d[t],l=m[t];i="";var f=this.clone();for(f.negative=0;!f.isZero();){var p=f.modrn(l).toString(t);i=(f=f.idivn(l)).isZero()?p+i:c[a-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}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)},o.prototype.toArrayLike=function(t,e,i){this._strip();var r=this.byteLength(),o=i||Math.max(1,r);n(r<=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,r),s},o.prototype._toArrayLikeLE=function(t,e){for(var i=0,n=0,r=0,o=0;r>8&255),i>16&255),6===o?(i>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i>=0)for(t[i--]=n;i>=0;)t[i--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},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;et.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 i=0;it.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,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var n=0;nt.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),i=t%26;this._expand(e),i>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-i),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 i=t/26|0,r=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,n=t):(i=t,n=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=i.length,0!==r)this.words[this.length]=r,this.length++;else if(i!==this)for(;ot.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 i,n,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(i=this,n=t):(i=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],m=8191&d,p=d>>>13,v=0|s[2],g=8191&v,M=v>>>13,y=0|s[3],w=8191&y,_=y>>>13,E=0|s[4],N=8191&E,b=E>>>13,A=0|s[5],T=8191&A,R=A>>>13,I=0|s[6],O=8191&I,S=I>>>13,L=0|s[7],C=8191&L,D=L>>>13,U=0|s[8],x=8191&U,k=U>>>13,P=0|s[9],G=8191&P,B=P>>>13,W=0|h[0],K=8191&W,j=W>>>13,V=0|h[1],q=8191&V,F=V>>>13,H=0|h[2],Z=8191&H,$=H>>>13,X=0|h[3],z=8191&X,J=X>>>13,Q=0|h[4],Y=8191&Q,tt=Q>>>13,et=0|h[5],it=8191&et,nt=et>>>13,rt=0|h[6],ot=8191&rt,st=rt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,lt=0|h[8],ft=8191<,ct=lt>>>13,dt=0|h[9],mt=8191&dt,pt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var vt=(a+(n=Math.imul(f,K))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(c,K)|0))<<13)|0;a=((o=Math.imul(c,j))+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(m,K),r=(r=Math.imul(m,j))+Math.imul(p,K)|0,o=Math.imul(p,j);var gt=(a+(n=n+Math.imul(f,q)|0)|0)+((8191&(r=(r=r+Math.imul(f,F)|0)+Math.imul(c,q)|0))<<13)|0;a=((o=o+Math.imul(c,F)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,K),r=(r=Math.imul(g,j))+Math.imul(M,K)|0,o=Math.imul(M,j),n=n+Math.imul(m,q)|0,r=(r=r+Math.imul(m,F)|0)+Math.imul(p,q)|0,o=o+Math.imul(p,F)|0;var Mt=(a+(n=n+Math.imul(f,Z)|0)|0)+((8191&(r=(r=r+Math.imul(f,$)|0)+Math.imul(c,Z)|0))<<13)|0;a=((o=o+Math.imul(c,$)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(w,K),r=(r=Math.imul(w,j))+Math.imul(_,K)|0,o=Math.imul(_,j),n=n+Math.imul(g,q)|0,r=(r=r+Math.imul(g,F)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,F)|0,n=n+Math.imul(m,Z)|0,r=(r=r+Math.imul(m,$)|0)+Math.imul(p,Z)|0,o=o+Math.imul(p,$)|0;var yt=(a+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,J)|0)+Math.imul(c,z)|0))<<13)|0;a=((o=o+Math.imul(c,J)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(N,K),r=(r=Math.imul(N,j))+Math.imul(b,K)|0,o=Math.imul(b,j),n=n+Math.imul(w,q)|0,r=(r=r+Math.imul(w,F)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,F)|0,n=n+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,$)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,$)|0,n=n+Math.imul(m,z)|0,r=(r=r+Math.imul(m,J)|0)+Math.imul(p,z)|0,o=o+Math.imul(p,J)|0;var wt=(a+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,tt)|0)+Math.imul(c,Y)|0))<<13)|0;a=((o=o+Math.imul(c,tt)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,K),r=(r=Math.imul(T,j))+Math.imul(R,K)|0,o=Math.imul(R,j),n=n+Math.imul(N,q)|0,r=(r=r+Math.imul(N,F)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,F)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,$)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(g,z)|0,r=(r=r+Math.imul(g,J)|0)+Math.imul(M,z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(m,Y)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,Y)|0,o=o+Math.imul(p,tt)|0;var _t=(a+(n=n+Math.imul(f,it)|0)|0)+((8191&(r=(r=r+Math.imul(f,nt)|0)+Math.imul(c,it)|0))<<13)|0;a=((o=o+Math.imul(c,nt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,K),r=(r=Math.imul(O,j))+Math.imul(S,K)|0,o=Math.imul(S,j),n=n+Math.imul(T,q)|0,r=(r=r+Math.imul(T,F)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,F)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,$)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(w,z)|0,r=(r=r+Math.imul(w,J)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(g,Y)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(m,it)|0,r=(r=r+Math.imul(m,nt)|0)+Math.imul(p,it)|0,o=o+Math.imul(p,nt)|0;var Et=(a+(n=n+Math.imul(f,ot)|0)|0)+((8191&(r=(r=r+Math.imul(f,st)|0)+Math.imul(c,ot)|0))<<13)|0;a=((o=o+Math.imul(c,st)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(C,K),r=(r=Math.imul(C,j))+Math.imul(D,K)|0,o=Math.imul(D,j),n=n+Math.imul(O,q)|0,r=(r=r+Math.imul(O,F)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,F)|0,n=n+Math.imul(T,Z)|0,r=(r=r+Math.imul(T,$)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(N,z)|0,r=(r=r+Math.imul(N,J)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(w,Y)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(g,it)|0,r=(r=r+Math.imul(g,nt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,o=o+Math.imul(p,st)|0;var Nt=(a+(n=n+Math.imul(f,ut)|0)|0)+((8191&(r=(r=r+Math.imul(f,at)|0)+Math.imul(c,ut)|0))<<13)|0;a=((o=o+Math.imul(c,at)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(x,K),r=(r=Math.imul(x,j))+Math.imul(k,K)|0,o=Math.imul(k,j),n=n+Math.imul(C,q)|0,r=(r=r+Math.imul(C,F)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,F)|0,n=n+Math.imul(O,Z)|0,r=(r=r+Math.imul(O,$)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(T,z)|0,r=(r=r+Math.imul(T,J)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(N,Y)|0,r=(r=r+Math.imul(N,tt)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(w,it)|0,r=(r=r+Math.imul(w,nt)|0)+Math.imul(_,it)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(m,ut)|0,r=(r=r+Math.imul(m,at)|0)+Math.imul(p,ut)|0,o=o+Math.imul(p,at)|0;var bt=(a+(n=n+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,ct)|0)+Math.imul(c,ft)|0))<<13)|0;a=((o=o+Math.imul(c,ct)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(G,K),r=(r=Math.imul(G,j))+Math.imul(B,K)|0,o=Math.imul(B,j),n=n+Math.imul(x,q)|0,r=(r=r+Math.imul(x,F)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,F)|0,n=n+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,$)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,$)|0,n=n+Math.imul(O,z)|0,r=(r=r+Math.imul(O,J)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(T,Y)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(N,it)|0,r=(r=r+Math.imul(N,nt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(g,ut)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,at)|0,n=n+Math.imul(m,ft)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,ft)|0,o=o+Math.imul(p,ct)|0;var At=(a+(n=n+Math.imul(f,mt)|0)|0)+((8191&(r=(r=r+Math.imul(f,pt)|0)+Math.imul(c,mt)|0))<<13)|0;a=((o=o+Math.imul(c,pt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(G,q),r=(r=Math.imul(G,F))+Math.imul(B,q)|0,o=Math.imul(B,F),n=n+Math.imul(x,Z)|0,r=(r=r+Math.imul(x,$)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,J)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(O,Y)|0,r=(r=r+Math.imul(O,tt)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(T,it)|0,r=(r=r+Math.imul(T,nt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(N,ot)|0,r=(r=r+Math.imul(N,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(w,ut)|0,r=(r=r+Math.imul(w,at)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(g,ft)|0,r=(r=r+Math.imul(g,ct)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,ct)|0;var Tt=(a+(n=n+Math.imul(m,mt)|0)|0)+((8191&(r=(r=r+Math.imul(m,pt)|0)+Math.imul(p,mt)|0))<<13)|0;a=((o=o+Math.imul(p,pt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(G,Z),r=(r=Math.imul(G,$))+Math.imul(B,Z)|0,o=Math.imul(B,$),n=n+Math.imul(x,z)|0,r=(r=r+Math.imul(x,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(O,it)|0,r=(r=r+Math.imul(O,nt)|0)+Math.imul(S,it)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(N,ut)|0,r=(r=r+Math.imul(N,at)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(w,ft)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ct)|0;var Rt=(a+(n=n+Math.imul(g,mt)|0)|0)+((8191&(r=(r=r+Math.imul(g,pt)|0)+Math.imul(M,mt)|0))<<13)|0;a=((o=o+Math.imul(M,pt)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(G,z),r=(r=Math.imul(G,J))+Math.imul(B,z)|0,o=Math.imul(B,J),n=n+Math.imul(x,Y)|0,r=(r=r+Math.imul(x,tt)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(C,it)|0,r=(r=r+Math.imul(C,nt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(O,ot)|0,r=(r=r+Math.imul(O,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(T,ut)|0,r=(r=r+Math.imul(T,at)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(N,ft)|0,r=(r=r+Math.imul(N,ct)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ct)|0;var It=(a+(n=n+Math.imul(w,mt)|0)|0)+((8191&(r=(r=r+Math.imul(w,pt)|0)+Math.imul(_,mt)|0))<<13)|0;a=((o=o+Math.imul(_,pt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(G,Y),r=(r=Math.imul(G,tt))+Math.imul(B,Y)|0,o=Math.imul(B,tt),n=n+Math.imul(x,it)|0,r=(r=r+Math.imul(x,nt)|0)+Math.imul(k,it)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,n=n+Math.imul(O,ut)|0,r=(r=r+Math.imul(O,at)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(T,ft)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ct)|0;var Ot=(a+(n=n+Math.imul(N,mt)|0)|0)+((8191&(r=(r=r+Math.imul(N,pt)|0)+Math.imul(b,mt)|0))<<13)|0;a=((o=o+Math.imul(b,pt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(G,it),r=(r=Math.imul(G,nt))+Math.imul(B,it)|0,o=Math.imul(B,nt),n=n+Math.imul(x,ot)|0,r=(r=r+Math.imul(x,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(C,ut)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(O,ft)|0,r=(r=r+Math.imul(O,ct)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ct)|0;var St=(a+(n=n+Math.imul(T,mt)|0)|0)+((8191&(r=(r=r+Math.imul(T,pt)|0)+Math.imul(R,mt)|0))<<13)|0;a=((o=o+Math.imul(R,pt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(G,ot),r=(r=Math.imul(G,st))+Math.imul(B,ot)|0,o=Math.imul(B,st),n=n+Math.imul(x,ut)|0,r=(r=r+Math.imul(x,at)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(C,ft)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(D,ft)|0,o=o+Math.imul(D,ct)|0;var Lt=(a+(n=n+Math.imul(O,mt)|0)|0)+((8191&(r=(r=r+Math.imul(O,pt)|0)+Math.imul(S,mt)|0))<<13)|0;a=((o=o+Math.imul(S,pt)|0)+(r>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(G,ut),r=(r=Math.imul(G,at))+Math.imul(B,ut)|0,o=Math.imul(B,at),n=n+Math.imul(x,ft)|0,r=(r=r+Math.imul(x,ct)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,ct)|0;var Ct=(a+(n=n+Math.imul(C,mt)|0)|0)+((8191&(r=(r=r+Math.imul(C,pt)|0)+Math.imul(D,mt)|0))<<13)|0;a=((o=o+Math.imul(D,pt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(G,ft),r=(r=Math.imul(G,ct))+Math.imul(B,ft)|0,o=Math.imul(B,ct);var Dt=(a+(n=n+Math.imul(x,mt)|0)|0)+((8191&(r=(r=r+Math.imul(x,pt)|0)+Math.imul(k,mt)|0))<<13)|0;a=((o=o+Math.imul(k,pt)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ut=(a+(n=Math.imul(G,mt))|0)+((8191&(r=(r=Math.imul(G,pt))+Math.imul(B,mt)|0))<<13)|0;return a=((o=Math.imul(B,pt))+(r>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=vt,u[1]=gt,u[2]=Mt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Et,u[7]=Nt,u[8]=bt,u[9]=At,u[10]=Tt,u[11]=Rt,u[12]=It,u[13]=Ot,u[14]=St,u[15]=Lt,u[16]=Ct,u[17]=Dt,u[18]=Ut,0!==a&&(u[19]=a,i.length++),i};function g(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var n=0,r=0,o=0;o>>26)|0)>>>26,s&=67108863}i.words[o]=h,n=s,s=r}return 0!==n?i.words[o]=n:i.length--,i._strip()}function M(t,e,i){return g(t,e,i)}function y(t,e){this.x=t,this.y=e}Math.imul||(v=p),o.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,e):i<63?p(this,t,e):i<1024?g(this,t,e):M(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,i,n,r,o){for(var s=0;s>>=1)r++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,i+=o/67108864|0,i+=s>>>26,this.words[r]=67108863&s}return 0!==i&&(this.words[r]=i,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()),i=0;i>>r&1}return e}(t);if(0===e.length)return new o(1);for(var i=this,n=0;n=0);var e,i=t%26,r=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<s)for(this.length-=s,a=0;a=0&&(0!==l||a>=r);a--){var f=0|this.words[a];this.words[a]=l<<26-o|f>>>o,l=f&h}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,i){return n(0===this.negative),this.iushrn(t,e,i)},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,i=(t-e)/26,r=1<=0);var e=t%26,i=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var r=67108863^67108863>>>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>26)-(u/67108864|0),this.words[r+i]=67108863&o}for(;r>26,this.words[r+i]=67108863&o;if(0===h)return this._strip();for(n(-1===h),h=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),n=this.clone(),r=t,s=0|r.words[r.length-1];0!=(i=26-this._countBits(s))&&(r=r.ushln(i),n.iushln(i),s=0|r.words[r.length-1]);var h,u=n.length-r.length;if("mod"!==e){(h=new o(null)).length=u+1,h.words=new Array(h.length);for(var a=0;a=0;f--){var c=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(c=Math.min(c/s|0,67108863),n._ishlnsubmul(r,c,f);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);h&&(h.words[f]=c)}return h&&h._strip(),n._strip(),"div"!==e&&0!==i&&n.iushrn(i),{div:h||null,mod:n}},o.prototype.divmod=function(t,e,i){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(r=h.div.neg()),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:r,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(r=h.div.neg()),{div:r,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===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 r,s,h},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 i=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),r=t.andln(1),o=i.cmp(n);return o<0||1===r&&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 i=(1<<26)%t,r=0,o=this.length-1;o>=0;o--)r=(i*r+(0|this.words[o]))%t;return e?-r:r},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 i=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*i;this.words[r]=o/t|0,i=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,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),s=new o(0),h=new o(0),u=new o(1),a=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++a;for(var l=i.clone(),f=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||s.isOdd())&&(r.iadd(l),s.isub(f)),r.iushrn(1),s.iushrn(1);for(var m=0,p=1;0==(i.words[0]&p)&&m<26;++m,p<<=1);if(m>0)for(i.iushrn(m);m-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(l),u.isub(f)),h.iushrn(1),u.iushrn(1);e.cmp(i)>=0?(e.isub(i),r.isub(h),s.isub(u)):(i.isub(e),h.isub(r),u.isub(s))}return{a:h,b:u,gcd:i.iushln(a)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,s=new o(1),h=new o(0),u=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var a=0,l=1;0==(e.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(e.iushrn(a);a-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,c=1;0==(i.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(i.iushrn(f);f-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(h)):(i.isub(e),h.isub(s))}return(r=0===e.cmpn(1)?s:h).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var n=0;e.isEven()&&i.isEven();n++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var r=e.cmp(i);if(r<0){var o=e;e=i,i=o}else if(0===r||0===i.cmpn(1))break;e.isub(i)}return i.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,i=(t-e)/26,r=1<>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),n(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;i--){var n=0|this.words[i],r=0|t.words[i];if(n!==r){nr&&(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 T(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 E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function N(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(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 R(t){T.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,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},r(E,_),E.prototype.split=function(t,e){for(var i=4194303,n=Math.min(t.length,9),r=0;r>>22,o=s}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=r,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 E;else if("p224"===t)e=new N;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return w[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.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")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},T.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var r=this.m.subn(1),s=0;!r.isZero()&&0===r.andln(1);)s++,r.iushrn(1);n(!r.isZero());var h=new o(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),d=this.pow(t,r),m=s;0!==d.cmp(h);){for(var p=d,v=0;0!==p.cmp(h);v++)p=p.redSqr();n(v=0;n--){for(var a=e.words[n],l=u-1;l>=0;l--){var f=a>>l&1;r!==i[0]&&(r=this.sqr(r)),0!==f||0!==s?(s<<=1,s|=f,(4==++h||0===n&&0===l)&&(r=this.mul(r,i[s]),h=0,s=0)):h=0}u=26}return r},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new R(t)},r(R,T),R.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},R.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},R.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=i.nmd(t),this)},161:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var h=new r(n,o||t,s),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],h]:t._events[u].push(h):(t._events[u]=h,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function h(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),h.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},h.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r{"use strict";var e,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};e=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=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(i,n){function r(i){t.removeListener(e,o),n(i)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",r),i([].slice.call(arguments))}p(t,e,o,{once:!0}),"error"!==e&&function(t,e,i){"function"==typeof t.on&&p(t,"error",e,{once:!0})}(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function h(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 a(t,e,i,n){var r,o,s,a;if(h(i),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]),void 0===s)s=o[e]=i,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=u(t))>0&&s.length>r&&!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,a=l,console&&console.warn&&console.warn(a)}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,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},r=l.bind(n);return r.listener=i,n.wrapFn=r,r}function c(t,e,i){var n=t._events;if(void 0===n)return[];var r=n[e];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(t){for(var e=new Array(t.length),i=0;i0&&(s=e[0]),s instanceof Error)throw s;var h=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw h.context=s,h}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var a=u.length,l=m(u,a);for(i=0;i=0;o--)if(i[o]===e||i[o].listener===e){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return c(this,t,!0)},o.prototype.rawListeners=function(t){return c(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):[]}},196:()=>{}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";const t={NODE_ENV:"production",PKG_NAME:"@subwallet/extension-koni",PKG_VERSION:"1.1.10-0",TARGET_ENV:"extension"}.EXTENSION_PREFIX||"",e=`${t}koni-page`,n=`${t}koni-content`;class r extends Error{constructor(t,e,i,n){super(e),this.errorType=t,this.code=i,this.data=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}const o={CHAIN_DISCONNECTED:{message:"Network is disconnected",code:void 0},INVALID_PARAMS:{message:"Undefined error. Please contact SubWallet support",code:void 0},INTERNAL_ERROR:{message:"Undefined error. Please contact SubWallet support",code:void 0},USER_REJECT:{message:"Rejected by user",code:void 0}};class s extends r{constructor(t,e,i){const{code:n,message:r}=o[t];super(t,e||r,n,i),this.errorType=t}}let h,u,a,l,f,c,d,m,p,v,g,M,y,w,_,E,N,b,A,T,R,I,O,S,L,C,D,U;!function(t){t.Web="Web",t.Node="Node",t.ExtensionChrome="Extension (Chrome)",t.ExtensionFirefox="Extension (Firefox)",t.WebWorker="Web Worker",t.ServiceWorker="Service Worker",t.Unknown="Unknown"}(h||(h={})),function(t){t.NOMINATED="nominated",t.POOLED="pooled"}(u||(u={})),function(t){t.PENDING="pending",t.READY="ready",t.CACHED="cached",t.ERROR="error",t.NOT_SUPPORT="not_support"}(a||(a={})),function(t){t.VER_1="1.0.0",t.VER_2="2.0.0"}(l||(l={})),function(t){t.ONGOING="ongoing",t.COMPLETED="completed",t.FAILED="failed"}(f||(f={})),function(t){t.wasm="wasm",t.evm="evm"}(c||(c={})),function(t){t.ALWAYS_REQUIRED="always_required",t.WHEN_NEEDED="when_needed"}(d||(d={})),function(t){t.SEND="send",t.RECEIVED="received"}(m||(m={})),function(t){t.EVM="evm",t.SUBSTRATE="substrate"}(p||(p={})),function(t){t.TRANSFER_BALANCE="transfer.balance",t.TRANSFER_TOKEN="transfer.token",t.TRANSFER_XCM="transfer.xcm",t.SEND_NFT="send_nft",t.CROWDLOAN="crowdloan",t.STAKING_JOIN_POOL="staking.join_pool",t.STAKING_LEAVE_POOL="staking.leave_pool",t.STAKING_POOL_WITHDRAW="staking.pool_withdraw",t.STAKING_BOND="staking.bond",t.STAKING_UNBOND="staking.unbond",t.STAKING_CLAIM_REWARD="staking.claim_reward",t.STAKING_WITHDRAW="staking.withdraw",t.STAKING_COMPOUNDING="staking.compounding",t.STAKING_CANCEL_COMPOUNDING="staking.cancel_compounding",t.STAKING_CANCEL_UNSTAKE="staking.cancel_unstake",t.EVM_EXECUTE="evm.execute",t.UNKNOWN="unknown"}(v||(v={})),function(t){t.QUEUED="queued",t.SUBMITTING="submitting",t.PROCESSING="processing",t.SUCCESS="success",t.FAIL="fail",t.CANCELLED="cancelled",t.UNKNOWN="unknown"}(g||(g={})),function(t){t.NOT_ENOUGH_BALANCE="NOT_ENOUGH_BALANCE",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.DUPLICATE_TRANSACTION="DUPLICATE_TRANSACTION",t.UNABLE_TO_SIGN="UNABLE_TO_SIGN",t.USER_REJECT_REQUEST="USER_REJECT_REQUEST",t.UNABLE_TO_SEND="UNABLE_TO_SEND",t.SEND_TRANSACTION_FAILED="SEND_TRANSACTION_FAILED",t.INTERNAL_ERROR="INTERNAL_ERROR",t.UNSUPPORTED="UNSUPPORTED",t.TIMEOUT="TIMEOUT",t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(M||(M={})),function(t){t.NOT_ENOUGH_MIN_STAKE="NOT_ENOUGH_MIN_STAKE",t.EXCEED_MAX_NOMINATIONS="EXCEED_MAX_NOMINATIONS",t.EXIST_UNSTAKING_REQUEST="EXIST_UNSTAKING_REQUEST",t.INVALID_ACTIVE_STAKE="INVALID_ACTIVE_STAKE",t.EXCEED_MAX_UNSTAKING="EXCEED_MAX_UNSTAKING",t.INACTIVE_NOMINATION_POOL="INACTIVE_NOMINATION_POOL"}(y||(y={})),function(t){t.NOT_ENOUGH_VALUE="NOT_ENOUGH_VALUE",t.NOT_ENOUGH_FEE="NOT_ENOUGH_FEE",t.INVALID_TOKEN="INVALID_TOKEN",t.TRANSFER_ERROR="TRANSFER_ERROR",t.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT="RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(w||(w={})),function(t){t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="notEnoughExistentialDeposit"}(_||(_={})),function(t){t.NETWORK_ERROR="NETWORK_ERROR",t.TOKEN_ERROR="TOKEN_ERROR",t.TIMEOUT="TIMEOUT",t.GET_BALANCE_ERROR="GET_BALANCE_ERROR"}(E||(E={})),function(t){t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR",t.USER_REJECT="USER_REJECT"}(N||(N={})),function(t){t.INVALID_ADDRESS="invalidToAccount",t.KEYRING_ERROR="keyringError",t.UNKNOWN_ERROR="unknownError"}(b||(b={})),function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.FAILED=2]="FAILED",t[t.COMPLETED=3]="COMPLETED"}(A||(A={})),function(t){t.LIGHT="light",t.DARK="dark",t.SUBSPACE="subspace"}(T||(T={})),function(t){t.INVALID_INFO_TYPE="invalidInfoType",t.INJECT_SCRIPT_DETECTED="injectScriptDetected",t.EXISTED_NETWORK="existedNetwork",t.EXISTED_PROVIDER="existedProvider",t.INVALID_PROVIDER="invalidProvider",t.NONE="none",t.CONNECTION_FAILURE="connectionFailure",t.PROVIDER_NOT_SAME_NETWORK="providerNotSameNetwork"}(R||(R={})),function(t){t.CONNECTED="connected",t.CONNECTING="connecting",t.DISCONNECTED="disconnected",t.PENDING="pending"}(I||(I={})),function(t){t.USER_REJECTED_REQUEST="USER_REJECTED_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.UNSUPPORTED_METHOD="UNSUPPORTED_METHOD",t.DISCONNECTED="DISCONNECTED",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR"}(O||(O={})),function(t){t.CLAIMABLE="CLAIMABLE",t.UNLOCKING="UNLOCKING"}(S||(S={})),function(t){t.EARNING_REWARD="EARNING_REWARD",t.PARTIALLY_EARNING="PARTIALLY_EARNING",t.NOT_EARNING="NOT_EARNING",t.WAITING="WAITING",t.NOT_STAKING="NOT_STAKING"}(L||(L={})),function(t){t.EVM="EVM",t.SUBSTRATE="SUBSTRATE",t.UNKNOWN="UNKNOWN",t.MIXED="MIXED"}(C||(C={})),function(t){t.INFO="info",t.SUCCESS="success",t.WARNING="warning",t.ERROR="error"}(D||(D={})),function(t){t.WRONG_PASSWORD="WRONG_PASSWORD",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.SUCCESS="SUCCESS"}(U||(U={}));var x=i(795);let k=!1;class P extends x.Z{isSubWallet=!0;isMetaMask=!1;_connected=!1;constructor(t,e){super(),this.version=e,this.sendMessage=t,this._connected=!0}get connected(){return this._connected}isConnected(){return this._connected}subscribeExtensionEvents(){k||(this.sendMessage("evm(events.subscribe)",null,(({payload:t,type:e})=>{if(["connect","disconnect","accountsChanged","chainChanged","message","data","reconnect","error"].includes(e)){"connect"===e?this._connected=!0:"disconnect"===e&&(this._connected=!1);const i="data"===e?"message":e;this.emit(i,t)}else console.warn("Can not handle event",e,t)})).then((t=>{k=!0})).catch((()=>{k=!1})),k=!0)}async enable(){return this.request({method:"eth_requestAccounts"})}on(t,e){return this.subscribeExtensionEvents(),super.on(t,e),this}once(t,e){return this.subscribeExtensionEvents(),super.once(t,e),this}request({method:t,params:e}){return new Promise("eth_requestAccounts"===t?(t,e)=>{const i=""!==document.title?document.title:window.location.hostname;this.sendMessage("pub(authorize.tabV2)",{origin:i,accountAuthType:"evm"}).then((()=>{this.request({method:"eth_accounts"}).then((e=>{t(e)})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}:(i,n)=>{this.sendMessage("evm(request)",{params:e,method:t}).then((t=>{i(t)})).catch((t=>{n(t)}))})}_sendSync(t){let e;if("net_version"!==t.method)throw new Error(`Not support ${t.method}`);return e=this.version?`SubWallet v${this.version}`:null,{id:t.id,jsonrpc:t.jsonrpc,result:e}}send(t,e){return"string"!=typeof t||e&&!Array.isArray(e)?t&&"object"==typeof t&&"function"==typeof e?this.request(t).then((t=>{e(t)})):this._sendSync(t):this.request({method:t,params:e})}sendAsync(t,e){this.request(t).then((t=>{e(null,{result:t})})).catch((t=>{e(t)}))}}let G,B,W=0;class K{constructor(t){G=t}get(t){return G("pub(accounts.listV2)",{anyType:t,accountAuthType:"substrate"})}subscribe(t){let e=null;return G("pub(accounts.subscribeV2)",{accountAuthType:"substrate"},t).then((t=>{e=t})).catch(console.error),()=>{e&&G("pub(accounts.unsubscribe)",{id:e}).catch(console.error)}}}class j{constructor(t){B=t}get(){return B("pub(metadata.list)")}provide(t){return B("pub(metadata.provide)",t)}addToken(t){return B("pub(token.add)",t)}}const V=i(161),q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function F(t){return t.toString().padStart(2,"0")}var H=i(197);const Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function $(t,e){return void 0===Z[t]?e:Z[t]}function X(){return Number.NaN}const z=$("BigInt",X),J=("function"==typeof z&&z.asIntN,"function"==typeof q.Buffer&&"function"==typeof q.Buffer.isBuffer),Q="object"==typeof q.process;function Y(t){return"function"==typeof t}function tt(t){return J&&!!t&&Y(t.readDoubleLE)&&q.Buffer.isBuffer(t)}function et(t){return(t&&t.constructor)===Uint8Array||t instanceof Uint8Array}const it=new Array(256),nt=new Array(65536);for(let t=0;t<256;t++)it[t]=t.toString(16).padStart(2,"0");for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)nt[e|i]=it[t]+it[i]}function rt(t,e){const i=t.length%2|0,n=t.length-i|0;for(let i=0;i9&&(st[0|ot[t].toUpperCase().charCodeAt(0)]=0|t);for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)ht[e|i]=st[t]<<4|st[i]}const ut=/^0x[\da-fA-F]+$/,at="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function lt(t,e){return void 0===at[t]?e:at[t]}class ft{encode(t){const e=t.length,i=new Uint8Array(e);for(let n=0;n0){const i=Math.ceil(e/8);if(t.length>i)return`${rt(t.subarray(0,i/2),n)}…${rt(t.subarray(t.length-i/2),"")}`}return rt(t,n)}(function(t){return et(t)?tt(t)?new Uint8Array(t):t:function(t,e=-1,i){return"string"==typeof t&&("0x"===t||ut.test(t))&&(-1===e?i||t.length%2==0:t.length===2+Math.ceil(e/4))}(t)?function(t,e=-1){if(!t)return new Uint8Array;let i=t.startsWith("0x")?2:0;const n=Math.ceil((t.length-i)/2),r=Math.ceil(-1===e?n:e/8),o=new Uint8Array(r);for(let e=r>n?r-n:0;e{if(r<=0)return t;const e=`${t}`;return e.lengthvt("debug",e,t,n):dt,error:(...t)=>vt("error",e,t),log:(...t)=>vt("log",e,t),noop:dt,warn:(...t)=>vt("warn",e,t)}}("PostMessageProvider");let _t,Et;class Nt{#t;isClonable=!0;#e=!1;#i={};constructor(t){this.#t=new V,_t=t}clone(){return new Nt(_t)}async connect(){console.error("PostMessageProvider.disconnect() is not implemented.")}async disconnect(){console.error("PostMessageProvider.disconnect() is not implemented.")}get hasSubscriptions(){return!0}get isConnected(){return this.#e}listProviders(){return _t("pub(rpc.listProviders)",void 0)}on(t,e){return this.#t.on(t,e),()=>{this.#t.removeListener(t,e)}}async send(t,e,i,n){if(n){const{callback:i,type:r}=n,o=await _t("pub(rpc.subscribe)",{method:t,params:e,type:r},(t=>{n.callback(null,t)}));return this.#i[`${r}::${o}`]=i,o}return _t("pub(rpc.send)",{method:t,params:e})}async startProvider(t){this.#e=!1,this.#t.emit("disconnected");const e=await _t("pub(rpc.startProvider)",t);return _t("pub(rpc.subscribeConnected)",null,(t=>(this.#e=t,t?this.#t.emit("connected"):this.#t.emit("disconnected"),!0))),e}subscribe(t,e,i,n){return this.send(e,i,!1,{callback:n,type:t})}async unsubscribe(t,e,i){const n=`${t}::${i}`;return void 0===this.#i[n]?(wt.debug((()=>`Unable to find active subscription=${n}`)),!1):(delete this.#i[n],this.send(e,[i]))}}let bt=0;class At{constructor(t){Et=t}async signPayload(t){const e=++bt;return{...await Et("pub(extrinsic.sign)",t),id:e}}async signRaw(t){const e=++bt;return{...await Et("pub(bytes.sign)",t),id:e}}}const Tt={};function Rt(i,n,r){return new Promise(((o,s)=>{const h=`${t}.${Date.now()}.${++W}`;Tt[h]={reject:s,resolve:o,subscriber:r};const u={id:h,message:i,origin:e,request:n||null};window.postMessage(u,"*")}))}const It="1.1.10-0";window.addEventListener("message",(({data:t,source:e})=>{e===window&&t.origin===n&&(t.id?function(t){const e=Tt[t.id];e?(e.subscriber||delete Tt[t.id],t.subscription?e.subscriber(t.subscription):t.error?e.reject(new s(N.INTERNAL_ERROR,t.error,t.errorCode)):e.resolve(t.response)):console.error(`Unknown response: ${JSON.stringify(t)}`)}(t):console.error("Missing id for response."))})),function(t,{name:e,version:i}){const n=window;n.injectedWeb3=n.injectedWeb3||{},n.injectedWeb3[e]={enable:e=>t(e),version:i}}((async function(t){return await Rt("pub(authorize.tabV2)",{origin:t}),new class{constructor(t){this.accounts=new K(t),this.metadata=new j(t),this.provider=new Nt(t),this.signer=new At(t),setInterval((()=>{t("pub(ping)",null).catch((()=>{console.error("Extension unavailable, ping failed")}))}),5e3+Math.floor(5e3*Math.random()))}}(Rt)}),{name:"subwallet-js",version:It}),function(t){const e=window;e.SubWallet?e.SubWallet.provider=t:e.SubWallet=t,e.dispatchEvent(new Event("subwallet#initialized")),e.addEventListener("load",(()=>{e.ethereum||(e.ethereum=t,e.dispatchEvent(new Event("ethereum#initialized")))}))}(new P(Rt,"1.1.10-0"))})()})(); \ No newline at end of file diff --git a/html/Web.bundle/site/index.html b/html/Web.bundle/site/index.html index 9413874a9..30189f1e9 100644 --- a/html/Web.bundle/site/index.html +++ b/html/Web.bundle/site/index.html @@ -1 +1 @@ -SubWallet
SubWallet
\ No newline at end of file +SubWallet
SubWallet
\ No newline at end of file diff --git a/html/Web.bundle/site/web-runner-82ff6a30707cb66d8b3d.js b/html/Web.bundle/site/web-runner-5218ec43c616158db3a2.js similarity index 60% rename from html/Web.bundle/site/web-runner-82ff6a30707cb66d8b3d.js rename to html/Web.bundle/site/web-runner-5218ec43c616158db3a2.js index 7f0fc9433..b34e49f32 100644 --- a/html/Web.bundle/site/web-runner-82ff6a30707cb66d8b3d.js +++ b/html/Web.bundle/site/web-runner-5218ec43c616158db3a2.js @@ -1,5 +1,5 @@ -/*! For license information please see web-runner-82ff6a30707cb66d8b3d.js.LICENSE.txt */ -(()=>{var __webpack_modules__={94070:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(49164);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},49164:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.pool=function(e,t){return(0,o.memo)(e,((e,a)=>{const n=function(e,t){return[e,t].sort(((e,t)=>c[e.asToken.toString()]-c[t.asToken.toString()]))}(e,a);return t.query.dex.liquidityPool(n).pipe((0,r.map)((t=>{const[r,i]=t;return e.eq(n[0])&&a.eq(n[1])?[r,i]:[i,r]})))}))};var r=a(39002),i=n(a(43862)),o=a(22542);const c=i.default.types.TokenSymbol._enum},42522:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(48817);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},48817:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.stakingPool=function(e,t){return(0,c.memo)(e,(()=>{const e=function(e){return{defaultExchangeRate:e.consts.stakingPool.defaultExchangeRate,bondingDuration:e.consts.polkadotBridge.bondingDuration,eraLength:e.consts.polkadotBridge.eraLength,stakingCurrency:e.consts.stakingPool.stakingCurrencyId,liquidCurrency:e.consts.stakingPool.liquidCurrencyId}}(t);return(0,i.combineLatest)([t.query.stakingPool.currentEra(),t.query.stakingPool.stakingPoolLedger(),t.query.stakingPool.stakingPoolParams(),t.query.tokens.totalIssuance(e.liquidCurrency)]).pipe((0,o.map)((t=>{const[a,n,i,o]=t;return function(e){for(var t=1;t{"use strict";t.__esModule=!0;var n={derive:!0};t.derive=void 0;var r=d(a(75902)),i=d(a(94070)),o=d(a(42522)),c=a(67965);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(s=function(e){return e?a:t})(e)}function d(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=s(t);if(a&&a.has(e))return a.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,a&&a.set(e,n),n}Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}));const u={loan:r,dex:i,homa:o};t.derive=u},75902:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(58071);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var r=a(95947);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))}))},95947:(e,t,a)=>{"use strict";t.__esModule=!0,t.allLoanOverviews=function(e,t){return(0,i.memo)(e,(()=>{const a=s(e,t);return(0,o.getAllCollateralCurrencyIds)(t).pipe((0,r.switchMap)((e=>(0,n.combineLatest)(e.map((e=>a(e)))))))}))},t.allLoanTypes=function(e,t){return(0,i.memo)(e,(()=>{const a=c(e,t);return(0,o.getAllCollateralCurrencyIds)(t).pipe((0,r.switchMap)((e=>(0,n.combineLatest)(e.map((e=>a(e)))))))}))},t.loanOverview=s,t.loanType=c;var n=a(80977),r=a(39002),i=a(22542),o=a(99213);function c(e,t){return(0,i.memo)(e,(e=>(0,n.combineLatest)([t.query.cdpEngine.debitExchangeRate(e),t.query.cdpEngine.collateralParams(e)]).pipe((0,r.map)((a=>{const n=function(e){return{minimumDebitValue:e.consts.cdpEngine.minimumDebitValue,defaultDebitExchangeRate:e.consts.cdpEngine.defaultDebitExchangeRate,defaultLiquidationRatio:e.consts.cdpEngine.defaultLiquidationRatio,defaultLiquidationPenalty:e.consts.cdpEngine.defaultLiquidationPenalty}}(t),[r]=a,i=Reflect.has(a[1],"unwrapOrDefault")?a[1].unwrapOrDefault():a[1];return{currency:e,debitExchangeRate:r.isEmpty?n.defaultDebitExchangeRate:r,liquidationPenalty:i.liquidationPenalty.isEmpty?n.defaultLiquidationPenalty:i.liquidationPenalty,liquidationRatio:i.liquidationRatio.isEmpty?n.defaultLiquidationRatio:i.liquidationRatio,requiredCollateralRatio:i.requiredCollateralRatio,interestRatePerSec:i.interestRatePerSec,maximumTotalDebitValue:i.maximumTotalDebitValue,minimumDebitValue:n.minimumDebitValue}})))))}function s(e,t){return(0,i.memo)(e,(e=>t.query.loans.totalPositions(e).pipe((0,r.map)((t=>{const{collateral:a,debit:n}=t;return{currency:e,totalDebit:n,totalCollateral:a}})))))}},58071:(e,t,a)=>{"use strict";t.__esModule=!0,t.allLoans=function(e,t){return(0,i.memo)(e,(a=>{const i=c(e,t);return(0,o.getAllCollateralCurrencyIds)(t).pipe((0,r.switchMap)((e=>(0,n.combineLatest)(e.map((e=>i(a,e)))))))}))},t.loan=c;var n=a(80977),r=a(39002),i=a(22542),o=a(99213);function c(e,t){return(0,i.memo)(e,((e,a)=>t.query.loans.positions(a,e).pipe((0,r.map)((t=>{const{debit:n,collateral:r}=t;return{account:e,currency:a,debit:n,collateral:r}})))))}},82832:()=>{},25506:()=>{},67965:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(82832);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var r=a(25506);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))}));var i=a(29053);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))}));var o=a(28383);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))}))},29053:()=>{},28383:()=>{},99213:(e,t,a)=>{"use strict";t.__esModule=!0,t.getAllCollateralCurrencyIds=function(e){return e.query.cdpEngine.collateralParams.keys().pipe((0,n.map)((e=>e.map((e=>e.args[0])))))};var n=a(39002)},81364:(e,t,a)=>{"use strict";var n=a(71600);t.YM=void 0;var r=n(a(26290)),i=n(a(24923)),o=a(37986),c=a(47649),s=a(93058),d=a(6871);const u=["types","rpc","typesAlias","typesBundle","runtime","signedExtensions"];function f(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t{"use strict";t.__esModule=!0,t.runtime=void 0,t.runtime={EVMRuntimeRPCApi:[{version:2,methods:{call:{description:"call evm contract",params:[{name:"from",type:"H160"},{name:"to",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"Balance"},{name:"gas_limit",type:"u64"},{name:"storage_limit",type:"u32"},{name:"access_list",type:"Option>"},{name:"estimate",type:"bool"}],type:"Result"},create:{description:"create evm contract",params:[{name:"from",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"Balance"},{name:"gas_limit",type:"u64"},{name:"storage_limit",type:"u32"},{name:"access_list",type:"Option>"},{name:"estimate",type:"bool"}],type:"Result"}}}]}},43862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rpc:{},types:{Amount:"i128",AmountOf:"Amount",AuctionId:"u32",AuctionIdOf:"AuctionId",TokenSymbol:{_enum:{ACA:0,AUSD:1,DOT:2,LDOT:3,RENBTC:20,CASH:21,KAR:128,KUSD:129,KSM:130,LKSM:131,BNC:168,VSKSM:169,PHA:170,KINT:171,KBTC:172}},DexShare:{_enum:{Token:"TokenSymbol",Erc20:"EvmAddress"}},CurrencyId:{_enum:{Token:"TokenSymbol",DEXShare:"(DexShare, DexShare)",ERC20:"EvmAddress",StableAssetPoolToken:"u32",LiquidCrowdloan:"u32",ForeignAsset:"u32"}},CurrencyIdOf:"CurrencyId",AirDropCurrencyId:{_enum:["KAR","ACA"]},AuthoritysOriginId:{_enum:["Root","Treasury","HonzonTreasury","HomaTreasury","TreasuryReserve"]},AcalaDataProviderId:{_enum:["Aggregated","Acala","Band"]},TradingPair:"(CurrencyId, CurrencyId)",OrmlCurrencyId:"CurrencyId",ChainBridgeChainId:"u8",AcalaAssetMetadata:{name:"Vec",symbol:"Vec",decimals:"u8",minimalBalance:"Balance"},NumberOrHex:"u128"},typesAlias:{rewards:{OrmlCurrencyId:"CurrencyId"},oracle:{DataProviderId:"AcalaDataProviderId"},chainBridge:{ChainId:"ChainBridgeChainId"}}}},67813:(e,t,a)=>{"use strict";a(51235)},67570:(e,t,a)=>{"use strict";a(10571)},17256:(e,t,a)=>{"use strict";a(98664)},61564:(e,t,a)=>{"use strict";a(54357)},39791:(e,t,a)=>{"use strict";a(74465)},98070:(e,t,a)=>{"use strict";a(6740)},71793:(e,t,a)=>{"use strict";a(10747)},34113:(e,t,a)=>{"use strict";a(67813),a(67570),a(17256),a(61564),a(71793),a(39791),a(98070)},93058:(e,t,a)=>{"use strict";t.__esModule=!0,t.typesBundle=t.typesAlias=t.types=t.signedExtensions=t.rpc=t.lookupTypes=void 0;var n=a(59490);a(34113),a(46513);var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=i(t);if(a&&a.has(e))return a.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var c=r?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(n,o,c):n[o]=e[o]}return n.default=e,a&&a.set(e,n),n}(a(782));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(i=function(e){return e?a:t})(e)}t.lookupTypes=r;const o=n.types;t.types=o;const c=n.rpc;t.rpc=c;const s=n.typesAlias;t.typesAlias=s;const d=n.typesBundle;t.typesBundle=d;const u=n.signedExtensions;t.signedExtensions=u},35842:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={FrameSystemAccountInfo:{nonce:"u32",consumers:"u32",providers:"u32",sufficients:"u32",data:"PalletBalancesAccountData"},PalletBalancesAccountData:{free:"u128",reserved:"u128",miscFrozen:"u128",feeFrozen:"u128"},FrameSupportWeightsPerDispatchClassU64:{normal:"u64",operational:"u64",mandatory:"u64"},SpRuntimeDigest:{logs:"Vec"},SpRuntimeDigestDigestItem:{_enum:{Other:"Bytes",__Unused1:"Null",__Unused2:"Null",__Unused3:"Null",Consensus:"([u8;4],Bytes)",Seal:"([u8;4],Bytes)",PreRuntime:"([u8;4],Bytes)",__Unused7:"Null",RuntimeEnvironmentUpdated:"Null"}},FrameSystemEventRecord:{phase:"FrameSystemPhase",event:"Event",topics:"Vec"},FrameSystemEvent:{_enum:{ExtrinsicSuccess:{dispatchInfo:"FrameSupportWeightsDispatchInfo"},ExtrinsicFailed:{dispatchError:"SpRuntimeDispatchError",dispatchInfo:"FrameSupportWeightsDispatchInfo"},CodeUpdated:"Null",NewAccount:{account:"AccountId32"},KilledAccount:{account:"AccountId32"},Remarked:{_alias:{hash_:"hash"},sender:"AccountId32",hash_:"H256"}}},FrameSupportWeightsDispatchInfo:{weight:"u64",class:"FrameSupportWeightsDispatchClass",paysFee:"FrameSupportWeightsPays"},FrameSupportWeightsDispatchClass:{_enum:["Normal","Operational","Mandatory"]},FrameSupportWeightsPays:{_enum:["Yes","No"]},SpRuntimeDispatchError:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"SpRuntimeModuleError",ConsumerRemaining:"Null",NoProviders:"Null",TooManyConsumers:"Null",Token:"SpRuntimeTokenError",Arithmetic:"SpRuntimeArithmeticError",Transactional:"SpRuntimeTransactionalError"}},SpRuntimeModuleError:{index:"u8",error:"[u8;4]"},SpRuntimeTokenError:{_enum:["NoFunds","WouldDie","BelowMinimum","CannotCreate","UnknownAsset","Frozen","Unsupported"]},SpRuntimeArithmeticError:{_enum:["Underflow","Overflow","DivisionByZero"]},SpRuntimeTransactionalError:{_enum:["LimitReached","NoLayer"]},PalletSchedulerEvent:{_enum:{Scheduled:{when:"u32",index:"u32"},Canceled:{when:"u32",index:"u32"},Dispatched:{task:"(u32,u32)",id:"Option",result:"Result"},CallLookupFailed:{task:"(u32,u32)",id:"Option",error:"FrameSupportScheduleLookupError"}}},FrameSupportScheduleLookupError:{_enum:["Unknown","BadFormat"]},PalletUtilityEvent:{_enum:{BatchInterrupted:{index:"u32",error:"SpRuntimeDispatchError"},BatchCompleted:"Null",BatchCompletedWithErrors:"Null",ItemCompleted:"Null",ItemFailed:{error:"SpRuntimeDispatchError"},DispatchedAs:{result:"Result"}}},PalletMultisigEvent:{_enum:{NewMultisig:{approving:"AccountId32",multisig:"AccountId32",callHash:"[u8;32]"},MultisigApproval:{approving:"AccountId32",timepoint:"PalletMultisigTimepoint",multisig:"AccountId32",callHash:"[u8;32]"},MultisigExecuted:{approving:"AccountId32",timepoint:"PalletMultisigTimepoint",multisig:"AccountId32",callHash:"[u8;32]",result:"Result"},MultisigCancelled:{cancelling:"AccountId32",timepoint:"PalletMultisigTimepoint",multisig:"AccountId32",callHash:"[u8;32]"}}},PalletMultisigTimepoint:{height:"u32",index:"u32"},PalletProxyEvent:{_enum:{ProxyExecuted:{result:"Result"},AnonymousCreated:{anonymous:"AccountId32",who:"AccountId32",proxyType:"RuntimeCommonProxyType",disambiguationIndex:"u16"},Announced:{real:"AccountId32",proxy:"AccountId32",callHash:"H256"},ProxyAdded:{delegator:"AccountId32",delegatee:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"},ProxyRemoved:{delegator:"AccountId32",delegatee:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"}}},RuntimeCommonProxyType:{_enum:["Any","CancelProxy","Governance","Auction","Swap","Loan","DexLiquidity","StableAssetSwap","StableAssetLiquidity","Homa"]},ModuleTransactionPauseModuleEvent:{_enum:{TransactionPaused:{palletNameBytes:"Bytes",functionNameBytes:"Bytes"},TransactionUnpaused:{palletNameBytes:"Bytes",functionNameBytes:"Bytes"},EvmPrecompilePaused:{address:"H160"},EvmPrecompileUnpaused:{address:"H160"}}},ModuleIdleSchedulerModuleEvent:{_enum:{TaskDispatched:{taskId:"u32",result:"Result"},TaskAdded:{taskId:"u32",task:"AcalaRuntimeScheduledTasks"}}},AcalaRuntimeScheduledTasks:{_enum:{EvmTask:"ModuleEvmEvmTask"}},ModuleEvmEvmTask:{_enum:{Schedule:{from:"H160",target:"H160",input:"Bytes",value:"u128",gasLimit:"u64",storageLimit:"u32"},Remove:{caller:"H160",contract:"H160",maintainer:"H160"}}},AcalaRuntimeRuntime:"Null",PalletPreimageEvent:{_enum:{Noted:{_alias:{hash_:"hash"},hash_:"H256"},Requested:{_alias:{hash_:"hash"},hash_:"H256"},Cleared:{_alias:{hash_:"hash"},hash_:"H256"}}},PalletBalancesEvent:{_enum:{Endowed:{account:"AccountId32",freeBalance:"u128"},DustLost:{account:"AccountId32",amount:"u128"},Transfer:{from:"AccountId32",to:"AccountId32",amount:"u128"},BalanceSet:{who:"AccountId32",free:"u128",reserved:"u128"},Reserved:{who:"AccountId32",amount:"u128"},Unreserved:{who:"AccountId32",amount:"u128"},ReserveRepatriated:{from:"AccountId32",to:"AccountId32",amount:"u128",destinationStatus:"FrameSupportTokensMiscBalanceStatus"},Deposit:{who:"AccountId32",amount:"u128"},Withdraw:{who:"AccountId32",amount:"u128"},Slashed:{who:"AccountId32",amount:"u128"}}},FrameSupportTokensMiscBalanceStatus:{_enum:["Free","Reserved"]},OrmlTokensModuleEvent:{_enum:{Endowed:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},DustLost:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Transfer:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",from:"AccountId32",to:"AccountId32",amount:"u128"},Reserved:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Unreserved:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},ReserveRepatriated:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",from:"AccountId32",to:"AccountId32",amount:"u128",status:"FrameSupportTokensMiscBalanceStatus"},BalanceSet:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",free:"u128",reserved:"u128"},TotalIssuanceSet:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"u128"},Withdrawn:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Slashed:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",freeAmount:"u128",reservedAmount:"u128"},Deposited:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},LockSet:{lockId:"[u8;8]",currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},LockRemoved:{lockId:"[u8;8]",currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32"}}},AcalaPrimitivesCurrencyCurrencyId:{_enum:{Token:"AcalaPrimitivesCurrencyTokenSymbol",DexShare:"(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)",Erc20:"H160",StableAssetPoolToken:"u32",LiquidCrowdloan:"u32",ForeignAsset:"u16"}},AcalaPrimitivesCurrencyTokenSymbol:{_enum:["ACA","AUSD","DOT","LDOT","TAP","__Unused5","__Unused6","__Unused7","__Unused8","__Unused9","__Unused10","__Unused11","__Unused12","__Unused13","__Unused14","__Unused15","__Unused16","__Unused17","__Unused18","__Unused19","RENBTC","CASH","__Unused22","__Unused23","__Unused24","__Unused25","__Unused26","__Unused27","__Unused28","__Unused29","__Unused30","__Unused31","__Unused32","__Unused33","__Unused34","__Unused35","__Unused36","__Unused37","__Unused38","__Unused39","__Unused40","__Unused41","__Unused42","__Unused43","__Unused44","__Unused45","__Unused46","__Unused47","__Unused48","__Unused49","__Unused50","__Unused51","__Unused52","__Unused53","__Unused54","__Unused55","__Unused56","__Unused57","__Unused58","__Unused59","__Unused60","__Unused61","__Unused62","__Unused63","__Unused64","__Unused65","__Unused66","__Unused67","__Unused68","__Unused69","__Unused70","__Unused71","__Unused72","__Unused73","__Unused74","__Unused75","__Unused76","__Unused77","__Unused78","__Unused79","__Unused80","__Unused81","__Unused82","__Unused83","__Unused84","__Unused85","__Unused86","__Unused87","__Unused88","__Unused89","__Unused90","__Unused91","__Unused92","__Unused93","__Unused94","__Unused95","__Unused96","__Unused97","__Unused98","__Unused99","__Unused100","__Unused101","__Unused102","__Unused103","__Unused104","__Unused105","__Unused106","__Unused107","__Unused108","__Unused109","__Unused110","__Unused111","__Unused112","__Unused113","__Unused114","__Unused115","__Unused116","__Unused117","__Unused118","__Unused119","__Unused120","__Unused121","__Unused122","__Unused123","__Unused124","__Unused125","__Unused126","__Unused127","KAR","KUSD","KSM","LKSM","TAI","__Unused133","__Unused134","__Unused135","__Unused136","__Unused137","__Unused138","__Unused139","__Unused140","__Unused141","__Unused142","__Unused143","__Unused144","__Unused145","__Unused146","__Unused147","__Unused148","__Unused149","__Unused150","__Unused151","__Unused152","__Unused153","__Unused154","__Unused155","__Unused156","__Unused157","__Unused158","__Unused159","__Unused160","__Unused161","__Unused162","__Unused163","__Unused164","__Unused165","__Unused166","__Unused167","BNC","VSKSM","PHA","KINT","KBTC"]},AcalaPrimitivesCurrencyDexShare:{_enum:{Token:"AcalaPrimitivesCurrencyTokenSymbol",Erc20:"H160",LiquidCrowdloan:"u32",ForeignAsset:"u16",StableAssetPoolToken:"u32"}},ModuleCurrenciesModuleEvent:{_enum:{Transferred:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",from:"AccountId32",to:"AccountId32",amount:"u128"},Withdrawn:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Deposited:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},DustSwept:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"}}},OrmlVestingModuleEvent:{_enum:{VestingScheduleAdded:{from:"AccountId32",to:"AccountId32",vestingSchedule:"OrmlVestingVestingSchedule"},Claimed:{who:"AccountId32",amount:"u128"},VestingSchedulesUpdated:{who:"AccountId32"}}},OrmlVestingVestingSchedule:{start:"u32",period:"u32",periodCount:"u32",perPeriod:"Compact"},ModuleTransactionPaymentModuleEvent:{_enum:{ChargeFeePoolEnabled:{subAccount:"AccountId32",currencyId:"AcalaPrimitivesCurrencyCurrencyId",exchangeRate:"u128",poolSize:"u128",swapThreshold:"u128"},ChargeFeePoolSwapped:{subAccount:"AccountId32",supplyCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",oldExchangeRate:"u128",swapExchangeRate:"u128",newExchangeRate:"u128",newPoolSize:"u128"},ChargeFeePoolDisabled:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",foreignAmount:"u128",nativeAmount:"u128"},TransactionFeePaid:{who:"AccountId32",actualFee:"u128",actualTip:"u128",actualSurplus:"u128"}}},PalletTreasuryEvent:{_enum:{Proposed:{proposalIndex:"u32"},Spending:{budgetRemaining:"u128"},Awarded:{proposalIndex:"u32",award:"u128",account:"AccountId32"},Rejected:{proposalIndex:"u32",slashed:"u128"},Burnt:{burntFunds:"u128"},Rollover:{rolloverBalance:"u128"},Deposit:{value:"u128"},SpendApproved:{proposalIndex:"u32",amount:"u128",beneficiary:"AccountId32"}}},PalletBountiesEvent:{_enum:{BountyProposed:{index:"u32"},BountyRejected:{index:"u32",bond:"u128"},BountyBecameActive:{index:"u32"},BountyAwarded:{index:"u32",beneficiary:"AccountId32"},BountyClaimed:{index:"u32",payout:"u128",beneficiary:"AccountId32"},BountyCanceled:{index:"u32"},BountyExtended:{index:"u32"}}},PalletTipsEvent:{_enum:{NewTip:{tipHash:"H256"},TipClosing:{tipHash:"H256"},TipClosed:{tipHash:"H256",who:"AccountId32",payout:"u128"},TipRetracted:{tipHash:"H256"},TipSlashed:{tipHash:"H256",finder:"AccountId32",deposit:"u128"}}},ModuleCollatorSelectionEvent:{_enum:{NewInvulnerables:{newInvulnerables:"Vec"},NewDesiredCandidates:{newDesiredCandidates:"u32"},NewCandidacyBond:{newCandidacyBond:"u128"},CandidateAdded:{who:"AccountId32",bond:"u128"},CandidateRemoved:{who:"AccountId32"}}},PalletSessionEvent:{_enum:{NewSession:{sessionIndex:"u32"}}},ModuleSessionManagerModuleEvent:{_enum:{ScheduledSessionDuration:{blockNumber:"u32",sessionIndex:"u32",sessionDuration:"u32"}}},CumulusPalletXcmpQueueEvent:{_enum:{Success:{messageHash:"Option",weight:"u64"},Fail:{messageHash:"Option",error:"XcmV2TraitsError",weight:"u64"},BadVersion:{messageHash:"Option"},BadFormat:{messageHash:"Option"},UpwardMessageSent:{messageHash:"Option"},XcmpMessageSent:{messageHash:"Option"},OverweightEnqueued:{sender:"u32",sentAt:"u32",index:"u64",required:"u64"},OverweightServiced:{index:"u64",used:"u64"}}},XcmV2TraitsError:{_enum:{Overflow:"Null",Unimplemented:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",MultiLocationFull:"Null",MultiLocationNotInvertible:"Null",BadOrigin:"Null",InvalidLocation:"Null",AssetNotFound:"Null",FailedToTransactAsset:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",ExceedsMaxMessageSize:"Null",DestinationUnsupported:"Null",Transport:"Null",Unroutable:"Null",UnknownClaim:"Null",FailedToDecode:"Null",MaxWeightInvalid:"Null",NotHoldingFees:"Null",TooExpensive:"Null",Trap:"u64",UnhandledXcmVersion:"Null",WeightLimitReached:"u64",Barrier:"Null",WeightNotComputable:"Null"}},PalletXcmEvent:{_enum:{Attempted:"XcmV2TraitsOutcome",Sent:"(XcmV1MultiLocation,XcmV1MultiLocation,XcmV2Xcm)",UnexpectedResponse:"(XcmV1MultiLocation,u64)",ResponseReady:"(u64,XcmV2Response)",Notified:"(u64,u8,u8)",NotifyOverweight:"(u64,u8,u8,u64,u64)",NotifyDispatchError:"(u64,u8,u8)",NotifyDecodeFailed:"(u64,u8,u8)",InvalidResponder:"(XcmV1MultiLocation,u64,Option)",InvalidResponderVersion:"(XcmV1MultiLocation,u64)",ResponseTaken:"u64",AssetsTrapped:"(H256,XcmV1MultiLocation,XcmVersionedMultiAssets)",VersionChangeNotified:"(XcmV1MultiLocation,u32)",SupportedVersionChanged:"(XcmV1MultiLocation,u32)",NotifyTargetSendFail:"(XcmV1MultiLocation,u64,XcmV2TraitsError)",NotifyTargetMigrationFail:"(XcmVersionedMultiLocation,u64)"}},XcmV2TraitsOutcome:{_enum:{Complete:"u64",Incomplete:"(u64,XcmV2TraitsError)",Error:"XcmV2TraitsError"}},XcmV1MultiLocation:{parents:"u8",interior:"XcmV1MultilocationJunctions"},XcmV1MultilocationJunctions:{_enum:{Here:"Null",X1:"XcmV1Junction",X2:"(XcmV1Junction,XcmV1Junction)",X3:"(XcmV1Junction,XcmV1Junction,XcmV1Junction)",X4:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X5:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X6:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X7:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X8:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)"}},XcmV1Junction:{_enum:{Parachain:"Compact",AccountId32:{network:"XcmV0JunctionNetworkId",id:"[u8;32]"},AccountIndex64:{network:"XcmV0JunctionNetworkId",index:"Compact"},AccountKey20:{network:"XcmV0JunctionNetworkId",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Bytes",OnlyChild:"Null",Plurality:{id:"XcmV0JunctionBodyId",part:"XcmV0JunctionBodyPart"}}},XcmV0JunctionNetworkId:{_enum:{Any:"Null",Named:"Bytes",Polkadot:"Null",Kusama:"Null"}},XcmV0JunctionBodyId:{_enum:{Unit:"Null",Named:"Bytes",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null"}},XcmV0JunctionBodyPart:{_enum:{Voice:"Null",Members:{count:"Compact"},Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},XcmV2Xcm:"Vec",XcmV2Instruction:{_enum:{WithdrawAsset:"XcmV1MultiassetMultiAssets",ReserveAssetDeposited:"XcmV1MultiassetMultiAssets",ReceiveTeleportedAsset:"XcmV1MultiassetMultiAssets",QueryResponse:{queryId:"Compact",response:"XcmV2Response",maxWeight:"Compact"},TransferAsset:{assets:"XcmV1MultiassetMultiAssets",beneficiary:"XcmV1MultiLocation"},TransferReserveAsset:{assets:"XcmV1MultiassetMultiAssets",dest:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},Transact:{originType:"XcmV0OriginKind",requireWeightAtMost:"Compact",call:"XcmDoubleEncoded"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"XcmV1MultilocationJunctions",ReportError:{queryId:"Compact",dest:"XcmV1MultiLocation",maxResponseWeight:"Compact"},DepositAsset:{assets:"XcmV1MultiassetMultiAssetFilter",maxAssets:"Compact",beneficiary:"XcmV1MultiLocation"},DepositReserveAsset:{assets:"XcmV1MultiassetMultiAssetFilter",maxAssets:"Compact",dest:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},ExchangeAsset:{give:"XcmV1MultiassetMultiAssetFilter",receive:"XcmV1MultiassetMultiAssets"},InitiateReserveWithdraw:{assets:"XcmV1MultiassetMultiAssetFilter",reserve:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},InitiateTeleport:{assets:"XcmV1MultiassetMultiAssetFilter",dest:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},QueryHolding:{queryId:"Compact",dest:"XcmV1MultiLocation",assets:"XcmV1MultiassetMultiAssetFilter",maxResponseWeight:"Compact"},BuyExecution:{fees:"XcmV1MultiAsset",weightLimit:"XcmV2WeightLimit"},RefundSurplus:"Null",SetErrorHandler:"XcmV2Xcm",SetAppendix:"XcmV2Xcm",ClearError:"Null",ClaimAsset:{assets:"XcmV1MultiassetMultiAssets",ticket:"XcmV1MultiLocation"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"Compact"},UnsubscribeVersion:"Null"}},XcmV1MultiassetMultiAssets:"Vec",XcmV1MultiAsset:{id:"XcmV1MultiassetAssetId",fun:"XcmV1MultiassetFungibility"},XcmV1MultiassetAssetId:{_enum:{Concrete:"XcmV1MultiLocation",Abstract:"Bytes"}},XcmV1MultiassetFungibility:{_enum:{Fungible:"Compact",NonFungible:"XcmV1MultiassetAssetInstance"}},XcmV1MultiassetAssetInstance:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]",Blob:"Bytes"}},XcmV2Response:{_enum:{Null:"Null",Assets:"XcmV1MultiassetMultiAssets",ExecutionResult:"Option<(u32,XcmV2TraitsError)>",Version:"u32"}},XcmV0OriginKind:{_enum:["Native","SovereignAccount","Superuser","Xcm"]},XcmDoubleEncoded:{encoded:"Bytes"},XcmV1MultiassetMultiAssetFilter:{_enum:{Definite:"XcmV1MultiassetMultiAssets",Wild:"XcmV1MultiassetWildMultiAsset"}},XcmV1MultiassetWildMultiAsset:{_enum:{All:"Null",AllOf:{id:"XcmV1MultiassetAssetId",fun:"XcmV1MultiassetWildFungibility"}}},XcmV1MultiassetWildFungibility:{_enum:["Fungible","NonFungible"]},XcmV2WeightLimit:{_enum:{Unlimited:"Null",Limited:"Compact"}},XcmVersionedMultiAssets:{_enum:{V0:"Vec",V1:"XcmV1MultiassetMultiAssets"}},XcmV0MultiAsset:{_enum:{None:"Null",All:"Null",AllFungible:"Null",AllNonFungible:"Null",AllAbstractFungible:{id:"Bytes"},AllAbstractNonFungible:{class:"Bytes"},AllConcreteFungible:{id:"XcmV0MultiLocation"},AllConcreteNonFungible:{class:"XcmV0MultiLocation"},AbstractFungible:{id:"Bytes",amount:"Compact"},AbstractNonFungible:{class:"Bytes",instance:"XcmV1MultiassetAssetInstance"},ConcreteFungible:{id:"XcmV0MultiLocation",amount:"Compact"},ConcreteNonFungible:{class:"XcmV0MultiLocation",instance:"XcmV1MultiassetAssetInstance"}}},XcmV0MultiLocation:{_enum:{Null:"Null",X1:"XcmV0Junction",X2:"(XcmV0Junction,XcmV0Junction)",X3:"(XcmV0Junction,XcmV0Junction,XcmV0Junction)",X4:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X5:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X6:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X7:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X8:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)"}},XcmV0Junction:{_enum:{Parent:"Null",Parachain:"Compact",AccountId32:{network:"XcmV0JunctionNetworkId",id:"[u8;32]"},AccountIndex64:{network:"XcmV0JunctionNetworkId",index:"Compact"},AccountKey20:{network:"XcmV0JunctionNetworkId",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Bytes",OnlyChild:"Null",Plurality:{id:"XcmV0JunctionBodyId",part:"XcmV0JunctionBodyPart"}}},XcmVersionedMultiLocation:{_enum:{V0:"XcmV0MultiLocation",V1:"XcmV1MultiLocation"}},CumulusPalletXcmEvent:{_enum:{InvalidFormat:"[u8;8]",UnsupportedVersion:"[u8;8]",ExecutedDownward:"([u8;8],XcmV2TraitsOutcome)"}},CumulusPalletDmpQueueEvent:{_enum:{InvalidFormat:{messageId:"[u8;32]"},UnsupportedVersion:{messageId:"[u8;32]"},ExecutedDownward:{messageId:"[u8;32]",outcome:"XcmV2TraitsOutcome"},WeightExhausted:{messageId:"[u8;32]",remainingWeight:"u64",requiredWeight:"u64"},OverweightEnqueued:{messageId:"[u8;32]",overweightIndex:"u64",requiredWeight:"u64"},OverweightServiced:{overweightIndex:"u64",weightUsed:"u64"}}},OrmlXtokensModuleEvent:{_enum:{TransferredMultiAssets:{sender:"AccountId32",assets:"XcmV1MultiassetMultiAssets",fee:"XcmV1MultiAsset",dest:"XcmV1MultiLocation"}}},OrmlUnknownTokensModuleEvent:{_enum:{Deposited:{asset:"XcmV1MultiAsset",who:"XcmV1MultiLocation"},Withdrawn:{asset:"XcmV1MultiAsset",who:"XcmV1MultiLocation"}}},OrmlXcmModuleEvent:{_enum:{Sent:{to:"XcmV1MultiLocation",message:"XcmV2Xcm"}}},OrmlAuthorityModuleEvent:{_enum:{Dispatched:{result:"Result"},Scheduled:{origin:"AcalaRuntimeOriginCaller",index:"u32"},FastTracked:{origin:"AcalaRuntimeOriginCaller",index:"u32",when:"u32"},Delayed:{origin:"AcalaRuntimeOriginCaller",index:"u32",when:"u32"},Cancelled:{origin:"AcalaRuntimeOriginCaller",index:"u32"},AuthorizedCall:{_alias:{hash_:"hash"},hash_:"H256",caller:"Option"},RemovedAuthorizedCall:{_alias:{hash_:"hash"},hash_:"H256"},TriggeredCallBy:{_alias:{hash_:"hash"},hash_:"H256",caller:"AccountId32"}}},AcalaRuntimeOriginCaller:{_enum:{system:"FrameSupportDispatchRawOrigin",__Unused1:"Null",__Unused2:"Null",__Unused3:"Null",__Unused4:"Null",__Unused5:"Null",__Unused6:"Null",__Unused7:"Null",Void:"SpCoreVoid",__Unused9:"Null",__Unused10:"Null",__Unused11:"Null",__Unused12:"Null",__Unused13:"Null",__Unused14:"Null",__Unused15:"Null",__Unused16:"Null",__Unused17:"Null",__Unused18:"Null",__Unused19:"Null",__Unused20:"Null",__Unused21:"Null",__Unused22:"Null",__Unused23:"Null",__Unused24:"Null",__Unused25:"Null",__Unused26:"Null",__Unused27:"Null",__Unused28:"Null",__Unused29:"Null",__Unused30:"Null",__Unused31:"Null",__Unused32:"Null",__Unused33:"Null",__Unused34:"Null",__Unused35:"Null",__Unused36:"Null",__Unused37:"Null",__Unused38:"Null",__Unused39:"Null",__Unused40:"Null",__Unused41:"Null",__Unused42:"Null",__Unused43:"Null",__Unused44:"Null",__Unused45:"Null",__Unused46:"Null",__Unused47:"Null",__Unused48:"Null",__Unused49:"Null",__Unused50:"Null",PolkadotXcm:"PalletXcmOrigin",CumulusXcm:"CumulusPalletXcmOrigin",__Unused53:"Null",__Unused54:"Null",__Unused55:"Null",__Unused56:"Null",__Unused57:"Null",__Unused58:"Null",__Unused59:"Null",Authority:"OrmlAuthorityDelayedOrigin",GeneralCouncil:"PalletCollectiveRawOrigin",__Unused62:"Null",FinancialCouncil:"PalletCollectiveRawOrigin",__Unused64:"Null",HomaCouncil:"PalletCollectiveRawOrigin",__Unused66:"Null",TechnicalCommittee:"PalletCollectiveRawOrigin"}},FrameSupportDispatchRawOrigin:{_enum:{Root:"Null",Signed:"AccountId32",None:"Null"}},PalletXcmOrigin:{_enum:{Xcm:"XcmV1MultiLocation",Response:"XcmV1MultiLocation"}},CumulusPalletXcmOrigin:{_enum:{Relay:"Null",SiblingParachain:"u32"}},OrmlAuthorityDelayedOrigin:{delay:"u32",origin:"AcalaRuntimeOriginCaller"},PalletCollectiveRawOrigin:{_enum:{Members:"(u32,u32)",Member:"AccountId32",_Phantom:"Null"}},SpCoreVoid:"Null",PalletCollectiveEvent:{_enum:{Proposed:{account:"AccountId32",proposalIndex:"u32",proposalHash:"H256",threshold:"u32"},Voted:{account:"AccountId32",proposalHash:"H256",voted:"bool",yes:"u32",no:"u32"},Approved:{proposalHash:"H256"},Disapproved:{proposalHash:"H256"},Executed:{proposalHash:"H256",result:"Result"},MemberExecuted:{proposalHash:"H256",result:"Result"},Closed:{proposalHash:"H256",yes:"u32",no:"u32"}}},PalletMembershipEvent:{_enum:["MemberAdded","MemberRemoved","MembersSwapped","MembersReset","KeyChanged","Dummy"]},PalletDemocracyEvent:{_enum:{Proposed:{proposalIndex:"u32",deposit:"u128"},Tabled:{proposalIndex:"u32",deposit:"u128",depositors:"Vec"},ExternalTabled:"Null",Started:{refIndex:"u32",threshold:"PalletDemocracyVoteThreshold"},Passed:{refIndex:"u32"},NotPassed:{refIndex:"u32"},Cancelled:{refIndex:"u32"},Executed:{refIndex:"u32",result:"Result"},Delegated:{who:"AccountId32",target:"AccountId32"},Undelegated:{account:"AccountId32"},Vetoed:{who:"AccountId32",proposalHash:"H256",until:"u32"},PreimageNoted:{proposalHash:"H256",who:"AccountId32",deposit:"u128"},PreimageUsed:{proposalHash:"H256",provider:"AccountId32",deposit:"u128"},PreimageInvalid:{proposalHash:"H256",refIndex:"u32"},PreimageMissing:{proposalHash:"H256",refIndex:"u32"},PreimageReaped:{proposalHash:"H256",provider:"AccountId32",deposit:"u128",reaper:"AccountId32"},Blacklisted:{proposalHash:"H256"},Voted:{voter:"AccountId32",refIndex:"u32",vote:"PalletDemocracyVoteAccountVote"},Seconded:{seconder:"AccountId32",propIndex:"u32"},ProposalCanceled:{propIndex:"u32"}}},PalletDemocracyVoteThreshold:{_enum:["SuperMajorityApprove","SuperMajorityAgainst","SimpleMajority"]},PalletDemocracyVoteAccountVote:{_enum:{Standard:{vote:"Vote",balance:"u128"},Split:{aye:"u128",nay:"u128"}}},OrmlOracleModuleEvent:{_enum:{NewFeedData:{sender:"AccountId32",values:"Vec<(AcalaPrimitivesCurrencyCurrencyId,u128)>"}}},OrmlAuctionModuleEvent:{_enum:{Bid:{auctionId:"u32",bidder:"AccountId32",amount:"u128"}}},ModulePricesModuleEvent:{_enum:{LockPrice:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",lockedPrice:"u128"},UnlockPrice:{currencyId:"AcalaPrimitivesCurrencyCurrencyId"}}},ModuleDexModuleEvent:{_enum:{AddProvision:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",contribution0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",contribution1:"u128"},AddLiquidity:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",pool0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",pool1:"u128",shareIncrement:"u128"},RemoveLiquidity:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",pool0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",pool1:"u128",shareDecrement:"u128"},Swap:{trader:"AccountId32",path:"Vec",liquidityChanges:"Vec"},EnableTradingPair:{tradingPair:"AcalaPrimitivesTradingPair"},ListProvisioning:{tradingPair:"AcalaPrimitivesTradingPair"},DisableTradingPair:{tradingPair:"AcalaPrimitivesTradingPair"},ProvisioningToEnabled:{tradingPair:"AcalaPrimitivesTradingPair",pool0:"u128",pool1:"u128",shareAmount:"u128"},RefundProvision:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",contribution0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",contribution1:"u128"},ProvisioningAborted:{tradingPair:"AcalaPrimitivesTradingPair",accumulatedProvision0:"u128",accumulatedProvision1:"u128"}}},AcalaPrimitivesTradingPair:"(AcalaPrimitivesCurrencyCurrencyId,AcalaPrimitivesCurrencyCurrencyId)",ModuleAuctionManagerModuleEvent:{_enum:{NewCollateralAuction:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",targetBidPrice:"u128"},CancelAuction:{auctionId:"u32"},CollateralAuctionDealt:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",winner:"AccountId32",paymentAmount:"u128"},DEXTakeCollateralAuction:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",supplyCollateralAmount:"u128",targetStableAmount:"u128"},CollateralAuctionAborted:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",targetStableAmount:"u128",refundRecipient:"AccountId32"}}},ModuleLoansModuleEvent:{_enum:{PositionUpdated:{owner:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAdjustment:"i128",debitAdjustment:"i128"},ConfiscateCollateralAndDebit:{owner:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",confiscatedCollateralAmount:"u128",deductDebitAmount:"u128"},TransferLoan:{from:"AccountId32",to:"AccountId32",currencyId:"AcalaPrimitivesCurrencyCurrencyId"}}},ModuleHonzonModuleEvent:{_enum:{Authorization:{authorizer:"AccountId32",authorizee:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId"},UnAuthorization:{authorizer:"AccountId32",authorizee:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId"},UnAuthorizationAll:{authorizer:"AccountId32"},TransferDebit:{fromCurrency:"AcalaPrimitivesCurrencyCurrencyId",toCurrency:"AcalaPrimitivesCurrencyCurrencyId",amount:"u128"}}},ModuleCdpTreasuryModuleEvent:{_enum:{ExpectedCollateralAuctionSizeUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newSize:"u128"}}},ModuleCdpEngineModuleEvent:{_enum:{LiquidateUnsafeCDP:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",owner:"AccountId32",collateralAmount:"u128",badDebtValue:"u128",targetAmount:"u128"},SettleCDPInDebit:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",owner:"AccountId32"},CloseCDPInDebitByDEX:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",owner:"AccountId32",soldCollateralAmount:"u128",refundCollateralAmount:"u128",debitValue:"u128"},InterestRatePerSecUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newInterestRatePerSec:"Option"},LiquidationRatioUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newLiquidationRatio:"Option"},LiquidationPenaltyUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newLiquidationPenalty:"Option"},RequiredCollateralRatioUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newRequiredCollateralRatio:"Option"},MaximumTotalDebitValueUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newTotalDebitValue:"u128"},LiquidationContractRegistered:{address:"H160"},LiquidationContractDeregistered:{address:"H160"}}},ModuleEmergencyShutdownModuleEvent:{_enum:{Shutdown:{blockNumber:"u32"},OpenRefund:{blockNumber:"u32"},Refund:{who:"AccountId32",stableCoinAmount:"u128",refundList:"Vec<(AcalaPrimitivesCurrencyCurrencyId,u128)>"}}},ModuleHomaModuleEvent:{_enum:{Minted:{minter:"AccountId32",stakingCurrencyAmount:"u128",liquidAmountReceived:"u128",liquidAmountAddedToVoid:"u128"},RequestedRedeem:{redeemer:"AccountId32",liquidAmount:"u128",allowFastMatch:"bool"},RedeemRequestCancelled:{redeemer:"AccountId32",cancelledLiquidAmount:"u128"},RedeemedByFastMatch:{redeemer:"AccountId32",matchedLiquidAmount:"u128",feeInLiquid:"u128",redeemedStakingAmount:"u128"},RedeemedByUnbond:{redeemer:"AccountId32",eraIndexWhenUnbond:"u32",liquidAmount:"u128",unbondingStakingAmount:"u128"},WithdrawRedemption:{redeemer:"AccountId32",redemptionAmount:"u128"},CurrentEraBumped:{newEraIndex:"u32"},CurrentEraReset:{newEraIndex:"u32"},LedgerBondedReset:{subAccountIndex:"u16",newBondedAmount:"u128"},LedgerUnlockingReset:{subAccountIndex:"u16",newUnlocking:"Vec"},SoftBondedCapPerSubAccountUpdated:{capAmount:"u128"},EstimatedRewardRatePerEraUpdated:{rewardRate:"u128"},CommissionRateUpdated:{commissionRate:"u128"},FastMatchFeeRateUpdated:{fastMatchFeeRate:"u128"},LastEraBumpedBlockUpdated:{lastEraBumpedBlock:"u32"},BumpEraFrequencyUpdated:{frequency:"u32"}}},ModuleHomaModuleUnlockChunk:{value:"Compact",era:"Compact"},ModuleXcmInterfaceModuleEvent:{_enum:{XcmDestWeightUpdated:{xcmOperation:"ModuleXcmInterfaceModuleXcmInterfaceOperation",newXcmDestWeight:"u64"},XcmFeeUpdated:{xcmOperation:"ModuleXcmInterfaceModuleXcmInterfaceOperation",newXcmDestWeight:"u128"}}},ModuleXcmInterfaceModuleXcmInterfaceOperation:{_enum:{XtokensTransfer:"Null",HomaWithdrawUnbonded:"Null",HomaBondExtra:"Null",HomaUnbond:"Null",ParachainFee:"XcmV1MultiLocation"}},ModuleIncentivesModuleEvent:{_enum:{DepositDexShare:{who:"AccountId32",dexShareType:"AcalaPrimitivesCurrencyCurrencyId",deposit:"u128"},WithdrawDexShare:{who:"AccountId32",dexShareType:"AcalaPrimitivesCurrencyCurrencyId",withdraw:"u128"},ClaimRewards:{who:"AccountId32",pool:"ModuleSupportIncentivesPoolId",rewardCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",actualAmount:"u128",deductionAmount:"u128"},IncentiveRewardAmountUpdated:{pool:"ModuleSupportIncentivesPoolId",rewardCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",rewardAmountPerPeriod:"u128"},ClaimRewardDeductionRateUpdated:{pool:"ModuleSupportIncentivesPoolId",deductionRate:"u128"}}},ModuleSupportIncentivesPoolId:{_enum:{Loans:"AcalaPrimitivesCurrencyCurrencyId",Dex:"AcalaPrimitivesCurrencyCurrencyId"}},ModuleNftModuleEvent:{_enum:{CreatedClass:{owner:"AccountId32",classId:"u32"},MintedToken:{from:"AccountId32",to:"AccountId32",classId:"u32",quantity:"u32"},TransferredToken:{from:"AccountId32",to:"AccountId32",classId:"u32",tokenId:"u64"},BurnedToken:{owner:"AccountId32",classId:"u32",tokenId:"u64"},BurnedTokenWithRemark:{owner:"AccountId32",classId:"u32",tokenId:"u64",remarkHash:"H256"},DestroyedClass:{owner:"AccountId32",classId:"u32"}}},ModuleAssetRegistryModuleEvent:{_enum:{ForeignAssetRegistered:{assetId:"u16",assetAddress:"XcmV1MultiLocation",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},ForeignAssetUpdated:{assetId:"u16",assetAddress:"XcmV1MultiLocation",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},AssetRegistered:{assetId:"AcalaPrimitivesCurrencyAssetIds",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},AssetUpdated:{assetId:"AcalaPrimitivesCurrencyAssetIds",metadata:"AcalaPrimitivesCurrencyAssetMetadata"}}},AcalaPrimitivesCurrencyAssetMetadata:{name:"Bytes",symbol:"Bytes",decimals:"u8",minimalBalance:"u128"},AcalaPrimitivesCurrencyAssetIds:{_enum:{Erc20:"H160",StableAssetId:"u32",ForeignAssetId:"u16",NativeAssetId:"AcalaPrimitivesCurrencyCurrencyId"}},ModuleEvmModuleEvent:{_enum:{Created:{from:"H160",contract:"H160",logs:"Vec",usedGas:"u64",usedStorage:"i32"},CreatedFailed:{from:"H160",contract:"H160",exitReason:"EvmCoreErrorExitReason",logs:"Vec",usedGas:"u64",usedStorage:"i32"},Executed:{from:"H160",contract:"H160",logs:"Vec",usedGas:"u64",usedStorage:"i32"},ExecutedFailed:{from:"H160",contract:"H160",exitReason:"EvmCoreErrorExitReason",output:"Bytes",logs:"Vec",usedGas:"u64",usedStorage:"i32"},TransferredMaintainer:{contract:"H160",newMaintainer:"H160"},ContractDevelopmentEnabled:{who:"AccountId32"},ContractDevelopmentDisabled:{who:"AccountId32"},ContractPublished:{contract:"H160"},ContractSetCode:{contract:"H160"},ContractSelfdestructed:{contract:"H160"}}},EthereumLog:{address:"H160",topics:"Vec",data:"Bytes"},EvmCoreErrorExitReason:{_enum:{Succeed:"EvmCoreErrorExitSucceed",Error:"EvmCoreErrorExitError",Revert:"EvmCoreErrorExitRevert",Fatal:"EvmCoreErrorExitFatal"}},EvmCoreErrorExitSucceed:{_enum:["Stopped","Returned","Suicided"]},EvmCoreErrorExitError:{_enum:{StackUnderflow:"Null",StackOverflow:"Null",InvalidJump:"Null",InvalidRange:"Null",DesignatedInvalid:"Null",CallTooDeep:"Null",CreateCollision:"Null",CreateContractLimit:"Null",OutOfOffset:"Null",OutOfGas:"Null",OutOfFund:"Null",PCUnderflow:"Null",CreateEmpty:"Null",Other:"Text",InvalidCode:"Null"}},EvmCoreErrorExitRevert:{_enum:["Reverted"]},EvmCoreErrorExitFatal:{_enum:{NotSupported:"Null",UnhandledInterrupt:"Null",CallErrorAsFatal:"EvmCoreErrorExitError",Other:"Text"}},ModuleEvmAccountsModuleEvent:{_enum:{ClaimAccount:{accountId:"AccountId32",evmAddress:"H160"}}},NutsfinanceStableAssetEvent:{_enum:{CreatePool:{poolId:"u32",a:"u128",swapId:"AccountId32",palletId:"AccountId32"},Minted:{minter:"AccountId32",poolId:"u32",a:"u128",inputAmounts:"Vec",minOutputAmount:"u128",balances:"Vec",totalSupply:"u128",feeAmount:"u128",outputAmount:"u128"},TokenSwapped:{swapper:"AccountId32",poolId:"u32",a:"u128",inputAsset:"AcalaPrimitivesCurrencyCurrencyId",outputAsset:"AcalaPrimitivesCurrencyCurrencyId",inputAmount:"u128",minOutputAmount:"u128",balances:"Vec",totalSupply:"u128",outputAmount:"u128"},RedeemedProportion:{redeemer:"AccountId32",poolId:"u32",a:"u128",inputAmount:"u128",minOutputAmounts:"Vec",balances:"Vec",totalSupply:"u128",feeAmount:"u128",outputAmounts:"Vec"},RedeemedSingle:{redeemer:"AccountId32",poolId:"u32",a:"u128",inputAmount:"u128",outputAsset:"AcalaPrimitivesCurrencyCurrencyId",minOutputAmount:"u128",balances:"Vec",totalSupply:"u128",feeAmount:"u128",outputAmount:"u128"},RedeemedMulti:{redeemer:"AccountId32",poolId:"u32",a:"u128",outputAmounts:"Vec",maxInputAmount:"u128",balances:"Vec",totalSupply:"u128",feeAmount:"u128",inputAmount:"u128"},BalanceUpdated:{poolId:"u32",oldBalances:"Vec",newBalances:"Vec"},YieldCollected:{poolId:"u32",a:"u128",oldTotalSupply:"u128",newTotalSupply:"u128",who:"AccountId32",amount:"u128"},FeeCollected:{poolId:"u32",a:"u128",oldBalances:"Vec",newBalances:"Vec",oldTotalSupply:"u128",newTotalSupply:"u128",who:"AccountId32",amount:"u128"},AModified:{poolId:"u32",value:"u128",time:"u32"},FeeModified:{poolId:"u32",mintFee:"u128",swapFee:"u128",redeemFee:"u128"},RecipientModified:{poolId:"u32",feeRecipient:"AccountId32",yieldRecipient:"AccountId32"}}},CumulusPalletParachainSystemEvent:{_enum:{ValidationFunctionStored:"Null",ValidationFunctionApplied:{relayChainBlockNum:"u32"},ValidationFunctionDiscarded:"Null",UpgradeAuthorized:{codeHash:"H256"},DownwardMessagesReceived:{count:"u32"},DownwardMessagesProcessed:{weightUsed:"u64",dmqHead:"H256"}}},PalletSudoEvent:{_enum:{Sudid:{sudoResult:"Result"},KeyChanged:{oldSudoer:"Option"},SudoAsDone:{sudoResult:"Result"}}},FrameSystemPhase:{_enum:{ApplyExtrinsic:"u32",Finalization:"Null",Initialization:"Null"}},FrameSystemLastRuntimeUpgradeInfo:{specVersion:"Compact",specName:"Text"},FrameSystemCall:{_enum:{fill_block:{ratio:"Perbill"},remark:{remark:"Bytes"},set_heap_pages:{pages:"u64"},set_code:{code:"Bytes"},set_code_without_checks:{code:"Bytes"},set_storage:{items:"Vec<(Bytes,Bytes)>"},kill_storage:{_alias:{keys_:"keys"},keys_:"Vec"},kill_prefix:{prefix:"Bytes",subkeys:"u32"},remark_with_event:{remark:"Bytes"}}},FrameSystemLimitsBlockWeights:{baseBlock:"u64",maxBlock:"u64",perClass:"FrameSupportWeightsPerDispatchClassWeightsPerClass"},FrameSupportWeightsPerDispatchClassWeightsPerClass:{normal:"FrameSystemLimitsWeightsPerClass",operational:"FrameSystemLimitsWeightsPerClass",mandatory:"FrameSystemLimitsWeightsPerClass"},FrameSystemLimitsWeightsPerClass:{baseExtrinsic:"u64",maxExtrinsic:"Option",maxTotal:"Option",reserved:"Option"},FrameSystemLimitsBlockLength:{max:"FrameSupportWeightsPerDispatchClassU32"},FrameSupportWeightsPerDispatchClassU32:{normal:"u32",operational:"u32",mandatory:"u32"},FrameSupportWeightsRuntimeDbWeight:{read:"u64",write:"u64"},SpVersionRuntimeVersion:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec<([u8;8],u32)>",transactionVersion:"u32",stateVersion:"u8"},FrameSystemError:{_enum:["InvalidSpecName","SpecVersionNeedsToIncrease","FailedToExtractRuntimeVersion","NonDefaultComposite","NonZeroRefCount","CallFiltered"]},PalletTimestampCall:{_enum:{set:{now:"Compact"}}},PalletSchedulerScheduledV3:{maybeId:"Option",priority:"u8",call:"FrameSupportScheduleMaybeHashed",maybePeriodic:"Option<(u32,u32)>",origin:"AcalaRuntimeOriginCaller"},FrameSupportScheduleMaybeHashed:{_enum:{Value:"Call",Hash:"H256"}},PalletSchedulerCall:{_enum:{schedule:{when:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"},cancel:{when:"u32",index:"u32"},schedule_named:{id:"Bytes",when:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"},cancel_named:{id:"Bytes"},schedule_after:{after:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"},schedule_named_after:{id:"Bytes",after:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"}}},PalletUtilityCall:{_enum:{batch:{calls:"Vec"},as_derivative:{index:"u16",call:"Call"},batch_all:{calls:"Vec"},dispatch_as:{asOrigin:"AcalaRuntimeOriginCaller",call:"Call"},force_batch:{calls:"Vec"}}},PalletMultisigCall:{_enum:{as_multi_threshold_1:{otherSignatories:"Vec",call:"Call"},as_multi:{threshold:"u16",otherSignatories:"Vec",maybeTimepoint:"Option",call:"WrapperKeepOpaque",storeCall:"bool",maxWeight:"u64"},approve_as_multi:{threshold:"u16",otherSignatories:"Vec",maybeTimepoint:"Option",callHash:"[u8;32]",maxWeight:"u64"},cancel_as_multi:{threshold:"u16",otherSignatories:"Vec",timepoint:"PalletMultisigTimepoint",callHash:"[u8;32]"}}},PalletProxyCall:{_enum:{proxy:{real:"AccountId32",forceProxyType:"Option",call:"Call"},add_proxy:{delegate:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"},remove_proxy:{delegate:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"},remove_proxies:"Null",anonymous:{proxyType:"RuntimeCommonProxyType",delay:"u32",index:"u16"},kill_anonymous:{spawner:"AccountId32",proxyType:"RuntimeCommonProxyType",index:"u16",height:"Compact",extIndex:"Compact"},announce:{real:"AccountId32",callHash:"H256"},remove_announcement:{real:"AccountId32",callHash:"H256"},reject_announcement:{delegate:"AccountId32",callHash:"H256"},proxy_announced:{delegate:"AccountId32",real:"AccountId32",forceProxyType:"Option",call:"Call"}}},ModuleTransactionPauseModuleCall:{_enum:{pause_transaction:{palletName:"Bytes",functionName:"Bytes"},unpause_transaction:{palletName:"Bytes",functionName:"Bytes"},pause_evm_precompile:{address:"H160"},unpause_evm_precompile:{address:"H160"}}},ModuleIdleSchedulerModuleCall:{_enum:{schedule_task:{task:"AcalaRuntimeScheduledTasks"}}},PalletPreimageCall:{_enum:{note_preimage:{bytes:"Bytes"},unnote_preimage:{_alias:{hash_:"hash"},hash_:"H256"},request_preimage:{_alias:{hash_:"hash"},hash_:"H256"},unrequest_preimage:{_alias:{hash_:"hash"},hash_:"H256"}}},PalletBalancesCall:{_enum:{transfer:{dest:"MultiAddress",value:"Compact"},set_balance:{who:"MultiAddress",newFree:"Compact",newReserved:"Compact"},force_transfer:{source:"MultiAddress",dest:"MultiAddress",value:"Compact"},transfer_keep_alive:{dest:"MultiAddress",value:"Compact"},transfer_all:{dest:"MultiAddress",keepAlive:"bool"},force_unreserve:{who:"MultiAddress",amount:"u128"}}},ModuleCurrenciesModuleCall:{_enum:{transfer:{dest:"MultiAddress",currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"Compact"},transfer_native_currency:{dest:"MultiAddress",amount:"Compact"},update_balance:{who:"MultiAddress",currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"i128"},sweep_dust:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",accounts:"Vec"},force_set_lock:{who:"MultiAddress",currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"Compact",lockId:"[u8;8]"},force_remove_lock:{who:"MultiAddress",currencyId:"AcalaPrimitivesCurrencyCurrencyId",lockId:"[u8;8]"}}},OrmlVestingModuleCall:{_enum:{claim:"Null",vested_transfer:{dest:"MultiAddress",schedule:"OrmlVestingVestingSchedule"},update_vesting_schedules:{who:"MultiAddress",vestingSchedules:"Vec"},claim_for:{dest:"MultiAddress"}}},ModuleTransactionPaymentModuleCall:{_enum:{set_alternative_fee_swap_path:{feeSwapPath:"Option>"},enable_charge_fee_pool:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",poolSize:"u128",swapThreshold:"u128"},disable_charge_fee_pool:{currencyId:"AcalaPrimitivesCurrencyCurrencyId"},with_fee_path:{feeSwapPath:"Vec",call:"Call"},with_fee_currency:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",call:"Call"},with_fee_paid_by:{call:"Call",payerAddr:"AccountId32",payerSig:"SpRuntimeMultiSignature"},with_fee_aggregated_path:{feeAggregatedPath:"Vec",call:"Call"}}},SpRuntimeMultiSignature:{_enum:{Ed25519:"SpCoreEd25519Signature",Sr25519:"SpCoreSr25519Signature",Ecdsa:"SpCoreEcdsaSignature"}},SpCoreEd25519Signature:"[u8;64]",SpCoreSr25519Signature:"[u8;64]",SpCoreEcdsaSignature:"[u8;65]",ModuleSupportDexAggregatedSwapPath:{_enum:{Dex:"Vec",Taiga:"(u32,u32,u32)"}},PalletTreasuryCall:{_enum:{propose_spend:{value:"Compact",beneficiary:"MultiAddress"},reject_proposal:{proposalId:"Compact"},approve_proposal:{proposalId:"Compact"},spend:{amount:"Compact",beneficiary:"MultiAddress"},remove_approval:{proposalId:"Compact"}}},PalletBountiesCall:{_enum:{propose_bounty:{value:"Compact",description:"Bytes"},approve_bounty:{bountyId:"Compact"},propose_curator:{bountyId:"Compact",curator:"MultiAddress",fee:"Compact"},unassign_curator:{bountyId:"Compact"},accept_curator:{bountyId:"Compact"},award_bounty:{bountyId:"Compact",beneficiary:"MultiAddress"},claim_bounty:{bountyId:"Compact"},close_bounty:{bountyId:"Compact"},extend_bounty_expiry:{bountyId:"Compact",remark:"Bytes"}}},PalletTipsCall:{_enum:{report_awesome:{reason:"Bytes",who:"AccountId32"},retract_tip:{_alias:{hash_:"hash"},hash_:"H256"},tip_new:{reason:"Bytes",who:"AccountId32",tipValue:"Compact"},tip:{_alias:{hash_:"hash"},hash_:"H256",tipValue:"Compact"},close_tip:{_alias:{hash_:"hash"},hash_:"H256"},slash_tip:{_alias:{hash_:"hash"},hash_:"H256"}}},PalletAuthorshipCall:{_enum:{set_uncles:{newUncles:"Vec"}}},SpRuntimeHeader:{parentHash:"H256",number:"Compact",stateRoot:"H256",extrinsicsRoot:"H256",digest:"SpRuntimeDigest"},SpRuntimeBlakeTwo256:"Null",ModuleCollatorSelectionCall:{_enum:{set_invulnerables:{_alias:{new_:"new"},new_:"Vec"},set_desired_candidates:{max:"Compact"},set_candidacy_bond:{bond:"Compact"},register_as_candidate:"Null",register_candidate:{newCandidate:"AccountId32"},leave_intent:"Null",withdraw_bond:"Null"}},PalletSessionCall:{_enum:{set_keys:{_alias:{keys_:"keys"},keys_:"AcalaRuntimeSessionKeys",proof:"Bytes"},purge_keys:"Null"}},AcalaRuntimeSessionKeys:{aura:"SpConsensusAuraSr25519AppSr25519Public"},SpConsensusAuraSr25519AppSr25519Public:"SpCoreSr25519Public",SpCoreSr25519Public:"[u8;32]",ModuleSessionManagerModuleCall:{_enum:{schedule_session_duration:{startSession:"Compact",duration:"Compact"}}},CumulusPalletXcmpQueueCall:{_enum:{service_overweight:{index:"u64",weightLimit:"u64"},suspend_xcm_execution:"Null",resume_xcm_execution:"Null",update_suspend_threshold:{_alias:{new_:"new"},new_:"u32"},update_drop_threshold:{_alias:{new_:"new"},new_:"u32"},update_resume_threshold:{_alias:{new_:"new"},new_:"u32"},update_threshold_weight:{_alias:{new_:"new"},new_:"u64"},update_weight_restrict_decay:{_alias:{new_:"new"},new_:"u64"},update_xcmp_max_individual_weight:{_alias:{new_:"new"},new_:"u64"}}},PalletXcmCall:{_enum:{send:{dest:"XcmVersionedMultiLocation",message:"XcmVersionedXcm"},teleport_assets:{dest:"XcmVersionedMultiLocation",beneficiary:"XcmVersionedMultiLocation",assets:"XcmVersionedMultiAssets",feeAssetItem:"u32"},reserve_transfer_assets:{dest:"XcmVersionedMultiLocation",beneficiary:"XcmVersionedMultiLocation",assets:"XcmVersionedMultiAssets",feeAssetItem:"u32"},execute:{message:"XcmVersionedXcm",maxWeight:"u64"},force_xcm_version:{location:"XcmV1MultiLocation",xcmVersion:"u32"},force_default_xcm_version:{maybeXcmVersion:"Option"},force_subscribe_version_notify:{location:"XcmVersionedMultiLocation"},force_unsubscribe_version_notify:{location:"XcmVersionedMultiLocation"},limited_reserve_transfer_assets:{dest:"XcmVersionedMultiLocation",beneficiary:"XcmVersionedMultiLocation",assets:"XcmVersionedMultiAssets",feeAssetItem:"u32",weightLimit:"XcmV2WeightLimit"},limited_teleport_assets:{dest:"XcmVersionedMultiLocation",beneficiary:"XcmVersionedMultiLocation",assets:"XcmVersionedMultiAssets",feeAssetItem:"u32",weightLimit:"XcmV2WeightLimit"}}},XcmVersionedXcm:{_enum:{V0:"XcmV0Xcm",V1:"XcmV1Xcm",V2:"XcmV2Xcm"}},XcmV0Xcm:{_enum:{WithdrawAsset:{assets:"Vec",effects:"Vec"},ReserveAssetDeposit:{assets:"Vec",effects:"Vec"},TeleportAsset:{assets:"Vec",effects:"Vec"},QueryResponse:{queryId:"Compact",response:"XcmV0Response"},TransferAsset:{assets:"Vec",dest:"XcmV0MultiLocation"},TransferReserveAsset:{assets:"Vec",dest:"XcmV0MultiLocation",effects:"Vec"},Transact:{originType:"XcmV0OriginKind",requireWeightAtMost:"u64",call:"XcmDoubleEncoded"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},RelayedFrom:{who:"XcmV0MultiLocation",message:"XcmV0Xcm"}}},XcmV0Order:{_enum:{Null:"Null",DepositAsset:{assets:"Vec",dest:"XcmV0MultiLocation"},DepositReserveAsset:{assets:"Vec",dest:"XcmV0MultiLocation",effects:"Vec"},ExchangeAsset:{give:"Vec",receive:"Vec"},InitiateReserveWithdraw:{assets:"Vec",reserve:"XcmV0MultiLocation",effects:"Vec"},InitiateTeleport:{assets:"Vec",dest:"XcmV0MultiLocation",effects:"Vec"},QueryHolding:{queryId:"Compact",dest:"XcmV0MultiLocation",assets:"Vec"},BuyExecution:{fees:"XcmV0MultiAsset",weight:"u64",debt:"u64",haltOnError:"bool",xcm:"Vec"}}},XcmV0Response:{_enum:{Assets:"Vec"}},XcmV1Xcm:{_enum:{WithdrawAsset:{assets:"XcmV1MultiassetMultiAssets",effects:"Vec"},ReserveAssetDeposited:{assets:"XcmV1MultiassetMultiAssets",effects:"Vec"},ReceiveTeleportedAsset:{assets:"XcmV1MultiassetMultiAssets",effects:"Vec"},QueryResponse:{queryId:"Compact",response:"XcmV1Response"},TransferAsset:{assets:"XcmV1MultiassetMultiAssets",beneficiary:"XcmV1MultiLocation"},TransferReserveAsset:{assets:"XcmV1MultiassetMultiAssets",dest:"XcmV1MultiLocation",effects:"Vec"},Transact:{originType:"XcmV0OriginKind",requireWeightAtMost:"u64",call:"XcmDoubleEncoded"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},RelayedFrom:{who:"XcmV1MultilocationJunctions",message:"XcmV1Xcm"},SubscribeVersion:{queryId:"Compact",maxResponseWeight:"Compact"},UnsubscribeVersion:"Null"}},XcmV1Order:{_enum:{Noop:"Null",DepositAsset:{assets:"XcmV1MultiassetMultiAssetFilter",maxAssets:"u32",beneficiary:"XcmV1MultiLocation"},DepositReserveAsset:{assets:"XcmV1MultiassetMultiAssetFilter",maxAssets:"u32",dest:"XcmV1MultiLocation",effects:"Vec"},ExchangeAsset:{give:"XcmV1MultiassetMultiAssetFilter",receive:"XcmV1MultiassetMultiAssets"},InitiateReserveWithdraw:{assets:"XcmV1MultiassetMultiAssetFilter",reserve:"XcmV1MultiLocation",effects:"Vec"},InitiateTeleport:{assets:"XcmV1MultiassetMultiAssetFilter",dest:"XcmV1MultiLocation",effects:"Vec"},QueryHolding:{queryId:"Compact",dest:"XcmV1MultiLocation",assets:"XcmV1MultiassetMultiAssetFilter"},BuyExecution:{fees:"XcmV1MultiAsset",weight:"u64",debt:"u64",haltOnError:"bool",instructions:"Vec"}}},XcmV1Response:{_enum:{Assets:"XcmV1MultiassetMultiAssets",Version:"u32"}},CumulusPalletDmpQueueCall:{_enum:{service_overweight:{index:"u64",weightLimit:"u64"}}},OrmlXtokensModuleCall:{_enum:{transfer:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"u128",dest:"XcmVersionedMultiLocation",destWeight:"u64"},transfer_multiasset:{asset:"XcmVersionedMultiAsset",dest:"XcmVersionedMultiLocation",destWeight:"u64"},transfer_with_fee:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"u128",fee:"u128",dest:"XcmVersionedMultiLocation",destWeight:"u64"},transfer_multiasset_with_fee:{asset:"XcmVersionedMultiAsset",fee:"XcmVersionedMultiAsset",dest:"XcmVersionedMultiLocation",destWeight:"u64"},transfer_multicurrencies:{currencies:"Vec<(AcalaPrimitivesCurrencyCurrencyId,u128)>",feeItem:"u32",dest:"XcmVersionedMultiLocation",destWeight:"u64"},transfer_multiassets:{assets:"XcmVersionedMultiAssets",feeItem:"u32",dest:"XcmVersionedMultiLocation",destWeight:"u64"}}},XcmVersionedMultiAsset:{_enum:{V0:"XcmV0MultiAsset",V1:"XcmV1MultiAsset"}},OrmlXcmModuleCall:{_enum:{send_as_sovereign:{dest:"XcmVersionedMultiLocation",message:"XcmVersionedXcm"}}},OrmlAuthorityModuleCall:{_enum:{dispatch_as:{asOrigin:"AcalaPrimitivesAuthoritysOriginId",call:"Call"},schedule_dispatch:{when:"FrameSupportScheduleDispatchTime",priority:"u8",withDelayedOrigin:"bool",call:"Call"},fast_track_scheduled_dispatch:{initialOrigin:"AcalaRuntimeOriginCaller",taskId:"u32",when:"FrameSupportScheduleDispatchTime"},delay_scheduled_dispatch:{initialOrigin:"AcalaRuntimeOriginCaller",taskId:"u32",additionalDelay:"u32"},cancel_scheduled_dispatch:{initialOrigin:"AcalaRuntimeOriginCaller",taskId:"u32"},authorize_call:{call:"Call",caller:"Option"},remove_authorized_call:{_alias:{hash_:"hash"},hash_:"H256"},trigger_call:{_alias:{hash_:"hash"},hash_:"H256",callWeightBound:"Compact"}}},AcalaPrimitivesAuthoritysOriginId:{_enum:["Root","Treasury","HonzonTreasury","HomaTreasury","TreasuryReserve"]},FrameSupportScheduleDispatchTime:{_enum:{At:"u32",After:"u32"}},PalletCollectiveCall:{_enum:{set_members:{newMembers:"Vec",prime:"Option",oldCount:"u32"},execute:{proposal:"Call",lengthBound:"Compact"},propose:{threshold:"Compact",proposal:"Call",lengthBound:"Compact"},vote:{proposal:"H256",index:"Compact",approve:"bool"},close:{proposalHash:"H256",index:"Compact",proposalWeightBound:"Compact",lengthBound:"Compact"},disapprove_proposal:{proposalHash:"H256"}}},PalletMembershipCall:{_enum:{add_member:{who:"AccountId32"},remove_member:{who:"AccountId32"},swap_member:{remove:"AccountId32",add:"AccountId32"},reset_members:{members:"Vec"},change_key:{_alias:{new_:"new"},new_:"AccountId32"},set_prime:{who:"AccountId32"},clear_prime:"Null"}},PalletDemocracyCall:{_enum:{propose:{proposalHash:"H256",value:"Compact"},second:{proposal:"Compact",secondsUpperBound:"Compact"},vote:{refIndex:"Compact",vote:"PalletDemocracyVoteAccountVote"},emergency_cancel:{refIndex:"u32"},external_propose:{proposalHash:"H256"},external_propose_majority:{proposalHash:"H256"},external_propose_default:{proposalHash:"H256"},fast_track:{proposalHash:"H256",votingPeriod:"u32",delay:"u32"},veto_external:{proposalHash:"H256"},cancel_referendum:{refIndex:"Compact"},cancel_queued:{which:"u32"},delegate:{to:"AccountId32",conviction:"PalletDemocracyConviction",balance:"u128"},undelegate:"Null",clear_public_proposals:"Null",note_preimage:{encodedProposal:"Bytes"},note_preimage_operational:{encodedProposal:"Bytes"},note_imminent_preimage:{encodedProposal:"Bytes"},note_imminent_preimage_operational:{encodedProposal:"Bytes"},reap_preimage:{proposalHash:"H256",proposalLenUpperBound:"Compact"},unlock:{target:"AccountId32"},remove_vote:{index:"u32"},remove_other_vote:{target:"AccountId32",index:"u32"},enact_proposal:{proposalHash:"H256",index:"u32"},blacklist:{proposalHash:"H256",maybeRefIndex:"Option"},cancel_proposal:{propIndex:"Compact"}}},PalletDemocracyConviction:{_enum:["None","Locked1x","Locked2x","Locked3x","Locked4x","Locked5x","Locked6x"]},OrmlOracleModuleCall:{_enum:{feed_values:{values:"Vec<(AcalaPrimitivesCurrencyCurrencyId,u128)>"}}},OrmlAuctionModuleCall:{_enum:{bid:{id:"u32",value:"Compact"}}},OrmlRewardsModuleCall:"Null",ModulePricesModuleCall:{_enum:{lock_price:{currencyId:"AcalaPrimitivesCurrencyCurrencyId"},unlock_price:{currencyId:"AcalaPrimitivesCurrencyCurrencyId"}}},ModuleDexModuleCall:{_enum:{swap_with_exact_supply:{path:"Vec",supplyAmount:"Compact",minTargetAmount:"Compact"},swap_with_exact_target:{path:"Vec",targetAmount:"Compact",maxSupplyAmount:"Compact"},add_liquidity:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId",maxAmountA:"Compact",maxAmountB:"Compact",minShareIncrement:"Compact",stakeIncrementShare:"bool"},add_provision:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId",amountA:"Compact",amountB:"Compact"},claim_dex_share:{owner:"AccountId32",currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId"},remove_liquidity:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId",removeShare:"Compact",minWithdrawnA:"Compact",minWithdrawnB:"Compact",byUnstake:"bool"},list_provisioning:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId",minContributionA:"Compact",minContributionB:"Compact",targetProvisionA:"Compact",targetProvisionB:"Compact",notBefore:"Compact"},update_provisioning_parameters:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId",minContributionA:"Compact",minContributionB:"Compact",targetProvisionA:"Compact",targetProvisionB:"Compact",notBefore:"Compact"},end_provisioning:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId"},enable_trading_pair:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId"},disable_trading_pair:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId"},refund_provision:{owner:"AccountId32",currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId"},abort_provisioning:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId"}}},ModuleDexOracleModuleCall:{_enum:{enable_average_price:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId",interval:"u64"},disable_average_price:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId"},update_average_price_interval:{currencyIdA:"AcalaPrimitivesCurrencyCurrencyId",currencyIdB:"AcalaPrimitivesCurrencyCurrencyId",newInterval:"u64"}}},ModuleAggregatedDexModuleCall:{_enum:{swap_with_exact_supply:{paths:"Vec",supplyAmount:"Compact",minTargetAmount:"Compact"},swap_with_exact_target:{paths:"Vec",targetAmount:"Compact",maxSupplyAmount:"Compact"},update_aggregated_swap_paths:{updates:"Vec<((AcalaPrimitivesCurrencyCurrencyId,AcalaPrimitivesCurrencyCurrencyId),Option>)>"}}},ModuleAuctionManagerModuleCall:{_enum:{cancel:{id:"u32"}}},ModuleLoansModuleCall:"Null",ModuleHonzonModuleCall:{_enum:{adjust_loan:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",collateralAdjustment:"i128",debitAdjustment:"i128"},close_loan_has_debit_by_dex:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",maxCollateralAmount:"Compact"},transfer_loan_from:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",from:"MultiAddress"},authorize:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",to:"MultiAddress"},unauthorize:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",to:"MultiAddress"},unauthorize_all:"Null",expand_position_collateral:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",increaseDebitValue:"u128",minIncreaseCollateral:"u128"},shrink_position_debit:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",decreaseCollateral:"u128",minDecreaseDebitValue:"u128"},adjust_loan_by_debit_value:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",collateralAdjustment:"i128",debitValueAdjustment:"i128"},transfer_debit:{fromCurrency:"AcalaPrimitivesCurrencyCurrencyId",toCurrency:"AcalaPrimitivesCurrencyCurrencyId",debitTransfer:"u128"}}},ModuleCdpTreasuryModuleCall:{_enum:{extract_surplus_to_treasury:{amount:"Compact"},auction_collateral:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"Compact",target:"Compact",splited:"bool"},exchange_collateral_to_stable:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",swapLimit:"ModuleSupportDexSwapLimit"},set_expected_collateral_auction_size:{_alias:{size_:"size"},currencyId:"AcalaPrimitivesCurrencyCurrencyId",size_:"Compact"}}},ModuleSupportDexSwapLimit:{_enum:{ExactSupply:"(u128,u128)",ExactTarget:"(u128,u128)"}},ModuleCdpEngineModuleCall:{_enum:{liquidate:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"MultiAddress"},settle:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"MultiAddress"},set_collateral_params:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",interestRatePerSec:"OrmlTraitsChangeOption",liquidationRatio:"OrmlTraitsChangeOption",liquidationPenalty:"OrmlTraitsChangeOption",requiredCollateralRatio:"OrmlTraitsChangeOption",maximumTotalDebitValue:"OrmlTraitsChangeU128"},register_liquidation_contract:{address:"H160"},deregister_liquidation_contract:{address:"H160"}}},OrmlTraitsChangeOption:{_enum:{NoChange:"Null",NewValue:"Option"}},OrmlTraitsChangeU128:{_enum:{NoChange:"Null",NewValue:"u128"}},ModuleEmergencyShutdownModuleCall:{_enum:{emergency_shutdown:"Null",open_collateral_refund:"Null",refund_collaterals:{amount:"Compact"}}},ModuleHomaModuleCall:{_enum:{mint:{amount:"Compact"},request_redeem:{amount:"Compact",allowFastMatch:"bool"},fast_match_redeems:{redeemerList:"Vec"},claim_redemption:{redeemer:"AccountId32"},update_homa_params:{softBondedCapPerSubAccount:"Option",estimatedRewardRatePerEra:"Option",commissionRate:"Option",fastMatchFeeRate:"Option"},update_bump_era_params:{lastEraBumpedBlock:"Option",frequency:"Option"},reset_ledgers:{updates:"Vec<(u16,Option,Option>)>"},reset_current_era:{eraIndex:"u32"},force_bump_current_era:{bumpAmount:"u32"},fast_match_redeems_completely:{redeemerList:"Vec"}}},ModuleXcmInterfaceModuleCall:{_enum:{update_xcm_dest_weight_and_fee:{updates:"Vec<(ModuleXcmInterfaceModuleXcmInterfaceOperation,Option,Option)>"}}},ModuleIncentivesModuleCall:{_enum:{deposit_dex_share:{lpCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"Compact"},withdraw_dex_share:{lpCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"Compact"},claim_rewards:{poolId:"ModuleSupportIncentivesPoolId"},update_incentive_rewards:{updates:"Vec<(ModuleSupportIncentivesPoolId,Vec<(AcalaPrimitivesCurrencyCurrencyId,u128)>)>"},update_claim_reward_deduction_rates:{updates:"Vec<(ModuleSupportIncentivesPoolId,u128)>"}}},ModuleNftModuleCall:{_enum:{create_class:{metadata:"Bytes",properties:"u8",attributes:"BTreeMap"},mint:{to:"MultiAddress",classId:"u32",metadata:"Bytes",attributes:"BTreeMap",quantity:"Compact"},transfer:{to:"MultiAddress",token:"(u32,u64)"},burn:{token:"(u32,u64)"},burn_with_remark:{token:"(u32,u64)",remark:"Bytes"},destroy_class:{classId:"u32",dest:"MultiAddress"},update_class_properties:{classId:"u32",properties:"u8"}}},AcalaPrimitivesNftClassProperty:{_enum:["__Unused0","Transferable","Burnable","__Unused3","Mintable","__Unused5","__Unused6","__Unused7","ClassPropertiesMutable"]},ModuleAssetRegistryModuleCall:{_enum:{register_foreign_asset:{location:"XcmVersionedMultiLocation",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},update_foreign_asset:{foreignAssetId:"u16",location:"XcmVersionedMultiLocation",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},register_stable_asset:{metadata:"AcalaPrimitivesCurrencyAssetMetadata"},update_stable_asset:{stableAssetId:"u32",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},register_erc20_asset:{contract:"H160",minimalBalance:"u128"},update_erc20_asset:{contract:"H160",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},register_native_asset:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},update_native_asset:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",metadata:"AcalaPrimitivesCurrencyAssetMetadata"}}},ModuleEvmModuleCall:{_enum:{eth_call:{action:"EthereumTransactionTransactionAction",input:"Bytes",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec",validUntil:"Compact"},call:{target:"H160",input:"Bytes",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec"},scheduled_call:{from:"H160",target:"H160",input:"Bytes",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec"},create:{input:"Bytes",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec"},create2:{input:"Bytes",salt:"H256",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec"},create_nft_contract:{input:"Bytes",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec"},create_predeploy_contract:{target:"H160",input:"Bytes",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec"},transfer_maintainer:{contract:"H160",newMaintainer:"H160"},publish_contract:{contract:"H160"},publish_free:{contract:"H160"},enable_contract_development:"Null",disable_contract_development:"Null",set_code:{contract:"H160",code:"Bytes"},selfdestruct:{contract:"H160"},strict_call:{target:"H160",input:"Bytes",value:"Compact",gasLimit:"Compact",storageLimit:"Compact",accessList:"Vec"}}},EthereumTransactionTransactionAction:{_enum:{Call:"H160",Create:"Null"}},EthereumTransactionAccessListItem:{address:"H160",storageKeys:"Vec"},ModuleEvmAccountsModuleCall:{_enum:{claim_account:{ethAddress:"H160",ethSignature:"[u8;65]"},claim_default_account:"Null"}},NutsfinanceStableAssetCall:{_enum:{create_pool:{poolAsset:"AcalaPrimitivesCurrencyCurrencyId",assets:"Vec",precisions:"Vec",mintFee:"u128",swapFee:"u128",redeemFee:"u128",initialA:"u128",feeRecipient:"AccountId32",yieldRecipient:"AccountId32",precision:"u128"},mint:{poolId:"u32",amounts:"Vec",minMintAmount:"u128"},swap:{poolId:"u32",i:"u32",j:"u32",dx:"u128",minDy:"u128",assetLength:"u32"},redeem_proportion:{poolId:"u32",amount:"u128",minRedeemAmounts:"Vec"},redeem_single:{poolId:"u32",amount:"u128",i:"u32",minRedeemAmount:"u128",assetLength:"u32"},redeem_multi:{poolId:"u32",amounts:"Vec",maxRedeemAmount:"u128"},modify_a:{poolId:"u32",a:"u128",futureABlock:"u32"},modify_fees:{poolId:"u32",mintFee:"Option",swapFee:"Option",redeemFee:"Option"},modify_recipients:{poolId:"u32",feeRecipient:"Option",yieldRecipient:"Option"}}},CumulusPalletParachainSystemCall:{_enum:{set_validation_data:{data:"CumulusPrimitivesParachainInherentParachainInherentData"},sudo_send_upward_message:{message:"Bytes"},authorize_upgrade:{codeHash:"H256"},enact_authorized_upgrade:{code:"Bytes"}}},CumulusPrimitivesParachainInherentParachainInherentData:{validationData:"PolkadotPrimitivesV2PersistedValidationData",relayChainState:"SpTrieStorageProof",downwardMessages:"Vec",horizontalMessages:"BTreeMap>"},PolkadotPrimitivesV2PersistedValidationData:{parentHead:"Bytes",relayParentNumber:"u32",relayParentStorageRoot:"H256",maxPovSize:"u32"},SpTrieStorageProof:{trieNodes:"BTreeSet"},PolkadotCorePrimitivesInboundDownwardMessage:{sentAt:"u32",msg:"Bytes"},PolkadotCorePrimitivesInboundHrmpMessage:{sentAt:"u32",data:"Bytes"},PalletSudoCall:{_enum:{sudo:{call:"Call"},sudo_unchecked_weight:{call:"Call",weight:"u64"},set_key:{_alias:{new_:"new"},new_:"MultiAddress"},sudo_as:{who:"MultiAddress",call:"Call"}}},PalletSchedulerError:{_enum:["FailedToSchedule","NotFound","TargetBlockNumberInPast","RescheduleNoChange"]},PalletUtilityError:{_enum:["TooManyCalls"]},PalletMultisigMultisig:{when:"PalletMultisigTimepoint",deposit:"u128",depositor:"AccountId32",approvals:"Vec"},PalletMultisigError:{_enum:["MinimumThreshold","AlreadyApproved","NoApprovalsNeeded","TooFewSignatories","TooManySignatories","SignatoriesOutOfOrder","SenderInSignatories","NotFound","NotOwner","NoTimepoint","WrongTimepoint","UnexpectedTimepoint","MaxWeightTooLow","AlreadyStored"]},PalletProxyProxyDefinition:{delegate:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"},PalletProxyAnnouncement:{real:"AccountId32",callHash:"H256",height:"u32"},PalletProxyError:{_enum:["TooMany","NotFound","NotProxy","Unproxyable","Duplicate","NoPermission","Unannounced","NoSelfProxy"]},ModuleTransactionPauseModuleError:{_enum:["CannotPause","InvalidCharacter"]},PalletPreimageRequestStatus:{_enum:{Unrequested:"Option<(AccountId32,u128)>",Requested:"u32"}},PalletPreimageError:{_enum:["TooLarge","AlreadyNoted","NotAuthorized","NotNoted","Requested","NotRequested"]},PalletBalancesBalanceLock:{id:"[u8;8]",amount:"u128",reasons:"PalletBalancesReasons"},PalletBalancesReasons:{_enum:["Fee","Misc","All"]},PalletBalancesReserveData:{id:"AcalaPrimitivesReserveIdentifier",amount:"u128"},AcalaPrimitivesReserveIdentifier:{_enum:["CollatorSelection","EvmStorageDeposit","EvmDeveloperDeposit","Honzon","Nft","TransactionPayment","TransactionPaymentDeposit","Count"]},PalletBalancesReleases:{_enum:["V1_0_0","V2_0_0"]},PalletBalancesError:{_enum:["VestingBalance","LiquidityRestrictions","InsufficientBalance","ExistentialDeposit","KeepAlive","ExistingVestingSchedule","DeadAccount","TooManyReserves"]},OrmlTokensBalanceLock:{id:"[u8;8]",amount:"u128"},OrmlTokensAccountData:{free:"u128",reserved:"u128",frozen:"u128"},OrmlTokensReserveData:{id:"AcalaPrimitivesReserveIdentifier",amount:"u128"},OrmlTokensModuleError:{_enum:["BalanceTooLow","AmountIntoBalanceFailed","LiquidityRestrictions","MaxLocksExceeded","KeepAlive","ExistentialDeposit","DeadAccount","TooManyReserves"]},ModuleCurrenciesModuleError:{_enum:["AmountIntoBalanceFailed","BalanceTooLow","Erc20InvalidOperation","EvmAccountNotFound","RealOriginNotFound","DepositFailed"]},OrmlVestingModuleError:{_enum:["ZeroVestingPeriod","ZeroVestingPeriodCount","InsufficientBalanceToLock","TooManyVestingSchedules","AmountLow","MaxVestingSchedulesExceeded"]},FrameSupportPalletId:"[u8;8]",ModuleTransactionPaymentModuleError:{_enum:["InvalidSwapPath","InvalidBalance","InvalidRate","InvalidToken","DexNotAvailable","ChargeFeePoolAlreadyExisted"]},PalletTreasuryProposal:{proposer:"AccountId32",value:"u128",beneficiary:"AccountId32",bond:"u128"},PalletTreasuryError:{_enum:["InsufficientProposersBalance","InvalidIndex","TooManyApprovals","InsufficientPermission","ProposalNotApproved"]},PalletBountiesBounty:{proposer:"AccountId32",value:"u128",fee:"u128",curatorDeposit:"u128",bond:"u128",status:"PalletBountiesBountyStatus"},PalletBountiesBountyStatus:{_enum:{Proposed:"Null",Approved:"Null",Funded:"Null",CuratorProposed:{curator:"AccountId32"},Active:{curator:"AccountId32",updateDue:"u32"},PendingPayout:{curator:"AccountId32",beneficiary:"AccountId32",unlockAt:"u32"}}},PalletBountiesError:{_enum:["InsufficientProposersBalance","InvalidIndex","ReasonTooBig","UnexpectedStatus","RequireCurator","InvalidValue","InvalidFee","PendingPayout","Premature","HasActiveChildBounty","TooManyQueued"]},PalletTipsOpenTip:{reason:"H256",who:"AccountId32",finder:"AccountId32",deposit:"u128",closes:"Option",tips:"Vec<(AccountId32,u128)>",findersFee:"bool"},PalletTipsError:{_enum:["ReasonTooBig","AlreadyKnown","UnknownTip","NotFinder","StillOpen","Premature"]},PalletAuthorshipUncleEntryItem:{_enum:{InclusionHeight:"u32",Uncle:"(H256,Option)"}},PalletAuthorshipError:{_enum:["InvalidUncleParent","UnclesAlreadySet","TooManyUncles","GenesisUncle","TooHighUncle","UncleAlreadyIncluded","OldUncle"]},ModuleCollatorSelectionError:{_enum:["MaxCandidatesExceeded","BelowCandidatesMin","StillLocked","Unknown","Permission","AlreadyCandidate","NotCandidate","NotNonCandidate","NothingToWithdraw","RequireSessionKey","AlreadyInvulnerable","InvalidProof","MaxInvulnerablesExceeded"]},SpCoreCryptoKeyTypeId:"[u8;4]",PalletSessionError:{_enum:["InvalidProof","NoAssociatedValidatorId","DuplicatedKey","NoKeys","NoAccount"]},ModuleSessionManagerModuleError:{_enum:["InvalidSession","InvalidDuration","EstimateNextSessionFailed"]},CumulusPalletXcmpQueueInboundChannelDetails:{sender:"u32",state:"CumulusPalletXcmpQueueInboundState",messageMetadata:"Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>"},CumulusPalletXcmpQueueInboundState:{_enum:["Ok","Suspended"]},PolkadotParachainPrimitivesXcmpMessageFormat:{_enum:["ConcatenatedVersionedXcm","ConcatenatedEncodedBlob","Signals"]},CumulusPalletXcmpQueueOutboundChannelDetails:{recipient:"u32",state:"CumulusPalletXcmpQueueOutboundState",signalsExist:"bool",firstIndex:"u16",lastIndex:"u16"},CumulusPalletXcmpQueueOutboundState:{_enum:["Ok","Suspended"]},CumulusPalletXcmpQueueQueueConfigData:{suspendThreshold:"u32",dropThreshold:"u32",resumeThreshold:"u32",thresholdWeight:"u64",weightRestrictDecay:"u64",xcmpMaxIndividualWeight:"u64"},CumulusPalletXcmpQueueError:{_enum:["FailedToSend","BadXcmOrigin","BadXcm","BadOverweightIndex","WeightOverLimit"]},PalletXcmQueryStatus:{_enum:{Pending:{responder:"XcmVersionedMultiLocation",maybeNotify:"Option<(u8,u8)>",timeout:"u32"},VersionNotifier:{origin:"XcmVersionedMultiLocation",isActive:"bool"},Ready:{response:"XcmVersionedResponse",at:"u32"}}},XcmVersionedResponse:{_enum:{V0:"XcmV0Response",V1:"XcmV1Response",V2:"XcmV2Response"}},PalletXcmVersionMigrationStage:{_enum:{MigrateSupportedVersion:"Null",MigrateVersionNotifiers:"Null",NotifyCurrentTargets:"Option",MigrateAndNotifyOldTargets:"Null"}},PalletXcmError:{_enum:["Unreachable","SendFailure","Filtered","UnweighableMessage","DestinationNotInvertible","Empty","CannotReanchor","TooManyAssets","InvalidOrigin","BadVersion","BadLocation","NoSubscription","AlreadySubscribed"]},CumulusPalletXcmError:"Null",CumulusPalletDmpQueueConfigData:{maxIndividual:"u64"},CumulusPalletDmpQueuePageIndexData:{beginUsed:"u32",endUsed:"u32",overweightCount:"u64"},CumulusPalletDmpQueueError:{_enum:["Unknown","OverLimit"]},OrmlXtokensModuleError:{_enum:["AssetHasNoReserve","NotCrossChainTransfer","InvalidDest","NotCrossChainTransferableCurrency","UnweighableMessage","XcmExecutionFailed","CannotReanchor","InvalidAncestry","InvalidAsset","DestinationNotInvertible","BadVersion","DistinctReserveForAssetAndFee","ZeroFee","ZeroAmount","TooManyAssetsBeingSent","AssetIndexNonExistent","FeeNotEnough","NotSupportedMultiLocation","MinXcmFeeNotDefined"]},OrmlUnknownTokensModuleError:{_enum:["BalanceTooLow","BalanceOverflow","UnhandledAsset"]},OrmlXcmModuleError:{_enum:["Unreachable","SendFailure","BadVersion"]},OrmlAuthorityModuleError:{_enum:["FailedToSchedule","FailedToCancel","FailedToFastTrack","FailedToDelay","CallNotAuthorized","TriggerCallNotPermitted","WrongCallWeightBound"]},PalletCollectiveVotes:{index:"u32",threshold:"u32",ayes:"Vec",nays:"Vec",end:"u32"},PalletCollectiveError:{_enum:["NotMember","DuplicateProposal","ProposalMissing","WrongIndex","DuplicateVote","AlreadyInitialized","TooEarly","TooManyProposals","WrongProposalWeight","WrongProposalLength"]},PalletMembershipError:{_enum:["AlreadyMember","NotMember","TooManyMembers"]},PalletDemocracyPreimageStatus:{_enum:{Missing:"u32",Available:{data:"Bytes",provider:"AccountId32",deposit:"u128",since:"u32",expiry:"Option"}}},PalletDemocracyReferendumInfo:{_enum:{Ongoing:"PalletDemocracyReferendumStatus",Finished:{approved:"bool",end:"u32"}}},PalletDemocracyReferendumStatus:{end:"u32",proposalHash:"H256",threshold:"PalletDemocracyVoteThreshold",delay:"u32",tally:"PalletDemocracyTally"},PalletDemocracyTally:{ayes:"u128",nays:"u128",turnout:"u128"},PalletDemocracyVoteVoting:{_enum:{Direct:{votes:"Vec<(u32,PalletDemocracyVoteAccountVote)>",delegations:"PalletDemocracyDelegations",prior:"PalletDemocracyVotePriorLock"},Delegating:{balance:"u128",target:"AccountId32",conviction:"PalletDemocracyConviction",delegations:"PalletDemocracyDelegations",prior:"PalletDemocracyVotePriorLock"}}},PalletDemocracyDelegations:{votes:"u128",capital:"u128"},PalletDemocracyVotePriorLock:"(u32,u128)",PalletDemocracyReleases:{_enum:["V1"]},PalletDemocracyError:{_enum:["ValueLow","ProposalMissing","AlreadyCanceled","DuplicateProposal","ProposalBlacklisted","NotSimpleMajority","InvalidHash","NoProposal","AlreadyVetoed","DuplicatePreimage","NotImminent","TooEarly","Imminent","PreimageMissing","ReferendumInvalid","PreimageInvalid","NoneWaiting","NotVoter","NoPermission","AlreadyDelegating","InsufficientFunds","NotDelegating","VotesExist","InstantNotAllowed","Nonsense","WrongUpperBound","MaxVotesReached","TooManyProposals","VotingPeriodLow"]},OrmlOracleModuleTimestampedValue:{value:"u128",timestamp:"u64"},OrmlUtilitiesOrderedSet:"Vec",OrmlOracleModuleError:{_enum:["NoPermission","AlreadyFeeded"]},OrmlTraitsAuctionAuctionInfo:{bid:"Option<(AccountId32,u128)>",start:"u32",end:"Option"},OrmlAuctionModuleError:{_enum:["AuctionNotExist","AuctionNotStarted","BidNotAccepted","InvalidBidPrice","NoAvailableAuctionId"]},OrmlRewardsPoolInfo:{totalShares:"u128",rewards:"BTreeMap"},OrmlRewardsModuleError:{_enum:["PoolDoesNotExist","ShareDoesNotExist","CanSplitOnlyLessThanShare"]},OrmlNftClassInfo:{metadata:"Bytes",totalIssuance:"u64",owner:"AccountId32",data:"ModuleNftClassData"},ModuleNftClassData:{deposit:"u128",properties:"u8",attributes:"BTreeMap"},OrmlNftTokenInfo:{metadata:"Bytes",owner:"AccountId32",data:"ModuleNftTokenData"},ModuleNftTokenData:{deposit:"u128",attributes:"BTreeMap"},OrmlNftModuleError:{_enum:["NoAvailableClassId","NoAvailableTokenId","TokenNotFound","ClassNotFound","NoPermission","CannotDestroyClass","MaxMetadataExceeded"]},ModulePricesModuleError:{_enum:["AccessPriceFailed","NoLockedPrice"]},ModuleDexTradingPairStatus:{_enum:{Disabled:"Null",Provisioning:"ModuleDexProvisioningParameters",Enabled:"Null"}},ModuleDexProvisioningParameters:{minContribution:"(u128,u128)",targetProvision:"(u128,u128)",accumulatedProvision:"(u128,u128)",notBefore:"u32"},ModuleDexModuleError:{_enum:["AlreadyEnabled","MustBeEnabled","MustBeProvisioning","MustBeDisabled","NotAllowedList","InvalidContributionIncrement","InvalidLiquidityIncrement","InvalidCurrencyId","InvalidTradingPathLength","InsufficientTargetAmount","ExcessiveSupplyAmount","InsufficientLiquidity","ZeroSupplyAmount","ZeroTargetAmount","UnacceptableShareIncrement","UnacceptableLiquidityWithdrawn","InvariantCheckFailed","UnqualifiedProvision","StillProvisioning","AssetUnregistered","InvalidTradingPath","NotAllowedRefund","CannotSwap"]},ModuleDexOracleModuleError:{_enum:["AveragePriceAlreadyEnabled","AveragePriceMustBeEnabled","InvalidPool","InvalidCurrencyId","IntervalIsZero"]},ModuleAggregatedDexModuleError:{_enum:["CannotSwap","InvalidPoolId","InvalidTokenIndex","InvalidSwapPath"]},ModuleAuctionManagerCollateralAuctionItem:{refundRecipient:"AccountId32",currencyId:"AcalaPrimitivesCurrencyCurrencyId",initialAmount:"Compact",amount:"Compact",target:"Compact",startTime:"u32"},ModuleAuctionManagerModuleError:{_enum:["AuctionNotExists","InReverseStage","InvalidFeedPrice","MustAfterShutdown","InvalidBidPrice","InvalidAmount"]},AcalaPrimitivesPosition:{collateral:"u128",debit:"u128"},ModuleLoansModuleError:{_enum:["AmountConvertFailed"]},ModuleHonzonModuleError:{_enum:["NoPermission","AlreadyShutdown","AuthorizationNotExists","AlreadyAuthorized"]},ModuleCdpTreasuryModuleError:{_enum:["CollateralNotEnough","SurplusPoolNotEnough","DebitPoolNotEnough","CannotSwap","NotDexShare"]},ModuleCdpEngineRiskManagementParams:{maximumTotalDebitValue:"u128",interestRatePerSec:"Option",liquidationRatio:"Option",liquidationPenalty:"Option",requiredCollateralRatio:"Option"},ModuleCdpEngineModuleError:{_enum:["ExceedDebitValueHardCap","BelowRequiredCollateralRatio","BelowLiquidationRatio","MustBeUnsafe","MustBeSafe","InvalidCollateralType","RemainDebitValueTooSmall","CollateralAmountBelowMinimum","InvalidFeedPrice","NoDebitValue","AlreadyShutdown","MustAfterShutdown","CollateralNotEnough","NotEnoughDebitDecrement","ConvertDebitBalanceFailed","LiquidationFailed","TooManyLiquidationContracts","CollateralContractNotFound"]},ModuleEmergencyShutdownModuleError:{_enum:["AlreadyShutdown","MustAfterShutdown","CanNotRefund","ExistPotentialSurplus","ExistUnhandledDebit"]},ModuleHomaModuleStakingLedger:{bonded:"Compact",unlocking:"Vec"},ModuleHomaModuleError:{_enum:["BelowMintThreshold","BelowRedeemThreshold","ExceededStakingCurrencySoftCap","InsufficientUnclaimedRedemption","OutdatedEraIndex","FastMatchIsNotAllowed","CannotCompletelyFastMatch","InvalidLastEraBumpedBlock"]},ModuleXcmInterfaceModuleError:{_enum:["XcmFailed"]},ModuleIncentivesModuleError:{_enum:["NotEnough","InvalidCurrencyId","InvalidPoolId","InvalidRate"]},ModuleNftModuleError:{_enum:["ClassIdNotFound","TokenIdNotFound","NoPermission","InvalidQuantity","NonTransferable","NonBurnable","NonMintable","CannotDestroyClass","Immutable","AttributesTooLarge","IncorrectTokenId"]},ModuleAssetRegistryModuleError:{_enum:["BadLocation","MultiLocationExisted","AssetIdNotExists","AssetIdExisted"]},ModuleEvmModuleAccountInfo:{nonce:"u32",contractInfo:"Option"},ModuleEvmModuleContractInfo:{codeHash:"H256",maintainer:"H160",published:"bool"},ModuleEvmModuleCodeInfo:{codeSize:"u32",refCount:"u32"},ModuleEvmModuleError:{_enum:["AddressNotMapped","ContractNotFound","NoPermission","ContractDevelopmentNotEnabled","ContractDevelopmentAlreadyEnabled","ContractAlreadyPublished","ContractExceedsMaxCodeSize","ContractAlreadyExisted","OutOfStorage","ChargeFeeFailed","CannotKillContract","ReserveStorageFailed","UnreserveStorageFailed","ChargeStorageFailed","InvalidDecimals","StrictCallFailed"]},ModuleEvmBridgeModuleError:{_enum:["ExecutionFail","ExecutionRevert","ExecutionFatal","ExecutionError","InvalidReturnValue"]},ModuleEvmAccountsModuleError:{_enum:["AccountIdHasMapped","EthAddressHasMapped","BadSignature","InvalidSignature","NonZeroRefCount"]},NutsfinanceStableAssetStableAssetPoolInfo:{poolAsset:"AcalaPrimitivesCurrencyCurrencyId",assets:"Vec",precisions:"Vec",mintFee:"u128",swapFee:"u128",redeemFee:"u128",totalSupply:"u128",a:"u128",aBlock:"u32",futureA:"u128",futureABlock:"u32",balances:"Vec",feeRecipient:"AccountId32",accountId:"AccountId32",yieldRecipient:"AccountId32",precision:"u128"},NutsfinanceStableAssetError:{_enum:["InconsistentStorage","InvalidPoolAsset","ArgumentsMismatch","ArgumentsError","PoolNotFound","Math","InvalidPoolValue","MintUnderMin","SwapUnderMin","RedeemUnderMin","RedeemOverMax"]},PolkadotPrimitivesV2UpgradeRestriction:{_enum:["Present"]},CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot:{dmqMqcHead:"H256",relayDispatchQueueSize:"(u32,u32)",ingressChannels:"Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>",egressChannels:"Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>"},PolkadotPrimitivesV2AbridgedHrmpChannel:{maxCapacity:"u32",maxTotalSize:"u32",maxMessageSize:"u32",msgCount:"u32",totalSize:"u32",mqcHead:"Option"},PolkadotPrimitivesV2AbridgedHostConfiguration:{maxCodeSize:"u32",maxHeadDataSize:"u32",maxUpwardQueueCount:"u32",maxUpwardQueueSize:"u32",maxUpwardMessageSize:"u32",maxUpwardMessageNumPerCandidate:"u32",hrmpMaxMessageNumPerCandidate:"u32",validationUpgradeCooldown:"u32",validationUpgradeDelay:"u32"},PolkadotCorePrimitivesOutboundHrmpMessage:{recipient:"u32",data:"Bytes"},CumulusPalletParachainSystemError:{_enum:["OverlappingUpgrades","ProhibitedByPolkadot","TooBig","ValidationDataNotAvailable","HostConfigurationNotAvailable","NotScheduled","NothingAuthorized","Unauthorized"]},PalletSudoError:{_enum:["RequireSudo"]},FrameSystemExtensionsCheckNonZeroSender:"Null",FrameSystemExtensionsCheckSpecVersion:"Null",FrameSystemExtensionsCheckTxVersion:"Null",FrameSystemExtensionsCheckGenesis:"Null",RuntimeCommonCheckNonce:{nonce:"Compact"},FrameSystemExtensionsCheckWeight:"Null",ModuleEvmSetEvmOrigin:"Null",ModuleTransactionPaymentChargeTransactionPayment:"Compact",AcalaRuntimeStorageDepositPerByte:"Null",AcalaRuntimeTxFeePerGas:"Null",AcalaPrimitivesSignatureAcalaMultiSignature:{_enum:{Ed25519:"SpCoreEd25519Signature",Sr25519:"SpCoreSr25519Signature",Ecdsa:"SpCoreEcdsaSignature",Ethereum:"[u8;65]",Eip1559:"[u8;65]",AcalaEip712:"[u8;65]"}}}},782:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(46513);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},46513:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(35842);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},88198:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{PalletBalanceOf:"Balance"}}},31199:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{CollateralAuctionItem:{refundRecipient:"AccountId",currencyId:"CurrencyId",initialAmount:"Compact",amount:"Compact",target:"Compact",startTime:"BlockNumber"},DebitAuctionItem:{initialAmount:"Compact",amount:"Compact",fix:"Compact",startTime:"BlockNumber"},SurplusAuctionItem:{amount:"Compact",startTime:"BlockNumber"}}}},62234:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{LiquidationStrategy:{_enum:["Auction","Exchange"]},OptionRate:"Option",OptionRatio:"Option",ChangeOptionRate:{_enum:{NoChange:"Null",NewValue:"OptionRate"}},ChangeOptionRatio:{_enum:{NoChange:"Null",NewValue:"OptionRatio"}},ChangeBalance:{_enum:{NoChange:"Null",NewValue:"Balance"}},RiskManagementParams:{maximumTotalDebitValue:"Balance",interestRatePerSec:"Option",liquidationRatio:"Option",liquidationPenalty:"Option",requiredCollateralRatio:"Option"}}}},32718:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{CandidateInfoOf:"CandidateInfo"}}},59015:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{getSupplyAmount:{description:"Get supply amount",params:[{name:"supplyCurrencyId",type:"CurrencyId"},{name:"targetCurrencyId",type:"CurrencyId"},{name:"targetCurrencyAmount",type:"BalanceRequest"}],type:"BalanceWrapper"},getTargetAmount:{description:"Get target amount",params:[{name:"supplyCurrencyId",type:"CurrencyId"},{name:"targetCurrencyId",type:"CurrencyId"},{name:"supplyCurrencyAmount",type:"BalanceRequest"}],type:"BalanceWrapper"}},types:{TradingPairProvisionParameters:{minContribution:"(Balance, Balance)",targetProvision:"(Balance, Balance)",accumulatedProvision:"(Balance, Balance)",notBefore:"BlockNumber"},BalanceWrapper:{amount:"Balance"},BalanceRequest:{amount:"Balance"},TradingPairStatus:{_enum:{Disabled:"Null",Provisioning:"TradingPairProvisionParameters",Enabled:"Null"}}}}},9767:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{call:{description:"eth call",params:[{name:"data",type:"CallRequest"},{name:"at",type:"BlockHash",isHistoric:!0,isOptional:!0}],type:"Raw"},estimateResources:{description:"eth estimateResources",params:[{name:"from",type:"H160"},{name:"unsignedExtrinsic",type:"Bytes"},{name:"at",type:"BlockHash",isHistoric:!0,isOptional:!0}],type:"EstimateResourcesResponse"}},typesAlias:{evm:{AccountInfo:"EvmAccountInfo",ContractInfo:"EvmContractInfo"}},types:{Erc20Info:{address:"EvmAddress",name:"Vec",symbol:"Vec",decimals:"u8"},EstimateResourcesResponse:{gas:"u256",storage:"i32",weightFee:"u256"},EvmAccountInfo:{nonce:"Index",contractInfo:"Option"},CodeInfo:{codeSize:"u32",refCount:"u32"},EvmContractInfo:{codeHash:"H256",maintainer:"H160",deployed:"bool"},EvmAddress:"H160",CallRequest:{from:"Option",to:"Option",gasLimit:"Option",storageLimit:"Option",value:"Option",data:"Option"},CallInfo:{exit_reason:"EvmCoreErrorExitReason",value:"Vec",used_gas:"U256",used_storage:"i32",logs:"Vec"},CreateInfo:{exit_reason:"EvmCoreErrorExitReason",value:"H160",used_gas:"U256",used_storage:"i32",logs:"Vec"},EthereumLog:{address:"H160",topics:"Vec",data:"Bytes"},EvmCoreErrorExitReason:{_enum:{Succeed:"EvmCoreErrorExitSucceed",Error:"EvmCoreErrorExitError",Revert:"EvmCoreErrorExitRevert",Fatal:"EvmCoreErrorExitFatal"}},EvmCoreErrorExitSucceed:{_enum:["Stopped","Returned","Suicided"]},EvmCoreErrorExitError:{_enum:{StackUnderflow:"Null",StackOverflow:"Null",InvalidJump:"Null",InvalidRange:"Null",DesignatedInvalid:"Null",CallTooDeep:"Null",CreateCollision:"Null",CreateContractLimit:"Null",OutOfOffset:"Null",OutOfGas:"Null",OutOfFund:"Null",PCUnderflow:"Null",CreateEmpty:"Null",Other:"Text",InvalidCode:"Null"}},EvmCoreErrorExitRevert:{_enum:["Reverted"]},EvmCoreErrorExitFatal:{_enum:{NotSupported:"Null",UnhandledInterrupt:"Null",CallErrorAsFatal:"EvmCoreErrorExitError",Other:"Text"}}}}},33494:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{AcalaStakingLedge:{bonded:"Compact",unlocking:"Vec"},AcalaUnlockChunk:{value:"Compact",era:"Compact"}}}},59535:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{RelaychainAccountId:"AccountId",SlashInfo:{validator:"RelaychainAccountId",relaychainTokenAmount:"Balance"},ValidatorBacking:{totalInsurance:"Balance",isFrozen:"bool"},Guarantee:{total:"Balance",bonded:"Balance",unbonding:"Option<(Balance, BlockNumber)>"}}}},17638:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{PoolId:{_enum:{Loans:"CurrencyId",Dex:"CurrencyId"}},PoolIdV0:{_enum:{LoansIncentive:"CurrencyId",DexIncentive:"CurrencyId",HomaIncentive:"Null",DexSaving:"CurrencyId",HomaValidatorAllowance:"AccountId"}}}}},59490:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.typesBundleForPolkadot=t.typesBundle=t.typesAlias=t.types=t.signedExtensions=t.rpc=void 0;var r=n(a(26290)),i=a(48183),o=a(95870),c=n(a(88198)),s=n(a(31199)),d=n(a(62234)),u=n(a(59015)),f=n(a(9767)),l=n(a(33494)),b=n(a(32718)),h=n(a(59535)),p=n(a(17638)),m=n(a(19348)),y=n(a(50079)),g=n(a(93803)),x=n(a(23917)),v=n(a(58493)),w=n(a(51663)),I=a(20998),A=n(a(30061)),S=n(a(83743)),k=n(a(94779)),C=n(a(63604)),E=n(a(60280)),T=n(a(33784));function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function O(e){for(var t=1;t({minmax:e.minmax,types:O(O({},M),e.types)}))),alias:N}}t.typesAlias=N;const V={spec:{acala:D(C.default),mandala:D(E.default),karura:D(T.default)}};t.typesBundle=V;const L={spec:{acala:D(C.default),mandala:D(E.default),karura:D(T.default)}};t.typesBundleForPolkadot=L;const U=I.signedExtensions;t.signedExtensions=U},19348:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{Position:{collateral:"Balance",debit:"Balance"}}}},50079:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{CID:"Vec",Attributes:"BTreeMap, Vec>",TokenInfoOf:{metadata:"CID",owner:"AccountId",data:"TokenData"},Properties:{_set:{_bitLength:8,Transferable:1,Burnable:2,Mintable:4,ClassPropertiesMutable:8}},ClassData:{deposit:"Balance",properties:"Properties",attributes:"Attributes"},TokenData:{deposit:"Balance",attributes:"Attributes"},TokenId:"u64",TokenIdOf:"TokenId",NFTClassId:"u32",ClassIdOf:"ClassId",NFTBalance:"u128",NFTBalanceOf:"NFTBalance",ClassInfoOf:{metadata:"CID",totalIssuance:"TokenId",owner:"AccountId",data:"ClassData"}},typesAligns:{nft:{ClassId:"NFTClassId",BalanceOf:"NFTBalanceOf"}}}},93803:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{NomineeId:"AccountId",HomaUnlockChunk:{value:"Balance",era:"EraIndex"},BondingLedger:{total:"Balance",active:"Balance",unlocking:"Vec"}},typesAlias:{nomineesElection:{UnlockChunk:"HomaUnlockChunk"}}}},23917:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{Amount:"i128",AmountOf:"Amount",AuctionId:"u32",AuctionIdOf:"AuctionId",TokenSymbol:{_enum:{ACA:0,AUSD:1,DOT:2,LDOT:3,RENBTC:20,CASH:21,KAR:128,KUSD:129,KSM:130,LKSM:131,BNC:168,VSKSM:169,PHA:170,KINT:171,KBTC:172}},DexShare:{_enum:{Token:"TokenSymbol",Erc20:"EvmAddress"}},CurrencyId:{_enum:{Token:"TokenSymbol",DEXShare:"(DexShare, DexShare)",ERC20:"EvmAddress",StableAssetPoolToken:"u32",LiquidCrowdloan:"u32",ForeignAsset:"u32"}},CurrencyIdOf:"CurrencyId",AirDropCurrencyId:{_enum:["KAR","ACA"]},AuthoritysOriginId:{_enum:["Root","Treasury","HonzonTreasury","HomaTreasury","TreasuryReserve"]},AcalaDataProviderId:{_enum:["Aggregated","Acala","Band"]},TradingPair:"(CurrencyId, CurrencyId)",OrmlCurrencyId:"CurrencyId",ChainBridgeChainId:"u8",AcalaAssetMetadata:{name:"Vec",symbol:"Vec",decimals:"u8",minimalBalance:"Balance"},NumberOrHex:"u128"},typesAlias:{rewards:{OrmlCurrencyId:"CurrencyId"},oracle:{DataProviderId:"AcalaDataProviderId"},chainBridge:{ChainId:"ChainBridgeChainId"}}}},58493:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{PublicKey:"[u8; 20]",DestAddress:"Vec"}}},51663:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{OracleKey:"CurrencyId",OracleValue:"Price",AsOriginId:"AuthoritysOriginId",ProxyType:{_enum:["Any","CancelProxy","Governance","Auction","Swap","Loan"]},AtLeast64BitUnsigned:"u128",StableAssetPoolId:"u32",RelayChainBlockNumberOf:"RelayChainBlockNumber"}}},20998:(e,t)=>{"use strict";t.__esModule=!0,t.signedExtensions=void 0,t.signedExtensions={SetEvmOrigin:{extrinsic:{},payload:{}}}},63604:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.default=void 0;var r=n(a(26290));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t",totalRewards:"Compact",totalWithdrawnRewards:"Compact"}};var b=[{minmax:[600,699],types:o(o(o(o(o({},c),s),f),{Address:"LookupSource",LookupSource:"IndicesLookupSource"}),{},{TokenSymbol:{_enum:["ACA","AUSD","DOT","XBTC","LDOT","RENBTC"]}})},{minmax:[700,719],types:o(o(o(o(o({},c),s),f),d),{},{TokenSymbol:{_enum:["ACA","AUSD","DOT","XBTC","LDOT","RENBTC"]}})},{minmax:[720,722],types:o(o(o(o(o(o({},c),d),s),f),u),{},{TokenSymbol:{_enum:{ACA:0,AUSD:1,DOT:2,LDOT:3,XBTC:4,RENBTC:5,POLKABTC:6,PLM:7,PHA:8,HDT:9,BCG:11,KAR:128,KUSD:129,KSM:130,LKSM:131,SDN:135,KILT:138}}})},{minmax:[723,729],types:o(o(o(o(o(o({},c),d),s),l),u),{},{TokenSymbol:{_enum:{ACA:0,AUSD:1,DOT:2,LDOT:3,XBTC:4,RENBTC:5,POLKABTC:6,PLM:7,PHA:8,HDT:9,BCG:11,KAR:128,KUSD:129,KSM:130,LKSM:131,SDN:135,KILT:138}}})},{minmax:[730,1007],types:o(o(o(o(o({},c),d),s),l),{},{TokenSymbol:{_enum:{ACA:0,AUSD:1,DOT:2,LDOT:3,RENBTC:4,KAR:128,KUSD:129,KSM:130,LKSM:131,CASH:140}}})},{minmax:[1008,1008],types:o(o(o(o(o({},c),d),s),l),{},{TokenSymbol:{_enum:{ACA:0,AUSD:1,DOT:2,LDOT:3,RENBTC:20,CASH:21,KAR:128,KUSD:129,KSM:130,LKSM:131}}})},{minmax:[1008,1009],types:o(o(o(o({},c),d),s),l)},{minmax:[1010,1013],types:o(o(o({},c),d),s)},{minmax:[1014,1018],types:o(o(o({},c),d),{MultiLocation:"MultiLocationV1",MultiAsset:"MultiAssetV1",Xcm:"XcmV1",XcmOrder:"XcmOrderV1",XcmError:"XcmErrorV1",Response:"ResponseV1"})},{minmax:[1019,void 0],types:o({},d)}];t.default=b},33784:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.default=void 0;var r=n(a(63604)).default;t.default=r},60280:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.default=void 0;var r=n(a(63604)).default;t.default=r},30061:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{PoolTokenIndex:"u32",AssetId:"CurrencyId"}}},83743:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{getAvailableUnbonded:{description:"Get Available Unbonded",params:[{name:"account",type:"AccountId"}],type:"BalanceInfo"},getLiquidStakingExchangeRate:{description:"get liquid staking exchange rate",params:[],type:"ExchangeRate"}},types:{SubAccountStatus:{bonded:"Balance",available:"Balance",unbonding:"Vec<(EraIndex,Balance)>",mockRewardRate:"Rate"},Params:{targetMaxFreeUnbondedRatio:"Ratio",targetMinFreeUnbondedRatio:"Ratio",targetUnbondingToFreeRatio:"Ratio",unbondingToFreeAdjustment:"Ratio",baseFeeRate:"Rate"},StakingPoolPhase:{_enum:["Started","RelaychainUpdated","LedgerUpdated","Finished"]},Ledger:{bonded:"Balance",unbondingToFree:"Balance",freePool:"Balance",toUnbondNextEra:"(Balance, Balance)"},ChangeRate:{_enum:{NoChange:"Null",NewValue:"Rate"}},ChangeRatio:{_enum:{NoChange:"Null",NewValue:"Ratio"}},BalanceInfo:{amount:"Balance"},PolkadotAccountId:"AccountId",PolkadotAccountIdOf:"PolkadotAccountId"},typesAlias:{stakingPool:{Phase:"StakingPoolPhase"}}}},94779:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{ExchangeRate:"FixedU128",Rate:"FixedU128",Ratio:"FixedU128",Price:"FixedU128"}}},59895:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var i=r(a(53890)),o=r(a(27785)),c=r(a(48216)),s=r(a(91095)),d=r(a(72487)),u=r(a(96412));function f(e){var t,a,r={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",11155111:"sepolia"},f={mainnet:i.default,ropsten:o.default,rinkeby:c.default,kovan:s.default,goerli:d.default,sepolia:u.default};if(e)try{for(var l=n(e),b=l.next();!b.done;b=l.next()){var h=b.value,p=h.name;r[h.chainId.toString()]=p,f[p]=h}}catch(e){t={error:e}}finally{try{b&&!b.done&&(a=l.return)&&a.call(l)}finally{if(t)throw t.error}}return f.names=r,f}t._getInitializedChains=f,t.chains=f()},85745:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1153:a(89486),1559:a(90805),2315:a(76568),2537:a(88175),2565:a(92946),2718:a(66426),2929:a(10588),2930:a(30600),3198:a(3729),3529:a(71121),3540:a(48704),3541:a(76198),3554:a(66702),3607:a(32017),3651:a(5982),3670:a(28474),3675:a(74272),3855:a(84114),3860:a(5220),4345:a(47764),4399:a(73505),5133:a(9813)}},51737:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",a(95049)],["homestead",a(89850)],["dao",a(94976)],["tangerineWhistle",a(36908)],["spuriousDragon",a(3340)],["byzantium",a(85727)],["constantinople",a(52938)],["petersburg",a(6989)],["istanbul",a(60279)],["muirGlacier",a(79895)],["berlin",a(63156)],["london",a(99570)],["shanghai",a(93172)],["arrowGlacier",a(2124)],["grayGlacier",a(70130)],["mergeForkIdTransition",a(62912)],["merge",a(23374)]]},46446:function(e,t,a){"use strict";var n,r=a(48834).Buffer,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var s,d,u,f,l,b=a(22699),h=a(97108),p=a(47144),m=a(59895),y=a(51737),g=a(85745);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain",e.OptimisticKovan="optimistic-kovan",e.OptimisticEthereum="optimistic-ethereum"}(s=t.CustomChain||(t.CustomChain={})),(l=t.Chain||(t.Chain={}))[l.Mainnet=1]="Mainnet",l[l.Ropsten=3]="Ropsten",l[l.Rinkeby=4]="Rinkeby",l[l.Kovan=42]="Kovan",l[l.Goerli=5]="Goerli",l[l.Sepolia=11155111]="Sepolia",function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.ArrowGlacier="arrowGlacier",e.GrayGlacier="grayGlacier",e.MergeForkIdTransition="mergeForkIdTransition",e.Merge="merge",e.Shanghai="shanghai"}(d=t.Hardfork||(t.Hardfork={})),(f=t.ConsensusType||(t.ConsensusType={})).ProofOfStake="pos",f.ProofOfWork="pow",f.ProofOfAuthority="poa",(u=t.ConsensusAlgorithm||(t.ConsensusAlgorithm={})).Ethash="ethash",u.Clique="clique",u.Casper="casper";var x=function(e){function t(t){var a,n,r,i,o=this;(o=e.call(this)||this)._supportedHardforks=[],o._eips=[],o._customChains=null!==(r=t.customChains)&&void 0!==r?r:[],o._chainParams=o.setChain(t.chain),o.DEFAULT_HARDFORK=null!==(i=o._chainParams.defaultHardfork)&&void 0!==i?i:d.Istanbul;try{for(var s=c(o._chainParams.hardforks),u=s.next();!u.done;u=s.next()){var f=u.value;f.forkHash||(f.forkHash=o._calcForkHash(f.name))}}catch(e){a={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return o._hardfork=o.DEFAULT_HARDFORK,t.supportedHardforks&&(o._supportedHardforks=t.supportedHardforks),t.hardfork&&o.setHardfork(t.hardfork),t.eips&&o.setEIPs(t.eips),o}return i(t,e),t.custom=function(e,a){var n;void 0===a&&(a={});var r=null!==(n=a.baseChain)&&void 0!==n?n:"mainnet",i=o({},t._getChainParams(r));if(i.name="custom-chain","string"!=typeof e)return new t(o({chain:o(o({},i),e)},a));if(e===s.PolygonMainnet)return t.custom({name:s.PolygonMainnet,chainId:137,networkId:137},a);if(e===s.PolygonMumbai)return t.custom({name:s.PolygonMumbai,chainId:80001,networkId:80001},a);if(e===s.ArbitrumRinkebyTestnet)return t.custom({name:s.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},a);if(e===s.xDaiChain)return t.custom({name:s.xDaiChain,chainId:100,networkId:100},a);if(e===s.OptimisticKovan)return t.custom({name:s.OptimisticKovan,chainId:69,networkId:69},o({hardfork:d.Berlin},a));if(e===s.OptimisticEthereum)return t.custom({name:s.OptimisticEthereum,chainId:10,networkId:10},o({hardfork:d.Berlin},a));throw new Error("Custom chain ".concat(e," not supported"))},t.forCustomChain=function(e,a,n,r){var i=t._getChainParams(e);return new t({chain:o(o({},i),a),hardfork:n,supportedHardforks:r})},t.isSupportedChainId=function(e){var t=(0,m._getInitializedChains)();return Boolean(t.names[e.toString()])},t._getChainParams=function(e,t){var a=(0,m._getInitializedChains)(t);if("number"==typeof e||p.BN.isBN(e)){if(e=e.toString(),a.names[e])return a[a.names[e]];throw new Error("Chain with ID ".concat(e," not supported"))}if(a[e])return a[e];throw new Error("Chain with name ".concat(e," not supported"))},t.prototype.setChain=function(e){var a,n;if("number"==typeof e||"string"==typeof e||p.BN.isBN(e)){var r;r=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,r)}else{if("object"!=typeof e)throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var i=c(["networkId","genesis","hardforks","bootstrapNodes"]),o=i.next();!o.done;o=i.next()){var s=o.value;if(void 0===e[s])throw new Error("Missing required chain parameter: ".concat(s))}}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,a;if(!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"));var n=!1;try{for(var r=c(y.hardforks),i=r.next();!i.done;i=r.next())i.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}catch(e){t={error:e}}finally{try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name ".concat(e," not supported"))},t.prototype.getHardforkByBlockNumber=function(e,t){var a,n;e=(0,p.toType)(e,p.TypeOutput.BN),t=(0,p.toType)(t,p.TypeOutput.BN);var r,i,o,s=d.Chainstart;try{for(var u=c(this.hardforks()),f=u.next();!f.done;f=u.next()){var l=f.value;if(null!==l.block)e.gte(new p.BN(l.block))&&(s=l.name),t&&l.td&&(t.gte(new p.BN(l.td))?r=l.name:i=o),o=l.name;else if(null!=t&&void 0!==l.td&&null!==l.td&&t.gte(new p.BN(l.td)))return l.name}}catch(e){a={error:e}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(a)throw a.error}}if(t){var b="block number: ".concat(e," (-> ").concat(s,"), ");if(r&&!this.hardforkGteHardfork(s,r)){var h="HF determined by block number is lower than the minimum total difficulty HF";throw b+="total difficulty: ".concat(t," (-> ").concat(r,")"),new Error("".concat(h,": ").concat(b))}if(i&&!this.hardforkGteHardfork(i,s))throw h="Maximum HF determined by total difficulty is lower than the block number HF",b+="total difficulty: ".concat(t," (-> ").concat(i,")"),new Error("".concat(h,": ").concat(b))}return s},t.prototype.setHardforkByBlockNumber=function(e,t){var a=this.getHardforkByBlockNumber(e,t);return this.setHardfork(a),a},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"))}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,a,n=this.hardforks();try{for(var r=c(n),i=r.next();!i.done;i=r.next()){var o=i.value;if(o.name===e)return o}}catch(e){t={error:e}}finally{try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(t)throw t.error}}throw new Error("Hardfork ".concat(e," not defined for chain ").concat(this.chainName()))},t.prototype._isSupportedHardfork=function(e){var t,a;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=c(this._supportedHardforks),r=n.next();!r.done;r=n.next())if(e===r.value)return!0}catch(e){t={error:e}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,a,n=this;void 0===e&&(e=[]);var r=function(t){if(!(t in g.EIPs))throw new Error("".concat(t," not supported"));var a=i.gteHardfork(g.EIPs[t].minimumHardfork);if(!a)throw new Error("".concat(t," cannot be activated on hardfork ").concat(i.hardfork(),", minimumHardfork: ").concat(a));g.EIPs[t].requiredEIPs&&g.EIPs[t].requiredEIPs.forEach((function(a){if(!e.includes(a)&&!n.isActivatedEIP(a))throw new Error("".concat(t," requires EIP ").concat(a,", but is not included in the EIP list"))}))},i=this;try{for(var o=c(e),s=o.next();!s.done;s=o.next())r(s.value)}catch(e){t={error:e}}finally{try{s&&!s.done&&(a=o.return)&&a.call(o)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var a,n,r=null;try{for(var i=c(this._eips),o=i.next();!o.done;o=i.next()){var s=o.value;if(null!==(r=this.paramByEIP(e,t,s)))return r}}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,a){var n,r,i,o;a=this._chooseHardfork(a);var s=null;try{for(var d=c(y.hardforks),u=d.next();!u.done;u=d.next()){var f=u.value;if("eips"in f[1]){var l=f[1].eips;try{for(var b=(i=void 0,c(l)),h=b.next();!h.done;h=b.next()){var p=h.value,m=this.paramByEIP(e,t,p);s=null!==m?m:s}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}}else{if(!f[1][e])throw new Error("Topic ".concat(e," not defined"));void 0!==f[1][e][t]&&(s=f[1][e][t].v)}if(f[0]===a)break}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return s},t.prototype.paramByEIP=function(e,t,a){if(!(a in g.EIPs))throw new Error("".concat(a," not supported"));var n=g.EIPs[a];if(!(e in n))throw new Error("Topic ".concat(e," not defined"));return void 0===n[e][t]?null:n[e][t].v},t.prototype.paramByBlock=function(e,t,a){var n=this.activeHardforks(a),r=n[n.length-1].name;return this.paramByHardfork(e,t,r)},t.prototype.isActivatedEIP=function(e){var t,a;if(this.eips().includes(e))return!0;try{for(var n=c(y.hardforks),r=n.next();!r.done;r=n.next()){var i=r.value[1];if(this.gteHardfork(i.name)&&"eips"in i&&i.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,a){var n;void 0===a&&(a={}),t=(0,p.toType)(t,p.TypeOutput.BN);var r=null!==(n=a.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,r);var i=this.hardforkBlockBN(e);return!(!i||!t.gte(i))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,a){var n,r;void 0===a&&(a={});var i,o=void 0!==a.onlyActive&&a.onlyActive;e=this._chooseHardfork(e,a.onlySupported),i=o?this.activeHardforks(null,a):this.hardforks();var s=-1,d=-1,u=0;try{for(var f=c(i),l=f.next();!l.done;l=f.next()){var b=l.value;b.name===e&&(s=u),b.name===t&&(d=u),u+=1}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}return s>=d&&-1!==d},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var a,n,r;void 0===t&&(t={});var i=null!==(r=t.onlySupported)&&void 0!==r&&r;e=this._chooseHardfork(e,i);try{for(var o=c(this.hardforks()),s=o.next();!s.done;s=o.next()){var d=s.value;if(d.name===e&&null!==d.block)return!0}}catch(e){a={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return!1},t.prototype.activeHardforks=function(e,t){var a,n;void 0===t&&(t={});var r=[],i=this.hardforks();try{for(var o=c(i),s=o.next();!s.done;s=o.next()){var d=s.value;if(null!==d.block){if(null!=e&&e0)return a[a.length-1].name;throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return(0,p.toType)(t,p.TypeOutput.Number)},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new p.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new p.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,p.toType)(e,p.TypeOutput.BN),t=this._chooseHardfork(t,!1);var a=this.hardforkBlockBN(t);return!!a&&a.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return(0,p.toType)(t,p.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,a){var n=new p.BN(a.block);return n.gt(t)&&null===e?n:e}),null)},t.prototype.isNextHardforkBlock=function(e,t){e=(0,p.toType)(e,p.TypeOutput.BN),t=this._chooseHardfork(t,!1);var a=this.nextHardforkBlockBN(t);return null!==a&&a.eq(e)},t.prototype._calcForkHash=function(e){var t,a,n=r.from(this.genesis().hash.substr(2),"hex"),i=r.alloc(0),o=0;try{for(var s=c(this.hardforks()),d=s.next();!d.done;d=s.next()){var u=d.value,f=u.block;if(0!==f&&null!==f&&f!==o){var l=r.from(f.toString(16).padStart(16,"0"),"hex");i=r.concat([i,l])}if(u.name===e)break;null!==f&&(o=f)}}catch(e){t={error:e}}finally{try{d&&!d.done&&(a=s.return)&&a.call(s)}finally{if(t)throw t.error}}var b=r.concat([n,i]),m=(0,p.intToBuffer)((0,h.buf)(b)>>>0).toString("hex");return"0x".concat(m)},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block&&void 0===t.td)throw new Error("No fork hash calculation possible for future hardfork");return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams.genesis},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return a(2816);case"ropsten":return a(68332);case"rinkeby":return a(76270);case"kovan":return a(95943);case"goerli":return a(62734);case"sepolia":return a(99411)}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=c(this._customChains),r=n.next();!r.done;r=n.next()){var i=r.value;if(i[0].name===this.chainName())return i[1]}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams.hardforks},t.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},t.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,p.toType)(this.chainIdBN(),p.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new p.BN(this._chainParams.chainId)},t.prototype.chainName=function(){return this._chainParams.name},t.prototype.networkId=function(){return(0,p.toType)(this.networkIdBN(),p.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new p.BN(this._chainParams.networkId)},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,a,n=this.hardfork();try{for(var r=c(y.hardforks),i=r.next();!i.done;i=r.next()){var o=i.value;if("consensus"in o[1]&&(a=o[1].consensus.type),o[0]===n)break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return a||this._chainParams.consensus.type},t.prototype.consensusAlgorithm=function(){var e,t,a,n=this.hardfork();try{for(var r=c(y.hardforks),i=r.next();!i.done;i=r.next()){var o=i.value;if("consensus"in o[1]&&(a=o[1].consensus.algorithm),o[0]===n)break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return a||this._chainParams.consensus.algorithm},t.prototype.consensusConfig=function(){var e,t,a,n=this.hardfork();try{for(var r=c(y.hardforks),i=r.next();!i.done;i=r.next()){var o=i.value;if("consensus"in o[1]&&(a=o[1].consensus[o[1].consensus.algorithm]),o[0]===n)break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}if(a)return a;var s=this.consensusAlgorithm();return this._chainParams.consensus[s]},t.prototype.copy=function(){var e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e},t}(b.EventEmitter);t.default=x},7569:function(e){e.exports=(()=>{"use strict";var e={d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};return((e,t,a)=>{a.r(t),a.d(t,{default:()=>n});const n=JSON.parse('{"types":[{"minmax":[0,null],"types":{"BalanceWrapper":{"amount":"String"},"CurrencyId":{"_enum":{"Token":"TokenSymbol","ForeignAsset":"ForeignAssetId","LendToken":"LendTokenId","LpToken":"(LpToken, LpToken)","StableLpToken":"StablePoolId"}},"LpToken":{"_enum":{"Token":"TokenSymbol","ForeignAsset":"ForeignAssetId","StableLpToken":"StablePoolId"}},"InterbtcPrimitivesCurrencyId":{"_enum":{"Token":"InterbtcPrimitivesTokenSymbol","ForeignAsset":"InterbtcForeignAssetId","LendToken":"InterbtcLendTokenId","LpToken":"(InterbtcLpToken, InterbtcLpToken)","StableLpToken":"InterbtcStablePoolId"}},"InterbtcLpToken":{"_enum":{"Token":"InterbtcPrimitivesTokenSymbol","ForeignAsset":"InterbtcForeignAssetId","StableLpToken":"InterbtcStablePoolId"}},"InterbtcForeignAssetId":"u32","ForeignAssetId":"u32","InterbtcLendTokenId":"u32","InterbtcStablePoolId":"u32","LendTokenId":"u32","StablePoolId":"u32","NumberOrHex":{"_enum":{"Number":"u64","Hex":"U256"}},"Rate":"FixedU128","Ratio":"Permill","Liquidity":"FixedU128","Shortfall":"FixedU128","FundAccountJsonRpcRequest":{"account_id":"AccountId","currency_id":"InterbtcPrimitivesCurrencyId"},"H256Le":"H256","SignedFixedPoint":"FixedU128","TokenSymbol":{"_enum":{"DOT":0,"IBTC":1,"INTR":2,"KSM":10,"KBTC":11,"KINT":12}},"InterbtcPrimitivesTokenSymbol":{"_enum":{"DOT":0,"IBTC":1,"INTR":2,"KSM":10,"KBTC":11,"KINT":12}},"UnsignedFixedPoint":"FixedU128","VaultCurrencyPair":{"collateral":"CurrencyId","wrapped":"CurrencyId"},"VaultId":{"account_id":"AccountId","currencies":"VaultCurrencyPair"}}}],"rpc":{"btcRelay":{"verifyBlockHeaderInclusion":{"description":"Verify that the block with the given hash is included","params":[{"name":"block_hash","type":"H256Le"}],"type":"void"}},"escrow":{"balanceAt":{"description":"Get a given user\'s escrowed balance","params":[{"name":"account_id","type":"AccountId"},{"name":"height","type":"Option"}],"type":"BalanceWrapper"},"totalSupply":{"description":"Get the total voting supply in the system","params":[{"name":"height","type":"Option"}],"type":"BalanceWrapper"}},"loans":{"getCollateralLiquidity":{"description":"Retrieves collateral liquidity for the given user.","params":[{"name":"account","type":"AccountId"},{"name":"at","type":"BlockHash","isHistoric":true,"isOptional":true}],"type":"(Liquidity, Shortfall)","isSubscription":false,"jsonrpc":"loans_getCollateralLiquidity","method":"getCollateralLiquidity","section":"loans"},"getLiquidationThresholdLiquidity":{"description":"Retrieves liquidation threshold liquidity for the given user.","params":[{"name":"account","type":"AccountId"},{"name":"at","type":"BlockHash","isHistoric":true,"isOptional":true}],"type":"(Liquidity, Shortfall)","isSubscription":false,"jsonrpc":"loans_getLiquidationThresholdLiquidity","method":"getLiquidationThresholdLiquidity","section":"loans"},"getMarketStatus":{"description":"Retrieves market status data for a given asset id.","params":[{"name":"asset_id","type":"CurrencyId"},{"name":"at","type":"BlockHash","isHistoric":true,"isOptional":true}],"type":"(Rate, Rate, Rate, Ratio, Balance, Balance, FixedU128)","isSubscription":false,"jsonrpc":"loans_getMarketStatus","method":"getMarketStatus","section":"loans"}},"issue":{"getIssueRequests":{"description":"Get all issue request IDs for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec"},"getVaultIssueRequests":{"description":"Get all issue request IDs for a particular vault","params":[{"name":"vault_id","type":"AccountId"}],"type":"Vec"}},"oracle":{"collateralToWrapped":{"description":"Collateral to Wrapped exchange rate","params":[{"name":"amount","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"wrappedToCollateral":{"description":"Wrapped to Collateral exchange rate","params":[{"name":"amount","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"}},"redeem":{"getRedeemRequests":{"description":"Get all redeem request IDs for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec"},"getVaultRedeemRequests":{"description":"Get all redeem request IDs for a particular vault","params":[{"name":"vault_id","type":"AccountId"}],"type":"Vec"}},"refund":{"getRefundRequests":{"description":"Get all refund request IDs for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec"},"getRefundRequestsByIssueId":{"description":"Get all refund request IDs for a particular issue ID","params":[{"name":"issue_id","type":"H256"}],"type":"H256"},"getVaultRefundRequests":{"description":"Get all refund request IDs for a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec"}},"replace":{"getNewVaultReplaceRequests":{"description":"Get all replace request IDs to a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec"},"getOldVaultReplaceRequests":{"description":"Get all replace request IDs from a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec"}},"reward":{"estimateEscrowRewardRate":{"description":"Estimate the escrow reward rate for a given account","params":[{"name":"account_id","type":"AccountId"},{"name":"amount","type":"Option"},{"name":"lock_time","type":"Option"}],"type":"UnsignedFixedPoint"},"estimateVaultRewardRate":{"description":"Estimate the vault reward rate a given vault id","params":[{"name":"vault_id","type":"VaultId"}],"type":"UnsignedFixedPoint"},"computeEscrowReward":{"description":"Get a given user\'s rewards due","params":[{"name":"account_id","type":"AccountId"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"computeFarmingReward":{"description":"Get a given user\'s farming rewards due","params":[{"name":"account_id","type":"AccountId"},{"name":"pool_currency_id","type":"CurrencyId"},{"name":"reward_currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"computeVaultReward":{"description":"Get a given vault\'s rewards due","params":[{"name":"vault_id","type":"VaultId"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"}},"vaultRegistry":{"getCollateralizationFromVault":{"description":"Returns the collateralization of a specific vault","params":[{"name":"vault","type":"VaultId"},{"name":"only_issued","type":"bool"}],"type":"UnsignedFixedPoint"},"getCollateralizationFromVaultAndCollateral":{"description":"Returns the collateralization of a specific vault and collateral","params":[{"name":"vault","type":"VaultId"},{"name":"collateral","type":"BalanceWrapper"},{"name":"only_issued","type":"bool"}],"type":"UnsignedFixedPoint"},"getIssueableTokensFromVault":{"description":"Get the amount of tokens a vault can issue","params":[{"name":"vault","type":"VaultId"}],"type":"BalanceWrapper"},"getPremiumRedeemVaults":{"description":"Get all vaults below the premium redeem threshold.","params":[],"type":"Vec<(VaultId, BalanceWrapper)>"},"getRequiredCollateralForVault":{"description":"Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate","params":[{"name":"vault_id","type":"VaultId"}],"type":"BalanceWrapper"},"getRequiredCollateralForWrapped":{"description":"Get the amount of collateral required to issue an amount of InterBTC","params":[{"name":"amount_btc","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"getVaultCollateral":{"description":"Get the vault\'s collateral (excluding nomination)","params":[{"name":"vault_id","type":"VaultId"}],"type":"BalanceWrapper"},"getVaultTotalCollateral":{"description":"Get the vault\'s collateral (including nomination)","params":[{"name":"vault_id","type":"VaultId"}],"type":"BalanceWrapper"},"getVaultsByAccountId":{"description":"Get all vaults that are registered using the given account _id","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec"},"getVaultsWithIssuableTokens":{"description":"Get all vaults with non-zero issuable tokens, ordered in descending order of this amount","params":[],"type":"Vec<(VaultId, BalanceWrapper)>"},"getVaultsWithRedeemableTokens":{"description":"Get all vaults with non-zero redeemable tokens, ordered in descending order of this amount","params":[],"type":"Vec<(VaultId, BalanceWrapper)>"}},"dexStable":{"getA":{"description":"Get amplification coefficient of pool","params":[{"name":"pool_id","type":"StablePoolId"},{"name":"at","type":"BlockHash","isHistoric":true,"isOptional":true}],"type":"NumberOrHex"}}},"alias":{"tokens":{"AccountData":"OrmlAccountData","BalanceLock":"OrmlBalanceLock"}},"instances":{"balances":["ksm","kbtc","kint","dot","ibtc","intr"]}}')})(0,t,e),t})()},34248:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBlockchainProvider=t.IBlockchainAuthenticator=t.IPendingRequests=void 0;const n=a(61494),r=a(86844);t.IPendingRequests=class{constructor(e){this.storage=e}};class i extends n.IEvents{constructor(e){super(),this.config=e}}t.IBlockchainAuthenticator=i;class o extends r.IJsonRpcProvider{constructor(e,t){super(e)}}t.IBlockchainProvider=o},29835:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(22970);n.__exportStar(a(34248),t),n.__exportStar(a(5920),t),n.__exportStar(a(61494),t),n.__exportStar(a(28366),t),n.__exportStar(a(86844),t),n.__exportStar(a(74341),t),n.__exportStar(a(30663),t),n.__exportStar(a(66327),t)},5920:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},61494:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEvents=void 0,t.IEvents=class{}},28366:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMultiServiceProvider=void 0;const n=a(86844);class r extends n.IBaseJsonRpcProvider{constructor(e){super(),this.config=e}}t.IMultiServiceProvider=r},86844:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IJsonRpcProvider=t.IBaseJsonRpcProvider=t.IJsonRpcConnection=void 0;const n=a(61494);class r extends n.IEvents{constructor(e){super()}}t.IJsonRpcConnection=r;class i extends n.IEvents{constructor(){super()}}t.IBaseJsonRpcProvider=i,t.IJsonRpcProvider=class extends i{constructor(e){super()}}},74341:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IJsonRpcRouter=void 0,t.IJsonRpcRouter=class{constructor(e){this.routes=e}}},30663:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66327:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IJsonRpcValidator=void 0,t.IJsonRpcValidator=class{constructor(e){this.schemas=e}}},71423:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STANDARD_ERROR_MAP=t.SERVER_ERROR_CODE_RANGE=t.RESERVED_ERROR_CODES=t.SERVER_ERROR=t.INTERNAL_ERROR=t.INVALID_PARAMS=t.METHOD_NOT_FOUND=t.INVALID_REQUEST=t.PARSE_ERROR=void 0,t.PARSE_ERROR="PARSE_ERROR",t.INVALID_REQUEST="INVALID_REQUEST",t.METHOD_NOT_FOUND="METHOD_NOT_FOUND",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.RESERVED_ERROR_CODES=[-32700,-32600,-32601,-32602,-32603],t.SERVER_ERROR_CODE_RANGE=[-32e3,-32099],t.STANDARD_ERROR_MAP={[t.PARSE_ERROR]:{code:-32700,message:"Parse error"},[t.INVALID_REQUEST]:{code:-32600,message:"Invalid Request"},[t.METHOD_NOT_FOUND]:{code:-32601,message:"Method not found"},[t.INVALID_PARAMS]:{code:-32602,message:"Invalid params"},[t.INTERNAL_ERROR]:{code:-32603,message:"Internal error"},[t.SERVER_ERROR]:{code:-32e3,message:"Server error"}}},17001:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJs=void 0;const n=a(22970),r=a(36173);t.isNodeJs=r.isNode,n.__exportStar(a(36173),t)},46496:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonRpcError=t.getErrorByCode=t.getError=t.isValidErrorCode=t.isReservedErrorCode=t.isServerErrorCode=void 0;const n=a(71423);function r(e){return n.RESERVED_ERROR_CODES.includes(e)}function i(e){return"number"==typeof e}function o(e){return Object.values(n.STANDARD_ERROR_MAP).find((t=>t.code===e))||n.STANDARD_ERROR_MAP[n.INTERNAL_ERROR]}t.isServerErrorCode=function(e){return e<=n.SERVER_ERROR_CODE_RANGE[0]&&e>=n.SERVER_ERROR_CODE_RANGE[1]},t.isReservedErrorCode=r,t.isValidErrorCode=i,t.getError=function(e){return Object.keys(n.STANDARD_ERROR_MAP).includes(e)?n.STANDARD_ERROR_MAP[e]:n.STANDARD_ERROR_MAP[n.INTERNAL_ERROR]},t.getErrorByCode=o,t.validateJsonRpcError=function(e){if(void 0===e.error.code)return{valid:!1,error:"Missing code for JSON-RPC error"};if(void 0===e.error.message)return{valid:!1,error:"Missing message for JSON-RPC error"};if(!i(e.error.code))return{valid:!1,error:`Invalid error code type for JSON-RPC: ${e.error.code}`};if(r(e.error.code)){const t=o(e.error.code);if(t.message!==n.STANDARD_ERROR_MAP[n.INTERNAL_ERROR].message&&e.error.message===t.message)return{valid:!1,error:`Invalid error code message for JSON-RPC: ${e.error.code}`}}return{valid:!0}}},58539:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatErrorMessage=t.formatJsonRpcError=t.formatJsonRpcResult=t.formatJsonRpcRequest=t.payloadId=void 0;const n=a(46496),r=a(71423);function i(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}function o(e){if(void 0===e)return n.getError(r.INTERNAL_ERROR);if("string"==typeof e&&(e=Object.assign(Object.assign({},n.getError(r.SERVER_ERROR)),{message:e})),n.isReservedErrorCode(e.code)&&(e=n.getErrorByCode(e.code)),!n.isServerErrorCode(e.code))throw new Error("Error code is not in server code range");return e}t.payloadId=i,t.formatJsonRpcRequest=function(e,t,a){return{id:a||i(),jsonrpc:"2.0",method:e,params:t}},t.formatJsonRpcResult=function(e,t){return{id:e,jsonrpc:"2.0",result:t}},t.formatJsonRpcError=function(e,t){return{id:e,jsonrpc:"2.0",error:o(t)}},t.formatErrorMessage=o},87327:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(22970);n.__exportStar(a(71423),t),n.__exportStar(a(46496),t),n.__exportStar(a(17001),t),n.__exportStar(a(58539),t),n.__exportStar(a(19539),t),n.__exportStar(a(63128),t),n.__exportStar(a(43658),t)},19539:(e,t)=>{"use strict";function a(e){return"*"===e}function n(e){return!!a(e)||!!e.includes("*")&&2===e.split("*").length&&1===e.split("*").filter((e=>""===e.trim())).length}Object.defineProperty(t,"__esModule",{value:!0}),t.isValidTrailingWildcardRoute=t.isValidLeadingWildcardRoute=t.isValidWildcardRoute=t.isValidDefaultRoute=t.isValidRoute=void 0,t.isValidRoute=function(e){return e.includes("*")?n(e):!/\W/g.test(e)},t.isValidDefaultRoute=a,t.isValidWildcardRoute=n,t.isValidLeadingWildcardRoute=function(e){return!a(e)&&n(e)&&!e.split("*")[0].trim()},t.isValidTrailingWildcardRoute=function(e){return!a(e)&&n(e)&&!e.split("*")[1].trim()}},63128:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(22970).__exportStar(a(29835),t)},43658:(e,t)=>{"use strict";function a(e){return"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function n(e){return"result"in e}function r(e){return"error"in e}Object.defineProperty(t,"__esModule",{value:!0}),t.isJsonRpcValidationInvalid=t.isJsonRpcError=t.isJsonRpcResult=t.isJsonRpcResponse=t.isJsonRpcRequest=t.isJsonRpcPayload=void 0,t.isJsonRpcPayload=a,t.isJsonRpcRequest=function(e){return a(e)&&"method"in e},t.isJsonRpcResponse=function(e){return a(e)&&(n(e)||r(e))},t.isJsonRpcResult=n,t.isJsonRpcError=r,t.isJsonRpcValidationInvalid=function(e){return"error"in e&&!1===e.valid}},88053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rpc:{generateTaskId:{description:"Getting task ID given account ID and provided ID",params:[{name:"accountId",type:"AccountId"},{name:"providedId",type:"Text"}],type:"Hash"},getTimeAutomationFees:{description:"Retrieve automation fees",params:[{name:"action",type:"AutomationAction"},{name:"executions",type:"u32"}],type:"Balance"},calculateOptimalAutostaking:{description:"Calculate the optimal period to restake",params:[{name:"principal",type:"i128"},{name:"collator",type:"AccountId"}],type:"AutostakingResult"},getAutoCompoundDelegatedStakeTaskIds:{description:"Return autocompounding tasks by account",params:[{name:"account_id",type:"AccountId"}],type:"Vec"}},types:{AutomationAction:{_enum:["Notify","NativeTransfer","XCMP","AutoCompoundDelegatedStake"]},AutostakingResult:{period:"i32",apy:"f64"}}}},76690:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=t.types=t.definitions=void 0;const o=a(62699),c=i(a(88053)),s=i(a(59134));r(a(88053),t),r(a(59134),t),t.definitions={automationTime:c.default,xcmpHandler:s.default},t.types=(0,o.typesFromDefs)(t.definitions),t.rpc=(0,o.jsonrpcFromDefs)(t.definitions)},62699:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.typesFromDefs=t.typesAliasFromDefs=t.jsonrpcFromDefs=void 0;var r=n(a(41713));t.jsonrpcFromDefs=r.default;var i=n(a(90328));t.typesAliasFromDefs=i.default;var o=n(a(95490));t.typesFromDefs=o.default},41713:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.default=function(e,t){return void 0===t&&(t={}),Object.keys(e).filter((t=>{var a;return 0!==Object.keys((null===(a=e[t])||void 0===a?void 0:a.rpc)||{}).length})).forEach((a=>{t[a]={},Object.entries(e[a].rpc).forEach((e=>{let[n,r]=e;const i=!!r.pubsub;t[a][n]=o(o({},r),{},{isSubscription:i,jsonrpc:`${a}_${n}`,method:n,section:a})}))})),t};var r=n(a(26290));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t{"use strict";var n=a(71600);t.__esModule=!0,t.default=function(e,t){return void 0===t&&(t={}),Object.values(e).reduce(((e,t)=>{let{typesAlias:a}=t;return(0,r.default)({},a,e)}),t)};var r=n(a(51344))},95490:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.default=function(e,t){return void 0===t&&(t={}),Object.values(e).reduce(((e,t)=>{let{types:a}=t;return o(o({},e),a)}),t)};var r=n(a(26290));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rpc:{crossChainAccount:{description:"Find xcmp account id",params:[{name:"accountId",type:"AccountId32"}],type:"AccountId32"},fees:{description:"Determine fees for a scheduled xcmp task",params:[{name:"encodedXt",type:"Bytes"}],type:"u64"}},types:{}}},57718:(e,t,a)=>{"use strict";t.__esModule=!0,t.balance=void 0;var n=a(22542),r=a(39002);t.balance=(e,t)=>(0,n.memo)(e,((e,a)=>t.rpc.system.properties().pipe((0,r.mergeMap)((n=>{const i=t.registry.createType("CurrencyId",a),o=n.tokenSymbol.unwrapOrDefault()[0].toString(),c=t.registry.createType("CurrencyId",(t.registry.getDefinition("CurrencyId")||"").includes('"Token":"TokenSymbol"')?{Token:o}:o);if(i.eq(c))return t.query.system.account(e).pipe((0,r.map)((e=>e.data.free)));const s=t.query.tokens.accounts.creator.meta.type.asMap.key,[d]=t.registry.lookup.getSiType(s).def.asTuple,u="CurrencyId"===t.registry.lookup.getTypeDef(d).type?[a,e]:[e,a];return t.query.tokens.accounts(...u).pipe((0,r.map)((e=>e.free)))})))))},7761:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(57718);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},37986:(e,t,a)=>{"use strict";t.__esModule=!0,t.derive=void 0;const n={currencies:{balance:a(7761).balance}};t.derive=n},21386:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{CallOf:"Call",DispatchTime:{_enum:{At:"BlockNumber",After:"BlockNumber"}},ScheduleTaskIndex:"u32",DelayedOrigin:{delay:"BlockNumber",origin:"PalletsOrigin"},AuthorityOrigin:"DelayedOrigin"}}},13915:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{StorageValue:"Vec",GraduallyUpdate:{key:"StorageKey",targetValue:"StorageValue",perBlock:"StorageValue"},StorageKeyBytes:"Vec",StorageValueBytes:"Vec"}}},48183:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.typesAlias=t.types=t.rpc=void 0;var r=n(a(21386)),i=n(a(13915)),o=n(a(61006)),c=n(a(41940)),s=n(a(46955)),d=n(a(62857)),u=n(a(91496)),f=a(95870),l=n(a(35621));const b={authority:r.default,graduallyUpdates:i.default,oracle:o.default,tokens:d.default,traits:u.default,vesting:l.default,rewards:c.default,runtime:s.default},h=(0,f.typesFromDefs)(b);t.types=h;const p=(0,f.jsonrpcFromDefs)(b);t.rpc=p;const m=(0,f.typesAliasFromDefs)(b);t.typesAlias=m},61006:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{getValue:{description:"Retrieves the oracle value for a given key.",params:[{name:"providerId",type:"RpcDataProviderId"},{name:"key",type:"OracleKey"},{name:"at",type:"BlockHash",isHistoric:!0,isOptional:!0}],type:"Option"},getAllValues:{description:"Retrieves all oracle values.",params:[{name:"providerId",type:"RpcDataProviderId"},{name:"at",type:"BlockHash",isHistoric:!0,isOptional:!0}],type:"Vec<(OracleKey, Option)>"}},types:{RpcDataProviderId:"Text",DataProviderId:"u8",TimestampedValue:{value:"OracleValue",timestamp:"Moment"},TimestampedValueOf:"TimestampedValue",OrderedSet:"Vec"}}},41940:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{OrmlCurrencyId:"u8",PoolInfo:{totalShares:"Share",rewards:"BTreeMap"},CompactBalance:"Compact",PoolInfoV0:{totalShares:"Compact",totalRewards:"CompactBalance",totalWithdrawnRewards:"CompactBalance"},Share:"u128"}}},46955:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{OracleValue:"FixedU128"}}},62857:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{queryExistentialDeposit:{description:"Query Existential Deposit for a given currency.",params:[{name:"currencyId",type:"CurrencyId"},{name:"at",type:"BlockHash",isHistoric:!0,isOptional:!0}],type:"NumberOrHex"}},types:{OrmlAccountData:{free:"Balance",reserved:"Balance",frozen:"Balance"},OrmlBalanceLock:{amount:"Balance",id:"LockIdentifier"}},typesAlias:{tokens:{AccountData:"OrmlAccountData",BalanceLock:"OrmlBalanceLock"}}}},91496:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{AuctionInfo:{bid:"Option<(AccountId, Balance)>",start:"BlockNumber",end:"Option"},DelayedDispatchTime:{_enum:{At:"BlockNumber",After:"BlockNumber"}},DispatchId:"u32",Price:"FixedU128"}}},95870:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.typesFromDefs=t.typesAliasFromDefs=t.jsonrpcFromDefs=void 0;var r=n(a(90640));t.jsonrpcFromDefs=r.default;var i=n(a(5195));t.typesAliasFromDefs=i.default;var o=n(a(19579));t.typesFromDefs=o.default},90640:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.default=function(e,t){return void 0===t&&(t={}),Object.keys(e).filter((t=>{var a;return 0!==Object.keys((null===(a=e[t])||void 0===a?void 0:a.rpc)||{}).length})).forEach((a=>{t[a]={},Object.entries(e[a].rpc).forEach((e=>{let[n,r]=e;const i=!!r.pubsub;t[a][n]=o(o({},r),{},{isSubscription:i,jsonrpc:`${a}_${n}`,method:n,section:a})}))})),t};var r=n(a(26290));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t{"use strict";var n=a(71600);t.__esModule=!0,t.default=function(e,t){return void 0===t&&(t={}),Object.values(e).reduce(((e,t)=>{let{typesAlias:a}=t;return(0,r.default)({},a,e)}),t)};var r=n(a(51344))},19579:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.default=function(e,t){return void 0===t&&(t={}),Object.values(e).reduce(((e,t)=>{let{types:a}=t;return o(o({},e),a)}),t)};var r=n(a(26290));function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t{"use strict";t.__esModule=!0,t.default=void 0,t.default={rpc:{},types:{OrmlVestingSchedule:{start:"BlockNumber",period:"BlockNumber",periodCount:"u32",perPeriod:"Compact"},VestingScheduleOf:"OrmlVestingSchedule"}}},51568:(e,t,a)=>{"use strict";function n(){return(null===a.g||void 0===a.g?void 0:a.g.crypto)||(null===a.g||void 0===a.g?void 0:a.g.msCrypto)||{}}function r(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=r,t.isBrowserCryptoAvailable=function(){return!!n()&&!!r()}},38026:(e,t,a)=>{"use strict";var n=a(34406);function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function i(){return void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=r,t.isNode=i,t.isBrowser=function(){return!r()&&!i()}},36173:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[a]}})}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||t.hasOwnProperty(a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(a(51568),t),r(a(38026),t)},40938:e=>{"use strict";var t=Object.prototype.hasOwnProperty,a="~";function n(){}function r(e,t,a){this.fn=e,this.context=t,this.once=a||!1}function i(e,t,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new r(n,i||e,o),s=a?a+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],c]:e._events[s].push(c):(e._events[s]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),c.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(a?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},c.prototype.listeners=function(e){var t=a?a+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r{"use strict";var t=Object.prototype.hasOwnProperty,a="~";function n(){}function r(e,t,a){this.fn=e,this.context=t,this.once=a||!1}function i(e,t,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new r(n,i||e,o),s=a?a+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],c]:e._events[s].push(c):(e._events[s]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),c.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(a?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},c.prototype.listeners=function(e){var t=a?a+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r{"use strict";var t=Object.prototype.hasOwnProperty,a="~";function n(){}function r(e,t,a){this.fn=e,this.context=t,this.once=a||!1}function i(e,t,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new r(n,i||e,o),s=a?a+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],c]:e._events[s].push(c):(e._events[s]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),c.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(a?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},c.prototype.listeners=function(e){var t=a?a+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r{"use strict";e.exports=function(e,t){for(var a=new Array(arguments.length-1),n=0,r=2,i=!0;r{"use strict";var a=t;a.length=function(e){var t=e.length;if(!t)return 0;for(var a=0;--t%4>1&&"="===e.charAt(t);)++a;return Math.ceil(3*e.length)/4-a};for(var n=new Array(64),r=new Array(123),i=0;i<64;)r[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;a.encode=function(e,t,a){for(var r,i=null,o=[],c=0,s=0;t>2],r=(3&d)<<4,s=1;break;case 1:o[c++]=n[r|d>>4],r=(15&d)<<2,s=2;break;case 2:o[c++]=n[r|d>>6],o[c++]=n[63&d],s=0}c>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),c=0)}return s&&(o[c++]=n[r],o[c++]=61,1===s&&(o[c++]=61)),i?(c&&i.push(String.fromCharCode.apply(String,o.slice(0,c))),i.join("")):String.fromCharCode.apply(String,o.slice(0,c))};var o="invalid encoding";a.decode=function(e,t,a){for(var n,i=a,c=0,s=0;s1)break;if(void 0===(d=r[d]))throw Error(o);switch(c){case 0:n=d,c=1;break;case 1:t[a++]=n<<2|(48&d)>>4,n=d,c=2;break;case 2:t[a++]=(15&n)<<4|(60&d)>>2,n=d,c=3;break;case 3:t[a++]=(3&n)<<6|d,c=0}}if(1===c)throw Error(o);return a-i},a.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},1706:e=>{"use strict";function t(e,a){"string"==typeof e&&(a=e,e=void 0);var n=[];function r(e){if("string"!=typeof e){var a=i();if(t.verbose&&console.log("codegen: "+a),a="return "+a,e){for(var o=Object.keys(e),c=new Array(o.length+1),s=new Array(o.length),d=0;d{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:a||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var a=this._listeners[e],n=0;n{"use strict";e.exports=i;var n=a(46781),r=a(36116)("fs");function i(e,t,a){return"function"==typeof t?(a=t,t={}):t||(t={}),a?!t.xhr&&r&&r.readFile?r.readFile(e,(function(n,r){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,a):n?a(n):a(null,t.binary?r:r.toString("utf8"))})):i.xhr(e,t,a):n(i,this,e,t)}i.xhr=function(e,t,a){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return a(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var r=0;r{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),a=new Uint8Array(t.buffer),n=128===a[3];function r(e,n,r){t[0]=e,n[r]=a[0],n[r+1]=a[1],n[r+2]=a[2],n[r+3]=a[3]}function i(e,n,r){t[0]=e,n[r]=a[3],n[r+1]=a[2],n[r+2]=a[1],n[r+3]=a[0]}function o(e,n){return a[0]=e[n],a[1]=e[n+1],a[2]=e[n+2],a[3]=e[n+3],t[0]}function c(e,n){return a[3]=e[n],a[2]=e[n+1],a[1]=e[n+2],a[0]=e[n+3],t[0]}e.writeFloatLE=n?r:i,e.writeFloatBE=n?i:r,e.readFloatLE=n?o:c,e.readFloatBE=n?c:o}():function(){function t(e,t,a,n){var r=t<0?1:0;if(r&&(t=-t),0===t)e(1/t>0?0:2147483648,a,n);else if(isNaN(t))e(2143289344,a,n);else if(t>34028234663852886e22)e((r<<31|2139095040)>>>0,a,n);else if(t<11754943508222875e-54)e((r<<31|Math.round(t/1401298464324817e-60))>>>0,a,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((r<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,a,n)}}function o(e,t,a){var n=e(t,a),r=2*(n>>31)+1,i=n>>>23&255,o=8388607&n;return 255===i?o?NaN:r*(1/0):0===i?1401298464324817e-60*r*o:r*Math.pow(2,i-150)*(o+8388608)}e.writeFloatLE=t.bind(null,a),e.writeFloatBE=t.bind(null,n),e.readFloatLE=o.bind(null,r),e.readFloatBE=o.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),a=new Uint8Array(t.buffer),n=128===a[7];function r(e,n,r){t[0]=e,n[r]=a[0],n[r+1]=a[1],n[r+2]=a[2],n[r+3]=a[3],n[r+4]=a[4],n[r+5]=a[5],n[r+6]=a[6],n[r+7]=a[7]}function i(e,n,r){t[0]=e,n[r]=a[7],n[r+1]=a[6],n[r+2]=a[5],n[r+3]=a[4],n[r+4]=a[3],n[r+5]=a[2],n[r+6]=a[1],n[r+7]=a[0]}function o(e,n){return a[0]=e[n],a[1]=e[n+1],a[2]=e[n+2],a[3]=e[n+3],a[4]=e[n+4],a[5]=e[n+5],a[6]=e[n+6],a[7]=e[n+7],t[0]}function c(e,n){return a[7]=e[n],a[6]=e[n+1],a[5]=e[n+2],a[4]=e[n+3],a[3]=e[n+4],a[2]=e[n+5],a[1]=e[n+6],a[0]=e[n+7],t[0]}e.writeDoubleLE=n?r:i,e.writeDoubleBE=n?i:r,e.readDoubleLE=n?o:c,e.readDoubleBE=n?c:o}():function(){function t(e,t,a,n,r,i){var o=n<0?1:0;if(o&&(n=-n),0===n)e(0,r,i+t),e(1/n>0?0:2147483648,r,i+a);else if(isNaN(n))e(0,r,i+t),e(2146959360,r,i+a);else if(n>17976931348623157e292)e(0,r,i+t),e((o<<31|2146435072)>>>0,r,i+a);else{var c;if(n<22250738585072014e-324)e((c=n/5e-324)>>>0,r,i+t),e((o<<31|c/4294967296)>>>0,r,i+a);else{var s=Math.floor(Math.log(n)/Math.LN2);1024===s&&(s=1023),e(4503599627370496*(c=n*Math.pow(2,-s))>>>0,r,i+t),e((o<<31|s+1023<<20|1048576*c&1048575)>>>0,r,i+a)}}}function o(e,t,a,n,r){var i=e(n,r+t),o=e(n,r+a),c=2*(o>>31)+1,s=o>>>20&2047,d=4294967296*(1048575&o)+i;return 2047===s?d?NaN:c*(1/0):0===s?5e-324*c*d:c*Math.pow(2,s-1075)*(d+4503599627370496)}e.writeDoubleLE=t.bind(null,a,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=o.bind(null,r,0,4),e.readDoubleBE=o.bind(null,i,4,0)}(),e}function a(e,t,a){t[a]=255&e,t[a+1]=e>>>8&255,t[a+2]=e>>>16&255,t[a+3]=e>>>24}function n(e,t,a){t[a]=e>>>24,t[a+1]=e>>>16&255,t[a+2]=e>>>8&255,t[a+3]=255&e}function r(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},36116:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},82659:(e,t)=>{"use strict";var a=t,n=a.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},r=a.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),a=n(e),r="";a&&(r=t.shift()+"/");for(var i=0;i0&&".."!==t[i-1]?t.splice(--i,2):a?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return r+t.join("/")};a.resolve=function(e,t,a){return a||(t=r(t)),n(t)?t:(a||(e=r(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?r(e+"/"+t):t)}},90804:e=>{"use strict";e.exports=function(e,t,a){var n=a||8192,r=n>>>1,i=null,o=n;return function(a){if(a<1||a>r)return e(a);o+a>n&&(i=e(n),o=0);var c=t.call(i,o,o+=a);return 7&o&&(o=1+(7|o)),c}}},57958:(e,t)=>{"use strict";var a=t;a.length=function(e){for(var t=0,a=0,n=0;n191&&n<224?i[o++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[o++]=55296+(n>>10),i[o++]=56320+(1023&n)):i[o++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,i)),o=0);return r?(o&&r.push(String.fromCharCode.apply(String,i.slice(0,o))),r.join("")):String.fromCharCode.apply(String,i.slice(0,o))},a.write=function(e,t,a){for(var n,r,i=a,o=0;o>6|192,t[a++]=63&n|128):55296==(64512&n)&&56320==(64512&(r=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&r),++o,t[a++]=n>>18|240,t[a++]=n>>12&63|128,t[a++]=n>>6&63|128,t[a++]=63&n|128):(t[a++]=n>>12|224,t[a++]=n>>6&63|128,t[a++]=63&n|128);return a-i}},9437:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(85457);function r(e,t,a){return void 0===t&&(t=new Uint8Array(2)),void 0===a&&(a=0),t[a+0]=e>>>8,t[a+1]=e>>>0,t}function i(e,t,a){return void 0===t&&(t=new Uint8Array(2)),void 0===a&&(a=0),t[a+0]=e>>>0,t[a+1]=e>>>8,t}function o(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function c(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function s(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function d(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function u(e,t,a){return void 0===t&&(t=new Uint8Array(4)),void 0===a&&(a=0),t[a+0]=e>>>24,t[a+1]=e>>>16,t[a+2]=e>>>8,t[a+3]=e>>>0,t}function f(e,t,a){return void 0===t&&(t=new Uint8Array(4)),void 0===a&&(a=0),t[a+0]=e>>>0,t[a+1]=e>>>8,t[a+2]=e>>>16,t[a+3]=e>>>24,t}function l(e,t,a){return void 0===t&&(t=new Uint8Array(8)),void 0===a&&(a=0),u(e/4294967296>>>0,t,a),u(e>>>0,t,a+4),t}function b(e,t,a){return void 0===t&&(t=new Uint8Array(8)),void 0===a&&(a=0),f(e>>>0,t,a),f(e/4294967296>>>0,t,a+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=r,t.writeInt16BE=r,t.writeUint16LE=i,t.writeInt16LE=i,t.readInt32BE=o,t.readUint32BE=c,t.readInt32LE=s,t.readUint32LE=d,t.writeUint32BE=u,t.writeInt32BE=u,t.writeUint32LE=f,t.writeInt32LE=f,t.readInt64BE=function(e,t){void 0===t&&(t=0);var a=o(e,t),n=o(e,t+4);return 4294967296*a+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*c(e,t)+c(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var a=s(e,t);return 4294967296*s(e,t+4)+a-4294967296*(a>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var a=d(e,t);return 4294967296*d(e,t+4)+a},t.writeUint64BE=l,t.writeInt64BE=l,t.writeUint64LE=b,t.writeInt64LE=b,t.readUintBE=function(e,t,a){if(void 0===a&&(a=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-a)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,r=1,i=e/8+a-1;i>=a;i--)n+=t[i]*r,r*=256;return n},t.readUintLE=function(e,t,a){if(void 0===a&&(a=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-a)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,r=1,i=a;i=r;o--)a[o]=t/i&255,i*=256;return a},t.writeUintLE=function(e,t,a,r){if(void 0===a&&(a=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(9437),r=a(52887);function i(e,t,a){for(var r=1634760805,i=857760878,o=2036477234,c=1797285236,s=a[3]<<24|a[2]<<16|a[1]<<8|a[0],d=a[7]<<24|a[6]<<16|a[5]<<8|a[4],u=a[11]<<24|a[10]<<16|a[9]<<8|a[8],f=a[15]<<24|a[14]<<16|a[13]<<8|a[12],l=a[19]<<24|a[18]<<16|a[17]<<8|a[16],b=a[23]<<24|a[22]<<16|a[21]<<8|a[20],h=a[27]<<24|a[26]<<16|a[25]<<8|a[24],p=a[31]<<24|a[30]<<16|a[29]<<8|a[28],m=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],g=t[11]<<24|t[10]<<16|t[9]<<8|t[8],x=t[15]<<24|t[14]<<16|t[13]<<8|t[12],v=r,w=i,I=o,A=c,S=s,k=d,C=u,E=f,T=l,P=b,O=h,B=p,M=m,R=y,N=g,D=x,V=0;V<20;V+=2)S=(S^=T=T+(M=(M^=v=v+S|0)>>>16|M<<16)|0)>>>20|S<<12,k=(k^=P=P+(R=(R^=w=w+k|0)>>>16|R<<16)|0)>>>20|k<<12,C=(C^=O=O+(N=(N^=I=I+C|0)>>>16|N<<16)|0)>>>20|C<<12,E=(E^=B=B+(D=(D^=A=A+E|0)>>>16|D<<16)|0)>>>20|E<<12,C=(C^=O=O+(N=(N^=I=I+C|0)>>>24|N<<8)|0)>>>25|C<<7,E=(E^=B=B+(D=(D^=A=A+E|0)>>>24|D<<8)|0)>>>25|E<<7,k=(k^=P=P+(R=(R^=w=w+k|0)>>>24|R<<8)|0)>>>25|k<<7,S=(S^=T=T+(M=(M^=v=v+S|0)>>>24|M<<8)|0)>>>25|S<<7,k=(k^=O=O+(D=(D^=v=v+k|0)>>>16|D<<16)|0)>>>20|k<<12,C=(C^=B=B+(M=(M^=w=w+C|0)>>>16|M<<16)|0)>>>20|C<<12,E=(E^=T=T+(R=(R^=I=I+E|0)>>>16|R<<16)|0)>>>20|E<<12,S=(S^=P=P+(N=(N^=A=A+S|0)>>>16|N<<16)|0)>>>20|S<<12,E=(E^=T=T+(R=(R^=I=I+E|0)>>>24|R<<8)|0)>>>25|E<<7,S=(S^=P=P+(N=(N^=A=A+S|0)>>>24|N<<8)|0)>>>25|S<<7,C=(C^=B=B+(M=(M^=w=w+C|0)>>>24|M<<8)|0)>>>25|C<<7,k=(k^=O=O+(D=(D^=v=v+k|0)>>>24|D<<8)|0)>>>25|k<<7;n.writeUint32LE(v+r|0,e,0),n.writeUint32LE(w+i|0,e,4),n.writeUint32LE(I+o|0,e,8),n.writeUint32LE(A+c|0,e,12),n.writeUint32LE(S+s|0,e,16),n.writeUint32LE(k+d|0,e,20),n.writeUint32LE(C+u|0,e,24),n.writeUint32LE(E+f|0,e,28),n.writeUint32LE(T+l|0,e,32),n.writeUint32LE(P+b|0,e,36),n.writeUint32LE(O+h|0,e,40),n.writeUint32LE(B+p|0,e,44),n.writeUint32LE(M+m|0,e,48),n.writeUint32LE(R+y|0,e,52),n.writeUint32LE(N+g|0,e,56),n.writeUint32LE(D+x|0,e,60)}function o(e,t,a,n,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=o,t.stream=function(e,t,a,n){return void 0===n&&(n=0),r.wipe(a),o(e,t,a,a,n)}},42934:(e,t,a)=>{"use strict";var n=a(13832),r=a(19780),i=a(52887),o=a(9437),c=a(3283);t.Cv=32,t.WH=12,t.pg=16;var s=new Uint8Array(16),d=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,a,r){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(e,o.length-e.length);var c=new Uint8Array(32);n.stream(this._key,o,c,4);var s,d=t.length+this.tagLength;if(r){if(r.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");s=r}else s=new Uint8Array(d);return n.streamXOR(this._key,o,t,s,4),this._authenticate(s.subarray(s.length-this.tagLength,s.length),c,s.subarray(0,s.length-this.tagLength),a),i.wipe(o),s},e.prototype.open=function(e,t,a,r){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&c.update(s.subarray(n.length%16))),c.update(a),a.length%16>0&&c.update(s.subarray(a.length%16));var d=new Uint8Array(8);n&&o.writeUint64LE(n.length,d),c.update(d),o.writeUint64LE(a.length,d),c.update(d);for(var u=c.digest(),f=0;f{"use strict";function a(e,t){if(e.length!==t.length)return 0;for(var a=0,n=0;n>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,a){return~(e-1)&t|e-1&a},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=a,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==a(e,t)}},27728:(e,t,a)=>{"use strict";t.Xx=t._w=t.aP=t.KS=t.jQ=void 0;a(81293);const n=a(46756);a(52887);function r(e){const t=new Float64Array(16);if(e)for(let a=0;a>16&1),a[e-1]&=65535;a[15]=n[15]-32767-(a[14]>>16&1);const e=a[15]>>16&1;a[14]&=65535,l(n,a,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}function h(e){const t=new Uint8Array(32);return b(t,e),1&t[0]}function p(e,t,a){for(let n=0;n<16;n++)e[n]=t[n]+a[n]}function m(e,t,a){for(let n=0;n<16;n++)e[n]=t[n]-a[n]}function y(e,t,a){let n,r,i=0,o=0,c=0,s=0,d=0,u=0,f=0,l=0,b=0,h=0,p=0,m=0,y=0,g=0,x=0,v=0,w=0,I=0,A=0,S=0,k=0,C=0,E=0,T=0,P=0,O=0,B=0,M=0,R=0,N=0,D=0,V=a[0],L=a[1],U=a[2],H=a[3],K=a[4],F=a[5],j=a[6],q=a[7],z=a[8],W=a[9],G=a[10],X=a[11],Z=a[12],J=a[13],Y=a[14],Q=a[15];n=t[0],i+=n*V,o+=n*L,c+=n*U,s+=n*H,d+=n*K,u+=n*F,f+=n*j,l+=n*q,b+=n*z,h+=n*W,p+=n*G,m+=n*X,y+=n*Z,g+=n*J,x+=n*Y,v+=n*Q,n=t[1],o+=n*V,c+=n*L,s+=n*U,d+=n*H,u+=n*K,f+=n*F,l+=n*j,b+=n*q,h+=n*z,p+=n*W,m+=n*G,y+=n*X,g+=n*Z,x+=n*J,v+=n*Y,w+=n*Q,n=t[2],c+=n*V,s+=n*L,d+=n*U,u+=n*H,f+=n*K,l+=n*F,b+=n*j,h+=n*q,p+=n*z,m+=n*W,y+=n*G,g+=n*X,x+=n*Z,v+=n*J,w+=n*Y,I+=n*Q,n=t[3],s+=n*V,d+=n*L,u+=n*U,f+=n*H,l+=n*K,b+=n*F,h+=n*j,p+=n*q,m+=n*z,y+=n*W,g+=n*G,x+=n*X,v+=n*Z,w+=n*J,I+=n*Y,A+=n*Q,n=t[4],d+=n*V,u+=n*L,f+=n*U,l+=n*H,b+=n*K,h+=n*F,p+=n*j,m+=n*q,y+=n*z,g+=n*W,x+=n*G,v+=n*X,w+=n*Z,I+=n*J,A+=n*Y,S+=n*Q,n=t[5],u+=n*V,f+=n*L,l+=n*U,b+=n*H,h+=n*K,p+=n*F,m+=n*j,y+=n*q,g+=n*z,x+=n*W,v+=n*G,w+=n*X,I+=n*Z,A+=n*J,S+=n*Y,k+=n*Q,n=t[6],f+=n*V,l+=n*L,b+=n*U,h+=n*H,p+=n*K,m+=n*F,y+=n*j,g+=n*q,x+=n*z,v+=n*W,w+=n*G,I+=n*X,A+=n*Z,S+=n*J,k+=n*Y,C+=n*Q,n=t[7],l+=n*V,b+=n*L,h+=n*U,p+=n*H,m+=n*K,y+=n*F,g+=n*j,x+=n*q,v+=n*z,w+=n*W,I+=n*G,A+=n*X,S+=n*Z,k+=n*J,C+=n*Y,E+=n*Q,n=t[8],b+=n*V,h+=n*L,p+=n*U,m+=n*H,y+=n*K,g+=n*F,x+=n*j,v+=n*q,w+=n*z,I+=n*W,A+=n*G,S+=n*X,k+=n*Z,C+=n*J,E+=n*Y,T+=n*Q,n=t[9],h+=n*V,p+=n*L,m+=n*U,y+=n*H,g+=n*K,x+=n*F,v+=n*j,w+=n*q,I+=n*z,A+=n*W,S+=n*G,k+=n*X,C+=n*Z,E+=n*J,T+=n*Y,P+=n*Q,n=t[10],p+=n*V,m+=n*L,y+=n*U,g+=n*H,x+=n*K,v+=n*F,w+=n*j,I+=n*q,A+=n*z,S+=n*W,k+=n*G,C+=n*X,E+=n*Z,T+=n*J,P+=n*Y,O+=n*Q,n=t[11],m+=n*V,y+=n*L,g+=n*U,x+=n*H,v+=n*K,w+=n*F,I+=n*j,A+=n*q,S+=n*z,k+=n*W,C+=n*G,E+=n*X,T+=n*Z,P+=n*J,O+=n*Y,B+=n*Q,n=t[12],y+=n*V,g+=n*L,x+=n*U,v+=n*H,w+=n*K,I+=n*F,A+=n*j,S+=n*q,k+=n*z,C+=n*W,E+=n*G,T+=n*X,P+=n*Z,O+=n*J,B+=n*Y,M+=n*Q,n=t[13],g+=n*V,x+=n*L,v+=n*U,w+=n*H,I+=n*K,A+=n*F,S+=n*j,k+=n*q,C+=n*z,E+=n*W,T+=n*G,P+=n*X,O+=n*Z,B+=n*J,M+=n*Y,R+=n*Q,n=t[14],x+=n*V,v+=n*L,w+=n*U,I+=n*H,A+=n*K,S+=n*F,k+=n*j,C+=n*q,E+=n*z,T+=n*W,P+=n*G,O+=n*X,B+=n*Z,M+=n*J,R+=n*Y,N+=n*Q,n=t[15],v+=n*V,w+=n*L,I+=n*U,A+=n*H,S+=n*K,k+=n*F,C+=n*j,E+=n*q,T+=n*z,P+=n*W,O+=n*G,B+=n*X,M+=n*Z,R+=n*J,N+=n*Y,D+=n*Q,i+=38*w,o+=38*I,c+=38*A,s+=38*S,d+=38*k,u+=38*C,f+=38*E,l+=38*T,b+=38*P,h+=38*O,p+=38*B,m+=38*M,y+=38*R,g+=38*N,x+=38*D,r=1,n=i+r+65535,r=Math.floor(n/65536),i=n-65536*r,n=o+r+65535,r=Math.floor(n/65536),o=n-65536*r,n=c+r+65535,r=Math.floor(n/65536),c=n-65536*r,n=s+r+65535,r=Math.floor(n/65536),s=n-65536*r,n=d+r+65535,r=Math.floor(n/65536),d=n-65536*r,n=u+r+65535,r=Math.floor(n/65536),u=n-65536*r,n=f+r+65535,r=Math.floor(n/65536),f=n-65536*r,n=l+r+65535,r=Math.floor(n/65536),l=n-65536*r,n=b+r+65535,r=Math.floor(n/65536),b=n-65536*r,n=h+r+65535,r=Math.floor(n/65536),h=n-65536*r,n=p+r+65535,r=Math.floor(n/65536),p=n-65536*r,n=m+r+65535,r=Math.floor(n/65536),m=n-65536*r,n=y+r+65535,r=Math.floor(n/65536),y=n-65536*r,n=g+r+65535,r=Math.floor(n/65536),g=n-65536*r,n=x+r+65535,r=Math.floor(n/65536),x=n-65536*r,n=v+r+65535,r=Math.floor(n/65536),v=n-65536*r,i+=r-1+37*(r-1),r=1,n=i+r+65535,r=Math.floor(n/65536),i=n-65536*r,n=o+r+65535,r=Math.floor(n/65536),o=n-65536*r,n=c+r+65535,r=Math.floor(n/65536),c=n-65536*r,n=s+r+65535,r=Math.floor(n/65536),s=n-65536*r,n=d+r+65535,r=Math.floor(n/65536),d=n-65536*r,n=u+r+65535,r=Math.floor(n/65536),u=n-65536*r,n=f+r+65535,r=Math.floor(n/65536),f=n-65536*r,n=l+r+65535,r=Math.floor(n/65536),l=n-65536*r,n=b+r+65535,r=Math.floor(n/65536),b=n-65536*r,n=h+r+65535,r=Math.floor(n/65536),h=n-65536*r,n=p+r+65535,r=Math.floor(n/65536),p=n-65536*r,n=m+r+65535,r=Math.floor(n/65536),m=n-65536*r,n=y+r+65535,r=Math.floor(n/65536),y=n-65536*r,n=g+r+65535,r=Math.floor(n/65536),g=n-65536*r,n=x+r+65535,r=Math.floor(n/65536),x=n-65536*r,n=v+r+65535,r=Math.floor(n/65536),v=n-65536*r,i+=r-1+37*(r-1),e[0]=i,e[1]=o,e[2]=c,e[3]=s,e[4]=d,e[5]=u,e[6]=f,e[7]=l,e[8]=b,e[9]=h,e[10]=p,e[11]=m,e[12]=y,e[13]=g,e[14]=x,e[15]=v}function g(e,t){y(e,t,t)}function x(e,t){const a=r(),n=r(),i=r(),o=r(),s=r(),d=r(),u=r(),f=r(),l=r();m(a,e[1],e[0]),m(l,t[1],t[0]),y(a,a,l),p(n,e[0],e[1]),p(l,t[0],t[1]),y(n,n,l),y(i,e[3],t[3]),y(i,i,c),y(o,e[2],t[2]),p(o,o,o),m(s,n,a),m(d,o,i),p(u,o,i),p(f,n,a),y(e[0],s,d),y(e[1],f,u),y(e[2],u,d),y(e[3],s,f)}function v(e,t,a){for(let n=0;n<4;n++)l(e[n],t[n],a)}function w(e,t){const a=r(),n=r(),i=r();(function(e,t){const a=r();let n;for(n=0;n<16;n++)a[n]=t[n];for(n=253;n>=0;n--)g(a,a),2!==n&&4!==n&&y(a,a,t);for(n=0;n<16;n++)e[n]=a[n]})(i,t[2]),y(a,t[0],i),y(n,t[1],i),b(e,n),e[31]^=h(a)<<7}function I(e,t){const a=[r(),r(),r(),r()];u(a[0],s),u(a[1],d),u(a[2],o),y(a[3],s,d),function(e,t,a){u(e[0],i),u(e[1],o),u(e[2],o),u(e[3],i);for(let n=255;n>=0;--n){const r=a[n/8|0]>>(7&n)&1;v(e,t,r),x(t,e),x(e,e),v(e,t,r)}}(e,a,t)}t._w=function(e){if(e.length!==t.aP)throw new Error(`ed25519: seed must be ${t.aP} bytes`);const a=(0,n.hash)(e);a[0]&=248,a[31]&=127,a[31]|=64;const i=new Uint8Array(32),o=[r(),r(),r(),r()];I(o,a),w(i,o);const c=new Uint8Array(64);return c.set(e),c.set(i,32),{publicKey:i,secretKey:c}};const A=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function S(e,t){let a,n,r,i;for(n=63;n>=32;--n){for(a=0,r=n-32,i=n-12;r>4)*A[r],a=t[r]>>8,t[r]&=255;for(r=0;r<32;r++)t[r]-=a*A[r];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function k(e){const t=new Float64Array(64);for(let a=0;a<64;a++)t[a]=e[a];for(let t=0;t<64;t++)e[t]=0;S(e,t)}t.Xx=function(e,t){const a=new Float64Array(64),i=[r(),r(),r(),r()],o=(0,n.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;const c=new Uint8Array(64);c.set(o.subarray(32),32);const s=new n.SHA512;s.update(c.subarray(32)),s.update(t);const d=s.digest();s.clean(),k(d),I(i,d),w(c,i),s.reset(),s.update(c.subarray(0,32)),s.update(e.subarray(32)),s.update(t);const u=s.digest();k(u);for(let e=0;e<32;e++)a[e]=d[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)a[e+t]+=u[e]*o[t];return S(c.subarray(32),a),c}},7:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},71133:(e,t,a)=>{"use strict";var n=a(56169),r=a(52887),i=function(){function e(e,t,a,r){void 0===a&&(a=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=n.hmac(this._hash,a,t);this._hmac=new n.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(7),r=a(3283),i=a(52887),o=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var a=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(a).clean():a.set(t);for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var a=65535&e,n=65535&t;return a*n+((e>>>16&65535)*n+a*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},19780:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(3283),r=a(52887);t.DIGEST_LENGTH=16;var i=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var a=e[0]|e[1]<<8;this._r[0]=8191&a;var n=e[2]|e[3]<<8;this._r[1]=8191&(a>>>13|n<<3);var r=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|r<<6);var i=e[6]|e[7]<<8;this._r[3]=8191&(r>>>7|i<<9);var o=e[8]|e[9]<<8;this._r[4]=255&(i>>>4|o<<12),this._r[5]=o>>>1&8190;var c=e[10]|e[11]<<8;this._r[6]=8191&(o>>>14|c<<2);var s=e[12]|e[13]<<8;this._r[7]=8065&(c>>>11|s<<5);var d=e[14]|e[15]<<8;this._r[8]=8191&(s>>>8|d<<8),this._r[9]=d>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,a){for(var n=this._fin?0:2048,r=this._h[0],i=this._h[1],o=this._h[2],c=this._h[3],s=this._h[4],d=this._h[5],u=this._h[6],f=this._h[7],l=this._h[8],b=this._h[9],h=this._r[0],p=this._r[1],m=this._r[2],y=this._r[3],g=this._r[4],x=this._r[5],v=this._r[6],w=this._r[7],I=this._r[8],A=this._r[9];a>=16;){var S=e[t+0]|e[t+1]<<8;r+=8191&S;var k=e[t+2]|e[t+3]<<8;i+=8191&(S>>>13|k<<3);var C=e[t+4]|e[t+5]<<8;o+=8191&(k>>>10|C<<6);var E=e[t+6]|e[t+7]<<8;c+=8191&(C>>>7|E<<9);var T=e[t+8]|e[t+9]<<8;s+=8191&(E>>>4|T<<12),d+=T>>>1&8191;var P=e[t+10]|e[t+11]<<8;u+=8191&(T>>>14|P<<2);var O=e[t+12]|e[t+13]<<8;f+=8191&(P>>>11|O<<5);var B=e[t+14]|e[t+15]<<8,M=0,R=M;R+=r*h,R+=i*(5*A),R+=o*(5*I),R+=c*(5*w),M=(R+=s*(5*v))>>>13,R&=8191,R+=d*(5*x),R+=u*(5*g),R+=f*(5*y),R+=(l+=8191&(O>>>8|B<<8))*(5*m);var N=M+=(R+=(b+=B>>>5|n)*(5*p))>>>13;N+=r*p,N+=i*h,N+=o*(5*A),N+=c*(5*I),M=(N+=s*(5*w))>>>13,N&=8191,N+=d*(5*v),N+=u*(5*x),N+=f*(5*g),N+=l*(5*y),M+=(N+=b*(5*m))>>>13,N&=8191;var D=M;D+=r*m,D+=i*p,D+=o*h,D+=c*(5*A),M=(D+=s*(5*I))>>>13,D&=8191,D+=d*(5*w),D+=u*(5*v),D+=f*(5*x),D+=l*(5*g);var V=M+=(D+=b*(5*y))>>>13;V+=r*y,V+=i*m,V+=o*p,V+=c*h,M=(V+=s*(5*A))>>>13,V&=8191,V+=d*(5*I),V+=u*(5*w),V+=f*(5*v),V+=l*(5*x);var L=M+=(V+=b*(5*g))>>>13;L+=r*g,L+=i*y,L+=o*m,L+=c*p,M=(L+=s*h)>>>13,L&=8191,L+=d*(5*A),L+=u*(5*I),L+=f*(5*w),L+=l*(5*v);var U=M+=(L+=b*(5*x))>>>13;U+=r*x,U+=i*g,U+=o*y,U+=c*m,M=(U+=s*p)>>>13,U&=8191,U+=d*h,U+=u*(5*A),U+=f*(5*I),U+=l*(5*w);var H=M+=(U+=b*(5*v))>>>13;H+=r*v,H+=i*x,H+=o*g,H+=c*y,M=(H+=s*m)>>>13,H&=8191,H+=d*p,H+=u*h,H+=f*(5*A),H+=l*(5*I);var K=M+=(H+=b*(5*w))>>>13;K+=r*w,K+=i*v,K+=o*x,K+=c*g,M=(K+=s*y)>>>13,K&=8191,K+=d*m,K+=u*p,K+=f*h,K+=l*(5*A);var F=M+=(K+=b*(5*I))>>>13;F+=r*I,F+=i*w,F+=o*v,F+=c*x,M=(F+=s*g)>>>13,F&=8191,F+=d*y,F+=u*m,F+=f*p,F+=l*h;var j=M+=(F+=b*(5*A))>>>13;j+=r*A,j+=i*I,j+=o*w,j+=c*v,M=(j+=s*x)>>>13,j&=8191,j+=d*g,j+=u*y,j+=f*m,j+=l*p,r=R=8191&(M=(M=((M+=(j+=b*h)>>>13)<<2)+M|0)+(R&=8191)|0),i=N+=M>>>=13,o=D&=8191,c=V&=8191,s=L&=8191,d=U&=8191,u=H&=8191,f=K&=8191,l=F&=8191,b=j&=8191,t+=16,a-=16}this._h[0]=r,this._h[1]=i,this._h[2]=o,this._h[3]=c,this._h[4]=s,this._h[5]=d,this._h[6]=u,this._h[7]=f,this._h[8]=l,this._h[9]=b},e.prototype.finish=function(e,t){void 0===t&&(t=0);var a,n,r,i,o=new Uint16Array(10);if(this._leftover){for(i=this._leftover,this._buffer[i++]=1;i<16;i++)this._buffer[i]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(a=this._h[1]>>>13,this._h[1]&=8191,i=2;i<10;i++)this._h[i]+=a,a=this._h[i]>>>13,this._h[i]&=8191;for(this._h[0]+=5*a,a=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=a,a=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=a,o[0]=this._h[0]+5,a=o[0]>>>13,o[0]&=8191,i=1;i<10;i++)o[i]=this._h[i]+a,a=o[i]>>>13,o[i]&=8191;for(o[9]-=8192,n=(1^a)-1,i=0;i<10;i++)o[i]&=n;for(n=~n,i=0;i<10;i++)this._h[i]=this._h[i]&n|o[i];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),r=this._h[0]+this._pad[0],this._h[0]=65535&r,i=1;i<8;i++)r=(this._h[i]+this._pad[i]|0)+(r>>>16)|0,this._h[i]=65535&r;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,a=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var r=0;r=16&&(t=n-n%16,this._blocks(e,a,t),a+=t,n-=t),n){for(r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const n=a(5147),r=a(9437),i=a(52887);function o(e,a=t.defaultRandomSource){return a.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=o,t.randomUint32=function(e=t.defaultRandomSource){const a=o(4,e),n=(0,r.readUint32LE)(a);return(0,i.wipe)(a),n};const c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(e,a=c,n=t.defaultRandomSource){if(a.length<2)throw new Error("randomString charset is too short");if(a.length>256)throw new Error("randomString charset is too long");let r="";const s=a.length,d=256-256%s;for(;e>0;){const t=o(Math.ceil(256*e/d),n);for(let n=0;n0;n++){const i=t[n];i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0,t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=a(52887);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=a(75477);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const a=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=a(82017),r=a(17879);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new r.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},49013:(e,t,a)=>{"use strict";var n=a(9437),r=a(52887);t.k=32,t.cn=64;var i=function(){function e(){this.digestLength=t.k,this.blockSize=t.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var a=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[a++],t--;this._bufferLength===this.blockSize&&(c(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(a=c(this._temp,this._state,e,a,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[a++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,a=this._bufferLength,r=t/536870912|0,i=t<<3,o=t%64<56?64:128;this._buffer[a]=128;for(var s=a+1;s0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){r.wipe(e.state),e.buffer&&r.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=i;var o=new Int32Array([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 c(e,t,a,r,i){for(;i>=64;){for(var c=t[0],s=t[1],d=t[2],u=t[3],f=t[4],l=t[5],b=t[6],h=t[7],p=0;p<16;p++){var m=r+4*p;e[p]=n.readUint32BE(a,m)}for(p=16;p<64;p++){var y=e[p-2],g=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,x=((y=e[p-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;e[p]=(g+e[p-7]|0)+(x+e[p-16]|0)}for(p=0;p<64;p++)g=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&l^~f&b)|0)+(h+(o[p]+e[p]|0)|0)|0,x=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&s^c&d^s&d)|0,h=b,b=l,l=f,f=u+g|0,u=d,d=s,s=c,c=g+x|0;t[0]+=c,t[1]+=s,t[2]+=d,t[3]+=u,t[4]+=f,t[5]+=l,t[6]+=b,t[7]+=h,r+=64,i-=64}return r}t.vp=function(e){var t=new i;t.update(e);var a=t.digest();return t.clean(),a}},46756:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(9437),r=a(52887);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var i=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,a){if(void 0===a&&(a=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=a,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],a--;this._bufferLength===this.blockSize&&(c(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(a>=this.blockSize&&(n=c(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,a),a%=this.blockSize);a>0;)this._buffer[this._bufferLength++]=e[n++],a--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,a=this._bufferLength,r=t/536870912|0,i=t<<3,o=t%128<112?128:256;this._buffer[a]=128;for(var s=a+1;s0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){r.wipe(e.stateHi),r.wipe(e.stateLo),e.buffer&&r.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=i;var o=new Int32Array([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 c(e,t,a,r,i,c,s){for(var d,u,f,l,b,h,p,m,y=a[0],g=a[1],x=a[2],v=a[3],w=a[4],I=a[5],A=a[6],S=a[7],k=r[0],C=r[1],E=r[2],T=r[3],P=r[4],O=r[5],B=r[6],M=r[7];s>=128;){for(var R=0;R<16;R++){var N=8*R+c;e[R]=n.readUint32BE(i,N),t[R]=n.readUint32BE(i,N+4)}for(R=0;R<80;R++){var D,V,L=y,U=g,H=x,K=v,F=w,j=I,q=A,z=k,W=C,G=E,X=T,Z=P,J=O,Y=B;if(b=65535&(u=M),h=u>>>16,p=65535&(d=S),m=d>>>16,b+=65535&(u=(P>>>14|w<<18)^(P>>>18|w<<14)^(w>>>9|P<<23)),h+=u>>>16,p+=65535&(d=(w>>>14|P<<18)^(w>>>18|P<<14)^(P>>>9|w<<23)),m+=d>>>16,b+=65535&(u=P&O^~P&B),h+=u>>>16,p+=65535&(d=w&I^~w&A),m+=d>>>16,d=o[2*R],b+=65535&(u=o[2*R+1]),h+=u>>>16,p+=65535&d,m+=d>>>16,d=e[R%16],h+=(u=t[R%16])>>>16,p+=65535&d,m+=d>>>16,p+=(h+=(b+=65535&u)>>>16)>>>16,b=65535&(u=l=65535&b|h<<16),h=u>>>16,p=65535&(d=f=65535&p|(m+=p>>>16)<<16),m=d>>>16,b+=65535&(u=(k>>>28|y<<4)^(y>>>2|k<<30)^(y>>>7|k<<25)),h+=u>>>16,p+=65535&(d=(y>>>28|k<<4)^(k>>>2|y<<30)^(k>>>7|y<<25)),m+=d>>>16,h+=(u=k&C^k&E^C&E)>>>16,p+=65535&(d=y&g^y&x^g&x),m+=d>>>16,D=65535&(p+=(h+=(b+=65535&u)>>>16)>>>16)|(m+=p>>>16)<<16,V=65535&b|h<<16,b=65535&(u=X),h=u>>>16,p=65535&(d=K),m=d>>>16,h+=(u=l)>>>16,p+=65535&(d=f),m+=d>>>16,g=L,x=U,v=H,w=K=65535&(p+=(h+=(b+=65535&u)>>>16)>>>16)|(m+=p>>>16)<<16,I=F,A=j,S=q,y=D,C=z,E=W,T=G,P=X=65535&b|h<<16,O=Z,B=J,M=Y,k=V,R%16==15)for(N=0;N<16;N++)d=e[N],b=65535&(u=t[N]),h=u>>>16,p=65535&d,m=d>>>16,d=e[(N+9)%16],b+=65535&(u=t[(N+9)%16]),h+=u>>>16,p+=65535&d,m+=d>>>16,f=e[(N+1)%16],b+=65535&(u=((l=t[(N+1)%16])>>>1|f<<31)^(l>>>8|f<<24)^(l>>>7|f<<25)),h+=u>>>16,p+=65535&(d=(f>>>1|l<<31)^(f>>>8|l<<24)^f>>>7),m+=d>>>16,f=e[(N+14)%16],h+=(u=((l=t[(N+14)%16])>>>19|f<<13)^(f>>>29|l<<3)^(l>>>6|f<<26))>>>16,p+=65535&(d=(f>>>19|l<<13)^(l>>>29|f<<3)^f>>>6),m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,e[N]=65535&p|m<<16,t[N]=65535&b|h<<16}b=65535&(u=k),h=u>>>16,p=65535&(d=y),m=d>>>16,d=a[0],h+=(u=r[0])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[0]=y=65535&p|m<<16,r[0]=k=65535&b|h<<16,b=65535&(u=C),h=u>>>16,p=65535&(d=g),m=d>>>16,d=a[1],h+=(u=r[1])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[1]=g=65535&p|m<<16,r[1]=C=65535&b|h<<16,b=65535&(u=E),h=u>>>16,p=65535&(d=x),m=d>>>16,d=a[2],h+=(u=r[2])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[2]=x=65535&p|m<<16,r[2]=E=65535&b|h<<16,b=65535&(u=T),h=u>>>16,p=65535&(d=v),m=d>>>16,d=a[3],h+=(u=r[3])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[3]=v=65535&p|m<<16,r[3]=T=65535&b|h<<16,b=65535&(u=P),h=u>>>16,p=65535&(d=w),m=d>>>16,d=a[4],h+=(u=r[4])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[4]=w=65535&p|m<<16,r[4]=P=65535&b|h<<16,b=65535&(u=O),h=u>>>16,p=65535&(d=I),m=d>>>16,d=a[5],h+=(u=r[5])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[5]=I=65535&p|m<<16,r[5]=O=65535&b|h<<16,b=65535&(u=B),h=u>>>16,p=65535&(d=A),m=d>>>16,d=a[6],h+=(u=r[6])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[6]=A=65535&p|m<<16,r[6]=B=65535&b|h<<16,b=65535&(u=M),h=u>>>16,p=65535&(d=S),m=d>>>16,d=a[7],h+=(u=r[7])>>>16,p+=65535&d,m+=d>>>16,m+=(p+=(h+=(b+=65535&u)>>>16)>>>16)>>>16,a[7]=S=65535&p|m<<16,r[7]=M=65535&b|h<<16,c+=128,s-=128}return c}t.hash=function(e){var t=new i;t.update(e);var a=t.digest();return t.clean(),a}},52887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t{"use strict";t.gi=t.Au=t.KS=t.kz=void 0;const n=a(81293),r=a(52887);function i(e){const t=new Float64Array(16);if(e)for(let a=0;a=0;--e){const t=a[e>>>3]>>>(7&e)&1;d(r,o,t),d(h,p,t),u(m,r,h),f(r,r,h),u(h,o,p),f(o,o,p),b(p,m),b(y,r),l(r,h,r),l(h,o,m),u(m,r,h),f(r,r,h),b(o,r),f(h,p,y),l(r,h,c),u(r,r,p),l(h,h,r),l(r,p,y),l(p,o,n),b(o,m),d(r,o,t),d(h,p,t)}for(let e=0;e<16;e++)n[e+16]=r[e],n[e+32]=h[e],n[e+48]=o[e],n[e+64]=p[e];const g=n.subarray(32),x=n.subarray(16);!function(e,t){const a=i();for(let e=0;e<16;e++)a[e]=t[e];for(let e=253;e>=0;e--)b(a,a),2!==e&&4!==e&&l(a,a,t);for(let t=0;t<16;t++)e[t]=a[t]}(g,g),l(x,x,g);const v=new Uint8Array(32);return function(e,t){const a=i(),n=i();for(let e=0;e<16;e++)n[e]=t[e];s(n),s(n),s(n);for(let e=0;e<2;e++){a[0]=n[0]-65517;for(let e=1;e<15;e++)a[e]=n[e]-65535-(a[e-1]>>16&1),a[e-1]&=65535;a[15]=n[15]-32767-(a[14]>>16&1);const e=a[15]>>16&1;a[14]&=65535,d(n,a,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}(v,x),v}t.Au=function(e){const a=(0,n.randomBytes)(32,e),i=function(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const a=new Uint8Array(e);return{publicKey:(n=a,h(n,o)),secretKey:a};var n}(a);return(0,r.wipe)(a),i},t.gi=function(e,a,n=!1){if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(a.length!==t.kz)throw new Error("X25519: incorrect public key length");const r=h(e,a);if(n){let e=0;for(let t=0;t{"use strict";function n(){return(null===a.g||void 0===a.g?void 0:a.g.crypto)||(null===a.g||void 0===a.g?void 0:a.g.msCrypto)||{}}function r(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=r,t.isBrowserCryptoAvailable=function(){return!!n()&&!!r()}},64250:(e,t,a)=>{"use strict";var n=a(34406);function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function i(){return void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=r,t.isNode=i,t.isBrowser=function(){return!r()&&!i()}},5010:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(7297);n.__exportStar(a(45086),t),n.__exportStar(a(64250),t)},7297:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__assign:()=>i,__asyncDelegator:()=>v,__asyncGenerator:()=>x,__asyncValues:()=>w,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>C,__createBinding:()=>l,__decorate:()=>c,__exportStar:()=>b,__extends:()=>r,__generator:()=>f,__importDefault:()=>S,__importStar:()=>A,__makeTemplateObject:()=>I,__metadata:()=>d,__param:()=>s,__read:()=>p,__rest:()=>o,__spread:()=>m,__spreadArrays:()=>y,__values:()=>h});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},n(e,t)};function r(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var i=function(){return i=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=0;c--)(r=e[c])&&(o=(i<3?r(o):i>3?r(t,a,o):r(t,a))||o);return i>3&&o&&Object.defineProperty(t,a,o),o}function s(e,t){return function(a,n){t(a,n,e)}}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))}function f(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function m(){for(var e=[],t=0;t1||c(e,t)}))})}function c(e,t){try{(a=r[e](t)).value instanceof g?Promise.resolve(a.value.v).then(s,d):u(i[0][2],a)}catch(e){u(i[0][3],e)}var a}function s(e){c("next",e)}function d(e){c("throw",e)}function u(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function v(e){var t,a;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(a=!a)?{value:g(e[n](t)),done:"return"===n}:r?r(t):t}:r}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,r){!function(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}(n,r,(t=e[a](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,a),a}},5774:(e,t,a)=>{"use strict";a.d(t,{q:()=>n});class n{}},33843:(e,t,a)=>{"use strict";a.r(t),a.d(t,{IEvents:()=>n.q});var n=a(5774)},57052:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEARTBEAT_EVENTS=t.HEARTBEAT_INTERVAL=void 0;const n=a(10666);t.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,t.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},13566:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(87592).__exportStar(a(57052),t)},47798:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartBeat=void 0;const n=a(87592),r=a(22699),i=a(10666),o=a(87826),c=a(13566);class s extends o.IHeartBeat{constructor(e){super(e),this.events=new r.EventEmitter,this.interval=c.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||c.HEARTBEAT_INTERVAL}static init(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=new s(e);return yield t.init(),t}))}init(){return n.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return n.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),i.toMiliseconds(this.interval))}))}pulse(){this.events.emit(c.HEARTBEAT_EVENTS.pulse)}}t.HeartBeat=s},67660:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(87592);n.__exportStar(a(47798),t),n.__exportStar(a(87826),t),n.__exportStar(a(13566),t)},81829:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHeartBeat=void 0;const n=a(33843);class r extends n.IEvents{constructor(e){super()}}t.IHeartBeat=r},87826:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(87592).__exportStar(a(81829),t)},87592:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__assign:()=>i,__asyncDelegator:()=>v,__asyncGenerator:()=>x,__asyncValues:()=>w,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>C,__createBinding:()=>l,__decorate:()=>c,__exportStar:()=>b,__extends:()=>r,__generator:()=>f,__importDefault:()=>S,__importStar:()=>A,__makeTemplateObject:()=>I,__metadata:()=>d,__param:()=>s,__read:()=>p,__rest:()=>o,__spread:()=>m,__spreadArrays:()=>y,__values:()=>h});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},n(e,t)};function r(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var i=function(){return i=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=0;c--)(r=e[c])&&(o=(i<3?r(o):i>3?r(t,a,o):r(t,a))||o);return i>3&&o&&Object.defineProperty(t,a,o),o}function s(e,t){return function(a,n){t(a,n,e)}}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))}function f(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function m(){for(var e=[],t=0;t1||c(e,t)}))})}function c(e,t){try{(a=r[e](t)).value instanceof g?Promise.resolve(a.value.v).then(s,d):u(i[0][2],a)}catch(e){u(i[0][3],e)}var a}function s(e){c("next",e)}function d(e){c("throw",e)}function u(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function v(e){var t,a;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(a=!a)?{value:g(e[n](t)),done:"return"===n}:r?r(t):t}:r}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,r){!function(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}(n,r,(t=e[a](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,a),a}},77814:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},68385:(e,t,a)=>{"use strict";const n=a(70110),r=a(26041),i=n.__importDefault(a(12585)),o=a(21833);t.ZP=class{constructor(){this.localStorage=i.default}getKeys(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.keys(this.localStorage)}))}getEntries(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.entries(this.localStorage).map(o.parseEntry)}))}getItem(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=this.localStorage.getItem(e);if(null!==t)return r.safeJsonParse(t)}))}setItem(e,t){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.setItem(e,r.safeJsonStringify(t))}))}removeItem(e){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.removeItem(e)}))}}},12585:(e,t,a)=>{"use strict";!function(){let t;function n(){}t=n,t.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},t.prototype.setItem=function(e,t){this[e]=String(t)},t.prototype.removeItem=function(e){delete this[e]},t.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},t.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},t.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),void 0!==a.g&&a.g.localStorage?e.exports=a.g.localStorage:"undefined"!=typeof window&&window.localStorage?e.exports=window.localStorage:e.exports=new n}()},21833:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(70110);n.__exportStar(a(72073),t),n.__exportStar(a(50863),t)},72073:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeyValueStorage=void 0,t.IKeyValueStorage=class{}},50863:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEntry=void 0;const n=a(26041);t.parseEntry=function(e){var t;return[e[0],n.safeJsonParse(null!==(t=e[1])&&void 0!==t?t:"")]}},70110:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__assign:()=>i,__asyncDelegator:()=>v,__asyncGenerator:()=>x,__asyncValues:()=>w,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>C,__createBinding:()=>l,__decorate:()=>c,__exportStar:()=>b,__extends:()=>r,__generator:()=>f,__importDefault:()=>S,__importStar:()=>A,__makeTemplateObject:()=>I,__metadata:()=>d,__param:()=>s,__read:()=>p,__rest:()=>o,__spread:()=>m,__spreadArrays:()=>y,__values:()=>h});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},n(e,t)};function r(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var i=function(){return i=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=0;c--)(r=e[c])&&(o=(i<3?r(o):i>3?r(t,a,o):r(t,a))||o);return i>3&&o&&Object.defineProperty(t,a,o),o}function s(e,t){return function(a,n){t(a,n,e)}}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))}function f(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function m(){for(var e=[],t=0;t1||c(e,t)}))})}function c(e,t){try{(a=r[e](t)).value instanceof g?Promise.resolve(a.value.v).then(s,d):u(i[0][2],a)}catch(e){u(i[0][3],e)}var a}function s(e){c("next",e)}function d(e){c("throw",e)}function u(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function v(e){var t,a;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(a=!a)?{value:g(e[n](t)),done:"return"===n}:r?r(t):t}:r}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,r){!function(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}(n,r,(t=e[a](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,a),a}},47337:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PINO_CUSTOM_CONTEXT_KEY=t.PINO_LOGGER_DEFAULTS=void 0,t.PINO_LOGGER_DEFAULTS={level:"info"},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},52500:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const n=a(42126),r=n.__importDefault(a(69413));Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return r.default}}),n.__exportStar(a(47337),t),n.__exportStar(a(48846),t)},48846:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const n=a(47337);function r(e,t=n.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}function i(e,t,a=n.PINO_CUSTOM_CONTEXT_KEY){return e[a]=t,e}function o(e,t=n.PINO_CUSTOM_CONTEXT_KEY){let a="";return a=void 0===e.bindings?r(e,t):e.bindings().context||"",a}function c(e,t,a=n.PINO_CUSTOM_CONTEXT_KEY){const r=o(e,a);return r.trim()?`${r}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null==e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=r,t.setBrowserLoggerContext=i,t.getLoggerContext=o,t.formatChildLoggerContext=c,t.generateChildLogger=function(e,t,a=n.PINO_CUSTOM_CONTEXT_KEY){const r=c(e,t,a);return i(e.child({context:r}),r,a)}},42126:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__assign:()=>i,__asyncDelegator:()=>v,__asyncGenerator:()=>x,__asyncValues:()=>w,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>C,__createBinding:()=>l,__decorate:()=>c,__exportStar:()=>b,__extends:()=>r,__generator:()=>f,__importDefault:()=>S,__importStar:()=>A,__makeTemplateObject:()=>I,__metadata:()=>d,__param:()=>s,__read:()=>p,__rest:()=>o,__spread:()=>m,__spreadArrays:()=>y,__values:()=>h});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},n(e,t)};function r(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var i=function(){return i=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=0;c--)(r=e[c])&&(o=(i<3?r(o):i>3?r(t,a,o):r(t,a))||o);return i>3&&o&&Object.defineProperty(t,a,o),o}function s(e,t){return function(a,n){t(a,n,e)}}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))}function f(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function m(){for(var e=[],t=0;t1||c(e,t)}))})}function c(e,t){try{(a=r[e](t)).value instanceof g?Promise.resolve(a.value.v).then(s,d):u(i[0][2],a)}catch(e){u(i[0][3],e)}var a}function s(e){c("next",e)}function d(e){c("throw",e)}function u(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function v(e){var t,a;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(a=!a)?{value:g(e[n](t)),done:"return"===n}:r?r(t):t}:r}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,r){!function(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}(n,r,(t=e[a](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,a),a}},64187:()=>{},3947:()=>{},27025:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(52388);n.__exportStar(a(9567),t),n.__exportStar(a(16994),t)},9567:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},16994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},10666:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(52388);n.__exportStar(a(88914),t),n.__exportStar(a(1415),t),n.__exportStar(a(28580),t),n.__exportStar(a(27025),t)},28580:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(52388).__exportStar(a(5955),t)},5955:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0,t.IWatch=class{}},5492:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=a(27025);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},64539:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},88914:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(52388);n.__exportStar(a(64539),t),n.__exportStar(a(5492),t)},1415:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class a{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const a=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:a})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=a,t.default=a},52388:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__assign:()=>i,__asyncDelegator:()=>v,__asyncGenerator:()=>x,__asyncValues:()=>w,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>C,__createBinding:()=>l,__decorate:()=>c,__exportStar:()=>b,__extends:()=>r,__generator:()=>f,__importDefault:()=>S,__importStar:()=>A,__makeTemplateObject:()=>I,__metadata:()=>d,__param:()=>s,__read:()=>p,__rest:()=>o,__spread:()=>m,__spreadArrays:()=>y,__values:()=>h});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},n(e,t)};function r(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var i=function(){return i=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=0;c--)(r=e[c])&&(o=(i<3?r(o):i>3?r(t,a,o):r(t,a))||o);return i>3&&o&&Object.defineProperty(t,a,o),o}function s(e,t){return function(a,n){t(a,n,e)}}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))}function f(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function m(){for(var e=[],t=0;t1||c(e,t)}))})}function c(e,t){try{(a=r[e](t)).value instanceof g?Promise.resolve(a.value.v).then(s,d):u(i[0][2],a)}catch(e){u(i[0][3],e)}var a}function s(e){c("next",e)}function d(e){c("throw",e)}function u(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function v(e){var t,a;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(a=!a)?{value:g(e[n](t)),done:"return"===n}:r?r(t):t}:r}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,r){!function(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}(n,r,(t=e[a](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,a),a}},4997:(e,t)=>{"use strict";function a(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function n(e){const t=a(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=a,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return a("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return a("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return a("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return a("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return a("localStorage")}},51726:(e,t,a)=>{"use strict";t.D=void 0;const n=a(4997);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function a(...t){const a=e.getElementsByTagName("meta");for(let e=0;en.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(r.length&&r){const e=n.getAttribute("content");if(e)return e}}return""}const r=function(){let t=a("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:a("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const a=e.getElementsByTagName("link"),n=[];for(let e=0;e-1){const e=r.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let a=t.protocol+"//"+t.host;if(0===e.indexOf("/"))a+=e;else{const n=t.pathname.split("/");n.pop(),a+=n.join("/")+"/"+e}n.push(a)}else if(0===e.indexOf("//")){const a=t.protocol+e;n.push(a)}else n.push(e)}}return n}(),name:r}}},22812:(e,t,a)=>{"use strict";const n=t;n.bignum=a(90735),n.define=a(45192).define,n.base=a(84798),n.constants=a(96906),n.decoders=a(18211),n.encoders=a(89116)},45192:(e,t,a)=>{"use strict";const n=a(89116),r=a(18211),i=a(91285);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function a(e){this._initNamed(e,t)}return i(a,e),a.prototype._initNamed=function(t,a){e.call(this,t,a)},new a(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r[e])),this.decoders[e]},o.prototype.decode=function(e,t,a){return this._getDecoder(t).decode(e,a)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},o.prototype.encode=function(e,t,a){return this._getEncoder(t).encode(e,a)}},47362:(e,t,a)=>{"use strict";const n=a(91285),r=a(80126).b,i=a(27654).Buffer;function o(e,t){r.call(this,t),i.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function c(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return c.isEncoderBuffer(e)||(e=new c(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=i.byteLength(e);else{if(!i.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(o,r),t.C=o,o.isDecoderBuffer=function(e){return e instanceof o||"object"==typeof e&&i.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},o.prototype.save=function(){return{offset:this.offset,reporter:r.prototype.save.call(this)}},o.prototype.restore=function(e){const t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,r.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const a=new o(this.base);return a._reporterState=this._reporterState,a.offset=this.offset,a.length=this.offset+e,this.offset+=e,a},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=c,c.isEncoderBuffer=function(e){return e instanceof c||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},c.prototype.join=function(e,t){return e||(e=i.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(a){a.join(e,t),t+=a.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):i.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},84798:(e,t,a)=>{"use strict";const n=t;n.Reporter=a(80126).b,n.DecoderBuffer=a(47362).C,n.EncoderBuffer=a(47362).R,n.Node=a(80847)},80847:(e,t,a)=>{"use strict";const n=a(80126).b,r=a(47362).R,i=a(47362).C,o=a(79561),c=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(c);function d(e,t,a){const n={};this._baseState=n,n.name=a,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=d;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];d.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(a){t[a]=e[a]}));const a=new this.constructor(t.parent);return a._baseState=t,a},d.prototype._wrap=function(){const e=this._baseState;s.forEach((function(t){this[t]=function(){const a=new this.constructor(this);return e.children.push(a),a[t].apply(a,arguments)}}),this)},d.prototype._init=function(e){const t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},d.prototype._useArgs=function(e){const t=this._baseState,a=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==a.length&&(o(null===t.children),t.children=a,a.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(a){a==(0|a)&&(a|=0);const n=e[a];t[n]=a})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){d.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),c.forEach((function(e){d.prototype[e]=function(){const t=this._baseState,a=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(a),this}})),d.prototype.use=function(e){o(e);const t=this._baseState;return o(null===t.use),t.use=e,this},d.prototype.optional=function(){return this._baseState.optional=!0,this},d.prototype.def=function(e){const t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},d.prototype.explicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},d.prototype.implicit=function(e){const t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},d.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},d.prototype.key=function(e){const t=this._baseState;return o(null===t.key),t.key=e,this},d.prototype.any=function(){return this._baseState.any=!0,this},d.prototype.choice=function(e){const t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},d.prototype.contains=function(e){const t=this._baseState;return o(null===t.use),t.contains=e,this},d.prototype._decode=function(e,t){const a=this._baseState;if(null===a.parent)return e.wrapResult(a.children[0]._decode(e,t));let n,r=a.default,o=!0,c=null;if(null!==a.key&&(c=e.enterKey(a.key)),a.optional){let n=null;if(null!==a.explicit?n=a.explicit:null!==a.implicit?n=a.implicit:null!==a.tag&&(n=a.tag),null!==n||a.any){if(o=this._peekTag(e,n,a.any),e.isError(o))return o}else{const n=e.save();try{null===a.choice?this._decodeGeneric(a.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(n)}}if(a.obj&&o&&(n=e.enterObject()),o){if(null!==a.explicit){const t=this._decodeTag(e,a.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===a.use&&null===a.choice){let t;a.any&&(t=e.save());const n=this._decodeTag(e,null!==a.implicit?a.implicit:a.tag,a.any);if(e.isError(n))return n;a.any?r=e.raw(t):e=n}if(t&&t.track&&null!==a.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==a.tag&&t.track(e.path(),e.offset,e.length,"content"),a.any||(r=null===a.choice?this._decodeGeneric(a.tag,e,t):this._decodeChoice(e,t)),e.isError(r))return r;if(a.any||null!==a.choice||null===a.children||a.children.forEach((function(a){a._decode(e,t)})),a.contains&&("octstr"===a.tag||"bitstr"===a.tag)){const n=new i(r);r=this._getUse(a.contains,e._reporterState.obj)._decode(n,t)}}return a.obj&&o&&(r=e.leaveObject(n)),null===a.key||null===r&&!0!==o?null!==c&&e.exitKey(c):e.leaveKey(c,a.key,r),r},d.prototype._decodeGeneric=function(e,t,a){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],a):/str$/.test(e)?this._decodeStr(t,e,a):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],a):"objid"===e?this._decodeObjid(t,null,null,a):"gentime"===e||"utctime"===e?this._decodeTime(t,e,a):"null_"===e?this._decodeNull(t,a):"bool"===e?this._decodeBool(t,a):"objDesc"===e?this._decodeStr(t,e,a):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],a):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,a):t.error("unknown tag: "+e)},d.prototype._getUse=function(e,t){const a=this._baseState;return a.useDecoder=this._use(e,t),o(null===a.useDecoder._baseState.parent),a.useDecoder=a.useDecoder._baseState.children[0],a.implicit!==a.useDecoder._baseState.implicit&&(a.useDecoder=a.useDecoder.clone(),a.useDecoder._baseState.implicit=a.implicit),a.useDecoder},d.prototype._decodeChoice=function(e,t){const a=this._baseState;let n=null,r=!1;return Object.keys(a.choice).some((function(i){const o=e.save(),c=a.choice[i];try{const a=c._decode(e,t);if(e.isError(a))return!1;n={type:i,value:a},r=!0}catch(t){return e.restore(o),!1}return!0}),this),r?n:e.error("Choice not matched")},d.prototype._createEncoderBuffer=function(e){return new r(e,this.reporter)},d.prototype._encode=function(e,t,a){const n=this._baseState;if(null!==n.default&&n.default===e)return;const r=this._encodeValue(e,t,a);return void 0===r||this._skipDefault(r,t,a)?void 0:r},d.prototype._encodeValue=function(e,t,a){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new n);let i=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}let o=null,c=!1;if(r.any)i=this._createEncoderBuffer(e);else if(r.choice)i=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,a)._encode(e,t),c=!0;else if(r.children)o=r.children.map((function(a){if("null_"===a._baseState.tag)return a._encode(null,t,e);if(null===a._baseState.key)return t.error("Child should have a key");const n=t.enterKey(a._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const r=a._encode(e[a._baseState.key],t,e);return t.leaveKey(n),r}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const a=this.clone();a._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(a){const n=this._baseState;return this._getUse(n.args[0],e)._encode(a,t)}),a))}else null!==r.use?i=this._getUse(r.use,a)._encode(e,t):(o=this._encodePrimitive(r.tag,e),c=!0);if(!r.any&&null===r.choice){const e=null!==r.implicit?r.implicit:r.tag,a=null===r.implicit?"universal":"context";null===e?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(i=this._encodeComposite(e,c,a,o))}return null!==r.explicit&&(i=this._encodeComposite(r.explicit,!1,"context",i)),i},d.prototype._encodeChoice=function(e,t){const a=this._baseState,n=a.choice[e.type];return n||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(a.choice))),n._encode(e.value,t)},d.prototype._encodePrimitive=function(e,t){const a=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&a.args)return this._encodeObjid(t,a.reverseArgs[0],a.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,a.args&&a.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},d.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},d.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},80126:(e,t,a)=>{"use strict";const n=a(91285);function r(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}t.b=r,r.prototype.isError=function(e){return e instanceof i},r.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},r.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},r.prototype.enterKey=function(e){return this._reporterState.path.push(e)},r.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},r.prototype.leaveKey=function(e,t,a){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=a)},r.prototype.path=function(){return this._reporterState.path.join("/")},r.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},r.prototype.leaveObject=function(e){const t=this._reporterState,a=t.obj;return t.obj=e,a},r.prototype.error=function(e){let t;const a=this._reporterState,n=e instanceof i;if(t=n?e:new i(a.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!a.options.partial)throw t;return n||a.errors.push(t),t},r.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},4131:(e,t)=>{"use strict";function a(e){const t={};return Object.keys(e).forEach((function(a){(0|a)==a&&(a|=0);const n=e[a];t[n]=a})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=a(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=a(t.tag)},96906:(e,t,a)=>{"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(a){(0|a)==a&&(a|=0);const n=e[a];t[n]=a})),t},n.der=a(4131)},41066:(e,t,a)=>{"use strict";const n=a(91285),r=a(90735),i=a(47362).C,o=a(80847),c=a(4131);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){o.call(this,"der",e)}function u(e,t){let a=e.readUInt8(t);if(e.isError(a))return a;const n=c.tagClass[a>>6],r=0==(32&a);if(31==(31&a)){let n=a;for(a=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;a<<=7,a|=127&n}}else a&=31;return{cls:n,primitive:r,tag:a,tagStr:c.tag[a]}}function f(e,t,a){let n=e.readUInt8(a);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const r=127&n;if(r>4)return e.error("length octect is too long");n=0;for(let t=0;t{"use strict";const n=t;n.der=a(41066),n.pem=a(63956)},63956:(e,t,a)=>{"use strict";const n=a(91285),r=a(27654).Buffer,i=a(41066);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.decode=function(e,t){const a=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/;let c=-1,s=-1;for(let e=0;e{"use strict";const n=a(91285),r=a(27654).Buffer,i=a(80847),o=a(4131);function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}function s(e){i.call(this,"der",e)}function d(e){return e<10?"0"+e:e}e.exports=c,c.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(s,i),s.prototype._encodeComposite=function(e,t,a,n){const i=function(e,t,a,n){let r;if("seqof"===e?e="seq":"setof"===e&&(e="set"),o.tagByName.hasOwnProperty(e))r=o.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);r=e}return r>=31?n.error("Multi-octet tag encoding unsupported"):(t||(r|=32),r|=o.tagClassByName[a||"universal"]<<6,r)}(e,t,a,this.reporter);if(n.length<128){const e=r.alloc(2);return e[0]=i,e[1]=n.length,this._createEncoderBuffer([e,n])}let c=1;for(let e=n.length;e>=256;e>>=8)c++;const s=r.alloc(2+c);s[0]=i,s[1]=128|c;for(let e=1+c,t=n.length;t>0;e--,t>>=8)s[e]=255&t;return this._createEncoderBuffer([s,n])},s.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=r.alloc(2*e.length);for(let a=0;a=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t=128;a>>=7)n++}const i=r.alloc(n);let o=i.length-1;for(let t=e.length-1;t>=0;t--){let a=e[t];for(i[o--]=127&a;(a>>=7)>0;)i[o--]=128|127&a}return this._createEncoderBuffer(i)},s.prototype._encodeTime=function(e,t){let a;const n=new Date(e);return"gentime"===t?a=[d(n.getUTCFullYear()),d(n.getUTCMonth()+1),d(n.getUTCDate()),d(n.getUTCHours()),d(n.getUTCMinutes()),d(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?a=[d(n.getUTCFullYear()%100),d(n.getUTCMonth()+1),d(n.getUTCDate()),d(n.getUTCHours()),d(n.getUTCMinutes()),d(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(a,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!r.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=r.from(t)}if(r.isBuffer(e)){let t=e.length;0===e.length&&t++;const a=r.alloc(t);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let a=1;for(let t=e;t>=256;t>>=8)a++;const n=new Array(a);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(r.from(n))},s.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},s.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},s.prototype._skipDefault=function(e,t,a){const n=this._baseState;let r;if(null===n.default)return!1;const i=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,a).join()),i.length!==n.defaultBuffer.length)return!1;for(r=0;r{"use strict";const n=t;n.der=a(95758),n.pem=a(99245)},99245:(e,t,a)=>{"use strict";const n=a(91285),r=a(95758);function i(e){r.call(this,e),this.enc="pem"}n(i,r),e.exports=i,i.prototype.encode=function(e,t){const a=r.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},71696:(e,t,a)=>{"use strict";var n=a(34406);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i,o,c=a(47515).codes,s=c.ERR_AMBIGUOUS_ARGUMENT,d=c.ERR_INVALID_ARG_TYPE,u=c.ERR_INVALID_ARG_VALUE,f=c.ERR_INVALID_RETURN_VALUE,l=c.ERR_MISSING_ARGS,b=a(64082),h=a(43335).inspect,p=a(43335).types,m=p.isPromise,y=p.isRegExp,g=Object.assign?Object.assign:a(44956).assign,x=Object.is?Object.is:a(34679);function v(){var e=a(26796);i=e.isDeepEqual,o=e.isDeepStrictEqual}new Map;var w=!1,I=e.exports=C,A={};function S(e){if(e.message instanceof Error)throw e.message;throw new b(e)}function k(e,t,a,n){if(!a){var r=!1;if(0===t)r=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new b({actual:a,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=r,i}}function C(){for(var e=arguments.length,t=new Array(e),a=0;a1?a-1:0),r=1;r1?a-1:0),r=1;r1?a-1:0),r=1;r1?a-1:0),r=1;r{"use strict";var n=a(34406);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){for(var a=0;ae.length)&&(a=e.length),e.substring(a-t.length,a)===t}var y="",g="",x="",v="",w={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 I(e){var t=Object.keys(e),a=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){a[t]=e[t]})),Object.defineProperty(a,"message",{value:e.message}),a}function A(e){return h(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var S=function(e){function t(e){var a;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==b(e)||null===e)throw new p("options","Object",e);var r=e.message,i=e.operator,s=e.stackStartFn,d=e.actual,u=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)a=o(this,l(t).call(this,String(r)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="",g="",v="",x=""):(y="",g="",v="",x="")),"object"===b(d)&&null!==d&&"object"===b(u)&&null!==u&&"stack"in d&&d instanceof Error&&"stack"in u&&u instanceof Error&&(d=I(d),u=I(u)),"deepStrictEqual"===i||"strictEqual"===i)a=o(this,l(t).call(this,function(e,t,a){var r="",i="",o=0,c="",s=!1,d=A(e),u=d.split("\n"),f=A(t).split("\n"),l=0,h="";if("strictEqual"===a&&"object"===b(e)&&"object"===b(t)&&null!==e&&null!==t&&(a="strictEqualObject"),1===u.length&&1===f.length&&u[0]!==f[0]){var p=u[0].length+f[0].length;if(p<=10){if(!("object"===b(e)&&null!==e||"object"===b(t)&&null!==t||0===e&&0===t))return"".concat(w[a],"\n\n")+"".concat(u[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==a&&p<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;u[0][l]===f[0][l];)l++;l>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var a=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,a-e.length)}(" ",l),"^"),l=0)}}for(var I=u[u.length-1],S=f[f.length-1];I===S&&(l++<2?c="\n ".concat(I).concat(c):r=I,u.pop(),f.pop(),0!==u.length&&0!==f.length);)I=u[u.length-1],S=f[f.length-1];var k=Math.max(u.length,f.length);if(0===k){var C=d.split("\n");if(C.length>30)for(C[26]="".concat(y,"...").concat(v);C.length>27;)C.pop();return"".concat(w.notIdentical,"\n\n").concat(C.join("\n"),"\n")}l>3&&(c="\n".concat(y,"...").concat(v).concat(c),s=!0),""!==r&&(c="\n ".concat(r).concat(c),r="");var E=0,T=w[a]+"\n".concat(g,"+ actual").concat(v," ").concat(x,"- expected").concat(v),P=" ".concat(y,"...").concat(v," Lines skipped");for(l=0;l1&&l>2&&(O>4?(i+="\n".concat(y,"...").concat(v),s=!0):O>3&&(i+="\n ".concat(f[l-2]),E++),i+="\n ".concat(f[l-1]),E++),o=l,r+="\n".concat(x,"-").concat(v," ").concat(f[l]),E++;else if(f.length1&&l>2&&(O>4?(i+="\n".concat(y,"...").concat(v),s=!0):O>3&&(i+="\n ".concat(u[l-2]),E++),i+="\n ".concat(u[l-1]),E++),o=l,i+="\n".concat(g,"+").concat(v," ").concat(u[l]),E++;else{var B=f[l],M=u[l],R=M!==B&&(!m(M,",")||M.slice(0,-1)!==B);R&&m(B,",")&&B.slice(0,-1)===M&&(R=!1,M+=","),R?(O>1&&l>2&&(O>4?(i+="\n".concat(y,"...").concat(v),s=!0):O>3&&(i+="\n ".concat(u[l-2]),E++),i+="\n ".concat(u[l-1]),E++),o=l,i+="\n".concat(g,"+").concat(v," ").concat(M),r+="\n".concat(x,"-").concat(v," ").concat(B),E+=2):(i+=r,r="",1!==O&&0!==l||(i+="\n ".concat(M),E++))}if(E>20&&l30)for(S[26]="".concat(y,"...").concat(v);S.length>27;)S.pop();a=1===S.length?o(this,l(t).call(this,"".concat(h," ").concat(S[0]))):o(this,l(t).call(this,"".concat(h,"\n\n").concat(S.join("\n"),"\n")))}else{var k=A(d),C="",E=w[i];"notDeepEqual"===i||"notEqual"===i?(k="".concat(w[i],"\n\n").concat(k)).length>1024&&(k="".concat(k.slice(0,1021),"...")):(C="".concat(A(u)),k.length>512&&(k="".concat(k.slice(0,509),"...")),C.length>512&&(C="".concat(C.slice(0,509),"...")),"deepEqual"===i||"equal"===i?k="".concat(E,"\n\n").concat(k,"\n\nshould equal\n\n"):C=" ".concat(i," ").concat(C)),a=o(this,l(t).call(this,"".concat(k).concat(C)))}return Error.stackTraceLimit=f,a.generatedMessage=!r,Object.defineProperty(c(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=d,a.expected=u,a.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(a),s),a.stack,a.name="AssertionError",o(a)}var a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,e),a=t,s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:h.custom,value:function(e,t){return h(this,function(e){for(var t=1;t{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var o,c,s={};function d(e,t,a){a||(a=Error);var o=function(a){function o(a,i,c){var s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),s=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r(o).call(this,function(e,a,n){return"string"==typeof t?t:t(e,a,n)}(a,i,c))),s.code=e,s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(o,a),o}(a);s[e]=o}function u(e,t){if(Array.isArray(e)){var a=e.length;return e=e.map((function(e){return String(e)})),a>2?"one of ".concat(t," ").concat(e.slice(0,a-1).join(", "),", or ")+e[a-1]:2===a?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}d("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),d("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,c,s,d,f;if(void 0===o&&(o=a(71696)),o("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(c="not ",t.substr(0,c.length)===c)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,a){return(void 0===a||a>e.length)&&(a=e.length),e.substring(a-t.length,a)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(u(t,"type"));else{var l=("number"!=typeof f&&(f=0),f+".".length>(d=e).length||-1===d.indexOf(".",f)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(u(t,"type"))}return s+". Received type ".concat(n(r))}),TypeError),d("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=a(43335));var r=c.inspect(t);return r.length>128&&(r="".concat(r.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(r)}),TypeError,RangeError),d("ERR_INVALID_RETURN_VALUE",(function(e,t,a){var r;return r=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(n(a)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(r,".")}),TypeError),d("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0,"At least one arg needs to be specified");var r="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:r+="".concat(t[0]," argument");break;case 2:r+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:r+=t.slice(0,i-1).join(", "),r+=", and ".concat(t[i-1]," arguments")}return"".concat(r," must be specified")}),TypeError),e.exports.codes=s},26796:(e,t,a)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=[],n=!0,r=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(n=(o=c.next()).done)&&(a.push(o.value),!t||a.length!==t);n=!0);}catch(e){r=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw i}}return a}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=void 0!==/a/g.flags,o=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},c=function(e){var t=[];return e.forEach((function(e,a){return t.push([a,e])})),t},s=Object.is?Object.is:a(34679),d=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},u=Number.isNaN?Number.isNaN:a(74782);function f(e){return e.call.bind(e)}var l=f(Object.prototype.hasOwnProperty),b=f(Object.prototype.propertyIsEnumerable),h=f(Object.prototype.toString),p=a(43335).types,m=p.isAnyArrayBuffer,y=p.isArrayBufferView,g=p.isDate,x=p.isMap,v=p.isRegExp,w=p.isSet,I=p.isNativeError,A=p.isBoxedPrimitive,S=p.isNumberObject,k=p.isStringObject,C=p.isBooleanObject,E=p.isBigIntObject,T=p.isSymbolObject,P=p.isFloat32Array,O=p.isFloat64Array;function B(e){if(0===e.length||e.length>10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function M(e){return Object.keys(e).filter(B).concat(d(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,t){if(e===t)return 0;for(var a=e.length,n=t.length,r=0,i=Math.min(a,n);rn(void 0,void 0,void 0,(function*(){e&&(t.chainEndpoint=e),yield(0,i.cryptoWaitReady)(),yield(0,t.disconnect)();const n=new r.WsProvider(t.chainEndpoint),c=Object.assign({provider:n,noInitWarn:!0,types:o.types,rpc:o.rpc,signedExtensions:o.signedExtensions},a);return t.api=yield r.ApiPromise.create(c),t.api})),t.isConnected=()=>Boolean(t.api&&t.api.isConnected),t.disconnect=()=>n(void 0,void 0,void 0,(function*(){(0,t.isConnected)()&&(yield t.api.disconnect())})),t.getDecimals=e=>e.registry.chainDecimals[0]},21174:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getKeyringFromSeed=t.generateKeyring=t.formatNumberToBalance=t.isValidAddress=void 0;const n=a(85932),r=a(7983);t.isValidAddress=e=>{try{return(0,n.encodeAddress)((0,r.isHex)(e)?(0,r.hexToU8a)(e):(0,n.decodeAddress)(e)),!0}catch(e){return!1}},t.formatNumberToBalance=(e,t)=>{const a=new r.BN(10).pow(new r.BN(t||18));return new r.BN(e).mul(a)},t.generateKeyring=()=>new n.Keyring({type:"sr25519"}),t.getKeyringFromSeed=e=>(0,t.generateKeyring)().addFromUri(e)},20624:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.spec=t.helpers=t.chain=void 0,i(a(67788),t),i(a(21174),t),i(a(77231),t),t.chain=o(a(67788)),t.helpers=o(a(21174)),t.spec=o(a(77231)),i(a(68782),t)},77231:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(a(43250),t),r(a(53006),t),r(a(71780),t)},43250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=void 0,t.rpc={kate:{blockLength:{description:"Get Block Length",params:[{name:"at",type:"Hash",isOptional:!0}],type:"BlockLength"},queryProof:{description:"Generate the kate proof for the given `cells`",params:[{name:"cells",type:"Vec"},{name:"at",type:"Hash",isOptional:!0}],type:"Vec"},queryDataProof:{description:"Generate the data proof for the given `index`",params:[{name:"data_index",type:"u32"},{name:"at",type:"Hash",isOptional:!0}],type:"DataProof"}}}},53006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signedExtensions=void 0,t.signedExtensions={CheckAppId:{extrinsic:{appId:"AppId"},payload:{}}}},71780:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.types=void 0,t.types={AppId:"Compact",DataLookupIndexItem:{appId:"AppId",start:"Compact"},DataLookup:{size:"Compact",index:"Vec"},KateCommitment:{rows:"Compact",cols:"Compact",dataRoot:"H256",commitment:"Vec"},V1HeaderExtension:{commitment:"KateCommitment",appLookup:"DataLookup"},VTHeaderExtension:{newField:"Vec",commitment:"KateCommitment",appLookup:"DataLookup"},HeaderExtension:{_enum:{V1:"V1HeaderExtension",VTest:"VTHeaderExtension"}},DaHeader:{parentHash:"Hash",number:"Compact",stateRoot:"Hash",extrinsicsRoot:"Hash",digest:"Digest",extension:"HeaderExtension"},Header:"DaHeader",CheckAppIdExtra:{appId:"AppId"},CheckAppIdTypes:{},CheckAppId:{extra:"CheckAppIdExtra",types:"CheckAppIdTypes"},BlockLength:{max:"PerDispatchClass",cols:"Compact",rows:"Compact",chunkSize:"Compact"},PerDispatchClass:{normal:"u32",operational:"u32",mandatory:"u32"},DataProof:{root:"H256",proof:"Vec",numberOfLeaves:"Compact",leaf_index:"Compact",leaf:"H256"},Cell:{row:"u32",col:"u32"}}},96106:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},18166:(e,t,a)=>{"use strict";var n=a(77834).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),a=0;a>>0,u=new Uint8Array(o);e[a];){var f=t[e.charCodeAt(a)];if(255===f)return;for(var l=0,b=o-1;(0!==f||l>>0,u[b]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");i=l,a++}for(var h=o-i;h!==o&&0===u[h];)h++;var p=n.allocUnsafe(r+(o-h));p.fill(0,0,r);for(var m=r;h!==o;)p[m++]=u[h++];return p}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var a=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,a++;for(var d=(o-i)*u+1>>>0,f=new Uint8Array(d);i!==o;){for(var l=t[i],b=0,h=d-1;(0!==l||b>>0,f[h]=l%c>>>0,l=l/c>>>0;if(0!==l)throw new Error("Non-zero carry");r=b,i++}for(var p=d-r;p!==d&&0===f[p];)p++;for(var m=s.repeat(a);p{"use strict";t.byteLength=function(e){var t=s(e),a=t[0],n=t[1];return 3*(a+n)/4-n},t.toByteArray=function(e){var t,a,i=s(e),o=i[0],c=i[1],d=new r(function(e,t,a){return 3*(t+a)/4-a}(0,o,c)),u=0,f=c>0?o-4:o;for(a=0;a>16&255,d[u++]=t>>8&255,d[u++]=255&t;return 2===c&&(t=n[e.charCodeAt(a)]<<2|n[e.charCodeAt(a+1)]>>4,d[u++]=255&t),1===c&&(t=n[e.charCodeAt(a)]<<10|n[e.charCodeAt(a+1)]<<4|n[e.charCodeAt(a+2)]>>2,d[u++]=t>>8&255,d[u++]=255&t),d},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],o=16383,c=0,s=n-r;cs?s:c+o));return 1===r?(t=e[n-1],i.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),i.join("")};for(var a=[],n=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,c=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var a=e.indexOf("=");return-1===a&&(a=t),[a,a===t?0:4-a%4]}function d(e,t,n){for(var r,i,o=[],c=t;c>18&63]+a[i>>12&63]+a[i>>6&63]+a[63&i]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},66487:function(e,t,a){e=a.nmd(e);var n,r,i=a(34406);void 0===(r="function"==typeof(n=function(){"use strict";var t={},n=null;function r(t){if(e&&e.exports)try{return a(5634).randomBytes(t)}catch(e){}try{var r;return(self.crypto||self.msCrypto).getRandomValues(r=new Uint32Array(t)),Array.prototype.slice.call(r)}catch(e){}if(!n)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return n(t)}try{r(1)}catch(e){}function o(e,t){for(var a=0,n=0,r=0,i=e.length;r31&&(e=31);var a=[];return a.push("$2a$"),e<10&&a.push("0"),a.push(e.toString()),a.push("$"),a.push(f(r(h),h)),a.join("")},t.genSalt=function(e,a,n){if("function"==typeof a&&(n=a,a=void 0),"function"==typeof e&&(n=e,e=void 0),void 0===e)e=p;else if("number"!=typeof e)throw Error("illegal arguments: "+typeof e);function r(a){c((function(){try{a(null,t.genSaltSync(e))}catch(e){a(e)}}))}if(!n)return new Promise((function(e,t){r((function(a,n){a?t(a):e(n)}))}));if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);r(n)},t.hashSync=function(e,a){if(void 0===a&&(a=p),"number"==typeof a&&(a=t.genSaltSync(a)),"string"!=typeof e||"string"!=typeof a)throw Error("Illegal arguments: "+typeof e+", "+typeof a);return A(e,a)},t.hash=function(e,a,n,r){function i(n){"string"==typeof e&&"number"==typeof a?t.genSalt(a,(function(t,a){A(e,a,n,r)})):"string"==typeof e&&"string"==typeof a?A(e,a,n,r):c(n.bind(this,Error("Illegal arguments: "+typeof e+", "+typeof a)))}if(!n)return new Promise((function(e,t){i((function(a,n){a?t(a):e(n)}))}));if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);i(n)},t.compareSync=function(e,a){if("string"!=typeof e||"string"!=typeof a)throw Error("Illegal arguments: "+typeof e+", "+typeof a);return 60===a.length&&o(t.hashSync(e,a.substr(0,a.length-31)),a)},t.compare=function(e,a,n,r){function i(n){"string"==typeof e&&"string"==typeof a?60===a.length?t.hash(e,a.substr(0,29),(function(e,t){e?n(e):n(null,o(t,a))}),r):c(n.bind(this,null,!1)):c(n.bind(this,Error("Illegal arguments: "+typeof e+", "+typeof a)))}if(!n)return new Promise((function(e,t){i((function(a,n){a?t(a):e(n)}))}));if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);i(n)},t.getRounds=function(e){if("string"!=typeof e)throw Error("Illegal arguments: "+typeof e);return parseInt(e.split("$")[2],10)},t.getSalt=function(e){if("string"!=typeof e)throw Error("Illegal arguments: "+typeof e);if(60!==e.length)throw Error("Illegal hash length: "+e.length+" != 60");return e.substring(0,29)};var c=void 0!==i&&i&&"function"==typeof i.nextTick?"function"==typeof setImmediate?setImmediate:i.nextTick:setTimeout;var s="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],u=String.fromCharCode;function f(e,t){var a,n,r=0,i=[];if(t<=0||t>e.length)throw Error("Illegal len: "+t);for(;r>2&63]),a=(3&a)<<4,r>=t){i.push(s[63&a]);break}if(a|=(n=255&e[r++])>>4&15,i.push(s[63&a]),a=(15&n)<<2,r>=t){i.push(s[63&a]);break}a|=(n=255&e[r++])>>6&3,i.push(s[63&a]),i.push(s[63&n])}return i.join("")}function l(e,t){var a,n,r,i,o,c=0,s=e.length,f=0,l=[];if(t<=0)throw Error("Illegal len: "+t);for(;c>>0,i|=(48&n)>>4,l.push(u(i)),!(++f>=t||c>=s))&&-1!=(r=(o=e.charCodeAt(c++))>>0,i|=(60&r)>>2,l.push(u(i)),!(++f>=t||c>=s));)i=(3&r)<<6>>>0,i|=(o=e.charCodeAt(c++))>6&31|192),t(63&a|128)):a<65536?(t(a>>12&15|224),t(a>>6&63|128),t(63&a|128)):(t(a>>18&7|240),t(a>>12&63|128),t(a>>6&63|128),t(63&a|128)),a=null},decodeUTF8:function(e,t){for(var a,n,r,i,o=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(a=e());)if(0==(128&a))t(a);else if(192==(224&a))null===(n=e())&&o([a,n]),t((31&a)<<6|63&n);else if(224==(240&a))(null===(n=e())||null===(r=e()))&&o([a,n,r]),t((15&a)<<12|(63&n)<<6|63&r);else{if(240!=(248&a))throw RangeError("Illegal starting byte: "+a);(null===(n=e())||null===(r=e())||null===(i=e()))&&o([a,n,r,i]),t((7&a)<<18|(63&n)<<12|(63&r)<<6|63&i)}},UTF16toUTF8:function(e,t){for(var a,n=null;null!==(a=null!==n?n:e());)a>=55296&&a<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(a-55296)+n-56320+65536),n=null):t(a);null!==n&&t(n)},UTF8toUTF16:function(e,t){var a=null;for("number"==typeof e&&(a=e,e=function(){return null});null!==a||null!==(a=e());)a<=65535?t(a):(t(55296+((a-=65536)>>10)),t(a%1024+56320)),a=null},encodeUTF16toUTF8:function(t,a){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,a)}))},decodeUTF8toUTF16:function(t,a){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,a)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(t){for(var a,n=0;null!==(a=t());)n+=e.calculateCodePoint(a);return n},calculateUTF16asUTF8:function(t){var a=0,n=0;return e.UTF16toUTF8(t,(function(t){++a,n+=e.calculateCodePoint(t)})),[a,n]}};return e}();Date.now=Date.now||function(){return+new Date};var h=16,p=10,m=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],y=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],g=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892];function x(e,t,a,n){var r,i=e[t],o=e[t+1];return r=n[(i^=a[0])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[1])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],r=n[(i^=(r+=n[768|255&o])^a[2])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[3])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],r=n[(i^=(r+=n[768|255&o])^a[4])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[5])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],r=n[(i^=(r+=n[768|255&o])^a[6])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[7])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],r=n[(i^=(r+=n[768|255&o])^a[8])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[9])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],r=n[(i^=(r+=n[768|255&o])^a[10])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[11])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],r=n[(i^=(r+=n[768|255&o])^a[12])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[13])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],r=n[(i^=(r+=n[768|255&o])^a[14])>>>24],r+=n[256|i>>16&255],r^=n[512|i>>8&255],r=n[(o^=(r+=n[768|255&i])^a[15])>>>24],r+=n[256|o>>16&255],r^=n[512|o>>8&255],i^=(r+=n[768|255&o])^a[16],e[t]=o^a[17],e[t+1]=i,e}function v(e,t){for(var a=0,n=0;a<4;++a)n=n<<8|255&e[t],t=(t+1)%e.length;return{key:n,offp:t}}function w(e,t,a){for(var n,r=0,i=[0,0],o=t.length,c=a.length,s=0;s31){if(i=Error("Illegal number of rounds (4-31): "+a),n)return void c(n.bind(this,i));throw i}if(t.length!==h){if(i=Error("Illegal salt length: "+t.length+" != "+h),n)return void c(n.bind(this,i));throw i}a=1<>>0;var d,u,f,l=0;function b(){if(r&&r(l/a),!(l>1;f++)x(o,f<<1,d,u);var i=[];for(l=0;l>24&255)>>>0),i.push((o[l]>>16&255)>>>0),i.push((o[l]>>8&255)>>>0),i.push((255&o[l])>>>0);return n?void n(null,i):i}for(var h=Date.now();l100)););n&&c(b)}if(Int32Array?(d=new Int32Array(m),u=new Int32Array(y)):(d=m.slice(),u=y.slice()),function(e,t,a,n){for(var r,i=0,o=[0,0],c=a.length,s=n.length,d=0;d"$"){if(r=Error("Missing salt rounds"),a)return void c(a.bind(this,r));throw r}var s,d,u,p=10*parseInt(t.substring(o,o+1),10)+parseInt(t.substring(o+1,o+2),10),m=t.substring(o+3,o+25),y=(s=e+=i>="a"?"\0":"",d=[],u=0,b.encodeUTF16toUTF8((function(){return u>=s.length?null:s.charCodeAt(u++)}),(function(e){d.push(e)})),d),x=l(m,h);function v(e){var t=[];return t.push("$2"),i>="a"&&t.push(i),t.push("$"),p<10&&t.push("0"),t.push(p.toString()),t.push("$"),t.push(f(x,x.length)),t.push(f(e,4*g.length-1)),t.join("")}if(void 0===a)return v(I(y,x,p));I(y,x,p,(function(e,t){e?a(e,null):a(null,v(t))}),n)}return t.encodeBase64=f,t.decodeBase64=l,t})?n.apply(t,[]):n)||(e.exports=r)},62197:function(e,t,a){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function i(e,t,a){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a(33196).Buffer}catch(e){}function c(e,t){var a=e.charCodeAt(t);return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:void n(!1,"Invalid character in "+e)}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,r){for(var i=0,o=0,c=Math.min(e.length,a),s=t;s=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&o0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this._strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}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"],b=[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 p(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a._strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215,(r+=2)>=26&&(r-=26,o--),a=0!==i||o!==this.length-1?l[6-s.length]+s+a:s+a}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=b[e],u=h[e];a="";var f=this.clone();for(f.negative=0;!f.isZero();){var p=f.modrn(u).toString(e);a=(f=f.idivn(u)).isZero()?p+a:l[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){this._strip();var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,r),o},i.prototype._toArrayLikeLE=function(e,t){for(var a=0,n=0,r=0,i=0;r>8&255),a>16&255),6===i?(a>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(a=0&&(e[a--]=o>>8&255),a>=0&&(e[a--]=o>>16&255),6===i?(a>=0&&(e[a--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(a>=0)for(e[a--]=n;a>=0;)e[a--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,a=0;return t>=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function y(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a._strip()}function g(e,t,a){return y(e,t,a)}function x(e,t){this.x=e,this.y=t}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var a=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):a<63?p(this,e,t):a<1024?y(this,e,t):g(this,e,t)},x.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},x.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,a+=i/67108864|0,a+=o>>>26,this.words[r]=67108863&o}return 0!==a&&(this.words[r]=a,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r&1}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this._strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c._strip(),n._strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var a=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(a*r+(0|this.words[i]))%e;return t?-r:r},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var a=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*a;this.words[r]=i/e|0,a=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this._strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new C(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function I(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},r(I,w),I.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},I.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new I;else if("p224"===e)t=new A;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return v[e]=t,t},C.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},C.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,C),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},82745:(e,t,a)=>{var n;function r(e){this.rand=e}if(e.exports=function(e){return n||(n=new r(null)),n.generate(e)},e.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},r.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),a=0;a{var n=a(48119);function r(e,t){var r=JSON.stringify(t),i=n.utf8ToBuffer(r),o=a.g.crypto.getRandomValues(new Uint8Array(16));return a.g.crypto.subtle.encrypt({name:"AES-GCM",iv:o},e,i).then((function(e){var t=new Uint8Array(e),a=n.bufferToBase64(o);return{data:n.bufferToBase64(t),iv:a}}))}function i(e,t){const a=n.base64ToBuffer(t.data),r=n.base64ToBuffer(t.iv);return crypto.subtle.decrypt({name:"AES-GCM",iv:r},e,a).then((function(e){const t=new Uint8Array(e),a=n.bufferToUtf8(t);return JSON.parse(a)})).catch((function(e){throw new Error("Incorrect password")}))}function o(e,t){var r=n.utf8ToBuffer(e),i=n.base64ToBuffer(t);return a.g.crypto.subtle.importKey("raw",r,{name:"PBKDF2"},!1,["deriveBits","deriveKey"]).then((function(e){return a.g.crypto.subtle.deriveKey({name:"PBKDF2",salt:i,iterations:1e4,hash:"SHA-256"},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}))}function c(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t}function s(e=32){var t=new Uint8Array(e);return a.g.crypto.getRandomValues(t),btoa(String.fromCharCode.apply(null,t))}e.exports={encrypt:function(e,t){var a=s();return o(e,a).then((function(e){return r(e,t)})).then((function(e){return e.salt=a,JSON.stringify(e)}))},decrypt:function(e,t){const a=JSON.parse(t);return o(e,a.salt).then((function(e){return i(e,a)}))},keyFromPassword:o,encryptWithKey:r,decryptWithKey:i,serializeBufferForStorage:function(e){for(var t="0x",a=e.length||e.byteLength,n=0;n{var n=a(77834).Buffer;function r(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,a=new Array(t),r=0;r>>24]^u[h>>>16&255]^f[p>>>8&255]^l[255&m]^t[y++],o=d[h>>>24]^u[p>>>16&255]^f[m>>>8&255]^l[255&b]^t[y++],c=d[p>>>24]^u[m>>>16&255]^f[b>>>8&255]^l[255&h]^t[y++],s=d[m>>>24]^u[b>>>16&255]^f[h>>>8&255]^l[255&p]^t[y++],b=i,h=o,p=c,m=s;return i=(n[b>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[y++],o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&b])^t[y++],c=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[b>>>8&255]<<8|n[255&h])^t[y++],s=(n[m>>>24]<<24|n[b>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[y++],[i>>>=0,o>>>=0,c>>>=0,s>>>=0]}var c=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var a=[],n=[],r=[[],[],[],[]],i=[[],[],[],[]],o=0,c=0,s=0;s<256;++s){var d=c^c<<1^c<<2^c<<3^c<<4;d=d>>>8^255&d^99,a[o]=d,n[d]=o;var u=e[o],f=e[u],l=e[f],b=257*e[d]^16843008*d;r[0][o]=b<<24|b>>>8,r[1][o]=b<<16|b>>>16,r[2][o]=b<<8|b>>>24,r[3][o]=b,b=16843009*l^65537*f^257*u^16843008*o,i[0][d]=b<<24|b>>>8,i[1][d]=b<<16|b>>>16,i[2][d]=b<<8|b>>>24,i[3][d]=b,0===o?o=c=1:(o=u^e[e[e[l^u]]],c^=e[e[c]])}return{SBOX:a,INV_SBOX:n,SUB_MIX:r,INV_SUB_MIX:i}}();function d(e){this._key=r(e),this._reset()}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var e=this._key,t=e.length,a=t+6,n=4*(a+1),r=[],i=0;i>>24,o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o],o^=c[i/t|0]<<24):t>6&&i%t==4&&(o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o]),r[i]=r[i-t]^o}for(var d=[],u=0;u>>24]]^s.INV_SUB_MIX[1][s.SBOX[l>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[l>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&l]]}this._nRounds=a,this._keySchedule=r,this._invKeySchedule=d},d.prototype.encryptBlockRaw=function(e){return o(e=r(e),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},d.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),a=n.allocUnsafe(16);return a.writeUInt32BE(t[0],0),a.writeUInt32BE(t[1],4),a.writeUInt32BE(t[2],8),a.writeUInt32BE(t[3],12),a},d.prototype.decryptBlock=function(e){var t=(e=r(e))[1];e[1]=e[3],e[3]=t;var a=o(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),i=n.allocUnsafe(16);return i.writeUInt32BE(a[0],0),i.writeUInt32BE(a[3],4),i.writeUInt32BE(a[2],8),i.writeUInt32BE(a[1],12),i},d.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},e.exports.AES=d},3313:(e,t,a)=>{var n=a(52970),r=a(77834).Buffer,i=a(13973),o=a(91285),c=a(42895),s=a(31313),d=a(14182);function u(e,t,a,o){i.call(this);var s=r.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(s);this._ghash=new c(u),a=function(e,t,a){if(12===t.length)return e._finID=r.concat([t,r.from([0,0,0,1])]),r.concat([t,r.from([0,0,0,2])]);var n=new c(a),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(r.alloc(o,0))),n.update(r.alloc(8,0));var s=8*i,u=r.alloc(8);u.writeUIntBE(s,0,8),n.update(u),e._finID=n.state;var f=r.from(e._finID);return d(f),f}(this,a,u),this._prev=r.from(a),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(u,i),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.alloc(t,0),this._ghash.update(t))}this._called=!0;var a=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(a),this._len+=e.length,a},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var a=0;e.length!==t.length&&a++;for(var n=Math.min(e.length,t.length),r=0;r{var n=a(89309),r=a(57612),i=a(49234);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=r.createDecipher,t.createDecipheriv=t.Decipheriv=r.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(i)}},57612:(e,t,a)=>{var n=a(3313),r=a(77834).Buffer,i=a(68702),o=a(37041),c=a(13973),s=a(52970),d=a(59341);function u(e,t,a){c.call(this),this._cache=new f,this._last=void 0,this._cipher=new s.AES(t),this._prev=r.from(a),this._mode=e,this._autopadding=!0}function f(){this.cache=r.allocUnsafe(0)}function l(e,t,a){var c=i[e.toLowerCase()];if(!c)throw new TypeError("invalid suite type");if("string"==typeof a&&(a=r.from(a)),"GCM"!==c.mode&&a.length!==c.iv)throw new TypeError("invalid iv length "+a.length);if("string"==typeof t&&(t=r.from(t)),t.length!==c.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===c.type?new o(c.module,t,a,!0):"auth"===c.type?new n(c.module,t,a,!0):new u(c.module,t,a)}a(91285)(u,c),u.prototype._update=function(e){var t,a;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)a=this._mode.decrypt(this,t),n.push(a);return r.concat(n)},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var a=-1;++a16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var a=i[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");var n=d(t,!1,a.key,a.iv);return l(e,n.key,n.iv)},t.createDecipheriv=l},89309:(e,t,a)=>{var n=a(68702),r=a(3313),i=a(77834).Buffer,o=a(37041),c=a(13973),s=a(52970),d=a(59341);function u(e,t,a){c.call(this),this._cache=new l,this._cipher=new s.AES(t),this._prev=i.from(a),this._mode=e,this._autopadding=!0}a(91285)(u,c),u.prototype._update=function(e){var t,a;this._cache.add(e);for(var n=[];t=this._cache.get();)a=this._mode.encrypt(this,t),n.push(a);return i.concat(n)};var f=i.alloc(16,16);function l(){this.cache=i.allocUnsafe(0)}function b(e,t,a){var c=n[e.toLowerCase()];if(!c)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=i.from(t)),t.length!==c.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof a&&(a=i.from(a)),"GCM"!==c.mode&&a.length!==c.iv)throw new TypeError("invalid iv length "+a.length);return"stream"===c.type?new o(c.module,t,a):"auth"===c.type?new r(c.module,t,a):new u(c.module,t,a)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=i.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=i.allocUnsafe(e),a=-1;++a{var n=a(77834).Buffer,r=n.alloc(16,0);function i(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,a&&(n[0]=n[0]^225<<24)}this.state=i(r)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,r],16)),this.ghash(i([0,e,0,t])),this.state},e.exports=o},14182:e=>{e.exports=function(e){for(var t,a=e.length;a--;){if(255!==(t=e.readUInt8(a))){t++,e.writeUInt8(t,a);break}e.writeUInt8(0,a)}}},8796:(e,t,a)=>{var n=a(31313);t.encrypt=function(e,t){var a=n(t,e._prev);return e._prev=e._cipher.encryptBlock(a),e._prev},t.decrypt=function(e,t){var a=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return n(r,a)}},76528:(e,t,a)=>{var n=a(77834).Buffer,r=a(31313);function i(e,t,a){var i=t.length,o=r(t,e._cache);return e._cache=e._cache.slice(i),e._prev=n.concat([e._prev,a?t:o]),o}t.encrypt=function(e,t,a){for(var r,o=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,i(e,t,a)]);break}r=e._cache.length,o=n.concat([o,i(e,t.slice(0,r),a)]),t=t.slice(r)}return o}},60918:(e,t,a)=>{var n=a(77834).Buffer;function r(e,t,a){for(var n,r,o=-1,c=0;++o<8;)n=t&1<<7-o?128:0,c+=(128&(r=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=i(e._prev,a?n:r);return c}function i(e,t){var a=e.length,r=-1,i=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++r>7;return i}t.encrypt=function(e,t,a){for(var i=t.length,o=n.allocUnsafe(i),c=-1;++c{var n=a(77834).Buffer;function r(e,t,a){var r=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([a?t:r])]),r}t.encrypt=function(e,t,a){for(var i=t.length,o=n.allocUnsafe(i),c=-1;++c{var n=a(31313),r=a(77834).Buffer,i=a(14182);function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return i(e._prev),t}t.encrypt=function(e,t){var a=Math.ceil(t.length/16),i=e._cache.length;e._cache=r.concat([e._cache,r.allocUnsafe(16*a)]);for(var c=0;c{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},68702:(e,t,a)=>{var n={ECB:a(57028),CBC:a(8796),CFB:a(76528),CFB8:a(27263),CFB1:a(60918),OFB:a(34256),CTR:a(48219),GCM:a(48219)},r=a(49234);for(var i in r)r[i].module=n[r[i].mode];e.exports=r},34256:(e,t,a)=>{var n=a(48834).Buffer,r=a(31313);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{var n=a(52970),r=a(77834).Buffer,i=a(13973);function o(e,t,a,o){i.call(this),this._cipher=new n.AES(t),this._prev=r.from(a),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=o,this._mode=e}a(91285)(o,i),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},93667:(e,t,a)=>{var n=a(37214),r=a(10010),i=a(68702),o=a(62820),c=a(59341);function s(e,t,a){if(e=e.toLowerCase(),i[e])return r.createCipheriv(e,t,a);if(o[e])return new n({key:t,iv:a,mode:e});throw new TypeError("invalid suite type")}function d(e,t,a){if(e=e.toLowerCase(),i[e])return r.createDecipheriv(e,t,a);if(o[e])return new n({key:t,iv:a,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var a,n;if(e=e.toLowerCase(),i[e])a=i[e].key,n=i[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");a=8*o[e].key,n=o[e].iv}var r=c(t,!1,a,n);return s(e,r.key,r.iv)},t.createCipheriv=t.Cipheriv=s,t.createDecipher=t.Decipher=function(e,t){var a,n;if(e=e.toLowerCase(),i[e])a=i[e].key,n=i[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");a=8*o[e].key,n=o[e].iv}var r=c(t,!1,a,n);return d(e,r.key,r.iv)},t.createDecipheriv=t.Decipheriv=d,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(r.getCiphers())}},37214:(e,t,a)=>{var n=a(13973),r=a(84387),i=a(91285),o=a(77834).Buffer,c={"des-ede3-cbc":r.CBC.instantiate(r.EDE),"des-ede3":r.EDE,"des-ede-cbc":r.CBC.instantiate(r.EDE),"des-ede":r.EDE,"des-cbc":r.CBC.instantiate(r.DES),"des-ecb":r.DES};function s(e){n.call(this);var t,a=e.mode.toLowerCase(),r=c[a];t=e.decrypt?"decrypt":"encrypt";var i=e.key;o.isBuffer(i)||(i=o.from(i)),"des-ede"!==a&&"des-ede-cbc"!==a||(i=o.concat([i,i.slice(0,8)]));var s=e.iv;o.isBuffer(s)||(s=o.from(s)),this._des=r.create({key:i,iv:s,type:t})}c.des=c["des-cbc"],c.des3=c["des-ede3-cbc"],e.exports=s,i(s,n),s.prototype._update=function(e){return o.from(this._des.update(e))},s.prototype._final=function(){return o.from(this._des.final())}},62820:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},91857:(e,t,a)=>{var n=a(48834).Buffer,r=a(62197),i=a(95003);function o(e){var t,a=e.modulus.byteLength();do{t=new r(i(a))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function c(e,t){var a=function(e){var t=o(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),i=t.modulus.byteLength(),c=new r(e).mul(a.blinder).umod(t.modulus),s=c.toRed(r.mont(t.prime1)),d=c.toRed(r.mont(t.prime2)),u=t.coefficient,f=t.prime1,l=t.prime2,b=s.redPow(t.exponent1).fromRed(),h=d.redPow(t.exponent2).fromRed(),p=b.isub(h).imul(u).umod(f).imul(l);return h.iadd(p).imul(a.unblinder).umod(t.modulus).toArrayLike(n,"be",i)}c.getr=o,e.exports=c},24778:(e,t,a)=>{e.exports=a(40026)},95263:(e,t,a)=>{var n=a(77834).Buffer,r=a(16162),i=a(67525),o=a(91285),c=a(262),s=a(5643),d=a(40026);function u(e){i.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){i.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new u(e)}function b(e){return new f(e)}Object.keys(d).forEach((function(e){d[e].id=n.from(d[e].id,"hex"),d[e.toLowerCase()]=d[e]})),o(u,i.Writable),u.prototype._write=function(e,t,a){this._hash.update(e),a()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var a=this._hash.digest(),n=c(a,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(f,i.Writable),f.prototype._write=function(e,t,a){this._hash.update(e),a()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.verify=function(e,t,a){"string"==typeof t&&(t=n.from(t,a)),this.end();var r=this._hash.digest();return s(t,r,e,this._signType,this._tag)},e.exports={Sign:l,Verify:b,createSign:l,createVerify:b}},262:(e,t,a)=>{var n=a(77834).Buffer,r=a(50011),i=a(91857),o=a(87554).ec,c=a(62197),s=a(28016),d=a(39167);function u(e,t,a,i){if((e=n.from(e.toArray())).length0&&a.ishrn(n),a}function l(e,t,a){var i,o;do{for(i=n.alloc(0);8*i.length{var n=a(77834).Buffer,r=a(62197),i=a(87554).ec,o=a(28016),c=a(39167);function s(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,a,d,u){var f=o(a);if("ec"===f.type){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");return function(e,t,a){var n=c[a.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+a.data.algorithm.curve.join("."));var r=new i(n),o=a.data.subjectPrivateKey.data;return r.verify(t,e,o)}(e,t,f)}if("dsa"===f.type){if("dsa"!==d)throw new Error("wrong public key type");return function(e,t,a){var n=a.data.p,i=a.data.q,c=a.data.g,d=a.data.pub_key,u=o.signature.decode(e,"der"),f=u.s,l=u.r;s(f,i),s(l,i);var b=r.mont(n),h=f.invm(i);return 0===c.toRed(b).redPow(new r(t).mul(h).mod(i)).fromRed().mul(d.toRed(b).redPow(l.mul(h).mod(i)).fromRed()).mod(n).mod(i).cmp(l)}(e,t,f)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");t=n.concat([u,t]);for(var l=f.modulus.byteLength(),b=[1],h=0;t.length+b.length+2{"use strict";function t(e){return encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))}))}function a(e){return c(t(e))}function n(e){var t=e.replace(/(.)/g,(function(e,t){var a=t.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a="0"+a),"%"+a}));return decodeURIComponent(t)}function r(e){return n(i(e))}function i(e){return Array.prototype.map.call(e,(function(e){return String.fromCharCode(e)})).join("")}function o(e){var t=i(e);return btoa(t)}function c(e){var t;return t="undefined"!=typeof Uint8Array?new Uint8Array(e.length):[],Array.prototype.forEach.call(e,(function(e,a){t[a]=e.charCodeAt(0)})),t}function s(e){return c(atob(e))}e.exports={utf8ToBinaryString:t,utf8ToBuffer:a,utf8ToBase64:function(e){var a=t(e);return btoa(a)},binaryStringToUtf8:n,bufferToUtf8:r,base64ToUtf8:function(e){return n(atob(e))},bufferToBinaryString:i,bufferToBase64:o,binaryStringToBuffer:c,base64ToBuffer:s,strToUtf8Arr:a,utf8ArrToStr:r,arrToBase64:o,base64ToArr:s}},17022:(e,t,a)=>{var n=a(18166);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},88616:(e,t,a)=>{"use strict";var n=a(17022),r=a(77834).Buffer;e.exports=function(e){function t(t){var a=t.slice(0,-4),n=t.slice(-4),r=e(a);if(!(n[0]^r[0]|n[1]^r[1]|n[2]^r[2]|n[3]^r[3]))return a}return{encode:function(t){var a=e(t);return n.encode(r.concat([t,a],t.length+4))},decode:function(e){var a=t(n.decode(e));if(!a)throw new Error("Invalid checksum");return a},decodeUnsafe:function(e){var a=n.decodeUnsafe(e);if(a)return t(a)}}}},44075:(e,t,a)=>{"use strict";var n=a(16162),r=a(88616);e.exports=r((function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()}))},31313:(e,t,a)=>{var n=a(48834).Buffer;e.exports=function(e,t){for(var a=Math.min(e.length,t.length),r=new n(a),i=0;i{"use strict";const n=a(95766),r=a(62333),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function c(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,a){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return d(e,t,a)}function d(e,t,a){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const a=0|p(e,t);let n=c(a);const r=n.write(e,t);return r!==a&&(n=n.slice(0,r)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return b(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return b(e,t,a);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return b(e,t,a);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,a);const r=function(e){if(s.isBuffer(e)){const t=0|h(e.length),a=c(t);return 0===a.length||e.copy(a,0,0,t),a}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?c(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),c(e<0?0:0|h(e))}function l(e){const t=e.length<0?0:0|h(e.length),a=c(t);for(let n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const a=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===a)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*a;case"hex":return a>>>1;case"base64":return X(e).length;default:if(r)return n?-1:G(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,a){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===a||a>this.length)&&(a=this.length),a<=0)return"";if((a>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,a);case"utf8":case"utf-8":return C(this,t,a);case"ascii":return T(this,t,a);case"latin1":case"binary":return P(this,t,a);case"base64":return k(this,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,a);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,a){const n=e[t];e[t]=e[a],e[a]=n}function g(e,t,a,n,r){if(0===e.length)return-1;if("string"==typeof a?(n=a,a=0):a>2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),Y(a=+a)&&(a=r?0:e.length-1),a<0&&(a=e.length+a),a>=e.length){if(r)return-1;a=e.length-1}else if(a<0){if(!r)return-1;a=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:x(e,t,a,n,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,a):Uint8Array.prototype.lastIndexOf.call(e,t,a):x(e,[t],a,n,r);throw new TypeError("val must be string, number or Buffer")}function x(e,t,a,n,r){let i,o=1,c=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,c/=2,s/=2,a/=2}function d(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){let n=-1;for(i=a;ic&&(a=c-s),i=a;i>=0;i--){let a=!0;for(let n=0;nr&&(n=r):n=r;const i=t.length;let o;for(n>i/2&&(n=i/2),o=0;o>8,r=a%256,i.push(r),i.push(n);return i}(t,e.length-a),e,a,n)}function k(e,t,a){return 0===t&&a===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,a))}function C(e,t,a){a=Math.min(e.length,a);const n=[];let r=t;for(;r239?4:t>223?3:t>191?2:1;if(r+o<=a){let a,n,c,s;switch(o){case 1:t<128&&(i=t);break;case 2:a=e[r+1],128==(192&a)&&(s=(31&t)<<6|63&a,s>127&&(i=s));break;case 3:a=e[r+1],n=e[r+2],128==(192&a)&&128==(192&n)&&(s=(15&t)<<12|(63&a)<<6|63&n,s>2047&&(s<55296||s>57343)&&(i=s));break;case 4:a=e[r+1],n=e[r+2],c=e[r+3],128==(192&a)&&128==(192&n)&&128==(192&c)&&(s=(15&t)<<18|(63&a)<<12|(63&n)<<6|63&c,s>65535&&s<1114112&&(i=s))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),r+=o}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let a="",n=0;for(;nn.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(n,r)):Uint8Array.prototype.set.call(n,t,r);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,r)}r+=t.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;ta&&(e+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,a,n,r){if(J(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===a&&(a=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||a>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=a)return 0;if(n>=r)return-1;if(t>=a)return 1;if(this===e)return 0;let i=(r>>>=0)-(n>>>=0),o=(a>>>=0)-(t>>>=0);const c=Math.min(i,o),d=this.slice(n,r),u=e.slice(t,a);for(let e=0;e>>=0,isFinite(a)?(a>>>=0,void 0===n&&(n="utf8")):(n=a,a=void 0)}const r=this.length-t;if((void 0===a||a>r)&&(a=r),e.length>0&&(a<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return v(this,e,t,a);case"utf8":case"utf-8":return w(this,e,t,a);case"ascii":case"latin1":case"binary":return I(this,e,t,a);case"base64":return A(this,e,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,a);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function T(e,t,a){let n="";a=Math.min(e.length,a);for(let r=t;rn)&&(a=n);let r="";for(let n=t;na)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,a,n,r,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function N(e,t,a,n,r){j(t,n,r,e,a,7);let i=Number(t&BigInt(4294967295));e[a++]=i,i>>=8,e[a++]=i,i>>=8,e[a++]=i,i>>=8,e[a++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[a++]=o,o>>=8,e[a++]=o,o>>=8,e[a++]=o,o>>=8,e[a++]=o,a}function D(e,t,a,n,r){j(t,n,r,e,a,7);let i=Number(t&BigInt(4294967295));e[a+7]=i,i>>=8,e[a+6]=i,i>>=8,e[a+5]=i,i>>=8,e[a+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[a+3]=o,o>>=8,e[a+2]=o,o>>=8,e[a+1]=o,o>>=8,e[a]=o,a+8}function V(e,t,a,n,r,i){if(a+n>e.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function L(e,t,a,n,i){return t=+t,a>>>=0,i||V(e,0,a,4),r.write(e,t,a,n,23,4),a+4}function U(e,t,a,n,i){return t=+t,a>>>=0,i||V(e,0,a,8),r.write(e,t,a,n,52,8),a+8}s.prototype.slice=function(e,t){const a=this.length;(e=~~e)<0?(e+=a)<0&&(e=0):e>a&&(e=a),(t=void 0===t?a:~~t)<0?(t+=a)<0&&(t=0):t>a&&(t=a),t>>=0,t>>>=0,a||M(e,t,this.length);let n=this[e],r=1,i=0;for(;++i>>=0,t>>>=0,a||M(e,t,this.length);let n=this[e+--t],r=1;for(;t>0&&(r*=256);)n+=this[e+--t]*r;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=_((function(e){q(e>>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+a*2**24;return BigInt(n)+(BigInt(r)<>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+a;return(BigInt(n)<>>=0,t>>>=0,a||M(e,t,this.length);let n=this[e],r=1,i=0;for(;++i=r&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,a){e>>>=0,t>>>=0,a||M(e,t,this.length);let n=t,r=1,i=this[e+--n];for(;n>0&&(r*=256);)i+=this[e+--n]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const a=this[e]|this[e+1]<<8;return 32768&a?4294901760|a:a},s.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const a=this[e+1]|this[e]<<8;return 32768&a?4294901760|a:a},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=_((function(e){q(e>>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(a<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||M(e,4,this.length),r.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),r.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),r.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),r.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,a,n){e=+e,t>>>=0,a>>>=0,n||R(this,e,t,a,Math.pow(2,8*a)-1,0);let r=1,i=0;for(this[t]=255&e;++i>>=0,a>>>=0,n||R(this,e,t,a,Math.pow(2,8*a)-1,0);let r=a-1,i=1;for(this[t+r]=255&e;--r>=0&&(i*=256);)this[t+r]=e/i&255;return t+a},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=_((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=_((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(e,t,a,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*a-1);R(this,e,t,a,n-1,-n)}let r=0,i=1,o=0;for(this[t]=255&e;++r>0)-o&255;return t+a},s.prototype.writeIntBE=function(e,t,a,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*a-1);R(this,e,t,a,n-1,-n)}let r=a-1,i=1,o=0;for(this[t+r]=255&e;--r>=0&&(i*=256);)e<0&&0===o&&0!==this[t+r+1]&&(o=1),this[t+r]=(e/i>>0)-o&255;return t+a},s.prototype.writeInt8=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=_((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=_((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(e,t,a){return L(this,e,t,!0,a)},s.prototype.writeFloatBE=function(e,t,a){return L(this,e,t,!1,a)},s.prototype.writeDoubleLE=function(e,t,a){return U(this,e,t,!0,a)},s.prototype.writeDoubleBE=function(e,t,a){return U(this,e,t,!1,a)},s.prototype.copy=function(e,t,a,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(a||(a=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=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),e.length-t>>=0,a=void 0===a?this.length:a>>>0,e||(e=0),"number"==typeof e)for(r=t;r=n+4;a-=3)t=`_${e.slice(a-3,a)}${t}`;return`${e.slice(0,a)}${t}`}function j(e,t,a,n,r,i){if(e>a||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${a}${n}`,new H.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,a){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+a]||z(t,e.length-(a+1))}(n,r,i)}function q(e,t){if("number"!=typeof e)throw new H.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,a){if(Math.floor(e)!==e)throw q(e,a),new H.ERR_OUT_OF_RANGE(a||"offset","an integer",e);if(t<0)throw new H.ERR_BUFFER_OUT_OF_BOUNDS;throw new H.ERR_OUT_OF_RANGE(a||"offset",`>= ${a?1:0} and <= ${t}`,e)}K("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),K("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),K("ERR_OUT_OF_RANGE",(function(e,t,a){let n=`The value of "${e}" is out of range.`,r=a;return Number.isInteger(a)&&Math.abs(a)>2**32?r=F(String(a)):"bigint"==typeof a&&(r=String(a),(a>BigInt(2)**BigInt(32)||a<-(BigInt(2)**BigInt(32)))&&(r=F(r)),r+="n"),n+=` It must be ${t}. Received ${r}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(e,t){let a;t=t||1/0;const n=e.length;let r=null;const i=[];for(let o=0;o55295&&a<57344){if(!r){if(a>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}r=a;continue}if(a<56320){(t-=3)>-1&&i.push(239,191,189),r=a;continue}a=65536+(r-55296<<10|a-56320)}else r&&(t-=3)>-1&&i.push(239,191,189);if(r=null,a<128){if((t-=1)<0)break;i.push(a)}else if(a<2048){if((t-=2)<0)break;i.push(a>>6|192,63&a|128)}else if(a<65536){if((t-=3)<0)break;i.push(a>>12|224,a>>6&63|128,63&a|128)}else{if(!(a<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(a>>18|240,a>>12&63|128,a>>6&63|128,63&a|128)}}return i}function X(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,a,n){let r;for(r=0;r=t.length||r>=e.length);++r)t[r+a]=e[r];return r}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let a=0;a<16;++a){const n=16*a;for(let r=0;r<16;++r)t[n+r]=e[a]+e[r]}return t}();function _(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},62680:(e,t,a)=>{"use strict";var n=a(67286),r=a(89429),i=r(n("String.prototype.indexOf"));e.exports=function(e,t){var a=n(e,!!t);return"function"==typeof a&&i(e,".prototype.")>-1?r(a):a}},89429:(e,t,a)=>{"use strict";var n=a(4090),r=a(67286),i=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),c=r("%Reflect.apply%",!0)||n.call(o,i),s=r("%Object.getOwnPropertyDescriptor%",!0),d=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(d)try{d({},"a",{value:1})}catch(e){d=null}e.exports=function(e){var t=c(n,o,arguments);if(s&&d){var a=s(t,"length");a.configurable&&d(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var f=function(){return c(n,i,arguments)};d?d(e.exports,"apply",{value:f}):e.exports.apply=f},13973:(e,t,a)=>{var n=a(77834).Buffer,r=a(54851).Transform,i=a(30214).s;function o(e){r.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}a(91285)(o,r),o.prototype.update=function(e,t,a){"string"==typeof e&&(e=n.from(e,t));var r=this._update(e);return this.hashMode?this:(a&&(r=this._toString(r,a)),r)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,a){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{a(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,a){if(this._decoder||(this._decoder=new i(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return a&&(n+=this._decoder.end()),n},e.exports=o},97108:(e,t)=>{var a;a=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),a=0;256!=a;++a)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=a)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[a]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),a=function(e){var t=0,a=0,n=0,r="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)r[n]=e[n];for(n=0;256!=n;++n)for(a=e[n],t=256+n;t<4096;t+=256)a=r[t]=a>>>8^e[255&a];var i=[];for(n=1;16!=n;++n)i[n-1]="undefined"!=typeof Int32Array?r.subarray(256*n,256*n+256):r.slice(256*n,256*n+256);return i}(t),n=a[0],r=a[1],i=a[2],o=a[3],c=a[4],s=a[5],d=a[6],u=a[7],f=a[8],l=a[9],b=a[10],h=a[11],p=a[12],m=a[13],y=a[14];e.table=t,e.bstr=function(e,a){for(var n=-1^a,r=0,i=e.length;r>>8^t[255&(n^e.charCodeAt(r++))];return~n},e.buf=function(e,a){for(var g=-1^a,x=e.length-15,v=0;v>8&255]^p[e[v++]^g>>16&255]^h[e[v++]^g>>>24]^b[e[v++]]^l[e[v++]]^f[e[v++]]^u[e[v++]]^d[e[v++]]^s[e[v++]]^c[e[v++]]^o[e[v++]]^i[e[v++]]^r[e[v++]]^n[e[v++]]^t[e[v++]];for(x+=15;v>>8^t[255&(g^e[v++])];return~g},e.str=function(e,a){for(var n=-1^a,r=0,i=e.length,o=0,c=0;r>>8^t[255&(n^o)]:o<2048?n=(n=n>>>8^t[255&(n^(192|o>>6&31))])>>>8^t[255&(n^(128|63&o))]:o>=55296&&o<57344?(o=64+(1023&o),c=1023&e.charCodeAt(r++),n=(n=(n=(n=n>>>8^t[255&(n^(240|o>>8&7))])>>>8^t[255&(n^(128|o>>2&63))])>>>8^t[255&(n^(128|c>>6&15|(3&o)<<4))])>>>8^t[255&(n^(128|63&c))]):n=(n=(n=n>>>8^t[255&(n^(224|o>>12&15))])>>>8^t[255&(n^(128|o>>6&63))])>>>8^t[255&(n^(128|63&o))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?a(t):a({})},95363:(e,t,a)=>{var n=a(48834).Buffer,r=a(87554),i=a(59239);e.exports=function(e){return new c(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function c(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function s(e,t,a){Array.isArray(e)||(e=e.toArray());var r=new n(e);if(a&&r.length=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},16162:(e,t,a)=>{"use strict";var n=a(91285),r=a(27993),i=a(51445),o=a(9065),c=a(13973);function s(e){c.call(this,"digest"),this._hash=e}n(s,c),s.prototype._update=function(e){this._hash.update(e)},s.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new r:"rmd160"===e||"ripemd160"===e?new i:new s(o(e))}},22511:(e,t,a)=>{var n=a(27993);e.exports=function(e){return(new n).update(e).digest()}},50011:(e,t,a)=>{"use strict";var n=a(91285),r=a(6456),i=a(13973),o=a(77834).Buffer,c=a(22511),s=a(51445),d=a(9065),u=o.alloc(128);function f(e,t){i.call(this,"digest"),"string"==typeof t&&(t=o.from(t));var a="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>a?t=("rmd160"===e?new s:d(e)).update(t).digest():t.length{"use strict";var n=a(91285),r=a(77834).Buffer,i=a(13973),o=r.alloc(128),c=64;function s(e,t){i.call(this,"digest"),"string"==typeof t&&(t=r.from(t)),this._alg=e,this._key=t,t.length>c?t=e(t):t.length-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function b(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,a){e.onload=function(){t(e.result)},e.onerror=function(){a(e.error)}}))}function p(e){var t=new FileReader,a=h(t);return t.readAsArrayBuffer(e),a}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=b(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?b(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,a,n=b(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,a=h(t=new FileReader),t.readAsText(e),a;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),a=new Array(t.length),n=0;n-1?n:a),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function v(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var a=e.split("="),n=a.shift().replace(/\+/g," "),r=a.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(r))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},y.call(x.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var I=[301,302,303,307,308];w.redirect=function(e,t){if(-1===I.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var a=Error(e);this.stack=a.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,a){return new Promise((function(n,i){var o=new x(e,a);if(o.signal&&o.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function s(){c.abort()}c.onload=function(){var e,t,a={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var a=e.split(":"),n=a.shift().trim();if(n){var r=a.join(":").trim();t.append(n,r)}})),t)};a.url="responseURL"in c?c.responseURL:a.headers.get("X-Request-URL");var r="response"in c?c.response:c.responseText;n(new w(r,a))},c.onerror=function(){i(new TypeError("Network request failed"))},c.ontimeout=function(){i(new TypeError("Network request failed"))},c.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},c.open(o.method,o.url,!0),"include"===o.credentials?c.withCredentials=!0:"omit"===o.credentials&&(c.withCredentials=!1),"responseType"in c&&r&&(c.responseType="blob"),o.headers.forEach((function(e,t){c.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",s),c.onreadystatechange=function(){4===c.readyState&&o.signal.removeEventListener("abort",s)}),c.send(void 0===o._bodyInit?null:o._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=l,e.Request=x,e.Response=w),t.Headers=l,t.Request=x,t.Response=w,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var r=n;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},5634:(e,t,a)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=a(95003),t.createHash=t.Hash=a(16162),t.createHmac=t.Hmac=a(50011);var n=a(24778),r=Object.keys(n),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);t.getHashes=function(){return i};var o=a(30499);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var c=a(93667);t.Cipher=c.Cipher,t.createCipher=c.createCipher,t.Cipheriv=c.Cipheriv,t.createCipheriv=c.createCipheriv,t.Decipher=c.Decipher,t.createDecipher=c.createDecipher,t.Decipheriv=c.Decipheriv,t.createDecipheriv=c.createDecipheriv,t.getCiphers=c.getCiphers,t.listCiphers=c.listCiphers;var s=a(67602);t.DiffieHellmanGroup=s.DiffieHellmanGroup,t.createDiffieHellmanGroup=s.createDiffieHellmanGroup,t.getDiffieHellman=s.getDiffieHellman,t.createDiffieHellman=s.createDiffieHellman,t.DiffieHellman=s.DiffieHellman;var d=a(95263);t.createSign=d.createSign,t.Sign=d.Sign,t.createVerify=d.createVerify,t.Verify=d.Verify,t.createECDH=a(95363);var u=a(8493);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;var f=a(69631);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},15554:e=>{"use strict";var t="%[a-f0-9]{2}",a=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function r(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var a=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],r(a),r(n))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(a)||[],n=1;n{"use strict";var n=a(33464),r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,o=Array.prototype.concat,c=Object.defineProperty,s=a(81181)(),d=c&&s,u=function(e,t,a,n){var r;(!(t in e)||"function"==typeof(r=n)&&"[object Function]"===i.call(r)&&n())&&(d?c(e,t,{configurable:!0,enumerable:!1,value:a,writable:!0}):e[t]=a)},f=function(e,t){var a=arguments.length>2?arguments[2]:{},i=n(t);r&&(i=o.call(i,Object.getOwnPropertySymbols(t)));for(var c=0;c{"use strict";t.utils=a(94112),t.Cipher=a(43639),t.DES=a(4225),t.CBC=a(59692),t.EDE=a(4335)},59692:(e,t,a)=>{"use strict";var n=a(79561),r=a(91285),i={};function o(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var n=a(79561);function r(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=r,r.prototype._init=function(){},r.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},r.prototype._buffer=function(e,t){for(var a=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),a+=this._flushBuffer(r,a);return t+=this._buffer(e,t),r},r.prototype.final=function(e){var t,a;return e&&(t=this.update(e)),a="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(a):a},r.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var n=a(79561),r=a(91285),i=a(94112),o=a(43639);function c(){this.tmp=new Array(2),this.keys=null}function s(e){o.call(this,e);var t=new c;this._desState=t,this.deriveKeys(t,e.key)}r(s,o),e.exports=s,s.create=function(e){return new s(e)};var d=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var a=i.readUInt32BE(t,0),r=i.readUInt32BE(t,4);i.pc1(a,r,e.tmp,0),a=e.tmp[0],r=e.tmp[1];for(var o=0;o>>1];a=i.r28shl(a,c),r=i.r28shl(r,c),i.pc2(a,r,e.keys,o)}},s.prototype._update=function(e,t,a,n){var r=this._desState,o=i.readUInt32BE(e,t),c=i.readUInt32BE(e,t+4);i.ip(o,c,r.tmp,0),o=r.tmp[0],c=r.tmp[1],"encrypt"===this.type?this._encrypt(r,o,c,r.tmp,0):this._decrypt(r,o,c,r.tmp,0),o=r.tmp[0],c=r.tmp[1],i.writeUInt32BE(a,o,n),i.writeUInt32BE(a,c,n+4)},s.prototype._pad=function(e,t){for(var a=e.length-t,n=t;n>>0,o=l}i.rip(c,o,n,r)},s.prototype._decrypt=function(e,t,a,n,r){for(var o=a,c=t,s=e.keys.length-2;s>=0;s-=2){var d=e.keys[s],u=e.keys[s+1];i.expand(o,e.tmp,0),d^=e.tmp[0],u^=e.tmp[1];var f=i.substitute(d,u),l=o;o=(c^i.permute(f))>>>0,c=l}i.rip(o,c,n,r)}},4335:(e,t,a)=>{"use strict";var n=a(79561),r=a(91285),i=a(43639),o=a(4225);function c(e,t){n.equal(t.length,24,"Invalid key length");var a=t.slice(0,8),r=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:a}),o.create({type:"decrypt",key:r}),o.create({type:"encrypt",key:i})]:[o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:r}),o.create({type:"decrypt",key:a})]}function s(e){i.call(this,e);var t=new c(this.type,this.options.key);this._edeState=t}r(s,i),e.exports=s,s.create=function(e){return new s(e)},s.prototype._update=function(e,t,a,n){var r=this._edeState;r.ciphers[0]._update(e,t,a,n),r.ciphers[1]._update(a,n,a,n),r.ciphers[2]._update(a,n,a,n)},s.prototype._pad=o.prototype._pad,s.prototype._unpad=o.prototype._unpad},94112:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,a){e[0+a]=t>>>24,e[1+a]=t>>>16&255,e[2+a]=t>>>8&255,e[3+a]=255&t},t.ip=function(e,t,a,n){for(var r=0,i=0,o=6;o>=0;o-=2){for(var c=0;c<=24;c+=8)r<<=1,r|=t>>>c+o&1;for(c=0;c<=24;c+=8)r<<=1,r|=e>>>c+o&1}for(o=6;o>=0;o-=2){for(c=1;c<=25;c+=8)i<<=1,i|=t>>>c+o&1;for(c=1;c<=25;c+=8)i<<=1,i|=e>>>c+o&1}a[n+0]=r>>>0,a[n+1]=i>>>0},t.rip=function(e,t,a,n){for(var r=0,i=0,o=0;o<4;o++)for(var c=24;c>=0;c-=8)r<<=1,r|=t>>>c+o&1,r<<=1,r|=e>>>c+o&1;for(o=4;o<8;o++)for(c=24;c>=0;c-=8)i<<=1,i|=t>>>c+o&1,i<<=1,i|=e>>>c+o&1;a[n+0]=r>>>0,a[n+1]=i>>>0},t.pc1=function(e,t,a,n){for(var r=0,i=0,o=7;o>=5;o--){for(var c=0;c<=24;c+=8)r<<=1,r|=t>>c+o&1;for(c=0;c<=24;c+=8)r<<=1,r|=e>>c+o&1}for(c=0;c<=24;c+=8)r<<=1,r|=t>>c+o&1;for(o=1;o<=3;o++){for(c=0;c<=24;c+=8)i<<=1,i|=t>>c+o&1;for(c=0;c<=24;c+=8)i<<=1,i|=e>>c+o&1}for(c=0;c<=24;c+=8)i<<=1,i|=e>>c+o&1;a[n+0]=r>>>0,a[n+1]=i>>>0},t.r28shl=function(e,t){return e<>>28-t};var a=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,r){for(var i=0,o=0,c=a.length>>>1,s=0;s>>a[s]&1;for(s=c;s>>a[s]&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.expand=function(e,t,a){var n=0,r=0;n=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)n<<=6,n|=e>>>i&63;for(i=11;i>=3;i-=4)r|=e>>>i&63,r<<=6;r|=(31&e)<<1|e>>>31,t[a+0]=n>>>0,t[a+1]=r>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var a=0,r=0;r<4;r++)a<<=4,a|=n[64*r+(e>>>18-6*r&63)];for(r=0;r<4;r++)a<<=4,a|=n[256+64*r+(t>>>18-6*r&63)];return a>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,a=0;a>>r[a]&1;return t>>>0},t.padSplit=function(e,t,a){for(var n=e.toString(2);n.length{var n=a(48834).Buffer,r=a(32808),i=a(23418),o=a(30767),c={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(i[e].prime,"hex"),a=new n(i[e].gen,"hex");return new o(t,a)},t.createDiffieHellman=t.DiffieHellman=function e(t,a,i,s){return n.isBuffer(a)||void 0===c[a]?e(t,"binary",a,i):(a=a||"binary",s=s||"binary",i=i||new n([2]),n.isBuffer(i)||(i=new n(i,s)),"number"==typeof t?new o(r(t,i),i,!0):(n.isBuffer(t)||(t=new n(t,a)),new o(t,i,!0)))}},30767:(e,t,a)=>{var n=a(48834).Buffer,r=a(3908),i=new(a(46676)),o=new r(24),c=new r(11),s=new r(10),d=new r(3),u=new r(7),f=a(32808),l=a(95003);function b(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new r(e),this}function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new r(e),this}e.exports=m;var p={};function m(e,t,a){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,a?(this.setPublicKey=b,this.setPrivateKey=h):this._primeCode=8}function y(e,t){var a=new n(e.toArray());return t?a.toString(t):a}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var a=t.toString("hex"),n=[a,e.toString(16)].join("_");if(n in p)return p[n];var r,l=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!i.test(e))return l+=1,l+="02"===a||"05"===a?8:4,p[n]=l,l;switch(i.test(e.shrn(1))||(l+=2),a){case"02":e.mod(o).cmp(c)&&(l+=8);break;case"05":(r=e.mod(s)).cmp(d)&&r.cmp(u)&&(l+=8);break;default:l+=4}return p[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),a=new n(t.toArray()),i=this.getPrime();if(a.length{var n=a(95003);e.exports=g,g.simpleSieve=m,g.fermatTest=y;var r=a(3908),i=new r(24),o=new(a(46676)),c=new r(1),s=new r(2),d=new r(5),u=(new r(16),new r(8),new r(10)),f=new r(3),l=(new r(7),new r(11)),b=new r(4),h=(new r(12),null);function p(){if(null!==h)return h;var e=[];e[0]=2;for(var t=1,a=3;a<1048576;a+=2){for(var n=Math.ceil(Math.sqrt(a)),r=0;re;)a.ishrn(1);if(a.isEven()&&a.iadd(c),a.testn(1)||a.iadd(s),t.cmp(s)){if(!t.cmp(d))for(;a.mod(u).cmp(f);)a.iadd(b)}else for(;a.mod(i).cmp(l);)a.iadd(b);if(m(h=a.shrn(1))&&m(a)&&y(h)&&y(a)&&o.test(h)&&o.test(a))return a}}},3908:function(e,t,a){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function i(e,t,a){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a(20395).Buffer}catch(e){}function c(e,t){var a=e.charCodeAt(t);return a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},87554:(e,t,a)=>{"use strict";var n=t;n.version=a(40763).i8,n.utils=a(18288),n.rand=a(82745),n.curve=a(48610),n.curves=a(41479),n.ec=a(38596),n.eddsa=a(39208)},48919:(e,t,a)=>{"use strict";var n=a(72140),r=a(18288),i=r.getNAF,o=r.getJSF,c=r.assert;function s(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.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=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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 a=this.n&&this.p.div(this.n);!a||a.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function d(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){c(e.precomputed);var a=e._getDoubles(),n=i(t,1,this._bitLength),r=(1<=o;u--)s=(s<<1)+n[u];d.push(s)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),b=r;b>0;b--){for(o=0;o=0;d--){for(var u=0;d>=0&&0===o[d];d--)u++;if(d>=0&&u++,s=s.dblp(u),d<0)break;var f=o[d];c(0!==f),s="affine"===e.type?f>0?s.mixedAdd(r[f-1>>1]):s.mixedAdd(r[-f-1>>1].neg()):f>0?s.add(r[f-1>>1]):s.add(r[-f-1>>1].neg())}return"affine"===e.type?s.toP():s},s.prototype._wnafMulAdd=function(e,t,a,n,r){var c,s,d,u=this._wnafT1,f=this._wnafT2,l=this._wnafT3,b=0;for(c=0;c=1;c-=2){var p=c-1,m=c;if(1===u[p]&&1===u[m]){var y=[t[p],null,null,t[m]];0===t[p].y.cmp(t[m].y)?(y[1]=t[p].add(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg())):0===t[p].y.cmp(t[m].y.redNeg())?(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].add(t[m].neg())):(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],x=o(a[p],a[m]);for(b=Math.max(x[0].length,b),l[p]=new Array(b),l[m]=new Array(b),s=0;s=0;c--){for(var S=0;c>=0;){var k=!0;for(s=0;s=0&&S++,I=I.dblp(S),c<0)break;for(s=0;s0?d=f[s][C-1>>1]:C<0&&(d=f[s][-C-1>>1].neg()),I="affine"===d.type?I.mixedAdd(d):I.add(d))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step)},d.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],n=this,r=0;r{"use strict";var n=a(18288),r=a(72140),i=a(91285),o=a(48919),c=n.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new r(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),c(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function d(e,t,a,n,i){o.BasePoint.call(this,e,"projective"),null===t&&null===a&&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 r(t,16),this.y=new r(a,16),this.z=n?new r(n,16):this.curve.one,this.t=i&&new r(i,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()))))}i(s,o),e.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,a,n){return this.point(e,t,a,n)},s.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr(),n=this.c2.redSub(this.a.redMul(a)),i=this.one.redSub(this.c2.redMul(this.d).redMul(a)),o=n.redMul(i.redInvm()),c=o.redSqrt();if(0!==c.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=c.fromRed().isOdd();return(t&&!s||!t&&s)&&(c=c.redNeg()),this.point(e,c)},s.prototype.pointFromY=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr(),n=a.redSub(this.c2),i=a.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var c=o.redSqrt();if(0!==c.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return c.fromRed().isOdd()!==t&&(c=c.redNeg()),this.point(c,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),a=e.y.redSqr(),n=t.redMul(this.a).redAdd(a),r=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(a)));return 0===n.cmp(r)},i(d,o.BasePoint),s.prototype.pointFromJSON=function(e){return d.fromJSON(this,e)},s.prototype.point=function(e,t,a,n){return new d(this,e,t,a,n)},d.fromJSON=function(e,t){return new d(e,t[0],t[1],t[2])},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},d.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),a=this.z.redSqr();a=a.redIAdd(a);var n=this.curve._mulA(e),r=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=n.redAdd(t),o=i.redSub(a),c=n.redSub(t),s=r.redMul(o),d=i.redMul(c),u=r.redMul(c),f=o.redMul(i);return this.curve.point(s,d,f,u)},d.prototype._projDbl=function(){var e,t,a,n,r,i,o=this.x.redAdd(this.y).redSqr(),c=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var d=(n=this.curve._mulA(c)).redAdd(s);this.zOne?(e=o.redSub(c).redSub(s).redMul(d.redSub(this.curve.two)),t=d.redMul(n.redSub(s)),a=d.redSqr().redSub(d).redSub(d)):(r=this.z.redSqr(),i=d.redSub(r).redISub(r),e=o.redSub(c).redISub(s).redMul(i),t=d.redMul(n.redSub(s)),a=d.redMul(i))}else n=c.redAdd(s),r=this.curve._mulC(this.z).redSqr(),i=n.redSub(r).redSub(r),e=this.curve._mulC(o.redISub(n)).redMul(i),t=this.curve._mulC(n).redMul(c.redISub(s)),a=n.redMul(i);return this.curve.point(e,t,a)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),a=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),r=this.z.redMul(e.z.redAdd(e.z)),i=a.redSub(t),o=r.redSub(n),c=r.redAdd(n),s=a.redAdd(t),d=i.redMul(o),u=c.redMul(s),f=i.redMul(s),l=o.redMul(c);return this.curve.point(d,u,l,f)},d.prototype._projAdd=function(e){var t,a,n=this.z.redMul(e.z),r=n.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),c=this.curve.d.redMul(i).redMul(o),s=r.redSub(c),d=r.redAdd(c),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),f=n.redMul(s).redMul(u);return this.curve.twisted?(t=n.redMul(d).redMul(o.redSub(this.curve._mulA(i))),a=s.redMul(d)):(t=n.redMul(d).redMul(o.redSub(i)),a=this.curve._mulC(s).redMul(d)),this.curve.point(f,t,a)},d.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},d.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,a){return this.curve._wnafMulAdd(1,[this,t],[e,a],2,!1)},d.prototype.jmulAdd=function(e,t,a){return this.curve._wnafMulAdd(1,[this,t],[e,a],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var a=e.clone(),n=this.curve.redN.redMul(this.z);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},48610:(e,t,a)=>{"use strict";var n=t;n.base=a(48919),n.short=a(27715),n.mont=a(95125),n.edwards=a(37105)},95125:(e,t,a)=>{"use strict";var n=a(72140),r=a(91285),i=a(48919),o=a(18288);function c(e){i.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.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 s(e,t,a){i.BasePoint.call(this,e,"projective"),null===t&&null===a?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(c,i),e.exports=c,c.prototype.validate=function(e){var t=e.normalize().x,a=t.redSqr(),n=a.redMul(t).redAdd(a.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},r(s,i.BasePoint),c.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},c.prototype.point=function(e,t){return new s(this,e,t)},c.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),a=e.redSub(t),n=e.redMul(t),r=a.redMul(t.redAdd(this.curve.a24.redMul(a)));return this.curve.point(n,r)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var a=this.x.redAdd(this.z),n=this.x.redSub(this.z),r=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(a),o=r.redMul(n),c=t.z.redMul(i.redAdd(o).redSqr()),s=t.x.redMul(i.redISub(o).redSqr());return this.curve.point(c,s)},s.prototype.mul=function(e){for(var t=e.clone(),a=this,n=this.curve.point(null,null),r=[];0!==t.cmpn(0);t.iushrn(1))r.push(t.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(a=a.diffAdd(n,this),n=n.dbl()):(n=a.diffAdd(n,this),a=a.dbl());return n},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},27715:(e,t,a)=>{"use strict";var n=a(18288),r=a(72140),i=a(91285),o=a(48919),c=n.assert;function s(e){o.call(this,"short",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.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(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function d(e,t,a,n){o.BasePoint.call(this,e,"affine"),null===t&&null===a?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(t,16),this.y=new r(a,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 u(e,t,a,n){o.BasePoint.call(this,e,"jacobian"),null===t&&null===a&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(t,16),this.y=new r(a,16),this.z=new r(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}i(s,o),e.exports=s,s.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,a;if(e.beta)t=new r(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)a=new r(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?a=i[0]:(a=i[1],c(0===this.g.mul(a).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:a,basis:e.basis?e.basis.map((function(e){return{a:new r(e.a,16),b:new r(e.b,16)}})):this._getEndoBasis(a)}}},s.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:r.mont(e),a=new r(2).toRed(t).redInvm(),n=a.redNeg(),i=new r(3).toRed(t).redNeg().redSqrt().redMul(a);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},s.prototype._getEndoBasis=function(e){for(var t,a,n,i,o,c,s,d,u,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,b=this.n.clone(),h=new r(1),p=new r(0),m=new r(0),y=new r(1),g=0;0!==l.cmpn(0);){var x=b.div(l);d=b.sub(x.mul(l)),u=m.sub(x.mul(h));var v=y.sub(x.mul(p));if(!n&&d.cmp(f)<0)t=s.neg(),a=h,n=d.neg(),i=u;else if(n&&2==++g)break;s=d,b=l,l=d,m=h,h=u,y=p,p=v}o=d.neg(),c=u;var w=n.sqr().add(i.sqr());return o.sqr().add(c.sqr()).cmp(w)>=0&&(o=t,c=a),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),c=c.neg()),[{a:n,b:i},{a:o,b:c}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,a=t[0],n=t[1],r=n.b.mul(e).divRound(this.n),i=a.b.neg().mul(e).divRound(this.n),o=r.mul(a.a),c=i.mul(n.a),s=r.mul(a.b),d=i.mul(n.b);return{k1:e.sub(o).sub(c),k2:s.add(d).neg()}},s.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=a.redSqrt();if(0!==n.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},s.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,a=e.y,n=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===a.redSqr().redISub(r).cmpn(0)},s.prototype._endoWnafMulAdd=function(e,t,a){for(var n=this._endoWnafT1,r=this._endoWnafT2,i=0;i":""},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var a=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,n)},d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,a=this.x.redSqr(),n=e.redInvm(),r=a.redAdd(a).redIAdd(a).redIAdd(t).redMul(n),i=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(e){return e=new r(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,a){var n=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(n,r):this.curve._wnafMulAdd(1,n,r,2)},d.prototype.jmulAdd=function(e,t,a){var n=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(n,r,!0):this.curve._wnafMulAdd(1,n,r,2,!0)},d.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var a=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(n)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(n)}}}return t},d.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(u,o.BasePoint),s.prototype.jpoint=function(e,t,a){return new u(this,e,t,a)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),a=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(a,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),a=this.z.redSqr(),n=this.x.redMul(t),r=e.x.redMul(a),i=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(a.redMul(this.z)),c=n.redSub(r),s=i.redSub(o);if(0===c.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=c.redSqr(),u=d.redMul(c),f=n.redMul(d),l=s.redSqr().redIAdd(u).redISub(f).redISub(f),b=s.redMul(f.redISub(l)).redISub(i.redMul(u)),h=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(l,b,h)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,n=e.x.redMul(t),r=this.y,i=e.y.redMul(t).redMul(this.z),o=a.redSub(n),c=r.redSub(i);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=o.redSqr(),d=s.redMul(o),u=a.redMul(s),f=c.redSqr().redIAdd(d).redISub(u).redISub(u),l=c.redMul(u.redISub(f)).redISub(r.redMul(d)),b=this.z.redMul(o);return this.curve.jpoint(f,l,b)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),0===this.x.cmp(a))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},41479:(e,t,a)=>{"use strict";var n,r=t,i=a(34485),o=a(48610),c=a(18288).assert;function s(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function d(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var a=new s(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:a}),a}})}r.PresetCurve=s,d("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),d("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),d("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),d("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:i.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"]}),d("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:i.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"]}),d("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),d("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=a(47983)}catch(e){n=void 0}d("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},38596:(e,t,a)=>{"use strict";var n=a(72140),r=a(78873),i=a(18288),o=a(41479),c=a(82745),s=i.assert,d=a(22307),u=a(71798);function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(s(Object.prototype.hasOwnProperty.call(o,e),"Unknown curve "+e),e=o[e]),e instanceof o.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=f,f.prototype.keyPair=function(e){return new d(this,e)},f.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){e||(e={});for(var t=new r({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||c(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),i=this.n.sub(new n(2));;){var o=new n(t.generate(a));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}},f.prototype._truncateToN=function(e,t){var a=8*e.byteLength()-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,a,i){"object"==typeof a&&(i=a,a=null),i||(i={}),t=this.keyFromPrivate(t,a),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),c=t.getPrivate().toArray("be",o),s=e.toArray("be",o),d=new r({hash:this.hash,entropy:c,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),f=this.n.sub(new n(1)),l=0;;l++){var b=i.k?i.k(l):new n(d.generate(this.n.byteLength()));if(!((b=this._truncateToN(b,!0)).cmpn(1)<=0||b.cmp(f)>=0)){var h=this.g.mul(b);if(!h.isInfinity()){var p=h.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var y=b.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var g=(h.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0);return i.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new u({r:m,s:y,recoveryParam:g})}}}}}},f.prototype.verify=function(e,t,a,r){e=this._truncateToN(new n(e,16)),a=this.keyFromPublic(a,r);var i=(t=new u(t,"hex")).r,o=t.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 c,s=o.invm(this.n),d=s.mul(e).umod(this.n),f=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(d,a.getPublic(),f)).isInfinity()&&c.eqXToP(i):!(c=this.g.mulAdd(d,a.getPublic(),f)).isInfinity()&&0===c.getX().umod(this.n).cmp(i)},f.prototype.recoverPubKey=function(e,t,a,r){s((3&a)===a,"The recovery param is more than two bits"),t=new u(t,r);var i=this.n,o=new n(e),c=t.r,d=t.s,f=1&a,l=a>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");c=l?this.curve.pointFromX(c.add(this.curve.n),f):this.curve.pointFromX(c,f);var b=t.r.invm(i),h=i.sub(o).mul(b).umod(i),p=d.mul(b).umod(i);return this.g.mulAdd(h,c,p)},f.prototype.getKeyRecoveryParam=function(e,t,a,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var r=0;r<4;r++){var i;try{i=this.recoverPubKey(e,t,r)}catch(e){continue}if(i.eq(a))return r}throw new Error("Unable to find valid recovery factor")}},22307:(e,t,a)=>{"use strict";var n=a(72140),r=a(18288).assert;function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=i,i.fromPublic=function(e,t,a){return t instanceof i?t:new i(e,{pub:t,pubEnc:a})},i.fromPrivate=function(e,t,a){return t instanceof i?t:new i(e,{priv:t,privEnc:a})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?r(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.validate()||r(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,a){return this.ec.sign(e,this,t,a)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return""}},71798:(e,t,a)=>{"use strict";var n=a(72140),r=a(18288),i=r.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function c(){this.place=0}function s(e,t){var a=e[t.place++];if(!(128&a))return a;var n=15&a;if(0===n||n>4)return!1;for(var r=0,i=0,o=t.place;i>>=0;return!(r<=127)&&(t.place=o,r)}function d(e){for(var t=0,a=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|a);--a;)e.push(t>>>(a<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=r.toArray(e,t);var a=new c;if(48!==e[a.place++])return!1;var i=s(e,a);if(!1===i)return!1;if(i+a.place!==e.length)return!1;if(2!==e[a.place++])return!1;var o=s(e,a);if(!1===o)return!1;var d=e.slice(a.place,o+a.place);if(a.place+=o,2!==e[a.place++])return!1;var u=s(e,a);if(!1===u)return!1;if(e.length!==u+a.place)return!1;var f=e.slice(a.place,u+a.place);if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(d),this.s=new n(f),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&a[0]&&(a=[0].concat(a)),t=d(t),a=d(a);!(a[0]||128&a[1]);)a=a.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,a.length);var i=n.concat(a),o=[48];return u(o,i.length),o=o.concat(i),r.encode(o,e)}},39208:(e,t,a)=>{"use strict";var n=a(34485),r=a(41479),i=a(18288),o=i.assert,c=i.parseBytes,s=a(851),d=a(6117);function u(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=r[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=c(e);var a=this.keyFromSecret(t),n=this.hashInt(a.messagePrefix(),e),r=this.g.mul(n),i=this.encodePoint(r),o=this.hashInt(i,a.pubBytes(),e).mul(a.priv()),s=n.add(o).umod(this.curve.n);return this.makeSignature({R:r,S:s,Rencoded:i})},u.prototype.verify=function(e,t,a){e=c(e),t=this.makeSignature(t);var n=this.keyFromPublic(a),r=this.hashInt(t.Rencoded(),n.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(n.pub().mul(r)).eq(i)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=a(18288),r=n.assert,i=n.parseBytes,o=n.cachedProperty;function c(e,t){this.eddsa=e,this._secret=i(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=i(t.pub)}c.fromPublic=function(e,t){return t instanceof c?t:new c(e,{pub:t})},c.fromSecret=function(e,t){return t instanceof c?t:new c(e,{secret:t})},c.prototype.secret=function(){return this._secret},o(c,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(c,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(c,"privBytes",(function(){var e=this.eddsa,t=this.hash(),a=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[a]&=127,n[a]|=64,n})),o(c,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(c,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(c,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),c.prototype.sign=function(e){return r(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},c.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},c.prototype.getSecret=function(e){return r(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},c.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=c},6117:(e,t,a)=>{"use strict";var n=a(72140),r=a(18288),i=r.assert,o=r.cachedProperty,c=r.parseBytes;function s(e,t){this.eddsa=e,"object"!=typeof t&&(t=c(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),i(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},e.exports=s},47983:e=>{e.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"]]}}},18288:(e,t,a)=>{"use strict";var n=t,r=a(72140),i=a(79561),o=a(43022);n.assert=i,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode,n.getNAF=function(e,t,a){var n=new Array(Math.max(e.bitLength(),a)+1);n.fill(0);for(var r=1<(r>>1)-1?(r>>1)-s:s,i.isubn(c)):c=0,n[o]=c,i.iushrn(1)}return n},n.getJSF=function(e,t){var a=[[],[]];e=e.clone(),t=t.clone();for(var n,r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o,c,s=e.andln(3)+r&3,d=t.andln(3)+i&3;3===s&&(s=-1),3===d&&(d=-1),o=0==(1&s)?0:3!=(n=e.andln(7)+r&7)&&5!==n||2!==d?s:-s,a[0].push(o),c=0==(1&d)?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==s?d:-d,a[1].push(c),2*r===o+1&&(r=1-r),2*i===c+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return a},n.cachedProperty=function(e,t,a){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=a.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new r(e,"hex","le")}},72140:function(e,t,a){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function i(e,t,a){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a(30488).Buffer}catch(e){}function c(e,t){var a=e.charCodeAt(t);return a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},44956:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var a=Object(e),n=1;n{if(void 0!==a[t])return["bytes32",null==i?"0x0000000000000000000000000000000000000000000000000000000000000000":c.keccak(this.encodeData(t,i,a,r))];if(void 0===i)throw new Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",c.keccak(i)];if("string"===t)return"string"==typeof i&&(i=n.from(i,"utf8")),["bytes32",c.keccak(i)];if(t.lastIndexOf("]")===t.length-1){const a=t.slice(0,t.lastIndexOf("[")),n=i.map((t=>d(e,a,t)));return["bytes32",c.keccak(s.rawEncode(n.map((([e])=>e)),n.map((([,e])=>e))))]}return[t,i]};for(const n of a[e]){const[e,a]=d(n.name,n.type,t[n.name]);i.push(e),o.push(a)}}else for(const s of a[e]){let e=t[s.name];if(void 0!==e)if("bytes"===s.type)i.push("bytes32"),e=c.keccak(e),o.push(e);else if("string"===s.type)i.push("bytes32"),"string"==typeof e&&(e=n.from(e,"utf8")),e=c.keccak(e),o.push(e);else if(void 0!==a[s.type])i.push("bytes32"),e=c.keccak(this.encodeData(s.type,e,a,r)),o.push(e);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");i.push(s.type),o.push(e)}}return s.rawEncode(i,o)},encodeType(e,t){let a="",n=this.findTypeDependencies(e,t).filter((t=>t!==e));n=[e].concat(n.sort());for(const e of n){if(!t[e])throw new Error(`No type definition specified: ${e}`);a+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return a},findTypeDependencies(e,t,a=[]){if([e]=e.match(/^\w*/u),a.includes(e)||void 0===t[e])return a;a.push(e);for(const n of t[e])for(const e of this.findTypeDependencies(n.type,t,a))!a.includes(e)&&a.push(e);return a},hashStruct(e,t,a,n=!0){return c.keccak(this.encodeData(e,t,a,n))},hashType(e,t){return c.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const a in f.properties)e[a]&&(t[a]=e[a]);return"types"in t&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},sign(e,t=!0){const a=this.sanitizeData(e),r=[n.from("1901","hex")];return r.push(this.hashStruct("EIP712Domain",a.domain,a.types,t)),"EIP712Domain"!==a.primaryType&&r.push(this.hashStruct(a.primaryType,a.message,a.types,t)),c.keccak(n.concat(r))}};function b(e,t,a){const n=c.fromSigned(t),r=c.fromSigned(a),i=c.bufferToInt(e),o=k(c.toUnsigned(n).toString("hex"),64),s=k(c.toUnsigned(r).toString("hex"),64),d=c.stripHexPrefix(c.intToHex(i));return c.addHexPrefix(o.concat(s,d)).toString("hex")}function h(e,t){const a=I(t.data),n=c.ecsign(a,e);return c.bufferToHex(b(n.v,n.r,n.s))}function p(e){const t=A(I(e.data),e.sig),a=c.publicToAddress(t);return c.bufferToHex(a)}function m(e,t,a){if("x25519-xsalsa20-poly1305"===a){if("string"!=typeof t.data)throw new Error('Cannot detect secret message, message params should be of the form {data: "secret message"} ');const a=d.box.keyPair();let n;try{n=u.decodeBase64(e)}catch(e){throw new Error("Bad public key")}const r=u.decodeUTF8(t.data),i=d.randomBytes(d.box.nonceLength),o=d.box(r,i,n,a.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:u.encodeBase64(i),ephemPublicKey:u.encodeBase64(a.publicKey),ciphertext:u.encodeBase64(o)}}throw new Error("Encryption type/version not supported")}function y(e,t){if("x25519-xsalsa20-poly1305"===e.version){const a=C(t),n=d.box.keyPair.fromSecretKey(a).secretKey,r=u.decodeBase64(e.nonce),i=u.decodeBase64(e.ciphertext),o=u.decodeBase64(e.ephemPublicKey),c=d.box.open(i,r,o,n);let s;try{s=u.encodeUTF8(c)}catch(e){throw new Error("Decryption failed.")}if(s)return s;throw new Error("Decryption failed.")}throw new Error("Encryption type/version not supported.")}function g(e,t){const a=l.sign(t.data,!1),n=c.ecsign(a,e);return c.bufferToHex(b(n.v,n.r,n.s))}function x(e,t){const a=l.sign(t.data),n=c.ecsign(a,e);return c.bufferToHex(b(n.v,n.r,n.s))}function v(e){const t=A(l.sign(e.data,!1),e.sig),a=c.publicToAddress(t);return c.bufferToHex(a)}function w(e){const t=A(l.sign(e.data),e.sig),a=c.publicToAddress(t);return c.bufferToHex(a)}function I(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const a=e.map((function(e){return"bytes"===e.type?c.toBuffer(e.value):e.value})),n=e.map((function(e){return e.type})),r=e.map((function(e){if(!e.name)throw t;return`${e.type} ${e.name}`}));return s.soliditySHA3(["bytes32","bytes32"],[s.soliditySHA3(new Array(e.length).fill("string"),r),s.soliditySHA3(n,a)])}function A(e,t){const a=c.toBuffer(t),n=c.fromRpcSig(a);return c.ecrecover(e,n.v,n.r,n.s)}function S(e){const t=c.toBuffer(e.data);return A(c.hashPersonalMessage(t),e.sig)}function k(e,t){let a=`${e}`;for(;a.length0&&(c=2048-o-16),i.padding="0".repeat(c),m(e,{data:JSON.stringify(i)},a)},t.decrypt=y,t.decryptSafely=function(e,t){return JSON.parse(y(e,t)).data},t.getEncryptionPublicKey=function(e){const t=C(e),a=d.box.keyPair.fromSecretKey(t).publicKey;return u.encodeBase64(a)},t.signTypedMessage=function(e,t,a="V4"){switch(a){case"V1":return h(e,t);case"V3":return g(e,t);default:return x(e,t)}},t.recoverTypedMessage=function(e,t="V4"){switch(t){case"V1":return p(e);case"V3":return v(e);default:return w(e)}},t.signTypedData=g,t.signTypedData_v4=x,t.recoverTypedSignature=v,t.recoverTypedSignature_v4=w},36973:function(e,t,a){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function i(e,t,a){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a(9280).Buffer}catch(e){}function c(e,t){var a=e.charCodeAt(t);return a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},64611:(e,t,a)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=a(1115),i=r.keccak224,o=r.keccak384,c=r.keccak256,s=r.keccak512,d=a(70728),u=a(71696),f=a(22644),l=a(36973),b=a(16162),h=a(77834).Buffer;Object.assign(t,a(81538)),t.MAX_INTEGER=new l("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new l("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=h.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=h.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=h.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=l,t.rlp=f,t.secp256k1=d,t.zeros=function(e){return h.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,a,n){var r=t.zeros(a);return e=t.toBuffer(e),n?e.length0&&"0"===a.toString();)a=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!h.isBuffer(e))if(Array.isArray(e))e=h.from(e);else if("string"==typeof e)e=t.isHexString(e)?h.from(t.padToEven(t.stripHexPrefix(e)),"hex"):h.from(e);else if("number"==typeof e)e=t.intToBuffer(e);else if(null==e)e=h.allocUnsafe(0);else if(l.isBN(e))e=e.toArrayLike(h);else{if(!e.toArray)throw new Error("invalid type");e=h.from(e.toArray())}return e},t.bufferToInt=function(e){return new l(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new l(e).fromTwos(256)},t.toUnsigned=function(e){return h.from(e.toTwos(256).toArray())},t.keccak=function(e,a){switch(e=t.toBuffer(e),a||(a=256),a){case 224:return i(e);case 256:return c(e);case 384:return o(e);case 512:return s(e);default:throw new Error("Invald algorithm: keccak"+a)}},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),b("sha256").update(e).digest()},t.ripemd160=function(e,a){e=t.toBuffer(e);var n=b("rmd160").update(e).digest();return!0===a?t.setLength(n,32):n},t.rlphash=function(e){return t.keccak(f.encode(e))},t.isValidPrivate=function(e){return d.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?d.publicKeyVerify(h.concat([h.from([4]),e])):!!t&&d.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,a){return e=t.toBuffer(e),a&&64!==e.length&&(e=d.publicKeyConvert(e,!1).slice(1)),u(64===e.length),t.keccak(e).slice(-20)};var p=t.privateToPublic=function(e){return e=t.toBuffer(e),d.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=d.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var a=d.sign(e,t),n={};return n.r=a.signature.slice(0,32),n.s=a.signature.slice(32,64),n.v=a.recovery+27,n},t.hashPersonalMessage=function(e){var a=t.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return t.keccak(h.concat([a,e]))},t.ecrecover=function(e,a,n,r){var i=h.concat([t.setLength(n,32),t.setLength(r,32)],64),o=a-27;if(0!==o&&1!==o)throw new Error("Invalid signature v value");var c=d.recover(e,i,o);return d.publicKeyConvert(c,!1).slice(1)},t.toRpcSig=function(e,a,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(h.concat([t.setLengthLeft(a,32),t.setLengthLeft(n,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var a=e[64];return a<27&&(a+=27),{v:a,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(p(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var a=t.keccak(e).toString("hex"),n="0x",r=0;r=8?n+=e[r].toUpperCase():n+=e[r];return n},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,a){return e=t.toBuffer(e),a=(a=new l(a)).isZero()?null:h.from(a.toArray()),t.rlphash([e,a]).slice(-20)},t.isPrecompiled=function(e){var a=t.unpad(e);return 1===a.length&&a[0]>=1&&a[0]<=8},t.addHexPrefix=function(e){return"string"!=typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,a,n){var r=new l("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),i=new l("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==t.length||32!==a.length||27!==e&&28!==e||(t=new l(t),a=new l(a),t.isZero()||t.gt(i)||a.isZero()||a.gt(i)||!1===n&&1===new l(a).cmp(r)))},t.baToJSON=function(e){if(h.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var a=[],n=0;n=r.length,"The field "+a.name+" must not have more "+a.length+" bytes")):a.allowZero&&0===r.length||!a.length||u(a.length===r.length,"The field "+a.name+" must have byte length of "+a.length),e.raw[n]=r}e._fields.push(a.name),Object.defineProperty(e,a.name,{enumerable:!0,configurable:!0,get:r,set:i}),a.default&&(e[a.name]=a.default),a.alias&&Object.defineProperty(e,a.alias,{enumerable:!1,configurable:!0,set:i,get:r})})),r)if("string"==typeof r&&(r=h.from(t.stripHexPrefix(r),"hex")),h.isBuffer(r)&&(r=f.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(a,n){e[e._fields[n]]=t.toBuffer(a)}))}else{if("object"!==(void 0===r?"undefined":n(r)))throw new Error("invalid data");var i=Object.keys(r);a.forEach((function(t){-1!==i.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==i.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},70728:(e,t,a)=>{"use strict";var n=a(48834).Buffer,r=a(80101),i=a(64026),o=a(32e3),c=function(e){return 32===e.length&&r.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:c,privateKeyExport:function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var a=i.privateKeyExport(e,t);return o.privateKeyExport(e,a,t)},privateKeyImport:function(e){if(null!==(e=o.privateKeyImport(e))&&32===e.length&&c(e))return e;throw new Error("couldn't import from DER format")},privateKeyNegate:function(e){return n.from(r.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return n.from(i.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,t){return n.from(r.privateKeyTweakAdd(Uint8Array.from(e),t))},privateKeyTweakMul:function(e,t){return n.from(r.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},publicKeyCreate:function(e,t){return n.from(r.publicKeyCreate(Uint8Array.from(e),t))},publicKeyConvert:function(e,t){return n.from(r.publicKeyConvert(Uint8Array.from(e),t))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&r.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,t,a){return n.from(r.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyTweakMul:function(e,t,a){return n.from(r.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyCombine:function(e,t){var a=[];return e.forEach((function(e){a.push(Uint8Array.from(e))})),n.from(r.publicKeyCombine(a,t))},signatureNormalize:function(e){return n.from(r.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return n.from(r.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return n.from(r.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=o.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},sign:function(e,t,a){if(null===a)throw new TypeError("options should be an Object");var i=void 0;if(a){if(i={},null===a.data)throw new TypeError("options.data should be a Buffer");if(a.data){if(32!==a.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(a.data)}if(null===a.noncefn)throw new TypeError("options.noncefn should be a Function");a.noncefn&&(i.noncefn=function(e,t,r,i,o){var c=null!=r?n.from(r):null,s=null!=i?n.from(i):null,d=n.from("");return a.noncefn&&(d=a.noncefn(n.from(e),n.from(t),c,s,o)),Uint8Array.from(d)})}var o=r.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),i);return{signature:n.from(o.signature),recovery:o.recid}},verify:function(e,t,a){return r.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),a)},recover:function(e,t,a,i){return n.from(r.ecdsaRecover(Uint8Array.from(t),a,Uint8Array.from(e),i))},ecdh:function(e,t){return n.from(r.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},ecdhUnsafe:function(e,t,a){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return n.from(i.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),a))}}},32e3:(e,t,a)=>{"use strict";var n=a(48834).Buffer,r=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]),i=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]);t.privateKeyExport=function(e,t,a){var o=n.from(a?r:i);return e.copy(o,a?8:9),t.copy(o,a?181:214),o},t.privateKeyImport=function(e){var t=e.length,a=0;if(t2)return null;if(t<(a+=1)+n)return null;var r=e[a+n-1]|(n>1?e[a+n-2]<<8:0);return t<(a+=n)+r||t32||tr)return null;if(2!==e[i++])return null;var c=e[i++];if(128&c){if(i+(o=c-128)>r)return null;for(;o>0&&0===e[i];i+=1,o-=1);for(c=0;o>0;i+=1,o-=1)c=(c<<8)+e[i]}if(c>r-i)return null;var s=i;if(i+=c,2!==e[i++])return null;var d=e[i++];if(128&d){if(i+(o=d-128)>r)return null;for(;o>0&&0===e[i];i+=1,o-=1);for(d=0;o>0;i+=1,o-=1)d=(d<<8)+e[i]}if(d>r-i)return null;var u=i;for(i+=d;c>0&&0===e[s];c-=1,s+=1);if(c>32)return null;var f=e.slice(s,s+c);for(f.copy(t,32-f.length);d>0&&0===e[u];d-=1,u+=1);if(d>32)return null;var l=e.slice(u,u+d);return l.copy(a,32-l.length),{r:t,s:a}}},64026:(e,t,a)=>{"use strict";var n=a(48834).Buffer,r=a(36973),i=new(0,a(87554).ec)("secp256k1"),o=i.curve;t.privateKeyExport=function(e,t){var a=new r(e);if(a.ucmp(o.n)>=0)throw new Error("couldn't export to DER format");var n=i.g.mul(a);return c(n.getX(),n.getY(),t)},t.privateKeyModInverse=function(e){var t=new r(e);if(t.ucmp(o.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(o.n).toArrayLike(n,"be",32)},t.signatureImport=function(e){var t=new r(e.r);t.ucmp(o.n)>=0&&(t=new r(0));var a=new r(e.s);return a.ucmp(o.n)>=0&&(a=new r(0)),n.concat([t.toArrayLike(n,"be",32),a.toArrayLike(n,"be",32)])},t.ecdhUnsafe=function(e,t,a){var n=i.keyFromPublic(e),s=new r(t);if(s.ucmp(o.n)>=0||s.isZero())throw new Error("scalar was invalid (zero or overflow)");var d=n.pub.mul(s);return c(d.getX(),d.getY(),a)};var c=function(e,t,a){var r=void 0;return a?((r=n.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(n,"be",32).copy(r,1)):((r=n.alloc(65))[0]=4,e.toArrayLike(n,"be",32).copy(r,1),t.toArrayLike(n,"be",32).copy(r,33)),r}},35063:(e,t,a)=>{!function(e){"use strict";var t=function(e){var t,a=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=a>>16&255,e[t+2]=a>>8&255,e[t+3]=255&a,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function p(e,t,a,n,r){var i,o=0;for(i=0;i>>8)-1}function m(e,t,a,n){return p(e,t,a,n,16)}function y(e,t,a,n){return p(e,t,a,n,32)}function g(e,t,a,n){!function(e,t,a,n){for(var r,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,c=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,s=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,d=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,b=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&a[16]|(255&a[17])<<8|(255&a[18])<<16|(255&a[19])<<24,y=255&a[20]|(255&a[21])<<8|(255&a[22])<<16|(255&a[23])<<24,g=255&a[24]|(255&a[25])<<8|(255&a[26])<<16|(255&a[27])<<24,x=255&a[28]|(255&a[29])<<8|(255&a[30])<<16|(255&a[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=i,I=o,A=c,S=s,k=d,C=u,E=f,T=l,P=b,O=h,B=p,M=m,R=y,N=g,D=x,V=v,L=0;L<20;L+=2)w^=(r=(R^=(r=(P^=(r=(k^=(r=w+R|0)<<7|r>>>25)+w|0)<<9|r>>>23)+k|0)<<13|r>>>19)+P|0)<<18|r>>>14,C^=(r=(I^=(r=(N^=(r=(O^=(r=C+I|0)<<7|r>>>25)+C|0)<<9|r>>>23)+O|0)<<13|r>>>19)+N|0)<<18|r>>>14,B^=(r=(E^=(r=(A^=(r=(D^=(r=B+E|0)<<7|r>>>25)+B|0)<<9|r>>>23)+D|0)<<13|r>>>19)+A|0)<<18|r>>>14,V^=(r=(M^=(r=(T^=(r=(S^=(r=V+M|0)<<7|r>>>25)+V|0)<<9|r>>>23)+S|0)<<13|r>>>19)+T|0)<<18|r>>>14,w^=(r=(S^=(r=(A^=(r=(I^=(r=w+S|0)<<7|r>>>25)+w|0)<<9|r>>>23)+I|0)<<13|r>>>19)+A|0)<<18|r>>>14,C^=(r=(k^=(r=(T^=(r=(E^=(r=C+k|0)<<7|r>>>25)+C|0)<<9|r>>>23)+E|0)<<13|r>>>19)+T|0)<<18|r>>>14,B^=(r=(O^=(r=(P^=(r=(M^=(r=B+O|0)<<7|r>>>25)+B|0)<<9|r>>>23)+M|0)<<13|r>>>19)+P|0)<<18|r>>>14,V^=(r=(D^=(r=(N^=(r=(R^=(r=V+D|0)<<7|r>>>25)+V|0)<<9|r>>>23)+R|0)<<13|r>>>19)+N|0)<<18|r>>>14;w=w+i|0,I=I+o|0,A=A+c|0,S=S+s|0,k=k+d|0,C=C+u|0,E=E+f|0,T=T+l|0,P=P+b|0,O=O+h|0,B=B+p|0,M=M+m|0,R=R+y|0,N=N+g|0,D=D+x|0,V=V+v|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=I>>>0&255,e[5]=I>>>8&255,e[6]=I>>>16&255,e[7]=I>>>24&255,e[8]=A>>>0&255,e[9]=A>>>8&255,e[10]=A>>>16&255,e[11]=A>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=C>>>0&255,e[21]=C>>>8&255,e[22]=C>>>16&255,e[23]=C>>>24&255,e[24]=E>>>0&255,e[25]=E>>>8&255,e[26]=E>>>16&255,e[27]=E>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=P>>>0&255,e[33]=P>>>8&255,e[34]=P>>>16&255,e[35]=P>>>24&255,e[36]=O>>>0&255,e[37]=O>>>8&255,e[38]=O>>>16&255,e[39]=O>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=R>>>0&255,e[49]=R>>>8&255,e[50]=R>>>16&255,e[51]=R>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=V>>>0&255,e[61]=V>>>8&255,e[62]=V>>>16&255,e[63]=V>>>24&255}(e,t,a,n)}function x(e,t,a,n){!function(e,t,a,n){for(var r,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,c=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,s=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,d=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,b=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&a[16]|(255&a[17])<<8|(255&a[18])<<16|(255&a[19])<<24,y=255&a[20]|(255&a[21])<<8|(255&a[22])<<16|(255&a[23])<<24,g=255&a[24]|(255&a[25])<<8|(255&a[26])<<16|(255&a[27])<<24,x=255&a[28]|(255&a[29])<<8|(255&a[30])<<16|(255&a[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)i^=(r=(y^=(r=(b^=(r=(d^=(r=i+y|0)<<7|r>>>25)+i|0)<<9|r>>>23)+d|0)<<13|r>>>19)+b|0)<<18|r>>>14,u^=(r=(o^=(r=(g^=(r=(h^=(r=u+o|0)<<7|r>>>25)+u|0)<<9|r>>>23)+h|0)<<13|r>>>19)+g|0)<<18|r>>>14,p^=(r=(f^=(r=(c^=(r=(x^=(r=p+f|0)<<7|r>>>25)+p|0)<<9|r>>>23)+x|0)<<13|r>>>19)+c|0)<<18|r>>>14,v^=(r=(m^=(r=(l^=(r=(s^=(r=v+m|0)<<7|r>>>25)+v|0)<<9|r>>>23)+s|0)<<13|r>>>19)+l|0)<<18|r>>>14,i^=(r=(s^=(r=(c^=(r=(o^=(r=i+s|0)<<7|r>>>25)+i|0)<<9|r>>>23)+o|0)<<13|r>>>19)+c|0)<<18|r>>>14,u^=(r=(d^=(r=(l^=(r=(f^=(r=u+d|0)<<7|r>>>25)+u|0)<<9|r>>>23)+f|0)<<13|r>>>19)+l|0)<<18|r>>>14,p^=(r=(h^=(r=(b^=(r=(m^=(r=p+h|0)<<7|r>>>25)+p|0)<<9|r>>>23)+m|0)<<13|r>>>19)+b|0)<<18|r>>>14,v^=(r=(x^=(r=(g^=(r=(y^=(r=v+x|0)<<7|r>>>25)+v|0)<<9|r>>>23)+y|0)<<13|r>>>19)+g|0)<<18|r>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=u>>>0&255,e[5]=u>>>8&255,e[6]=u>>>16&255,e[7]=u>>>24&255,e[8]=p>>>0&255,e[9]=p>>>8&255,e[10]=p>>>16&255,e[11]=p>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=l>>>0&255,e[21]=l>>>8&255,e[22]=l>>>16&255,e[23]=l>>>24&255,e[24]=b>>>0&255,e[25]=b>>>8&255,e[26]=b>>>16&255,e[27]=b>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,a,n)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,a,n,r,i,o){var c,s,d=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)d[s]=0;for(s=0;s<8;s++)d[s]=i[s];for(;r>=64;){for(g(u,d,o,v),s=0;s<64;s++)e[t+s]=a[n+s]^u[s];for(c=1,s=8;s<16;s++)c=c+(255&d[s])|0,d[s]=255&c,c>>>=8;r-=64,t+=64,n+=64}if(r>0)for(g(u,d,o,v),s=0;s=64;){for(g(s,c,r,v),o=0;o<64;o++)e[t+o]=s[o];for(i=1,o=8;o<16;o++)i=i+(255&c[o])|0,c[o]=255&i,i>>>=8;a-=64,t+=64}if(a>0)for(g(s,c,r,v),o=0;o>>13|a<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(a>>>10|n<<6),r=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|r<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(r>>>4|i<<12),this.r[5]=i>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|o<<2),c=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|c<<5),s=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(c>>>8|s<<8),this.r[9]=s>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function C(e,t,a,n,r,i){var o=new k(i);return o.update(a,n,r),o.finish(e,t),0}function E(e,t,a,n,r,i){var o=new Uint8Array(16);return C(o,0,a,n,r,i),m(e,t,o,0)}function T(e,t,a,n,r){var i;if(a<32)return-1;for(S(e,0,t,0,a,n,r),C(e,16,e,32,a-32,e),i=0;i<16;i++)e[i]=0;return 0}function P(e,t,a,n,r){var i,o=new Uint8Array(32);if(a<32)return-1;if(A(o,0,32,n,r),0!==E(t,16,t,32,a-32,o))return-1;for(S(e,0,t,0,a,n,r),i=0;i<32;i++)e[i]=0;return 0}function O(e,t){var a;for(a=0;a<16;a++)e[a]=0|t[a]}function B(e){var t,a,n=1;for(t=0;t<16;t++)a=e[t]+n+65535,n=Math.floor(a/65536),e[t]=a-65536*n;e[0]+=n-1+37*(n-1)}function M(e,t,a){for(var n,r=~(a-1),i=0;i<16;i++)n=r&(e[i]^t[i]),e[i]^=n,t[i]^=n}function R(e,a){var n,r,i,o=t(),c=t();for(n=0;n<16;n++)c[n]=a[n];for(B(c),B(c),B(c),r=0;r<2;r++){for(o[0]=c[0]-65517,n=1;n<15;n++)o[n]=c[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=c[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,M(c,o,1-i)}for(n=0;n<16;n++)e[2*n]=255&c[n],e[2*n+1]=c[n]>>8}function N(e,t){var a=new Uint8Array(32),n=new Uint8Array(32);return R(a,e),R(n,t),y(a,0,n,0)}function D(e){var t=new Uint8Array(32);return R(t,e),1&t[0]}function V(e,t){var a;for(a=0;a<16;a++)e[a]=t[2*a]+(t[2*a+1]<<8);e[15]&=32767}function L(e,t,a){for(var n=0;n<16;n++)e[n]=t[n]+a[n]}function U(e,t,a){for(var n=0;n<16;n++)e[n]=t[n]-a[n]}function H(e,t,a){var n,r,i=0,o=0,c=0,s=0,d=0,u=0,f=0,l=0,b=0,h=0,p=0,m=0,y=0,g=0,x=0,v=0,w=0,I=0,A=0,S=0,k=0,C=0,E=0,T=0,P=0,O=0,B=0,M=0,R=0,N=0,D=0,V=a[0],L=a[1],U=a[2],H=a[3],K=a[4],F=a[5],j=a[6],q=a[7],z=a[8],W=a[9],G=a[10],X=a[11],Z=a[12],J=a[13],Y=a[14],Q=a[15];i+=(n=t[0])*V,o+=n*L,c+=n*U,s+=n*H,d+=n*K,u+=n*F,f+=n*j,l+=n*q,b+=n*z,h+=n*W,p+=n*G,m+=n*X,y+=n*Z,g+=n*J,x+=n*Y,v+=n*Q,o+=(n=t[1])*V,c+=n*L,s+=n*U,d+=n*H,u+=n*K,f+=n*F,l+=n*j,b+=n*q,h+=n*z,p+=n*W,m+=n*G,y+=n*X,g+=n*Z,x+=n*J,v+=n*Y,w+=n*Q,c+=(n=t[2])*V,s+=n*L,d+=n*U,u+=n*H,f+=n*K,l+=n*F,b+=n*j,h+=n*q,p+=n*z,m+=n*W,y+=n*G,g+=n*X,x+=n*Z,v+=n*J,w+=n*Y,I+=n*Q,s+=(n=t[3])*V,d+=n*L,u+=n*U,f+=n*H,l+=n*K,b+=n*F,h+=n*j,p+=n*q,m+=n*z,y+=n*W,g+=n*G,x+=n*X,v+=n*Z,w+=n*J,I+=n*Y,A+=n*Q,d+=(n=t[4])*V,u+=n*L,f+=n*U,l+=n*H,b+=n*K,h+=n*F,p+=n*j,m+=n*q,y+=n*z,g+=n*W,x+=n*G,v+=n*X,w+=n*Z,I+=n*J,A+=n*Y,S+=n*Q,u+=(n=t[5])*V,f+=n*L,l+=n*U,b+=n*H,h+=n*K,p+=n*F,m+=n*j,y+=n*q,g+=n*z,x+=n*W,v+=n*G,w+=n*X,I+=n*Z,A+=n*J,S+=n*Y,k+=n*Q,f+=(n=t[6])*V,l+=n*L,b+=n*U,h+=n*H,p+=n*K,m+=n*F,y+=n*j,g+=n*q,x+=n*z,v+=n*W,w+=n*G,I+=n*X,A+=n*Z,S+=n*J,k+=n*Y,C+=n*Q,l+=(n=t[7])*V,b+=n*L,h+=n*U,p+=n*H,m+=n*K,y+=n*F,g+=n*j,x+=n*q,v+=n*z,w+=n*W,I+=n*G,A+=n*X,S+=n*Z,k+=n*J,C+=n*Y,E+=n*Q,b+=(n=t[8])*V,h+=n*L,p+=n*U,m+=n*H,y+=n*K,g+=n*F,x+=n*j,v+=n*q,w+=n*z,I+=n*W,A+=n*G,S+=n*X,k+=n*Z,C+=n*J,E+=n*Y,T+=n*Q,h+=(n=t[9])*V,p+=n*L,m+=n*U,y+=n*H,g+=n*K,x+=n*F,v+=n*j,w+=n*q,I+=n*z,A+=n*W,S+=n*G,k+=n*X,C+=n*Z,E+=n*J,T+=n*Y,P+=n*Q,p+=(n=t[10])*V,m+=n*L,y+=n*U,g+=n*H,x+=n*K,v+=n*F,w+=n*j,I+=n*q,A+=n*z,S+=n*W,k+=n*G,C+=n*X,E+=n*Z,T+=n*J,P+=n*Y,O+=n*Q,m+=(n=t[11])*V,y+=n*L,g+=n*U,x+=n*H,v+=n*K,w+=n*F,I+=n*j,A+=n*q,S+=n*z,k+=n*W,C+=n*G,E+=n*X,T+=n*Z,P+=n*J,O+=n*Y,B+=n*Q,y+=(n=t[12])*V,g+=n*L,x+=n*U,v+=n*H,w+=n*K,I+=n*F,A+=n*j,S+=n*q,k+=n*z,C+=n*W,E+=n*G,T+=n*X,P+=n*Z,O+=n*J,B+=n*Y,M+=n*Q,g+=(n=t[13])*V,x+=n*L,v+=n*U,w+=n*H,I+=n*K,A+=n*F,S+=n*j,k+=n*q,C+=n*z,E+=n*W,T+=n*G,P+=n*X,O+=n*Z,B+=n*J,M+=n*Y,R+=n*Q,x+=(n=t[14])*V,v+=n*L,w+=n*U,I+=n*H,A+=n*K,S+=n*F,k+=n*j,C+=n*q,E+=n*z,T+=n*W,P+=n*G,O+=n*X,B+=n*Z,M+=n*J,R+=n*Y,N+=n*Q,v+=(n=t[15])*V,o+=38*(I+=n*U),c+=38*(A+=n*H),s+=38*(S+=n*K),d+=38*(k+=n*F),u+=38*(C+=n*j),f+=38*(E+=n*q),l+=38*(T+=n*z),b+=38*(P+=n*W),h+=38*(O+=n*G),p+=38*(B+=n*X),m+=38*(M+=n*Z),y+=38*(R+=n*J),g+=38*(N+=n*Y),x+=38*(D+=n*Q),i=(n=(i+=38*(w+=n*L))+(r=1)+65535)-65536*(r=Math.floor(n/65536)),o=(n=o+r+65535)-65536*(r=Math.floor(n/65536)),c=(n=c+r+65535)-65536*(r=Math.floor(n/65536)),s=(n=s+r+65535)-65536*(r=Math.floor(n/65536)),d=(n=d+r+65535)-65536*(r=Math.floor(n/65536)),u=(n=u+r+65535)-65536*(r=Math.floor(n/65536)),f=(n=f+r+65535)-65536*(r=Math.floor(n/65536)),l=(n=l+r+65535)-65536*(r=Math.floor(n/65536)),b=(n=b+r+65535)-65536*(r=Math.floor(n/65536)),h=(n=h+r+65535)-65536*(r=Math.floor(n/65536)),p=(n=p+r+65535)-65536*(r=Math.floor(n/65536)),m=(n=m+r+65535)-65536*(r=Math.floor(n/65536)),y=(n=y+r+65535)-65536*(r=Math.floor(n/65536)),g=(n=g+r+65535)-65536*(r=Math.floor(n/65536)),x=(n=x+r+65535)-65536*(r=Math.floor(n/65536)),v=(n=v+r+65535)-65536*(r=Math.floor(n/65536)),i=(n=(i+=r-1+37*(r-1))+(r=1)+65535)-65536*(r=Math.floor(n/65536)),o=(n=o+r+65535)-65536*(r=Math.floor(n/65536)),c=(n=c+r+65535)-65536*(r=Math.floor(n/65536)),s=(n=s+r+65535)-65536*(r=Math.floor(n/65536)),d=(n=d+r+65535)-65536*(r=Math.floor(n/65536)),u=(n=u+r+65535)-65536*(r=Math.floor(n/65536)),f=(n=f+r+65535)-65536*(r=Math.floor(n/65536)),l=(n=l+r+65535)-65536*(r=Math.floor(n/65536)),b=(n=b+r+65535)-65536*(r=Math.floor(n/65536)),h=(n=h+r+65535)-65536*(r=Math.floor(n/65536)),p=(n=p+r+65535)-65536*(r=Math.floor(n/65536)),m=(n=m+r+65535)-65536*(r=Math.floor(n/65536)),y=(n=y+r+65535)-65536*(r=Math.floor(n/65536)),g=(n=g+r+65535)-65536*(r=Math.floor(n/65536)),x=(n=x+r+65535)-65536*(r=Math.floor(n/65536)),v=(n=v+r+65535)-65536*(r=Math.floor(n/65536)),i+=r-1+37*(r-1),e[0]=i,e[1]=o,e[2]=c,e[3]=s,e[4]=d,e[5]=u,e[6]=f,e[7]=l,e[8]=b,e[9]=h,e[10]=p,e[11]=m,e[12]=y,e[13]=g,e[14]=x,e[15]=v}function K(e,t){H(e,t,t)}function F(e,a){var n,r=t();for(n=0;n<16;n++)r[n]=a[n];for(n=253;n>=0;n--)K(r,r),2!==n&&4!==n&&H(r,r,a);for(n=0;n<16;n++)e[n]=r[n]}function j(e,a){var n,r=t();for(n=0;n<16;n++)r[n]=a[n];for(n=250;n>=0;n--)K(r,r),1!==n&&H(r,r,a);for(n=0;n<16;n++)e[n]=r[n]}function q(e,a,n){var r,i,o=new Uint8Array(32),c=new Float64Array(80),d=t(),u=t(),f=t(),l=t(),b=t(),h=t();for(i=0;i<31;i++)o[i]=a[i];for(o[31]=127&a[31]|64,o[0]&=248,V(c,n),i=0;i<16;i++)u[i]=c[i],l[i]=d[i]=f[i]=0;for(d[0]=l[0]=1,i=254;i>=0;--i)M(d,u,r=o[i>>>3]>>>(7&i)&1),M(f,l,r),L(b,d,f),U(d,d,f),L(f,u,l),U(u,u,l),K(l,b),K(h,d),H(d,f,d),H(f,u,b),L(b,d,f),U(d,d,f),K(u,d),U(f,l,h),H(d,f,s),L(d,d,l),H(f,f,d),H(d,l,h),H(l,u,c),K(u,b),M(d,u,r),M(f,l,r);for(i=0;i<16;i++)c[i+16]=d[i],c[i+32]=f[i],c[i+48]=u[i],c[i+64]=l[i];var p=c.subarray(32),m=c.subarray(16);return F(p,p),H(m,m,p),R(e,m),0}function z(e,t){return q(e,t,i)}function W(e,t){return n(t,32),z(e,t)}function G(e,t,a){var n=new Uint8Array(32);return q(n,a,t),x(e,r,n,v)}k.prototype.blocks=function(e,t,a){for(var n,r,i,o,c,s,d,u,f,l,b,h,p,m,y,g,x,v,w,I=this.fin?0:2048,A=this.h[0],S=this.h[1],k=this.h[2],C=this.h[3],E=this.h[4],T=this.h[5],P=this.h[6],O=this.h[7],B=this.h[8],M=this.h[9],R=this.r[0],N=this.r[1],D=this.r[2],V=this.r[3],L=this.r[4],U=this.r[5],H=this.r[6],K=this.r[7],F=this.r[8],j=this.r[9];a>=16;)l=f=0,l+=(A+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*R,l+=(S+=8191&(n>>>13|(r=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*j),l+=(k+=8191&(r>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*F),l+=(C+=8191&(i>>>7|(o=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*K),f=(l+=(E+=8191&(o>>>4|(c=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*H))>>>13,l&=8191,l+=(T+=c>>>1&8191)*(5*U),l+=(P+=8191&(c>>>14|(s=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),l+=(O+=8191&(s>>>11|(d=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*V),l+=(B+=8191&(d>>>8|(u=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),b=f+=(l+=(M+=u>>>5|I)*(5*N))>>>13,b+=A*N,b+=S*R,b+=k*(5*j),b+=C*(5*F),f=(b+=E*(5*K))>>>13,b&=8191,b+=T*(5*H),b+=P*(5*U),b+=O*(5*L),b+=B*(5*V),f+=(b+=M*(5*D))>>>13,b&=8191,h=f,h+=A*D,h+=S*N,h+=k*R,h+=C*(5*j),f=(h+=E*(5*F))>>>13,h&=8191,h+=T*(5*K),h+=P*(5*H),h+=O*(5*U),h+=B*(5*L),p=f+=(h+=M*(5*V))>>>13,p+=A*V,p+=S*D,p+=k*N,p+=C*R,f=(p+=E*(5*j))>>>13,p&=8191,p+=T*(5*F),p+=P*(5*K),p+=O*(5*H),p+=B*(5*U),m=f+=(p+=M*(5*L))>>>13,m+=A*L,m+=S*V,m+=k*D,m+=C*N,f=(m+=E*R)>>>13,m&=8191,m+=T*(5*j),m+=P*(5*F),m+=O*(5*K),m+=B*(5*H),y=f+=(m+=M*(5*U))>>>13,y+=A*U,y+=S*L,y+=k*V,y+=C*D,f=(y+=E*N)>>>13,y&=8191,y+=T*R,y+=P*(5*j),y+=O*(5*F),y+=B*(5*K),g=f+=(y+=M*(5*H))>>>13,g+=A*H,g+=S*U,g+=k*L,g+=C*V,f=(g+=E*D)>>>13,g&=8191,g+=T*N,g+=P*R,g+=O*(5*j),g+=B*(5*F),x=f+=(g+=M*(5*K))>>>13,x+=A*K,x+=S*H,x+=k*U,x+=C*L,f=(x+=E*V)>>>13,x&=8191,x+=T*D,x+=P*N,x+=O*R,x+=B*(5*j),v=f+=(x+=M*(5*F))>>>13,v+=A*F,v+=S*K,v+=k*H,v+=C*U,f=(v+=E*L)>>>13,v&=8191,v+=T*V,v+=P*D,v+=O*N,v+=B*R,w=f+=(v+=M*(5*j))>>>13,w+=A*j,w+=S*F,w+=k*K,w+=C*H,f=(w+=E*U)>>>13,w&=8191,w+=T*L,w+=P*V,w+=O*D,w+=B*N,A=l=8191&(f=(f=((f+=(w+=M*R)>>>13)<<2)+f|0)+(l&=8191)|0),S=b+=f>>>=13,k=h&=8191,C=p&=8191,E=m&=8191,T=y&=8191,P=g&=8191,O=x&=8191,B=v&=8191,M=w&=8191,t+=16,a-=16;this.h[0]=A,this.h[1]=S,this.h[2]=k,this.h[3]=C,this.h[4]=E,this.h[5]=T,this.h[6]=P,this.h[7]=O,this.h[8]=B,this.h[9]=M},k.prototype.finish=function(e,t){var a,n,r,i,o=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(a=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=a,a=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*a,a=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=a,a=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=a,o[0]=this.h[0]+5,a=o[0]>>>13,o[0]&=8191,i=1;i<10;i++)o[i]=this.h[i]+a,a=o[i]>>>13,o[i]&=8191;for(o[9]-=8192,n=(1^a)-1,i=0;i<10;i++)o[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|o[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),r=this.h[0]+this.pad[0],this.h[0]=65535&r,i=1;i<8;i++)r=(this.h[i]+this.pad[i]|0)+(r>>>16)|0,this.h[i]=65535&r;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,a){var n,r;if(this.leftover){for((r=16-this.leftover)>a&&(r=a),n=0;n=16&&(r=a-a%16,this.blocks(e,t,r),t+=r,a-=r),a){for(n=0;n=128;){for(I=0;I<16;I++)A=8*I+Z,O[I]=a[A+0]<<24|a[A+1]<<16|a[A+2]<<8|a[A+3],B[I]=a[A+4]<<24|a[A+5]<<16|a[A+6]<<8|a[A+7];for(I=0;I<80;I++)if(r=M,i=R,o=N,c=D,s=V,d=L,u=U,l=K,b=F,h=j,p=q,m=z,y=W,g=G,C=65535&(k=X),E=k>>>16,T=65535&(S=H),P=S>>>16,C+=65535&(k=(z>>>14|V<<18)^(z>>>18|V<<14)^(V>>>9|z<<23)),E+=k>>>16,T+=65535&(S=(V>>>14|z<<18)^(V>>>18|z<<14)^(z>>>9|V<<23)),P+=S>>>16,C+=65535&(k=z&W^~z&G),E+=k>>>16,T+=65535&(S=V&L^~V&U),P+=S>>>16,C+=65535&(k=J[2*I+1]),E+=k>>>16,T+=65535&(S=J[2*I]),P+=S>>>16,S=O[I%16],E+=(k=B[I%16])>>>16,T+=65535&S,P+=S>>>16,T+=(E+=(C+=65535&k)>>>16)>>>16,C=65535&(k=w=65535&C|E<<16),E=k>>>16,T=65535&(S=v=65535&T|(P+=T>>>16)<<16),P=S>>>16,C+=65535&(k=(K>>>28|M<<4)^(M>>>2|K<<30)^(M>>>7|K<<25)),E+=k>>>16,T+=65535&(S=(M>>>28|K<<4)^(K>>>2|M<<30)^(K>>>7|M<<25)),P+=S>>>16,E+=(k=K&F^K&j^F&j)>>>16,T+=65535&(S=M&R^M&N^R&N),P+=S>>>16,f=65535&(T+=(E+=(C+=65535&k)>>>16)>>>16)|(P+=T>>>16)<<16,x=65535&C|E<<16,C=65535&(k=p),E=k>>>16,T=65535&(S=c),P=S>>>16,E+=(k=w)>>>16,T+=65535&(S=v),P+=S>>>16,R=r,N=i,D=o,V=c=65535&(T+=(E+=(C+=65535&k)>>>16)>>>16)|(P+=T>>>16)<<16,L=s,U=d,H=u,M=f,F=l,j=b,q=h,z=p=65535&C|E<<16,W=m,G=y,X=g,K=x,I%16==15)for(A=0;A<16;A++)S=O[A],C=65535&(k=B[A]),E=k>>>16,T=65535&S,P=S>>>16,S=O[(A+9)%16],C+=65535&(k=B[(A+9)%16]),E+=k>>>16,T+=65535&S,P+=S>>>16,v=O[(A+1)%16],C+=65535&(k=((w=B[(A+1)%16])>>>1|v<<31)^(w>>>8|v<<24)^(w>>>7|v<<25)),E+=k>>>16,T+=65535&(S=(v>>>1|w<<31)^(v>>>8|w<<24)^v>>>7),P+=S>>>16,v=O[(A+14)%16],E+=(k=((w=B[(A+14)%16])>>>19|v<<13)^(v>>>29|w<<3)^(w>>>6|v<<26))>>>16,T+=65535&(S=(v>>>19|w<<13)^(w>>>29|v<<3)^v>>>6),P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,O[A]=65535&T|P<<16,B[A]=65535&C|E<<16;C=65535&(k=K),E=k>>>16,T=65535&(S=M),P=S>>>16,S=e[0],E+=(k=t[0])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[0]=M=65535&T|P<<16,t[0]=K=65535&C|E<<16,C=65535&(k=F),E=k>>>16,T=65535&(S=R),P=S>>>16,S=e[1],E+=(k=t[1])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[1]=R=65535&T|P<<16,t[1]=F=65535&C|E<<16,C=65535&(k=j),E=k>>>16,T=65535&(S=N),P=S>>>16,S=e[2],E+=(k=t[2])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[2]=N=65535&T|P<<16,t[2]=j=65535&C|E<<16,C=65535&(k=q),E=k>>>16,T=65535&(S=D),P=S>>>16,S=e[3],E+=(k=t[3])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[3]=D=65535&T|P<<16,t[3]=q=65535&C|E<<16,C=65535&(k=z),E=k>>>16,T=65535&(S=V),P=S>>>16,S=e[4],E+=(k=t[4])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[4]=V=65535&T|P<<16,t[4]=z=65535&C|E<<16,C=65535&(k=W),E=k>>>16,T=65535&(S=L),P=S>>>16,S=e[5],E+=(k=t[5])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[5]=L=65535&T|P<<16,t[5]=W=65535&C|E<<16,C=65535&(k=G),E=k>>>16,T=65535&(S=U),P=S>>>16,S=e[6],E+=(k=t[6])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[6]=U=65535&T|P<<16,t[6]=G=65535&C|E<<16,C=65535&(k=X),E=k>>>16,T=65535&(S=H),P=S>>>16,S=e[7],E+=(k=t[7])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(E+=(C+=65535&k)>>>16)>>>16)>>>16,e[7]=H=65535&T|P<<16,t[7]=X=65535&C|E<<16,Z+=128,n-=128}return n}function Q(e,t,a){var n,r=new Int32Array(8),i=new Int32Array(8),o=new Uint8Array(256),c=a;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(r,i,t,a),a%=128,n=0;n=0;--r)$(e,t,n=a[r/8|0]>>(7&r)&1),_(t,e),_(e,e),$(e,t,n)}function ae(e,a){var n=[t(),t(),t(),t()];O(n[0],f),O(n[1],l),O(n[2],c),H(n[3],f,l),te(e,n,a)}function ne(e,a,r){var i,o=new Uint8Array(64),c=[t(),t(),t(),t()];for(r||n(a,32),Q(o,a,32),o[0]&=248,o[31]&=127,o[31]|=64,ae(c,o),ee(e,c),i=0;i<32;i++)a[i+32]=e[i];return 0}var re=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var a,n,r,i;for(n=63;n>=32;--n){for(a=0,r=n-32,i=n-12;r>4)*re[r],a=t[r]>>8,t[r]&=255;for(r=0;r<32;r++)t[r]-=a*re[r];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,a=new Float64Array(64);for(t=0;t<64;t++)a[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,a)}function ce(e,a,n,r){var i,o,c=new Uint8Array(64),s=new Uint8Array(64),d=new Uint8Array(64),u=new Float64Array(64),f=[t(),t(),t(),t()];Q(c,r,32),c[0]&=248,c[31]&=127,c[31]|=64;var l=n+64;for(i=0;i>7&&U(e[0],o,e[0]),H(e[3],e[0],e[1]),0)}(l,r))return-1;for(i=0;i=0},e.sign.keyPair=function(){var e=new Uint8Array(ue),t=new Uint8Array(fe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(be(e),e.length!==fe)throw new Error("bad secret key size");for(var t=new Uint8Array(ue),a=0;a{var n=a(48834).Buffer;const{EventEmitter:r}=a(69997),i=a(22965).default,o=a(47144),c="Simple Key Pair",s=a(68445);class d extends r{constructor(e){super(),this.type=c,this.wallets=[],this.deserialize(e)}serialize(){return Promise.resolve(this.wallets.map((e=>e.getPrivateKey().toString("hex"))))}deserialize(e=[]){return new Promise(((t,a)=>{try{this.wallets=e.map((e=>{const t=o.stripHexPrefix(e),a=n.from(t,"hex");return i.fromPrivateKey(a)}))}catch(e){a(e)}t()}))}addAccounts(e=1){const t=[];for(let a=0;ao.bufferToHex(e.getAddress())));return Promise.resolve(a)}getAccounts(){return Promise.resolve(this.wallets.map((e=>o.bufferToHex(e.getAddress()))))}signTransaction(e,t,a={}){const n=this.getPrivateKeyFor(e,a),r=t.sign(n);return Promise.resolve(void 0===r?t:r)}signMessage(e,t,a={}){const r=o.stripHexPrefix(t),i=this.getPrivateKeyFor(e,a),c=o.ecsign(n.from(r,"hex"),i),d=s.concatSig(c.v,c.r,c.s);return Promise.resolve(d)}newGethSignMessage(e,t,a={}){const n=this.getPrivateKeyFor(e,a),r=o.toBuffer(t),i=o.hashPersonalMessage(r),c=o.ecsign(i,n),d=s.concatSig(c.v,c.r,c.s);return Promise.resolve(d)}signPersonalMessage(e,t,a={}){const r=this.getPrivateKeyFor(e,a),i=n.from(r,"hex"),o=s.personalSign(i,{data:t});return Promise.resolve(o)}decryptMessage(e,t){const a=this._getWalletForAccount(e),n=o.stripHexPrefix(a.getPrivateKey()),r=s.decrypt(t,n);return Promise.resolve(r)}signTypedData(e,t,a={version:"V1"}){switch(a.version){case"V1":default:return this.signTypedData_v1(e,t,a);case"V3":return this.signTypedData_v3(e,t,a);case"V4":return this.signTypedData_v4(e,t,a)}}signTypedData_v1(e,t,a={}){const n=this.getPrivateKeyFor(e,a),r=s.signTypedDataLegacy(n,{data:t});return Promise.resolve(r)}signTypedData_v3(e,t,a={}){const n=this.getPrivateKeyFor(e,a),r=s.signTypedData(n,{data:t});return Promise.resolve(r)}signTypedData_v4(e,t,a={}){const n=this.getPrivateKeyFor(e,a),r=s.signTypedData_v4(n,{data:t});return Promise.resolve(r)}getEncryptionPublicKey(e,t={}){const a=this.getPrivateKeyFor(e,t),n=s.getEncryptionPublicKey(a);return Promise.resolve(n)}getPrivateKeyFor(e,t={}){if(!e)throw new Error("Must specify address.");const a=this._getWalletForAccount(e,t);return o.toBuffer(a.getPrivateKey())}getAppKeyAddress(e,t){if(!t||"string"!=typeof t)throw new Error("'origin' must be a non-empty string");return new Promise(((a,n)=>{try{const n=this._getWalletForAccount(e,{withAppKeyOrigin:t});return a(s.normalize(n.getAddress().toString("hex")))}catch(e){return n(e)}}))}exportAccount(e,t={}){const a=this._getWalletForAccount(e,t);return Promise.resolve(a.getPrivateKey().toString("hex"))}removeAccount(e){if(!this.wallets.map((e=>o.bufferToHex(e.getAddress()).toLowerCase())).includes(e.toLowerCase()))throw new Error(`Address ${e} not found in this keyring`);this.wallets=this.wallets.filter((t=>o.bufferToHex(t.getAddress()).toLowerCase()!==e.toLowerCase()))}_getWalletForAccount(e,t={}){const a=s.normalize(e);let r=this.wallets.find((e=>o.bufferToHex(e.getAddress())===a));if(!r)throw new Error("Simple Keyring - Unable to find matching address.");if(t.withAppKeyOrigin){const e=r.getPrivateKey(),a=n.from(t.withAppKeyOrigin,"utf8"),c=n.concat([e,a]),s=o.keccak(c,256);r=i.fromPrivateKey(s)}return r}}d.type=c,e.exports=d},69997:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function a(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function r(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,i,o,c,s,d;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(r(i=this._events[e]))return!1;if(a(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),i.apply(this,c)}else if(n(i))for(c=Array.prototype.slice.call(arguments,1),o=(d=i.slice()).length,s=0;s0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!a(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},t.prototype.removeListener=function(e,t){var r,i,o,c;if(!a(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,i=-1,r===t||a(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(r)){for(c=o;c-- >0;)if(r[c]===t||r[c].listener&&r[c].listener===t){i=c;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(a(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?a(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(a(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},7245:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(30039);function r(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))}function i(e,t){"object"==typeof t&&t.constructor===Uint8Array&&(t=n.bytesToHex(t));const a=n.keccak256(t).replace("0x","");for(let t=0;t<12;t+=4){const n=(parseInt(a.substr(t,2),16)<<8)+parseInt(a.substr(t+2,2),16)&2047,r=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function c(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}function s(e){return!("string"!=typeof e||!e.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=r,t.isInBloom=i,t.isUserEthereumAddressInBloom=function(e,t){if(!r(e))throw new Error("Invalid bloom given");if(!s(t))throw new Error(`Invalid ethereum address given: "${t}"`);return i(e,n.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!r(e))throw new Error("Invalid bloom given");if(!s(t))throw new Error(`Invalid contract address given: "${t}"`);return i(e,t)},t.isTopicInBloom=function(e,t){if(!r(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error("Invalid topic");return i(e,t)},t.isTopic=c,t.isAddress=s},30039:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=a(83669);function r(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){const t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);const a=[];for(let t=0;t=256||parseInt(String(a))!=a)return!1}return!0}(e))return i(new Uint8Array(e));throw new Error("invalid arrayify value")}function i(e){return void 0!==e.slice||(e.slice=()=>{const t=Array.prototype.slice.call(arguments);return i(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(r(e))},t.padLeft=(e,t)=>{const a=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(a?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){const t=[];for(let a=0;a>>4).toString(16)),t.push((15&e[a]).toString(16));return`0x${t.join("").replace(/^0+/,"")}`},t.toByteArray=r},16635:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(e){return function(t){var a=e();return a.update(t),n.from(a.digest())}}},1115:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(16635),r=a(77270);t.keccak224=n.createHashFunction((function(){return r("keccak224")})),t.keccak256=n.createHashFunction((function(){return r("keccak256")})),t.keccak384=n.createHashFunction((function(){return r("keccak384")})),t.keccak512=n.createHashFunction((function(){return r("keccak512")}))},85665:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(22069);t.HDKey=n},24061:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(91396).ripemd160,r=a(16635);t.ripemd160=r.createHashFunction((function(){return new n}))},51241:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(68032),r=a(16635);t.sha256=r.createHashFunction((function(){return new n}))},23628:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=a(24061),i=a(51241);t.createHmac=a(50011),t.randomBytes=a(95003);var o=function(){function e(e){this.hashFunction=e,this.buffers=[]}return e.prototype.update=function(e){if(!n.isBuffer(e))throw new Error("hdkey-crypto shim is outdated");return this.buffers.push(e),this},e.prototype.digest=function(e){if(e)throw new Error("hdkey-crypto shim is outdated");return this.hashFunction(n.concat(this.buffers))},e}();t.createHash=function(e){if("ripemd160"===e)return new o(r.ripemd160);if("sha256"===e)return new o(i.sha256);throw new Error("hdkey-crypto shim is outdated")}},58063:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var a in e)t.hasOwnProperty(a)||(t[a]=e[a])}(a(72583))},22069:(e,t,a)=>{"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=n(a(71696)),i=n(a(77834)),o=n(a(44075)),c=a(23628),s=a(58063),d=i.Buffer,u=d.from("Bitcoin seed","utf8"),f=2147483648,l={private:76066276,public:76067358};function b(e){this.versions=e||l,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}function h(e,t,a){var n=d.allocUnsafe(78);n.writeUInt32BE(t,0),n.writeUInt8(e.depth,4);var r=e.depth?e.parentFingerprint:0;return n.writeUInt32BE(r,5),n.writeUInt32BE(e.index,9),e.chainCode.copy(n,13),a.copy(n,45),n}function p(e){var t=c.createHash("sha256").update(e).digest();return c.createHash("ripemd160").update(t).digest()}Object.defineProperty(b.prototype,"fingerprint",{get:function(){return this._fingerprint}}),Object.defineProperty(b.prototype,"identifier",{get:function(){return this._identifier}}),Object.defineProperty(b.prototype,"pubKeyHash",{get:function(){return this.identifier}}),Object.defineProperty(b.prototype,"privateKey",{get:function(){return this._privateKey},set:function(e){r.equal(e.length,32,"Private key must be 32 bytes."),r(!0===s.privateKeyVerify(e),"Invalid private key"),this._privateKey=e,this._publicKey=s.publicKeyCreate(e,!0),this._identifier=p(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}}),Object.defineProperty(b.prototype,"publicKey",{get:function(){return this._publicKey},set:function(e){r(33===e.length||65===e.length,"Public key must be 33 or 65 bytes."),r(!0===s.publicKeyVerify(e),"Invalid public key"),this._publicKey=s.publicKeyConvert(e,!0),this._identifier=p(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}}),Object.defineProperty(b.prototype,"privateExtendedKey",{get:function(){return this._privateKey?o.encode(h(this,this.versions.private,d.concat([d.alloc(1,0),this.privateKey]))):null}}),Object.defineProperty(b.prototype,"publicExtendedKey",{get:function(){return o.encode(h(this,this.versions.public,this.publicKey))}}),b.prototype.derive=function(e){if("m"===e||"M"===e||"m'"===e||"M'"===e)return this;var t=e.split("/"),a=this;return t.forEach((function(e,t){if(0!==t){var n=e.length>1&&"'"===e[e.length-1],i=parseInt(e,10);r(i=f,n=d.allocUnsafe(4);if(n.writeUInt32BE(e,0),a){r(this.privateKey,"Could not derive hardened child key");var i=this.privateKey,o=d.alloc(1,0);i=d.concat([o,i]),t=d.concat([i,n])}else t=d.concat([this.publicKey,n]);var u=c.createHmac("sha512",this.chainCode).update(t).digest(),l=u.slice(0,32),h=u.slice(32),p=new b(this.versions);if(this.privateKey)try{p.privateKey=s.privateKeyTweakAdd(this.privateKey,l)}catch(t){return this.deriveChild(e+1)}else try{p.publicKey=s.publicKeyTweakAdd(this.publicKey,l,!0)}catch(t){return this.deriveChild(e+1)}return p.chainCode=h,p.depth=this.depth+1,p.parentFingerprint=this.fingerprint,p.index=e,p},b.prototype.sign=function(e){return s.sign(e,this.privateKey).signature},b.prototype.verify=function(e,t){return s.verify(e,t,this.publicKey)},b.prototype.wipePrivateData=function(){return this._privateKey&&c.randomBytes(this._privateKey.length).copy(this._privateKey),this._privateKey=null,this},b.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}},b.fromMasterSeed=function(e,t){var a=c.createHmac("sha512",u).update(e).digest(),n=a.slice(0,32),r=a.slice(32),i=new b(t);return i.chainCode=r,i.privateKey=n,i},b.fromExtendedKey=function(e,t){var a=new b(t=t||l),n=o.decode(e),i=n.readUInt32BE(0);r(i===t.private||i===t.public,"Version mismatch: does not match private or public"),a.depth=n.readUInt8(4),a.parentFingerprint=n.readUInt32BE(5),a.index=n.readUInt32BE(9),a.chainCode=n.slice(13,45);var c=n.slice(45);return 0===c.readUInt8(0)?(r(i===t.private,"Version mismatch: version does not match private"),a.privateKey=c.slice(1)):(r(i===t.public,"Version mismatch: version does not match public"),a.publicKey=c),a},b.fromJSON=function(e){return b.fromExtendedKey(e.xpriv)},b.HARDENED_OFFSET=f;var m=b;e.exports=m},60427:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(95003);t.getRandomBytes=function(e){return new Promise((function(t,a){n(e,(function(e,n){e?a(e):t(n)}))}))},t.getRandomBytesSync=function(e){return n(e)}},80101:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]{e.exports=a(7260)},7260:(e,t,a)=>{var n=a(48834).Buffer;const r=a(54042),i=a(48452);var o=function(){};function c(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function s(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function d(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function u(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function f(e){var t=typeof e;if("string"===t)return r.isHexPrefixed(e)?new i(r.stripHexPrefix(e),16):new i(e,10);if("number"===t)return new i(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function l(e){var t=/^(\w+)\((.*)\)$/.exec(e);if(3!==t.length)throw new Error("Invalid method signature");var a=/^(.+)\):\((.+)$/.exec(t[2]);if(null!==a&&3===a.length)return{method:t[1],args:a[1].split(","),retargs:a[2].split(",")};var n=t[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:t[1],args:n}}function b(e,t){var a,o,c,l;if("address"===e)return b("uint160",f(t));if("bool"===e)return b("uint8",t?1:0);if("string"===e)return b("bytes",n.from(t,"utf8"));if(y(e)){if(void 0===t.length)throw new Error("Not an array?");if("dynamic"!==(a=u(e))&&0!==a&&t.length>a)throw new Error("Elements exceed array size: "+a);for(l in c=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)c.push(b(e,t[l]));if("dynamic"===a){var h=b("uint256",t.length);c.unshift(h)}return n.concat(c)}if("bytes"===e)return t=n.from(t),c=n.concat([b("uint256",t.length),t]),t.length%32!=0&&(c=n.concat([c,r.zeros(32-t.length%32)])),c;if(e.startsWith("bytes")){if((a=s(e))<1||a>32)throw new Error("Invalid bytes width: "+a);return r.setLengthRight(t,32)}if(e.startsWith("uint")){if((a=s(e))%8||a<8||a>256)throw new Error("Invalid uint width: "+a);if((o=f(t)).bitLength()>a)throw new Error("Supplied uint exceeds width: "+a+" vs "+o.bitLength());if(o<0)throw new Error("Supplied uint is negative");return o.toArrayLike(n,"be",32)}if(e.startsWith("int")){if((a=s(e))%8||a<8||a>256)throw new Error("Invalid int width: "+a);if((o=f(t)).bitLength()>a)throw new Error("Supplied int exceeds width: "+a+" vs "+o.bitLength());return o.toTwos(256).toArrayLike(n,"be",32)}if(e.startsWith("ufixed")){if(a=d(e),(o=f(t))<0)throw new Error("Supplied ufixed is negative");return b("uint256",o.mul(new i(2).pow(new i(a[1]))))}if(e.startsWith("fixed"))return a=d(e),b("int256",f(t).mul(new i(2).pow(new i(a[1]))));throw new Error("Unsupported or invalid type: "+e)}function h(e,t,a){var r,o,c,s;if("string"==typeof e&&(e=p(e)),"address"===e.name)return h(e.rawType,t,a).toArrayLike(n,"be",20).toString("hex");if("bool"===e.name)return h(e.rawType,t,a).toString()===new i(1).toString();if("string"===e.name){var d=h(e.rawType,t,a);return n.from(d,"utf8").toString()}if(e.isArray){for(c=[],r=e.size,"dynamic"===e.size&&(a=h("uint256",t,a).toNumber(),r=h("uint256",t,a).toNumber(),a+=32),s=0;se.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+o.bitLength());return o}if(e.name.startsWith("int")){if((o=new i(t.slice(a,a+32),16,"be").fromTwos(256)).bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+o.bitLength());return o}if(e.name.startsWith("ufixed")){if(r=new i(2).pow(new i(e.size[1])),!(o=h("uint256",t,a)).mod(r).isZero())throw new Error("Decimals not supported yet");return o.div(r)}if(e.name.startsWith("fixed")){if(r=new i(2).pow(new i(e.size[1])),!(o=h("int256",t,a)).mod(r).isZero())throw new Error("Decimals not supported yet");return o.div(r)}throw new Error("Unsupported or invalid type: "+e.name)}function p(e){var t,a,n;if(y(e)){t=u(e);var r=e.slice(0,e.lastIndexOf("["));return r=p(r),{isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:r.memoryUsage*t,subArray:r}}switch(e){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(a={rawType:n,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?a.size=s(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(a.size=d(e)),e.startsWith("bytes")&&"bytes"!==e&&(a.size<1||a.size>32))throw new Error("Invalid bytes width: "+a.size);if((e.startsWith("uint")||e.startsWith("int"))&&(a.size%8||a.size<8||a.size>256))throw new Error("Invalid int/uint width: "+a.size);return a}function m(e){return"string"===e||"bytes"===e||"dynamic"===u(e)}function y(e){return e.lastIndexOf("]")===e.length-1}function g(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}o.eventID=function(e,t){var a=e+"("+t.map(c).join(",")+")";return r.keccak256(n.from(a))},o.methodID=function(e,t){return o.eventID(e,t).slice(0,4)},o.rawEncode=function(e,t){var a=[],r=[],i=0;e.forEach((function(e){if(y(e)){var t=u(e);i+="dynamic"!==t?32*t:32}else i+=32}));for(var o=0;ol)throw new Error("Elements exceed array size: "+l)}var b=t.map((function(e){return o.solidityHexValue(d,e,256)}));return n.concat(b)}if("bytes"===e)return t;if("string"===e)return n.from(t,"utf8");if("bool"===e){a=a||8;var h=Array(a/4).join("0");return n.from(t?h+"1":h+"0","hex")}if("address"===e){var p=20;return a&&(p=a/8),r.setLengthLeft(t,p)}if(e.startsWith("bytes")){if((i=s(e))<1||i>32)throw new Error("Invalid bytes width: "+i);return r.setLengthRight(t,i)}if(e.startsWith("uint")){if((i=s(e))%8||i<8||i>256)throw new Error("Invalid uint width: "+i);if((c=f(t)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+c.bitLength());return a=a||i,c.toArrayLike(n,"be",a/8)}if(e.startsWith("int")){if((i=s(e))%8||i<8||i>256)throw new Error("Invalid int width: "+i);if((c=f(t)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+c.bitLength());return a=a||i,c.toTwos(i).toArrayLike(n,"be",a/8)}throw new Error("Unsupported or invalid type: "+e)},o.solidityPack=function(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var a=[],r=0;r="0"&&o<="9");)r+=e[i]-"0",i++;a=i-1,t.push(r)}else if("i"===n)t.push("int256");else{if("a"!==n)throw new Error("Unsupported or invalid type: "+n);t.push("int256[]")}}var o;return t},o.toSerpent=function(e){for(var t=[],a=0;a=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},52140:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.importPublic=t.privateToPublic=t.privateToAddress=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.isPrecompiled=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isZeroAddress=t.isValidAddress=t.zeroAddress=void 0;var r=a(71696),i=a(81538),o=a(40670),c=a(48452),s=a(46548),d=a(29114);t.zeroAddress=function(){var e=s.zeros(20);return s.bufferToHex(e)},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===s.addHexPrefix(e)},t.toChecksumAddress=function(e,t){e=i.stripHexPrefix(e).toLowerCase();for(var a=void 0!==t?t.toString()+"0x":"",n=d.keccak(a+e).toString("hex"),r="0x",o=0;o=8?r+=e[o].toUpperCase():r+=e[o];return r},t.isValidChecksumAddress=function(e,a){return t.isValidAddress(e)&&t.toChecksumAddress(e,a)===e},t.generateAddress=function(e,t){e=s.toBuffer(e);var a=new c(t);return a.isZero()?d.rlphash([e,null]).slice(-20):d.rlphash([e,n.from(a.toArray())]).slice(-20)},t.generateAddress2=function(e,t,a){var i=s.toBuffer(e),o=s.toBuffer(t),c=s.toBuffer(a);return r(20===i.length),r(32===o.length),d.keccak256(n.concat([n.from("ff","hex"),i,o,d.keccak256(c)])).slice(-20)},t.isPrecompiled=function(e){var t=s.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},t.isValidPrivate=function(e){return o.privateKeyVerify(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),64===e.length?o.publicKeyVerify(n.concat([n.from([4]),e])):!!t&&o.publicKeyVerify(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=s.toBuffer(e),t&&64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),r(64===e.length),d.keccak(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e))},t.privateToPublic=function(e){return e=s.toBuffer(e),o.publicKeyCreate(e,!1).slice(1)},t.importPublic=function(e){return 64!==(e=s.toBuffer(e)).length&&(e=o.publicKeyConvert(e,!1).slice(1)),e}},46548:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.stripZeros=t.unpad=t.setLengthRight=t.setLength=t.setLengthLeft=t.zeros=void 0;var r=a(81538),i=a(48452);t.zeros=function(e){return n.allocUnsafe(e).fill(0)},t.setLengthLeft=function(e,a,n){void 0===n&&(n=!1);var r=t.zeros(a);return e=t.toBuffer(e),n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(e){if(!n.isBuffer(e))if(Array.isArray(e))e=n.from(e);else if("string"==typeof e){if(!r.isHexString(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+e);e=n.from(r.padToEven(r.stripHexPrefix(e)),"hex")}else if("number"==typeof e)e=r.intToBuffer(e);else if(null==e)e=n.allocUnsafe(0);else if(i.isBN(e))e=e.toArrayLike(n);else{if(!e.toArray)throw new Error("invalid type");e=n.from(e.toArray())}return e},t.bufferToInt=function(e){return new i(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new i(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||r.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(e){if(n.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var a=[],r=0;r{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=void 0;var r=a(48452);t.MAX_INTEGER=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new r("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.from(t.KECCAK256_RLP_S,"hex")},29114:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160=t.sha256=t.keccak256=t.keccak=void 0;var r=a(1115),i=r.keccak224,o=r.keccak384,c=r.keccak256,s=r.keccak512,d=a(16162),u=a(81538),f=a(22644),l=a(46548);t.keccak=function(e,t){switch(void 0===t&&(t=256),e="string"!=typeof e||u.isHexString(e)?l.toBuffer(e):n.from(e,"utf8"),t||(t=256),t){case 224:return i(e);case 256:return c(e);case 384:return o(e);case 512:return s(e);default:throw new Error("Invald algorithm: keccak"+t)}},t.keccak256=function(e){return t.keccak(e)},t.sha256=function(e){return e=l.toBuffer(e),d("sha256").update(e).digest()},t.ripemd160=function(e,t){e=l.toBuffer(e);var a=d("rmd160").update(e).digest();return!0===t?l.setLength(a,32):a},t.rlphash=function(e){return t.keccak(f.encode(e))}},54042:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[a]}})}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||t.hasOwnProperty(a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=t.rlp=t.BN=void 0;var i=a(40670);t.secp256k1=i;var o=a(81538),c=a(48452);t.BN=c;var s=a(22644);t.rlp=s,Object.assign(t,o),r(a(89773),t),r(a(52140),t),r(a(29114),t),r(a(80748),t),r(a(46548),t),r(a(5461),t)},5461:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var r=a(71696),i=a(81538),o=a(22644),c=a(46548);t.defineProperties=function(e,t,a){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var a={};return e._fields.forEach((function(t){a[t]="0x"+e[t].toString("hex")})),a}return c.baToJSON(e.raw)},e.serialize=function(){return o.encode(e.raw)},t.forEach((function(t,a){function i(){return e.raw[a]}function o(i){"00"!==(i=c.toBuffer(i)).toString("hex")||t.allowZero||(i=n.allocUnsafe(0)),t.allowLess&&t.length?(i=c.stripZeros(i),r(t.length>=i.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===i.length||!t.length||r(t.length===i.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[a]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),a)if("string"==typeof a&&(a=n.from(i.stripHexPrefix(a),"hex")),n.isBuffer(a)&&(a=o.decode(a)),Array.isArray(a)){if(a.length>e._fields.length)throw new Error("wrong number of fields in data");a.forEach((function(t,a){e[e._fields[a]]=c.toBuffer(t)}))}else{if("object"!=typeof a)throw new Error("invalid data");var s=Object.keys(a);t.forEach((function(t){-1!==s.indexOf(t.name)&&(e[t.name]=a[t.name]),-1!==s.indexOf(t.alias)&&(e[t.alias]=a[t.alias])}))}}},40670:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.ecdhUnsafe=t.ecdh=t.recover=t.verify=t.sign=t.signatureImportLax=t.signatureImport=t.signatureExport=t.signatureNormalize=t.publicKeyCombine=t.publicKeyTweakMul=t.publicKeyTweakAdd=t.publicKeyVerify=t.publicKeyConvert=t.publicKeyCreate=t.privateKeyTweakMul=t.privateKeyTweakAdd=t.privateKeyModInverse=t.privateKeyNegate=t.privateKeyImport=t.privateKeyExport=t.privateKeyVerify=void 0;var r=a(80101),i=a(40581),o=a(65217);t.privateKeyVerify=function(e){return 32===e.length&&r.privateKeyVerify(Uint8Array.from(e))},t.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var a=i.privateKeyExport(e,t);return o.privateKeyExport(e,a,t)},t.privateKeyImport=function(e){if(null!==(e=o.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},t.privateKeyNegate=function(e){return n.from(r.privateKeyNegate(Uint8Array.from(e)))},t.privateKeyModInverse=function(e){if(32!==e.length)throw new Error("private key length is invalid");return n.from(i.privateKeyModInverse(Uint8Array.from(e)))},t.privateKeyTweakAdd=function(e,t){return n.from(r.privateKeyTweakAdd(Uint8Array.from(e),t))},t.privateKeyTweakMul=function(e,t){return n.from(r.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},t.publicKeyCreate=function(e,t){return n.from(r.publicKeyCreate(Uint8Array.from(e),t))},t.publicKeyConvert=function(e,t){return n.from(r.publicKeyConvert(Uint8Array.from(e),t))},t.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&r.publicKeyVerify(Uint8Array.from(e))},t.publicKeyTweakAdd=function(e,t,a){return n.from(r.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),a))},t.publicKeyTweakMul=function(e,t,a){return n.from(r.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),a))},t.publicKeyCombine=function(e,t){var a=[];return e.forEach((function(e){a.push(Uint8Array.from(e))})),n.from(r.publicKeyCombine(a,t))},t.signatureNormalize=function(e){return n.from(r.signatureNormalize(Uint8Array.from(e)))},t.signatureExport=function(e){return n.from(r.signatureExport(Uint8Array.from(e)))},t.signatureImport=function(e){return n.from(r.signatureImport(Uint8Array.from(e)))},t.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=o.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},t.sign=function(e,t,a){if(null===a)throw new TypeError("options should be an Object");var i=void 0;if(a){if(i={},null===a.data)throw new TypeError("options.data should be a Buffer");if(a.data){if(32!=a.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(a.data)}if(null===a.noncefn)throw new TypeError("options.noncefn should be a Function");a.noncefn&&(i.noncefn=function(e,t,r,i,o){var c=null!=r?n.from(r):null,s=null!=i?n.from(i):null,d=n.from("");return a.noncefn&&(d=a.noncefn(n.from(e),n.from(t),c,s,o)),new Uint8Array(d)})}var o=r.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),i);return{signature:n.from(o.signature),recovery:o.recid}},t.verify=function(e,t,a){return r.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),a)},t.recover=function(e,t,a,i){return n.from(r.ecdsaRecover(Uint8Array.from(t),a,Uint8Array.from(e),i))},t.ecdh=function(e,t){return n.from(r.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},t.ecdhUnsafe=function(e,t,a){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return n.from(i.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),a))}},65217:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=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]),i=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]);t.privateKeyExport=function(e,t,a){void 0===a&&(a=!0);var o=n.from(a?r:i);return e.copy(o,a?8:9),t.copy(o,a?181:214),o},t.privateKeyImport=function(e){var t=e.length,a=0;if(t2)return null;if(t<(a+=1)+n)return null;var r=e[a+n-1]|(n>1?e[a+n-2]<<8:0);return t<(a+=n)+r||t32||tr)return null;if(2!==e[i++])return null;var c=e[i++];if(128&c){if(i+(o=c-128)>r)return null;for(;o>0&&0===e[i];i+=1,o-=1);for(c=0;o>0;i+=1,o-=1)c=(c<<8)+e[i]}if(c>r-i)return null;var s=i;if(i+=c,2!==e[i++])return null;var d=e[i++];if(128&d){if(i+(o=d-128)>r)return null;for(;o>0&&0===e[i];i+=1,o-=1);for(d=0;o>0;i+=1,o-=1)d=(d<<8)+e[i]}if(d>r-i)return null;var u=i;for(i+=d;c>0&&0===e[s];c-=1,s+=1);if(c>32)return null;var f=e.slice(s,s+c);for(f.copy(t,32-f.length);d>0&&0===e[u];d-=1,u+=1);if(d>32)return null;var l=e.slice(u,u+d);return l.copy(a,32-l.length),{r:t,s:a}}},40581:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=a(48452),i=new(0,a(87554).ec)("secp256k1"),o=i.curve;t.privateKeyExport=function(e,t){void 0===t&&(t=!0);var a=new r(e);if(a.ucmp(o.n)>=0)throw new Error("couldn't export to DER format");var n=i.g.mul(a);return c(n.getX(),n.getY(),t)},t.privateKeyModInverse=function(e){var t=new r(e);if(t.ucmp(o.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(o.n).toArrayLike(n,"be",32)},t.signatureImport=function(e){var t=new r(e.r);t.ucmp(o.n)>=0&&(t=new r(0));var a=new r(e.s);return a.ucmp(o.n)>=0&&(a=new r(0)),n.concat([t.toArrayLike(n,"be",32),a.toArrayLike(n,"be",32)])},t.ecdhUnsafe=function(e,t,a){void 0===a&&(a=!0);var n=i.keyFromPublic(e),s=new r(t);if(s.ucmp(o.n)>=0||s.isZero())throw new Error("scalar was invalid (zero or overflow)");var d=n.pub.mul(s);return c(d.getX(),d.getY(),a)};var c=function(e,t,a){var r;return a?((r=n.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(n,"be",32).copy(r,1)):((r=n.alloc(65))[0]=4,e.toArrayLike(n,"be",32).copy(r,1),t.toArrayLike(n,"be",32).copy(r,33)),r}},80748:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var r=a(40670),i=a(48452),o=a(46548),c=a(29114);function s(e,t){return t?e-(2*t+35):e-27}function d(e){return 0===e||1===e}t.ecsign=function(e,t,a){var n=r.sign(e,t),i=n.recovery;return{r:n.signature.slice(0,32),s:n.signature.slice(32,64),v:a?i+(2*a+35):i+27}},t.ecrecover=function(e,t,a,i,c){var u=n.concat([o.setLength(a,32),o.setLength(i,32)],64),f=s(t,c);if(!d(f))throw new Error("Invalid signature v value");var l=r.recover(e,u,f);return r.publicKeyConvert(l,!1).slice(1)},t.toRpcSig=function(e,t,a,r){if(!d(s(e,r)))throw new Error("Invalid signature v value");return o.bufferToHex(n.concat([o.setLengthLeft(t,32),o.setLengthLeft(a,32),o.toBuffer(e)]))},t.fromRpcSig=function(e){var t=o.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var a=t[64];return a<27&&(a+=27),{v:a,r:t.slice(0,32),s:t.slice(32,64)}},t.isValidSignature=function(e,t,a,n,r){void 0===n&&(n=!0);var o=new i("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),c=new i("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==a.length)return!1;if(!d(s(e,r)))return!1;var u=new i(t),f=new i(a);return!(u.isZero()||u.gt(c)||f.isZero()||f.gt(c)||n&&1===f.cmp(o))},t.hashPersonalMessage=function(e){var t=n.from("Ethereum Signed Message:\n"+e.length.toString(),"utf-8");return c.keccak(n.concat([t,e]))}},46338:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chains=void 0,t.chains={names:{1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli"},mainnet:a(5332),ropsten:a(43603),rinkeby:a(80947),kovan:a(28035),goerli:a(37686)}},45754:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",a(31428)],["homestead",a(44182)],["dao",a(98283)],["tangerineWhistle",a(19439)],["spuriousDragon",a(1716)],["byzantium",a(44570)],["constantinople",a(23177)],["petersburg",a(54678)],["istanbul",a(60151)],["muirGlacier",a(95092)]]},17633:function(e,t,a){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,a=1,n=arguments.length;a0))return!0;for(var t=0,a=this._supportedHardforks;t=r},e.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},e.prototype.hardforkGteHardfork=function(e,t,a){var n=void 0!==(a=void 0!==a?a:{}).onlyActive&&a.onlyActive;e=this._chooseHardfork(e,a.onlySupported);for(var r=-1,i=-1,o=0,c=0,s=n?this.activeHardforks(null,a):this.hardforks();c=i},e.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},e.prototype.hardforkIsActiveOnChain=function(e,t){var a=void 0!==(t=void 0!==t?t:{}).onlySupported&&t.onlySupported;e=this._chooseHardfork(e,a);for(var n=0,r=this.hardforks();n0)return a[a.length-1].name;throw new Error("No (supported) active hardfork found")},e.prototype.hardforkBlock=function(e){return e=this._chooseHardfork(e,!1),this._getHardfork(e).block},e.prototype.isHardforkBlock=function(e,t){return t=this._chooseHardfork(t,!1),this.hardforkBlock(t)===e},e.prototype.consensus=function(e){return e=this._chooseHardfork(e),this._getHardfork(e).consensus},e.prototype.finality=function(e){return e=this._chooseHardfork(e),this._getHardfork(e).finality},e.prototype.genesis=function(){return this._chainParams.genesis},e.prototype.hardforks=function(){return this._chainParams.hardforks},e.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},e.prototype.hardfork=function(){return this._hardfork},e.prototype.chainId=function(){return this._chainParams.chainId},e.prototype.chainName=function(){return r.chains.names[this.chainId()]||this._chainParams.name},e.prototype.networkId=function(){return this._chainParams.networkId},e}();t.default=o},32428:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},n(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0});var i=a(3774),o=a(48834),c=function(e){function t(t,a){void 0===t&&(t={}),void 0===a&&(a={});var n=e.call(this,t,a)||this;Object.defineProperty(n,"from",{enumerable:!0,configurable:!0,get:function(){return n.getSenderAddress()},set:function(e){e&&(n._from=i.toBuffer(e))}});var r=t;return r.from&&(n.from=i.toBuffer(r.from)),n}return r(t,e),t.prototype.hash=function(t){if(void 0===t&&(t=!0),t&&this._from&&""!==this._from.toString("hex")){var a=o.Buffer.concat([this._from,this._from.slice(0,12)]);this.sign(a)}return e.prototype.hash.call(this,t)},t}(a(80813).default);t.default=c},78655:(e,t,a)=>{"use strict";var n=a(80813);t.YW=n.default,a(32428).default},80813:function(e,t,a){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=2*this.getChainId()+35&&this._common.gteHardfork("spuriousDragon");this._senderPubKey=r.ecrecover(e,t,this.r,this.s,a?this.getChainId():void 0)}catch(e){return!1}return!!this._senderPubKey},e.prototype.sign=function(e){this.v=new o.Buffer([]),this.s=new o.Buffer([]),this.r=new o.Buffer([]);var t=this.hash(!1),a=r.ecsign(t,e);this._implementsEIP155()&&(a.v+=2*this.getChainId()+8),Object.assign(this,a)},e.prototype.getDataFee=function(){for(var e=this.raw[5],t=new r.BN(0),a=0;a0&&t.push(["gas limit is too low. Need at least "+this.getBaseFee()]),!1===e?0===t.length:t.join(" ")},e.prototype.serialize=function(){return r.rlp.encode(this.raw)},e.prototype.toJSON=function(e){return void 0===e&&(e=!1),{}},e.prototype._validateV=function(e){if(void 0!==e&&0!==e.length&&this._common.gteHardfork("spuriousDragon")){var t=r.bufferToInt(e);if(27!==t&&28!==t&&t!==2*this.getChainId()+35&&t!==2*this.getChainId()+36)throw new Error("Incompatible EIP155-based V "+t+" and chain id "+this.getChainId()+". See the second parameter of the Transaction constructor to set the chain id.")}},e.prototype._isSigned=function(){return this.v.length>0&&this.r.length>0&&this.s.length>0},e.prototype._overrideVSetterWithValidation=function(){var e=this,t=Object.getOwnPropertyDescriptor(this,"v");Object.defineProperty(this,"v",n({},t,{set:function(a){void 0!==a&&e._validateV(r.toBuffer(a)),t.set(a)}}))},e.prototype._implementsEIP155=function(){var e=this._common.gteHardfork("spuriousDragon");if(!this._isSigned())return e;var t=r.bufferToInt(this.v);return(t===2*this.getChainId()+35||t===2*this.getChainId()+36)&&e},e}();t.default=s},19558:function(e,t,a){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function i(e,t,a){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a(51956).Buffer}catch(e){}function c(e,t){var a=e.charCodeAt(t);return a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},64519:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.importPublic=t.privateToPublic=t.privateToAddress=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.isPrecompiled=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isZeroAddress=t.isValidAddress=t.zeroAddress=void 0;var r=a(71696),i=a(81538),o=a(69643),c=a(19558),s=a(30997),d=a(31112);t.zeroAddress=function(){var e=s.zeros(20);return s.bufferToHex(e)},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===s.addHexPrefix(e)},t.toChecksumAddress=function(e,t){e=i.stripHexPrefix(e).toLowerCase();for(var a=void 0!==t?t.toString()+"0x":"",n=d.keccak(a+e).toString("hex"),r="0x",o=0;o=8?r+=e[o].toUpperCase():r+=e[o];return r},t.isValidChecksumAddress=function(e,a){return t.isValidAddress(e)&&t.toChecksumAddress(e,a)===e},t.generateAddress=function(e,t){e=s.toBuffer(e);var a=new c(t);return a.isZero()?d.rlphash([e,null]).slice(-20):d.rlphash([e,n.from(a.toArray())]).slice(-20)},t.generateAddress2=function(e,t,a){var i=s.toBuffer(e),o=s.toBuffer(t),c=s.toBuffer(a);return r(20===i.length),r(32===o.length),d.keccak256(n.concat([n.from("ff","hex"),i,o,d.keccak256(c)])).slice(-20)},t.isPrecompiled=function(e){var t=s.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},t.isValidPrivate=function(e){return o.privateKeyVerify(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),64===e.length?o.publicKeyVerify(n.concat([n.from([4]),e])):!!t&&o.publicKeyVerify(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=s.toBuffer(e),t&&64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),r(64===e.length),d.keccak(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e))},t.privateToPublic=function(e){return e=s.toBuffer(e),o.publicKeyCreate(e,!1).slice(1)},t.importPublic=function(e){return 64!==(e=s.toBuffer(e)).length&&(e=o.publicKeyConvert(e,!1).slice(1)),e}},30997:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.stripZeros=t.unpad=t.setLengthRight=t.setLength=t.setLengthLeft=t.zeros=void 0;var r=a(81538),i=a(19558);t.zeros=function(e){return n.allocUnsafe(e).fill(0)},t.setLengthLeft=function(e,a,n){void 0===n&&(n=!1);var r=t.zeros(a);return e=t.toBuffer(e),n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(e){if(!n.isBuffer(e))if(Array.isArray(e))e=n.from(e);else if("string"==typeof e){if(!r.isHexString(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+e);e=n.from(r.padToEven(r.stripHexPrefix(e)),"hex")}else if("number"==typeof e)e=r.intToBuffer(e);else if(null==e)e=n.allocUnsafe(0);else if(i.isBN(e))e=e.toArrayLike(n);else{if(!e.toArray)throw new Error("invalid type");e=n.from(e.toArray())}return e},t.bufferToInt=function(e){return new i(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new i(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||r.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(e){if(n.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var a=[],r=0;r{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=void 0;var r=a(19558);t.MAX_INTEGER=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new r("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.from(t.KECCAK256_RLP_S,"hex")},31112:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160=t.sha256=t.keccak256=t.keccak=void 0;var r=a(1115),i=r.keccak224,o=r.keccak384,c=r.keccak256,s=r.keccak512,d=a(16162),u=a(81538),f=a(22644),l=a(30997);t.keccak=function(e,t){switch(void 0===t&&(t=256),e="string"!=typeof e||u.isHexString(e)?l.toBuffer(e):n.from(e,"utf8"),t||(t=256),t){case 224:return i(e);case 256:return c(e);case 384:return o(e);case 512:return s(e);default:throw new Error("Invald algorithm: keccak"+t)}},t.keccak256=function(e){return t.keccak(e)},t.sha256=function(e){return e=l.toBuffer(e),d("sha256").update(e).digest()},t.ripemd160=function(e,t){e=l.toBuffer(e);var a=d("rmd160").update(e).digest();return!0===t?l.setLength(a,32):a},t.rlphash=function(e){return t.keccak(f.encode(e))}},3774:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[a]}})}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||t.hasOwnProperty(a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=t.rlp=t.BN=void 0;var i=a(69643);t.secp256k1=i;var o=a(81538),c=a(19558);t.BN=c;var s=a(22644);t.rlp=s,Object.assign(t,o),r(a(20249),t),r(a(64519),t),r(a(31112),t),r(a(54818),t),r(a(30997),t),r(a(48305),t)},48305:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var r=a(71696),i=a(81538),o=a(22644),c=a(30997);t.defineProperties=function(e,t,a){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var a={};return e._fields.forEach((function(t){a[t]="0x"+e[t].toString("hex")})),a}return c.baToJSON(e.raw)},e.serialize=function(){return o.encode(e.raw)},t.forEach((function(t,a){function i(){return e.raw[a]}function o(i){"00"!==(i=c.toBuffer(i)).toString("hex")||t.allowZero||(i=n.allocUnsafe(0)),t.allowLess&&t.length?(i=c.stripZeros(i),r(t.length>=i.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===i.length||!t.length||r(t.length===i.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[a]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),a)if("string"==typeof a&&(a=n.from(i.stripHexPrefix(a),"hex")),n.isBuffer(a)&&(a=o.decode(a)),Array.isArray(a)){if(a.length>e._fields.length)throw new Error("wrong number of fields in data");a.forEach((function(t,a){e[e._fields[a]]=c.toBuffer(t)}))}else{if("object"!=typeof a)throw new Error("invalid data");var s=Object.keys(a);t.forEach((function(t){-1!==s.indexOf(t.name)&&(e[t.name]=a[t.name]),-1!==s.indexOf(t.alias)&&(e[t.alias]=a[t.alias])}))}}},69643:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.ecdhUnsafe=t.ecdh=t.recover=t.verify=t.sign=t.signatureImportLax=t.signatureImport=t.signatureExport=t.signatureNormalize=t.publicKeyCombine=t.publicKeyTweakMul=t.publicKeyTweakAdd=t.publicKeyVerify=t.publicKeyConvert=t.publicKeyCreate=t.privateKeyTweakMul=t.privateKeyTweakAdd=t.privateKeyModInverse=t.privateKeyNegate=t.privateKeyImport=t.privateKeyExport=t.privateKeyVerify=void 0;var r=a(80101),i=a(64079),o=a(81463);t.privateKeyVerify=function(e){return 32===e.length&&r.privateKeyVerify(Uint8Array.from(e))},t.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var a=i.privateKeyExport(e,t);return o.privateKeyExport(e,a,t)},t.privateKeyImport=function(e){if(null!==(e=o.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},t.privateKeyNegate=function(e){return n.from(r.privateKeyNegate(Uint8Array.from(e)))},t.privateKeyModInverse=function(e){if(32!==e.length)throw new Error("private key length is invalid");return n.from(i.privateKeyModInverse(Uint8Array.from(e)))},t.privateKeyTweakAdd=function(e,t){return n.from(r.privateKeyTweakAdd(Uint8Array.from(e),t))},t.privateKeyTweakMul=function(e,t){return n.from(r.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},t.publicKeyCreate=function(e,t){return n.from(r.publicKeyCreate(Uint8Array.from(e),t))},t.publicKeyConvert=function(e,t){return n.from(r.publicKeyConvert(Uint8Array.from(e),t))},t.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&r.publicKeyVerify(Uint8Array.from(e))},t.publicKeyTweakAdd=function(e,t,a){return n.from(r.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),a))},t.publicKeyTweakMul=function(e,t,a){return n.from(r.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),a))},t.publicKeyCombine=function(e,t){var a=[];return e.forEach((function(e){a.push(Uint8Array.from(e))})),n.from(r.publicKeyCombine(a,t))},t.signatureNormalize=function(e){return n.from(r.signatureNormalize(Uint8Array.from(e)))},t.signatureExport=function(e){return n.from(r.signatureExport(Uint8Array.from(e)))},t.signatureImport=function(e){return n.from(r.signatureImport(Uint8Array.from(e)))},t.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=o.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},t.sign=function(e,t,a){if(null===a)throw new TypeError("options should be an Object");var i=void 0;if(a){if(i={},null===a.data)throw new TypeError("options.data should be a Buffer");if(a.data){if(32!=a.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(a.data)}if(null===a.noncefn)throw new TypeError("options.noncefn should be a Function");a.noncefn&&(i.noncefn=function(e,t,r,i,o){var c=null!=r?n.from(r):null,s=null!=i?n.from(i):null,d=n.from("");return a.noncefn&&(d=a.noncefn(n.from(e),n.from(t),c,s,o)),new Uint8Array(d)})}var o=r.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),i);return{signature:n.from(o.signature),recovery:o.recid}},t.verify=function(e,t,a){return r.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),a)},t.recover=function(e,t,a,i){return n.from(r.ecdsaRecover(Uint8Array.from(t),a,Uint8Array.from(e),i))},t.ecdh=function(e,t){return n.from(r.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},t.ecdhUnsafe=function(e,t,a){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return n.from(i.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),a))}},81463:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=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]),i=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]);t.privateKeyExport=function(e,t,a){void 0===a&&(a=!0);var o=n.from(a?r:i);return e.copy(o,a?8:9),t.copy(o,a?181:214),o},t.privateKeyImport=function(e){var t=e.length,a=0;if(t2)return null;if(t<(a+=1)+n)return null;var r=e[a+n-1]|(n>1?e[a+n-2]<<8:0);return t<(a+=n)+r||t32||tr)return null;if(2!==e[i++])return null;var c=e[i++];if(128&c){if(i+(o=c-128)>r)return null;for(;o>0&&0===e[i];i+=1,o-=1);for(c=0;o>0;i+=1,o-=1)c=(c<<8)+e[i]}if(c>r-i)return null;var s=i;if(i+=c,2!==e[i++])return null;var d=e[i++];if(128&d){if(i+(o=d-128)>r)return null;for(;o>0&&0===e[i];i+=1,o-=1);for(d=0;o>0;i+=1,o-=1)d=(d<<8)+e[i]}if(d>r-i)return null;var u=i;for(i+=d;c>0&&0===e[s];c-=1,s+=1);if(c>32)return null;var f=e.slice(s,s+c);for(f.copy(t,32-f.length);d>0&&0===e[u];d-=1,u+=1);if(d>32)return null;var l=e.slice(u,u+d);return l.copy(a,32-l.length),{r:t,s:a}}},64079:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var r=a(19558),i=new(0,a(87554).ec)("secp256k1"),o=i.curve;t.privateKeyExport=function(e,t){void 0===t&&(t=!0);var a=new r(e);if(a.ucmp(o.n)>=0)throw new Error("couldn't export to DER format");var n=i.g.mul(a);return c(n.getX(),n.getY(),t)},t.privateKeyModInverse=function(e){var t=new r(e);if(t.ucmp(o.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(o.n).toArrayLike(n,"be",32)},t.signatureImport=function(e){var t=new r(e.r);t.ucmp(o.n)>=0&&(t=new r(0));var a=new r(e.s);return a.ucmp(o.n)>=0&&(a=new r(0)),n.concat([t.toArrayLike(n,"be",32),a.toArrayLike(n,"be",32)])},t.ecdhUnsafe=function(e,t,a){void 0===a&&(a=!0);var n=i.keyFromPublic(e),s=new r(t);if(s.ucmp(o.n)>=0||s.isZero())throw new Error("scalar was invalid (zero or overflow)");var d=n.pub.mul(s);return c(d.getX(),d.getY(),a)};var c=function(e,t,a){var r;return a?((r=n.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(n,"be",32).copy(r,1)):((r=n.alloc(65))[0]=4,e.toArrayLike(n,"be",32).copy(r,1),t.toArrayLike(n,"be",32).copy(r,33)),r}},54818:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var r=a(69643),i=a(19558),o=a(30997),c=a(31112);function s(e,t){return t?e-(2*t+35):e-27}function d(e){return 0===e||1===e}t.ecsign=function(e,t,a){var n=r.sign(e,t),i=n.recovery;return{r:n.signature.slice(0,32),s:n.signature.slice(32,64),v:a?i+(2*a+35):i+27}},t.ecrecover=function(e,t,a,i,c){var u=n.concat([o.setLength(a,32),o.setLength(i,32)],64),f=s(t,c);if(!d(f))throw new Error("Invalid signature v value");var l=r.recover(e,u,f);return r.publicKeyConvert(l,!1).slice(1)},t.toRpcSig=function(e,t,a,r){if(!d(s(e,r)))throw new Error("Invalid signature v value");return o.bufferToHex(n.concat([o.setLengthLeft(t,32),o.setLengthLeft(a,32),o.toBuffer(e)]))},t.fromRpcSig=function(e){var t=o.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var a=t[64];return a<27&&(a+=27),{v:a,r:t.slice(0,32),s:t.slice(32,64)}},t.isValidSignature=function(e,t,a,n,r){void 0===n&&(n=!0);var o=new i("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),c=new i("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==a.length)return!1;if(!d(s(e,r)))return!1;var u=new i(t),f=new i(a);return!(u.isZero()||u.gt(c)||f.isZero()||f.gt(c)||n&&1===f.cmp(o))},t.hashPersonalMessage=function(e){var t=n.from("Ethereum Signed Message:\n"+e.length.toString(),"utf-8");return c.keccak(n.concat([t,e]))}},12113:function(e,t,a){"use strict";var n=a(48834).Buffer,r=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var o=i(a(71696)),c=a(55794),s=a(80101),d=a(84001),u=a(77293),f=a(80182),l=a(15374),b=a(80497),h=a(2221),p=function(){function e(e,t,a,n){void 0===e&&(e=new c.BN(0)),void 0===t&&(t=new c.BN(0)),void 0===a&&(a=u.KECCAK256_RLP),void 0===n&&(n=u.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=a,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var a=t.nonce,n=t.balance,r=t.stateRoot,i=t.codeHash;return new e(a?new c.BN((0,f.toBuffer)(a)):void 0,n?new c.BN((0,f.toBuffer)(n)):void 0,r?(0,f.toBuffer)(r):void 0,i?(0,f.toBuffer)(i):void 0)},e.fromRlpSerializedAccount=function(e){var t=c.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var a=r(t,4),n=a[0],i=a[1],o=a[2],s=a[3];return new e(new c.BN(n),new c.BN(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new c.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new c.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,h.bnToUnpaddedBuffer)(this.nonce),(0,h.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return c.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(u.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(u.KECCAK256_NULL)},e}();t.Account=p,t.isValidAddress=function(e){try{(0,b.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,b.assertIsHexString)(e);var a=(0,d.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,h.toType)(t,h.TypeOutput.BN).toString()+"0x");for(var r=(0,l.keccakFromString)(n+a).toString("hex"),i="0x",o=0;o=8?i+=a[o].toUpperCase():i+=a[o];return i},t.isValidChecksumAddress=function(e,a){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,a)===e},t.generateAddress=function(e,t){(0,b.assertIsBuffer)(e),(0,b.assertIsBuffer)(t);var a=new c.BN(t);return a.isZero()?(0,l.rlphash)([e,null]).slice(-20):(0,l.rlphash)([e,n.from(a.toArray())]).slice(-20)},t.generateAddress2=function(e,t,a){return(0,b.assertIsBuffer)(e),(0,b.assertIsBuffer)(t),(0,b.assertIsBuffer)(a),(0,o.default)(20===e.length),(0,o.default)(32===t.length),(0,l.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,l.keccak256)(a)])).slice(-20)},t.isValidPrivate=function(e){return(0,s.privateKeyVerify)(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,b.assertIsBuffer)(e),64===e.length?(0,s.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,s.publicKeyVerify)(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,b.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),(0,o.default)(64===e.length),(0,l.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,b.assertIsBuffer)(e),n.from((0,s.publicKeyCreate)(e,!1)).slice(1)},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,b.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),e},t.zeroAddress=function(){var e=(0,f.zeros)(20);return(0,f.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,b.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}},64214:function(e,t,a){"use strict";var n=a(48834).Buffer,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i=r(a(71696)),o=a(55794),c=a(80182),s=a(12113),d=function(){function e(e){(0,i.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,c.zeros)(20))},e.fromString=function(t){return(0,i.default)((0,s.isValidAddress)(t),"Invalid address"),new e((0,c.toBuffer)(t))},e.fromPublicKey=function(t){return(0,i.default)(n.isBuffer(t),"Public key should be Buffer"),new e((0,s.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,i.default)(n.isBuffer(t),"Private key should be Buffer"),new e((0,s.privateToAddress)(t))},e.generate=function(t,a){return(0,i.default)(o.BN.isBN(a)),new e((0,s.generateAddress)(t.buf,a.toArrayLike(n)))},e.generate2=function(t,a,r){return(0,i.default)(n.isBuffer(a)),(0,i.default)(n.isBuffer(r)),new e((0,s.generateAddress2)(t.buf,a,r))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new o.BN(this.buf),t=new o.BN(0),a=new o.BN("ffff","hex");return e.gte(t)&&e.lte(a)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=d},80182:function(e,t,a){"use strict";var n=a(48834).Buffer,r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=a(55794),c=a(84001),s=a(80497);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var a=(0,t.intToHex)(e);return n.from((0,c.padToEven)(a.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var d=function(e,a,n){var r=(0,t.zeros)(a);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),u(e)},t.unpadArray=function(e){return(0,s.assertIsArray)(e),u(e)},t.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,c.stripHexPrefix)(e),u(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,c.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,c.padToEven)((0,c.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if(o.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToInt=function(e){return new o.BN((0,t.toBuffer)(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.fromSigned=function(e){return new o.BN(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||(0,c.isHexPrefixed)(e)?e:"0x"+e},t.toUtf8=function(e){if((e=(0,c.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var a=[],r=0;r0&&0===d[0])throw new Error("".concat(s," cannot have leading zeroes, received: ").concat(d.toString("hex")))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])}},77293:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=a(48834),r=a(55794);t.MAX_UINT64=new r.BN("ffffffffffffffff",16),t.MAX_INTEGER=new r.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new r.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},55794:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var c=o(a(62197));t.BN=c.default;var s=i(a(22644));t.rlp=s},15374:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var r=a(1115),i=a(16162),o=a(55794),c=a(80182),s=a(80497);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,s.assertIsBuffer)(e),t){case 224:return(0,r.keccak224)(e);case 256:return(0,r.keccak256)(e);case 384:return(0,r.keccak384)(e);case 512:return(0,r.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}},t.keccak256=function(e){return(0,t.keccak)(e)},t.keccakFromString=function(e,a){void 0===a&&(a=256),(0,s.assertIsString)(e);var r=n.from(e,"utf8");return(0,t.keccak)(r,a)},t.keccakFromHexString=function(e,a){return void 0===a&&(a=256),(0,s.assertIsHexString)(e),(0,t.keccak)((0,c.toBuffer)(e),a)},t.keccakFromArray=function(e,a){return void 0===a&&(a=256),(0,s.assertIsArray)(e),(0,t.keccak)((0,c.toBuffer)(e),a)};var d=function(e){return e=(0,c.toBuffer)(e),i("sha256").update(e).digest()};t.sha256=function(e){return(0,s.assertIsBuffer)(e),d(e)},t.sha256FromString=function(e){return(0,s.assertIsString)(e),d(e)},t.sha256FromArray=function(e){return(0,s.assertIsArray)(e),d(e)};var u=function(e,t){e=(0,c.toBuffer)(e);var a=i("rmd160").update(e).digest();return!0===t?(0,c.setLengthLeft)(a,32):a};t.ripemd160=function(e,t){return(0,s.assertIsBuffer)(e),u(e,t)},t.ripemd160FromString=function(e,t){return(0,s.assertIsString)(e),u(e,t)},t.ripemd160FromArray=function(e,t){return(0,s.assertIsArray)(e),u(e,t)},t.rlphash=function(e){return(0,t.keccak)(o.rlp.encode(e))}},80497:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var r=a(84001);t.assertIsHexString=function(e){if(!(0,r.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},47144:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),r=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,r(a(77293),t),r(a(12113),t),r(a(64214),t),r(a(15374),t),r(a(83281),t),r(a(80182),t),r(a(52592),t),r(a(55794),t),r(a(2221),t);var i=a(84001);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}})},84001:(e,t,a)=>{"use strict";var n=a(48834).Buffer;function r(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(typeof e));return"0"===e[0]&&"x"===e[1]}function i(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat(typeof t));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=r,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(typeof e));return r(e)?e.slice(2):e},t.padToEven=i,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat(typeof e));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,a){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat(typeof e,"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat(typeof t,"'"));return t[a?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",a=0,n=e.length;for("0x"===e.substring(0,2)&&(a=2);a=r.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===r.length||!t.length||(0,i.default)(t.length===r.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[a]=r}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:r,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:r})})),a)if("string"==typeof a&&(a=n.from((0,o.stripHexPrefix)(a),"hex")),n.isBuffer(a)&&(a=c.rlp.decode(a)),Array.isArray(a)){if(a.length>e._fields.length)throw new Error("wrong number of fields in data");a.forEach((function(t,a){e[e._fields[a]]=(0,s.toBuffer)(t)}))}else{if("object"!=typeof a)throw new Error("invalid data");var r=Object.keys(a);t.forEach((function(t){-1!==r.indexOf(t.name)&&(e[t.name]=a[t.name]),-1!==r.indexOf(t.alias)&&(e[t.alias]=a[t.alias])}))}}},83281:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var r=a(80101),i=a(55794),o=a(80182),c=a(15374),s=a(80497),d=a(2221);function u(e,t){var a=(0,d.toType)(e,d.TypeOutput.BN);if(a.eqn(0)||a.eqn(1))return(0,d.toType)(e,d.TypeOutput.BN);if(!t)return a.subn(27);var n=(0,d.toType)(t,d.TypeOutput.BN);return a.sub(n.muln(2).addn(35))}function f(e){var t=new i.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,a){var i=(0,r.ecdsaSign)(e,t),o=i.signature,c=i.recid,s=n.from(o.slice(0,32)),u=n.from(o.slice(32,64));if(!a||"number"==typeof a){if(a&&!Number.isSafeInteger(a))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:s,s:u,v:a?c+(2*a+35):c+27}}return{r:s,s:u,v:(0,d.toType)(a,d.TypeOutput.BN).muln(2).addn(35).addn(c).toArrayLike(n)}},t.ecrecover=function(e,t,a,i,c){var s=n.concat([(0,o.setLengthLeft)(a,32),(0,o.setLengthLeft)(i,32)],64),d=u(t,c);if(!f(d))throw new Error("Invalid signature v value");var l=(0,r.ecdsaRecover)(s,d.toNumber(),e);return n.from((0,r.publicKeyConvert)(l,!1).slice(1))},t.toRpcSig=function(e,t,a,r){if(!f(u(e,r)))throw new Error("Invalid signature v value");return(0,o.bufferToHex)(n.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(a,32),(0,o.toBuffer)(e)]))},t.toCompactSig=function(e,t,a,r){if(!f(u(e,r)))throw new Error("Invalid signature v value");var i=(0,d.toType)(e,d.TypeOutput.Number),c=a;return(i>28&&i%2==1||1===i||28===i)&&((c=n.from(a))[0]|=128),(0,o.bufferToHex)(n.concat([(0,o.setLengthLeft)(t,32),(0,o.setLengthLeft)(c,32)]))},t.fromRpcSig=function(e){var t,a,n,r=(0,o.toBuffer)(e);if(r.length>=65)t=r.slice(0,32),a=r.slice(32,64),n=(0,o.bufferToInt)(r.slice(64));else{if(64!==r.length)throw new Error("Invalid signature length");t=r.slice(0,32),a=r.slice(32,64),n=(0,o.bufferToInt)(r.slice(32,33))>>7,a[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:a}},t.isValidSignature=function(e,t,a,n,r){void 0===n&&(n=!0);var o=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),c=new i.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==a.length)return!1;if(!f(u(e,r)))return!1;var s=new i.BN(t),d=new i.BN(a);return!(s.isZero()||s.gt(c)||d.isZero()||d.gt(c)||n&&1===d.cmp(o))},t.hashPersonalMessage=function(e){(0,s.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,c.keccak)(n.concat([t,e]))}},2221:(e,t,a)=>{"use strict";var n=a(48834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var r,i=a(55794),o=a(84001),c=a(80182);function s(e){return(0,c.unpadBuffer)(e.toArrayLike(n))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=s,t.bnToRlp=function(e){return s(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(r=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var a=(0,c.toBuffer)(e);if(t===r.Buffer)return a;if(t===r.BN)return new i.BN(a);if(t===r.Number){var n=new i.BN(a),s=new i.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(s))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(a.toString("hex"))}}},96239:function(e,t,a){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(a(22965)),i=a(85665),o=function(){function e(e){this._hdkey=e}return e.fromMasterSeed=function(t){return new e(i.HDKey.fromMasterSeed(t))},e.fromExtendedKey=function(t){return new e(i.HDKey.fromExtendedKey(t))},e.prototype.privateExtendedKey=function(){if(!this._hdkey.privateExtendedKey)throw new Error("This is a public key only wallet");return this._hdkey.privateExtendedKey},e.prototype.publicExtendedKey=function(){return this._hdkey.publicExtendedKey},e.prototype.derivePath=function(t){return new e(this._hdkey.derive(t))},e.prototype.deriveChild=function(t){return new e(this._hdkey.deriveChild(t))},e.prototype.getWallet=function(){return this._hdkey._privateKey?r.default.fromPrivateKey(this._hdkey._privateKey):r.default.fromPublicKey(this._hdkey._publicKey,!0)},e}();t.default=o},22965:function(e,t,a){"use strict";var n=a(48834).Buffer,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,a=1,n=arguments.length;a0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&o!==(0,f.sha256)((0,f.sha256)(r)).slice(0,8).toString("hex"))throw new Error("Failed to decrypt input - possibly invalid passphrase");return[3,4];case 3:throw new Error("Unsupported or invalid entropy type");case 4:return[2,new b.default(r)]}}))}))}function v(e,t){if(e.length<10)throw new Error("Passphrase must be at least 10 characters");if(t.length<10)throw new Error("User id must be at least 10 characters");var a=e+t,n=u.pbkdf2Sync(a,a,2e3,32,"sha256");return new b.default(n)}t.fromEtherWallet=y,t.fromEtherCamp=g,t.fromKryptoKit=x,t.fromQuorumWallet=v;var w={fromEtherWallet:y,fromEtherCamp:g,fromKryptoKit:x,fromQuorumWallet:v};t.default=w},43356:function(e){!function(t){"use strict";function a(e){return parseInt(e)===e}function n(e){if(!a(e.length))return!1;for(var t=0;t255)return!1;return!0}function r(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(a(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function i(e){return new Uint8Array(e)}function o(e,t,a,n,r){null==n&&null==r||(e=e.slice?e.slice(n,r):Array.prototype.slice.call(e,n,r)),t.set(e,a)}var c,s={toBytes:function(e){var t=[],a=0;for(e=encodeURI(e);a191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[a+1])),a+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[a+1])<<6|63&e[a+2])),a+=3)}return t.join("")}},d=(c="0123456789abcdef",{toBytes:function(e){for(var t=[],a=0;a>4]+c[15&n])}return t.join("")}}),u={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],b=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],x=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],v=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],I=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],S=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function C(e){for(var t=[],a=0;a>2,this._Ke[a][t%4]=i[t],this._Kd[e-a][t%4]=i[t];for(var o,c=0,s=r;s>16&255]<<24^l[o>>8&255]<<16^l[255&o]<<8^l[o>>24&255]^f[c]<<24,c+=1,8!=r)for(t=1;t>8&255]<<8^l[o>>16&255]<<16^l[o>>24&255]<<24,t=r/2+1;t>2,b=s%4,this._Ke[d][b]=i[t],this._Kd[e-d][b]=i[t++],s++}for(var d=1;d>24&255]^A[o>>16&255]^S[o>>8&255]^k[255&o]},E.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,a=[0,0,0,0],n=C(e),r=0;r<4;r++)n[r]^=this._Ke[0][r];for(var o=1;o>24&255]^p[n[(r+1)%4]>>16&255]^m[n[(r+2)%4]>>8&255]^y[255&n[(r+3)%4]]^this._Ke[o][r];n=a.slice()}var c,s=i(16);for(r=0;r<4;r++)c=this._Ke[t][r],s[4*r]=255&(l[n[r]>>24&255]^c>>24),s[4*r+1]=255&(l[n[(r+1)%4]>>16&255]^c>>16),s[4*r+2]=255&(l[n[(r+2)%4]>>8&255]^c>>8),s[4*r+3]=255&(l[255&n[(r+3)%4]]^c);return s},E.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,a=[0,0,0,0],n=C(e),r=0;r<4;r++)n[r]^=this._Kd[0][r];for(var o=1;o>24&255]^x[n[(r+3)%4]>>16&255]^v[n[(r+2)%4]>>8&255]^w[255&n[(r+1)%4]]^this._Kd[o][r];n=a.slice()}var c,s=i(16);for(r=0;r<4;r++)c=this._Kd[t][r],s[4*r]=255&(b[n[r]>>24&255]^c>>24),s[4*r+1]=255&(b[n[(r+3)%4]>>16&255]^c>>16),s[4*r+2]=255&(b[n[(r+2)%4]>>8&255]^c>>8),s[4*r+3]=255&(b[255&n[(r+1)%4]]^c);return s};var T=function(e){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new E(e)};T.prototype.encrypt=function(e){if((e=r(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),a=i(16),n=0;nNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},M.prototype.setBytes=function(e){if(16!=(e=r(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},M.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var R=function(e,t){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof M||(t=new M(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new E(e)};R.prototype.encrypt=function(e){for(var t=r(e,!0),a=0;a16)throw new Error("PKCS#7 padding byte out of range");for(var a=e.length-t,n=0;n{"use strict";var n;a.d(t,{v4:()=>u});var r=new Uint8Array(16);function i(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)}const o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,c=function(e){return"string"==typeof e&&o.test(e)};for(var s=[],d=0;d<256;++d)s.push((d+256).toString(16).substr(1));const u=function(e,t,a){var n=(e=e||{}).random||(e.rng||i)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){a=a||0;for(var r=0;r<16;++r)t[a+r]=n[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!c(a))throw TypeError("Stringified UUID is invalid");return a}(n)}},65097:(e,t,a)=>{"use strict";var n=a(74878),r=a(13367),i=new n(0),o=new n(-1),c={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function s(e){var t=e?e.toLowerCase():"ether",a=c[t];if("string"!=typeof a)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(c,null,2));return new n(a,10)}function d(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}e.exports={unitMap:c,numberToString:d,getValueOfUnit:s,fromWei:function(e,t,a){var n=r(e),d=n.lt(i),u=s(t),f=c[t].length-1||1,l=a||{};d&&(n=n.mul(o));for(var b=n.mod(u).toString(10);b.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var l=f[0],b=f[1];if(l||(l="0"),b||(b="0"),b.length>i)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;b.length=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&r++,16===t?this._parseHex(e,r):this._parseBase(e,t,r),"-"===e[0]&&(this.negative=1),this.strip(),"le"===a&&this._initArray(this.toArray(),t,a)},i.prototype._initNumber=function(e,t,a){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===a&&this._initArray(this.toArray(),t,a)},i.prototype._initArray=function(e,t,a){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=6)r=c(e,a,a+6),this.words[n]|=r<>>26-i&4194303,(i+=24)>=26&&(i-=26,n++);a+6!==t&&(r=c(e,t,a+6),this.words[n]|=r<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,d=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var d=["","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"],u=[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 l(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?d[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var l=u[e],b=f[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:d[l-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function h(e,t,a){return(new p).mulp(e,t,a)}function p(e,t){this.x=e,this.y=t}Math.imul||(b=l),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?b(this,e,t):n<63?l(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):h(this,e,t),a},p.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},p.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new I(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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 e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):a.strip(),a},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(g,y),g.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new x;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},I.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},I.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new A(e)},r(A,I),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},81538:(e,t,a)=>{"use strict";var n=a(48834).Buffer,r=a(38320),i=a(79826);function o(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function c(e){return"0x"+e.toString(16)}e.exports={arrayContainsArray:function(e,t,a){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(a)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var t=c(e);return new n(o(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return n.byteLength(e,"utf8")},isHexPrefixed:r,stripHexPrefix:i,padToEven:o,intToHex:c,fromAscii:function(e){for(var t="",a=0;a{"use strict";var t=Object.prototype.hasOwnProperty,a="~";function n(){}function r(e,t,a){this.fn=e,this.context=t,this.once=a||!1}function i(e,t,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new r(n,i||e,o),s=a?a+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],c]:e._events[s].push(c):(e._events[s]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),c.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(a?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},c.prototype.listeners=function(e){var t=a?a+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r{"use strict";var t,a="object"==typeof Reflect?Reflect:null,n=a&&"function"==typeof a.apply?a.apply:function(e,t,a){return Function.prototype.apply.call(e,t,a)};t=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(a,n){function r(a){e.removeListener(t,i),n(a)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",r),a([].slice.call(arguments))}p(e,t,i,{once:!0}),"error"!==t&&function(e,t,a){"function"==typeof e.on&&p(e,"error",t,{once:!0})}(e,r)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function d(e,t,a,n){var r,i,o,d;if(c(a),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,a.listener?a.listener:a),i=e._events),o=i[t]),void 0===o)o=i[t]=a,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[a,o]:[o,a]:n?o.unshift(a):o.push(a),(r=s(e))>0&&o.length>r&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,d=u,console&&console.warn&&console.warn(d)}return e}function u(){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(e,t,a){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:a},r=u.bind(n);return r.listener=a,n.wrapFn=r,r}function l(e,t,a){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?a?[r.listener||r]:[r]:a?function(e){for(var t=new Array(e.length),a=0;a0&&(o=t[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)n(s,this,t);else{var d=s.length,u=h(s,d);for(a=0;a=0;i--)if(a[i]===t||a[i].listener===t){o=a[i].listener,r=i;break}if(r<0)return this;0===r?a.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return l(this,e,!0)},i.prototype.rawListeners=function(e){return l(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},i.prototype.listenerCount=b,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},59341:(e,t,a)=>{var n=a(77834).Buffer,r=a(27993);e.exports=function(e,t,a,i){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=a/8,c=n.alloc(o),s=n.alloc(i||0),d=n.alloc(0);o>0||i>0;){var u=new r;u.update(d),u.update(e),t&&u.update(t),d=u.digest();var f=0;if(o>0){var l=c.length-o;f=Math.min(o,d.length),d.copy(c,l,0,f),o-=f}if(f0){var b=s.length-i,h=Math.min(i,d.length-f);d.copy(s,b,f,f+h),i-=h}}return d.fill(0),{key:c,iv:s}}},40063:e=>{"use strict";e.exports=function(e,t){for(var a={},n=Object.keys(e),r=Array.isArray(t),i=0;i{"use strict";var n=a(9680),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(e,t,a){for(var n=0,r=e.length;n=3&&(i=a),"[object Array]"===r.call(e)?o(e,t,i):"string"==typeof e?c(e,t,i):s(e,t,i)}},37795:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",a=Array.prototype.slice,n=Object.prototype.toString,r="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||n.call(i)!==r)throw new TypeError(t+i);for(var o,c=a.call(arguments,1),s=function(){if(this instanceof o){var t=i.apply(this,c.concat(a.call(arguments)));return Object(t)===t?t:this}return i.apply(e,c.concat(a.call(arguments)))},d=Math.max(0,i.length-c.length),u=[],f=0;f{"use strict";var n=a(37795);e.exports=Function.prototype.bind||n},67286:(e,t,a)=>{"use strict";var n,r=SyntaxError,i=Function,o=TypeError,c=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var d=function(){throw new o},u=s?function(){try{return d}catch(e){try{return s(arguments,"callee").get}catch(e){return d}}}():d,f=a(32636)(),l=Object.getPrototypeOf||function(e){return e.__proto__},b={},h="undefined"==typeof Uint8Array?n:l(Uint8Array),p={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?l([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%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%":i,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?l(l([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?l((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?l((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?l(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":o,"%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},m=function e(t){var a;if("%AsyncFunction%"===t)a=c("async function () {}");else if("%GeneratorFunction%"===t)a=c("function* () {}");else if("%AsyncGeneratorFunction%"===t)a=c("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(a=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var r=e("%AsyncGenerator%");r&&(a=l(r.prototype))}return p[t]=a,a},y={"%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"]},g=a(4090),x=a(23198),v=g.call(Function.call,Array.prototype.concat),w=g.call(Function.apply,Array.prototype.splice),I=g.call(Function.call,String.prototype.replace),A=g.call(Function.call,String.prototype.slice),S=g.call(Function.call,RegExp.prototype.exec),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,E=function(e){var t=A(e,0,1),a=A(e,-1);if("%"===t&&"%"!==a)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===a&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,k,(function(e,t,a,r){n[n.length]=a?I(r,C,"$1"):t||e})),n},T=function(e,t){var a,n=e;if(x(y,n)&&(n="%"+(a=y[n])[0]+"%"),x(p,n)){var i=p[n];if(i===b&&(i=m(n)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===S(/^%?[^%]*%?$/,e))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=E(e),n=a.length>0?a[0]:"",i=T("%"+n+"%",t),c=i.name,d=i.value,u=!1,f=i.alias;f&&(n=f[0],w(a,v([0,1],f)));for(var l=1,b=!0;l=a.length){var g=s(d,h);d=(b=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:d[h]}else b=x(d,h),d=d[h];b&&!u&&(p[c]=d)}}return d}},50326:(e,t,a)=>{"use strict";var n=a(67286)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},81181:(e,t,a)=>{"use strict";var n=a(67286)("%Object.defineProperty%",!0),r=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};r.hasArrayLengthDefineBug=function(){if(!r())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=r},32636:(e,t,a)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,r=a(66679);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&r()}},66679:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),a=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(a))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},67226:(e,t,a)=>{"use strict";var n=a(66679);e.exports=function(){return n()&&!!Symbol.toStringTag}},23198:(e,t,a)=>{"use strict";var n=a(4090);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},84485:(e,t,a)=>{"use strict";var n=a(77834).Buffer,r=a(67525).Transform;function i(e){r.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}a(91285)(i,r),i.prototype._transform=function(e,t,a){var n=null;try{this.update(e,t)}catch(e){n=e}a(n)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var a=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=c,(c=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*c);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var a=0;a<4;++a)this._length[a]=0;return t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i},34485:(e,t,a)=>{var n=t;n.utils=a(50212),n.common=a(74495),n.sha=a(45530),n.ripemd=a(91396),n.hmac=a(15047),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},74495:(e,t,a)=>{"use strict";var n=a(50212),r=a(79561);function i(){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}t.BlockHash=i,i.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var a=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-a,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-a,this.endian);for(var r=0;r>>24&255,n[r++]=e>>>16&255,n[r++]=e>>>8&255,n[r++]=255&e}else for(n[r++]=255&e,n[r++]=e>>>8&255,n[r++]=e>>>16&255,n[r++]=e>>>24&255,n[r++]=0,n[r++]=0,n[r++]=0,n[r++]=0,i=8;i{"use strict";var n=a(50212),r=a(79561);function i(e,t,a){if(!(this instanceof i))return new i(e,t,a);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,a))}e.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),r(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=a(50212),r=a(74495),i=n.rotl32,o=n.sum32,c=n.sum32_3,s=n.sum32_4,d=r.BlockHash;function u(){if(!(this instanceof u))return new u;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,a,n){return e<=15?t^a^n:e<=31?t&a|~t&n:e<=47?(t|~a)^n:e<=63?t&n|a&~n:t^(a|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function b(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,d),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var a=this.h[0],n=this.h[1],r=this.h[2],d=this.h[3],u=this.h[4],g=a,x=n,v=r,w=d,I=u,A=0;A<80;A++){var S=o(i(s(a,f(A,n,r,d),e[h[A]+t],l(A)),m[A]),u);a=u,u=d,d=i(r,10),r=n,n=S,S=o(i(s(g,f(79-A,x,v,w),e[p[A]+t],b(A)),y[A]),I),g=I,I=w,w=i(v,10),v=x,x=S}S=c(this.h[1],r,w),this.h[1]=c(this.h[2],d,I),this.h[2]=c(this.h[3],u,g),this.h[3]=c(this.h[4],a,x),this.h[4]=c(this.h[0],n,v),this.h[0]=S},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var h=[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],p=[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],m=[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]},45530:(e,t,a)=>{"use strict";t.sha1=a(35079),t.sha224=a(63823),t.sha256=a(68032),t.sha384=a(25328),t.sha512=a(20168)},35079:(e,t,a)=>{"use strict";var n=a(50212),r=a(74495),i=a(40713),o=n.rotl32,c=n.sum32,s=n.sum32_5,d=i.ft_1,u=r.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,u),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var a=this.W,n=0;n<16;n++)a[n]=e[t+n];for(;n{"use strict";var n=a(50212),r=a(68032);function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(i,r),e.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},68032:(e,t,a)=>{"use strict";var n=a(50212),r=a(74495),i=a(40713),o=a(79561),c=n.sum32,s=n.sum32_4,d=n.sum32_5,u=i.ch32,f=i.maj32,l=i.s0_256,b=i.s1_256,h=i.g0_256,p=i.g1_256,m=r.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 g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var a=this.W,n=0;n<16;n++)a[n]=e[t+n];for(;n{"use strict";var n=a(50212),r=a(20168);function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,r),e.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},20168:(e,t,a)=>{"use strict";var n=a(50212),r=a(74495),i=a(79561),o=n.rotr64_hi,c=n.rotr64_lo,s=n.shr64_hi,d=n.shr64_lo,u=n.sum64,f=n.sum64_hi,l=n.sum64_lo,b=n.sum64_4_hi,h=n.sum64_4_lo,p=n.sum64_5_hi,m=n.sum64_5_lo,y=r.BlockHash,g=[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 x(){if(!(this instanceof x))return new x;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(e,t,a,n,r){var i=e&a^~e&r;return i<0&&(i+=4294967296),i}function w(e,t,a,n,r,i){var o=t&n^~t&i;return o<0&&(o+=4294967296),o}function I(e,t,a,n,r){var i=e&a^e&r^a&r;return i<0&&(i+=4294967296),i}function A(e,t,a,n,r,i){var o=t&n^t&i^n&i;return o<0&&(o+=4294967296),o}function S(e,t){var a=o(e,t,28)^o(t,e,2)^o(t,e,7);return a<0&&(a+=4294967296),a}function k(e,t){var a=c(e,t,28)^c(t,e,2)^c(t,e,7);return a<0&&(a+=4294967296),a}function C(e,t){var a=c(e,t,14)^c(e,t,18)^c(t,e,9);return a<0&&(a+=4294967296),a}function E(e,t){var a=o(e,t,1)^o(e,t,8)^s(e,t,7);return a<0&&(a+=4294967296),a}function T(e,t){var a=c(e,t,1)^c(e,t,8)^d(e,t,7);return a<0&&(a+=4294967296),a}function P(e,t){var a=c(e,t,19)^c(t,e,29)^d(e,t,6);return a<0&&(a+=4294967296),a}n.inherits(x,y),e.exports=x,x.blockSize=1024,x.outSize=512,x.hmacStrength=192,x.padLength=128,x.prototype._prepareBlock=function(e,t){for(var a=this.W,n=0;n<32;n++)a[n]=e[t+n];for(;n{"use strict";var n=a(50212).rotr32;function r(e,t,a){return e&t^~e&a}function i(e,t,a){return e&t^e&a^t&a}function o(e,t,a){return e^t^a}t.ft_1=function(e,t,a,n){return 0===e?r(t,a,n):1===e||3===e?o(t,a,n):2===e?i(t,a,n):void 0},t.ch32=r,t.maj32=i,t.p32=o,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},50212:(e,t,a)=>{"use strict";var n=a(79561),r=a(91285);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=r,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var a=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r>6|192,a[n++]=63&o|128):i(e,r)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),a[n++]=o>>18|240,a[n++]=o>>12&63|128,a[n++]=o>>6&63|128,a[n++]=63&o|128):(a[n++]=o>>12|224,a[n++]=o>>6&63|128,a[n++]=63&o|128)}else for(r=0;r>>0}return o},t.split32=function(e,t){for(var a=new Array(4*e.length),n=0,r=0;n>>24,a[r+1]=i>>>16&255,a[r+2]=i>>>8&255,a[r+3]=255&i):(a[r+3]=i>>>24,a[r+2]=i>>>16&255,a[r+1]=i>>>8&255,a[r]=255&i)}return a},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,a){return e+t+a>>>0},t.sum32_4=function(e,t,a,n){return e+t+a+n>>>0},t.sum32_5=function(e,t,a,n,r){return e+t+a+n+r>>>0},t.sum64=function(e,t,a,n){var r=e[t],i=n+e[t+1]>>>0,o=(i>>0,e[t+1]=i},t.sum64_hi=function(e,t,a,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,a,n){return t+n>>>0},t.sum64_4_hi=function(e,t,a,n,r,i,o,c){var s=0,d=t;return s+=(d=d+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,a,n,r,i,o,c){return t+n+i+c>>>0},t.sum64_5_hi=function(e,t,a,n,r,i,o,c,s,d){var u=0,f=t;return u+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,a,n,r,i,o,c,s,d){return t+n+i+c+d>>>0},t.rotr64_hi=function(e,t,a){return(t<<32-a|e>>>a)>>>0},t.rotr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0},t.shr64_hi=function(e,t,a){return e>>>a},t.shr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0}},78873:(e,t,a)=>{"use strict";var n=a(34485),r=a(43022),i=a(79561);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=r.toArray(e.entropy,e.entropyEnc||"hex"),a=r.toArray(e.nonce,e.nonceEnc||"hex"),n=r.toArray(e.pers,e.persEnc||"hex");i(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,a,n)}e.exports=o,o.prototype._init=function(e,t,a){var n=e.concat(t).concat(a);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(a||[])),this._reseed=1},o.prototype.generate=function(e,t,a,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=a,a=t,t=null),a&&(a=r.toArray(a,n||"hex"),this._update(a));for(var i=[];i.length{t.read=function(e,t,a,n,r){var i,o,c=8*r-n-1,s=(1<>1,u=-7,f=a?r-1:0,l=a?-1:1,b=e[t+f];for(f+=l,i=b&(1<<-u)-1,b>>=-u,u+=c;u>0;i=256*i+e[t+f],f+=l,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+e[t+f],f+=l,u-=8);if(0===i)i=1-d;else{if(i===s)return o?NaN:1/0*(b?-1:1);o+=Math.pow(2,n),i-=d}return(b?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,a,n,r,i){var o,c,s,d=8*i-r-1,u=(1<>1,l=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,h=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-o))<1&&(o--,s*=2),(t+=o+f>=1?l/s:l*Math.pow(2,1-f))*s>=2&&(o++,s/=2),o+f>=u?(c=0,o=u):o+f>=1?(c=(t*s-1)*Math.pow(2,r),o+=f):(c=t*Math.pow(2,f-1)*Math.pow(2,r),o=0));r>=8;e[a+b]=255&c,b+=h,c/=256,r-=8);for(o=o<0;e[a+b]=255&o,b+=h,o/=256,d-=8);e[a+b-h]|=128*p}},91285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}},52635:(e,t,a)=>{"use strict";var n=a(67226)(),r=a(62680)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===r(e)},o=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r(e)&&"[object Function]"===r(e.callee)},c=function(){return i(arguments)}();i.isLegacyArguments=o,e.exports=c?i:o},13335:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},9680:e=>{"use strict";var t,a,n=Function.prototype.toString,r="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof r&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r((function(){throw 42}),null,t)}catch(e){e!==a&&(r=null)}else r=null;var i=/^\s*class\b/,o=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},c=function(e){try{return!o(e)&&(n.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,d="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var l=document.all;s.call(l)===s.call(document.all)&&(f=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=r?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{r(e,null,t)}catch(e){if(e!==a)return!1}return!o(e)&&c(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(d)return c(e);if(o(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&c(e)}},43138:(e,t,a)=>{"use strict";var n,r=Object.prototype.toString,i=Function.prototype.toString,o=/^\s*(?:function)?\*/,c=a(67226)(),s=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(o.test(i.call(e)))return!0;if(!c)return"[object GeneratorFunction]"===r.call(e);if(!s)return!1;if(void 0===n){var t=function(){if(!c)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&s(t)}return s(e)===n}},38320:e=>{e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},37053:e=>{"use strict";e.exports=function(e){return e!=e}},74782:(e,t,a)=>{"use strict";var n=a(89429),r=a(14926),i=a(37053),o=a(40755),c=a(55346),s=n(o(),Number);r(s,{getPolyfill:o,implementation:i,shim:c}),e.exports=s},40755:(e,t,a)=>{"use strict";var n=a(37053);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},55346:(e,t,a)=>{"use strict";var n=a(14926),r=a(40755);e.exports=function(){var e=r();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},50198:(e,t,a)=>{"use strict";var n=a(83243),r=a(62191),i=a(62680),o=i("Object.prototype.toString"),c=a(67226)(),s=a(50326),d="undefined"==typeof globalThis?a.g:globalThis,u=r(),f=i("Array.prototype.indexOf",!0)||function(e,t){for(var a=0;a-1}return!!s&&function(e){var t=!1;return n(b,(function(a,n){if(!t)try{t=a.call(e)===n}catch(e){}})),t}(e)}},83669:(e,t,a)=>{var n,r=a(34406);!function(){"use strict";var i="input is invalid type",o="object"==typeof window,c=o?window:{};c.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!c.JS_SHA3_NO_NODE_JS&&"object"==typeof r&&r.versions&&r.versions.node?c=a.g:s&&(c=self);var d=!c.JS_SHA3_NO_COMMON_JS&&e.exports,u=a.amdO,f=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),b=[4,1024,262144,67108864],h=[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],y=[128,256],g=["hex","buffer","arrayBuffer","array","digest"],x={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!c.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var v=function(e,t,a){return function(n){return new D(e,t,e).update(n)[a]()}},w=function(e,t,a){return function(n,r){return new D(e,t,r).update(n)[a]()}},I=function(e,t,a){return function(t,n,r,i){return E["cshake"+e].update(t,n,r,i)[a]()}},A=function(e,t,a){return function(t,n,r,i){return E["kmac"+e].update(t,n,r,i)[a]()}},S=function(e,t,a,n){for(var r=0;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=a>>5,this.extraBytes=(31&a)>>3;for(var n=0;n<50;++n)this.s[n]=0}function V(e,t,a){D.call(this,e,t,a)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,a=typeof e;if("string"!==a){if("object"!==a)throw new Error(i);if(null===e)throw new Error(i);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,r,o=this.blocks,c=this.byteCount,s=e.length,d=this.blockCount,u=0,l=this.s;u>2]|=e[u]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(o[n>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=c){for(this.start=n-c,this.block=o[d],n=0;n>=8);a>0;)r.unshift(a),a=255&(e>>=8),++n;return t?r.push(n):r.unshift(n),this.update(r),r.length},D.prototype.encodeString=function(e){var t,a=typeof e;if("string"!==a){if("object"!==a)throw new Error(i);if(null===e)throw new Error(i);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,r=e.length;if(t)n=r;else for(var o=0;o=57344?n+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var a=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[a],t=1;t>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15];o%t==0&&(L(a),i=0)}return r&&(e=a[i],c+=l[e>>4&15]+l[15&e],r>1&&(c+=l[e>>12&15]+l[e>>8&15]),r>2&&(c+=l[e>>20&15]+l[e>>16&15])),c},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,a=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,o=0,c=this.outputBits>>3;e=r?new ArrayBuffer(n+1<<2):new ArrayBuffer(c);for(var s=new Uint32Array(e);o>8&255,s[e+2]=t>>16&255,s[e+3]=t>>24&255;c%a==0&&L(n)}return i&&(e=c<<2,t=n[o],s[e]=255&t,i>1&&(s[e+1]=t>>8&255),i>2&&(s[e+2]=t>>16&255)),s},V.prototype=new D,V.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var L=function(e){var t,a,n,r,i,o,c,s,d,u,f,l,b,h,m,y,g,x,v,w,I,A,S,k,C,E,T,P,O,B,M,R,N,D,V,L,U,H,K,F,j,q,z,W,G,X,Z,J,Y,Q,_,$,ee,te,ae,ne,re,ie,oe,ce,se,de,ue;for(n=0;n<48;n+=2)r=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],c=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],d=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|c>>>31),a=(b=e[9]^e[19]^e[29]^e[39]^e[49])^(c<<1|o>>>31),e[0]^=t,e[1]^=a,e[10]^=t,e[11]^=a,e[20]^=t,e[21]^=a,e[30]^=t,e[31]^=a,e[40]^=t,e[41]^=a,t=r^(s<<1|d>>>31),a=i^(d<<1|s>>>31),e[2]^=t,e[3]^=a,e[12]^=t,e[13]^=a,e[22]^=t,e[23]^=a,e[32]^=t,e[33]^=a,e[42]^=t,e[43]^=a,t=o^(u<<1|f>>>31),a=c^(f<<1|u>>>31),e[4]^=t,e[5]^=a,e[14]^=t,e[15]^=a,e[24]^=t,e[25]^=a,e[34]^=t,e[35]^=a,e[44]^=t,e[45]^=a,t=s^(l<<1|b>>>31),a=d^(b<<1|l>>>31),e[6]^=t,e[7]^=a,e[16]^=t,e[17]^=a,e[26]^=t,e[27]^=a,e[36]^=t,e[37]^=a,e[46]^=t,e[47]^=a,t=u^(r<<1|i>>>31),a=f^(i<<1|r>>>31),e[8]^=t,e[9]^=a,e[18]^=t,e[19]^=a,e[28]^=t,e[29]^=a,e[38]^=t,e[39]^=a,e[48]^=t,e[49]^=a,h=e[0],m=e[1],X=e[11]<<4|e[10]>>>28,Z=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,ce=e[31]<<9|e[30]>>>23,se=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,z=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,V=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,B=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,de=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ae=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,x=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,_=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,re=e[16]<<23|e[17]>>>9,H=e[26]<<25|e[27]>>>7,K=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,I=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,W=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,E=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,F=e[38]<<8|e[39]>>>24,j=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=h^~y&x,e[1]=m^~g&v,e[10]=k^~E&P,e[11]=C^~T&O,e[20]=D^~L&H,e[21]=V^~U&K,e[30]=W^~X&J,e[31]=G^~Z&Y,e[40]=te^~ne&ie,e[41]=ae^~re&oe,e[2]=y^~x&w,e[3]=g^~v&I,e[12]=E^~P&B,e[13]=T^~O&M,e[22]=L^~H&F,e[23]=U^~K&j,e[32]=X^~J&Q,e[33]=Z^~Y&_,e[42]=ne^~ie&ce,e[43]=re^~oe&se,e[4]=x^~w&A,e[5]=v^~I&S,e[14]=P^~B&R,e[15]=O^~M&N,e[24]=H^~F&q,e[25]=K^~j&z,e[34]=J^~Q&$,e[35]=Y^~_&ee,e[44]=ie^~ce&de,e[45]=oe^~se&ue,e[6]=w^~A&h,e[7]=I^~S&m,e[16]=B^~R&k,e[17]=M^~N&C,e[26]=F^~q&D,e[27]=j^~z&V,e[36]=Q^~$&W,e[37]=_^~ee&G,e[46]=ce^~de&te,e[47]=se^~ue&ae,e[8]=A^~h&y,e[9]=S^~m&g,e[18]=R^~k&E,e[19]=N^~C&T,e[28]=q^~D&L,e[29]=z^~V&U,e[38]=$^~W&X,e[39]=ee^~G&Z,e[48]=de^~te&ne,e[49]=ue^~ae&re,e[0]^=p[n],e[1]^=p[n+1]};if(d)e.exports=E;else{for(P=0;P{e.exports=a(83249)(a(55270))},83249:(e,t,a)=>{const n=a(42532),r=a(14255);e.exports=function(e){const t=n(e),a=r(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new a(1344,256,31,n);case"shake256":return new a(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},42532:(e,t,a)=>{var n=a(48834).Buffer;const{Transform:r}=a(67525);e.exports=e=>class t extends r{constructor(t,a,n,r,i){super(i),this._rate=t,this._capacity=a,this._delimitedSuffix=n,this._hashBitLength=r,this._options=i,this._state=new e,this._state.initialize(t,a),this._finalized=!1}_transform(e,t,a){let n=null;try{this.update(e,t)}catch(e){n=e}a(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},14255:(e,t,a)=>{var n=a(48834).Buffer;const{Transform:r}=a(67525);e.exports=e=>class t extends r{constructor(t,a,n,r){super(r),this._rate=t,this._capacity=a,this._delimitedSuffix=n,this._options=r,this._state=new e,this._state.initialize(t,a),this._finalized=!1}_transform(e,t,a){let n=null;try{this.update(e,t)}catch(e){n=e}a(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let a=this._state.squeeze(e);return void 0!==t&&(a=a.toString(t)),a}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},53877:(e,t)=>{const a=[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];t.p1600=function(e){for(let t=0;t<24;++t){const n=e[0]^e[10]^e[20]^e[30]^e[40],r=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],s=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],u=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49];let b=f^(i<<1|o>>>31),h=l^(o<<1|i>>>31);const p=e[0]^b,m=e[1]^h,y=e[10]^b,g=e[11]^h,x=e[20]^b,v=e[21]^h,w=e[30]^b,I=e[31]^h,A=e[40]^b,S=e[41]^h;b=n^(c<<1|s>>>31),h=r^(s<<1|c>>>31);const k=e[2]^b,C=e[3]^h,E=e[12]^b,T=e[13]^h,P=e[22]^b,O=e[23]^h,B=e[32]^b,M=e[33]^h,R=e[42]^b,N=e[43]^h;b=i^(d<<1|u>>>31),h=o^(u<<1|d>>>31);const D=e[4]^b,V=e[5]^h,L=e[14]^b,U=e[15]^h,H=e[24]^b,K=e[25]^h,F=e[34]^b,j=e[35]^h,q=e[44]^b,z=e[45]^h;b=c^(f<<1|l>>>31),h=s^(l<<1|f>>>31);const W=e[6]^b,G=e[7]^h,X=e[16]^b,Z=e[17]^h,J=e[26]^b,Y=e[27]^h,Q=e[36]^b,_=e[37]^h,$=e[46]^b,ee=e[47]^h;b=d^(n<<1|r>>>31),h=u^(r<<1|n>>>31);const te=e[8]^b,ae=e[9]^h,ne=e[18]^b,re=e[19]^h,ie=e[28]^b,oe=e[29]^h,ce=e[38]^b,se=e[39]^h,de=e[48]^b,ue=e[49]^h,fe=p,le=m,be=g<<4|y>>>28,he=y<<4|g>>>28,pe=x<<3|v>>>29,me=v<<3|x>>>29,ye=I<<9|w>>>23,ge=w<<9|I>>>23,xe=A<<18|S>>>14,ve=S<<18|A>>>14,we=k<<1|C>>>31,Ie=C<<1|k>>>31,Ae=T<<12|E>>>20,Se=E<<12|T>>>20,ke=P<<10|O>>>22,Ce=O<<10|P>>>22,Ee=M<<13|B>>>19,Te=B<<13|M>>>19,Pe=R<<2|N>>>30,Oe=N<<2|R>>>30,Be=V<<30|D>>>2,Me=D<<30|V>>>2,Re=L<<6|U>>>26,Ne=U<<6|L>>>26,De=K<<11|H>>>21,Ve=H<<11|K>>>21,Le=F<<15|j>>>17,Ue=j<<15|F>>>17,He=z<<29|q>>>3,Ke=q<<29|z>>>3,Fe=W<<28|G>>>4,je=G<<28|W>>>4,qe=Z<<23|X>>>9,ze=X<<23|Z>>>9,We=J<<25|Y>>>7,Ge=Y<<25|J>>>7,Xe=Q<<21|_>>>11,Ze=_<<21|Q>>>11,Je=ee<<24|$>>>8,Ye=$<<24|ee>>>8,Qe=te<<27|ae>>>5,_e=ae<<27|te>>>5,$e=ne<<20|re>>>12,et=re<<20|ne>>>12,tt=oe<<7|ie>>>25,at=ie<<7|oe>>>25,nt=ce<<8|se>>>24,rt=se<<8|ce>>>24,it=de<<14|ue>>>18,ot=ue<<14|de>>>18;e[0]=fe^~Ae&De,e[1]=le^~Se&Ve,e[10]=Fe^~$e&pe,e[11]=je^~et&me,e[20]=we^~Re&We,e[21]=Ie^~Ne&Ge,e[30]=Qe^~be&ke,e[31]=_e^~he&Ce,e[40]=Be^~qe&tt,e[41]=Me^~ze&at,e[2]=Ae^~De&Xe,e[3]=Se^~Ve&Ze,e[12]=$e^~pe&Ee,e[13]=et^~me&Te,e[22]=Re^~We&nt,e[23]=Ne^~Ge&rt,e[32]=be^~ke&Le,e[33]=he^~Ce&Ue,e[42]=qe^~tt&ye,e[43]=ze^~at&ge,e[4]=De^~Xe&it,e[5]=Ve^~Ze&ot,e[14]=pe^~Ee&He,e[15]=me^~Te&Ke,e[24]=We^~nt&xe,e[25]=Ge^~rt&ve,e[34]=ke^~Le&Je,e[35]=Ce^~Ue&Ye,e[44]=tt^~ye&Pe,e[45]=at^~ge&Oe,e[6]=Xe^~it&fe,e[7]=Ze^~ot&le,e[16]=Ee^~He&Fe,e[17]=Te^~Ke&je,e[26]=nt^~xe&we,e[27]=rt^~ve&Ie,e[36]=Le^~Je&Qe,e[37]=Ue^~Ye&_e,e[46]=ye^~Pe&Be,e[47]=ge^~Oe&Me,e[8]=it^~fe&Ae,e[9]=ot^~le&Se,e[18]=He^~Fe&$e,e[19]=Ke^~je&et,e[28]=xe^~we&Re,e[29]=ve^~Ie&Ne,e[38]=Je^~Qe&be,e[39]=Ye^~_e&he,e[48]=Pe^~Be&qe,e[49]=Oe^~Me&ze,e[0]^=a[2*t],e[1]^=a[2*t+1]}}},55270:(e,t,a)=>{var n=a(48834).Buffer;const r=a(53877);function i(){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}i.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},33958:(e,t,a)=>{e=a.nmd(e);var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",c="[object Boolean]",s="[object Date]",d="[object Error]",u="[object Function]",f="[object Map]",l="[object Number]",b="[object Object]",h="[object Promise]",p="[object RegExp]",m="[object Set]",y="[object String]",g="[object WeakMap]",x="[object ArrayBuffer]",v="[object DataView]",w=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[i]=A[o]=A[x]=A[c]=A[v]=A[s]=A[d]=A[u]=A[f]=A[l]=A[b]=A[p]=A[m]=A[y]=A[g]=!1;var S="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g,k="object"==typeof self&&self&&self.Object===Object&&self,C=S||k||Function("return this")(),E=t&&!t.nodeType&&t,T=E&&e&&!e.nodeType&&e,P=T&&T.exports===E,O=P&&S.process,B=function(){try{return O&&O.binding&&O.binding("util")}catch(e){}}(),M=B&&B.isTypedArray;function R(e,t){for(var a=-1,n=null==e?0:e.length;++ac))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var u=-1,f=!0,l=2&a?new xe:void 0;for(i.set(e,t),i.set(t,e);++u-1},ye.prototype.set=function(e,t){var a=this.__data__,n=we(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this},ge.prototype.clear=function(){this.size=0,this.__data__={hash:new me,map:new(re||ye),string:new me}},ge.prototype.delete=function(e){var t=Ee(this,e).delete(e);return this.size-=t?1:0,t},ge.prototype.get=function(e){return Ee(this,e).get(e)},ge.prototype.has=function(e){return Ee(this,e).has(e)},ge.prototype.set=function(e,t){var a=Ee(this,e),n=a.size;return a.set(e,t),this.size+=a.size==n?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,n),this},xe.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.clear=function(){this.__data__=new ye,this.size=0},ve.prototype.delete=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a},ve.prototype.get=function(e){return this.__data__.get(e)},ve.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.set=function(e,t){var a=this.__data__;if(a instanceof ye){var n=a.__data__;if(!re||n.length<199)return n.push([e,t]),this.size=++a.size,this;a=this.__data__=new ge(n)}return a.set(e,t),this.size=a.size,this};var Pe=ee?function(e){return null==e?[]:(e=Object(e),function(t,a){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=r}function He(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ke(e){return null!=e&&"object"==typeof e}var Fe=M?function(e){return function(t){return e(t)}}(M):function(e){return Ke(e)&&Ue(e.length)&&!!A[Ie(e)]};function je(e){return null!=(t=e)&&Ue(t.length)&&!Le(t)?function(e,t){var a=De(e),n=!a&&Ne(e),r=!a&&!n&&Ve(e),i=!a&&!n&&!r&&Fe(e),o=a||n||r||i,c=o?function(e,t){for(var a=-1,n=Array(e);++a{e=a.nmd(e);var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",c="[object Object]",s=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[c]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var f="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g,l="object"==typeof self&&self&&self.Object===Object&&self,b=f||l||Function("return this")(),h=t&&!t.nodeType&&t,p=h&&e&&!e.nodeType&&e,m=p&&p.exports===h,y=m&&f.process,g=function(){try{return p&&p.require&&p.require("util").types||y&&y.binding&&y.binding("util")}catch(e){}}(),x=g&&g.isTypedArray;function v(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}var w,I,A,S=Array.prototype,k=Function.prototype,C=Object.prototype,E=b["__core-js_shared__"],T=k.toString,P=C.hasOwnProperty,O=(w=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",B=C.toString,M=T.call(Object),R=RegExp("^"+T.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=m?b.Buffer:void 0,D=b.Symbol,V=b.Uint8Array,L=(N&&N.allocUnsafe,I=Object.getPrototypeOf,A=Object,function(e){return I(A(e))}),U=Object.create,H=C.propertyIsEnumerable,K=S.splice,F=D?D.toStringTag:void 0,j=function(){try{var e=se(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),q=N?N.isBuffer:void 0,z=Math.max,W=Date.now,G=se(b,"Map"),X=se(Object,"create"),Z=function(){function e(){}return function(t){if(!ve(t))return{};if(U)return U(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();function J(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t-1},Y.prototype.set=function(e,t){var a=this.__data__,n=te(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new J,map:new(G||Y),string:new J}},Q.prototype.delete=function(e){var t=ce(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return ce(this,e).get(e)},Q.prototype.has=function(e){return ce(this,e).has(e)},Q.prototype.set=function(e,t){var a=ce(this,e),n=a.size;return a.set(e,t),this.size+=a.size==n?0:1,this},_.prototype.clear=function(){this.__data__=new Y,this.size=0},_.prototype.delete=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a},_.prototype.get=function(e){return this.__data__.get(e)},_.prototype.has=function(e){return this.__data__.has(e)},_.prototype.set=function(e,t){var a=this.__data__;if(a instanceof Y){var n=a.__data__;if(!G||n.length<199)return n.push([e,t]),this.size=++a.size,this;a=this.__data__=new Q(n)}return a.set(e,t),this.size=a.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=P.call(e,F),a=e[F];try{e[F]=void 0;var n=!0}catch(e){}var r=B.call(e);return n&&(t?e[F]=a:delete e[F]),r}(e):function(e){return B.call(e)}(e)}function re(e){return we(e)&&ne(e)==i}function ie(e,t,a,n,r){e!==t&&function(e,t,a){for(var n=-1,r=Object(e),i=a(e),o=i.length;o--;){var c=i[++n];if(!1===t(r[c],c,r))break}}(t,(function(i,o){if(r||(r=new _),ve(i))!function(e,t,a,n,r,i,o){var s=fe(e,a),d=fe(t,a),u=o.get(d);if(u)$(e,a,u);else{var f,l,b,h,p,m=i?i(s,d,a+"",e,t,o):void 0,y=void 0===m;if(y){var g=pe(d),x=!g&&ye(d),v=!g&&!x&&Ie(d);m=d,g||x||v?pe(s)?m=s:we(p=s)&&me(p)?m=function(e,t){var a=-1,n=e.length;for(t||(t=Array(n));++a-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(oe);function be(e,t){return e===t||e!=e&&t!=t}var he=re(function(){return arguments}())?re:function(e){return we(e)&&P.call(e,"callee")&&!H.call(e,"callee")},pe=Array.isArray;function me(e){return null!=e&&xe(e.length)&&!ge(e)}var ye=q||function(){return!1};function ge(e){if(!ve(e))return!1;var t=ne(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function we(e){return null!=e&&"object"==typeof e}var Ie=x?function(e){return function(t){return e(t)}}(x):function(e){return we(e)&&xe(e.length)&&!!u[ne(e)]};function Ae(e){return me(e)?function(e,t){var a=pe(e),n=!a&&he(e),r=!a&&!n&&ye(e),i=!a&&!n&&!r&&Ie(e),o=a||n||r||i,c=o?function(e,t){for(var a=-1,n=Array(e);++a1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(r=Se.length>3&&"function"==typeof r?(n--,r):void 0,i&&function(e,t,a){if(!ve(a))return!1;var n=typeof t;return!!("number"==n?me(a)&&de(t,a.length):"string"==n&&t in a)&&be(a[t],e)}(t[0],t[1],i)&&(r=n<3?void 0:r,n=1),e=Object(e);++a=0&&a<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+a;if(i=a,!1!==r&&function(e){var a=(n[e]||"silent").toUpperCase();if(typeof window!==t&&s){try{return void(window.localStorage[s]=a)}catch(e){}try{window.document.cookie=encodeURIComponent(s)+"="+a+";"}catch(e){}}}(a),c.call(o,a,e),typeof console===t&&a{"use strict";var n=a(91285),r=a(84485),i=a(77834).Buffer,o=new Array(16);function c(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<>>32-t}function d(e,t,a,n,r,i,o){return s(e+(t&a|~t&n)+r+i|0,o)+t|0}function u(e,t,a,n,r,i,o){return s(e+(t&n|a&~n)+r+i|0,o)+t|0}function f(e,t,a,n,r,i,o){return s(e+(t^a^n)+r+i|0,o)+t|0}function l(e,t,a,n,r,i,o){return s(e+(a^(t|~n))+r+i|0,o)+t|0}n(c,r),c.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var a=this._a,n=this._b,r=this._c,i=this._d;a=d(a,n,r,i,e[0],3614090360,7),i=d(i,a,n,r,e[1],3905402710,12),r=d(r,i,a,n,e[2],606105819,17),n=d(n,r,i,a,e[3],3250441966,22),a=d(a,n,r,i,e[4],4118548399,7),i=d(i,a,n,r,e[5],1200080426,12),r=d(r,i,a,n,e[6],2821735955,17),n=d(n,r,i,a,e[7],4249261313,22),a=d(a,n,r,i,e[8],1770035416,7),i=d(i,a,n,r,e[9],2336552879,12),r=d(r,i,a,n,e[10],4294925233,17),n=d(n,r,i,a,e[11],2304563134,22),a=d(a,n,r,i,e[12],1804603682,7),i=d(i,a,n,r,e[13],4254626195,12),r=d(r,i,a,n,e[14],2792965006,17),a=u(a,n=d(n,r,i,a,e[15],1236535329,22),r,i,e[1],4129170786,5),i=u(i,a,n,r,e[6],3225465664,9),r=u(r,i,a,n,e[11],643717713,14),n=u(n,r,i,a,e[0],3921069994,20),a=u(a,n,r,i,e[5],3593408605,5),i=u(i,a,n,r,e[10],38016083,9),r=u(r,i,a,n,e[15],3634488961,14),n=u(n,r,i,a,e[4],3889429448,20),a=u(a,n,r,i,e[9],568446438,5),i=u(i,a,n,r,e[14],3275163606,9),r=u(r,i,a,n,e[3],4107603335,14),n=u(n,r,i,a,e[8],1163531501,20),a=u(a,n,r,i,e[13],2850285829,5),i=u(i,a,n,r,e[2],4243563512,9),r=u(r,i,a,n,e[7],1735328473,14),a=f(a,n=u(n,r,i,a,e[12],2368359562,20),r,i,e[5],4294588738,4),i=f(i,a,n,r,e[8],2272392833,11),r=f(r,i,a,n,e[11],1839030562,16),n=f(n,r,i,a,e[14],4259657740,23),a=f(a,n,r,i,e[1],2763975236,4),i=f(i,a,n,r,e[4],1272893353,11),r=f(r,i,a,n,e[7],4139469664,16),n=f(n,r,i,a,e[10],3200236656,23),a=f(a,n,r,i,e[13],681279174,4),i=f(i,a,n,r,e[0],3936430074,11),r=f(r,i,a,n,e[3],3572445317,16),n=f(n,r,i,a,e[6],76029189,23),a=f(a,n,r,i,e[9],3654602809,4),i=f(i,a,n,r,e[12],3873151461,11),r=f(r,i,a,n,e[15],530742520,16),a=l(a,n=f(n,r,i,a,e[2],3299628645,23),r,i,e[0],4096336452,6),i=l(i,a,n,r,e[7],1126891415,10),r=l(r,i,a,n,e[14],2878612391,15),n=l(n,r,i,a,e[5],4237533241,21),a=l(a,n,r,i,e[12],1700485571,6),i=l(i,a,n,r,e[3],2399980690,10),r=l(r,i,a,n,e[10],4293915773,15),n=l(n,r,i,a,e[1],2240044497,21),a=l(a,n,r,i,e[8],1873313359,6),i=l(i,a,n,r,e[15],4264355552,10),r=l(r,i,a,n,e[6],2734768916,15),n=l(n,r,i,a,e[13],1309151649,21),a=l(a,n,r,i,e[4],4149444226,6),i=l(i,a,n,r,e[11],3174756917,10),r=l(r,i,a,n,e[2],718787259,15),n=l(n,r,i,a,e[9],3951481745,21),this._a=this._a+a|0,this._b=this._b+n|0,this._c=this._c+r|0,this._d=this._d+i|0},c.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 e=i.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=c},46676:(e,t,a)=>{var n=a(1466),r=a(82745);function i(e){this.rand=e||new r.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),a=Math.ceil(t/8);do{var r=new n(this.rand.generate(a))}while(r.cmp(e)>=0);return r},i.prototype._randrange=function(e,t){var a=t.sub(e);return e.add(this._randbelow(a))},i.prototype.test=function(e,t,a){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var c=e.subn(1),s=0;!c.testn(s);s++);for(var d=e.shrn(s),u=c.toRed(i);t>0;t--){var f=this._randrange(new n(2),c);a&&a(f);var l=f.toRed(i).redPow(d);if(0!==l.cmp(o)&&0!==l.cmp(u)){for(var b=1;b0;t--){var u=this._randrange(new n(2),o),f=e.gcd(u);if(0!==f.cmpn(1))return f;var l=u.toRed(r).redPow(s);if(0!==l.cmp(i)&&0!==l.cmp(d)){for(var b=1;b=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},79561:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}},43022:(e,t)=>{"use strict";var a=t;function n(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",a=0;a>8,o=255&r;i?a.push(i,o):a.push(o)}return a},a.zero2=n,a.toHex=r,a.encode=function(e,t){return"hex"===t?r(e):e}},2436:function(e,t,a){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function i(e,t,a){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o=a(48834).Buffer}catch(e){}function c(e,t,a){for(var n=0,r=Math.min(e.length,a),i=t;i=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&r++,16===t?this._parseHex(e,r):this._parseBase(e,t,r),"-"===e[0]&&(this.negative=1),this.strip(),"le"===a&&this._initArray(this.toArray(),t,a)},i.prototype._initNumber=function(e,t,a){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===a&&this._initArray(this.toArray(),t,a)},i.prototype._initArray=function(e,t,a){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a=t;a-=6)r=c(e,a,a+6),this.words[n]|=r<>>26-i&4194303,(i+=24)>=26&&(i-=26,n++);a+6!==t&&(r=c(e,t,a+6),this.words[n]|=r<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,d=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var d=["","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"],u=[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 l(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?d[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var l=u[e],b=f[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:d[l-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function h(e,t,a){return(new p).mulp(e,t,a)}function p(e,t){this.x=e,this.y=t}Math.imul||(b=l),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?b(this,e,t):n<63?l(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):h(this,e,t),a},p.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},p.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new I(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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 e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):a.strip(),a},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(g,y),g.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new x;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},I.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},I.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new A(e)},r(A,I),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},13367:(e,t,a)=>{var n=a(2436),r=a(79826);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new n(1),a=String(e).toLowerCase().trim(),i="0x"===a.substr(0,2)||"-0x"===a.substr(0,3),o=r(a);if("-"===o.substr(0,1)&&(o=r(o.slice(1)),t=new n(-1,10)),!(o=""===o?"0":o).match(/^-?[0-9]+$/)&&o.match(/^[0-9A-Fa-f]+$/)||o.match(/^[a-fA-F]+$/)||!0===i&&o.match(/^[0-9A-Fa-f]+$/))return new n(o,16).mul(t);if((o.match(/^-?[0-9]+$/)||""===o)&&!1===i)return new n(o,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new n(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},18169:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,a){return 0===e&&0===a?1/e==1/a:e===a||!(!t(e)||!t(a))}},34679:(e,t,a)=>{"use strict";var n=a(14926),r=a(89429),i=a(18169),o=a(68070),c=a(20191),s=r(o(),Object);n(s,{getPolyfill:o,implementation:i,shim:c}),e.exports=s},68070:(e,t,a)=>{"use strict";var n=a(18169);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},20191:(e,t,a)=>{"use strict";var n=a(68070),r=a(14926);e.exports=function(){var e=n();return r(Object,{is:e},{is:function(){return Object.is!==e}}),e}},75691:(e,t,a)=>{"use strict";var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=a(30801),c=Object.prototype.propertyIsEnumerable,s=!c.call({toString:null},"toString"),d=c.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},l={$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},b=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&r.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,a="[object Function]"===i.call(e),n=o(e),c=t&&"[object String]"===i.call(e),l=[];if(!t&&!a&&!n)throw new TypeError("Object.keys called on a non-object");var h=d&&a;if(c&&e.length>0&&!r.call(e,0))for(var p=0;p0)for(var m=0;m{"use strict";var n=Array.prototype.slice,r=a(30801),i=Object.keys,o=i?function(e){return i(e)}:a(75691),c=Object.keys;o.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return r(e)?c(n.call(e)):c(e)})}else Object.keys=o;return Object.keys||o},e.exports=o},30801:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var a=t.call(e),n="[object Arguments]"===a;return n||(n="[object Array]"!==a&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},58045:(e,t,a)=>{"use strict";var n=a(22812);t.certificate=a(27832);var r=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=r;var i=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=i;var o=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var c=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),s=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(c),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=s;var d=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=d;var u=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=u,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=f;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},27832:(e,t,a)=>{"use strict";var n=a(22812),r=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),i=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),c=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),s=n.define("RelativeDistinguishedName",(function(){this.setof(i)})),d=n.define("RDNSequence",(function(){this.seqof(s)})),u=n.define("Name",(function(){this.choice({rdnSequence:this.use(d)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),b=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(u),this.key("validity").use(f),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(c),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),h=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(b),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=h},82968:(e,t,a)=>{var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=a(59341),c=a(10010),s=a(77834).Buffer;e.exports=function(e,t){var a,d=e.toString(),u=d.match(n);if(u){var f="aes"+u[1],l=s.from(u[2],"hex"),b=s.from(u[3].replace(/[\r\n]/g,""),"base64"),h=o(t,l.slice(0,8),parseInt(u[1],10)).key,p=[],m=c.createDecipheriv(f,h,l);p.push(m.update(b)),p.push(m.final()),a=s.concat(p)}else{var y=d.match(i);a=s.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:d.match(r)[1],data:a}}},28016:(e,t,a)=>{var n=a(58045),r=a(68675),i=a(82968),o=a(10010),c=a(30499),s=a(77834).Buffer;function d(e){var t;"object"!=typeof e||s.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=s.from(e));var a,d,u=i(e,t),f=u.tag,l=u.data;switch(f){case"CERTIFICATE":d=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(d||(d=n.PublicKey.decode(l,"der")),a=d.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(d.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return d.subjectPrivateKey=d.subjectPublicKey,{type:"ec",data:d};case"1.2.840.10040.4.1":return d.algorithm.params.pub_key=n.DSAparam.decode(d.subjectPublicKey.data,"der"),{type:"dsa",data:d.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":l=function(e,t){var a=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=r[e.algorithm.decrypt.cipher.algo.join(".")],d=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,f=parseInt(i.split("-")[1],10)/8,l=c.pbkdf2Sync(t,a,n,f,"sha1"),b=o.createDecipheriv(i,l,d),h=[];return h.push(b.update(u)),h.push(b.final()),s.concat(h)}(l=n.EncryptedPrivateKey.decode(l,"der"),t);case"PRIVATE KEY":switch(a=(d=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(d.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:d.algorithm.curve,privateKey:n.ECPrivateKey.decode(d.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return d.algorithm.params.priv_key=n.DSAparam.decode(d.subjectPrivateKey,"der"),{type:"dsa",params:d.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+f)}}e.exports=d,d.signature=n.signature},30499:(e,t,a)=>{t.pbkdf2=a(14874),t.pbkdf2Sync=a(88840)},14874:(e,t,a)=>{var n,r,i=a(77834).Buffer,o=a(87351),c=a(25214),s=a(88840),d=a(97232),u=a.g.crypto&&a.g.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function b(){return r||(r=a.g.process&&a.g.process.nextTick?a.g.process.nextTick:a.g.queueMicrotask?a.g.queueMicrotask:a.g.setImmediate?a.g.setImmediate:a.g.setTimeout)}function h(e,t,a,n,r){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:a,hash:{name:r}},e,n<<3)})).then((function(e){return i.from(e)}))}e.exports=function(e,t,r,p,m,y){"function"==typeof m&&(y=m,m=void 0);var g=f[(m=m||"sha1").toLowerCase()];if(g&&"function"==typeof a.g.Promise){if(o(r,p),e=d(e,c,"Password"),t=d(t,c,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){b()((function(){t(null,e)}))}),(function(e){b()((function(){t(e)}))}))}(function(e){if(a.g.process&&!a.g.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var t=h(n=n||i.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return l[e]=t,t}(g).then((function(a){return a?h(e,t,r,p,g):s(e,t,r,p,m)})),y)}else b()((function(){var a;try{a=s(e,t,r,p,m)}catch(e){return y(e)}y(null,a)}))}},25214:(e,t,a)=>{var n,r=a(34406);n=a.g.process&&a.g.process.browser?"utf-8":a.g.process&&a.g.process.version?parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},87351:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,a){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof a)throw new TypeError("Key length not a number");if(a<0||a>t||a!=a)throw new TypeError("Bad key length")}},88840:(e,t,a)=>{var n=a(22511),r=a(51445),i=a(9065),o=a(77834).Buffer,c=a(87351),s=a(25214),d=a(97232),u=o.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,a){var c=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new r).update(e).digest()}:"md5"===e?n:function(t){return i(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=c(t):t.length{var n=a(77834).Buffer;e.exports=function(e,t,a){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(a+" must be a string, a Buffer, a typed array or a DataView")}},34406:e=>{var t,a,n=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(a){try{return t.call(null,e,0)}catch(a){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{a="function"==typeof clearTimeout?clearTimeout:i}catch(e){a=i}}();var c,s=[],d=!1,u=-1;function f(){d&&c&&(d=!1,c.length?s=c.concat(s):u=-1,s.length&&l())}function l(){if(!d){var e=o(f);d=!0;for(var t=s.length;t;){for(c=s,s=[];++u1)for(var a=1;a{"use strict";e.exports=a(56158)},35695:e=>{"use strict";e.exports=n;var t,a=/\/|\./;function n(e,t){a.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},63746:(e,t,a)=>{"use strict";var n=t,r=a(36901),i=a(88066);function o(e,t,a,n){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(d%s){",n);for(var o=t.resolvedType.values,c=Object.keys(o),s=0;s>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":d=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,d)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,d?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function c(e,t,a,n){if(t.resolvedType)t.resolvedType instanceof r?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,a,n,n,a,n,n):e("d%s=types[%i].toObject(m%s,o)",n,a,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,a=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return a("return new this.ctor");a("var m=new this.ctor");for(var n=0;n{"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos>>3){");for(var a=0;a>>3){")("case 1: k=r.%s(); break",c.keyType)("case 2:"),void 0===r.basic[s]?t("value=types[%i].decode(r,r.uint32())",a):t("value=r.%s()",s),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==r.long[c.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',d):t("%s[k]=value",d)):c.repeated?(t("if(!(%s&&%s.length))",d,d)("%s=[]",d),void 0!==r.packed[s]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos{"use strict";e.exports=function(e){for(var t,a=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),c=e.fieldsArray.slice().sort(i.compareFieldsById),s=0;s>>0,8|r.mapKey[d.keyType],d.keyType),void 0===l?a("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):a(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|l,f,t),a("}")("}")):d.repeated?(a("if(%s!=null&&%s.length){",t,t),d.packed&&void 0!==r.packed[f]?a("w.uint32(%i).fork()",(d.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",f,t)("w.ldelim()"):(a("for(var i=0;i<%s.length;++i)",t),void 0===l?o(a,d,u,t+"[i]"):a("w.uint32(%i).%s(%s[i])",(d.id<<3|l)>>>0,f,t)),a("}")):(d.optional&&a("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,d.name),void 0===l?o(a,d,u,t):a("w.uint32(%i).%s(%s)",(d.id<<3|l)>>>0,f,t))}return a("return w")};var n=a(36901),r=a(23970),i=a(88066);function o(e,t,a,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",a,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",a,n,(t.id<<3|2)>>>0)}},36901:(e,t,a)=>{"use strict";e.exports=o;var n=a(57641);((o.prototype=Object.create(n.prototype)).constructor=o).className="Enum";var r=a(69788),i=a(88066);function o(e,t,a,r,i,o){if(n.call(this,e,a),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=i||{},this.valuesOptions=o,this.reserved=void 0,t)for(var c=Object.keys(t),s=0;s{"use strict";e.exports=d;var n=a(57641);((d.prototype=Object.create(n.prototype)).constructor=d).className="Field";var r,i=a(36901),o=a(23970),c=a(88066),s=/^required|optional|repeated$/;function d(e,t,a,r,i,d,u){if(c.isObject(r)?(u=i,d=r,r=i=void 0):c.isObject(i)&&(u=d,d=i,i=void 0),n.call(this,e,d),!c.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!c.isString(a))throw TypeError("type must be a string");if(void 0!==r&&!s.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!c.isString(i))throw TypeError("extend must be a string");"proto3_optional"===r&&(r="optional"),this.rule=r&&"optional"!==r?r:void 0,this.type=a,this.id=t,this.extend=i||void 0,this.required="required"===r,this.optional=!this.required,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!c.Long&&void 0!==o.long[a],this.bytes="bytes"===a,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}d.fromJSON=function(e,t){return new d(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(d.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),d.prototype.setOption=function(e,t,a){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,a)},d.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return c.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},d.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof r?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=c.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;c.base64.test(this.typeDefault)?c.base64.decode(this.typeDefault,e=c.newBuffer(c.base64.length(this.typeDefault)),0):c.utf8.write(this.typeDefault,e=c.newBuffer(c.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=c.emptyObject:this.repeated?this.defaultValue=c.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof r&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},d.d=function(e,t,a,n){return"function"==typeof t?t=c.decorateType(t).name:t&&"object"==typeof t&&(t=c.decorateEnum(t).name),function(r,i){c.decorateType(r.constructor).add(new d(i,e,t,a,{default:n}))}},d._configure=function(e){r=e}},9188:(e,t,a)=>{"use strict";var n=e.exports=a(50536);n.build="light",n.load=function(e,t,a){return"function"==typeof t?(a=t,t=new n.Root):t||(t=new n.Root),t.load(e,a)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=a(75191),n.decoder=a(89847),n.verifier=a(22332),n.converter=a(63746),n.ReflectionObject=a(57641),n.Namespace=a(69788),n.Root=a(80742),n.Enum=a(36901),n.Type=a(93138),n.Field=a(20797),n.OneOf=a(86898),n.MapField=a(91981),n.Service=a(49355),n.Method=a(78820),n.Message=a(83611),n.wrappers=a(16423),n.types=a(23970),n.util=a(88066),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},50536:(e,t,a)=>{"use strict";var n=t;function r(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=a(60123),n.BufferWriter=a(76673),n.Reader=a(39799),n.BufferReader=a(87038),n.util=a(34165),n.rpc=a(34963),n.roots=a(29009),n.configure=r,r()},56158:(e,t,a)=>{"use strict";var n=e.exports=a(9188);n.build="full",n.tokenize=a(79882),n.parse=a(82221),n.common=a(35695),n.Root._configure(n.Type,n.parse,n.common)},91981:(e,t,a)=>{"use strict";e.exports=o;var n=a(20797);((o.prototype=Object.create(n.prototype)).constructor=o).className="MapField";var r=a(23970),i=a(88066);function o(e,t,a,r,o,c){if(n.call(this,e,t,r,void 0,void 0,o,c),!i.isString(a))throw TypeError("keyType must be a string");this.keyType=a,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(e,t){return new o(e,t.id,t.keyType,t.type,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===r.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},o.d=function(e,t,a){return"function"==typeof a?a=i.decorateType(a).name:a&&"object"==typeof a&&(a=i.decorateEnum(a).name),function(n,r){i.decorateType(n.constructor).add(new o(r,e,t,a))}}},83611:(e,t,a)=>{"use strict";e.exports=r;var n=a(34165);function r(e){if(e)for(var t=Object.keys(e),a=0;a{"use strict";e.exports=i;var n=a(57641);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var r=a(88066);function i(e,t,a,i,o,c,s,d,u){if(r.isObject(o)?(s=o,o=c=void 0):r.isObject(c)&&(s=c,c=void 0),void 0!==t&&!r.isString(t))throw TypeError("type must be a string");if(!r.isString(a))throw TypeError("requestType must be a string");if(!r.isString(i))throw TypeError("responseType must be a string");n.call(this,e,s),this.type=t||"rpc",this.requestType=a,this.requestStream=!!o||void 0,this.responseType=i,this.responseStream=!!c||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=d,this.parsedOptions=u}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},69788:(e,t,a)=>{"use strict";e.exports=f;var n=a(57641);((f.prototype=Object.create(n.prototype)).constructor=f).className="Namespace";var r,i,o,c=a(20797),s=a(88066),d=a(86898);function u(e,t){if(e&&e.length){for(var a={},n=0;nt)return!0;return!1},f.isReservedName=function(e,t){if(e)for(var a=0;a0;){var n=e.shift();if(a.nested&&a.nested[n]){if(!((a=a.nested[n])instanceof f))throw Error("path conflicts with non-namespace objects")}else a.add(a=new f(n))}return t&&a.addJSON(t),a},f.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t-1)return n}else if(n instanceof f&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var r=0;r{"use strict";e.exports=i,i.className="ReflectionObject";var n,r=a(88066);function i(e,t){if(!r.isString(e))throw TypeError("name must be a string");if(t&&!r.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,a){return a&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,a){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(a){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var o=i[e];r.setProperty(o,a,t)}else(i={})[e]=r.setProperty({},a,t),n.push(i)}else{var c={};c[e]=t,n.push(c)}return this},i.prototype.setOptions=function(e,t){if(e)for(var a=Object.keys(e),n=0;n{"use strict";e.exports=o;var n=a(57641);((o.prototype=Object.create(n.prototype)).constructor=o).className="OneOf";var r=a(20797),i=a(88066);function o(e,t,a,r){if(Array.isArray(t)||(a=t,t=void 0),n.call(this,e,a),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=r}function c(e){if(e.parent)for(var t=0;t-1&&this.oneof.splice(t,1),e.partOf=null,this},o.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t{"use strict";e.exports=S,S.filename=null,S.defaults={keepCase:!1};var n=a(79882),r=a(80742),i=a(93138),o=a(20797),c=a(91981),s=a(86898),d=a(36901),u=a(49355),f=a(78820),l=a(23970),b=a(88066),h=/^[1-9][0-9]*$/,p=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,y=/^-?0[x][0-9a-fA-F]+$/,g=/^0[0-7]+$/,x=/^-?0[0-7]+$/,v=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,w=/^[a-zA-Z_][a-zA-Z_0-9]*$/,I=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,A=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function S(e,t,a){t instanceof r||(a=t,t=new r),a||(a=S.defaults);var k,C,E,T,P,O=a.preferTrailingComment||!1,B=n(e,a.alternateCommentMode||!1),M=B.next,R=B.push,N=B.peek,D=B.skip,V=B.cmnt,L=!0,U=!1,H=t,K=a.keepCase?function(e){return e}:b.camelCase;function F(e,t,a){var n=S.filename;return a||(S.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+B.line+")")}function j(){var e,t=[];do{if('"'!==(e=M())&&"'"!==e)throw F(e);t.push(M()),D(e),e=N()}while('"'===e||"'"===e);return t.join("")}function q(e){var t=M();switch(t){case"'":case'"':return R(t),j();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var a=1;switch("-"===e.charAt(0)&&(a=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return a*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(h.test(e))return a*parseInt(e,10);if(m.test(e))return a*parseInt(e,16);if(g.test(e))return a*parseInt(e,8);if(v.test(e))return a*parseFloat(e);throw F(e,"number",!0)}(t)}catch(a){if(e&&I.test(t))return t;throw F(t,"value")}}function z(e,t){var a,n;do{!t||'"'!==(a=N())&&"'"!==a?e.push([n=W(M()),D("to",!0)?W(M()):n]):e.push(j())}while(D(",",!0));D(";")}function W(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw F(e,"id");if(p.test(e))return parseInt(e,10);if(y.test(e))return parseInt(e,16);if(x.test(e))return parseInt(e,8);throw F(e,"id")}function G(){if(void 0!==k)throw F("package");if(k=M(),!I.test(k))throw F(k,"name");H=H.define(k),D(";")}function X(){var e,t=N();switch(t){case"weak":e=E||(E=[]),M();break;case"public":M();default:e=C||(C=[])}t=j(),D(";"),e.push(t)}function Z(){if(D("="),T=j(),!(U="proto3"===T)&&"proto2"!==T)throw F(T,"syntax");D(";")}function J(e,t){switch(t){case"option":return ee(e,t),D(";"),!0;case"message":return Q(e,t),!0;case"enum":return $(e,t),!0;case"service":return function(e,t){if(!w.test(t=M()))throw F(t,"service name");var a=new u(t);Y(a,(function(e){if(!J(a,e)){if("rpc"!==e)throw F(e);!function(e,t){var a=V(),n=t;if(!w.test(t=M()))throw F(t,"name");var r,i,o,c,s=t;if(D("("),D("stream",!0)&&(i=!0),!I.test(t=M()))throw F(t);if(r=t,D(")"),D("returns"),D("("),D("stream",!0)&&(c=!0),!I.test(t=M()))throw F(t);o=t,D(")");var d=new f(s,n,r,o,i,c);d.comment=a,Y(d,(function(e){if("option"!==e)throw F(e);ee(d,e),D(";")})),e.add(d)}(a,e)}})),e.add(a)}(e,t),!0;case"extend":return function(e,t){if(!I.test(t=M()))throw F(t,"reference");var a=t;Y(null,(function(t){switch(t){case"required":case"repeated":_(e,t,a);break;case"optional":_(e,U?"proto3_optional":"optional",a);break;default:if(!U||!I.test(t))throw F(t);R(t),_(e,"optional",a)}}))}(e,t),!0}return!1}function Y(e,t,a){var n=B.line;if(e&&("string"!=typeof e.comment&&(e.comment=V()),e.filename=S.filename),D("{",!0)){for(var r;"}"!==(r=M());)t(r);D(";",!0)}else a&&a(),D(";"),e&&("string"!=typeof e.comment||O)&&(e.comment=V(n)||e.comment)}function Q(e,t){if(!w.test(t=M()))throw F(t,"type name");var a=new i(t);Y(a,(function(e){if(!J(a,e))switch(e){case"map":!function(e){D("<");var t=M();if(void 0===l.mapKey[t])throw F(t,"type");D(",");var a=M();if(!I.test(a))throw F(a,"type");D(">");var n=M();if(!w.test(n))throw F(n,"name");D("=");var r=new c(K(n),W(M()),t,a);Y(r,(function(e){if("option"!==e)throw F(e);ee(r,e),D(";")}),(function(){ne(r)})),e.add(r)}(a);break;case"required":case"repeated":_(a,e);break;case"optional":_(a,U?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!w.test(t=M()))throw F(t,"name");var a=new s(K(t));Y(a,(function(e){"option"===e?(ee(a,e),D(";")):(R(e),_(a,"optional"))})),e.add(a)}(a,e);break;case"extensions":z(a.extensions||(a.extensions=[]));break;case"reserved":z(a.reserved||(a.reserved=[]),!0);break;default:if(!U||!I.test(e))throw F(e);R(e),_(a,"optional")}})),e.add(a)}function _(e,t,a){var n=M();if("group"!==n){for(;n.endsWith(".")||N().startsWith(".");)n+=M();if(!I.test(n))throw F(n,"type");var r=M();if(!w.test(r))throw F(r,"name");r=K(r),D("=");var c=new o(r,W(M()),n,t,a);if(Y(c,(function(e){if("option"!==e)throw F(e);ee(c,e),D(";")}),(function(){ne(c)})),"proto3_optional"===t){var d=new s("_"+r);c.setOption("proto3_optional",!0),d.add(c),e.add(d)}else e.add(c);U||!c.repeated||void 0===l.packed[n]&&void 0!==l.basic[n]||c.setOption("packed",!1,!0)}else!function(e,t){var a=M();if(!w.test(a))throw F(a,"name");var n=b.lcFirst(a);a===n&&(a=b.ucFirst(a)),D("=");var r=W(M()),c=new i(a);c.group=!0;var s=new o(n,r,a,t);s.filename=S.filename,Y(c,(function(e){switch(e){case"option":ee(c,e),D(";");break;case"required":case"repeated":_(c,e);break;case"optional":_(c,U?"proto3_optional":"optional");break;case"message":Q(c,e);break;case"enum":$(c,e);break;default:throw F(e)}})),e.add(c).add(s)}(e,t)}function $(e,t){if(!w.test(t=M()))throw F(t,"name");var a=new d(t);Y(a,(function(e){switch(e){case"option":ee(a,e),D(";");break;case"reserved":z(a.reserved||(a.reserved=[]),!0);break;default:!function(e,t){if(!w.test(t))throw F(t,"name");D("=");var a=W(M(),!0),n={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};Y(n,(function(e){if("option"!==e)throw F(e);ee(n,e),D(";")}),(function(){ne(n)})),e.add(t,a,n.comment,n.options)}(a,e)}})),e.add(a)}function ee(e,t){var a=D("(",!0);if(!I.test(t=M()))throw F(t,"name");var n,r=t,i=r;a&&(D(")"),i=r="("+r+")",t=N(),A.test(t)&&(n=t.slice(1),r+=t,M())),D("="),function(e,t,a,n){e.setParsedOption&&e.setParsedOption(t,a,n)}(e,i,te(e,r),n)}function te(e,t){if(D("{",!0)){for(var a={};!D("}",!0);){if(!w.test(P=M()))throw F(P,"name");var n,r=P;if(D(":",!0),"{"===N())n=te(e,t+"."+P);else if("["===N()){var i;if(n=[],D("[",!0)){do{i=q(!0),n.push(i)}while(D(",",!0));D("]"),void 0!==i&&ae(e,t+"."+P,i)}}else n=q(!0),ae(e,t+"."+P,n);var o=a[r];o&&(n=[].concat(o).concat(n)),a[r]=n,D(",",!0),D(";",!0)}return a}var c=q(!0);return ae(e,t,c),c}function ae(e,t,a){e.setOption&&e.setOption(t,a)}function ne(e){if(D("[",!0)){do{ee(e,"option")}while(D(",",!0));D("]")}return e}for(;null!==(P=M());)switch(P){case"package":if(!L)throw F(P);G();break;case"import":if(!L)throw F(P);X();break;case"syntax":if(!L)throw F(P);Z();break;case"option":ee(H,P),D(";");break;default:if(J(H,P)){L=!1;continue}throw F(P)}return S.filename=null,{package:k,imports:C,weakImports:E,syntax:T,root:t}}},39799:(e,t,a)=>{"use strict";e.exports=s;var n,r=a(34165),i=r.LongBits,o=r.utf8;function c(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function s(e){this.buf=e,this.pos=0,this.len=e.length}var d,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new s(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new s(e);throw Error("illegal buffer")},f=function(){return r.Buffer?function(e){return(s.create=function(e){return r.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function l(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw c(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw c(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function b(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw c(this,8);return new i(b(this.buf,this.pos+=4),b(this.buf,this.pos+=4))}s.create=f(),s.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,s.prototype.uint32=(d=4294967295,function(){if(d=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return d;if(d=(d|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return d;if((this.pos+=5)>this.len)throw this.pos=this.len,c(this,10);return d}),s.prototype.int32=function(){return 0|this.uint32()},s.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},s.prototype.bool=function(){return 0!==this.uint32()},s.prototype.fixed32=function(){if(this.pos+4>this.len)throw c(this,4);return b(this.buf,this.pos+=4)},s.prototype.sfixed32=function(){if(this.pos+4>this.len)throw c(this,4);return 0|b(this.buf,this.pos+=4)},s.prototype.float=function(){if(this.pos+4>this.len)throw c(this,4);var e=r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},s.prototype.double=function(){if(this.pos+8>this.len)throw c(this,4);var e=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},s.prototype.bytes=function(){var e=this.uint32(),t=this.pos,a=this.pos+e;if(a>this.len)throw c(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,a):t===a?new this.buf.constructor(0):this._slice.call(this.buf,t,a)},s.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},s.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw c(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw c(this)}while(128&this.buf[this.pos++]);return this},s.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},s._configure=function(e){n=e,s.create=f(),n._configure();var t=r.Long?"toLong":"toNumber";r.merge(s.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},87038:(e,t,a)=>{"use strict";e.exports=i;var n=a(39799);(i.prototype=Object.create(n.prototype)).constructor=i;var r=a(34165);function i(e){n.call(this,e)}i._configure=function(){r.Buffer&&(i.prototype._slice=r.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},80742:(e,t,a)=>{"use strict";e.exports=f;var n=a(69788);((f.prototype=Object.create(n.prototype)).constructor=f).className="Root";var r,i,o,c=a(20797),s=a(36901),d=a(86898),u=a(88066);function f(e){n.call(this,"",e),this.deferred=[],this.files=[]}function l(){}f.fromJSON=function(e,t){return t||(t=new f),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},f.prototype.resolvePath=u.path.resolve,f.prototype.fetch=u.fetch,f.prototype.load=function e(t,a,n){"function"==typeof a&&(n=a,a=void 0);var r=this;if(!n)return u.asPromise(e,r,t,a);var c=n===l;function s(e,t){if(n){var a=n;if(n=null,c)throw e;a(e,t)}}function d(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var a=e.substring(t);if(a in o)return a}return null}function f(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){i.filename=e;var n,o=i(t,r,a),f=0;if(o.imports)for(;f-1))if(r.files.push(e),e in o)c?f(e,o[e]):(++h,setTimeout((function(){--h,f(e,o[e])})));else if(c){var a;try{a=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}f(e,a)}else++h,r.fetch(e,(function(a,i){--h,n&&(a?t?h||s(null,r):s(a):f(e,i))}))}var h=0;u.isString(t)&&(t=[t]);for(var p,m=0;m-1&&this.deferred.splice(t,1)}}else if(e instanceof s)b.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var a=0;a{"use strict";e.exports={}},34963:(e,t,a)=>{"use strict";t.Service=a(5761)},5761:(e,t,a)=>{"use strict";e.exports=r;var n=a(34165);function r(e,t,a){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(a)}(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r,r.prototype.rpcCall=function e(t,a,r,i,o){if(!i)throw TypeError("request must be specified");var c=this;if(!o)return n.asPromise(e,c,t,a,r,i);if(c.rpcImpl)try{return c.rpcImpl(t,a[c.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,a){if(e)return c.emit("error",e,t),o(e);if(null!==a){if(!(a instanceof r))try{a=r[c.responseDelimited?"decodeDelimited":"decode"](a)}catch(e){return c.emit("error",e,t),o(e)}return c.emit("data",a,t),o(null,a)}c.end(!0)}))}catch(e){return c.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},49355:(e,t,a)=>{"use strict";e.exports=c;var n=a(69788);((c.prototype=Object.create(n.prototype)).constructor=c).className="Service";var r=a(78820),i=a(88066),o=a(34963);function c(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function s(e){return e._methodsArray=null,e}c.fromJSON=function(e,t){var a=new c(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i{"use strict";e.exports=f;var t=/[\s{}=;:[\],'"()<>]/g,a=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,r=/^ *[*/]+ */,i=/^\s*\*?\/*/,o=/\n/g,c=/\s/,s=/\\(.?)/g,d={0:"\0",r:"\r",n:"\n",t:"\t"};function u(e){return e.replace(s,(function(e,t){switch(t){case"\\":case"":return t;default:return d[t]||""}}))}function f(e,s){e=e.toString();var d=0,f=e.length,l=1,b=0,h={},p=[],m=null;function y(e){return Error("illegal "+e+" (line "+l+")")}function g(t){return e.charAt(t)}function x(t,a,n){var c,d={type:e.charAt(t++),lineEmpty:!1,leading:n},u=t-(s?2:3);do{if(--u<0||"\n"===(c=e.charAt(u))){d.lineEmpty=!0;break}}while(" "===c||"\t"===c);for(var f=e.substring(t,a).split(o),p=0;p0)return p.shift();if(m)return function(){var t="'"===m?n:a;t.lastIndex=d-1;var r=t.exec(e);if(!r)throw y("string");return d=t.lastIndex,A(m),m=null,u(r[1])}();var r,i,o,b,h,I=0===d;do{if(d===f)return null;for(r=!1;c.test(o=g(d));)if("\n"===o&&(I=!0,++l),++d===f)return null;if("/"===g(d)){if(++d===f)throw y("comment");if("/"===g(d))if(s){if(b=d,h=!1,v(d)){h=!0;do{if((d=w(d))===f)break;if(d++,!I)break}while(v(d))}else d=Math.min(f,w(d)+1);h&&(x(b,d,I),I=!0),l++,r=!0}else{for(h="/"===g(b=d+1);"\n"!==g(++d);)if(d===f)return null;++d,h&&(x(b,d-1,I),I=!0),++l,r=!0}else{if("*"!==(o=g(d)))return"/";b=d+1,h=s||"*"===g(b);do{if("\n"===o&&++l,++d===f)throw y("comment");i=o,o=g(d)}while("*"!==i||"/"!==o);++d,h&&(x(b,d-2,I),I=!0),r=!0}}}while(r);var S=d;if(t.lastIndex=0,!t.test(g(S++)))for(;S{"use strict";e.exports=g;var n=a(69788);((g.prototype=Object.create(n.prototype)).constructor=g).className="Type";var r=a(36901),i=a(86898),o=a(20797),c=a(91981),s=a(49355),d=a(83611),u=a(39799),f=a(60123),l=a(88066),b=a(75191),h=a(89847),p=a(22332),m=a(63746),y=a(16423);function g(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function x(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t{"use strict";var n=t,r=a(88066),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(e,t){var a=0,n={};for(t|=0;a{"use strict";var n,r,i=e.exports=a(34165),o=a(29009);i.codegen=a(1706),i.fetch=a(64641),i.path=a(82659),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),a=new Array(t.length),n=0;n0)t[r]=e(t[r]||{},a,n);else{var i=t[r];i&&(n=[].concat(i).concat(n)),t[r]=n}return t}(e,t=t.split("."),a)},Object.defineProperty(i,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(a(80742)))}})},61697:(e,t,a)=>{"use strict";e.exports=r;var n=a(34165);function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=r.zero=new r(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var a=e>>>0,n=(e-a)/4294967296>>>0;return t&&(n=~n>>>0,a=~a>>>0,++a>4294967295&&(a=0,++n>4294967295&&(n=0))),new r(a,n)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(n.isString(e)){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):i},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,a=~this.hi>>>0;return t||(a=a+1>>>0),-(t+4294967296*a)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var c=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?i:new r((c.call(e,0)|c.call(e,1)<<8|c.call(e,2)<<16|c.call(e,3)<<24)>>>0,(c.call(e,4)|c.call(e,5)<<8|c.call(e,6)<<16|c.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return 0===a?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:a<128?9:10}},34165:function(e,t,a){"use strict";var n=t;function r(e,t,a){for(var n=Object.keys(t),r=0;r0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var a=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(a.lo,a.hi,t):a.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},a=0;a-1;--a)if(1===t[e[a]]&&void 0!==this[e[a]]&&null!==this[e[a]])return e[a]}},n.oneOfSetter=function(e){return function(t){for(var a=0;a{"use strict";e.exports=function(e){var t=r.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),a={};e.oneofsArray.length&&t("var p={}");for(var n=0;n{"use strict";var n=t,r=a(83611);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),a=this.lookup(t);if(a){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:a.encode(a.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var a="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),a=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof r){var o=e.$type.toObject(e,t);return""===a&&(a="type.googleapis.com/"),n=a+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),o["@type"]=n,o}return this.toObject(e,t)}}},60123:(e,t,a)=>{"use strict";e.exports=f;var n,r=a(34165),i=r.LongBits,o=r.base64,c=r.utf8;function s(e,t,a){this.fn=e,this.len=t,this.next=void 0,this.val=a}function d(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new s(d,0,0),this.tail=this.head,this.states=null}var l=function(){return r.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function b(e,t,a){t[a]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function p(e,t,a){for(;e.hi;)t[a++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[a++]=127&e.lo|128,e.lo=e.lo>>>7;t[a++]=e.lo}function m(e,t,a){t[a]=255&e,t[a+1]=e>>>8&255,t[a+2]=e>>>16&255,t[a+3]=e>>>24}f.create=l(),f.alloc=function(e){return new r.Array(e)},r.Array!==Array&&(f.alloc=r.pool(f.alloc,r.Array.prototype.subarray)),f.prototype._push=function(e,t,a){return this.tail=this.tail.next=new s(e,t,a),this.len+=t,this},h.prototype=Object.create(s.prototype),h.prototype.fn=function(e,t,a){for(;e>127;)t[a++]=127&e|128,e>>>=7;t[a]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(p,10,i.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=i.from(e);return this._push(p,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(p,t.length(),t)},f.prototype.bool=function(e){return this._push(b,1,e?1:0)},f.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(r.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(r.float.writeDoubleLE,8,e)};var y=r.Array.prototype.set?function(e,t,a){t.set(e,a)}:function(e,t,a){for(var n=0;n>>0;if(!t)return this._push(b,1,0);if(r.isString(e)){var a=f.alloc(t=o.length(e));o.decode(e,a,0),e=a}return this.uint32(t)._push(y,t,e)},f.prototype.string=function(e){var t=c.length(e);return t?this.uint32(t)._push(c.write,t,e):this._push(b,1,0)},f.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new s(d,0,0),this.len=0,this},f.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(d,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=t,this.len+=a),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,t,a),a+=e.len,e=e.next;return t},f._configure=function(e){n=e,f.create=l(),n._configure()}},76673:(e,t,a)=>{"use strict";e.exports=i;var n=a(60123);(i.prototype=Object.create(n.prototype)).constructor=i;var r=a(34165);function i(){n.call(this)}function o(e,t,a){e.length<40?r.utf8.write(e,t,a):t.utf8Write?t.utf8Write(e,a):t.write(e,a)}i._configure=function(){i.alloc=r._Buffer_allocUnsafe,i.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&"set"===r.Buffer.prototype.set.name?function(e,t,a){t.set(e,a)}:function(e,t,a){if(e.copy)e.copy(t,a,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=r.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},i._configure()},8493:(e,t,a)=>{t.publicEncrypt=a(61896),t.privateDecrypt=a(76932),t.privateEncrypt=function(e,a){return t.publicEncrypt(e,a,!0)},t.publicDecrypt=function(e,a){return t.privateDecrypt(e,a,!0)}},78525:(e,t,a)=>{var n=a(16162),r=a(77834).Buffer;function i(e){var t=r.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var a,o=r.alloc(0),c=0;o.length=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function s(e,t,a){var n=c(e,a);return a-1>=t&&(n|=c(e,a-1)<<4),n}function d(e,t,a,n){for(var r=0,i=Math.min(e.length,a),o=t;o=49?c-49+10:c>=17?c-17+10:c}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,a){if("number"==typeof e)return this._initNumber(e,t,a);if("object"==typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===a)for(r=0,i=0;r>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-a,o=i%n,c=Math.min(i,i-o)+a,s=0,u=a;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],l=[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 b(e,t,a){a.negative=t.negative^e.negative;var n=e.length+t.length|0;a.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,c=67108863&o,s=o/67108864|0;a.words[0]=c;for(var d=1;d>>26,f=67108863&s,l=Math.min(d,t.length-1),b=Math.max(0,d-e.length+1);b<=l;b++){var h=d-b|0;u+=(o=(r=0|e.words[h])*(i=0|t.words[b])+f)/67108864|0,f=67108863&o}a.words[d]=0|f,s=0|u}return 0!==s?a.words[d]=0|s:a.length--,a.strip()}i.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?u[6-s.length]+s+a:s+a,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(a=i.toString(16)+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],b=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(b).toString(e);a=(h=h.idivn(b)).isZero()?p+a:u[d-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!=0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,a){var r=this.byteLength(),i=a||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,d=new e(i),u=this.clone();if(s){for(c=0;!u.isZero();c++)o=u.andln(255),u.iushrn(8),d[c]=o;for(;c=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0==(8191&t)&&(a+=13,t>>>=13),0==(127&t)&&(a+=7,t>>>=7),0==(15&t)&&(a+=4,t>>>=4),0==(3&t)&&(a+=2,t>>>=2),0==(1&t)&&a++,a},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-a),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var a=e/26|0,r=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,n=e):(a=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,n=e):(a=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,b=0|o[1],h=8191&b,p=b>>>13,m=0|o[2],y=8191&m,g=m>>>13,x=0|o[3],v=8191&x,w=x>>>13,I=0|o[4],A=8191&I,S=I>>>13,k=0|o[5],C=8191&k,E=k>>>13,T=0|o[6],P=8191&T,O=T>>>13,B=0|o[7],M=8191&B,R=B>>>13,N=0|o[8],D=8191&N,V=N>>>13,L=0|o[9],U=8191&L,H=L>>>13,K=0|c[0],F=8191&K,j=K>>>13,q=0|c[1],z=8191&q,W=q>>>13,G=0|c[2],X=8191&G,Z=G>>>13,J=0|c[3],Y=8191&J,Q=J>>>13,_=0|c[4],$=8191&_,ee=_>>>13,te=0|c[5],ae=8191&te,ne=te>>>13,re=0|c[6],ie=8191&re,oe=re>>>13,ce=0|c[7],se=8191&ce,de=ce>>>13,ue=0|c[8],fe=8191&ue,le=ue>>>13,be=0|c[9],he=8191&be,pe=be>>>13;a.negative=e.negative^t.negative,a.length=19;var me=(d+(n=Math.imul(f,F))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(l,F)|0))<<13)|0;d=((i=Math.imul(l,j))+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,F),r=(r=Math.imul(h,j))+Math.imul(p,F)|0,i=Math.imul(p,j);var ye=(d+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,W)|0)+Math.imul(l,z)|0))<<13)|0;d=((i=i+Math.imul(l,W)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),r=(r=Math.imul(y,j))+Math.imul(g,F)|0,i=Math.imul(g,j),n=n+Math.imul(h,z)|0,r=(r=r+Math.imul(h,W)|0)+Math.imul(p,z)|0,i=i+Math.imul(p,W)|0;var ge=(d+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(l,X)|0))<<13)|0;d=((i=i+Math.imul(l,Z)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),r=(r=Math.imul(v,j))+Math.imul(w,F)|0,i=Math.imul(w,j),n=n+Math.imul(y,z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(g,z)|0,i=i+Math.imul(g,W)|0,n=n+Math.imul(h,X)|0,r=(r=r+Math.imul(h,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var xe=(d+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(l,Y)|0))<<13)|0;d=((i=i+Math.imul(l,Q)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,F),r=(r=Math.imul(A,j))+Math.imul(S,F)|0,i=Math.imul(S,j),n=n+Math.imul(v,z)|0,r=(r=r+Math.imul(v,W)|0)+Math.imul(w,z)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(y,X)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(g,X)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(h,Y)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(p,Y)|0,i=i+Math.imul(p,Q)|0;var ve=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(l,$)|0))<<13)|0;d=((i=i+Math.imul(l,ee)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,F),r=(r=Math.imul(C,j))+Math.imul(E,F)|0,i=Math.imul(E,j),n=n+Math.imul(A,z)|0,r=(r=r+Math.imul(A,W)|0)+Math.imul(S,z)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Q)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(h,$)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(r=(r=r+Math.imul(f,ne)|0)+Math.imul(l,ae)|0))<<13)|0;d=((i=i+Math.imul(l,ne)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,F),r=(r=Math.imul(P,j))+Math.imul(O,F)|0,i=Math.imul(O,j),n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(E,z)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(A,X)|0,r=(r=r+Math.imul(A,Z)|0)+Math.imul(S,X)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Q)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,ee)|0,n=n+Math.imul(h,ae)|0,r=(r=r+Math.imul(h,ne)|0)+Math.imul(p,ae)|0,i=i+Math.imul(p,ne)|0;var Ie=(d+(n=n+Math.imul(f,ie)|0)|0)+((8191&(r=(r=r+Math.imul(f,oe)|0)+Math.imul(l,ie)|0))<<13)|0;d=((i=i+Math.imul(l,oe)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,F),r=(r=Math.imul(M,j))+Math.imul(R,F)|0,i=Math.imul(R,j),n=n+Math.imul(P,z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(O,z)|0,i=i+Math.imul(O,W)|0,n=n+Math.imul(C,X)|0,r=(r=r+Math.imul(C,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(v,$)|0,r=(r=r+Math.imul(v,ee)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(y,ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(g,ae)|0,i=i+Math.imul(g,ne)|0,n=n+Math.imul(h,ie)|0,r=(r=r+Math.imul(h,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Ae=(d+(n=n+Math.imul(f,se)|0)|0)+((8191&(r=(r=r+Math.imul(f,de)|0)+Math.imul(l,se)|0))<<13)|0;d=((i=i+Math.imul(l,de)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,F),r=(r=Math.imul(D,j))+Math.imul(V,F)|0,i=Math.imul(V,j),n=n+Math.imul(M,z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(R,z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(P,X)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,Q)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(A,$)|0,r=(r=r+Math.imul(A,ee)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(v,ae)|0,r=(r=r+Math.imul(v,ne)|0)+Math.imul(w,ae)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(g,ie)|0,i=i+Math.imul(g,oe)|0,n=n+Math.imul(h,se)|0,r=(r=r+Math.imul(h,de)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;d=((i=i+Math.imul(l,le)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,F),r=(r=Math.imul(U,j))+Math.imul(H,F)|0,i=Math.imul(H,j),n=n+Math.imul(D,z)|0,r=(r=r+Math.imul(D,W)|0)+Math.imul(V,z)|0,i=i+Math.imul(V,W)|0,n=n+Math.imul(M,X)|0,r=(r=r+Math.imul(M,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Q)|0,n=n+Math.imul(C,$)|0,r=(r=r+Math.imul(C,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,ae)|0,r=(r=r+Math.imul(A,ne)|0)+Math.imul(S,ae)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(v,ie)|0,r=(r=r+Math.imul(v,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,de)|0)+Math.imul(g,se)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,le)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,le)|0;var ke=(d+(n=n+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(l,he)|0))<<13)|0;d=((i=i+Math.imul(l,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,z),r=(r=Math.imul(U,W))+Math.imul(H,z)|0,i=Math.imul(H,W),n=n+Math.imul(D,X)|0,r=(r=r+Math.imul(D,Z)|0)+Math.imul(V,X)|0,i=i+Math.imul(V,Z)|0,n=n+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(P,$)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,$)|0,i=i+Math.imul(O,ee)|0,n=n+Math.imul(C,ae)|0,r=(r=r+Math.imul(C,ne)|0)+Math.imul(E,ae)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,r=(r=r+Math.imul(A,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(v,se)|0,r=(r=r+Math.imul(v,de)|0)+Math.imul(w,se)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(y,fe)|0,r=(r=r+Math.imul(y,le)|0)+Math.imul(g,fe)|0,i=i+Math.imul(g,le)|0;var Ce=(d+(n=n+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,X),r=(r=Math.imul(U,Z))+Math.imul(H,X)|0,i=Math.imul(H,Z),n=n+Math.imul(D,Y)|0,r=(r=r+Math.imul(D,Q)|0)+Math.imul(V,Y)|0,i=i+Math.imul(V,Q)|0,n=n+Math.imul(M,$)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(P,ae)|0,r=(r=r+Math.imul(P,ne)|0)+Math.imul(O,ae)|0,i=i+Math.imul(O,ne)|0,n=n+Math.imul(C,ie)|0,r=(r=r+Math.imul(C,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,se)|0,r=(r=r+Math.imul(A,de)|0)+Math.imul(S,se)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(v,fe)|0,r=(r=r+Math.imul(v,le)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,le)|0;var Ee=(d+(n=n+Math.imul(y,he)|0)|0)+((8191&(r=(r=r+Math.imul(y,pe)|0)+Math.imul(g,he)|0))<<13)|0;d=((i=i+Math.imul(g,pe)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,Y),r=(r=Math.imul(U,Q))+Math.imul(H,Y)|0,i=Math.imul(H,Q),n=n+Math.imul(D,$)|0,r=(r=r+Math.imul(D,ee)|0)+Math.imul(V,$)|0,i=i+Math.imul(V,ee)|0,n=n+Math.imul(M,ae)|0,r=(r=r+Math.imul(M,ne)|0)+Math.imul(R,ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,oe)|0,n=n+Math.imul(C,se)|0,r=(r=r+Math.imul(C,de)|0)+Math.imul(E,se)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(A,fe)|0,r=(r=r+Math.imul(A,le)|0)+Math.imul(S,fe)|0,i=i+Math.imul(S,le)|0;var Te=(d+(n=n+Math.imul(v,he)|0)|0)+((8191&(r=(r=r+Math.imul(v,pe)|0)+Math.imul(w,he)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,$),r=(r=Math.imul(U,ee))+Math.imul(H,$)|0,i=Math.imul(H,ee),n=n+Math.imul(D,ae)|0,r=(r=r+Math.imul(D,ne)|0)+Math.imul(V,ae)|0,i=i+Math.imul(V,ne)|0,n=n+Math.imul(M,ie)|0,r=(r=r+Math.imul(M,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(P,se)|0,r=(r=r+Math.imul(P,de)|0)+Math.imul(O,se)|0,i=i+Math.imul(O,de)|0,n=n+Math.imul(C,fe)|0,r=(r=r+Math.imul(C,le)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,le)|0;var Pe=(d+(n=n+Math.imul(A,he)|0)|0)+((8191&(r=(r=r+Math.imul(A,pe)|0)+Math.imul(S,he)|0))<<13)|0;d=((i=i+Math.imul(S,pe)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ae),r=(r=Math.imul(U,ne))+Math.imul(H,ae)|0,i=Math.imul(H,ne),n=n+Math.imul(D,ie)|0,r=(r=r+Math.imul(D,oe)|0)+Math.imul(V,ie)|0,i=i+Math.imul(V,oe)|0,n=n+Math.imul(M,se)|0,r=(r=r+Math.imul(M,de)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(P,fe)|0,r=(r=r+Math.imul(P,le)|0)+Math.imul(O,fe)|0,i=i+Math.imul(O,le)|0;var Oe=(d+(n=n+Math.imul(C,he)|0)|0)+((8191&(r=(r=r+Math.imul(C,pe)|0)+Math.imul(E,he)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ie),r=(r=Math.imul(U,oe))+Math.imul(H,ie)|0,i=Math.imul(H,oe),n=n+Math.imul(D,se)|0,r=(r=r+Math.imul(D,de)|0)+Math.imul(V,se)|0,i=i+Math.imul(V,de)|0,n=n+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,le)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,le)|0;var Be=(d+(n=n+Math.imul(P,he)|0)|0)+((8191&(r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,he)|0))<<13)|0;d=((i=i+Math.imul(O,pe)|0)+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,se),r=(r=Math.imul(U,de))+Math.imul(H,se)|0,i=Math.imul(H,de),n=n+Math.imul(D,fe)|0,r=(r=r+Math.imul(D,le)|0)+Math.imul(V,fe)|0,i=i+Math.imul(V,le)|0;var Me=(d+(n=n+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,pe)|0)+Math.imul(R,he)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,fe),r=(r=Math.imul(U,le))+Math.imul(H,fe)|0,i=Math.imul(H,le);var Re=(d+(n=n+Math.imul(D,he)|0)|0)+((8191&(r=(r=r+Math.imul(D,pe)|0)+Math.imul(V,he)|0))<<13)|0;d=((i=i+Math.imul(V,pe)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(d+(n=Math.imul(U,he))|0)+((8191&(r=(r=Math.imul(U,pe))+Math.imul(H,he)|0))<<13)|0;return d=((i=Math.imul(H,pe))+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=me,s[1]=ye,s[2]=ge,s[3]=xe,s[4]=ve,s[5]=we,s[6]=Ie,s[7]=Ae,s[8]=Se,s[9]=ke,s[10]=Ce,s[11]=Ee,s[12]=Te,s[13]=Pe,s[14]=Oe,s[15]=Be,s[16]=Me,s[17]=Re,s[18]=Ne,0!==d&&(s[19]=d,a.length++),a};function p(e,t,a){return(new m).mulp(e,t,a)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=b),i.prototype.mulTo=function(e,t){var a,n=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):n<63?b(this,e,t):n<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}a.words[i]=c,n=o,o=r}return 0!==n?a.words[i]=n:a.length--,a.strip()}(this,e,t):p(this,e,t),a},m.prototype.makeRBT=function(e){for(var t=new Array(e),a=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,a,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,a[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[a]=67108863&i}return 0!==t&&(this.words[a]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new i(1);for(var a=this,n=0;n=0);var t,a=e%26,r=(e-a)/26,i=67108863>>>26-a<<26-a;if(0!==a){var o=0;for(t=0;t>>26-a}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==u||d>=r);d--){var f=0|this.words[d];this.words[d]=u<<26-i|f>>>i,u=f&c}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,a){return n(0===this.negative),this.iushrn(e,t,a)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,a=(e-t)/26,r=1<=0);var t=e%26,a=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+a]=67108863&i}for(;r>26,this.words[r+a]=67108863&i;if(0===c)return this.strip();for(n(-1===c),c=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var a=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(a=26-this._countBits(o))&&(r=r.ushln(a),n.iushln(a),o=0|r.words[r.length-1]);var c,s=n.length-r.length;if("mod"!==t){(c=new i(null)).length=s+1,c.words=new Array(c.length);for(var d=0;d=0;f--){var l=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(r,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:c||null,mod:n}},i.prototype.divmod=function(e,t,a){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(r=c.div.neg()),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(r=c.div.neg()),{div:r,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),a&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,c},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=a.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,a=0,r=this.length-1;r>=0;r--)a=(t*a+(0|this.words[r]))%e;return a},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var r=(0|this.words[a])+67108864*t;this.words[a]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),c=new i(0),s=new i(1),d=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++d;for(var u=a.clone(),f=t.clone();!t.isZero();){for(var l=0,b=1;0==(t.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(u),o.isub(f)),r.iushrn(1),o.iushrn(1);for(var h=0,p=1;0==(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(u),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(a)>=0?(t.isub(a),r.isub(c),o.isub(s)):(a.isub(t),c.isub(r),s.isub(o))}return{a:c,b:s,gcd:a.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),c=new i(0),s=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(a.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(a.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(a)>=0?(t.isub(a),o.isub(c)):(a.isub(t),c.isub(o))}return(r=0===t.cmpn(1)?o:c).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var n=0;t.isEven()&&a.isEven();n++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var r=t.cmp(a);if(r<0){var i=t;t=a,a=i}else if(0===r||0===a.cmpn(1))break;t.isub(a)}return a.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,a=(e-t)/26,r=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;a--){var n=0|this.words[a],r=0|e.words[a];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(x,g),x.prototype.split=function(e,t){for(var a=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return y[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},A.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var a=this.m.add(new i(1)).iushrn(2);return this.pow(e,a)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var c=new i(1).toRed(this),s=c.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,d).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,r),l=this.pow(e,r.addn(1).iushrn(1)),b=this.pow(e,r),h=o;0!==b.cmp(c);){for(var p=b,m=0;0!==p.cmp(c);m++)p=p.redSqr();n(m=0;n--){for(var d=t.words[n],u=s-1;u>=0;u--){var f=d>>u&1;r!==a[0]&&(r=this.sqr(r)),0!==f||0!==o?(o<<=1,o|=f,(4==++c||0===n&&0===u)&&(r=this.mul(r,a[o]),c=0,o=0)):c=0}s=26}return r},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,A),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var a=e.mul(t),n=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=a.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},76932:(e,t,a)=>{var n=a(28016),r=a(78525),i=a(11273),o=a(62216),c=a(91857),s=a(16162),d=a(46112),u=a(77834).Buffer;e.exports=function(e,t,a){var f;f=e.padding?e.padding:a?1:4;var l,b=n(e),h=b.modulus.byteLength();if(t.length>h||new o(t).cmp(b.modulus)>=0)throw new Error("decryption error");l=a?d(new o(t),b):c(t,b);var p=u.alloc(h-l.length);if(l=u.concat([p,l],h),4===f)return function(e,t){var a=e.modulus.byteLength(),n=s("sha1").update(u.alloc(0)).digest(),o=n.length;if(0!==t[0])throw new Error("decryption error");var c=t.slice(1,o+1),d=t.slice(o+1),f=i(c,r(d,o)),l=i(d,r(f,a-o-1));if(function(e,t){e=u.from(e),t=u.from(t);var a=0,n=e.length;e.length!==t.length&&(a++,n=Math.min(e.length,t.length));for(var r=-1;++r=t.length){i++;break}var o=t.slice(2,r-1);if(("0002"!==n.toString("hex")&&!a||"0001"!==n.toString("hex")&&a)&&i++,o.length<8&&i++,i)throw new Error("decryption error");return t.slice(r)}(0,l,a);if(3===f)return l;throw new Error("unknown padding")}},61896:(e,t,a)=>{var n=a(28016),r=a(95003),i=a(16162),o=a(78525),c=a(11273),s=a(62216),d=a(46112),u=a(91857),f=a(77834).Buffer;e.exports=function(e,t,a){var l;l=e.padding?e.padding:a?1:4;var b,h=n(e);if(4===l)b=function(e,t){var a=e.modulus.byteLength(),n=t.length,d=i("sha1").update(f.alloc(0)).digest(),u=d.length,l=2*u;if(n>a-l-2)throw new Error("message too long");var b=f.alloc(a-n-l-2),h=a-u-1,p=r(u),m=c(f.concat([d,b,f.alloc(1,1),t],h),o(p,h)),y=c(p,o(m,u));return new s(f.concat([f.alloc(1),y,m],a))}(h,t);else if(1===l)b=function(e,t,a){var n,i=t.length,o=e.modulus.byteLength();if(i>o-11)throw new Error("message too long");return n=a?f.alloc(o-i-3,255):function(e){for(var t,a=f.allocUnsafe(e),n=0,i=r(2*e),o=0;n=0)throw new Error("data too long for modulus")}return a?u(b,h):d(b,h)}},46112:(e,t,a)=>{var n=a(62216),r=a(77834).Buffer;e.exports=function(e,t){return r.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},11273:e=>{e.exports=function(e,t){for(var a=e.length,n=-1;++n{"use strict";const n=a(57785),r=a(15554),i=a(15452),o=a(40063),c=Symbol("encodeFragmentIdentifier");function s(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?r(e):e}function f(e){return Array.isArray(e)?e.sort():"object"==typeof e?f(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function b(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const a=function(e){let t;switch(e.arrayFormat){case"index":return(e,a,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=a):n[e]=a};case"bracket":return(e,a,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],a):n[e]=[a]:n[e]=a};case"colon-list-separator":return(e,a,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],a):n[e]=[a]:n[e]=a};case"comma":case"separator":return(t,a,n)=>{const r="string"==typeof a&&a.includes(e.arrayFormatSeparator),i="string"==typeof a&&!r&&u(a,e).includes(e.arrayFormatSeparator);a=i?u(a,e):a;const o=r||i?a.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===a?a:u(a,e);n[t]=o};case"bracket-separator":return(t,a,n)=>{const r=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!r)return void(n[t]=a?u(a,e):a);const i=null===a?[]:a.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],i):n[t]=i};default:return(e,t,a)=>{void 0!==a[e]?a[e]=[].concat(a[e],t):a[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const r of e.split("&")){if(""===r)continue;let[e,o]=i(t.decode?r.replace(/\+/g," "):r,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:u(o,t),a(u(e,t),o,n)}for(const e of Object.keys(n)){const a=n[e];if("object"==typeof a&&null!==a)for(const e of Object.keys(a))a[e]=h(a[e],t);else n[e]=h(a,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const a=n[t];return Boolean(a)&&"object"==typeof a&&!Array.isArray(a)?e[t]=f(a):e[t]=a,e}),Object.create(null))}t.extract=b,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const a=a=>t.skipNull&&null==e[a]||t.skipEmptyString&&""===e[a],n=function(e){switch(e.arrayFormat){case"index":return t=>(a,n)=>{const r=a.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:null===n?[...a,[d(t,e),"[",r,"]"].join("")]:[...a,[d(t,e),"[",d(r,e),"]=",d(n,e)].join("")]};case"bracket":return t=>(a,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:null===n?[...a,[d(t,e),"[]"].join("")]:[...a,[d(t,e),"[]=",d(n,e)].join("")];case"colon-list-separator":return t=>(a,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:null===n?[...a,[d(t,e),":list="].join("")]:[...a,[d(t,e),":list=",d(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return a=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:(r=null===r?"":r,0===n.length?[[d(a,e),t,d(r,e)].join("")]:[[n,d(r,e)].join(e.arrayFormatSeparator)])}default:return t=>(a,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:null===n?[...a,d(t,e)]:[...a,[d(t,e),"=",d(n,e)].join("")]}}(t),r={};for(const t of Object.keys(e))a(t)||(r[t]=e[t]);const i=Object.keys(r);return!1!==t.sort&&i.sort(t.sort),i.map((a=>{const r=e[a];return void 0===r?"":null===r?d(a,t):Array.isArray(r)?0===r.length&&"bracket-separator"===t.arrayFormat?d(a,t)+"[]":r.reduce(n(a),[]).join("&"):d(a,t)+"="+d(r,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[a,n]=i(e,"#");return Object.assign({url:a.split("?")[0]||"",query:p(b(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,a)=>{a=Object.assign({encode:!0,strict:!0,[c]:!0},a);const n=l(e.url).split("?")[0]||"",r=t.extract(e.url),i=t.parse(r,{sort:!1}),o=Object.assign(i,e.query);let s=t.stringify(o,a);s&&(s=`?${s}`);let u=function(e){let t="";const a=e.indexOf("#");return-1!==a&&(t=e.slice(a)),t}(e.url);return e.fragmentIdentifier&&(u=`#${a[c]?d(e.fragmentIdentifier,a):e.fragmentIdentifier}`),`${n}${s}${u}`},t.pick=(e,a,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[c]:!1},n);const{url:r,query:i,fragmentIdentifier:s}=t.parseUrl(e,n);return t.stringifyUrl({url:r,query:o(i,a),fragmentIdentifier:s},n)},t.exclude=(e,a,n)=>{const r=Array.isArray(a)?e=>!a.includes(e):(e,t)=>!a(e,t);return t.pick(e,r,n)}},31493:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,a,n){var r=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=a.length+1;if(1===i)return e;var o=new Array(i);o[0]=r(e);for(var c=1;c-1?f:0,e.charCodeAt(b+1)){case 100:case 102:if(u>=s)break;if(null==a[u])break;f=s)break;if(null==a[u])break;f=s)break;if(void 0===a[u])break;f",f=b+2,b++;break}d+=r(a[u]),f=b+2,b++;break;case 115:if(u>=s)break;f{"use strict";var n=a(34406),r=65536,i=a(77834).Buffer,o=a.g.crypto||a.g.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var a=i.allocUnsafe(e);if(e>0)if(e>r)for(var c=0;c{"use strict";var n=a(34406);function r(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var i=a(77834),o=a(95003),c=i.Buffer,s=i.kMaxLength,d=a.g.crypto||a.g.msCrypto,u=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>u||e<0)throw new TypeError("offset must be a uint32");if(e>s||e>t)throw new RangeError("offset out of range")}function l(e,t,a){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>a||e>s)throw new RangeError("buffer too small")}function b(e,t,a,r){if(n.browser){var i=e.buffer,c=new Uint8Array(i,t,a);return d.getRandomValues(c),r?void n.nextTick((function(){r(null,e)})):e}if(!r)return o(a).copy(e,t),e;o(a,(function(a,n){if(a)return r(a);n.copy(e,t),r(null,e)}))}d&&d.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,r){if(!(c.isBuffer(e)||e instanceof a.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)r=t,t=0,n=e.length;else if("function"==typeof n)r=n,n=e.length-t;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return f(t,e.length),l(n,t,e.length),b(e,t,n,r)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(c.isBuffer(e)||e instanceof a.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(t,e.length),void 0===n&&(n=e.length-t),l(n,t,e.length),b(e,t,n)}):(t.randomFill=r,t.randomFillSync=r)},64452:e=>{"use strict";var t={};function a(e,a,n){n||(n=Error);var r=function(e){var t,n;function r(t,n,r){return e.call(this,function(e,t,n){return"string"==typeof a?a:a(e,t,n)}(t,n,r))||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(n);r.prototype.name=n.name,r.prototype.code=e,t[e]=r}function n(e,t){if(Array.isArray(e)){var a=e.length;return e=e.map((function(e){return String(e)})),a>2?"one of ".concat(t," ").concat(e.slice(0,a-1).join(", "),", or ")+e[a-1]:2===a?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,a){var r,i,o,c,s;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,a){return(void 0===a||a>e.length)&&(a=e.length),e.substring(a-t.length,a)===t}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(n(t,"type"));else{var d=("number"!=typeof s&&(s=0),s+".".length>(c=e).length||-1===c.indexOf(".",s)?"argument":"property");o='The "'.concat(e,'" ').concat(d," ").concat(r," ").concat(n(t,"type"))}return o+". Received type ".concat(typeof a)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},77073:(e,t,a)=>{"use strict";var n=a(34406),r=Object.keys||function(e){var t=[];for(var a in e)t.push(a);return t};e.exports=u;var i=a(28051),o=a(2557);a(91285)(u,i);for(var c=r(o.prototype),s=0;s{"use strict";e.exports=r;var n=a(27640);function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}a(91285)(r,n),r.prototype._transform=function(e,t,a){a(null,e)}},28051:(e,t,a)=>{"use strict";var n,r=a(34406);e.exports=k,k.ReadableState=S,a(22699).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},c=a(15010),s=a(48834).Buffer,d=a.g.Uint8Array||function(){},u=a(66602);i=u&&u.debuglog?u.debuglog("stream"):function(){};var f,l,b,h=a(56637),p=a(12262),m=a(87605).getHighWaterMark,y=a(64452).q,g=y.ERR_INVALID_ARG_TYPE,x=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;a(91285)(k,c);var I=p.errorOrDestroy,A=["error","close","destroy","pause","resume"];function S(e,t,r){n=n||a(77073),e=e||{},"boolean"!=typeof r&&(r=t instanceof n),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",r),this.buffer=new h,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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=a(31922).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function k(e){if(n=n||a(77073),!(this instanceof k))return new k(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function C(e,t,a,n,r){i("readableAddChunk",t);var o,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var a=t.decoder.end();a&&a.length&&(t.buffer.push(a),t.length+=t.objectMode?1:a.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}}(e,c);else if(r||(o=function(e,t){var a,n;return n=t,s.isBuffer(n)||n instanceof d||"string"==typeof t||void 0===t||e.objectMode||(a=new g("chunk",["string","Buffer","Uint8Array"],t)),a}(c,t)),o)I(e,o);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)c.endEmitted?I(e,new w):E(e,c,t,!0);else if(c.ended)I(e,new x);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!a?(t=c.decoder.write(t),c.objectMode||0!==t.length?E(e,c,t,!1):M(e,c)):E(e,c,t,!1)}else n||(c.reading=!1,M(e,c));return!c.ended&&(c.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(B,e))}function B(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function M(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){i("readable nexttick read 0"),e.read(0)}function V(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?a=t.buffer.shift():!e||e>=t.length?(a=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):a=t.buffer.consume(e,t.decoder),a);var a}function H(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(K,t,e))}function K(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var a=t._writableState;(!a||a.autoDestroy&&a.finished)&&t.destroy()}}function F(e,t){for(var a=0,n=e.length;a=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?H(this):O(this),null;if(0===(e=P(e,t))&&t.ended)return 0===t.length&&H(this),null;var n,r=t.needReadable;return i("need readable",r),(0===t.length||t.length-e0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),a!==e&&t.ended&&H(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){I(this,new v("_read()"))},k.prototype.pipe=function(e,t){var a=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var c=t&&!1===t.end||e===r.stdout||e===r.stderr?p:s;function s(){i("onend"),e.end()}n.endEmitted?r.nextTick(c):a.once("end",c),e.on("unpipe",(function t(r,o){i("onunpipe"),r===a&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,i("cleanup"),e.removeListener("close",b),e.removeListener("finish",h),e.removeListener("drain",d),e.removeListener("error",l),e.removeListener("unpipe",t),a.removeListener("end",s),a.removeListener("end",p),a.removeListener("data",f),u=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}));var d=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,L(e))}}(a);e.on("drain",d);var u=!1;function f(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==F(n.pipes,e))&&!u&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),a.pause())}function l(t){i("onerror",t),p(),e.removeListener("error",l),0===o(e,"error")&&I(e,t)}function b(){e.removeListener("finish",h),p()}function h(){i("onfinish"),e.removeListener("close",b),p()}function p(){i("unpipe"),a.unpipe(e)}return a.on("data",f),function(e,t,a){if("function"==typeof e.prependListener)return e.prependListener(t,a);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(a):e._events.error=[a,e._events.error]:e.on(t,a)}(e,"error",l),e.once("close",b),e.once("finish",h),e.emit("pipe",a),n.flowing||(i("pipe resume"),a.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,a={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,a)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?O(this):n.reading||r.nextTick(D,this))),a},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var a=c.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(N,this),a},k.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(N,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(V,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,a=this._readableState,n=!1;for(var r in e.on("end",(function(){if(i("wrapped end"),a.decoder&&!a.ended){var e=a.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(r){i("wrapped data"),a.decoder&&(r=a.decoder.write(r)),a.objectMode&&null==r||(a.objectMode||r&&r.length)&&(t.push(r)||(n=!0,e.pause()))})),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o{"use strict";e.exports=u;var n=a(64452).q,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,c=n.ERR_TRANSFORM_WITH_LENGTH_0,s=a(77073);function d(e,t){var a=this._transformState;a.transforming=!1;var n=a.writecb;if(null===n)return this.emit("error",new i);a.writechunk=null,a.writecb=null,null!=t&&this.push(t),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length{"use strict";var n,r=a(34406);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,a){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=k,k.WritableState=S;var o,c={deprecate:a(5803)},s=a(15010),d=a(48834).Buffer,u=a.g.Uint8Array||function(){},f=a(12262),l=a(87605).getHighWaterMark,b=a(64452).q,h=b.ERR_INVALID_ARG_TYPE,p=b.ERR_METHOD_NOT_IMPLEMENTED,m=b.ERR_MULTIPLE_CALLBACK,y=b.ERR_STREAM_CANNOT_PIPE,g=b.ERR_STREAM_DESTROYED,x=b.ERR_STREAM_NULL_VALUES,v=b.ERR_STREAM_WRITE_AFTER_END,w=b.ERR_UNKNOWN_ENCODING,I=f.errorOrDestroy;function A(){}function S(e,t,o){n=n||a(77073),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=l(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var a=e._writableState,n=a.sync,i=a.writecb;if("function"!=typeof i)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(a),t)!function(e,t,a,n,i){--t.pendingcb,a?(r.nextTick(i,n),r.nextTick(B,e,t),e._writableState.errorEmitted=!0,I(e,n)):(i(n),e._writableState.errorEmitted=!0,I(e,n),B(e,t))}(e,a,n,t,i);else{var o=P(a)||e.destroyed;o||a.corked||a.bufferProcessing||!a.bufferedRequest||T(e,a),n?r.nextTick(E,e,a,o,i):E(e,a,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function k(e){var t=this instanceof(n=n||a(77073));if(!t&&!o.call(k,this))return new k(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function C(e,t,a,n,r,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):a?e._writev(r,t.onwrite):e._write(r,i,t.onwrite),t.sync=!1}function E(e,t,a,n){a||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),B(e,t)}function T(e,t){t.bufferProcessing=!0;var a=t.bufferedRequest;if(e._writev&&a&&a.next){var n=t.bufferedRequestCount,r=new Array(n),o=t.corkedRequestsFree;o.entry=a;for(var c=0,s=!0;a;)r[c]=a,a.isBuf||(s=!1),a=a.next,c+=1;r.allBuffers=s,C(e,t,!0,t.length,r,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;a;){var d=a.chunk,u=a.encoding,f=a.callback;if(C(e,t,!1,t.objectMode?1:d.length,d,u,f),a=a.next,t.bufferedRequestCount--,t.writing)break}null===a&&(t.lastBufferedRequest=null)}t.bufferedRequest=a,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(a){t.pendingcb--,a&&I(e,a),t.prefinished=!0,e.emit("prefinish"),B(e,t)}))}function B(e,t){var a=P(t);if(a&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return a}a(91285)(k,s),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===k&&e&&e._writableState instanceof S}})):o=function(e){return e instanceof this},k.prototype.pipe=function(){I(this,new y)},k.prototype.write=function(e,t,a){var n,i=this._writableState,o=!1,c=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof u);return c&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(a=t,t=null),c?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof a&&(a=A),i.ending?function(e,t){var a=new v;I(e,a),r.nextTick(t,a)}(this,a):(c||function(e,t,a,n){var i;return null===a?i=new x:"string"==typeof a||t.objectMode||(i=new h("chunk",["string","Buffer"],a)),!i||(I(e,i),r.nextTick(n,i),!1)}(this,i,e,a))&&(i.pendingcb++,o=function(e,t,a,n,r,i){if(!a){var o=function(e,t,a){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,a)),t}(t,n,r);n!==o&&(a=!0,r="buffer",n=o)}var c=t.objectMode?1:n.length;t.length+=c;var s=t.length-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,a){a(new p("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,a){var n=this._writableState;return"function"==typeof e?(a=e,e=null,t=null):"function"==typeof t&&(a=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,a){t.ending=!0,B(e,t),a&&(t.finished?r.nextTick(a):e.once("finish",a)),t.ended=!0,e.writable=!1}(this,n,a),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}},1029:(e,t,a)=>{"use strict";var n,r=a(34406);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var o=a(59885),c=Symbol("lastResolve"),s=Symbol("lastReject"),d=Symbol("error"),u=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),b=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[c];if(null!==t){var a=e[b].read();null!==a&&(e[f]=null,e[c]=null,e[s]=null,t(h(a,!1)))}}function m(e){r.nextTick(p,e)}var y=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i(n={get stream(){return this[b]},next:function(){var e=this,t=this[d];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(h(void 0,!0));if(this[b].destroyed)return new Promise((function(t,a){r.nextTick((function(){e[d]?a(e[d]):t(h(void 0,!0))}))}));var a,n=this[f];if(n)a=new Promise(function(e,t){return function(a,n){e.then((function(){t[u]?a(h(void 0,!0)):t[l](a,n)}),n)}}(n,this));else{var i=this[b].read();if(null!==i)return Promise.resolve(h(i,!1));a=new Promise(this[l])}return this[f]=a,a}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,a){e[b].destroy(null,(function(e){e?a(e):t(h(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,a=Object.create(g,(i(t={},b,{value:e,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,d,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var n=a[b].read();n?(a[f]=null,a[c]=null,a[s]=null,e(h(n,!1))):(a[c]=e,a[s]=t)},writable:!0}),t));return a[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=a[s];return null!==t&&(a[f]=null,a[c]=null,a[s]=null,t(e)),void(a[d]=e)}var n=a[c];null!==n&&(a[f]=null,a[c]=null,a[s]=null,n(h(void 0,!0))),a[u]=!0})),e.on("readable",m.bind(null,a)),a}},56637:(e,t,a)=>{"use strict";function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){for(var a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,a=""+t.data;t=t.next;)a+=e+t.data;return a}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,a,n,r=o.allocUnsafe(e>>>0),i=this.head,c=0;i;)t=i.data,a=r,n=c,o.prototype.copy.call(t,a,n),c+=i.data.length,i=i.next;return r}},{key:"consume",value:function(e,t){var a;return er.length?r.length:e;if(i===r.length?n+=r:n+=r.slice(0,e),0==(e-=i)){i===r.length?(++a,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(i));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),a=this.head,n=1;for(a.data.copy(t),e-=a.data.length;a=a.next;){var r=a.data,i=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,i),0==(e-=i)){i===r.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=r.slice(i));break}++n}return this.length-=n,t}},{key:s,value:function(e,t){return c(this,function(e){for(var t=1;t{"use strict";var n=a(34406);function r(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var a=this,c=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return c||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,e)):n.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?a._writableState?a._writableState.errorEmitted?n.nextTick(i,a):(a._writableState.errorEmitted=!0,n.nextTick(r,a,e)):n.nextTick(r,a,e):t?(n.nextTick(i,a),t(e)):n.nextTick(i,a)})),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(e,t){var a=e._readableState,n=e._writableState;a&&a.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},59885:(e,t,a)=>{"use strict";var n=a(64452).q.ERR_STREAM_PREMATURE_CLOSE;function r(){}e.exports=function e(t,a,i){if("function"==typeof a)return e(t,null,a);a||(a={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var a=arguments.length,n=new Array(a),r=0;r{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},63495:(e,t,a)=>{"use strict";var n,r=a(64452).q,i=r.ERR_MISSING_ARGS,o=r.ERR_STREAM_DESTROYED;function c(e){if(e)throw e}function s(e,t,r,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var c=!1;e.on("close",(function(){c=!0})),void 0===n&&(n=a(59885)),n(e,{readable:t,writable:r},(function(e){if(e)return i(e);c=!0,i()}));var s=!1;return function(t){if(!c&&!s)return s=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new o("pipe"))}}function d(e){e()}function u(e,t){return e.pipe(t)}function f(e){return e.length?"function"!=typeof e[e.length-1]?c:e.pop():c}e.exports=function(){for(var e=arguments.length,t=new Array(e),a=0;a0,(function(e){n||(n=e),e&&o.forEach(d),i||(o.forEach(d),r(n))}))}));return t.reduce(u)}},87605:(e,t,a)=>{"use strict";var n=a(64452).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,a,r){var i=function(e,t,a){return null!=e.highWaterMark?e.highWaterMark:t?e[a]:null}(t,r,a);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(r?a:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},15010:(e,t,a)=>{e.exports=a(22699).EventEmitter},31922:(e,t,a)=>{"use strict";var n=a(77834).Buffer,r=n.isEncoding||function(e){switch((e=""+e)&&e.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 i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===r||!r(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=d,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=l,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e){var t=this.lastTotal-this.lastNeed,a=function(e,t,a){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==a?a:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var a=e.toString("utf16le",t);if(a){var n=a.charCodeAt(a.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],a.slice(0,-1)}return a}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var a=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,a)}return t}function u(e,t){var a=(e.length-t)%3;return 0===a?e.toString("base64",t):(this.lastNeed=3-a,this.lastTotal=3,1===a?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-a))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,a;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";a=this.lastNeed,this.lastNeed=0}else a=0;return a=0?(r>0&&(e.lastNeed=r-1),r):--n=0?(r>0&&(e.lastNeed=r-2),r):--n=0?(r>0&&(2===r?r=0:e.lastNeed=r-3),r):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=a;var n=e.length-(a-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},67525:(e,t,a)=>{(t=e.exports=a(28051)).Stream=t,t.Readable=t,t.Writable=a(2557),t.Duplex=a(77073),t.Transform=a(27640),t.PassThrough=a(95163),t.finished=a(59885),t.pipeline=a(63495)},51445:(e,t,a)=>{"use strict";var n=a(48834).Buffer,r=a(91285),i=a(84485),o=new Array(16),c=[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],s=[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],d=[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],u=[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],l=[1352829926,1548603684,1836072691,2053994217,0];function b(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(e,t){return e<>>32-t}function p(e,t,a,n,r,i,o,c){return h(e+(t^a^n)+i+o|0,c)+r|0}function m(e,t,a,n,r,i,o,c){return h(e+(t&a|~t&n)+i+o|0,c)+r|0}function y(e,t,a,n,r,i,o,c){return h(e+((t|~a)^n)+i+o|0,c)+r|0}function g(e,t,a,n,r,i,o,c){return h(e+(t&n|a&~n)+i+o|0,c)+r|0}function x(e,t,a,n,r,i,o,c){return h(e+(t^(a|~n))+i+o|0,c)+r|0}r(b,i),b.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var a=0|this._a,n=0|this._b,r=0|this._c,i=0|this._d,b=0|this._e,v=0|this._a,w=0|this._b,I=0|this._c,A=0|this._d,S=0|this._e,k=0;k<80;k+=1){var C,E;k<16?(C=p(a,n,r,i,b,e[c[k]],f[0],d[k]),E=x(v,w,I,A,S,e[s[k]],l[0],u[k])):k<32?(C=m(a,n,r,i,b,e[c[k]],f[1],d[k]),E=g(v,w,I,A,S,e[s[k]],l[1],u[k])):k<48?(C=y(a,n,r,i,b,e[c[k]],f[2],d[k]),E=y(v,w,I,A,S,e[s[k]],l[2],u[k])):k<64?(C=g(a,n,r,i,b,e[c[k]],f[3],d[k]),E=m(v,w,I,A,S,e[s[k]],l[3],u[k])):(C=x(a,n,r,i,b,e[c[k]],f[4],d[k]),E=p(v,w,I,A,S,e[s[k]],l[4],u[k])),a=b,b=i,i=h(r,10),r=n,n=C,v=S,S=A,A=h(I,10),I=w,w=E}var T=this._b+r+A|0;this._b=this._c+i+S|0,this._c=this._d+b+v|0,this._d=this._e+a+w|0,this._e=this._a+n+I|0,this._a=T},b.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 e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=b},22644:function(e,t,a){"use strict";var n=a(48834).Buffer,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i=r(a(62197));function o(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function c(e,t){if(e<56)return n.from([e+t]);var a=u(e),r=u(t+55+a.length/2);return n.from(r+a,"hex")}function s(e){var t,a,r,i,c,d=[],u=e[0];if(u<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(u<=183){if(t=u-127,r=128===u?n.from([]):e.slice(1,t),2===t&&r[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:r,remainder:e.slice(t)}}if(u<=191){if(a=u-182,e.length-1e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(i=e.slice(a,f)).length)throw new Error("invalid rlp, List has a invalid length");for(;i.length;)c=s(i),d.push(c.data),i=c.remainder;return{data:d,remainder:e.slice(f)}}function d(e){return"0x"===e.slice(0,2)}function u(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function f(e){if(!n.isBuffer(e)){if("string"==typeof e)return d(e)?n.from((a="string"!=typeof(r=e)?r:d(r)?r.slice(2):r).length%2?"0"+a:a,"hex"):n.from(e);if("number"==typeof e||"bigint"==typeof e)return e?(t=u(e),n.from(t,"hex")):n.from([]);if(null==e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(i.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}var t,a,r;return e}t.encode=function e(t){if(Array.isArray(t)){for(var a=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,r=a(26929),i=a(61377),o=a(30040),c=a(42935);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var s=function(){function e(e,t,a){this.kind=e,this.value=t,this.error=a,this.hasValue="N"===e}return e.prototype.observe=function(e){return d(this,e)},e.prototype.do=function(e,t,a){var n=this,r=n.kind,i=n.value,o=n.error;return"N"===r?null==e?void 0:e(i):"E"===r?null==t?void 0:t(o):null==a?void 0:a()},e.prototype.accept=function(e,t,a){var n;return c.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,a)},e.prototype.toObservable=function(){var e=this,t=e.kind,a=e.value,n=e.error,c="N"===t?i.of(a):"E"===t?o.throwError((function(){return n})):"C"===t?r.EMPTY:0;if(!c)throw new TypeError("Unexpected notification kind "+t);return c},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function d(e,t){var a,n,r,i=e,o=i.kind,c=i.value,s=i.error;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(a=t.next)||void 0===a||a.call(t,c):"E"===o?null===(n=t.error)||void 0===n||n.call(t,s):null===(r=t.complete)||void 0===r||r.call(t)}t.Notification=s,t.observeNotification=d},13005:(e,t)=>{"use strict";function a(e,t,a){return{kind:e,value:t,error:a}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=a("C",void 0,void 0),t.errorNotification=function(e){return a("E",void 0,e)},t.nextNotification=function(e){return a("N",e,void 0)},t.createNotification=a},64174:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=a(7747),r=a(44666),i=a(34595),o=a(65250),c=a(19179),s=a(42935),d=a(10977),u=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var a=new e;return a.source=this,a.operator=t,a},e.prototype.subscribe=function(e,t,a){var i,o=this,c=(i=e)&&i instanceof n.Subscriber||function(e){return e&&s.isFunction(e.next)&&s.isFunction(e.error)&&s.isFunction(e.complete)}(i)&&r.isSubscription(i)?e:new n.SafeSubscriber(e,t,a);return d.errorContext((function(){var e=o,t=e.operator,a=e.source;c.add(t?t.call(c,a):a?o._subscribe(c):o._trySubscribe(c))})),c},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var a=this;return new(t=f(t))((function(t,r){var i=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});a.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=a(79168),r=function(){function e(t,a){void 0===a&&(a=e.now),this.schedulerActionCtor=t,this.now=a}return e.prototype.schedule=function(e,t,a){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(a,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=r},55294:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var o=a(64174),c=a(44666),s=a(68499),d=a(91291),u=a(10977),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r(t,e),t.prototype.lift=function(e){var t=new l(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new s.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;u.errorContext((function(){var a,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var r=i(t.currentObservers),o=r.next();!o.done;o=r.next())o.value.next(e)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}}}))},t.prototype.error=function(e){var t=this;u.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var a=t.observers;a.length;)a.shift().error(e)}}))},t.prototype.complete=function(){var e=this;u.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,a=this,n=a.hasError,r=a.isStopped,i=a.observers;return n||r?c.EMPTY_SUBSCRIPTION:(this.currentObservers=null,i.push(e),new c.Subscription((function(){t.currentObservers=null,d.arrRemove(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,a=t.hasError,n=t.thrownError,r=t.isStopped;a?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new o.Observable;return e.source=this,e},t.create=function(e,t){return new l(e,t)},t}(o.Observable);t.Subject=f;var l=function(e){function t(t,a){var n=e.call(this)||this;return n.destination=t,n.source=a,n}return r(t,e),t.prototype.next=function(e){var t,a;null===(a=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===a||a.call(t,e)},t.prototype.error=function(e){var t,a;null===(a=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===a||a.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,a;return null!==(a=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==a?a:c.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=l},7747:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var i=a(42935),o=a(44666),c=a(19179),s=a(51600),d=a(37116),u=a(13005),f=a(81577),l=a(10977),b=function(e){function a(a){var n=e.call(this)||this;return n.isStopped=!1,a?(n.destination=a,o.isSubscription(a)&&a.add(n)):n.destination=t.EMPTY_OBSERVER,n}return r(a,e),a.create=function(e,t,a){return new y(e,t,a)},a.prototype.next=function(e){this.isStopped?x(u.nextNotification(e),this):this._next(e)},a.prototype.error=function(e){this.isStopped?x(u.errorNotification(e),this):(this.isStopped=!0,this._error(e))},a.prototype.complete=function(){this.isStopped?x(u.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},a.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},a.prototype._next=function(e){this.destination.next(e)},a.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},a.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},a}(o.Subscription);t.Subscriber=b;var h=Function.prototype.bind;function p(e,t){return h.call(e,t)}var m=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){g(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){g(e)}else g(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){g(e)}},e}(),y=function(e){function t(t,a,n){var r,o,s=e.call(this)||this;return i.isFunction(t)||!t?r={next:null!=t?t:void 0,error:null!=a?a:void 0,complete:null!=n?n:void 0}:s&&c.config.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},r={next:t.next&&p(t.next,o),error:t.error&&p(t.error,o),complete:t.complete&&p(t.complete,o)}):r=t,s.destination=new m(r),s}return r(t,e),t}(b);function g(e){c.config.useDeprecatedSynchronousErrorHandling?l.captureError(e):s.reportUnhandledError(e)}function x(e,t){var a=c.config.onStoppedNotification;a&&f.timeoutProvider.setTimeout((function(){return a(e,t)}))}t.SafeSubscriber=y,t.EMPTY_OBSERVER={closed:!0,next:d.noop,error:function(e){throw e},complete:d.noop}},44666:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},77327:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=a(99088),r=a(7747);t.firstValueFrom=function(e,t){var a="object"==typeof t;return new Promise((function(i,o){var c=new r.SafeSubscriber({next:function(e){i(e),c.unsubscribe()},error:o,complete:function(){a?i(t.defaultValue):o(new n.EmptyError)}});e.subscribe(c)}))}},74798:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=a(99088);t.lastValueFrom=function(e,t){var a="object"==typeof t;return new Promise((function(r,i){var o,c=!1;e.subscribe({next:function(e){o=e,c=!0},error:i,complete:function(){c?r(o):a?r(t.defaultValue):i(new n.EmptyError)}})}))}},87165:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var i=a(64174),o=a(44666),c=a(14508),s=a(37326),d=a(16097),u=function(e){function t(t,a){var n=e.call(this)||this;return n.source=t,n.subjectFactory=a,n._subject=null,n._refCount=0,n._connection=null,d.hasLift(t)&&(n.lift=t.lift),n}return r(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new o.Subscription;var a=this.getSubject();t.add(this.source.subscribe(s.createOperatorSubscriber(a,void 0,(function(){e._teardown(),a.complete()}),(function(t){e._teardown(),a.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=o.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return c.refCount()(this)},t}(i.Observable);t.ConnectableObservable=u},56238:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=a(89706);t.bindCallback=function(e,t,a){return n.bindCallbackInternals(!1,e,t,a)}},89706:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=a(89706);t.bindNodeCallback=function(e,t,a){return n.bindCallbackInternals(!0,e,t,a)}},40508:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=a(64174),r=a(82398),i=a(44417),o=a(98987),c=a(9364),s=a(84544),d=a(64800),u=a(37326),f=a(75267);function l(e,t,a){return void 0===a&&(a=o.identity),function(n){b(t,(function(){for(var r=e.length,o=new Array(r),c=r,s=r,d=function(r){b(t,(function(){var d=i.from(e[r],t),f=!1;d.subscribe(u.createOperatorSubscriber(n,(function(e){o[r]=e,f||(f=!0,s--),s||n.next(a(o.slice()))}),(function(){--c||n.complete()})))}),n)},f=0;f{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=a(90482),r=a(84544),i=a(44417);t.concat=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=a(55294),r=a(64174),i=a(89623),o={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=o);var a=null,n=t.connector,c=t.resetOnDisconnect,s=void 0===c||c,d=n(),u=new r.Observable((function(e){return d.subscribe(e)}));return u.connect=function(){return a&&!a.closed||(a=i.defer((function(){return e})).subscribe(d),s&&a.add((function(){return d=n()}))),a},u}},89623:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=a(64174),r=a(16958);t.defer=function(e){return new n.Observable((function(t){r.innerFrom(e()).subscribe(t)}))}},12447:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=a(64174),r=a(52261),i=a(29015);function o(e){return new n.Observable((function(t){var a=e||r.performanceTimestampProvider,n=a.now(),o=0,c=function(){t.closed||(o=i.animationFrameProvider.requestAnimationFrame((function(r){o=0;var i=a.now();t.next({timestamp:e?i:r,elapsed:i-n}),c()})))};return c(),function(){o&&i.animationFrameProvider.cancelAnimationFrame(o)}}))}t.animationFrames=function(e){return e?o(e):c};var c=o()},26929:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=a(64174);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},69220:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=a(64174),r=a(82398),i=a(16958),o=a(84544),c=a(37326),s=a(9364),d=a(64800);t.forkJoin=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=a(42862),r=a(16958);t.from=function(e,t){return t?n.scheduled(e,t):r.innerFrom(e)}},59671:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var r=a(16958),i=a(64174),o=a(36086),c=a(5445),s=a(42935),d=a(9364),u=["addListener","removeListener"],f=["addEventListener","removeEventListener"],l=["on","off"];function b(e,t){return function(a){return function(n){return e[a](t,n)}}}t.fromEvent=function e(t,a,h,p){if(s.isFunction(h)&&(p=h,h=void 0),p)return e(t,a,h).pipe(d.mapOneOrManyArgs(p));var m=n(function(e){return s.isFunction(e.addEventListener)&&s.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](a,n,h)}})):function(e){return s.isFunction(e.addListener)&&s.isFunction(e.removeListener)}(t)?u.map(b(t,a)):function(e){return s.isFunction(e.on)&&s.isFunction(e.off)}(t)?l.map(b(t,a)):[],2),y=m[0],g=m[1];if(!y&&c.isArrayLike(t))return o.mergeMap((function(t){return e(t,a,h)}))(r.innerFrom(t));if(!y)throw new TypeError("Invalid event target");return new i.Observable((function(e){var t=function(){for(var t=[],a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=a(64174),r=a(42935),i=a(9364);t.fromEventPattern=function e(t,a,o){return o?e(t,a).pipe(i.mapOneOrManyArgs(o)):new n.Observable((function(e){var n=function(){for(var t=[],a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=a(64174);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},3482:function(e,t,a){"use strict";var n=this&&this.__generator||function(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=a(89623);t.iif=function(e,t,a){return n.defer((function(){return e()?t:a}))}},16958:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var c=a(5445),s=a(94283),d=a(64174),u=a(33124),f=a(83260),l=a(17756),b=a(98131),h=a(42221),p=a(42935),m=a(51600),y=a(34595);function g(e){return new d.Observable((function(t){var a=e[y.observable]();if(p.isFunction(a.subscribe))return a.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function x(e){return new d.Observable((function(t){for(var a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=a(17152),r=a(18069);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),r.timer(e,e,t)}},2039:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=a(40400),r=a(16958),i=a(26929),o=a(84544),c=a(44417);t.merge=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=a(64174),r=a(37116);t.NEVER=new n.Observable(r.noop),t.never=function(){return t.NEVER}},61377:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=a(84544),r=a(44417);t.of=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=a(64174),r=a(35034),i=a(37326),o=a(37116),c=a(16958);t.onErrorResumeNext=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=a(44417);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},36394:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=a(38781),r=a(47261),i=a(16958);t.partition=function(e,t,a){return[r.filter(t,a)(i.innerFrom(e)),r.filter(n.not(t,a))(i.innerFrom(e))]}},76849:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=a(64174),r=a(16958),i=a(35034),o=a(37326);function c(e){return function(t){for(var a=[],n=function(n){a.push(r.innerFrom(e[n]).subscribe(o.createOperatorSubscriber(t,(function(e){if(a){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=a(64174),r=a(26929);t.range=function(e,t,a){if(null==t&&(t=e,e=0),t<=0)return r.EMPTY;var i=t+e;return new n.Observable(a?function(t){var n=e;return a.schedule((function(){n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=a(64174),r=a(42935);t.throwError=function(e,t){var a=r.isFunction(e)?e:function(){return e},i=function(e){return e.error(a())};return new n.Observable(t?function(e){return t.schedule(i,0,e)}:i)}},18069:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=a(64174),r=a(17152),i=a(19668),o=a(14426);t.timer=function(e,t,a){void 0===e&&(e=0),void 0===a&&(a=r.async);var c=-1;return null!=t&&(i.isScheduler(t)?a=t:c=t),new n.Observable((function(t){var n=o.isValidDate(e)?+e-a.now():e;n<0&&(n=0);var r=0;return a.schedule((function(){t.closed||(t.next(r++),0<=c?this.schedule(void 0,c):t.complete())}),n)}))}},63348:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=a(64174),r=a(16958),i=a(26929);t.using=function(e,t){return new n.Observable((function(a){var n=e(),o=t(n);return(o?r.innerFrom(o):i.EMPTY).subscribe(a),function(){n&&n.unsubscribe()}}))}},74981:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=a(16097),r=a(16958),i=a(37326);t.audit=function(e){return n.operate((function(t,a){var n=!1,o=null,c=null,s=!1,d=function(){if(null==c||c.unsubscribe(),c=null,n){n=!1;var e=o;o=null,a.next(e)}s&&a.complete()},u=function(){c=null,s&&a.complete()};t.subscribe(i.createOperatorSubscriber(a,(function(t){n=!0,o=t,c||r.innerFrom(e(t)).subscribe(c=i.createOperatorSubscriber(a,d,u))}),(function(){s=!0,(!n||!c||c.closed)&&a.complete()})))}))}},24152:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=a(17152),r=a(22605),i=a(18069);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),r.audit((function(){return i.timer(e,t)}))}},35149:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=a(16097),r=a(37116),i=a(37326),o=a(16958);t.buffer=function(e){return n.operate((function(t,a){var n=[];return t.subscribe(i.createOperatorSubscriber(a,(function(e){return n.push(e)}),(function(){a.next(n),a.complete()}))),o.innerFrom(e).subscribe(i.createOperatorSubscriber(a,(function(){var e=n;n=[],a.next(e)}),r.noop)),function(){n=null}}))}},33189:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var r=a(16097),i=a(37326),o=a(91291);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,r.operate((function(a,r){var c=[],s=0;a.subscribe(i.createOperatorSubscriber(r,(function(a){var i,d,u,f,l=null;s++%t==0&&c.push([]);try{for(var b=n(c),h=b.next();!h.done;h=b.next())(y=h.value).push(a),e<=y.length&&(l=null!=l?l:[]).push(y)}catch(e){i={error:e}}finally{try{h&&!h.done&&(d=b.return)&&d.call(b)}finally{if(i)throw i.error}}if(l)try{for(var p=n(l),m=p.next();!m.done;m=p.next()){var y=m.value;o.arrRemove(c,y),r.next(y)}}catch(e){u={error:e}}finally{try{m&&!m.done&&(f=p.return)&&f.call(p)}finally{if(u)throw u.error}}}),(function(){var e,t;try{for(var a=n(c),i=a.next();!i.done;i=a.next()){var o=i.value;r.next(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){c=null})))}))}},99459:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var r=a(44666),i=a(16097),o=a(37326),c=a(91291),s=a(17152),d=a(84544),u=a(75267);t.bufferTime=function(e){for(var t,a,f=[],l=1;l=0?u.executeSchedule(a,b,f,h,!0):s=!0,f();var l=o.createOperatorSubscriber(a,(function(e){var t,a,r=i.slice();try{for(var o=n(r),c=o.next();!c.done;c=o.next()){var s=c.value,u=s.buffer;u.push(e),p<=u.length&&d(s)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(a=o.return)&&a.call(o)}finally{if(t)throw t.error}}}),(function(){for(;null==i?void 0:i.length;)a.next(i.shift().buffer);null==l||l.unsubscribe(),a.complete(),a.unsubscribe()}),void 0,(function(){return i=null}));t.subscribe(l)}))}},15536:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var r=a(44666),i=a(16097),o=a(16958),c=a(37326),s=a(37116),d=a(91291);t.bufferToggle=function(e,t){return i.operate((function(a,i){var u=[];o.innerFrom(e).subscribe(c.createOperatorSubscriber(i,(function(e){var a=[];u.push(a);var n=new r.Subscription;n.add(o.innerFrom(t(e)).subscribe(c.createOperatorSubscriber(i,(function(){d.arrRemove(u,a),i.next(a),n.unsubscribe()}),s.noop)))}),s.noop)),a.subscribe(c.createOperatorSubscriber(i,(function(e){var t,a;try{for(var r=n(u),i=r.next();!i.done;i=r.next())i.value.push(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(t)throw t.error}}}),(function(){for(;u.length>0;)i.next(u.shift());i.complete()})))}))}},27764:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=a(16097),r=a(37116),i=a(37326),o=a(16958);t.bufferWhen=function(e){return n.operate((function(t,a){var n=null,c=null,s=function(){null==c||c.unsubscribe();var t=n;n=[],t&&a.next(t),o.innerFrom(e()).subscribe(c=i.createOperatorSubscriber(a,s,r.noop))};s(),t.subscribe(i.createOperatorSubscriber(a,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&a.next(n),a.complete()}),void 0,(function(){return n=c=null})))}))}},73056:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=a(16958),r=a(37326),i=a(16097);t.catchError=function e(t){return i.operate((function(a,i){var o,c=null,s=!1;c=a.subscribe(r.createOperatorSubscriber(i,void 0,void 0,(function(r){o=n.innerFrom(t(r,e(t)(a))),c?(c.unsubscribe(),c=null,o.subscribe(i)):s=!0}))),s&&(c.unsubscribe(),c=null,o.subscribe(i))}))}},10498:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=a(97484);t.combineAll=n.combineLatestAll},6527:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=a(40508),r=a(72208);t.combineLatestAll=function(e){return r.joinAllInternals(n.combineLatest,e)}},64755:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=a(40400);t.concatAll=function(){return n.mergeAll(1)}},31774:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=a(36086),r=a(42935);t.concatMap=function(e,t){return r.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},63977:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=a(31774),r=a(42935);t.concatMapTo=function(e,t){return r.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},67672:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=a(55294),r=a(16958),i=a(16097),o=a(46884),c={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=c);var a=t.connector;return i.operate((function(t,n){var i=a();r.innerFrom(e(o.fromSubscribable(i))).subscribe(n),n.add(t.subscribe(i))}))}},78259:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=a(78083);t.count=function(e){return n.reduce((function(t,a,n){return!e||e(a,n)?t+1:t}),0)}},23473:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=a(16097),r=a(37116),i=a(37326),o=a(16958);t.debounce=function(e){return n.operate((function(t,a){var n=!1,c=null,s=null,d=function(){if(null==s||s.unsubscribe(),s=null,n){n=!1;var e=c;c=null,a.next(e)}};t.subscribe(i.createOperatorSubscriber(a,(function(t){null==s||s.unsubscribe(),n=!0,c=t,s=i.createOperatorSubscriber(a,d,r.noop),o.innerFrom(e(t)).subscribe(s)}),(function(){d(),a.complete()}),void 0,(function(){c=s=null})))}))}},78390:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=a(17152),r=a(16097),i=a(37326);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),r.operate((function(a,n){var r=null,o=null,c=null,s=function(){if(r){r.unsubscribe(),r=null;var e=o;o=null,n.next(e)}};function d(){var a=c+e,i=t.now();if(i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=a(16097),r=a(37326);t.defaultIfEmpty=function(e){return n.operate((function(t,a){var n=!1;t.subscribe(r.createOperatorSubscriber(a,(function(e){n=!0,a.next(e)}),(function(){n||a.next(e),a.complete()})))}))}},58151:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=a(17152),r=a(40744),i=a(18069);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var a=i.timer(e,t);return r.delayWhen((function(){return a}))}},40744:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=a(3364),r=a(29438),i=a(89186),o=a(55471),c=a(36086),s=a(16958);t.delayWhen=function e(t,a){return a?function(o){return n.concat(a.pipe(r.take(1),i.ignoreElements()),o.pipe(e(t)))}:c.mergeMap((function(e,a){return s.innerFrom(t(e,a)).pipe(r.take(1),o.mapTo(e))}))}},8590:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=a(79828),r=a(16097),i=a(37326);t.dematerialize=function(){return r.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},28406:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=a(16097),r=a(37326),i=a(37116),o=a(16958);t.distinct=function(e,t){return n.operate((function(a,n){var c=new Set;a.subscribe(r.createOperatorSubscriber(n,(function(t){var a=e?e(t):t;c.has(a)||(c.add(a),n.next(t))}))),t&&o.innerFrom(t).subscribe(r.createOperatorSubscriber(n,(function(){return c.clear()}),i.noop))}))}},37300:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=a(98987),r=a(16097),i=a(37326);function o(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:o,r.operate((function(a,n){var r,o=!0;a.subscribe(i.createOperatorSubscriber(n,(function(a){var i=t(a);!o&&e(r,i)||(o=!1,r=i,n.next(a))})))}))}},84405:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=a(37300);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(a,n){return t?t(a[e],n[e]):a[e]===n[e]}))}},42787:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=a(19216),r=a(47261),i=a(21332),o=a(24562),c=a(29438);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var a=arguments.length>=2;return function(s){return s.pipe(r.filter((function(t,a){return a===e})),c.take(1),a?o.defaultIfEmpty(t):i.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},11665:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=a(16097),r=a(37326);t.every=function(e,t){return n.operate((function(a,n){var i=0;a.subscribe(r.createOperatorSubscriber(n,(function(r){e.call(t,r,i++,a)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},42208:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=a(62008);t.exhaust=n.exhaustAll},62008:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=a(84019),r=a(98987);t.exhaustAll=function(){return n.exhaustMap(r.identity)}},84019:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=a(56269),r=a(16958),i=a(16097),o=a(37326);t.exhaustMap=function e(t,a){return a?function(i){return i.pipe(e((function(e,i){return r.innerFrom(t(e,i)).pipe(n.map((function(t,n){return a(e,t,i,n)})))})))}:i.operate((function(e,a){var n=0,i=null,c=!1;e.subscribe(o.createOperatorSubscriber(a,(function(e){i||(i=o.createOperatorSubscriber(a,void 0,(function(){i=null,c&&a.complete()})),r.innerFrom(t(e,n++)).subscribe(i))}),(function(){c=!0,!i&&a.complete()})))}))}},29101:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=a(16097),r=a(25926);t.expand=function(e,t,a){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,i){return r.mergeInternals(n,i,e,t,void 0,!0,a)}))}},47261:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=a(16097),r=a(37326);t.filter=function(e,t){return n.operate((function(a,n){var i=0;a.subscribe(r.createOperatorSubscriber(n,(function(a){return e.call(t,a,i++)&&n.next(a)})))}))}},55381:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=a(16097);t.finalize=function(e){return n.operate((function(t,a){try{t.subscribe(a)}finally{a.add(e)}}))}},24127:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=a(16097),r=a(37326);function i(e,t,a){var n="index"===a;return function(a,i){var o=0;a.subscribe(r.createOperatorSubscriber(i,(function(r){var c=o++;e.call(t,r,c,a)&&(i.next(n?c:r),i.complete())}),(function(){i.next(n?-1:void 0),i.complete()})))}}t.find=function(e,t){return n.operate(i(e,t,"value"))},t.createFind=i},69727:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=a(16097),r=a(24127);t.findIndex=function(e,t){return n.operate(r.createFind(e,t,"index"))}},87418:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=a(99088),r=a(47261),i=a(29438),o=a(24562),c=a(21332),s=a(98987);t.first=function(e,t){var a=arguments.length>=2;return function(d){return d.pipe(e?r.filter((function(t,a){return e(t,a,d)})):s.identity,i.take(1),a?o.defaultIfEmpty(t):c.throwIfEmpty((function(){return new n.EmptyError})))}}},89121:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=a(36086);t.flatMap=n.mergeMap},7533:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=a(64174),r=a(16958),i=a(55294),o=a(16097),c=a(37326);t.groupBy=function(e,t,a,s){return o.operate((function(o,d){var u;t&&"function"!=typeof t?(a=t.duration,u=t.element,s=t.connector):u=t;var f=new Map,l=function(e){f.forEach(e),e(d)},b=function(e){return l((function(t){return t.error(e)}))},h=0,p=!1,m=new c.OperatorSubscriber(d,(function(t){try{var o=e(t),l=f.get(o);if(!l){f.set(o,l=s?s():new i.Subject);var y=(x=o,v=l,(w=new n.Observable((function(e){h++;var t=v.subscribe(e);return function(){t.unsubscribe(),0==--h&&p&&m.unsubscribe()}}))).key=x,w);if(d.next(y),a){var g=c.createOperatorSubscriber(l,(function(){l.complete(),null==g||g.unsubscribe()}),void 0,void 0,(function(){return f.delete(o)}));m.add(r.innerFrom(a(y)).subscribe(g))}}l.next(u?u(t):t)}catch(e){b(e)}var x,v,w}),(function(){return l((function(e){return e.complete()}))}),b,(function(){return f.clear()}),(function(){return p=!0,0===h}));o.subscribe(m)}))}},89186:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=a(16097),r=a(37326),i=a(37116);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(r.createOperatorSubscriber(t,i.noop))}))}},27757:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=a(16097),r=a(37326);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(r.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},72208:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=a(98987),r=a(9364),i=a(65250),o=a(36086),c=a(29867);t.joinAllInternals=function(e,t){return i.pipe(c.toArray(),o.mergeMap((function(t){return e(t)})),t?r.mapOneOrManyArgs(t):n.identity)}},83374:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=a(99088),r=a(47261),i=a(74125),o=a(21332),c=a(24562),s=a(98987);t.last=function(e,t){var a=arguments.length>=2;return function(d){return d.pipe(e?r.filter((function(t,a){return e(t,a,d)})):s.identity,i.takeLast(1),a?c.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.EmptyError})))}}},56269:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=a(16097),r=a(37326);t.map=function(e,t){return n.operate((function(a,n){var i=0;a.subscribe(r.createOperatorSubscriber(n,(function(a){n.next(e.call(t,a,i++))})))}))}},55471:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=a(56269);t.mapTo=function(e){return n.map((function(){return e}))}},21160:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=a(79828),r=a(16097),i=a(37326);t.materialize=function(){return r.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},91890:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=a(78083),r=a(42935);t.max=function(e){return n.reduce(r.isFunction(e)?function(t,a){return e(t,a)>0?t:a}:function(e,t){return e>t?e:t})}},33982:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=a(36086),r=a(98987);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(r.identity,e)}},25926:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=a(16958),r=a(75267),i=a(37326);t.mergeInternals=function(e,t,a,o,c,s,d,u){var f=[],l=0,b=0,h=!1,p=function(){!h||f.length||l||t.complete()},m=function(e){return l{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=a(56269),r=a(16958),i=a(16097),o=a(25926),c=a(42935);t.mergeMap=function e(t,a,s){return void 0===s&&(s=1/0),c.isFunction(a)?e((function(e,i){return n.map((function(t,n){return a(e,t,i,n)}))(r.innerFrom(t(e,i)))}),s):("number"==typeof a&&(s=a),i.operate((function(e,a){return o.mergeInternals(e,a,t,s)})))}},71244:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=a(36086),r=a(42935);t.mergeMapTo=function(e,t,a){return void 0===a&&(a=1/0),r.isFunction(t)?n.mergeMap((function(){return e}),t,a):("number"==typeof t&&(a=t),n.mergeMap((function(){return e}),a))}},23699:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=a(16097),r=a(25926);t.mergeScan=function(e,t,a){return void 0===a&&(a=1/0),n.operate((function(n,i){var o=t;return r.mergeInternals(n,i,(function(t,a){return e(o,t,a)}),a,(function(e){o=e}),!1,void 0,(function(){return o=null}))}))}},98220:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=a(78083),r=a(42935);t.min=function(e){return n.reduce(r.isFunction(e)?function(t,a){return e(t,a)<0?t:a}:function(e,t){return e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=a(87165),r=a(42935),i=a(65561);t.multicast=function(e,t){var a=r.isFunction(e)?e:function(){return e};return r.isFunction(t)?i.connect(t,{connector:a}):function(e){return new n.ConnectableObservable(e,a)}}},89314:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=a(75267),r=a(16097),i=a(37326);t.observeOn=function(e,t){return void 0===t&&(t=0),r.operate((function(a,r){a.subscribe(i.createOperatorSubscriber(r,(function(a){return n.executeSchedule(r,e,(function(){return r.next(a)}),t)}),(function(){return n.executeSchedule(r,e,(function(){return r.complete()}),t)}),(function(a){return n.executeSchedule(r,e,(function(){return r.error(a)}),t)})))}))}},31899:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=a(16097),r=a(37326);t.pairwise=function(){return n.operate((function(e,t){var a,n=!1;e.subscribe(r.createOperatorSubscriber(t,(function(e){var r=a;a=e,n&&t.next([r,e]),n=!0})))}))}},9857:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=a(38781),r=a(47261);t.partition=function(e,t){return function(a){return[r.filter(e,t)(a),r.filter(n.not(e,t))(a)]}}},39532:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=a(56269);t.pluck=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=a(55294),r=a(68413),i=a(65561);t.publish=function(e){return e?function(t){return i.connect(e)(t)}:function(e){return r.multicast(new n.Subject)(e)}}},48103:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=a(61577),r=a(87165);t.publishBehavior=function(e){return function(t){var a=new n.BehaviorSubject(e);return new r.ConnectableObservable(t,(function(){return a}))}}},22610:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=a(69960),r=a(87165);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new r.ConnectableObservable(e,(function(){return t}))}}},45299:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=a(68806),r=a(68413),i=a(42935);t.publishReplay=function(e,t,a,o){a&&!i.isFunction(a)&&(o=a);var c=i.isFunction(a)?a:void 0;return function(a){return r.multicast(new n.ReplaySubject(e,t,o),c)(a)}}},26699:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=a(87235),r=a(16097);t.reduce=function(e,t){return r.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},14508:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=a(16097),r=a(37326);t.refCount=function(){return n.operate((function(e,t){var a=null;e._refCount++;var n=r.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)a=null;else{var n=e._connection,r=a;a=null,!n||r&&n!==r||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(a=e.connect())}))}},72588:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=a(26929),r=a(16097),i=a(37326),o=a(16958),c=a(18069);t.repeat=function(e){var t,a,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,a=e.delay):s=e),s<=0?function(){return n.EMPTY}:r.operate((function(e,t){var n,r=0,d=function(){if(null==n||n.unsubscribe(),n=null,null!=a){var e="number"==typeof a?c.timer(a):o.innerFrom(a(r)),s=i.createOperatorSubscriber(t,(function(){s.unsubscribe(),u()}));e.subscribe(s)}else u()},u=function(){var a=!1;n=e.subscribe(i.createOperatorSubscriber(t,void 0,(function(){++r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=a(16958),r=a(55294),i=a(16097),o=a(37326);t.repeatWhen=function(e){return i.operate((function(t,a){var i,c,s=!1,d=!1,u=!1,f=function(){return u&&d&&(a.complete(),!0)},l=function(){u=!1,i=t.subscribe(o.createOperatorSubscriber(a,void 0,(function(){u=!0,!f()&&(c||(c=new r.Subject,n.innerFrom(e(c)).subscribe(o.createOperatorSubscriber(a,(function(){i?l():s=!0}),(function(){d=!0,f()})))),c).next()}))),s&&(i.unsubscribe(),i=null,s=!1,l())};l()}))}},74486:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=a(16097),r=a(37326),i=a(98987),o=a(18069),c=a(16958);t.retry=function(e){var t;void 0===e&&(e=1/0);var a=(t=e&&"object"==typeof e?e:{count:e}).count,s=void 0===a?1/0:a,d=t.delay,u=t.resetOnSuccess,f=void 0!==u&&u;return s<=0?i.identity:n.operate((function(e,t){var a,n=0,i=function(){var u=!1;a=e.subscribe(r.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=a(16958),r=a(55294),i=a(16097),o=a(37326);t.retryWhen=function(e){return i.operate((function(t,a){var i,c,s=!1,d=function(){i=t.subscribe(o.createOperatorSubscriber(a,void 0,void 0,(function(t){c||(c=new r.Subject,n.innerFrom(e(c)).subscribe(o.createOperatorSubscriber(a,(function(){return i?d():s=!0})))),c&&c.next(t)}))),s&&(i.unsubscribe(),i=null,s=!1,d())};d()}))}},20778:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=a(16958),r=a(16097),i=a(37116),o=a(37326);t.sample=function(e){return r.operate((function(t,a){var r=!1,c=null;t.subscribe(o.createOperatorSubscriber(a,(function(e){r=!0,c=e}))),n.innerFrom(e).subscribe(o.createOperatorSubscriber(a,(function(){if(r){r=!1;var e=c;c=null,a.next(e)}}),i.noop))}))}},67701:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=a(17152),r=a(20778),i=a(88989);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),r.sample(i.interval(e,t))}},18167:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=a(16097),r=a(87235);t.scan=function(e,t){return n.operate(r.scanInternals(e,t,arguments.length>=2,!0))}},87235:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=a(37326);t.scanInternals=function(e,t,a,r,i){return function(o,c){var s=a,d=t,u=0;o.subscribe(n.createOperatorSubscriber(c,(function(t){var a=u++;d=s?e(d,t,a):(s=!0,t),r&&c.next(d)}),i&&function(){s&&c.next(d),c.complete()}))}}},57821:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=a(16097),r=a(37326),i=a(16958);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(a,n){var o={buffer:[],complete:!1},c={buffer:[],complete:!1},s=function(e){n.next(e),n.complete()},d=function(e,a){var i=r.createOperatorSubscriber(n,(function(n){var r=a.buffer,i=a.complete;0===r.length?i?s(!1):e.buffer.push(n):!t(n,r.shift())&&s(!1)}),(function(){e.complete=!0;var t=a.complete,n=a.buffer;t&&s(0===n.length),null==i||i.unsubscribe()}));return i};a.subscribe(d(o,c)),i.innerFrom(e).subscribe(d(c,o))}))}},52645:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a0&&(t=new c.SafeSubscriber({next:function(e){return g.next(e)},error:function(e){h=!0,p(),n=d(m,r,e),g.error(e)},complete:function(){l=!0,p(),n=d(m,f),g.complete()}}),i.innerFrom(e).subscribe(t))}))(e)}}},27566:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=a(68806),r=a(52645);t.shareReplay=function(e,t,a){var i,o,c,s,d=!1;return e&&"object"==typeof e?(i=e.bufferSize,s=void 0===i?1/0:i,o=e.windowTime,t=void 0===o?1/0:o,d=void 0!==(c=e.refCount)&&c,a=e.scheduler):s=null!=e?e:1/0,r.share({connector:function(){return new n.ReplaySubject(s,t,a)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:d})}},44610:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=a(99088),r=a(57298),i=a(25722),o=a(16097),c=a(37326);t.single=function(e){return o.operate((function(t,a){var o,s=!1,d=!1,u=0;t.subscribe(c.createOperatorSubscriber(a,(function(n){d=!0,e&&!e(n,u++,t)||(s&&a.error(new r.SequenceError("Too many matching values")),s=!0,o=n)}),(function(){s?(a.next(o),a.complete()):a.error(d?new i.NotFoundError("No matching values"):new n.EmptyError)})))}))}},75735:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=a(47261);t.skip=function(e){return n.filter((function(t,a){return e<=a}))}},63252:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=a(98987),r=a(16097),i=a(37326);t.skipLast=function(e){return e<=0?n.identity:r.operate((function(t,a){var n=new Array(e),r=0;return t.subscribe(i.createOperatorSubscriber(a,(function(t){var i=r++;if(i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=a(16097),r=a(37326),i=a(16958),o=a(37116);t.skipUntil=function(e){return n.operate((function(t,a){var n=!1,c=r.createOperatorSubscriber(a,(function(){null==c||c.unsubscribe(),n=!0}),o.noop);i.innerFrom(e).subscribe(c),t.subscribe(r.createOperatorSubscriber(a,(function(e){return n&&a.next(e)})))}))}},45454:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=a(16097),r=a(37326);t.skipWhile=function(e){return n.operate((function(t,a){var n=!1,i=0;t.subscribe(r.createOperatorSubscriber(a,(function(t){return(n||(n=!e(t,i++)))&&a.next(t)})))}))}},1923:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=a(3364),r=a(84544),i=a(16097);t.startWith=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=a(16097);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(a,n){n.add(e.schedule((function(){return a.subscribe(n)}),t))}))}},91695:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=a(66649),r=a(98987);t.switchAll=function(){return n.switchMap(r.identity)}},66649:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=a(16958),r=a(16097),i=a(37326);t.switchMap=function(e,t){return r.operate((function(a,r){var o=null,c=0,s=!1,d=function(){return s&&!o&&r.complete()};a.subscribe(i.createOperatorSubscriber(r,(function(a){null==o||o.unsubscribe();var s=0,u=c++;n.innerFrom(e(a,u)).subscribe(o=i.createOperatorSubscriber(r,(function(e){return r.next(t?t(a,e,u,s++):e)}),(function(){o=null,d()})))}),(function(){s=!0,d()})))}))}},83054:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=a(66649),r=a(42935);t.switchMapTo=function(e,t){return r.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},62890:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=a(66649),r=a(16097);t.switchScan=function(e,t){return r.operate((function(a,r){var i=t;return n.switchMap((function(t,a){return e(i,t,a)}),(function(e,t){return i=t,t}))(a).subscribe(r),function(){i=null}}))}},29438:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=a(26929),r=a(16097),i=a(37326);t.take=function(e){return e<=0?function(){return n.EMPTY}:r.operate((function(t,a){var n=0;t.subscribe(i.createOperatorSubscriber(a,(function(t){++n<=e&&(a.next(t),e<=n&&a.complete())})))}))}},74125:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var r=a(26929),i=a(16097),o=a(37326);t.takeLast=function(e){return e<=0?function(){return r.EMPTY}:i.operate((function(t,a){var r=[];t.subscribe(o.createOperatorSubscriber(a,(function(t){r.push(t),e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=a(16097),r=a(37326),i=a(16958),o=a(37116);t.takeUntil=function(e){return n.operate((function(t,a){i.innerFrom(e).subscribe(r.createOperatorSubscriber(a,(function(){return a.complete()}),o.noop)),!a.closed&&t.subscribe(a)}))}},85884:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=a(16097),r=a(37326);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(a,n){var i=0;a.subscribe(r.createOperatorSubscriber(n,(function(a){var r=e(a,i++);(r||t)&&n.next(a),!r&&n.complete()})))}))}},5383:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=a(42935),r=a(16097),i=a(37326),o=a(98987);t.tap=function(e,t,a){var c=n.isFunction(e)||t||a?{next:e,error:t,complete:a}:e;return c?r.operate((function(e,t){var a;null===(a=c.subscribe)||void 0===a||a.call(c);var n=!0;e.subscribe(i.createOperatorSubscriber(t,(function(e){var a;null===(a=c.next)||void 0===a||a.call(c,e),t.next(e)}),(function(){var e;n=!1,null===(e=c.complete)||void 0===e||e.call(c),t.complete()}),(function(e){var a;n=!1,null===(a=c.error)||void 0===a||a.call(c,e),t.error(e)}),(function(){var e,t;n&&(null===(e=c.unsubscribe)||void 0===e||e.call(c)),null===(t=c.finalize)||void 0===t||t.call(c)})))})):o.identity}},11016:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0;var n=a(16097),r=a(37326),i=a(16958);t.throttle=function(e,t){return n.operate((function(a,n){var o=null!=t?t:{},c=o.leading,s=void 0===c||c,d=o.trailing,u=void 0!==d&&d,f=!1,l=null,b=null,h=!1,p=function(){null==b||b.unsubscribe(),b=null,u&&(g(),h&&n.complete())},m=function(){b=null,h&&n.complete()},y=function(t){return b=i.innerFrom(e(t)).subscribe(r.createOperatorSubscriber(n,p,m))},g=function(){if(f){f=!1;var e=l;l=null,n.next(e),!h&&y(e)}};a.subscribe(r.createOperatorSubscriber(n,(function(e){f=!0,l=e,(!b||b.closed)&&(s?g():y(e))}),(function(){h=!0,(!(u&&f&&b)||b.closed)&&n.complete()})))}))}},90567:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=a(17152),r=a(11016),i=a(18069);t.throttleTime=function(e,t,a){void 0===t&&(t=n.asyncScheduler);var o=i.timer(e,t);return r.throttle((function(){return o}),a)}},21332:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=a(99088),r=a(16097),i=a(37326);function o(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=o),r.operate((function(t,a){var n=!1;t.subscribe(i.createOperatorSubscriber(a,(function(e){n=!0,a.next(e)}),(function(){return n?a.complete():a.error(e())})))}))}},51149:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=a(17152),r=a(16097),i=a(37326);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),r.operate((function(t,a){var n=e.now();t.subscribe(i.createOperatorSubscriber(a,(function(t){var r=e.now(),i=r-n;n=r,a.next(new o(t,i))})))}))};var o=function(e,t){this.value=e,this.interval=t};t.TimeInterval=o},54485:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=a(17152),r=a(14426),i=a(16097),o=a(16958),c=a(83126),s=a(37326),d=a(75267);function u(e){throw new t.TimeoutError(e)}t.TimeoutError=c.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var a=r.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,c=a.first,f=a.each,l=a.with,b=void 0===l?u:l,h=a.scheduler,p=void 0===h?null!=t?t:n.asyncScheduler:h,m=a.meta,y=void 0===m?null:m;if(null==c&&null==f)throw new TypeError("No timeout provided.");return i.operate((function(e,t){var a,n,r=null,i=0,u=function(e){n=d.executeSchedule(t,p,(function(){try{a.unsubscribe(),o.innerFrom(b({meta:y,lastValue:r,seen:i})).subscribe(t)}catch(e){t.error(e)}}),e)};a=e.subscribe(s.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),i++,t.next(r=e),f>0&&u(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),r=null}))),!i&&u(null!=c?"number"==typeof c?c:+c-p.now():f)}))}},94972:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=a(17152),r=a(14426),i=a(54485);t.timeoutWith=function(e,t,a){var o,c,s;if(a=null!=a?a:n.async,r.isValidDate(e)?o=e:"number"==typeof e&&(c=e),!t)throw new TypeError("No observable provided to switch to");if(s=function(){return t},null==o&&null==c)throw new TypeError("No timeout provided.");return i.timeout({first:o,each:c,scheduler:a,with:s})}},11275:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=a(79168),r=a(56269);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),r.map((function(t){return{value:t,timestamp:e.now()}}))}},29867:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=a(78083),r=a(16097),i=function(e,t){return e.push(t),e};t.toArray=function(){return r.operate((function(e,t){n.reduce(i,[])(e).subscribe(t)}))}},17649:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=a(55294),r=a(16097),i=a(37326),o=a(37116),c=a(16958);t.window=function(e){return r.operate((function(t,a){var r=new n.Subject;a.next(r.asObservable());var s=function(e){r.error(e),a.error(e)};return t.subscribe(i.createOperatorSubscriber(a,(function(e){return null==r?void 0:r.next(e)}),(function(){r.complete(),a.complete()}),s)),c.innerFrom(e).subscribe(i.createOperatorSubscriber(a,(function(){r.complete(),a.next(r=new n.Subject)}),o.noop,s)),function(){null==r||r.unsubscribe(),r=null}}))}},75612:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var r=a(55294),i=a(16097),o=a(37326);t.windowCount=function(e,t){void 0===t&&(t=0);var a=t>0?t:e;return i.operate((function(t,i){var c=[new r.Subject],s=0;i.next(c[0].asObservable()),t.subscribe(o.createOperatorSubscriber(i,(function(t){var o,d;try{for(var u=n(c),f=u.next();!f.done;f=u.next())f.value.next(t)}catch(e){o={error:e}}finally{try{f&&!f.done&&(d=u.return)&&d.call(u)}finally{if(o)throw o.error}}var l=s-e+1;if(l>=0&&l%a==0&&c.shift().complete(),++s%a==0){var b=new r.Subject;c.push(b),i.next(b.asObservable())}}),(function(){for(;c.length>0;)c.shift().complete();i.complete()}),(function(e){for(;c.length>0;)c.shift().error(e);i.error(e)}),(function(){c=null})))}))}},59972:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=a(55294),r=a(17152),i=a(44666),o=a(16097),c=a(37326),s=a(91291),d=a(84544),u=a(75267);t.windowTime=function(e){for(var t,a,f=[],l=1;l=0?u.executeSchedule(a,b,f,h,!0):o=!0,f();var l=function(e){return r.slice().forEach(e)},m=function(e){l((function(t){var a=t.window;return e(a)})),e(a),a.unsubscribe()};return t.subscribe(c.createOperatorSubscriber(a,(function(e){l((function(t){t.window.next(e),p<=++t.seen&&d(t)}))}),(function(){return m((function(e){return e.complete()}))}),(function(e){return m((function(t){return t.error(e)}))}))),function(){r=null}}))}},49593:function(e,t,a){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var r=a(55294),i=a(44666),o=a(16097),c=a(16958),s=a(37326),d=a(37116),u=a(91291);t.windowToggle=function(e,t){return o.operate((function(a,o){var f=[],l=function(e){for(;0{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=a(55294),r=a(16097),i=a(37326),o=a(16958);t.windowWhen=function(e){return r.operate((function(t,a){var r,c,s=function(e){r.error(e),a.error(e)},d=function(){var t;null==c||c.unsubscribe(),null==r||r.complete(),r=new n.Subject,a.next(r.asObservable());try{t=o.innerFrom(e())}catch(e){return void s(e)}t.subscribe(c=i.createOperatorSubscriber(a,d,d,s))};d(),t.subscribe(i.createOperatorSubscriber(a,(function(e){return r.next(e)}),(function(){r.complete(),a.complete()}),s,(function(){null==c||c.unsubscribe(),r=null})))}))}},35512:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=a(74981),r=a(72208);t.zipAll=function(e){return r.joinAllInternals(n.zip,e)}},97594:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=a(64174);t.scheduleArray=function(e,t){return new n.Observable((function(a){var n=0;return t.schedule((function(){n===e.length?a.complete():(a.next(e[n++]),a.closed||this.schedule())}))}))}},94271:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=a(64174),r=a(75267);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(a){r.executeSchedule(a,t,(function(){var n=e[Symbol.asyncIterator]();r.executeSchedule(a,t,(function(){n.next().then((function(e){e.done?a.complete():a.next(e.value)}))}),0,!0)}))}))}},82485:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=a(64174),r=a(17630),i=a(42935),o=a(75267);t.scheduleIterable=function(e,t){return new n.Observable((function(a){var n;return o.executeSchedule(a,t,(function(){n=e[r.iterator](),o.executeSchedule(a,t,(function(){var e,t,r;try{t=(e=n.next()).value,r=e.done}catch(e){return void a.error(e)}r?a.complete():a.next(t)}),0,!0)})),function(){return i.isFunction(null==n?void 0:n.return)&&n.return()}}))}},55892:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=a(16958),r=a(89314),i=a(79130);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(i.subscribeOn(t),r.observeOn(t))}},66976:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=a(16958),r=a(89314),i=a(79130);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(i.subscribeOn(t),r.observeOn(t))}},34260:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=a(94271),r=a(42221);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(r.readableStreamLikeToAsyncGenerator(e),t)}},42862:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=a(55892),r=a(66976),i=a(75125),o=a(82485),c=a(94271),s=a(33124),d=a(94283),u=a(5445),f=a(98131),l=a(83260),b=a(17756),h=a(42221),p=a(34260);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);if(u.isArrayLike(e))return i.scheduleArray(e,t);if(d.isPromise(e))return r.schedulePromise(e,t);if(l.isAsyncIterable(e))return c.scheduleAsyncIterable(e,t);if(f.isIterable(e))return o.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return p.scheduleReadableStreamLike(e,t)}throw b.createInvalidObservableTypeError(e)}},12502:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var i=function(e){function t(t,a){return e.call(this)||this}return r(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(a(44666).Subscription);t.Action=i},32142:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var i=a(49462),o=a(29015),c=function(e){function t(t,a){var n=e.call(this,t,a)||this;return n.scheduler=t,n.work=a,n}return r(t,e),t.prototype.requestAsyncId=function(t,a,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,a,n):(t.actions.push(this),t._scheduled||(t._scheduled=o.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,a,n){var r;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,a,n);var i=t.actions;null!=a&&(null===(r=i[i.length-1])||void 0===r?void 0:r.id)!==a&&(o.animationFrameProvider.cancelAnimationFrame(a),t._scheduled=void 0)},t}(i.AsyncAction);t.AnimationFrameAction=c},37104:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var a,n=this.actions;e=e||n.shift();do{if(a=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,a){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw a}},t}(a(19812).AsyncScheduler);t.AnimationFrameScheduler=i},94151:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var i=a(49462),o=a(14409),c=function(e){function t(t,a){var n=e.call(this,t,a)||this;return n.scheduler=t,n.work=a,n}return r(t,e),t.prototype.requestAsyncId=function(t,a,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,a,n):(t.actions.push(this),t._scheduled||(t._scheduled=o.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,a,n){var r;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,a,n);var i=t.actions;null!=a&&(null===(r=i[i.length-1])||void 0===r?void 0:r.id)!==a&&(o.immediateProvider.clearImmediate(a),t._scheduled===a&&(t._scheduled=void 0))},t}(i.AsyncAction);t.AsapAction=c},94726:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var a,n=this.actions;e=e||n.shift();do{if(a=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,a){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw a}},t}(a(19812).AsyncScheduler);t.AsapScheduler=i},49462:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var i=a(12502),o=a(27549),c=a(91291),s=function(e){function t(t,a){var n=e.call(this,t,a)||this;return n.scheduler=t,n.work=a,n.pending=!1,n}return r(t,e),t.prototype.schedule=function(e,t){var a;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=null!==(a=this.id)&&void 0!==a?a:this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,a){return void 0===a&&(a=0),o.intervalProvider.setInterval(e.flush.bind(e,this),a)},t.prototype.recycleAsyncId=function(e,t,a){if(void 0===a&&(a=0),null!=a&&this.delay===a&&!1===this.pending)return t;null!=t&&o.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var a=this._execute(e,t);if(a)return a;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var a,n=!1;try{this.work(e)}catch(e){n=!0,a=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),a},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,a=this.scheduler,n=a.actions;this.work=this.state=this.scheduler=null,this.pending=!1,c.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(a,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i.Action);t.AsyncAction=s},19812:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var i=a(86949),o=function(e){function t(t,a){void 0===a&&(a=i.Scheduler.now);var n=e.call(this,t,a)||this;return n.actions=[],n._active=!1,n}return r(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var a;this._active=!0;do{if(a=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,a){for(;e=t.shift();)e.unsubscribe();throw a}}},t}(i.Scheduler);t.AsyncScheduler=o},85336:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var i=function(e){function t(t,a){var n=e.call(this,t,a)||this;return n.scheduler=t,n.work=a,n}return r(t,e),t.prototype.schedule=function(t,a){return void 0===a&&(a=0),a>0?e.prototype.schedule.call(this,t,a):(this.delay=a,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,a){return a>0||this.closed?e.prototype.execute.call(this,t,a):this._execute(t,a)},t.prototype.requestAsyncId=function(t,a,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,a,n):(t.flush(this),0)},t}(a(49462).AsyncAction);t.QueueAction=i},24068:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(a(19812).AsyncScheduler);t.QueueScheduler=i},12929:function(e,t,a){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var i=a(49462),o=a(44666),c=function(e){function t(t,a){void 0===t&&(t=s),void 0===a&&(a=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=a,n.frame=0,n.index=-1,n}return r(t,e),t.prototype.flush=function(){for(var e,t,a=this.actions,n=this.maxFrames;(t=a[0])&&t.delay<=n&&(a.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=a.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(a(19812).AsyncScheduler);t.VirtualTimeScheduler=c;var s=function(e){function t(t,a,n){void 0===n&&(n=t.index+=1);var r=e.call(this,t,a)||this;return r.scheduler=t,r.work=a,r.index=n,r.active=!0,r.index=t.index=n,r}return r(t,e),t.prototype.schedule=function(a,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,a,n);this.active=!1;var r=new t(this.scheduler,this.work);return this.add(r),r.schedule(a,n)}return o.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,a,n){void 0===n&&(n=0),this.delay=e.frame+n;var r=e.actions;return r.push(this),r.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,a){void 0===a&&(a=0)},t.prototype._execute=function(t,a){if(!0===this.active)return e.prototype._execute.call(this,t,a)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(i.AsyncAction);t.VirtualAction=s},34965:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=a(32142),r=a(37104);t.animationFrameScheduler=new r.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},29015:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=a(94151),r=a(94726);t.asapScheduler=new r.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},17152:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=a(49462),r=a(19812);t.asyncScheduler=new r.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},79168:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},14409:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},n=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},84093:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=a(85336),r=a(24068);t.queueScheduler=new r.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},81577:function(e,t){"use strict";var a=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},n=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";function a(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=a,t.iterator=a()},34595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},53659:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19216:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=a(83126);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},99088:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=a(83126);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},50998:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var a,n=1,r={};function i(e){return e in r&&(delete r[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return r[t]=!0,a||(a=Promise.resolve()),a.then((function(){return i(t)&&e()})),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(r).length}}},25722:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=a(83126);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},68499:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=a(83126);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},57298:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=a(83126);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},54043:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=a(83126);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},84544:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=a(42935),r=a(19668);function i(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(i(e))?e.pop():void 0},t.popScheduler=function(e){return r.isScheduler(i(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof i(e)?e.pop():t}},82398:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var a=Array.isArray,n=Object.getPrototypeOf,r=Object.prototype,i=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(a(t))return{args:t,keys:null};if((c=t)&&"object"==typeof c&&n(c)===r){var o=i(t);return{args:o.map((function(e){return t[e]})),keys:o}}}var c;return{args:e,keys:null}}},35034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var a=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&a(e[0])?e[0]:e}},91291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var a=e.indexOf(t);0<=a&&e.splice(a,1)}}},83126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},64800:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,a,n){return e[a]=t[n],e}),{})}},10977:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=a(19179),r=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!r;if(t&&(r={errorThrown:!1,error:null}),e(),t){var a=r,i=a.errorThrown,o=a.error;if(r=null,i)throw o}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&r&&(r.errorThrown=!0,r.error=e)}},75267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,a,n,r){void 0===n&&(n=0),void 0===r&&(r=!1);var i=t.schedule((function(){a(),r?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(i),!r)return i}},98987:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},5445:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},83260:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=a(42935);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},14426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},42935:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},33124:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=a(34595),r=a(42935);t.isInteropObservable=function(e){return r.isFunction(e[n.observable])}},98131:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=a(17630),r=a(42935);t.isIterable=function(e){return r.isFunction(null==e?void 0:e[n.iterator])}},83659:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=a(64174),r=a(42935);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||r.isFunction(e.lift)&&r.isFunction(e.subscribe))}},94283:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=a(42935);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},42221:function(e,t,a){"use strict";var n=this&&this.__generator||function(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]1||s(e,t)}))})}function s(e,t){try{(a=i[e](t)).value instanceof r?Promise.resolve(a.value.v).then(d,u):f(o[0][2],a)}catch(e){f(o[0][3],e)}var a}function d(e){s("next",e)}function u(e){s("throw",e)}function f(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var o=a(42935);t.readableStreamLikeToAsyncGenerator=function(e){return i(this,arguments,(function(){var t,a,i;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,r(t.read())];case 3:return a=n.sent(),i=a.value,a.done?[4,r(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,r(i)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return o.isFunction(null==e?void 0:e.getReader)}},19668:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=a(42935);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},16097:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=a(42935);function r(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=r,t.operate=function(e){return function(t){if(r(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},9364:function(e,t,a){"use strict";var n=this&&this.__read||function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},38781:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(a,n){return!e.call(t,a,n)}}},65250:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=a(98987);function r(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=a(19179),r=a(81577);t.reportUnhandledError=function(e){r.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},17756:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},39002:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=a(22605);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var r=a(24152);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return r.auditTime}});var i=a(35149);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return i.buffer}});var o=a(33189);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return o.bufferCount}});var c=a(99459);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return c.bufferTime}});var s=a(15536);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return s.bufferToggle}});var d=a(27764);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return d.bufferWhen}});var u=a(73056);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return u.catchError}});var f=a(10498);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var l=a(97484);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return l.combineLatestAll}});var b=a(6527);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return b.combineLatest}});var h=a(64755);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var p=a(3792);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return p.concat}});var m=a(90482);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return m.concatAll}});var y=a(31774);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return y.concatMap}});var g=a(63977);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return g.concatMapTo}});var x=a(67672);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return x.concatWith}});var v=a(65561);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return v.connect}});var w=a(78259);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var I=a(23473);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return I.debounce}});var A=a(78390);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return A.debounceTime}});var S=a(24562);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return S.defaultIfEmpty}});var k=a(58151);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return k.delay}});var C=a(40744);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return C.delayWhen}});var E=a(8590);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return E.dematerialize}});var T=a(28406);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return T.distinct}});var P=a(37300);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return P.distinctUntilChanged}});var O=a(84405);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return O.distinctUntilKeyChanged}});var B=a(42787);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return B.elementAt}});var M=a(11665);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return M.endWith}});var R=a(41511);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return R.every}});var N=a(42208);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return N.exhaust}});var D=a(62008);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return D.exhaustAll}});var V=a(84019);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return V.exhaustMap}});var L=a(29101);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return L.expand}});var U=a(47261);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return U.filter}});var H=a(55381);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return H.finalize}});var K=a(24127);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return K.find}});var F=a(69727);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return F.findIndex}});var j=a(87418);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return j.first}});var q=a(7533);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return q.groupBy}});var z=a(89186);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var W=a(27757);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return W.isEmpty}});var G=a(83374);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return G.last}});var X=a(56269);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return X.map}});var Z=a(55471);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return Z.mapTo}});var J=a(21160);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return J.materialize}});var Y=a(91890);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return Y.max}});var Q=a(33982);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Q.merge}});var _=a(40400);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return _.mergeAll}});var $=a(89121);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return $.flatMap}});var ee=a(36086);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=a(71244);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var ae=a(23699);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return ae.mergeScan}});var ne=a(98220);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var re=a(90770);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return re.min}});var ie=a(68413);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ie.multicast}});var oe=a(89314);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return oe.observeOn}});var ce=a(31899);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ce.onErrorResumeNext}});var se=a(31186);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return se.pairwise}});var de=a(9857);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return de.partition}});var ue=a(39532);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return ue.pluck}});var fe=a(5745);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var le=a(48103);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return le.publishBehavior}});var be=a(22610);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return be.publishLast}});var he=a(45299);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var pe=a(26699);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return pe.race}});var me=a(73820);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return me.raceWith}});var ye=a(78083);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ye.reduce}});var ge=a(72588);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return ge.repeat}});var xe=a(79249);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return xe.repeatWhen}});var ve=a(74486);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return ve.retry}});var we=a(59112);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Ie=a(14508);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Ie.refCount}});var Ae=a(20778);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Ae.sample}});var Se=a(67701);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Se.sampleTime}});var ke=a(18167);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return ke.scan}});var Ce=a(57821);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Ce.sequenceEqual}});var Ee=a(52645);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Ee.share}});var Te=a(27566);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Te.shareReplay}});var Pe=a(44610);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Pe.single}});var Oe=a(75735);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Oe.skip}});var Be=a(63252);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Be.skipLast}});var Me=a(81779);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Me.skipUntil}});var Re=a(45454);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Re.skipWhile}});var Ne=a(1923);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ne.startWith}});var De=a(79130);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return De.subscribeOn}});var Ve=a(91695);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ve.switchAll}});var Le=a(66649);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Le.switchMap}});var Ue=a(83054);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Ue.switchMapTo}});var He=a(62890);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return He.switchScan}});var Ke=a(29438);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ke.take}});var Fe=a(74125);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Fe.takeLast}});var je=a(37549);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return je.takeUntil}});var qe=a(85884);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return qe.takeWhile}});var ze=a(5383);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var We=a(11016);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return We.throttle}});var Ge=a(90567);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ge.throttleTime}});var Xe=a(21332);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Xe.throwIfEmpty}});var Ze=a(51149);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Ze.timeInterval}});var Je=a(54485);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Je.timeout}});var Ye=a(94972);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ye.timeoutWith}});var Qe=a(11275);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Qe.timestamp}});var _e=a(29867);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return _e.toArray}});var $e=a(17649);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return $e.window}});var et=a(75612);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=a(59972);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var at=a(49593);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return at.windowToggle}});var nt=a(26307);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var rt=a(35512);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return rt.withLatestFrom}});var it=a(40586);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return it.zip}});var ot=a(81221);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ot.zipAll}});var ct=a(97594);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ct.zipWith}})},56130:(e,t,a)=>{"use strict";a.d(t,{X:()=>r});var n=a(2995),r=function(e){function t(t){var a=e.call(this)||this;return a._value=t,a}return(0,n.ZT)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var a=e.prototype._subscribe.call(this,t);return!a.closed&&t.next(this._value),a},t.prototype.getValue=function(){var e=this,t=e.hasError,a=e.thrownError,n=e._value;if(t)throw a;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(a(31148).x)},3919:(e,t,a)=>{"use strict";a.d(t,{y:()=>f});var n=a(90471),r=a(20124),i=a(34105),o=a(69676);function c(e){return 0===e.length?o.y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var s=a(64020),d=a(59126),u=a(24831),f=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var a=new e;return a.source=this,a.operator=t,a},e.prototype.subscribe=function(e,t,a){var i,o=this,c=(i=e)&&i instanceof n.Lv||function(e){return e&&(0,d.m)(e.next)&&(0,d.m)(e.error)&&(0,d.m)(e.complete)}(i)&&(0,r.Nn)(i)?e:new n.Hp(e,t,a);return(0,u.x)((function(){var e=o,t=e.operator,a=e.source;c.add(t?t.call(c,a):a?o._subscribe(c):o._trySubscribe(c))})),c},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var a=this;return new(t=l(t))((function(t,r){var i=new n.Hp({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});a.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[i.L]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t{"use strict";a.d(t,{x:()=>d});var n=a(2995),r=a(3919),i=a(20124),o=(0,a(5589).d)((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),c=a(37990),s=a(24831),d=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,n.ZT)(t,e),t.prototype.lift=function(e){var t=new u(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new o},t.prototype.next=function(e){var t=this;(0,s.x)((function(){var a,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=(0,n.XA)(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){a={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}}}))},t.prototype.error=function(e){var t=this;(0,s.x)((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var a=t.observers;a.length;)a.shift().error(e)}}))},t.prototype.complete=function(){var e=this;(0,s.x)((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,a=this,n=a.hasError,r=a.isStopped,o=a.observers;return n||r?i.Lc:(this.currentObservers=null,o.push(e),new i.w0((function(){t.currentObservers=null,(0,c.P)(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,a=t.hasError,n=t.thrownError,r=t.isStopped;a?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new r.y;return e.source=this,e},t.create=function(e,t){return new u(e,t)},t}(r.y),u=function(e){function t(t,a){var n=e.call(this)||this;return n.destination=t,n.source=a,n}return(0,n.ZT)(t,e),t.prototype.next=function(e){var t,a;null===(a=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===a||a.call(t,e)},t.prototype.error=function(e){var t,a;null===(a=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===a||a.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,a;return null!==(a=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==a?a:i.Lc},t}(d)},90471:(e,t,a)=>{"use strict";a.d(t,{Hp:()=>y,Lv:()=>b});var n=a(2995),r=a(59126),i=a(20124),o=a(64020),c=a(66278);function s(){}var d=u("C",void 0,void 0);function u(e,t,a){return{kind:e,value:t,error:a}}var f=a(90561),l=a(24831),b=function(e){function t(t){var a=e.call(this)||this;return a.isStopped=!1,t?(a.destination=t,(0,i.Nn)(t)&&t.add(a)):a.destination=v,a}return(0,n.ZT)(t,e),t.create=function(e,t,a){return new y(e,t,a)},t.prototype.next=function(e){this.isStopped?x(function(e){return u("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?x(u("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?x(d,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(i.w0),h=Function.prototype.bind;function p(e,t){return h.call(e,t)}var m=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){g(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){g(e)}else g(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){g(e)}},e}(),y=function(e){function t(t,a,n){var i,c,s=e.call(this)||this;return(0,r.m)(t)||!t?i={next:null!=t?t:void 0,error:null!=a?a:void 0,complete:null!=n?n:void 0}:s&&o.v.useDeprecatedNextContext?((c=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&p(t.next,c),error:t.error&&p(t.error,c),complete:t.complete&&p(t.complete,c)}):i=t,s.destination=new m(i),s}return(0,n.ZT)(t,e),t}(b);function g(e){o.v.useDeprecatedSynchronousErrorHandling?(0,l.O)(e):(0,c.h)(e)}function x(e,t){var a=o.v.onStoppedNotification;a&&f.z.setTimeout((function(){return a(e,t)}))}var v={closed:!0,next:s,error:function(e){throw e},complete:s}},20124:(e,t,a)=>{"use strict";a.d(t,{Lc:()=>s,w0:()=>c,Nn:()=>d});var n=a(2995),r=a(59126),i=(0,a(5589).d)((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}})),o=a(37990),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,a,o,c;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var d=(0,n.XA)(s),f=d.next();!f.done;f=d.next())f.value.remove(this)}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}else s.remove(this);var l=this.initialTeardown;if((0,r.m)(l))try{l()}catch(e){c=e instanceof i?e.errors:[e]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var h=(0,n.XA)(b),p=h.next();!p.done;p=h.next()){var m=p.value;try{u(m)}catch(e){c=null!=c?c:[],e instanceof i?c=(0,n.ev)((0,n.ev)([],(0,n.CR)(c)),(0,n.CR)(e.errors)):c.push(e)}}}catch(e){a={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}}if(c)throw new i(c)}},e.prototype.add=function(t){var a;if(t&&t!==this)if(this.closed)u(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(a=this._finalizers)&&void 0!==a?a:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,o.P)(t,e)},e.prototype.remove=function(t){var a=this._finalizers;a&&(0,o.P)(a,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),s=c.EMPTY;function d(e){return e instanceof c||e&&"closed"in e&&(0,r.m)(e.remove)&&(0,r.m)(e.add)&&(0,r.m)(e.unsubscribe)}function u(e){(0,r.m)(e)?e():e.unsubscribe()}},64020:(e,t,a)=>{"use strict";a.d(t,{v:()=>n});var n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},48102:(e,t,a)=>{"use strict";a.d(t,{a:()=>x});var n=a(3919),r=Array.isArray,i=Object.getPrototypeOf,o=Object.prototype,c=Object.keys;function s(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((n=t)&&"object"==typeof n&&i(n)===o){var a=c(t);return{args:a.map((function(e){return t[e]})),keys:a}}}var n;return{args:e,keys:null}}var d=a(90859),u=a(69676),f=a(2995),l=a(77984),b=Array.isArray;function h(e){return(0,l.U)((function(t){return function(e,t){return b(t)?e.apply(void 0,(0,f.ev)([],(0,f.CR)(t))):e(t)}(e,t)}))}var p=a(35747);function m(e,t){return e.reduce((function(e,a,n){return e[a]=t[n],e}),{})}var y=a(67394),g=a(90032);function x(){for(var e=[],t=0;t{"use strict";a.d(t,{E:()=>n});var n=new(a(3919).y)((function(e){return e.complete()}))},90859:(e,t,a)=>{"use strict";a.d(t,{D:()=>v});var n=a(97674),r=a(90032),i=a(1118),o=a(67394);function c(e,t){return void 0===t&&(t=0),(0,i.e)((function(a,n){a.subscribe((0,o.x)(n,(function(a){return(0,r.f)(n,e,(function(){return n.next(a)}),t)}),(function(){return(0,r.f)(n,e,(function(){return n.complete()}),t)}),(function(a){return(0,r.f)(n,e,(function(){return n.error(a)}),t)})))}))}function s(e,t){return void 0===t&&(t=0),(0,i.e)((function(a,n){n.add(e.schedule((function(){return a.subscribe(n)}),t))}))}var d=a(3919),u=a(6149),f=a(59126);function l(e,t){if(!e)throw new Error("Iterable cannot be null");return new d.y((function(a){(0,r.f)(a,t,(function(){var n=e[Symbol.asyncIterator]();(0,r.f)(a,t,(function(){n.next().then((function(e){e.done?a.complete():a.next(e.value)}))}),0,!0)}))}))}var b=a(31053),h=a(51856),p=a(9361),m=a(83651),y=a(41305),g=a(62085),x=a(42141);function v(e,t){return t?function(e,t){if(null!=e){if((0,b.c)(e))return function(e,t){return(0,n.Xf)(e).pipe(s(t),c(t))}(e,t);if((0,p.z)(e))return function(e,t){return new d.y((function(a){var n=0;return t.schedule((function(){n===e.length?a.complete():(a.next(e[n++]),a.closed||this.schedule())}))}))}(e,t);if((0,h.t)(e))return function(e,t){return(0,n.Xf)(e).pipe(s(t),c(t))}(e,t);if((0,y.D)(e))return l(e,t);if((0,m.T)(e))return function(e,t){return new d.y((function(a){var n;return(0,r.f)(a,t,(function(){n=e[u.h](),(0,r.f)(a,t,(function(){var e,t,r;try{t=(e=n.next()).value,r=e.done}catch(e){return void a.error(e)}r?a.complete():a.next(t)}),0,!0)})),function(){return(0,f.m)(null==n?void 0:n.return)&&n.return()}}))}(e,t);if((0,x.L)(e))return function(e,t){return l((0,x.Q)(e),t)}(e,t)}throw(0,g.z)(e)}(e,t):(0,n.Xf)(e)}},97674:(e,t,a)=>{"use strict";a.d(t,{Xf:()=>p});var n=a(2995),r=a(9361),i=a(51856),o=a(3919),c=a(31053),s=a(41305),d=a(62085),u=a(83651),f=a(42141),l=a(59126),b=a(66278),h=a(34105);function p(e){if(e instanceof o.y)return e;if(null!=e){if((0,c.c)(e))return g=e,new o.y((function(e){var t=g[h.L]();if((0,l.m)(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if((0,r.z)(e))return y=e,new o.y((function(e){for(var t=0;t{"use strict";a.d(t,{of:()=>i});var n=a(35747),r=a(90859);function i(){for(var e=[],t=0;t{"use strict";a.d(t,{x:()=>r});var n=a(2995);function r(e,t,a,n,r){return new i(e,t,a,n,r)}var i=function(e){function t(t,a,n,r,i,o){var c=e.call(this,t)||this;return c.onFinalize=i,c.shouldUnsubscribe=o,c._next=a?function(e){try{a(e)}catch(e){t.error(e)}}:e.prototype._next,c._error=r?function(e){try{r(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,c}return(0,n.ZT)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;e.prototype.unsubscribe.call(this),!a&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(a(90471).Lv)},47009:(e,t,a)=>{"use strict";a.d(t,{K:()=>o});var n=a(97674),r=a(67394),i=a(1118);function o(e){return(0,i.e)((function(t,a){var i,c=null,s=!1;c=t.subscribe((0,r.x)(a,void 0,void 0,(function(r){i=(0,n.Xf)(e(r,o(e)(t))),c?(c.unsubscribe(),c=null,i.subscribe(a)):s=!0}))),s&&(c.unsubscribe(),c=null,i.subscribe(a))}))}},77984:(e,t,a)=>{"use strict";a.d(t,{U:()=>i});var n=a(1118),r=a(67394);function i(e,t){return(0,n.e)((function(a,n){var i=0;a.subscribe((0,r.x)(n,(function(a){n.next(e.call(t,a,i++))})))}))}},40878:(e,t,a)=>{"use strict";a.d(t,{z:()=>s});var n=a(77984),r=a(97674),i=a(1118),o=(a(90032),a(67394)),c=a(59126);function s(e,t,a){return void 0===a&&(a=1/0),(0,c.m)(t)?s((function(a,i){return(0,n.U)((function(e,n){return t(a,e,i,n)}))((0,r.Xf)(e(a,i)))}),a):("number"==typeof t&&(a=t),(0,i.e)((function(t,n){return function(e,t,a,n,i,c,s,d){var u=[],f=0,l=0,b=!1,h=function(){!b||u.length||f||t.complete()},p=function(e){return f{"use strict";a.d(t,{_:()=>m});var n=a(2995),r=a(31148),i=a(53874),o=function(e){function t(t,a,n){void 0===t&&(t=1/0),void 0===a&&(a=1/0),void 0===n&&(n=i.l);var r=e.call(this)||this;return r._bufferSize=t,r._windowTime=a,r._timestampProvider=n,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=a===1/0,r._bufferSize=Math.max(1,t),r._windowTime=Math.max(1,a),r}return(0,n.ZT)(t,e),t.prototype.next=function(t){var a=this,n=a.isStopped,r=a._buffer,i=a._infiniteTimeWindow,o=a._timestampProvider,c=a._windowTime;n||(r.push(t),!i&&r.push(o.now()+c)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),a=this._infiniteTimeWindow,n=this._buffer.slice(),r=0;r{"use strict";a.d(t,{x:()=>i});var n=a(1118),r=a(67394);function i(){return(0,n.e)((function(e,t){var a=null;e._refCount++;var n=(0,r.x)(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)a=null;else{var n=e._connection,r=a;a=null,!n||r&&n!==r||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(a=e.connect())}))}},12335:(e,t,a)=>{"use strict";a.d(t,{w:()=>o});var n=a(97674),r=a(1118),i=a(67394);function o(e,t){return(0,r.e)((function(a,r){var o=null,c=0,s=!1,d=function(){return s&&!o&&r.complete()};a.subscribe((0,i.x)(r,(function(a){null==o||o.unsubscribe();var s=0,u=c++;(0,n.Xf)(e(a,u)).subscribe(o=(0,i.x)(r,(function(e){return r.next(t?t(a,e,u,s++):e)}),(function(){o=null,d()})))}),(function(){s=!0,d()})))}))}},11348:(e,t,a)=>{"use strict";a.d(t,{b:()=>c});var n=a(59126),r=a(1118),i=a(67394),o=a(69676);function c(e,t,a){var c=(0,n.m)(e)||t||a?{next:e,error:t,complete:a}:e;return c?(0,r.e)((function(e,t){var a;null===(a=c.subscribe)||void 0===a||a.call(c);var n=!0;e.subscribe((0,i.x)(t,(function(e){var a;null===(a=c.next)||void 0===a||a.call(c,e),t.next(e)}),(function(){var e;n=!1,null===(e=c.complete)||void 0===e||e.call(c),t.complete()}),(function(e){var a;n=!1,null===(a=c.error)||void 0===a||a.call(c,e),t.error(e)}),(function(){var e,t;n&&(null===(e=c.unsubscribe)||void 0===e||e.call(c)),null===(t=c.finalize)||void 0===t||t.call(c)})))})):o.y}},53874:(e,t,a)=>{"use strict";a.d(t,{l:()=>n});var n={now:function(){return(n.delegate||Date).now()},delegate:void 0}},90561:(e,t,a)=>{"use strict";a.d(t,{z:()=>r});var n=a(2995),r={setTimeout:function(e,t){for(var a=[],i=2;i{"use strict";a.d(t,{h:()=>n});var n="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},34105:(e,t,a)=>{"use strict";a.d(t,{L:()=>n});var n="function"==typeof Symbol&&Symbol.observable||"@@observable"},35747:(e,t,a)=>{"use strict";a.d(t,{jO:()=>i,yG:()=>o});var n=a(59126);function r(e){return e[e.length-1]}function i(e){return(0,n.m)(r(e))?e.pop():void 0}function o(e){return(t=r(e))&&(0,n.m)(t.schedule)?e.pop():void 0;var t}},37990:(e,t,a)=>{"use strict";function n(e,t){if(e){var a=e.indexOf(t);0<=a&&e.splice(a,1)}}a.d(t,{P:()=>n})},5589:(e,t,a)=>{"use strict";function n(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}a.d(t,{d:()=>n})},24831:(e,t,a)=>{"use strict";a.d(t,{O:()=>o,x:()=>i});var n=a(64020),r=null;function i(e){if(n.v.useDeprecatedSynchronousErrorHandling){var t=!r;if(t&&(r={errorThrown:!1,error:null}),e(),t){var a=r,i=a.errorThrown,o=a.error;if(r=null,i)throw o}}else e()}function o(e){n.v.useDeprecatedSynchronousErrorHandling&&r&&(r.errorThrown=!0,r.error=e)}},90032:(e,t,a)=>{"use strict";function n(e,t,a,n,r){void 0===n&&(n=0),void 0===r&&(r=!1);var i=t.schedule((function(){a(),r?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(i),!r)return i}a.d(t,{f:()=>n})},69676:(e,t,a)=>{"use strict";function n(e){return e}a.d(t,{y:()=>n})},9361:(e,t,a)=>{"use strict";a.d(t,{z:()=>n});var n=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},41305:(e,t,a)=>{"use strict";a.d(t,{D:()=>r});var n=a(59126);function r(e){return Symbol.asyncIterator&&(0,n.m)(null==e?void 0:e[Symbol.asyncIterator])}},59126:(e,t,a)=>{"use strict";function n(e){return"function"==typeof e}a.d(t,{m:()=>n})},31053:(e,t,a)=>{"use strict";a.d(t,{c:()=>i});var n=a(34105),r=a(59126);function i(e){return(0,r.m)(e[n.L])}},83651:(e,t,a)=>{"use strict";a.d(t,{T:()=>i});var n=a(6149),r=a(59126);function i(e){return(0,r.m)(null==e?void 0:e[n.h])}},51856:(e,t,a)=>{"use strict";a.d(t,{t:()=>r});var n=a(59126);function r(e){return(0,n.m)(null==e?void 0:e.then)}},42141:(e,t,a)=>{"use strict";a.d(t,{L:()=>o,Q:()=>i});var n=a(2995),r=a(59126);function i(e){return(0,n.FC)(this,arguments,(function(){var t,a,r;return(0,n.Jh)(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,n.qq)(t.read())];case 3:return a=i.sent(),r=a.value,a.done?[4,(0,n.qq)(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,(0,n.qq)(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function o(e){return(0,r.m)(null==e?void 0:e.getReader)}},1118:(e,t,a)=>{"use strict";a.d(t,{A:()=>r,e:()=>i});var n=a(59126);function r(e){return(0,n.m)(null==e?void 0:e.lift)}function i(e){return function(t){if(r(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},66278:(e,t,a)=>{"use strict";a.d(t,{h:()=>i});var n=a(64020),r=a(90561);function i(e){r.z.setTimeout((function(){var t=n.v.onUnhandledError;if(!t)throw e;t(e)}))}},62085:(e,t,a)=>{"use strict";function n(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}a.d(t,{z:()=>n})},2995:(e,t,a)=>{"use strict";a.d(t,{CR:()=>s,FC:()=>f,Jh:()=>o,KL:()=>l,XA:()=>c,ZT:()=>r,ev:()=>d,mG:()=>i,qq:()=>u});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}function i(e,t,a,n){return new(a||(a=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,c)}s((n=n.apply(e,t||[])).next())}))}function o(e,t){var a,n,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(a=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function d(e,t,a){if(a||2===arguments.length)for(var n,r=0,i=t.length;r1||c(e,t)}))})}function c(e,t){try{(a=r[e](t)).value instanceof u?Promise.resolve(a.value.v).then(s,d):f(i[0][2],a)}catch(e){f(i[0][3],e)}var a}function s(e){c("next",e)}function d(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=c(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,r){!function(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}(n,r,(t=e[a](t)).done,t.value)}))}}}Object.create,Object.create},77834:(e,t,a)=>{var n=a(48834),r=n.Buffer;function i(e,t){for(var a in e)t[a]=e[a]}function o(e,t,a){return r(e,t,a)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(e,t,a){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,a)},o.alloc=function(e,t,a){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=r(e);return void 0!==t?"string"==typeof a?n.fill(t,a):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},26041:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeJsonParse=function(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}},t.safeJsonStringify=function(e){return"string"==typeof e?e:JSON.stringify(e,((e,t)=>void 0===t?null:t))}},27654:(e,t,a)=>{"use strict";var n,r=a(34406),i=a(48834),o=i.Buffer,c={};for(n in i)i.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(c[n]=i[n]);var s=c.Buffer={};for(n in o)o.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(s[n]=o[n]);if(c.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(e,t,a){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,a)}),s.alloc||(s.alloc=function(e,t,a){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=o(e);return t&&0!==t.length?"string"==typeof a?n.fill(t,a):n.fill(t):n.fill(0),n}),!c.kStringMaxLength)try{c.kStringMaxLength=r.binding("buffer").kStringMaxLength}catch(e){}c.constants||(c.constants={MAX_LENGTH:c.kMaxLength},c.kStringMaxLength&&(c.constants.MAX_STRING_LENGTH=c.kStringMaxLength)),e.exports=c},14689:function(e){"use strict";!function(t){const a=2147483647;function n(e){const t=new Uint32Array([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]);let a=1779033703,n=3144134277,r=1013904242,i=2773480762,o=1359893119,c=2600822924,s=528734635,d=1541459225;const u=new Uint32Array(64);function f(e){let f=0,l=e.length;for(;l>=64;){let b,h,p,m,y,g=a,x=n,v=r,w=i,I=o,A=c,S=s,k=d;for(h=0;h<16;h++)p=f+4*h,u[h]=(255&e[p])<<24|(255&e[p+1])<<16|(255&e[p+2])<<8|255&e[p+3];for(h=16;h<64;h++)b=u[h-2],m=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,b=u[h-15],y=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3,u[h]=(m+u[h-7]|0)+(y+u[h-16]|0)|0;for(h=0;h<64;h++)m=(((I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7))+(I&A^~I&S)|0)+(k+(t[h]+u[h]|0)|0)|0,y=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&x^g&v^x&v)|0,k=S,S=A,A=I,I=w+m|0,w=v,v=x,x=g,g=m+y|0;a=a+g|0,n=n+x|0,r=r+v|0,i=i+w|0,o=o+I|0,c=c+A|0,s=s+S|0,d=d+k|0,f+=64,l-=64}}f(e);let l,b=e.length%64,h=e.length/536870912|0,p=e.length<<3,m=b<56?56:120,y=e.slice(e.length-b,e.length);for(y.push(128),l=b+1;l>>24&255),y.push(h>>>16&255),y.push(h>>>8&255),y.push(h>>>0&255),y.push(p>>>24&255),y.push(p>>>16&255),y.push(p>>>8&255),y.push(p>>>0&255),f(y),[a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,d>>>24&255,d>>>16&255,d>>>8&255,d>>>0&255]}function r(e,t,a){e=e.length<=64?e:n(e);const r=64+t.length+4,i=new Array(r),o=new Array(64);let c,s=[];for(c=0;c<64;c++)i[c]=54;for(c=0;c=r-4;e--){if(i[e]++,i[e]<=255)return;i[e]=0}}for(;a>=32;)d(),s=s.concat(n(o.concat(n(i)))),a-=32;return a>0&&(d(),s=s.concat(n(o.concat(n(i))).slice(0,a))),s}function i(e,t,a,n,r){let i;for(d(e,16*(2*a-1),r,0,16),i=0;i<2*a;i++)s(e,16*i,r,16),c(r,n),d(r,0,e,t+16*i,16);for(i=0;i>>32-t}function c(e,t){d(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(let a=0;a<16;++a)e[a]+=t[a]}function s(e,t,a,n){for(let r=0;r=256)return!1}return!0}function f(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function l(e,t,n,o,c,l,b){if(n=f(n,"N"),o=f(o,"r"),c=f(c,"p"),l=f(l,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>a/128/o)throw new Error("N too large");if(o>a/128/c)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let h=r(e,t,128*c*o);const p=new Uint32Array(32*c*o);for(let e=0;eP&&(t=P);for(let e=0;eP&&(t=P);for(let e=0;e>0&255),h.push(p[e]>>8&255),h.push(p[e]>>16&255),h.push(p[e]>>24&255);const a=r(e,h,l);return b&&b(null,1,a),a}b&&O(B)};if(!b)for(;;){const e=B();if(null!=e)return e}B()}const b={scrypt:function(e,t,a,n,r,i,o){return new Promise((function(c,s){let d=0;o&&o(0),l(e,t,a,n,r,i,(function(e,t,a){if(e)s(e);else if(a)o&&1!==d&&o(1),c(new Uint8Array(a));else if(o&&t!==d)return d=t,o(t)}))}))},syncScrypt:function(e,t,a,n,r,i){return new Uint8Array(l(e,t,a,n,r,i))}};e.exports=b}()},97637:(e,t,a)=>{e.exports=a(15880)(a(39930))},39930:(e,t,a)=>{const n=new(0,a(87554).ec)("secp256k1"),r=n.curve,i=r.n.constructor;function o(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){let a=new i(t);if(a.cmp(r.p)>=0)return null;a=a.toRed(r.red);let o=a.redSqr().redIMul(a).redIAdd(r.b).redSqrt();return 3===e!==o.isOdd()&&(o=o.redNeg()),n.keyPair({pub:{x:a,y:o}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,a){let o=new i(t),c=new i(a);if(o.cmp(r.p)>=0||c.cmp(r.p)>=0)return null;if(o=o.toRed(r.red),c=c.toRed(r.red),(6===e||7===e)&&c.isOdd()!==(7===e))return null;const s=o.redSqr().redIMul(o);return c.redSqr().redISub(s.redIAdd(r.b)).isZero()?n.keyPair({pub:{x:o,y:c}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function c(e,t){const a=t.encode(null,33===e.length);for(let t=0;t0,privateKeyVerify(e){const t=new i(e);return t.cmp(r.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new i(e),a=r.n.sub(t).umod(r.n).toArrayLike(Uint8Array,"be",32);return e.set(a),0},privateKeyTweakAdd(e,t){const a=new i(t);if(a.cmp(r.n)>=0)return 1;if(a.iadd(new i(e)),a.cmp(r.n)>=0&&a.isub(r.n),a.isZero())return 1;const n=a.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let a=new i(t);if(a.cmp(r.n)>=0||a.isZero())return 1;a.imul(new i(e)),a.cmp(r.n)>=0&&(a=a.umod(r.n));const n=a.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:e=>null===o(e)?1:0,publicKeyCreate(e,t){const a=new i(t);return a.cmp(r.n)>=0||a.isZero()?1:(c(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert(e,t){const a=o(t);return null===a?1:(c(e,a.getPublic()),0)},publicKeyNegate(e,t){const a=o(t);if(null===a)return 1;const n=a.getPublic();return n.y=n.y.redNeg(),c(e,n),0},publicKeyCombine(e,t){const a=new Array(t.length);for(let e=0;e=0)return 2;const s=n.getPublic().add(r.g.mul(a));return s.isInfinity()?2:(c(e,s),0)},publicKeyTweakMul(e,t,a){const n=o(t);return null===n?1:(a=new i(a)).cmp(r.n)>=0||a.isZero()?2:(c(e,n.getPublic().mul(a)),0)},signatureNormalize(e){const t=new i(e.subarray(0,32)),a=new i(e.subarray(32,64));return t.cmp(r.n)>=0||a.cmp(r.n)>=0?1:(1===a.cmp(n.nh)&&e.set(r.n.sub(a).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const a=t.subarray(0,32),n=t.subarray(32,64);if(new i(a).cmp(r.n)>=0)return 1;if(new i(n).cmp(r.n)>=0)return 1;const{output:o}=e;let c=o.subarray(4,37);c[0]=0,c.set(a,1);let s=33,d=0;for(;s>1&&0===c[d]&&!(128&c[d+1]);--s,++d);if(c=c.subarray(d),128&c[0])return 1;if(s>1&&0===c[0]&&!(128&c[1]))return 1;let u=o.subarray(39,72);u[0]=0,u.set(n,1);let f=33,l=0;for(;f>1&&0===u[l]&&!(128&u[l+1]);--f,++l);return u=u.subarray(l),128&u[0]||f>1&&0===u[0]&&!(128&u[1])?1:(e.outputlen=6+s+f,o[0]=48,o[1]=e.outputlen-2,o[2]=2,o[3]=c.length,o.set(c,4),o[4+s]=2,o[5+s]=u.length,o.set(u,6+s),0)},signatureImport(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;const a=t[3];if(0===a)return 1;if(5+a>=t.length)return 1;if(2!==t[4+a])return 1;const n=t[5+a];if(0===n)return 1;if(6+a+n!==t.length)return 1;if(128&t[4])return 1;if(a>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[a+6])return 1;if(n>1&&0===t[a+6]&&!(128&t[a+7]))return 1;let o=t.subarray(4,4+a);if(33===o.length&&0===o[0]&&(o=o.subarray(1)),o.length>32)return 1;let c=t.subarray(6+a);if(33===c.length&&0===c[0]&&(c=c.slice(1)),c.length>32)throw new Error("S length is too long");let s=new i(o);s.cmp(r.n)>=0&&(s=new i(0));let d=new i(t.subarray(6+a));return d.cmp(r.n)>=0&&(d=new i(0)),e.set(s.toArrayLike(Uint8Array,"be",32),0),e.set(d.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,a,o,c){if(c){const e=c;c=n=>{const r=e(t,a,null,o,n);if(!(r instanceof Uint8Array&&32===r.length))throw new Error("This is the way");return new i(r)}}const s=new i(a);if(s.cmp(r.n)>=0||s.isZero())return 1;let d;try{d=n.sign(t,a,{canonical:!0,k:c,pers:o})}catch(e){return 1}return e.signature.set(d.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(d.s.toArrayLike(Uint8Array,"be",32),32),e.recid=d.recoveryParam,0},ecdsaVerify(e,t,a){const c={r:e.subarray(0,32),s:e.subarray(32,64)},s=new i(c.r),d=new i(c.s);if(s.cmp(r.n)>=0||d.cmp(r.n)>=0)return 1;if(1===d.cmp(n.nh)||s.isZero()||d.isZero())return 3;const u=o(a);if(null===u)return 2;const f=u.getPublic();return n.verify(t,c,f)?0:3},ecdsaRecover(e,t,a,o){const s={r:t.slice(0,32),s:t.slice(32,64)},d=new i(s.r),u=new i(s.s);if(d.cmp(r.n)>=0||u.cmp(r.n)>=0)return 1;if(d.isZero()||u.isZero())return 2;let f;try{f=n.recoverPubKey(o,s,a)}catch(e){return 2}return c(e,f),0},ecdh(e,t,a,c,s,d,u){const f=o(t);if(null===f)return 1;const l=new i(a);if(l.cmp(r.n)>=0||l.isZero())return 2;const b=f.getPublic().mul(l);if(void 0===s){const t=b.encode(null,!0),a=n.hash().update(t).digest();for(let t=0;t<32;++t)e[t]=a[t]}else{d||(d=new Uint8Array(32));const t=b.getX().toArray("be",32);for(let e=0;e<32;++e)d[e]=t[e];u||(u=new Uint8Array(32));const a=b.getY().toArray("be",32);for(let e=0;e<32;++e)u[e]=a[e];const n=s(d,u,c);if(!(n instanceof Uint8Array&&n.length===e.length))return 2;e.set(n)}return 0}}},15880:e=>{const t="Impossible case. Please create issue.",a="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",r="Public Key could not be parsed",i="Public Key serialization error",o="Signature could not be parsed";function c(e,t){if(!e)throw new Error(t)}function s(e,t,a){if(c(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==a)if(Array.isArray(a)){const n=`Expected ${e} to be an Uint8Array with length [${a.join(", ")}]`;c(a.includes(t.length),n)}else{const n=`Expected ${e} to be an Uint8Array with length ${a}`;c(t.length===a,n)}}function d(e){c("Boolean"===f(e),"Expected compressed to be a Boolean")}function u(e=(e=>new Uint8Array(e)),t){return"function"==typeof e&&(e=e(t)),s("output",e,t),e}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=e=>({contextRandomize(t){if(c(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&s("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:t=>(s("private key",t,32),0===e.privateKeyVerify(t)),privateKeyNegate(a){switch(s("private key",a,32),e.privateKeyNegate(a)){case 0:return a;case 1:throw new Error(t)}},privateKeyTweakAdd(t,n){switch(s("private key",t,32),s("tweak",n,32),e.privateKeyTweakAdd(t,n)){case 0:return t;case 1:throw new Error(a)}},privateKeyTweakMul(t,a){switch(s("private key",t,32),s("tweak",a,32),e.privateKeyTweakMul(t,a)){case 0:return t;case 1:throw new Error(n)}},publicKeyVerify:t=>(s("public key",t,[33,65]),0===e.publicKeyVerify(t)),publicKeyCreate(t,a=!0,n){switch(s("private key",t,32),d(a),n=u(n,a?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(i)}},publicKeyConvert(t,a=!0,n){switch(s("public key",t,[33,65]),d(a),n=u(n,a?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(r);case 2:throw new Error(i)}},publicKeyNegate(a,n=!0,o){switch(s("public key",a,[33,65]),d(n),o=u(o,n?33:65),e.publicKeyNegate(o,a)){case 0:return o;case 1:throw new Error(r);case 2:throw new Error(t);case 3:throw new Error(i)}},publicKeyCombine(t,a=!0,n){c(Array.isArray(t),"Expected public keys to be an Array"),c(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)s("public key",e,[33,65]);switch(d(a),n=u(n,a?33:65),e.publicKeyCombine(n,t)){case 0:return n;case 1:throw new Error(r);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(i)}},publicKeyTweakAdd(t,n,i=!0,o){switch(s("public key",t,[33,65]),s("tweak",n,32),d(i),o=u(o,i?33:65),e.publicKeyTweakAdd(o,t,n)){case 0:return o;case 1:throw new Error(r);case 2:throw new Error(a)}},publicKeyTweakMul(t,a,i=!0,o){switch(s("public key",t,[33,65]),s("tweak",a,32),d(i),o=u(o,i?33:65),e.publicKeyTweakMul(o,t,a)){case 0:return o;case 1:throw new Error(r);case 2:throw new Error(n)}},signatureNormalize(t){switch(s("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(o)}},signatureExport(a,n){s("signature",a,64);const r={output:n=u(n,72),outputlen:72};switch(e.signatureExport(r,a)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(o);case 2:throw new Error(t)}},signatureImport(a,n){switch(s("signature",a),n=u(n,64),e.signatureImport(n,a)){case 0:return n;case 1:throw new Error(o);case 2:throw new Error(t)}},ecdsaSign(a,n,r={},i){s("message",a,32),s("private key",n,32),c("Object"===f(r),"Expected options to be an Object"),void 0!==r.data&&s("options.data",r.data),void 0!==r.noncefn&&c("Function"===f(r.noncefn),"Expected options.noncefn to be a Function");const o={signature:i=u(i,64),recid:null};switch(e.ecdsaSign(o,a,n,r.data,r.noncefn)){case 0:return o;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(t)}},ecdsaVerify(t,a,n){switch(s("signature",t,64),s("message",a,32),s("public key",n,[33,65]),e.ecdsaVerify(t,a,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(o);case 2:throw new Error(r)}},ecdsaRecover(a,n,r,i=!0,l){switch(s("signature",a,64),c("Number"===f(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),s("message",r,32),d(i),l=u(l,i?33:65),e.ecdsaRecover(l,a,n,r)){case 0:return l;case 1:throw new Error(o);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(t)}},ecdh(t,a,n={},i){switch(s("public key",t,[33,65]),s("private key",a,32),c("Object"===f(n),"Expected options to be an Object"),void 0!==n.data&&s("options.data",n.data),void 0!==n.hashfn?(c("Function"===f(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&s("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&s("options.ybuf",n.ybuf,32),s("output",i)):i=u(i,32),e.ecdh(i,t,a,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(r);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}})},73327:(e,t,a)=>{var n=a(77834).Buffer;function r(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}r.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var a=this._block,r=this._blockSize,i=e.length,o=this._len,c=0;c=this._finalSize&&(this._update(this._block),this._block.fill(0));var a=8*this._len;if(a<=4294967295)this._block.writeUInt32BE(a,this._blockSize-4);else{var n=(4294967295&a)>>>0,r=(a-n)/4294967296;this._block.writeUInt32BE(r,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r},9065:(e,t,a)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=a(8820),n.sha1=a(17885),n.sha224=a(58321),n.sha256=a(74424),n.sha384=a(90213),n.sha512=a(55596)},8820:(e,t,a)=>{var n=a(91285),r=a(73327),i=a(77834).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);function s(){this.init(),this._w=c,r.call(this,64,56)}function d(e){return e<<30|e>>>2}function u(e,t,a,n){return 0===e?t&a|~t&n:2===e?t&a|t&n|a&n:t^a^n}n(s,r),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t,a=this._w,n=0|this._a,r=0|this._b,i=0|this._c,c=0|this._d,s=0|this._e,f=0;f<16;++f)a[f]=e.readInt32BE(4*f);for(;f<80;++f)a[f]=a[f-3]^a[f-8]^a[f-14]^a[f-16];for(var l=0;l<80;++l){var b=~~(l/20),h=0|((t=n)<<5|t>>>27)+u(b,r,i,c)+s+a[l]+o[b];s=c,c=i,i=d(r),r=n,n=h}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=c+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=s},17885:(e,t,a)=>{var n=a(91285),r=a(73327),i=a(77834).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);function s(){this.init(),this._w=c,r.call(this,64,56)}function d(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function f(e,t,a,n){return 0===e?t&a|~t&n:2===e?t&a|t&n|a&n:t^a^n}n(s,r),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t,a=this._w,n=0|this._a,r=0|this._b,i=0|this._c,c=0|this._d,s=0|this._e,l=0;l<16;++l)a[l]=e.readInt32BE(4*l);for(;l<80;++l)a[l]=(t=a[l-3]^a[l-8]^a[l-14]^a[l-16])<<1|t>>>31;for(var b=0;b<80;++b){var h=~~(b/20),p=d(n)+f(h,r,i,c)+s+a[b]+o[h]|0;s=c,c=i,i=u(r),r=n,n=p}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=c+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=s},58321:(e,t,a)=>{var n=a(91285),r=a(74424),i=a(73327),o=a(77834).Buffer,c=new Array(64);function s(){this.init(),this._w=c,i.call(this,64,56)}n(s,r),s.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},s.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=s},74424:(e,t,a)=>{var n=a(91285),r=a(73327),i=a(77834).Buffer,o=[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],c=new Array(64);function s(){this.init(),this._w=c,r.call(this,64,56)}function d(e,t,a){return a^e&(t^a)}function u(e,t,a){return e&t|a&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function b(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(s,r),s.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},s.prototype._update=function(e){for(var t,a=this._w,n=0|this._a,r=0|this._b,i=0|this._c,c=0|this._d,s=0|this._e,h=0|this._f,p=0|this._g,m=0|this._h,y=0;y<16;++y)a[y]=e.readInt32BE(4*y);for(;y<64;++y)a[y]=0|(((t=a[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+a[y-7]+b(a[y-15])+a[y-16];for(var g=0;g<64;++g){var x=m+l(s)+d(s,h,p)+o[g]+a[g]|0,v=f(n)+u(n,r,i)|0;m=p,p=h,h=s,s=c+x|0,c=i,i=r,r=n,n=x+v|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=c+this._d|0,this._e=s+this._e|0,this._f=h+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0},s.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=s},90213:(e,t,a)=>{var n=a(91285),r=a(55596),i=a(73327),o=a(77834).Buffer,c=new Array(160);function s(){this.init(),this._w=c,i.call(this,128,112)}n(s,r),s.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},s.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,a,n){e.writeInt32BE(t,n),e.writeInt32BE(a,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=s},55596:(e,t,a)=>{var n=a(91285),r=a(73327),i=a(77834).Buffer,o=[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],c=new Array(160);function s(){this.init(),this._w=c,r.call(this,128,112)}function d(e,t,a){return a^e&(t^a)}function u(e,t,a){return e&t|a&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function b(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0>>0?1:0}n(s,r),s.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},s.prototype._update=function(e){for(var t=this._w,a=0|this._ah,n=0|this._bh,r=0|this._ch,i=0|this._dh,c=0|this._eh,s=0|this._fh,g=0|this._gh,x=0|this._hh,v=0|this._al,w=0|this._bl,I=0|this._cl,A=0|this._dl,S=0|this._el,k=0|this._fl,C=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var P=t[T-30],O=t[T-30+1],B=b(P,O),M=h(O,P),R=p(P=t[T-4],O=t[T-4+1]),N=m(O,P),D=t[T-14],V=t[T-14+1],L=t[T-32],U=t[T-32+1],H=M+V|0,K=B+D+y(H,M)|0;K=(K=K+R+y(H=H+N|0,N)|0)+L+y(H=H+U|0,U)|0,t[T]=K,t[T+1]=H}for(var F=0;F<160;F+=2){K=t[F],H=t[F+1];var j=u(a,n,r),q=u(v,w,I),z=f(a,v),W=f(v,a),G=l(c,S),X=l(S,c),Z=o[F],J=o[F+1],Y=d(c,s,g),Q=d(S,k,C),_=E+X|0,$=x+G+y(_,E)|0;$=($=($=$+Y+y(_=_+Q|0,Q)|0)+Z+y(_=_+J|0,J)|0)+K+y(_=_+H|0,H)|0;var ee=W+q|0,te=z+j+y(ee,W)|0;x=g,E=C,g=s,C=k,s=c,k=S,c=i+$+y(S=A+_|0,A)|0,i=r,A=I,r=n,I=w,n=a,w=v,a=$+te+y(v=_+ee|0,_)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+I|0,this._dl=this._dl+A|0,this._el=this._el+S|0,this._fl=this._fl+k|0,this._gl=this._gl+C|0,this._hl=this._hl+E|0,this._ah=this._ah+a+y(this._al,v)|0,this._bh=this._bh+n+y(this._bl,w)|0,this._ch=this._ch+r+y(this._cl,I)|0,this._dh=this._dh+i+y(this._dl,A)|0,this._eh=this._eh+c+y(this._el,S)|0,this._fh=this._fh+s+y(this._fl,k)|0,this._gh=this._gh+g+y(this._gl,C)|0,this._hh=this._hh+x+y(this._hl,E)|0},s.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,a,n){e.writeInt32BE(t,n),e.writeInt32BE(a,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=s},15452:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const a=e.indexOf(t);return-1===a?[e]:[e.slice(0,a),e.slice(a+t.length)]}},23729:(e,t,a)=>{var n=a(98595),r=a(88120),i=[a(30225)];e.exports=n.createStore(r,i)},30225:(e,t,a)=>{e.exports=function(){return a(35414),{}}},35414:()=>{"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var a,n,r,i,o,c=gap,s=t[e];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(e)),"function"==typeof rep&&(s=rep.call(t,e,s)),typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,o=[],"[object Array]"===Object.prototype.toString.apply(s)){for(i=s.length,a=0;a{var n=a(49511),r=n.slice,i=n.pluck,o=n.each,c=n.bind,s=n.create,d=n.isList,u=n.isFunction,f=n.isObject;e.exports={createStore:b};var l={version:"2.0.12",enabled:!1,get:function(e,t){var a=this.storage.read(this._namespacePrefix+e);return this._deserialize(a,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(a,n){e.call(t,t._deserialize(a),(n||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return b.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return b(this.storage,this.plugins,e)}};function b(e,t,a){a||(a=""),e&&!d(e)&&(e=[e]),t&&!d(t)&&(t=[t]);var n=a?"__storejs_"+a+"_":"",b=a?new RegExp("^"+n):null;if(!/^[a-zA-Z0-9_\-]*$/.test(a))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h={_namespacePrefix:n,_namespaceRegexp:b,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var a=e.read(t)===t;return e.remove(t),a}catch(e){return!1}},_assignPluginFnProp:function(e,t){var a=this[t];this[t]=function(){var t=r(arguments,0),n=this;function i(){if(a)return o(arguments,(function(e,a){t[a]=e})),a.apply(n,t)}var c=[i].concat(t);return e.apply(n,c)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var a="";try{a=JSON.parse(e)}catch(t){a=e}return void 0!==a?a:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(d(e))o(e,(function(e){t._addPlugin(e)}));else if(!i(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!u(e))throw new Error("Plugins must be function values that return objects");var a=e.call(this);if(!f(a))throw new Error("Plugins must return an object of function properties");o(a,(function(a,n){if(!u(a))throw new Error("Bad plugin property: "+n+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(a,n)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;e&&(e.warn?e.warn:e.log).apply(e,arguments)}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},p=s(h,l,{plugins:[]});return p.raw={},o(p,(function(e,t){u(e)&&(p.raw[t]=c(p,e))})),o(e,(function(e){p._addStorage(e)})),o(t,(function(e){p._addPlugin(e)})),p}},49511:(e,t,a)=>{var n=Object.assign?Object.assign:function(e,t,a,n){for(var r=1;r{e.exports=[a(19367),a(50026),a(70240),a(65362),a(90109),a(71884)]},65362:(e,t,a)=>{var n=a(49511),r=n.Global,i=n.trim;e.exports={name:"cookieStorage",read:function(e){if(!e||!d(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(o.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(o.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:c,remove:s,clearAll:function(){c((function(e,t){s(t)}))}};var o=r.document;function c(e){for(var t=o.cookie.split(/; ?/g),a=t.length-1;a>=0;a--)if(i(t[a])){var n=t[a].split("="),r=unescape(n[0]);e(unescape(n[1]),r)}}function s(e){e&&d(e)&&(o.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function d(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(o.cookie)}},19367:(e,t,a)=>{var n=a(49511).Global;function r(){return n.localStorage}function i(e){return r().getItem(e)}e.exports={name:"localStorage",read:i,write:function(e,t){return r().setItem(e,t)},each:function(e){for(var t=r().length-1;t>=0;t--){var a=r().key(t);e(i(a),a)}},remove:function(e){return r().removeItem(e)},clearAll:function(){return r().clear()}}},71884:e=>{e.exports={name:"memoryStorage",read:function(e){return t[e]},write:function(e,a){t[e]=a},each:function(e){for(var a in t)t.hasOwnProperty(a)&&e(t[a],a)},remove:function(e){delete t[e]},clearAll:function(e){t={}}};var t={}},50026:(e,t,a)=>{var n=a(49511).Global;e.exports={name:"oldFF-globalStorage",read:function(e){return r[e]},write:function(e,t){r[e]=t},each:i,remove:function(e){return r.removeItem(e)},clearAll:function(){i((function(e,t){delete r[e]}))}};var r=n.globalStorage;function i(e){for(var t=r.length-1;t>=0;t--){var a=r.key(t);e(r[a],a)}}},70240:(e,t,a)=>{var n=a(49511).Global;e.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!c){var a=d(e);o((function(e){e.setAttribute(a,t),e.save(r)}))}},read:function(e){if(!c){var t=d(e),a=null;return o((function(e){a=e.getAttribute(t)})),a}},each:function(e){o((function(t){for(var a=t.XMLDocument.documentElement.attributes,n=a.length-1;n>=0;n--){var r=a[n];e(t.getAttribute(r.name),r.name)}}))},remove:function(e){var t=d(e);o((function(e){e.removeAttribute(t),e.save(r)}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load(r);for(var a=t.length-1;a>=0;a--)e.removeAttribute(t[a].name);e.save(r)}))}};var r="storejs",i=n.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,a;try{(t=new ActiveXObject("htmlfile")).open(),t.write('