@frames.js/debugger
Version:
Debug your Frames.js applications
1 lines • 170 kB
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8989],{70472:function(t,e,r){let i,n;r.d(e,{$0m:function(){return J},AWt:function(){return il},Au2:function(){return im},B95:function(){return nh},Bvr:function(){return iL},BwD:function(){return ti},D6H:function(){return iG},DJo:function(){return r4},DQe:function(){return x},DaH:function(){return Q},DdM:function(){return i6},E0T:function(){return tn},E12:function(){return iH},EJd:function(){return nr},ENt:function(){return iI},Ggh:function(){return nd},GqV:function(){return tt},H1S:function(){return W},H4H:function(){return ni},HIp:function(){return iw},HhN:function(){return ts},IPd:function(){return V},Ih8:function(){return i$},IkP:function(){return ii},JTI:function(){return no},KCv:function(){return Y},L5o:function(){return iV},Llj:function(){return iS},M_r:function(){return iX},Maj:function(){return ij},NmC:function(){return r5},O6B:function(){return nv},ONw:function(){return nc},PMr:function(){return nt},Q01:function(){return ne},Q8x:function(){return iN},UGU:function(){return q},WGe:function(){return ib},X_B:function(){return K},Y31:function(){return is},YmJ:function(){return iA},Z26:function(){return i9},Z42:function(){return $},_HE:function(){return iB},alS:function(){return nf},b$m:function(){return z},bW6:function(){return tu},c4l:function(){return r7},cOS:function(){return iC},eGA:function(){return to},gn4:function(){return tr},gpE:function(){return iz},guN:function(){return O},h1R:function(){return i3},hA9:function(){return ih},hFY:function(){return X},hHR:function(){return nn},heJ:function(){return iF},iPz:function(){return te},ing:function(){return i7},jUY:function(){return j},jdp:function(){return ig},jvJ:function(){return i1},kCb:function(){return iJ},m$A:function(){return iv},naP:function(){return i5},nfW:function(){return ns},o8e:function(){return iW},ouN:function(){return iu},p8o:function(){return nu},peR:function(){return iM},qJM:function(){return io},qt8:function(){return iY},rFo:function(){return na},rVF:function(){return ip},rjm:function(){return iy},uwg:function(){return nm},vBi:function(){return iE},wvx:function(){return r9},xWS:function(){return i2}});var o,s,u,f,h,a,l,c,d,p,m,g=r(51842),v=r(64461),A=r(85e3),y=r(27206),b=r(57261),w=r(98224),M=r(46590),E=r(51841),S=r(85919),I=r(52642),N=r(73504),B=r(5734),C=r(68571),_=r(73860).Buffer;function x(t){let[e,r]=t.split(":");return{namespace:e,reference:r}}function O(t,e=[]){let r=[];return Object.keys(t).forEach(i=>{if(e.length&&!e.includes(i))return;let n=t[i];r.push(...n.accounts)}),r}function R(t,e){return t.includes(":")?[t]:e.chains||[]}var k=Object.defineProperty,P=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,D=(t,e,r)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,F=(t,e)=>{for(var r in e||(e={}))U.call(e,r)&&D(t,r,e[r]);if(P)for(var r of P(e))T.call(e,r)&&D(t,r,e[r]);return t};let L={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};function q(){return"u">typeof C&&"u">typeof C.versions&&"u">typeof C.versions.node}function z(){return!(0,A.getDocument)()&&!!(0,A.getNavigator)()&&"ReactNative"===navigator.product}function j(){return!q()&&!!(0,A.getNavigator)()&&!!(0,A.getDocument)()}function H(){return z()?L.reactNative:q()?L.node:j()?L.browser:L.unknown}function K(){var t;try{return z()&&"u">typeof r.g&&"u">typeof(null==r.g?void 0:r.g.Application)?null==(t=r.g.Application)?void 0:t.applicationId:void 0}catch{return}}function Q(){return(0,y.D)()||{name:"",description:"",url:"",icons:[""]}}function J({protocol:t,version:e,relayUrl:i,sdkVersion:n,auth:o,projectId:s,useOnCloseEvent:u,bundleId:f}){var h;let a;let l=i.split("?"),c=function(t,e,i){let n=function(){if(H()===L.reactNative&&"u">typeof r.g&&"u">typeof(null==r.g?void 0:r.g.Platform)){let{OS:t,Version:e}=r.g.Platform;return[t,e].join("-")}let t=(0,g.qY)();if(null===t)return"unknown";let e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),o=function(){var t;let e=H();return e===L.browser?[e,(null==(t=(0,A.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),["js",i].join("-"),n,o].join("/")}(t,e,n),d=(h=l[1]||"",a=F(F({},a=b.parse(h)),{auth:o,ua:c,projectId:s,useOnCloseEvent:u||void 0,origin:f||void 0}),h=b.stringify(a));return l[0]+"?"+d}function G(t,e){return t.filter(t=>e.includes(t)).length===t.length}function Y(t){return Object.fromEntries(t.entries())}function V(t){return new Map(Object.entries(t))}function W(t=v.FIVE_MINUTES,e){let r,i,n;let o=(0,v.toMiliseconds)(t||v.FIVE_MINUTES);return{resolve:t=>{n&&r&&(clearTimeout(n),r(t))},reject:t=>{n&&i&&(clearTimeout(n),i(t))},done:()=>new Promise((t,s)=>{n=setTimeout(()=>{s(Error(e))},o),r=t,i=s})}}function X(t,e,r){return new Promise(async(i,n)=>{let o=setTimeout(()=>n(Error(r)),e);try{let e=await t;i(e)}catch(t){n(t)}clearTimeout(o)})}function Z(t,e){if("string"==typeof e&&e.startsWith(`${t}:`))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===t.toLowerCase()){if("number"!=typeof e)throw Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw Error(`Unknown expirer target type: ${t}`)}function $(t){return Z("topic",t)}function tt(t){return Z("id",t)}function te(t){let[e,r]=t.split(":"),i={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof r)i.topic=r;else if("id"===e&&Number.isInteger(Number(r)))i.id=Number(r);else throw Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return i}function tr(t,e){return(0,v.fromMiliseconds)((e||Date.now())+(0,v.toMiliseconds)(t))}function ti(t){return Date.now()>=(0,v.toMiliseconds)(t)}function tn(t,e){return`${t}${e?`:${e}`:""}`}function to(t=[],e=[]){return[...new Set([...t,...e])]}async function ts({id:t,topic:e,wcDeepLink:i}){try{if(!i)return;let n="string"==typeof i?JSON.parse(i):i,o=n?.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));let s=`${o}/wc?requestId=${t}&sessionTopic=${e}`,u=H();u===L.browser?s.startsWith("https://")||s.startsWith("http://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):u===L.reactNative&&"u">typeof(null==r.g?void 0:r.g.Linking)&&await r.g.Linking.openURL(s)}catch(t){console.error(t)}}async function tu(t,e){try{return await t.getItem(e)||(j()?localStorage.getItem(e):void 0)}catch(t){console.error(t)}}var tf="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof r.g?r.g:"u">typeof self?self:{},th={exports:{}};!function(){var t="input is invalid type",e="object"==typeof window,r=e?window:{};r.JS_SHA3_NO_WINDOW&&(e=!1);var i=!e&&"object"==typeof self;!r.JS_SHA3_NO_NODE_JS&&"object"==typeof C&&C.versions&&C.versions.node?r=tf:i&&(r=self);var n=!r.JS_SHA3_NO_COMMON_JS&&th.exports,o=!r.JS_SHA3_NO_ARRAY_BUFFER&&"u">typeof ArrayBuffer,s="0123456789abcdef".split(""),u=[4,1024,262144,67108864],f=[0,8,16,24],h=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],a=[224,256,384,512],l=[128,256],c=["hex","buffer","arrayBuffer","array","digest"],d={128:168,256:136};(r.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),o&&(r.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var p=function(t,e,r){return function(i){return new x(t,e,t).update(i)[r]()}},m=function(t,e,r){return function(i,n){return new x(t,e,n).update(i)[r]()}},g=function(t,e,r){return function(e,i,n,o){return w["cshake"+t].update(e,i,n,o)[r]()}},v=function(t,e,r){return function(e,i,n,o){return w["kmac"+t].update(e,i,n,o)[r]()}},A=function(t,e,r,i){for(var n=0;n<c.length;++n){var o=c[n];t[o]=e(r,i,o)}return t},y=function(t,e){var r=p(t,e,"hex");return r.create=function(){return new x(t,e,t)},r.update=function(t){return r.create().update(t)},A(r,p,t,e)},b=[{name:"keccak",padding:[1,256,65536,16777216],bits:a,createMethod:y},{name:"sha3",padding:[6,1536,393216,100663296],bits:a,createMethod:y},{name:"shake",padding:[31,7936,2031616,520093696],bits:l,createMethod:function(t,e){var r=m(t,e,"hex");return r.create=function(r){return new x(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},A(r,m,t,e)}},{name:"cshake",padding:u,bits:l,createMethod:function(t,e){var r=d[t],i=g(t,e,"hex");return i.create=function(i,n,o){return n||o?new x(t,e,i).bytepad([n,o],r):w["shake"+t].create(i)},i.update=function(t,e,r,n){return i.create(e,r,n).update(t)},A(i,g,t,e)}},{name:"kmac",padding:u,bits:l,createMethod:function(t,e){var r=d[t],i=v(t,e,"hex");return i.create=function(i,n,o){return new O(t,e,n).bytepad(["KMAC",o],r).bytepad([i],r)},i.update=function(t,e,r,n){return i.create(t,r,n).update(e)},A(i,v,t,e)}}],w={},M=[],E=0;E<b.length;++E)for(var S=b[E],I=S.bits,N=0;N<I.length;++N){var B=S.name+"_"+I[N];if(M.push(B),w[B]=S.createMethod(I[N],S.padding),"sha3"!==S.name){var _=S.name+I[N];M.push(_),w[_]=w[B]}}function x(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var i=0;i<50;++i)this.s[i]=0}function O(t,e,r){x.call(this,t,e,r)}x.prototype.update=function(e){if(this.finalized)throw Error("finalize already called");var r,i=typeof e;if("string"!==i){if("object"===i){if(null===e)throw Error(t);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!o||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);r=!0}for(var n,s,u=this.blocks,h=this.byteCount,a=e.length,l=this.blockCount,c=0,d=this.s;c<a;){if(this.reset)for(this.reset=!1,u[0]=this.block,n=1;n<l+1;++n)u[n]=0;if(r)for(n=this.start;c<a&&n<h;++c)u[n>>2]|=e[c]<<f[3&n++];else for(n=this.start;c<a&&n<h;++c)(s=e.charCodeAt(c))<128?u[n>>2]|=s<<f[3&n++]:(s<2048?u[n>>2]|=(192|s>>6)<<f[3&n++]:(s<55296||s>=57344?u[n>>2]|=(224|s>>12)<<f[3&n++]:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++c)),u[n>>2]|=(240|s>>18)<<f[3&n++],u[n>>2]|=(128|s>>12&63)<<f[3&n++]),u[n>>2]|=(128|s>>6&63)<<f[3&n++]),u[n>>2]|=(128|63&s)<<f[3&n++]);if(this.lastByteIndex=n,n>=h){for(this.start=n-h,this.block=u[l],n=0;n<l;++n)d[n]^=u[n];R(d),this.reset=!0}else this.start=n}return this},x.prototype.encode=function(t,e){var r=255&t,i=1,n=[r];for(t>>=8,r=255&t;r>0;)n.unshift(r),t>>=8,r=255&t,++i;return e?n.push(i):n.unshift(i),this.update(n),n.length},x.prototype.encodeString=function(e){var r,i=typeof e;if("string"!==i){if("object"===i){if(null===e)throw Error(t);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!o||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);r=!0}var n=0,s=e.length;if(r)n=s;else for(var u=0;u<e.length;++u){var f=e.charCodeAt(u);f<128?n+=1:f<2048?n+=2:f<55296||f>=57344?n+=3:(f=65536+((1023&f)<<10|1023&e.charCodeAt(++u)),n+=4)}return n+=this.encode(8*n),this.update(e),n},x.prototype.bytepad=function(t,e){for(var r=this.encode(e),i=0;i<t.length;++i)r+=this.encodeString(t[i]);var n=e-r%e,o=[];return o.length=n,this.update(o),this},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,i=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)i[e]^=t[e];R(i)}},x.prototype.toString=x.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,i=this.outputBlocks,n=this.extraBytes,o=0,u=0,f="";u<i;){for(o=0;o<e&&u<i;++o,++u)f+=s[(t=r[o])>>4&15]+s[15&t]+s[t>>12&15]+s[t>>8&15]+s[t>>20&15]+s[t>>16&15]+s[t>>28&15]+s[t>>24&15];u%e==0&&(R(r),o=0)}return n&&(f+=s[(t=r[o])>>4&15]+s[15&t],n>1&&(f+=s[t>>12&15]+s[t>>8&15]),n>2&&(f+=s[t>>20&15]+s[t>>16&15])),f},x.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,i=this.outputBlocks,n=this.extraBytes,o=0,s=0,u=this.outputBits>>3;t=new ArrayBuffer(n?i+1<<2:u);for(var f=new Uint32Array(t);s<i;){for(o=0;o<e&&s<i;++o,++s)f[s]=r[o];s%e==0&&R(r)}return n&&(f[o]=r[o],t=t.slice(0,u)),t},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.digest=x.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,i=this.s,n=this.outputBlocks,o=this.extraBytes,s=0,u=0,f=[];u<n;){for(s=0;s<r&&u<n;++s,++u)t=u<<2,e=i[s],f[t]=255&e,f[t+1]=e>>8&255,f[t+2]=e>>16&255,f[t+3]=e>>24&255;u%r==0&&R(i)}return o&&(t=u<<2,e=i[s],f[t]=255&e,o>1&&(f[t+1]=e>>8&255),o>2&&(f[t+2]=e>>16&255)),f},O.prototype=new x,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),x.prototype.finalize.call(this)};var R=function(t){var e,r,i,n,o,s,u,f,a,l,c,d,p,m,g,v,A,y,b,w,M,E,S,I,N,B,C,_,x,O,R,k,P,U,T,D,F,L,q,z,j,H,K,Q,J,G,Y,V,W,X,Z,$,tt,te,tr,ti,tn,to,ts,tu,tf,th,ta;for(i=0;i<48;i+=2)n=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],u=t[3]^t[13]^t[23]^t[33]^t[43],f=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],c=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],p=t[9]^t[19]^t[29]^t[39]^t[49],e=d^(s<<1|u>>>31),r=p^(u<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=n^(f<<1|a>>>31),r=o^(a<<1|f>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(l<<1|c>>>31),r=u^(c<<1|l>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=f^(d<<1|p>>>31),r=a^(p<<1|d>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=l^(n<<1|o>>>31),r=c^(o<<1|n>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,m=t[0],g=t[1],G=t[11]<<4|t[10]>>>28,Y=t[10]<<4|t[11]>>>28,_=t[20]<<3|t[21]>>>29,x=t[21]<<3|t[20]>>>29,tu=t[31]<<9|t[30]>>>23,tf=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,K=t[41]<<18|t[40]>>>14,U=t[2]<<1|t[3]>>>31,T=t[3]<<1|t[2]>>>31,v=t[13]<<12|t[12]>>>20,A=t[12]<<12|t[13]>>>20,V=t[22]<<10|t[23]>>>22,W=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,R=t[32]<<13|t[33]>>>19,th=t[42]<<2|t[43]>>>30,ta=t[43]<<2|t[42]>>>30,te=t[5]<<30|t[4]>>>2,tr=t[4]<<30|t[5]>>>2,D=t[14]<<6|t[15]>>>26,F=t[15]<<6|t[14]>>>26,y=t[25]<<11|t[24]>>>21,b=t[24]<<11|t[25]>>>21,X=t[34]<<15|t[35]>>>17,Z=t[35]<<15|t[34]>>>17,k=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,I=t[6]<<28|t[7]>>>4,N=t[7]<<28|t[6]>>>4,ti=t[17]<<23|t[16]>>>9,tn=t[16]<<23|t[17]>>>9,L=t[26]<<25|t[27]>>>7,q=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,Q=t[8]<<27|t[9]>>>5,J=t[9]<<27|t[8]>>>5,B=t[18]<<20|t[19]>>>12,C=t[19]<<20|t[18]>>>12,to=t[29]<<7|t[28]>>>25,ts=t[28]<<7|t[29]>>>25,z=t[38]<<8|t[39]>>>24,j=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=m^~v&y,t[1]=g^~A&b,t[10]=I^~B&_,t[11]=N^~C&x,t[20]=U^~D&L,t[21]=T^~F&q,t[30]=Q^~G&V,t[31]=J^~Y&W,t[40]=te^~ti&to,t[41]=tr^~tn&ts,t[2]=v^~y&w,t[3]=A^~b&M,t[12]=B^~_&O,t[13]=C^~x&R,t[22]=D^~L&z,t[23]=F^~q&j,t[32]=G^~V&X,t[33]=Y^~W&Z,t[42]=ti^~to&tu,t[43]=tn^~ts&tf,t[4]=y^~w&E,t[5]=b^~M&S,t[14]=_^~O&k,t[15]=x^~R&P,t[24]=L^~z&H,t[25]=q^~j&K,t[34]=V^~X&$,t[35]=W^~Z&tt,t[44]=to^~tu&th,t[45]=ts^~tf&ta,t[6]=w^~E&m,t[7]=M^~S&g,t[16]=O^~k&I,t[17]=R^~P&N,t[26]=z^~H&U,t[27]=j^~K&T,t[36]=X^~$&Q,t[37]=Z^~tt&J,t[46]=tu^~th&te,t[47]=tf^~ta&tr,t[8]=E^~m&v,t[9]=S^~g&A,t[18]=k^~I&B,t[19]=P^~N&C,t[28]=H^~U&D,t[29]=K^~T&F,t[38]=$^~Q&G,t[39]=tt^~J&Y,t[48]=th^~te&ti,t[49]=ta^~tr&tn,t[0]^=h[i],t[1]^=h[i+1]};if(n)th.exports=w;else for(E=0;E<M.length;++E)r[M[E]]=w[M[E]]}();var ta=th.exports;let tl=!1,tc=!1,td={debug:1,default:2,info:2,warning:3,error:4,off:5},tp=2,tm=null,tg=function(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw Error("bad normalize")}catch{t.push(e)}}),t.length)throw Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(s=l||(l={})).DEBUG="DEBUG",s.INFO="INFO",s.WARNING="WARNING",s.ERROR="ERROR",s.OFF="OFF",(u=c||(c={})).UNKNOWN_ERROR="UNKNOWN_ERROR",u.NOT_IMPLEMENTED="NOT_IMPLEMENTED",u.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",u.NETWORK_ERROR="NETWORK_ERROR",u.SERVER_ERROR="SERVER_ERROR",u.TIMEOUT="TIMEOUT",u.BUFFER_OVERRUN="BUFFER_OVERRUN",u.NUMERIC_FAULT="NUMERIC_FAULT",u.MISSING_NEW="MISSING_NEW",u.INVALID_ARGUMENT="INVALID_ARGUMENT",u.MISSING_ARGUMENT="MISSING_ARGUMENT",u.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",u.CALL_EXCEPTION="CALL_EXCEPTION",u.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",u.NONCE_EXPIRED="NONCE_EXPIRED",u.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",u.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",u.TRANSACTION_REPLACED="TRANSACTION_REPLACED",u.ACTION_REJECTED="ACTION_REJECTED";let tv="0123456789abcdef";class tA{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){let r=t.toLowerCase();null==td[r]&&this.throwArgumentError("invalid log level name","logLevel",t),tp>td[r]||console.log.apply(console,e)}debug(...t){this._log(tA.levels.DEBUG,t)}info(...t){this._log(tA.levels.INFO,t)}warn(...t){this._log(tA.levels.WARNING,t)}makeError(t,e,r){if(tc)return this.makeError("censored error",e,{});e||(e=tA.errors.UNKNOWN_ERROR),r||(r={});let i=[];Object.keys(r).forEach(t=>{let e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t<e.length;t++)r+=tv[e[t]>>4]+tv[15&e[t]];i.push(t+"=Uint8Array(0x"+r+")")}else i.push(t+"="+JSON.stringify(e))}catch{i.push(t+"="+JSON.stringify(r[t].toString()))}}),i.push(`code=${e}`),i.push(`version=${this.version}`);let n=t,o="";switch(e){case c.NUMERIC_FAULT:{o="NUMERIC_FAULT";let e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":o+="-"+e;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:o=e}o&&(t+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(t+=" ("+i.join(", ")+")");let s=Error(t);return s.reason=n,s.code=e,Object.keys(r).forEach(function(t){s[t]=r[t]}),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,tA.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,i){t||this.throwError(e,r,i)}assertArgument(t,e,r,i){t||this.throwArgumentError(e,r,i)}checkNormalize(t){tg&&this.throwError("platform missing String.prototype.normalize",tA.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:tg})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,tA.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,tA.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,tA.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,tA.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||null==t)&&this.throwError("missing new",tA.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",tA.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||null==t)&&this.throwError("missing new",tA.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return tm||(tm=new tA("logger/5.7.0")),tm}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",tA.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),tl){if(!t)return;this.globalLogger().throwError("error censorship permanent",tA.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}tc=!!t,tl=!!e}static setLogLevel(t){let e=td[t.toLowerCase()];if(null==e){tA.globalLogger().warn("invalid log level - "+t);return}tp=e}static from(t){return new tA(t)}}tA.errors=c,tA.levels=l;let ty=new tA("bytes/5.7.0");function tb(t){return!!t.toHexString}function tw(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return tw(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function tM(t){return"number"==typeof t&&t==t&&t%1==0}function tE(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!tM(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){let r=t[e];if(!tM(r)||r<0||r>=256)return!1}return!0}function tS(t,e){if(e||(e={}),"number"==typeof t){ty.checkSafeUint53(t,"invalid arrayify value");let e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),tw(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),tb(t)&&(t=t.toHexString()),tI(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":ty.throwArgumentError("hex data is odd-length","value",t));let i=[];for(let t=0;t<r.length;t+=2)i.push(parseInt(r.substring(t,t+2),16));return tw(new Uint8Array(i))}return tE(t)?tw(new Uint8Array(t)):ty.throwArgumentError("invalid arrayify value","value",t)}function tI(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}let tN="0123456789abcdef";function tB(t,e){if(e||(e={}),"number"==typeof t){ty.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=tN[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"==typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),tb(t))return t.toHexString();if(tI(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":ty.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(tE(t)){let e="0x";for(let r=0;r<t.length;r++){let i=t[r];e+=tN[(240&i)>>4]+tN[15&i]}return e}return ty.throwArgumentError("invalid hexlify value","value",t)}function tC(t,e,r){return"string"!=typeof t?t=tB(t):(!tI(t)||t.length%2)&&ty.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function t_(t,e){for("string"!=typeof t?t=tB(t):tI(t)||ty.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&ty.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function tx(t){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(tI(t)&&!(t.length%2)||tE(t)){let r=tS(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=tB(r.slice(0,32)),e.s=tB(r.slice(32,64))):65===r.length?(e.r=tB(r.slice(0,32)),e.s=tB(r.slice(32,64)),e.v=r[64]):ty.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:ty.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=tB(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){let r=function(t,e){(t=tS(t)).length>e&&ty.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(e);return r.set(t,e-t.length),tw(r)}(tS(e._vs),32);e._vs=tB(r);let i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&ty.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;let n=tB(r);null==e.s?e.s=n:e.s!==n&&ty.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?ty.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{let r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&ty.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&tI(e.r)?e.r=t_(e.r,32):ty.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&tI(e.s)?e.s=t_(e.s,32):ty.throwArgumentError("signature missing or invalid s","signature",t);let r=tS(e.s);r[0]>=128&&ty.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);let i=tB(r);e._vs&&(tI(e._vs)||ty.throwArgumentError("signature invalid _vs","signature",t),e._vs=t_(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&ty.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function tO(t){return"0x"+ta.keccak_256(tS(t))}var tR={exports:{}},tk=function(t){var e=t.default;if("function"==typeof e){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})}),r}(Object.freeze({__proto__:null,default:{}}));!function(t,e){function r(t,e){if(!t)throw Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,e,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))}"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{a="u">typeof window&&"u">typeof window.Buffer?window.Buffer:tk.Buffer}catch{}function o(t,e){var i=t.charCodeAt(e);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+t)}function s(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,i,n){for(var o=0,s=0,u=Math.min(t.length,i),f=e;f<u;f++){var h=t.charCodeAt(f)-48;o*=n,s=h>=49?h-49+10:h>=17?h-17+10:h,r(h>=0&&s<n,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return 0>t.cmp(e)?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},n.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},n.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,u=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<u&67108863,this.words[o+1]=s>>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<u&67108863,this.words[o+1]=s>>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);return this._strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,u=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=s(t,e,i)<<o,this.words[u]|=67108863&n,o>=18?(o-=18,u+=1,this.words[u]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=s(t,e,i)<<o,this.words[u]|=67108863&n,o>=18?(o-=18,u+=1,this.words[u]|=n>>>26):o+=8;this._strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,f=Math.min(o,o-s)+r,h=0,a=r;a<f;a+=i)h=u(t,a,a+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,a,t.length,e),a=0;a<s;a++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},n.prototype.copy=function(t){t.words=Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype._move=function(t){f(t,this)},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)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},"u">typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch{n.prototype.inspect=h}else n.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var a,l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,u=67108863&s,f=s/67108864|0;r.words[0]=u;for(var h=1;h<i;h++){for(var a=f>>>26,l=67108863&f,c=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=c;d++){var p=h-d|0;a+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,f=0|a}return 0!==f?r.words[h]=0|f:r.length--,r._strip()}n.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var i,n=0,o=0,s=0;s<this.length;s++){var u=this.words[s],f=((u<<n|o)&16777215).toString(16);o=u>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?l[6-f.length]+f+i:f+i}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],a=d[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(a).toString(t);i=(p=p.idivn(a)).isZero()?m+i:l[h-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16,2)},a&&(n.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=t.allocUnsafe?t.allocUnsafe(o):new t(o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r<t.length)for(t[r++]=i;r<t.length;)t[r++]=0},n.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).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(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},n.prototype.ior=function(t){return r((this.negative|t.negative)==0),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},n.prototype.iand=function(t){return r((this.negative|t.negative)==0),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this._strip()},n.prototype.ixor=function(t){return r((this.negative|t.negative)==0),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),e?this.words[i]=this.words[i]|1<<n:this.words[i]=this.words[i]&~(1<<n),this._strip()},n.prototype.iadd=function(t){if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var e,r,i,n=0,o=0;o<i.length;o++)e=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<r.length;o++)e=(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e,r,i=this.iadd(t);return t.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(e=this,r=t):(e=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(i=(0|e.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&i;for(;0!==o&&s<e.length;s++)o=(i=(0|e.words[s])+o)>>26,this.words[s]=67108863&i;if(0===o&&s<e.length&&e!==this)for(;s<e.length;s++)this.words[s]=e.words[s];return this.length=Math.max(this.length,s),e!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,r){var i,n,o,s=t.words,u=e.words,f=r.words,h=0,a=0|s[0],l=8191&a,c=a>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,A=g>>>13,y=0|s[3],b=8191&y,w=y>>>13,M=0|s[4],E=8191&M,S=M>>>13,I=0|s[5],N=8191&I,B=I>>>13,C=0|s[6],_=8191&C,x=C>>>13,O=0|s[7],R=8191&O,k=O>>>13,P=0|s[8],U=8191&P,T=P>>>13,D=0|s[9],F=8191&D,L=D>>>13,q=0|u[0],z=8191&q,j=q>>>13,H=0|u[1],K=8191&H,Q=H>>>13,J=0|u[2],G=8191&J,Y=J>>>13,V=0|u[3],W=8191&V,X=V>>>13,Z=0|u[4],$=8191&Z,tt=Z>>>13,te=0|u[5],tr=8191&te,ti=te>>>13,tn=0|u[6],to=8191&tn,ts=tn>>>13,tu=0|u[7],tf=8191&tu,th=tu>>>13,ta=0|u[8],tl=8191&ta,tc=ta>>>13,td=0|u[9],tp=8191&td,tm=td>>>13;r.negative=t.negative^e.negative,r.length=19,i=Math.imul(l,z),n=(n=Math.imul(l,j))+Math.imul(c,z)|0,o=Math.imul(c,j);var tg=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tg>>>26)|0,tg&=67108863,i=Math.imul(p,z),n=(n=Math.imul(p,j))+Math.imul(m,z)|0,o=Math.imul(m,j),i=i+Math.imul(l,K)|0,n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,K)|0,o=o+Math.imul(c,Q)|0;var tv=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tv>>>26)|0,tv&=67108863,i=Math.imul(v,z),n=(n=Math.imul(v,j))+Math.imul(A,z)|0,o=Math.imul(A,j),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Q)|0,i=i+Math.imul(l,G)|0,n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,G)|0,o=o+Math.imul(c,Y)|0;var tA=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tA>>>26)|0,tA&=67108863,i=Math.imul(b,z),n=(n=Math.imul(b,j))+Math.imul(w,z)|0,o=Math.imul(w,j),i=i+Math.imul(v,K)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,Y)|0,i=i+Math.imul(l,W)|0,n=(n=n+Math.imul(l,X)|0)+Math.imul(c,W)|0,o=o+Math.imul(c,X)|0;var ty=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(ty>>>26)|0,ty&=67108863,i=Math.imul(E,z),n=(n=Math.imul(E,j))+Math.imul(S,z)|0,o=Math.imul(S,j),i=i+Math.imul(b,K)|0,n=(n=n+Math.imul(b,Q)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Q)|0,i=i+Math.imul(v,G)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Y)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,X)|0,i=i+Math.imul(l,$)|0,n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0,o=o+Math.imul(c,tt)|0;var tb=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tb>>>26)|0,tb&=67108863,i=Math.imul(N,z),n=(n=Math.imul(N,j))+Math.imul(B,z)|0,o=Math.imul(B,j),i=i+Math.imul(E,K)|0,n=(n=n+Math.imul(E,Q)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Q)|0,i=i+Math.imul(b,G)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Y)|0,i=i+Math.imul(v,W)|0,n=(n=n+Math.imul(v,X)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0,i=i+Math.imul(l,tr)|0,n=(n=n+Math.imul(l,ti)|0)+Math.imul(c,tr)|0,o=o+Math.imul(c,ti)|0;var tw=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tw>>>26)|0,tw&=67108863,i=Math.imul(_,z),n=(n=Math.imul(_,j))+Math.imul(x,z)|0,o=Math.imul(x,j),i=i+Math.imul(N,K)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Q)|0,i=i+Math.imul(E,G)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,Y)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,X)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(p,tr)|0,n=(n=n+Math.imul(p,ti)|0)+Math.imul(m,tr)|0,o=o+Math.imul(m,ti)|0,i=i+Math.imul(l,to)|0,n=(n=n+Math.imul(l,ts)|0)+Math.imul(c,to)|0,o=o+Math.imul(c,ts)|0;var tM=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tM>>>26)|0,tM&=67108863,i=Math.imul(R,z),n=(n=Math.imul(R,j))+Math.imul(k,z)|0,o=Math.imul(k,j),i=i+Math.imul(_,K)|0,n=(n=n+Math.imul(_,Q)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(N,G)|0,n=(n=n+Math.imul(N,Y)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Y)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,X)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,X)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(v,tr)|0,n=(n=n+Math.imul(v,ti)|0)+Math.imul(A,tr)|0,o=o+Math.imul(A,ti)|0,i=i+Math.imul(p,to)|0,n=(n=n+Math.imul(p,ts)|0)+Math.imul(m,to)|0,o=o+Math.imul(m,ts)|0,i=i+Math.imul(l,tf)|0,n=(n=n+Math.imul(l,th)|0)+Math.imul(c,tf)|0,o=o+Math.imul(c,th)|0;var tE=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tE>>>26)|0,tE&=67108863,i=Math.imul(U,z),n=(n=Math.imul(U,j))+Math.imul(T,z)|0,o=Math.imul(T,j),i=i+Math.imul(R,K)|0,n=(n=n+Math.imul(R,Q)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,Q)|0,i=i+Math.imul(_,G)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(N,W)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,X)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,tt)|0,i=i+Math.imul(b,tr)|0,n=(n=n+Math.imul(b,ti)|0)+Math.imul(w,tr)|0,o=o+Math.imul(w,ti)|0,i=i+Math.imul(v,to)|0,n=(n=n+Math.imul(v,ts)|0)+Math.imul(A,to)|0,o=o+Math.imul(A,ts)|0,i=i+Math.imul(p,tf)|0,n=(n=n+Math.imul(p,th)|0)+Math.imul(m,tf)|0,o=o+Math.imul(m,th)|0,i=i+Math.imul(l,tl)|0,n=(n=n+Math.imul(l,tc)|0)+Math.imul(c,tl)|0,o=o+Math.imul(c,tc)|0;var tS=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tS>>>26)|0,tS&=67108863,i=Math.imul(F,z),n=(n=Math.imul(F,j))+Math.imul(L,z)|0,o=Math.imul(L,j),i=i+Math.imul(U,K)|0,n=(n=n+Math.imul(U,Q)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,Q)|0,i=i+Math.imul(R,G)|0,n=(n=n+Math.imul(R,Y)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,Y)|0,i=i+Math.imul(_,W)|0,n=(n=n+Math.imul(_,X)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,i=i+Math.imul(E,tr)|0,n=(n=n+Math.imul(E,ti)|0)+Math.imul(S,tr)|0,o=o+Math.imul(S,ti)|0,i=i+Math.imul(b,to)|0,n=(n=n+Math.imul(b,ts)|0)+Math.imul(w,to)|0,o=o+Math.imul(w,ts)|0,i=i+Math.imul(v,tf)|0,n=(n=n+Math.imul(v,th)|0)+Math.imul(A,tf)|0,o=o+Math.imul(A,th)|0,i=i+Math.imul(p,tl)|0,n=(n=n+Math.imul(p,tc)|0)+Math.imul(m,tl)|0,o=o+Math.imul(m,tc)|0,i=i+Math.imul(l,tp)|0,n=(n=n+Math.imul(l,tm)|0)+Math.imul(c,tp)|0,o=o+Math.imul(c,tm)|0;var tI=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tI>>>26)|0,tI&=67108863,i=Math.imul(F,K),n=(n=Math.imul(F,Q))+Math.imul(L,K)|0,o=Math.imul(L,Q),i=i+Math.imul(U,G)|0,n=(n=n+Math.imul(U,Y)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Y)|0,i=i+Math.imul(R,W)|0,n=(n=n+Math.imul(R,X)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(N,tr)|0,n=(n=n+Math.imul(N,ti)|0)+Math.imul(B,tr)|0,o=o+Math.imul(B,ti)|0,i=i+Math.imul(E,to)|0,n=(n=n+Math.imul(E,ts)|0)+Math.imul(S,to)|0,o=o+Math.imul(S,ts)|0,i=i+Math.imul(b,tf)|0,n=(n=n+Math.imul(b,th)|0)+Math.imul(w,tf)|0,o=o+Math.imul(w,th)|0,i=i+Math.imul(v,tl)|0,n=(n=n+Math.imul(v,tc)|0)+Math.imul(A,tl)|0,o=o+Math.imul(A,tc)|0,i=i+Math.imul(p,tp)|0,n=(n=n+Math.imul(p,tm)|0)+Math.imul(m,tp)|0,o=o+Math.imul(m,tm)|0;var tN=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tN>>>26)|0,tN&=67108863,i=Math.imul(F,G),n=(n=Math.imul(F,Y))+Math.imul(L,G)|0,o=Math.imul(L,Y),i=i+Math.imul(U,W)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,X)|0,i=i+Math.imul(R,$)|0,n=(n=n+Math.imul(R,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,tr)|0,n=(n=n+Math.imul(_,ti)|0)+Math.imul(x,tr)|0,o=o+Math.imul(x,ti)|0,i=i+Math.imul(N,to)|0,n=(n=n+Math.imul(N,ts)|0)+Math.imul(B,to)|0,o=o+Math.imul(B,ts)|0,i=i+Math.imul(E,tf)|0,n=(n=n+Math.imul(E,th)|0)+Math.imul(S,tf)|0,o=o+Math.imul(S,th)|0,i=i+Math.imul(b,tl)|0,n=(n=n+Math.imul(b,tc)|0)+Math.imul(w,tl)|0,o=o+Math.imul(w,tc)|0,i=i+Math.imul(v,tp)|0,n=(n=n+Math.imul(v,tm)|0)+Math.imul(A,tp)|0,o=o+Math.imul(A,tm)|0;var tB=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tB>>>26)|0,tB&=67108863,i=Math.imul(F,W),n=(n=Math.imul(F,X))+Math.imul(L,W)|0,o=Math.imul(L,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,i=i+Math.imul(R,tr)|0,n=(n=n+Math.imul(R,ti)|0)+Math.imul(k,tr)|0,o=o+Math.imul(k,ti)|0,i=i+Math.imul(_,to)|0,n=(n=n+Math.imul(_,ts)|0)+Math.imul(x,to)|0,o=o+Math.imul(x,ts)|0,i=i+Math.imul(N,tf)|0,n=(n=n+Math.imul(N,th)|0)+Math.imul(B,tf)|0,o=o+Math.imul(B,th)|0,i=i+Math.imul(E,tl)|0,n=(n=n+Math.imul(E,tc)|0)+Math.imul(S,tl)|0,o=o+Math.imul(S,tc)|0,i=i+Math.imul(b,tp)|0,n=(n=n+Math.imul(b,tm)|0)+Math.imul(w,tp)|0,o=o+Math.imul(w,tm)|0;var tC=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tC>>>26)|0,tC&=67108863,i=Math.imul(F,$),n=(n=Math.imul(F,tt))+Math.imul(L,$)|0,o=Math.imul(L,tt),i=i+Math.imul(U,tr)|0,n=(n=n+Math.imul(U,ti)|0)+Math.imul(T,tr)|0,o=o+Math.imul(T,ti)|0,i=i+Math.imul(R,to)|0,n=(n=n+Math.imul(R,ts)|0)+Math.imul(k,to)|0,o=o+Math.imul(k,ts)|0,i=i+Math.imul(_,tf)|0,n=(n=n+Math.imul(_,th)|0)+Math.imul(x,tf)|0,o=o+Math.imul(x,th)|0,i=i+Math.imul(N,tl)|0,n=(n=n+Math.imul(N,tc)|0)+Math.imul(B,tl)|0,o=o+Math.imul(B,tc)|0,i=i+Math.imul(E,tp)|0,n=(n=n+Math.imul(E,tm)|0)+Math.imul(S,tp)|0,o=o+Math.imul(S,tm)|0;var t_=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(t_>>>26)|0,t_&=67108863,i=Math.imul(F,tr),n=(n=Math.imul(F,ti))+Math.imul(L,tr)|0,o=Math.imul(L,ti),i=i+Math.imul(U,to)|0,n=(n=n+Math.imul(U,ts)|0)+Math.imul(T,to)|0,o=o+Math.imul(T,ts)|0,i=i+Math.imul(R,tf)|0,n=(n=n+Math.imul(R,th)|0)+Math.imul(k,tf)|0,o=o+Math.imul(k,th)|0,i=i+Math.imul(_,tl)|0,n=(n=n+Math.imul(_,tc)|0)+Math.imul(x,tl)|0,o=o+Math.imul(x,tc)|0,i=i+Math.imul(N,tp)|0,n=(n=n+Math.imul(N,tm)|0)+Math.imul(B,tp)|0,o=o+Math.imul(B,tm)|0;var tx=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tx>>>26)|0,tx&=67108863,i=Math.imul(F,to),n=(n=Math.imul(F,ts))+Math.imul(L,to)|0,o=Math.imul(L,ts),i=i+Math.imul(U,tf)|0,n=(n=n+Math.imul(U,th)|0)+Math.imul(T,tf)|0,o=o+Math.imul(T,th)|0,i=i+Math.imul(R,tl)|0,n=(n=n+Math.imul(R,tc)|0)+Math.imul(k,tl)|0,o=o+Math.imul(k,tc)|0,i=i+Math.imul(_,tp)|0,n=(n=n+Math.imul(_,tm)|0)+Math.imul(x,tp)|0,o=o+Math.imul(x,tm)|0;var tO=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tO>>>26)|0,tO&=67108863,i=Math.imul(F,tf),n=(n=Math.imul(F,th))+Math.imul(L,tf)|0,o=Math.imul(L,th),i=i+Math.imul(U,tl)|0,n=(n=n+Math.imul(U,tc)|0)+Math.imul(T,tl)|0,o=o+Math.imul(T,tc)|0,i=i+Math.imul(R,tp)|0,n=(n=n+Math.imul(R,tm)|0)+Math.imul(k,tp)|0,o=o+Math.imul(k,tm)|0;var tR=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tR>>>26)|0,tR&=67108863,i=Math.imul(F,tl),n=(n=Math.imul(F,tc))+Math.imul(L,tl)|0,o=Math.imul(L,tc),i=i+Math.imul(U,tp)|0,n=(n=n+Math.imul(U,tm)|0)+Math.imul(T,tp)|0,o=o+Math.imul(T,tm)|0;var tk=(h+i|0)+((8191&n)<<13)|0;h=(o+(n>>>13)|0)+(tk>>>26)|0,tk&=67108863,i=Math.imul(F,tp),n=(n=Math.imul(F,tm))+Math.imul(L,tp)|0,o=Math.imul(L,tm);var tP=(h+i|0)+((8191&n)<<13)|0;return h=(o+(n>>>13)|0)+(tP>>>26)|0,tP&=67108863,f[0]=tg,f[1]=tv,f[2]=tA,f[3]=ty,f[4]=tb,f[5]=tw,f[6]=tM,f[7]=tE,f[8]=tS,f[9]=tI,f[10]=tN,f[11]=tB,f[12]=tC,f[13]=t_,f[14]=tx,f[15]=tO,f[16]=tR,f[17]=tk,f[18]=tP,0!==h&&(f[19]=h,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var u=67108863&i,f=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=f;h++){var a=o-h,l=(0|t.words[a])*(0|e.words[h]),c=67108863&l;s=s+(l/67108864|0)|0,u=67108863&(c=c+u|0),n+=(s=s+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=u,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}Math.imul||(m=p),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):i<63?p(this,t,e):g(this,t,e)},n.prototype.mul=function(t){var e=new n(null);return e.words=Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=Array(this.length+t.length),g(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,s=(67108863&o)+(67108863&i);i>>=26,i+=(o/67108864|0)+(s>>>26),this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),e?this.ineg():this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=t.words[i]>>>n&1}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var o=r.sq