PageSourceSearch

https://deso-starter.pages.dev/_next/static/chunks/346-57ee9a5de2daef57.js

js deso-starter.pages.dev collected 2026-10-03 06:40:22 UTC 184,134 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[346],{340:(t,e,r)=>{"use strict";e.sha1=r(4180),e.sha224=r(1379),e.sha256=r(1574),e.sha384=r(6054),e.sha512=r(8839)},1275:(t,e,r)=>{"use strict";var i=r(2539).rotr32;function n(t,e,r){return t&e^t&r^e&r}e.ft_1=function(t,e,r,i){var o;return 0===t?(o=e)&r^~o&i:1===t||3===t?e^r^i:2===t?n(e,r,i):void 0},e.ch32=function(t,e,r){return t&e^~t&r},e.maj32=n,e.p32=function(t,e,r){return t^e^r},e.s0_256=function(t){return i(t,2)^i(t,13)^i(t,22)},e.s1_256=function(t){return i(t,6)^i(t,11)^i(t,25)},e.g0_256=function(t){return i(t,7)^i(t,18)^t>>>3},e.g1_256=function(t){return i(t,17)^i(t,19)^t>>>10}},1309:(t,e,r)=>{"use strict";r.d(e,{pV:()=>T,uz:()=>y,BF:()=>x,VE:()=>m,Yc:()=>P,L2:()=>U,kg:()=>D,ng:()=>R,WW:()=>I,_n:()=>w,gS:()=>E,Qx:()=>A,_S:()=>_,qS:()=>S,QJ:()=>v,al:()=>g,R8:()=>b});var i=r(4526),n=r(7228);class o extends n.Vw{constructor(t,e,r,i){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,n.O8)(this.buffer)}update(t){(0,i.CC)(this);let{view:e,buffer:r,blockLen:o}=this,s=(t=(0,n.ZJ)(t)).length;for(let i=0;i<s;){let f=Math.min(o-this.pos,s-i);if(f===o){let e=(0,n.O8)(t);for(;o<=s-i;i+=o)this.process(e,i);continue}r.set(t.subarray(i,i+f),this.pos),this.pos+=f,i+=f,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,i.CC)(this),(0,i.Ht)(t,this),this.finished=!0;let{buffer:e,view:r,blockLen:o,isLE:s}=this,{pos:f}=this;e[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>o-f&&(this.process(r,0),f=0);for(let t=f;t<o;t++)e[t]=0;!function(t,e,r,i){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,i);let n=BigInt(32),o=BigInt(0xffffffff),s=Number(r>>n&o),f=Number(r&o),a=4*!!i,h=4*!i;t.setUint32(e+a,s,i),t.setUint32(e+h,f,i)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);let a=(0,n.O8)(t),h=this.outputLen;if(h%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=h/4,l=this.get();if(u>l.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<u;t++)a.setUint32(4*t,l[t],s)}digest(){let{buffer:t,outputLen:e}=this;this.digestInto(t);let r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:e,buffer:r,length:i,finished:n,destroyed:o,pos:s}=this;return t.length=i,t.pos=s,t.finished=n,t.destroyed=o,i%e&&t.buffer.set(r),t}}let s=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),f=new Uint32Array([0x6a09e66
17,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),a=new Uint32Array(64);class h extends o{constructor(){super(64,32,8,!1),this.A=0|f[0],this.B=0|f[1],this.C=0|f[2],this.D=0|f[3],this.E=0|f[4],this.F=0|f[5],this.G=0|f[6],this.H=0|f[7]}get(){let{A:t,B:e,C:r,D:i,E:n,F:o,G:s,H:f}=this;return[t,e,r,i,n,o,s,f]}set(t,e,r,i,n,o,s,f){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|s,this.H=0|f}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){let e=a[t-15],r=a[t-2],i=(0,n.Ow)(e,7)^(0,n.Ow)(e,18)^e>>>3,o=(0,n.Ow)(r,17)^(0,n.Ow)(r,19)^r>>>10;a[t]=o+a[t-7]+i+a[t-16]|0}let{A:r,B:i,C:o,D:f,E:h,F:u,G:l,H:c}=this;for(let t=0;t<64;t++){var d,p,m,g;let e=c+((0,n.Ow)(h,6)^(0,n.Ow)(h,11)^(0,n.Ow)(h,25))+((d=h)&u^~d&l)+s[t]+a[t]|0,y=((0,n.Ow)(r,2)^(0,n.Ow)(r,13)^(0,n.Ow)(r,22))+((p=r)&(m=i)^p&(g=o)^m&g)|0;c=l,l=u,u=h,h=f+e|0,f=o,o=i,i=r,r=e+y|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,f=f+this.D|0,h=h+this.E|0,u=u+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(r,i,o,f,h,u,l,c)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let u=(0,n.ld)(()=>new h);var l=r(7773),c=r(6922),d=r(7267),p=r(7863);function m(t,e){void 0===e&&(e=t.reduce((t,e)=>t+e.length,0));let r=new Uint8Array(e),i=0;for(let n=0;n<t.length;n++){if(i+t[n].length>e){r.set(t[n].slice(0,e-i),i);break}r.set(t[n],i),i+=t[n].length}return r}let g=t=>{let e=[];for(;t>=128;)e.push(Number(BigInt(t)&BigInt(255)|BigInt(128))),t=Number(BigInt(t)>>BigInt(7));return e.push(0|t),new Uint8Array(e)},y=t=>{let e=BigInt(0),r=BigInt(0);for(let i=0;;i++){let n=t[i];if(i>9||9==i&&n>1)throw Error("uint64 overflow");if(n<128)return[Number(BigInt(e)|BigInt(n)<<BigInt(r)),t.slice(i+1)];e|=BigInt(127&n)<<BigInt(r),r+=BigInt(7)}},v=t=>{let e=[];for(;BigInt(t)>=BigInt(255);)e.push(Number(BigInt(t)&BigInt(255))),t=Number(BigInt(t)>>BigInt(8));for(e.push(Number(BigInt(t)|BigInt(0)));e.length<8;)e.push(0);return new Uint8Array(e.reverse())},b=t=>{let e=BigInt(t)<<BigInt(1);return t<0&&(e=~e),g(Number(e))},x=t=>{let[e,r]=y(t),i=BigInt(e)>>BigInt(1);return 1&e&&(i=~i),[Number(i),r]},w=t=>{let e=t?M(t):l.Wp.randomBytes(32);return{seedHex:l.Wp.bytesToHex(e),private:e,public:(0,l.lG)(e,!0)}},M=t=>"string"==typeof t?l.Wp.hexToBytes(t):t,A=t=>u(u("string"==typeof t?l.Wp.hexToBytes(t):t)),E=(t,e)=>{let r=new Uint8Array([...d.$X[e?.network??"mainnet"].deso,...t]),i=A(r);return c.encode(m([r,i],r.length+4))},_=(t,e)=>(0,l._S)(t,e,{canonical:!0,der:!0,extraEntropy:!0,recovered:!0}),S=async(t,e,r)=>{let i=l.Wp.hexToBytes(t),[n,o]=p.DF.fromBytes(i),s=i.length-o.length-1,f=i.slice(0,s),a=A(i),h=l.Wp.bytesToHex(a),u=l.Wp.hexToBytes(e),[c,d]=await _(h,u),m=g(c.length);r?.isDerivedKey&&(c[0]+=1+d);let y=l.Wp.concatBytes(f,m,c,o);return l.Wp.bytesToHex(y)},I=async(t,e,{derivedPublicKeyBase58Check:r,expiration:i})=>{let n=JSON.stringify({alg:e,typ:"JWT"}),o=Math.floor(Date.now()/1e3),s=JSON.stringify({...r?{derivedPublicKeyBase58Check:r}:{},iat:o,exp:o+1800}),f=`${N(n)}.${N(s)}`,[a]=await _(l.Wp.bytesToHex(u(new Uint8Array(new TextEncoder().encode(f)))),l.Wp.hexToBytes(t)),h=function(t){let e=3,r=t[3],i=e+=1,n=t[e+=r+1],o=e+=1;e+=n;let s=32-r,f=32-n,a=new Uint8Array(s+r+f+n);for(e=0;e<s;++e)a[e]=0;a.set(t.slice(i+Math.max(-s,0),i+r),e),e=32;for(let t=e;e<t+f;++e)a[e]=0;return a.set(t.slice(o+Math.max(-f,0),o+n),e),N(a.reduce((t,e)=>t+String.fromCharCode(e),""))}(a);return`${f}.${h}`};function N(t){return window.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}let R=(t,e,r)=>{let i=L(l.Wp.hexToBytes(t),T(e));return O((0,l.lG)(i),r)},O=async(t,e)=>{let r=l.Wp.randomBytes(32),i=(0,l.lG)(r),n=L(r,"string"==typeof t?T(t):t),o=n.slice(0,16),s=l.Wp.randomBytes(16),f=u(n.slice(16)),a=new TextEncoder().encode(e),h=await globalThis.crypto.subtle.importKey("raw",o,"AES-CTR",!0,["encrypt"]),c=await globalThis.crypto.subtle.encrypt({name:"AES-CTR",counter:s,length:128},h,a),d=await l.Wp.hmacSha256(f,new Uint8Array([...s,...new Uint8Array(c)]));return l.Wp.bytesToHex(new Uint8Array([...i,...s,...new Uint8Array(c),...d]))},T=t=>{let e=c.decode(t),r=e.slice(0,-4),i=e.slice(-4),n=A(r);
1if(i[0]^n[0]|i[1]^n[1]|i[2]^n[2]|i[3]^n[3])throw Error("Invalid checksum");return l.bR.fromHex(l.Wp.bytesToHex(r.slice(3))).toRawBytes(!1)},k=(t,e)=>{if(t.length!==e.length)return!1;for(let r=0;r<e.length;r++)if(t[r]!==e[r])return!1;return!0},U=async(t,e,r)=>{let i=l.Wp.hexToBytes(t),n=await T(e);return P(await L(i,n),r)},P=async(t,e,{retrying:r=!1}={})=>{let i=l.Wp.hexToBytes(e);if(i.length<113)throw Error("invalid cipher text. data too small.");if(!(i[0]>=2&&i[0]<=4)){if(!r)return P(t,new TextDecoder().decode(i),{retrying:!0});throw Error("invalid cipher text.")}let n=M(t),o=i.slice(0,65),s=i.length-113,f=i.slice(65,81),a=i.slice(65,81+s),h=a.slice(16),c=i.slice(81+s),d=await L(n,o),p=d.slice(0,16),m=u(d.slice(16));if(!k(c,await l.Wp.hmacSha256(m,a)))throw Error("incorrect MAC");let g=await globalThis.crypto.subtle.importKey("raw",p,"AES-CTR",!0,["decrypt"]),y=await globalThis.crypto.subtle.decrypt({name:"AES-CTR",counter:f,length:128},g,h);return new TextDecoder().decode(y)},L=(t,e)=>C(B(t,e),32),B=(t,e)=>(0,l.CH)(t,e,!0).slice(1),C=(t,e)=>{let r=1,i=0,n=new Uint8Array;for(;i<e;){let e=u(new Uint8Array([...new Uint8Array([r>>24,r>>16,r>>8,r]),...t]));n=new Uint8Array([...n,...e]),i+=32,r+=1}return n};function D(t,e){let r=A(t),i=A(new TextEncoder().encode(e));return w(A(new Uint8Array([...r,...i])))}},1379:(t,e,r)=>{"use strict";var i=r(2539),n=r(1574);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]}i.inherits(o,n),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},1574:(t,e,r)=>{"use strict";var i=r(2539),n=r(8711),o=r(1275),s=r(3124),f=i.sum32,a=i.sum32_4,h=i.sum32_5,u=o.ch32,l=o.maj32,c=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=n.BlockHash,y=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],this.k=y,this.W=Array(64)}i.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;
vendor: 1,175 bytes, line 1
1i++)r[i]=a(m(r[i-2]),r[i-7],p(r[i-15]),r[i-16]);var n=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],v=this.h[4],b=this.h[5],x=this.h[6],w=this.h[7];for(s(this.k.length===r.length),i=0;i<r.length;i++){var M=h(w,d(v),u(v,b,x),this.k[i],r[i]),A=f(c(n),l(n,o,g));w=x,x=b,b=v,v=f(y,M),y=g,g=o,o=n,n=f(M,A)}this.h[0]=f(this.h[0],n),this.h[1]=f(this.h[1],o),this.h[2]=f(this.h[2],g),this.h[3]=f(this.h[3],y),this.h[4]=f(this.h[4],v),this.h[5]=f(this.h[5],b),this.h[6]=f(this.h[6],x),this.h[7]=f(this.h[7],w)},v.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},1700:(t,e,r)=>{"use strict";r.d(e,{He:()=>v.He,D_:()=>h}),function(t){t.mainnet="mainnet",t.testnet="testnet"}(i||(i={})),function(t){t.ANY="any",t.BUY="buy",t.SELL="sell",t.TRANSFER="transfer"}(n||(n={})),function(t){t.ANY="any",t.MINT="mint",t.BURN="burn",t.DISABLE_MINTING="disable_minting",t.UPDATE_TRANSFER_RESTRICTION_STATUS="update_transfer_restriction_status",t.TRANSFER="transfer"}(o||(o={})),function(t){t.ANY="any",t.UPDATE="update",t.BID="nft_bid",t.ACCEPT_BID="accept_nft_bid",t.TRANSFER="transfer",t.BURN="burn",t.ACCEPT_TRANSFER="accept_nft_transfer"}(s||(s={}
1)),function(t){t.Unrestricted="unrestricted",t.ProfileOwnerOnly="profile_owner_only",t.DAOMembersOnly="dao_members_only",t.PermanentlyUnrestricted="permanently_unrestricted"}(f||(f={})),function(t){t[t.unrestricted=0]="unrestricted",t[t.profile_owner_only=1]="profile_owner_only",t[t.dao_members_only=2]="dao_members_only",t[t.permanently_unrestricted=3]="permanently_unrestricted"}(a||(a={})),function(t){t.BasicTransfer="BASIC_TRANSFER",t.BitcoinExchange="BITCOIN_EXCHANGE",t.PrivateMessage="PRIVATE_MESSAGE",t.SubmitPost="SUBMIT_POST",t.UpdateProfile="UPDATE_PROFILE",t.UpdateBitcoinUSDExchangeRate="UPDATE_BITCOIN_USD_EXCHANGE_RATE",t.Follow="FOLLOW",t.Like="LIKE",t.CreatorCoin="CREATOR_COIN",t.SwapIdentity="SWAP_IDENTITY",t.UpdateGlobalParams="UPDATE_GLOBAL_PARAMS",t.CreatorCoinTransfer="CREATOR_COIN_TRANSFER",t.CreateNFT="CREATE_NFT",t.UpdateNFT="UPDATE_NFT",t.AcceptNFTBid="ACCEPT_NFT_BID",t.NFTBid="NFT_BID",t.NFTTransfer="NFT_TRANSFER",t.AcceptNFTTransfer="ACCEPT_NFT_TRANSFER",t.BurnNFT="BURN_NFT",t.AuthorizeDerivedKey="AUTHORIZE_DERIVED_KEY",t.MessagingGroup="MESSAGING_GROUP",t.DAOCoin="DAO_COIN",t.DAOCoinTransfer="DAO_COIN_TRANSFER",t.DAOCoinLimitOrder="DAO_COIN_LIMIT_ORDER",t.CreateUserAssociation="CREATE_USER_ASSOCIATION",t.DeleteUserAssociation="DELETE_USER_ASSOCIATION",t.CreatePostAssociation="CREATE_POST_ASSOCIATION",t.DeletePostAssociation="DELETE_POST_ASSOCIATION",t.AccessGroup="ACCESS_GROUP",t.AccessGroupMembers="ACCESS_GROUP_MEMBERS",t.NewMessage="NEW_MESSAGE",t.RegisterAsValidator="REGISTER_AS_VALIDATOR",t.UnregisterAsValidator="UNREGISTER_AS_VALIDATOR",t.Stake="STAKE",t.Unstake="UNSTAKE",t.UnlockStake="UNLOCK_STAKE",t.UnjailValidator="UNJAIL_VALIDATOR",t.CoinLockup="COIN_LOCKUP",t.UpdateCoinLockupParams="UPDATE_COIN_LOCKUP_PARAMS",t.CoinLockupTransfer="COIN_LOCKUP_TRANSFER",t.CoinUnlock="COIN_UNLOCK",t.AtomicTxnsWrapper="ATOMIC_TXNS_WRAPPER"}(h||(h={})),function(t){t.DAOCoinLimitOrderOperationTypeStringASK="ASK",t.DAOCoinLimitOrderOperationTypeStringBID="BID"}(u||(u={})),function(t){t.DEFAULT_KEY="DefaultKey",t.CREATE_GROUP="CreateGroup",t.ADD_MEMBERS="AddMembers"}(l||(l={})),function(t){t.BID="BID",t.ASK="ASK"}(c||(c={})),function(t){t.GOOD_TILL_CANCELLED="GOOD_TILL_CANCELLED",t.FILL_OR_KILL="FILL_OR_KILL",t.IMMEDIATE_OR_CANCEL="IMMEDIATE_OR_CANCEL"}(d||(d={})),function(t){t.usd="usd",t.base="base",t.quote="quote"}(p||(p={})),function(t){t.NewMarket="NewMarket",t.ExistingMarket="ExistingMarket",t.Custom="Custom"}(m||(m={})),function(t){t.None="None",t.Configured="Configured",t.PlacingInitialOrders="PlacingInitialOrders",t.Started="Started",t.CancelingOrders="CancelingOrders",t.OrdersCancelled="OrdersCancelled",t.UncancelingOrders="UncancelingOrders"}(g||(g={})),function(t){t.None="None",t.Open="Open",t.Filled="Filled",t.Canceled="Canceled"}(y||(y={}));var i,n,o,s,f,a,h,u,l,c,d,p,m,g,y,v=r(2859)},1861:(t,e,r)=>{"use strict";var i=r(2539),n=r(3124);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(e=0,this.inner=new this.Hash().update(t);e<t.length;e++)t[e]^=106;this.outer=new this.Hash().update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},1974:(t,e,r)=>{"use strict";function i(t,e){let r=!0;return e?.IsUnlimited||o(t,(i,n)=>{switch(n?.[0]){case"AccessGroupLimitMap":if(e?.AccessGroupLimitMap?.find(e=>"Any"===e.ScopeType&&""===e.AccessGroupKeyName&&"Any"===e.OperationType&&e.OpCount>=s(t?.AccessGroupLimitMap?.[Number(n[1])]?.OpCount)))return;break;case"AccessGroupMemberLimitMap":if(e?.AccessGroupMemberLimitMap?.find(e=>"Any"===e.ScopeType&&""===e.AccessGroupKeyName&&"Any"===e.OperationType&&e.OpCount>=s(t?.AccessGroupMemberLimitMap?.[Number(n[1])]?.OpCount)))return;break;case"AssociationLimitMap":if(e?.AssociationLimitMap?.find(e=>e.AssociationClass===t?.AssociationLimitMap?.[Number(n[1])]?.AssociationClass&&"Any"===e.AppScopeType&&""===e.AssociationType&&"Any"===e.AssociationOperation&&e.OpCount>=s(t?.AssociationLimitMap?.[Number(n[1])]?.OpCount)))return;break;case"CreatorCoinOperationLimitMap":e?.CreatorCoinOperationLimitMap?.[""]&&(n="number"==typeof e?.CreatorCoinOperationLimitMap[""]?.any?["CreatorCoinOperationLimitMap","","any"]:["CreatorCoinOperationLimitMap","",n[n.length-1]]);break;case"NFTOperationLimitMap":e?.NFTOperationLimitMap?.[""]?.[0]&&(n="number"==typeof e?.NFTOperationLimitMap?.[""]?.[0]?.any?["NFTOperationLimitMap","","0","any"]:["NFTOperationLimitMap","","0",n[n.length-1]]);break;case"StakeLimitMap":if(e?.StakeLimitMap?.find(e=>""===e.ValidatorPublicKeyBase58Check&&t?.StakeLimitMap?.[Number(n[1])]?.StakeLimit&&parseInt(e.StakeLimit,16)>
1=parseInt(t?.StakeLimitMap?.[Number(n[1])]?.StakeLimit,16)))return;break;case"UnstakeLimitMap":if(e?.UnstakeLimitMap?.find(e=>""===e.ValidatorPublicKeyBase58Check&&t?.UnstakeLimitMap?.[Number(n[1])]?.UnstakeLimit&&parseInt(e.UnstakeLimit,16)>=parseInt(t?.UnstakeLimitMap?.[Number(n[1])]?.UnstakeLimit,16)))return;break;case"UnlockStakeLimitMap":if(e?.UnlockStakeLimitMap?.find(e=>""===e.ValidatorPublicKeyBase58Check&&e.OpCount>=s(t?.UnlockStakeLimitMap?.[Number(n[1])]?.OpCount)))return;break;case"LockupLimitMap":if(e?.LockupLimitMap?.find(e=>""===e.ProfilePublicKeyBase58Check&&e.OpCount>=s(t?.LockupLimitMap?.[Number(n[1])]?.OpCount)))return}let o=function t(e,r){let i=r[0];return null===e||"object"!=typeof e||void 0===e[i]?void 0:1===r.length?e[i]:t(e[i],r.slice(1))}(e,n);(void 0===o||"number"==typeof o&&o<s(i)||"string"==typeof o&&o!==i)&&(r=!1)}),r}function n(t){if(t.IsUnlimited)return{IsUnlimited:!0};if(t.GlobalDESOLimit?.toString()==="UNLIMITED")throw Error("GlobalDESOLimit cannot be unlimited. You must specify a specific limit, or set the IsUnlimited flag to true.");let e={};return o(t,(t,r)=>{(function t(e,r,i){let n=r[0];void 0===e[n]&&(e[n]={}),1===r.length?e[n]=i:t(e[n],r.slice(1),i)})(e,r,"UNLIMITED"===t?1e9:t)},[]),e.StakeLimitMap&&(e.StakeLimitMap=Object.values(e.StakeLimitMap)),e.LockupLimitMap&&(e.LockupLimitMap=Object.values(e.LockupLimitMap)),e.UnstakeLimitMap&&(e.UnstakeLimitMap=Object.values(e.UnstakeLimitMap)),e.UnlockStakeLimitMap&&(e.UnlockStakeLimitMap=Object.values(e.UnlockStakeLimitMap)),e.AccessGroupLimitMap&&(e.AccessGroupLimitMap=Object.values(e.AccessGroupLimitMap)),e.AccessGroupMemberLimitMap&&(e.AccessGroupMemberLimitMap=Object.values(e.AccessGroupMemberLimitMap)),e.AssociationLimitMap&&(e.AssociationLimitMap=Object.values(e.AssociationLimitMap),e.AssociationLimitMap.forEach(t=>{if(t.AppPublicKeyBase58Check&&"Any"===t.AppScopeType)throw Error(`AppPublicKeyBase58Check must be set to undefined or an empty string if AppScopeType is Any. You provided ${t.AppPublicKeyBase58Check}`);if(!/^(?:BC1|tBC).+/.test(t.AppPublicKeyBase58Check)&&"Scoped"===t.AppScopeType)throw Error(`AppPublicKeyBase58Check must be set to a valid public key if AppScopeType is Scoped. You provided: ${t.AppPublicKeyBase58Check}`)})),e.TransactionCountLimitMap=e.TransactionCountLimitMap??{},void 0===e.TransactionCountLimitMap.AUTHORIZE_DERIVED_KEY?e.TransactionCountLimitMap={...e.TransactionCountLimitMap,AUTHORIZE_DERIVED_KEY:1}:e.TransactionCountLimitMap.AUTHORIZE_DERIVED_KEY<0&&delete e.TransactionCountLimitMap.AUTHORIZE_DERIVED_KEY,e}function o(t,e,r=[]){if("object"==typeof t&&null!==t){let i=Object.keys(t);for(let n=0;n<i.length;n++)o(t[i[n]],e,r.concat(i[n]))}else e(t,r)}function s(t){return"UNLIMITED"===t||1e9===t?1:t??0}r.d(e,{W:()=>i,b:()=>n})},2161:(t,e,r)=>{"use strict";r.d(e,{jK8:()=>a,D_O:()=>s}),r(1700);var i,n,o=r(5631);r(7267),r(1309),r(7905),r(4052);let s=new(r(3656)).l(globalThis,o.FH);r(7863),r(9318),r(8623);let f={MinFeeRateNanosPerKB:1500,LocalConstruction:!1},a=t=>{"number"==typeof t.MinFeeRateNanosPerKB&&(f.MinFeeRateNanosPerKB=t.MinFeeRateNanosPerKB),"boolean"==typeof t.localConstruction&&(f.LocalConstruction=t.localConstruction),s.configure(t),"string"==typeof t.nodeURI&&t.nodeURI.length>0&&o.FH.configure({nodeURI:t.nodeURI}),"string"==typeof t.mediaURI&&t.mediaURI.length>0&&o.$_.configure({mediaURI:t.mediaURI})};r(7773),function(t){t[t.DM=0]="DM",t[t.Group=1]="Group"}(i||(i={})),function(t){t[t.Create=0]="Create",t[t.Update=1]="Update"}(n||(n={}))},2248:(t,e,r)=>{"use strict";r.d(e,{lY:()=>_});var i=r(4526);let n=BigInt(0x100000000-1),o=BigInt(32),s=(t,e,r)=>t<<r|e>>>32-r,f=(t,e,r)=>e<<r|t>>>32-r,a=(t,e,r)=>e<<r-32|t>>>64-r,h=(t,e,r)=>t<<r-32|e>>>64-r;var u=r(7228);let l=[],c=[],d=[],p=BigInt(0),m=BigInt(1),g=BigInt(2),y=BigInt(7),v=BigInt(256),b=BigInt(113);for(let t=0,e=m,r=1,i=0;t<24;t++){[r,i]=[i,(2*r+3*i)%5],l.push(2*(5*i+r)),c.push((t+1)*(t+2)/2%64);let n=p;for(let t=0;t<7;t++)(e=(e<<m^(e>>y)*b)%v)&g&&(n^=m<<(m<<BigInt(t))-m);d.push(n)}let[x,w]=function(t,e=!1){let r=new Uint32Array(t.length),i=new Uint32Array(t.length);for(let s=0;s<t.length;s++){let{h:f,l:a}=function(t,e=!1){return e?{h:Number(t&n),l:Number(t>>o&n)}:{h:0|Number(t>>o&n),l:0|Number(t&n)}}(t[s],e);[r[s],i[s]]=[f,a]}return[r,i]}(d,!0),M=(t,e,r)=>r>32?a(t,e,r):s(t,e,r),A=(t,e,r)=>r>32?h(t,e,r):f(t,e,r);class E extends u.Vw{constructor(t,e,r,n=!1,o=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,i.Fe)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,u.DH)(this.state)}keccak(){u.qv||(0,u.Fc)(this.state32),function(t,e=24){let r=new Uint32Array(10);for(let i=24-e;i<24;i++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let i=(e+8)%10,n=(e+2)%10,o=r[n],s=r[n+1],f=M(o,s,1)^r[i],a=A(o,s,1)^r[i+1];for(let r=0;r<50;r+=10)t[e+r]^=f,t[e+r+1]^=a}let e=t[2],n=t[3];for(let r=0;r<24;r++){let i=c[r],o=M(e,n,i),s=A(e,n,i),f=l[r];e=t[f],n=t[f+1],t[f]=o,t[f+1]=s}for(let e=0;e<50;e+=10){for(let i=0;i<10;i++)r[i]=t[e+i];for(let i=0;i<10;i++)t[e+i]^=~r[(i+2)%10]&r[(i+4)%10]}t[0]^=x[i],t[1]^=w[i]}r.fill(0)}(this.state32,this.rounds),u.qv||(0,u.Fc)(this.state32),this.posOut=0,this.pos=0}update(t){(0,i.CC)(this);let{blockLen:e,state:r}=this,n=(t=(0,u.ZJ)(t)).length;for(let i=0;i<n;){let o=Math.min(e-this.pos,n-i);for(let e=0;e<o;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,(128&e)!=0&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){(0,i.CC)(this,!1),(0,i.DO)(t),this.finish();let e=this.state,{blockLen:r}=this;for(let i=0,n=t.length;i<n;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,n-i);t.set(e.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,i.Fe)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,i.Ht)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:e,suffix:r,outputLen:i,rounds:n,enableXOF:o}=this;return t||(t=new E(e,r,i,o,n)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=n,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}}let _=(0,u.ld)(()=>new E(136,1,32))},2276:(t,e,r)=>{var i,n=r(7358);!function(t){!function(e){var i="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=o(t);function o(t,e){return function(r,i){"function"!=typeof t[r]&&Object.defineProperty(t,r,{configurable:!0,writable:!0,value:i}),e&&e(r,i)}}void 0===i.Reflect?i.Reflect=t:n=o(i.Reflect,n),e(n)}(function(t){var e=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,f=({__proto__:[]}
1)instanceof Array,a=!s&&!f,h={create:s?function(){return O(Object.create(null))}:f?function(){return O({__proto__:null})}:function(){return O({})},has:a?function(t,r){return e.call(t,r)}:function(t,e){return e in t},get:a?function(t,r){return e.call(t,r)?t[r]:void 0}:function(t,e){return t[e]}},u=Object.getPrototypeOf(Function),l="object"==typeof n&&n.env&&"true"===n.env.REFLECT_METADATA_USE_MAP_POLYFILL,c=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var t={},e=[],r=function(){function t(t,e,r){this._index=0,this._keys=t,this._values=e,this._selector=r}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var r=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var r=this._find(t,!0);return this._values[r]=e,this},e.prototype.delete=function(e){var r=this._find(e,!1);if(r>=0){for(var i=this._keys.length,n=r+1;n<i;n++)this._keys[n-1]=this._keys[n],this._values[n-1]=this._values[n];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new r(this._keys,this._values,i)},e.prototype.values=function(){return new r(this._keys,this._values,n)},e.prototype.entries=function(){return new r(this._keys,this._values,s)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function i(t,e){return t}function n(t,e){return e}function s(t,e){return[t,e]}}():Map,d=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new c}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}():Set,p=new(l||"function"!=typeof WeakMap?function(){var t=h.create(),r=i();return function(){function t(){this._key=i()}return t.prototype.has=function(t){var e=n(t,!1);return void 0!==e&&h.has(e,this._key)},t.prototype.get=function(t){var e=n(t,!1);return void 0!==e?h.get(e,this._key):void 0},t.prototype.set=function(t,e){return n(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=n(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=i()},t}();function i(){var e;do e="@@WeakMap@@"+function(){var t,e=(t=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(16)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(16)):o(new Uint8Array(t),t):o(Array(t),t));e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var r="",i=0;i<16;++i){var n=e[i];(4===i||6===i||8===i)&&(r+="-"),n<16&&(r+="0"),r+=n.toString(16).toLowerCase()}return r}();while(h.has(t,e));return t[e]=!0,e}function n(t,i){if(!e.call(t,r)){if(!i)return;Object.defineProperty(t,r,{value:h.create()})}return t[r]}function o(t,e){for(var r=0;r<e;++r)t[r]=255*Math.random()|0;return t}}():WeakMap);function m(t,e,r){var i=p.get(t);if(w(i)){if(!r)return;i=new c,p.set(t,i)}var n=i.get(e);if(w(n)){if(!r)return;n=new c,i.set(e,n)}return n}function g(t,e,r){var i=m(e,r,!1);return!w(i)&&!!i.has(t)}function y(t,e,r){var i=m(e,r,!1);if(!w(i))return i.get(t)}function v(t,e,r,i){m(r,i,!0).set(t,e)}function b(t,e){var r=[],i=m(t,e,!1);if(w(i))return r;for(var n=function(t){var e=N(t,o);if(!S(e))throw TypeError();var r=e.call(t);if(!A(r))throw TypeError();return r}(i.keys()),s=0;;){var f=function(t){var e=t.next();return!e.done&&e}(n);if(!f)return r.length=s,r;var a=f.value;try{r[s]=a}catch(t){try{!function(t){var e=t.return;e&&e.call(t)}(n)}finally{throw t}}s++}}function x(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function w(t){return void 0===t}function M(t){return null===t}function A(t){return"object"==typeof t?null!==t:"function"==typeof t}function E(t){var e=function(t,e){switch(x(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var r="string",n=N(t,i);if(void 0!==n){var o=n.call(t,r);
1if(A(o))throw TypeError();return o}return function(t,e){if("string"===e){var r=t.toString;if(S(r)){var i=r.call(t);if(!A(i))return i}var n=t.valueOf;if(S(n)){var i=n.call(t);if(!A(i))return i}}else{var n=t.valueOf;if(S(n)){var i=n.call(t);if(!A(i))return i}var o=t.toString;if(S(o)){var i=o.call(t);if(!A(i))return i}}throw TypeError()}(t,r)}(t,0);return"symbol"==typeof e?e:""+e}function _(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function S(t){return"function"==typeof t}function I(t){return"function"==typeof t}function N(t,e){var r=t[e];if(null!=r){if(!S(r))throw TypeError();return r}}function R(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===u||e!==u)return e;var r=t.prototype,i=r&&Object.getPrototypeOf(r);if(null==i||i===Object.prototype)return e;var n=i.constructor;return"function"!=typeof n||n===t?e:n}function O(t){return t.__=void 0,delete t.__,t}t("decorate",function(t,e,r,i){if(w(r)){if(!_(t)||!I(e))throw TypeError();return function(t,e){for(var r=t.length-1;r>=0;--r){var i=(0,t[r])(e);if(!w(i)&&!M(i)){if(!I(i))throw TypeError();e=i}}return e}(t,e)}if(!_(t)||!A(e)||!A(i)&&!w(i)&&!M(i))throw TypeError();return M(i)&&(i=void 0),function(t,e,r,i){for(var n=t.length-1;n>=0;--n){var o=(0,t[n])(e,r,i);if(!w(o)&&!M(o)){if(!A(o))throw TypeError();i=o}}return i}(t,e,r=E(r),i)}),t("metadata",function(t,e){return function(r,i){if(!A(r)||!w(i)&&!function(t){switch(x(t)){case 3:case 4:return!0;default:return!1}}(i))throw TypeError();v(t,e,r,i)}}),t("defineMetadata",function(t,e,r,i){if(!A(r))throw TypeError();return w(i)||(i=E(i)),v(t,e,r,i)}),t("hasMetadata",function(t,e,r){if(!A(e))throw TypeError();return w(r)||(r=E(r)),function t(e,r,i){if(g(e,r,i))return!0;var n=R(r);return!M(n)&&t(e,n,i)}(t,e,r)}),t("hasOwnMetadata",function(t,e,r){if(!A(e))throw TypeError();return w(r)||(r=E(r)),g(t,e,r)}),t("getMetadata",function(t,e,r){if(!A(e))throw TypeError();return w(r)||(r=E(r)),function t(e,r,i){if(g(e,r,i))return y(e,r,i);var n=R(r);if(!M(n))return t(e,n,i)}(t,e,r)}),t("getOwnMetadata",function(t,e,r){if(!A(e))throw TypeError();return w(r)||(r=E(r)),y(t,e,r)}),t("getMetadataKeys",function(t,e){if(!A(t))throw TypeError();return w(e)||(e=E(e)),function t(e,r){var i=b(e,r),n=R(e);if(null===n)return i;var o=t(n,r);if(o.length<=0)return i;if(i.length<=0)return o;for(var s=new d,f=[],a=0;a<i.length;a++){var h=i[a],u=s.has(h);
1u||(s.add(h),f.push(h))}for(var l=0;l<o.length;l++){var h=o[l],u=s.has(h);u||(s.add(h),f.push(h))}return f}(t,e)}),t("getOwnMetadataKeys",function(t,e){if(!A(t))throw TypeError();return w(e)||(e=E(e)),b(t,e)}),t("deleteMetadata",function(t,e,r){if(!A(e))throw TypeError();w(r)||(r=E(r));var i=m(e,r,!1);if(w(i)||!i.delete(t))return!1;if(i.size>0)return!0;var n=p.get(e);return n.delete(r),n.size>0||(p.delete(e),!0)})})}(i||(i={}))},2437:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.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=o:e.BN=o,o.BN=o,o.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function f(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function a(t,e,r,n){for(var o=0,s=0,f=Math.min(t.length,r),a=e;a<f;a++){var h=t.charCodeAt(a)-48;o*=n,s=h>=49?h-49+10:h>=17?h-17+10:h,i(h>=0&&s<n,"Invalid character"),o+=s}return o}function h(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return 0>t.cmp(e)?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(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,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<0x4000000?(this.words=[0x3ffffff&t],this.length=1):t<0x10000000000000?(this.words=[0x3ffffff&t,t/0x4000000&0x3ffffff],this.length=2):(i(t<0x20000000000000),this.words=[0x3ffffff&t,t/0x4000000&0x3ffffff,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("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,o,s=0;s<this.length;s++)this.words[s]=0;var f=0;if("be"===r)for(s=t.length-1,n=0;s>=0;s-=3)o=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[n]|=o<<f&0x3ffffff,this.words[n+1]=o>>>26-f&0x3ffffff,(f+=24)>=26&&(f-=26,n++);else if("le"===r)for(s=0,n=0;s<t.length;s+=3)o=t[s]|t[s+1]<<8|t[s+2]<<16,this.words[n]|=o<<f&0x3ffffff,this.words[n+1]=o>>>26-f&0x3ffffff,(f+=24)>=26&&(f-=26,n++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var i,n=0;n<this.length;n++)this.words[n]=0;var o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=f(t,e,n)<<o,this.words[s]|=0x3ffffff&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=f(t,e,n)<<o,this.words[s]|=0x3ffffff&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=0x3ffffff;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,u=r;u<f;u+=i)h=a(t,u,u+i,e),this.imuln(n),this.words[0]+h<0x4000000?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=a(t,u,t.length,e),u=0;u<s;u++)l*=e;this.imuln(l),this.words[0]+h<0x4000000?this.words[0]+=h:this._iaddn(h)}this._strip()},o.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},o.prototype._move=function(t){h(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(t){o.prototype.inspect=u}else o.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l,c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,0x2000000,0x290d741,0x1000000,
vendor: 33,537 bytes, line 1
10x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function m(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,f=0x3ffffff&s,a=s/0x4000000|0;r.words[0]=f;for(var h=1;h<i;h++){for(var u=a>>>26,l=0x3ffffff&a,c=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=c;d++){var p=h-d|0;u+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/0x4000000|0,l=0x3ffffff&s}r.words[h]=0|l,a=0|u}return 0!==a?r.words[h]=0|a:r.length--,r._strip()}o.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){for(var r="",n=0,o=0,s=0;s<this.length;s++){var f=this.words[s],a=((f<<n|o)&0xffffff).toString(16);o=f>>>24-n&0xffffff,(n+=2)>=26&&(n-=26,s--),r=0!==o||s!==this.length-1?c[6-a.length]+a+r:a+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=d[t],u=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(u).toString(t);r=(l=l.idivn(u)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?t+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},l&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(l,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(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},o.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},o.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?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.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},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return(8191&e)==0&&(r+=13,e>>>=13),(127&e)==0&&(r+=7,e>>>=7),(15&e)==0&&(r+=4,e>>>=4),(3&e)==0&&(r+=2,e>>>=2),(1&e)==0&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},o.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},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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()},o.prototype.ior=function(t){return i((this.negative|t.negative)==0),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return i((this.negative|t.negative)==0),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){this.length>t.length?(e=this,r=t):(e=t,r=this);for(var e,r,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()},o.prototype.ixor=function(t){return i((this.negative|t.negative)==0),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=0x3ffffff&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&0x3ffffff>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),e?this.words[r]=this.words[r]|1<<n:this.words[r]=this.words[r]&~(1<<n),this._strip()},o.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]=0x3ffffff&e,n=e>>>26;for(;0!==n&&o<r.length;o++)e=(0|r.words[o])+n,this.words[o]=0x3ffffff&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},o.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)},o.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]=0x3ffffff&i;for(;0!==o&&s<e.length;s++)o=(i=(0|e.words[s])+o)>>26,this.words[s]=0x3ffffff&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()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var i,n,o,s=t.words,f=e.words,a=r.words,h=0,u=0|s[0],l=8191&u,c=u>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],x=8191&b,w=b>>>13,M=0|s[4],A=8191&M,E=M>>>13,_=0|s[5],S=8191&_,I=_>>>13,N=0|s[6],R=8191&N,O=N>>>13,T=0|s[7],k=8191&T,U=T>>>13,P=0|s[8],L=8191&P,B=P>>>13,C=0|s[9],D=8191&C,F=C>>>13,z=0|f[0],H=8191&z,j=z>>>13,q=0|f[1],K=8191&q,G=q>>>13,V=0|f[2],W=8191&V,Z=V>>>13,$=0|f[3],J=8191&$,Y=$>>>13,X=0|f[4],Q=8191&X,tt=X>>>13,te=0|f[5],tr=8191&te,ti=te>>>13,tn=0|f[6],to=8191&tn,ts=tn>>>13,tf=0|f[7],ta=8191&tf,th=tf>>>13,tu=0|f[8],tl=8191&tu,tc=tu>>>13,td=0|f[9],tp=8191&td,tm=td>>>13;r.negative=t.negative^e.negative,r.length=19,i=Math.imul(l,H);var tg=(h+i|0)+((8191&(n=(n=Math.imul(l,j))+Math.imul(c,H)|0))<<13)|0;h=((o=Math.imul(c,j))+(n>>>13)|0)+(tg>>>26)|0,tg&=0x3ffffff,i=Math.imul(p,H),n=(n=Math.imul(p,j))+Math.imul(m,H)|0,o=Math.imul(m,j),i=i+Math.imul(l,K)|0;var ty=(h+i|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;h=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(ty>>>26)|0,ty&=0x3ffffff,i=Math.imul(y,H),n=(n=Math.imul(y,j))+Math.imul(v,H)|0,o=Math.imul(v,j),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,i=i+Math.imul(l,W)|0;var tv=(h+i|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,W)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(tv>>>26)|0,tv&=0x3ffffff,i=Math.imul(x,H),n=(n=Math.imul(x,j))+Math.imul(w,H)|0,o=Math.imul(w,j),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Z)|0,i=i+Math.imul(l,J)|0;var tb=(h+i|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,J)|0))<<13)|0;h=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(tb>>>26)|0,tb&=0x3ffffff,i=Math.imul(A,H),n=(n=Math.imul(A,j))+Math.imul(E,H)|0,o=Math.imul(E,j),i=i+Math.imul(x,K)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,G)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,i=i+Math.imul(p,J)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,Y)|0,i=i+Math.imul(l,Q)|0;var tx=(h+i|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(tx>>>26)|0,tx&=0x3ffffff,i=Math.imul(S,H),n=(n=Math.imul(S,j))+Math.imul(I,H)|0,o=Math.imul(I,j),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,i=i+Math.imul(x,W)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,Z)|0,i=i+Math.imul(y,J)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,Y)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,i=i+Math.imul(l,tr)|0;var tw=(h+i|0)+((8191&(n=(n=n+Math.imul(l,ti)|0)+Math.imul(c,tr)|0))<<13)|0;h=((o=o+Math.imul(c,ti)|0)+(n>>>13)|0)+(tw>>>26)|0,tw&=0x3ffffff,i=Math.imul(R,H),n=(n=Math.imul(R,j))+Math.imul(O,H)|0,o=Math.imul(O,j),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(x,J)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,Y)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,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;var tM=(h+i|0)+((8191&(n=(n=n+Math.imul(l,ts)|0)+Math.imul(c,to)|0))<<13)|0;h=((o=o+Math.imul(c,ts)|0)+(n>>>13)|0)+(tM>>>26)|0,tM&=0x3ffffff,i=Math.imul(k,H),n=(n=Math.imul(k,j))+Math.imul(U,H)|0,o=Math.imul(U,j),i=i+Math.imul(R,K)|0,n=(n=n+Math.imul(R,G)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(A,J)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(y,tr)|0,n=(n=n+Math.imul(y,ti)|0)+Math.imul(v,tr)|0,o=o+Math.imul(v,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,ta)|0;var tA=(h+i|0)+((8191&(n=(n=n+Math.imul(l,th)|0)+Math.imul(c,ta)|0))<<13)|0;h=((o=o+Math.imul(c,th)|0)+(n>>>13)|0)+(tA>>>26)|0,tA&=0x3ffffff,i=Math.imul(L,H),n=(n=Math.imul(L,j))+Math.imul(B,H)|0,o=Math.imul(B,j),i=i+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,G)|0,i=i+Math.imul(R,W)|0,n=(n=n+Math.imul(R,Z)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Z)|0,i=i+Math.imul(S,J)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,Y)|0,i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(x,tr)|0,n=(n=n+Math.imul(x,ti)|0)+Math.imul(w,tr)|0,o=o+Math.imul(w,ti)|0,i=i+Math.imul(y,to)|0,n=(n=n+Math.imul(y,ts)|0)+Math.imul(v,to)|0,o=o+Math.imul(v,ts)|0,i=i+Math.imul(p,ta)|0,n=(n=n+Math.imul(p,th)|0)+Math.imul(m,ta)|0,o=o+Math.imul(m,th)|0,i=i+Math.imul(l,tl)|0;var tE=(h+i|0)+((8191&(n=(n=n+Math.imul(l,tc)|0)+Math.imul(c,tl)|0))<<13)|0;h=((o=o+Math.imul(c,tc)|0)+(n>>>13)|0)+(tE>>>26)|0,tE&=0x3ffffff,i=Math.imul(D,H),n=(n=Math.imul(D,j))+Math.imul(F,H)|0,o=Math.imul(F,j),i=i+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(k,W)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Z)|0,i=i+Math.imul(R,J)|0,n=(n=n+Math.imul(R,Y)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(A,tr)|0,n=(n=n+Math.imul(A,ti)|0)+Math.imul(E,tr)|0,o=o+Math.imul(E,ti)|0,i=i+Math.imul(x,to)|0,n=(n=n+Math.imul(x,ts)|0)+Math.imul(w,to)|0,o=o+Math.imul(w,ts)|0,i=i+Math.imul(y,ta)|0,n=(n=n+Math.imul(y,th)|0)+Math.imul(v,ta)|0,o=o+Math.imul(v,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;var t_=(h+i|0)+((8191&(n=(n=n+Math.imul(l,tm)|0)+Math.imul(c,tp)|0))<<13)|0;h=((o=o+Math.imul(c,tm)|0)+(n>>>13)|0)+(t_>>>26)|0,t_&=0x3ffffff,i=Math.imul(D,K),n=(n=Math.imul(D,G))+Math.imul(F,K)|0,o=Math.imul(F,G),i=i+Math.imul(L,W)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Z)|0,i=i+Math.imul(k,J)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,Y)|0,i=i+Math.imul(R,Q)|0,n=(n=n+Math.imul(R,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,tr)|0,n=(n=n+Math.imul(S,ti)|0)+Math.imul(I,tr)|0,o=o+Math.imul(I,ti)|0,i=i+Math.imul(A,to)|0,n=(n=n+Math.imul(A,ts)|0)+Math.imul(E,to)|0,o=o+Math.imul(E,ts)|0,i=i+Math.imul(x,ta)|0,n=(n=n+Math.imul(x,th)|0)+Math.imul(w,ta)|0,o=o+Math.imul(w,th)|0,i=i+Math.imul(y,tl)|0,n=(n=n+Math.imul(y,tc)|0)+Math.imul(v,tl)|0,o=o+Math.imul(v,tc)|0,i=i+Math.imul(p,tp)|0;var tS=(h+i|0)+((8191&(n=(n=n+Math.imul(p,tm)|0)+Math.imul(m,tp)|0))<<13)|0;h=((o=o+Math.imul(m,tm)|0)+(n>>>13)|0)+(tS>>>26)|0,tS&=0x3ffffff,i=Math.imul(D,W),n=(n=Math.imul(D,Z))+Math.imul(F,W)|0,o=Math.imul(F,Z),i=i+Math.imul(L,J)|0,n=(n=n+Math.imul(L,Y)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,Y)|0,i=i+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,tt)|0,i=i+Math.imul(R,tr)|0,n=(n=n+Math.imul(R,ti)|0)+Math.imul(O,tr)|0,o=o+Math.imul(O,ti)|0,i=i+Math.imul(S,to)|0,n=(n=n+Math.imul(S,ts)|0)+Math.imul(I,to)|0,o=o+Math.imul(I,ts)|0,i=i+Math.imul(A,ta)|0,n=(n=n+Math.imul(A,th)|0)+Math.imul(E,ta)|0,o=o+Math.imul(E,th)|0,i=i+Math.imul(x,tl)|0,n=(n=n+Math.imul(x,tc)|0)+Math.imul(w,tl)|0,o=o+Math.imul(w,tc)|0,i=i+Math.imul(y,tp)|0;var tI=(h+i|0)+((8191&(n=(n=n+Math.imul(y,tm)|0)+Math.imul(v,tp)|0))<<13)|0;h=((o=o+Math.imul(v,tm)|0)+(n>>>13)|0)+(tI>>>26)|0,tI&=0x3ffffff,i=Math.imul(D,J),n=(n=Math.imul(D,Y))+Math.imul(F,J)|0,o=Math.imul(F,Y),i=i+Math.imul(L,Q)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,i=i+Math.imul(k,tr)|0,n=(n=n+Math.imul(k,ti)|0)+Math.imul(U,tr)|0,o=o+Math.imul(U,ti)|0,i=i+Math.imul(R,to)|0,n=(n=n+Math.imul(R,ts)|0)+Math.imul(O,to)|0,o=o+Math.imul(O,ts)|0,i=i+Math.imul(S,ta)|0,n=(n=n+Math.imul(S,th)|0)+Math.imul(I,ta)|0,o=o+Math.imul(I,th)|0,i=i+Math.imul(A,tl)|0,n=(n=n+Math.imul(A,tc)|0)+Math.imul(E,tl)|0,o=o+Math.imul(E,tc)|0,i=i+Math.imul(x,tp)|0;var tN=(h+i|0)+((8191&(n=(n=n+Math.imul(x,tm)|0)+Math.imul(w,tp)|0))<<13)|0;h=((o=o+Math.imul(w,tm)|0)+(n>>>13)|0)+(tN>>>26)|0,tN&=0x3ffffff,i=Math.imul(D,Q),n=(n=Math.imul(D,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),i=i+Math.imul(L,tr)|0,n=(n=n+Math.imul(L,ti)|0)+Math.imul(B,tr)|0,o=o+Math.imul(B,ti)|0,i=i+Math.imul(k,to)|0,n=(n=n+Math.imul(k,ts)|0)+Math.imul(U,to)|0,o=o+Math.imul(U,ts)|0,i=i+Math.imul(R,ta)|0,n=(n=n+Math.imul(R,th)|0)+Math.imul(O,ta)|0,o=o+Math.imul(O,th)|0,i=i+Math.imul(S,tl)|0,n=(n=n+Math.imul(S,tc)|0)+Math.imul(I,tl)|0,o=o+Math.imul(I,tc)|0,i=i+Math.imul(A,tp)|0;var tR=(h+i|0)+((8191&(n=(n=n+Math.imul(A,tm)|0)+Math.imul(E,tp)|0))<<13)|0;h=((o=o+Math.imul(E,tm)|0)+(n>>>13)|0)+(tR>>>26)|0,tR&=0x3ffffff,i=Math.imul(D,tr),n=(n=Math.imul(D,ti))+Math.imul(F,tr)|0,o=Math.imul(F,ti),i=i+Math.imul(L,to)|0,n=(n=n+Math.imul(L,ts)|0)+Math.imul(B,to)|0,o=o+Math.imul(B,ts)|0,i=i+Math.imul(k,ta)|0,n=(n=n+Math.imul(k,th)|0)+Math.imul(U,ta)|0,o=o+Math.imul(U,th)|0,i=i+Math.imul(R,tl)|0,n=(n=n+Math.imul(R,tc)|0)+Math.imul(O,tl)|0,o=o+Math.imul(O,tc)|0,i=i+Math.imul(S,tp)|0;var tO=(h+i|0)+((8191&(n=(n=n+Math.imul(S,tm)|0)+Math.imul(I,tp)|0))<<13)|0;h=((o=o+Math.imul(I,tm)|0)+(n>>>13)|0)+(tO>>>26)|0,tO&=0x3ffffff,i=Math.imul(D,to),n=(n=Math.imul(D,ts))+Math.imul(F,to)|0,o=Math.imul(F,ts),i=i+Math.imul(L,ta)|0,n=(n=n+Math.imul(L,th)|0)+Math.imul(B,ta)|0,o=o+Math.imul(B,th)|0,i=i+Math.imul(k,tl)|0,n=(n=n+Math.imul(k,tc)|0)+Math.imul(U,tl)|0,o=o+Math.imul(U,tc)|0,i=i+Math.imul(R,tp)|0;var tT=(h+i|0)+((8191&(n=(n=n+Math.imul(R,tm)|0)+Math.imul(O,tp)|0))<<13)|0;h=((o=o+Math.imul(O,tm)|0)+(n>>>13)|0)+(tT>>>26)|0,tT&=0x3ffffff,i=Math.imul(D,ta),n=(n=Math.imul(D,th))+Math.imul(F,ta)|0,o=Math.imul(F,th),i=i+Math.imul(L,tl)|0,n=(n=n+Math.imul(L,tc)|0)+Math.imul(B,tl)|0,o=o+Math.imul(B,tc)|0,i=i+Math.imul(k,tp)|0;var tk=(h+i|0)+((8191&(n=(n=n+Math.imul(k,tm)|0)+Math.imul(U,tp)|0))<<13)|0;h=((o=o+Math.imul(U,tm)|0)+(n>>>13)|0)+(tk>>>26)|0,tk&=0x3ffffff,i=Math.imul(D,tl),n=(n=Math.imul(D,tc))+Math.imul(F,tl)|0,o=Math.imul(F,tc),i=i+Math.imul(L,tp)|0;var tU=(h+i|0)+((8191&(n=(n=n+Math.imul(L,tm)|0)+Math.imul(B,tp)|0))<<13)|0;h=((o=o+Math.imul(B,tm)|0)+(n>>>13)|0)+(tU>>>26)|0,tU&=0x3ffffff,i=Math.imul(D,tp);var tP=(h+i|0)+((8191&(n=(n=Math.imul(D,tm))+Math.imul(F,tp)|0))<<13)|0;return h=((o=Math.imul(F,tm))+(n>>>13)|0)+(tP>>>26)|0,tP&=0x3ffffff,a[0]=tg,a[1]=ty,a[2]=tv,a[3]=tb,a[4]=tx,a[5]=tw,a[6]=tM,a[7]=tA,a[8]=tE,a[9]=t_,a[10]=tS,a[11]=tI,a[12]=tN,a[13]=tR,a[14]=tO,a[15]=tT,a[16]=tk,a[17]=tU,a[18]=tP,0!==h&&(a[19]=h,r.length++),r};function y(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 f=0x3ffffff&i,a=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=a;h++){var u=o-h,l=(0|t.words[u])*(0|e.words[h]),c=0x3ffffff&l;s=s+(l/0x4000000|0)|0,f=0x3ffffff&(c=c+f|0),n+=(s=s+(c>>>26)|0)>>>26,s&=0x3ffffff}r.words[o]=f,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function v(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return 10===this.length&&10===t.length?r=g(this,t,e):i<63?r=m(this,t,e):r=y(this,t,e),r},v.prototype.makeRBT=function(t){for(var e=Array(t),r=o.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},v.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s<o;s++)i[s]=e[t[s]],n[s]=r[t[s]]},v.prototype.transform=function(t,e,r,i,n,o){this.permute(o,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var f=s<<1,a=Math.cos(2*Math.PI/f),h=Math.sin(2*Math.PI/f),u=0;u<n;u+=f)for(var l=a,c=h,d=0;d<s;d++){var p=r[u+d],m=i[u+d],g=r[u+d+s],y=i[u+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[u+d]=p+g,i[u+d]=m+y,r[u+d+s]=p-g,i[u+d+s]=m-y,d!==f&&(v=a*l-h*c,c=a*c+h*l,l=v)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},v.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=0x3ffffff&n,r=n<0x4000000?0:n/0x4000000|0}return t},v.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i((-8192&o)==0)},v.prototype.stub=function(t){for(var e=Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),o=this.stub(i),s=Array(i),f=Array(i),a=Array(i),h=Array(i),u=Array(i),l=Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,h,i),this.transform(s,o,f,a,i,n),this.transform(h,o,u,l,i,n);for(var d=0;d<i;d++){var p=f[d]*u[d]-a[d]*l[d];a[d]=f[d]*l[d]+a[d]*u[d],f[d]=p}return this.conjugate(f,a,i),this.transform(f,a,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<0x4000000);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,s=(0x3ffffff&o)+(0x3ffffff&r);r>>=26,r+=(o/0x4000000|0)+(s>>>26),this.words[n]=0x3ffffff&s}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=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 o(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=0x3ffffff>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var f=this.words[e]&o,a=(0|this.words[e])-f<<r;this.words[e]=a|s,s=f>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){i("number"==typeof t&&t>=0);var n=e?(e-e%26)/26:0,o=t%26,s=Math.min((t-o)/26,this.length),f=0x3ffffff^0x3ffffff>>>o<<o;if(n-=s,n=Math.max(0,n),r){for(var a=0;a<s;a++)r.words[a]=this.words[a];r.length=s}if(0===s);else if(this.length>s)for(this.length-=s,a=0;a<this.length;a++)this.words[a]=this.words[a+s];else this.words[0]=0,this.length=1;var h=0;for(a=this.length-1;a>=0&&(0!==h||a>=n);a--){var u=0|this.words[a];this.words[a]=h<<26-o|u>>>o,h=u&f}return r&&0!==h&&(r.words[r.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<<e)},o.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==e&&r++,this.length=Math.min(r,this.length),0!==e&&(this.words[this.length-1]&=0x3ffffff^0x3ffffff>>>e<<e),this._strip())},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return(i("number"==typeof t),i(t<0x4000000),t<0)?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=0x4000000;e++)this.words[e]-=0x4000000,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<0x4000000),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=0x4000000,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var f=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+f;var a=(0|t.words[n])*e;o-=0x3ffffff&a,f=(o>>26)-(a/0x4000000|0),this.words[n+r]=0x3ffffff&o}for(;n<this.length-r;n++)f=(o=(0|this.words[n+r])+f)>>26,this.words[n+r]=0x3ffffff&o;if(0===f)return this._strip();for(i(-1===f),f=0,n=0;n<this.length;n++)f=(o=-(0|this.words[n])+f)>>26,this.words[n]=0x3ffffff&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r,i=this.length-t.length,n=this.clone(),s=t,f=0|s.words[s.length-1];0!=(i=26-this._countBits(f))&&(s=s.ushln(i),n.iushln(i),f=0|s.words[s.length-1]);var a=n.length-s.length;if("mod"!==e){(r=new o(null)).length=a+1,r.words=Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var u=n.clone()._ishlnsubmul(s,1,a);0===u.negative&&(n=u,r&&(r.words[a]=1));for(var l=a-1;l>=0;l--){var c=(0|n.words[s.length+l])*0x4000000+(0|n.words[s.length+l-1]);for(c=Math.min(c/f|0,0x3ffffff),n._ishlnsubmul(s,c,l);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(s,1,l),n.isZero()||(n.negative^=1);r&&(r.words[l]=c)}return r&&r._strip(),n._strip(),"div"!==e&&0!==i&&n.iushrn(i),{div:r||null,mod:n}},o.prototype.divmod=function(t,e,r){var n,s,f;return(i(!t.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(f=this.neg().divmod(t,e),"mod"!==e&&(n=f.div.neg()),"div"!==e&&(s=f.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(f=this.divmod(t.neg(),e),"mod"!==e&&(n=f.div.neg()),{div:n,mod:f.mod}):(this.negative&t.negative)!=0?(f=this.neg().divmod(t.neg(),e),"div"!==e&&(s=f.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:f.div,mod:s}):t.length>this.length||0>this.cmp(t)?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=0x3ffffff);for(var r=0x4000000%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=0x3ffffff);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+0x4000000*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),s=new o(0),f=new o(0),a=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var u=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;(e.words[0]&d)==0&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(f.isOdd()||a.isOdd())&&(f.iadd(u),a.isub(l)),f.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(f),s.isub(a)):(r.isub(e),f.isub(n),a.isub(s))}return{a:f,b:a,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e,r=this,n=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var s=new o(1),f=new o(0),a=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;(r.words[0]&u)==0&&h<26;++h,u<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;(n.words[0]&c)==0&&l<26;++l,c<<=1);if(l>0)for(n.iushrn(l);l-- >0;)f.isOdd()&&f.iadd(a),f.iushrn(1);r.cmp(n)>=0?(r.isub(n),s.isub(f)):(n.isub(r),f.isub(s))}return 0>(e=0===r.cmpn(1)?s:f).cmpn(0)&&e.iadd(t),e},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var f=0|this.words[s];f+=o,o=f>>>26,f&=0x3ffffff,this.words[s]=f}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=0x3ffffff,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return -1===this.cmpn(t)},o.prototype.lt=function(t){return -1===this.cmp(t)},o.prototype.lten=function(t){return 0>=this.cmpn(t)},o.prototype.lte=function(t){return 0>=this.cmp(t)},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new _(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function x(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}
1function A(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},x.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},x.prototype.split=function(t,e){t.iushrn(this.n,0,e)},x.prototype.imulK=function(t){return t.imul(this.k)},n(w,x),w.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var n=t.words[9];for(i=10,e.words[e.length++]=4194303&n;i<t.length;i++){var o=0|t.words[i];t.words[i-10]=(4194303&o)<<4|n>>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=0x3ffffff&e,e=64*i+(e/0x4000000|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(M,x),n(A,x),n(E,x),E.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=(0|t.words[r])*19+e,n=0x3ffffff&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){var e;if(b[t])return b[t];if("k256"===t)e=new w;else if("p224"===t)e=new M;else if("p192"===t)e=new A;else if("p25519"===t)e=new E;else throw Error("Unknown prime "+t);return b[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i((t.negative|e.negative)==0,"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var f=new o(1).toRed(this),a=f.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(a);)u.redIAdd(a);for(var l=this.pow(u,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(f);){for(var m=d,g=0;0!==m.cmp(f);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new o(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,f=0,a=e.bitLength()%26;for(0===a&&(a=26),i=e.length-1;i>=0;i--){for(var h=e.words[i],u=a-1;u>=0;u--){var l=h>>u&1;if(n!==r[0]&&(n=this.sqr(n)),0===l&&0===s){f=0;continue}s<<=1,s|=l,(4==++f||0===i&&0===u)&&(n=this.mul(n,r[s]),f=0,s=0)}a=26}return n},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},n(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):0>n.cmpn(0)&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2539:(t,e,r)=>{"use strict";var i=r(3124);function n(t){return(t>>>24|t>>>8&65280|t<<8&0xff0000|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function s(t){if(7===t.length)return"0"+t;if(6===t.length)return"00"+t;if(5===t.length)return"000"+t;if(4===t.length)return"0000"+t;if(3===t.length)return"00000"+t;else if(2===t.length)return"000000"+t;else if(1===t.length)return"0000000"+t;else return t}e.inherits=r(4115),e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t){if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var i=0,n=0;n<t.length;n++){var o,s,f=t.charCodeAt(n);f<128?r[i++]=f:(f<2048?r[i++]=f>>6|192:((o=t,s=n,(64512&o.charCodeAt(s))!=55296||s<0||s+1>=o.length?1:(64512&o.charCodeAt(s+1))!=56320)?r[i++]=f>>12|224:(f=65536+((1023&f)<<10)+(1023&t.charCodeAt(++n)),r[i++]=f>>18|240,r[i++]=f>>12&63|128),r[i++]=f>>6&63|128),r[i++]=63&f|128)}}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=o(t[r].toString(16));return e},e.htonl=n,e.toHex32=function(t,e){for(var r="",i=0;i<t.length;i++){var o=t[i];"little"===e&&(o=n(o)),r+=s(o.toString(16))}return r},e.zero2=o,e.zero8=s,e.join32=function(t,e,r,n){var o,s=r-e;i(s%4==0);for(var f=Array(s/4),a=0,h=e;a<f.length;a++,h+=4)o="big"===n?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],f[a]=o>>>0;return f},e.split32=function(t,e){for(var r=Array(4*t.length),i=0,n=0;i<t.length;i++,n+=4){var o=t[i];"big"===e?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},e.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},e.sum64=function(t,e,r,i){var n=t[e],o=i+t[e+1]>>>0;t[e]=+(o<i)+r+n>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,i){return+(e+i>>>0<e)+t+r>>>0},e.sum64_lo=function(t,e,r,i){return e+i>>>0},e.sum64_4_hi=function(t,e,r,i,n,o,s,f){var a,h=e;return t+r+n+s+(a=0+ +((h=h+i>>>0)<e)+ +((h=h+o>>>0)<o)+ +((h=h+f>>>0)<f))>>>0},e.sum64_4_lo=function(t,e,r,i,n,o,s,f){return e+i+o+f>>>0},e.sum64_5_hi=function(t,e,r,i,n,o,s,f,a,h){var u,l=e;return t+r+n+s+a+(u=0+ +((l=l+i>>>0)<e)+ +((l=l+o>>>0)<o)+ +((l=l+f>>>0)<f)+ +((l=l+h>>>0)<h))>>>0},e.sum64_5_lo=function(t,e,r,i,n,o,s,f,a,h){return e+i+o+f+h>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>
1>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},2953:(t,e,r)=>{e.utils=r(2539),e.common=r(8711),e.sha=r(340),e.ripemd=r(8625),e.hmac=r(1861),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160},3099:(t,e,r)=>{"use strict";r.d(e,{S:()=>s});var i=r(6937),n=r.n(i),o=r(5849);function s(t){return"0x"+n().keccak_256((0,o.k9)(t))}},3124:t=>{function e(t,e){if(!t)throw Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw Error(r||"Assertion failed: "+t+" != "+e)}},3928:(t,e,r)=>{"use strict";var i,n;r.d(e,{Vy:()=>c});let o=!1,s=!1,f={debug:1,default:2,info:2,warning:3,error:4,off:5},a=f.default,h=null,u=function(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw Error("bad normalize")}catch(r){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}();!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(i||(i={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(n||(n={}));let l="0123456789abcdef";class c{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){let r=t.toLowerCase();null==f[r]&&this.throwArgumentError("invalid log level name","logLevel",t),!(a>f[r])&&console.log.apply(console,e)}debug(...t){this._log(c.levels.DEBUG,t)}info(...t){this._log(c.levels.INFO,t)}warn(...t){this._log(c.levels.WARNING,t)}makeError(t,e,r){if(s)return this.makeError("censored error",e,{});e||(e=c.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+=l[e[t]>>4],r+=l[15&e[t]];i.push(t+"=Uint8Array(0x"+r+")")}else i.push(t+"="+JSON.stringify(e))}catch(e){i.push(t+"="+JSON.stringify(r[t].toString()))}}),i.push(`code=${e}`),i.push(`version=${this.version}`);let o=t,f="";switch(e){case n.NUMERIC_FAULT:{f="NUMERIC_FAULT";let e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":f+="-"+e;break;case"negative-power":case"negative-width":f+="-unsupported";break;case"unbound-bitwise-result":f+="-unbound-result"}break}case n.CALL_EXCEPTION:case n.INSUFFICIENT_FUNDS:case n.MISSING_NEW:case n.NONCE_EXPIRED:case n.REPLACEMENT_UNDERPRICED:case n.TRANSACTION_REPLACED:case n.UNPREDICTABLE_GAS_LIMIT:f=e}f&&(t+=" [ See: https://links.ethers.org/v5-errors-"+f+" ]"),i.length&&(t+=" ("+i.join(", ")+")");let a=Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach(function(t){a[t]=r[t]}),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,c.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){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",c.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=0x1fffffffffffff)&&this.throwError(e,c.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,c.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,c.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,c.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||null==t)&&this.throwError("missing new",c.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",c.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||null==t)&&this.throwError("missing new",c.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return h||(h=new c("logger/5.8.0")),h}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",c.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",c.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}s=!!t,o=!!e}static setLogLevel(t){let e=f[t.toLowerCase()];if(null==e){c.globalLogger().warn("invalid log level - "+t);return}a=e}static from(t){return new c(t)}}c.errors=n,c.levels=i},4052:(t,e,r)=>{"use strict";var i;r.d(e,{L:()=>i}),function(t){t.NO_MONEY="NO_MONEY",t.NO_PENDING_REQUEST="NO_PENDING_REQUEST",t.IDENTITY_WINDOW_CLOSED="IDENTITY_WINDOW_CLOSED"}(i||(i={}))},4115:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},4180:(t,e,r)=>{"use strict";
1var i=r(2539),n=r(8711),o=r(1275),s=i.rotl32,f=i.sum32,a=i.sum32_5,h=o.ft_1,u=n.BlockHash,l=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6];function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.W=Array(80)}i.inherits(c,u),t.exports=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],o=this.h[1],u=this.h[2],c=this.h[3],d=this.h[4];for(i=0;i<r.length;i++){var p=~~(i/20),m=a(s(n,5),h(p,o,u,c),d,r[i],l[p]);d=c,c=u,u=s(o,30),o=n,n=m}this.h[0]=f(this.h[0],n),this.h[1]=f(this.h[1],o),this.h[2]=f(this.h[2],u),this.h[3]=f(this.h[3],c),this.h[4]=f(this.h[4],d)},c.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},4526:(t,e,r)=>{"use strict";function i(t){if(!Number.isSafeInteger(t)||t<0)throw Error("positive integer expected, got "+t)}function n(t,...e){if(!(t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name))throw Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw Error("Uint8Array expected of length "+e+", got length="+t.length)}function o(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function s(t,e){n(t);let r=e.outputLen;if(t.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}r.d(e,{CC:()=>o,DO:()=>n,Fe:()=>i,Ht:()=>s})},5607:(t,e,r)=>{"use strict";r.d(e,{Kt:()=>U,lK:()=>C});var i,n=r(5849),o=r(2437),s=r.n(o),f=r(3928),a=s().BN;let h=new f.Vy("bignumber/5.8.0"),u={},l=!1;class c{constructor(t,e){t!==u&&h.throwError("cannot call constructor directly; use BigNumber.from",f.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return p(m(this).fromTwos(t))}toTwos(t){return p(m(this).toTwos(t))}abs(){return"-"===this._hex[0]?c.from(this._hex.substring(1)):this}add(t){return p(m(this).add(m(t)))}sub(t){return p(m(this).sub(m(t)))}div(t){return c.from(t).isZero()&&g("division-by-zero","div"),p(m(this).div(m(t)))}mul(t){return p(m(this).mul(m(t)))}mod(t){let e=m(t);return e.isNeg()&&g("division-by-zero","mod"),p(m(this).umod(e))}pow(t){let e=m(t);return e.isNeg()&&g("negative-power","pow"),p(m(this).pow(e))}and(t){let e=m(t);return(this.isNegative()||e.isNeg())&&g("unbound-bitwise-result","and"),p(m(this).and(e))}or(t){let e=m(t);return(this.isNegative()||e.isNeg())&&g("unbound-bitwise-result","or"),p(m(this).or(e))}xor(t){let e=m(t);return(this.isNegative()||e.isNeg())&&g("unbound-bitwise-result","xor"),p(m(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&g("negative-width","mask"),p(m(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&g("negative-width","shl"),p(m(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&g("negative-width","shr"),p(m(this).shrn(t))}eq(t){return m(this).eq(m(t))}lt(t){return m(this).lt(m(t))}lte(t){return m(this).lte(m(t))}gt(t){return m(this).gt(m(t))}gte(t){return m(this).gte(m(t))}isNegative(){return"-"===this._hex[0]}isZero(){return m(this).isZero()}toNumber(){try{return m(this).toNumber()}catch(t){g("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return h.throwError("this platform does not support BigInt",f.Vy.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?l||(l=!0,h.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?h.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Vy.errors.UNEXPECTED_ARGUMENT,{}):h.throwError("BigNumber.toString does not accept parameters",f.Vy.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof c)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new c(u,d(t)):t.match(/^-?[0-9]+$/)?new c(u,d(new a(t))):h.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&g("underflow","BigNumber.from",t),(t>=0x1fffffffffffff||t<=-0x1fffffffffffff)&&g("overflow","BigNumber.from",t),c.from(String(t));if("bigint"==typeof t)return c.from(t.toString());if((0,n.aY)(t))return c.from((0,n.c$)(t));if(t){if(t.toHexString){let e=t.toHexString();if("string"==typeof e)return c.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,n.Lo)(e)||"-"===e[0]&&(0,n.Lo)(e.substring(1))))return c.from(e)}}return h.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function d(t){if("string"!=typeof t)return d(t.toString(16));if("-"===t[0])return("-"===(t=t.substring(1))[0]&&h.throwArgumentError("invalid hex","value",t),"0x00"===(t=d(t)))?t:"-"+t;
1if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function p(t){return c.from(d(t))}function m(t){let e=c.from(t).toHexString();return"-"===e[0]?new a("-"+e.substring(3),16):new a(e.substring(2),16)}function g(t,e,r){let i={fault:t,operation:e};return null!=r&&(i.value=r),h.throwError(t,f.Vy.errors.NUMERIC_FAULT,i)}var y=r(3099);let v=new f.Vy("address/5.8.0");function b(t){(0,n.Lo)(t,20)||v.throwArgumentError("invalid address","address",t);let e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let t=0;t<40;t++)r[t]=e[t].charCodeAt(0);let i=(0,n.k9)((0,y.S)(r));for(let t=0;t<40;t+=2)i[t>>1]>>4>=8&&(e[t]=e[t].toUpperCase()),(15&i[t>>1])>=8&&(e[t+1]=e[t+1].toUpperCase());return"0x"+e.join("")}let x={};for(let t=0;t<10;t++)x[String(t)]=String(t);for(let t=0;t<26;t++)x[String.fromCharCode(65+t)]=String(10+t);let w=Math.floor(Math.log10?Math.log10(0x1fffffffffffff):Math.log(0x1fffffffffffff)/Math.LN10);function M(t){let e=null;if("string"!=typeof t&&v.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=b(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&v.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==function(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(t=>x[t]).join("");for(;e.length>=w;){let t=e.substring(0,w);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}(t)&&v.throwArgumentError("bad icap checksum","address",t),e=new a(t.substring(4),36).toString(16);e.length<40;)e="0"+e;e=b("0x"+e)}else v.throwArgumentError("invalid address","address",t);return e}var A=r(9435);let E=new f.Vy("rlp/5.8.0");function _(t){let e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function S(t,e,r){let i=0;for(let n=0;n<r;n++)i=256*i+t[e+n];return i}function I(t){return(0,n.c$)(function t(e){if(Array.isArray(e)){let r=[];if(e.forEach(function(e){r=r.concat(t(e))}),r.length<=55)return r.unshift(192+r.length),r;let i=_(r.length);return i.unshift(247+i.length),i.concat(r)}(0,n.f)(e)||E.throwArgumentError("RLP object must be BytesLike","object",e);let r=Array.prototype.slice.call((0,n.k9)(e));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;let i=_(r.length);return i.unshift(183+i.length),i.concat(r)}(t))}function N(t,e,r,i){let n=[];for(;r<e+1+i;){let o=function(t,e){if(0===t.length&&E.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{}),t[e]>=248){let r=t[e]-247;e+1+r>t.length&&E.throwError("data short segment too short",Logger.errors.BUFFER_OVERRUN,{});let i=S(t,e+1,r);return e+1+r+i>t.length&&E.throwError("data long segment too short",Logger.errors.BUFFER_OVERRUN,{}),N(t,e,e+1+r,r+i)}if(t[e]>=192){let r=t[e]-192;return e+1+r>t.length&&E.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{}),N(t,e,e+1,r)}if(t[e]>=184){let r=t[e]-183;e+1+r>t.length&&E.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{});let i=S(t,e+1,r);e+1+r+i>t.length&&E.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{});let n=hexlify(t.slice(e+1+r,e+1+r+i));return{consumed:1+r+i,result:n}}if(t[e]>=128){let r=t[e]-128;e+1+r>t.length&&E.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{});let i=hexlify(t.slice(e+1,e+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:hexlify(t[e])}}(t,r);n.push(o.result),(r+=o.consumed)>e+1+i&&E.throwError("child data too short",Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+i,result:n}}var R=r(6861);let O=new f.Vy("transactions/5.8.0");!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(i||(i={}));let T=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],k={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function U(t){let e=(0,R.uN)(t);return M((0,n.Ab)((0,y.S)((0,n.Ab)(e,1)),12))}function P(t,e){let r=(0,n.gr)(c.from(t).toHexString());return r.length>32&&O.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function L(t,e){return{address:M(t),storageKeys:(e||[]).map((e,r)=>(32!==(0,n.cm)(e)&&O.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase()))}}function B(t){return(function(t){if(Array.isArray(t))return t.map((t,e)=>Array.isArray(t)?(t.length>2&&O.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),L(t[0],t[1])):L(t.address,t.storageKeys));let e=Object.keys(t).map(e=>{let r=t[e].reduce((t,e)=>(t[e]=!0,t),{});return L(e,Object.keys(r).sort())});return e.sort((t,e)=>t.address.localeCompare(e.address)),e})(t).map(t=>[t.address,t.storageKeys])}function C(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&O.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){(0,A.qN)(t,k);let r=[];T.forEach(function(e){let i=t[e.name]||[],o={};e.numeric&&(o.hexPad="left"),i=(0,n.k9)((0,n.c$)(i,o)),e.length&&i.length!==e.length&&i.length>0&&O.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,i),e.maxLength&&(i=(0,n.gr)(i)).length>e.maxLength&&O.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,i),r.push((0,n.c$)(i))});let i=0;if(null!=t.chainId?"number"!=typeof(i=t.chainId)&&O.throwArgumentError("invalid transaction.chainId","transaction",t):e&&!(0,n.f)(e)&&e.v>28&&(i=Math.floor((e.v-35)/2)),0!==i&&(r.push((0,n.c$)(i)),r.push("0x"),r.push("0x")),!e)return I(r);let o=(0,n.Pc)(e),s=27+o.recoveryParam;return 0!==i?(r.pop(),r.pop(),r.pop(),s+=2*i+8,o.v>28&&o.v!==s&&O.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):o.v!==s&&O.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,n.c$)(s)),r.push((0,n.gr)((0,n.k9)(o.r))),r.push((0,n.gr)((0,n.k9)(o.s))),I(r)}(t,e);switch(t.type){case 1:return function(t,e){let r=[P(t.chainId||0,"chainId"),P(t.nonce||0,"nonce"),P(t.gasPrice||0,"gasPrice"),P(t.gasLimit||0,"gasLim
1it"),null!=t.to?M(t.to):"0x",P(t.value||0,"value"),t.data||"0x",B(t.accessList||[])];if(e){let t=(0,n.Pc)(e);r.push(P(t.recoveryParam,"recoveryParam")),r.push((0,n.gr)(t.r)),r.push((0,n.gr)(t.s))}return(0,n.qn)(["0x01",I(r)])}(t,e);case 2:return function(t,e){if(null!=t.gasPrice){let e=c.from(t.gasPrice),r=c.from(t.maxFeePerGas||0);e.eq(r)||O.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}let r=[P(t.chainId||0,"chainId"),P(t.nonce||0,"nonce"),P(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(t.maxFeePerGas||0,"maxFeePerGas"),P(t.gasLimit||0,"gasLimit"),null!=t.to?M(t.to):"0x",P(t.value||0,"value"),t.data||"0x",B(t.accessList||[])];if(e){let t=(0,n.Pc)(e);r.push(P(t.recoveryParam,"recoveryParam")),r.push((0,n.gr)(t.r)),r.push((0,n.gr)(t.s))}return(0,n.qn)(["0x02",I(r)])}(t,e)}return O.throwError(`unsupported transaction type: ${t.type}`,f.Vy.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}},5631:(t,e,r)=>{"use strict";r.d(e,{FH:()=>d,BV:()=>p,$_:()=>c});var i,n,o=function(t,e,r,i){if("a"===r&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(t):i?i.value:e.get(t)};class s{constructor(t,e){Object.defineProperty(this,"message",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.message=t,this.status=e}toString(){return this.message}}let f=(t,e)=>fetch(t,e).then(t=>t.ok?t.text().then(t=>0===t.length?null:JSON.parse(t)):t.json().then(e=>{throw new s(e.error,t.status)})),a=(t,e)=>`${t.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`;class h{constructor(){i.add(this),Object.defineProperty(this,"uri",{enumerable:!0,configurable:!0,writable:!0,value:""})}post(t,e,r={}){let s;let a=r.contentType??"application/json";switch(a){case"multipart/form-data":for(let t in s=new FormData,e)s.append(t,e[t]);break;case"application/json":s=JSON.stringify(e);break;default:throw Error(`Unsupported content type: ${a}`)}return f(o(this,i,"m",n).call(this,t),{method:"POST",body:s,headers:{..."multipart/form-data"!==a&&{"Content-Type":a},...r.headers},...r})}get(t){return f(o(this,i,"m",n).call(this,t),{method:"GET"})}}i=new WeakSet,n=function(t){return t.startsWith("http://")||t.startsWith("https://")?t:a(this.uri,t)};class u extends h{constructor(){super(...arguments),Object.defineProperty(this,"uri",{enumerable:!0,configurable:!0,writable:!0,value:"https://node.deso.org"})}get nodeURI(){return this.uri}configure(t){"string"==typeof t.nodeURI&&(this.uri=t.nodeURI)}}class l extends h{constructor(){super(...arguments),Object.defineProperty(this,"uri",{enumerable:!0,configurable:!0,writable:!0,value:"https://media.deso.org"})}get mediaURI(){return this.uri}configure(t){"string"==typeof t.mediaURI&&(this.uri=t.mediaURI)}}let c=new l,d=new u,p=(t={},e)=>{let r="api/v0/get-app-state";return d.post(e?.nodeURI?a(e.nodeURI,r):r,t)}},5849:(t,e,r)=>{"use strict";r.d(e,{k9:()=>h,qn:()=>g,cm:()=>p,Ab:()=>m,bj:()=>y,c$:()=>d,aY:()=>a,f:()=>s,Lo:()=>l,FU:()=>b,Pc:()=>v,gr:()=>u});let i=new(r(3928)).Vy("bytes/5.8.0");function n(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function s(t){return l(t)&&!(t.length%2)||a(t)}function f(t){return"number"==typeof t&&t==t&&t%1==0}function a(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!f(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){let r=t[e];if(!f(r)||r<0||r>=256)return!1}return!0}function h(t,e){if(e||(e={}),"number"==typeof t){i.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),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),n(t)&&(t=t.toHexString()),l(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":i.throwArgumentError("hex data is odd-length","value",t));let n=[];for(let t=0;t<r.length;t+=2)n.push(parseInt(r.substring(t,t+2),16));return o(new Uint8Array(n))}return a(t)?o(new Uint8Array(t)):i.throwArgumentError("invalid arrayify value","value",t)}function u(t){let e=h(t);if(0===e.length)return e;let r=0;for(;r<e.length&&0===e[r];)r++;return r&&(e=e.slice(r)),e}function l(t,e){return"string"==typeof t&&!!t.match(/^0x[0-9A-Fa-f]*$/)&&(!e||t.length===2+2*e)}let c="0123456789abcdef";function d(t,e){if(e||(e={}
1),"number"==typeof t){i.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=c[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),n(t))return t.toHexString();if(l(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":i.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(a(t)){let e="0x";for(let r=0;r<t.length;r++){let i=t[r];e+=c[(240&i)>>4]+c[15&i]}return e}return i.throwArgumentError("invalid hexlify value","value",t)}function p(t){if("string"!=typeof t)t=d(t);else if(!l(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return("string"!=typeof t?t=d(t):(!l(t)||t.length%2)&&i.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r)?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function g(t){let e="0x";return t.forEach(t=>{e+=d(t).substring(2)}),e}function y(t,e){for("string"!=typeof t?t=d(t):l(t)||i.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&i.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function v(t){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(t)){let r=h(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=d(r.slice(0,32)),e.s=d(r.slice(32,64))):65===r.length?(e.r=d(r.slice(0,32)),e.s=d(r.slice(32,64)),e.v=r[64]):i.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:i.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=d(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=h(t)).length>e&&i.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}(h(e._vs),32);e._vs=d(r);let n=+(r[0]>=128);null==e.recoveryParam?e.recoveryParam=n:e.recoveryParam!==n&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;let s=d(r);null==e.s?e.s=s:e.s!==s&&i.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?i.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&&i.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&l(e.r)?e.r=y(e.r,32):i.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&l(e.s)?e.s=y(e.s,32):i.throwArgumentError("signature missing or invalid s","signature",t);let r=h(e.s);r[0]>=128&&i.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);let n=d(r);e._vs&&(l(e._vs)||i.throwArgumentError("signature invalid _vs","signature",t),e._vs=y(e._vs,32)),null==e._vs?e._vs=n:e._vs!==n&&i.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function b(t){return d(function(t){let e=t.map(t=>
1h(t)),r=new Uint8Array(e.reduce((t,e)=>t+e.length,0));return e.reduce((t,e)=>(r.set(e,t),t+e.length),0),o(r)}([(t=v(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},6054:(t,e,r)=>{"use strict";var i=r(2539),n=r(8839);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]}i.inherits(o,n),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},6861:(t,e,r)=>{"use strict";r.d(e,{uN:()=>K,jL:()=>q});var i=r(2437),n=r.n(i),o=r(2953),s=r.n(o);function f(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t,null==e?r.path:e)}},r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var a=h;function h(t,e){if(!t)throw Error(e||"Assertion failed")}h.equal=function(t,e,r){if(t!=e)throw Error(r||"Assertion failed: "+t+" != "+e)};var u=f(function(t,e){function r(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",i=0;i<t.length;i++)e+=r(t[i].toString(16));return e}e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var i=0;i<t.length;i++)r[i]=0|t[i];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(t="0"+t);for(var i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var i=0;i<t.length;i++){var n=t.charCodeAt(i),o=n>>8,s=255&n;o?r.push(o,s):r.push(s)}return r},e.zero2=r,e.toHex=i,e.encode=function(t,e){return"hex"===e?i(t):t}}),l=f(function(t,e){e.assert=a,e.toArray=u.toArray,e.zero2=u.zero2,e.toHex=u.toHex,e.encode=u.encode,e.getNAF=function(t,e,r){var i=Array(Math.max(t.bitLength(),r)+1);for(s=0;s<i.length;s+=1)i[s]=0;var n=1<<e+1,o=t.clone();for(s=0;s<i.length;s++){var s,f,a=o.andln(n-1);o.isOdd()?(f=a>(n>>1)-1?(n>>1)-a:a,o.isubn(f)):f=0,i[s]=f,o.iushrn(1)}return i},e.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i=0,n=0;t.cmpn(-i)>0||e.cmpn(-n)>0;){var o,s,f,a=t.andln(3)+i&3,h=e.andln(3)+n&3;3===a&&(a=-1),3===h&&(h=-1),s=(1&a)==0?0:(3==(o=t.andln(7)+i&7)||5===o)&&2===h?-a:a,r[0].push(s),f=(1&h)==0?0:(3==(o=e.andln(7)+n&7)||5===o)&&2===a?-h:h,r[1].push(f),2*i===s+1&&(i=1-i),2*n===f+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r},e.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new(n())(t,"hex","le")}}),c=l.getNAF,d=l.getJSF,p=l.assert;function m(t,e){this.type=t,this.p=new(n())(e.p,16),this.red=e.prime?n().red(e.prime):n().mont(this.p),this.zero=new(n())(0).toRed(this.red),this.one=new(n())(1).toRed(this.red),this.two=new(n())(2).toRed(this.red),this.n=e.n&&new(n())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function g(t,e){this.curve=t,this.type=e,this.precomputed=null}m.prototype.point=function(){throw Error("Not implemented")},m.prototype.validate=function(){throw Error("Not implemented")},m.prototype._fixedNafMul=function(t,e){p(t.precomputed);var r,i,n=t._getDoubles(),o=c(e,1,this._bitLength),s=(1<<n.step+1)-(n.step%2==0?2:1);s/=3;var f=[];for(r=0;r<o.length;r+=n.step){i=0;for(var a=r+n.step-1;a>=r;a--)i=(i<<1)+o[a];f.push(i)}for(var h=this.jpoint(null,null,null),u=this.jpoint(null,null,null),l=s;l>0;l--){for(r=0;r<f.length;r++)(i=f[r])===l?u=u.mixedAdd(n.points[r]):i===-l&&(u=u.mixedAdd(n.points[r].neg()));h=h.add(u)}return h.toP()},m.prototype._wnafMul=function(t,e){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var n=i.points,o=c(e,r,this._bitLength),s=this.jpoint(null,null,null),f=o.length-1;f>=0;f--){for(var a=0;f>=0&&0===o[f];f--)a++;if(f>=0&&a++,s=s.dblp(a),f<0)break;var h=o[f];p(0!==h),s="affine"===t.type?h>0?s.mixedAdd(n[h-1>>1]):s.mixedAdd(n[-h-1>>1].neg()):h>0?s.add(n[h-1>>1]):s.add(n[-h-1>>1].neg())}return"affine"===t.type?s.toP():s},m.prototype._wnafMulAdd=function(t,e,r,i,n){var o,s,f,a=this._wnafT1,h=this._wnafT2,u=this._wnafT3,l=0;for(o=0;o<i;o++){var p=(f=e[o])._getNAFPoints(t);a[o]=p.wnd,h[o]=p.points}for(o=i-1;o>=1;o-=2){var m=o-1,g=o;if(1!==a[m]||1!==a[g]){u[m]=c(r[m],a[m],this._bitLength),u[g]=c(r[g],a[g],this._bitLength),l=Math.max(u[m].length,l),l=Math.max(u[g].length,l);continue}var y=[e[m],null,null,e[g]];
10===e[m].y.cmp(e[g].y)?(y[1]=e[m].add(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].add(e[g].neg())):(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=d(r[m],r[g]);for(s=0,l=Math.max(b[0].length,l),u[m]=Array(l),u[g]=Array(l);s<l;s++){var x=0|b[0][s],w=0|b[1][s];u[m][s]=v[(x+1)*3+(w+1)],u[g][s]=0,h[m]=y}}var M=this.jpoint(null,null,null),A=this._wnafT4;for(o=l;o>=0;o--){for(var E=0;o>=0;){var _=!0;for(s=0;s<i;s++)A[s]=0|u[s][o],0!==A[s]&&(_=!1);if(!_)break;E++,o--}if(o>=0&&E++,M=M.dblp(E),o<0)break;for(s=0;s<i;s++){var S=A[s];0!==S&&(S>0?f=h[s][S-1>>1]:S<0&&(f=h[s][-S-1>>1].neg()),M="affine"===f.type?M.mixedAdd(f):M.add(f))}}for(o=0;o<i;o++)h[o]=null;return n?M:M.toP()},m.BasePoint=g,g.prototype.eq=function(){throw Error("Not implemented")},g.prototype.validate=function(){return this.curve.validate(this)},m.prototype.decodePoint=function(t,e){t=l.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?p(t[t.length-1]%2==0):7===t[0]&&p(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw Error("Unknown point format")},g.prototype.encodeCompressed=function(t){return this.encode(t,!0)},g.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},g.prototype.encode=function(t,e){return l.encode(this._encode(e),t)},g.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},g.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},g.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<e;n+=t){for(var o=0;o<t;o++)i=i.dbl();r.push(i)}return{step:t,points:r}},g.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)e[n]=e[n-1].add(i);return{wnd:t,points:e}},g.prototype._getBeta=function(){return null},g.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var y=f(function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}}),v=l.assert;function b(t){m.call(this,"short",t),this.a=new(n())(t.a,16).toRed(this.red),this.b=new(n())(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function x(t,e,r,i){m.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new(n())(e,16),this.y=new(n())(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function w(t,e,r,i){m.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(n())(0)):(this.x=new(n())(e,16),this.y=new(n())(r,16),this.z=new(n())(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}y(b,m),b.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(t.beta)e=new(n())(t.beta,16).toRed(this.red);else{var e,r,i,o=this._getEndoRoots(this.p);e=(e=0>o[0].cmp(o[1])?o[0]:o[1]).toRed(this.red)}if(t.lambda)r=new(n())(t.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(e))?r=s[0]:(r=s[1],v(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return i=t.basis?t.basis.map(function(t){return{a:new(n())(t.a,16),b:new(n())(t.b,16)}}):this._getEndoBasis(r),{beta:e,lambda:r,basis:i}}},b.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:n().mont(t),r=new(n())(2).toRed(e).redInvm(),i=r.redNeg(),o=new(n())(3).toRed(e).redNeg().redSqrt().redMul(r);return[i.redAdd(o).fromRed(),i.redSub(o).fromRed()]},b.prototype._getEndoBasis=function(t){for(var e,r,i,o,s,f,a,h,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=t,d=this.n.clone(),p=new(n())(1),m=new(n())(0),g=new(n())(0),y=new(n())(1),v=0;0!==c.cmpn(0);){var b=d.div(c);h=d.sub(b.mul(c)),u=g.sub(b.mul(p));var x=y.sub(b.mul(m));if(!i&&0>h.cmp(l))e=a.neg(),r=p,i=h.neg(),o=u;else if(i&&2==++v)break;a=h,d=c,c=h,g=p,p=u,y=m,m=x}s=h.neg(),f=u;var w=i.sqr().add(o.sqr());return s.sqr().add(f.sqr()).cmp(w)>=0&&(s=e,f=r),i.negative&&(i=i.neg(),o=o.neg()),s.negative&&(s=s.neg(),f=f.neg()),[{a:i,b:o},{a:s,b:f}]},b.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=n.mul(r.a),f=o.mul(i.a),a=n.mul(r.b),h=o.mul(i.b);return{k1:t.sub(s).sub(f),k2:a.add(h).neg()}},b.prototype.pointFromX=function(t,e){(t=new(n())(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var o=i.fromRed().isOdd();return(e&&!o||!e&&o)&&(i=i.redNeg()),this.point(t,i)},b.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},b.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),f=t[o],a=f._getBeta();s.k1.negative&&(s.k1.ineg(),f=f.neg(!0)),s.k2.negative&&(s.k2.ineg(),a=a.neg(!0)),i[2*o]=f,i[2*o+1]=a,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var h=this._wnafMulAdd(1,i,n,2*o,r),u=0;u<2*o;u++)i[u]=null,n[u]=null;return h},y(x,m.BasePoint),b.prototype.point=function(t,e,r){return new x(this,t,e,r)},b.prototype.pointFromJSON=function(t,e){return x.fromJSON(this,t,e)},x.prototype._getBeta=function(){if(this.curve.endo){var t=this.prec
vendor: 2,814 bytes, line 1
1omputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return e}},x.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},x.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;function n(e){return t.point(e[0],e[1],r)}var o=e[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},x.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},x.prototype.isInfinity=function(){return this.inf},x.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t)||0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},x.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},x.prototype.getX=function(){return this.x.fromRed()},x.prototype.getY=function(){return this.y.fromRed()},x.prototype.mul=function(t){return(t=new(n())(t,16),this.isInfinity())?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},x.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},x.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},x.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},x.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());
vendor: 4,387 bytes, line 1
1if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},x.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},y(w,m.BasePoint),b.prototype.jpoint=function(t,e,r){return new w(this,t,e,r)},w.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},w.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},w.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),f=i.redSub(n),a=o.redSub(s);if(0===f.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=f.redSqr(),u=h.redMul(f),l=i.redMul(h),c=a.redSqr().redIAdd(u).redISub(l).redISub(l),d=a.redMul(l.redISub(c)).redISub(o.redMul(u)),p=this.z.redMul(t.z).redMul(f);return this.curve.jpoint(c,d,p)},w.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(i),f=n.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=s.redSqr(),h=a.redMul(s),u=r.redMul(a),l=f.redSqr().redIAdd(h).redISub(u).redISub(u),c=f.redMul(u.redISub(l)).redISub(n.redMul(h)),d=this.z.redMul(s);return this.curve.jpoint(l,c,d)},w.prototype.dblp=function(t){if(0===t||this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var e,r=this;for(e=0;e<t;e++)r=r.dbl();return r}var i=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,f=this.z,a=f.redSqr().redSqr(),h=s.redAdd(s);for(e=0;e<t;e++){var u=o.redSqr(),l=h.redSqr(),c=l.redSqr(),d=u.redAdd(u).redIAdd(u).redIAdd(i.redMul(a)),p=o.redMul(l),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(c);var v=h.redMul(f);e+1<t&&(a=a.redMul(c)),o=m,f=v,h=y}return this.curve.jpoint(o,h.redMul(n),f)},w.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},w.prototype._zeroDbl=function(){if(this.zOne){var t,e,r,i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(o);s=s.redIAdd(s);var f=i.redAdd(i).redIAdd(i),a=f.redSqr().redISub(s).redISub(s),h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),t=a,e=f.redMul(s.redISub(a)).redISub(h),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),l=this.y.redSqr(),c=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(u).redISub(c);d=d.redIAdd(d);var p=u.redAdd(u).redIAdd(u),m=p.redSqr(),g=c.redIAdd(c);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},w.prototype._threeDbl=function(){if(this.zOne){var t,e,r,i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(o);s=s.redIAdd(s);var f=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),a=f.redSqr().redISub(s).redISub(s);t=a;var h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),e=f.redMul(s.redISub(a)).redISub(h),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),l=this.y.redSqr(),c=this.x.redMul(l),d=this.x.redSub(u).redMul(this.x.redAdd(u));d=d.redAdd(d).redIAdd(d);var p=c.redIAdd(c),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(u);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},w.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),f=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)),a=e.redAdd(e),h=(a=a.redIAdd(a)).redMul(s),u=f.redSqr().redISub(h.redAdd(h)),l=h.redISub(u),c=s.redSqr();c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=f.redMul(l).redISub(c),p=r.redAdd(r).redMul(i);return this.curve.jpoint(u,d,p)},w.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);
vendor: 6,418 bytes, line 1
1var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),i=e.redSqr(),n=t.redAdd(t).redIAdd(t),o=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(i),f=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),a=i.redIAdd(i);a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var h=n.redIAdd(s).redSqr().redISub(o).redISub(f).redISub(a),u=e.redMul(h);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.x.redMul(f).redISub(u);l=(l=l.redIAdd(l)).redIAdd(l);var c=this.y.redMul(h.redMul(a.redISub(h)).redISub(s.redMul(f)));c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(f);return this.curve.jpoint(l,c,d)},w.prototype.mul=function(t,e){return t=new(n())(t,e),this.curve._wnafMul(this,t)},w.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var i=e.redMul(this.z),n=r.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0)},w.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var i=t.clone(),n=this.curve.redN.redMul(e);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},w.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},w.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var M=f(function(t,e){e.base=m,e.short=b,e.mont=null,e.edwards=null}),A=f(function(t,e){var r,i=l.assert;function n(t){"short"===t.type?this.curve=new M.short(t):"edwards"===t.type?this.curve=new M.edwards(t):this.curve=new M.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var i=new n(r);return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:i}),i}})}e.PresetCurve=n,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:s().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:s().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:s().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:s().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:s().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(t){r=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:s().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"}
1,{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})});function E(t){if(!(this instanceof E))return new E(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=u.toArray(t.entropy,t.entropyEnc||"hex"),r=u.toArray(t.nonce,t.nonceEnc||"hex"),i=u.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}E.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=0x1000000000000},E.prototype._hmac=function(){return new(s()).hmac(this.hash,this.K)},E.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},E.prototype.reseed=function(t,e,r,i){"string"!=typeof e&&(i=r,r=e,e=null),t=u.toArray(t,e),r=u.toArray(r,i),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},E.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof e&&(i=r,r=e,e=null),r&&(r=u.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,t);return this._update(r),this._reseed++,u.encode(o,e)};var _=l.assert;function S(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}S.fromPublic=function(t,e,r){return e instanceof S?e:new S(t,{pub:e,pubEnc:r})},S.fromPrivate=function(t,e,r){return e instanceof S?e:new S(t,{priv:e,privEnc:r})},S.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},S.prototype.getPublic=function(t,e){return("string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e)?this.pub.encode(e,t):this.pub},S.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},S.prototype._importPrivate=function(t,e){this.priv=new(n())(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},S.prototype._importPublic=function(t,e){if(t.x||t.y){"mont"===this.ec.curve.type?_(t.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&_(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,e)},S.prototype.derive=function(t){return t.validate()||_(t.validate(),"public point not validated"),t.mul(this.priv).getX()},S.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},S.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},S.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var I=l.assert;function N(t,e){if(t instanceof N)return t;this._importDER(t,e)||(I(t.r&&t.s,"Signature without r or s"),this.r=new(n())(t.r,16),this.s=new(n())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function R(){this.place=0}function O(t,e){var r=t[e.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4||0===t[e.place])return!1;for(var n=0,o=0,s=e.place;o<i;o++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function T(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function k(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}N.prototype._importDER=function(t,e){t=l.toArray(t,e);var r=new R;if(48!==t[r.place++])return!1;var i=O(t,r);
1if(!1===i||i+r.place!==t.length||2!==t[r.place++])return!1;var o=O(t,r);if(!1===o||(128&t[r.place])!=0)return!1;var s=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var f=O(t,r);if(!1===f||t.length!==f+r.place||(128&t[r.place])!=0)return!1;var a=t.slice(r.place,f+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new(n())(s),this.s=new(n())(a),this.recoveryParam=null,!0},N.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=T(e),r=T(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var i=[2];k(i,e.length),(i=i.concat(e)).push(2),k(i,r.length);var n=i.concat(r),o=[48];return k(o,n.length),o=o.concat(n),l.encode(o,t)};var U=function(){throw Error("unsupported")},P=l.assert;function L(t){if(!(this instanceof L))return new L(t);"string"==typeof t&&(P(Object.prototype.hasOwnProperty.call(A,t),"Unknown curve "+t),t=A[t]),t instanceof A.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}L.prototype.keyPair=function(t){return new S(this,t)},L.prototype.keyFromPrivate=function(t,e){return S.fromPrivate(this,t,e)},L.prototype.keyFromPublic=function(t,e){return S.fromPublic(this,t,e)},L.prototype.genKeyPair=function(t){t||(t={});for(var e=new E({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||U(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new(n())(2));;){var o=new(n())(e.generate(r));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}},L.prototype._truncateToN=function(t,e,r){if(n().isBN(t)||"number"==typeof t)i=(t=new(n())(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new(n())(t,16);else{var i,o=t.toString();i=o.length+1>>>1,t=new(n())(o,16)}"number"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return(s>0&&(t=t.ushrn(s)),!e&&t.cmp(this.n)>=0)?t.sub(this.n):t},L.prototype.sign=function(t,e,r,i){if("object"==typeof r&&(i=r,r=null),i||(i={}),"string"!=typeof t&&"number"!=typeof t&&!n().isBN(t)){P("object"==typeof t&&t&&"number"==typeof t.length,"Expected message to be an array-like, a hex string, or a BN instance"),P(t.length>>>0===t.length);for(var o=0;o<t.length;o++)P((255&t[o])===t[o])}e=this.keyFromPrivate(e,r),P(!(t=this._truncateToN(t,!1,i.msgBitLength)).isNeg(),"Can not sign a negative message");var s=this.n.byteLength(),f=e.getPrivate().toArray("be",s),a=t.toArray("be",s);P(new(n())(a).eq(t),"Can not sign message");for(var h=new E({hash:this.hash,entropy:f,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new(n())(1)),l=0;;l++){var c=i.k?i.k(l):new(n())(h.generate(this.n.byteLength()));if(!(0>=(c=this._truncateToN(c,!0)).cmpn(1)||c.cmp(u)>=0)){var d=this.g.mul(c);if(!d.isInfinity()){var p=d.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var g=c.invm(this.n).mul(m.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=+!!d.getY().isOdd()|2*(0!==p.cmp(m));return i.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new N({r:m,s:g,recoveryParam:y})}}}}}},L.prototype.verify=function(t,e,r,i,n){n||(n={}),t=this._truncateToN(t,!1,n.msgBitLength),r=this.keyFromPublic(r,i);var o,s=(e=new N(e,"hex")).r,f=e.s;if(0>s.cmpn(1)||s.cmp(this.n)>=0||0>f.cmpn(1)||f.cmp(this.n)>=0)return!1;var a=f.invm(this.n),h=a.mul(t).umod(this.n),u=a.mul(s).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(h,r.getPublic(),u)).isInfinity()&&o.eqXToP(s):!(o=this.g.mulAdd(h,r.getPublic(),u)).isInfinity()&&0===o.getX().umod(this.n).cmp(s)},L.prototype.recoverPubKey=function(t,e,r,i){P((3&r)===r,"The recovery param is more than two bits"),e=new N(e,i);var o=this.n,s=new(n())(t),f=e.r,a=e.s,h=1&r,u=r>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw Error("Unable to find sencond key candinate");f=u?this.curve.pointFromX(f.add(this.curve.n),h):this.curve.pointFromX(f,h);var l=e.r.invm(o),c=o.sub(s).mul(l).umod(o),d=a.mul(l).umod(o);return this.g.mulAdd(c,f,d)},L.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new N(e,i)).recoveryParam)return e.recoveryParam;for(var n,o=0;o<4;o++){try{n=this.recoverPubKey(t,e,o)}catch(t){continue}if(n.eq(r))return o}throw Error("Unable to find valid recovery factor")};var B=f(function(t,e){e.version="6.6.1",e.utils=l,e.rand=function(){throw Error("unsupported")},e.curve=M,e.curves=A,e.ec=L,e.eddsa=null}).ec,C=r(5849),D=r(9435);let F=new(r(3928)).Vy("signing-key/5.8.0"),z=null;function H(){return z||(z=new B("secp256k1")),z}class j{constructor(t){(0,D.yY)(this,"curve","secp256k1"),(0,D.yY)(this,"privateKey",(0,C.c$)(t)),32!==(0,C.cm)(this.privateKey)&&F.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let e=H().keyFromPrivate((0,C.k9)(this.privateKey));(0,D.yY)(this,"publicKey","0x"+e.getPublic(!1,"hex")),(0,D.yY)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),(0,D.yY)(this,"_isSigningKey",!0)}_addPoint(t){let e=H().keyFromPublic((0,C.k9)(this.publicKey)),r=H().keyFromPublic((0,C.k9)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}
1signDigest(t){let e=H().keyFromPrivate((0,C.k9)(this.privateKey)),r=(0,C.k9)(t);32!==r.length&&F.throwArgumentError("bad digest length","digest",t);let i=e.sign(r,{canonical:!0});return(0,C.Pc)({recoveryParam:i.recoveryParam,r:(0,C.bj)("0x"+i.r.toString(16),32),s:(0,C.bj)("0x"+i.s.toString(16),32)})}computeSharedSecret(t){let e=H().keyFromPrivate((0,C.k9)(this.privateKey)),r=H().keyFromPublic((0,C.k9)(K(t)));return(0,C.bj)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!!(t&&t._isSigningKey)}}function q(t,e){let r=(0,C.Pc)(e),i={r:(0,C.k9)(r.r),s:(0,C.k9)(r.s)};return"0x"+H().recoverPubKey((0,C.k9)(t),i,r.recoveryParam).encode("hex",!1)}function K(t,e){let r=(0,C.k9)(t);if(32===r.length){let t=new j(r);return e?"0x"+H().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?(0,C.c$)(r):"0x"+H().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+H().keyFromPublic(r).getPublic(!0,"hex"):(0,C.c$)(r):F.throwArgumentError("invalid public or private key","key","[REDACTED]")}},6922:(t,e,r)=>{t.exports=r(8837)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},6937:(t,e,r)=>{var i,n=r(7358);!function(){"use strict";var o="input is invalid type",s="object"==typeof window,f=s?window:{};f.JS_SHA3_NO_WINDOW&&(s=!1);var a=!s&&"object"==typeof self;!f.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?f=r.g:a&&(f=self);var h=!f.JS_SHA3_NO_COMMON_JS&&t.exports,u=r.amdO,l=!f.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,c="0123456789abcdef".split(""),d=[4,1024,262144,0x4000000],p=[0,8,16,24],m=[1,0,32898,0,32906,0x80000000,0x80008000,0x80000000,32907,0,0x80000001,0,0x80008081,0x80000000,32777,0x80000000,138,0,136,0,0x80008009,0,0x8000000a,0,0x8000808b,0,139,0x80000000,32905,0x80000000,32771,0x80000000,32770,0x80000000,128,0x80000000,32778,0,0x8000000a,0x80000000,0x80008081,0x80000000,32896,0x80000000,0x80000001,0,0x80008008,0x80000000],g=[224,256,384,512],y=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};(f.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),l&&(f.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 x=function(t,e,r){return function(i){return new L(t,e,t).update(i)[r]()}},w=function(t,e,r){return function(i,n){return new L(t,e,n).update(i)[r]()}},M=function(t,e,r){return function(e,i,n,o){return I["cshake"+t].update(e,i,n,o)[r]()}},A=function(t,e,r){return function(e,i,n,o){return I["kmac"+t].update(e,i,n,o)[r]()}},E=function(t,e,r,i){for(var n=0;n<v.length;++n){var o=v[n];t[o]=e(r,i,o)}return t},_=function(t,e){var r=x(t,e,"hex");return r.create=function(){return new L(t,e,t)},r.update=function(t){return r.create().update(t)},E(r,x,t,e)},S=[{name:"keccak",padding:[1,256,65536,0x1000000],bits:g,createMethod:_},{name:"sha3",padding:[6,1536,393216,0x6000000],bits:g,createMethod:_},{name:"shake",padding:[31,7936,2031616,0x1f000000],bits:y,createMethod:function(t,e){var r=w(t,e,"hex");return r.create=function(r){return new L(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},E(r,w,t,e)}},{name:"cshake",padding:d,bits:y,createMethod:function(t,e){var r=b[t],i=M(t,e,"hex");return i.create=function(i,n,o){return n||o?new L(t,e,i).bytepad([n,o],r):I["shake"+t].create(i)},i.update=function(t,e,r,n){return i.create(e,r,n).update(t)},E(i,M,t,e)}},{name:"kmac",padding:d,bits:y,createMethod:function(t,e){var r=b[t],i=A(t,e,"hex");return i.create=function(i,n,o){return new B(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)},E(i,A,t,e)}}],I={},N=[],R=0;R<S.length;++R)for(var O=S[R],T=O.bits,k=0;k<T.length;++k){var U=O.name+"_"+T[k];if(N.push(U),I[U]=O.createMethod(T[k],O.padding),"sha3"!==O.name){var P=O.name+T[k];N.push(P),I[P]=I[U]}}function L(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 B(t,e,r){L.call(this,t,e,r)}L.prototype.update=function(t){if(this.finalized)throw Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"===r){if(null===t)throw Error(o);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(o)}else throw Error(o);e=!0}for(var i,n,s=this.blocks,f=this.byteCount,a=t.length,h=this.blockCount,u=0,c=this.s;u<a;){if(this.reset)for(i=1,this.reset=!1,s[0]=this.block;i<h+1;++i)s[i]=0;if(e)for(i=this.start;u<a&&i<f;++u)s[i>>2]|=t[u]<<p[3&i++];else for(i=this.start;u<a&&i<f;++u)(n=t.charCodeAt(u))<128?s[i>>2]|=n<<p[3&i++]:(n<2048?s[i>>2]|=(192|n>>6)<<p[3&i++]:(n<55296||n>=57344?s[i>>2]|=(224|n>>12)<<p[3&i++]:(n=65536+((1023&n)<<10|1023&t.charCodeAt(++u)),s[i>>2]|=(240|n>>18)<<p[3&i++],s[i>>2]|=(128|n>>12&63)<<p[3&i++]),s[i>>2]|=(128|n>>6&63)<<p[3&i++]),s[i>>2]|=(128|63&n)<<p[3&i++]);if(this.lastByteIndex=i,i>=f){for(this.start=i-f,this.block=s[h],i=0;i<h;++i)c[i]^=s[i];C(c),this.reset=!0}else this.start=i}return this},L.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},L.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"===r){if(null===t)throw Error(o);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(o)}else throw Error(o);e=!0}var i=0,n=t.length;if(e)i=n;else for(var s=0;s<t.length;++s){var f=t.charCodeAt(s);f<128?i+=1:f<2048?i+=2:f<55296||f>=57344?i+=3:(f=65536+((1023&f)<<10|1023&t.charCodeAt(++s)),i+=4)}return i+=this.encode(8*i),this.update(t),i},L.prototype.bytepad=function(t,e){for(var r=this.encode(e),i=0;i<t.length;++i)r+=this.encodeString(t[i]);var n=[];return n.length=e-r%e,this.update(n),this},L.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(e=1,t[0]=t[r];e<r+1;++e)t[e]=0;for(t[r-1]|=0x80000000,e=0;e<r;++e)i[e]^=t[e];C(i)}},L.prototype.toString=L.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,i=this.outputBlocks,n=this.extraBytes,o=0,s=0,f="";s<i;){for(o=0;o<e&&s<i;++o,++s)f+=c[(t=r[o])>>4&15]+c[15&t]+c[t>>12&15]+c[t>>8&15]+c[t>>20&15]+c[t>>16&15]+c[t>>28&15]+c[t>>24&15];s%e==0&&(C(r),o=0)}return n&&(f+=c[(t=r[o])>>4&15]+c[15&t],n>1&&(f+=c[t>>12&15]+c[t>>8&15]),n>2&&(f+=c[t>>20&15]+c[t>>16&15])),f},L.prototype.arrayBuffer=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,i=this.outputBlocks,n=this.extraBytes,o=0,s=0,f=this.outputBits>>3,a=new Uint32Array(t=new ArrayBuffer(n?i+1<<2:f));s<i;){for(o=0;o<e&&s<i;++o,++s)a[s]=r[o];s%e==0&&C(r)}return n&&(a[o]=r[o],t=t.slice(0,f)),t},L.prototype.buffer=L.prototype.arrayBuffer,L.prototype.digest=L.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,i=this.s,n=this.outputBlocks,o=this.extraBytes,s=0,f=0,a=[];f<n;){for(s=0;s<r&&f<n;++s,++f)t=f<<2,e=i[s],a[t]=255&e,a[t+1]=e>>8&255,a[t+2]=e>>16&255,a[t+3]=e>>24&255;f%r==0&&C(i)}return o&&(t=f<<2,e=i[s],a[t]=255&e,o>1&&(a[t+1]=e>>8&255),o>2&&(a[t+2]=e>>16&255)),a},B.prototype=new L,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)};var C=function(t){var e,r,i,n,o,s,f,a,h,u,l,c,d,p,g,y,v,b,x,w,M,A,E,_,S,I,N,R,O,T,k,U,P,L,B,C,D,F,z,H,j,q,K,G,V,W,Z,$,J,Y,X,Q,tt,te,tr,ti,tn,to,ts,tf,ta,th,tu;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],f=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],h=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[3
16]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],c=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49],e=c^(s<<1|f>>>31),r=d^(f<<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^(a<<1|h>>>31),r=o^(h<<1|a>>>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^(u<<1|l>>>31),r=f^(l<<1|u>>>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=a^(c<<1|d>>>31),r=h^(d<<1|c>>>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=u^(n<<1|o>>>31),r=l^(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,p=t[0],g=t[1],W=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,R=t[20]<<3|t[21]>>>29,O=t[21]<<3|t[20]>>>29,tf=t[31]<<9|t[30]>>>23,ta=t[30]<<9|t[31]>>>23,q=t[40]<<18|t[41]>>>14,K=t[41]<<18|t[40]>>>14,L=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,$=t[22]<<10|t[23]>>>22,J=t[23]<<10|t[22]>>>22,T=t[33]<<13|t[32]>>>19,k=t[32]<<13|t[33]>>>19,th=t[42]<<2|t[43]>>>30,tu=t[43]<<2|t[42]>>>30,te=t[5]<<30|t[4]>>>2,tr=t[4]<<30|t[5]>>>2,C=t[14]<<6|t[15]>>>26,D=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,x=t[24]<<11|t[25]>>>21,Y=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,U=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,_=t[6]<<28|t[7]>>>4,S=t[7]<<28|t[6]>>>4,ti=t[17]<<23|t[16]>>>9,tn=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,z=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,G=t[8]<<27|t[9]>>>5,V=t[9]<<27|t[8]>>>5,I=t[18]<<20|t[19]>>>12,N=t[19]<<20|t[18]>>>12,to=t[29]<<7|t[28]>>>25,ts=t[28]<<7|t[29]>>>25,H=t[38]<<8|t[39]>>>24,j=t[39]<<8|t[38]>>>24,A=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=p^~y&b,t[1]=g^~v&x,t[10]=_^~I&R,t[11]=S^~N&O,t[20]=L^~C&F,t[21]=B^~D&z,t[30]=G^~W&$,t[31]=V^~Z&J,t[40]=te^~ti&to,t[41]=tr^~tn&ts,t[2]=y^~b&w,t[3]=v^~x&M,t[12]=I^~R&T,t[13]=N^~O&k,t[22]=C^~F&H,t[23]=D^~z&j,t[32]=W^~$&Y,t[33]=Z^~J&X,t[42]=ti^~to&tf,t[43]=tn^~ts&ta,t[4]=b^~w&A,t[5]=x^~M&E,t[14]=R^~T&U,t[15]=O^~k&P,t[24]=F^~H&q,t[25]=z^~j&K,t[34]=$^~Y&Q,t[35]=J^~X&tt,t[44]=to^~tf&th,t[45]=ts^~ta&tu,t[6]=w^~A&p,t[7]=M^~E&g,t[16]=T^~U&_,t[17]=k^~P&S,t[26]=H^~q&L,t[27]=j^~K&B,t[36]=Y^~Q&G,t[37]=X^~tt&V,t[46]=tf^~th&te,t[47]=ta^~tu&tr,t[8]=A^~p&y,t[9]=E^~g&v,t[18]=U^~_&I,t[19]=P^~S&N,t[28]=q^~L&C,t[29]=K^~B&D,t[38]=Q^~G&W,t[39]=tt^~V&Z,t[48]=th^~te&ti,t[49]=tu^~tr&tn,t[0]^=m[i],t[1]^=m[i+1]};if(h)t.exports=I;else{for(R=0;R<N.length;++R)f[N[R]]=I[N[R]];u&&void 0!==(i=(function(){return I}).call(e,r,e,t))&&(t.exports=i)}}()},7034:(t,e,r)=>{"use strict";r.d(e,{U:()=>i});let i=t=>{let e={};return t.forEach((t,r)=>{let i=decodeURIComponent(t);e[r]="payload"===r?JSON.parse(i):i}),e}},7228:(t,e,r)=>{"use strict";r.d(e,{DH:()=>n,Fc:()=>a,O8:()=>o,Ow:()=>s,Vw:()=>l,ZJ:()=>u,ld:()=>c,qv:()=>f});var i=r(4526);function n(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function o(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function s(t,e){return t<<32-e|t>>>e}let f=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function a(t){for(let r=0;r<t.length;r++){var e;t[r]=(e=t[r])<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}}(t,e)=>e.toString(16).padStart(2,"0");let h={_0:48,_9:57,A:65,F:70,a:97,f:102};function u(t){return"string"==typeof t&&(t=function(t){if("string"!=typeof t)throw Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}(t)),(0,i.DO)(t),t}class l{clone(){return this._cloneInto()}}function c(t){let e=e=>t().update(u(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}},7267:(t,e,r)=>{"use strict";r.d(e,{$X:()=>f,Hf:()=>s,Ns:()=>o,Q4:()=>n,cU:()=>h,rS:()=>a,uM:()=>i});let i="https://identity.deso.org",n="https://blockproducer.deso.org",o="identity",s=Object.freeze({GlobalDESOLimit:1e7,TransactionCountLimitMap:{AUTHORIZE_DERIVED_KEY:1},CreatorCoinOperationLimitMap:{},DAOCoinOperationLimitMap:{},NFTOperationLimitMap:{},DAOCoinLimitOrderLimitMap:{}}),f=Object.freeze({mainnet:{bitcoin:[0],deso:[205,20,0]}
1,testnet:{bitcoin:[111],deso:[17,194,0]}}),a=Object.freeze({activePublicKey:"desoActivePublicKey",identityUsers:"desoIdentityUsers",loginKeyPair:"desoLoginKeyPair"}),h=Object.freeze({mainnet:"mainnet",testnet:"goerli"});Object.freeze({1:5e4,2:5e5,3:5e6,4:5e7,5:5e8,6:5e9,7:5e10,8:5e11})},7773:(t,e,r)=>{"use strict";let i,n;r.d(e,{CH:()=>$,Wp:()=>ts,_S:()=>Y,bR:()=>M,lG:()=>W});var o,s=r(495);let f=BigInt(0),a=BigInt(1),h=BigInt(2),u=BigInt(3),l=BigInt(8),c=Object.freeze({a:f,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:a,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),d=(t,e)=>(t+e/h)/e,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(t){let{n:e}=c,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-a*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=BigInt("0x100000000000000000000000000000000"),s=d(r*t,e),f=d(-i*t,e),h=D(t-s*r-f*n,e),u=D(-s*i-f*r,e),l=h>o,p=u>o;if(l&&(h=e-h),p&&(u=e-u),h>o||u>o)throw Error("splitScalarEndo: Endomorphism failed, k="+t);return{k1neg:l,k1:h,k2neg:p,k2:u}}};function m(t){let{a:e,b:r}=c,i=D(t*t),n=D(i*t);return D(n+e*t+r)}let g=c.a===f;class y extends Error{constructor(t){super(t)}}function v(t){if(!(t instanceof b))throw TypeError("JacobianPoint expected")}class b{constructor(t,e,r){this.x=t,this.y=e,this.z=r}static fromAffine(t){if(!(t instanceof M))throw TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(M.ZERO)?b.ZERO:new b(t.x,t.y,a)}static toAffineBatch(t){let e=function(t,e=c.P){let r=Array(t.length),i=z(t.reduce((t,i,n)=>i===f?t:(r[n]=t,D(t*i,e)),a),e);return t.reduceRight((t,i,n)=>i===f?t:(r[n]=D(t*r[n],e),D(t*i,e)),i),r}(t.map(t=>t.z));return t.map((t,r)=>t.toAffine(e[r]))}static normalizeZ(t){return b.toAffineBatch(t).map(b.fromAffine)}equals(t){v(t);let{x:e,y:r,z:i}=this,{x:n,y:o,z:s}=t,f=D(i*i),a=D(s*s),h=D(e*a),u=D(n*f),l=D(D(r*s)*a),c=D(D(o*i)*f);return h===u&&l===c}negate(){return new b(this.x,D(-this.y),this.z)}double(){let{x:t,y:e,z:r}=this,i=D(t*t),n=D(e*e),o=D(n*n),s=t+n,f=D(h*(D(s*s)-i-o)),a=D(u*i),c=D(a*a),d=D(c-h*f),p=D(a*(f-d)-l*o);return new b(d,p,D(h*e*r))}add(t){v(t);let{x:e,y:r,z:i}=this,{x:n,y:o,z:s}=t;if(n===f||o===f)return this;if(e===f||r===f)return t;let a=D(i*i),u=D(s*s),l=D(e*u),c=D(n*a),d=D(D(r*s)*u),p=D(D(o*i)*a),m=D(c-l),g=D(p-d);if(m===f)return g===f?this.double():b.ZERO;let y=D(m*m),x=D(m*y),w=D(l*y),M=D(g*g-x-h*w),A=D(g*(w-M)-d*x);return new b(M,A,D(i*s*m))}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){let e=b.ZERO;if("bigint"==typeof t&&t===f)return e;let r=C(t);if(r===a)return this;if(!g){let t=e,i=this;for(;r>f;)r&a&&(t=t.add(i)),i=i.double(),r>>=a;return t}let{k1neg:i,k1:n,k2neg:o,k2:s}=p.splitScalar(r),h=e,u=e,l=this;for(;n>f||s>f;)n&a&&(h=h.add(l)),s&a&&(u=u.add(l)),l=l.double(),n>>=a,s>>=a;return i&&(h=h.negate()),o&&(u=u.negate()),u=new b(D(u.x*p.beta),u.y,u.z),h.add(u)}precomputeWindow(t){let e=g?128/t+1:256/t+1,r=[],i=this,n=i;for(let o=0;o<e;o++){n=i,r.push(n);for(let e=1;e<2**(t-1);e++)n=n.add(i),r.push(n);i=n.double()}return r}wNAF(t,e){!e&&this.equals(b.BASE)&&(e=M.BASE);let r=e&&e._WINDOW_SIZE||1;if(256%r)throw Error("Point#wNAF: Invalid precomputation window, must be power of 2");let i=e&&w.get(e);!i&&(i=this.precomputeWindow(r),e&&1!==r&&(i=b.normalizeZ(i),w.set(e,i)));let n=b.ZERO,o=b.BASE,s=1+(g?128/r:256/r),f=2**(r-1),h=BigInt(2**r-1),u=2**r,l=BigInt(r);for(let e=0;e<s;e++){let r=e*f,s=Number(t&h);t>>=l,s>f&&(s-=u,t+=a);let c=r+Math.abs(s)-1,d=e%2!=0,p=s<0;0===s?o=o.add(x(d,i[r])):n=n.add(x(p,i[c]))}return{p:n,f:o}}multiply(t,e){let r,i,n=C(t);if(g){let{k1neg:t,k1:o,k2neg:s,k2:f}=p.splitScalar(n),{p:a,f:h}=this.wNAF(o,e),{p:u,f:l}=this.wNAF(f,e);a=x(t,a),u=new b(D((u=x(s,u)).x*p.beta),u.y,u.z),r=a.add(u),i=h.add(l)}else{let{p:t,f:o}=this.wNAF(n,e);r=t,i=o}return b.normalizeZ([r,i])[0]}toAffine(t){let{x:e,y:r,z:i}=this,n=this.equals(b.ZERO);null==t&&(t=n?l:z(i));let o=t,s=D(o*o),f=D(s*o),h=D(e*s),u=D(r*f),c=D(i*o);if(n)return M.ZERO;
1if(c!==a)throw Error("invZ was invalid");return new M(h,u)}}function x(t,e){let r=e.negate();return t?r:e}b.BASE=new b(c.Gx,c.Gy,a),b.ZERO=new b(f,a,f);let w=new WeakMap;class M{constructor(t,e){this.x=t,this.y=e}_setWindowSize(t){this._WINDOW_SIZE=t,w.delete(this)}hasEvenY(){return this.y%h===f}static fromCompressedHex(t){let e=32===t.length,r=L(e?t:t.subarray(1));if(!K(r))throw Error("Point is not on curve");let i=function(t){let{P:e}=c,r=BigInt(6),i=BigInt(11),n=BigInt(22),o=BigInt(23),s=BigInt(44),f=BigInt(88),a=t*t*t%e,l=a*a*t%e,d=F(l,u)*l%e,p=F(d,u)*l%e,m=F(p,h)*a%e,g=F(m,i)*m%e,y=F(g,n)*g%e,v=F(y,s)*y%e,b=F(v,f)*v%e,x=F(b,s)*y%e,w=F(x,u)*l%e,M=F(w,o)*g%e,A=F(M,r)*a%e,E=F(A,h);if(E*E%e!==t)throw Error("Cannot find square root");return E}(m(r)),n=(i&a)===a;e?n&&(i=D(-i)):(1&t[0])==1!==n&&(i=D(-i));let o=new M(r,i);return o.assertValidity(),o}static fromUncompressedHex(t){let e=new M(L(t.subarray(1,33)),L(t.subarray(33,65)));return e.assertValidity(),e}static fromHex(t){let e=B(t),r=e.length,i=e[0];if(32===r||33===r&&(2===i||3===i))return this.fromCompressedHex(e);if(65===r&&4===i)return this.fromUncompressedHex(e);throw Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return M.BASE.multiply(G(t))}static fromSignature(t,e,r){let{r:i,s:n}=function(t){if(t instanceof _)return t.assertValidity(),t;try{return _.fromDER(t)}catch(e){return _.fromCompact(t)}}(e);if(![0,1,2,3].includes(r))throw Error("Cannot recover: invalid recovery bit");let o=H(B(t)),{n:s}=c,f=2===r||3===r?i+s:i,a=z(f,s),h=D(-o*a,s),u=D(n*a,s),l=1&r?"03":"02",d=M.fromHex(l+O(f)),p=M.BASE.multiplyAndAddUnsafe(d,h,u);if(!p)throw Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(t=!1){return P(this.toHex(t))}toHex(t=!1){let e=O(this.x);if(!t)return`04${e}${O(this.y)}`;{let t=this.hasEvenY()?"02":"03";return`${t}${e}`}}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){let t="Point is not on elliptic curve",{x:e,y:r}=this;if(!K(e)||!K(r))throw Error(t);let i=D(r*r);if(D(i-m(e))!==f)throw Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new M(this.x,D(-this.y))}double(){return b.fromAffine(this).double().toAffine()}add(t){return b.fromAffine(this).add(b.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return b.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,e,r){let i=b.fromAffine(this),n=e===f||e===a||this!==M.BASE?i.multiplyUnsafe(e):i.multiply(e),o=b.fromAffine(t).multiplyUnsafe(r),s=n.add(o);return s.equals(b.ZERO)?void 0:s.toAffine()}}function A(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function E(t){if(t.length<2||2!==t[0])throw Error(`Invalid signature integer tag: ${N(t)}`);let e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)throw Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw Error("Invalid signature integer: trailing length");return{data:L(r),left:t.subarray(e+2)}}M.BASE=new M(c.Gx,c.Gy),M.ZERO=new M(f,f);class _{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromCompact(t){let e=t instanceof Uint8Array,r="Signature.fromCompact";if("string"!=typeof t&&!e)throw TypeError(`${r}: Expected string or Uint8Array`);let i=e?N(t):t;if(128!==i.length)throw Error(`${r}: Expected 64-byte hex`);return new _(U(i.slice(0,64)),U(i.slice(64,128)))}static fromDER(t){let e=t instanceof Uint8Array;
1if("string"!=typeof t&&!e)throw TypeError("Signature.fromDER: Expected string or Uint8Array");let{r,s:i}=function(t){if(t.length<2||48!=t[0])throw Error(`Invalid signature tag: ${N(t)}`);if(t[1]!==t.length-2)throw Error("Invalid signature: incorrect length");let{data:e,left:r}=E(t.subarray(2)),{data:i,left:n}=E(r);if(n.length)throw Error(`Invalid signature: left bytes after parsing: ${N(n)}`);return{r:e,s:i}}(e?t:P(t));return new _(r,i)}static fromHex(t){return this.fromDER(t)}assertValidity(){let{r:t,s:e}=this;if(!q(t))throw Error("Invalid Signature: r must be 0 < r < n");if(!q(e))throw Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){let t=c.n>>a;return this.s>t}normalizeS(){return this.hasHighS()?new _(this.r,D(-this.s,c.n)):this}toDERRawBytes(){return P(this.toDERHex())}toDERHex(){let t=A(k(this.s)),e=A(k(this.r)),r=t.length/2,i=e.length/2,n=k(r),o=k(i),s=k(i+r+4);return`30${s}02${o}${e}02${n}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return P(this.toCompactHex())}toCompactHex(){return O(this.r)+O(this.s)}}function S(...t){if(!t.every(t=>t instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===t.length)return t[0];let e=new Uint8Array(t.reduce((t,e)=>t+e.length,0));for(let r=0,i=0;r<t.length;r++){let n=t[r];e.set(n,i),i+=n.length}return e}let I=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function N(t){if(!(t instanceof Uint8Array))throw Error("Expected Uint8Array");let e="";for(let r=0;r<t.length;r++)e+=I[t[r]];return e}let R=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function O(t){if("bigint"!=typeof t)throw Error("Expected bigint");if(!(f<=t&&t<R))throw Error("Expected number 0 <= n < 2^256");return t.toString(16).padStart(64,"0")}function T(t){let e=P(O(t));if(32!==e.length)throw Error("Error: expected 32 bytes");return e}function k(t){let e=t.toString(16);return 1&e.length?`0${e}`:e}function U(t){if("string"!=typeof t)throw TypeError("hexToNumber: expected string, got "+typeof t);return BigInt(`0x${t}`)}function P(t){if("string"!=typeof t)throw TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw Error("hexToBytes: received invalid unpadded hex"+t.length);let e=new Uint8Array(t.length/2);for(let r=0;r<e.length;r++){let i=2*r,n=Number.parseInt(t.slice(i,i+2),16);if(Number.isNaN(n)||n<0)throw Error("Invalid byte sequence");e[r]=n}return e}function L(t){return U(N(t))}function B(t){return t instanceof Uint8Array?Uint8Array.from(t):P(t)}function C(t){if("number"==typeof t&&Number.isSafeInteger(t)&&t>0)return BigInt(t);if("bigint"==typeof t&&q(t))return t;throw TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function D(t,e=c.P){let r=t%e;return r>=f?r:e+r}function F(t,e){let{P:r}=c,i=t;for(;e-- >f;)i*=i,i%=r;return i}function z(t,e=c.P){if(t===f||e<=f)throw Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=D(t,e),i=e,n=f,o=a,s=a,h=f;for(;r!==f;){let t=i/r,e=i%r,f=n-s*t,a=o-h*t;i=r,r=e,n=s,o=h,s=f,h=a}if(i!==a)throw Error("invert: does not exist");return D(n,e)}function H(t,e=!1){let r=function(t){let e=8*t.length-256,r=L(t);return e>0?r>>BigInt(e):r}(t);if(e)return r;let{n:i}=c;return r>=i?r-i:r}class j{constructor(t,e){if(this.hashLen=t,this.qByteLen=e,"number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");this.v=new Uint8Array(t).fill(1),this.k=new Uint8Array(t).fill(0),this.counter=0}hmac(...t){return ts.hmacSha256(this.k,...t)}hmacSync(...t){return n(this.k,...t)}checkSync(){if("function"!=typeof n)throw new y("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(t=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),t),this.v=await this.hmac(this.v),0!==t.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),t),this.v=await this.hmac(this.v))}reseedSync(t=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),t),this.v=this.hmacSync(this.v),0!==t.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),t),this.v=this.hmacSync(this.v))}async generate(){this.incr();let t=0,e=[];for(;t<this.qByteLen;){this.v=await this.hmac(this.v);let r=this.v.slice();e.push(r),t+=this.v.length}return S(...e)}generateSync(){this.checkSync(),this.incr();let t=0,e=[];for(;t<this.qByteLen;){this.v=this.hmacSync(this.v);let r=this.v.slice();e.push(r),t+=this.v.length}return S(...e)}}function q(t){return f<t&&t<c.n}function K(t){return f<t&&t<c.P}function G(t){let e;if("bigint"==typeof t)e=t;else if("number"==typeof t&&Number.isSafeInteger(t)&&t>0)e=BigInt(t);else if("string"==typeof t){if(64!==t.length)throw Error("Expected 32 bytes of private key");e=U(t)}else if(t instanceof Uint8Array){if(32!==t.length)throw Error("Expected 32 bytes of private key");e=L(t)}else throw TypeError("Expected valid private key");if(!q(e))throw Error("Expected private key: 0 < key < n");return e}function V(t){return t instanceof M?(t.assertValidity(),t):M.fromHex(t)}function W(t,e=!1){return M.fromPrivateKey(t).toRawBytes(e)}function Z(t){let e=t instanceof Uint8Array,r="string"==typeof t,i=(e||r)&&t.length;return e?33===i||65===i:r?66===i||130===i:t instanceof M}function $(t,e,r=!1){if(Z(t))throw TypeError("getSharedSecret: first arg must be private key");if(!Z(e))throw TypeError("getSharedSecret: second arg must be public key");let i=V(e);return i.assertValidity(),i.multiply(G(t)).toRawBytes(r)}function J(t){return L(t.length>32?t.slice(0,32):t)}async function Y(t,e,r={}){let i;let{seed:n,m:o,d:s}=function(t,e,r){if(null==t)throw Error(`sign: expected valid message hash, not "${t}"`);let i=B(t),n=G(e),o=[T(n),function(t){let e=J(t),r=D(e,c.n);return T(r<f?e:r)}(i)];if(null!=r){!0===r&&(r=ts.randomBytes(32));let t=B(r);if(32!==t.length)throw Error("sign: Expected 32 bytes of extra data");o.push(t)}return{seed:S(...o),m:J(i),d:n}}(t,e,r.extraEntropy),h=new j(32,32);for(await h.reseed(n);!(i=function(t,e,r,i=!0){let{n}=c,o=H(t,!0);if(!q(o))return;
1let s=z(o,n),h=M.BASE.multiply(o),u=D(h.x,n);if(u===f)return;let l=D(s*D(e+r*u,n),n);if(l===f)return;let d=new _(u,l),p=2*(h.x!==d.r)|Number(h.y&a);return i&&d.hasHighS()&&(d=d.normalizeS(),p^=1),{sig:d,recovery:p}}(await h.generate(),o,s,r.canonical));)await h.reseed();return function(t,e){let{sig:r,recovery:i}=t,{der:n,recovered:o}=Object.assign({canonical:!0,der:!0},e),s=n?r.toDERRawBytes():r.toCompactRawBytes();return o?[s,i]:s}(i,r)}function X(t){return D(L(t),c.n)}class Q{constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromHex(t){let e=B(t);if(64!==e.length)throw TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${e.length}`);return new Q(L(e.subarray(0,32)),L(e.subarray(32,64)))}assertValidity(){let{r:t,s:e}=this;if(!K(t)||!q(e))throw Error("Invalid signature")}toHex(){return O(this.r)+O(this.s)}toRawBytes(){return P(this.toHex())}}function tt(t,e,r){let i=t instanceof Q,n=i?t:Q.fromHex(t);return i&&n.assertValidity(),{...n,m:B(e),P:V(r)}}function te(t,e,r,i){let n=M.BASE.multiplyAndAddUnsafe(e,G(r),D(-i,c.n));return!!(n&&n.hasEvenY())&&n.x===t}async function tr(t,e,r){try{let{r:i,s:n,m:o,P:s}=tt(t,e,r),f=X(await ts.taggedHash(tn.challenge,T(i),s.toRawX(),o));return te(i,s,n,f)}catch(t){return!1}}M.BASE._setWindowSize(8);let ti={node:o||(o=r.t(s,2)),web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},tn={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},to={},ts={bytesToHex:N,hexToBytes:P,concatBytes:S,mod:D,invert:z,isValidPrivateKey(t){try{return G(t),!0}catch(t){return!1}},_bigintTo32Bytes:T,_normalizePrivateKey:G,hashToPrivateKey:t=>{if((t=B(t)).length<40||t.length>1024)throw Error("Expected valid bytes of private key as per FIPS 186");return T(D(L(t),c.n-a)+a)},randomBytes:(t=32)=>{if(ti.web)return ti.web.getRandomValues(new Uint8Array(t));if(ti.node){let{randomBytes:e}=ti.node;return Uint8Array.from(e(t))}throw Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>ts.hashToPrivateKey(ts.randomBytes(40)),precompute(t=8,e=M.BASE){let r=e===M.BASE?e:new M(e.x,e.y);return r._setWindowSize(t),r.multiply(u),r},sha256:async(...t)=>{if(ti.web)return new Uint8Array(await ti.web.subtle.digest("SHA-256",S(...t)));if(ti.node){let{createHash:e}=ti.node,r=e("sha256");return t.forEach(t=>r.update(t)),Uint8Array.from(r.digest())}throw Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(ti.web){let r=await ti.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),i=S(...e);return new Uint8Array(await ti.web.subtle.sign("HMAC",r,i))}if(ti.node){let{createHmac:r}=ti.node,i=r("sha256",t);return e.forEach(t=>i.update(t)),Uint8Array.from(i.digest())}throw Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...e)=>{let r=to[t];if(void 0===r){let e=await ts.sha256(Uint8Array.from(t,t=>t.charCodeAt(0)));r=S(e,e),to[t]=r}return ts.sha256(r,...e)},taggedHashSync:(t,...e)=>{if("function"!=typeof i)throw new y("sha256Sync is undefined, you need to set it");let r=to[t];if(void 0===r){let e=i(Uint8Array.from(t,t=>t.charCodeAt(0)));r=S(e,e),to[t]=r}return i(r,...e)},_JacobianPoint:b};Object.defineProperties(ts,{sha256Sync:{configurable:!1,get:()=>
1i,set(t){i||(i=t)}},hmacSha256Sync:{configurable:!1,get:()=>n,set(t){n||(n=t)}}})},7905:(t,e,r)=>{"use strict";r.d(e,{a:()=>s});var i=r(7773),n=r(5631),o=r(1309);async function s(t,e,r,f,a,{defaultMessagingGroupName:h}={defaultMessagingGroupName:"default-key"}){let{BlockHeight:u}=await (0,n.BV)(),l=u+86400*f,c=(0,o.gS)(t.public,{network:a}),d=(0,o.gS)(e.public,{network:a});r?.AccessGroupLimitMap&&r.AccessGroupLimitMap.forEach(t=>{t.AccessGroupOwnerPublicKeyBase58Check||(t.AccessGroupOwnerPublicKeyBase58Check=c)}),r?.AccessGroupMemberLimitMap&&r.AccessGroupMemberLimitMap.forEach(t=>{t.AccessGroupOwnerPublicKeyBase58Check||(t.AccessGroupOwnerPublicKeyBase58Check=c)});let{TransactionSpendingLimitHex:p}=await n.FH.post("/api/v0/get-access-bytes",{DerivedPublicKeyBase58Check:d,ExpirationBlock:l,TransactionSpendingLimit:r}),m=p?i.Wp.hexToBytes(p):[],g=new Uint8Array([...e.public,...(0,o.QJ)(l),...m]),y=i.Wp.bytesToHex((0,o.Qx)(g)),[v]=await (0,o._S)(y,t.private),b=(0,o.kg)(t.seedHex,h),x=(0,o.gS)(b.public,{network:a}),w=i.Wp.bytesToHex((0,o.Qx)(new Uint8Array([...b.public,...new TextEncoder().encode(h)]))),[M]=await (0,o._S)(w,t.private),[A,E]=await Promise.all([(0,o.WW)(t.seedHex,"ES256",{}),(0,o.WW)(t.seedHex,"ES256",{derivedPublicKeyBase58Check:d})]);return{derivedSeedHex:e.seedHex,derivedPublicKeyBase58Check:d,publicKeyBase58Check:c,btcDepositAddress:"Not implemented yet",ethDepositAddress:"Not implemented yet",expirationBlock:l,network:a,accessSignature:i.Wp.bytesToHex(v),jwt:A,derivedJwt:E,messagingPublicKeyBase58Check:x,messagingPrivateKey:b.seedHex,messagingKeyName:h,messagingKeySignature:i.Wp.bytesToHex(M),transactionSpendingLimitHex:p,signedUp:!1,publicKeyAdded:c}}},8623:(t,e,r)=>{"use strict";var i;r.d(e,{s:()=>i}),function(t){t.SUBSCRIBE="SUBSCRIBE",t.AUTHORIZE_DERIVED_KEY_START="AUTHORIZE_DERIVED_KEY_START",t.AUTHORIZE_DERIVED_KEY_END="AUTHORIZE_DERIVED_KEY_END",t.AUTHORIZE_DERIVED_KEY_FAIL="AUTHORIZE_DERIVED_KEY_FAIL",t.REQUEST_PERMISSIONS_START="REQUEST_PERMISSIONS_START",t.REQUEST_PERMISSIONS_END="REQUEST_PERMISSIONS_END",t.LOGIN_START="LOGIN_START",t.LOGIN_END="LOGIN_END",t.LOGOUT_START="LOGOUT_START",t.LOGOUT_END="LOGOUT_END",t.GET_FREE_DESO_START="GET_FREE_DESO_START",t.GET_FREE_DESO_END="GET_FREE_DESO_END",t.VERIFY_PHONE_NUMBER_START="VERIFY_PHONE_NUMBER_START",t.VERIFY_PHONE_NUMBER_END="VERIFY_PHONE_NUMBER_END",t.CHANGE_ACTIVE_USER="CHANGE_ACTIVE_USER"}(i||(i={}))},8625:(t,e,r)=>{"use strict";var i=r(2539),n=r(8711),o=i.rotl32,s=i.sum32,f=i.sum32_3,a=i.sum32_4,h=n.BlockHash;function u(){if(!(this instanceof u))return new u;h.call(this),this.h=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.endian="little"}function l(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}i.inherits(u,h),e.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(t,e){for(var r=this.h[0],i=this.h[1],n=this.h[2],h=this.h[3],u=this.h[4],g=r,y=i,v=n,b=h,x=u,w=0;w<80;w++){var M,A,E=s(o(a(r,l(w,i,n,h),t[c[w]+e],(M=w)<=15?0:M<=31?0x5a827999:M<=47?0x6ed9eba1:M<=63?0x8f1bbcdc:0xa953fd4e),p[w]),u);r=u,u=h,h=o(n,10),n=i,i=E,E=s(o(a(g,l(79-w,y,v,b),t[d[w]+e],(A=w)<=15?0x50a28be6:A<=31?0x5c4dd124:A<=47?0x6d703ef3:0x7a6d76e9*!!(A<=63)),m[w]),x),g=x,x=b,b=o(v,10),v=y,y=E}E=f(this.h[1],n,b),this.h[1]=f(this.h[2],h,x),this.h[2]=f(this.h[3],u,g),this.h[3]=f(this.h[4],r,y),this.h[4]=f(this.h[0],i,v),this.h[0]=E},u.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},8711:(t,e,r)=>{"use strict";var i=r(2539),n=r(3124);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=i.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),n(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,i=Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=t>>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(o=8,i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0;o<this.padLength;o++)i[n++]=0;return i}},8837:t=>{"use strict";
1t.exports=function(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var n=t.charAt(i),o=n.charCodeAt(0);if(255!==e[o])throw TypeError(n+" is ambiguous");e[o]=i}var s=t.length,f=t.charAt(0),a=Math.log(s)/Math.log(256),h=Math.log(256)/Math.log(s);function u(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return new Uint8Array;for(var r=0,i=0,n=0;t[r]===f;)i++,r++;for(var o=(t.length-r)*a+1>>>0,h=new Uint8Array(o);t[r];){var u=t.charCodeAt(r);if(u>255)return;var l=e[u];if(255===l)return;for(var c=0,d=o-1;(0!==l||c<n)&&-1!==d;d--,c++)l+=s*h[d]>>>0,h[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw Error("Non-zero carry");n=c,r++}for(var p=o-n;p!==o&&0===h[p];)p++;for(var m=new Uint8Array(i+(o-p)),g=i;p!==o;)m[g++]=h[p++];return m}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,i=0,n=0,o=e.length;n!==o&&0===e[n];)n++,r++;for(var a=(o-n)*h+1>>>0,u=new Uint8Array(a);n!==o;){for(var l=e[n],c=0,d=a-1;(0!==l||c<i)&&-1!==d;d--,c++)l+=256*u[d]>>>0,u[d]=l%s>>>0,l=l/s>>>0;if(0!==l)throw Error("Non-zero carry");i=c,n++}for(var p=a-i;p!==a&&0===u[p];)p++;for(var m=f.repeat(r);p<a;++p)m+=t.charAt(u[p]);return m},decodeUnsafe:u,decode:function(t){var e=u(t);if(e)return e;throw Error("Non-base"+s+" character")}}}},8839:(t,e,r)=>{"use strict";var i=r(2539),n=r(8711),o=r(3124),s=i.rotr64_hi,f=i.rotr64_lo,a=i.shr64_hi,h=i.shr64_lo,u=i.sum64,l=i.sum64_hi,c=i.sum64_lo,d=i.sum64_4_hi,p=i.sum64_4_lo,m=i.sum64_5_hi,g=i.sum64_5_lo,y=n.BlockHash,v=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179],this.k=v,this.W=Array(160)}i.inherits(b,y),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,i=0;i<32;i++)r[i]=t[e+i];for(;i<r.length;i+=2){var n=function(t,e){var r=s(t,e,19)^s(e,t,29)^a(t,e,6);return r<0&&(r+=0x100000000),r}(r[i-4],r[i-3]),o=function(t,e){var r=f(t,e,19)^f(e,t,29)^h(t,e,6);return r<0&&(r+=0x100000000),r}(r[i-4],r[i-3]),u=r[i-14],l=r[i-13],c=function(t,e){var r=s(t,e,1)^s(t,e,8)^a(t,e,7);return r<0&&(r+=0x100000000),r}(r[i-30],r[i-29]),m=function(t,e){var r=f(t,e,1)^f(t,e,8)^h(t,e,7);return r<0&&(r+=0x100000000),r}(r[i-30],r[i-29]),g=r[i-32],y=r[i-31];r[i]=d(n,o,u,l,c,m,g,y),r[i+1]=p(n,o,u,l,c,m,g,y)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,i=this.h[0],n=this.h[1],a=this.h[2],h=this.h[3],d=this.h[4],p=this.h[5],y=this.h[6],v=this.h[7],b=this.h[8],x=this.h[9],w=this.h[10],M=this.h[11],A=this.h[12],E=this.h[13],_=this.h[14],S=this.h[15];o(this.k.length===r.length);for(var I=0;I<r.length;I+=2){var N=_,R=S,O=function(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=0x100000000),r}(b,x),T=function(t,e){var r=f(t,e,14)^f(t,e,18)^f(e,t,9);return r<0&&(r+=0x100000000),r}(b,x),k=function(t,e,r,i,n){var o=t&r^~t&n;return o<0&&(o+=0x100000000),o}(b,0,w,0,A,E),U=function(t,e,r,i,n,o){var s=e&i^~e&o;return s<0&&(s+=0x100000000),s}(0,x,0,M,0,E),P=this.k[I],L=this.k[I+1],B=r[I],C=r[I+1],D=m(N,R,O,T,k,U,P,L,B,C),F=g(N,R,O,T,k,U,P,L,B,C);N=function(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=0x100000000),r}(i,n),R=function(t,e){var r=f(t,e,28)^f(e,t,2)^f(e,t,7);return r<0&&(r+=0x100000000),r}(i,n);var z=l(N,R,O=function(t,e,r,i,n){var o=t&r^t&n^r&n;return o<0&&(o+=0x100000000),o}(i,0,a,0,d,p),T=function(t,e,r,i,n,o){var s=e&i^e&o^i&o;return s<0&&(s+=0x100000000),s}(0,n,0,h,0,p)),H=c(N,R,O,T);_=A,S=E,A=w,E=M,w=b,M=x,b=l(y,v,D,F),x=c(v,v,D,F),y=d,v=p,d=a,p=h,a=i,h=n,i=l(D,F,z,H),n=c(D,F,z,H)}u(this.h,0,i,n),u(this.h,2,a,h),u(this.h,4,d,p),u(this.h,6,y,v),u(this.h,8,b,x),u(this.h,10,w,M),u(this.h,12,A,E),u(this.h,14,_,S)},b.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},9318:(t,e,r)=>{"use strict";r.d(e,{Hp:()=>o,KE:()=>f,Ko:()=>s,Le:()=>x,NO:()=>a,Td:()=>d,Xx:()=>m,_o:()=>c,gp:()=>w,jA:()=>v,l5:()=>u,lJ:()=>l,mS:()=>b,nj:()=>p,oj:()=>y,ty:()=>g,v8:()=>h}),r(2276);var i=r(1309),n=r(7863);class o{static fromBytes(t){let e=new this,r=t;
1return(Reflect.getMetadata("transcoders",e)||[]).forEach(({name:t,transcoder:i})=>{let n;[n,r]=i.read.call(e,r),e[t]=n}),[e,r]}toBytes(){let t=Reflect.getMetadata("transcoders",this)||[],e=new Uint8Array(0);return t.forEach(({name:t,transcoder:r})=>{e=(0,i.VE)([e,r.write.call(this,this[t])])}),e}}function s(t){return(e,r)=>{let i=Reflect.getMetadata("transcoders",e)||[];i.push({name:r,transcoder:t}),Reflect.defineMetadata("transcoders",i,e)}}let f={read:t=>(0,i.uz)(t),write:t=>(0,i.al)(t)},a={read:t=>(0,i.BF)(t),write:t=>(0,i.R8)(t)},h={read:t=>[0!=t.at(0),t.slice(1)],write:t=>Uint8Array.from([+!!t])},u={read:t=>[t.at(0),t.slice(1)],write:t=>Uint8Array.from([t])},l=t=>({read:e=>[e.slice(0,t),e.slice(t)],write:t=>t}),c={read:t=>{let[e,r]=(0,i.uz)(t);return[r.slice(0,e),r.slice(e)]},write:t=>(0,i.VE)([(0,i.al)(t.length),t])},d={read:t=>{let e=(0,i.uz)(t),r=e[0],n=e[1],o=[];for(let t=0;t<r;t++){let t;[t,n]=(0,i.uz)(n),o.push(n.slice(0,t)),n=n.slice(t)}return[o,n]},write:t=>{let e=(0,i.al)(t.length);return(0,i.VE)([e,...t.map(t=>(0,i.VE)([(0,i.al)(t.length),t]))])}},p={read:t=>n.WH.fromBytes(t),write:t=>t?(0,i.VE)([t.toBytes()]):new Uint8Array(0)};function m(t){return{read:e=>e.length?t.read(e):[null,e],write:e=>null===e?new Uint8Array(0):t.write(e)}}function g(t){return{read:e=>0==e.at(0)?[null,e.slice(1)]:t.read(e.slice(1)),write:e=>null===e?Uint8Array.from([0]):(0,i.VE)([Uint8Array.from([1]),t.write(e)])}}let y=t=>({read:t=>{let e=(0,i.uz)(t),r=e[0],n=e[1],o=[];for(let t=0;t<r;t++)o.push(n.slice(0,33)),n=n.slice(33);return[o,n]},write:t=>(0,i.VE)([(0,i.al)(t.length),...t])}),v=t=>({read:e=>{let r=(0,i.uz)(e),n=r[0],o=r[1],s=[];for(let e=0;e<n;e++){let e;[e,o]=t.fromBytes(o),s.push(e)}return[s,o]},write:t=>{let e=(0,i.al)(t.length);return(0,i.VE)([e,...t.map(t=>t.toBytes())])}}),b=t=>({read:e=>t.fromBytes(e),write:t=>t.toBytes()}),x=(t,e)=>{for(let[r,i]of Object.entries(e))if(t instanceof i)return parseInt(r);return -1},w=t=>({read:e=>{let r=e,n=(0,i.uz)(r),o=n[0];r=n[1];let s=(0,i.uz)(r),f=s[0];return r=s[1],[t[o].fromBytes(r.slice(0,f))[0],r.slice(f)]},write:e=>{let r=(0,i.al)(x(e,t)),n=e.toBytes(),o=(0,i.al)(n.length);return(0,i.VE)([r,o,n])}})},9435:(t,e,r)=>{"use strict";r.d(e,{qN:()=>s,yY:()=>n,k_:()=>o});let i=new(r(3928)).Vy("properties/5.8.0");function n(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function o(t){var e,r,i,n;return e=this,r=void 0,i=void 0,n=function*(){let e=Object.keys(t).map(e=>Promise.resolve(t[e]).then(t=>({key:e,value:t})));return(yield Promise.all(e)).reduce((t,e)=>(t[e.key]=e.value,t),{})},new(i||(i=Promise))(function(t,o){function s(t){try{a(n.next(t))}catch(t){o(t)}}function f(t){try{a(n.throw(t))}catch(t){o(t)}}function a(e){var r;e.done?t(e.value):((r=e.value)instanceof i?r:new i(function(t){t(r)})).then(s,f)}a((n=n.apply(e,r||[])).next())})}function s(t,e){t&&"object"==typeof t||i.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||i.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}let f={bigint:!0,boolean:!0,function:!0,number:!0,string:!0}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.