import{StringDecoder as bQ} from"node:string_decoder";import*as r$ from"node:buffer";import*as A$ from"node:stream";var hQ=Object.defineProperty;var dQ=Object.getOwnPropertyNames;var lQ=536870888,g0=globalThis.Buffer,H$=globalThis.crypto,i$=H$;var S0=(N,_)=>function(){return _||(0,N[dQ(N)[0]])((_={exports:{}}).exports,_),_.exports},oQ=(N,_)=>{for(var k in _)hQ(N,k,{get:_[k],enumerable:!0})};var N0=S0({"node_modules/safe-buffer/index.js"(N,_){var k=r$,j=k.Buffer;function F(X,C){for(var P in X)C[P]=X[P]}j.from&&j.alloc&&j.allocUnsafe&&j.allocUnsafeSlow?_.exports=k:(F(k,N),N.Buffer=z);function z(X,C,P){return j(X,C,P)}z.prototype=Object.create(j.prototype),F(j,z),z.from=function(X,C,P){if(typeof X=="number")throw new TypeError("Argument must not be a number");return j(X,C,P)},z.alloc=function(X,C,P){if(typeof X!="number")throw new TypeError("Argument must be a number");var T=j(X);return C!==void 0?typeof P=="string"?T.fill(C,P):T.fill(C):T.fill(0),T},z.allocUnsafe=function(X){if(typeof X!="number")throw new TypeError("Argument must be a number");return j(X)},z.allocUnsafeSlow=function(X){if(typeof X!="number")throw new TypeError("Argument must be a number");return k.SlowBuffer(X)}}}),L$=S0({"node_modules/randombytes/browser.js"(N,_){var k=65536,j=4294967295;function F(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}var z=N0().Buffer,X=i$;X&&X.getRandomValues?_.exports=C:_.exports=F;function C(P,T){if(P>j)throw new RangeError("requested too many random bytes");var W=z.allocUnsafe(P);if(P>0)if(P>k)for(var J=0;J
=this._blockSize;){for(var W=this._blockOffset;W0;++J)this._length[J]+=H,H=this._length[J]/4294967296|0,H>0&&(this._length[J]-=4294967296*H);return this},z.prototype._update=function(){throw new Error("_update is not implemented")},z.prototype.digest=function(X){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var C=this._digest();X!==void 0&&(C=C.toString(X)),this._block.fill(0),this._blockOffset=0;for(var P=0;P<4;++P)this._length[P]=0;return C},z.prototype._digest=function(){throw new Error("_digest is not implemented")},_.exports=z}}),QQ=S0({"node_modules/md5.js/index.js"(N,_){var k=B0(),j=$Q(),F=N0().Buffer,z=new Array(16);function X(){j.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}k(X,j),X.prototype._update=function(){for(var H=z,D=0;D<16;++D)H[D]=this._block.readInt32LE(D*4);var E=this._a,L=this._b,M=this._c,v=this._d;E=P(E,L,M,v,H[0],3614090360,7),v=P(v,E,L,M,H[1],3905402710,12),M=P(M,v,E,L,H[2],606105819,17),L=P(L,M,v,E,H[3],3250441966,22),E=P(E,L,M,v,H[4],4118548399,7),v=P(v,E,L,M,H[5],1200080426,12),M=P(M,v,E,L,H[6],2821735955,17),L=P(L,M,v,E,H[7],4249261313,22),E=P(E,L,M,v,H[8],1770035416,7),v=P(v,E,L,M,H[9],2336552879,12),M=P(M,v,E,L,H[10],4294925233,17),L=P(L,M,v,E,H[11],2304563134,22),E=P(E,L,M,v,H[12],1804603682,7),v=P(v,E,L,M,H[13],4254626195,12),M=P(M,v,E,L,H[14],2792965006,17),L=P(L,M,v,E,H[15],1236535329,22),E=T(E,L,M,v,H[1],4129170786,5),v=T(v,E,L,M,H[6],3225465664,9),M=T(M,v,E,L,H[11],643717713,14),L=T(L,M,v,E,H[0],3921069994,20),E=T(E,L,M,v,H[5],3593408605,5),v=T(v,E,L,M,H[10],38016083,9),M=T(M,v,E,L,H[15],3634488961,14),L=T(L,M,v,E,H[4],3889429448,20),E=T(E,L,M,v,H[9],568446438,5),v=T(v,E,L,M,H[14],3275163606,9),M=T(M,v,E,L,H[3],4107603335,14),L=T(L,M,v,E,H[8],1163531501,20),E=T(E,L,M,v,H[13],2850285829,5),v=T(v,E,L,M,H[2],4243563512,9),M=T(M,v,E,L,H[7],1735328473,14),L=T(L,M,v,E,H[12],2368359562,20),E=W(E,L,M,v,H[5],4294588738,4),v=W(v,E,L,M,H[8],2272392833,11),M=W(M,v,E,L,H[11],1839030562,16),L=W(L,M,v,E,H[14],4259657740,23),E=W(E,L,M,v,H[1],2763975236,4),v=W(v,E,L,M,H[4],1272893353,11),M=W(M,v,E,L,H[7],4139469664,16),L=W(L,M,v,E,H[10],3200236656,23),E=W(E,L,M,v,H[13],681279174,4),v=W(v,E,L,M,H[0],3936430074,11),M=W(M,v,E,L,H[3],3572445317,16),L=W(L,M,v,E,H[6],76029189,23),E=W(E,L,M,v,H[9],3654602809,4),v=W(v,E,L,M,H[12],3873151461,11),M=W(M,v,E,L,H[15],530742520,16),L=W(L,M,v,E,H[2],3299628645,23),E=J(E,L,M,v,H[0],4096336452,6),v=J(v,E,L,M,H[7],1126891415,10),M=J(M,v,E,L,H[14],2878612391,15),L=J(L,M,v,E,H[5],4237533241,21),E=J(E,L,M,v,H[12],1700485571,6),v=J(v,E,L,M,H[3],2399980690,10),M=J(M,v,E,L,H[10],4293915773,15),L=J(L,M,v,E,H[1],2240044497,21),E=J(E,L,M,v,H[8],1873313359,6),v=J(v,E,L,M,H[15],4264355552,10),M=J(M,v,E,L,H[6],2734768916,15),L=J(L,M,v,E,H[13],1309151649,21),E=J(E,L,M,v,H[4],4149444226,6),v=J(v,E,L,M,H[11],3174756917,10),M=J(M,v,E,L,H[2],718787259,15),L=J(L,M,v,E,H[9],3951481745,21),this._a=this._a+E|0,this._b=this._b+L|0,this._c=this._c+M|0,this._d=this._d+v|0},X.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 H=F.allocUnsafe(16);return H.writeInt32LE(this._a,0),H.writeInt32LE(this._b,4),H.writeInt32LE(this._c,8),H.writeInt32LE(this._d,12),H};function C(H,D){return H<>>32-D}function P(H,D,E,L,M,v,q){return C(H+(D&E|~D&L)+M+v|0,q)+D|0}function T(H,D,E,L,M,v,q){return C(H+(D&L|E&~L)+M+v|0,q)+D|0}function W(H,D,E,L,M,v,q){return C(H+(D^E^L)+M+v|0,q)+D|0}function J(H,D,E,L,M,v,q){return C(H+(E^(D|~L))+M+v|0,q)+D|0}_.exports=X}}),YQ=S0({"node_modules/ripemd160/index.js"(N,_){var k=g0,j=B0(),F=$Q(),z=new Array(16),X=[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],C=[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],P=[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],T=[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],W=[0,1518500249,1859775393,2400959708,2840853838],J=[1352829926,1548603684,1836072691,2053994217,0];function H(){F.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}j(H,F),H.prototype._update=function(){for(var g=z,y=0;y<16;++y)g[y]=this._block.readInt32LE(y*4);for(var w=this._a|0,f=this._b|0,b=this._c|0,u=this._d|0,Y0=this._e|0,p=this._a|0,v0=this._b|0,$=this._c|0,Y=this._d|0,G=this._e|0,Z=0;Z<80;Z+=1){var V,I;Z<16?(V=E(w,f,b,u,Y0,g[X[Z]],W[0],P[Z]),I=q(p,v0,$,Y,G,g[C[Z]],J[0],T[Z])):Z<32?(V=L(w,f,b,u,Y0,g[X[Z]],W[1],P[Z]),I=v(p,v0,$,Y,G,g[C[Z]],J[1],T[Z])):Z<48?(V=M(w,f,b,u,Y0,g[X[Z]],W[2],P[Z]),I=M(p,v0,$,Y,G,g[C[Z]],J[2],T[Z])):Z<64?(V=v(w,f,b,u,Y0,g[X[Z]],W[3],P[Z]),I=L(p,v0,$,Y,G,g[C[Z]],J[3],T[Z])):(V=q(w,f,b,u,Y0,g[X[Z]],W[4],P[Z]),I=E(p,v0,$,Y,G,g[C[Z]],J[4],T[Z])),w=Y0,Y0=u,u=D(b,10),b=f,f=V,p=G,G=Y,Y=D($,10),$=v0,v0=I}var O=this._b+b+Y|0;this._b=this._c+u+G|0,this._c=this._d+Y0+p|0,this._d=this._e+w+v0|0,this._e=this._a+f+$|0,this._a=O},H.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 g=k.alloc?k.alloc(20):new k(20);return g.writeInt32LE(this._a,0),g.writeInt32LE(this._b,4),g.writeInt32LE(this._c,8),g.writeInt32LE(this._d,12),g.writeInt32LE(this._e,16),g};function D(g,y){return g<>>32-y}function E(g,y,w,f,b,u,Y0,p){return D(g+(y^w^f)+u+Y0|0,p)+b|0}function L(g,y,w,f,b,u,Y0,p){return D(g+(y&w|~y&f)+u+Y0|0,p)+b|0}function M(g,y,w,f,b,u,Y0,p){return D(g+((y|~w)^f)+u+Y0|0,p)+b|0}function v(g,y,w,f,b,u,Y0,p){return D(g+(y&f|w&~f)+u+Y0|0,p)+b|0}function q(g,y,w,f,b,u,Y0,p){return D(g+(y^(w|~f))+u+Y0|0,p)+b|0}_.exports=H}}),R$=S0({"node_modules/sha.js/hash.js"(N,_){var k=N0().Buffer;function j(F,z){this._block=k.alloc(F),this._finalSize=z,this._blockSize=F,this._len=0}j.prototype.update=function(F,z){typeof F=="string"&&(z=z||"utf8",F=k.from(F,z));for(var X=this._block,C=this._blockSize,P=F.length,T=this._len,W=0;W=this._finalSize&&(this._update(this._block),this._block.fill(0));var X=this._len*8;if(X<=4294967295)this._block.writeUInt32BE(X,this._blockSize-4);else{var C=(X&4294967295)>>>0,P=(X-C)/4294967296;this._block.writeUInt32BE(P,this._blockSize-8),this._block.writeUInt32BE(C,this._blockSize-4)}this._update(this._block);var T=this._hash();return F?T.toString(F):T},j.prototype._update=function(){throw new Error("_update must be implemented by subclass")},_.exports=j}}),uQ=S0({"node_modules/sha.js/sha.js"(N,_){var k=B0(),j=R$(),F=N0().Buffer,z=[1518500249,1859775393,-1894007588,-899497514],X=new Array(80);function C(){this.init(),this._w=X,j.call(this,64,56)}k(C,j),C.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function P(J){return J<<5|J>>>27}function T(J){return J<<30|J>>>2}function W(J,H,D,E){return J===0?H&D|~H&E:J===2?H&D|H&E|D&E:H^D^E}C.prototype._update=function(J){for(var H=this._w,D=this._a|0,E=this._b|0,L=this._c|0,M=this._d|0,v=this._e|0,q=0;q<16;++q)H[q]=J.readInt32BE(q*4);for(;q<80;++q)H[q]=H[q-3]^H[q-8]^H[q-14]^H[q-16];for(var g=0;g<80;++g){var y=~~(g/20),w=P(D)+W(y,E,L,M)+v+H[g]+z[y]|0;v=M,M=L,L=T(E),E=D,D=w}this._a=D+this._a|0,this._b=E+this._b|0,this._c=L+this._c|0,this._d=M+this._d|0,this._e=v+this._e|0},C.prototype._hash=function(){var J=F.allocUnsafe(20);return J.writeInt32BE(this._a|0,0),J.writeInt32BE(this._b|0,4),J.writeInt32BE(this._c|0,8),J.writeInt32BE(this._d|0,12),J.writeInt32BE(this._e|0,16),J},_.exports=C}}),nQ=S0({"node_modules/sha.js/sha1.js"(N,_){var k=B0(),j=R$(),F=N0().Buffer,z=[1518500249,1859775393,-1894007588,-899497514],X=new Array(80);function C(){this.init(),this._w=X,j.call(this,64,56)}k(C,j),C.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function P(H){return H<<1|H>>>31}function T(H){return H<<5|H>>>27}function W(H){return H<<30|H>>>2}function J(H,D,E,L){return H===0?D&E|~D&L:H===2?D&E|D&L|E&L:D^E^L}C.prototype._update=function(H){for(var D=this._w,E=this._a|0,L=this._b|0,M=this._c|0,v=this._d|0,q=this._e|0,g=0;g<16;++g)D[g]=H.readInt32BE(g*4);for(;g<80;++g)D[g]=P(D[g-3]^D[g-8]^D[g-14]^D[g-16]);for(var y=0;y<80;++y){var w=~~(y/20),f=T(E)+J(w,L,M,v)+q+D[y]+z[w]|0;q=v,v=M,M=W(L),L=E,E=f}this._a=E+this._a|0,this._b=L+this._b|0,this._c=M+this._c|0,this._d=v+this._d|0,this._e=q+this._e|0},C.prototype._hash=function(){var H=F.allocUnsafe(20);return H.writeInt32BE(this._a|0,0),H.writeInt32BE(this._b|0,4),H.writeInt32BE(this._c|0,8),H.writeInt32BE(this._d|0,12),H.writeInt32BE(this._e|0,16),H},_.exports=C}}),ZQ=S0({"node_modules/sha.js/sha256.js"(N,_){var k=B0(),j=R$(),F=N0().Buffer,z=[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],X=new Array(64);function C(){this.init(),this._w=X,j.call(this,64,56)}k(C,j),C.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};function P(E,L,M){return M^E&(L^M)}function T(E,L,M){return E&L|M&(E|L)}function W(E){return(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10)}function J(E){return(E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7)}function H(E){return(E>>>7|E<<25)^(E>>>18|E<<14)^E>>>3}function D(E){return(E>>>17|E<<15)^(E>>>19|E<<13)^E>>>10}C.prototype._update=function(E){for(var L=this._w,M=this._a|0,v=this._b|0,q=this._c|0,g=this._d|0,y=this._e|0,w=this._f|0,f=this._g|0,b=this._h|0,u=0;u<16;++u)L[u]=E.readInt32BE(u*4);for(;u<64;++u)L[u]=D(L[u-2])+L[u-7]+H(L[u-15])+L[u-16]|0;for(var Y0=0;Y0<64;++Y0){var p=b+J(y)+P(y,w,f)+z[Y0]+L[Y0]|0,v0=W(M)+T(M,v,q)|0;b=f,f=w,w=y,y=g+p|0,g=q,q=v,v=M,M=p+v0|0}this._a=M+this._a|0,this._b=v+this._b|0,this._c=q+this._c|0,this._d=g+this._d|0,this._e=y+this._e|0,this._f=w+this._f|0,this._g=f+this._g|0,this._h=b+this._h|0},C.prototype._hash=function(){var E=F.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},_.exports=C}}),sQ=S0({"node_modules/sha.js/sha224.js"(N,_){var k=B0(),j=ZQ(),F=R$(),z=N0().Buffer,X=new Array(64);function C(){this.init(),this._w=X,F.call(this,64,56)}k(C,j),C.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},C.prototype._hash=function(){var P=z.allocUnsafe(28);return P.writeInt32BE(this._a,0),P.writeInt32BE(this._b,4),P.writeInt32BE(this._c,8),P.writeInt32BE(this._d,12),P.writeInt32BE(this._e,16),P.writeInt32BE(this._f,20),P.writeInt32BE(this._g,24),P},_.exports=C}}),GQ=S0({"node_modules/sha.js/sha512.js"(N,_){var k=B0(),j=R$(),F=N0().Buffer,z=[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],X=new Array(160);function C(){this.init(),this._w=X,j.call(this,128,112)}k(C,j),C.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};function P(v,q,g){return g^v&(q^g)}function T(v,q,g){return v&q|g&(v|q)}function W(v,q){return(v>>>28|q<<4)^(q>>>2|v<<30)^(q>>>7|v<<25)}function J(v,q){return(v>>>14|q<<18)^(v>>>18|q<<14)^(q>>>9|v<<23)}function H(v,q){return(v>>>1|q<<31)^(v>>>8|q<<24)^v>>>7}function D(v,q){return(v>>>1|q<<31)^(v>>>8|q<<24)^(v>>>7|q<<25)}function E(v,q){return(v>>>19|q<<13)^(q>>>29|v<<3)^v>>>6}function L(v,q){return(v>>>19|q<<13)^(q>>>29|v<<3)^(v>>>6|q<<26)}function M(v,q){return v>>>0>>0?1:0}C.prototype._update=function(v){for(var q=this._w,g=this._ah|0,y=this._bh|0,w=this._ch|0,f=this._dh|0,b=this._eh|0,u=this._fh|0,Y0=this._gh|0,p=this._hh|0,v0=this._al|0,$=this._bl|0,Y=this._cl|0,G=this._dl|0,Z=this._el|0,V=this._fl|0,I=this._gl|0,O=this._hl|0,U=0;U<32;U+=2)q[U]=v.readInt32BE(U*4),q[U+1]=v.readInt32BE(U*4+4);for(;U<160;U+=2){var Q=q[U-30],K=q[U-30+1],R=H(Q,K),A=D(K,Q);Q=q[U-4],K=q[U-4+1];var S=E(Q,K),x=L(K,Q),B=q[U-14],c=q[U-14+1],q0=q[U-32],h=q[U-32+1],d=A+c|0,_0=R+B+M(d,A)|0;d=d+x|0,_0=_0+S+M(d,x)|0,d=d+h|0,_0=_0+q0+M(d,h)|0,q[U]=_0,q[U+1]=d}for(var l=0;l<160;l+=2){_0=q[l],d=q[l+1];var n=T(g,y,w),y0=T(v0,$,Y),t=W(g,v0),s=W(v0,g),w0=J(b,Z),m=J(Z,b),r=z[l],$$=z[l+1],i=P(b,u,Y0),e=P(Z,V,I),x0=O+m|0,o=p+w0+M(x0,O)|0;x0=x0+e|0,o=o+i+M(x0,e)|0,x0=x0+$$|0,o=o+r+M(x0,$$)|0,x0=x0+d|0,o=o+_0+M(x0,d)|0;var a=s+y0|0,p0=t+n+M(a,s)|0;p=Y0,O=I,Y0=u,I=V,u=b,V=Z,Z=G+x0|0,b=f+o+M(Z,G)|0,f=w,G=Y,w=y,Y=$,y=g,$=v0,v0=x0+a|0,g=o+p0+M(v0,x0)|0}this._al=this._al+v0|0,this._bl=this._bl+$|0,this._cl=this._cl+Y|0,this._dl=this._dl+G|0,this._el=this._el+Z|0,this._fl=this._fl+V|0,this._gl=this._gl+I|0,this._hl=this._hl+O|0,this._ah=this._ah+g+M(this._al,v0)|0,this._bh=this._bh+y+M(this._bl,$)|0,this._ch=this._ch+w+M(this._cl,Y)|0,this._dh=this._dh+f+M(this._dl,G)|0,this._eh=this._eh+b+M(this._el,Z)|0,this._fh=this._fh+u+M(this._fl,V)|0,this._gh=this._gh+Y0+M(this._gl,I)|0,this._hh=this._hh+p+M(this._hl,O)|0},C.prototype._hash=function(){var v=F.allocUnsafe(64);function q(g,y,w){v.writeInt32BE(g,w),v.writeInt32BE(y,w+4)}return q(this._ah,this._al,0),q(this._bh,this._bl,8),q(this._ch,this._cl,16),q(this._dh,this._dl,24),q(this._eh,this._el,32),q(this._fh,this._fl,40),q(this._gh,this._gl,48),q(this._hh,this._hl,56),v},_.exports=C}}),tQ=S0({"node_modules/sha.js/sha384.js"(N,_){var k=B0(),j=GQ(),F=R$(),z=N0().Buffer,X=new Array(160);function C(){this.init(),this._w=X,F.call(this,128,112)}k(C,j),C.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},C.prototype._hash=function(){var P=z.allocUnsafe(48);function T(W,J,H){P.writeInt32BE(W,H),P.writeInt32BE(J,H+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),P},_.exports=C}}),VQ=S0({"node_modules/sha.js/index.js"(k,_){var k=_.exports=function(j){j=j.toLowerCase();var F=k[j];if(!F)throw new Error(j+" is not supported (we accept pull requests)");return new F};k.sha=uQ(),k.sha1=nQ(),k.sha224=sQ(),k.sha256=ZQ(),k.sha384=tQ(),k.sha512=GQ()}}),C$=S0({"node_modules/cipher-base/index.js"(N,_){var k=N0().Buffer,j=B0();function F(z){A$.Transform.call(this),this.hashMode=typeof z=="string",this.hashMode?this[z]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}j(F,A$.Transform),F.prototype.update=function(z,X,C){typeof z=="string"&&(z=k.from(z,X));var P=this._update(z);return this.hashMode?this:(C&&(P=this._toString(P,C)),P)},F.prototype.setAutoPadding=function(){},F.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},F.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},F.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},F.prototype._transform=function(z,X,C){var P;try{this.hashMode?this._update(z):this.push(this._update(z))}catch(T){P=T}finally{C(P)}},F.prototype._flush=function(z){var X;try{this.push(this.__final())}catch(C){X=C}z(X)},F.prototype._finalOrDigest=function(z){var X=this.__final()||k.alloc(0);return z&&(X=this._toString(X,z,!0)),X},F.prototype._toString=function(z,X,C){if(this._decoder||(this._decoder=new bQ(X),this._encoding=X),this._encoding!==X)throw new Error("can't switch encodings");var P=this._decoder.write(z);return C&&(P+=this._decoder.end()),P},_.exports=F}}),M$=S0({"node_modules/create-hash/browser.js"(N,_){const k=function z(X,C){this._options=C,this._hasher=new mY(X,C),this._finalized=!1};k.prototype=Object.create(A$.Transform.prototype),k.prototype.update=function z(X,C){return this._checkFinalized(),this._hasher.update(X,C),this},k.prototype.digest=function z(X,C){return this._checkFinalized(),this._finalized=!0,this._hasher.digest(X,C)},k.prototype._checkFinalized=function z(){if(this._finalized){var X=new Error("Digest already called");throw X.code="ERR_CRYPTO_HASH_FINALIZED",X}},k.prototype.copy=function z(){const X=Object.create(k.prototype);return X._options=this._options,X._hasher=this._hasher.copy(),X._finalized=this._finalized,X};const j={__proto__:A$.Transform.prototype,...k.prototype,_transform(z,X,C){this.update(z,X),C&&C()},_flush(z){this.push(this.digest()),z()}},F=["_events","_eventsCount","_final","_maxListeners","_maxListeners","_read","_undestroy","_writableState","_write","_writev","addListener","asIndexedPairs","closed","compose","constructor","cork","destroy","destroyed","drop","emit","end","errored","eventNames","every","filter","find","flatMap","forEach","getMaxListeners","hasOwnProperty","isPaused","isPrototypeOf","iterator","listenerCount","listeners","map","off","on","once","pause","pipe","prependListener","prependOnceListener","propertyIsEnumerable","push","rawListeners","read","readable","readableAborted","readableBuffer","readableDidRead","readableEncoding","readableEnded","readableFlowing","readableHighWaterMark","readableLength","readableObjectMode","reduce","removeAllListeners","removeListener","resume","setDefaultEncoding","setEncoding","setMaxListeners","some","take","toArray","toLocaleString","toString","uncork","unpipe","unshift","valueOf","wrap","writable","writableBuffer","writableCorked","writableEnded","writableFinished","writableHighWaterMark","writableLength","writableNeedDrain","writableObjectMode","write"];for(let z of F)Object.defineProperty(k.prototype,z,{get(){return Object.setPrototypeOf(this,j),A$.Transform.call(this,this._options),this[z]},enumerable:!1,configurable:!0});_.exports=function z(X){return new k(X)},_.exports.createHash=_.exports,_.exports.Hash=k}}),mQ=S0({"node_modules/create-hmac/legacy.js"(N,_){var k=B0(),j=N0().Buffer,F=C$(),z=j.alloc(128),X=64;function C(P,T){F.call(this,"digest"),typeof T=="string"&&(T=j.from(T)),this._alg=P,this._key=T,T.length>X?T=P(T):T.lengthD){var E=J==="rmd160"?new C:P(J);H=E.update(H).digest()}else H.lengthk||F!==F)throw new TypeError("Bad key length")}}}),OQ=S0({"node_modules/pbkdf2/lib/default-encoding.js"(N,_){var k;global.process&&global.process.browser?k="utf-8":global.process&&global.process.version?(j=parseInt(process.version.split(".")[0].slice(1),10),k=j>=6?"utf-8":"binary"):k="utf-8";var j;_.exports=k}}),JQ=S0({"node_modules/pbkdf2/lib/to-buffer.js"(N,_){var k=N0().Buffer;_.exports=function(j,F,z){if(k.isBuffer(j))return j;if(typeof j=="string")return k.from(j,F);if(ArrayBuffer.isView(j))return k.from(j.buffer);throw new TypeError(z+" must be a string, a Buffer, a typed array or a DataView")}}}),FQ=S0({"node_modules/pbkdf2/lib/sync-browser.js"(N,_){var k=UQ(),j=YQ(),F=VQ(),z=N0().Buffer,X=IQ(),C=OQ(),P=JQ(),T=z.alloc(128),W={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function J(E,L,M){var v=H(E),q=E==="sha512"||E==="sha384"?128:64;L.length>q?L=v(L):L.length>>0},N.writeUInt32BE=function(F,z,X){F[0+X]=z>>>24,F[1+X]=z>>>16&255,F[2+X]=z>>>8&255,F[3+X]=z&255},N.ip=function(F,z,X,C){for(var P=0,T=0,W=6;W>=0;W-=2){for(var J=0;J<=24;J+=8)P<<=1,P|=z>>>J+W&1;for(var J=0;J<=24;J+=8)P<<=1,P|=F>>>J+W&1}for(var W=6;W>=0;W-=2){for(var J=1;J<=25;J+=8)T<<=1,T|=z>>>J+W&1;for(var J=1;J<=25;J+=8)T<<=1,T|=F>>>J+W&1}X[C+0]=P>>>0,X[C+1]=T>>>0},N.rip=function(F,z,X,C){for(var P=0,T=0,W=0;W<4;W++)for(var J=24;J>=0;J-=8)P<<=1,P|=z>>>J+W&1,P<<=1,P|=F>>>J+W&1;for(var W=4;W<8;W++)for(var J=24;J>=0;J-=8)T<<=1,T|=z>>>J+W&1,T<<=1,T|=F>>>J+W&1;X[C+0]=P>>>0,X[C+1]=T>>>0},N.pc1=function(F,z,X,C){for(var P=0,T=0,W=7;W>=5;W--){for(var J=0;J<=24;J+=8)P<<=1,P|=z>>J+W&1;for(var J=0;J<=24;J+=8)P<<=1,P|=F>>J+W&1}for(var J=0;J<=24;J+=8)P<<=1,P|=z>>J+W&1;for(var W=1;W<=3;W++){for(var J=0;J<=24;J+=8)T<<=1,T|=z>>J+W&1;for(var J=0;J<=24;J+=8)T<<=1,T|=F>>J+W&1}for(var J=0;J<=24;J+=8)T<<=1,T|=F>>J+W&1;X[C+0]=P>>>0,X[C+1]=T>>>0},N.r28shl=function(F,z){return F<>>28-z};var _=[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];N.pc2=function(F,z,X,C){for(var P=0,T=0,W=_.length>>>1,J=0;J>>_[J]&1;for(var J=W;J<_.length;J++)T<<=1,T|=z>>>_[J]&1;X[C+0]=P>>>0,X[C+1]=T>>>0},N.expand=function(F,z,X){var C=0,P=0;C=(F&1)<<5|F>>>27;for(var T=23;T>=15;T-=4)C<<=6,C|=F>>>T&63;for(var T=11;T>=3;T-=4)P|=F>>>T&63,P<<=6;P|=(F&31)<<1|F>>>31,z[X+0]=C>>>0,z[X+1]=P>>>0};var k=[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];N.substitute=function(F,z){for(var X=0,C=0;C<4;C++){var P=F>>>18-C*6&63,T=k[C*64+P];X<<=4,X|=T}for(var C=0;C<4;C++){var P=z>>>18-C*6&63,T=k[256+C*64+P];X<<=4,X|=T}return X>>>0};var j=[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];N.permute=function(F){for(var z=0,X=0;X>>j[X]&1;return z>>>0},N.padSplit=function(F,z,X){for(var C=F.toString(2);C.length0;C--)z+=this._buffer(F,z),X+=this._flushBuffer(P,X);return z+=this._buffer(F,z),P},j.prototype.final=function(F){var z;F&&(z=this.update(F));var X;return this.type==="encrypt"?X=this._finalEncrypt():X=this._finalDecrypt(),z?z.concat(X):X},j.prototype._pad=function(F,z){if(z===0)return!1;for(;z>>1];J=F.r28shl(J,E),H=F.r28shl(H,E),F.pc2(J,H,T.keys,D)}},C.prototype._update=function(T,W,J,H){var D=this._desState,E=F.readUInt32BE(T,W),L=F.readUInt32BE(T,W+4);F.ip(E,L,D.tmp,0),E=D.tmp[0],L=D.tmp[1],this.type==="encrypt"?this._encrypt(D,E,L,D.tmp,0):this._decrypt(D,E,L,D.tmp,0),E=D.tmp[0],L=D.tmp[1],F.writeUInt32BE(J,E,H),F.writeUInt32BE(J,L,H+4)},C.prototype._pad=function(T,W){for(var J=T.length-W,H=W;H>>0,E=w}F.rip(L,E,H,D)},C.prototype._decrypt=function(T,W,J,H,D){for(var E=J,L=W,M=T.keys.length-2;M>=0;M-=2){var v=T.keys[M],q=T.keys[M+1];F.expand(E,T.tmp,0),v^=T.tmp[0],q^=T.tmp[1];var g=F.substitute(v,q),y=F.permute(g),w=E;E=(L^y)>>>0,L=w}F.rip(E,L,H,D)}}}),rQ=S0({"node_modules/des.js/lib/des/cbc.js"(N){var _=W$(),k=B0(),j={};function F(X){_.equal(X.length,8,"Invalid IV length"),this.iv=new Array(8);for(var C=0;C>P%8,F._prev=j(F._prev,X?J:H);return W}function j(F,z){var X=F.length,C=-1,P=_.allocUnsafe(F.length);for(F=_.concat([F,_.from([z])]);++C>7;return P}N.encrypt=function(F,z,X){for(var C=z.length,P=_.allocUnsafe(C),T=-1;++T>>24]^L[g>>>16&255]^M[y>>>8&255]^v[w&255]^W[p++],b=E[g>>>24]^L[y>>>16&255]^M[w>>>8&255]^v[q&255]^W[p++],u=E[y>>>24]^L[w>>>16&255]^M[q>>>8&255]^v[g&255]^W[p++],Y0=E[w>>>24]^L[q>>>16&255]^M[g>>>8&255]^v[y&255]^W[p++],q=f,g=b,y=u,w=Y0;return f=(H[q>>>24]<<24|H[g>>>16&255]<<16|H[y>>>8&255]<<8|H[w&255])^W[p++],b=(H[g>>>24]<<24|H[y>>>16&255]<<16|H[w>>>8&255]<<8|H[q&255])^W[p++],u=(H[y>>>24]<<24|H[w>>>16&255]<<16|H[q>>>8&255]<<8|H[g&255])^W[p++],Y0=(H[w>>>24]<<24|H[q>>>16&255]<<16|H[g>>>8&255]<<8|H[y&255])^W[p++],f=f>>>0,b=b>>>0,u=u>>>0,Y0=Y0>>>0,[f,b,u,Y0]}var X=[0,1,2,4,8,16,32,64,128,27,54],C=function(){for(var T=new Array(256),W=0;W<256;W++)W<128?T[W]=W<<1:T[W]=W<<1^283;for(var J=[],H=[],D=[[],[],[],[]],E=[[],[],[],[]],L=0,M=0,v=0;v<256;++v){var q=M^M<<1^M<<2^M<<3^M<<4;q=q>>>8^q&255^99,J[L]=q,H[q]=L;var g=T[L],y=T[g],w=T[y],f=T[q]*257^q*16843008;D[0][L]=f<<24|f>>>8,D[1][L]=f<<16|f>>>16,D[2][L]=f<<8|f>>>24,D[3][L]=f,f=w*16843009^y*65537^g*257^L*16843008,E[0][q]=f<<24|f>>>8,E[1][q]=f<<16|f>>>16,E[2][q]=f<<8|f>>>24,E[3][q]=f,L===0?L=M=1:(L=g^T[T[T[w^g]]],M^=T[T[M]])}return{SBOX:J,INV_SBOX:H,SUB_MIX:D,INV_SUB_MIX:E}}();function P(T){this._key=j(T),this._reset()}P.blockSize=16,P.keySize=32,P.prototype.blockSize=P.blockSize,P.prototype.keySize=P.keySize,P.prototype._reset=function(){for(var T=this._key,W=T.length,J=W+6,H=(J+1)*4,D=[],E=0;E>>24,L=C.SBOX[L>>>24]<<24|C.SBOX[L>>>16&255]<<16|C.SBOX[L>>>8&255]<<8|C.SBOX[L&255],L^=X[E/W|0]<<24):W>6&&E%W===4&&(L=C.SBOX[L>>>24]<<24|C.SBOX[L>>>16&255]<<16|C.SBOX[L>>>8&255]<<8|C.SBOX[L&255]),D[E]=D[E-W]^L}for(var M=[],v=0;v>>24]]^C.INV_SUB_MIX[1][C.SBOX[g>>>16&255]]^C.INV_SUB_MIX[2][C.SBOX[g>>>8&255]]^C.INV_SUB_MIX[3][C.SBOX[g&255]]}this._nRounds=J,this._keySchedule=D,this._invKeySchedule=M},P.prototype.encryptBlockRaw=function(T){return T=j(T),z(T,this._keySchedule,C.SUB_MIX,C.SBOX,this._nRounds)},P.prototype.encryptBlock=function(T){var W=this.encryptBlockRaw(T),J=k.allocUnsafe(16);return J.writeUInt32BE(W[0],0),J.writeUInt32BE(W[1],4),J.writeUInt32BE(W[2],8),J.writeUInt32BE(W[3],12),J},P.prototype.decryptBlock=function(T){T=j(T);var W=T[1];T[1]=T[3],T[3]=W;var J=z(T,this._invKeySchedule,C.INV_SUB_MIX,C.INV_SBOX,this._nRounds),H=k.allocUnsafe(16);return H.writeUInt32BE(J[0],0),H.writeUInt32BE(J[3],4),H.writeUInt32BE(J[2],8),H.writeUInt32BE(J[1],12),H},P.prototype.scrub=function(){F(this._keySchedule),F(this._invKeySchedule),F(this._key)},_.exports.AES=P}}),KY=S0({"node_modules/browserify-aes/ghash.js"(N,_){var k=N0().Buffer,j=k.alloc(16,0);function F(C){return[C.readUInt32BE(0),C.readUInt32BE(4),C.readUInt32BE(8),C.readUInt32BE(12)]}function z(C){var P=k.allocUnsafe(16);return P.writeUInt32BE(C[0]>>>0,0),P.writeUInt32BE(C[1]>>>0,4),P.writeUInt32BE(C[2]>>>0,8),P.writeUInt32BE(C[3]>>>0,12),P}function X(C){this.h=C,this.state=k.alloc(16,0),this.cache=k.allocUnsafe(0)}X.prototype.ghash=function(C){for(var P=-1;++P0;T--)C[T]=C[T]>>>1|(C[T-1]&1)<<31;C[0]=C[0]>>>1,J&&(C[0]=C[0]^225<<24)}this.state=z(P)},X.prototype.update=function(C){this.cache=k.concat([this.cache,C]);for(var P;this.cache.length>=16;)P=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(P)},X.prototype.final=function(C,P){return this.cache.length&&this.ghash(k.concat([this.cache,j],16)),this.ghash(z([0,C,0,P])),this.state},_.exports=X}}),DQ=S0({"node_modules/browserify-aes/authCipher.js"(N,_){var k=q$(),j=N0().Buffer,F=C$(),z=B0(),X=KY(),C=S$(),P=EQ();function T(H,D){var E=0;H.length!==D.length&&E++;for(var L=Math.min(H.length,D.length),M=0;M0||P>0;){var D=new j;D.update(H),D.update(z),X&&D.update(X),H=D.digest();var E=0;if(T>0){var L=W.length-T;E=Math.min(T,H.length),H.copy(W,L,0,E),T-=E}if(E0){var M=J.length-P,v=Math.min(P,H.length-E);H.copy(J,M,E,E+v),P-=v}}return H.fill(0),{key:W,iv:J}}_.exports=F}}),IY=S0({"node_modules/browserify-aes/encrypter.js"(N){var _=w$(),k=DQ(),j=N0().Buffer,F=CQ(),z=C$(),X=q$(),C=j$(),P=B0();function T(E,L,M){z.call(this),this._cache=new J,this._cipher=new X.AES(L),this._prev=j.from(M),this._mode=E,this._autopadding=!0}P(T,z),T.prototype._update=function(E){this._cache.add(E);for(var L,M,v=[];L=this._cache.get();)M=this._mode.encrypt(this,L),v.push(M);return j.concat(v)};var W=j.alloc(16,16);T.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(W))throw this._cipher.scrub(),new Error("data not multiple of block length")},T.prototype.setAutoPadding=function(E){return this._autopadding=!!E,this};function J(){this.cache=j.allocUnsafe(0)}J.prototype.add=function(E){this.cache=j.concat([this.cache,E])},J.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},J.prototype.flush=function(){for(var E=16-this.cache.length,L=j.allocUnsafe(E),M=-1;++M16)return L=this.cache.slice(0,16),this.cache=this.cache.slice(16),L}else if(this.cache.length>=16)return L=this.cache.slice(0,16),this.cache=this.cache.slice(16),L;return null},W.prototype.flush=function(){if(this.cache.length)return this.cache};function J(E){var L=E[15];if(L<1||L>16)throw new Error("unable to decrypt data");for(var M=-1;++M0?$:Y},X.min=function($,Y){return $.cmp(Y)<0?$:Y},X.prototype._init=function($,Y,G){if(typeof $=="number")return this._initNumber($,Y,G);if(typeof $=="object")return this._initArray($,Y,G);Y==="hex"&&(Y=16),F(Y===(Y|0)&&Y>=2&&Y<=36),$=$.toString().replace(/\s+/g,"");var Z=0;$[0]==="-"&&(Z++,this.negative=1),Z<$.length&&(Y===16?this._parseHex($,Z,G):(this._parseBase($,Y,Z),G==="le"&&this._initArray(this.toArray(),Y,G)))},X.prototype._initNumber=function($,Y,G){$<0&&(this.negative=1,$=-$),$<67108864?(this.words=[$&67108863],this.length=1):$<4503599627370496?(this.words=[$&67108863,$/67108864&67108863],this.length=2):(F($<9007199254740992),this.words=[$&67108863,$/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Y,G)},X.prototype._initArray=function($,Y,G){if(F(typeof $.length=="number"),$.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil($.length/3),this.words=new Array(this.length);for(var Z=0;Z=0;Z-=3)I=$[Z]|$[Z-1]<<8|$[Z-2]<<16,this.words[V]|=I<>>26-O&67108863,O+=24,O>=26&&(O-=26,V++);else if(G==="le")for(Z=0,V=0;Z<$.length;Z+=3)I=$[Z]|$[Z+1]<<8|$[Z+2]<<16,this.words[V]|=I<>>26-O&67108863,O+=24,O>=26&&(O-=26,V++);return this.strip()};function P($,Y){var G=$.charCodeAt(Y);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function T($,Y,G){var Z=P($,G);return G-1>=Y&&(Z|=P($,G-1)<<4),Z}X.prototype._parseHex=function($,Y,G){this.length=Math.ceil(($.length-Y)/6),this.words=new Array(this.length);for(var Z=0;Z=Y;Z-=2)O=T($,Y,Z)<=18?(V-=18,I+=1,this.words[I]|=O>>>26):V+=8;else{var U=$.length-Y;for(Z=U%2===0?Y+1:Y;Z<$.length;Z+=2)O=T($,Y,Z)<=18?(V-=18,I+=1,this.words[I]|=O>>>26):V+=8}this.strip()};function W($,Y,G,Z){for(var V=0,I=Math.min($.length,G),O=Y;O=49?V+=U-49+10:U>=17?V+=U-17+10:V+=U}return V}X.prototype._parseBase=function($,Y,G){this.words=[0],this.length=1;for(var Z=0,V=1;V<=67108863;V*=Y)Z++;Z--,V=V/Y|0;for(var I=$.length-G,O=I%Z,U=Math.min(I,I-O)+G,Q=0,K=G;K1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},X.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},X.prototype.inspect=function(){return(this.red?""};var J=["","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"],H=[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],D=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];X.prototype.toString=function($,Y){$=$||10,Y=Y|0||1;var G;if($===16||$==="hex"){G="";for(var Z=0,V=0,I=0;I>>24-Z&16777215,V!==0||I!==this.length-1?G=J[6-U.length]+U+G:G=U+G,Z+=2,Z>=26&&(Z-=26,I--)}for(V!==0&&(G=V.toString(16)+G);G.length%Y!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if($===($|0)&&$>=2&&$<=36){var Q=H[$],K=D[$];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var A=R.modn(K).toString($);R=R.idivn(K),R.isZero()?G=A+G:G=J[Q-A.length]+A+G}for(this.isZero()&&(G="0"+G);G.length%Y!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}F(!1,"Base should be between 2 and 36")},X.prototype.toNumber=function(){var $=this.words[0];return this.length===2?$+=this.words[1]*67108864:this.length===3&&this.words[2]===1?$+=4503599627370496+this.words[1]*67108864:this.length>2&&F(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-$:$},X.prototype.toJSON=function(){return this.toString(16)},X.prototype.toBuffer=function($,Y){return F(typeof C<"u"),this.toArrayLike(C,$,Y)},X.prototype.toArray=function($,Y){return this.toArrayLike(Array,$,Y)},X.prototype.toArrayLike=function($,Y,G){var Z=this.byteLength(),V=G||Math.max(1,Z);F(Z<=V,"byte array longer than desired length"),F(V>0,"Requested array length <= 0"),this.strip();var I=Y==="le",O=new $(V),U,Q,K=this.clone();if(I){for(Q=0;!K.isZero();Q++)U=K.andln(255),K.iushrn(8),O[Q]=U;for(;Q=4096&&(G+=13,Y>>>=13),Y>=64&&(G+=7,Y>>>=7),Y>=8&&(G+=4,Y>>>=4),Y>=2&&(G+=2,Y>>>=2),G+Y},X.prototype._zeroBits=function($){if($===0)return 26;var Y=$,G=0;return(Y&8191)===0&&(G+=13,Y>>>=13),(Y&127)===0&&(G+=7,Y>>>=7),(Y&15)===0&&(G+=4,Y>>>=4),(Y&3)===0&&(G+=2,Y>>>=2),(Y&1)===0&&G++,G},X.prototype.bitLength=function(){var $=this.words[this.length-1],Y=this._countBits($);return(this.length-1)*26+Y};function E($){for(var Y=new Array($.bitLength()),G=0;G>>V}return Y}X.prototype.zeroBits=function(){if(this.isZero())return 0;for(var $=0,Y=0;Y$.length?this.clone().ior($):$.clone().ior(this)},X.prototype.uor=function($){return this.length>$.length?this.clone().iuor($):$.clone().iuor(this)},X.prototype.iuand=function($){var Y;this.length>$.length?Y=$:Y=this;for(var G=0;G$.length?this.clone().iand($):$.clone().iand(this)},X.prototype.uand=function($){return this.length>$.length?this.clone().iuand($):$.clone().iuand(this)},X.prototype.iuxor=function($){var Y,G;this.length>$.length?(Y=this,G=$):(Y=$,G=this);for(var Z=0;Z$.length?this.clone().ixor($):$.clone().ixor(this)},X.prototype.uxor=function($){return this.length>$.length?this.clone().iuxor($):$.clone().iuxor(this)},X.prototype.inotn=function($){F(typeof $=="number"&&$>=0);var Y=Math.ceil($/26)|0,G=$%26;this._expand(Y),G>0&&Y--;for(var Z=0;Z0&&(this.words[Z]=~this.words[Z]&67108863>>26-G),this.strip()},X.prototype.notn=function($){return this.clone().inotn($)},X.prototype.setn=function($,Y){F(typeof $=="number"&&$>=0);var G=$/26|0,Z=$%26;return this._expand(G+1),Y?this.words[G]=this.words[G]|1<$.length?(G=this,Z=$):(G=$,Z=this);for(var V=0,I=0;I>>26;for(;V!==0&&I>>26;if(this.length=G.length,V!==0)this.words[this.length]=V,this.length++;else if(G!==this)for(;I$.length?this.clone().iadd($):$.clone().iadd(this)},X.prototype.isub=function($){if($.negative!==0){$.negative=0;var Y=this.iadd($);return $.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd($),this.negative=1,this._normSign();var G=this.cmp($);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,V;G>0?(Z=this,V=$):(Z=$,V=this);for(var I=0,O=0;O>26,this.words[O]=Y&67108863;for(;I!==0&&O>26,this.words[O]=Y&67108863;if(I===0&&O>>26,A=Q&67108863,S=Math.min(K,Y.length-1),x=Math.max(0,K-$.length+1);x<=S;x++){var B=K-x|0;V=$.words[B]|0,I=Y.words[x]|0,O=V*I+A,R+=O/67108864|0,A=O&67108863}G.words[K]=A|0,Q=R|0}return Q!==0?G.words[K]=Q|0:G.length--,G.strip()}var M=function($,Y,G){var Z=$.words,V=Y.words,I=G.words,O=0,U,Q,K,R=Z[0]|0,A=R&8191,S=R>>>13,x=Z[1]|0,B=x&8191,c=x>>>13,q0=Z[2]|0,h=q0&8191,d=q0>>>13,_0=Z[3]|0,l=_0&8191,n=_0>>>13,y0=Z[4]|0,t=y0&8191,s=y0>>>13,w0=Z[5]|0,m=w0&8191,r=w0>>>13,$$=Z[6]|0,i=$$&8191,e=$$>>>13,x0=Z[7]|0,o=x0&8191,a=x0>>>13,p0=Z[8]|0,$0=p0&8191,Q0=p0>>>13,Y$=Z[9]|0,Z0=Y$&8191,G0=Y$>>>13,Z$=V[0]|0,V0=Z$&8191,U0=Z$>>>13,G$=V[1]|0,X0=G$&8191,K0=G$>>>13,V$=V[2]|0,I0=V$&8191,O0=V$>>>13,U$=V[3]|0,J0=U$&8191,F0=U$>>>13,X$=V[4]|0,A0=X$&8191,H0=X$>>>13,K$=V[5]|0,W0=K$&8191,E0=K$>>>13,I$=V[6]|0,T0=I$&8191,D0=I$>>>13,O$=V[7]|0,C0=O$&8191,L0=O$>>>13,J$=V[8]|0,R0=J$&8191,P0=J$>>>13,F$=V[9]|0,z0=F$&8191,M0=F$>>>13;G.negative=$.negative^Y.negative,G.length=19,U=Math.imul(A,V0),Q=Math.imul(A,U0),Q=Q+Math.imul(S,V0)|0,K=Math.imul(S,U0);var Q$=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,U=Math.imul(B,V0),Q=Math.imul(B,U0),Q=Q+Math.imul(c,V0)|0,K=Math.imul(c,U0),U=U+Math.imul(A,X0)|0,Q=Q+Math.imul(A,K0)|0,Q=Q+Math.imul(S,X0)|0,K=K+Math.imul(S,K0)|0;var j0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(j0>>>26)|0,j0&=67108863,U=Math.imul(h,V0),Q=Math.imul(h,U0),Q=Q+Math.imul(d,V0)|0,K=Math.imul(d,U0),U=U+Math.imul(B,X0)|0,Q=Q+Math.imul(B,K0)|0,Q=Q+Math.imul(c,X0)|0,K=K+Math.imul(c,K0)|0,U=U+Math.imul(A,I0)|0,Q=Q+Math.imul(A,O0)|0,Q=Q+Math.imul(S,I0)|0,K=K+Math.imul(S,O0)|0;var k0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(k0>>>26)|0,k0&=67108863,U=Math.imul(l,V0),Q=Math.imul(l,U0),Q=Q+Math.imul(n,V0)|0,K=Math.imul(n,U0),U=U+Math.imul(h,X0)|0,Q=Q+Math.imul(h,K0)|0,Q=Q+Math.imul(d,X0)|0,K=K+Math.imul(d,K0)|0,U=U+Math.imul(B,I0)|0,Q=Q+Math.imul(B,O0)|0,Q=Q+Math.imul(c,I0)|0,K=K+Math.imul(c,O0)|0,U=U+Math.imul(A,J0)|0,Q=Q+Math.imul(A,F0)|0,Q=Q+Math.imul(S,J0)|0,K=K+Math.imul(S,F0)|0;var f0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(f0>>>26)|0,f0&=67108863,U=Math.imul(t,V0),Q=Math.imul(t,U0),Q=Q+Math.imul(s,V0)|0,K=Math.imul(s,U0),U=U+Math.imul(l,X0)|0,Q=Q+Math.imul(l,K0)|0,Q=Q+Math.imul(n,X0)|0,K=K+Math.imul(n,K0)|0,U=U+Math.imul(h,I0)|0,Q=Q+Math.imul(h,O0)|0,Q=Q+Math.imul(d,I0)|0,K=K+Math.imul(d,O0)|0,U=U+Math.imul(B,J0)|0,Q=Q+Math.imul(B,F0)|0,Q=Q+Math.imul(c,J0)|0,K=K+Math.imul(c,F0)|0,U=U+Math.imul(A,A0)|0,Q=Q+Math.imul(A,H0)|0,Q=Q+Math.imul(S,A0)|0,K=K+Math.imul(S,H0)|0;var c0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(c0>>>26)|0,c0&=67108863,U=Math.imul(m,V0),Q=Math.imul(m,U0),Q=Q+Math.imul(r,V0)|0,K=Math.imul(r,U0),U=U+Math.imul(t,X0)|0,Q=Q+Math.imul(t,K0)|0,Q=Q+Math.imul(s,X0)|0,K=K+Math.imul(s,K0)|0,U=U+Math.imul(l,I0)|0,Q=Q+Math.imul(l,O0)|0,Q=Q+Math.imul(n,I0)|0,K=K+Math.imul(n,O0)|0,U=U+Math.imul(h,J0)|0,Q=Q+Math.imul(h,F0)|0,Q=Q+Math.imul(d,J0)|0,K=K+Math.imul(d,F0)|0,U=U+Math.imul(B,A0)|0,Q=Q+Math.imul(B,H0)|0,Q=Q+Math.imul(c,A0)|0,K=K+Math.imul(c,H0)|0,U=U+Math.imul(A,W0)|0,Q=Q+Math.imul(A,E0)|0,Q=Q+Math.imul(S,W0)|0,K=K+Math.imul(S,E0)|0;var h0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(h0>>>26)|0,h0&=67108863,U=Math.imul(i,V0),Q=Math.imul(i,U0),Q=Q+Math.imul(e,V0)|0,K=Math.imul(e,U0),U=U+Math.imul(m,X0)|0,Q=Q+Math.imul(m,K0)|0,Q=Q+Math.imul(r,X0)|0,K=K+Math.imul(r,K0)|0,U=U+Math.imul(t,I0)|0,Q=Q+Math.imul(t,O0)|0,Q=Q+Math.imul(s,I0)|0,K=K+Math.imul(s,O0)|0,U=U+Math.imul(l,J0)|0,Q=Q+Math.imul(l,F0)|0,Q=Q+Math.imul(n,J0)|0,K=K+Math.imul(n,F0)|0,U=U+Math.imul(h,A0)|0,Q=Q+Math.imul(h,H0)|0,Q=Q+Math.imul(d,A0)|0,K=K+Math.imul(d,H0)|0,U=U+Math.imul(B,W0)|0,Q=Q+Math.imul(B,E0)|0,Q=Q+Math.imul(c,W0)|0,K=K+Math.imul(c,E0)|0,U=U+Math.imul(A,T0)|0,Q=Q+Math.imul(A,D0)|0,Q=Q+Math.imul(S,T0)|0,K=K+Math.imul(S,D0)|0;var d0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(d0>>>26)|0,d0&=67108863,U=Math.imul(o,V0),Q=Math.imul(o,U0),Q=Q+Math.imul(a,V0)|0,K=Math.imul(a,U0),U=U+Math.imul(i,X0)|0,Q=Q+Math.imul(i,K0)|0,Q=Q+Math.imul(e,X0)|0,K=K+Math.imul(e,K0)|0,U=U+Math.imul(m,I0)|0,Q=Q+Math.imul(m,O0)|0,Q=Q+Math.imul(r,I0)|0,K=K+Math.imul(r,O0)|0,U=U+Math.imul(t,J0)|0,Q=Q+Math.imul(t,F0)|0,Q=Q+Math.imul(s,J0)|0,K=K+Math.imul(s,F0)|0,U=U+Math.imul(l,A0)|0,Q=Q+Math.imul(l,H0)|0,Q=Q+Math.imul(n,A0)|0,K=K+Math.imul(n,H0)|0,U=U+Math.imul(h,W0)|0,Q=Q+Math.imul(h,E0)|0,Q=Q+Math.imul(d,W0)|0,K=K+Math.imul(d,E0)|0,U=U+Math.imul(B,T0)|0,Q=Q+Math.imul(B,D0)|0,Q=Q+Math.imul(c,T0)|0,K=K+Math.imul(c,D0)|0,U=U+Math.imul(A,C0)|0,Q=Q+Math.imul(A,L0)|0,Q=Q+Math.imul(S,C0)|0,K=K+Math.imul(S,L0)|0;var b0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(b0>>>26)|0,b0&=67108863,U=Math.imul($0,V0),Q=Math.imul($0,U0),Q=Q+Math.imul(Q0,V0)|0,K=Math.imul(Q0,U0),U=U+Math.imul(o,X0)|0,Q=Q+Math.imul(o,K0)|0,Q=Q+Math.imul(a,X0)|0,K=K+Math.imul(a,K0)|0,U=U+Math.imul(i,I0)|0,Q=Q+Math.imul(i,O0)|0,Q=Q+Math.imul(e,I0)|0,K=K+Math.imul(e,O0)|0,U=U+Math.imul(m,J0)|0,Q=Q+Math.imul(m,F0)|0,Q=Q+Math.imul(r,J0)|0,K=K+Math.imul(r,F0)|0,U=U+Math.imul(t,A0)|0,Q=Q+Math.imul(t,H0)|0,Q=Q+Math.imul(s,A0)|0,K=K+Math.imul(s,H0)|0,U=U+Math.imul(l,W0)|0,Q=Q+Math.imul(l,E0)|0,Q=Q+Math.imul(n,W0)|0,K=K+Math.imul(n,E0)|0,U=U+Math.imul(h,T0)|0,Q=Q+Math.imul(h,D0)|0,Q=Q+Math.imul(d,T0)|0,K=K+Math.imul(d,D0)|0,U=U+Math.imul(B,C0)|0,Q=Q+Math.imul(B,L0)|0,Q=Q+Math.imul(c,C0)|0,K=K+Math.imul(c,L0)|0,U=U+Math.imul(A,R0)|0,Q=Q+Math.imul(A,P0)|0,Q=Q+Math.imul(S,R0)|0,K=K+Math.imul(S,P0)|0;var l0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(l0>>>26)|0,l0&=67108863,U=Math.imul(Z0,V0),Q=Math.imul(Z0,U0),Q=Q+Math.imul(G0,V0)|0,K=Math.imul(G0,U0),U=U+Math.imul($0,X0)|0,Q=Q+Math.imul($0,K0)|0,Q=Q+Math.imul(Q0,X0)|0,K=K+Math.imul(Q0,K0)|0,U=U+Math.imul(o,I0)|0,Q=Q+Math.imul(o,O0)|0,Q=Q+Math.imul(a,I0)|0,K=K+Math.imul(a,O0)|0,U=U+Math.imul(i,J0)|0,Q=Q+Math.imul(i,F0)|0,Q=Q+Math.imul(e,J0)|0,K=K+Math.imul(e,F0)|0,U=U+Math.imul(m,A0)|0,Q=Q+Math.imul(m,H0)|0,Q=Q+Math.imul(r,A0)|0,K=K+Math.imul(r,H0)|0,U=U+Math.imul(t,W0)|0,Q=Q+Math.imul(t,E0)|0,Q=Q+Math.imul(s,W0)|0,K=K+Math.imul(s,E0)|0,U=U+Math.imul(l,T0)|0,Q=Q+Math.imul(l,D0)|0,Q=Q+Math.imul(n,T0)|0,K=K+Math.imul(n,D0)|0,U=U+Math.imul(h,C0)|0,Q=Q+Math.imul(h,L0)|0,Q=Q+Math.imul(d,C0)|0,K=K+Math.imul(d,L0)|0,U=U+Math.imul(B,R0)|0,Q=Q+Math.imul(B,P0)|0,Q=Q+Math.imul(c,R0)|0,K=K+Math.imul(c,P0)|0,U=U+Math.imul(A,z0)|0,Q=Q+Math.imul(A,M0)|0,Q=Q+Math.imul(S,z0)|0,K=K+Math.imul(S,M0)|0;var o0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(o0>>>26)|0,o0&=67108863,U=Math.imul(Z0,X0),Q=Math.imul(Z0,K0),Q=Q+Math.imul(G0,X0)|0,K=Math.imul(G0,K0),U=U+Math.imul($0,I0)|0,Q=Q+Math.imul($0,O0)|0,Q=Q+Math.imul(Q0,I0)|0,K=K+Math.imul(Q0,O0)|0,U=U+Math.imul(o,J0)|0,Q=Q+Math.imul(o,F0)|0,Q=Q+Math.imul(a,J0)|0,K=K+Math.imul(a,F0)|0,U=U+Math.imul(i,A0)|0,Q=Q+Math.imul(i,H0)|0,Q=Q+Math.imul(e,A0)|0,K=K+Math.imul(e,H0)|0,U=U+Math.imul(m,W0)|0,Q=Q+Math.imul(m,E0)|0,Q=Q+Math.imul(r,W0)|0,K=K+Math.imul(r,E0)|0,U=U+Math.imul(t,T0)|0,Q=Q+Math.imul(t,D0)|0,Q=Q+Math.imul(s,T0)|0,K=K+Math.imul(s,D0)|0,U=U+Math.imul(l,C0)|0,Q=Q+Math.imul(l,L0)|0,Q=Q+Math.imul(n,C0)|0,K=K+Math.imul(n,L0)|0,U=U+Math.imul(h,R0)|0,Q=Q+Math.imul(h,P0)|0,Q=Q+Math.imul(d,R0)|0,K=K+Math.imul(d,P0)|0,U=U+Math.imul(B,z0)|0,Q=Q+Math.imul(B,M0)|0,Q=Q+Math.imul(c,z0)|0,K=K+Math.imul(c,M0)|0;var u0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(u0>>>26)|0,u0&=67108863,U=Math.imul(Z0,I0),Q=Math.imul(Z0,O0),Q=Q+Math.imul(G0,I0)|0,K=Math.imul(G0,O0),U=U+Math.imul($0,J0)|0,Q=Q+Math.imul($0,F0)|0,Q=Q+Math.imul(Q0,J0)|0,K=K+Math.imul(Q0,F0)|0,U=U+Math.imul(o,A0)|0,Q=Q+Math.imul(o,H0)|0,Q=Q+Math.imul(a,A0)|0,K=K+Math.imul(a,H0)|0,U=U+Math.imul(i,W0)|0,Q=Q+Math.imul(i,E0)|0,Q=Q+Math.imul(e,W0)|0,K=K+Math.imul(e,E0)|0,U=U+Math.imul(m,T0)|0,Q=Q+Math.imul(m,D0)|0,Q=Q+Math.imul(r,T0)|0,K=K+Math.imul(r,D0)|0,U=U+Math.imul(t,C0)|0,Q=Q+Math.imul(t,L0)|0,Q=Q+Math.imul(s,C0)|0,K=K+Math.imul(s,L0)|0,U=U+Math.imul(l,R0)|0,Q=Q+Math.imul(l,P0)|0,Q=Q+Math.imul(n,R0)|0,K=K+Math.imul(n,P0)|0,U=U+Math.imul(h,z0)|0,Q=Q+Math.imul(h,M0)|0,Q=Q+Math.imul(d,z0)|0,K=K+Math.imul(d,M0)|0;var n0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(n0>>>26)|0,n0&=67108863,U=Math.imul(Z0,J0),Q=Math.imul(Z0,F0),Q=Q+Math.imul(G0,J0)|0,K=Math.imul(G0,F0),U=U+Math.imul($0,A0)|0,Q=Q+Math.imul($0,H0)|0,Q=Q+Math.imul(Q0,A0)|0,K=K+Math.imul(Q0,H0)|0,U=U+Math.imul(o,W0)|0,Q=Q+Math.imul(o,E0)|0,Q=Q+Math.imul(a,W0)|0,K=K+Math.imul(a,E0)|0,U=U+Math.imul(i,T0)|0,Q=Q+Math.imul(i,D0)|0,Q=Q+Math.imul(e,T0)|0,K=K+Math.imul(e,D0)|0,U=U+Math.imul(m,C0)|0,Q=Q+Math.imul(m,L0)|0,Q=Q+Math.imul(r,C0)|0,K=K+Math.imul(r,L0)|0,U=U+Math.imul(t,R0)|0,Q=Q+Math.imul(t,P0)|0,Q=Q+Math.imul(s,R0)|0,K=K+Math.imul(s,P0)|0,U=U+Math.imul(l,z0)|0,Q=Q+Math.imul(l,M0)|0,Q=Q+Math.imul(n,z0)|0,K=K+Math.imul(n,M0)|0;var s0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(s0>>>26)|0,s0&=67108863,U=Math.imul(Z0,A0),Q=Math.imul(Z0,H0),Q=Q+Math.imul(G0,A0)|0,K=Math.imul(G0,H0),U=U+Math.imul($0,W0)|0,Q=Q+Math.imul($0,E0)|0,Q=Q+Math.imul(Q0,W0)|0,K=K+Math.imul(Q0,E0)|0,U=U+Math.imul(o,T0)|0,Q=Q+Math.imul(o,D0)|0,Q=Q+Math.imul(a,T0)|0,K=K+Math.imul(a,D0)|0,U=U+Math.imul(i,C0)|0,Q=Q+Math.imul(i,L0)|0,Q=Q+Math.imul(e,C0)|0,K=K+Math.imul(e,L0)|0,U=U+Math.imul(m,R0)|0,Q=Q+Math.imul(m,P0)|0,Q=Q+Math.imul(r,R0)|0,K=K+Math.imul(r,P0)|0,U=U+Math.imul(t,z0)|0,Q=Q+Math.imul(t,M0)|0,Q=Q+Math.imul(s,z0)|0,K=K+Math.imul(s,M0)|0;var t0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(t0>>>26)|0,t0&=67108863,U=Math.imul(Z0,W0),Q=Math.imul(Z0,E0),Q=Q+Math.imul(G0,W0)|0,K=Math.imul(G0,E0),U=U+Math.imul($0,T0)|0,Q=Q+Math.imul($0,D0)|0,Q=Q+Math.imul(Q0,T0)|0,K=K+Math.imul(Q0,D0)|0,U=U+Math.imul(o,C0)|0,Q=Q+Math.imul(o,L0)|0,Q=Q+Math.imul(a,C0)|0,K=K+Math.imul(a,L0)|0,U=U+Math.imul(i,R0)|0,Q=Q+Math.imul(i,P0)|0,Q=Q+Math.imul(e,R0)|0,K=K+Math.imul(e,P0)|0,U=U+Math.imul(m,z0)|0,Q=Q+Math.imul(m,M0)|0,Q=Q+Math.imul(r,z0)|0,K=K+Math.imul(r,M0)|0;var m0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(m0>>>26)|0,m0&=67108863,U=Math.imul(Z0,T0),Q=Math.imul(Z0,D0),Q=Q+Math.imul(G0,T0)|0,K=Math.imul(G0,D0),U=U+Math.imul($0,C0)|0,Q=Q+Math.imul($0,L0)|0,Q=Q+Math.imul(Q0,C0)|0,K=K+Math.imul(Q0,L0)|0,U=U+Math.imul(o,R0)|0,Q=Q+Math.imul(o,P0)|0,Q=Q+Math.imul(a,R0)|0,K=K+Math.imul(a,P0)|0,U=U+Math.imul(i,z0)|0,Q=Q+Math.imul(i,M0)|0,Q=Q+Math.imul(e,z0)|0,K=K+Math.imul(e,M0)|0;var a0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(a0>>>26)|0,a0&=67108863,U=Math.imul(Z0,C0),Q=Math.imul(Z0,L0),Q=Q+Math.imul(G0,C0)|0,K=Math.imul(G0,L0),U=U+Math.imul($0,R0)|0,Q=Q+Math.imul($0,P0)|0,Q=Q+Math.imul(Q0,R0)|0,K=K+Math.imul(Q0,P0)|0,U=U+Math.imul(o,z0)|0,Q=Q+Math.imul(o,M0)|0,Q=Q+Math.imul(a,z0)|0,K=K+Math.imul(a,M0)|0;var e0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(e0>>>26)|0,e0&=67108863,U=Math.imul(Z0,R0),Q=Math.imul(Z0,P0),Q=Q+Math.imul(G0,R0)|0,K=Math.imul(G0,P0),U=U+Math.imul($0,z0)|0,Q=Q+Math.imul($0,M0)|0,Q=Q+Math.imul(Q0,z0)|0,K=K+Math.imul(Q0,M0)|0;var r0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(r0>>>26)|0,r0&=67108863,U=Math.imul(Z0,z0),Q=Math.imul(Z0,M0),Q=Q+Math.imul(G0,z0)|0,K=Math.imul(G0,M0);var i0=(O+U|0)+((Q&8191)<<13)|0;return O=(K+(Q>>>13)|0)+(i0>>>26)|0,i0&=67108863,I[0]=Q$,I[1]=j0,I[2]=k0,I[3]=f0,I[4]=c0,I[5]=h0,I[6]=d0,I[7]=b0,I[8]=l0,I[9]=o0,I[10]=u0,I[11]=n0,I[12]=s0,I[13]=t0,I[14]=m0,I[15]=a0,I[16]=e0,I[17]=r0,I[18]=i0,O!==0&&(I[19]=O,G.length++),G};Math.imul||(M=L);function v($,Y,G){G.negative=Y.negative^$.negative,G.length=$.length+Y.length;for(var Z=0,V=0,I=0;I>>26)|0,V+=O>>>26,O&=67108863}G.words[I]=U,Z=O,O=V}return Z!==0?G.words[I]=Z:G.length--,G.strip()}function q($,Y,G){var Z=new g;return Z.mulp($,Y,G)}X.prototype.mulTo=function($,Y){var G,Z=this.length+$.length;return this.length===10&&$.length===10?G=M(this,$,Y):Z<63?G=L(this,$,Y):Z<1024?G=v(this,$,Y):G=q(this,$,Y),G};function g($,Y){this.x=$,this.y=Y}g.prototype.makeRBT=function($){for(var Y=new Array($),G=X.prototype._countBits($)-1,Z=0;Z<$;Z++)Y[Z]=this.revBin(Z,G,$);return Y},g.prototype.revBin=function($,Y,G){if($===0||$===G-1)return $;for(var Z=0,V=0;V>=1;return Z},g.prototype.permute=function($,Y,G,Z,V,I){for(var O=0;O>>1)V++;return 1<>>13,G[2*I+1]=V&8191,V=V>>>13;for(I=2*Y;I>=26,Y+=Z/67108864|0,Y+=V>>>26,this.words[G]=V&67108863}return Y!==0&&(this.words[G]=Y,this.length++),this},X.prototype.muln=function($){return this.clone().imuln($)},X.prototype.sqr=function(){return this.mul(this)},X.prototype.isqr=function(){return this.imul(this.clone())},X.prototype.pow=function($){var Y=E($);if(Y.length===0)return new X(1);for(var G=this,Z=0;Z=0);var Y=$%26,G=($-Y)/26,Z=67108863>>>26-Y<<26-Y,V;if(Y!==0){var I=0;for(V=0;V>>26-Y}I&&(this.words[V]=I,this.length++)}if(G!==0){for(V=this.length-1;V>=0;V--)this.words[V+G]=this.words[V];for(V=0;V=0);var Z;Y?Z=(Y-Y%26)/26:Z=0;var V=$%26,I=Math.min(($-V)/26,this.length),O=67108863^67108863>>>V<I)for(this.length-=I,Q=0;Q=0&&(K!==0||Q>=Z);Q--){var R=this.words[Q]|0;this.words[Q]=K<<26-V|R>>>V,K=R&O}return U&&K!==0&&(U.words[U.length++]=K),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},X.prototype.ishrn=function($,Y,G){return F(this.negative===0),this.iushrn($,Y,G)},X.prototype.shln=function($){return this.clone().ishln($)},X.prototype.ushln=function($){return this.clone().iushln($)},X.prototype.shrn=function($){return this.clone().ishrn($)},X.prototype.ushrn=function($){return this.clone().iushrn($)},X.prototype.testn=function($){F(typeof $=="number"&&$>=0);var Y=$%26,G=($-Y)/26,Z=1<=0);var Y=$%26,G=($-Y)/26;if(F(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Y!==0&&G++,this.length=Math.min(G,this.length),Y!==0){var Z=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},X.prototype.isubn=function($){if(F(typeof $=="number"),F($<67108864),$<0)return this.iaddn(-$);if(this.negative!==0)return this.negative=0,this.iaddn($),this.negative=1,this;if(this.words[0]-=$,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-(U/67108864|0),this.words[V+G]=I&67108863}for(;V>26,this.words[V+G]=I&67108863;if(O===0)return this.strip();for(F(O===-1),O=0,V=0;V>26,this.words[V]=I&67108863;return this.negative=1,this.strip()},X.prototype._wordDiv=function($,Y){var G=this.length-$.length,Z=this.clone(),V=$,I=V.words[V.length-1]|0,O=this._countBits(I);G=26-O,G!==0&&(V=V.ushln(G),Z.iushln(G),I=V.words[V.length-1]|0);var U=Z.length-V.length,Q;if(Y!=="mod"){Q=new X(null),Q.length=U+1,Q.words=new Array(Q.length);for(var K=0;K=0;A--){var S=(Z.words[V.length+A]|0)*67108864+(Z.words[V.length+A-1]|0);for(S=Math.min(S/I|0,67108863),Z._ishlnsubmul(V,S,A);Z.negative!==0;)S--,Z.negative=0,Z._ishlnsubmul(V,1,A),Z.isZero()||(Z.negative^=1);Q&&(Q.words[A]=S)}return Q&&Q.strip(),Z.strip(),Y!=="div"&&G!==0&&Z.iushrn(G),{div:Q||null,mod:Z}},X.prototype.divmod=function($,Y,G){if(F(!$.isZero()),this.isZero())return{div:new X(0),mod:new X(0)};var Z,V,I;return this.negative!==0&&$.negative===0?(I=this.neg().divmod($,Y),Y!=="mod"&&(Z=I.div.neg()),Y!=="div"&&(V=I.mod.neg(),G&&V.negative!==0&&V.iadd($)),{div:Z,mod:V}):this.negative===0&&$.negative!==0?(I=this.divmod($.neg(),Y),Y!=="mod"&&(Z=I.div.neg()),{div:Z,mod:I.mod}):(this.negative&$.negative)!==0?(I=this.neg().divmod($.neg(),Y),Y!=="div"&&(V=I.mod.neg(),G&&V.negative!==0&&V.isub($)),{div:I.div,mod:V}):$.length>this.length||this.cmp($)<0?{div:new X(0),mod:this}:$.length===1?Y==="div"?{div:this.divn($.words[0]),mod:null}:Y==="mod"?{div:null,mod:new X(this.modn($.words[0]))}:{div:this.divn($.words[0]),mod:new X(this.modn($.words[0]))}:this._wordDiv($,Y)},X.prototype.div=function($){return this.divmod($,"div",!1).div},X.prototype.mod=function($){return this.divmod($,"mod",!1).mod},X.prototype.umod=function($){return this.divmod($,"mod",!0).mod},X.prototype.divRound=function($){var Y=this.divmod($);if(Y.mod.isZero())return Y.div;var G=Y.div.negative!==0?Y.mod.isub($):Y.mod,Z=$.ushrn(1),V=$.andln(1),I=G.cmp(Z);return I<0||V===1&&I===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},X.prototype.modn=function($){F($<=67108863);for(var Y=(1<<26)%$,G=0,Z=this.length-1;Z>=0;Z--)G=(Y*G+(this.words[Z]|0))%$;return G},X.prototype.idivn=function($){F($<=67108863);for(var Y=0,G=this.length-1;G>=0;G--){var Z=(this.words[G]|0)+Y*67108864;this.words[G]=Z/$|0,Y=Z%$}return this.strip()},X.prototype.divn=function($){return this.clone().idivn($)},X.prototype.egcd=function($){F($.negative===0),F(!$.isZero());var Y=this,G=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new X(1),V=new X(0),I=new X(0),O=new X(1),U=0;Y.isEven()&&G.isEven();)Y.iushrn(1),G.iushrn(1),++U;for(var Q=G.clone(),K=Y.clone();!Y.isZero();){for(var R=0,A=1;(Y.words[0]&A)===0&&R<26;++R,A<<=1);if(R>0)for(Y.iushrn(R);R-- >0;)(Z.isOdd()||V.isOdd())&&(Z.iadd(Q),V.isub(K)),Z.iushrn(1),V.iushrn(1);for(var S=0,x=1;(G.words[0]&x)===0&&S<26;++S,x<<=1);if(S>0)for(G.iushrn(S);S-- >0;)(I.isOdd()||O.isOdd())&&(I.iadd(Q),O.isub(K)),I.iushrn(1),O.iushrn(1);Y.cmp(G)>=0?(Y.isub(G),Z.isub(I),V.isub(O)):(G.isub(Y),I.isub(Z),O.isub(V))}return{a:I,b:O,gcd:G.iushln(U)}},X.prototype._invmp=function($){F($.negative===0),F(!$.isZero());var Y=this,G=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new X(1),V=new X(0),I=G.clone();Y.cmpn(1)>0&&G.cmpn(1)>0;){for(var O=0,U=1;(Y.words[0]&U)===0&&O<26;++O,U<<=1);if(O>0)for(Y.iushrn(O);O-- >0;)Z.isOdd()&&Z.iadd(I),Z.iushrn(1);for(var Q=0,K=1;(G.words[0]&K)===0&&Q<26;++Q,K<<=1);if(Q>0)for(G.iushrn(Q);Q-- >0;)V.isOdd()&&V.iadd(I),V.iushrn(1);Y.cmp(G)>=0?(Y.isub(G),Z.isub(V)):(G.isub(Y),V.isub(Z))}var R;return Y.cmpn(1)===0?R=Z:R=V,R.cmpn(0)<0&&R.iadd($),R},X.prototype.gcd=function($){if(this.isZero())return $.abs();if($.isZero())return this.abs();var Y=this.clone(),G=$.clone();Y.negative=0,G.negative=0;for(var Z=0;Y.isEven()&&G.isEven();Z++)Y.iushrn(1),G.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;G.isEven();)G.iushrn(1);var V=Y.cmp(G);if(V<0){var I=Y;Y=G,G=I}else if(V===0||G.cmpn(1)===0)break;Y.isub(G)}while(!0);return G.iushln(Z)},X.prototype.invm=function($){return this.egcd($).a.umod($)},X.prototype.isEven=function(){return(this.words[0]&1)===0},X.prototype.isOdd=function(){return(this.words[0]&1)===1},X.prototype.andln=function($){return this.words[0]&$},X.prototype.bincn=function($){F(typeof $=="number");var Y=$%26,G=($-Y)/26,Z=1<>>26,O&=67108863,this.words[I]=O}return V!==0&&(this.words[I]=V,this.length++),this},X.prototype.isZero=function(){return this.length===1&&this.words[0]===0},X.prototype.cmpn=function($){var Y=$<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var G;if(this.length>1)G=1;else{Y&&($=-$),F($<=67108863,"Number is too big");var Z=this.words[0]|0;G=Z===$?0:Z<$?-1:1}return this.negative!==0?-G|0:G},X.prototype.cmp=function($){if(this.negative!==0&&$.negative===0)return-1;if(this.negative===0&&$.negative!==0)return 1;var Y=this.ucmp($);return this.negative!==0?-Y|0:Y},X.prototype.ucmp=function($){if(this.length>$.length)return 1;if(this.length<$.length)return-1;for(var Y=0,G=this.length-1;G>=0;G--){var Z=this.words[G]|0,V=$.words[G]|0;if(Z!==V){ZV&&(Y=1);break}}return Y},X.prototype.gtn=function($){return this.cmpn($)===1},X.prototype.gt=function($){return this.cmp($)===1},X.prototype.gten=function($){return this.cmpn($)>=0},X.prototype.gte=function($){return this.cmp($)>=0},X.prototype.ltn=function($){return this.cmpn($)===-1},X.prototype.lt=function($){return this.cmp($)===-1},X.prototype.lten=function($){return this.cmpn($)<=0},X.prototype.lte=function($){return this.cmp($)<=0},X.prototype.eqn=function($){return this.cmpn($)===0},X.prototype.eq=function($){return this.cmp($)===0},X.red=function($){return new p($)},X.prototype.toRed=function($){return F(!this.red,"Already a number in reduction context"),F(this.negative===0,"red works only with positives"),$.convertTo(this)._forceRed($)},X.prototype.fromRed=function(){return F(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},X.prototype._forceRed=function($){return this.red=$,this},X.prototype.forceRed=function($){return F(!this.red,"Already a number in reduction context"),this._forceRed($)},X.prototype.redAdd=function($){return F(this.red,"redAdd works only with red numbers"),this.red.add(this,$)},X.prototype.redIAdd=function($){return F(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,$)},X.prototype.redSub=function($){return F(this.red,"redSub works only with red numbers"),this.red.sub(this,$)},X.prototype.redISub=function($){return F(this.red,"redISub works only with red numbers"),this.red.isub(this,$)},X.prototype.redShl=function($){return F(this.red,"redShl works only with red numbers"),this.red.shl(this,$)},X.prototype.redMul=function($){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.mul(this,$)},X.prototype.redIMul=function($){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.imul(this,$)},X.prototype.redSqr=function(){return F(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},X.prototype.redISqr=function(){return F(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},X.prototype.redSqrt=function(){return F(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},X.prototype.redInvm=function(){return F(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},X.prototype.redNeg=function(){return F(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},X.prototype.redPow=function($){return F(this.red&&!$.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,$)};var y={k256:null,p224:null,p192:null,p25519:null};function w($,Y){this.name=$,this.p=new X(Y,16),this.n=this.p.bitLength(),this.k=new X(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}w.prototype._tmp=function(){var $=new X(null);return $.words=new Array(Math.ceil(this.n/13)),$},w.prototype.ireduce=function($){var Y=$,G;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),G=Y.bitLength();while(G>this.n);var Z=G0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},w.prototype.split=function($,Y){$.iushrn(this.n,0,Y)},w.prototype.imulK=function($){return $.imul(this.k)};function f(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(f,w),f.prototype.split=function($,Y){for(var G=4194303,Z=Math.min($.length,9),V=0;V>>22,I=O}I>>>=22,$.words[V-10]=I,I===0&&$.length>10?$.length-=10:$.length-=9},f.prototype.imulK=function($){$.words[$.length]=0,$.words[$.length+1]=0,$.length+=2;for(var Y=0,G=0;G<$.length;G++){var Z=$.words[G]|0;Y+=Z*977,$.words[G]=Y&67108863,Y=Z*64+(Y/67108864|0)}return $.words[$.length-1]===0&&($.length--,$.words[$.length-1]===0&&$.length--),$};function b(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(b,w);function u(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(u,w);function Y0(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(Y0,w),Y0.prototype.imulK=function($){for(var Y=0,G=0;G<$.length;G++){var Z=($.words[G]|0)*19+Y,V=Z&67108863;Z>>>=26,$.words[G]=V,Y=Z}return Y!==0&&($.words[$.length++]=Y),$},X._prime=function($){if(y[$])return y[$];var Y;if($==="k256")Y=new f;else if($==="p224")Y=new b;else if($==="p192")Y=new u;else if($==="p25519")Y=new Y0;else throw new Error("Unknown prime "+$);return y[$]=Y,Y};function p($){if(typeof $=="string"){var Y=X._prime($);this.m=Y.p,this.prime=Y}else F($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}p.prototype._verify1=function($){F($.negative===0,"red works only with positives"),F($.red,"red works only with red numbers")},p.prototype._verify2=function($,Y){F(($.negative|Y.negative)===0,"red works only with positives"),F($.red&&$.red===Y.red,"red works only with red numbers")},p.prototype.imod=function($){return this.prime?this.prime.ireduce($)._forceRed(this):$.umod(this.m)._forceRed(this)},p.prototype.neg=function($){return $.isZero()?$.clone():this.m.sub($)._forceRed(this)},p.prototype.add=function($,Y){this._verify2($,Y);var G=$.add(Y);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},p.prototype.iadd=function($,Y){this._verify2($,Y);var G=$.iadd(Y);return G.cmp(this.m)>=0&&G.isub(this.m),G},p.prototype.sub=function($,Y){this._verify2($,Y);var G=$.sub(Y);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},p.prototype.isub=function($,Y){this._verify2($,Y);var G=$.isub(Y);return G.cmpn(0)<0&&G.iadd(this.m),G},p.prototype.shl=function($,Y){return this._verify1($),this.imod($.ushln(Y))},p.prototype.imul=function($,Y){return this._verify2($,Y),this.imod($.imul(Y))},p.prototype.mul=function($,Y){return this._verify2($,Y),this.imod($.mul(Y))},p.prototype.isqr=function($){return this.imul($,$.clone())},p.prototype.sqr=function($){return this.mul($,$)},p.prototype.sqrt=function($){if($.isZero())return $.clone();var Y=this.m.andln(3);if(F(Y%2===1),Y===3){var G=this.m.add(new X(1)).iushrn(2);return this.pow($,G)}for(var Z=this.m.subn(1),V=0;!Z.isZero()&&Z.andln(1)===0;)V++,Z.iushrn(1);F(!Z.isZero());var I=new X(1).toRed(this),O=I.redNeg(),U=this.m.subn(1).iushrn(1),Q=this.m.bitLength();for(Q=new X(2*Q*Q).toRed(this);this.pow(Q,U).cmp(O)!==0;)Q.redIAdd(O);for(var K=this.pow(Q,Z),R=this.pow($,Z.addn(1).iushrn(1)),A=this.pow($,Z),S=V;A.cmp(I)!==0;){for(var x=A,B=0;x.cmp(I)!==0;B++)x=x.redSqr();F(B=0;V--){for(var K=Y.words[V],R=Q-1;R>=0;R--){var A=K>>R&1;if(I!==Z[0]&&(I=this.sqr(I)),A===0&&O===0){U=0;continue}O<<=1,O|=A,U++,!(U!==G&&(V!==0||R!==0))&&(I=this.mul(I,Z[O]),U=0,O=0)}Q=26}return I},p.prototype.convertTo=function($){var Y=$.umod(this.m);return Y===$?Y.clone():Y},p.prototype.convertFrom=function($){var Y=$.clone();return Y.red=null,Y},X.mont=function($){return new v0($)};function v0($){p.call(this,$),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new X(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)}z(v0,p),v0.prototype.convertTo=function($){return this.imod($.ushln(this.shift))},v0.prototype.convertFrom=function($){var Y=this.imod($.mul(this.rinv));return Y.red=null,Y},v0.prototype.imul=function($,Y){if($.isZero()||Y.isZero())return $.words[0]=0,$.length=1,$;var G=$.imul(Y),Z=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=G.isub(Z).iushrn(this.shift),I=V;return V.cmp(this.m)>=0?I=V.isub(this.m):V.cmpn(0)<0&&(I=V.iadd(this.m)),I._forceRed(this)},v0.prototype.mul=function($,Y){if($.isZero()||Y.isZero())return new X(0)._forceRed(this);var G=$.mul(Y),Z=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=G.isub(Z).iushrn(this.shift),I=V;return V.cmp(this.m)>=0?I=V.isub(this.m):V.cmpn(0)<0&&(I=V.iadd(this.m)),I._forceRed(this)},v0.prototype.invm=function($){var Y=this.imod($._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof _>"u"||_,N)}}),AY=S0({"node_modules/miller-rabin/node_modules/bn.js/lib/bn.js"(N,_){(function(k,j){function F($,Y){if(!$)throw new Error(Y||"Assertion failed")}function z($,Y){$.super_=Y;var G=function(){};G.prototype=Y.prototype,$.prototype=new G,$.prototype.constructor=$}function X($,Y,G){if(X.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((Y==="le"||Y==="be")&&(G=Y,Y=10),this._init($||0,Y||10,G||"be"))}typeof k=="object"?k.exports=X:j.BN=X,X.BN=X,X.wordSize=26;var C=g0;X.isBN=function($){return $ instanceof X?!0:$!==null&&typeof $=="object"&&$.constructor.wordSize===X.wordSize&&Array.isArray($.words)},X.max=function($,Y){return $.cmp(Y)>0?$:Y},X.min=function($,Y){return $.cmp(Y)<0?$:Y},X.prototype._init=function($,Y,G){if(typeof $=="number")return this._initNumber($,Y,G);if(typeof $=="object")return this._initArray($,Y,G);Y==="hex"&&(Y=16),F(Y===(Y|0)&&Y>=2&&Y<=36),$=$.toString().replace(/\s+/g,"");var Z=0;$[0]==="-"&&(Z++,this.negative=1),Z<$.length&&(Y===16?this._parseHex($,Z,G):(this._parseBase($,Y,Z),G==="le"&&this._initArray(this.toArray(),Y,G)))},X.prototype._initNumber=function($,Y,G){$<0&&(this.negative=1,$=-$),$<67108864?(this.words=[$&67108863],this.length=1):$<4503599627370496?(this.words=[$&67108863,$/67108864&67108863],this.length=2):(F($<9007199254740992),this.words=[$&67108863,$/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Y,G)},X.prototype._initArray=function($,Y,G){if(F(typeof $.length=="number"),$.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil($.length/3),this.words=new Array(this.length);for(var Z=0;Z=0;Z-=3)I=$[Z]|$[Z-1]<<8|$[Z-2]<<16,this.words[V]|=I<>>26-O&67108863,O+=24,O>=26&&(O-=26,V++);else if(G==="le")for(Z=0,V=0;Z<$.length;Z+=3)I=$[Z]|$[Z+1]<<8|$[Z+2]<<16,this.words[V]|=I<>>26-O&67108863,O+=24,O>=26&&(O-=26,V++);return this.strip()};function P($,Y){var G=$.charCodeAt(Y);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function T($,Y,G){var Z=P($,G);return G-1>=Y&&(Z|=P($,G-1)<<4),Z}X.prototype._parseHex=function($,Y,G){this.length=Math.ceil(($.length-Y)/6),this.words=new Array(this.length);for(var Z=0;Z=Y;Z-=2)O=T($,Y,Z)<=18?(V-=18,I+=1,this.words[I]|=O>>>26):V+=8;else{var U=$.length-Y;for(Z=U%2===0?Y+1:Y;Z<$.length;Z+=2)O=T($,Y,Z)<=18?(V-=18,I+=1,this.words[I]|=O>>>26):V+=8}this.strip()};function W($,Y,G,Z){for(var V=0,I=Math.min($.length,G),O=Y;O=49?V+=U-49+10:U>=17?V+=U-17+10:V+=U}return V}X.prototype._parseBase=function($,Y,G){this.words=[0],this.length=1;for(var Z=0,V=1;V<=67108863;V*=Y)Z++;Z--,V=V/Y|0;for(var I=$.length-G,O=I%Z,U=Math.min(I,I-O)+G,Q=0,K=G;K1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},X.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},X.prototype.inspect=function(){return(this.red?""};var J=["","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"],H=[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],D=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];X.prototype.toString=function($,Y){$=$||10,Y=Y|0||1;var G;if($===16||$==="hex"){G="";for(var Z=0,V=0,I=0;I>>24-Z&16777215,V!==0||I!==this.length-1?G=J[6-U.length]+U+G:G=U+G,Z+=2,Z>=26&&(Z-=26,I--)}for(V!==0&&(G=V.toString(16)+G);G.length%Y!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if($===($|0)&&$>=2&&$<=36){var Q=H[$],K=D[$];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var A=R.modn(K).toString($);R=R.idivn(K),R.isZero()?G=A+G:G=J[Q-A.length]+A+G}for(this.isZero()&&(G="0"+G);G.length%Y!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}F(!1,"Base should be between 2 and 36")},X.prototype.toNumber=function(){var $=this.words[0];return this.length===2?$+=this.words[1]*67108864:this.length===3&&this.words[2]===1?$+=4503599627370496+this.words[1]*67108864:this.length>2&&F(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-$:$},X.prototype.toJSON=function(){return this.toString(16)},X.prototype.toBuffer=function($,Y){return F(typeof C<"u"),this.toArrayLike(C,$,Y)},X.prototype.toArray=function($,Y){return this.toArrayLike(Array,$,Y)},X.prototype.toArrayLike=function($,Y,G){var Z=this.byteLength(),V=G||Math.max(1,Z);F(Z<=V,"byte array longer than desired length"),F(V>0,"Requested array length <= 0"),this.strip();var I=Y==="le",O=new $(V),U,Q,K=this.clone();if(I){for(Q=0;!K.isZero();Q++)U=K.andln(255),K.iushrn(8),O[Q]=U;for(;Q=4096&&(G+=13,Y>>>=13),Y>=64&&(G+=7,Y>>>=7),Y>=8&&(G+=4,Y>>>=4),Y>=2&&(G+=2,Y>>>=2),G+Y},X.prototype._zeroBits=function($){if($===0)return 26;var Y=$,G=0;return(Y&8191)===0&&(G+=13,Y>>>=13),(Y&127)===0&&(G+=7,Y>>>=7),(Y&15)===0&&(G+=4,Y>>>=4),(Y&3)===0&&(G+=2,Y>>>=2),(Y&1)===0&&G++,G},X.prototype.bitLength=function(){var $=this.words[this.length-1],Y=this._countBits($);return(this.length-1)*26+Y};function E($){for(var Y=new Array($.bitLength()),G=0;G>>V}return Y}X.prototype.zeroBits=function(){if(this.isZero())return 0;for(var $=0,Y=0;Y$.length?this.clone().ior($):$.clone().ior(this)},X.prototype.uor=function($){return this.length>$.length?this.clone().iuor($):$.clone().iuor(this)},X.prototype.iuand=function($){var Y;this.length>$.length?Y=$:Y=this;for(var G=0;G$.length?this.clone().iand($):$.clone().iand(this)},X.prototype.uand=function($){return this.length>$.length?this.clone().iuand($):$.clone().iuand(this)},X.prototype.iuxor=function($){var Y,G;this.length>$.length?(Y=this,G=$):(Y=$,G=this);for(var Z=0;Z$.length?this.clone().ixor($):$.clone().ixor(this)},X.prototype.uxor=function($){return this.length>$.length?this.clone().iuxor($):$.clone().iuxor(this)},X.prototype.inotn=function($){F(typeof $=="number"&&$>=0);var Y=Math.ceil($/26)|0,G=$%26;this._expand(Y),G>0&&Y--;for(var Z=0;Z0&&(this.words[Z]=~this.words[Z]&67108863>>26-G),this.strip()},X.prototype.notn=function($){return this.clone().inotn($)},X.prototype.setn=function($,Y){F(typeof $=="number"&&$>=0);var G=$/26|0,Z=$%26;return this._expand(G+1),Y?this.words[G]=this.words[G]|1<$.length?(G=this,Z=$):(G=$,Z=this);for(var V=0,I=0;I>>26;for(;V!==0&&I>>26;if(this.length=G.length,V!==0)this.words[this.length]=V,this.length++;else if(G!==this)for(;I$.length?this.clone().iadd($):$.clone().iadd(this)},X.prototype.isub=function($){if($.negative!==0){$.negative=0;var Y=this.iadd($);return $.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd($),this.negative=1,this._normSign();var G=this.cmp($);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,V;G>0?(Z=this,V=$):(Z=$,V=this);for(var I=0,O=0;O>26,this.words[O]=Y&67108863;for(;I!==0&&O>26,this.words[O]=Y&67108863;if(I===0&&O>>26,A=Q&67108863,S=Math.min(K,Y.length-1),x=Math.max(0,K-$.length+1);x<=S;x++){var B=K-x|0;V=$.words[B]|0,I=Y.words[x]|0,O=V*I+A,R+=O/67108864|0,A=O&67108863}G.words[K]=A|0,Q=R|0}return Q!==0?G.words[K]=Q|0:G.length--,G.strip()}var M=function($,Y,G){var Z=$.words,V=Y.words,I=G.words,O=0,U,Q,K,R=Z[0]|0,A=R&8191,S=R>>>13,x=Z[1]|0,B=x&8191,c=x>>>13,q0=Z[2]|0,h=q0&8191,d=q0>>>13,_0=Z[3]|0,l=_0&8191,n=_0>>>13,y0=Z[4]|0,t=y0&8191,s=y0>>>13,w0=Z[5]|0,m=w0&8191,r=w0>>>13,$$=Z[6]|0,i=$$&8191,e=$$>>>13,x0=Z[7]|0,o=x0&8191,a=x0>>>13,p0=Z[8]|0,$0=p0&8191,Q0=p0>>>13,Y$=Z[9]|0,Z0=Y$&8191,G0=Y$>>>13,Z$=V[0]|0,V0=Z$&8191,U0=Z$>>>13,G$=V[1]|0,X0=G$&8191,K0=G$>>>13,V$=V[2]|0,I0=V$&8191,O0=V$>>>13,U$=V[3]|0,J0=U$&8191,F0=U$>>>13,X$=V[4]|0,A0=X$&8191,H0=X$>>>13,K$=V[5]|0,W0=K$&8191,E0=K$>>>13,I$=V[6]|0,T0=I$&8191,D0=I$>>>13,O$=V[7]|0,C0=O$&8191,L0=O$>>>13,J$=V[8]|0,R0=J$&8191,P0=J$>>>13,F$=V[9]|0,z0=F$&8191,M0=F$>>>13;G.negative=$.negative^Y.negative,G.length=19,U=Math.imul(A,V0),Q=Math.imul(A,U0),Q=Q+Math.imul(S,V0)|0,K=Math.imul(S,U0);var Q$=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,U=Math.imul(B,V0),Q=Math.imul(B,U0),Q=Q+Math.imul(c,V0)|0,K=Math.imul(c,U0),U=U+Math.imul(A,X0)|0,Q=Q+Math.imul(A,K0)|0,Q=Q+Math.imul(S,X0)|0,K=K+Math.imul(S,K0)|0;var j0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(j0>>>26)|0,j0&=67108863,U=Math.imul(h,V0),Q=Math.imul(h,U0),Q=Q+Math.imul(d,V0)|0,K=Math.imul(d,U0),U=U+Math.imul(B,X0)|0,Q=Q+Math.imul(B,K0)|0,Q=Q+Math.imul(c,X0)|0,K=K+Math.imul(c,K0)|0,U=U+Math.imul(A,I0)|0,Q=Q+Math.imul(A,O0)|0,Q=Q+Math.imul(S,I0)|0,K=K+Math.imul(S,O0)|0;var k0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(k0>>>26)|0,k0&=67108863,U=Math.imul(l,V0),Q=Math.imul(l,U0),Q=Q+Math.imul(n,V0)|0,K=Math.imul(n,U0),U=U+Math.imul(h,X0)|0,Q=Q+Math.imul(h,K0)|0,Q=Q+Math.imul(d,X0)|0,K=K+Math.imul(d,K0)|0,U=U+Math.imul(B,I0)|0,Q=Q+Math.imul(B,O0)|0,Q=Q+Math.imul(c,I0)|0,K=K+Math.imul(c,O0)|0,U=U+Math.imul(A,J0)|0,Q=Q+Math.imul(A,F0)|0,Q=Q+Math.imul(S,J0)|0,K=K+Math.imul(S,F0)|0;var f0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(f0>>>26)|0,f0&=67108863,U=Math.imul(t,V0),Q=Math.imul(t,U0),Q=Q+Math.imul(s,V0)|0,K=Math.imul(s,U0),U=U+Math.imul(l,X0)|0,Q=Q+Math.imul(l,K0)|0,Q=Q+Math.imul(n,X0)|0,K=K+Math.imul(n,K0)|0,U=U+Math.imul(h,I0)|0,Q=Q+Math.imul(h,O0)|0,Q=Q+Math.imul(d,I0)|0,K=K+Math.imul(d,O0)|0,U=U+Math.imul(B,J0)|0,Q=Q+Math.imul(B,F0)|0,Q=Q+Math.imul(c,J0)|0,K=K+Math.imul(c,F0)|0,U=U+Math.imul(A,A0)|0,Q=Q+Math.imul(A,H0)|0,Q=Q+Math.imul(S,A0)|0,K=K+Math.imul(S,H0)|0;var c0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(c0>>>26)|0,c0&=67108863,U=Math.imul(m,V0),Q=Math.imul(m,U0),Q=Q+Math.imul(r,V0)|0,K=Math.imul(r,U0),U=U+Math.imul(t,X0)|0,Q=Q+Math.imul(t,K0)|0,Q=Q+Math.imul(s,X0)|0,K=K+Math.imul(s,K0)|0,U=U+Math.imul(l,I0)|0,Q=Q+Math.imul(l,O0)|0,Q=Q+Math.imul(n,I0)|0,K=K+Math.imul(n,O0)|0,U=U+Math.imul(h,J0)|0,Q=Q+Math.imul(h,F0)|0,Q=Q+Math.imul(d,J0)|0,K=K+Math.imul(d,F0)|0,U=U+Math.imul(B,A0)|0,Q=Q+Math.imul(B,H0)|0,Q=Q+Math.imul(c,A0)|0,K=K+Math.imul(c,H0)|0,U=U+Math.imul(A,W0)|0,Q=Q+Math.imul(A,E0)|0,Q=Q+Math.imul(S,W0)|0,K=K+Math.imul(S,E0)|0;var h0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(h0>>>26)|0,h0&=67108863,U=Math.imul(i,V0),Q=Math.imul(i,U0),Q=Q+Math.imul(e,V0)|0,K=Math.imul(e,U0),U=U+Math.imul(m,X0)|0,Q=Q+Math.imul(m,K0)|0,Q=Q+Math.imul(r,X0)|0,K=K+Math.imul(r,K0)|0,U=U+Math.imul(t,I0)|0,Q=Q+Math.imul(t,O0)|0,Q=Q+Math.imul(s,I0)|0,K=K+Math.imul(s,O0)|0,U=U+Math.imul(l,J0)|0,Q=Q+Math.imul(l,F0)|0,Q=Q+Math.imul(n,J0)|0,K=K+Math.imul(n,F0)|0,U=U+Math.imul(h,A0)|0,Q=Q+Math.imul(h,H0)|0,Q=Q+Math.imul(d,A0)|0,K=K+Math.imul(d,H0)|0,U=U+Math.imul(B,W0)|0,Q=Q+Math.imul(B,E0)|0,Q=Q+Math.imul(c,W0)|0,K=K+Math.imul(c,E0)|0,U=U+Math.imul(A,T0)|0,Q=Q+Math.imul(A,D0)|0,Q=Q+Math.imul(S,T0)|0,K=K+Math.imul(S,D0)|0;var d0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(d0>>>26)|0,d0&=67108863,U=Math.imul(o,V0),Q=Math.imul(o,U0),Q=Q+Math.imul(a,V0)|0,K=Math.imul(a,U0),U=U+Math.imul(i,X0)|0,Q=Q+Math.imul(i,K0)|0,Q=Q+Math.imul(e,X0)|0,K=K+Math.imul(e,K0)|0,U=U+Math.imul(m,I0)|0,Q=Q+Math.imul(m,O0)|0,Q=Q+Math.imul(r,I0)|0,K=K+Math.imul(r,O0)|0,U=U+Math.imul(t,J0)|0,Q=Q+Math.imul(t,F0)|0,Q=Q+Math.imul(s,J0)|0,K=K+Math.imul(s,F0)|0,U=U+Math.imul(l,A0)|0,Q=Q+Math.imul(l,H0)|0,Q=Q+Math.imul(n,A0)|0,K=K+Math.imul(n,H0)|0,U=U+Math.imul(h,W0)|0,Q=Q+Math.imul(h,E0)|0,Q=Q+Math.imul(d,W0)|0,K=K+Math.imul(d,E0)|0,U=U+Math.imul(B,T0)|0,Q=Q+Math.imul(B,D0)|0,Q=Q+Math.imul(c,T0)|0,K=K+Math.imul(c,D0)|0,U=U+Math.imul(A,C0)|0,Q=Q+Math.imul(A,L0)|0,Q=Q+Math.imul(S,C0)|0,K=K+Math.imul(S,L0)|0;var b0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(b0>>>26)|0,b0&=67108863,U=Math.imul($0,V0),Q=Math.imul($0,U0),Q=Q+Math.imul(Q0,V0)|0,K=Math.imul(Q0,U0),U=U+Math.imul(o,X0)|0,Q=Q+Math.imul(o,K0)|0,Q=Q+Math.imul(a,X0)|0,K=K+Math.imul(a,K0)|0,U=U+Math.imul(i,I0)|0,Q=Q+Math.imul(i,O0)|0,Q=Q+Math.imul(e,I0)|0,K=K+Math.imul(e,O0)|0,U=U+Math.imul(m,J0)|0,Q=Q+Math.imul(m,F0)|0,Q=Q+Math.imul(r,J0)|0,K=K+Math.imul(r,F0)|0,U=U+Math.imul(t,A0)|0,Q=Q+Math.imul(t,H0)|0,Q=Q+Math.imul(s,A0)|0,K=K+Math.imul(s,H0)|0,U=U+Math.imul(l,W0)|0,Q=Q+Math.imul(l,E0)|0,Q=Q+Math.imul(n,W0)|0,K=K+Math.imul(n,E0)|0,U=U+Math.imul(h,T0)|0,Q=Q+Math.imul(h,D0)|0,Q=Q+Math.imul(d,T0)|0,K=K+Math.imul(d,D0)|0,U=U+Math.imul(B,C0)|0,Q=Q+Math.imul(B,L0)|0,Q=Q+Math.imul(c,C0)|0,K=K+Math.imul(c,L0)|0,U=U+Math.imul(A,R0)|0,Q=Q+Math.imul(A,P0)|0,Q=Q+Math.imul(S,R0)|0,K=K+Math.imul(S,P0)|0;var l0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(l0>>>26)|0,l0&=67108863,U=Math.imul(Z0,V0),Q=Math.imul(Z0,U0),Q=Q+Math.imul(G0,V0)|0,K=Math.imul(G0,U0),U=U+Math.imul($0,X0)|0,Q=Q+Math.imul($0,K0)|0,Q=Q+Math.imul(Q0,X0)|0,K=K+Math.imul(Q0,K0)|0,U=U+Math.imul(o,I0)|0,Q=Q+Math.imul(o,O0)|0,Q=Q+Math.imul(a,I0)|0,K=K+Math.imul(a,O0)|0,U=U+Math.imul(i,J0)|0,Q=Q+Math.imul(i,F0)|0,Q=Q+Math.imul(e,J0)|0,K=K+Math.imul(e,F0)|0,U=U+Math.imul(m,A0)|0,Q=Q+Math.imul(m,H0)|0,Q=Q+Math.imul(r,A0)|0,K=K+Math.imul(r,H0)|0,U=U+Math.imul(t,W0)|0,Q=Q+Math.imul(t,E0)|0,Q=Q+Math.imul(s,W0)|0,K=K+Math.imul(s,E0)|0,U=U+Math.imul(l,T0)|0,Q=Q+Math.imul(l,D0)|0,Q=Q+Math.imul(n,T0)|0,K=K+Math.imul(n,D0)|0,U=U+Math.imul(h,C0)|0,Q=Q+Math.imul(h,L0)|0,Q=Q+Math.imul(d,C0)|0,K=K+Math.imul(d,L0)|0,U=U+Math.imul(B,R0)|0,Q=Q+Math.imul(B,P0)|0,Q=Q+Math.imul(c,R0)|0,K=K+Math.imul(c,P0)|0,U=U+Math.imul(A,z0)|0,Q=Q+Math.imul(A,M0)|0,Q=Q+Math.imul(S,z0)|0,K=K+Math.imul(S,M0)|0;var o0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(o0>>>26)|0,o0&=67108863,U=Math.imul(Z0,X0),Q=Math.imul(Z0,K0),Q=Q+Math.imul(G0,X0)|0,K=Math.imul(G0,K0),U=U+Math.imul($0,I0)|0,Q=Q+Math.imul($0,O0)|0,Q=Q+Math.imul(Q0,I0)|0,K=K+Math.imul(Q0,O0)|0,U=U+Math.imul(o,J0)|0,Q=Q+Math.imul(o,F0)|0,Q=Q+Math.imul(a,J0)|0,K=K+Math.imul(a,F0)|0,U=U+Math.imul(i,A0)|0,Q=Q+Math.imul(i,H0)|0,Q=Q+Math.imul(e,A0)|0,K=K+Math.imul(e,H0)|0,U=U+Math.imul(m,W0)|0,Q=Q+Math.imul(m,E0)|0,Q=Q+Math.imul(r,W0)|0,K=K+Math.imul(r,E0)|0,U=U+Math.imul(t,T0)|0,Q=Q+Math.imul(t,D0)|0,Q=Q+Math.imul(s,T0)|0,K=K+Math.imul(s,D0)|0,U=U+Math.imul(l,C0)|0,Q=Q+Math.imul(l,L0)|0,Q=Q+Math.imul(n,C0)|0,K=K+Math.imul(n,L0)|0,U=U+Math.imul(h,R0)|0,Q=Q+Math.imul(h,P0)|0,Q=Q+Math.imul(d,R0)|0,K=K+Math.imul(d,P0)|0,U=U+Math.imul(B,z0)|0,Q=Q+Math.imul(B,M0)|0,Q=Q+Math.imul(c,z0)|0,K=K+Math.imul(c,M0)|0;var u0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(u0>>>26)|0,u0&=67108863,U=Math.imul(Z0,I0),Q=Math.imul(Z0,O0),Q=Q+Math.imul(G0,I0)|0,K=Math.imul(G0,O0),U=U+Math.imul($0,J0)|0,Q=Q+Math.imul($0,F0)|0,Q=Q+Math.imul(Q0,J0)|0,K=K+Math.imul(Q0,F0)|0,U=U+Math.imul(o,A0)|0,Q=Q+Math.imul(o,H0)|0,Q=Q+Math.imul(a,A0)|0,K=K+Math.imul(a,H0)|0,U=U+Math.imul(i,W0)|0,Q=Q+Math.imul(i,E0)|0,Q=Q+Math.imul(e,W0)|0,K=K+Math.imul(e,E0)|0,U=U+Math.imul(m,T0)|0,Q=Q+Math.imul(m,D0)|0,Q=Q+Math.imul(r,T0)|0,K=K+Math.imul(r,D0)|0,U=U+Math.imul(t,C0)|0,Q=Q+Math.imul(t,L0)|0,Q=Q+Math.imul(s,C0)|0,K=K+Math.imul(s,L0)|0,U=U+Math.imul(l,R0)|0,Q=Q+Math.imul(l,P0)|0,Q=Q+Math.imul(n,R0)|0,K=K+Math.imul(n,P0)|0,U=U+Math.imul(h,z0)|0,Q=Q+Math.imul(h,M0)|0,Q=Q+Math.imul(d,z0)|0,K=K+Math.imul(d,M0)|0;var n0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(n0>>>26)|0,n0&=67108863,U=Math.imul(Z0,J0),Q=Math.imul(Z0,F0),Q=Q+Math.imul(G0,J0)|0,K=Math.imul(G0,F0),U=U+Math.imul($0,A0)|0,Q=Q+Math.imul($0,H0)|0,Q=Q+Math.imul(Q0,A0)|0,K=K+Math.imul(Q0,H0)|0,U=U+Math.imul(o,W0)|0,Q=Q+Math.imul(o,E0)|0,Q=Q+Math.imul(a,W0)|0,K=K+Math.imul(a,E0)|0,U=U+Math.imul(i,T0)|0,Q=Q+Math.imul(i,D0)|0,Q=Q+Math.imul(e,T0)|0,K=K+Math.imul(e,D0)|0,U=U+Math.imul(m,C0)|0,Q=Q+Math.imul(m,L0)|0,Q=Q+Math.imul(r,C0)|0,K=K+Math.imul(r,L0)|0,U=U+Math.imul(t,R0)|0,Q=Q+Math.imul(t,P0)|0,Q=Q+Math.imul(s,R0)|0,K=K+Math.imul(s,P0)|0,U=U+Math.imul(l,z0)|0,Q=Q+Math.imul(l,M0)|0,Q=Q+Math.imul(n,z0)|0,K=K+Math.imul(n,M0)|0;var s0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(s0>>>26)|0,s0&=67108863,U=Math.imul(Z0,A0),Q=Math.imul(Z0,H0),Q=Q+Math.imul(G0,A0)|0,K=Math.imul(G0,H0),U=U+Math.imul($0,W0)|0,Q=Q+Math.imul($0,E0)|0,Q=Q+Math.imul(Q0,W0)|0,K=K+Math.imul(Q0,E0)|0,U=U+Math.imul(o,T0)|0,Q=Q+Math.imul(o,D0)|0,Q=Q+Math.imul(a,T0)|0,K=K+Math.imul(a,D0)|0,U=U+Math.imul(i,C0)|0,Q=Q+Math.imul(i,L0)|0,Q=Q+Math.imul(e,C0)|0,K=K+Math.imul(e,L0)|0,U=U+Math.imul(m,R0)|0,Q=Q+Math.imul(m,P0)|0,Q=Q+Math.imul(r,R0)|0,K=K+Math.imul(r,P0)|0,U=U+Math.imul(t,z0)|0,Q=Q+Math.imul(t,M0)|0,Q=Q+Math.imul(s,z0)|0,K=K+Math.imul(s,M0)|0;var t0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(t0>>>26)|0,t0&=67108863,U=Math.imul(Z0,W0),Q=Math.imul(Z0,E0),Q=Q+Math.imul(G0,W0)|0,K=Math.imul(G0,E0),U=U+Math.imul($0,T0)|0,Q=Q+Math.imul($0,D0)|0,Q=Q+Math.imul(Q0,T0)|0,K=K+Math.imul(Q0,D0)|0,U=U+Math.imul(o,C0)|0,Q=Q+Math.imul(o,L0)|0,Q=Q+Math.imul(a,C0)|0,K=K+Math.imul(a,L0)|0,U=U+Math.imul(i,R0)|0,Q=Q+Math.imul(i,P0)|0,Q=Q+Math.imul(e,R0)|0,K=K+Math.imul(e,P0)|0,U=U+Math.imul(m,z0)|0,Q=Q+Math.imul(m,M0)|0,Q=Q+Math.imul(r,z0)|0,K=K+Math.imul(r,M0)|0;var m0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(m0>>>26)|0,m0&=67108863,U=Math.imul(Z0,T0),Q=Math.imul(Z0,D0),Q=Q+Math.imul(G0,T0)|0,K=Math.imul(G0,D0),U=U+Math.imul($0,C0)|0,Q=Q+Math.imul($0,L0)|0,Q=Q+Math.imul(Q0,C0)|0,K=K+Math.imul(Q0,L0)|0,U=U+Math.imul(o,R0)|0,Q=Q+Math.imul(o,P0)|0,Q=Q+Math.imul(a,R0)|0,K=K+Math.imul(a,P0)|0,U=U+Math.imul(i,z0)|0,Q=Q+Math.imul(i,M0)|0,Q=Q+Math.imul(e,z0)|0,K=K+Math.imul(e,M0)|0;var a0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(a0>>>26)|0,a0&=67108863,U=Math.imul(Z0,C0),Q=Math.imul(Z0,L0),Q=Q+Math.imul(G0,C0)|0,K=Math.imul(G0,L0),U=U+Math.imul($0,R0)|0,Q=Q+Math.imul($0,P0)|0,Q=Q+Math.imul(Q0,R0)|0,K=K+Math.imul(Q0,P0)|0,U=U+Math.imul(o,z0)|0,Q=Q+Math.imul(o,M0)|0,Q=Q+Math.imul(a,z0)|0,K=K+Math.imul(a,M0)|0;var e0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(e0>>>26)|0,e0&=67108863,U=Math.imul(Z0,R0),Q=Math.imul(Z0,P0),Q=Q+Math.imul(G0,R0)|0,K=Math.imul(G0,P0),U=U+Math.imul($0,z0)|0,Q=Q+Math.imul($0,M0)|0,Q=Q+Math.imul(Q0,z0)|0,K=K+Math.imul(Q0,M0)|0;var r0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(r0>>>26)|0,r0&=67108863,U=Math.imul(Z0,z0),Q=Math.imul(Z0,M0),Q=Q+Math.imul(G0,z0)|0,K=Math.imul(G0,M0);var i0=(O+U|0)+((Q&8191)<<13)|0;return O=(K+(Q>>>13)|0)+(i0>>>26)|0,i0&=67108863,I[0]=Q$,I[1]=j0,I[2]=k0,I[3]=f0,I[4]=c0,I[5]=h0,I[6]=d0,I[7]=b0,I[8]=l0,I[9]=o0,I[10]=u0,I[11]=n0,I[12]=s0,I[13]=t0,I[14]=m0,I[15]=a0,I[16]=e0,I[17]=r0,I[18]=i0,O!==0&&(I[19]=O,G.length++),G};Math.imul||(M=L);function v($,Y,G){G.negative=Y.negative^$.negative,G.length=$.length+Y.length;for(var Z=0,V=0,I=0;I>>26)|0,V+=O>>>26,O&=67108863}G.words[I]=U,Z=O,O=V}return Z!==0?G.words[I]=Z:G.length--,G.strip()}function q($,Y,G){var Z=new g;return Z.mulp($,Y,G)}X.prototype.mulTo=function($,Y){var G,Z=this.length+$.length;return this.length===10&&$.length===10?G=M(this,$,Y):Z<63?G=L(this,$,Y):Z<1024?G=v(this,$,Y):G=q(this,$,Y),G};function g($,Y){this.x=$,this.y=Y}g.prototype.makeRBT=function($){for(var Y=new Array($),G=X.prototype._countBits($)-1,Z=0;Z<$;Z++)Y[Z]=this.revBin(Z,G,$);return Y},g.prototype.revBin=function($,Y,G){if($===0||$===G-1)return $;for(var Z=0,V=0;V>=1;return Z},g.prototype.permute=function($,Y,G,Z,V,I){for(var O=0;O>>1)V++;return 1<>>13,G[2*I+1]=V&8191,V=V>>>13;for(I=2*Y;I>=26,Y+=Z/67108864|0,Y+=V>>>26,this.words[G]=V&67108863}return Y!==0&&(this.words[G]=Y,this.length++),this},X.prototype.muln=function($){return this.clone().imuln($)},X.prototype.sqr=function(){return this.mul(this)},X.prototype.isqr=function(){return this.imul(this.clone())},X.prototype.pow=function($){var Y=E($);if(Y.length===0)return new X(1);for(var G=this,Z=0;Z=0);var Y=$%26,G=($-Y)/26,Z=67108863>>>26-Y<<26-Y,V;if(Y!==0){var I=0;for(V=0;V>>26-Y}I&&(this.words[V]=I,this.length++)}if(G!==0){for(V=this.length-1;V>=0;V--)this.words[V+G]=this.words[V];for(V=0;V=0);var Z;Y?Z=(Y-Y%26)/26:Z=0;var V=$%26,I=Math.min(($-V)/26,this.length),O=67108863^67108863>>>V<I)for(this.length-=I,Q=0;Q=0&&(K!==0||Q>=Z);Q--){var R=this.words[Q]|0;this.words[Q]=K<<26-V|R>>>V,K=R&O}return U&&K!==0&&(U.words[U.length++]=K),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},X.prototype.ishrn=function($,Y,G){return F(this.negative===0),this.iushrn($,Y,G)},X.prototype.shln=function($){return this.clone().ishln($)},X.prototype.ushln=function($){return this.clone().iushln($)},X.prototype.shrn=function($){return this.clone().ishrn($)},X.prototype.ushrn=function($){return this.clone().iushrn($)},X.prototype.testn=function($){F(typeof $=="number"&&$>=0);var Y=$%26,G=($-Y)/26,Z=1<=0);var Y=$%26,G=($-Y)/26;if(F(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Y!==0&&G++,this.length=Math.min(G,this.length),Y!==0){var Z=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},X.prototype.isubn=function($){if(F(typeof $=="number"),F($<67108864),$<0)return this.iaddn(-$);if(this.negative!==0)return this.negative=0,this.iaddn($),this.negative=1,this;if(this.words[0]-=$,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-(U/67108864|0),this.words[V+G]=I&67108863}for(;V>26,this.words[V+G]=I&67108863;if(O===0)return this.strip();for(F(O===-1),O=0,V=0;V>26,this.words[V]=I&67108863;return this.negative=1,this.strip()},X.prototype._wordDiv=function($,Y){var G=this.length-$.length,Z=this.clone(),V=$,I=V.words[V.length-1]|0,O=this._countBits(I);G=26-O,G!==0&&(V=V.ushln(G),Z.iushln(G),I=V.words[V.length-1]|0);var U=Z.length-V.length,Q;if(Y!=="mod"){Q=new X(null),Q.length=U+1,Q.words=new Array(Q.length);for(var K=0;K=0;A--){var S=(Z.words[V.length+A]|0)*67108864+(Z.words[V.length+A-1]|0);for(S=Math.min(S/I|0,67108863),Z._ishlnsubmul(V,S,A);Z.negative!==0;)S--,Z.negative=0,Z._ishlnsubmul(V,1,A),Z.isZero()||(Z.negative^=1);Q&&(Q.words[A]=S)}return Q&&Q.strip(),Z.strip(),Y!=="div"&&G!==0&&Z.iushrn(G),{div:Q||null,mod:Z}},X.prototype.divmod=function($,Y,G){if(F(!$.isZero()),this.isZero())return{div:new X(0),mod:new X(0)};var Z,V,I;return this.negative!==0&&$.negative===0?(I=this.neg().divmod($,Y),Y!=="mod"&&(Z=I.div.neg()),Y!=="div"&&(V=I.mod.neg(),G&&V.negative!==0&&V.iadd($)),{div:Z,mod:V}):this.negative===0&&$.negative!==0?(I=this.divmod($.neg(),Y),Y!=="mod"&&(Z=I.div.neg()),{div:Z,mod:I.mod}):(this.negative&$.negative)!==0?(I=this.neg().divmod($.neg(),Y),Y!=="div"&&(V=I.mod.neg(),G&&V.negative!==0&&V.isub($)),{div:I.div,mod:V}):$.length>this.length||this.cmp($)<0?{div:new X(0),mod:this}:$.length===1?Y==="div"?{div:this.divn($.words[0]),mod:null}:Y==="mod"?{div:null,mod:new X(this.modn($.words[0]))}:{div:this.divn($.words[0]),mod:new X(this.modn($.words[0]))}:this._wordDiv($,Y)},X.prototype.div=function($){return this.divmod($,"div",!1).div},X.prototype.mod=function($){return this.divmod($,"mod",!1).mod},X.prototype.umod=function($){return this.divmod($,"mod",!0).mod},X.prototype.divRound=function($){var Y=this.divmod($);if(Y.mod.isZero())return Y.div;var G=Y.div.negative!==0?Y.mod.isub($):Y.mod,Z=$.ushrn(1),V=$.andln(1),I=G.cmp(Z);return I<0||V===1&&I===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},X.prototype.modn=function($){F($<=67108863);for(var Y=(1<<26)%$,G=0,Z=this.length-1;Z>=0;Z--)G=(Y*G+(this.words[Z]|0))%$;return G},X.prototype.idivn=function($){F($<=67108863);for(var Y=0,G=this.length-1;G>=0;G--){var Z=(this.words[G]|0)+Y*67108864;this.words[G]=Z/$|0,Y=Z%$}return this.strip()},X.prototype.divn=function($){return this.clone().idivn($)},X.prototype.egcd=function($){F($.negative===0),F(!$.isZero());var Y=this,G=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new X(1),V=new X(0),I=new X(0),O=new X(1),U=0;Y.isEven()&&G.isEven();)Y.iushrn(1),G.iushrn(1),++U;for(var Q=G.clone(),K=Y.clone();!Y.isZero();){for(var R=0,A=1;(Y.words[0]&A)===0&&R<26;++R,A<<=1);if(R>0)for(Y.iushrn(R);R-- >0;)(Z.isOdd()||V.isOdd())&&(Z.iadd(Q),V.isub(K)),Z.iushrn(1),V.iushrn(1);for(var S=0,x=1;(G.words[0]&x)===0&&S<26;++S,x<<=1);if(S>0)for(G.iushrn(S);S-- >0;)(I.isOdd()||O.isOdd())&&(I.iadd(Q),O.isub(K)),I.iushrn(1),O.iushrn(1);Y.cmp(G)>=0?(Y.isub(G),Z.isub(I),V.isub(O)):(G.isub(Y),I.isub(Z),O.isub(V))}return{a:I,b:O,gcd:G.iushln(U)}},X.prototype._invmp=function($){F($.negative===0),F(!$.isZero());var Y=this,G=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new X(1),V=new X(0),I=G.clone();Y.cmpn(1)>0&&G.cmpn(1)>0;){for(var O=0,U=1;(Y.words[0]&U)===0&&O<26;++O,U<<=1);if(O>0)for(Y.iushrn(O);O-- >0;)Z.isOdd()&&Z.iadd(I),Z.iushrn(1);for(var Q=0,K=1;(G.words[0]&K)===0&&Q<26;++Q,K<<=1);if(Q>0)for(G.iushrn(Q);Q-- >0;)V.isOdd()&&V.iadd(I),V.iushrn(1);Y.cmp(G)>=0?(Y.isub(G),Z.isub(V)):(G.isub(Y),V.isub(Z))}var R;return Y.cmpn(1)===0?R=Z:R=V,R.cmpn(0)<0&&R.iadd($),R},X.prototype.gcd=function($){if(this.isZero())return $.abs();if($.isZero())return this.abs();var Y=this.clone(),G=$.clone();Y.negative=0,G.negative=0;for(var Z=0;Y.isEven()&&G.isEven();Z++)Y.iushrn(1),G.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;G.isEven();)G.iushrn(1);var V=Y.cmp(G);if(V<0){var I=Y;Y=G,G=I}else if(V===0||G.cmpn(1)===0)break;Y.isub(G)}while(!0);return G.iushln(Z)},X.prototype.invm=function($){return this.egcd($).a.umod($)},X.prototype.isEven=function(){return(this.words[0]&1)===0},X.prototype.isOdd=function(){return(this.words[0]&1)===1},X.prototype.andln=function($){return this.words[0]&$},X.prototype.bincn=function($){F(typeof $=="number");var Y=$%26,G=($-Y)/26,Z=1<>>26,O&=67108863,this.words[I]=O}return V!==0&&(this.words[I]=V,this.length++),this},X.prototype.isZero=function(){return this.length===1&&this.words[0]===0},X.prototype.cmpn=function($){var Y=$<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var G;if(this.length>1)G=1;else{Y&&($=-$),F($<=67108863,"Number is too big");var Z=this.words[0]|0;G=Z===$?0:Z<$?-1:1}return this.negative!==0?-G|0:G},X.prototype.cmp=function($){if(this.negative!==0&&$.negative===0)return-1;if(this.negative===0&&$.negative!==0)return 1;var Y=this.ucmp($);return this.negative!==0?-Y|0:Y},X.prototype.ucmp=function($){if(this.length>$.length)return 1;if(this.length<$.length)return-1;for(var Y=0,G=this.length-1;G>=0;G--){var Z=this.words[G]|0,V=$.words[G]|0;if(Z!==V){ZV&&(Y=1);break}}return Y},X.prototype.gtn=function($){return this.cmpn($)===1},X.prototype.gt=function($){return this.cmp($)===1},X.prototype.gten=function($){return this.cmpn($)>=0},X.prototype.gte=function($){return this.cmp($)>=0},X.prototype.ltn=function($){return this.cmpn($)===-1},X.prototype.lt=function($){return this.cmp($)===-1},X.prototype.lten=function($){return this.cmpn($)<=0},X.prototype.lte=function($){return this.cmp($)<=0},X.prototype.eqn=function($){return this.cmpn($)===0},X.prototype.eq=function($){return this.cmp($)===0},X.red=function($){return new p($)},X.prototype.toRed=function($){return F(!this.red,"Already a number in reduction context"),F(this.negative===0,"red works only with positives"),$.convertTo(this)._forceRed($)},X.prototype.fromRed=function(){return F(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},X.prototype._forceRed=function($){return this.red=$,this},X.prototype.forceRed=function($){return F(!this.red,"Already a number in reduction context"),this._forceRed($)},X.prototype.redAdd=function($){return F(this.red,"redAdd works only with red numbers"),this.red.add(this,$)},X.prototype.redIAdd=function($){return F(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,$)},X.prototype.redSub=function($){return F(this.red,"redSub works only with red numbers"),this.red.sub(this,$)},X.prototype.redISub=function($){return F(this.red,"redISub works only with red numbers"),this.red.isub(this,$)},X.prototype.redShl=function($){return F(this.red,"redShl works only with red numbers"),this.red.shl(this,$)},X.prototype.redMul=function($){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.mul(this,$)},X.prototype.redIMul=function($){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.imul(this,$)},X.prototype.redSqr=function(){return F(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},X.prototype.redISqr=function(){return F(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},X.prototype.redSqrt=function(){return F(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},X.prototype.redInvm=function(){return F(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},X.prototype.redNeg=function(){return F(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},X.prototype.redPow=function($){return F(this.red&&!$.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,$)};var y={k256:null,p224:null,p192:null,p25519:null};function w($,Y){this.name=$,this.p=new X(Y,16),this.n=this.p.bitLength(),this.k=new X(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}w.prototype._tmp=function(){var $=new X(null);return $.words=new Array(Math.ceil(this.n/13)),$},w.prototype.ireduce=function($){var Y=$,G;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),G=Y.bitLength();while(G>this.n);var Z=G0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},w.prototype.split=function($,Y){$.iushrn(this.n,0,Y)},w.prototype.imulK=function($){return $.imul(this.k)};function f(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(f,w),f.prototype.split=function($,Y){for(var G=4194303,Z=Math.min($.length,9),V=0;V>>22,I=O}I>>>=22,$.words[V-10]=I,I===0&&$.length>10?$.length-=10:$.length-=9},f.prototype.imulK=function($){$.words[$.length]=0,$.words[$.length+1]=0,$.length+=2;for(var Y=0,G=0;G<$.length;G++){var Z=$.words[G]|0;Y+=Z*977,$.words[G]=Y&67108863,Y=Z*64+(Y/67108864|0)}return $.words[$.length-1]===0&&($.length--,$.words[$.length-1]===0&&$.length--),$};function b(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(b,w);function u(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(u,w);function Y0(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(Y0,w),Y0.prototype.imulK=function($){for(var Y=0,G=0;G<$.length;G++){var Z=($.words[G]|0)*19+Y,V=Z&67108863;Z>>>=26,$.words[G]=V,Y=Z}return Y!==0&&($.words[$.length++]=Y),$},X._prime=function($){if(y[$])return y[$];var Y;if($==="k256")Y=new f;else if($==="p224")Y=new b;else if($==="p192")Y=new u;else if($==="p25519")Y=new Y0;else throw new Error("Unknown prime "+$);return y[$]=Y,Y};function p($){if(typeof $=="string"){var Y=X._prime($);this.m=Y.p,this.prime=Y}else F($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}p.prototype._verify1=function($){F($.negative===0,"red works only with positives"),F($.red,"red works only with red numbers")},p.prototype._verify2=function($,Y){F(($.negative|Y.negative)===0,"red works only with positives"),F($.red&&$.red===Y.red,"red works only with red numbers")},p.prototype.imod=function($){return this.prime?this.prime.ireduce($)._forceRed(this):$.umod(this.m)._forceRed(this)},p.prototype.neg=function($){return $.isZero()?$.clone():this.m.sub($)._forceRed(this)},p.prototype.add=function($,Y){this._verify2($,Y);var G=$.add(Y);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},p.prototype.iadd=function($,Y){this._verify2($,Y);var G=$.iadd(Y);return G.cmp(this.m)>=0&&G.isub(this.m),G},p.prototype.sub=function($,Y){this._verify2($,Y);var G=$.sub(Y);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},p.prototype.isub=function($,Y){this._verify2($,Y);var G=$.isub(Y);return G.cmpn(0)<0&&G.iadd(this.m),G},p.prototype.shl=function($,Y){return this._verify1($),this.imod($.ushln(Y))},p.prototype.imul=function($,Y){return this._verify2($,Y),this.imod($.imul(Y))},p.prototype.mul=function($,Y){return this._verify2($,Y),this.imod($.mul(Y))},p.prototype.isqr=function($){return this.imul($,$.clone())},p.prototype.sqr=function($){return this.mul($,$)},p.prototype.sqrt=function($){if($.isZero())return $.clone();var Y=this.m.andln(3);if(F(Y%2===1),Y===3){var G=this.m.add(new X(1)).iushrn(2);return this.pow($,G)}for(var Z=this.m.subn(1),V=0;!Z.isZero()&&Z.andln(1)===0;)V++,Z.iushrn(1);F(!Z.isZero());var I=new X(1).toRed(this),O=I.redNeg(),U=this.m.subn(1).iushrn(1),Q=this.m.bitLength();for(Q=new X(2*Q*Q).toRed(this);this.pow(Q,U).cmp(O)!==0;)Q.redIAdd(O);for(var K=this.pow(Q,Z),R=this.pow($,Z.addn(1).iushrn(1)),A=this.pow($,Z),S=V;A.cmp(I)!==0;){for(var x=A,B=0;x.cmp(I)!==0;B++)x=x.redSqr();F(B=0;V--){for(var K=Y.words[V],R=Q-1;R>=0;R--){var A=K>>R&1;if(I!==Z[0]&&(I=this.sqr(I)),A===0&&O===0){U=0;continue}O<<=1,O|=A,U++,!(U!==G&&(V!==0||R!==0))&&(I=this.mul(I,Z[O]),U=0,O=0)}Q=26}return I},p.prototype.convertTo=function($){var Y=$.umod(this.m);return Y===$?Y.clone():Y},p.prototype.convertFrom=function($){var Y=$.clone();return Y.red=null,Y},X.mont=function($){return new v0($)};function v0($){p.call(this,$),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new X(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)}z(v0,p),v0.prototype.convertTo=function($){return this.imod($.ushln(this.shift))},v0.prototype.convertFrom=function($){var Y=this.imod($.mul(this.rinv));return Y.red=null,Y},v0.prototype.imul=function($,Y){if($.isZero()||Y.isZero())return $.words[0]=0,$.length=1,$;var G=$.imul(Y),Z=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=G.isub(Z).iushrn(this.shift),I=V;return V.cmp(this.m)>=0?I=V.isub(this.m):V.cmpn(0)<0&&(I=V.iadd(this.m)),I._forceRed(this)},v0.prototype.mul=function($,Y){if($.isZero()||Y.isZero())return new X(0)._forceRed(this);var G=$.mul(Y),Z=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=G.isub(Z).iushrn(this.shift),I=V;return V.cmp(this.m)>=0?I=V.isub(this.m):V.cmpn(0)<0&&(I=V.iadd(this.m)),I._forceRed(this)},v0.prototype.invm=function($){var Y=this.imod($._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof _>"u"||_,N)}}),VZ=S0({"(disabled):node_modules/crypto-browserify/index.js"(){}}),f$=S0({"node_modules/brorand/index.js"(N,_){var k;_.exports=function(F){return k||(k=new j(null)),k.generate(F)};function j(F){this.rand=F}_.exports.Rand=j,j.prototype.generate=function(F){return this._rand(F)},j.prototype._rand=function(F){var z=new g0(F);return H$.getRandomValues(z),z}}}),RQ=S0({"node_modules/miller-rabin/lib/mr.js"(N,_){var k=AY(),j=f$();function F(z){this.rand=z||new j.Rand}_.exports=F,F.create=function(z){return new F(z)},F.prototype._randbelow=function(z){var X=z.bitLength(),C=Math.ceil(X/8);do var P=new k(this.rand.generate(C));while(P.cmp(z)>=0);return P},F.prototype._randrange=function(z,X){var C=X.sub(z);return z.add(this._randbelow(C))},F.prototype.test=function(z,X,C){var P=z.bitLength(),T=k.mont(z),W=new k(1).toRed(T);X||(X=Math.max(1,P/48|0));for(var J=z.subn(1),H=0;!J.testn(H);H++);for(var D=z.shrn(H),E=J.toRed(T),L=!0;X>0;X--){var M=this._randrange(new k(2),J);C&&C(M);var v=M.toRed(T).redPow(D);if(!(v.cmp(W)===0||v.cmp(E)===0)){for(var q=1;q0;X--){var E=this._randrange(new k(2),W),L=z.gcd(E);if(L.cmpn(1)!==0)return L;var M=E.toRed(P).redPow(H);if(!(M.cmp(T)===0||M.cmp(D)===0)){for(var v=1;vb;)Y0.ishrn(1);if(Y0.isEven()&&Y0.iadd(C),Y0.testn(1)||Y0.iadd(P),u.cmp(P)){if(!u.cmp(T))for(;Y0.mod(H).cmp(D);)Y0.iadd(M)}else for(;Y0.mod(F).cmp(L);)Y0.iadd(M);if(p=Y0.shrn(1),y(p)&&y(Y0)&&w(p)&&w(Y0)&&X.test(p)&&X.test(Y0))return Y0}}}}),HY=S0({"node_modules/diffie-hellman/lib/primes.json"(N,_){_.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}}}),WY=S0({"node_modules/diffie-hellman/lib/dh.js"(N,_){var k=LQ(),j=RQ(),F=new j,z=new k(24),X=new k(11),C=new k(10),P=new k(3),T=new k(7),W=PQ(),J=L$();_.exports=M;function H(q,g){return g=g||"utf8",g0.isBuffer(q)||(q=new g0(q,g)),this._pub=new k(q),this}function D(q,g){return g=g||"utf8",g0.isBuffer(q)||(q=new g0(q,g)),this._priv=new k(q),this}var E={};function L(q,g){var y=g.toString("hex"),w=[y,q.toString(16)].join("_");if(w in E)return E[w];var f=0;if(q.isEven()||!W.simpleSieve||!W.fermatTest(q)||!F.test(q))return f+=1,y==="02"||y==="05"?f+=8:f+=4,E[w]=f,f;F.test(q.shrn(1))||(f+=2);var b;switch(y){case"02":q.mod(z).cmp(X)&&(f+=8);break;case"05":b=q.mod(C),b.cmp(P)&&b.cmp(T)&&(f+=8);break;default:f+=4}return E[w]=f,f}function M(q,g,y){this.setGenerator(g),this.__prime=new k(q),this._prime=k.mont(this.__prime),this._primeLen=q.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,y?(this.setPublicKey=H,this.setPrivateKey=D):this._primeCode=8}Object.defineProperty(M.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=L(this.__prime,this.__gen)),this._primeCode}}),M.prototype.generateKeys=function(){return this._priv||(this._priv=new k(J(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},M.prototype.computeSecret=function(q){q=new k(q),q=q.toRed(this._prime);var g=q.redPow(this._priv).fromRed(),y=new g0(g.toArray()),w=this.getPrime();if(y.length0?Z:V},X.min=function(Z,V){return Z.cmp(V)<0?Z:V},X.prototype._init=function(Z,V,I){if(typeof Z=="number")return this._initNumber(Z,V,I);if(typeof Z=="object")return this._initArray(Z,V,I);V==="hex"&&(V=16),F(V===(V|0)&&V>=2&&V<=36),Z=Z.toString().replace(/\s+/g,"");var O=0;Z[0]==="-"&&(O++,this.negative=1),O=0;O-=3)Q=Z[O]|Z[O-1]<<8|Z[O-2]<<16,this.words[U]|=Q<>>26-K&67108863,K+=24,K>=26&&(K-=26,U++);else if(I==="le")for(O=0,U=0;O>>26-K&67108863,K+=24,K>=26&&(K-=26,U++);return this._strip()};function P(Z,V){var I=Z.charCodeAt(V);if(I>=48&&I<=57)return I-48;if(I>=65&&I<=70)return I-55;if(I>=97&&I<=102)return I-87;F(!1,"Invalid character in "+Z)}function T(Z,V,I){var O=P(Z,I);return I-1>=V&&(O|=P(Z,I-1)<<4),O}X.prototype._parseHex=function(Z,V,I){this.length=Math.ceil((Z.length-V)/6),this.words=new Array(this.length);for(var O=0;O=V;O-=2)K=T(Z,V,O)<=18?(U-=18,Q+=1,this.words[Q]|=K>>>26):U+=8;else{var R=Z.length-V;for(O=R%2===0?V+1:V;O=18?(U-=18,Q+=1,this.words[Q]|=K>>>26):U+=8}this._strip()};function W(Z,V,I,O){for(var U=0,Q=0,K=Math.min(Z.length,I),R=V;R=49?Q=A-49+10:A>=17?Q=A-17+10:Q=A,F(A>=0&&Q1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},X.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{X.prototype[Symbol.for("nodejs.util.inspect.custom")]=H}catch{X.prototype.inspect=H}else X.prototype.inspect=H;function H(){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"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],L=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];X.prototype.toString=function(Z,V){Z=Z||10,V=V|0||1;var I;if(Z===16||Z==="hex"){I="";for(var O=0,U=0,Q=0;Q>>24-O&16777215,O+=2,O>=26&&(O-=26,Q--),U!==0||Q!==this.length-1?I=D[6-R.length]+R+I:I=R+I}for(U!==0&&(I=U.toString(16)+I);I.length%V!==0;)I="0"+I;return this.negative!==0&&(I="-"+I),I}if(Z===(Z|0)&&Z>=2&&Z<=36){var A=E[Z],S=L[Z];I="";var x=this.clone();for(x.negative=0;!x.isZero();){var B=x.modrn(S).toString(Z);x=x.idivn(S),x.isZero()?I=B+I:I=D[A-B.length]+B+I}for(this.isZero()&&(I="0"+I);I.length%V!==0;)I="0"+I;return this.negative!==0&&(I="-"+I),I}F(!1,"Base should be between 2 and 36")},X.prototype.toNumber=function(){var Z=this.words[0];return this.length===2?Z+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Z+=4503599627370496+this.words[1]*67108864:this.length>2&&F(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Z:Z},X.prototype.toJSON=function(){return this.toString(16,2)},C&&(X.prototype.toBuffer=function(Z,V){return this.toArrayLike(C,Z,V)}),X.prototype.toArray=function(Z,V){return this.toArrayLike(Array,Z,V)};var M=function(Z,V){return Z.allocUnsafe?Z.allocUnsafe(V):new Z(V)};X.prototype.toArrayLike=function(Z,V,I){this._strip();var O=this.byteLength(),U=I||Math.max(1,O);F(O<=U,"byte array longer than desired length"),F(U>0,"Requested array length <= 0");var Q=M(Z,U),K=V==="le"?"LE":"BE";return this["_toArrayLike"+K](Q,O),Q},X.prototype._toArrayLikeLE=function(Z,V){for(var I=0,O=0,U=0,Q=0;U>8&255),I>16&255),Q===6?(I>24&255),O=0,Q=0):(O=K>>>24,Q+=2)}if(I=0&&(Z[I--]=K>>8&255),I>=0&&(Z[I--]=K>>16&255),Q===6?(I>=0&&(Z[I--]=K>>24&255),O=0,Q=0):(O=K>>>24,Q+=2)}if(I>=0)for(Z[I--]=O;I>=0;)Z[I--]=0},Math.clz32?X.prototype._countBits=function(Z){return 32-Math.clz32(Z)}:X.prototype._countBits=function(Z){var V=Z,I=0;return V>=4096&&(I+=13,V>>>=13),V>=64&&(I+=7,V>>>=7),V>=8&&(I+=4,V>>>=4),V>=2&&(I+=2,V>>>=2),I+V},X.prototype._zeroBits=function(Z){if(Z===0)return 26;var V=Z,I=0;return(V&8191)===0&&(I+=13,V>>>=13),(V&127)===0&&(I+=7,V>>>=7),(V&15)===0&&(I+=4,V>>>=4),(V&3)===0&&(I+=2,V>>>=2),(V&1)===0&&I++,I},X.prototype.bitLength=function(){var Z=this.words[this.length-1],V=this._countBits(Z);return(this.length-1)*26+V};function v(Z){for(var V=new Array(Z.bitLength()),I=0;I>>U&1}return V}X.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Z=0,V=0;VZ.length?this.clone().ior(Z):Z.clone().ior(this)},X.prototype.uor=function(Z){return this.length>Z.length?this.clone().iuor(Z):Z.clone().iuor(this)},X.prototype.iuand=function(Z){var V;this.length>Z.length?V=Z:V=this;for(var I=0;IZ.length?this.clone().iand(Z):Z.clone().iand(this)},X.prototype.uand=function(Z){return this.length>Z.length?this.clone().iuand(Z):Z.clone().iuand(this)},X.prototype.iuxor=function(Z){var V,I;this.length>Z.length?(V=this,I=Z):(V=Z,I=this);for(var O=0;OZ.length?this.clone().ixor(Z):Z.clone().ixor(this)},X.prototype.uxor=function(Z){return this.length>Z.length?this.clone().iuxor(Z):Z.clone().iuxor(this)},X.prototype.inotn=function(Z){F(typeof Z=="number"&&Z>=0);var V=Math.ceil(Z/26)|0,I=Z%26;this._expand(V),I>0&&V--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-I),this._strip()},X.prototype.notn=function(Z){return this.clone().inotn(Z)},X.prototype.setn=function(Z,V){F(typeof Z=="number"&&Z>=0);var I=Z/26|0,O=Z%26;return this._expand(I+1),V?this.words[I]=this.words[I]|1<Z.length?(I=this,O=Z):(I=Z,O=this);for(var U=0,Q=0;Q>>26;for(;U!==0&&Q>>26;if(this.length=I.length,U!==0)this.words[this.length]=U,this.length++;else if(I!==this)for(;QZ.length?this.clone().iadd(Z):Z.clone().iadd(this)},X.prototype.isub=function(Z){if(Z.negative!==0){Z.negative=0;var V=this.iadd(Z);return Z.negative=1,V._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Z),this.negative=1,this._normSign();var I=this.cmp(Z);if(I===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,U;I>0?(O=this,U=Z):(O=Z,U=this);for(var Q=0,K=0;K>26,this.words[K]=V&67108863;for(;Q!==0&&K>26,this.words[K]=V&67108863;if(Q===0&&K>>26,B=A&67108863,c=Math.min(S,V.length-1),q0=Math.max(0,S-Z.length+1);q0<=c;q0++){var h=S-q0|0;U=Z.words[h]|0,Q=V.words[q0]|0,K=U*Q+B,x+=K/67108864|0,B=K&67108863}I.words[S]=B|0,A=x|0}return A!==0?I.words[S]=A|0:I.length--,I._strip()}var g=function(Z,V,I){var O=Z.words,U=V.words,Q=I.words,K=0,R,A,S,x=O[0]|0,B=x&8191,c=x>>>13,q0=O[1]|0,h=q0&8191,d=q0>>>13,_0=O[2]|0,l=_0&8191,n=_0>>>13,y0=O[3]|0,t=y0&8191,s=y0>>>13,w0=O[4]|0,m=w0&8191,r=w0>>>13,$$=O[5]|0,i=$$&8191,e=$$>>>13,x0=O[6]|0,o=x0&8191,a=x0>>>13,p0=O[7]|0,$0=p0&8191,Q0=p0>>>13,Y$=O[8]|0,Z0=Y$&8191,G0=Y$>>>13,Z$=O[9]|0,V0=Z$&8191,U0=Z$>>>13,G$=U[0]|0,X0=G$&8191,K0=G$>>>13,V$=U[1]|0,I0=V$&8191,O0=V$>>>13,U$=U[2]|0,J0=U$&8191,F0=U$>>>13,X$=U[3]|0,A0=X$&8191,H0=X$>>>13,K$=U[4]|0,W0=K$&8191,E0=K$>>>13,I$=U[5]|0,T0=I$&8191,D0=I$>>>13,O$=U[6]|0,C0=O$&8191,L0=O$>>>13,J$=U[7]|0,R0=J$&8191,P0=J$>>>13,F$=U[8]|0,z0=F$&8191,M0=F$>>>13,Q$=U[9]|0,j0=Q$&8191,k0=Q$>>>13;I.negative=Z.negative^V.negative,I.length=19,R=Math.imul(B,X0),A=Math.imul(B,K0),A=A+Math.imul(c,X0)|0,S=Math.imul(c,K0);var f0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(f0>>>26)|0,f0&=67108863,R=Math.imul(h,X0),A=Math.imul(h,K0),A=A+Math.imul(d,X0)|0,S=Math.imul(d,K0),R=R+Math.imul(B,I0)|0,A=A+Math.imul(B,O0)|0,A=A+Math.imul(c,I0)|0,S=S+Math.imul(c,O0)|0;var c0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(c0>>>26)|0,c0&=67108863,R=Math.imul(l,X0),A=Math.imul(l,K0),A=A+Math.imul(n,X0)|0,S=Math.imul(n,K0),R=R+Math.imul(h,I0)|0,A=A+Math.imul(h,O0)|0,A=A+Math.imul(d,I0)|0,S=S+Math.imul(d,O0)|0,R=R+Math.imul(B,J0)|0,A=A+Math.imul(B,F0)|0,A=A+Math.imul(c,J0)|0,S=S+Math.imul(c,F0)|0;var h0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(h0>>>26)|0,h0&=67108863,R=Math.imul(t,X0),A=Math.imul(t,K0),A=A+Math.imul(s,X0)|0,S=Math.imul(s,K0),R=R+Math.imul(l,I0)|0,A=A+Math.imul(l,O0)|0,A=A+Math.imul(n,I0)|0,S=S+Math.imul(n,O0)|0,R=R+Math.imul(h,J0)|0,A=A+Math.imul(h,F0)|0,A=A+Math.imul(d,J0)|0,S=S+Math.imul(d,F0)|0,R=R+Math.imul(B,A0)|0,A=A+Math.imul(B,H0)|0,A=A+Math.imul(c,A0)|0,S=S+Math.imul(c,H0)|0;var d0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(d0>>>26)|0,d0&=67108863,R=Math.imul(m,X0),A=Math.imul(m,K0),A=A+Math.imul(r,X0)|0,S=Math.imul(r,K0),R=R+Math.imul(t,I0)|0,A=A+Math.imul(t,O0)|0,A=A+Math.imul(s,I0)|0,S=S+Math.imul(s,O0)|0,R=R+Math.imul(l,J0)|0,A=A+Math.imul(l,F0)|0,A=A+Math.imul(n,J0)|0,S=S+Math.imul(n,F0)|0,R=R+Math.imul(h,A0)|0,A=A+Math.imul(h,H0)|0,A=A+Math.imul(d,A0)|0,S=S+Math.imul(d,H0)|0,R=R+Math.imul(B,W0)|0,A=A+Math.imul(B,E0)|0,A=A+Math.imul(c,W0)|0,S=S+Math.imul(c,E0)|0;var b0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(b0>>>26)|0,b0&=67108863,R=Math.imul(i,X0),A=Math.imul(i,K0),A=A+Math.imul(e,X0)|0,S=Math.imul(e,K0),R=R+Math.imul(m,I0)|0,A=A+Math.imul(m,O0)|0,A=A+Math.imul(r,I0)|0,S=S+Math.imul(r,O0)|0,R=R+Math.imul(t,J0)|0,A=A+Math.imul(t,F0)|0,A=A+Math.imul(s,J0)|0,S=S+Math.imul(s,F0)|0,R=R+Math.imul(l,A0)|0,A=A+Math.imul(l,H0)|0,A=A+Math.imul(n,A0)|0,S=S+Math.imul(n,H0)|0,R=R+Math.imul(h,W0)|0,A=A+Math.imul(h,E0)|0,A=A+Math.imul(d,W0)|0,S=S+Math.imul(d,E0)|0,R=R+Math.imul(B,T0)|0,A=A+Math.imul(B,D0)|0,A=A+Math.imul(c,T0)|0,S=S+Math.imul(c,D0)|0;var l0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(l0>>>26)|0,l0&=67108863,R=Math.imul(o,X0),A=Math.imul(o,K0),A=A+Math.imul(a,X0)|0,S=Math.imul(a,K0),R=R+Math.imul(i,I0)|0,A=A+Math.imul(i,O0)|0,A=A+Math.imul(e,I0)|0,S=S+Math.imul(e,O0)|0,R=R+Math.imul(m,J0)|0,A=A+Math.imul(m,F0)|0,A=A+Math.imul(r,J0)|0,S=S+Math.imul(r,F0)|0,R=R+Math.imul(t,A0)|0,A=A+Math.imul(t,H0)|0,A=A+Math.imul(s,A0)|0,S=S+Math.imul(s,H0)|0,R=R+Math.imul(l,W0)|0,A=A+Math.imul(l,E0)|0,A=A+Math.imul(n,W0)|0,S=S+Math.imul(n,E0)|0,R=R+Math.imul(h,T0)|0,A=A+Math.imul(h,D0)|0,A=A+Math.imul(d,T0)|0,S=S+Math.imul(d,D0)|0,R=R+Math.imul(B,C0)|0,A=A+Math.imul(B,L0)|0,A=A+Math.imul(c,C0)|0,S=S+Math.imul(c,L0)|0;var o0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(o0>>>26)|0,o0&=67108863,R=Math.imul($0,X0),A=Math.imul($0,K0),A=A+Math.imul(Q0,X0)|0,S=Math.imul(Q0,K0),R=R+Math.imul(o,I0)|0,A=A+Math.imul(o,O0)|0,A=A+Math.imul(a,I0)|0,S=S+Math.imul(a,O0)|0,R=R+Math.imul(i,J0)|0,A=A+Math.imul(i,F0)|0,A=A+Math.imul(e,J0)|0,S=S+Math.imul(e,F0)|0,R=R+Math.imul(m,A0)|0,A=A+Math.imul(m,H0)|0,A=A+Math.imul(r,A0)|0,S=S+Math.imul(r,H0)|0,R=R+Math.imul(t,W0)|0,A=A+Math.imul(t,E0)|0,A=A+Math.imul(s,W0)|0,S=S+Math.imul(s,E0)|0,R=R+Math.imul(l,T0)|0,A=A+Math.imul(l,D0)|0,A=A+Math.imul(n,T0)|0,S=S+Math.imul(n,D0)|0,R=R+Math.imul(h,C0)|0,A=A+Math.imul(h,L0)|0,A=A+Math.imul(d,C0)|0,S=S+Math.imul(d,L0)|0,R=R+Math.imul(B,R0)|0,A=A+Math.imul(B,P0)|0,A=A+Math.imul(c,R0)|0,S=S+Math.imul(c,P0)|0;var u0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(u0>>>26)|0,u0&=67108863,R=Math.imul(Z0,X0),A=Math.imul(Z0,K0),A=A+Math.imul(G0,X0)|0,S=Math.imul(G0,K0),R=R+Math.imul($0,I0)|0,A=A+Math.imul($0,O0)|0,A=A+Math.imul(Q0,I0)|0,S=S+Math.imul(Q0,O0)|0,R=R+Math.imul(o,J0)|0,A=A+Math.imul(o,F0)|0,A=A+Math.imul(a,J0)|0,S=S+Math.imul(a,F0)|0,R=R+Math.imul(i,A0)|0,A=A+Math.imul(i,H0)|0,A=A+Math.imul(e,A0)|0,S=S+Math.imul(e,H0)|0,R=R+Math.imul(m,W0)|0,A=A+Math.imul(m,E0)|0,A=A+Math.imul(r,W0)|0,S=S+Math.imul(r,E0)|0,R=R+Math.imul(t,T0)|0,A=A+Math.imul(t,D0)|0,A=A+Math.imul(s,T0)|0,S=S+Math.imul(s,D0)|0,R=R+Math.imul(l,C0)|0,A=A+Math.imul(l,L0)|0,A=A+Math.imul(n,C0)|0,S=S+Math.imul(n,L0)|0,R=R+Math.imul(h,R0)|0,A=A+Math.imul(h,P0)|0,A=A+Math.imul(d,R0)|0,S=S+Math.imul(d,P0)|0,R=R+Math.imul(B,z0)|0,A=A+Math.imul(B,M0)|0,A=A+Math.imul(c,z0)|0,S=S+Math.imul(c,M0)|0;var n0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(n0>>>26)|0,n0&=67108863,R=Math.imul(V0,X0),A=Math.imul(V0,K0),A=A+Math.imul(U0,X0)|0,S=Math.imul(U0,K0),R=R+Math.imul(Z0,I0)|0,A=A+Math.imul(Z0,O0)|0,A=A+Math.imul(G0,I0)|0,S=S+Math.imul(G0,O0)|0,R=R+Math.imul($0,J0)|0,A=A+Math.imul($0,F0)|0,A=A+Math.imul(Q0,J0)|0,S=S+Math.imul(Q0,F0)|0,R=R+Math.imul(o,A0)|0,A=A+Math.imul(o,H0)|0,A=A+Math.imul(a,A0)|0,S=S+Math.imul(a,H0)|0,R=R+Math.imul(i,W0)|0,A=A+Math.imul(i,E0)|0,A=A+Math.imul(e,W0)|0,S=S+Math.imul(e,E0)|0,R=R+Math.imul(m,T0)|0,A=A+Math.imul(m,D0)|0,A=A+Math.imul(r,T0)|0,S=S+Math.imul(r,D0)|0,R=R+Math.imul(t,C0)|0,A=A+Math.imul(t,L0)|0,A=A+Math.imul(s,C0)|0,S=S+Math.imul(s,L0)|0,R=R+Math.imul(l,R0)|0,A=A+Math.imul(l,P0)|0,A=A+Math.imul(n,R0)|0,S=S+Math.imul(n,P0)|0,R=R+Math.imul(h,z0)|0,A=A+Math.imul(h,M0)|0,A=A+Math.imul(d,z0)|0,S=S+Math.imul(d,M0)|0,R=R+Math.imul(B,j0)|0,A=A+Math.imul(B,k0)|0,A=A+Math.imul(c,j0)|0,S=S+Math.imul(c,k0)|0;var s0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(s0>>>26)|0,s0&=67108863,R=Math.imul(V0,I0),A=Math.imul(V0,O0),A=A+Math.imul(U0,I0)|0,S=Math.imul(U0,O0),R=R+Math.imul(Z0,J0)|0,A=A+Math.imul(Z0,F0)|0,A=A+Math.imul(G0,J0)|0,S=S+Math.imul(G0,F0)|0,R=R+Math.imul($0,A0)|0,A=A+Math.imul($0,H0)|0,A=A+Math.imul(Q0,A0)|0,S=S+Math.imul(Q0,H0)|0,R=R+Math.imul(o,W0)|0,A=A+Math.imul(o,E0)|0,A=A+Math.imul(a,W0)|0,S=S+Math.imul(a,E0)|0,R=R+Math.imul(i,T0)|0,A=A+Math.imul(i,D0)|0,A=A+Math.imul(e,T0)|0,S=S+Math.imul(e,D0)|0,R=R+Math.imul(m,C0)|0,A=A+Math.imul(m,L0)|0,A=A+Math.imul(r,C0)|0,S=S+Math.imul(r,L0)|0,R=R+Math.imul(t,R0)|0,A=A+Math.imul(t,P0)|0,A=A+Math.imul(s,R0)|0,S=S+Math.imul(s,P0)|0,R=R+Math.imul(l,z0)|0,A=A+Math.imul(l,M0)|0,A=A+Math.imul(n,z0)|0,S=S+Math.imul(n,M0)|0,R=R+Math.imul(h,j0)|0,A=A+Math.imul(h,k0)|0,A=A+Math.imul(d,j0)|0,S=S+Math.imul(d,k0)|0;var t0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(t0>>>26)|0,t0&=67108863,R=Math.imul(V0,J0),A=Math.imul(V0,F0),A=A+Math.imul(U0,J0)|0,S=Math.imul(U0,F0),R=R+Math.imul(Z0,A0)|0,A=A+Math.imul(Z0,H0)|0,A=A+Math.imul(G0,A0)|0,S=S+Math.imul(G0,H0)|0,R=R+Math.imul($0,W0)|0,A=A+Math.imul($0,E0)|0,A=A+Math.imul(Q0,W0)|0,S=S+Math.imul(Q0,E0)|0,R=R+Math.imul(o,T0)|0,A=A+Math.imul(o,D0)|0,A=A+Math.imul(a,T0)|0,S=S+Math.imul(a,D0)|0,R=R+Math.imul(i,C0)|0,A=A+Math.imul(i,L0)|0,A=A+Math.imul(e,C0)|0,S=S+Math.imul(e,L0)|0,R=R+Math.imul(m,R0)|0,A=A+Math.imul(m,P0)|0,A=A+Math.imul(r,R0)|0,S=S+Math.imul(r,P0)|0,R=R+Math.imul(t,z0)|0,A=A+Math.imul(t,M0)|0,A=A+Math.imul(s,z0)|0,S=S+Math.imul(s,M0)|0,R=R+Math.imul(l,j0)|0,A=A+Math.imul(l,k0)|0,A=A+Math.imul(n,j0)|0,S=S+Math.imul(n,k0)|0;var m0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(m0>>>26)|0,m0&=67108863,R=Math.imul(V0,A0),A=Math.imul(V0,H0),A=A+Math.imul(U0,A0)|0,S=Math.imul(U0,H0),R=R+Math.imul(Z0,W0)|0,A=A+Math.imul(Z0,E0)|0,A=A+Math.imul(G0,W0)|0,S=S+Math.imul(G0,E0)|0,R=R+Math.imul($0,T0)|0,A=A+Math.imul($0,D0)|0,A=A+Math.imul(Q0,T0)|0,S=S+Math.imul(Q0,D0)|0,R=R+Math.imul(o,C0)|0,A=A+Math.imul(o,L0)|0,A=A+Math.imul(a,C0)|0,S=S+Math.imul(a,L0)|0,R=R+Math.imul(i,R0)|0,A=A+Math.imul(i,P0)|0,A=A+Math.imul(e,R0)|0,S=S+Math.imul(e,P0)|0,R=R+Math.imul(m,z0)|0,A=A+Math.imul(m,M0)|0,A=A+Math.imul(r,z0)|0,S=S+Math.imul(r,M0)|0,R=R+Math.imul(t,j0)|0,A=A+Math.imul(t,k0)|0,A=A+Math.imul(s,j0)|0,S=S+Math.imul(s,k0)|0;var a0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(a0>>>26)|0,a0&=67108863,R=Math.imul(V0,W0),A=Math.imul(V0,E0),A=A+Math.imul(U0,W0)|0,S=Math.imul(U0,E0),R=R+Math.imul(Z0,T0)|0,A=A+Math.imul(Z0,D0)|0,A=A+Math.imul(G0,T0)|0,S=S+Math.imul(G0,D0)|0,R=R+Math.imul($0,C0)|0,A=A+Math.imul($0,L0)|0,A=A+Math.imul(Q0,C0)|0,S=S+Math.imul(Q0,L0)|0,R=R+Math.imul(o,R0)|0,A=A+Math.imul(o,P0)|0,A=A+Math.imul(a,R0)|0,S=S+Math.imul(a,P0)|0,R=R+Math.imul(i,z0)|0,A=A+Math.imul(i,M0)|0,A=A+Math.imul(e,z0)|0,S=S+Math.imul(e,M0)|0,R=R+Math.imul(m,j0)|0,A=A+Math.imul(m,k0)|0,A=A+Math.imul(r,j0)|0,S=S+Math.imul(r,k0)|0;var e0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(e0>>>26)|0,e0&=67108863,R=Math.imul(V0,T0),A=Math.imul(V0,D0),A=A+Math.imul(U0,T0)|0,S=Math.imul(U0,D0),R=R+Math.imul(Z0,C0)|0,A=A+Math.imul(Z0,L0)|0,A=A+Math.imul(G0,C0)|0,S=S+Math.imul(G0,L0)|0,R=R+Math.imul($0,R0)|0,A=A+Math.imul($0,P0)|0,A=A+Math.imul(Q0,R0)|0,S=S+Math.imul(Q0,P0)|0,R=R+Math.imul(o,z0)|0,A=A+Math.imul(o,M0)|0,A=A+Math.imul(a,z0)|0,S=S+Math.imul(a,M0)|0,R=R+Math.imul(i,j0)|0,A=A+Math.imul(i,k0)|0,A=A+Math.imul(e,j0)|0,S=S+Math.imul(e,k0)|0;var r0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(r0>>>26)|0,r0&=67108863,R=Math.imul(V0,C0),A=Math.imul(V0,L0),A=A+Math.imul(U0,C0)|0,S=Math.imul(U0,L0),R=R+Math.imul(Z0,R0)|0,A=A+Math.imul(Z0,P0)|0,A=A+Math.imul(G0,R0)|0,S=S+Math.imul(G0,P0)|0,R=R+Math.imul($0,z0)|0,A=A+Math.imul($0,M0)|0,A=A+Math.imul(Q0,z0)|0,S=S+Math.imul(Q0,M0)|0,R=R+Math.imul(o,j0)|0,A=A+Math.imul(o,k0)|0,A=A+Math.imul(a,j0)|0,S=S+Math.imul(a,k0)|0;var i0=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(i0>>>26)|0,i0&=67108863,R=Math.imul(V0,R0),A=Math.imul(V0,P0),A=A+Math.imul(U0,R0)|0,S=Math.imul(U0,P0),R=R+Math.imul(Z0,z0)|0,A=A+Math.imul(Z0,M0)|0,A=A+Math.imul(G0,z0)|0,S=S+Math.imul(G0,M0)|0,R=R+Math.imul($0,j0)|0,A=A+Math.imul($0,k0)|0,A=A+Math.imul(Q0,j0)|0,S=S+Math.imul(Q0,k0)|0;var _$=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(_$>>>26)|0,_$&=67108863,R=Math.imul(V0,z0),A=Math.imul(V0,M0),A=A+Math.imul(U0,z0)|0,S=Math.imul(U0,M0),R=R+Math.imul(Z0,j0)|0,A=A+Math.imul(Z0,k0)|0,A=A+Math.imul(G0,j0)|0,S=S+Math.imul(G0,k0)|0;var N$=(K+R|0)+((A&8191)<<13)|0;K=(S+(A>>>13)|0)+(N$>>>26)|0,N$&=67108863,R=Math.imul(V0,j0),A=Math.imul(V0,k0),A=A+Math.imul(U0,j0)|0,S=Math.imul(U0,k0);var x$=(K+R|0)+((A&8191)<<13)|0;return K=(S+(A>>>13)|0)+(x$>>>26)|0,x$&=67108863,Q[0]=f0,Q[1]=c0,Q[2]=h0,Q[3]=d0,Q[4]=b0,Q[5]=l0,Q[6]=o0,Q[7]=u0,Q[8]=n0,Q[9]=s0,Q[10]=t0,Q[11]=m0,Q[12]=a0,Q[13]=e0,Q[14]=r0,Q[15]=i0,Q[16]=_$,Q[17]=N$,Q[18]=x$,K!==0&&(Q[19]=K,I.length++),I};Math.imul||(g=q);function y(Z,V,I){I.negative=V.negative^Z.negative,I.length=Z.length+V.length;for(var O=0,U=0,Q=0;Q>>26)|0,U+=K>>>26,K&=67108863}I.words[Q]=R,O=K,K=U}return O!==0?I.words[Q]=O:I.length--,I._strip()}function w(Z,V,I){return y(Z,V,I)}X.prototype.mulTo=function(Z,V){var I,O=this.length+Z.length;return this.length===10&&Z.length===10?I=g(this,Z,V):O<63?I=q(this,Z,V):O<1024?I=y(this,Z,V):I=w(this,Z,V),I};function f(Z,V){this.x=Z,this.y=V}f.prototype.makeRBT=function(Z){for(var V=new Array(Z),I=X.prototype._countBits(Z)-1,O=0;O>=1;return O},f.prototype.permute=function(Z,V,I,O,U,Q){for(var K=0;K>>1)U++;return 1<>>13,I[2*Q+1]=U&8191,U=U>>>13;for(Q=2*V;Q>=26,I+=U/67108864|0,I+=Q>>>26,this.words[O]=Q&67108863}return I!==0&&(this.words[O]=I,this.length++),V?this.ineg():this},X.prototype.muln=function(Z){return this.clone().imuln(Z)},X.prototype.sqr=function(){return this.mul(this)},X.prototype.isqr=function(){return this.imul(this.clone())},X.prototype.pow=function(Z){var V=v(Z);if(V.length===0)return new X(1);for(var I=this,O=0;O=0);var V=Z%26,I=(Z-V)/26,O=67108863>>>26-V<<26-V,U;if(V!==0){var Q=0;for(U=0;U>>26-V}Q&&(this.words[U]=Q,this.length++)}if(I!==0){for(U=this.length-1;U>=0;U--)this.words[U+I]=this.words[U];for(U=0;U=0);var O;V?O=(V-V%26)/26:O=0;var U=Z%26,Q=Math.min((Z-U)/26,this.length),K=67108863^67108863>>>U<Q)for(this.length-=Q,A=0;A=0&&(S!==0||A>=O);A--){var x=this.words[A]|0;this.words[A]=S<<26-U|x>>>U,S=x&K}return R&&S!==0&&(R.words[R.length++]=S),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},X.prototype.ishrn=function(Z,V,I){return F(this.negative===0),this.iushrn(Z,V,I)},X.prototype.shln=function(Z){return this.clone().ishln(Z)},X.prototype.ushln=function(Z){return this.clone().iushln(Z)},X.prototype.shrn=function(Z){return this.clone().ishrn(Z)},X.prototype.ushrn=function(Z){return this.clone().iushrn(Z)},X.prototype.testn=function(Z){F(typeof Z=="number"&&Z>=0);var V=Z%26,I=(Z-V)/26,O=1<=0);var V=Z%26,I=(Z-V)/26;if(F(this.negative===0,"imaskn works only with positive numbers"),this.length<=I)return this;if(V!==0&&I++,this.length=Math.min(I,this.length),V!==0){var O=67108863^67108863>>>V<=67108864;V++)this.words[V]-=67108864,V===this.length-1?this.words[V+1]=1:this.words[V+1]++;return this.length=Math.max(this.length,V+1),this},X.prototype.isubn=function(Z){if(F(typeof Z=="number"),F(Z<67108864),Z<0)return this.iaddn(-Z);if(this.negative!==0)return this.negative=0,this.iaddn(Z),this.negative=1,this;if(this.words[0]-=Z,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var V=0;V>26)-(R/67108864|0),this.words[U+I]=Q&67108863}for(;U>26,this.words[U+I]=Q&67108863;if(K===0)return this._strip();for(F(K===-1),K=0,U=0;U>26,this.words[U]=Q&67108863;return this.negative=1,this._strip()},X.prototype._wordDiv=function(Z,V){var I=this.length-Z.length,O=this.clone(),U=Z,Q=U.words[U.length-1]|0,K=this._countBits(Q);I=26-K,I!==0&&(U=U.ushln(I),O.iushln(I),Q=U.words[U.length-1]|0);var R=O.length-U.length,A;if(V!=="mod"){A=new X(null),A.length=R+1,A.words=new Array(A.length);for(var S=0;S=0;B--){var c=(O.words[U.length+B]|0)*67108864+(O.words[U.length+B-1]|0);for(c=Math.min(c/Q|0,67108863),O._ishlnsubmul(U,c,B);O.negative!==0;)c--,O.negative=0,O._ishlnsubmul(U,1,B),O.isZero()||(O.negative^=1);A&&(A.words[B]=c)}return A&&A._strip(),O._strip(),V!=="div"&&I!==0&&O.iushrn(I),{div:A||null,mod:O}},X.prototype.divmod=function(Z,V,I){if(F(!Z.isZero()),this.isZero())return{div:new X(0),mod:new X(0)};var O,U,Q;return this.negative!==0&&Z.negative===0?(Q=this.neg().divmod(Z,V),V!=="mod"&&(O=Q.div.neg()),V!=="div"&&(U=Q.mod.neg(),I&&U.negative!==0&&U.iadd(Z)),{div:O,mod:U}):this.negative===0&&Z.negative!==0?(Q=this.divmod(Z.neg(),V),V!=="mod"&&(O=Q.div.neg()),{div:O,mod:Q.mod}):(this.negative&Z.negative)!==0?(Q=this.neg().divmod(Z.neg(),V),V!=="div"&&(U=Q.mod.neg(),I&&U.negative!==0&&U.isub(Z)),{div:Q.div,mod:U}):Z.length>this.length||this.cmp(Z)<0?{div:new X(0),mod:this}:Z.length===1?V==="div"?{div:this.divn(Z.words[0]),mod:null}:V==="mod"?{div:null,mod:new X(this.modrn(Z.words[0]))}:{div:this.divn(Z.words[0]),mod:new X(this.modrn(Z.words[0]))}:this._wordDiv(Z,V)},X.prototype.div=function(Z){return this.divmod(Z,"div",!1).div},X.prototype.mod=function(Z){return this.divmod(Z,"mod",!1).mod},X.prototype.umod=function(Z){return this.divmod(Z,"mod",!0).mod},X.prototype.divRound=function(Z){var V=this.divmod(Z);if(V.mod.isZero())return V.div;var I=V.div.negative!==0?V.mod.isub(Z):V.mod,O=Z.ushrn(1),U=Z.andln(1),Q=I.cmp(O);return Q<0||U===1&&Q===0?V.div:V.div.negative!==0?V.div.isubn(1):V.div.iaddn(1)},X.prototype.modrn=function(Z){var V=Z<0;V&&(Z=-Z),F(Z<=67108863);for(var I=(1<<26)%Z,O=0,U=this.length-1;U>=0;U--)O=(I*O+(this.words[U]|0))%Z;return V?-O:O},X.prototype.modn=function(Z){return this.modrn(Z)},X.prototype.idivn=function(Z){var V=Z<0;V&&(Z=-Z),F(Z<=67108863);for(var I=0,O=this.length-1;O>=0;O--){var U=(this.words[O]|0)+I*67108864;this.words[O]=U/Z|0,I=U%Z}return this._strip(),V?this.ineg():this},X.prototype.divn=function(Z){return this.clone().idivn(Z)},X.prototype.egcd=function(Z){F(Z.negative===0),F(!Z.isZero());var V=this,I=Z.clone();V.negative!==0?V=V.umod(Z):V=V.clone();for(var O=new X(1),U=new X(0),Q=new X(0),K=new X(1),R=0;V.isEven()&&I.isEven();)V.iushrn(1),I.iushrn(1),++R;for(var A=I.clone(),S=V.clone();!V.isZero();){for(var x=0,B=1;(V.words[0]&B)===0&&x<26;++x,B<<=1);if(x>0)for(V.iushrn(x);x-- >0;)(O.isOdd()||U.isOdd())&&(O.iadd(A),U.isub(S)),O.iushrn(1),U.iushrn(1);for(var c=0,q0=1;(I.words[0]&q0)===0&&c<26;++c,q0<<=1);if(c>0)for(I.iushrn(c);c-- >0;)(Q.isOdd()||K.isOdd())&&(Q.iadd(A),K.isub(S)),Q.iushrn(1),K.iushrn(1);V.cmp(I)>=0?(V.isub(I),O.isub(Q),U.isub(K)):(I.isub(V),Q.isub(O),K.isub(U))}return{a:Q,b:K,gcd:I.iushln(R)}},X.prototype._invmp=function(Z){F(Z.negative===0),F(!Z.isZero());var V=this,I=Z.clone();V.negative!==0?V=V.umod(Z):V=V.clone();for(var O=new X(1),U=new X(0),Q=I.clone();V.cmpn(1)>0&&I.cmpn(1)>0;){for(var K=0,R=1;(V.words[0]&R)===0&&K<26;++K,R<<=1);if(K>0)for(V.iushrn(K);K-- >0;)O.isOdd()&&O.iadd(Q),O.iushrn(1);for(var A=0,S=1;(I.words[0]&S)===0&&A<26;++A,S<<=1);if(A>0)for(I.iushrn(A);A-- >0;)U.isOdd()&&U.iadd(Q),U.iushrn(1);V.cmp(I)>=0?(V.isub(I),O.isub(U)):(I.isub(V),U.isub(O))}var x;return V.cmpn(1)===0?x=O:x=U,x.cmpn(0)<0&&x.iadd(Z),x},X.prototype.gcd=function(Z){if(this.isZero())return Z.abs();if(Z.isZero())return this.abs();var V=this.clone(),I=Z.clone();V.negative=0,I.negative=0;for(var O=0;V.isEven()&&I.isEven();O++)V.iushrn(1),I.iushrn(1);do{for(;V.isEven();)V.iushrn(1);for(;I.isEven();)I.iushrn(1);var U=V.cmp(I);if(U<0){var Q=V;V=I,I=Q}else if(U===0||I.cmpn(1)===0)break;V.isub(I)}while(!0);return I.iushln(O)},X.prototype.invm=function(Z){return this.egcd(Z).a.umod(Z)},X.prototype.isEven=function(){return(this.words[0]&1)===0},X.prototype.isOdd=function(){return(this.words[0]&1)===1},X.prototype.andln=function(Z){return this.words[0]&Z},X.prototype.bincn=function(Z){F(typeof Z=="number");var V=Z%26,I=(Z-V)/26,O=1<>>26,K&=67108863,this.words[Q]=K}return U!==0&&(this.words[Q]=U,this.length++),this},X.prototype.isZero=function(){return this.length===1&&this.words[0]===0},X.prototype.cmpn=function(Z){var V=Z<0;if(this.negative!==0&&!V)return-1;if(this.negative===0&&V)return 1;this._strip();var I;if(this.length>1)I=1;else{V&&(Z=-Z),F(Z<=67108863,"Number is too big");var O=this.words[0]|0;I=O===Z?0:OZ.length)return 1;if(this.length=0;I--){var O=this.words[I]|0,U=Z.words[I]|0;if(O!==U){OU&&(V=1);break}}return V},X.prototype.gtn=function(Z){return this.cmpn(Z)===1},X.prototype.gt=function(Z){return this.cmp(Z)===1},X.prototype.gten=function(Z){return this.cmpn(Z)>=0},X.prototype.gte=function(Z){return this.cmp(Z)>=0},X.prototype.ltn=function(Z){return this.cmpn(Z)===-1},X.prototype.lt=function(Z){return this.cmp(Z)===-1},X.prototype.lten=function(Z){return this.cmpn(Z)<=0},X.prototype.lte=function(Z){return this.cmp(Z)<=0},X.prototype.eqn=function(Z){return this.cmpn(Z)===0},X.prototype.eq=function(Z){return this.cmp(Z)===0},X.red=function(Z){return new Y(Z)},X.prototype.toRed=function(Z){return F(!this.red,"Already a number in reduction context"),F(this.negative===0,"red works only with positives"),Z.convertTo(this)._forceRed(Z)},X.prototype.fromRed=function(){return F(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},X.prototype._forceRed=function(Z){return this.red=Z,this},X.prototype.forceRed=function(Z){return F(!this.red,"Already a number in reduction context"),this._forceRed(Z)},X.prototype.redAdd=function(Z){return F(this.red,"redAdd works only with red numbers"),this.red.add(this,Z)},X.prototype.redIAdd=function(Z){return F(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Z)},X.prototype.redSub=function(Z){return F(this.red,"redSub works only with red numbers"),this.red.sub(this,Z)},X.prototype.redISub=function(Z){return F(this.red,"redISub works only with red numbers"),this.red.isub(this,Z)},X.prototype.redShl=function(Z){return F(this.red,"redShl works only with red numbers"),this.red.shl(this,Z)},X.prototype.redMul=function(Z){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,Z),this.red.mul(this,Z)},X.prototype.redIMul=function(Z){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,Z),this.red.imul(this,Z)},X.prototype.redSqr=function(){return F(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},X.prototype.redISqr=function(){return F(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},X.prototype.redSqrt=function(){return F(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},X.prototype.redInvm=function(){return F(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},X.prototype.redNeg=function(){return F(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},X.prototype.redPow=function(Z){return F(this.red&&!Z.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Z)};var b={k256:null,p224:null,p192:null,p25519:null};function u(Z,V){this.name=Z,this.p=new X(V,16),this.n=this.p.bitLength(),this.k=new X(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}u.prototype._tmp=function(){var Z=new X(null);return Z.words=new Array(Math.ceil(this.n/13)),Z},u.prototype.ireduce=function(Z){var V=Z,I;do this.split(V,this.tmp),V=this.imulK(V),V=V.iadd(this.tmp),I=V.bitLength();while(I>this.n);var O=I0?V.isub(this.p):V.strip!==void 0?V.strip():V._strip(),V},u.prototype.split=function(Z,V){Z.iushrn(this.n,0,V)},u.prototype.imulK=function(Z){return Z.imul(this.k)};function Y0(){u.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(Y0,u),Y0.prototype.split=function(Z,V){for(var I=4194303,O=Math.min(Z.length,9),U=0;U>>22,Q=K}Q>>>=22,Z.words[U-10]=Q,Q===0&&Z.length>10?Z.length-=10:Z.length-=9},Y0.prototype.imulK=function(Z){Z.words[Z.length]=0,Z.words[Z.length+1]=0,Z.length+=2;for(var V=0,I=0;I>>=26,Z.words[I]=U,V=O}return V!==0&&(Z.words[Z.length++]=V),Z},X._prime=function(Z){if(b[Z])return b[Z];var V;if(Z==="k256")V=new Y0;else if(Z==="p224")V=new p;else if(Z==="p192")V=new v0;else if(Z==="p25519")V=new $;else throw new Error("Unknown prime "+Z);return b[Z]=V,V};function Y(Z){if(typeof Z=="string"){var V=X._prime(Z);this.m=V.p,this.prime=V}else F(Z.gtn(1),"modulus must be greater than 1"),this.m=Z,this.prime=null}Y.prototype._verify1=function(Z){F(Z.negative===0,"red works only with positives"),F(Z.red,"red works only with red numbers")},Y.prototype._verify2=function(Z,V){F((Z.negative|V.negative)===0,"red works only with positives"),F(Z.red&&Z.red===V.red,"red works only with red numbers")},Y.prototype.imod=function(Z){return this.prime?this.prime.ireduce(Z)._forceRed(this):(J(Z,Z.umod(this.m)._forceRed(this)),Z)},Y.prototype.neg=function(Z){return Z.isZero()?Z.clone():this.m.sub(Z)._forceRed(this)},Y.prototype.add=function(Z,V){this._verify2(Z,V);var I=Z.add(V);return I.cmp(this.m)>=0&&I.isub(this.m),I._forceRed(this)},Y.prototype.iadd=function(Z,V){this._verify2(Z,V);var I=Z.iadd(V);return I.cmp(this.m)>=0&&I.isub(this.m),I},Y.prototype.sub=function(Z,V){this._verify2(Z,V);var I=Z.sub(V);return I.cmpn(0)<0&&I.iadd(this.m),I._forceRed(this)},Y.prototype.isub=function(Z,V){this._verify2(Z,V);var I=Z.isub(V);return I.cmpn(0)<0&&I.iadd(this.m),I},Y.prototype.shl=function(Z,V){return this._verify1(Z),this.imod(Z.ushln(V))},Y.prototype.imul=function(Z,V){return this._verify2(Z,V),this.imod(Z.imul(V))},Y.prototype.mul=function(Z,V){return this._verify2(Z,V),this.imod(Z.mul(V))},Y.prototype.isqr=function(Z){return this.imul(Z,Z.clone())},Y.prototype.sqr=function(Z){return this.mul(Z,Z)},Y.prototype.sqrt=function(Z){if(Z.isZero())return Z.clone();var V=this.m.andln(3);if(F(V%2===1),V===3){var I=this.m.add(new X(1)).iushrn(2);return this.pow(Z,I)}for(var O=this.m.subn(1),U=0;!O.isZero()&&O.andln(1)===0;)U++,O.iushrn(1);F(!O.isZero());var Q=new X(1).toRed(this),K=Q.redNeg(),R=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new X(2*A*A).toRed(this);this.pow(A,R).cmp(K)!==0;)A.redIAdd(K);for(var S=this.pow(A,O),x=this.pow(Z,O.addn(1).iushrn(1)),B=this.pow(Z,O),c=U;B.cmp(Q)!==0;){for(var q0=B,h=0;q0.cmp(Q)!==0;h++)q0=q0.redSqr();F(h=0;U--){for(var S=V.words[U],x=A-1;x>=0;x--){var B=S>>x&1;if(Q!==O[0]&&(Q=this.sqr(Q)),B===0&&K===0){R=0;continue}K<<=1,K|=B,R++,!(R!==I&&(U!==0||x!==0))&&(Q=this.mul(Q,O[K]),R=0,K=0)}A=26}return Q},Y.prototype.convertTo=function(Z){var V=Z.umod(this.m);return V===Z?V.clone():V},Y.prototype.convertFrom=function(Z){var V=Z.clone();return V.red=null,V},X.mont=function(Z){return new G(Z)};function G(Z){Y.call(this,Z),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new X(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)}z(G,Y),G.prototype.convertTo=function(Z){return this.imod(Z.ushln(this.shift))},G.prototype.convertFrom=function(Z){var V=this.imod(Z.mul(this.rinv));return V.red=null,V},G.prototype.imul=function(Z,V){if(Z.isZero()||V.isZero())return Z.words[0]=0,Z.length=1,Z;var I=Z.imul(V),O=I.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=I.isub(O).iushrn(this.shift),Q=U;return U.cmp(this.m)>=0?Q=U.isub(this.m):U.cmpn(0)<0&&(Q=U.iadd(this.m)),Q._forceRed(this)},G.prototype.mul=function(Z,V){if(Z.isZero()||V.isZero())return new X(0)._forceRed(this);var I=Z.mul(V),O=I.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=I.isub(O).iushrn(this.shift),Q=U;return U.cmp(this.m)>=0?Q=U.isub(this.m):U.cmpn(0)<0&&(Q=U.iadd(this.m)),Q._forceRed(this)},G.prototype.invm=function(Z){var V=this.imod(Z._invmp(this.m).mul(this.r2));return V._forceRed(this)}})(typeof _>"u"||_,N)}}),h$=S0({"node_modules/browserify-rsa/index.js"(N,_){var k=c$(),j=L$();function F(C){var P=z(C),T=P.toRed(k.mont(C.modulus)).redPow(new k(C.publicExponent)).fromRed();return{blinder:T,unblinder:P.invm(C.modulus)}}function z(C){var P=C.modulus.byteLength(),T;do T=new k(j(P));while(T.cmp(C.modulus)>=0||!T.umod(C.prime1)||!T.umod(C.prime2));return T}function X(C,P){var T=F(P),W=P.modulus.byteLength(),J=new k(C).mul(T.blinder).umod(P.modulus),H=J.toRed(k.mont(P.prime1)),D=J.toRed(k.mont(P.prime2)),E=P.coefficient,L=P.prime1,M=P.prime2,v=H.redPow(P.exponent1).fromRed(),q=D.redPow(P.exponent2).fromRed(),g=v.isub(q).imul(E).umod(L).imul(M);return q.iadd(g).imul(T.unblinder).umod(P.modulus).toArrayLike(g0,"be",W)}X.getr=z,_.exports=X}}),TY=S0({"node_modules/elliptic/package.json"(N,_){_.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}}),D$=S0({"node_modules/elliptic/node_modules/bn.js/lib/bn.js"(N,_){(function(k,j){function F($,Y){if(!$)throw new Error(Y||"Assertion failed")}function z($,Y){$.super_=Y;var G=function(){};G.prototype=Y.prototype,$.prototype=new G,$.prototype.constructor=$}function X($,Y,G){if(X.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((Y==="le"||Y==="be")&&(G=Y,Y=10),this._init($||0,Y||10,G||"be"))}typeof k=="object"?k.exports=X:j.BN=X,X.BN=X,X.wordSize=26;var C=g0;X.isBN=function($){return $ instanceof X?!0:$!==null&&typeof $=="object"&&$.constructor.wordSize===X.wordSize&&Array.isArray($.words)},X.max=function($,Y){return $.cmp(Y)>0?$:Y},X.min=function($,Y){return $.cmp(Y)<0?$:Y},X.prototype._init=function($,Y,G){if(typeof $=="number")return this._initNumber($,Y,G);if(typeof $=="object")return this._initArray($,Y,G);Y==="hex"&&(Y=16),F(Y===(Y|0)&&Y>=2&&Y<=36),$=$.toString().replace(/\s+/g,"");var Z=0;$[0]==="-"&&(Z++,this.negative=1),Z<$.length&&(Y===16?this._parseHex($,Z,G):(this._parseBase($,Y,Z),G==="le"&&this._initArray(this.toArray(),Y,G)))},X.prototype._initNumber=function($,Y,G){$<0&&(this.negative=1,$=-$),$<67108864?(this.words=[$&67108863],this.length=1):$<4503599627370496?(this.words=[$&67108863,$/67108864&67108863],this.length=2):(F($<9007199254740992),this.words=[$&67108863,$/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Y,G)},X.prototype._initArray=function($,Y,G){if(F(typeof $.length=="number"),$.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil($.length/3),this.words=new Array(this.length);for(var Z=0;Z=0;Z-=3)I=$[Z]|$[Z-1]<<8|$[Z-2]<<16,this.words[V]|=I<>>26-O&67108863,O+=24,O>=26&&(O-=26,V++);else if(G==="le")for(Z=0,V=0;Z<$.length;Z+=3)I=$[Z]|$[Z+1]<<8|$[Z+2]<<16,this.words[V]|=I<>>26-O&67108863,O+=24,O>=26&&(O-=26,V++);return this.strip()};function P($,Y){var G=$.charCodeAt(Y);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function T($,Y,G){var Z=P($,G);return G-1>=Y&&(Z|=P($,G-1)<<4),Z}X.prototype._parseHex=function($,Y,G){this.length=Math.ceil(($.length-Y)/6),this.words=new Array(this.length);for(var Z=0;Z=Y;Z-=2)O=T($,Y,Z)<=18?(V-=18,I+=1,this.words[I]|=O>>>26):V+=8;else{var U=$.length-Y;for(Z=U%2===0?Y+1:Y;Z<$.length;Z+=2)O=T($,Y,Z)<=18?(V-=18,I+=1,this.words[I]|=O>>>26):V+=8}this.strip()};function W($,Y,G,Z){for(var V=0,I=Math.min($.length,G),O=Y;O=49?V+=U-49+10:U>=17?V+=U-17+10:V+=U}return V}X.prototype._parseBase=function($,Y,G){this.words=[0],this.length=1;for(var Z=0,V=1;V<=67108863;V*=Y)Z++;Z--,V=V/Y|0;for(var I=$.length-G,O=I%Z,U=Math.min(I,I-O)+G,Q=0,K=G;K1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},X.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},X.prototype.inspect=function(){return(this.red?""};var J=["","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"],H=[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],D=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];X.prototype.toString=function($,Y){$=$||10,Y=Y|0||1;var G;if($===16||$==="hex"){G="";for(var Z=0,V=0,I=0;I>>24-Z&16777215,V!==0||I!==this.length-1?G=J[6-U.length]+U+G:G=U+G,Z+=2,Z>=26&&(Z-=26,I--)}for(V!==0&&(G=V.toString(16)+G);G.length%Y!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if($===($|0)&&$>=2&&$<=36){var Q=H[$],K=D[$];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var A=R.modn(K).toString($);R=R.idivn(K),R.isZero()?G=A+G:G=J[Q-A.length]+A+G}for(this.isZero()&&(G="0"+G);G.length%Y!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}F(!1,"Base should be between 2 and 36")},X.prototype.toNumber=function(){var $=this.words[0];return this.length===2?$+=this.words[1]*67108864:this.length===3&&this.words[2]===1?$+=4503599627370496+this.words[1]*67108864:this.length>2&&F(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-$:$},X.prototype.toJSON=function(){return this.toString(16)},X.prototype.toBuffer=function($,Y){return F(typeof C<"u"),this.toArrayLike(C,$,Y)},X.prototype.toArray=function($,Y){return this.toArrayLike(Array,$,Y)},X.prototype.toArrayLike=function($,Y,G){var Z=this.byteLength(),V=G||Math.max(1,Z);F(Z<=V,"byte array longer than desired length"),F(V>0,"Requested array length <= 0"),this.strip();var I=Y==="le",O=new $(V),U,Q,K=this.clone();if(I){for(Q=0;!K.isZero();Q++)U=K.andln(255),K.iushrn(8),O[Q]=U;for(;Q=4096&&(G+=13,Y>>>=13),Y>=64&&(G+=7,Y>>>=7),Y>=8&&(G+=4,Y>>>=4),Y>=2&&(G+=2,Y>>>=2),G+Y},X.prototype._zeroBits=function($){if($===0)return 26;var Y=$,G=0;return(Y&8191)===0&&(G+=13,Y>>>=13),(Y&127)===0&&(G+=7,Y>>>=7),(Y&15)===0&&(G+=4,Y>>>=4),(Y&3)===0&&(G+=2,Y>>>=2),(Y&1)===0&&G++,G},X.prototype.bitLength=function(){var $=this.words[this.length-1],Y=this._countBits($);return(this.length-1)*26+Y};function E($){for(var Y=new Array($.bitLength()),G=0;G>>V}return Y}X.prototype.zeroBits=function(){if(this.isZero())return 0;for(var $=0,Y=0;Y$.length?this.clone().ior($):$.clone().ior(this)},X.prototype.uor=function($){return this.length>$.length?this.clone().iuor($):$.clone().iuor(this)},X.prototype.iuand=function($){var Y;this.length>$.length?Y=$:Y=this;for(var G=0;G$.length?this.clone().iand($):$.clone().iand(this)},X.prototype.uand=function($){return this.length>$.length?this.clone().iuand($):$.clone().iuand(this)},X.prototype.iuxor=function($){var Y,G;this.length>$.length?(Y=this,G=$):(Y=$,G=this);for(var Z=0;Z$.length?this.clone().ixor($):$.clone().ixor(this)},X.prototype.uxor=function($){return this.length>$.length?this.clone().iuxor($):$.clone().iuxor(this)},X.prototype.inotn=function($){F(typeof $=="number"&&$>=0);var Y=Math.ceil($/26)|0,G=$%26;this._expand(Y),G>0&&Y--;for(var Z=0;Z0&&(this.words[Z]=~this.words[Z]&67108863>>26-G),this.strip()},X.prototype.notn=function($){return this.clone().inotn($)},X.prototype.setn=function($,Y){F(typeof $=="number"&&$>=0);var G=$/26|0,Z=$%26;return this._expand(G+1),Y?this.words[G]=this.words[G]|1<$.length?(G=this,Z=$):(G=$,Z=this);for(var V=0,I=0;I>>26;for(;V!==0&&I>>26;if(this.length=G.length,V!==0)this.words[this.length]=V,this.length++;else if(G!==this)for(;I$.length?this.clone().iadd($):$.clone().iadd(this)},X.prototype.isub=function($){if($.negative!==0){$.negative=0;var Y=this.iadd($);return $.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd($),this.negative=1,this._normSign();var G=this.cmp($);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,V;G>0?(Z=this,V=$):(Z=$,V=this);for(var I=0,O=0;O>26,this.words[O]=Y&67108863;for(;I!==0&&O>26,this.words[O]=Y&67108863;if(I===0&&O>>26,A=Q&67108863,S=Math.min(K,Y.length-1),x=Math.max(0,K-$.length+1);x<=S;x++){var B=K-x|0;V=$.words[B]|0,I=Y.words[x]|0,O=V*I+A,R+=O/67108864|0,A=O&67108863}G.words[K]=A|0,Q=R|0}return Q!==0?G.words[K]=Q|0:G.length--,G.strip()}var M=function($,Y,G){var Z=$.words,V=Y.words,I=G.words,O=0,U,Q,K,R=Z[0]|0,A=R&8191,S=R>>>13,x=Z[1]|0,B=x&8191,c=x>>>13,q0=Z[2]|0,h=q0&8191,d=q0>>>13,_0=Z[3]|0,l=_0&8191,n=_0>>>13,y0=Z[4]|0,t=y0&8191,s=y0>>>13,w0=Z[5]|0,m=w0&8191,r=w0>>>13,$$=Z[6]|0,i=$$&8191,e=$$>>>13,x0=Z[7]|0,o=x0&8191,a=x0>>>13,p0=Z[8]|0,$0=p0&8191,Q0=p0>>>13,Y$=Z[9]|0,Z0=Y$&8191,G0=Y$>>>13,Z$=V[0]|0,V0=Z$&8191,U0=Z$>>>13,G$=V[1]|0,X0=G$&8191,K0=G$>>>13,V$=V[2]|0,I0=V$&8191,O0=V$>>>13,U$=V[3]|0,J0=U$&8191,F0=U$>>>13,X$=V[4]|0,A0=X$&8191,H0=X$>>>13,K$=V[5]|0,W0=K$&8191,E0=K$>>>13,I$=V[6]|0,T0=I$&8191,D0=I$>>>13,O$=V[7]|0,C0=O$&8191,L0=O$>>>13,J$=V[8]|0,R0=J$&8191,P0=J$>>>13,F$=V[9]|0,z0=F$&8191,M0=F$>>>13;G.negative=$.negative^Y.negative,G.length=19,U=Math.imul(A,V0),Q=Math.imul(A,U0),Q=Q+Math.imul(S,V0)|0,K=Math.imul(S,U0);var Q$=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,U=Math.imul(B,V0),Q=Math.imul(B,U0),Q=Q+Math.imul(c,V0)|0,K=Math.imul(c,U0),U=U+Math.imul(A,X0)|0,Q=Q+Math.imul(A,K0)|0,Q=Q+Math.imul(S,X0)|0,K=K+Math.imul(S,K0)|0;var j0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(j0>>>26)|0,j0&=67108863,U=Math.imul(h,V0),Q=Math.imul(h,U0),Q=Q+Math.imul(d,V0)|0,K=Math.imul(d,U0),U=U+Math.imul(B,X0)|0,Q=Q+Math.imul(B,K0)|0,Q=Q+Math.imul(c,X0)|0,K=K+Math.imul(c,K0)|0,U=U+Math.imul(A,I0)|0,Q=Q+Math.imul(A,O0)|0,Q=Q+Math.imul(S,I0)|0,K=K+Math.imul(S,O0)|0;var k0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(k0>>>26)|0,k0&=67108863,U=Math.imul(l,V0),Q=Math.imul(l,U0),Q=Q+Math.imul(n,V0)|0,K=Math.imul(n,U0),U=U+Math.imul(h,X0)|0,Q=Q+Math.imul(h,K0)|0,Q=Q+Math.imul(d,X0)|0,K=K+Math.imul(d,K0)|0,U=U+Math.imul(B,I0)|0,Q=Q+Math.imul(B,O0)|0,Q=Q+Math.imul(c,I0)|0,K=K+Math.imul(c,O0)|0,U=U+Math.imul(A,J0)|0,Q=Q+Math.imul(A,F0)|0,Q=Q+Math.imul(S,J0)|0,K=K+Math.imul(S,F0)|0;var f0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(f0>>>26)|0,f0&=67108863,U=Math.imul(t,V0),Q=Math.imul(t,U0),Q=Q+Math.imul(s,V0)|0,K=Math.imul(s,U0),U=U+Math.imul(l,X0)|0,Q=Q+Math.imul(l,K0)|0,Q=Q+Math.imul(n,X0)|0,K=K+Math.imul(n,K0)|0,U=U+Math.imul(h,I0)|0,Q=Q+Math.imul(h,O0)|0,Q=Q+Math.imul(d,I0)|0,K=K+Math.imul(d,O0)|0,U=U+Math.imul(B,J0)|0,Q=Q+Math.imul(B,F0)|0,Q=Q+Math.imul(c,J0)|0,K=K+Math.imul(c,F0)|0,U=U+Math.imul(A,A0)|0,Q=Q+Math.imul(A,H0)|0,Q=Q+Math.imul(S,A0)|0,K=K+Math.imul(S,H0)|0;var c0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(c0>>>26)|0,c0&=67108863,U=Math.imul(m,V0),Q=Math.imul(m,U0),Q=Q+Math.imul(r,V0)|0,K=Math.imul(r,U0),U=U+Math.imul(t,X0)|0,Q=Q+Math.imul(t,K0)|0,Q=Q+Math.imul(s,X0)|0,K=K+Math.imul(s,K0)|0,U=U+Math.imul(l,I0)|0,Q=Q+Math.imul(l,O0)|0,Q=Q+Math.imul(n,I0)|0,K=K+Math.imul(n,O0)|0,U=U+Math.imul(h,J0)|0,Q=Q+Math.imul(h,F0)|0,Q=Q+Math.imul(d,J0)|0,K=K+Math.imul(d,F0)|0,U=U+Math.imul(B,A0)|0,Q=Q+Math.imul(B,H0)|0,Q=Q+Math.imul(c,A0)|0,K=K+Math.imul(c,H0)|0,U=U+Math.imul(A,W0)|0,Q=Q+Math.imul(A,E0)|0,Q=Q+Math.imul(S,W0)|0,K=K+Math.imul(S,E0)|0;var h0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(h0>>>26)|0,h0&=67108863,U=Math.imul(i,V0),Q=Math.imul(i,U0),Q=Q+Math.imul(e,V0)|0,K=Math.imul(e,U0),U=U+Math.imul(m,X0)|0,Q=Q+Math.imul(m,K0)|0,Q=Q+Math.imul(r,X0)|0,K=K+Math.imul(r,K0)|0,U=U+Math.imul(t,I0)|0,Q=Q+Math.imul(t,O0)|0,Q=Q+Math.imul(s,I0)|0,K=K+Math.imul(s,O0)|0,U=U+Math.imul(l,J0)|0,Q=Q+Math.imul(l,F0)|0,Q=Q+Math.imul(n,J0)|0,K=K+Math.imul(n,F0)|0,U=U+Math.imul(h,A0)|0,Q=Q+Math.imul(h,H0)|0,Q=Q+Math.imul(d,A0)|0,K=K+Math.imul(d,H0)|0,U=U+Math.imul(B,W0)|0,Q=Q+Math.imul(B,E0)|0,Q=Q+Math.imul(c,W0)|0,K=K+Math.imul(c,E0)|0,U=U+Math.imul(A,T0)|0,Q=Q+Math.imul(A,D0)|0,Q=Q+Math.imul(S,T0)|0,K=K+Math.imul(S,D0)|0;var d0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(d0>>>26)|0,d0&=67108863,U=Math.imul(o,V0),Q=Math.imul(o,U0),Q=Q+Math.imul(a,V0)|0,K=Math.imul(a,U0),U=U+Math.imul(i,X0)|0,Q=Q+Math.imul(i,K0)|0,Q=Q+Math.imul(e,X0)|0,K=K+Math.imul(e,K0)|0,U=U+Math.imul(m,I0)|0,Q=Q+Math.imul(m,O0)|0,Q=Q+Math.imul(r,I0)|0,K=K+Math.imul(r,O0)|0,U=U+Math.imul(t,J0)|0,Q=Q+Math.imul(t,F0)|0,Q=Q+Math.imul(s,J0)|0,K=K+Math.imul(s,F0)|0,U=U+Math.imul(l,A0)|0,Q=Q+Math.imul(l,H0)|0,Q=Q+Math.imul(n,A0)|0,K=K+Math.imul(n,H0)|0,U=U+Math.imul(h,W0)|0,Q=Q+Math.imul(h,E0)|0,Q=Q+Math.imul(d,W0)|0,K=K+Math.imul(d,E0)|0,U=U+Math.imul(B,T0)|0,Q=Q+Math.imul(B,D0)|0,Q=Q+Math.imul(c,T0)|0,K=K+Math.imul(c,D0)|0,U=U+Math.imul(A,C0)|0,Q=Q+Math.imul(A,L0)|0,Q=Q+Math.imul(S,C0)|0,K=K+Math.imul(S,L0)|0;var b0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(b0>>>26)|0,b0&=67108863,U=Math.imul($0,V0),Q=Math.imul($0,U0),Q=Q+Math.imul(Q0,V0)|0,K=Math.imul(Q0,U0),U=U+Math.imul(o,X0)|0,Q=Q+Math.imul(o,K0)|0,Q=Q+Math.imul(a,X0)|0,K=K+Math.imul(a,K0)|0,U=U+Math.imul(i,I0)|0,Q=Q+Math.imul(i,O0)|0,Q=Q+Math.imul(e,I0)|0,K=K+Math.imul(e,O0)|0,U=U+Math.imul(m,J0)|0,Q=Q+Math.imul(m,F0)|0,Q=Q+Math.imul(r,J0)|0,K=K+Math.imul(r,F0)|0,U=U+Math.imul(t,A0)|0,Q=Q+Math.imul(t,H0)|0,Q=Q+Math.imul(s,A0)|0,K=K+Math.imul(s,H0)|0,U=U+Math.imul(l,W0)|0,Q=Q+Math.imul(l,E0)|0,Q=Q+Math.imul(n,W0)|0,K=K+Math.imul(n,E0)|0,U=U+Math.imul(h,T0)|0,Q=Q+Math.imul(h,D0)|0,Q=Q+Math.imul(d,T0)|0,K=K+Math.imul(d,D0)|0,U=U+Math.imul(B,C0)|0,Q=Q+Math.imul(B,L0)|0,Q=Q+Math.imul(c,C0)|0,K=K+Math.imul(c,L0)|0,U=U+Math.imul(A,R0)|0,Q=Q+Math.imul(A,P0)|0,Q=Q+Math.imul(S,R0)|0,K=K+Math.imul(S,P0)|0;var l0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(l0>>>26)|0,l0&=67108863,U=Math.imul(Z0,V0),Q=Math.imul(Z0,U0),Q=Q+Math.imul(G0,V0)|0,K=Math.imul(G0,U0),U=U+Math.imul($0,X0)|0,Q=Q+Math.imul($0,K0)|0,Q=Q+Math.imul(Q0,X0)|0,K=K+Math.imul(Q0,K0)|0,U=U+Math.imul(o,I0)|0,Q=Q+Math.imul(o,O0)|0,Q=Q+Math.imul(a,I0)|0,K=K+Math.imul(a,O0)|0,U=U+Math.imul(i,J0)|0,Q=Q+Math.imul(i,F0)|0,Q=Q+Math.imul(e,J0)|0,K=K+Math.imul(e,F0)|0,U=U+Math.imul(m,A0)|0,Q=Q+Math.imul(m,H0)|0,Q=Q+Math.imul(r,A0)|0,K=K+Math.imul(r,H0)|0,U=U+Math.imul(t,W0)|0,Q=Q+Math.imul(t,E0)|0,Q=Q+Math.imul(s,W0)|0,K=K+Math.imul(s,E0)|0,U=U+Math.imul(l,T0)|0,Q=Q+Math.imul(l,D0)|0,Q=Q+Math.imul(n,T0)|0,K=K+Math.imul(n,D0)|0,U=U+Math.imul(h,C0)|0,Q=Q+Math.imul(h,L0)|0,Q=Q+Math.imul(d,C0)|0,K=K+Math.imul(d,L0)|0,U=U+Math.imul(B,R0)|0,Q=Q+Math.imul(B,P0)|0,Q=Q+Math.imul(c,R0)|0,K=K+Math.imul(c,P0)|0,U=U+Math.imul(A,z0)|0,Q=Q+Math.imul(A,M0)|0,Q=Q+Math.imul(S,z0)|0,K=K+Math.imul(S,M0)|0;var o0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(o0>>>26)|0,o0&=67108863,U=Math.imul(Z0,X0),Q=Math.imul(Z0,K0),Q=Q+Math.imul(G0,X0)|0,K=Math.imul(G0,K0),U=U+Math.imul($0,I0)|0,Q=Q+Math.imul($0,O0)|0,Q=Q+Math.imul(Q0,I0)|0,K=K+Math.imul(Q0,O0)|0,U=U+Math.imul(o,J0)|0,Q=Q+Math.imul(o,F0)|0,Q=Q+Math.imul(a,J0)|0,K=K+Math.imul(a,F0)|0,U=U+Math.imul(i,A0)|0,Q=Q+Math.imul(i,H0)|0,Q=Q+Math.imul(e,A0)|0,K=K+Math.imul(e,H0)|0,U=U+Math.imul(m,W0)|0,Q=Q+Math.imul(m,E0)|0,Q=Q+Math.imul(r,W0)|0,K=K+Math.imul(r,E0)|0,U=U+Math.imul(t,T0)|0,Q=Q+Math.imul(t,D0)|0,Q=Q+Math.imul(s,T0)|0,K=K+Math.imul(s,D0)|0,U=U+Math.imul(l,C0)|0,Q=Q+Math.imul(l,L0)|0,Q=Q+Math.imul(n,C0)|0,K=K+Math.imul(n,L0)|0,U=U+Math.imul(h,R0)|0,Q=Q+Math.imul(h,P0)|0,Q=Q+Math.imul(d,R0)|0,K=K+Math.imul(d,P0)|0,U=U+Math.imul(B,z0)|0,Q=Q+Math.imul(B,M0)|0,Q=Q+Math.imul(c,z0)|0,K=K+Math.imul(c,M0)|0;var u0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(u0>>>26)|0,u0&=67108863,U=Math.imul(Z0,I0),Q=Math.imul(Z0,O0),Q=Q+Math.imul(G0,I0)|0,K=Math.imul(G0,O0),U=U+Math.imul($0,J0)|0,Q=Q+Math.imul($0,F0)|0,Q=Q+Math.imul(Q0,J0)|0,K=K+Math.imul(Q0,F0)|0,U=U+Math.imul(o,A0)|0,Q=Q+Math.imul(o,H0)|0,Q=Q+Math.imul(a,A0)|0,K=K+Math.imul(a,H0)|0,U=U+Math.imul(i,W0)|0,Q=Q+Math.imul(i,E0)|0,Q=Q+Math.imul(e,W0)|0,K=K+Math.imul(e,E0)|0,U=U+Math.imul(m,T0)|0,Q=Q+Math.imul(m,D0)|0,Q=Q+Math.imul(r,T0)|0,K=K+Math.imul(r,D0)|0,U=U+Math.imul(t,C0)|0,Q=Q+Math.imul(t,L0)|0,Q=Q+Math.imul(s,C0)|0,K=K+Math.imul(s,L0)|0,U=U+Math.imul(l,R0)|0,Q=Q+Math.imul(l,P0)|0,Q=Q+Math.imul(n,R0)|0,K=K+Math.imul(n,P0)|0,U=U+Math.imul(h,z0)|0,Q=Q+Math.imul(h,M0)|0,Q=Q+Math.imul(d,z0)|0,K=K+Math.imul(d,M0)|0;var n0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(n0>>>26)|0,n0&=67108863,U=Math.imul(Z0,J0),Q=Math.imul(Z0,F0),Q=Q+Math.imul(G0,J0)|0,K=Math.imul(G0,F0),U=U+Math.imul($0,A0)|0,Q=Q+Math.imul($0,H0)|0,Q=Q+Math.imul(Q0,A0)|0,K=K+Math.imul(Q0,H0)|0,U=U+Math.imul(o,W0)|0,Q=Q+Math.imul(o,E0)|0,Q=Q+Math.imul(a,W0)|0,K=K+Math.imul(a,E0)|0,U=U+Math.imul(i,T0)|0,Q=Q+Math.imul(i,D0)|0,Q=Q+Math.imul(e,T0)|0,K=K+Math.imul(e,D0)|0,U=U+Math.imul(m,C0)|0,Q=Q+Math.imul(m,L0)|0,Q=Q+Math.imul(r,C0)|0,K=K+Math.imul(r,L0)|0,U=U+Math.imul(t,R0)|0,Q=Q+Math.imul(t,P0)|0,Q=Q+Math.imul(s,R0)|0,K=K+Math.imul(s,P0)|0,U=U+Math.imul(l,z0)|0,Q=Q+Math.imul(l,M0)|0,Q=Q+Math.imul(n,z0)|0,K=K+Math.imul(n,M0)|0;var s0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(s0>>>26)|0,s0&=67108863,U=Math.imul(Z0,A0),Q=Math.imul(Z0,H0),Q=Q+Math.imul(G0,A0)|0,K=Math.imul(G0,H0),U=U+Math.imul($0,W0)|0,Q=Q+Math.imul($0,E0)|0,Q=Q+Math.imul(Q0,W0)|0,K=K+Math.imul(Q0,E0)|0,U=U+Math.imul(o,T0)|0,Q=Q+Math.imul(o,D0)|0,Q=Q+Math.imul(a,T0)|0,K=K+Math.imul(a,D0)|0,U=U+Math.imul(i,C0)|0,Q=Q+Math.imul(i,L0)|0,Q=Q+Math.imul(e,C0)|0,K=K+Math.imul(e,L0)|0,U=U+Math.imul(m,R0)|0,Q=Q+Math.imul(m,P0)|0,Q=Q+Math.imul(r,R0)|0,K=K+Math.imul(r,P0)|0,U=U+Math.imul(t,z0)|0,Q=Q+Math.imul(t,M0)|0,Q=Q+Math.imul(s,z0)|0,K=K+Math.imul(s,M0)|0;var t0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(t0>>>26)|0,t0&=67108863,U=Math.imul(Z0,W0),Q=Math.imul(Z0,E0),Q=Q+Math.imul(G0,W0)|0,K=Math.imul(G0,E0),U=U+Math.imul($0,T0)|0,Q=Q+Math.imul($0,D0)|0,Q=Q+Math.imul(Q0,T0)|0,K=K+Math.imul(Q0,D0)|0,U=U+Math.imul(o,C0)|0,Q=Q+Math.imul(o,L0)|0,Q=Q+Math.imul(a,C0)|0,K=K+Math.imul(a,L0)|0,U=U+Math.imul(i,R0)|0,Q=Q+Math.imul(i,P0)|0,Q=Q+Math.imul(e,R0)|0,K=K+Math.imul(e,P0)|0,U=U+Math.imul(m,z0)|0,Q=Q+Math.imul(m,M0)|0,Q=Q+Math.imul(r,z0)|0,K=K+Math.imul(r,M0)|0;var m0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(m0>>>26)|0,m0&=67108863,U=Math.imul(Z0,T0),Q=Math.imul(Z0,D0),Q=Q+Math.imul(G0,T0)|0,K=Math.imul(G0,D0),U=U+Math.imul($0,C0)|0,Q=Q+Math.imul($0,L0)|0,Q=Q+Math.imul(Q0,C0)|0,K=K+Math.imul(Q0,L0)|0,U=U+Math.imul(o,R0)|0,Q=Q+Math.imul(o,P0)|0,Q=Q+Math.imul(a,R0)|0,K=K+Math.imul(a,P0)|0,U=U+Math.imul(i,z0)|0,Q=Q+Math.imul(i,M0)|0,Q=Q+Math.imul(e,z0)|0,K=K+Math.imul(e,M0)|0;var a0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(a0>>>26)|0,a0&=67108863,U=Math.imul(Z0,C0),Q=Math.imul(Z0,L0),Q=Q+Math.imul(G0,C0)|0,K=Math.imul(G0,L0),U=U+Math.imul($0,R0)|0,Q=Q+Math.imul($0,P0)|0,Q=Q+Math.imul(Q0,R0)|0,K=K+Math.imul(Q0,P0)|0,U=U+Math.imul(o,z0)|0,Q=Q+Math.imul(o,M0)|0,Q=Q+Math.imul(a,z0)|0,K=K+Math.imul(a,M0)|0;var e0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(e0>>>26)|0,e0&=67108863,U=Math.imul(Z0,R0),Q=Math.imul(Z0,P0),Q=Q+Math.imul(G0,R0)|0,K=Math.imul(G0,P0),U=U+Math.imul($0,z0)|0,Q=Q+Math.imul($0,M0)|0,Q=Q+Math.imul(Q0,z0)|0,K=K+Math.imul(Q0,M0)|0;var r0=(O+U|0)+((Q&8191)<<13)|0;O=(K+(Q>>>13)|0)+(r0>>>26)|0,r0&=67108863,U=Math.imul(Z0,z0),Q=Math.imul(Z0,M0),Q=Q+Math.imul(G0,z0)|0,K=Math.imul(G0,M0);var i0=(O+U|0)+((Q&8191)<<13)|0;return O=(K+(Q>>>13)|0)+(i0>>>26)|0,i0&=67108863,I[0]=Q$,I[1]=j0,I[2]=k0,I[3]=f0,I[4]=c0,I[5]=h0,I[6]=d0,I[7]=b0,I[8]=l0,I[9]=o0,I[10]=u0,I[11]=n0,I[12]=s0,I[13]=t0,I[14]=m0,I[15]=a0,I[16]=e0,I[17]=r0,I[18]=i0,O!==0&&(I[19]=O,G.length++),G};Math.imul||(M=L);function v($,Y,G){G.negative=Y.negative^$.negative,G.length=$.length+Y.length;for(var Z=0,V=0,I=0;I>>26)|0,V+=O>>>26,O&=67108863}G.words[I]=U,Z=O,O=V}return Z!==0?G.words[I]=Z:G.length--,G.strip()}function q($,Y,G){var Z=new g;return Z.mulp($,Y,G)}X.prototype.mulTo=function($,Y){var G,Z=this.length+$.length;return this.length===10&&$.length===10?G=M(this,$,Y):Z<63?G=L(this,$,Y):Z<1024?G=v(this,$,Y):G=q(this,$,Y),G};function g($,Y){this.x=$,this.y=Y}g.prototype.makeRBT=function($){for(var Y=new Array($),G=X.prototype._countBits($)-1,Z=0;Z<$;Z++)Y[Z]=this.revBin(Z,G,$);return Y},g.prototype.revBin=function($,Y,G){if($===0||$===G-1)return $;for(var Z=0,V=0;V>=1;return Z},g.prototype.permute=function($,Y,G,Z,V,I){for(var O=0;O>>1)V++;return 1<>>13,G[2*I+1]=V&8191,V=V>>>13;for(I=2*Y;I>=26,Y+=Z/67108864|0,Y+=V>>>26,this.words[G]=V&67108863}return Y!==0&&(this.words[G]=Y,this.length++),this},X.prototype.muln=function($){return this.clone().imuln($)},X.prototype.sqr=function(){return this.mul(this)},X.prototype.isqr=function(){return this.imul(this.clone())},X.prototype.pow=function($){var Y=E($);if(Y.length===0)return new X(1);for(var G=this,Z=0;Z=0);var Y=$%26,G=($-Y)/26,Z=67108863>>>26-Y<<26-Y,V;if(Y!==0){var I=0;for(V=0;V>>26-Y}I&&(this.words[V]=I,this.length++)}if(G!==0){for(V=this.length-1;V>=0;V--)this.words[V+G]=this.words[V];for(V=0;V=0);var Z;Y?Z=(Y-Y%26)/26:Z=0;var V=$%26,I=Math.min(($-V)/26,this.length),O=67108863^67108863>>>V<I)for(this.length-=I,Q=0;Q=0&&(K!==0||Q>=Z);Q--){var R=this.words[Q]|0;this.words[Q]=K<<26-V|R>>>V,K=R&O}return U&&K!==0&&(U.words[U.length++]=K),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},X.prototype.ishrn=function($,Y,G){return F(this.negative===0),this.iushrn($,Y,G)},X.prototype.shln=function($){return this.clone().ishln($)},X.prototype.ushln=function($){return this.clone().iushln($)},X.prototype.shrn=function($){return this.clone().ishrn($)},X.prototype.ushrn=function($){return this.clone().iushrn($)},X.prototype.testn=function($){F(typeof $=="number"&&$>=0);var Y=$%26,G=($-Y)/26,Z=1<=0);var Y=$%26,G=($-Y)/26;if(F(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Y!==0&&G++,this.length=Math.min(G,this.length),Y!==0){var Z=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},X.prototype.isubn=function($){if(F(typeof $=="number"),F($<67108864),$<0)return this.iaddn(-$);if(this.negative!==0)return this.negative=0,this.iaddn($),this.negative=1,this;if(this.words[0]-=$,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-(U/67108864|0),this.words[V+G]=I&67108863}for(;V>26,this.words[V+G]=I&67108863;if(O===0)return this.strip();for(F(O===-1),O=0,V=0;V>26,this.words[V]=I&67108863;return this.negative=1,this.strip()},X.prototype._wordDiv=function($,Y){var G=this.length-$.length,Z=this.clone(),V=$,I=V.words[V.length-1]|0,O=this._countBits(I);G=26-O,G!==0&&(V=V.ushln(G),Z.iushln(G),I=V.words[V.length-1]|0);var U=Z.length-V.length,Q;if(Y!=="mod"){Q=new X(null),Q.length=U+1,Q.words=new Array(Q.length);for(var K=0;K=0;A--){var S=(Z.words[V.length+A]|0)*67108864+(Z.words[V.length+A-1]|0);for(S=Math.min(S/I|0,67108863),Z._ishlnsubmul(V,S,A);Z.negative!==0;)S--,Z.negative=0,Z._ishlnsubmul(V,1,A),Z.isZero()||(Z.negative^=1);Q&&(Q.words[A]=S)}return Q&&Q.strip(),Z.strip(),Y!=="div"&&G!==0&&Z.iushrn(G),{div:Q||null,mod:Z}},X.prototype.divmod=function($,Y,G){if(F(!$.isZero()),this.isZero())return{div:new X(0),mod:new X(0)};var Z,V,I;return this.negative!==0&&$.negative===0?(I=this.neg().divmod($,Y),Y!=="mod"&&(Z=I.div.neg()),Y!=="div"&&(V=I.mod.neg(),G&&V.negative!==0&&V.iadd($)),{div:Z,mod:V}):this.negative===0&&$.negative!==0?(I=this.divmod($.neg(),Y),Y!=="mod"&&(Z=I.div.neg()),{div:Z,mod:I.mod}):(this.negative&$.negative)!==0?(I=this.neg().divmod($.neg(),Y),Y!=="div"&&(V=I.mod.neg(),G&&V.negative!==0&&V.isub($)),{div:I.div,mod:V}):$.length>this.length||this.cmp($)<0?{div:new X(0),mod:this}:$.length===1?Y==="div"?{div:this.divn($.words[0]),mod:null}:Y==="mod"?{div:null,mod:new X(this.modn($.words[0]))}:{div:this.divn($.words[0]),mod:new X(this.modn($.words[0]))}:this._wordDiv($,Y)},X.prototype.div=function($){return this.divmod($,"div",!1).div},X.prototype.mod=function($){return this.divmod($,"mod",!1).mod},X.prototype.umod=function($){return this.divmod($,"mod",!0).mod},X.prototype.divRound=function($){var Y=this.divmod($);if(Y.mod.isZero())return Y.div;var G=Y.div.negative!==0?Y.mod.isub($):Y.mod,Z=$.ushrn(1),V=$.andln(1),I=G.cmp(Z);return I<0||V===1&&I===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},X.prototype.modn=function($){F($<=67108863);for(var Y=(1<<26)%$,G=0,Z=this.length-1;Z>=0;Z--)G=(Y*G+(this.words[Z]|0))%$;return G},X.prototype.idivn=function($){F($<=67108863);for(var Y=0,G=this.length-1;G>=0;G--){var Z=(this.words[G]|0)+Y*67108864;this.words[G]=Z/$|0,Y=Z%$}return this.strip()},X.prototype.divn=function($){return this.clone().idivn($)},X.prototype.egcd=function($){F($.negative===0),F(!$.isZero());var Y=this,G=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new X(1),V=new X(0),I=new X(0),O=new X(1),U=0;Y.isEven()&&G.isEven();)Y.iushrn(1),G.iushrn(1),++U;for(var Q=G.clone(),K=Y.clone();!Y.isZero();){for(var R=0,A=1;(Y.words[0]&A)===0&&R<26;++R,A<<=1);if(R>0)for(Y.iushrn(R);R-- >0;)(Z.isOdd()||V.isOdd())&&(Z.iadd(Q),V.isub(K)),Z.iushrn(1),V.iushrn(1);for(var S=0,x=1;(G.words[0]&x)===0&&S<26;++S,x<<=1);if(S>0)for(G.iushrn(S);S-- >0;)(I.isOdd()||O.isOdd())&&(I.iadd(Q),O.isub(K)),I.iushrn(1),O.iushrn(1);Y.cmp(G)>=0?(Y.isub(G),Z.isub(I),V.isub(O)):(G.isub(Y),I.isub(Z),O.isub(V))}return{a:I,b:O,gcd:G.iushln(U)}},X.prototype._invmp=function($){F($.negative===0),F(!$.isZero());var Y=this,G=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new X(1),V=new X(0),I=G.clone();Y.cmpn(1)>0&&G.cmpn(1)>0;){for(var O=0,U=1;(Y.words[0]&U)===0&&O<26;++O,U<<=1);if(O>0)for(Y.iushrn(O);O-- >0;)Z.isOdd()&&Z.iadd(I),Z.iushrn(1);for(var Q=0,K=1;(G.words[0]&K)===0&&Q<26;++Q,K<<=1);if(Q>0)for(G.iushrn(Q);Q-- >0;)V.isOdd()&&V.iadd(I),V.iushrn(1);Y.cmp(G)>=0?(Y.isub(G),Z.isub(V)):(G.isub(Y),V.isub(Z))}var R;return Y.cmpn(1)===0?R=Z:R=V,R.cmpn(0)<0&&R.iadd($),R},X.prototype.gcd=function($){if(this.isZero())return $.abs();if($.isZero())return this.abs();var Y=this.clone(),G=$.clone();Y.negative=0,G.negative=0;for(var Z=0;Y.isEven()&&G.isEven();Z++)Y.iushrn(1),G.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;G.isEven();)G.iushrn(1);var V=Y.cmp(G);if(V<0){var I=Y;Y=G,G=I}else if(V===0||G.cmpn(1)===0)break;Y.isub(G)}while(!0);return G.iushln(Z)},X.prototype.invm=function($){return this.egcd($).a.umod($)},X.prototype.isEven=function(){return(this.words[0]&1)===0},X.prototype.isOdd=function(){return(this.words[0]&1)===1},X.prototype.andln=function($){return this.words[0]&$},X.prototype.bincn=function($){F(typeof $=="number");var Y=$%26,G=($-Y)/26,Z=1<>>26,O&=67108863,this.words[I]=O}return V!==0&&(this.words[I]=V,this.length++),this},X.prototype.isZero=function(){return this.length===1&&this.words[0]===0},X.prototype.cmpn=function($){var Y=$<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var G;if(this.length>1)G=1;else{Y&&($=-$),F($<=67108863,"Number is too big");var Z=this.words[0]|0;G=Z===$?0:Z<$?-1:1}return this.negative!==0?-G|0:G},X.prototype.cmp=function($){if(this.negative!==0&&$.negative===0)return-1;if(this.negative===0&&$.negative!==0)return 1;var Y=this.ucmp($);return this.negative!==0?-Y|0:Y},X.prototype.ucmp=function($){if(this.length>$.length)return 1;if(this.length<$.length)return-1;for(var Y=0,G=this.length-1;G>=0;G--){var Z=this.words[G]|0,V=$.words[G]|0;if(Z!==V){ZV&&(Y=1);break}}return Y},X.prototype.gtn=function($){return this.cmpn($)===1},X.prototype.gt=function($){return this.cmp($)===1},X.prototype.gten=function($){return this.cmpn($)>=0},X.prototype.gte=function($){return this.cmp($)>=0},X.prototype.ltn=function($){return this.cmpn($)===-1},X.prototype.lt=function($){return this.cmp($)===-1},X.prototype.lten=function($){return this.cmpn($)<=0},X.prototype.lte=function($){return this.cmp($)<=0},X.prototype.eqn=function($){return this.cmpn($)===0},X.prototype.eq=function($){return this.cmp($)===0},X.red=function($){return new p($)},X.prototype.toRed=function($){return F(!this.red,"Already a number in reduction context"),F(this.negative===0,"red works only with positives"),$.convertTo(this)._forceRed($)},X.prototype.fromRed=function(){return F(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},X.prototype._forceRed=function($){return this.red=$,this},X.prototype.forceRed=function($){return F(!this.red,"Already a number in reduction context"),this._forceRed($)},X.prototype.redAdd=function($){return F(this.red,"redAdd works only with red numbers"),this.red.add(this,$)},X.prototype.redIAdd=function($){return F(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,$)},X.prototype.redSub=function($){return F(this.red,"redSub works only with red numbers"),this.red.sub(this,$)},X.prototype.redISub=function($){return F(this.red,"redISub works only with red numbers"),this.red.isub(this,$)},X.prototype.redShl=function($){return F(this.red,"redShl works only with red numbers"),this.red.shl(this,$)},X.prototype.redMul=function($){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.mul(this,$)},X.prototype.redIMul=function($){return F(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.imul(this,$)},X.prototype.redSqr=function(){return F(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},X.prototype.redISqr=function(){return F(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},X.prototype.redSqrt=function(){return F(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},X.prototype.redInvm=function(){return F(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},X.prototype.redNeg=function(){return F(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},X.prototype.redPow=function($){return F(this.red&&!$.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,$)};var y={k256:null,p224:null,p192:null,p25519:null};function w($,Y){this.name=$,this.p=new X(Y,16),this.n=this.p.bitLength(),this.k=new X(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}w.prototype._tmp=function(){var $=new X(null);return $.words=new Array(Math.ceil(this.n/13)),$},w.prototype.ireduce=function($){var Y=$,G;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),G=Y.bitLength();while(G>this.n);var Z=G0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},w.prototype.split=function($,Y){$.iushrn(this.n,0,Y)},w.prototype.imulK=function($){return $.imul(this.k)};function f(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(f,w),f.prototype.split=function($,Y){for(var G=4194303,Z=Math.min($.length,9),V=0;V>>22,I=O}I>>>=22,$.words[V-10]=I,I===0&&$.length>10?$.length-=10:$.length-=9},f.prototype.imulK=function($){$.words[$.length]=0,$.words[$.length+1]=0,$.length+=2;for(var Y=0,G=0;G<$.length;G++){var Z=$.words[G]|0;Y+=Z*977,$.words[G]=Y&67108863,Y=Z*64+(Y/67108864|0)}return $.words[$.length-1]===0&&($.length--,$.words[$.length-1]===0&&$.length--),$};function b(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(b,w);function u(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(u,w);function Y0(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(Y0,w),Y0.prototype.imulK=function($){for(var Y=0,G=0;G<$.length;G++){var Z=($.words[G]|0)*19+Y,V=Z&67108863;Z>>>=26,$.words[G]=V,Y=Z}return Y!==0&&($.words[$.length++]=Y),$},X._prime=function($){if(y[$])return y[$];var Y;if($==="k256")Y=new f;else if($==="p224")Y=new b;else if($==="p192")Y=new u;else if($==="p25519")Y=new Y0;else throw new Error("Unknown prime "+$);return y[$]=Y,Y};function p($){if(typeof $=="string"){var Y=X._prime($);this.m=Y.p,this.prime=Y}else F($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}p.prototype._verify1=function($){F($.negative===0,"red works only with positives"),F($.red,"red works only with red numbers")},p.prototype._verify2=function($,Y){F(($.negative|Y.negative)===0,"red works only with positives"),F($.red&&$.red===Y.red,"red works only with red numbers")},p.prototype.imod=function($){return this.prime?this.prime.ireduce($)._forceRed(this):$.umod(this.m)._forceRed(this)},p.prototype.neg=function($){return $.isZero()?$.clone():this.m.sub($)._forceRed(this)},p.prototype.add=function($,Y){this._verify2($,Y);var G=$.add(Y);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},p.prototype.iadd=function($,Y){this._verify2($,Y);var G=$.iadd(Y);return G.cmp(this.m)>=0&&G.isub(this.m),G},p.prototype.sub=function($,Y){this._verify2($,Y);var G=$.sub(Y);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},p.prototype.isub=function($,Y){this._verify2($,Y);var G=$.isub(Y);return G.cmpn(0)<0&&G.iadd(this.m),G},p.prototype.shl=function($,Y){return this._verify1($),this.imod($.ushln(Y))},p.prototype.imul=function($,Y){return this._verify2($,Y),this.imod($.imul(Y))},p.prototype.mul=function($,Y){return this._verify2($,Y),this.imod($.mul(Y))},p.prototype.isqr=function($){return this.imul($,$.clone())},p.prototype.sqr=function($){return this.mul($,$)},p.prototype.sqrt=function($){if($.isZero())return $.clone();var Y=this.m.andln(3);if(F(Y%2===1),Y===3){var G=this.m.add(new X(1)).iushrn(2);return this.pow($,G)}for(var Z=this.m.subn(1),V=0;!Z.isZero()&&Z.andln(1)===0;)V++,Z.iushrn(1);F(!Z.isZero());var I=new X(1).toRed(this),O=I.redNeg(),U=this.m.subn(1).iushrn(1),Q=this.m.bitLength();for(Q=new X(2*Q*Q).toRed(this);this.pow(Q,U).cmp(O)!==0;)Q.redIAdd(O);for(var K=this.pow(Q,Z),R=this.pow($,Z.addn(1).iushrn(1)),A=this.pow($,Z),S=V;A.cmp(I)!==0;){for(var x=A,B=0;x.cmp(I)!==0;B++)x=x.redSqr();F(B=0;V--){for(var K=Y.words[V],R=Q-1;R>=0;R--){var A=K>>R&1;if(I!==Z[0]&&(I=this.sqr(I)),A===0&&O===0){U=0;continue}O<<=1,O|=A,U++,!(U!==G&&(V!==0||R!==0))&&(I=this.mul(I,Z[O]),U=0,O=0)}Q=26}return I},p.prototype.convertTo=function($){var Y=$.umod(this.m);return Y===$?Y.clone():Y},p.prototype.convertFrom=function($){var Y=$.clone();return Y.red=null,Y},X.mont=function($){return new v0($)};function v0($){p.call(this,$),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new X(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)}z(v0,p),v0.prototype.convertTo=function($){return this.imod($.ushln(this.shift))},v0.prototype.convertFrom=function($){var Y=this.imod($.mul(this.rinv));return Y.red=null,Y},v0.prototype.imul=function($,Y){if($.isZero()||Y.isZero())return $.words[0]=0,$.length=1,$;var G=$.imul(Y),Z=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=G.isub(Z).iushrn(this.shift),I=V;return V.cmp(this.m)>=0?I=V.isub(this.m):V.cmpn(0)<0&&(I=V.iadd(this.m)),I._forceRed(this)},v0.prototype.mul=function($,Y){if($.isZero()||Y.isZero())return new X(0)._forceRed(this);var G=$.mul(Y),Z=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=G.isub(Z).iushrn(this.shift),I=V;return V.cmp(this.m)>=0?I=V.isub(this.m):V.cmpn(0)<0&&(I=V.iadd(this.m)),I._forceRed(this)},v0.prototype.invm=function($){var Y=this.imod($._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof _>"u"||_,N)}}),zQ=S0({"node_modules/minimalistic-crypto-utils/lib/utils.js"(N){var _=N;function k(z,X){if(Array.isArray(z))return z.slice();if(!z)return[];var C=[];if(typeof z!="string"){for(var P=0;P>8,J=T&255;W?C.push(W,J):C.push(J)}return C}_.toArray=k;function j(z){return z.length===1?"0"+z:z}_.zero2=j;function F(z){for(var X="",C=0;C(E>>1)-1?v=(E>>1)-q:v=q,L.isubn(v)):v=0,D[M]=v,L.iushrn(1)}return D}_.getNAF=z;function X(W,J){var H=[[],[]];W=W.clone(),J=J.clone();for(var D=0,E=0,L;W.cmpn(-D)>0||J.cmpn(-E)>0;){var M=W.andln(3)+D&3,v=J.andln(3)+E&3;M===3&&(M=-1),v===3&&(v=-1);var q;(M&1)===0?q=0:(L=W.andln(7)+D&7,(L===3||L===5)&&v===2?q=-M:q=M),H[0].push(q);var g;(v&1)===0?g=0:(L=J.andln(7)+E&7,(L===3||L===5)&&M===2?g=-v:g=v),H[1].push(g),2*D===q+1&&(D=1-D),2*E===g+1&&(E=1-E),W.iushrn(1),J.iushrn(1)}return H}_.getJSF=X;function C(W,J,H){var D="_"+J;W.prototype[J]=function(){return this[D]!==void 0?this[D]:this[D]=H.call(this)}}_.cachedProperty=C;function P(W){return typeof W=="string"?_.toArray(W,"hex"):W}_.parseBytes=P;function T(W){return new k(W,"hex","le")}_.intFromLE=T}}),k$=S0({"node_modules/elliptic/lib/elliptic/curve/base.js"(N,_){var k=D$(),j=E$(),F=j.getNAF,z=j.getJSF,X=j.assert;function C(T,W){this.type=T,this.p=new k(W.p,16),this.red=W.prime?k.red(W.prime):k.mont(this.p),this.zero=new k(0).toRed(this.red),this.one=new k(1).toRed(this.red),this.two=new k(2).toRed(this.red),this.n=W.n&&new k(W.n,16),this.g=W.g&&this.pointFromJSON(W.g,W.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 J=this.n&&this.p.div(this.n);!J||J.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}_.exports=C,C.prototype.point=function(){throw new Error("Not implemented")},C.prototype.validate=function(){throw new Error("Not implemented")},C.prototype._fixedNafMul=function(T,W){X(T.precomputed);var J=T._getDoubles(),H=F(W,1,this._bitLength),D=(1<=L;v--)M=(M<<1)+H[v];E.push(M)}for(var q=this.jpoint(null,null,null),g=this.jpoint(null,null,null),y=D;y>0;y--){for(L=0;L=0;M--){for(var v=0;M>=0&&E[M]===0;M--)v++;if(M>=0&&v++,L=L.dblp(v),M<0)break;var q=E[M];X(q!==0),T.type==="affine"?q>0?L=L.mixedAdd(D[q-1>>1]):L=L.mixedAdd(D[-q-1>>1].neg()):q>0?L=L.add(D[q-1>>1]):L=L.add(D[-q-1>>1].neg())}return T.type==="affine"?L.toP():L},C.prototype._wnafMulAdd=function(T,W,J,H,D){var E=this._wnafT1,L=this._wnafT2,M=this._wnafT3,v=0,q,g,y;for(q=0;q=1;q-=2){var f=q-1,b=q;if(E[f]!==1||E[b]!==1){M[f]=F(J[f],E[f],this._bitLength),M[b]=F(J[b],E[b],this._bitLength),v=Math.max(M[f].length,v),v=Math.max(M[b].length,v);continue}var u=[W[f],null,null,W[b]];W[f].y.cmp(W[b].y)===0?(u[1]=W[f].add(W[b]),u[2]=W[f].toJ().mixedAdd(W[b].neg())):W[f].y.cmp(W[b].y.redNeg())===0?(u[1]=W[f].toJ().mixedAdd(W[b]),u[2]=W[f].add(W[b].neg())):(u[1]=W[f].toJ().mixedAdd(W[b]),u[2]=W[f].toJ().mixedAdd(W[b].neg()));var Y0=[-3,-1,-5,-7,0,7,5,1,3],p=z(J[f],J[b]);for(v=Math.max(p[0].length,v),M[f]=new Array(v),M[b]=new Array(v),g=0;g=0;q--){for(var Z=0;q>=0;){var V=!0;for(g=0;g=0&&Z++,Y=Y.dblp(Z),q<0)break;for(g=0;g0?y=L[g][I-1>>1]:I<0&&(y=L[g][-I-1>>1].neg()),y.type==="affine"?Y=Y.mixedAdd(y):Y=Y.add(y))}}for(q=0;q=Math.ceil((T.bitLength()+1)/W.step):!1},P.prototype._getDoubles=function(T,W){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var J=[this],H=this,D=0;D=0&&(f=q,b=g),y.negative&&(y=y.neg(),w=w.neg()),f.negative&&(f=f.neg(),b=b.neg()),[{a:y,b:w},{a:f,b}]},C.prototype._endoSplit=function(W){var J=this.endo.basis,H=J[0],D=J[1],E=D.b.mul(W).divRound(this.n),L=H.b.neg().mul(W).divRound(this.n),M=E.mul(H.a),v=L.mul(D.a),q=E.mul(H.b),g=L.mul(D.b),y=W.sub(M).sub(v),w=q.add(g).neg();return{k1:y,k2:w}},C.prototype.pointFromX=function(W,J){W=new j(W,16),W.red||(W=W.toRed(this.red));var H=W.redSqr().redMul(W).redIAdd(W.redMul(this.a)).redIAdd(this.b),D=H.redSqrt();if(D.redSqr().redSub(H).cmp(this.zero)!==0)throw new Error("invalid point");var E=D.fromRed().isOdd();return(J&&!E||!J&&E)&&(D=D.redNeg()),this.point(W,D)},C.prototype.validate=function(W){if(W.inf)return!0;var{x:J,y:H}=W,D=this.a.redMul(J),E=J.redSqr().redMul(J).redIAdd(D).redIAdd(this.b);return H.redSqr().redISub(E).cmpn(0)===0},C.prototype._endoWnafMulAdd=function(W,J,H){for(var D=this._endoWnafT1,E=this._endoWnafT2,L=0;L":""},P.prototype.isInfinity=function(){return this.inf},P.prototype.add=function(W){if(this.inf)return W;if(W.inf)return this;if(this.eq(W))return this.dbl();if(this.neg().eq(W))return this.curve.point(null,null);if(this.x.cmp(W.x)===0)return this.curve.point(null,null);var J=this.y.redSub(W.y);J.cmpn(0)!==0&&(J=J.redMul(this.x.redSub(W.x).redInvm()));var H=J.redSqr().redISub(this.x).redISub(W.x),D=J.redMul(this.x.redSub(H)).redISub(this.y);return this.curve.point(H,D)},P.prototype.dbl=function(){if(this.inf)return this;var W=this.y.redAdd(this.y);if(W.cmpn(0)===0)return this.curve.point(null,null);var J=this.curve.a,H=this.x.redSqr(),D=W.redInvm(),E=H.redAdd(H).redIAdd(H).redIAdd(J).redMul(D),L=E.redSqr().redISub(this.x.redAdd(this.x)),M=E.redMul(this.x.redSub(L)).redISub(this.y);return this.curve.point(L,M)},P.prototype.getX=function(){return this.x.fromRed()},P.prototype.getY=function(){return this.y.fromRed()},P.prototype.mul=function(W){return W=new j(W,16),this.isInfinity()?this:this._hasDoubles(W)?this.curve._fixedNafMul(this,W):this.curve.endo?this.curve._endoWnafMulAdd([this],[W]):this.curve._wnafMul(this,W)},P.prototype.mulAdd=function(W,J,H){var D=[this,J],E=[W,H];return this.curve.endo?this.curve._endoWnafMulAdd(D,E):this.curve._wnafMulAdd(1,D,E,2)},P.prototype.jmulAdd=function(W,J,H){var D=[this,J],E=[W,H];return this.curve.endo?this.curve._endoWnafMulAdd(D,E,!0):this.curve._wnafMulAdd(1,D,E,2,!0)},P.prototype.eq=function(W){return this===W||this.inf===W.inf&&(this.inf||this.x.cmp(W.x)===0&&this.y.cmp(W.y)===0)},P.prototype.neg=function(W){if(this.inf)return this;var J=this.curve.point(this.x,this.y.redNeg());if(W&&this.precomputed){var H=this.precomputed,D=function(E){return E.neg()};J.precomputed={naf:H.naf&&{wnd:H.naf.wnd,points:H.naf.points.map(D)},doubles:H.doubles&&{step:H.doubles.step,points:H.doubles.points.map(D)}}}return J},P.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var W=this.curve.jpoint(this.x,this.y,this.curve.one);return W};function T(W,J,H,D){z.BasePoint.call(this,W,"jacobian"),J===null&&H===null&&D===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new j(0)):(this.x=new j(J,16),this.y=new j(H,16),this.z=new j(D,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}F(T,z.BasePoint),C.prototype.jpoint=function(W,J,H){return new T(this,W,J,H)},T.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var W=this.z.redInvm(),J=W.redSqr(),H=this.x.redMul(J),D=this.y.redMul(J).redMul(W);return this.curve.point(H,D)},T.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},T.prototype.add=function(W){if(this.isInfinity())return W;if(W.isInfinity())return this;var J=W.z.redSqr(),H=this.z.redSqr(),D=this.x.redMul(J),E=W.x.redMul(H),L=this.y.redMul(J.redMul(W.z)),M=W.y.redMul(H.redMul(this.z)),v=D.redSub(E),q=L.redSub(M);if(v.cmpn(0)===0)return q.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=v.redSqr(),y=g.redMul(v),w=D.redMul(g),f=q.redSqr().redIAdd(y).redISub(w).redISub(w),b=q.redMul(w.redISub(f)).redISub(L.redMul(y)),u=this.z.redMul(W.z).redMul(v);return this.curve.jpoint(f,b,u)},T.prototype.mixedAdd=function(W){if(this.isInfinity())return W.toJ();if(W.isInfinity())return this;var J=this.z.redSqr(),H=this.x,D=W.x.redMul(J),E=this.y,L=W.y.redMul(J).redMul(this.z),M=H.redSub(D),v=E.redSub(L);if(M.cmpn(0)===0)return v.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var q=M.redSqr(),g=q.redMul(M),y=H.redMul(q),w=v.redSqr().redIAdd(g).redISub(y).redISub(y),f=v.redMul(y.redISub(w)).redISub(E.redMul(g)),b=this.z.redMul(M);return this.curve.jpoint(w,f,b)},T.prototype.dblp=function(W){if(W===0)return this;if(this.isInfinity())return this;if(!W)return this.dbl();var J;if(this.curve.zeroA||this.curve.threeA){var H=this;for(J=0;J=0)return!1;if(H.redIAdd(E),this.x.cmp(H)===0)return!0}},T.prototype.inspect=function(){return this.isInfinity()?"":""},T.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}}),CY=S0({"node_modules/elliptic/lib/elliptic/curve/mont.js"(N,_){var k=D$(),j=B0(),F=k$(),z=E$();function X(P){F.call(this,"mont",P),this.a=new k(P.a,16).toRed(this.red),this.b=new k(P.b,16).toRed(this.red),this.i4=new k(4).toRed(this.red).redInvm(),this.two=new k(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}j(X,F),_.exports=X,X.prototype.validate=function(P){var T=P.normalize().x,W=T.redSqr(),J=W.redMul(T).redAdd(W.redMul(this.a)).redAdd(T),H=J.redSqrt();return H.redSqr().cmp(J)===0};function C(P,T,W){F.BasePoint.call(this,P,"projective"),T===null&&W===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new k(T,16),this.z=new k(W,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}j(C,F.BasePoint),X.prototype.decodePoint=function(P,T){return this.point(z.toArray(P,T),1)},X.prototype.point=function(P,T){return new C(this,P,T)},X.prototype.pointFromJSON=function(P){return C.fromJSON(this,P)},C.prototype.precompute=function(){},C.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},C.fromJSON=function(P,T){return new C(P,T[0],T[1]||P.one)},C.prototype.inspect=function(){return this.isInfinity()?"":""},C.prototype.isInfinity=function(){return this.z.cmpn(0)===0},C.prototype.dbl=function(){var P=this.x.redAdd(this.z),T=P.redSqr(),W=this.x.redSub(this.z),J=W.redSqr(),H=T.redSub(J),D=T.redMul(J),E=H.redMul(J.redAdd(this.curve.a24.redMul(H)));return this.curve.point(D,E)},C.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.diffAdd=function(P,T){var W=this.x.redAdd(this.z),J=this.x.redSub(this.z),H=P.x.redAdd(P.z),D=P.x.redSub(P.z),E=D.redMul(W),L=H.redMul(J),M=T.z.redMul(E.redAdd(L).redSqr()),v=T.x.redMul(E.redISub(L).redSqr());return this.curve.point(M,v)},C.prototype.mul=function(P){for(var T=P.clone(),W=this,J=this.curve.point(null,null),H=this,D=[];T.cmpn(0)!==0;T.iushrn(1))D.push(T.andln(1));for(var E=D.length-1;E>=0;E--)D[E]===0?(W=W.diffAdd(J,H),J=J.dbl()):(J=W.diffAdd(J,H),W=W.dbl());return J},C.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.eq=function(P){return this.getX().cmp(P.getX())===0},C.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},C.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}}),LY=S0({"node_modules/elliptic/lib/elliptic/curve/edwards.js"(N,_){var k=E$(),j=D$(),F=B0(),z=k$(),X=k.assert;function C(T){this.twisted=(T.a|0)!==1,this.mOneA=this.twisted&&(T.a|0)===-1,this.extended=this.mOneA,z.call(this,"edwards",T),this.a=new j(T.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new j(T.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new j(T.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),X(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(T.c|0)===1}F(C,z),_.exports=C,C.prototype._mulA=function(T){return this.mOneA?T.redNeg():this.a.redMul(T)},C.prototype._mulC=function(T){return this.oneC?T:this.c.redMul(T)},C.prototype.jpoint=function(T,W,J,H){return this.point(T,W,J,H)},C.prototype.pointFromX=function(T,W){T=new j(T,16),T.red||(T=T.toRed(this.red));var J=T.redSqr(),H=this.c2.redSub(this.a.redMul(J)),D=this.one.redSub(this.c2.redMul(this.d).redMul(J)),E=H.redMul(D.redInvm()),L=E.redSqrt();if(L.redSqr().redSub(E).cmp(this.zero)!==0)throw new Error("invalid point");var M=L.fromRed().isOdd();return(W&&!M||!W&&M)&&(L=L.redNeg()),this.point(T,L)},C.prototype.pointFromY=function(T,W){T=new j(T,16),T.red||(T=T.toRed(this.red));var J=T.redSqr(),H=J.redSub(this.c2),D=J.redMul(this.d).redMul(this.c2).redSub(this.a),E=H.redMul(D.redInvm());if(E.cmp(this.zero)===0){if(W)throw new Error("invalid point");return this.point(this.zero,T)}var L=E.redSqrt();if(L.redSqr().redSub(E).cmp(this.zero)!==0)throw new Error("invalid point");return L.fromRed().isOdd()!==W&&(L=L.redNeg()),this.point(L,T)},C.prototype.validate=function(T){if(T.isInfinity())return!0;T.normalize();var W=T.x.redSqr(),J=T.y.redSqr(),H=W.redMul(this.a).redAdd(J),D=this.c2.redMul(this.one.redAdd(this.d.redMul(W).redMul(J)));return H.cmp(D)===0};function P(T,W,J,H,D){z.BasePoint.call(this,T,"projective"),W===null&&J===null&&H===null?(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 j(W,16),this.y=new j(J,16),this.z=H?new j(H,16):this.curve.one,this.t=D&&new j(D,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()))))}F(P,z.BasePoint),C.prototype.pointFromJSON=function(T){return P.fromJSON(this,T)},C.prototype.point=function(T,W,J,H){return new P(this,T,W,J,H)},P.fromJSON=function(T,W){return new P(T,W[0],W[1],W[2])},P.prototype.inspect=function(){return this.isInfinity()?"":""},P.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},P.prototype._extDbl=function(){var T=this.x.redSqr(),W=this.y.redSqr(),J=this.z.redSqr();J=J.redIAdd(J);var H=this.curve._mulA(T),D=this.x.redAdd(this.y).redSqr().redISub(T).redISub(W),E=H.redAdd(W),L=E.redSub(J),M=H.redSub(W),v=D.redMul(L),q=E.redMul(M),g=D.redMul(M),y=L.redMul(E);return this.curve.point(v,q,y,g)},P.prototype._projDbl=function(){var T=this.x.redAdd(this.y).redSqr(),W=this.x.redSqr(),J=this.y.redSqr(),H,D,E,L,M,v;if(this.curve.twisted){L=this.curve._mulA(W);var q=L.redAdd(J);this.zOne?(H=T.redSub(W).redSub(J).redMul(q.redSub(this.curve.two)),D=q.redMul(L.redSub(J)),E=q.redSqr().redSub(q).redSub(q)):(M=this.z.redSqr(),v=q.redSub(M).redISub(M),H=T.redSub(W).redISub(J).redMul(v),D=q.redMul(L.redSub(J)),E=q.redMul(v))}else L=W.redAdd(J),M=this.curve._mulC(this.z).redSqr(),v=L.redSub(M).redSub(M),H=this.curve._mulC(T.redISub(L)).redMul(v),D=this.curve._mulC(L).redMul(W.redISub(J)),E=L.redMul(v);return this.curve.point(H,D,E)},P.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},P.prototype._extAdd=function(T){var W=this.y.redSub(this.x).redMul(T.y.redSub(T.x)),J=this.y.redAdd(this.x).redMul(T.y.redAdd(T.x)),H=this.t.redMul(this.curve.dd).redMul(T.t),D=this.z.redMul(T.z.redAdd(T.z)),E=J.redSub(W),L=D.redSub(H),M=D.redAdd(H),v=J.redAdd(W),q=E.redMul(L),g=M.redMul(v),y=E.redMul(v),w=L.redMul(M);return this.curve.point(q,g,w,y)},P.prototype._projAdd=function(T){var W=this.z.redMul(T.z),J=W.redSqr(),H=this.x.redMul(T.x),D=this.y.redMul(T.y),E=this.curve.d.redMul(H).redMul(D),L=J.redSub(E),M=J.redAdd(E),v=this.x.redAdd(this.y).redMul(T.x.redAdd(T.y)).redISub(H).redISub(D),q=W.redMul(L).redMul(v),g,y;return this.curve.twisted?(g=W.redMul(M).redMul(D.redSub(this.curve._mulA(H))),y=L.redMul(M)):(g=W.redMul(M).redMul(D.redSub(H)),y=this.curve._mulC(L).redMul(M)),this.curve.point(q,g,y)},P.prototype.add=function(T){return this.isInfinity()?T:T.isInfinity()?this:this.curve.extended?this._extAdd(T):this._projAdd(T)},P.prototype.mul=function(T){return this._hasDoubles(T)?this.curve._fixedNafMul(this,T):this.curve._wnafMul(this,T)},P.prototype.mulAdd=function(T,W,J){return this.curve._wnafMulAdd(1,[this,W],[T,J],2,!1)},P.prototype.jmulAdd=function(T,W,J){return this.curve._wnafMulAdd(1,[this,W],[T,J],2,!0)},P.prototype.normalize=function(){if(this.zOne)return this;var T=this.z.redInvm();return this.x=this.x.redMul(T),this.y=this.y.redMul(T),this.t&&(this.t=this.t.redMul(T)),this.z=this.curve.one,this.zOne=!0,this},P.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},P.prototype.getX=function(){return this.normalize(),this.x.fromRed()},P.prototype.getY=function(){return this.normalize(),this.y.fromRed()},P.prototype.eq=function(T){return this===T||this.getX().cmp(T.getX())===0&&this.getY().cmp(T.getY())===0},P.prototype.eqXToP=function(T){var W=T.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(W)===0)return!0;for(var J=T.clone(),H=this.curve.redN.redMul(this.z);;){if(J.iadd(this.curve.n),J.cmp(this.curve.p)>=0)return!1;if(W.redIAdd(H),this.x.cmp(W)===0)return!0}},P.prototype.toP=P.prototype.normalize,P.prototype.mixedAdd=P.prototype.add}}),MQ=S0({"node_modules/elliptic/lib/elliptic/curve/index.js"(N){var _=N;_.base=k$(),_.short=DY(),_.mont=CY(),_.edwards=LY()}}),T$=S0({"node_modules/hash.js/lib/hash/utils.js"(N){var _=W$(),k=B0();N.inherits=k;function j(Y,G){return(Y.charCodeAt(G)&64512)!==55296||G<0||G+1>=Y.length?!1:(Y.charCodeAt(G+1)&64512)===56320}function F(Y,G){if(Array.isArray(Y))return Y.slice();if(!Y)return[];var Z=[];if(typeof Y=="string")if(G){if(G==="hex")for(Y=Y.replace(/[^a-z0-9]+/gi,""),Y.length%2!==0&&(Y="0"+Y),I=0;I>6|192,Z[V++]=O&63|128):j(Y,I)?(O=65536+((O&1023)<<10)+(Y.charCodeAt(++I)&1023),Z[V++]=O>>18|240,Z[V++]=O>>12&63|128,Z[V++]=O>>6&63|128,Z[V++]=O&63|128):(Z[V++]=O>>12|224,Z[V++]=O>>6&63|128,Z[V++]=O&63|128)}else for(I=0;I>>24|Y>>>8&65280|Y<<8&16711680|(Y&255)<<24;return G>>>0}N.htonl=X;function C(Y,G){for(var Z="",V=0;V>>0}return O}N.join32=W;function J(Y,G){for(var Z=new Array(Y.length*4),V=0,I=0;V>>24,Z[I+1]=O>>>16&255,Z[I+2]=O>>>8&255,Z[I+3]=O&255):(Z[I+3]=O>>>24,Z[I+2]=O>>>16&255,Z[I+1]=O>>>8&255,Z[I]=O&255)}return Z}N.split32=J;function H(Y,G){return Y>>>G|Y<<32-G}N.rotr32=H;function D(Y,G){return Y<>>32-G}N.rotl32=D;function E(Y,G){return Y+G>>>0}N.sum32=E;function L(Y,G,Z){return Y+G+Z>>>0}N.sum32_3=L;function M(Y,G,Z,V){return Y+G+Z+V>>>0}N.sum32_4=M;function v(Y,G,Z,V,I){return Y+G+Z+V+I>>>0}N.sum32_5=v;function q(Y,G,Z,V){var I=Y[G],O=Y[G+1],U=V+O>>>0,Q=(U>>0,Y[G+1]=U}N.sum64=q;function g(Y,G,Z,V){var I=G+V>>>0,O=(I>>0}N.sum64_hi=g;function y(Y,G,Z,V){var I=G+V;return I>>>0}N.sum64_lo=y;function w(Y,G,Z,V,I,O,U,Q){var K=0,R=G;R=R+V>>>0,K+=R>>0,K+=R>>0,K+=R>>0}N.sum64_4_hi=w;function f(Y,G,Z,V,I,O,U,Q){var K=G+V+O+Q;return K>>>0}N.sum64_4_lo=f;function b(Y,G,Z,V,I,O,U,Q,K,R){var A=0,S=G;S=S+V>>>0,A+=S>>0,A+=S>>0,A+=S>>0,A+=S>>0}N.sum64_5_hi=b;function u(Y,G,Z,V,I,O,U,Q,K,R){var A=G+V+O+Q+R;return A>>>0}N.sum64_5_lo=u;function Y0(Y,G,Z){var V=G<<32-Z|Y>>>Z;return V>>>0}N.rotr64_hi=Y0;function p(Y,G,Z){var V=Y<<32-Z|G>>>Z;return V>>>0}N.rotr64_lo=p;function v0(Y,G,Z){return Y>>>Z}N.shr64_hi=v0;function $(Y,G,Z){var V=Y<<32-Z|G>>>Z;return V>>>0}N.shr64_lo=$}}),v$=S0({"node_modules/hash.js/lib/hash/common.js"(N){var _=T$(),k=W$();function j(){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}N.BlockHash=j,j.prototype.update=function(F,z){if(F=_.toArray(F,z),this.pending?this.pending=this.pending.concat(F):this.pending=F,this.pendingTotal+=F.length,this.pending.length>=this._delta8){F=this.pending;var X=F.length%this._delta8;this.pending=F.slice(F.length-X,F.length),this.pending.length===0&&(this.pending=null),F=_.join32(F,0,F.length-X,this.endian);for(var C=0;C>>24&255,C[P++]=F>>>16&255,C[P++]=F>>>8&255,C[P++]=F&255}else for(C[P++]=F&255,C[P++]=F>>>8&255,C[P++]=F>>>16&255,C[P++]=F>>>24&255,C[P++]=0,C[P++]=0,C[P++]=0,C[P++]=0,T=8;T>>3}N.g0_256=T;function W(J){return k(J,17)^k(J,19)^J>>>10}N.g1_256=W}}),RY=S0({"node_modules/hash.js/lib/hash/sha/1.js"(N,_){var k=T$(),j=v$(),F=SQ(),z=k.rotl32,X=k.sum32,C=k.sum32_5,P=F.ft_1,T=j.BlockHash,W=[1518500249,1859775393,2400959708,3395469782];function J(){if(!(this instanceof J))return new J;T.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}k.inherits(J,T),_.exports=J,J.blockSize=512,J.outSize=160,J.hmacStrength=80,J.padLength=64,J.prototype._update=function(H,D){for(var E=this.W,L=0;L<16;L++)E[L]=H[D+L];for(;Lthis.blockSize&&(z=new this.Hash().update(z).digest()),j(z.length<=this.blockSize);for(var X=z.length;X=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(C,P,T)}_.exports=z,z.prototype._init=function(X,C,P){var T=X.concat(C).concat(P);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var W=0;W=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(X.concat(P||[])),this._reseed=1},z.prototype.generate=function(X,C,P,T){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof C!="string"&&(T=P,P=C,C=null),P&&(P=j.toArray(P,T||"hex"),this._update(P));for(var W=[];W.length"}}}),gY=S0({"node_modules/elliptic/lib/elliptic/ec/signature.js"(N,_){var k=D$(),j=E$(),F=j.assert;function z(W,J){if(W instanceof z)return W;this._importDER(W,J)||(F(W.r&&W.s,"Signature without r or s"),this.r=new k(W.r,16),this.s=new k(W.s,16),W.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=W.recoveryParam)}_.exports=z;function X(){this.place=0}function C(W,J){var H=W[J.place++];if(!(H&128))return H;var D=H&15;if(D===0||D>4)return!1;for(var E=0,L=0,M=J.place;L>>=0;return E<=127?!1:(J.place=M,E)}function P(W){for(var J=0,H=W.length-1;!W[J]&&!(W[J+1]&128)&&J>>3);for(W.push(H|128);--H;)W.push(J>>>(H<<3)&255);W.push(J)}z.prototype.toDER=function(W){var J=this.r.toArray(),H=this.s.toArray();for(J[0]&128&&(J=[0].concat(J)),H[0]&128&&(H=[0].concat(H)),J=P(J),H=P(H);!H[0]&&!(H[1]&128);)H=H.slice(1);var D=[2];T(D,J.length),D=D.concat(J),D.push(2),T(D,H.length);var E=D.concat(H),L=[48];return T(L,E.length),L=L.concat(E),j.encode(L,W)}}}),_Y=S0({"node_modules/elliptic/lib/elliptic/ec/index.js"(N,_){var k=D$(),j=jY(),F=E$(),z=b$(),X=f$(),C=F.assert,P=kY(),T=gY();function W(J){if(!(this instanceof W))return new W(J);typeof J=="string"&&(C(Object.prototype.hasOwnProperty.call(z,J),"Unknown curve "+J),J=z[J]),J instanceof z.PresetCurve&&(J={curve:J}),this.curve=J.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=J.curve.g,this.g.precompute(J.curve.n.bitLength()+1),this.hash=J.hash||J.curve.hash}_.exports=W,W.prototype.keyPair=function(J){return new P(this,J)},W.prototype.keyFromPrivate=function(J,H){return P.fromPrivate(this,J,H)},W.prototype.keyFromPublic=function(J,H){return P.fromPublic(this,J,H)},W.prototype.genKeyPair=function(J){J||(J={});for(var H=new j({hash:this.hash,pers:J.pers,persEnc:J.persEnc||"utf8",entropy:J.entropy||X(this.hash.hmacStrength),entropyEnc:J.entropy&&J.entropyEnc||"utf8",nonce:this.n.toArray()}),D=this.n.byteLength(),E=this.n.sub(new k(2));;){var L=new k(H.generate(D));if(!(L.cmp(E)>0))return L.iaddn(1),this.keyFromPrivate(L)}},W.prototype._truncateToN=function(J,H){var D=J.byteLength()*8-this.n.bitLength();return D>0&&(J=J.ushrn(D)),!H&&J.cmp(this.n)>=0?J.sub(this.n):J},W.prototype.sign=function(J,H,D,E){typeof D=="object"&&(E=D,D=null),E||(E={}),H=this.keyFromPrivate(H,D),J=this._truncateToN(new k(J,16));for(var L=this.n.byteLength(),M=H.getPrivate().toArray("be",L),v=J.toArray("be",L),q=new j({hash:this.hash,entropy:M,nonce:v,pers:E.pers,persEnc:E.persEnc||"utf8"}),g=this.n.sub(new k(1)),y=0;;y++){var w=E.k?E.k(y):new k(q.generate(this.n.byteLength()));if(w=this._truncateToN(w,!0),!(w.cmpn(1)<=0||w.cmp(g)>=0)){var f=this.g.mul(w);if(!f.isInfinity()){var b=f.getX(),u=b.umod(this.n);if(u.cmpn(0)!==0){var Y0=w.invm(this.n).mul(u.mul(H.getPrivate()).iadd(J));if(Y0=Y0.umod(this.n),Y0.cmpn(0)!==0){var p=(f.getY().isOdd()?1:0)|(b.cmp(u)!==0?2:0);return E.canonical&&Y0.cmp(this.nh)>0&&(Y0=this.n.sub(Y0),p^=1),new T({r:u,s:Y0,recoveryParam:p})}}}}}},W.prototype.verify=function(J,H,D,E){J=this._truncateToN(new k(J,16)),D=this.keyFromPublic(D,E),H=new T(H,"hex");var{r:L,s:M}=H;if(L.cmpn(1)<0||L.cmp(this.n)>=0||M.cmpn(1)<0||M.cmp(this.n)>=0)return!1;var v=M.invm(this.n),q=v.mul(J).umod(this.n),g=v.mul(L).umod(this.n),y;return this.curve._maxwellTrick?(y=this.g.jmulAdd(q,D.getPublic(),g),y.isInfinity()?!1:y.eqXToP(L)):(y=this.g.mulAdd(q,D.getPublic(),g),y.isInfinity()?!1:y.getX().umod(this.n).cmp(L)===0)},W.prototype.recoverPubKey=function(J,H,D,E){C((3&D)===D,"The recovery param is more than two bits"),H=new T(H,E);var L=this.n,M=new k(J),v=H.r,q=H.s,g=D&1,y=D>>1;if(v.cmp(this.curve.p.umod(this.curve.n))>=0&&y)throw new Error("Unable to find sencond key candinate");y?v=this.curve.pointFromX(v.add(this.curve.n),g):v=this.curve.pointFromX(v,g);var w=H.r.invm(L),f=L.sub(M).mul(w).umod(L),b=q.mul(w).umod(L);return this.g.mulAdd(f,v,b)},W.prototype.getKeyRecoveryParam=function(J,H,D,E){if(H=new T(H,E),H.recoveryParam!==null)return H.recoveryParam;for(var L=0;L<4;L++){var M;try{M=this.recoverPubKey(J,H,L)}catch{continue}if(M.eq(D))return L}throw new Error("Unable to find valid recovery factor")}}}),NY=S0({"node_modules/elliptic/lib/elliptic/eddsa/key.js"(N,_){var k=E$(),j=k.assert,F=k.parseBytes,z=k.cachedProperty;function X(C,P){this.eddsa=C,this._secret=F(P.secret),C.isPoint(P.pub)?this._pub=P.pub:this._pubBytes=F(P.pub)}X.fromPublic=function(C,P){return P instanceof X?P:new X(C,{pub:P})},X.fromSecret=function(C,P){return P instanceof X?P:new X(C,{secret:P})},X.prototype.secret=function(){return this._secret},z(X,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),z(X,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),z(X,"privBytes",function(){var C=this.eddsa,P=this.hash(),T=C.encodingLength-1,W=P.slice(0,C.encodingLength);return W[0]&=248,W[T]&=127,W[T]|=64,W}),z(X,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),z(X,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),z(X,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),X.prototype.sign=function(C){return j(this._secret,"KeyPair can only verify"),this.eddsa.sign(C,this)},X.prototype.verify=function(C,P){return this.eddsa.verify(C,P,this)},X.prototype.getSecret=function(C){return j(this._secret,"KeyPair is public only"),k.encode(this.secret(),C)},X.prototype.getPublic=function(C){return k.encode(this.pubBytes(),C)},_.exports=X}}),xY=S0({"node_modules/elliptic/lib/elliptic/eddsa/signature.js"(N,_){var k=D$(),j=E$(),F=j.assert,z=j.cachedProperty,X=j.parseBytes;function C(P,T){this.eddsa=P,typeof T!="object"&&(T=X(T)),Array.isArray(T)&&(T={R:T.slice(0,P.encodingLength),S:T.slice(P.encodingLength)}),F(T.R&&T.S,"Signature without R or S"),P.isPoint(T.R)&&(this._R=T.R),T.S instanceof k&&(this._S=T.S),this._Rencoded=Array.isArray(T.R)?T.R:T.Rencoded,this._Sencoded=Array.isArray(T.S)?T.S:T.Sencoded}z(C,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),z(C,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),z(C,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),z(C,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),C.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},C.prototype.toHex=function(){return j.encode(this.toBytes(),"hex").toUpperCase()},_.exports=C}}),BY=S0({"node_modules/elliptic/lib/elliptic/eddsa/index.js"(N,_){var k=d$(),j=b$(),F=E$(),z=F.assert,X=F.parseBytes,C=NY(),P=xY();function T(W){if(z(W==="ed25519","only tested with ed25519 so far"),!(this instanceof T))return new T(W);W=j[W].curve,this.curve=W,this.g=W.g,this.g.precompute(W.n.bitLength()+1),this.pointClass=W.point().constructor,this.encodingLength=Math.ceil(W.n.bitLength()/8),this.hash=k.sha512}_.exports=T,T.prototype.sign=function(W,J){W=X(W);var H=this.keyFromSecret(J),D=this.hashInt(H.messagePrefix(),W),E=this.g.mul(D),L=this.encodePoint(E),M=this.hashInt(L,H.pubBytes(),W).mul(H.priv()),v=D.add(M).umod(this.curve.n);return this.makeSignature({R:E,S:v,Rencoded:L})},T.prototype.verify=function(W,J,H){W=X(W),J=this.makeSignature(J);var D=this.keyFromPublic(H),E=this.hashInt(J.Rencoded(),D.pubBytes(),W),L=this.g.mul(J.S()),M=J.R().add(D.pub().mul(E));return M.eq(L)},T.prototype.hashInt=function(){for(var W=this.hash(),J=0;J0?$:Y},X.min=function($,Y){return $.cmp(Y)<0?$:Y},X.prototype._init=function($,Y,G){if(typeof $=="number")return this._initNumber($,Y,G);if(typeof $=="object")return this._initArray($,Y,G);Y==="hex"&&(Y=16),F(Y===(Y|0)&&Y>=2&&Y<=36),$=$.toString().replace(/\s+/g,"");var Z=0;$[0]==="-"&&(Z++,this.negative=1),Z<$.length&&(Y===16?this._parseHex($,Z,G):(this._parseBase($,Y,Z),G==="le"&&this._initArray(this.toArray(),Y,G)))},X.prototype._initNumber=function($,Y,G){$<0&&(this.negative=1,$=-$),$<67108864?(this.words=[$&67108863],this.length=1):$<4503599627370496?(this.words=[$&67108863,$/67108864&67108863],this.length=2):(F($<9007199254740992),this.words=[$&67108863,$/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Y,G)},X.prototype._initArray=function($,Y,G){if(F(typeof $.length=="number"),$.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil($.length/3),this.words=new Array(this.length);for(var Z=0;Z