>18&63]+t[x>>12&63]+t[x>>6&63]+t[63&x]);return g.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},3187:function(f,l){l.read=function(t,i,r,n,o){var a,u,p=8*o-n-1,c=(1<>1,d=-7,v=r?o-1:0,x=r?-1:1,g=t[i+v];for(v+=x,a=g&(1<<-d)-1,g>>=-d,d+=p;d>0;a=256*a+t[i+v],v+=x,d-=8);for(u=a&(1<<-d)-1,a>>=-d,d+=n;d>0;u=256*u+t[i+v],v+=x,d-=8);if(a===0)a=1-b;else{if(a===c)return u?NaN:1/0*(g?-1:1);u+=Math.pow(2,n),a-=b}return(g?-1:1)*u*Math.pow(2,a-n)},l.write=function(t,i,r,n,o,a){var u,p,c,b=8*a-o-1,d=(1<>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,m=n?1:-1,k=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(p=isNaN(i)?1:0,u=d):(u=Math.floor(Math.log(i)/Math.LN2),i*(c=Math.pow(2,-u))<1&&(u--,c*=2),(i+=u+v>=1?x/c:x*Math.pow(2,1-v))*c>=2&&(u++,c/=2),u+v>=d?(p=0,u=d):u+v>=1?(p=(i*c-1)*Math.pow(2,o),u+=v):(p=i*Math.pow(2,v-1)*Math.pow(2,o),u=0));o>=8;t[r+g]=255&p,g+=m,p/=256,o-=8);for(u=u<0;t[r+g]=255&u,g+=m,u/=256,b-=8);t[r+g-m]|=128*k}},1152:function(f,l,t){f.exports=function(u){var p=(u=u||{}).eye||[0,0,1],c=u.center||[0,0,0],b=u.up||[0,1,0],d=u.distanceLimits||[0,1/0],v=u.mode||"turntable",x=i(),g=r(),m=n();return x.setDistanceLimits(d[0],d[1]),x.lookAt(0,p,c,b),g.setDistanceLimits(d[0],d[1]),g.lookAt(0,p,c,b),m.setDistanceLimits(d[0],d[1]),m.lookAt(0,p,c,b),new o({turntable:x,orbit:g,matrix:m},v)};var i=t(3440),r=t(7774),n=t(9298);function o(u,p){this._controllerNames=Object.keys(u),this._controllerList=this._controllerNames.map(function(c){return u[c]}),this._mode=p,this._active=u[p],this._active||(this._mode="turntable",this._active=u.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var a=o.prototype;a.flush=function(u){for(var p=this._controllerList,c=0;c"u"?t(5346):WeakMap,r=t(5827),n=t(2944),o=new i;f.exports=function(a){var u=o.get(a),p=u&&(u._triangleBuffer.handle||u._triangleBuffer.buffer);if(!p||!a.isBuffer(p)){var c=r(a,new Float32Array([-1,-1,-1,4,4,-1]));(u=n(a,[{buffer:c,type:a.FLOAT,size:2}]))._triangleBuffer=c,o.set(a,u)}u.bind(),a.drawArrays(a.TRIANGLES,0,3),u.unbind()}},8008:function(f,l,t){var i=t(4930);f.exports=function(r,n,o){n=typeof n=="number"?n:1,o=o||": ";var a=r.split(/\r?\n/),u=String(a.length+n-1).length;return a.map(function(p,c){var b=c+n,d=String(b).length;return i(b,u-d)+o+p}).join(`
+`)}},2153:function(f,l,t){f.exports=function(n){var o=n.length;if(o===0)return[];if(o===1)return[0];for(var a=n[0].length,u=[n[0]],p=[0],c=1;c0?d=d.ushln(x):x<0&&(v=v.ushln(-x)),a(d,v)}},234:function(f,l,t){var i=t(3218);f.exports=function(r){return Array.isArray(r)&&r.length===2&&i(r[0])&&i(r[1])}},4275:function(f,l,t){var i=t(1928);f.exports=function(r){return r.cmp(new i(0))}},9958:function(f,l,t){var i=t(4275);f.exports=function(r){var n=r.length,o=r.words,a=0;if(n===1)a=o[0];else if(n===2)a=o[0]+67108864*o[1];else for(var u=0;u20?52:a+32}},3218:function(f,l,t){t(1928),f.exports=function(i){return i&&typeof i=="object"&&!!i.words}},5514:function(f,l,t){var i=t(1928),r=t(8362);f.exports=function(n){var o=r.exponent(n);return o<52?new i(n):new i(n*Math.pow(2,52-o)).ushln(o-52)}},8524:function(f,l,t){var i=t(5514),r=t(4275);f.exports=function(n,o){var a=r(n),u=r(o);if(a===0)return[i(0),i(1)];if(u===0)return[i(0),i(0)];u<0&&(n=n.neg(),o=o.neg());var p=n.gcd(o);return p.cmpn(1)?[n.div(p),o.div(p)]:[n,o]}},2813:function(f,l,t){var i=t(1928);f.exports=function(r){return new i(r)}},3962:function(f,l,t){var i=t(8524);f.exports=function(r,n){return i(r[0].mul(n[0]),r[1].mul(n[1]))}},4951:function(f,l,t){var i=t(4275);f.exports=function(r){return i(r[0])*i(r[1])}},4354:function(f,l,t){var i=t(8524);f.exports=function(r,n){return i(r[0].mul(n[1]).sub(r[1].mul(n[0])),r[1].mul(n[1]))}},7999:function(f,l,t){var i=t(9958),r=t(1112);f.exports=function(n){var o=n[0],a=n[1];if(o.cmpn(0)===0)return 0;var u=o.abs().divmod(a.abs()),p=u.div,c=i(p),b=u.mod,d=o.negative!==a.negative?-1:1;if(b.cmpn(0)===0)return d*c;if(c){var v=r(c)+4,x=i(b.ushln(v).divRound(a));return d*(c+x*Math.pow(2,-v))}var g=a.bitLength()-b.bitLength()+53;return x=i(b.ushln(g).divRound(a)),g<1023?d*x*Math.pow(2,-g):d*(x*=Math.pow(2,-1023))*Math.pow(2,1023-g)}},5070:function(f){function l(a,u,p,c,b){for(var d=b+1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)>=0?(d=v,b=v-1):c=v+1}return d}function t(a,u,p,c,b){for(var d=b+1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)>0?(d=v,b=v-1):c=v+1}return d}function i(a,u,p,c,b){for(var d=c-1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)<0?(d=v,c=v+1):b=v-1}return d}function r(a,u,p,c,b){for(var d=c-1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)<=0?(d=v,c=v+1):b=v-1}return d}function n(a,u,p,c,b){for(;c<=b;){var d=c+b>>>1,v=a[d],x=p!==void 0?p(v,u):v-u;if(x===0)return d;x<=0?c=d+1:b=d-1}return-1}function o(a,u,p,c,b,d){return typeof p=="function"?d(a,u,p,c===void 0?0:0|c,b===void 0?a.length-1:0|b):d(a,u,void 0,p===void 0?0:0|p,c===void 0?a.length-1:0|c)}f.exports={ge:function(a,u,p,c,b){return o(a,u,p,c,b,l)},gt:function(a,u,p,c,b){return o(a,u,p,c,b,t)},lt:function(a,u,p,c,b){return o(a,u,p,c,b,i)},le:function(a,u,p,c,b){return o(a,u,p,c,b,r)},eq:function(a,u,p,c,b){return o(a,u,p,c,b,n)}}},2288:function(f,l){function t(r){var n=32;return(r&=-r)&&n--,65535&r&&(n-=16),16711935&r&&(n-=8),252645135&r&&(n-=4),858993459&r&&(n-=2),1431655765&r&&(n-=1),n}l.INT_BITS=32,l.INT_MAX=2147483647,l.INT_MIN=-2147483648,l.sign=function(r){return(r>0)-(r<0)},l.abs=function(r){var n=r>>31;return(r^n)-n},l.min=function(r,n){return n^(r^n)&-(r65535)<<4,n|=o=((r>>>=n)>255)<<3,n|=o=((r>>>=o)>15)<<2,(n|=o=((r>>>=o)>3)<<1)|(r>>>=o)>>1},l.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},l.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},l.countTrailingZeros=t,l.nextPow2=function(r){return r+=r===0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},l.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},l.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);(function(r){for(var n=0;n<256;++n){var o=n,a=n,u=7;for(o>>>=1;o;o>>>=1)a<<=1,a|=1&o,--u;r[n]=a<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},l.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},l.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},l.interleave3=function(r,n,o){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<2},l.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},l.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},1928:function(f,l,t){(function(i,r){function n(B,G){if(!B)throw new Error(G||"Assertion failed")}function o(B,G){B.super_=G;var N=function(){};N.prototype=G.prototype,B.prototype=new N,B.prototype.constructor=B}function a(B,G,N){if(a.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&(G!=="le"&&G!=="be"||(N=G,G=10),this._init(B||0,G||10,N||"be"))}var u;typeof i=="object"?i.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:t(6601).Buffer}catch{}function p(B,G){var N=B.charCodeAt(G);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function c(B,G,N){var j=p(B,N);return N-1>=G&&(j|=p(B,N-1)<<4),j}function b(B,G,N,j){for(var V=0,H=Math.min(B.length,N),ee=G;ee=49?Q-49+10:Q>=17?Q-17+10:Q}return V}a.isBN=function(B){return B instanceof a||B!==null&&typeof B=="object"&&B.constructor.wordSize===a.wordSize&&Array.isArray(B.words)},a.max=function(B,G){return B.cmp(G)>0?B:G},a.min=function(B,G){return B.cmp(G)<0?B:G},a.prototype._init=function(B,G,N){if(typeof B=="number")return this._initNumber(B,G,N);if(typeof B=="object")return this._initArray(B,G,N);G==="hex"&&(G=16),n(G===(0|G)&&G>=2&&G<=36);var j=0;(B=B.toString().replace(/\s+/g,""))[0]==="-"&&(j++,this.negative=1),j=0;j-=3)H=B[j]|B[j-1]<<8|B[j-2]<<16,this.words[V]|=H<>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);else if(N==="le")for(j=0,V=0;j>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);return this.strip()},a.prototype._parseHex=function(B,G,N){this.length=Math.ceil((B.length-G)/6),this.words=new Array(this.length);for(var j=0;j=G;j-=2)V=c(B,G,j)<=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;else for(j=(B.length-G)%2==0?G+1:G;j=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;this.strip()},a.prototype._parseBase=function(B,G,N){this.words=[0],this.length=1;for(var j=0,V=1;V<=67108863;V*=G)j++;j--,V=V/G|0;for(var H=B.length-N,ee=H%j,Q=Math.min(H,H-ee)+N,X=0,Y=N;Y1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[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],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(B,G,N){N.negative=G.negative^B.negative;var j=B.length+G.length|0;N.length=j,j=j-1|0;var V=0|B.words[0],H=0|G.words[0],ee=V*H,Q=67108863&ee,X=ee/67108864|0;N.words[0]=Q;for(var Y=1;Y>>26,te=67108863&X,ae=Math.min(Y,G.length-1),oe=Math.max(0,Y-B.length+1);oe<=ae;oe++){var se=Y-oe|0;K+=(ee=(V=0|B.words[se])*(H=0|G.words[oe])+te)/67108864|0,te=67108863&ee}N.words[Y]=0|te,X=0|K}return X!==0?N.words[Y]=0|X:N.length--,N.strip()}a.prototype.toString=function(B,G){var N;if(G=0|G||1,(B=B||10)===16||B==="hex"){N="";for(var j=0,V=0,H=0;H>>24-j&16777215)!=0||H!==this.length-1?d[6-Q.length]+Q+N:Q+N,(j+=2)>=26&&(j-=26,H--)}for(V!==0&&(N=V.toString(16)+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(B===(0|B)&&B>=2&&B<=36){var X=v[B],Y=x[B];N="";var K=this.clone();for(K.negative=0;!K.isZero();){var te=K.modn(Y).toString(B);N=(K=K.idivn(Y)).isZero()?te+N:d[X-te.length]+te+N}for(this.isZero()&&(N="0"+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var B=this.words[0];return this.length===2?B+=67108864*this.words[1]:this.length===3&&this.words[2]===1?B+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-B:B},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(B,G){return n(u!==void 0),this.toArrayLike(u,B,G)},a.prototype.toArray=function(B,G){return this.toArrayLike(Array,B,G)},a.prototype.toArrayLike=function(B,G,N){var j=this.byteLength(),V=N||Math.max(1,j);n(j<=V,"byte array longer than desired length"),n(V>0,"Requested array length <= 0"),this.strip();var H,ee,Q=G==="le",X=new B(V),Y=this.clone();if(Q){for(ee=0;!Y.isZero();ee++)H=Y.andln(255),Y.iushrn(8),X[ee]=H;for(;ee=4096&&(N+=13,G>>>=13),G>=64&&(N+=7,G>>>=7),G>=8&&(N+=4,G>>>=4),G>=2&&(N+=2,G>>>=2),N+G},a.prototype._zeroBits=function(B){if(B===0)return 26;var G=B,N=0;return!(8191&G)&&(N+=13,G>>>=13),!(127&G)&&(N+=7,G>>>=7),!(15&G)&&(N+=4,G>>>=4),!(3&G)&&(N+=2,G>>>=2),!(1&G)&&N++,N},a.prototype.bitLength=function(){var B=this.words[this.length-1],G=this._countBits(B);return 26*(this.length-1)+G},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var B=0,G=0;GB.length?this.clone().ior(B):B.clone().ior(this)},a.prototype.uor=function(B){return this.length>B.length?this.clone().iuor(B):B.clone().iuor(this)},a.prototype.iuand=function(B){var G;G=this.length>B.length?B:this;for(var N=0;NB.length?this.clone().iand(B):B.clone().iand(this)},a.prototype.uand=function(B){return this.length>B.length?this.clone().iuand(B):B.clone().iuand(this)},a.prototype.iuxor=function(B){var G,N;this.length>B.length?(G=this,N=B):(G=B,N=this);for(var j=0;jB.length?this.clone().ixor(B):B.clone().ixor(this)},a.prototype.uxor=function(B){return this.length>B.length?this.clone().iuxor(B):B.clone().iuxor(this)},a.prototype.inotn=function(B){n(typeof B=="number"&&B>=0);var G=0|Math.ceil(B/26),N=B%26;this._expand(G),N>0&&G--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-N),this.strip()},a.prototype.notn=function(B){return this.clone().inotn(B)},a.prototype.setn=function(B,G){n(typeof B=="number"&&B>=0);var N=B/26|0,j=B%26;return this._expand(N+1),this.words[N]=G?this.words[N]|1<B.length?(N=this,j=B):(N=B,j=this);for(var V=0,H=0;H>>26;for(;V!==0&&H>>26;if(this.length=N.length,V!==0)this.words[this.length]=V,this.length++;else if(N!==this)for(;HB.length?this.clone().iadd(B):B.clone().iadd(this)},a.prototype.isub=function(B){if(B.negative!==0){B.negative=0;var G=this.iadd(B);return B.negative=1,G._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(B),this.negative=1,this._normSign();var N,j,V=this.cmp(B);if(V===0)return this.negative=0,this.length=1,this.words[0]=0,this;V>0?(N=this,j=B):(N=B,j=this);for(var H=0,ee=0;ee>26,this.words[ee]=67108863&G;for(;H!==0&&ee>26,this.words[ee]=67108863&G;if(H===0&&ee>>13,oe=0|ee[1],se=8191&oe,fe=oe>>>13,ye=0|ee[2],pe=8191&ye,de=ye>>>13,he=0|ee[3],xe=8191&he,Re=he>>>13,we=0|ee[4],Ae=8191&we,Me=we>>>13,Ce=0|ee[5],ne=8191&Ce,ue=Ce>>>13,me=0|ee[6],Te=8191&me,Ee=me>>>13,Ue=0|ee[7],De=8191&Ue,je=Ue>>>13,ge=0|ee[8],be=8191&ge,Se=ge>>>13,Ne=0|ee[9],Ye=8191&Ne,Ze=Ne>>>13,st=0|Q[0],ot=8191&st,ft=st>>>13,yt=0|Q[1],Et=8191&yt,Tt=yt>>>13,xt=0|Q[2],Dt=8191&xt,It=xt>>>13,Ft=0|Q[3],qt=8191&Ft,Nt=Ft>>>13,Je=0|Q[4],Ke=8191&Je,Ge=Je>>>13,nt=0|Q[5],ht=8191&nt,Oe=nt>>>13,Be=0|Q[6],Qe=8191&Be,ut=Be>>>13,pt=0|Q[7],bt=8191&pt,Lt=pt>>>13,Ct=0|Q[8],mt=8191&Ct,Ot=Ct>>>13,_t=0|Q[9],Pt=8191&_t,Bt=_t>>>13;N.negative=B.negative^G.negative,N.length=19;var Wt=(Y+(j=Math.imul(te,ot))|0)+((8191&(V=(V=Math.imul(te,ft))+Math.imul(ae,ot)|0))<<13)|0;Y=((H=Math.imul(ae,ft))+(V>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,j=Math.imul(se,ot),V=(V=Math.imul(se,ft))+Math.imul(fe,ot)|0,H=Math.imul(fe,ft);var Gt=(Y+(j=j+Math.imul(te,Et)|0)|0)+((8191&(V=(V=V+Math.imul(te,Tt)|0)+Math.imul(ae,Et)|0))<<13)|0;Y=((H=H+Math.imul(ae,Tt)|0)+(V>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,j=Math.imul(pe,ot),V=(V=Math.imul(pe,ft))+Math.imul(de,ot)|0,H=Math.imul(de,ft),j=j+Math.imul(se,Et)|0,V=(V=V+Math.imul(se,Tt)|0)+Math.imul(fe,Et)|0,H=H+Math.imul(fe,Tt)|0;var Xt=(Y+(j=j+Math.imul(te,Dt)|0)|0)+((8191&(V=(V=V+Math.imul(te,It)|0)+Math.imul(ae,Dt)|0))<<13)|0;Y=((H=H+Math.imul(ae,It)|0)+(V>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,j=Math.imul(xe,ot),V=(V=Math.imul(xe,ft))+Math.imul(Re,ot)|0,H=Math.imul(Re,ft),j=j+Math.imul(pe,Et)|0,V=(V=V+Math.imul(pe,Tt)|0)+Math.imul(de,Et)|0,H=H+Math.imul(de,Tt)|0,j=j+Math.imul(se,Dt)|0,V=(V=V+Math.imul(se,It)|0)+Math.imul(fe,Dt)|0,H=H+Math.imul(fe,It)|0;var Kt=(Y+(j=j+Math.imul(te,qt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Nt)|0)+Math.imul(ae,qt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Nt)|0)+(V>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,j=Math.imul(Ae,ot),V=(V=Math.imul(Ae,ft))+Math.imul(Me,ot)|0,H=Math.imul(Me,ft),j=j+Math.imul(xe,Et)|0,V=(V=V+Math.imul(xe,Tt)|0)+Math.imul(Re,Et)|0,H=H+Math.imul(Re,Tt)|0,j=j+Math.imul(pe,Dt)|0,V=(V=V+Math.imul(pe,It)|0)+Math.imul(de,Dt)|0,H=H+Math.imul(de,It)|0,j=j+Math.imul(se,qt)|0,V=(V=V+Math.imul(se,Nt)|0)+Math.imul(fe,qt)|0,H=H+Math.imul(fe,Nt)|0;var nn=(Y+(j=j+Math.imul(te,Ke)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ge)|0)+Math.imul(ae,Ke)|0))<<13)|0;Y=((H=H+Math.imul(ae,Ge)|0)+(V>>>13)|0)+(nn>>>26)|0,nn&=67108863,j=Math.imul(ne,ot),V=(V=Math.imul(ne,ft))+Math.imul(ue,ot)|0,H=Math.imul(ue,ft),j=j+Math.imul(Ae,Et)|0,V=(V=V+Math.imul(Ae,Tt)|0)+Math.imul(Me,Et)|0,H=H+Math.imul(Me,Tt)|0,j=j+Math.imul(xe,Dt)|0,V=(V=V+Math.imul(xe,It)|0)+Math.imul(Re,Dt)|0,H=H+Math.imul(Re,It)|0,j=j+Math.imul(pe,qt)|0,V=(V=V+Math.imul(pe,Nt)|0)+Math.imul(de,qt)|0,H=H+Math.imul(de,Nt)|0,j=j+Math.imul(se,Ke)|0,V=(V=V+Math.imul(se,Ge)|0)+Math.imul(fe,Ke)|0,H=H+Math.imul(fe,Ge)|0;var yn=(Y+(j=j+Math.imul(te,ht)|0)|0)+((8191&(V=(V=V+Math.imul(te,Oe)|0)+Math.imul(ae,ht)|0))<<13)|0;Y=((H=H+Math.imul(ae,Oe)|0)+(V>>>13)|0)+(yn>>>26)|0,yn&=67108863,j=Math.imul(Te,ot),V=(V=Math.imul(Te,ft))+Math.imul(Ee,ot)|0,H=Math.imul(Ee,ft),j=j+Math.imul(ne,Et)|0,V=(V=V+Math.imul(ne,Tt)|0)+Math.imul(ue,Et)|0,H=H+Math.imul(ue,Tt)|0,j=j+Math.imul(Ae,Dt)|0,V=(V=V+Math.imul(Ae,It)|0)+Math.imul(Me,Dt)|0,H=H+Math.imul(Me,It)|0,j=j+Math.imul(xe,qt)|0,V=(V=V+Math.imul(xe,Nt)|0)+Math.imul(Re,qt)|0,H=H+Math.imul(Re,Nt)|0,j=j+Math.imul(pe,Ke)|0,V=(V=V+Math.imul(pe,Ge)|0)+Math.imul(de,Ke)|0,H=H+Math.imul(de,Ge)|0,j=j+Math.imul(se,ht)|0,V=(V=V+Math.imul(se,Oe)|0)+Math.imul(fe,ht)|0,H=H+Math.imul(fe,Oe)|0;var ln=(Y+(j=j+Math.imul(te,Qe)|0)|0)+((8191&(V=(V=V+Math.imul(te,ut)|0)+Math.imul(ae,Qe)|0))<<13)|0;Y=((H=H+Math.imul(ae,ut)|0)+(V>>>13)|0)+(ln>>>26)|0,ln&=67108863,j=Math.imul(De,ot),V=(V=Math.imul(De,ft))+Math.imul(je,ot)|0,H=Math.imul(je,ft),j=j+Math.imul(Te,Et)|0,V=(V=V+Math.imul(Te,Tt)|0)+Math.imul(Ee,Et)|0,H=H+Math.imul(Ee,Tt)|0,j=j+Math.imul(ne,Dt)|0,V=(V=V+Math.imul(ne,It)|0)+Math.imul(ue,Dt)|0,H=H+Math.imul(ue,It)|0,j=j+Math.imul(Ae,qt)|0,V=(V=V+Math.imul(Ae,Nt)|0)+Math.imul(Me,qt)|0,H=H+Math.imul(Me,Nt)|0,j=j+Math.imul(xe,Ke)|0,V=(V=V+Math.imul(xe,Ge)|0)+Math.imul(Re,Ke)|0,H=H+Math.imul(Re,Ge)|0,j=j+Math.imul(pe,ht)|0,V=(V=V+Math.imul(pe,Oe)|0)+Math.imul(de,ht)|0,H=H+Math.imul(de,Oe)|0,j=j+Math.imul(se,Qe)|0,V=(V=V+Math.imul(se,ut)|0)+Math.imul(fe,Qe)|0,H=H+Math.imul(fe,ut)|0;var kn=(Y+(j=j+Math.imul(te,bt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Lt)|0)+Math.imul(ae,bt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Lt)|0)+(V>>>13)|0)+(kn>>>26)|0,kn&=67108863,j=Math.imul(be,ot),V=(V=Math.imul(be,ft))+Math.imul(Se,ot)|0,H=Math.imul(Se,ft),j=j+Math.imul(De,Et)|0,V=(V=V+Math.imul(De,Tt)|0)+Math.imul(je,Et)|0,H=H+Math.imul(je,Tt)|0,j=j+Math.imul(Te,Dt)|0,V=(V=V+Math.imul(Te,It)|0)+Math.imul(Ee,Dt)|0,H=H+Math.imul(Ee,It)|0,j=j+Math.imul(ne,qt)|0,V=(V=V+Math.imul(ne,Nt)|0)+Math.imul(ue,qt)|0,H=H+Math.imul(ue,Nt)|0,j=j+Math.imul(Ae,Ke)|0,V=(V=V+Math.imul(Ae,Ge)|0)+Math.imul(Me,Ke)|0,H=H+Math.imul(Me,Ge)|0,j=j+Math.imul(xe,ht)|0,V=(V=V+Math.imul(xe,Oe)|0)+Math.imul(Re,ht)|0,H=H+Math.imul(Re,Oe)|0,j=j+Math.imul(pe,Qe)|0,V=(V=V+Math.imul(pe,ut)|0)+Math.imul(de,Qe)|0,H=H+Math.imul(de,ut)|0,j=j+Math.imul(se,bt)|0,V=(V=V+Math.imul(se,Lt)|0)+Math.imul(fe,bt)|0,H=H+Math.imul(fe,Lt)|0;var Wn=(Y+(j=j+Math.imul(te,mt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ot)|0)+Math.imul(ae,mt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Ot)|0)+(V>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,j=Math.imul(Ye,ot),V=(V=Math.imul(Ye,ft))+Math.imul(Ze,ot)|0,H=Math.imul(Ze,ft),j=j+Math.imul(be,Et)|0,V=(V=V+Math.imul(be,Tt)|0)+Math.imul(Se,Et)|0,H=H+Math.imul(Se,Tt)|0,j=j+Math.imul(De,Dt)|0,V=(V=V+Math.imul(De,It)|0)+Math.imul(je,Dt)|0,H=H+Math.imul(je,It)|0,j=j+Math.imul(Te,qt)|0,V=(V=V+Math.imul(Te,Nt)|0)+Math.imul(Ee,qt)|0,H=H+Math.imul(Ee,Nt)|0,j=j+Math.imul(ne,Ke)|0,V=(V=V+Math.imul(ne,Ge)|0)+Math.imul(ue,Ke)|0,H=H+Math.imul(ue,Ge)|0,j=j+Math.imul(Ae,ht)|0,V=(V=V+Math.imul(Ae,Oe)|0)+Math.imul(Me,ht)|0,H=H+Math.imul(Me,Oe)|0,j=j+Math.imul(xe,Qe)|0,V=(V=V+Math.imul(xe,ut)|0)+Math.imul(Re,Qe)|0,H=H+Math.imul(Re,ut)|0,j=j+Math.imul(pe,bt)|0,V=(V=V+Math.imul(pe,Lt)|0)+Math.imul(de,bt)|0,H=H+Math.imul(de,Lt)|0,j=j+Math.imul(se,mt)|0,V=(V=V+Math.imul(se,Ot)|0)+Math.imul(fe,mt)|0,H=H+Math.imul(fe,Ot)|0;var wn=(Y+(j=j+Math.imul(te,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Bt)|0)+Math.imul(ae,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Bt)|0)+(V>>>13)|0)+(wn>>>26)|0,wn&=67108863,j=Math.imul(Ye,Et),V=(V=Math.imul(Ye,Tt))+Math.imul(Ze,Et)|0,H=Math.imul(Ze,Tt),j=j+Math.imul(be,Dt)|0,V=(V=V+Math.imul(be,It)|0)+Math.imul(Se,Dt)|0,H=H+Math.imul(Se,It)|0,j=j+Math.imul(De,qt)|0,V=(V=V+Math.imul(De,Nt)|0)+Math.imul(je,qt)|0,H=H+Math.imul(je,Nt)|0,j=j+Math.imul(Te,Ke)|0,V=(V=V+Math.imul(Te,Ge)|0)+Math.imul(Ee,Ke)|0,H=H+Math.imul(Ee,Ge)|0,j=j+Math.imul(ne,ht)|0,V=(V=V+Math.imul(ne,Oe)|0)+Math.imul(ue,ht)|0,H=H+Math.imul(ue,Oe)|0,j=j+Math.imul(Ae,Qe)|0,V=(V=V+Math.imul(Ae,ut)|0)+Math.imul(Me,Qe)|0,H=H+Math.imul(Me,ut)|0,j=j+Math.imul(xe,bt)|0,V=(V=V+Math.imul(xe,Lt)|0)+Math.imul(Re,bt)|0,H=H+Math.imul(Re,Lt)|0,j=j+Math.imul(pe,mt)|0,V=(V=V+Math.imul(pe,Ot)|0)+Math.imul(de,mt)|0,H=H+Math.imul(de,Ot)|0;var on=(Y+(j=j+Math.imul(se,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(se,Bt)|0)+Math.imul(fe,Pt)|0))<<13)|0;Y=((H=H+Math.imul(fe,Bt)|0)+(V>>>13)|0)+(on>>>26)|0,on&=67108863,j=Math.imul(Ye,Dt),V=(V=Math.imul(Ye,It))+Math.imul(Ze,Dt)|0,H=Math.imul(Ze,It),j=j+Math.imul(be,qt)|0,V=(V=V+Math.imul(be,Nt)|0)+Math.imul(Se,qt)|0,H=H+Math.imul(Se,Nt)|0,j=j+Math.imul(De,Ke)|0,V=(V=V+Math.imul(De,Ge)|0)+Math.imul(je,Ke)|0,H=H+Math.imul(je,Ge)|0,j=j+Math.imul(Te,ht)|0,V=(V=V+Math.imul(Te,Oe)|0)+Math.imul(Ee,ht)|0,H=H+Math.imul(Ee,Oe)|0,j=j+Math.imul(ne,Qe)|0,V=(V=V+Math.imul(ne,ut)|0)+Math.imul(ue,Qe)|0,H=H+Math.imul(ue,ut)|0,j=j+Math.imul(Ae,bt)|0,V=(V=V+Math.imul(Ae,Lt)|0)+Math.imul(Me,bt)|0,H=H+Math.imul(Me,Lt)|0,j=j+Math.imul(xe,mt)|0,V=(V=V+Math.imul(xe,Ot)|0)+Math.imul(Re,mt)|0,H=H+Math.imul(Re,Ot)|0;var _n=(Y+(j=j+Math.imul(pe,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(pe,Bt)|0)+Math.imul(de,Pt)|0))<<13)|0;Y=((H=H+Math.imul(de,Bt)|0)+(V>>>13)|0)+(_n>>>26)|0,_n&=67108863,j=Math.imul(Ye,qt),V=(V=Math.imul(Ye,Nt))+Math.imul(Ze,qt)|0,H=Math.imul(Ze,Nt),j=j+Math.imul(be,Ke)|0,V=(V=V+Math.imul(be,Ge)|0)+Math.imul(Se,Ke)|0,H=H+Math.imul(Se,Ge)|0,j=j+Math.imul(De,ht)|0,V=(V=V+Math.imul(De,Oe)|0)+Math.imul(je,ht)|0,H=H+Math.imul(je,Oe)|0,j=j+Math.imul(Te,Qe)|0,V=(V=V+Math.imul(Te,ut)|0)+Math.imul(Ee,Qe)|0,H=H+Math.imul(Ee,ut)|0,j=j+Math.imul(ne,bt)|0,V=(V=V+Math.imul(ne,Lt)|0)+Math.imul(ue,bt)|0,H=H+Math.imul(ue,Lt)|0,j=j+Math.imul(Ae,mt)|0,V=(V=V+Math.imul(Ae,Ot)|0)+Math.imul(Me,mt)|0,H=H+Math.imul(Me,Ot)|0;var fn=(Y+(j=j+Math.imul(xe,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(xe,Bt)|0)+Math.imul(Re,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Re,Bt)|0)+(V>>>13)|0)+(fn>>>26)|0,fn&=67108863,j=Math.imul(Ye,Ke),V=(V=Math.imul(Ye,Ge))+Math.imul(Ze,Ke)|0,H=Math.imul(Ze,Ge),j=j+Math.imul(be,ht)|0,V=(V=V+Math.imul(be,Oe)|0)+Math.imul(Se,ht)|0,H=H+Math.imul(Se,Oe)|0,j=j+Math.imul(De,Qe)|0,V=(V=V+Math.imul(De,ut)|0)+Math.imul(je,Qe)|0,H=H+Math.imul(je,ut)|0,j=j+Math.imul(Te,bt)|0,V=(V=V+Math.imul(Te,Lt)|0)+Math.imul(Ee,bt)|0,H=H+Math.imul(Ee,Lt)|0,j=j+Math.imul(ne,mt)|0,V=(V=V+Math.imul(ne,Ot)|0)+Math.imul(ue,mt)|0,H=H+Math.imul(ue,Ot)|0;var hn=(Y+(j=j+Math.imul(Ae,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(Ae,Bt)|0)+Math.imul(Me,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Me,Bt)|0)+(V>>>13)|0)+(hn>>>26)|0,hn&=67108863,j=Math.imul(Ye,ht),V=(V=Math.imul(Ye,Oe))+Math.imul(Ze,ht)|0,H=Math.imul(Ze,Oe),j=j+Math.imul(be,Qe)|0,V=(V=V+Math.imul(be,ut)|0)+Math.imul(Se,Qe)|0,H=H+Math.imul(Se,ut)|0,j=j+Math.imul(De,bt)|0,V=(V=V+Math.imul(De,Lt)|0)+Math.imul(je,bt)|0,H=H+Math.imul(je,Lt)|0,j=j+Math.imul(Te,mt)|0,V=(V=V+Math.imul(Te,Ot)|0)+Math.imul(Ee,mt)|0,H=H+Math.imul(Ee,Ot)|0;var In=(Y+(j=j+Math.imul(ne,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(ne,Bt)|0)+Math.imul(ue,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ue,Bt)|0)+(V>>>13)|0)+(In>>>26)|0,In&=67108863,j=Math.imul(Ye,Qe),V=(V=Math.imul(Ye,ut))+Math.imul(Ze,Qe)|0,H=Math.imul(Ze,ut),j=j+Math.imul(be,bt)|0,V=(V=V+Math.imul(be,Lt)|0)+Math.imul(Se,bt)|0,H=H+Math.imul(Se,Lt)|0,j=j+Math.imul(De,mt)|0,V=(V=V+Math.imul(De,Ot)|0)+Math.imul(je,mt)|0,H=H+Math.imul(je,Ot)|0;var Cn=(Y+(j=j+Math.imul(Te,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(Te,Bt)|0)+Math.imul(Ee,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Ee,Bt)|0)+(V>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,j=Math.imul(Ye,bt),V=(V=Math.imul(Ye,Lt))+Math.imul(Ze,bt)|0,H=Math.imul(Ze,Lt),j=j+Math.imul(be,mt)|0,V=(V=V+Math.imul(be,Ot)|0)+Math.imul(Se,mt)|0,H=H+Math.imul(Se,Ot)|0;var Nn=(Y+(j=j+Math.imul(De,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(De,Bt)|0)+Math.imul(je,Pt)|0))<<13)|0;Y=((H=H+Math.imul(je,Bt)|0)+(V>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,j=Math.imul(Ye,mt),V=(V=Math.imul(Ye,Ot))+Math.imul(Ze,mt)|0,H=Math.imul(Ze,Ot);var Hn=(Y+(j=j+Math.imul(be,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(be,Bt)|0)+Math.imul(Se,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Se,Bt)|0)+(V>>>13)|0)+(Hn>>>26)|0,Hn&=67108863;var qn=(Y+(j=Math.imul(Ye,Pt))|0)+((8191&(V=(V=Math.imul(Ye,Bt))+Math.imul(Ze,Pt)|0))<<13)|0;return Y=((H=Math.imul(Ze,Bt))+(V>>>13)|0)+(qn>>>26)|0,qn&=67108863,X[0]=Wt,X[1]=Gt,X[2]=Xt,X[3]=Kt,X[4]=nn,X[5]=yn,X[6]=ln,X[7]=kn,X[8]=Wn,X[9]=wn,X[10]=on,X[11]=_n,X[12]=fn,X[13]=hn,X[14]=In,X[15]=Cn,X[16]=Nn,X[17]=Hn,X[18]=qn,Y!==0&&(X[19]=Y,N.length++),N};function k(B,G,N){return new h().mulp(B,G,N)}function h(B,G){this.x=B,this.y=G}Math.imul||(m=g),a.prototype.mulTo=function(B,G){var N,j=this.length+B.length;return N=this.length===10&&B.length===10?m(this,B,G):j<63?g(this,B,G):j<1024?function(V,H,ee){ee.negative=H.negative^V.negative,ee.length=V.length+H.length;for(var Q=0,X=0,Y=0;Y>>26)|0)>>>26,K&=67108863}ee.words[Y]=te,Q=K,K=X}return Q!==0?ee.words[Y]=Q:ee.length--,ee.strip()}(this,B,G):k(this,B,G),N},h.prototype.makeRBT=function(B){for(var G=new Array(B),N=a.prototype._countBits(B)-1,j=0;j>=1;return j},h.prototype.permute=function(B,G,N,j,V,H){for(var ee=0;ee>>=1)V++;return 1<>>=13,N[2*H+1]=8191&V,V>>>=13;for(H=2*G;H>=26,G+=j/67108864|0,G+=V>>>26,this.words[N]=67108863&V}return G!==0&&(this.words[N]=G,this.length++),this},a.prototype.muln=function(B){return this.clone().imuln(B)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(B){var G=function(H){for(var ee=new Array(H.bitLength()),Q=0;Q>>Y}return ee}(B);if(G.length===0)return new a(1);for(var N=this,j=0;j=0);var G,N=B%26,j=(B-N)/26,V=67108863>>>26-N<<26-N;if(N!==0){var H=0;for(G=0;G>>26-N}H&&(this.words[G]=H,this.length++)}if(j!==0){for(G=this.length-1;G>=0;G--)this.words[G+j]=this.words[G];for(G=0;G=0),j=G?(G-G%26)/26:0;var V=B%26,H=Math.min((B-V)/26,this.length),ee=67108863^67108863>>>V<H)for(this.length-=H,X=0;X=0&&(Y!==0||X>=j);X--){var K=0|this.words[X];this.words[X]=Y<<26-V|K>>>V,Y=K&ee}return Q&&Y!==0&&(Q.words[Q.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(B,G,N){return n(this.negative===0),this.iushrn(B,G,N)},a.prototype.shln=function(B){return this.clone().ishln(B)},a.prototype.ushln=function(B){return this.clone().iushln(B)},a.prototype.shrn=function(B){return this.clone().ishrn(B)},a.prototype.ushrn=function(B){return this.clone().iushrn(B)},a.prototype.testn=function(B){n(typeof B=="number"&&B>=0);var G=B%26,N=(B-G)/26,j=1<=0);var G=B%26,N=(B-G)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(G!==0&&N++,this.length=Math.min(N,this.length),G!==0){var j=67108863^67108863>>>G<=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},a.prototype.isubn=function(B){if(n(typeof B=="number"),n(B<67108864),B<0)return this.iaddn(-B);if(this.negative!==0)return this.negative=0,this.iaddn(B),this.negative=1,this;if(this.words[0]-=B,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G>26)-(Q/67108864|0),this.words[j+N]=67108863&V}for(;j>26,this.words[j+N]=67108863&V;if(ee===0)return this.strip();for(n(ee===-1),ee=0,j=0;j>26,this.words[j]=67108863&V;return this.negative=1,this.strip()},a.prototype._wordDiv=function(B,G){var N=(this.length,B.length),j=this.clone(),V=B,H=0|V.words[V.length-1];(N=26-this._countBits(H))!=0&&(V=V.ushln(N),j.iushln(N),H=0|V.words[V.length-1]);var ee,Q=j.length-V.length;if(G!=="mod"){(ee=new a(null)).length=Q+1,ee.words=new Array(ee.length);for(var X=0;X=0;K--){var te=67108864*(0|j.words[V.length+K])+(0|j.words[V.length+K-1]);for(te=Math.min(te/H|0,67108863),j._ishlnsubmul(V,te,K);j.negative!==0;)te--,j.negative=0,j._ishlnsubmul(V,1,K),j.isZero()||(j.negative^=1);ee&&(ee.words[K]=te)}return ee&&ee.strip(),j.strip(),G!=="div"&&N!==0&&j.iushrn(N),{div:ee||null,mod:j}},a.prototype.divmod=function(B,G,N){return n(!B.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:this.negative!==0&&B.negative===0?(H=this.neg().divmod(B,G),G!=="mod"&&(j=H.div.neg()),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.iadd(B)),{div:j,mod:V}):this.negative===0&&B.negative!==0?(H=this.divmod(B.neg(),G),G!=="mod"&&(j=H.div.neg()),{div:j,mod:H.mod}):this.negative&B.negative?(H=this.neg().divmod(B.neg(),G),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.isub(B)),{div:H.div,mod:V}):B.length>this.length||this.cmp(B)<0?{div:new a(0),mod:this}:B.length===1?G==="div"?{div:this.divn(B.words[0]),mod:null}:G==="mod"?{div:null,mod:new a(this.modn(B.words[0]))}:{div:this.divn(B.words[0]),mod:new a(this.modn(B.words[0]))}:this._wordDiv(B,G);var j,V,H},a.prototype.div=function(B){return this.divmod(B,"div",!1).div},a.prototype.mod=function(B){return this.divmod(B,"mod",!1).mod},a.prototype.umod=function(B){return this.divmod(B,"mod",!0).mod},a.prototype.divRound=function(B){var G=this.divmod(B);if(G.mod.isZero())return G.div;var N=G.div.negative!==0?G.mod.isub(B):G.mod,j=B.ushrn(1),V=B.andln(1),H=N.cmp(j);return H<0||V===1&&H===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},a.prototype.modn=function(B){n(B<=67108863);for(var G=67108864%B,N=0,j=this.length-1;j>=0;j--)N=(G*N+(0|this.words[j]))%B;return N},a.prototype.idivn=function(B){n(B<=67108863);for(var G=0,N=this.length-1;N>=0;N--){var j=(0|this.words[N])+67108864*G;this.words[N]=j/B|0,G=j%B}return this.strip()},a.prototype.divn=function(B){return this.clone().idivn(B)},a.prototype.egcd=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j=new a(1),V=new a(0),H=new a(0),ee=new a(1),Q=0;G.isEven()&&N.isEven();)G.iushrn(1),N.iushrn(1),++Q;for(var X=N.clone(),Y=G.clone();!G.isZero();){for(var K=0,te=1;!(G.words[0]&te)&&K<26;++K,te<<=1);if(K>0)for(G.iushrn(K);K-- >0;)(j.isOdd()||V.isOdd())&&(j.iadd(X),V.isub(Y)),j.iushrn(1),V.iushrn(1);for(var ae=0,oe=1;!(N.words[0]&oe)&&ae<26;++ae,oe<<=1);if(ae>0)for(N.iushrn(ae);ae-- >0;)(H.isOdd()||ee.isOdd())&&(H.iadd(X),ee.isub(Y)),H.iushrn(1),ee.iushrn(1);G.cmp(N)>=0?(G.isub(N),j.isub(H),V.isub(ee)):(N.isub(G),H.isub(j),ee.isub(V))}return{a:H,b:ee,gcd:N.iushln(Q)}},a.prototype._invmp=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j,V=new a(1),H=new a(0),ee=N.clone();G.cmpn(1)>0&&N.cmpn(1)>0;){for(var Q=0,X=1;!(G.words[0]&X)&&Q<26;++Q,X<<=1);if(Q>0)for(G.iushrn(Q);Q-- >0;)V.isOdd()&&V.iadd(ee),V.iushrn(1);for(var Y=0,K=1;!(N.words[0]&K)&&Y<26;++Y,K<<=1);if(Y>0)for(N.iushrn(Y);Y-- >0;)H.isOdd()&&H.iadd(ee),H.iushrn(1);G.cmp(N)>=0?(G.isub(N),V.isub(H)):(N.isub(G),H.isub(V))}return(j=G.cmpn(1)===0?V:H).cmpn(0)<0&&j.iadd(B),j},a.prototype.gcd=function(B){if(this.isZero())return B.abs();if(B.isZero())return this.abs();var G=this.clone(),N=B.clone();G.negative=0,N.negative=0;for(var j=0;G.isEven()&&N.isEven();j++)G.iushrn(1),N.iushrn(1);for(;;){for(;G.isEven();)G.iushrn(1);for(;N.isEven();)N.iushrn(1);var V=G.cmp(N);if(V<0){var H=G;G=N,N=H}else if(V===0||N.cmpn(1)===0)break;G.isub(N)}return N.iushln(j)},a.prototype.invm=function(B){return this.egcd(B).a.umod(B)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(B){return this.words[0]&B},a.prototype.bincn=function(B){n(typeof B=="number");var G=B%26,N=(B-G)/26,j=1<>>26,ee&=67108863,this.words[H]=ee}return V!==0&&(this.words[H]=V,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(B){var G,N=B<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;if(this.strip(),this.length>1)G=1;else{N&&(B=-B),n(B<=67108863,"Number is too big");var j=0|this.words[0];G=j===B?0:jB.length)return 1;if(this.length=0;N--){var j=0|this.words[N],V=0|B.words[N];if(j!==V){jV&&(G=1);break}}return G},a.prototype.gtn=function(B){return this.cmpn(B)===1},a.prototype.gt=function(B){return this.cmp(B)===1},a.prototype.gten=function(B){return this.cmpn(B)>=0},a.prototype.gte=function(B){return this.cmp(B)>=0},a.prototype.ltn=function(B){return this.cmpn(B)===-1},a.prototype.lt=function(B){return this.cmp(B)===-1},a.prototype.lten=function(B){return this.cmpn(B)<=0},a.prototype.lte=function(B){return this.cmp(B)<=0},a.prototype.eqn=function(B){return this.cmpn(B)===0},a.prototype.eq=function(B){return this.cmp(B)===0},a.red=function(B){return new R(B)},a.prototype.toRed=function(B){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),B.convertTo(this)._forceRed(B)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(B){return this.red=B,this},a.prototype.forceRed=function(B){return n(!this.red,"Already a number in reduction context"),this._forceRed(B)},a.prototype.redAdd=function(B){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,B)},a.prototype.redIAdd=function(B){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,B)},a.prototype.redSub=function(B){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,B)},a.prototype.redISub=function(B){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,B)},a.prototype.redShl=function(B){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,B)},a.prototype.redMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.mul(this,B)},a.prototype.redIMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.imul(this,B)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(B){return n(this.red&&!B.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,B)};var M={k256:null,p224:null,p192:null,p25519:null};function A(B,G){this.name=B,this.p=new a(G,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function C(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function O(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(B){if(typeof B=="string"){var G=a._prime(B);this.m=G.p,this.prime=G}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}function U(B){R.call(this,B),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var B=new a(null);return B.words=new Array(Math.ceil(this.n/13)),B},A.prototype.ireduce=function(B){var G,N=B;do this.split(N,this.tmp),G=(N=(N=this.imulK(N)).iadd(this.tmp)).bitLength();while(G>this.n);var j=G0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},A.prototype.split=function(B,G){B.iushrn(this.n,0,G)},A.prototype.imulK=function(B){return B.imul(this.k)},o(C,A),C.prototype.split=function(B,G){for(var N=4194303,j=Math.min(B.length,9),V=0;V>>22,H=ee}H>>>=22,B.words[V-10]=H,H===0&&B.length>10?B.length-=10:B.length-=9},C.prototype.imulK=function(B){B.words[B.length]=0,B.words[B.length+1]=0,B.length+=2;for(var G=0,N=0;N>>=26,B.words[N]=V,G=j}return G!==0&&(B.words[B.length++]=G),B},a._prime=function(B){if(M[B])return M[B];var G;if(B==="k256")G=new C;else if(B==="p224")G=new L;else if(B==="p192")G=new O;else{if(B!=="p25519")throw new Error("Unknown prime "+B);G=new I}return M[B]=G,G},R.prototype._verify1=function(B){n(B.negative===0,"red works only with positives"),n(B.red,"red works only with red numbers")},R.prototype._verify2=function(B,G){n((B.negative|G.negative)==0,"red works only with positives"),n(B.red&&B.red===G.red,"red works only with red numbers")},R.prototype.imod=function(B){return this.prime?this.prime.ireduce(B)._forceRed(this):B.umod(this.m)._forceRed(this)},R.prototype.neg=function(B){return B.isZero()?B.clone():this.m.sub(B)._forceRed(this)},R.prototype.add=function(B,G){this._verify2(B,G);var N=B.add(G);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},R.prototype.iadd=function(B,G){this._verify2(B,G);var N=B.iadd(G);return N.cmp(this.m)>=0&&N.isub(this.m),N},R.prototype.sub=function(B,G){this._verify2(B,G);var N=B.sub(G);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},R.prototype.isub=function(B,G){this._verify2(B,G);var N=B.isub(G);return N.cmpn(0)<0&&N.iadd(this.m),N},R.prototype.shl=function(B,G){return this._verify1(B),this.imod(B.ushln(G))},R.prototype.imul=function(B,G){return this._verify2(B,G),this.imod(B.imul(G))},R.prototype.mul=function(B,G){return this._verify2(B,G),this.imod(B.mul(G))},R.prototype.isqr=function(B){return this.imul(B,B.clone())},R.prototype.sqr=function(B){return this.mul(B,B)},R.prototype.sqrt=function(B){if(B.isZero())return B.clone();var G=this.m.andln(3);if(n(G%2==1),G===3){var N=this.m.add(new a(1)).iushrn(2);return this.pow(B,N)}for(var j=this.m.subn(1),V=0;!j.isZero()&&j.andln(1)===0;)V++,j.iushrn(1);n(!j.isZero());var H=new a(1).toRed(this),ee=H.redNeg(),Q=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new a(2*X*X).toRed(this);this.pow(X,Q).cmp(ee)!==0;)X.redIAdd(ee);for(var Y=this.pow(X,j),K=this.pow(B,j.addn(1).iushrn(1)),te=this.pow(B,j),ae=V;te.cmp(H)!==0;){for(var oe=te,se=0;oe.cmp(H)!==0;se++)oe=oe.redSqr();n(se=0;j--){for(var X=G.words[j],Y=Q-1;Y>=0;Y--){var K=X>>Y&1;V!==N[0]&&(V=this.sqr(V)),K!==0||H!==0?(H<<=1,H|=K,(++ee==4||j===0&&Y===0)&&(V=this.mul(V,N[H]),ee=0,H=0)):ee=0}Q=26}return V},R.prototype.convertTo=function(B){var G=B.umod(this.m);return G===B?G.clone():G},R.prototype.convertFrom=function(B){var G=B.clone();return G.red=null,G},a.mont=function(B){return new U(B)},o(U,R),U.prototype.convertTo=function(B){return this.imod(B.ushln(this.shift))},U.prototype.convertFrom=function(B){var G=this.imod(B.mul(this.rinv));return G.red=null,G},U.prototype.imul=function(B,G){if(B.isZero()||G.isZero())return B.words[0]=0,B.length=1,B;var N=B.imul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.mul=function(B,G){if(B.isZero()||G.isZero())return new a(0)._forceRed(this);var N=B.mul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.invm=function(B){return this.imod(B._invmp(this.m).mul(this.r2))._forceRed(this)}})(f=t.nmd(f),this)},2692:function(f){f.exports=function(l){var t,i,r,n=l.length,o=0;for(t=0;t>>1;if(!(M<=0)){var A,C=r.mallocDouble(2*M*k),L=r.mallocInt32(k);if((k=u(v,M,C,L))>0){if(M===1&&m)n.init(k),A=n.sweepComplete(M,g,0,k,C,L,0,k,C,L);else{var O=r.mallocDouble(2*M*h),I=r.mallocInt32(h);(h=u(x,M,O,I))>0&&(n.init(k+h),A=M===1?n.sweepBipartite(M,g,0,k,C,L,0,h,O,I):o(M,g,m,k,C,L,h,O,I),r.free(O),r.free(I))}r.free(C),r.free(L)}return A}}}function c(v,x){i.push([v,x])}function b(v){return i=[],p(v,v,c,!0),i}function d(v,x){return i=[],p(v,x,c,!1),i}},7333:function(f,l){function t(i){return i?function(r,n,o,a,u,p,c,b,d,v,x){return u-a>d-b?function(g,m,k,h,M,A,C,L,O,I,R){for(var U=2*g,B=h,G=U*h;Bv-d?a?function(m,k,h,M,A,C,L,O,I,R,U){for(var B=2*m,G=M,N=B*M;G0;){var Q=6*(H-=1),X=k[Q],Y=k[Q+1],K=k[Q+2],te=k[Q+3],ae=k[Q+4],oe=k[Q+5],se=2*H,fe=h[se],ye=h[se+1],pe=1&oe,de=!!(16&oe),he=U,xe=B,Re=N,we=j;if(pe&&(he=N,xe=j,Re=U,we=B),!(2&oe&&(K=v(L,X,Y,K,he,xe,ye),Y>=K)||4&oe&&(Y=x(L,X,Y,K,he,xe,fe))>=K)){var Ae=K-Y,Me=ae-te;if(de){if(L*Ae*(Ae+Me)<4194304){if((V=u.scanComplete(L,X,O,Y,K,he,xe,te,ae,Re,we))!==void 0)return V;continue}}else{if(L*Math.min(Ae,Me)<128){if((V=o(L,X,O,pe,Y,K,he,xe,te,ae,Re,we))!==void 0)return V;continue}if(L*Ae*Me<4194304){if((V=u.scanBipartite(L,X,O,pe,Y,K,he,xe,te,ae,Re,we))!==void 0)return V;continue}}var Ce=b(L,X,Y,K,he,xe,fe,ye);if(Y=p0)&&!(p1>=hi)"),d=c("lo===p0"),v=c("lo>>1,x=2*n,g=v,m=p[x*v+o];b=C?(g=A,m=C):M>=O?(g=h,m=M):(g=L,m=O):C>=O?(g=A,m=C):O>=M?(g=h,m=M):(g=L,m=O);for(var I=x*(d-1),R=x*g,U=0;Ua&&p[m+o]>x;--g,m-=b){for(var k=m,h=m+b,M=0;Mx;++x,c+=p)if(o[c+v]===u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"lox;++x,c+=p)if(o[c+v]g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"lo<=p0":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=t+i,x=r;n>x;++x,c+=p)if(o[c+v]<=u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"hi<=p0":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=t+i,x=r;n>x;++x,c+=p)if(o[c+v]<=u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"log;++g,c+=p){var m=o[c+v],k=o[c+x];if(mh;++h){var M=o[c+h];o[c+h]=o[b],o[b++]=M}var A=a[g];a[g]=a[d],a[d++]=A}}return d},"lo<=p0&&p0<=hi":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=i,x=t+i,g=r;n>g;++g,c+=p){var m=o[c+v],k=o[c+x];if(m<=u&&u<=k)if(d===g)d+=1,b+=p;else{for(var h=0;p>h;++h){var M=o[c+h];o[c+h]=o[b],o[b++]=M}var A=a[g];a[g]=a[d],a[d++]=A}}return d},"!(lo>=p0)&&!(p1>=hi)":function(t,i,r,n,o,a,u,p){for(var c=2*t,b=c*r,d=b,v=r,x=i,g=t+i,m=r;n>m;++m,b+=c){var k=o[b+x],h=o[b+g];if(!(k>=u||p>=h))if(v===m)v+=1,d+=c;else{for(var M=0;c>M;++M){var A=o[b+M];o[b+M]=o[d],o[d++]=A}var C=a[m];a[m]=a[v],a[v++]=C}}return v}}},309:function(f){function l(p,c,b){for(var d=2*(p+1),v=p+1;v<=c;++v){for(var x=b[d++],g=b[d++],m=v,k=d-2;m-- >p;){var h=b[k-2],M=b[k-1];if(hb[c+1])}function a(p,c,b,d){var v=d[p*=2];return v>1,m=g-d,k=g+d,h=v,M=m,A=g,C=k,L=x,O=p+1,I=c-1,R=0;o(h,M,b)&&(R=h,h=M,M=R),o(C,L,b)&&(R=C,C=L,L=R),o(h,A,b)&&(R=h,h=A,A=R),o(M,A,b)&&(R=M,M=A,A=R),o(h,C,b)&&(R=h,h=C,C=R),o(A,C,b)&&(R=A,A=C,C=R),o(M,L,b)&&(R=M,M=L,L=R),o(M,A,b)&&(R=M,M=A,A=R),o(C,L,b)&&(R=C,C=L,L=R);for(var U=b[2*M],B=b[2*M+1],G=b[2*C],N=b[2*C+1],j=2*h,V=2*A,H=2*L,ee=2*v,Q=2*g,X=2*x,Y=0;Y<2;++Y){var K=b[j+Y],te=b[V+Y],ae=b[H+Y];b[ee+Y]=K,b[Q+Y]=te,b[X+Y]=ae}i(m,p,b),i(k,c,b);for(var oe=O;oe<=I;++oe)if(a(oe,U,B,b))oe!==O&&t(oe,O,b),++O;else if(!a(oe,G,N,b))for(;;){if(a(I,G,N,b)){a(I,U,B,b)?(r(oe,O,I,b),++O,--I):(t(oe,I,b),--I);break}if(--I>>1;n(x,X);var Y=0,K=0;for(V=0;V=o)g(c,b,K--,te=te-o|0);else if(te>=0)g(u,p,Y--,te);else if(te<=-268435456){te=-te-o|0;for(var ae=0;ae>>1;n(x,X);var Y=0,K=0,te=0;for(V=0;V>1==x[2*V+3]>>1&&(oe=2,V+=1),ae<0){for(var se=-(ae>>1)-1,fe=0;fe>1)-1,oe===0?g(u,p,Y--,se):oe===1?g(c,b,K--,se):oe===2&&g(d,v,te--,se)}},scanBipartite:function(k,h,M,A,C,L,O,I,R,U,B,G){var N=0,j=2*k,V=h,H=h+k,ee=1,Q=1;A?Q=o:ee=o;for(var X=C;X>>1;n(x,ae);var oe=0;for(X=0;X=o?(fe=!A,Y-=o):(fe=!!A,Y-=1),fe)m(u,p,oe++,Y);else{var ye=G[Y],pe=j*Y,de=B[pe+h+1],he=B[pe+h+1+k];e:for(var xe=0;xe>>1;n(x,Y);var K=0;for(H=0;H=o)u[K++]=ee-o;else{var ae=B[ee-=1],oe=N*ee,se=U[oe+h+1],fe=U[oe+h+1+k];e:for(var ye=0;ye=0;--ye)if(u[ye]===ee){for(xe=ye+1;xe0;){for(var m=a.pop(),k=(v=-1,x=-1,b=p[c=a.pop()],1);k=0||(o.flip(c,m),r(n,o,a,v,c,x),r(n,o,a,c,x,v),r(n,o,a,x,m,v),r(n,o,a,m,v,x))}}},7098:function(f,l,t){var i,r=t(5070);function n(a,u,p,c,b,d,v){this.cells=a,this.neighbor=u,this.flags=c,this.constraint=p,this.active=b,this.next=d,this.boundary=v}function o(a,u){return a[0]-u[0]||a[1]-u[1]||a[2]-u[2]}f.exports=function(a,u,p){var c=function(O,I){for(var R=O.cells(),U=R.length,B=0;B0||v.length>0;){for(;d.length>0;){var h=d.pop();if(x[h]!==-b){x[h]=b,g[h];for(var M=0;M<3;++M){var A=k[3*h+M];A>=0&&x[A]===0&&(m[3*h+M]?v.push(A):(d.push(A),x[A]=b))}}}var C=v;v=d,d=C,v.length=0,b=-b}var L=function(O,I,R){for(var U=0,B=0;B1&&r(g[L[O-2]],g[L[O-1]],m)>0;)v.push([L[O-1],L[O-2],k]),O-=1;L.length=O,L.push(k);var I=C.upperIds;for(O=I.length;O>1&&r(g[I[O-2]],g[I[O-1]],m)<0;)v.push([I[O-2],I[O-1],k]),O-=1;I.length=O,I.push(k)}}function c(v,x){var g;return(g=v.a[0]C[0]&&k.push(new o(C,A,2,h),new o(A,C,1,h))}k.sort(a);for(var L=k[0].a[0]-(1+Math.abs(k[0].a[0]))*Math.pow(2,-52),O=[new n([L,1],[L,0],-1,[],[])],I=[],R=(h=0,k.length);h