UNPKG

@frames.js/debugger

Version:

Debug your Frames.js applications

1 lines 304 kB
exports.id=4216,exports.ids=[4216],exports.modules={95124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(82361);function i(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout(()=>{throw e})}}class n extends s.EventEmitter{emit(e,...t){let r="error"===e,s=this._events;if(void 0!==s)r=r&&void 0===s.error;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;let r=Error(`Unhandled error.${e?` (${e.message})`:""}`);throw r.context=e,r}let n=s[e];if(void 0===n)return!1;if("function"==typeof n)i(n,this,t);else{let e=n.length,r=function(e){let t=e.length,r=Array(t);for(let s=0;s<t;s+=1)r[s]=e[s];return r}(n);for(let s=0;s<e;s+=1)i(r[s],this,t)}return!0}}t.default=n},728:function(e,t,r){!function(e,t){"use strict";function s(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{h="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(14300).Buffer}catch(e){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void s(!1,"Invalid character in "+e)}function a(e,t,r){var s=o(e,r);return r-1>=t&&(s|=o(e,r-1)<<4),s}function l(e,t,r,i){for(var n=0,o=0,a=Math.min(e.length,r),l=t;l<a;l++){var u=e.charCodeAt(l)-48;n*=i,o=u>=49?u-49+10:u>=17?u-17+10:u,s(u>=0&&o<i,"Invalid character"),n+=o}return n}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return 0>e.cmp(t)?e:t},n.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),s(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},n.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(s(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},n.prototype._initArray=function(e,t,r){if(s("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,n,o=0;o<this.length;o++)this.words[o]=0;var a=0;if("be"===r)for(o=e.length-1,i=0;o>=0;o-=3)n=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=n<<a&67108863,this.words[i+1]=n>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===r)for(o=0,i=0;o<e.length;o+=3)n=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=n<<a&67108863,this.words[i+1]=n>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var s,i=0;i<this.length;i++)this.words[i]=0;var n=0,o=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)s=a(e,t,i)<<n,this.words[o]|=67108863&s,n>=18?(n-=18,o+=1,this.words[o]|=s>>>26):n+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)s=a(e,t,i)<<n,this.words[o]|=67108863&s,n>=18?(n-=18,o+=1,this.words[o]|=s>>>26):n+=8;this._strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var s=0,i=1;i<=67108863;i*=t)s++;s--,i=i/t|0;for(var n=e.length-r,o=n%s,a=Math.min(n,n-o)+r,u=0,c=r;c<a;c+=s)u=l(e,c,c+s,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var h=1;for(u=l(e,c,e.length,t),c=0;c<o;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},n.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype._move=function(e){u(e,this)},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){n.prototype.inspect=c}else n.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h,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"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,r){r.negative=t.negative^e.negative;var s=e.length+t.length|0;r.length=s,s=s-1|0;var i=0|e.words[0],n=0|t.words[0],o=i*n,a=67108863&o,l=o/67108864|0;r.words[0]=a;for(var u=1;u<s;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=d;p++){var f=u-p|0;c+=(o=(i=0|e.words[f])*(n=0|t.words[p])+h)/67108864|0,h=67108863&o}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}n.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,n=0,o=0;o<this.length;o++){var a=this.words[o],l=((a<<i|n)&16777215).toString(16);n=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),r=0!==n||o!==this.length-1?d[6-l.length]+l+r:l+r}for(0!==n&&(r=n.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],c=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(c).toString(e);r=(h=h.idivn(c)).isZero()?m+r:d[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}s(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16,2)},h&&(n.prototype.toBuffer=function(e,t){return this.toArrayLike(h,e,t)}),n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),n=r||Math.max(1,i);s(i<=n,"byte array longer than desired length"),s(n>0,"Requested array length <= 0");var o=e.allocUnsafe?e.allocUnsafe(n):new e(n);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,i),o},n.prototype._toArrayLikeLE=function(e,t){for(var r=0,s=0,i=0,n=0;i<this.length;i++){var o=this.words[i]<<n|s;e[r++]=255&o,r<e.length&&(e[r++]=o>>8&255),r<e.length&&(e[r++]=o>>16&255),6===n?(r<e.length&&(e[r++]=o>>24&255),s=0,n=0):(s=o>>>24,n+=2)}if(r<e.length)for(e[r++]=s;r<e.length;)e[r++]=0},n.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,s=0,i=0,n=0;i<this.length;i++){var o=this.words[i]<<n|s;e[r--]=255&o,r>=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===n?(r>=0&&(e[r--]=o>>24&255),s=0,n=0):(s=o>>>24,n+=2)}if(r>=0)for(e[r--]=s;r>=0;)e[r--]=0},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},n.prototype.ior=function(e){return s((this.negative|e.negative)==0),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},n.prototype.iand=function(e){return s((this.negative|e.negative)==0),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,s=0;s<r.length;s++)this.words[s]=t.words[s]^r.words[s];if(this!==t)for(;s<t.length;s++)this.words[s]=t.words[s];return this.length=t.length,this._strip()},n.prototype.ixor=function(e){return s((this.negative|e.negative)==0),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){s("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){s("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},n.prototype.iadd=function(e){if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,s=e):(r=e,s=this);for(var t,r,s,i=0,n=0;n<s.length;n++)t=(0|r.words[n])+(0|s.words[n])+i,this.words[n]=67108863&t,i=t>>>26;for(;0!==i&&n<r.length;n++)t=(0|r.words[n])+i,this.words[n]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;n<r.length;n++)this.words[n]=r.words[n];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,s=this.iadd(e);return e.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var n=0,o=0;o<r.length;o++)n=(s=(0|t.words[o])-(0|r.words[o])+n)>>26,this.words[o]=67108863&s;for(;0!==n&&o<t.length;o++)n=(s=(0|t.words[o])+n)>>26,this.words[o]=67108863&s;if(0===n&&o<t.length&&t!==this)for(;o<t.length;o++)this.words[o]=t.words[o];return this.length=Math.max(this.length,o),t!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var s,i,n,o=e.words,a=t.words,l=r.words,u=0,c=0|o[0],h=8191&c,d=c>>>13,p=0|o[1],f=8191&p,m=p>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,E=b>>>13,_=0|o[4],M=8191&_,k=_>>>13,C=0|o[5],S=8191&C,R=C>>>13,I=0|o[6],x=8191&I,A=I>>>13,N=0|o[7],L=8191&N,O=N>>>13,P=0|o[8],T=8191&P,j=P>>>13,B=0|o[9],D=8191&B,F=B>>>13,$=0|a[0],U=8191&$,H=$>>>13,V=0|a[1],q=8191&V,W=V>>>13,z=0|a[2],J=8191&z,G=z>>>13,Z=0|a[3],Q=8191&Z,Y=Z>>>13,K=0|a[4],X=8191&K,ee=K>>>13,et=0|a[5],er=8191&et,es=et>>>13,ei=0|a[6],en=8191&ei,eo=ei>>>13,ea=0|a[7],el=8191&ea,eu=ea>>>13,ec=0|a[8],eh=8191&ec,ed=ec>>>13,ep=0|a[9],ef=8191&ep,em=ep>>>13;r.negative=e.negative^t.negative,r.length=19;var eg=(u+(s=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(d,U)|0))<<13)|0;u=((n=Math.imul(d,H))+(i>>>13)|0)+(eg>>>26)|0,eg&=67108863,s=Math.imul(f,U),i=(i=Math.imul(f,H))+Math.imul(m,U)|0,n=Math.imul(m,H);var ev=(u+(s=s+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,q)|0))<<13)|0;u=((n=n+Math.imul(d,W)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,s=Math.imul(v,U),i=(i=Math.imul(v,H))+Math.imul(y,U)|0,n=Math.imul(y,H),s=s+Math.imul(f,q)|0,i=(i=i+Math.imul(f,W)|0)+Math.imul(m,q)|0,n=n+Math.imul(m,W)|0;var ey=(u+(s=s+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,J)|0))<<13)|0;u=((n=n+Math.imul(d,G)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,s=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(E,U)|0,n=Math.imul(E,H),s=s+Math.imul(v,q)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,q)|0,n=n+Math.imul(y,W)|0,s=s+Math.imul(f,J)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,J)|0,n=n+Math.imul(m,G)|0;var eb=(u+(s=s+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,Q)|0))<<13)|0;u=((n=n+Math.imul(d,Y)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,s=Math.imul(M,U),i=(i=Math.imul(M,H))+Math.imul(k,U)|0,n=Math.imul(k,H),s=s+Math.imul(w,q)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(E,q)|0,n=n+Math.imul(E,W)|0,s=s+Math.imul(v,J)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,J)|0,n=n+Math.imul(y,G)|0,s=s+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,Y)|0)+Math.imul(m,Q)|0,n=n+Math.imul(m,Y)|0;var ew=(u+(s=s+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((n=n+Math.imul(d,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,s=Math.imul(S,U),i=(i=Math.imul(S,H))+Math.imul(R,U)|0,n=Math.imul(R,H),s=s+Math.imul(M,q)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(k,q)|0,n=n+Math.imul(k,W)|0,s=s+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(E,J)|0,n=n+Math.imul(E,G)|0,s=s+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,n=n+Math.imul(y,Y)|0,s=s+Math.imul(f,X)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,X)|0,n=n+Math.imul(m,ee)|0;var eE=(u+(s=s+Math.imul(h,er)|0)|0)+((8191&(i=(i=i+Math.imul(h,es)|0)+Math.imul(d,er)|0))<<13)|0;u=((n=n+Math.imul(d,es)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,s=Math.imul(x,U),i=(i=Math.imul(x,H))+Math.imul(A,U)|0,n=Math.imul(A,H),s=s+Math.imul(S,q)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(R,q)|0,n=n+Math.imul(R,W)|0,s=s+Math.imul(M,J)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,J)|0,n=n+Math.imul(k,G)|0,s=s+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(E,Q)|0,n=n+Math.imul(E,Y)|0,s=s+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,n=n+Math.imul(y,ee)|0,s=s+Math.imul(f,er)|0,i=(i=i+Math.imul(f,es)|0)+Math.imul(m,er)|0,n=n+Math.imul(m,es)|0;var e_=(u+(s=s+Math.imul(h,en)|0)|0)+((8191&(i=(i=i+Math.imul(h,eo)|0)+Math.imul(d,en)|0))<<13)|0;u=((n=n+Math.imul(d,eo)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,s=Math.imul(L,U),i=(i=Math.imul(L,H))+Math.imul(O,U)|0,n=Math.imul(O,H),s=s+Math.imul(x,q)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(A,q)|0,n=n+Math.imul(A,W)|0,s=s+Math.imul(S,J)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(R,J)|0,n=n+Math.imul(R,G)|0,s=s+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(k,Q)|0,n=n+Math.imul(k,Y)|0,s=s+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(E,X)|0,n=n+Math.imul(E,ee)|0,s=s+Math.imul(v,er)|0,i=(i=i+Math.imul(v,es)|0)+Math.imul(y,er)|0,n=n+Math.imul(y,es)|0,s=s+Math.imul(f,en)|0,i=(i=i+Math.imul(f,eo)|0)+Math.imul(m,en)|0,n=n+Math.imul(m,eo)|0;var eM=(u+(s=s+Math.imul(h,el)|0)|0)+((8191&(i=(i=i+Math.imul(h,eu)|0)+Math.imul(d,el)|0))<<13)|0;u=((n=n+Math.imul(d,eu)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,s=Math.imul(T,U),i=(i=Math.imul(T,H))+Math.imul(j,U)|0,n=Math.imul(j,H),s=s+Math.imul(L,q)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(O,q)|0,n=n+Math.imul(O,W)|0,s=s+Math.imul(x,J)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,J)|0,n=n+Math.imul(A,G)|0,s=s+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(R,Q)|0,n=n+Math.imul(R,Y)|0,s=s+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(k,X)|0,n=n+Math.imul(k,ee)|0,s=s+Math.imul(w,er)|0,i=(i=i+Math.imul(w,es)|0)+Math.imul(E,er)|0,n=n+Math.imul(E,es)|0,s=s+Math.imul(v,en)|0,i=(i=i+Math.imul(v,eo)|0)+Math.imul(y,en)|0,n=n+Math.imul(y,eo)|0,s=s+Math.imul(f,el)|0,i=(i=i+Math.imul(f,eu)|0)+Math.imul(m,el)|0,n=n+Math.imul(m,eu)|0;var ek=(u+(s=s+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,ed)|0)+Math.imul(d,eh)|0))<<13)|0;u=((n=n+Math.imul(d,ed)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,s=Math.imul(D,U),i=(i=Math.imul(D,H))+Math.imul(F,U)|0,n=Math.imul(F,H),s=s+Math.imul(T,q)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(j,q)|0,n=n+Math.imul(j,W)|0,s=s+Math.imul(L,J)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(O,J)|0,n=n+Math.imul(O,G)|0,s=s+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,Q)|0,n=n+Math.imul(A,Y)|0,s=s+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(R,X)|0,n=n+Math.imul(R,ee)|0,s=s+Math.imul(M,er)|0,i=(i=i+Math.imul(M,es)|0)+Math.imul(k,er)|0,n=n+Math.imul(k,es)|0,s=s+Math.imul(w,en)|0,i=(i=i+Math.imul(w,eo)|0)+Math.imul(E,en)|0,n=n+Math.imul(E,eo)|0,s=s+Math.imul(v,el)|0,i=(i=i+Math.imul(v,eu)|0)+Math.imul(y,el)|0,n=n+Math.imul(y,eu)|0,s=s+Math.imul(f,eh)|0,i=(i=i+Math.imul(f,ed)|0)+Math.imul(m,eh)|0,n=n+Math.imul(m,ed)|0;var eC=(u+(s=s+Math.imul(h,ef)|0)|0)+((8191&(i=(i=i+Math.imul(h,em)|0)+Math.imul(d,ef)|0))<<13)|0;u=((n=n+Math.imul(d,em)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,s=Math.imul(D,q),i=(i=Math.imul(D,W))+Math.imul(F,q)|0,n=Math.imul(F,W),s=s+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(j,J)|0,n=n+Math.imul(j,G)|0,s=s+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(O,Q)|0,n=n+Math.imul(O,Y)|0,s=s+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,n=n+Math.imul(A,ee)|0,s=s+Math.imul(S,er)|0,i=(i=i+Math.imul(S,es)|0)+Math.imul(R,er)|0,n=n+Math.imul(R,es)|0,s=s+Math.imul(M,en)|0,i=(i=i+Math.imul(M,eo)|0)+Math.imul(k,en)|0,n=n+Math.imul(k,eo)|0,s=s+Math.imul(w,el)|0,i=(i=i+Math.imul(w,eu)|0)+Math.imul(E,el)|0,n=n+Math.imul(E,eu)|0,s=s+Math.imul(v,eh)|0,i=(i=i+Math.imul(v,ed)|0)+Math.imul(y,eh)|0,n=n+Math.imul(y,ed)|0;var eS=(u+(s=s+Math.imul(f,ef)|0)|0)+((8191&(i=(i=i+Math.imul(f,em)|0)+Math.imul(m,ef)|0))<<13)|0;u=((n=n+Math.imul(m,em)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,s=Math.imul(D,J),i=(i=Math.imul(D,G))+Math.imul(F,J)|0,n=Math.imul(F,G),s=s+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(j,Q)|0,n=n+Math.imul(j,Y)|0,s=s+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(O,X)|0,n=n+Math.imul(O,ee)|0,s=s+Math.imul(x,er)|0,i=(i=i+Math.imul(x,es)|0)+Math.imul(A,er)|0,n=n+Math.imul(A,es)|0,s=s+Math.imul(S,en)|0,i=(i=i+Math.imul(S,eo)|0)+Math.imul(R,en)|0,n=n+Math.imul(R,eo)|0,s=s+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(k,el)|0,n=n+Math.imul(k,eu)|0,s=s+Math.imul(w,eh)|0,i=(i=i+Math.imul(w,ed)|0)+Math.imul(E,eh)|0,n=n+Math.imul(E,ed)|0;var eR=(u+(s=s+Math.imul(v,ef)|0)|0)+((8191&(i=(i=i+Math.imul(v,em)|0)+Math.imul(y,ef)|0))<<13)|0;u=((n=n+Math.imul(y,em)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,s=Math.imul(D,Q),i=(i=Math.imul(D,Y))+Math.imul(F,Q)|0,n=Math.imul(F,Y),s=s+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(j,X)|0,n=n+Math.imul(j,ee)|0,s=s+Math.imul(L,er)|0,i=(i=i+Math.imul(L,es)|0)+Math.imul(O,er)|0,n=n+Math.imul(O,es)|0,s=s+Math.imul(x,en)|0,i=(i=i+Math.imul(x,eo)|0)+Math.imul(A,en)|0,n=n+Math.imul(A,eo)|0,s=s+Math.imul(S,el)|0,i=(i=i+Math.imul(S,eu)|0)+Math.imul(R,el)|0,n=n+Math.imul(R,eu)|0,s=s+Math.imul(M,eh)|0,i=(i=i+Math.imul(M,ed)|0)+Math.imul(k,eh)|0,n=n+Math.imul(k,ed)|0;var eI=(u+(s=s+Math.imul(w,ef)|0)|0)+((8191&(i=(i=i+Math.imul(w,em)|0)+Math.imul(E,ef)|0))<<13)|0;u=((n=n+Math.imul(E,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,s=Math.imul(D,X),i=(i=Math.imul(D,ee))+Math.imul(F,X)|0,n=Math.imul(F,ee),s=s+Math.imul(T,er)|0,i=(i=i+Math.imul(T,es)|0)+Math.imul(j,er)|0,n=n+Math.imul(j,es)|0,s=s+Math.imul(L,en)|0,i=(i=i+Math.imul(L,eo)|0)+Math.imul(O,en)|0,n=n+Math.imul(O,eo)|0,s=s+Math.imul(x,el)|0,i=(i=i+Math.imul(x,eu)|0)+Math.imul(A,el)|0,n=n+Math.imul(A,eu)|0,s=s+Math.imul(S,eh)|0,i=(i=i+Math.imul(S,ed)|0)+Math.imul(R,eh)|0,n=n+Math.imul(R,ed)|0;var ex=(u+(s=s+Math.imul(M,ef)|0)|0)+((8191&(i=(i=i+Math.imul(M,em)|0)+Math.imul(k,ef)|0))<<13)|0;u=((n=n+Math.imul(k,em)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,s=Math.imul(D,er),i=(i=Math.imul(D,es))+Math.imul(F,er)|0,n=Math.imul(F,es),s=s+Math.imul(T,en)|0,i=(i=i+Math.imul(T,eo)|0)+Math.imul(j,en)|0,n=n+Math.imul(j,eo)|0,s=s+Math.imul(L,el)|0,i=(i=i+Math.imul(L,eu)|0)+Math.imul(O,el)|0,n=n+Math.imul(O,eu)|0,s=s+Math.imul(x,eh)|0,i=(i=i+Math.imul(x,ed)|0)+Math.imul(A,eh)|0,n=n+Math.imul(A,ed)|0;var eA=(u+(s=s+Math.imul(S,ef)|0)|0)+((8191&(i=(i=i+Math.imul(S,em)|0)+Math.imul(R,ef)|0))<<13)|0;u=((n=n+Math.imul(R,em)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,s=Math.imul(D,en),i=(i=Math.imul(D,eo))+Math.imul(F,en)|0,n=Math.imul(F,eo),s=s+Math.imul(T,el)|0,i=(i=i+Math.imul(T,eu)|0)+Math.imul(j,el)|0,n=n+Math.imul(j,eu)|0,s=s+Math.imul(L,eh)|0,i=(i=i+Math.imul(L,ed)|0)+Math.imul(O,eh)|0,n=n+Math.imul(O,ed)|0;var eN=(u+(s=s+Math.imul(x,ef)|0)|0)+((8191&(i=(i=i+Math.imul(x,em)|0)+Math.imul(A,ef)|0))<<13)|0;u=((n=n+Math.imul(A,em)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,s=Math.imul(D,el),i=(i=Math.imul(D,eu))+Math.imul(F,el)|0,n=Math.imul(F,eu),s=s+Math.imul(T,eh)|0,i=(i=i+Math.imul(T,ed)|0)+Math.imul(j,eh)|0,n=n+Math.imul(j,ed)|0;var eL=(u+(s=s+Math.imul(L,ef)|0)|0)+((8191&(i=(i=i+Math.imul(L,em)|0)+Math.imul(O,ef)|0))<<13)|0;u=((n=n+Math.imul(O,em)|0)+(i>>>13)|0)+(eL>>>26)|0,eL&=67108863,s=Math.imul(D,eh),i=(i=Math.imul(D,ed))+Math.imul(F,eh)|0,n=Math.imul(F,ed);var eO=(u+(s=s+Math.imul(T,ef)|0)|0)+((8191&(i=(i=i+Math.imul(T,em)|0)+Math.imul(j,ef)|0))<<13)|0;u=((n=n+Math.imul(j,em)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863;var eP=(u+(s=Math.imul(D,ef))|0)+((8191&(i=(i=Math.imul(D,em))+Math.imul(F,ef)|0))<<13)|0;return u=((n=Math.imul(F,em))+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,l[0]=eg,l[1]=ev,l[2]=ey,l[3]=eb,l[4]=ew,l[5]=eE,l[6]=e_,l[7]=eM,l[8]=ek,l[9]=eC,l[10]=eS,l[11]=eR,l[12]=eI,l[13]=ex,l[14]=eA,l[15]=eN,l[16]=eL,l[17]=eO,l[18]=eP,0!==u&&(l[19]=u,r.length++),r};function v(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var s=0,i=0,n=0;n<r.length-1;n++){var o=i;i=0;for(var a=67108863&s,l=Math.min(n,t.length-1),u=Math.max(0,n-e.length+1);u<=l;u++){var c=n-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;o=o+(h/67108864|0)|0,a=67108863&(d=d+a|0),i+=(o=o+(d>>>26)|0)>>>26,o&=67108863}r.words[n]=a,s=o,o=i}return 0!==s?r.words[n]=s:r.length--,r._strip()}function y(e,t){this.x=e,this.y=t}Math.imul||(g=m),n.prototype.mulTo=function(e,t){var r,s=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):s<63?m(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=Array(e),r=n.prototype._countBits(e)-1,s=0;s<e;s++)t[s]=this.revBin(s,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var s=0,i=0;i<t;i++)s|=(1&e)<<t-i-1,e>>=1;return s},y.prototype.permute=function(e,t,r,s,i,n){for(var o=0;o<n;o++)s[o]=t[e[o]],i[o]=r[e[o]]},y.prototype.transform=function(e,t,r,s,i,n){this.permute(n,e,t,r,s,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,p=0;p<o;p++){var f=r[c+p],m=s[c+p],g=r[c+p+o],v=s[c+p+o],y=h*g-d*v;v=h*v+d*g,g=y,r[c+p]=f+g,s[c+p]=m+v,r[c+p+o]=f-g,s[c+p+o]=m-v,p!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),s=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+s},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var s=0;s<r/2;s++){var i=e[s];e[s]=e[r-s-1],e[r-s-1]=i,i=t[s],t[s]=-t[r-s-1],t[r-s-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,s=0;s<t/2;s++){var i=8192*Math.round(e[2*s+1]/t)+Math.round(e[2*s]/t)+r;e[s]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var n=0,o=0;o<t;o++)n+=0|e[o],r[2*o]=8191&n,n>>>=13,r[2*o+1]=8191&n,n>>>=13;for(o=2*t;o<i;++o)r[o]=0;s(0===n),s((-8192&n)==0)},y.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var s=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(s),n=this.stub(s),o=Array(s),a=Array(s),l=Array(s),u=Array(s),c=Array(s),h=Array(s),d=r.words;d.length=s,this.convert13b(e.words,e.length,o,s),this.convert13b(t.words,t.length,u,s),this.transform(o,n,a,l,s,i),this.transform(u,n,c,h,s,i);for(var p=0;p<s;p++){var f=a[p]*c[p]-l[p]*h[p];l[p]=a[p]*h[p]+l[p]*c[p],a[p]=f}return this.conjugate(a,l,s),this.transform(a,l,d,n,s,i),this.conjugate(d,n,s),this.normalize13b(d,s),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=Array(this.length+e.length),v(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){var t=e<0;t&&(e=-e),s("number"==typeof e),s(e<67108864);for(var r=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&r);r>>=26,r+=(n/67108864|0)+(o>>>26),this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var s=r/26|0,i=r%26;t[r]=e.words[s]>>>i&1}return t}(e);if(0===t.length)return new n(1);for(var r=this,s=0;s<t.length&&0===t[s];s++,r=r.sqr());if(++s<t.length)for(var i=r.sqr();s<t.length;s++,i=i.sqr())0!==t[s]&&(r=r.mul(i));return r},n.prototype.iushln=function(e){s("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,n=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&n,l=(0|this.words[t])-a<<r;this.words[t]=l|o,o=a>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},n.prototype.ishln=function(e){return s(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,r){s("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var i,n=e%26,o=Math.min((e-n)/26,this.length),a=67108863^67108863>>>n<<n;if(i-=o,i=Math.max(0,i),r){for(var l=0;l<o;l++)r.words[l]=this.words[l];r.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var c=0|this.words[l];this.words[l]=u<<26-n|c>>>n,u=c&a}return r&&0!==u&&(r.words[r.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(e,t,r){return s(0===this.negative),this.iushrn(e,t,r)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){s("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<<t)},n.prototype.imaskn=function(e){s("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return(s(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this._strip())},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return(s("number"==typeof e),s(e<67108864),e<0)?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(s("number"==typeof e),s(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,r){var i,n,o=e.length+r;this._expand(o);var a=0;for(i=0;i<e.length;i++){n=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;n-=67108863&l,a=(n>>26)-(l/67108864|0),this.words[i+r]=67108863&n}for(;i<this.length-r;i++)a=(n=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&n;if(0===a)return this._strip();for(s(-1===a),a=0,i=0;i<this.length;i++)a=(n=-(0|this.words[i])+a)>>26,this.words[i]=67108863&n;return this.negative=1,this._strip()},n.prototype._wordDiv=function(e,t){var r,s=this.length-e.length,i=this.clone(),o=e,a=0|o.words[o.length-1];0!=(s=26-this._countBits(a))&&(o=o.ushln(s),i.iushln(s),a=0|o.words[o.length-1]);var l=i.length-o.length;if("mod"!==t){(r=new n(null)).length=l+1,r.words=Array(r.length);for(var u=0;u<r.length;u++)r.words[u]=0}var c=i.clone()._ishlnsubmul(o,1,l);0===c.negative&&(i=c,r&&(r.words[l]=1));for(var h=l-1;h>=0;h--){var d=(0|i.words[o.length+h])*67108864+(0|i.words[o.length+h-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(o,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(o,1,h),i.isZero()||(i.negative^=1);r&&(r.words[h]=d)}return r&&r._strip(),i._strip(),"div"!==t&&0!==s&&i.iushrn(s),{div:r||null,mod:i}},n.prototype.divmod=function(e,t,r){var i,o,a;return(s(!e.isZero()),this.isZero())?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):(this.negative&e.negative)!=0?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||0>this.cmp(e)?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modrn(e.words[0]))}:this._wordDiv(e,t)},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,s=e.ushrn(1),i=e.andln(1),n=r.cmp(s);return n<0||1===i&&0===n?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modrn=function(e){var t=e<0;t&&(e=-e),s(e<=67108863);for(var r=67108864%e,i=0,n=this.length-1;n>=0;n--)i=(r*i+(0|this.words[n]))%e;return t?-i:i},n.prototype.modn=function(e){return this.modrn(e)},n.prototype.idivn=function(e){var t=e<0;t&&(e=-e),s(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*r;this.words[i]=n/e|0,r=n%e}return this._strip(),t?this.ineg():this},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){s(0===e.negative),s(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new n(1),o=new n(0),a=new n(0),l=new n(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,p=1;(t.words[0]&p)==0&&d<26;++d,p<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;(r.words[0]&m)==0&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),o.isub(l)):(r.isub(t),a.isub(i),l.isub(o))}return{a:a,b:l,gcd:r.iushln(u)}},n.prototype._invmp=function(e){s(0===e.negative),s(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new n(1),a=new n(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,c=1;(r.words[0]&c)==0&&u<26;++u,c<<=1);if(u>0)for(r.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;(i.words[0]&d)==0&&h<26;++h,d<<=1);if(h>0)for(i.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);r.cmp(i)>=0?(r.isub(i),o.isub(a)):(i.isub(r),a.isub(o))}return 0>(t=0===r.cmpn(1)?o:a).cmpn(0)&&t.iadd(e),t},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var s=0;t.isEven()&&r.isEven();s++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var n=t;t=r,r=n}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(s)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return(1&this.words[0])==0},n.prototype.isOdd=function(){return(1&this.words[0])==1},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){s("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var n=i,o=r;0!==n&&o<this.length;o++){var a=0|this.words[o];a+=n,n=a>>>26,a&=67108863,this.words[o]=a}return 0!==n&&(this.words[o]=n,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),s(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return -1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return -1;for(var t=0,r=this.length-1;r>=0;r--){var s=0|this.words[r],i=0|e.words[r];if(s!==i){s<i?t=-1:s>i&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return -1===this.cmpn(e)},n.prototype.lt=function(e){return -1===this.cmp(e)},n.prototype.lten=function(e){return 0>=this.cmpn(e)},n.prototype.lte=function(e){return 0>=this.cmp(e)},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new C(e)},n.prototype.toRed=function(e){return s(!this.red,"Already a number in reduction context"),s(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return s(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return s(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else s(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new n(null);return e.words=Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var s=t<this.n?-1:r.ucmp(this.p);return 0===s?(r.words[0]=0,r.length=1):s>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(E,w),E.prototype.split=function(e,t){for(var r=Math.min(e.length,9),s=0;s<r;s++)t.words[s]=e.words[s];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var i=e.words[9];for(s=10,t.words[t.length++]=4194303&i;s<e.length;s++){var n=0|e.words[s];e.words[s-10]=(4194303&n)<<4|i>>>22,i=n}i>>>=22,e.words[s-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var s=0|e.words[r];t+=977*s,e.words[r]=67108863&t,t=64*s+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,w),i(M,w),i(k,w),k.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var s=(0|e.words[r])*19+t,i=67108863&s;s>>>=26,e.words[r]=i,t=s}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new E;else if("p224"===e)t=new _;else if("p192"===e)t=new M;else if("p25519"===e)t=new k;else throw Error("Unknown prime "+e);return b[e]=t,t},C.prototype._verify1=function(e){s(0===e.negative,"red works only with positives"),s(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){s((e.negative|t.negative)==0,"red works only with positives"),s(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},C.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(s(t%2==1),3===t){var r=this.m.add(new n(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);s(!i.isZero());var a=new n(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new n(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=o;0!==p.cmp(a);){for(var m=p,g=0;0!==m.cmp(a);g++)m=m.redSqr();s(g<f);var v=this.pow(h,new n(1).iushln(f-g-1));d=d.redMul(v),h=v.redSqr(),p=p.redMul(h),f=g}return d},C.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},C.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var s=2;s<r.length;s++)r[s]=this.mul(r[s-1],e);var i=r[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),s=t.length-1;s>=0;s--){for(var u=t.words[s],c=l-1;c>=0;c--){var h=u>>c&1;if(i!==r[0]&&(i=this.sqr(i)),0===h&&0===o){a=0;continue}o<<=1,o|=h,(4==++a||0===s&&0===c)&&(i=this.mul(i,r[o]),a=0,o=0)}l=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),s=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(s).iushrn(this.shift),n=i;return i.cmp(this.m)>=0?n=i.isub(this.m):0>i.cmpn(0)&&(n=i.iadd(this.m)),n._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),s=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(s).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},21410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;let s=r(13400),i=r(56487),n=r(3291),o=r(41823),a=r(86287),l=r(27661),u=r(66107),c=r(64758),h=r(75027),d=r(48791),p=r(70383);class f{constructor(e){var t,r,s;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;let a=e.linkAPIUrl||i.LINK_API_URL;void 0===e.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this._overrideIsCoinbaseBrowser=null!==(r=e.overrideIsCoinbaseBrowser)&&void 0!==r&&r,this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=null===(s=e.reloadOnDisconnect)||void 0===s||s;let m=new URL(a),g=`${m.protocol}//${m.host}`;if(this._storage=new o.ScopedLocalStorage(`-walletlink:${g}`),this._storage.setItem("version",f.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new c.RelayEventManager;let v=(0,n.isMobileWeb)(),y=e.uiConstructor||(e=>v?new u.MobileRelayUI(e):new h.WalletLinkRelayUI(e)),b={linkAPIUrl:a,version:p.LIB_VERSION,darkMode:!!e.darkMode,headlessMode:!!e.headlessMode,uiConstructor:y,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:e.enableMobileWalletLink};if(this._relay=v?new l.MobileRelay(b):new d.WalletLinkRelay(b),this.setAppInfo(e.appName,e.appLogoUrl),e.headlessMode)return;this._relay.attachUI()}makeWeb3Provider(e="",t=1){let r=this.walletExtension;if(r)return this.isCipherProvider(r)||r.setProviderInfo(e,t),!1===this._reloadOnDisconnect&&"function"==typeof r.disableReloadOnDisconnect&&r.disableReloadOnDisconnect(),r;let s=this.coinbaseBrowser;if(s)return s;let i=this._relay;if(!i||!this._relayEventManager||!this._storage)throw Error("Relay not initialized, should never happen");return e||i.setConnectDisabled(!0),new a.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(i),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,t){var r;this._appName=e||"DApp",this._appLogoUrl=t||(0,n.getFavicon)();let s=this.walletExtension;s?this.isCipherProvider(s)||s.setAppInfo(this._appName,this._appLogoUrl):null===(r=this._relay)||void 0===r||r.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;let t=this===null||void 0===this?void 0:this.walletExtension;t?t.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}getQrUrl(){var e,t;return null!==(t=null===(e=this._relay)||void 0===e?void 0:e.getQRCodeUrl())&&void 0!==t?t:null}getCoinbaseWalletLogo(e,t=240){return(0,s.walletLogo)(e,t)}get walletExtension(){var e;return null!==(e=window.coinbaseWalletExtension)&&void 0!==e?e:window.walletLinkExtension}get coinbaseBrowser(){var e,t;try{let r=null!==(e=window.ethereum)&&void 0!==e?e:null===(t=window.top)||void 0===t?void 0:t.ethereum;if(!r)return;if("isCoinbaseBrowser"in r&&r.isCoinbaseBrowser)return r;return}catch(e){return}}isCipherProvider(e){return"boolean"==typeof e.isCipher&&e.isCipher}}t.CoinbaseWalletSDK=f,f.VERSION=p.LIB_VERSION},13400:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0,t.walletLogo=(e,t)=>{let r;switch(e){case"standard":default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2'