diff --git a/assets/index-64e95584.js b/assets/index-cef03d96.js similarity index 98% rename from assets/index-64e95584.js rename to assets/index-cef03d96.js index eac121c..00449f6 100644 --- a/assets/index-64e95584.js +++ b/assets/index-cef03d96.js @@ -162,7 +162,7 @@ Defaulting to \`null\`.`}const NC="Radio",[eL,DC]=Fr(NC),[tL,rL]=eL(NC),nL=m.for */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",s=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?i=Bo:o&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],d=[1,256,65536,16777216],v=[6,1536,393216,100663296],g=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],w=[224,256,384,512],b=[128,256],x=["hex","buffer","arrayBuffer","array","digest"],C={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(E){return Object.prototype.toString.call(E)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(E){return typeof E=="object"&&E.buffer&&E.buffer.constructor===ArrayBuffer});for(var S=function(E,$,U){return function(z){return new p(E,$,E).update(z)[U]()}},P=function(E,$,U){return function(z,K){return new p(E,$,K).update(z)[U]()}},N=function(E,$,U){return function(z,K,ie,X){return h["cshake"+E].update(z,K,ie,X)[U]()}},B=function(E,$,U){return function(z,K,ie,X){return h["kmac"+E].update(z,K,ie,X)[U]()}},D=function(E,$,U,z){for(var K=0;K>5,this.byteCount=this.blockCount<<2,this.outputBlocks=U>>5,this.extraBytes=(U&31)>>3;for(var z=0;z<50;++z)this.s[z]=0}p.prototype.update=function(E){if(this.finalized)throw new Error(r);var $,U=typeof E;if(U!=="string"){if(U==="object"){if(E===null)throw new Error(e);if(l&&E.constructor===ArrayBuffer)E=new Uint8Array(E);else if(!Array.isArray(E)&&(!l||!ArrayBuffer.isView(E)))throw new Error(e)}else throw new Error(e);$=!0}for(var z=this.blocks,K=this.byteCount,ie=E.length,X=this.blockCount,te=0,Re=this.s,ce,be;te>2]|=E[te]<>2]|=be<>2]|=(192|be>>6)<>2]|=(128|be&63)<=57344?(z[ce>>2]|=(224|be>>12)<>2]|=(128|be>>6&63)<>2]|=(128|be&63)<>2]|=(240|be>>18)<>2]|=(128|be>>12&63)<>2]|=(128|be>>6&63)<>2]|=(128|be&63)<=K){for(this.start=ce-K,this.block=z[X],ce=0;ce>8,U=E&255;U>0;)K.unshift(U),E=E>>8,U=E&255,++z;return $?K.push(z):K.unshift(z),this.update(K),K.length},p.prototype.encodeString=function(E){var $,U=typeof E;if(U!=="string"){if(U==="object"){if(E===null)throw new Error(e);if(l&&E.constructor===ArrayBuffer)E=new Uint8Array(E);else if(!Array.isArray(E)&&(!l||!ArrayBuffer.isView(E)))throw new Error(e)}else throw new Error(e);$=!0}var z=0,K=E.length;if($)z=K;else for(var ie=0;ie=57344?z+=3:(X=65536+((X&1023)<<10|E.charCodeAt(++ie)&1023),z+=4)}return z+=this.encode(z*8),this.update(E),z},p.prototype.bytepad=function(E,$){for(var U=this.encode($),z=0;z>2]|=this.padding[$&3],this.lastByteIndex===this.byteCount)for(E[0]=E[U],$=1;$>4&15]+c[te&15]+c[te>>12&15]+c[te>>8&15]+c[te>>20&15]+c[te>>16&15]+c[te>>28&15]+c[te>>24&15];ie%E===0&&(F($),K=0)}return z&&(te=$[K],X+=c[te>>4&15]+c[te&15],z>1&&(X+=c[te>>12&15]+c[te>>8&15]),z>2&&(X+=c[te>>20&15]+c[te>>16&15])),X},p.prototype.arrayBuffer=function(){this.finalize();var E=this.blockCount,$=this.s,U=this.outputBlocks,z=this.extraBytes,K=0,ie=0,X=this.outputBits>>3,te;z?te=new ArrayBuffer(U+1<<2):te=new ArrayBuffer(X);for(var Re=new Uint32Array(te);ie>8&255,X[te+2]=Re>>16&255,X[te+3]=Re>>24&255;ie%E===0&&F($)}return z&&(te=ie<<2,Re=$[K],X[te]=Re&255,z>1&&(X[te+1]=Re>>8&255),z>2&&(X[te+2]=Re>>16&255)),X};function R(E,$,U){p.call(this,E,$,U)}R.prototype=new p,R.prototype.finalize=function(){return this.encode(this.outputBits,!0),p.prototype.finalize.call(this)};var F=function(E){var $,U,z,K,ie,X,te,Re,ce,be,Mr,$e,Qe,ln,_e,ft,vi,ut,yt,yi,et,dt,zn,pt,ht,Qi,vt,mt,W,q,J,ve,pe,ye,Ee,he,fe,ze,Me,we,nt,ke,Ge,$r,Je,it,br,je,tt,Vn,ot,st,De,Ne,Ve,Hn,Se,Xe,qn,pi,ko,To,Po;for(z=0;z<48;z+=2)K=E[0]^E[10]^E[20]^E[30]^E[40],ie=E[1]^E[11]^E[21]^E[31]^E[41],X=E[2]^E[12]^E[22]^E[32]^E[42],te=E[3]^E[13]^E[23]^E[33]^E[43],Re=E[4]^E[14]^E[24]^E[34]^E[44],ce=E[5]^E[15]^E[25]^E[35]^E[45],be=E[6]^E[16]^E[26]^E[36]^E[46],Mr=E[7]^E[17]^E[27]^E[37]^E[47],$e=E[8]^E[18]^E[28]^E[38]^E[48],Qe=E[9]^E[19]^E[29]^E[39]^E[49],$=$e^(X<<1|te>>>31),U=Qe^(te<<1|X>>>31),E[0]^=$,E[1]^=U,E[10]^=$,E[11]^=U,E[20]^=$,E[21]^=U,E[30]^=$,E[31]^=U,E[40]^=$,E[41]^=U,$=K^(Re<<1|ce>>>31),U=ie^(ce<<1|Re>>>31),E[2]^=$,E[3]^=U,E[12]^=$,E[13]^=U,E[22]^=$,E[23]^=U,E[32]^=$,E[33]^=U,E[42]^=$,E[43]^=U,$=X^(be<<1|Mr>>>31),U=te^(Mr<<1|be>>>31),E[4]^=$,E[5]^=U,E[14]^=$,E[15]^=U,E[24]^=$,E[25]^=U,E[34]^=$,E[35]^=U,E[44]^=$,E[45]^=U,$=Re^($e<<1|Qe>>>31),U=ce^(Qe<<1|$e>>>31),E[6]^=$,E[7]^=U,E[16]^=$,E[17]^=U,E[26]^=$,E[27]^=U,E[36]^=$,E[37]^=U,E[46]^=$,E[47]^=U,$=be^(K<<1|ie>>>31),U=Mr^(ie<<1|K>>>31),E[8]^=$,E[9]^=U,E[18]^=$,E[19]^=U,E[28]^=$,E[29]^=U,E[38]^=$,E[39]^=U,E[48]^=$,E[49]^=U,ln=E[0],_e=E[1],it=E[11]<<4|E[10]>>>28,br=E[10]<<4|E[11]>>>28,mt=E[20]<<3|E[21]>>>29,W=E[21]<<3|E[20]>>>29,pi=E[31]<<9|E[30]>>>23,ko=E[30]<<9|E[31]>>>23,ke=E[40]<<18|E[41]>>>14,Ge=E[41]<<18|E[40]>>>14,ye=E[2]<<1|E[3]>>>31,Ee=E[3]<<1|E[2]>>>31,ft=E[13]<<12|E[12]>>>20,vi=E[12]<<12|E[13]>>>20,je=E[22]<<10|E[23]>>>22,tt=E[23]<<10|E[22]>>>22,q=E[33]<<13|E[32]>>>19,J=E[32]<<13|E[33]>>>19,To=E[42]<<2|E[43]>>>30,Po=E[43]<<2|E[42]>>>30,Ne=E[5]<<30|E[4]>>>2,Ve=E[4]<<30|E[5]>>>2,he=E[14]<<6|E[15]>>>26,fe=E[15]<<6|E[14]>>>26,ut=E[25]<<11|E[24]>>>21,yt=E[24]<<11|E[25]>>>21,Vn=E[34]<<15|E[35]>>>17,ot=E[35]<<15|E[34]>>>17,ve=E[45]<<29|E[44]>>>3,pe=E[44]<<29|E[45]>>>3,pt=E[6]<<28|E[7]>>>4,ht=E[7]<<28|E[6]>>>4,Hn=E[17]<<23|E[16]>>>9,Se=E[16]<<23|E[17]>>>9,ze=E[26]<<25|E[27]>>>7,Me=E[27]<<25|E[26]>>>7,yi=E[36]<<21|E[37]>>>11,et=E[37]<<21|E[36]>>>11,st=E[47]<<24|E[46]>>>8,De=E[46]<<24|E[47]>>>8,$r=E[8]<<27|E[9]>>>5,Je=E[9]<<27|E[8]>>>5,Qi=E[18]<<20|E[19]>>>12,vt=E[19]<<20|E[18]>>>12,Xe=E[29]<<7|E[28]>>>25,qn=E[28]<<7|E[29]>>>25,we=E[38]<<8|E[39]>>>24,nt=E[39]<<8|E[38]>>>24,dt=E[48]<<14|E[49]>>>18,zn=E[49]<<14|E[48]>>>18,E[0]=ln^~ft&ut,E[1]=_e^~vi&yt,E[10]=pt^~Qi&mt,E[11]=ht^~vt&W,E[20]=ye^~he&ze,E[21]=Ee^~fe&Me,E[30]=$r^~it&je,E[31]=Je^~br&tt,E[40]=Ne^~Hn&Xe,E[41]=Ve^~Se&qn,E[2]=ft^~ut&yi,E[3]=vi^~yt&et,E[12]=Qi^~mt&q,E[13]=vt^~W&J,E[22]=he^~ze&we,E[23]=fe^~Me&nt,E[32]=it^~je&Vn,E[33]=br^~tt&ot,E[42]=Hn^~Xe&pi,E[43]=Se^~qn&ko,E[4]=ut^~yi&dt,E[5]=yt^~et&zn,E[14]=mt^~q&ve,E[15]=W^~J&pe,E[24]=ze^~we&ke,E[25]=Me^~nt&Ge,E[34]=je^~Vn&st,E[35]=tt^~ot&De,E[44]=Xe^~pi&To,E[45]=qn^~ko&Po,E[6]=yi^~dt&ln,E[7]=et^~zn&_e,E[16]=q^~ve&pt,E[17]=J^~pe&ht,E[26]=we^~ke&ye,E[27]=nt^~Ge&Ee,E[36]=Vn^~st&$r,E[37]=ot^~De&Je,E[46]=pi^~To&Ne,E[47]=ko^~Po&Ve,E[8]=dt^~ln&ft,E[9]=zn^~_e&vi,E[18]=ve^~pt&Qi,E[19]=pe^~ht&vt,E[28]=ke^~ye&he,E[29]=Ge^~Ee&fe,E[38]=st^~$r&it,E[39]=De^~Je&br,E[48]=To^~Ne&Hn,E[49]=Po^~Ve&Se,E[0]^=y[z],E[1]^=y[z+1]};if(a)t.exports=h;else for(T=0;T>=8;return e}function L3(t,e,r){let n=0;for(let i=0;ie+1+n&&Ai.throwError("child data too short",H.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function RS(t,e){if(t.length===0&&Ai.throwError("data too short",H.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Ai.throwError("data short segment too short",H.errors.BUFFER_OVERRUN,{});const n=L3(t,e+1,r);return e+1+r+n>t.length&&Ai.throwError("data long segment too short",H.errors.BUFFER_OVERRUN,{}),F3(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Ai.throwError("data array too short",H.errors.BUFFER_OVERRUN,{}),F3(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Ai.throwError("data array too short",H.errors.BUFFER_OVERRUN,{});const n=L3(t,e+1,r);e+1+r+n>t.length&&Ai.throwError("data array too short",H.errors.BUFFER_OVERRUN,{});const i=le(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&Ai.throwError("data too short",H.errors.BUFFER_OVERRUN,{});const n=le(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:le(t[e])}}function mh(t){const e=oe(t),r=RS(e,0);return r.consumed!==e.length&&Ai.throwArgumentError("invalid rlp data","data",t),r.result}const Zj=Object.freeze(Object.defineProperty({__proto__:null,decode:mh,encode:ia},Symbol.toStringTag,{value:"Module"})),eU="address/5.7.0",Ho=new H(eU);function $3(t){qe(t,20)||Ho.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=oe(rt(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const tU=9007199254740991;function rU(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const kg={};for(let t=0;t<10;t++)kg[String(t)]=String(t);for(let t=0;t<26;t++)kg[String.fromCharCode(65+t)]=String(10+t);const j3=Math.floor(rU(tU));function MS(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>kg[n]).join("");for(;e.length>=j3;){let n=e.substring(0,j3);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function ct(t){let e=null;if(typeof t!="string"&&Ho.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=$3(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ho.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)!==MS(t)&&Ho.throwArgumentError("bad icap checksum","address",t),e=Bj(t.substring(4));e.length<40;)e="0"+e;e=$3("0x"+e)}else Ho.throwArgumentError("invalid address","address",t);return e}function _S(t){try{return ct(t),!0}catch{}return!1}function nU(t){let e=Lj(ct(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+MS("XE00"+e)+e}function Tg(t){let e=null;try{e=ct(t.from)}catch{Ho.throwArgumentError("missing from address","transaction",t)}const r=Bi(oe(ae.from(t.nonce).toHexString()));return ct(Zt(rt(ia([e,r])),12))}function iU(t,e,r){return Ui(e)!==32&&Ho.throwArgumentError("salt must be 32 bytes","salt",e),Ui(r)!==32&&Ho.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),ct(Zt(rt(kt(["0xff",ct(t),e,r])),12))}const oU=Object.freeze(Object.defineProperty({__proto__:null,getAddress:ct,getContractAddress:Tg,getCreate2Address:iU,getIcapAddress:nU,isAddress:_S},Symbol.toStringTag,{value:"Module"}));class sU extends Co{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=ct(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return ct(wt(e.readValue().toHexString(),20))}}class aU extends Co{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const Qa=new H(au);function IS(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||Qa.throwError("cannot encode object for signature with missing names",H.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&Qa.throwError("cannot encode object for signature with duplicate names",H.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else Qa.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Qa.throwArgumentError("types/value length mismatch","tuple",r);let i=new fp(t.wordSize),o=new fp(t.wordSize),s=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=o.length;l.encode(o,f);let d=i.writeUpdatableValue();s.push(v=>{d(v+u)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(o),a}function OS(t,e){let r=[],n=t.subReader(0);e.forEach(o=>{let s=null;if(o.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{s=o.decode(l)}catch(c){if(c.code===H.errors.BUFFER_OVERRUN)throw c;s=c,s.baseType=o.name,s.name=o.localName,s.type=o.type}}else try{s=o.decode(t)}catch(a){if(a.code===H.errors.BUFFER_OVERRUN)throw a;s=a,s.baseType=o.name,s.name=o.localName,s.type=o.type}s!=null&&r.push(s)});const i=e.reduce((o,s)=>{const a=s.localName;return a&&(o[a]||(o[a]=0),o[a]++),o},{});e.forEach((o,s)=>{let a=o.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[s];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let o=0;o{throw s}})}return Object.freeze(r)}class lU extends Co{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",o=r===-1||e.dynamic;super("array",i,n,o),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&Qa.throwError("insufficient data length",H.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;s++)o++;return o}return t===Jr.OVERRUN?r.length-e-1:0}function xU(t,e,r,n,i){return t===Jr.OVERLONG?(n.push(i),0):(n.push(65533),$S(t,e,r))}const jS=Object.freeze({error:gU,ignore:$S,replace:xU});function Pg(t,e){e==null&&(e=jS.error),t=oe(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let o=null,s=null;if((i&224)===192)o=1,s=127;else if((i&240)===224)o=2,s=2047;else if((i&248)===240)o=3,s=65535;else{(i&192)===128?n+=e(Jr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Jr.BAD_PREFIX,n-1,t,r);continue}if(n-1+o>=t.length){n+=e(Jr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-o-1)-1;for(let l=0;l1114111){n+=e(Jr.OUT_OF_RANGE,n-1-o,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Jr.UTF16_SURROGATE,n-1-o,t,r,a);continue}if(a<=s){n+=e(Jr.OVERLONG,n-1-o,t,r,a);continue}r.push(a)}}return r}function Dt(t,e=zi.current){e!=zi.current&&(FS.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const o=t.charCodeAt(n);if(n>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const s=65536+((i&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return oe(r)}function X1(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function bU(t,e){return'"'+Pg(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?X1(r):(r-=65536,X1((r>>10&1023)+55296)+X1((r&1023)+56320))}).join("")+'"'}function up(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function As(t,e){return up(Pg(t,e))}function g0(t,e=zi.current){return Pg(Dt(t,e))}function wU(t){const e=Dt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return le(kt([e,LS]).slice(0,32))}function EU(t){const e=oe(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return As(e.slice(0,r))}function AU(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let o=i.split(":");r+=parseInt(o[0],16),n[r]=e(o[1])}),n}function US(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Mg(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const CU=US("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),SU="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),kU=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],TU=Rg("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),PU=Rg("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),RU=Rg("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",AU),MU=US("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function _U(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function IU(t){return!!Mg(t,CU)}function OU(t){let e=Mg(t,kU);if(e)return[t+e.s];let r=TU[t];if(r)return r;let n=PU[t];if(n)return[t+n[0]];let i=RU[t];return i||null}function NU(t){return!!Mg(t,MU)}function DU(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=g0(t);e=_U(e.map(n=>{if(SU.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=OU(n);return i||[n]})),e=g0(up(e),zi.NFKC),e.forEach(n=>{if(NU(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(IU(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=up(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const BU=Object.freeze(Object.defineProperty({__proto__:null,get UnicodeNormalizationForm(){return zi},Utf8ErrorFuncs:jS,get Utf8ErrorReason(){return Jr},_toEscapedUtf8String:bU,formatBytes32String:wU,nameprep:DU,parseBytes32String:EU,toUtf8Bytes:Dt,toUtf8CodePoints:g0,toUtf8String:As},Symbol.toStringTag,{value:"Module"}));class LU extends NS{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Dt(r))}decode(e){return As(super.decode(e))}}class qu extends Co{constructor(e,r){let n=!1;const i=[];e.forEach(s=>{s.dynamic&&(n=!0),i.push(s.type)});const o="tuple("+i.join(",")+")";super("tuple",o,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const o=i.localName;return o&&(n[o]||(n[o]=0),n[o]++),n},{});return this.coders.forEach((n,i)=>{let o=n.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,r){return IS(e,this.coders,r)}decode(e){return e.coerce(this.name,OS(e,this.coders))}}const Gu=new H(au),FU=new RegExp(/^bytes([0-9]*)$/),$U=new RegExp(/^(u?int)([0-9]*)$/);class zS{constructor(e){ee(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new sU(e.name);case"bool":return new cU(e.name);case"string":return new LU(e.name);case"bytes":return new fU(e.name);case"array":return new lU(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new qu((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new dU(e.name)}let r=e.type.match($U);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Gu.throwArgumentError("invalid "+r[1]+" bit length","param",e),new pU(n/8,r[1]==="int",e.name)}if(r=e.type.match(FU),r){let n=parseInt(r[1]);return(n===0||n>32)&&Gu.throwArgumentError("invalid bytes length","param",e),new uU(n,e.name)}return Gu.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new m0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new fp(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(dr.from(i)));return new qu(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Gu.throwError("types/values length mismatch",H.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(s=>this._getCoder(dr.from(s))),i=new qu(n,"_"),o=this._getWriter();return i.encode(o,r),o.data}decode(e,r,n){const i=e.map(s=>this._getCoder(dr.from(s)));return new qu(i,"_").decode(this._getReader(oe(r),n))}}const VS=new zS;function qo(t){return rt(Dt(t))}const HS="hash/5.7.0";function _g(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,s-1):r.push(a)})};return i(t,e),r}function UU(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),v=d>>>1,g=v>>1,y=d-1;let w=0;for(let P=0;P1;){let Y=N+B>>>1;P>>1|f(),D=D<<1^v,V=(V^v)<<1|v|1;x=D,C=1+V-D}let S=n-4;return b.map(P=>{switch(P-S){case 3:return S+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return S+256+(t[a++]<<8|t[a++]);case 1:return S+t[a++];default:return P-1}})}function VU(t){let e=0;return()=>t[e++]}function HU(t){return VU(zU(t))}function qU(t){return t&1?~t>>1:t>>1}function GU(t,e){let r=Array(t);for(let n=0;ne[s]):r}function KU(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(YU(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(JU(r,t))}return UU(qS(e))}function QU(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function GS(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[s].push(o));return n}function YU(t,e){let r=1+e(),n=e(),i=QU(e),o=GS(i.length,1+t,e);return qS(o.map((s,a)=>{const l=s[0],c=s.slice(1);return Array(i[a]).fill(void 0).map((f,u)=>{let d=u*n;return[l+u*r,c.map(v=>v+d)]})}))}function JU(t,e){let r=1+e();return GS(r,1+t,e).map(i=>[i[0],i.slice(1)])}function XU(t){let e=x0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=x0(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let i=t(),o=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:o,fe0f:s,save:a,check:l}}}function ZU(){return HU(_g("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const gh=ZU(),ez=new Set(x0(gh)),tz=new Set(x0(gh)),rz=KU(gh),nz=XU(gh),z3=45,V3=95;function WS(t){return g0(t)}function iz(t){return t.filter(e=>e!=65039)}function KS(t){for(let e of t.split(".")){let r=WS(e);try{for(let n=r.lastIndexOf(V3)-1;n>=0;n--)if(r[n]!==V3)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===z3&&r[3]===z3)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function oz(t){return KS(sz(t,iz))}function sz(t,e){let r=WS(t).reverse(),n=[];for(;r.length;){let i=lz(r);if(i){n.push(...e(i));continue}let o=r.pop();if(ez.has(o)){n.push(o);continue}if(tz.has(o))continue;let s=rz[o];if(s){n.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`)}return KS(az(String.fromCodePoint(...n)))}function az(t){return t.normalize("NFC")}function lz(t,e){var r;let n=nz,i,o,s=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)o=l;else if(n.check&&l===o)break;s.push(l),n.fe0f&&(s.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=s.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const cz=new H(HS),QS=new Uint8Array(32);QS.fill(0);function H3(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function xh(t){const e=Dt(oz(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(H3(e.slice(n))),r}function fz(t){return xh(t).map(e=>As(e)).join(".")}function uz(t){try{return xh(t).length!==0}catch{}return!1}function rf(t){typeof t!="string"&&cz.throwArgumentError("invalid ENS name; not a string","name",t);let e=QS;const r=xh(t);for(;r.length;)e=rt(kt([e,rt(r.pop())]));return le(e)}function YS(t){return le(kt(xh(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const JS=`Ethereum Signed Message: `;function Og(t){return typeof t=="string"&&(t=Dt(t)),rt(kt([Dt(JS),Dt(String(t.length)),t]))}var dz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const $t=new H(HS),XS=new Uint8Array(32);XS.fill(0);const hz=ae.from(-1),ZS=ae.from(0),e7=ae.from(1),vz=ae.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function yz(t){const e=oe(t),r=e.length%32;return r?Vr([e,XS.slice(r)]):le(e)}const pz=wt(e7.toHexString(),32),mz=wt(ZS.toHexString(),32),q3={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Z1=["name","version","chainId","verifyingContract","salt"];function G3(t){return function(e){return typeof e!="string"&&$t.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const gz={name:G3("name"),version:G3("version"),chainId:function(t){try{return ae.from(t).toString()}catch{}return $t.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ct(t).toLowerCase()}catch{}return $t.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=oe(t);if(e.length!==32)throw new Error("bad length");return le(e)}catch{}return $t.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function ev(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&$t.throwArgumentError("invalid numeric width","type",t);const i=vz.mask(r?n-1:n),o=r?i.add(e7).mul(hz):ZS;return function(s){const a=ae.from(s);return(a.lt(o)||a.gt(i))&&$t.throwArgumentError(`value out-of-bounds for ${t}`,"value",s),wt(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&$t.throwArgumentError("invalid bytes width","type",t),function(n){return oe(n).length!==r&&$t.throwArgumentError(`invalid length for ${t}`,"value",n),yz(n)}}}switch(t){case"address":return function(e){return wt(ct(e),32)};case"bool":return function(e){return e?pz:mz};case"bytes":return function(e){return rt(e)};case"string":return function(e){return qo(e)}}return null}function W3(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Cr{constructor(e){ee(this,"types",Object.freeze(us(e))),ee(this,"_encoderCache",{}),ee(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&$t.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&$t.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!ev(f)&&(n[f]||$t.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const o=Object.keys(n).filter(a=>n[a].length===0);o.length===0?$t.throwArgumentError("missing primary type","types",e):o.length>1&&$t.throwArgumentError(`ambiguous primary types or unused types: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),ee(this,"primaryType",o[0]);function s(a,l){l[a]&&$t.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(s(c,l),Object.keys(l).forEach(f=>{i[f][c]=!0}))}),delete l[a]}s(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=W3(a,e[a])+l.map(c=>W3(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=ev(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],o=this.getEncoder(i),s=parseInt(r[3]);return a=>{s>=0&&a.length!==s&&$t.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(o);return this._types[i]&&(l=l.map(rt)),rt(Vr(l))}}const n=this.types[e];if(n){const i=qo(this._types[e]);return o=>{const s=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(o[a]);return this._types[l]?rt(c):c});return s.unshift(i),Vr(s)}}return $t.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||$t.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return rt(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(ev(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const s=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&$t.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(s,l,n))}const o=this.types[e];return o?o.reduce((s,{name:a,type:l})=>(s[a]=this._visit(l,r[a],n),s),{}):$t.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Cr(e)}static getPrimaryType(e){return Cr.from(e).primaryType}static hashStruct(e,r,n){return Cr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=q3[n];i||$t.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Z1.indexOf(n.name)-Z1.indexOf(i.name)),Cr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Vr(["0x1901",Cr.hashDomain(e),Cr.from(r).hash(n)])}static hash(e,r,n){return rt(Cr.encode(e,r,n))}static resolveNames(e,r,n,i){return dz(this,void 0,void 0,function*(){e=sr(e);const o={};e.verifyingContract&&!qe(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=Cr.from(r);s.visit(n,(a,l)=>(a==="address"&&!qe(l,20)&&(o[l]="0x"),l));for(const a in o)o[a]=yield i(a);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=s.visit(n,(a,l)=>a==="address"&&o[l]?o[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){Cr.hashDomain(e);const i={},o=[];Z1.forEach(l=>{const c=e[l];c!=null&&(i[l]=gz[l](c),o.push({name:l,type:q3[l]}))});const s=Cr.from(r),a=sr(r);return a.EIP712Domain?$t.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=o,s.encode(n),{types:a,domain:i,primaryType:s.primaryType,message:s.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return le(oe(c));if(l.match(/^u?int/))return ae.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&$t.throwArgumentError("invalid string","value",c),c}return $t.throwArgumentError("unsupported type","type",l)})}}}const xz=Object.freeze(Object.defineProperty({__proto__:null,_TypedDataEncoder:Cr,dnsEncode:YS,ensNormalize:fz,hashMessage:Og,id:qo,isValidName:uz,messagePrefix:JS,namehash:rf},Symbol.toStringTag,{value:"Module"})),Bt=new H(au);class t7 extends Es{}class r7 extends Es{}class bz extends Es{}class b0 extends Es{static isIndexed(e){return!!(e&&e._isIndexed)}}const wz={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function K3(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class dp{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ee(this,"fragments",r.map(n=>_i.from(n)).filter(n=>n!=null)),ee(this,"_abiCoder",oi(new.target,"getAbiCoder")()),ee(this,"functions",{}),ee(this,"errors",{}),ee(this,"events",{}),ee(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Bt.warn("duplicate definition - constructor");return}ee(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=n.format();if(i[o]){Bt.warn("duplicate definition - "+o);return}i[o]=n}),this.deploy||ee(this,"deploy",ni.from({payable:!1,type:"constructor"})),ee(this,"_isInterface",!0)}format(e){e||(e=We.full),e===We.sighash&&Bt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===We.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return VS}static getAddress(e){return ct(e)}static getSighash(e){return Zt(qo(e.format()),0,4)}static getEventTopic(e){return qo(e.format())}getFunction(e){if(qe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Bt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching function","name",n):i.length>1&&Bt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[ii.fromString(e).format()];return r||Bt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(qe(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Bt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching event","name",n):i.length>1&&Bt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[Ti.fromString(e).format()];return r||Bt.throwArgumentError("no matching event","signature",e),r}getError(e){if(qe(e)){const n=oi(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===n(o))return this.errors[i]}Bt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching error","name",n):i.length>1&&Bt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[ii.fromString(e).format()];return r||Bt.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return oi(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),oi(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=oe(r);return le(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",le(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),le(kt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=oe(r);return le(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",le(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),le(kt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=oe(r),i=null,o="",s=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=le(n.slice(0,4)),f=wz[c];if(f)s=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(i=s[0]),a==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:a==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{const u=this.getError(c);s=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Bt.throwError("call revert exception"+o,H.errors.CALL_EXCEPTION,{method:e.format(),data:le(r),errorArgs:s,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),le(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Bt.throwError("too many arguments for "+e.format(),H.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(o,s)=>o.type==="string"?qo(s):o.type==="bytes"?rt(le(s)):(o.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),o.type.match(/^u?int/)&&(s=ae.from(s).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[s]),wt(le(s),32));for(r.forEach((o,s)=>{let a=e.inputs[s];if(!a.indexed){o!=null&&Bt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,o);return}o==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Bt.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,o):Array.isArray(o)?n.push(o.map(l=>i(a,l))):n.push(i(a,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Bt.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((s,a)=>{const l=r[a];if(s.indexed)if(s.type==="string")n.push(qo(l));else if(s.type==="bytes")n.push(rt(l));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),o.push(l)}),{data:this._abiCoder.encode(i,o),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!qe(n[0],32)||n[0].toLowerCase()!==d)&&Bt.throwError("fragment/topic mismatch",H.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],o=[],s=[];e.inputs.forEach((d,v)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(dr.fromObject({type:"bytes32",name:d.name})),s.push(!0)):(i.push(d),s.push(!1)):(o.push(d),s.push(!1))});let a=n!=null?this._abiCoder.decode(i,kt(n)):null,l=this._abiCoder.decode(o,r,!0),c=[],f=0,u=0;e.inputs.forEach((d,v)=>{if(d.indexed)if(a==null)c[v]=new b0({_isIndexed:!0,hash:null});else if(s[v])c[v]=new b0({_isIndexed:!0,hash:a[u++]});else try{c[v]=a[u++]}catch(g){c[v]=g}else try{c[v]=l[f++]}catch(g){c[v]=g}if(d.name&&c[d.name]==null){const g=c[v];g instanceof Error?Object.defineProperty(c,d.name,{enumerable:!0,get:()=>{throw K3(`property ${JSON.stringify(d.name)}`,g)}}):c[d.name]=g}});for(let d=0;d{throw K3(`index ${d}`,v)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new r7({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:ae.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new t7({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=le(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new bz({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const Ez=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:zS,ConstructorFragment:ni,ErrorFragment:io,EventFragment:Ti,FormatTypes:We,Fragment:_i,FunctionFragment:ii,Indexed:b0,Interface:dp,LogDescription:t7,ParamType:dr,TransactionDescription:r7,checkResultErrors:kS,defaultAbiCoder:VS},Symbol.toStringTag,{value:"Module"})),Az="abstract-provider/5.7.0";var Cz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Sz=new H(Az);class kz extends Es{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class lu{constructor(){Sz.checkAbstract(new.target,lu),ee(this,"_isProvider",!0)}getFeeData(){return Cz(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield Gt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=ae.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const Tz="abstract-signer/5.7.0";var Wn=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Tn=new H(Tz),Pz=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Rz=[H.errors.INSUFFICIENT_FUNDS,H.errors.NONCE_EXPIRED,H.errors.REPLACEMENT_UNDERPRICED];class zl{constructor(){Tn.checkAbstract(new.target,zl),ee(this,"_isSigner",!0)}getBalance(e){return Wn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Wn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Wn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield Gt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Wn(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Gt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Wn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Wn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Wn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Wn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Wn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)Pz.indexOf(n)===-1&&Tn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=sr(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&Tn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Wn(this,void 0,void 0,function*(){const r=yield Gt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Wn(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&Tn.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Tn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Tn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const o=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=o,r.maxPriorityFeePerGas=o}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&Tn.throwError("network does not support EIP-1559",H.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Tn.throwError("failed to get consistent fee data",H.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(Rz.indexOf(i.code)>=0)throw i;return Tn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Tn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Gt(r)})}_checkProvider(e){this.provider||Tn.throwError("missing provider",H.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Ng extends zl{constructor(e,r){super(),ee(this,"address",e),ee(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Tn.throwError(e,H.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Ng(this.address,e)}}var n7={},Fe={},cu=i7;function i7(t,e){if(!t)throw new Error(e||"Assertion failed")}i7.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var hp={exports:{}};typeof Object.create=="function"?hp.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:hp.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var Mz=hp.exports,_z=cu,Iz=Mz;Fe.inherits=Iz;function Oz(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function Nz(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=o&63|128):Oz(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Fe.htonl=o7;function Bz(t,e){for(var r="",n=0;n>>0}return o}Fe.join32=Lz;function Fz(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255)}return r}Fe.split32=Fz;function $z(t,e){return t>>>e|t<<32-e}Fe.rotr32=$z;function jz(t,e){return t<>>32-e}Fe.rotl32=jz;function Uz(t,e){return t+e>>>0}Fe.sum32=Uz;function zz(t,e,r){return t+e+r>>>0}Fe.sum32_3=zz;function Vz(t,e,r,n){return t+e+r+n>>>0}Fe.sum32_4=Vz;function Hz(t,e,r,n,i){return t+e+r+n+i>>>0}Fe.sum32_5=Hz;function qz(t,e,r,n){var i=t[e],o=t[e+1],s=n+o>>>0,a=(s>>0,t[e+1]=s}Fe.sum64=qz;function Gz(t,e,r,n){var i=e+n>>>0,o=(i>>0}Fe.sum64_hi=Gz;function Wz(t,e,r,n){var i=e+n;return i>>>0}Fe.sum64_lo=Wz;function Kz(t,e,r,n,i,o,s,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Fe.sum64_4_hi=Kz;function Qz(t,e,r,n,i,o,s,a){var l=e+n+o+a;return l>>>0}Fe.sum64_4_lo=Qz;function Yz(t,e,r,n,i,o,s,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}Fe.sum64_5_hi=Yz;function Jz(t,e,r,n,i,o,s,a,l,c){var f=e+n+o+a+c;return f>>>0}Fe.sum64_5_lo=Jz;function Xz(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Fe.rotr64_hi=Xz;function Zz(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Fe.rotr64_lo=Zz;function eV(t,e,r){return t>>>r}Fe.shr64_hi=eV;function tV(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Fe.shr64_lo=tV;var Vl={},Q3=Fe,rV=cu;function bh(){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}Vl.BlockHash=bh;bh.prototype.update=function(e,r){if(e=Q3.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Q3.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,s=8;s>>3}Wi.g0_256=aV;function lV(t){return Li(t,17)^Li(t,19)^t>>>10}Wi.g1_256=lV;var Tl=Fe,cV=Vl,fV=Wi,tv=Tl.rotl32,uc=Tl.sum32,uV=Tl.sum32_5,dV=fV.ft_1,u7=cV.BlockHash,hV=[1518500249,1859775393,2400959708,3395469782];function Vi(){if(!(this instanceof Vi))return new Vi;u7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Tl.inherits(Vi,u7);var vV=Vi;Vi.blockSize=512;Vi.outSize=160;Vi.hmacStrength=80;Vi.padLength=64;Vi.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),tH(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?l.push(u,d):l.push(d)}return l}r.toArray=n;function i(s){return s.length===1?"0"+s:s}r.zero2=i;function o(s){for(var a="",l=0;l(d>>1)-1?y=(d>>1)-w:y=w,v.isubn(y)):y=0,u[g]=y,v.iushrn(1)}return u}r.getNAF=n;function i(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,d=0,v;l.cmpn(-u)>0||c.cmpn(-d)>0;){var g=l.andln(3)+u&3,y=c.andln(3)+d&3;g===3&&(g=-1),y===3&&(y=-1);var w;g&1?(v=l.andln(7)+u&7,(v===3||v===5)&&y===2?w=-g:w=g):w=0,f[0].push(w);var b;y&1?(v=c.andln(7)+d&7,(v===3||v===5)&&g===2?b=-y:b=y):b=0,f[1].push(b),2*u===w+1&&(u=1-u),2*d===b+1&&(d=1-d),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=i;function o(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=o;function s(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=s;function a(l){return new Pe(l,"hex","le")}r.intFromLE=a}),w0=Cn.getNAF,iH=Cn.getJSF,E0=Cn.assert;function Cs(t,e){this.type=t,this.p=new Pe(e.p,16),this.red=e.prime?Pe.red(e.prime):Pe.mont(this.p),this.zero=new Pe(0).toRed(this.red),this.one=new Pe(1).toRed(this.red),this.two=new Pe(2).toRed(this.red),this.n=e.n&&new Pe(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var 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))}var pa=Cs;Cs.prototype.point=function(){throw new Error("Not implemented")};Cs.prototype.validate=function(){throw new Error("Not implemented")};Cs.prototype._fixedNafMul=function(e,r){E0(e.precomputed);var n=e._getDoubles(),i=w0(r,1,this._bitLength),o=(1<=a;c--)l=(l<<1)+i[c];s.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=o;d>0;d--){for(a=0;a=0;l--){for(var c=0;l>=0&&s[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=s[l];E0(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(o[f-1>>1]):a=a.mixedAdd(o[-f-1>>1].neg()):f>0?a=a.add(o[f-1>>1]):a=a.add(o[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};Cs.prototype._wnafMulAdd=function(e,r,n,i,o){var s=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,d;for(f=0;f=1;f-=2){var g=f-1,y=f;if(s[g]!==1||s[y]!==1){l[g]=w0(n[g],s[g],this._bitLength),l[y]=w0(n[y],s[y],this._bitLength),c=Math.max(l[g].length,c),c=Math.max(l[y].length,c);continue}var w=[r[g],null,null,r[y]];r[g].y.cmp(r[y].y)===0?(w[1]=r[g].add(r[y]),w[2]=r[g].toJ().mixedAdd(r[y].neg())):r[g].y.cmp(r[y].y.redNeg())===0?(w[1]=r[g].toJ().mixedAdd(r[y]),w[2]=r[g].add(r[y].neg())):(w[1]=r[g].toJ().mixedAdd(r[y]),w[2]=r[g].toJ().mixedAdd(r[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],x=iH(n[g],n[y]);for(c=Math.max(x[0].length,c),l[g]=new Array(c),l[y]=new Array(c),u=0;u=0;f--){for(var B=0;f>=0;){var D=!0;for(u=0;u=0&&B++,P=P.dblp(B),f<0)break;for(u=0;u0?d=a[u][V-1>>1]:V<0&&(d=a[u][-V-1>>1].neg()),d.type==="affine"?P=P.mixedAdd(d):P=P.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};jn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(v=c,g=f),u.negative&&(u=u.neg(),d=d.neg()),v.negative&&(v=v.neg(),g=g.neg()),[{a:u,b:d},{a:v,b:g}]};Un.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],o=i.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),a=o.mul(n.a),l=s.mul(i.a),c=o.mul(n.b),f=s.mul(i.b),u=e.sub(a).sub(l),d=c.add(f).neg();return{k1:u,k2:d}};Un.prototype.pointFromX=function(e,r){e=new Pe(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)};Un.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};Un.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""};xr.prototype.isInfinity=function(){return this.inf};xr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};xr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)};xr.prototype.getX=function(){return this.x.fromRed()};xr.prototype.getY=function(){return this.y.fromRed()};xr.prototype.mul=function(e){return e=new Pe(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};xr.prototype.mulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};xr.prototype.jmulAdd=function(e,r,n){var i=[this,r],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};xr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};xr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};xr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Rr(t,e,r,n){pa.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Pe(0)):(this.x=new Pe(e,16),this.y=new Pe(r,16),this.z=new Pe(n,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}Bg(Rr,pa.BasePoint);Un.prototype.jpoint=function(e,r,n){return new Rr(this,e,r,n)};Rr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Rr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Rr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),o=e.x.redMul(n),s=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(o),c=s.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),d=i.redMul(f),v=c.redSqr().redIAdd(u).redISub(d).redISub(d),g=c.redMul(d.redISub(v)).redISub(s.redMul(u)),y=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(v,g,y)};Rr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),o=this.y,s=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=o.redSub(s);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),d=l.redSqr().redIAdd(f).redISub(u).redISub(u),v=l.redMul(u.redISub(d)).redISub(o.redMul(f)),g=this.z.redMul(a);return this.curve.jpoint(d,v,g)};Rr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};Rr.prototype.inspect=function(){return this.isInfinity()?"":""};Rr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var wd=Gl(function(t,e){var r=e;r.base=pa,r.short=sH,r.mont=null,r.edwards=null}),Ed=Gl(function(t,e){var r=e,n=Cn.assert;function i(a){a.type==="short"?this.curve=new wd.short(a):a.type==="edwards"?this.curve=new wd.edwards(a):this.curve=new wd.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function o(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}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:Yr.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:Yr.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:Yr.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:Yr.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:Yr.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:Yr.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:Yr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=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:Yr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function ds(t){if(!(this instanceof ds))return new ds(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=si.toArray(t.entropy,t.entropyEnc||"hex"),r=si.toArray(t.nonce,t.nonceEnc||"hex"),n=si.toArray(t.pers,t.persEnc||"hex");Dg(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var A7=ds;ds.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};ds.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=si.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var aH=Cn.assert;function wh(t,e){if(t instanceof wh)return t;this._importDER(t,e)||(aH(t.r&&t.s,"Signature without r or s"),this.r=new Pe(t.r,16),this.s=new Pe(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Eh=wh;function lH(){this.place=0}function iv(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function Z3(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}wh.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Z3(r),n=Z3(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];ov(i,r.length),i=i.concat(r),i.push(2),ov(i,n.length);var o=i.concat(n),s=[48];return ov(s,o.length),s=s.concat(o),Cn.encode(s,e)};var cH=function(){throw new Error("unsupported")},C7=Cn.assert;function $n(t){if(!(this instanceof $n))return new $n(t);typeof t=="string"&&(C7(Object.prototype.hasOwnProperty.call(Ed,t),"Unknown curve "+t),t=Ed[t]),t instanceof Ed.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}var fH=$n;$n.prototype.keyPair=function(e){return new Lg(this,e)};$n.prototype.keyFromPrivate=function(e,r){return Lg.fromPrivate(this,e,r)};$n.prototype.keyFromPublic=function(e,r){return Lg.fromPublic(this,e,r)};$n.prototype.genKeyPair=function(e){e||(e={});for(var r=new A7({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||cH(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Pe(2));;){var o=new Pe(r.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};$n.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};$n.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Pe(e,16));for(var o=this.n.byteLength(),s=r.getPrivate().toArray("be",o),a=e.toArray("be",o),l=new A7({hash:this.hash,entropy:s,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new Pe(1)),f=0;;f++){var u=i.k?i.k(f):new Pe(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var v=d.getX(),g=v.umod(this.n);if(g.cmpn(0)!==0){var y=u.invm(this.n).mul(g.mul(r.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var w=(d.getY().isOdd()?1:0)|(v.cmp(g)!==0?2:0);return i.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),w^=1),new Eh({r:g,s:y,recoveryParam:w})}}}}}};$n.prototype.verify=function(e,r,n,i){e=this._truncateToN(new Pe(e,16)),n=this.keyFromPublic(n,i),r=new Eh(r,"hex");var o=r.r,s=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a=s.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(o).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(o)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(o)===0)};$n.prototype.recoverPubKey=function(t,e,r,n){C7((3&r)===r,"The recovery param is more than two bits"),e=new Eh(e,n);var i=this.n,o=new Pe(t),s=e.r,a=e.s,l=r&1,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?s=this.curve.pointFromX(s.add(this.curve.n),l):s=this.curve.pointFromX(s,l);var f=e.r.invm(i),u=i.sub(o).mul(f).umod(i),d=a.mul(f).umod(i);return this.g.mulAdd(u,s,d)};$n.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Eh(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch{continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var uH=Gl(function(t,e){var r=e;r.version="6.5.4",r.utils=Cn,r.rand=function(){throw new Error("unsupported")},r.curve=wd,r.curves=Ed,r.ec=fH,r.eddsa=null}),dH=uH.ec;const hH="signing-key/5.7.0",mp=new H(hH);let sv=null;function Ci(){return sv||(sv=new dH("secp256k1")),sv}class Gs{constructor(e){ee(this,"curve","secp256k1"),ee(this,"privateKey",le(e)),Ui(this.privateKey)!==32&&mp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=Ci().keyFromPrivate(oe(this.privateKey));ee(this,"publicKey","0x"+r.getPublic(!1,"hex")),ee(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ee(this,"_isSigningKey",!0)}_addPoint(e){const r=Ci().keyFromPublic(oe(this.publicKey)),n=Ci().keyFromPublic(oe(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=Ci().keyFromPrivate(oe(this.privateKey)),n=oe(e);n.length!==32&&mp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return ya({recoveryParam:i.recoveryParam,r:wt("0x"+i.r.toString(16),32),s:wt("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=Ci().keyFromPrivate(oe(this.privateKey)),n=Ci().keyFromPublic(oe(Fg(e)));return wt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function S7(t,e){const r=ya(e),n={r:oe(r.r),s:oe(r.s)};return"0x"+Ci().recoverPubKey(oe(t),n,r.recoveryParam).encode("hex",!1)}function Fg(t,e){const r=oe(t);if(r.length===32){const n=new Gs(r);return e?"0x"+Ci().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?le(r):"0x"+Ci().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+Ci().keyFromPublic(r).getPublic(!0,"hex"):le(r)}return mp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const vH=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:Gs,computePublicKey:Fg,recoverPublicKey:S7},Symbol.toStringTag,{value:"Module"})),yH="transactions/5.7.0",Dr=new H(yH);var gp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(gp||(gp={}));function $g(t){return t==="0x"?null:ct(t)}function Nr(t){return t==="0x"?BS:ae.from(t)}const pH=[{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"}],mH={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function is(t){const e=Fg(t);return ct(Zt(rt(Zt(e,1)),12))}function fu(t,e){return is(S7(oe(t),e))}function hn(t,e){const r=Bi(ae.from(t).toHexString());return r.length>32&&Dr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function av(t,e){return{address:ct(t),storageKeys:(e||[]).map((r,n)=>(Ui(r)!==32&&Dr.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function ma(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Dr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),av(r[0],r[1])):av(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,o)=>(i[o]=!0,i),{});return av(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function k7(t){return ma(t).map(e=>[e.address,e.storageKeys])}function T7(t,e){if(t.gasPrice!=null){const n=ae.from(t.gasPrice),i=ae.from(t.maxFeePerGas||0);n.eq(i)||Dr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[hn(t.chainId||0,"chainId"),hn(t.nonce||0,"nonce"),hn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),hn(t.maxFeePerGas||0,"maxFeePerGas"),hn(t.gasLimit||0,"gasLimit"),t.to!=null?ct(t.to):"0x",hn(t.value||0,"value"),t.data||"0x",k7(t.accessList||[])];if(e){const n=ya(e);r.push(hn(n.recoveryParam,"recoveryParam")),r.push(Bi(n.r)),r.push(Bi(n.s))}return Vr(["0x02",ia(r)])}function P7(t,e){const r=[hn(t.chainId||0,"chainId"),hn(t.nonce||0,"nonce"),hn(t.gasPrice||0,"gasPrice"),hn(t.gasLimit||0,"gasLimit"),t.to!=null?ct(t.to):"0x",hn(t.value||0,"value"),t.data||"0x",k7(t.accessList||[])];if(e){const n=ya(e);r.push(hn(n.recoveryParam,"recoveryParam")),r.push(Bi(n.r)),r.push(Bi(n.s))}return Vr(["0x01",ia(r)])}function gH(t,e){Cg(t,mH);const r=[];pH.forEach(function(s){let a=t[s.name]||[];const l={};s.numeric&&(l.hexPad="left"),a=oe(le(a,l)),s.length&&a.length!==s.length&&a.length>0&&Dr.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,a),s.maxLength&&(a=Bi(a),a.length>s.maxLength&&Dr.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,a)),r.push(le(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Dr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!su(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(le(n)),r.push("0x"),r.push("0x")),!e)return ia(r);const i=ya(e);let o=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),o+=n*2+8,i.v>28&&i.v!==o&&Dr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&Dr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(le(o)),r.push(Bi(oe(i.r))),r.push(Bi(oe(i.s))),ia(r)}function xp(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Dr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),gH(t,e);switch(t.type){case 1:return P7(t,e);case 2:return T7(t,e)}return Dr.throwError(`unsupported transaction type: ${t.type}`,H.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function R7(t,e,r){try{const n=Nr(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Dr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=wt(e[1],32),t.s=wt(e[2],32);try{const n=rt(r(t));t.from=fu(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function xH(t){const e=mh(t.slice(1));e.length!==9&&e.length!==12&&Dr.throwArgumentError("invalid component count for transaction type: 2","payload",le(t));const r=Nr(e[2]),n=Nr(e[3]),i={type:2,chainId:Nr(e[0]).toNumber(),nonce:Nr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Nr(e[4]),to:$g(e[5]),value:Nr(e[6]),data:e[7],accessList:ma(e[8])};return e.length===9||(i.hash=rt(t),R7(i,e.slice(9),T7)),i}function bH(t){const e=mh(t.slice(1));e.length!==8&&e.length!==11&&Dr.throwArgumentError("invalid component count for transaction type: 1","payload",le(t));const r={type:1,chainId:Nr(e[0]).toNumber(),nonce:Nr(e[1]).toNumber(),gasPrice:Nr(e[2]),gasLimit:Nr(e[3]),to:$g(e[4]),value:Nr(e[5]),data:e[6],accessList:ma(e[7])};return e.length===8||(r.hash=rt(t),R7(r,e.slice(8),P7)),r}function wH(t){const e=mh(t);e.length!==9&&e.length!==6&&Dr.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Nr(e[0]).toNumber(),gasPrice:Nr(e[1]),gasLimit:Nr(e[2]),to:$g(e[3]),value:Nr(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=ae.from(e[6]).toNumber()}catch{return r}if(r.r=wt(e[7],32),r.s=wt(e[8],32),ae.from(r.r).isZero()&&ae.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(le(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const o=rt(ia(i));try{r.from=fu(o,{r:le(r.r),s:le(r.s),recoveryParam:n})}catch{}r.hash=rt(t)}return r.type=null,r}function M7(t){const e=oe(t);if(e[0]>127)return wH(e);switch(e[0]){case 1:return bH(e);case 2:return xH(e)}return Dr.throwError(`unsupported transaction type: ${e[0]}`,H.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const EH=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return gp},accessListify:ma,computeAddress:is,parse:M7,recoverAddress:fu,serialize:xp},Symbol.toStringTag,{value:"Module"})),AH="contracts/5.7.0";var sa=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Jt=new H(AH);function A0(t,e){return sa(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Jt.throwArgumentError("invalid address or ENS name","name",r);try{return ct(r)}catch{}t||Jt.throwError("a provider or signer is needed to resolve ENS names",H.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Jt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Ad(t,e,r){return sa(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Ad(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield A0(t,e):r.type==="tuple"?yield Ad(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Ad(t,n,r.arrayChildren))):Promise.reject(Jt.makeError("invalid value for array",H.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Ah(t,e,r){return sa(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=sr(r.pop())),Jt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=Gt({override:A0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>sa(this,void 0,void 0,function*(){return ct(c.signer)!==c.override&&Jt.throwError("Contract with a Signer cannot override from",H.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=A0(t.provider,n.from));const i=yield Gt({args:Ad(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:Gt(n)||{}}),o=t.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},a=i.overrides;if(a.nonce!=null&&(s.nonce=ae.from(a.nonce).toNumber()),a.gasLimit!=null&&(s.gasLimit=ae.from(a.gasLimit)),a.gasPrice!=null&&(s.gasPrice=ae.from(a.gasPrice)),a.maxFeePerGas!=null&&(s.maxFeePerGas=ae.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=ae.from(a.maxPriorityFeePerGas)),a.from!=null&&(s.from=a.from),a.type!=null&&(s.type=a.type),a.accessList!=null&&(s.accessList=ma(a.accessList)),s.gasLimit==null&&e.gas!=null){let c=21e3;const f=oe(o);for(let u=0;un[c]!=null);return l.length&&Jt.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,H.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function CH(t,e){return function(...r){return Ah(t,e,r)}}function SH(t,e){const r=t.signer||t.provider;return function(...n){return sa(this,void 0,void 0,function*(){r||Jt.throwError("estimate require a provider or signer",H.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Ah(t,e,n);return yield r.estimateGas(i)})}}function kH(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(o=>{let s=us(o),a=null;try{a=t.interface.parseLog(o)}catch{}return a&&(s.args=a.args,s.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),s.event=a.name,s.eventSignature=a.signature),s.removeListener=()=>t.provider,s.getBlock=()=>t.provider.getBlock(i.blockHash),s.getTransaction=()=>t.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function _7(t,e,r){const n=t.signer||t.provider;return function(...i){return sa(this,void 0,void 0,function*(){let o;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=sr(i.pop());l.blockTag!=null&&(o=yield l.blockTag),delete l.blockTag,i.push(l)}t.deployTransaction!=null&&(yield t._deployed(o));const s=yield Ah(t,e,i),a=yield n.call(s,o);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===H.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=s),l}})}}function TH(t,e){return function(...r){return sa(this,void 0,void 0,function*(){t.signer||Jt.throwError("sending a transaction requires a signer",H.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Ah(t,e,r),i=yield t.signer.sendTransaction(n);return kH(t,i),i})}}function e6(t,e,r){return e.constant?_7(t,e,r):TH(t,e)}function I7(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class Ff{constructor(e,r){ee(this,"tag",e),ee(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class PH extends Ff{constructor(){super("error",null)}}class t6 extends Ff{constructor(e,r,n,i){const o={address:e};let s=r.getEventTopic(n);i?(s!==i[0]&&Jt.throwArgumentError("topic mismatch","topics",i),o.topics=i.slice()):o.topics=[s],super(I7(o),o),ee(this,"address",e),ee(this,"interface",r),ee(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=kS(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class r6 extends Ff{constructor(e,r){super("*",{address:e}),ee(this,"address",e),ee(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class RH{constructor(e,r,n){ee(this,"interface",oi(new.target,"getInterface")(r)),n==null?(ee(this,"provider",null),ee(this,"signer",null)):zl.isSigner(n)?(ee(this,"provider",n.provider||null),ee(this,"signer",n)):lu.isProvider(n)?(ee(this,"provider",n),ee(this,"signer",null)):Jt.throwArgumentError("invalid signer or provider","signerOrProvider",n),ee(this,"callStatic",{}),ee(this,"estimateGas",{}),ee(this,"functions",{}),ee(this,"populateTransaction",{}),ee(this,"filters",{});{const s={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];ee(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),s[l.name]||(s[l.name]=[]),s[l.name].push(a)}),Object.keys(s).forEach(a=>{const l=s[a];l.length===1?ee(this.filters,a,this.filters[l[0]]):Jt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(ee(this,"_runningEvents",{}),ee(this,"_wrappedEmits",{}),e==null&&Jt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ee(this,"address",e),this.provider)ee(this,"resolvedAddress",A0(this.provider,e));else try{ee(this,"resolvedAddress",Promise.resolve(ct(e)))}catch{Jt.throwError("provider is required to use ENS name as contract address",H.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});const i={},o={};Object.keys(this.interface.functions).forEach(s=>{const a=this.interface.functions[s];if(o[s]){Jt.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}o[s]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}this[s]==null&&ee(this,s,e6(this,a,!0)),this.functions[s]==null&&ee(this.functions,s,e6(this,a,!1)),this.callStatic[s]==null&&ee(this.callStatic,s,_7(this,a,!0)),this.populateTransaction[s]==null&&ee(this.populateTransaction,s,CH(this,a)),this.estimateGas[s]==null&&ee(this.estimateGas,s,SH(this,a))}),Object.keys(i).forEach(s=>{const a=i[s];if(a.length>1)return;s=s.substring(1);const l=a[0];try{this[s]==null&&ee(this,s,this[l])}catch{}this.functions[s]==null&&ee(this.functions,s,this.functions[l]),this.callStatic[s]==null&&ee(this.callStatic,s,this.callStatic[l]),this.populateTransaction[s]==null&&ee(this.populateTransaction,s,this.populateTransaction[l]),this.estimateGas[s]==null&&ee(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return Tg(e)}static getInterface(e){return dp.isInterface(e)?e:new dp(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&Jt.throwError("contract not deployed",H.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Jt.throwError("sending a transactions require a signer",H.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=sr(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Jt.throwError("cannot override "+n,H.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Ng(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ee(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return b0.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new PH);if(e==="event")return this._normalizeRunningEvent(new Ff("event",null));if(e==="*")return this._normalizeRunningEvent(new r6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new t6(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new t6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Ff(I7(r),r))}return this._normalizeRunningEvent(new r6(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=us(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||Jt.throwError("events require a provider or a signer with a provider",H.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=o=>{let s=this._wrapEvent(e,o,r);if(s.decodeError==null)try{const a=e.getEmit(s);this.emit(e.filter,...a)}catch(a){s.decodeError=a.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),o=sr(i.filter);return typeof r=="string"&&qe(r,32)?(n!=null&&Jt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=r):(o.fromBlock=r??0,o.toBlock=n??"latest"),this.provider.getLogs(o).then(s=>s.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class MH extends RH{}class jg{constructor(e){ee(this,"alphabet",e),ee(this,"base",e.length),ee(this,"_alphabetMap",{}),ee(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;r[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;o>0;)r.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let d=oe($f(i,t,l));o||(o=d.length,f=new Uint8Array(o),s=Math.ceil(n/o),c=n-(s-1)*o),f.set(d);for(let y=1;y=256)throw new Error("Depth too large!");return i6(kt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",le(this.depth),this.parentFingerprint,wt(le(this.index),4),this.chainCode,this.privateKey!=null?kt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new vn(Ea,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~Ra));const n=new Uint8Array(37);if(e&Ra){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(oe(this.privateKey),1),r&&(r+="'")}else n.set(oe(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=oe($f(_l.sha512,this.chainCode,n)),o=i.slice(0,32),s=i.slice(32);let a=null,l=null;this.privateKey?a=Ku(ae.from(o).add(this.privateKey).mod(zH)):l=new Gs(le(o))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new vn(Ea,a,l,this.fingerprint,Ku(s),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Ra)throw new Error("invalid path index - "+o);n=n._derive(Ra+s)}else if(o.match(/^[0-9]+$/)){const s=parseInt(o);if(s>=Ra)throw new Error("invalid path index - "+o);n=n._derive(s)}else throw new Error("invalid path component - "+o)}return n}static _fromSeed(e,r){const n=oe(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=oe($f(_l.sha512,VH,n));return new vn(Ea,Ku(i.slice(0,32)),null,"0x00000000",Ku(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=zg(n),e=Sh(Ch(e,n),n),vn._fromSeed(B7(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return vn._fromSeed(e,null)}static fromExtendedKey(e){const r=Ml.decode(e);(r.length!==82||i6(r.slice(0,78))!==e)&&jf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=le(r.slice(5,9)),o=parseInt(le(r.slice(9,13)).substring(2),16),s=le(r.slice(13,45)),a=r.slice(45,78);switch(le(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new vn(Ea,null,le(a),i,s,o,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new vn(Ea,le(a.slice(1)),null,i,s,o,n,null)}return jf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function B7(t,e){e||(e="");const r=Dt("mnemonic"+e,zi.NFKD);return Ug(Dt(t,zi.NFKD),r,2048,64,"sha512")}function Ch(t,e){e=zg(e),jf.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=oe(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const o=32*r.length/3,s=r.length/3,a=D7(s);if((oe(bo(n.slice(0,o/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return le(n.slice(0,o/8))}function Sh(t,e){if(e=zg(e),t=oe(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let s=0;s8?(r[r.length-1]<<=8,r[r.length-1]|=t[s],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[s]>>8-n,r.push(t[s]&HH(8-n)),n+=3);const i=t.length/4,o=oe(bo(t))[0]&D7(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,e.join(r.map(s=>e.getWord(s)))}function qH(t,e){try{return Ch(t,e),!0}catch{}return!1}function GH(t){return(typeof t!="number"||t<0||t>=Ra||t%1)&&jf.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const WH=Object.freeze(Object.defineProperty({__proto__:null,HDNode:vn,defaultPath:Il,entropyToMnemonic:Sh,getAccountPath:GH,isValidMnemonic:qH,mnemonicToEntropy:Ch,mnemonicToSeed:B7},Symbol.toStringTag,{value:"Module"})),KH="random/5.7.0",wp=new H(KH);function QH(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const o6=QH();let Cd=o6.crypto||o6.msCrypto;(!Cd||!Cd.getRandomValues)&&(wp.warn("WARNING: Missing strong random number source"),Cd={getRandomValues:function(t){return wp.throwError("no secure random source avaialble",H.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Ya(t){(t<=0||t>1024||t%1||t!=t)&&wp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Cd.getRandomValues(e),oe(e)}function YH(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}const JH=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:Ya,shuffled:YH},Symbol.toStringTag,{value:"Module"}));var L7={exports:{}};(function(t,e){(function(r){function n(k){return parseInt(k)===k}function i(k){if(!n(k.length))return!1;for(var p=0;p255)return!1;return!0}function o(k,p){if(k.buffer&&ArrayBuffer.isView(k)&&k.name==="Uint8Array")return p&&(k.slice?k=k.slice():k=Array.prototype.slice.call(k)),k;if(Array.isArray(k)){if(!i(k))throw new Error("Array contains invalid value: "+k);return new Uint8Array(k)}if(n(k.length)&&i(k))return new Uint8Array(k);throw new Error("unsupported array-like object")}function s(k){return new Uint8Array(k)}function a(k,p,R,F,E){(F!=null||E!=null)&&(k.slice?k=k.slice(F,E):k=Array.prototype.slice.call(k,F,E)),p.set(k,R)}var l=function(){function k(R){var F=[],E=0;for(R=encodeURI(R);E191&&$<224?(F.push(String.fromCharCode(($&31)<<6|R[E+1]&63)),E+=2):(F.push(String.fromCharCode(($&15)<<12|(R[E+1]&63)<<6|R[E+2]&63)),E+=3)}return F.join("")}return{toBytes:k,fromBytes:p}}(),c=function(){function k(F){for(var E=[],$=0;$>4]+p[U&15])}return E.join("")}return{toBytes:k,fromBytes:R}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],v=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],g=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],w=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],b=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],x=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],C=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],S=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],P=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],N=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],B=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],D=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],V=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Y(k){for(var p=[],R=0;R>2,this._Ke[$][p%4]=E[p],this._Kd[k-$][p%4]=E[p];for(var U=0,z=F,K;z>16&255]<<24^d[K>>8&255]<<16^d[K&255]<<8^d[K>>24&255]^u[U]<<24,U+=1,F!=8)for(var p=1;p>8&255]<<8^d[K>>16&255]<<16^d[K>>24&255]<<24;for(var p=F/2+1;p>2,X=z%4,this._Ke[ie][X]=E[p],this._Kd[k-ie][X]=E[p++],z++}for(var ie=1;ie>24&255]^B[K>>16&255]^D[K>>8&255]^V[K&255]},G.prototype.encrypt=function(k){if(k.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var p=this._Ke.length-1,R=[0,0,0,0],F=Y(k),E=0;E<4;E++)F[E]^=this._Ke[0][E];for(var $=1;$>24&255]^y[F[(E+1)%4]>>16&255]^w[F[(E+2)%4]>>8&255]^b[F[(E+3)%4]&255]^this._Ke[$][E];F=R.slice()}for(var U=s(16),z,E=0;E<4;E++)z=this._Ke[p][E],U[4*E]=(d[F[E]>>24&255]^z>>24)&255,U[4*E+1]=(d[F[(E+1)%4]>>16&255]^z>>16)&255,U[4*E+2]=(d[F[(E+2)%4]>>8&255]^z>>8)&255,U[4*E+3]=(d[F[(E+3)%4]&255]^z)&255;return U},G.prototype.decrypt=function(k){if(k.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var p=this._Kd.length-1,R=[0,0,0,0],F=Y(k),E=0;E<4;E++)F[E]^=this._Kd[0][E];for(var $=1;$>24&255]^C[F[(E+3)%4]>>16&255]^S[F[(E+2)%4]>>8&255]^P[F[(E+1)%4]&255]^this._Kd[$][E];F=R.slice()}for(var U=s(16),z,E=0;E<4;E++)z=this._Kd[p][E],U[4*E]=(v[F[E]>>24&255]^z>>24)&255,U[4*E+1]=(v[F[(E+3)%4]>>16&255]^z>>16)&255,U[4*E+2]=(v[F[(E+2)%4]>>8&255]^z>>8)&255,U[4*E+3]=(v[F[(E+1)%4]&255]^z)&255;return U};var Z=function(k){if(!(this instanceof Z))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new G(k)};Z.prototype.encrypt=function(k){if(k=o(k),k.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var p=s(k.length),R=s(16),F=0;F=0;--p)this._counter[p]=k%256,k=k>>8},T.prototype.setBytes=function(k){if(k=o(k,!0),k.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=k},T.prototype.increment=function(){for(var k=15;k>=0;k--)if(this._counter[k]===255)this._counter[k]=0;else{this._counter[k]++;break}};var _=function(k,p){if(!(this instanceof _))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",p instanceof T||(p=new T(p)),this._counter=p,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new G(k)};_.prototype.encrypt=function(k){for(var p=o(k,!0),R=0;R16)throw new Error("PKCS#7 padding byte out of range");for(var R=k.length-p,F=0;F=64;){let L=b,k=x,p=C,R=S,F=P,E=N,$=B,U=D,z,K,ie,X,te;for(K=0;K<16;K++)ie=M+K*4,V[K]=(_[ie]&255)<<24|(_[ie+1]&255)<<16|(_[ie+2]&255)<<8|_[ie+3]&255;for(K=16;K<64;K++)z=V[K-2],X=(z>>>17|z<<32-17)^(z>>>19|z<<32-19)^z>>>10,z=V[K-15],te=(z>>>7|z<<32-7)^(z>>>18|z<<32-18)^z>>>3,V[K]=(X+V[K-7]|0)+(te+V[K-16]|0)|0;for(K=0;K<64;K++)X=(((F>>>6|F<<32-6)^(F>>>11|F<<32-11)^(F>>>25|F<<32-25))+(F&E^~F&$)|0)+(U+(w[K]+V[K]|0)|0)|0,te=((L>>>2|L<<32-2)^(L>>>13|L<<32-13)^(L>>>22|L<<32-22))+(L&k^L&p^k&p)|0,U=$,$=E,E=F,F=R+X|0,R=p,p=k,k=L,L=X+te|0;b=b+L|0,x=x+k|0,C=C+p|0,S=S+R|0,P=P+F|0,N=N+E|0,B=B+$|0,D=D+U|0,M+=64,O-=64}}Y(y);let G,Z=y.length%64,I=y.length/536870912|0,h=y.length<<3,A=Z<56?56:120,T=y.slice(y.length-Z,y.length);for(T.push(128),G=Z+1;G>>24&255),T.push(I>>>16&255),T.push(I>>>8&255),T.push(I>>>0&255),T.push(h>>>24&255),T.push(h>>>16&255),T.push(h>>>8&255),T.push(h>>>0&255),Y(T),[b>>>24&255,b>>>16&255,b>>>8&255,b>>>0&255,x>>>24&255,x>>>16&255,x>>>8&255,x>>>0&255,C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255]}function o(y,w,b){y=y.length<=64?y:i(y);const x=64+w.length+4,C=new Array(x),S=new Array(64);let P,N=[];for(P=0;P<64;P++)C[P]=54;for(P=0;P=x-4;D--){if(C[D]++,C[D]<=255)return;C[D]=0}}for(;b>=32;)B(),N=N.concat(i(S.concat(i(C)))),b-=32;return b>0&&(B(),N=N.concat(i(S.concat(i(C))).slice(0,b))),N}function s(y,w,b,x,C){let S;for(f(y,(2*b-1)*16,C,0,16),S=0;S<2*b;S++)c(y,S*16,C,16),l(C,x),f(C,0,y,w+S*16,16);for(S=0;S>>32-w}function l(y,w){f(y,0,w,0,16);for(let b=8;b>0;b-=2)w[4]^=a(w[0]+w[12],7),w[8]^=a(w[4]+w[0],9),w[12]^=a(w[8]+w[4],13),w[0]^=a(w[12]+w[8],18),w[9]^=a(w[5]+w[1],7),w[13]^=a(w[9]+w[5],9),w[1]^=a(w[13]+w[9],13),w[5]^=a(w[1]+w[13],18),w[14]^=a(w[10]+w[6],7),w[2]^=a(w[14]+w[10],9),w[6]^=a(w[2]+w[14],13),w[10]^=a(w[6]+w[2],18),w[3]^=a(w[15]+w[11],7),w[7]^=a(w[3]+w[15],9),w[11]^=a(w[7]+w[3],13),w[15]^=a(w[11]+w[7],18),w[1]^=a(w[0]+w[3],7),w[2]^=a(w[1]+w[0],9),w[3]^=a(w[2]+w[1],13),w[0]^=a(w[3]+w[2],18),w[6]^=a(w[5]+w[4],7),w[7]^=a(w[6]+w[5],9),w[4]^=a(w[7]+w[6],13),w[5]^=a(w[4]+w[7],18),w[11]^=a(w[10]+w[9],7),w[8]^=a(w[11]+w[10],9),w[9]^=a(w[8]+w[11],13),w[10]^=a(w[9]+w[8],18),w[12]^=a(w[15]+w[14],7),w[13]^=a(w[12]+w[15],9),w[14]^=a(w[13]+w[12],13),w[15]^=a(w[14]+w[13],18);for(let b=0;b<16;++b)y[b]+=w[b]}function c(y,w,b,x){for(let C=0;C=256)return!1}return!0}function d(y,w){if(typeof y!="number"||y%1)throw new Error("invalid "+w);return y}function v(y,w,b,x,C,S,P){if(b=d(b,"N"),x=d(x,"r"),C=d(C,"p"),S=d(S,"dkLen"),b===0||b&b-1)throw new Error("N must be power of 2");if(b>2147483647/128/x)throw new Error("N too large");if(x>2147483647/128/C)throw new Error("r too large");if(!u(y))throw new Error("password must be an array or buffer");if(y=Array.prototype.slice.call(y),!u(w))throw new Error("salt must be an array or buffer");w=Array.prototype.slice.call(w);let N=o(y,w,C*128*x);const B=new Uint32Array(C*32*x);for(let F=0;Fk&&(F=k);for(let $=0;$k&&(F=k);for(let $=0;$>0&255),N.push(B[$]>>8&255),N.push(B[$]>>16&255),N.push(B[$]>>24&255);const E=o(y,N,S);return P&&P(null,1,E),E}P&&p(R)};if(!P)for(;;){const F=R();if(F!=null)return F}R()}const g={scrypt:function(y,w,b,x,C,S,P){return new Promise(function(N,B){let D=0;P&&P(0),v(y,w,b,x,C,S,function(V,Y,G){if(V)B(V);else if(G)P&&D!==1&&P(1),N(new Uint8Array(G));else if(P&&Y!==D)return D=Y,P(Y)})})},syncScrypt:function(y,w,b,x,C,S){return new Uint8Array(v(y,w,b,x,C,S))}};t.exports=g})()})($7);var nq=$7.exports;const qg=Eo(nq);var iq=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ep=new H(F7);function s6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class oq extends Es{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function sq(t,e,r){if(Xt(t,"crypto/cipher")==="aes-128-ctr"){const i=Ws(Xt(t,"crypto/cipherparams/iv")),o=new Ii.Counter(i),s=new Ii.ModeOfOperation.ctr(e,o);return oe(s.decrypt(r))}return null}function j7(t,e){const r=Ws(Xt(t,"crypto/ciphertext"));if(le(rt(kt([e.slice(16,32),r]))).substring(2)!==Xt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=sq(t,e.slice(0,16),r);i||Ep.throwError("unsupported cipher",H.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=e.slice(32,64),s=is(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),ct(l)!==s)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:s,privateKey:le(i)};if(Xt(t,"x-ethers/version")==="0.1"){const l=Ws(Xt(t,"x-ethers/mnemonicCiphertext")),c=Ws(Xt(t,"x-ethers/mnemonicCounter")),f=new Ii.Counter(c),u=new Ii.ModeOfOperation.ctr(o,f),d=Xt(t,"x-ethers/path")||Il,v=Xt(t,"x-ethers/locale")||"en",g=oe(u.decrypt(l));try{const y=Sh(g,v),w=vn.fromMnemonic(y,null,v).derivePath(d);if(w.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=w.mnemonic}catch(y){if(y.code!==H.errors.INVALID_ARGUMENT||y.argument!=="wordlist")throw y}}return new oq(a)}function U7(t,e,r,n,i){return oe(Ug(t,e,r,n,i))}function aq(t,e,r,n,i){return Promise.resolve(U7(t,e,r,n,i))}function z7(t,e,r,n,i){const o=Vg(e),s=Xt(t,"crypto/kdf");if(s&&typeof s=="string"){const a=function(l,c){return Ep.throwArgumentError("invalid key-derivation function parameters",l,c)};if(s.toLowerCase()==="scrypt"){const l=Ws(Xt(t,"crypto/kdfparams/salt")),c=parseInt(Xt(t,"crypto/kdfparams/n")),f=parseInt(Xt(t,"crypto/kdfparams/r")),u=parseInt(Xt(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",s),c&c-1&&a("N",c);const d=parseInt(Xt(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),n(o,l,c,f,u,64,i)}else if(s.toLowerCase()==="pbkdf2"){const l=Ws(Xt(t,"crypto/kdfparams/salt"));let c=null;const f=Xt(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(Xt(t,"crypto/kdfparams/c")),d=parseInt(Xt(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),r(o,l,u,d,c)}}return Ep.throwArgumentError("unsupported key-derivation function","kdf",s)}function V7(t,e){const r=JSON.parse(t),n=z7(r,e,U7,qg.syncScrypt);return j7(r,n)}function H7(t,e,r){return iq(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield z7(n,e,aq,qg.scrypt,r);return j7(n,i)})}function q7(t,e,r,n){try{if(ct(t.address)!==is(t.privateKey))throw new Error("address/privateKey mismatch");if(s6(t)){const w=t.mnemonic;if(vn.fromMnemonic(w.phrase,null,w.locale).derivePath(w.path||Il).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(w){return Promise.reject(w)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=oe(t.privateKey),o=Vg(e);let s=null,a=null,l=null;if(s6(t)){const w=t.mnemonic;s=oe(Ch(w.phrase,w.locale||"en")),a=w.path||Il,l=w.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=oe(r.salt):f=Ya(32);let u=null;if(r.iv){if(u=oe(r.iv),u.length!==16)throw new Error("invalid iv")}else u=Ya(16);let d=null;if(r.uuid){if(d=oe(r.uuid),d.length!==16)throw new Error("invalid uuid")}else d=Ya(16);let v=1<<17,g=8,y=1;return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(g=r.scrypt.r),r.scrypt.p&&(y=r.scrypt.p)),qg.scrypt(o,f,v,g,y,64,n).then(w=>{w=oe(w);const b=w.slice(0,16),x=w.slice(16,32),C=w.slice(32,64),S=new Ii.Counter(u),P=new Ii.ModeOfOperation.ctr(b,S),N=oe(P.encrypt(i)),B=rt(kt([x,N])),D={address:t.address.substring(2).toLowerCase(),id:ZH(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:le(u).substring(2)},ciphertext:le(N).substring(2),kdf:"scrypt",kdfparams:{salt:le(f).substring(2),n:v,dklen:32,p:y,r:g},mac:B.substring(2)}};if(s){const V=Ya(16),Y=new Ii.Counter(V),G=new Ii.ModeOfOperation.ctr(C,Y),Z=oe(G.encrypt(s)),I=new Date,h=I.getUTCFullYear()+"-"+hc(I.getUTCMonth()+1,2)+"-"+hc(I.getUTCDate(),2)+"T"+hc(I.getUTCHours(),2)+"-"+hc(I.getUTCMinutes(),2)+"-"+hc(I.getUTCSeconds(),2)+".0Z";D["x-ethers"]={client:c,gethFilename:"UTC--"+h+"--"+D.address,mnemonicCounter:le(V).substring(2),mnemonicCiphertext:le(Z).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(D)})}function G7(t,e,r){if(kh(t)){r&&r(0);const n=Hg(t,e);return r&&r(1),Promise.resolve(n)}return Th(t)?H7(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function W7(t,e){if(kh(t))return Hg(t,e);if(Th(t))return V7(t,e);throw new Error("invalid JSON wallet")}const lq=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:Hg,decryptJsonWallet:G7,decryptJsonWalletSync:W7,decryptKeystore:H7,decryptKeystoreSync:V7,encryptKeystore:q7,getJsonWalletAddress:rq,isCrowdsaleWallet:kh,isKeystoreWallet:Th},Symbol.toStringTag,{value:"Module"})),cq="wallet/5.7.0";var a6=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Aa=new H(cq);function fq(t){return t!=null&&qe(t.privateKey,32)&&t.address!=null}function uq(t){const e=t.mnemonic;return e&&e.phrase}class Pi extends zl{constructor(e,r){if(super(),fq(e)){const n=new Gs(e.privateKey);if(ee(this,"_signingKey",()=>n),ee(this,"address",is(this.publicKey)),this.address!==ct(e.address)&&Aa.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),uq(e)){const i=e.mnemonic;ee(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Il,locale:i.locale||"en"}));const o=this.mnemonic,s=vn.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);is(s.privateKey)!==this.address&&Aa.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else ee(this,"_mnemonic",()=>null)}else{if(Gs.isSigningKey(e))e.curve!=="secp256k1"&&Aa.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),ee(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Gs(e);ee(this,"_signingKey",()=>n)}ee(this,"_mnemonic",()=>null),ee(this,"address",is(this.publicKey))}r&&!lu.isProvider(r)&&Aa.throwArgumentError("invalid provider","provider",r),ee(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Pi(this,e)}signTransaction(e){return Gt(e).then(r=>{r.from!=null&&(ct(r.from)!==this.address&&Aa.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(rt(xp(r)));return xp(r,n)})}signMessage(e){return a6(this,void 0,void 0,function*(){return cp(this._signingKey().signDigest(Og(e)))})}_signTypedData(e,r,n){return a6(this,void 0,void 0,function*(){const i=yield Cr.resolveNames(e,r,n,o=>(this.provider==null&&Aa.throwError("cannot resolve ENS names without a provider",H.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:o}),this.provider.resolveName(o)));return cp(this._signingKey().signDigest(Cr.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),q7(this,e,r,n)}static createRandom(e){let r=Ya(16);e||(e={}),e.extraEntropy&&(r=oe(Zt(rt(kt([r,e.extraEntropy])),0,16)));const n=Sh(r,e.locale);return Pi.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return G7(e,r,n).then(i=>new Pi(i))}static fromEncryptedJsonSync(e,r){return new Pi(W7(e,r))}static fromMnemonic(e,r,n){return r||(r=Il),new Pi(vn.fromMnemonic(e,null,n).derivePath(r))}}function dq(t,e){return fu(Og(t),e)}function hq(t,e,r,n){return fu(Cr.hash(t,e,r),n)}const vq=Object.freeze(Object.defineProperty({__proto__:null,Wallet:Pi,verifyMessage:dq,verifyTypedData:hq},Symbol.toStringTag,{value:"Module"})),yq="networks/5.7.1",l6=new H(yq);function pq(t){return t&&typeof t.renetwork=="function"}function no(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const o=["goerli","ropsten","rinkeby","sepolia"];try{const s=new r.PocketProvider(t,n.pocket);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const o=["ropsten"],s=new r.AnkrProvider(t,n.ankr);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let o=1;return n.quorum!=null?o=n.quorum:t==="homestead"&&(o=2),new r.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(r){return no(r)},e}function C0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return C0(t,n)},r}const c6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:no("homestead")},f6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:no("ropsten")},u6={chainId:63,name:"classicMordor",_defaultProvider:C0("https://www.ethercluster.com/mordor","classicMordor")},Qu={unspecified:{chainId:0,name:"unspecified"},homestead:c6,mainnet:c6,morden:{chainId:2,name:"morden"},ropsten:f6,testnet:f6,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:no("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:no("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:no("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:no("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:C0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u6,classicTestnet:u6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:C0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:no("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:no("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function mq(t){if(t==null)return null;if(typeof t=="number"){for(const n in Qu){const i=Qu[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Qu[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Qu[t.name];if(!e)return typeof t.chainId!="number"&&l6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&l6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(pq(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const gq="web/5.7.1";var xq=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function bq(t,e){return xq(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const s=e.fetchOptions;s.mode&&(r.mode=s.mode),s.cache&&(r.cache=s.cache),s.credentials&&(r.credentials=s.credentials),s.redirect&&(r.redirect=s.redirect),s.referrer&&(r.referrer=s.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach((s,a)=>{o[a.toLowerCase()]=s}):n.headers.keys().forEach(s=>{o[s.toLowerCase()]=n.headers.get(s)}),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:oe(new Uint8Array(i))}})}var wq=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Yn=new H(gq);function d6(t){return new Promise(e=>{setTimeout(e,t)})}function _o(t,e){if(t==null)return null;if(typeof t=="string")return t;if(su(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return As(t)}catch{}return le(t)}return t}function Eq(t){return Dt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function K7(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Yn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,o=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Yn.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Yn.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const b in t.headers)a[b.toLowerCase()]={key:b,value:String(t.headers[b])},["if-none-match","if-modified-since"].indexOf(b.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Yn.throwError("basic authentication requires a secure https url",H.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const b=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+Ig(Dt(b))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=sr(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=l?l.match(d):null;if(v)try{const b={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?_g(v[3]):Eq(v[3])};let x=b.body;return r&&(x=r(b.body,b)),Promise.resolve(x)}catch(b){Yn.throwError("processing response error",H.errors.SERVER_ERROR,{body:_o(v[1],v[2]),error:b,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(a).forEach(b=>{const x=a[b];g[x.key]=x.value}),c.headers=g;const y=function(){let b=null;return{promise:new Promise(function(S,P){u&&(b=setTimeout(()=>{b!=null&&(b=null,P(Yn.makeError("timeout",H.errors.TIMEOUT,{requestBody:_o(c.body,g["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){b!=null&&(clearTimeout(b),b=null)}}}(),w=function(){return wq(this,void 0,void 0,function*(){for(let b=0;b=300)&&(y.cancel(),Yn.throwError("bad response",H.errors.SERVER_ERROR,{status:x.statusCode,headers:x.headers,body:_o(C,x.headers?x.headers["content-type"]:null),requestBody:_o(c.body,g["content-type"]),requestMethod:c.method,url:l})),r)try{const S=yield r(C,x);return y.cancel(),S}catch(S){if(S.throttleRetry&&b{let a=null;if(o!=null)try{a=JSON.parse(As(o))}catch(l){Yn.throwError("invalid JSON",H.errors.SERVER_ERROR,{body:o,error:l})}return r&&(a=r(a,s)),a},i=null;if(e!=null){i=Dt(e);const o=typeof t=="string"?{url:t}:sr(t);o.headers?Object.keys(o.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(o.headers=sr(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},t=o}return K7(t,i,n)}function Ja(t,e){return e||(e={}),e=sr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,o=!1;const s=()=>o?!1:(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)s()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!o){if(l++,l>a){s()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){s()&&n(f)})}c()})}const Aq=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:K7,fetchJson:Ph,poll:Ja},Symbol.toStringTag,{value:"Module"}));var S0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ap={};for(var Yu=0;Yu>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Q7(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=fl(e)^n>>5}for(e=fl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=Q7(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",o=0;o>5)throw new Error("Non 5-bit word");n=fl(n)^s,i+=S0.charAt(s)}for(o=0;o<6;++o)n=fl(n);for(n^=1,o=0;o<6;++o){var a=n>>(5-o)*5&31;i+=S0.charAt(a)}return i}function Y7(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var o=t.slice(0,i),s=t.slice(i+1);if(s.length<6)return"Data too short";var a=Q7(o);if(typeof a=="string")return a;for(var l=[],c=0;c=s.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:o,words:l}}function Sq(){var t=Y7.apply(null,arguments);if(typeof t=="object")return t}function kq(t){var e=Y7.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Rh(t,e,r,n){for(var i=0,o=0,s=(1<=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:s,type:c,accessList:xe.allowNull(this.accessList.bind(this),null),blockHash:xe.allowNull(s,null),blockNumber:xe.allowNull(l,null),transactionIndex:xe.allowNull(l,null),confirmations:xe.allowNull(l,null),from:r,gasPrice:xe.allowNull(n),maxPriorityFeePerGas:xe.allowNull(n),maxFeePerGas:xe.allowNull(n),gasLimit:n,to:xe.allowNull(r,null),value:n,nonce:l,data:o,r:xe.allowNull(this.uint256),s:xe.allowNull(this.uint256),v:xe.allowNull(l),creates:xe.allowNull(r,null),raw:xe.allowNull(o)},e.transactionRequest={from:xe.allowNull(r),nonce:xe.allowNull(l),gasLimit:xe.allowNull(n),gasPrice:xe.allowNull(n),maxPriorityFeePerGas:xe.allowNull(n),maxFeePerGas:xe.allowNull(n),to:xe.allowNull(r),value:xe.allowNull(n),data:xe.allowNull(f),type:xe.allowNull(l),accessList:xe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:r,topics:xe.arrayOf(s),data:o,logIndex:l,blockHash:s},e.receipt={to:xe.allowNull(this.address,null),from:xe.allowNull(this.address,null),contractAddress:xe.allowNull(r,null),transactionIndex:l,root:xe.allowNull(a),gasUsed:n,logsBloom:xe.allowNull(o),blockHash:s,transactionHash:s,logs:xe.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:xe.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:xe.allowNull(n),status:xe.allowNull(l),type:c},e.block={hash:xe.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:xe.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:xe.allowNull(r),extraData:o,transactions:xe.allowNull(xe.arrayOf(s)),baseFeePerGas:xe.allowNull(n)},e.blockWithTransactions=sr(e.block),e.blockWithTransactions.transactions=xe.allowNull(xe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:xe.allowNull(i,void 0),toBlock:xe.allowNull(i,void 0),blockHash:xe.allowNull(s,void 0),address:xe.allowNull(r,void 0),topics:xe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:xe.allowNull(l),blockHash:xe.allowNull(s),transactionIndex:l,removed:xe.allowNull(this.boolean.bind(this)),address:r,data:xe.allowFalsish(o,"0x"),topics:xe.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return ma(e||[])}number(e){return e==="0x"?0:ae.from(e).toNumber()}type(e){return e==="0x"||e==null?0:ae.from(e).toNumber()}bigNumber(e){return ae.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),qe(e))?e.toLowerCase():vc.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ct(e)}callAddress(e){if(!qe(e,32))return null;const r=ct(Zt(e,12));return r===DS?null:r}contractAddress(e){return Tg(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||qe(e))return ph(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Ui(n)!==32?vc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=ae.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!qe(e))throw new Error("invalid uint256");return wt(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=xe.check(r,e);return i._difficulty=n==null?null:ae.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return xe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&ae.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=xe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;qe(n)&&(n=ae.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),qe(n)&&(n=ae.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return M7(e)}receiptLog(e){return xe.check(this.formats.receiptLog,e)}receipt(e){const r=xe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=ae.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&vc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):vc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&vc.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return xe.check(this.formats.filter,e)}filterLog(e){return xe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const o=e[i](r[i]);o!==void 0&&(n[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=r[i],o}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var Te=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ie=new H(Gg),Iq=10;function v6(t){return t==null?"null":(Ui(t)!==32&&Ie.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function y6(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[v6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return v6(e)}).join("&")}function Oq(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function Ca(t){if(typeof t=="string"){if(t=t.toLowerCase(),Ui(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+y6(t);if(kz.isForkEvent(t))throw Ie.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+y6(t.topics||[])}throw new Error("invalid event - "+t)}function yc(){return new Date().getTime()}function p6(t){return new Promise(e=>{setTimeout(e,t)})}const Nq=["block","network","pending","poll"];let Dq=class{constructor(e,r,n){ee(this,"tag",e),ee(this,"listener",r),ee(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=Oq(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||Nq.indexOf(this.tag)>=0}};const Bq={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function cv(t){return wt(ae.from(t).toHexString(),32)}function m6(t){return Ml.encode(kt([t,Zt(bo(bo(t)),0,4)]))}const J7=new RegExp("^(ipfs)://(.*)$","i"),g6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),J7,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Sd(t,e){try{return As(Uf(t,e))}catch{}return null}function Uf(t,e){if(t==="0x")return null;const r=ae.from(Zt(t,e,e+32)).toNumber(),n=ae.from(Zt(t,r,r+32)).toNumber();return Zt(t,r+32,r+32+n)}function fv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ie.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function x6(t){const e=oe(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function Lq(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function X7(t){const e=[];let r=0;for(let n=0;nae.from(e).eq(1)).catch(e=>{if(e.code===H.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Te(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Vr([e,rf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Vr(["0x9061b923",X7([YS(this.name),n.data])]));try{let o=yield this.provider.call(n);return oe(o).length%32===4&&Ie.throwError("resolver threw error",H.errors.CALL_EXCEPTION,{transaction:n,data:o}),i&&(o=Uf(o,0)),o}catch(o){if(o.code===H.errors.CALL_EXCEPTION)return null;throw o}})}_fetchBytes(e,r){return Te(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Uf(n,0):null})}_getAddress(e,r){const n=Bq[String(e)];if(n==null&&Ie.throwError(`unsupported coin type: ${e}`,H.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=oe(r);if(n.p2pkh!=null){const o=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return m6(kt([[n.p2pkh],"0x"+o[2]]))}}if(n.p2sh!=null){const o=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return m6(kt([[n.p2sh],"0x"+o[2]]))}}if(n.prefix!=null){const o=i[1];let s=i[0];if(s===0?o!==20&&o!==32&&(s=-1):s=-1,s>=0&&i.length===2+o&&o>=1&&o<=75){const a=h6.toWords(i.slice(2));return a.unshift(s),h6.encode(n.prefix,a)}}return null}getAddress(e){return Te(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===LS?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===H.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",cv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ie.throwError("invalid or unsupported coin data",H.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Te(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;ns[l])}return Ie.throwError("invalid or unsupported content hash data",H.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Te(this,void 0,void 0,function*(){let r=Dt(e);r=kt([cv(64),cv(r.length),r]),r.length%32!==0&&(r=kt([r,wt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",le(r));return n==null||n==="0x"?null:As(n)})}}let uv=null,Fq=1;class $q extends lu{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ee(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=oi(new.target,"getNetwork")(e);r?(ee(this,"_network",r),this.emit("network",r,null)):Ie.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Te(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ie.throwError("no network detected",H.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ee(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Ja(()=>this._ready().then(e=>e,e=>{if(!(e.code===H.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return uv==null&&(uv=new xe),uv}static getNetwork(e){return mq(e??"homestead")}ccipReadFetch(e,r,n){return Te(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),o=r.toLowerCase(),s=[];for(let a=0;a=0?null:JSON.stringify({data:o,sender:i}),u=yield Ph({url:c,errorPassThrough:!0},f,(v,g)=>(v.status=g.statusCode,v));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ie.throwError(`response not found during CCIP fetch: ${d}`,H.errors.SERVER_ERROR,{url:l,errorMessage:d});s.push(d)}return Ie.throwError(`error encountered during CCIP fetch: ${s.map(a=>JSON.stringify(a)).join(", ")}`,H.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return Te(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(yc()-o.respTime<=e)return o.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=yc(),n=Gt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),o;const s=yc();return i=ae.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Te(this,void 0,void 0,function*(){const e=Fq++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ie.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ie.makeError("network block skew detected",H.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const o=this._emitted[i];o!=="pending"&&n-o>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let s=this.getTransactionReceipt(o).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+o]=a.blockNumber,this.emit(o,a)),null)).catch(a=>{this.emit("error",a)});r.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const o=i.filter;o.fromBlock=i._lastBlockNumber+1,o.toBlock=n;const s=o.toBlock-this._maxFilterBlockRange;s>o.fromBlock&&(o.fromBlock=s),o.fromBlock<0&&(o.fromBlock=0);const a=this.getLogs(o).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(o,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Te(this,void 0,void 0,function*(){return Ie.throwError("provider does not support network detection",H.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Te(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield p6(0),this._network;const n=Ie.makeError("underlying network changed",H.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=yc();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Te(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return Te(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=r?o:new Promise((s,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),i){let d=i.startBlock,v=null;const g=y=>Te(this,void 0,void 0,function*(){c||(yield p6(1e3),this.getTransactionCount(i.from).then(w=>Te(this,void 0,void 0,function*(){if(!c){if(w<=i.nonce)d=y;else{{const b=yield this.getTransaction(e);if(b&&b.blockNumber!=null)return}for(v==null&&(v=d-3,v{c||this.once("block",g)}))});if(c)return;this.once("block",g),l.push(()=>{this.removeListener("block",g)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a(Ie.makeError("timeout exceeded",H.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Te(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return ae.from(e)}catch(r){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return ae.from(i)}catch(o){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:o})}})}getTransactionCount(e,r){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return ae.from(i).toNumber()}catch(o){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:o})}})}getCode(e,r){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return le(i)}catch(o){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:o})}})}getStorageAt(e,r,n){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(s=>ph(s))}),o=yield this.perform("getStorageAt",i);try{return le(o)}catch(s){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:s})}})}_wrapTransaction(e,r,n){if(r!=null&&Ui(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ie.throwError("Transaction hash mismatch from Provider.sendTransaction.",H.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(o,s)=>Te(this,void 0,void 0,function*(){o==null&&(o=1),s==null&&(s=0);let a;o!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,o,s,a);return l==null&&o===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ie.throwError("transaction failed",H.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(o=>le(o)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,o,i)}catch(o){throw o.transaction=n,o.transactionHash=n.hash,o}})}_getTransactionRequest(e){return Te(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?ae.from(o):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?le(o):null))}),this.formatter.transactionRequest(yield Gt(n))})}_getFilter(e){return Te(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Gt(r))})}_call(e,r,n){return Te(this,void 0,void 0,function*(){n>=Iq&&Ie.throwError("CCIP read exceeded maximum redirections",H.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,o=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&o.substring(0,10)==="0x556f1830"&&Ui(o)%32===4)try{const s=Zt(o,4),a=Zt(s,0,32);ae.from(a).eq(i)||Ie.throwError("CCIP Read sender did not match",H.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const l=[],c=ae.from(Zt(s,32,64)).toNumber(),f=ae.from(Zt(s,c,c+32)).toNumber(),u=Zt(s,c+32);for(let b=0;bTe(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(o==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let s=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Ja(()=>Te(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Ja(()=>Te(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Gt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),xe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Te(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Te(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ie.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Te(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new b6(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Te(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ie.throwError("network does not support ENS",H.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+rf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Te(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(qe(e))throw n}typeof e!="string"&&Ie.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Te(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Sd(yield this.call({to:n,data:"0x691f3431"+rf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Te(this,void 0,void 0,function*(){let r=null;if(qe(e)){const o=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(o,"getAvatar");if(!s)return null;r=new b6(this,s,o);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==H.errors.CALL_EXCEPTION)throw a}try{const a=Sd(yield this.call({to:s,data:"0x691f3431"+rf(o).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==H.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ie.throwError(e+" not implemented",H.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new Dq(Ca(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],o=Ca(e);return this._events=this._events.filter(s=>s.tag!==o?!0:(setTimeout(()=>{s.listener.apply(this,r)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let r=Ca(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Ca(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,o=Ca(e);return this._events=this._events.filter(s=>s.tag!==o||s.listener!=r||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=Ca(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var to=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ir=new H(Gg),jq=["call","estimateGas"];function of(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=qe(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=of(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return of(JSON.parse(t),e)}catch{}return null}function Z7(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const o=of(e,!0);if(o)return o.data;ir.throwError("missing revert data in call exception; Transaction reverted without a reason string",H.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let o=of(e.body,!1);o==null&&(o=of(e,!1)),o&&ir.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===H.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&ir.throwError("insufficient funds for intrinsic transaction cost",H.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&ir.throwError("nonce has already been used",H.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&ir.throwError("replacement fee too low",H.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&ir.throwError("legacy pre-eip-155 transactions not supported",H.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),jq.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&ir.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function w6(t){return new Promise(function(e){setTimeout(e,t)})}function Uq(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function pc(t){return t&&t.toLowerCase()}const Cp={};class e9 extends zl{constructor(e,r,n){if(super(),e!==Cp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ee(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ee(this,"_address",this.provider.formatter.address(n)),ee(this,"_index",null)):typeof n=="number"?(ee(this,"_index",n),ee(this,"_address",null)):ir.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return ir.throwError("cannot alter JSON-RPC Signer connection",H.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new zq(Cp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&ir.throwError("unknown account #"+this._index,H.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=sr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=sr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>to(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&ir.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Gt({tx:Gt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&ir.throwArgumentError("from address mismatch","transaction",e):n.from=i;const o=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&ir.throwError("user rejected transaction",H.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Z7("sendTransaction",s,o)))})}signTransaction(e){return ir.throwError("signing transactions is unsupported",H.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return to(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Ja(()=>to(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return to(this,void 0,void 0,function*(){const r=typeof e=="string"?Dt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[le(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&ir.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return to(this,void 0,void 0,function*(){const r=typeof e=="string"?Dt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),le(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&ir.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return to(this,void 0,void 0,function*(){const i=yield Cr.resolveNames(e,r,n,s=>this.provider.resolveName(s)),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(Cr.getPayload(i.domain,r,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&ir.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:i.domain,types:r,value:i.value}}),s}})}unlock(e){return to(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class zq extends e9{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const Vq={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let Hq=class extends $q{constructor(e,r){let n=r;n==null&&(n=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{o(s)})},0)})),super(n),e||(e=oi(this.constructor,"defaultUrl")()),typeof e=="string"?ee(this,"connection",Object.freeze({url:e})):ee(this,"connection",Object.freeze(sr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return to(this,void 0,void 0,function*(){yield w6(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=oi(this.constructor,"getNetwork");try{return r(ae.from(e).toNumber())}catch(n){return ir.throwError("could not detect network",H.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return ir.throwError("could not detect network",H.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new e9(Cp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:us(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=Ph(this.connection,JSON.stringify(n),Uq).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[pc(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[pc(r.address),r.blockTag]];case"getCode":return["eth_getCode",[pc(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[pc(r.address),wt(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[oi(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[oi(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=pc(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return to(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&ae.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=yield this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(r=sr(r),r.transaction=sr(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&ir.throwError(e+" not implemented",H.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return Z7(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(o){if(e._pendingFilter!=r)return null;let s=Promise.resolve();return o.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return w6(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(o=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=sr(Vq);if(r)for(const o in r)r[o]&&(n[o]=!0);Cg(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(e[o]==null)return;const s=ph(ae.from(e[o]));o==="gasLimit"&&(o="gas"),i[o]=s}),["from","to","data"].forEach(function(o){e[o]!=null&&(i[o]=le(e[o]))}),e.accessList&&(i.accessList=ma(e.accessList)),i}};const qq="solidity/5.7.0",Gq=new RegExp("^bytes([0-9]+)$"),Wq=new RegExp("^(u?int)([0-9]*)$"),Kq=new RegExp("^(.*)\\[([0-9]*)\\]$"),Qq="0000000000000000000000000000000000000000000000000000000000000000",Ma=new H(qq);function t9(t,e,r){switch(t){case"address":return r?Zc(e,32):oe(e);case"string":return Dt(e);case"bytes":return oe(e);case"bool":return e=e?"0x01":"0x00",r?Zc(e,32):oe(e)}let n=t.match(Wq);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ma.throwArgumentError("invalid number type","type",t),r&&(i=256),e=ae.from(e).toTwos(i),Zc(e,i/8)}if(n=t.match(Gq),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ma.throwArgumentError("invalid bytes type","type",t),oe(e).byteLength!==i&&Ma.throwArgumentError(`invalid value for ${t}`,"value",e),r?oe((e+Qq).substring(0,66)):e}if(n=t.match(Kq),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ma.throwArgumentError(`invalid array length for ${t}`,"value",e);const s=[];return e.forEach(function(a){s.push(t9(i,a,!0))}),kt(s)}return Ma.throwArgumentError("invalid type","type",t)}function Wg(t,e){t.length!=e.length&&Ma.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(t9(n,e[i]))}),le(kt(r))}function Yq(t,e){return rt(Wg(t,e))}function Jq(t,e){return bo(Wg(t,e))}const Xq=Object.freeze(Object.defineProperty({__proto__:null,keccak256:Yq,pack:Wg,sha256:Jq},Symbol.toStringTag,{value:"Module"})),Zq="units/5.7.0",r9=new H(Zq),n9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function eG(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&r9.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const o=[];for(;r.length;)if(r.length<=3){o.unshift(r);break}else{const s=r.length-3;o.unshift(r.substring(s)),r=r.substring(0,s)}return n+o.join(",")+i}function Kg(t,e){if(typeof e=="string"){const r=n9.indexOf(e);r!==-1&&(e=3*r)}return xd(t,e??18)}function Mh(t,e){if(typeof t!="string"&&r9.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=n9.indexOf(e);r!==-1&&(e=3*r)}return bi(t,e??18)}function i9(t){return Kg(t,18)}function o9(t){return Mh(t,18)}const tG=Object.freeze(Object.defineProperty({__proto__:null,commify:eG,formatEther:i9,formatUnits:Kg,parseEther:o9,parseUnits:Mh},Symbol.toStringTag,{value:"Module"}));function Sp(){return Sp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),o=i.filter((c,f)=>i.indexOf(c)!==f);if(o.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${o}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const s=n.map(c=>c.name).sort(),a=s.filter((c,f)=>s.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(nG(t,!0,e),t),oG=t=>iG(sG(t)),sG=t=>{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Qg=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",aG=t=>Qg("https://${network}-indexer.sequence.app",{network:t}),lG=t=>Qg("https://${network}-relayer.sequence.app",{network:t}),cG=t=>Qg("https://nodes.sequence.app/${network}",{network:t}),ar=t=>{const e=cG(t);return{rpcUrl:e,relayer:{url:lG(t),provider:{url:e}},indexerUrl:aG(t)}};oG([Ft({},Qt[de.POLYGON],ar("polygon"),{isDefaultChain:!0,isAuthChain:!0}),Ft({},Qt[de.MAINNET],ar("mainnet")),Ft({},Qt[de.BSC],ar("bsc")),Ft({},Qt[de.AVALANCHE],ar("avalanche")),Ft({},Qt[de.ARBITRUM],ar("arbitrum")),Ft({},Qt[de.ARBITRUM_NOVA],ar("arbitrum-nova")),Ft({},Qt[de.OPTIMISM],ar("optimism")),Ft({},Qt[de.POLYGON_ZKEVM],ar("polygon-zkevm")),Ft({},Qt[de.GNOSIS],ar("gnosis")),Ft({},Qt[de.RINKEBY],ar("rinkeby"),{disabled:!0}),Ft({},Qt[de.GOERLI],ar("goerli")),Ft({},Qt[de.SEPOLIA],ar("sepolia")),Ft({},Qt[de.POLYGON_MUMBAI],ar("mumbai")),Ft({},Qt[de.BSC_TESTNET],ar("bsc-testnet")),Ft({},Qt[de.ARBITRUM_GOERLI],ar("arbitrum-goerli")),Ft({},Qt[de.BASE],ar("base")),Ft({},Qt[de.BASE_GOERLI],ar("base-goerli")),Ft({},Qt[de.HOMEVERSE_TESTNET],ar("homeverse-testnet")),Ft({},Qt[de.AVALANCHE_TESTNET],ar("avalanche-testnet")),Ft({},Qt[de.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Ft({},Qt[de.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]);const E6=[..."ðŸķðŸąðŸ­ðŸđ🐰ðŸĶŠðŸŧ🐞ðŸĻðŸŊðŸĶðŸŪðŸ·ðŸ―ðŸļðŸĩ🙈🙉🙊🐒🐔🐧ðŸĶðŸĪðŸĢðŸĨðŸĶ†ðŸĶ…ðŸĶ‰ðŸĶ‡ðŸšðŸ—ðŸīðŸĶ„🐝🐛ðŸĶ‹ðŸŒðŸžðŸœðŸĶŸðŸĶ—🕷ðŸ•ļðŸĶ‚ðŸĒ🐍ðŸĶŽðŸĶ–ðŸĶ•ðŸ™ðŸĶ‘ðŸĶðŸĶžðŸĶ€ðŸĄðŸ ðŸŸðŸŽðŸģ🐋ðŸĶˆðŸŠðŸ…🐆ðŸĶ“ðŸĶðŸĶ§ðŸ˜ðŸĶ›ðŸĶðŸŠðŸŦðŸĶ’ðŸĶ˜ðŸƒðŸ‚🐄🐎🐖🐏🐑ðŸĶ™ðŸðŸĶŒðŸ•ðŸĐðŸĶŪ🐈🐓ðŸĶƒðŸĶšðŸĶœðŸĶĒðŸĶĐ🕊🐇ðŸĶðŸĶĻðŸĶĄðŸĶĶðŸĶĨ🐁🐀ðŸŋðŸĶ”ðŸū🐉ðŸēðŸŒĩ🎄ðŸŒēðŸŒģðŸŒīðŸŒąðŸŒŋ🍀🎍🎋🍃ðŸ‘Ģ🍂🍁🍄🐚ðŸŒū💐🌷ðŸŒđðŸĨ€ðŸŒšðŸŒļ🌞ðŸŒŧ🌞🌝🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈ðŸĨ­ðŸðŸĨĨðŸĨðŸ…ðŸĨ‘ðŸĨĶðŸĨŽðŸĨ’ðŸŒķðŸŒ―ðŸĨ•ðŸ§„🧅ðŸĨ”🍠ðŸĨðŸĨŊ🍞ðŸĨ–ðŸĨĻ🧀ðŸĨšðŸģ🧈ðŸĨžðŸ§‡ðŸĨ“ðŸĨĐ🍗🍖ðŸĶī🌭🍔🍟🍕ðŸĨŠðŸĨ™ðŸ§†ðŸŒŪðŸŒŊðŸĨ—ðŸĨ˜ðŸĨŦ🍝🍜ðŸē🍛ðŸĢðŸąðŸĨŸðŸĶŠðŸĪ🍙🍚🍘ðŸĨðŸĨ ðŸĨŪðŸĒðŸĄðŸ§ðŸĻðŸĶðŸĨ§ðŸ§ðŸ°ðŸŽ‚ðŸŪ🍭🍎ðŸŦðŸŋðŸĐ🍊🌰ðŸĨœðŸ‘€ðŸ‘‚👃👄👅👆👇👈👉👊👋👌👍👎👏👐👑👒👓ðŸŽŊðŸŽ°ðŸŽąðŸŽēðŸŽģðŸ‘ūðŸ‘Ŋ👚ðŸ‘ŧðŸ‘―ðŸ‚ðŸƒðŸ„"];function dv(){const e=bp.en,r=E6[Math.floor(Math.random()*E6.length)],n=e.getWord(Math.floor(Math.random()*2048)),i=e.getWord(Math.floor(Math.random()*2048));return`${r} ${n} ${i}`}function fG({onSuccess:t}){const[e,r]=m.useState(""),[n,i]=m.useState(),[o,s]=m.useState(!1),[a,l]=m.useState("");return{inProgress:o||!!a,loading:o,error:n,initiateAuth:async u=>{s(!0);try{const{instance:d}=await at.email.initiateAuth({email:u});l(d),r(u)}catch(d){i(d.message||"Unknown error")}finally{s(!1)}},sendChallengeAnswer:a?async u=>{s(!0);try{const d=await at.getSessionHash(),{idToken:v}=await at.email.finalizeAuth({instance:a,answer:u,email:e,sessionHash:d});t(v)}catch(d){i(d.message||"Unknown error")}finally{s(!1)}}:void 0}}function uG(){const[t,e]=m.useState(""),[r,n]=m.useState(void 0);return m.useEffect(()=>{const i=async()=>{try{e(await at.getSessionHash())}catch(o){console.error(o),n(o)}};return i(),at.onSessionStateChanged(i)},[e,n]),{sessionHash:t,error:r,loading:!!t}}function dG(){var x;const{sessionHash:t}=uG(),[e,r]=m.useState(""),n=m.useRef(null),i=(x=n.current)==null?void 0:x.validity.valid,[o,s]=m.useState(!1),[a,l]=m.useState([]),[c,f]=m.useState(!1),{inProgress:u,loading:d,initiateAuth:v,sendChallengeAnswer:g}=fG({onSuccess:async C=>{f(!0);const S=await at.signIn({idToken:C},dv());console.log(`Wallet address: ${S}`),Us.navigate("/")}});m.useEffect(()=>{(async()=>await at.isSignedIn()&&Us.navigate("/"))()},[]);const y=async C=>{const S=await at.signIn({idToken:C.credential},dv());console.log(`Wallet address: ${S}`),Us.navigate("/")},w="http://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),b=async C=>{const S=await at.signIn({idToken:C.authorization.id_token},dv());console.log(`Wallet address: ${S}`),Us.navigate("/")};return j.jsxs(ne,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[j.jsx(ne,{marginBottom:"16",children:j.jsx(hS,{})}),j.jsx(ne,{children:j.jsx(Oe,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"})}),g?j.jsxs(ne,{flexDirection:"column",children:[j.jsx(ne,{marginTop:"6",children:j.jsx(Oe,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),j.jsx(ne,{marginTop:"4",children:j.jsx(dS,{value:a,digits:6,onChange:l})}),j.jsx(ne,{gap:"2",marginY:"4",children:d||c?j.jsx(ji,{}):j.jsx(nn,{variant:"primary",disabled:a.includes(""),label:"Verify",onClick:()=>g(a.join("")),"data-id":"verifyButton"})})]}):j.jsxs(ne,{marginTop:"5",marginBottom:"4",children:[j.jsxs(Oe,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",j.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),j.jsxs(ne,{marginTop:"6",children:[j.jsx(Sr,{name:"email",type:"email",onChange:C=>{r(C.target.value)},ref:n,onKeyDown:C=>{e&&C.key==="Enter"&&v(e)},onBlur:()=>s(!!e&&!i),value:e,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),o&&j.jsx(Oe,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),j.jsx(ne,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:d?j.jsx(ji,{}):j.jsx(nn,{variant:"primary",disabled:!i,label:"Continue",onClick:()=>v(e),"data-id":"continueButton"})})]}),j.jsx("hr",{}),!u&&!!t&&j.jsxs(j.Fragment,{children:[j.jsx(ne,{children:j.jsx(Oe,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),j.jsx(rj,{onSuccess:y,shape:"circle",width:230,nonce:t}),j.jsx(Aj,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:w,usePopup:!0,nonce:t},onError:C=>console.error(C),onSuccess:b,uiType:"dark"})]})]})}function hG(t){var e="";return r(t),e;function r(i){if(i===null||typeof i!="object"||i.toJSON!=null)e+=JSON.stringify(i);else if(Array.isArray(i)){e+="[";var o=!1;i.forEach(function(a){o&&(e+=","),o=!0,a===void 0&&(a=null),r(a)}),e+="]"}else{e+="{";var s=Object.keys(i).filter(function(a){return i[a]!==void 0}).sort();s.forEach(function(a,l){return n(i,a,l)}),e+="}"}}function n(i,o,s){s>0&&(e+=","),e+=JSON.stringify(o),e+=":",r(i[o])}}const vG=(t,e)=>e.some(r=>t instanceof r);let A6,C6;function yG(){return A6||(A6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function pG(){return C6||(C6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const s9=new WeakMap,kp=new WeakMap,a9=new WeakMap,hv=new WeakMap,Yg=new WeakMap;function mG(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",o),t.removeEventListener("error",s)},o=()=>{r(os(t.result)),i()},s=()=>{n(t.error),i()};t.addEventListener("success",o),t.addEventListener("error",s)});return e.then(r=>{r instanceof IDBCursor&&s9.set(r,t)}).catch(()=>{}),Yg.set(e,t),e}function gG(t){if(kp.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",o),t.removeEventListener("error",s),t.removeEventListener("abort",s)},o=()=>{r(),i()},s=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",o),t.addEventListener("error",s),t.addEventListener("abort",s)});kp.set(t,e)}let Tp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return kp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||a9.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return os(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function xG(t){Tp=t(Tp)}function bG(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(vv(this),e,...r);return a9.set(n,e.sort?e.sort():[e]),os(n)}:pG().includes(t)?function(...e){return t.apply(vv(this),e),os(s9.get(this))}:function(...e){return os(t.apply(vv(this),e))}}function wG(t){return typeof t=="function"?bG(t):(t instanceof IDBTransaction&&gG(t),vG(t,yG())?new Proxy(t,Tp):t)}function os(t){if(t instanceof IDBRequest)return mG(t);if(hv.has(t))return hv.get(t);const e=wG(t);return e!==t&&(hv.set(t,e),Yg.set(e,t)),e}const vv=t=>Yg.get(t);function _h(t,e,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(t,e),a=os(s);return n&&s.addEventListener("upgradeneeded",l=>{n(os(s.result),l.oldVersion,l.newVersion,os(s.transaction),l)}),r&&s.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const EG=["get","getKey","getAll","getAllKeys","count"],AG=["put","add","delete","clear"],yv=new Map;function S6(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(yv.get(e))return yv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=AG.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||EG.includes(r)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return yv.set(e,o),o}xG(t=>({...t,get:(e,r,n)=>S6(e,r)||t.get(e,r,n),has:(e,r)=>!!S6(e,r)||t.has(e,r)}));let ue=function(t){return t[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t.GOERLI=5]="GOERLI",t[t.KOVAN=42]="KOVAN",t[t.SEPOLIA=11155111]="SEPOLIA",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_KOVAN=69]="OPTIMISM_KOVAN",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.BASE=8453]="BASE",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.BASE_SEPOLIA=84532]="BASE_SEPOLIA",t[t.HOMEVERSE_TESTNET=40875]="HOMEVERSE_TESTNET",t[t.HOMEVERSE=19011]="HOMEVERSE",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({}),xt=function(t){return t.MAINNET="mainnet",t.TESTNET="testnet",t}({});const Lt={[ue.MAINNET]:{chainId:ue.MAINNET,type:xt.MAINNET,name:"mainnet",title:"Ethereum",blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[ue.ROPSTEN]:{chainId:ue.ROPSTEN,type:xt.TESTNET,name:"ropsten",title:"Ropsten",testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ue.RINKEBY]:{chainId:ue.RINKEBY,type:xt.TESTNET,name:"rinkeby",title:"Rinkeby",testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ue.GOERLI]:{chainId:ue.GOERLI,type:xt.TESTNET,name:"goerli",title:"Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ue.KOVAN]:{chainId:ue.KOVAN,type:xt.TESTNET,name:"kovan",title:"Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},deprecated:!0},[ue.SEPOLIA]:{chainId:ue.SEPOLIA,type:xt.TESTNET,name:"sepolia",title:"Sepolia",testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"}},[ue.POLYGON]:{chainId:ue.POLYGON,type:xt.MAINNET,name:"polygon",title:"Polygon",blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"}},[ue.POLYGON_MUMBAI]:{chainId:ue.POLYGON_MUMBAI,type:xt.TESTNET,name:"mumbai",title:"Polygon Mumbai",testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"}},[ue.POLYGON_ZKEVM]:{chainId:ue.POLYGON_ZKEVM,type:xt.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"}},[ue.BSC]:{chainId:ue.BSC,type:xt.MAINNET,name:"bsc",title:"BNB Smart Chain",blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"}},[ue.BSC_TESTNET]:{chainId:ue.BSC_TESTNET,type:xt.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"}},[ue.OPTIMISM]:{chainId:ue.OPTIMISM,type:xt.MAINNET,name:"optimism",title:"Optimism",blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"}},[ue.OPTIMISM_KOVAN]:{chainId:ue.OPTIMISM_KOVAN,type:xt.TESTNET,name:"optimism-kovan",title:"Optimistic Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Kovan)",rootUrl:"https://kovan-optimistic.etherscan.io/"},deprecated:!0},[ue.OPTIMISM_GOERLI]:{chainId:ue.OPTIMISM_GOERLI,type:xt.TESTNET,name:"optimism-goerli",title:"Optimistic Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Goerli)",rootUrl:"https://goerli-optimistic.etherscan.io/"},deprecated:!0},[ue.OPTIMISM_SEPOLIA]:{chainId:ue.OPTIMISM_SEPOLIA,type:xt.TESTNET,name:"optimism-sepolia",title:"Optimistic Sepolia",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"}},[ue.ARBITRUM]:{chainId:ue.ARBITRUM,type:xt.MAINNET,name:"arbitrum",title:"Arbitrum One",blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"}},[ue.ARBITRUM_GOERLI]:{chainId:ue.ARBITRUM_GOERLI,type:xt.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",testnet:!0,blockExplorer:{name:"Arbiscan (Goerli Testnet)",rootUrl:"https://testnet.arbiscan.io/"},deprecated:!0},[ue.ARBITRUM_SEPOLIA]:{chainId:ue.ARBITRUM_SEPOLIA,type:xt.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"}},[ue.ARBITRUM_NOVA]:{chainId:ue.ARBITRUM_NOVA,type:xt.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"}},[ue.AVALANCHE]:{chainId:ue.AVALANCHE,type:xt.MAINNET,name:"avalanche",title:"Avalanche",blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"}},[ue.AVALANCHE_TESTNET]:{chainId:ue.AVALANCHE_TESTNET,type:xt.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://subnets-test.avax.network/c-chain/"}},[ue.GNOSIS]:{chainId:ue.GNOSIS,type:xt.MAINNET,name:"gnosis",title:"Gnosis Chain",blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"}},[ue.BASE]:{chainId:ue.BASE,type:xt.MAINNET,name:"base",title:"Base (Coinbase)",blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"}},[ue.BASE_GOERLI]:{chainId:ue.BASE_GOERLI,type:xt.TESTNET,name:"base-goerli",title:"Base Goerli",testnet:!0,blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"},deprecated:!0},[ue.BASE_SEPOLIA]:{chainId:ue.BASE_SEPOLIA,type:xt.TESTNET,name:"base-sepolia",title:"Base Sepolia",testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"}},[ue.HOMEVERSE]:{chainId:ue.HOMEVERSE,type:xt.MAINNET,name:"homeverse",title:"Oasys Homeverse",blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"}},[ue.HOMEVERSE_TESTNET]:{chainId:ue.HOMEVERSE_TESTNET,type:xt.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",testnet:!0,blockExplorer:{name:"Oasys Homeverse Explorer (Testnet)",rootUrl:"https://explorer.testnet.oasys.homeverse.games/"}},[ue.HARDHAT]:{chainId:ue.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)"},[ue.HARDHAT_2]:{chainId:ue.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)"}};function Pp(){return Pp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),o=i.filter((c,f)=>i.indexOf(c)!==f);if(o.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${o}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const s=n.map(c=>c.name).sort(),a=s.filter((c,f)=>s.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(SG(t,!0,e),t),TG=t=>kG(PG(t)),PG=t=>{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Jg=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",RG=t=>Jg("https://${network}-indexer.sequence.app",{network:t}),MG=t=>Jg("https://${network}-relayer.sequence.app",{network:t}),_G=t=>Jg("https://nodes.sequence.app/${network}",{network:t}),tr=t=>{const e=_G(t);return{rpcUrl:e,relayer:{url:MG(t),provider:{url:e}},indexerUrl:RG(t)}};TG([It({},Lt[ue.POLYGON],tr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),It({},Lt[ue.MAINNET],tr("mainnet")),It({},Lt[ue.BSC],tr("bsc")),It({},Lt[ue.AVALANCHE],tr("avalanche")),It({},Lt[ue.ARBITRUM],tr("arbitrum")),It({},Lt[ue.ARBITRUM_NOVA],tr("arbitrum-nova")),It({},Lt[ue.OPTIMISM],tr("optimism")),It({},Lt[ue.OPTIMISM_SEPOLIA],tr("optimism-sepolia")),It({},Lt[ue.POLYGON_ZKEVM],tr("polygon-zkevm")),It({},Lt[ue.GNOSIS],tr("gnosis")),It({},Lt[ue.RINKEBY],tr("rinkeby"),{disabled:!0}),It({},Lt[ue.GOERLI],tr("goerli"),{disabled:!0}),It({},Lt[ue.SEPOLIA],tr("sepolia")),It({},Lt[ue.POLYGON_MUMBAI],tr("mumbai")),It({},Lt[ue.BSC_TESTNET],tr("bsc-testnet")),It({},Lt[ue.ARBITRUM_SEPOLIA],tr("arbitrum-sepolia")),It({},Lt[ue.BASE],tr("base")),It({},Lt[ue.BASE_SEPOLIA],tr("base-sepolia")),It({},Lt[ue.HOMEVERSE_TESTNET],tr("homeverse-testnet")),It({},Lt[ue.AVALANCHE_TESTNET],tr("avalanche-testnet")),It({},Lt[ue.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),It({},Lt[ue.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]);class Bc extends Error{}Bc.prototype.name="InvalidTokenError";function IG(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function OG(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return IG(e)}catch{return atob(e)}}function NG(t,e){if(typeof t!="string")throw new Bc("Invalid token specified: must be a string");e||(e={});const r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new Bc(`Invalid token specified: missing part #${r+1}`);let i;try{i=OG(n)}catch(o){throw new Bc(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new Bc(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}const DG=t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},BG=t=>({httpHandler:t.httpHandler()});var k6;(function(t){t.HEADER="header",t.QUERY="query"})(k6||(k6={}));var T6;(function(t){t.HEADER="header",t.QUERY="query"})(T6||(T6={}));var zf;(function(t){t.HTTP="http",t.HTTPS="https"})(zf||(zf={}));var k0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(k0||(k0={}));var P6;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(P6||(P6={}));const Vf="__smithy_context";var R6;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(R6||(R6={}));var M6;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(M6||(M6={}));class wo{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static isInstance(e){if(!e)return!1;const r=e;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){const e=new wo({...this,headers:{...this.headers}});return e.query&&(e.query=LG(e.query)),e}}function LG(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class Rp{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const FG=t=>e=>async r=>{if(!wo.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:i=""}=t.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return e(r)},$G={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jG=t=>({applyToStack:e=>{e.add(FG(t),$G)}}),UG=()=>(t,e)=>async r=>{var n,i;try{const o=await t(r),{clientName:s,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f,overrideOutputFilterSensitiveLog:u}=c,d=f??e.inputFilterSensitiveLog,v=u??e.outputFilterSensitiveLog,{$metadata:g,...y}=o.output;return(n=l==null?void 0:l.info)==null||n.call(l,{clientName:s,commandName:a,input:d(r.input),output:v(y),metadata:g}),o}catch(o){const{clientName:s,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f}=c,u=f??e.inputFilterSensitiveLog;throw(i=l==null?void 0:l.error)==null||i.call(l,{clientName:s,commandName:a,input:u(r.input),error:o,metadata:o.$metadata}),o}},zG={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},VG=t=>({applyToStack:e=>{e.add(UG(),zG)}}),_6="X-Amzn-Trace-Id",HG="AWS_LAMBDA_FUNCTION_NAME",qG="_X_AMZN_TRACE_ID",GG=t=>e=>async r=>{const{request:n}=r;if(!wo.isInstance(n)||t.runtime!=="node"||n.headers.hasOwnProperty(_6))return e(r);const i=process.env[HG],o=process.env[qG],s=a=>typeof a=="string"&&a.length>0;return s(i)&&s(o)&&(n.headers[_6]=o),e({...r,request:n})},WG={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},KG=t=>({applyToStack:e=>{e.add(GG(t),WG)}}),l9=(t,e,r)=>{let n,i,o,s=!1;const a=async()=>{i||(i=t());try{n=await i,o=!0,s=!1}finally{i=void 0}return n};return e===void 0?async l=>((!o||l!=null&&l.forceRefresh)&&(n=await a()),n):async l=>((!o||l!=null&&l.forceRefresh)&&(n=await a()),s?n:r&&!r(n)?(s=!0,n):(e(n)&&await a(),n))};var pv={};/*! ***************************************************************************** +`)}static register(e,r){r||(r=e.locale)}}const $H="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let nf=null;function n6(t){if(nf==null&&(nf=$H.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),uu.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw nf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class jH extends uu{constructor(){super("en")}getWord(e){return n6(this),nf[e]}getWordIndex(e){return n6(this),nf.indexOf(e)}}const N7=new jH;uu.register(N7);const bp={en:N7},UH="hdnode/5.7.0",jf=new H(UH),zH=ae.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),VH=Dt("Bitcoin seed"),Ra=2147483648;function D7(t){return(1<=256)throw new Error("Depth too large!");return i6(kt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",le(this.depth),this.parentFingerprint,wt(le(this.index),4),this.chainCode,this.privateKey!=null?kt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new vn(Ea,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~Ra));const n=new Uint8Array(37);if(e&Ra){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(oe(this.privateKey),1),r&&(r+="'")}else n.set(oe(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=oe($f(_l.sha512,this.chainCode,n)),o=i.slice(0,32),s=i.slice(32);let a=null,l=null;this.privateKey?a=Ku(ae.from(o).add(this.privateKey).mod(zH)):l=new Gs(le(o))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new vn(Ea,a,l,this.fingerprint,Ku(s),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Ra)throw new Error("invalid path index - "+o);n=n._derive(Ra+s)}else if(o.match(/^[0-9]+$/)){const s=parseInt(o);if(s>=Ra)throw new Error("invalid path index - "+o);n=n._derive(s)}else throw new Error("invalid path component - "+o)}return n}static _fromSeed(e,r){const n=oe(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=oe($f(_l.sha512,VH,n));return new vn(Ea,Ku(i.slice(0,32)),null,"0x00000000",Ku(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=zg(n),e=Sh(Ch(e,n),n),vn._fromSeed(B7(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return vn._fromSeed(e,null)}static fromExtendedKey(e){const r=Ml.decode(e);(r.length!==82||i6(r.slice(0,78))!==e)&&jf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=le(r.slice(5,9)),o=parseInt(le(r.slice(9,13)).substring(2),16),s=le(r.slice(13,45)),a=r.slice(45,78);switch(le(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new vn(Ea,null,le(a),i,s,o,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new vn(Ea,le(a.slice(1)),null,i,s,o,n,null)}return jf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function B7(t,e){e||(e="");const r=Dt("mnemonic"+e,zi.NFKD);return Ug(Dt(t,zi.NFKD),r,2048,64,"sha512")}function Ch(t,e){e=zg(e),jf.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=oe(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const o=32*r.length/3,s=r.length/3,a=D7(s);if((oe(bo(n.slice(0,o/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return le(n.slice(0,o/8))}function Sh(t,e){if(e=zg(e),t=oe(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let s=0;s8?(r[r.length-1]<<=8,r[r.length-1]|=t[s],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[s]>>8-n,r.push(t[s]&HH(8-n)),n+=3);const i=t.length/4,o=oe(bo(t))[0]&D7(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,e.join(r.map(s=>e.getWord(s)))}function qH(t,e){try{return Ch(t,e),!0}catch{}return!1}function GH(t){return(typeof t!="number"||t<0||t>=Ra||t%1)&&jf.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const WH=Object.freeze(Object.defineProperty({__proto__:null,HDNode:vn,defaultPath:Il,entropyToMnemonic:Sh,getAccountPath:GH,isValidMnemonic:qH,mnemonicToEntropy:Ch,mnemonicToSeed:B7},Symbol.toStringTag,{value:"Module"})),KH="random/5.7.0",wp=new H(KH);function QH(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const o6=QH();let Cd=o6.crypto||o6.msCrypto;(!Cd||!Cd.getRandomValues)&&(wp.warn("WARNING: Missing strong random number source"),Cd={getRandomValues:function(t){return wp.throwError("no secure random source avaialble",H.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Ya(t){(t<=0||t>1024||t%1||t!=t)&&wp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Cd.getRandomValues(e),oe(e)}function YH(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}const JH=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:Ya,shuffled:YH},Symbol.toStringTag,{value:"Module"}));var L7={exports:{}};(function(t,e){(function(r){function n(k){return parseInt(k)===k}function i(k){if(!n(k.length))return!1;for(var p=0;p255)return!1;return!0}function o(k,p){if(k.buffer&&ArrayBuffer.isView(k)&&k.name==="Uint8Array")return p&&(k.slice?k=k.slice():k=Array.prototype.slice.call(k)),k;if(Array.isArray(k)){if(!i(k))throw new Error("Array contains invalid value: "+k);return new Uint8Array(k)}if(n(k.length)&&i(k))return new Uint8Array(k);throw new Error("unsupported array-like object")}function s(k){return new Uint8Array(k)}function a(k,p,R,F,E){(F!=null||E!=null)&&(k.slice?k=k.slice(F,E):k=Array.prototype.slice.call(k,F,E)),p.set(k,R)}var l=function(){function k(R){var F=[],E=0;for(R=encodeURI(R);E191&&$<224?(F.push(String.fromCharCode(($&31)<<6|R[E+1]&63)),E+=2):(F.push(String.fromCharCode(($&15)<<12|(R[E+1]&63)<<6|R[E+2]&63)),E+=3)}return F.join("")}return{toBytes:k,fromBytes:p}}(),c=function(){function k(F){for(var E=[],$=0;$>4]+p[U&15])}return E.join("")}return{toBytes:k,fromBytes:R}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],v=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],g=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],w=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],b=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],x=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],C=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],S=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],P=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],N=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],B=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],D=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],V=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Y(k){for(var p=[],R=0;R>2,this._Ke[$][p%4]=E[p],this._Kd[k-$][p%4]=E[p];for(var U=0,z=F,K;z>16&255]<<24^d[K>>8&255]<<16^d[K&255]<<8^d[K>>24&255]^u[U]<<24,U+=1,F!=8)for(var p=1;p>8&255]<<8^d[K>>16&255]<<16^d[K>>24&255]<<24;for(var p=F/2+1;p>2,X=z%4,this._Ke[ie][X]=E[p],this._Kd[k-ie][X]=E[p++],z++}for(var ie=1;ie>24&255]^B[K>>16&255]^D[K>>8&255]^V[K&255]},G.prototype.encrypt=function(k){if(k.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var p=this._Ke.length-1,R=[0,0,0,0],F=Y(k),E=0;E<4;E++)F[E]^=this._Ke[0][E];for(var $=1;$>24&255]^y[F[(E+1)%4]>>16&255]^w[F[(E+2)%4]>>8&255]^b[F[(E+3)%4]&255]^this._Ke[$][E];F=R.slice()}for(var U=s(16),z,E=0;E<4;E++)z=this._Ke[p][E],U[4*E]=(d[F[E]>>24&255]^z>>24)&255,U[4*E+1]=(d[F[(E+1)%4]>>16&255]^z>>16)&255,U[4*E+2]=(d[F[(E+2)%4]>>8&255]^z>>8)&255,U[4*E+3]=(d[F[(E+3)%4]&255]^z)&255;return U},G.prototype.decrypt=function(k){if(k.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var p=this._Kd.length-1,R=[0,0,0,0],F=Y(k),E=0;E<4;E++)F[E]^=this._Kd[0][E];for(var $=1;$>24&255]^C[F[(E+3)%4]>>16&255]^S[F[(E+2)%4]>>8&255]^P[F[(E+1)%4]&255]^this._Kd[$][E];F=R.slice()}for(var U=s(16),z,E=0;E<4;E++)z=this._Kd[p][E],U[4*E]=(v[F[E]>>24&255]^z>>24)&255,U[4*E+1]=(v[F[(E+3)%4]>>16&255]^z>>16)&255,U[4*E+2]=(v[F[(E+2)%4]>>8&255]^z>>8)&255,U[4*E+3]=(v[F[(E+1)%4]&255]^z)&255;return U};var Z=function(k){if(!(this instanceof Z))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new G(k)};Z.prototype.encrypt=function(k){if(k=o(k),k.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var p=s(k.length),R=s(16),F=0;F=0;--p)this._counter[p]=k%256,k=k>>8},T.prototype.setBytes=function(k){if(k=o(k,!0),k.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=k},T.prototype.increment=function(){for(var k=15;k>=0;k--)if(this._counter[k]===255)this._counter[k]=0;else{this._counter[k]++;break}};var _=function(k,p){if(!(this instanceof _))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",p instanceof T||(p=new T(p)),this._counter=p,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new G(k)};_.prototype.encrypt=function(k){for(var p=o(k,!0),R=0;R16)throw new Error("PKCS#7 padding byte out of range");for(var R=k.length-p,F=0;F=64;){let L=b,k=x,p=C,R=S,F=P,E=N,$=B,U=D,z,K,ie,X,te;for(K=0;K<16;K++)ie=M+K*4,V[K]=(_[ie]&255)<<24|(_[ie+1]&255)<<16|(_[ie+2]&255)<<8|_[ie+3]&255;for(K=16;K<64;K++)z=V[K-2],X=(z>>>17|z<<32-17)^(z>>>19|z<<32-19)^z>>>10,z=V[K-15],te=(z>>>7|z<<32-7)^(z>>>18|z<<32-18)^z>>>3,V[K]=(X+V[K-7]|0)+(te+V[K-16]|0)|0;for(K=0;K<64;K++)X=(((F>>>6|F<<32-6)^(F>>>11|F<<32-11)^(F>>>25|F<<32-25))+(F&E^~F&$)|0)+(U+(w[K]+V[K]|0)|0)|0,te=((L>>>2|L<<32-2)^(L>>>13|L<<32-13)^(L>>>22|L<<32-22))+(L&k^L&p^k&p)|0,U=$,$=E,E=F,F=R+X|0,R=p,p=k,k=L,L=X+te|0;b=b+L|0,x=x+k|0,C=C+p|0,S=S+R|0,P=P+F|0,N=N+E|0,B=B+$|0,D=D+U|0,M+=64,O-=64}}Y(y);let G,Z=y.length%64,I=y.length/536870912|0,h=y.length<<3,A=Z<56?56:120,T=y.slice(y.length-Z,y.length);for(T.push(128),G=Z+1;G>>24&255),T.push(I>>>16&255),T.push(I>>>8&255),T.push(I>>>0&255),T.push(h>>>24&255),T.push(h>>>16&255),T.push(h>>>8&255),T.push(h>>>0&255),Y(T),[b>>>24&255,b>>>16&255,b>>>8&255,b>>>0&255,x>>>24&255,x>>>16&255,x>>>8&255,x>>>0&255,C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255]}function o(y,w,b){y=y.length<=64?y:i(y);const x=64+w.length+4,C=new Array(x),S=new Array(64);let P,N=[];for(P=0;P<64;P++)C[P]=54;for(P=0;P=x-4;D--){if(C[D]++,C[D]<=255)return;C[D]=0}}for(;b>=32;)B(),N=N.concat(i(S.concat(i(C)))),b-=32;return b>0&&(B(),N=N.concat(i(S.concat(i(C))).slice(0,b))),N}function s(y,w,b,x,C){let S;for(f(y,(2*b-1)*16,C,0,16),S=0;S<2*b;S++)c(y,S*16,C,16),l(C,x),f(C,0,y,w+S*16,16);for(S=0;S>>32-w}function l(y,w){f(y,0,w,0,16);for(let b=8;b>0;b-=2)w[4]^=a(w[0]+w[12],7),w[8]^=a(w[4]+w[0],9),w[12]^=a(w[8]+w[4],13),w[0]^=a(w[12]+w[8],18),w[9]^=a(w[5]+w[1],7),w[13]^=a(w[9]+w[5],9),w[1]^=a(w[13]+w[9],13),w[5]^=a(w[1]+w[13],18),w[14]^=a(w[10]+w[6],7),w[2]^=a(w[14]+w[10],9),w[6]^=a(w[2]+w[14],13),w[10]^=a(w[6]+w[2],18),w[3]^=a(w[15]+w[11],7),w[7]^=a(w[3]+w[15],9),w[11]^=a(w[7]+w[3],13),w[15]^=a(w[11]+w[7],18),w[1]^=a(w[0]+w[3],7),w[2]^=a(w[1]+w[0],9),w[3]^=a(w[2]+w[1],13),w[0]^=a(w[3]+w[2],18),w[6]^=a(w[5]+w[4],7),w[7]^=a(w[6]+w[5],9),w[4]^=a(w[7]+w[6],13),w[5]^=a(w[4]+w[7],18),w[11]^=a(w[10]+w[9],7),w[8]^=a(w[11]+w[10],9),w[9]^=a(w[8]+w[11],13),w[10]^=a(w[9]+w[8],18),w[12]^=a(w[15]+w[14],7),w[13]^=a(w[12]+w[15],9),w[14]^=a(w[13]+w[12],13),w[15]^=a(w[14]+w[13],18);for(let b=0;b<16;++b)y[b]+=w[b]}function c(y,w,b,x){for(let C=0;C=256)return!1}return!0}function d(y,w){if(typeof y!="number"||y%1)throw new Error("invalid "+w);return y}function v(y,w,b,x,C,S,P){if(b=d(b,"N"),x=d(x,"r"),C=d(C,"p"),S=d(S,"dkLen"),b===0||b&b-1)throw new Error("N must be power of 2");if(b>2147483647/128/x)throw new Error("N too large");if(x>2147483647/128/C)throw new Error("r too large");if(!u(y))throw new Error("password must be an array or buffer");if(y=Array.prototype.slice.call(y),!u(w))throw new Error("salt must be an array or buffer");w=Array.prototype.slice.call(w);let N=o(y,w,C*128*x);const B=new Uint32Array(C*32*x);for(let F=0;Fk&&(F=k);for(let $=0;$k&&(F=k);for(let $=0;$>0&255),N.push(B[$]>>8&255),N.push(B[$]>>16&255),N.push(B[$]>>24&255);const E=o(y,N,S);return P&&P(null,1,E),E}P&&p(R)};if(!P)for(;;){const F=R();if(F!=null)return F}R()}const g={scrypt:function(y,w,b,x,C,S,P){return new Promise(function(N,B){let D=0;P&&P(0),v(y,w,b,x,C,S,function(V,Y,G){if(V)B(V);else if(G)P&&D!==1&&P(1),N(new Uint8Array(G));else if(P&&Y!==D)return D=Y,P(Y)})})},syncScrypt:function(y,w,b,x,C,S){return new Uint8Array(v(y,w,b,x,C,S))}};t.exports=g})()})($7);var nq=$7.exports;const qg=Eo(nq);var iq=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ep=new H(F7);function s6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class oq extends Es{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function sq(t,e,r){if(Xt(t,"crypto/cipher")==="aes-128-ctr"){const i=Ws(Xt(t,"crypto/cipherparams/iv")),o=new Ii.Counter(i),s=new Ii.ModeOfOperation.ctr(e,o);return oe(s.decrypt(r))}return null}function j7(t,e){const r=Ws(Xt(t,"crypto/ciphertext"));if(le(rt(kt([e.slice(16,32),r]))).substring(2)!==Xt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=sq(t,e.slice(0,16),r);i||Ep.throwError("unsupported cipher",H.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=e.slice(32,64),s=is(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),ct(l)!==s)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:s,privateKey:le(i)};if(Xt(t,"x-ethers/version")==="0.1"){const l=Ws(Xt(t,"x-ethers/mnemonicCiphertext")),c=Ws(Xt(t,"x-ethers/mnemonicCounter")),f=new Ii.Counter(c),u=new Ii.ModeOfOperation.ctr(o,f),d=Xt(t,"x-ethers/path")||Il,v=Xt(t,"x-ethers/locale")||"en",g=oe(u.decrypt(l));try{const y=Sh(g,v),w=vn.fromMnemonic(y,null,v).derivePath(d);if(w.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=w.mnemonic}catch(y){if(y.code!==H.errors.INVALID_ARGUMENT||y.argument!=="wordlist")throw y}}return new oq(a)}function U7(t,e,r,n,i){return oe(Ug(t,e,r,n,i))}function aq(t,e,r,n,i){return Promise.resolve(U7(t,e,r,n,i))}function z7(t,e,r,n,i){const o=Vg(e),s=Xt(t,"crypto/kdf");if(s&&typeof s=="string"){const a=function(l,c){return Ep.throwArgumentError("invalid key-derivation function parameters",l,c)};if(s.toLowerCase()==="scrypt"){const l=Ws(Xt(t,"crypto/kdfparams/salt")),c=parseInt(Xt(t,"crypto/kdfparams/n")),f=parseInt(Xt(t,"crypto/kdfparams/r")),u=parseInt(Xt(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",s),c&c-1&&a("N",c);const d=parseInt(Xt(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),n(o,l,c,f,u,64,i)}else if(s.toLowerCase()==="pbkdf2"){const l=Ws(Xt(t,"crypto/kdfparams/salt"));let c=null;const f=Xt(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(Xt(t,"crypto/kdfparams/c")),d=parseInt(Xt(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),r(o,l,u,d,c)}}return Ep.throwArgumentError("unsupported key-derivation function","kdf",s)}function V7(t,e){const r=JSON.parse(t),n=z7(r,e,U7,qg.syncScrypt);return j7(r,n)}function H7(t,e,r){return iq(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield z7(n,e,aq,qg.scrypt,r);return j7(n,i)})}function q7(t,e,r,n){try{if(ct(t.address)!==is(t.privateKey))throw new Error("address/privateKey mismatch");if(s6(t)){const w=t.mnemonic;if(vn.fromMnemonic(w.phrase,null,w.locale).derivePath(w.path||Il).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(w){return Promise.reject(w)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=oe(t.privateKey),o=Vg(e);let s=null,a=null,l=null;if(s6(t)){const w=t.mnemonic;s=oe(Ch(w.phrase,w.locale||"en")),a=w.path||Il,l=w.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=oe(r.salt):f=Ya(32);let u=null;if(r.iv){if(u=oe(r.iv),u.length!==16)throw new Error("invalid iv")}else u=Ya(16);let d=null;if(r.uuid){if(d=oe(r.uuid),d.length!==16)throw new Error("invalid uuid")}else d=Ya(16);let v=1<<17,g=8,y=1;return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(g=r.scrypt.r),r.scrypt.p&&(y=r.scrypt.p)),qg.scrypt(o,f,v,g,y,64,n).then(w=>{w=oe(w);const b=w.slice(0,16),x=w.slice(16,32),C=w.slice(32,64),S=new Ii.Counter(u),P=new Ii.ModeOfOperation.ctr(b,S),N=oe(P.encrypt(i)),B=rt(kt([x,N])),D={address:t.address.substring(2).toLowerCase(),id:ZH(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:le(u).substring(2)},ciphertext:le(N).substring(2),kdf:"scrypt",kdfparams:{salt:le(f).substring(2),n:v,dklen:32,p:y,r:g},mac:B.substring(2)}};if(s){const V=Ya(16),Y=new Ii.Counter(V),G=new Ii.ModeOfOperation.ctr(C,Y),Z=oe(G.encrypt(s)),I=new Date,h=I.getUTCFullYear()+"-"+hc(I.getUTCMonth()+1,2)+"-"+hc(I.getUTCDate(),2)+"T"+hc(I.getUTCHours(),2)+"-"+hc(I.getUTCMinutes(),2)+"-"+hc(I.getUTCSeconds(),2)+".0Z";D["x-ethers"]={client:c,gethFilename:"UTC--"+h+"--"+D.address,mnemonicCounter:le(V).substring(2),mnemonicCiphertext:le(Z).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(D)})}function G7(t,e,r){if(kh(t)){r&&r(0);const n=Hg(t,e);return r&&r(1),Promise.resolve(n)}return Th(t)?H7(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function W7(t,e){if(kh(t))return Hg(t,e);if(Th(t))return V7(t,e);throw new Error("invalid JSON wallet")}const lq=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:Hg,decryptJsonWallet:G7,decryptJsonWalletSync:W7,decryptKeystore:H7,decryptKeystoreSync:V7,encryptKeystore:q7,getJsonWalletAddress:rq,isCrowdsaleWallet:kh,isKeystoreWallet:Th},Symbol.toStringTag,{value:"Module"})),cq="wallet/5.7.0";var a6=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Aa=new H(cq);function fq(t){return t!=null&&qe(t.privateKey,32)&&t.address!=null}function uq(t){const e=t.mnemonic;return e&&e.phrase}class Pi extends zl{constructor(e,r){if(super(),fq(e)){const n=new Gs(e.privateKey);if(ee(this,"_signingKey",()=>n),ee(this,"address",is(this.publicKey)),this.address!==ct(e.address)&&Aa.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),uq(e)){const i=e.mnemonic;ee(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Il,locale:i.locale||"en"}));const o=this.mnemonic,s=vn.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);is(s.privateKey)!==this.address&&Aa.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else ee(this,"_mnemonic",()=>null)}else{if(Gs.isSigningKey(e))e.curve!=="secp256k1"&&Aa.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),ee(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Gs(e);ee(this,"_signingKey",()=>n)}ee(this,"_mnemonic",()=>null),ee(this,"address",is(this.publicKey))}r&&!lu.isProvider(r)&&Aa.throwArgumentError("invalid provider","provider",r),ee(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Pi(this,e)}signTransaction(e){return Gt(e).then(r=>{r.from!=null&&(ct(r.from)!==this.address&&Aa.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(rt(xp(r)));return xp(r,n)})}signMessage(e){return a6(this,void 0,void 0,function*(){return cp(this._signingKey().signDigest(Og(e)))})}_signTypedData(e,r,n){return a6(this,void 0,void 0,function*(){const i=yield Cr.resolveNames(e,r,n,o=>(this.provider==null&&Aa.throwError("cannot resolve ENS names without a provider",H.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:o}),this.provider.resolveName(o)));return cp(this._signingKey().signDigest(Cr.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),q7(this,e,r,n)}static createRandom(e){let r=Ya(16);e||(e={}),e.extraEntropy&&(r=oe(Zt(rt(kt([r,e.extraEntropy])),0,16)));const n=Sh(r,e.locale);return Pi.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return G7(e,r,n).then(i=>new Pi(i))}static fromEncryptedJsonSync(e,r){return new Pi(W7(e,r))}static fromMnemonic(e,r,n){return r||(r=Il),new Pi(vn.fromMnemonic(e,null,n).derivePath(r))}}function dq(t,e){return fu(Og(t),e)}function hq(t,e,r,n){return fu(Cr.hash(t,e,r),n)}const vq=Object.freeze(Object.defineProperty({__proto__:null,Wallet:Pi,verifyMessage:dq,verifyTypedData:hq},Symbol.toStringTag,{value:"Module"})),yq="networks/5.7.1",l6=new H(yq);function pq(t){return t&&typeof t.renetwork=="function"}function no(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const o=["goerli","ropsten","rinkeby","sepolia"];try{const s=new r.PocketProvider(t,n.pocket);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const o=["ropsten"],s=new r.AnkrProvider(t,n.ankr);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let o=1;return n.quorum!=null?o=n.quorum:t==="homestead"&&(o=2),new r.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(r){return no(r)},e}function C0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return C0(t,n)},r}const c6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:no("homestead")},f6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:no("ropsten")},u6={chainId:63,name:"classicMordor",_defaultProvider:C0("https://www.ethercluster.com/mordor","classicMordor")},Qu={unspecified:{chainId:0,name:"unspecified"},homestead:c6,mainnet:c6,morden:{chainId:2,name:"morden"},ropsten:f6,testnet:f6,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:no("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:no("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:no("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:no("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:C0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:u6,classicTestnet:u6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:C0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:no("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:no("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function mq(t){if(t==null)return null;if(typeof t=="number"){for(const n in Qu){const i=Qu[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Qu[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Qu[t.name];if(!e)return typeof t.chainId!="number"&&l6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&l6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(pq(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const gq="web/5.7.1";var xq=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function bq(t,e){return xq(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const s=e.fetchOptions;s.mode&&(r.mode=s.mode),s.cache&&(r.cache=s.cache),s.credentials&&(r.credentials=s.credentials),s.redirect&&(r.redirect=s.redirect),s.referrer&&(r.referrer=s.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach((s,a)=>{o[a.toLowerCase()]=s}):n.headers.keys().forEach(s=>{o[s.toLowerCase()]=n.headers.get(s)}),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:oe(new Uint8Array(i))}})}var wq=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Yn=new H(gq);function d6(t){return new Promise(e=>{setTimeout(e,t)})}function _o(t,e){if(t==null)return null;if(typeof t=="string")return t;if(su(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return As(t)}catch{}return le(t)}return t}function Eq(t){return Dt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function K7(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Yn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,o=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Yn.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Yn.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const b in t.headers)a[b.toLowerCase()]={key:b,value:String(t.headers[b])},["if-none-match","if-modified-since"].indexOf(b.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Yn.throwError("basic authentication requires a secure https url",H.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const b=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+Ig(Dt(b))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=sr(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=l?l.match(d):null;if(v)try{const b={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?_g(v[3]):Eq(v[3])};let x=b.body;return r&&(x=r(b.body,b)),Promise.resolve(x)}catch(b){Yn.throwError("processing response error",H.errors.SERVER_ERROR,{body:_o(v[1],v[2]),error:b,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(a).forEach(b=>{const x=a[b];g[x.key]=x.value}),c.headers=g;const y=function(){let b=null;return{promise:new Promise(function(S,P){u&&(b=setTimeout(()=>{b!=null&&(b=null,P(Yn.makeError("timeout",H.errors.TIMEOUT,{requestBody:_o(c.body,g["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){b!=null&&(clearTimeout(b),b=null)}}}(),w=function(){return wq(this,void 0,void 0,function*(){for(let b=0;b=300)&&(y.cancel(),Yn.throwError("bad response",H.errors.SERVER_ERROR,{status:x.statusCode,headers:x.headers,body:_o(C,x.headers?x.headers["content-type"]:null),requestBody:_o(c.body,g["content-type"]),requestMethod:c.method,url:l})),r)try{const S=yield r(C,x);return y.cancel(),S}catch(S){if(S.throttleRetry&&b{let a=null;if(o!=null)try{a=JSON.parse(As(o))}catch(l){Yn.throwError("invalid JSON",H.errors.SERVER_ERROR,{body:o,error:l})}return r&&(a=r(a,s)),a},i=null;if(e!=null){i=Dt(e);const o=typeof t=="string"?{url:t}:sr(t);o.headers?Object.keys(o.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(o.headers=sr(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},t=o}return K7(t,i,n)}function Ja(t,e){return e||(e={}),e=sr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,o=!1;const s=()=>o?!1:(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)s()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!o){if(l++,l>a){s()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){s()&&n(f)})}c()})}const Aq=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:K7,fetchJson:Ph,poll:Ja},Symbol.toStringTag,{value:"Module"}));var S0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ap={};for(var Yu=0;Yu>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Q7(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=fl(e)^n>>5}for(e=fl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=Q7(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",o=0;o>5)throw new Error("Non 5-bit word");n=fl(n)^s,i+=S0.charAt(s)}for(o=0;o<6;++o)n=fl(n);for(n^=1,o=0;o<6;++o){var a=n>>(5-o)*5&31;i+=S0.charAt(a)}return i}function Y7(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var o=t.slice(0,i),s=t.slice(i+1);if(s.length<6)return"Data too short";var a=Q7(o);if(typeof a=="string")return a;for(var l=[],c=0;c=s.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:o,words:l}}function Sq(){var t=Y7.apply(null,arguments);if(typeof t=="object")return t}function kq(t){var e=Y7.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Rh(t,e,r,n){for(var i=0,o=0,s=(1<=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:s,type:c,accessList:xe.allowNull(this.accessList.bind(this),null),blockHash:xe.allowNull(s,null),blockNumber:xe.allowNull(l,null),transactionIndex:xe.allowNull(l,null),confirmations:xe.allowNull(l,null),from:r,gasPrice:xe.allowNull(n),maxPriorityFeePerGas:xe.allowNull(n),maxFeePerGas:xe.allowNull(n),gasLimit:n,to:xe.allowNull(r,null),value:n,nonce:l,data:o,r:xe.allowNull(this.uint256),s:xe.allowNull(this.uint256),v:xe.allowNull(l),creates:xe.allowNull(r,null),raw:xe.allowNull(o)},e.transactionRequest={from:xe.allowNull(r),nonce:xe.allowNull(l),gasLimit:xe.allowNull(n),gasPrice:xe.allowNull(n),maxPriorityFeePerGas:xe.allowNull(n),maxFeePerGas:xe.allowNull(n),to:xe.allowNull(r),value:xe.allowNull(n),data:xe.allowNull(f),type:xe.allowNull(l),accessList:xe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:r,topics:xe.arrayOf(s),data:o,logIndex:l,blockHash:s},e.receipt={to:xe.allowNull(this.address,null),from:xe.allowNull(this.address,null),contractAddress:xe.allowNull(r,null),transactionIndex:l,root:xe.allowNull(a),gasUsed:n,logsBloom:xe.allowNull(o),blockHash:s,transactionHash:s,logs:xe.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:xe.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:xe.allowNull(n),status:xe.allowNull(l),type:c},e.block={hash:xe.allowNull(s),parentHash:s,number:l,timestamp:l,nonce:xe.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:xe.allowNull(r),extraData:o,transactions:xe.allowNull(xe.arrayOf(s)),baseFeePerGas:xe.allowNull(n)},e.blockWithTransactions=sr(e.block),e.blockWithTransactions.transactions=xe.allowNull(xe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:xe.allowNull(i,void 0),toBlock:xe.allowNull(i,void 0),blockHash:xe.allowNull(s,void 0),address:xe.allowNull(r,void 0),topics:xe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:xe.allowNull(l),blockHash:xe.allowNull(s),transactionIndex:l,removed:xe.allowNull(this.boolean.bind(this)),address:r,data:xe.allowFalsish(o,"0x"),topics:xe.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return ma(e||[])}number(e){return e==="0x"?0:ae.from(e).toNumber()}type(e){return e==="0x"||e==null?0:ae.from(e).toNumber()}bigNumber(e){return ae.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),qe(e))?e.toLowerCase():vc.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ct(e)}callAddress(e){if(!qe(e,32))return null;const r=ct(Zt(e,12));return r===DS?null:r}contractAddress(e){return Tg(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||qe(e))return ph(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Ui(n)!==32?vc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=ae.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!qe(e))throw new Error("invalid uint256");return wt(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=xe.check(r,e);return i._difficulty=n==null?null:ae.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return xe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&ae.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=xe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;qe(n)&&(n=ae.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),qe(n)&&(n=ae.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return M7(e)}receiptLog(e){return xe.check(this.formats.receiptLog,e)}receipt(e){const r=xe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=ae.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&vc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):vc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&vc.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return xe.check(this.formats.filter,e)}filterLog(e){return xe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const o=e[i](r[i]);o!==void 0&&(n[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=r[i],o}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var Te=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ie=new H(Gg),Iq=10;function v6(t){return t==null?"null":(Ui(t)!==32&&Ie.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function y6(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[v6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return v6(e)}).join("&")}function Oq(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function Ca(t){if(typeof t=="string"){if(t=t.toLowerCase(),Ui(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+y6(t);if(kz.isForkEvent(t))throw Ie.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+y6(t.topics||[])}throw new Error("invalid event - "+t)}function yc(){return new Date().getTime()}function p6(t){return new Promise(e=>{setTimeout(e,t)})}const Nq=["block","network","pending","poll"];let Dq=class{constructor(e,r,n){ee(this,"tag",e),ee(this,"listener",r),ee(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=Oq(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||Nq.indexOf(this.tag)>=0}};const Bq={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function cv(t){return wt(ae.from(t).toHexString(),32)}function m6(t){return Ml.encode(kt([t,Zt(bo(bo(t)),0,4)]))}const J7=new RegExp("^(ipfs)://(.*)$","i"),g6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),J7,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Sd(t,e){try{return As(Uf(t,e))}catch{}return null}function Uf(t,e){if(t==="0x")return null;const r=ae.from(Zt(t,e,e+32)).toNumber(),n=ae.from(Zt(t,r,r+32)).toNumber();return Zt(t,r+32,r+32+n)}function fv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ie.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function x6(t){const e=oe(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function Lq(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function X7(t){const e=[];let r=0;for(let n=0;nae.from(e).eq(1)).catch(e=>{if(e.code===H.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Te(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Vr([e,rf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Vr(["0x9061b923",X7([YS(this.name),n.data])]));try{let o=yield this.provider.call(n);return oe(o).length%32===4&&Ie.throwError("resolver threw error",H.errors.CALL_EXCEPTION,{transaction:n,data:o}),i&&(o=Uf(o,0)),o}catch(o){if(o.code===H.errors.CALL_EXCEPTION)return null;throw o}})}_fetchBytes(e,r){return Te(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Uf(n,0):null})}_getAddress(e,r){const n=Bq[String(e)];if(n==null&&Ie.throwError(`unsupported coin type: ${e}`,H.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=oe(r);if(n.p2pkh!=null){const o=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return m6(kt([[n.p2pkh],"0x"+o[2]]))}}if(n.p2sh!=null){const o=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return m6(kt([[n.p2sh],"0x"+o[2]]))}}if(n.prefix!=null){const o=i[1];let s=i[0];if(s===0?o!==20&&o!==32&&(s=-1):s=-1,s>=0&&i.length===2+o&&o>=1&&o<=75){const a=h6.toWords(i.slice(2));return a.unshift(s),h6.encode(n.prefix,a)}}return null}getAddress(e){return Te(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===LS?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===H.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",cv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ie.throwError("invalid or unsupported coin data",H.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Te(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;ns[l])}return Ie.throwError("invalid or unsupported content hash data",H.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Te(this,void 0,void 0,function*(){let r=Dt(e);r=kt([cv(64),cv(r.length),r]),r.length%32!==0&&(r=kt([r,wt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",le(r));return n==null||n==="0x"?null:As(n)})}}let uv=null,Fq=1;class $q extends lu{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ee(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=oi(new.target,"getNetwork")(e);r?(ee(this,"_network",r),this.emit("network",r,null)):Ie.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Te(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ie.throwError("no network detected",H.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ee(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Ja(()=>this._ready().then(e=>e,e=>{if(!(e.code===H.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return uv==null&&(uv=new xe),uv}static getNetwork(e){return mq(e??"homestead")}ccipReadFetch(e,r,n){return Te(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),o=r.toLowerCase(),s=[];for(let a=0;a=0?null:JSON.stringify({data:o,sender:i}),u=yield Ph({url:c,errorPassThrough:!0},f,(v,g)=>(v.status=g.statusCode,v));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ie.throwError(`response not found during CCIP fetch: ${d}`,H.errors.SERVER_ERROR,{url:l,errorMessage:d});s.push(d)}return Ie.throwError(`error encountered during CCIP fetch: ${s.map(a=>JSON.stringify(a)).join(", ")}`,H.errors.SERVER_ERROR,{urls:n,errorMessages:s})})}_getInternalBlockNumber(e){return Te(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(yc()-o.respTime<=e)return o.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=yc(),n=Gt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),o;const s=yc();return i=ae.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Te(this,void 0,void 0,function*(){const e=Fq++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ie.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ie.makeError("network block skew detected",H.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const o=this._emitted[i];o!=="pending"&&n-o>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let s=this.getTransactionReceipt(o).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+o]=a.blockNumber,this.emit(o,a)),null)).catch(a=>{this.emit("error",a)});r.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const o=i.filter;o.fromBlock=i._lastBlockNumber+1,o.toBlock=n;const s=o.toBlock-this._maxFilterBlockRange;s>o.fromBlock&&(o.fromBlock=s),o.fromBlock<0&&(o.fromBlock=0);const a=this.getLogs(o).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(o,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Te(this,void 0,void 0,function*(){return Ie.throwError("provider does not support network detection",H.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Te(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield p6(0),this._network;const n=Ie.makeError("underlying network changed",H.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=yc();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Te(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return Te(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=r?o:new Promise((s,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),i){let d=i.startBlock,v=null;const g=y=>Te(this,void 0,void 0,function*(){c||(yield p6(1e3),this.getTransactionCount(i.from).then(w=>Te(this,void 0,void 0,function*(){if(!c){if(w<=i.nonce)d=y;else{{const b=yield this.getTransaction(e);if(b&&b.blockNumber!=null)return}for(v==null&&(v=d-3,v{c||this.once("block",g)}))});if(c)return;this.once("block",g),l.push(()=>{this.removeListener("block",g)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a(Ie.makeError("timeout exceeded",H.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Te(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return ae.from(e)}catch(r){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return ae.from(i)}catch(o){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:o})}})}getTransactionCount(e,r){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return ae.from(i).toNumber()}catch(o){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:o})}})}getCode(e,r){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return le(i)}catch(o){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:o})}})}getStorageAt(e,r,n){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Gt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(s=>ph(s))}),o=yield this.perform("getStorageAt",i);try{return le(o)}catch(s){return Ie.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:s})}})}_wrapTransaction(e,r,n){if(r!=null&&Ui(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ie.throwError("Transaction hash mismatch from Provider.sendTransaction.",H.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(o,s)=>Te(this,void 0,void 0,function*(){o==null&&(o=1),s==null&&(s=0);let a;o!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,o,s,a);return l==null&&o===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ie.throwError("transaction failed",H.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(o=>le(o)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,o,i)}catch(o){throw o.transaction=n,o.transactionHash=n.hash,o}})}_getTransactionRequest(e){return Te(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?ae.from(o):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(o=>o?le(o):null))}),this.formatter.transactionRequest(yield Gt(n))})}_getFilter(e){return Te(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Gt(r))})}_call(e,r,n){return Te(this,void 0,void 0,function*(){n>=Iq&&Ie.throwError("CCIP read exceeded maximum redirections",H.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,o=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&o.substring(0,10)==="0x556f1830"&&Ui(o)%32===4)try{const s=Zt(o,4),a=Zt(s,0,32);ae.from(a).eq(i)||Ie.throwError("CCIP Read sender did not match",H.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const l=[],c=ae.from(Zt(s,32,64)).toNumber(),f=ae.from(Zt(s,c,c+32)).toNumber(),u=Zt(s,c+32);for(let b=0;bTe(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(o==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let s=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Ja(()=>Te(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Ja(()=>Te(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return Te(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Gt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),xe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Te(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Te(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ie.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Te(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new b6(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Te(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ie.throwError("network does not support ENS",H.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+rf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Te(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(qe(e))throw n}typeof e!="string"&&Ie.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Te(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Sd(yield this.call({to:n,data:"0x691f3431"+rf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Te(this,void 0,void 0,function*(){let r=null;if(qe(e)){const o=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(o,"getAvatar");if(!s)return null;r=new b6(this,s,o);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==H.errors.CALL_EXCEPTION)throw a}try{const a=Sd(yield this.call({to:s,data:"0x691f3431"+rf(o).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==H.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ie.throwError(e+" not implemented",H.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new Dq(Ca(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],o=Ca(e);return this._events=this._events.filter(s=>s.tag!==o?!0:(setTimeout(()=>{s.listener.apply(this,r)},0),n=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),n}listenerCount(e){if(!e)return this._events.length;let r=Ca(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Ca(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,o=Ca(e);return this._events=this._events.filter(s=>s.tag!==o||s.listener!=r||i?!0:(i=!0,n.push(s),!1)),n.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=Ca(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var to=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ir=new H(Gg),jq=["call","estimateGas"];function of(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=qe(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=of(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return of(JSON.parse(t),e)}catch{}return null}function Z7(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const o=of(e,!0);if(o)return o.data;ir.throwError("missing revert data in call exception; Transaction reverted without a reason string",H.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let o=of(e.body,!1);o==null&&(o=of(e,!1)),o&&ir.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===H.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&ir.throwError("insufficient funds for intrinsic transaction cost",H.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&ir.throwError("nonce has already been used",H.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&ir.throwError("replacement fee too low",H.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&ir.throwError("legacy pre-eip-155 transactions not supported",H.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),jq.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&ir.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function w6(t){return new Promise(function(e){setTimeout(e,t)})}function Uq(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function pc(t){return t&&t.toLowerCase()}const Cp={};class e9 extends zl{constructor(e,r,n){if(super(),e!==Cp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ee(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ee(this,"_address",this.provider.formatter.address(n)),ee(this,"_index",null)):typeof n=="number"?(ee(this,"_index",n),ee(this,"_address",null)):ir.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return ir.throwError("cannot alter JSON-RPC Signer connection",H.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new zq(Cp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&ir.throwError("unknown account #"+this._index,H.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=sr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=sr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>to(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&ir.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Gt({tx:Gt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&ir.throwArgumentError("from address mismatch","transaction",e):n.from=i;const o=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&ir.throwError("user rejected transaction",H.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Z7("sendTransaction",s,o)))})}signTransaction(e){return ir.throwError("signing transactions is unsupported",H.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return to(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Ja(()=>to(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return to(this,void 0,void 0,function*(){const r=typeof e=="string"?Dt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[le(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&ir.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return to(this,void 0,void 0,function*(){const r=typeof e=="string"?Dt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),le(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&ir.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return to(this,void 0,void 0,function*(){const i=yield Cr.resolveNames(e,r,n,s=>this.provider.resolveName(s)),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(Cr.getPayload(i.domain,r,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&ir.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:i.domain,types:r,value:i.value}}),s}})}unlock(e){return to(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class zq extends e9{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const Vq={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let Hq=class extends $q{constructor(e,r){let n=r;n==null&&(n=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{o(s)})},0)})),super(n),e||(e=oi(this.constructor,"defaultUrl")()),typeof e=="string"?ee(this,"connection",Object.freeze({url:e})):ee(this,"connection",Object.freeze(sr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return to(this,void 0,void 0,function*(){yield w6(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=oi(this.constructor,"getNetwork");try{return r(ae.from(e).toNumber())}catch(n){return ir.throwError("could not detect network",H.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return ir.throwError("could not detect network",H.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new e9(Cp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:us(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=Ph(this.connection,JSON.stringify(n),Uq).then(s=>(this.emit("debug",{action:"response",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:n,provider:this}),s});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[pc(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[pc(r.address),r.blockTag]];case"getCode":return["eth_getCode",[pc(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[pc(r.address),wt(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[oi(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[oi(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=pc(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return to(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&ae.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=yield this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(r=sr(r),r.transaction=sr(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&ir.throwError(e+" not implemented",H.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return Z7(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(o){if(e._pendingFilter!=r)return null;let s=Promise.resolve();return o.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return w6(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(o=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=sr(Vq);if(r)for(const o in r)r[o]&&(n[o]=!0);Cg(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(e[o]==null)return;const s=ph(ae.from(e[o]));o==="gasLimit"&&(o="gas"),i[o]=s}),["from","to","data"].forEach(function(o){e[o]!=null&&(i[o]=le(e[o]))}),e.accessList&&(i.accessList=ma(e.accessList)),i}};const qq="solidity/5.7.0",Gq=new RegExp("^bytes([0-9]+)$"),Wq=new RegExp("^(u?int)([0-9]*)$"),Kq=new RegExp("^(.*)\\[([0-9]*)\\]$"),Qq="0000000000000000000000000000000000000000000000000000000000000000",Ma=new H(qq);function t9(t,e,r){switch(t){case"address":return r?Zc(e,32):oe(e);case"string":return Dt(e);case"bytes":return oe(e);case"bool":return e=e?"0x01":"0x00",r?Zc(e,32):oe(e)}let n=t.match(Wq);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ma.throwArgumentError("invalid number type","type",t),r&&(i=256),e=ae.from(e).toTwos(i),Zc(e,i/8)}if(n=t.match(Gq),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ma.throwArgumentError("invalid bytes type","type",t),oe(e).byteLength!==i&&Ma.throwArgumentError(`invalid value for ${t}`,"value",e),r?oe((e+Qq).substring(0,66)):e}if(n=t.match(Kq),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ma.throwArgumentError(`invalid array length for ${t}`,"value",e);const s=[];return e.forEach(function(a){s.push(t9(i,a,!0))}),kt(s)}return Ma.throwArgumentError("invalid type","type",t)}function Wg(t,e){t.length!=e.length&&Ma.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(t9(n,e[i]))}),le(kt(r))}function Yq(t,e){return rt(Wg(t,e))}function Jq(t,e){return bo(Wg(t,e))}const Xq=Object.freeze(Object.defineProperty({__proto__:null,keccak256:Yq,pack:Wg,sha256:Jq},Symbol.toStringTag,{value:"Module"})),Zq="units/5.7.0",r9=new H(Zq),n9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function eG(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&r9.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const o=[];for(;r.length;)if(r.length<=3){o.unshift(r);break}else{const s=r.length-3;o.unshift(r.substring(s)),r=r.substring(0,s)}return n+o.join(",")+i}function Kg(t,e){if(typeof e=="string"){const r=n9.indexOf(e);r!==-1&&(e=3*r)}return xd(t,e??18)}function Mh(t,e){if(typeof t!="string"&&r9.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=n9.indexOf(e);r!==-1&&(e=3*r)}return bi(t,e??18)}function i9(t){return Kg(t,18)}function o9(t){return Mh(t,18)}const tG=Object.freeze(Object.defineProperty({__proto__:null,commify:eG,formatEther:i9,formatUnits:Kg,parseEther:o9,parseUnits:Mh},Symbol.toStringTag,{value:"Module"}));function Sp(){return Sp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),o=i.filter((c,f)=>i.indexOf(c)!==f);if(o.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${o}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const s=n.map(c=>c.name).sort(),a=s.filter((c,f)=>s.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(nG(t,!0,e),t),oG=t=>iG(sG(t)),sG=t=>{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Qg=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",aG=t=>Qg("https://${network}-indexer.sequence.app",{network:t}),lG=t=>Qg("https://${network}-relayer.sequence.app",{network:t}),cG=t=>Qg("https://nodes.sequence.app/${network}",{network:t}),ar=t=>{const e=cG(t);return{rpcUrl:e,relayer:{url:lG(t),provider:{url:e}},indexerUrl:aG(t)}};oG([Ft({},Qt[de.POLYGON],ar("polygon"),{isDefaultChain:!0,isAuthChain:!0}),Ft({},Qt[de.MAINNET],ar("mainnet")),Ft({},Qt[de.BSC],ar("bsc")),Ft({},Qt[de.AVALANCHE],ar("avalanche")),Ft({},Qt[de.ARBITRUM],ar("arbitrum")),Ft({},Qt[de.ARBITRUM_NOVA],ar("arbitrum-nova")),Ft({},Qt[de.OPTIMISM],ar("optimism")),Ft({},Qt[de.POLYGON_ZKEVM],ar("polygon-zkevm")),Ft({},Qt[de.GNOSIS],ar("gnosis")),Ft({},Qt[de.RINKEBY],ar("rinkeby"),{disabled:!0}),Ft({},Qt[de.GOERLI],ar("goerli")),Ft({},Qt[de.SEPOLIA],ar("sepolia")),Ft({},Qt[de.POLYGON_MUMBAI],ar("mumbai")),Ft({},Qt[de.BSC_TESTNET],ar("bsc-testnet")),Ft({},Qt[de.ARBITRUM_GOERLI],ar("arbitrum-goerli")),Ft({},Qt[de.BASE],ar("base")),Ft({},Qt[de.BASE_GOERLI],ar("base-goerli")),Ft({},Qt[de.HOMEVERSE_TESTNET],ar("homeverse-testnet")),Ft({},Qt[de.AVALANCHE_TESTNET],ar("avalanche-testnet")),Ft({},Qt[de.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Ft({},Qt[de.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]);const E6=[..."ðŸķðŸąðŸ­ðŸđ🐰ðŸĶŠðŸŧ🐞ðŸĻðŸŊðŸĶðŸŪðŸ·ðŸ―ðŸļðŸĩ🙈🙉🙊🐒🐔🐧ðŸĶðŸĪðŸĢðŸĨðŸĶ†ðŸĶ…ðŸĶ‰ðŸĶ‡ðŸšðŸ—ðŸīðŸĶ„🐝🐛ðŸĶ‹ðŸŒðŸžðŸœðŸĶŸðŸĶ—🕷ðŸ•ļðŸĶ‚ðŸĒ🐍ðŸĶŽðŸĶ–ðŸĶ•ðŸ™ðŸĶ‘ðŸĶðŸĶžðŸĶ€ðŸĄðŸ ðŸŸðŸŽðŸģ🐋ðŸĶˆðŸŠðŸ…🐆ðŸĶ“ðŸĶðŸĶ§ðŸ˜ðŸĶ›ðŸĶðŸŠðŸŦðŸĶ’ðŸĶ˜ðŸƒðŸ‚🐄🐎🐖🐏🐑ðŸĶ™ðŸðŸĶŒðŸ•ðŸĐðŸĶŪ🐈🐓ðŸĶƒðŸĶšðŸĶœðŸĶĒðŸĶĐ🕊🐇ðŸĶðŸĶĻðŸĶĄðŸĶĶðŸĶĨ🐁🐀ðŸŋðŸĶ”ðŸū🐉ðŸēðŸŒĩ🎄ðŸŒēðŸŒģðŸŒīðŸŒąðŸŒŋ🍀🎍🎋🍃ðŸ‘Ģ🍂🍁🍄🐚ðŸŒū💐🌷ðŸŒđðŸĨ€ðŸŒšðŸŒļ🌞ðŸŒŧ🌞🌝🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈ðŸĨ­ðŸðŸĨĨðŸĨðŸ…ðŸĨ‘ðŸĨĶðŸĨŽðŸĨ’ðŸŒķðŸŒ―ðŸĨ•ðŸ§„🧅ðŸĨ”🍠ðŸĨðŸĨŊ🍞ðŸĨ–ðŸĨĻ🧀ðŸĨšðŸģ🧈ðŸĨžðŸ§‡ðŸĨ“ðŸĨĐ🍗🍖ðŸĶī🌭🍔🍟🍕ðŸĨŠðŸĨ™ðŸ§†ðŸŒŪðŸŒŊðŸĨ—ðŸĨ˜ðŸĨŦ🍝🍜ðŸē🍛ðŸĢðŸąðŸĨŸðŸĶŠðŸĪ🍙🍚🍘ðŸĨðŸĨ ðŸĨŪðŸĒðŸĄðŸ§ðŸĻðŸĶðŸĨ§ðŸ§ðŸ°ðŸŽ‚ðŸŪ🍭🍎ðŸŦðŸŋðŸĐ🍊🌰ðŸĨœðŸ‘€ðŸ‘‚👃👄👅👆👇👈👉👊👋👌👍👎👏👐👑👒👓ðŸŽŊðŸŽ°ðŸŽąðŸŽēðŸŽģðŸ‘ūðŸ‘Ŋ👚ðŸ‘ŧðŸ‘―ðŸ‚ðŸƒðŸ„"];function dv(){const e=bp.en,r=E6[Math.floor(Math.random()*E6.length)],n=e.getWord(Math.floor(Math.random()*2048)),i=e.getWord(Math.floor(Math.random()*2048));return`${r} ${n} ${i}`}function fG({onSuccess:t}){const[e,r]=m.useState(""),[n,i]=m.useState(),[o,s]=m.useState(!1),[a,l]=m.useState("");return{inProgress:o||!!a,loading:o,error:n,initiateAuth:async u=>{s(!0);try{const{instance:d}=await at.email.initiateAuth({email:u});l(d),r(u)}catch(d){i(d.message||"Unknown error")}finally{s(!1)}},sendChallengeAnswer:a?async u=>{s(!0);try{const d=await at.getSessionHash(),{idToken:v}=await at.email.finalizeAuth({instance:a,answer:u,email:e,sessionHash:d});t(v)}catch(d){i(d.message||"Unknown error")}finally{s(!1)}}:void 0}}function uG(){const[t,e]=m.useState(""),[r,n]=m.useState(void 0);return m.useEffect(()=>{const i=async()=>{try{e(await at.getSessionHash())}catch(o){console.error(o),n(o)}};return i(),at.onSessionStateChanged(i)},[e,n]),{sessionHash:t,error:r,loading:!!t}}function dG(){var x;const{sessionHash:t}=uG(),[e,r]=m.useState(""),n=m.useRef(null),i=(x=n.current)==null?void 0:x.validity.valid,[o,s]=m.useState(!1),[a,l]=m.useState([]),[c,f]=m.useState(!1),{inProgress:u,loading:d,initiateAuth:v,sendChallengeAnswer:g}=fG({onSuccess:async C=>{f(!0);const S=await at.signIn({idToken:C},dv());console.log(`Wallet address: ${S}`),Us.navigate("/")}});m.useEffect(()=>{(async()=>await at.isSignedIn()&&Us.navigate("/"))()},[]);const y=async C=>{const S=await at.signIn({idToken:C.credential},dv());console.log(`Wallet address: ${S}`),Us.navigate("/")},w="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),b=async C=>{const S=await at.signIn({idToken:C.authorization.id_token},dv());console.log(`Wallet address: ${S}`),Us.navigate("/")};return j.jsxs(ne,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[j.jsx(ne,{marginBottom:"16",children:j.jsx(hS,{})}),j.jsx(ne,{children:j.jsx(Oe,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"})}),g?j.jsxs(ne,{flexDirection:"column",children:[j.jsx(ne,{marginTop:"6",children:j.jsx(Oe,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),j.jsx(ne,{marginTop:"4",children:j.jsx(dS,{value:a,digits:6,onChange:l})}),j.jsx(ne,{gap:"2",marginY:"4",children:d||c?j.jsx(ji,{}):j.jsx(nn,{variant:"primary",disabled:a.includes(""),label:"Verify",onClick:()=>g(a.join("")),"data-id":"verifyButton"})})]}):j.jsxs(ne,{marginTop:"5",marginBottom:"4",children:[j.jsxs(Oe,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",j.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),j.jsxs(ne,{marginTop:"6",children:[j.jsx(Sr,{name:"email",type:"email",onChange:C=>{r(C.target.value)},ref:n,onKeyDown:C=>{e&&C.key==="Enter"&&v(e)},onBlur:()=>s(!!e&&!i),value:e,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),o&&j.jsx(Oe,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),j.jsx(ne,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:d?j.jsx(ji,{}):j.jsx(nn,{variant:"primary",disabled:!i,label:"Continue",onClick:()=>v(e),"data-id":"continueButton"})})]}),j.jsx("hr",{}),!u&&!!t&&j.jsxs(j.Fragment,{children:[j.jsx(ne,{children:j.jsx(Oe,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),j.jsx(rj,{onSuccess:y,shape:"circle",width:230,nonce:t}),j.jsx(Aj,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:w,usePopup:!0,nonce:t},onError:C=>console.error(C),onSuccess:b,uiType:"dark"})]})]})}function hG(t){var e="";return r(t),e;function r(i){if(i===null||typeof i!="object"||i.toJSON!=null)e+=JSON.stringify(i);else if(Array.isArray(i)){e+="[";var o=!1;i.forEach(function(a){o&&(e+=","),o=!0,a===void 0&&(a=null),r(a)}),e+="]"}else{e+="{";var s=Object.keys(i).filter(function(a){return i[a]!==void 0}).sort();s.forEach(function(a,l){return n(i,a,l)}),e+="}"}}function n(i,o,s){s>0&&(e+=","),e+=JSON.stringify(o),e+=":",r(i[o])}}const vG=(t,e)=>e.some(r=>t instanceof r);let A6,C6;function yG(){return A6||(A6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function pG(){return C6||(C6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const s9=new WeakMap,kp=new WeakMap,a9=new WeakMap,hv=new WeakMap,Yg=new WeakMap;function mG(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",o),t.removeEventListener("error",s)},o=()=>{r(os(t.result)),i()},s=()=>{n(t.error),i()};t.addEventListener("success",o),t.addEventListener("error",s)});return e.then(r=>{r instanceof IDBCursor&&s9.set(r,t)}).catch(()=>{}),Yg.set(e,t),e}function gG(t){if(kp.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",o),t.removeEventListener("error",s),t.removeEventListener("abort",s)},o=()=>{r(),i()},s=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",o),t.addEventListener("error",s),t.addEventListener("abort",s)});kp.set(t,e)}let Tp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return kp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||a9.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return os(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function xG(t){Tp=t(Tp)}function bG(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(vv(this),e,...r);return a9.set(n,e.sort?e.sort():[e]),os(n)}:pG().includes(t)?function(...e){return t.apply(vv(this),e),os(s9.get(this))}:function(...e){return os(t.apply(vv(this),e))}}function wG(t){return typeof t=="function"?bG(t):(t instanceof IDBTransaction&&gG(t),vG(t,yG())?new Proxy(t,Tp):t)}function os(t){if(t instanceof IDBRequest)return mG(t);if(hv.has(t))return hv.get(t);const e=wG(t);return e!==t&&(hv.set(t,e),Yg.set(e,t)),e}const vv=t=>Yg.get(t);function _h(t,e,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(t,e),a=os(s);return n&&s.addEventListener("upgradeneeded",l=>{n(os(s.result),l.oldVersion,l.newVersion,os(s.transaction),l)}),r&&s.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const EG=["get","getKey","getAll","getAllKeys","count"],AG=["put","add","delete","clear"],yv=new Map;function S6(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(yv.get(e))return yv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=AG.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||EG.includes(r)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return yv.set(e,o),o}xG(t=>({...t,get:(e,r,n)=>S6(e,r)||t.get(e,r,n),has:(e,r)=>!!S6(e,r)||t.has(e,r)}));let ue=function(t){return t[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t.GOERLI=5]="GOERLI",t[t.KOVAN=42]="KOVAN",t[t.SEPOLIA=11155111]="SEPOLIA",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_KOVAN=69]="OPTIMISM_KOVAN",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.BASE=8453]="BASE",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.BASE_SEPOLIA=84532]="BASE_SEPOLIA",t[t.HOMEVERSE_TESTNET=40875]="HOMEVERSE_TESTNET",t[t.HOMEVERSE=19011]="HOMEVERSE",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({}),xt=function(t){return t.MAINNET="mainnet",t.TESTNET="testnet",t}({});const Lt={[ue.MAINNET]:{chainId:ue.MAINNET,type:xt.MAINNET,name:"mainnet",title:"Ethereum",blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[ue.ROPSTEN]:{chainId:ue.ROPSTEN,type:xt.TESTNET,name:"ropsten",title:"Ropsten",testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ue.RINKEBY]:{chainId:ue.RINKEBY,type:xt.TESTNET,name:"rinkeby",title:"Rinkeby",testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ue.GOERLI]:{chainId:ue.GOERLI,type:xt.TESTNET,name:"goerli",title:"Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ue.KOVAN]:{chainId:ue.KOVAN,type:xt.TESTNET,name:"kovan",title:"Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},deprecated:!0},[ue.SEPOLIA]:{chainId:ue.SEPOLIA,type:xt.TESTNET,name:"sepolia",title:"Sepolia",testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"}},[ue.POLYGON]:{chainId:ue.POLYGON,type:xt.MAINNET,name:"polygon",title:"Polygon",blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"}},[ue.POLYGON_MUMBAI]:{chainId:ue.POLYGON_MUMBAI,type:xt.TESTNET,name:"mumbai",title:"Polygon Mumbai",testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"}},[ue.POLYGON_ZKEVM]:{chainId:ue.POLYGON_ZKEVM,type:xt.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"}},[ue.BSC]:{chainId:ue.BSC,type:xt.MAINNET,name:"bsc",title:"BNB Smart Chain",blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"}},[ue.BSC_TESTNET]:{chainId:ue.BSC_TESTNET,type:xt.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"}},[ue.OPTIMISM]:{chainId:ue.OPTIMISM,type:xt.MAINNET,name:"optimism",title:"Optimism",blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"}},[ue.OPTIMISM_KOVAN]:{chainId:ue.OPTIMISM_KOVAN,type:xt.TESTNET,name:"optimism-kovan",title:"Optimistic Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Kovan)",rootUrl:"https://kovan-optimistic.etherscan.io/"},deprecated:!0},[ue.OPTIMISM_GOERLI]:{chainId:ue.OPTIMISM_GOERLI,type:xt.TESTNET,name:"optimism-goerli",title:"Optimistic Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Goerli)",rootUrl:"https://goerli-optimistic.etherscan.io/"},deprecated:!0},[ue.OPTIMISM_SEPOLIA]:{chainId:ue.OPTIMISM_SEPOLIA,type:xt.TESTNET,name:"optimism-sepolia",title:"Optimistic Sepolia",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"}},[ue.ARBITRUM]:{chainId:ue.ARBITRUM,type:xt.MAINNET,name:"arbitrum",title:"Arbitrum One",blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"}},[ue.ARBITRUM_GOERLI]:{chainId:ue.ARBITRUM_GOERLI,type:xt.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",testnet:!0,blockExplorer:{name:"Arbiscan (Goerli Testnet)",rootUrl:"https://testnet.arbiscan.io/"},deprecated:!0},[ue.ARBITRUM_SEPOLIA]:{chainId:ue.ARBITRUM_SEPOLIA,type:xt.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"}},[ue.ARBITRUM_NOVA]:{chainId:ue.ARBITRUM_NOVA,type:xt.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"}},[ue.AVALANCHE]:{chainId:ue.AVALANCHE,type:xt.MAINNET,name:"avalanche",title:"Avalanche",blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"}},[ue.AVALANCHE_TESTNET]:{chainId:ue.AVALANCHE_TESTNET,type:xt.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://subnets-test.avax.network/c-chain/"}},[ue.GNOSIS]:{chainId:ue.GNOSIS,type:xt.MAINNET,name:"gnosis",title:"Gnosis Chain",blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"}},[ue.BASE]:{chainId:ue.BASE,type:xt.MAINNET,name:"base",title:"Base (Coinbase)",blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"}},[ue.BASE_GOERLI]:{chainId:ue.BASE_GOERLI,type:xt.TESTNET,name:"base-goerli",title:"Base Goerli",testnet:!0,blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"},deprecated:!0},[ue.BASE_SEPOLIA]:{chainId:ue.BASE_SEPOLIA,type:xt.TESTNET,name:"base-sepolia",title:"Base Sepolia",testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"}},[ue.HOMEVERSE]:{chainId:ue.HOMEVERSE,type:xt.MAINNET,name:"homeverse",title:"Oasys Homeverse",blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"}},[ue.HOMEVERSE_TESTNET]:{chainId:ue.HOMEVERSE_TESTNET,type:xt.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",testnet:!0,blockExplorer:{name:"Oasys Homeverse Explorer (Testnet)",rootUrl:"https://explorer.testnet.oasys.homeverse.games/"}},[ue.HARDHAT]:{chainId:ue.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)"},[ue.HARDHAT_2]:{chainId:ue.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)"}};function Pp(){return Pp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),o=i.filter((c,f)=>i.indexOf(c)!==f);if(o.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${o}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const s=n.map(c=>c.name).sort(),a=s.filter((c,f)=>s.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(SG(t,!0,e),t),TG=t=>kG(PG(t)),PG=t=>{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Jg=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",RG=t=>Jg("https://${network}-indexer.sequence.app",{network:t}),MG=t=>Jg("https://${network}-relayer.sequence.app",{network:t}),_G=t=>Jg("https://nodes.sequence.app/${network}",{network:t}),tr=t=>{const e=_G(t);return{rpcUrl:e,relayer:{url:MG(t),provider:{url:e}},indexerUrl:RG(t)}};TG([It({},Lt[ue.POLYGON],tr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),It({},Lt[ue.MAINNET],tr("mainnet")),It({},Lt[ue.BSC],tr("bsc")),It({},Lt[ue.AVALANCHE],tr("avalanche")),It({},Lt[ue.ARBITRUM],tr("arbitrum")),It({},Lt[ue.ARBITRUM_NOVA],tr("arbitrum-nova")),It({},Lt[ue.OPTIMISM],tr("optimism")),It({},Lt[ue.OPTIMISM_SEPOLIA],tr("optimism-sepolia")),It({},Lt[ue.POLYGON_ZKEVM],tr("polygon-zkevm")),It({},Lt[ue.GNOSIS],tr("gnosis")),It({},Lt[ue.RINKEBY],tr("rinkeby"),{disabled:!0}),It({},Lt[ue.GOERLI],tr("goerli"),{disabled:!0}),It({},Lt[ue.SEPOLIA],tr("sepolia")),It({},Lt[ue.POLYGON_MUMBAI],tr("mumbai")),It({},Lt[ue.BSC_TESTNET],tr("bsc-testnet")),It({},Lt[ue.ARBITRUM_SEPOLIA],tr("arbitrum-sepolia")),It({},Lt[ue.BASE],tr("base")),It({},Lt[ue.BASE_SEPOLIA],tr("base-sepolia")),It({},Lt[ue.HOMEVERSE_TESTNET],tr("homeverse-testnet")),It({},Lt[ue.AVALANCHE_TESTNET],tr("avalanche-testnet")),It({},Lt[ue.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),It({},Lt[ue.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]);class Bc extends Error{}Bc.prototype.name="InvalidTokenError";function IG(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function OG(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return IG(e)}catch{return atob(e)}}function NG(t,e){if(typeof t!="string")throw new Bc("Invalid token specified: must be a string");e||(e={});const r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new Bc(`Invalid token specified: missing part #${r+1}`);let i;try{i=OG(n)}catch(o){throw new Bc(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new Bc(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}const DG=t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},BG=t=>({httpHandler:t.httpHandler()});var k6;(function(t){t.HEADER="header",t.QUERY="query"})(k6||(k6={}));var T6;(function(t){t.HEADER="header",t.QUERY="query"})(T6||(T6={}));var zf;(function(t){t.HTTP="http",t.HTTPS="https"})(zf||(zf={}));var k0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(k0||(k0={}));var P6;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(P6||(P6={}));const Vf="__smithy_context";var R6;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(R6||(R6={}));var M6;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(M6||(M6={}));class wo{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static isInstance(e){if(!e)return!1;const r=e;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){const e=new wo({...this,headers:{...this.headers}});return e.query&&(e.query=LG(e.query)),e}}function LG(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class Rp{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const FG=t=>e=>async r=>{if(!wo.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:i=""}=t.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return e(r)},$G={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jG=t=>({applyToStack:e=>{e.add(FG(t),$G)}}),UG=()=>(t,e)=>async r=>{var n,i;try{const o=await t(r),{clientName:s,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f,overrideOutputFilterSensitiveLog:u}=c,d=f??e.inputFilterSensitiveLog,v=u??e.outputFilterSensitiveLog,{$metadata:g,...y}=o.output;return(n=l==null?void 0:l.info)==null||n.call(l,{clientName:s,commandName:a,input:d(r.input),output:v(y),metadata:g}),o}catch(o){const{clientName:s,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f}=c,u=f??e.inputFilterSensitiveLog;throw(i=l==null?void 0:l.error)==null||i.call(l,{clientName:s,commandName:a,input:u(r.input),error:o,metadata:o.$metadata}),o}},zG={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},VG=t=>({applyToStack:e=>{e.add(UG(),zG)}}),_6="X-Amzn-Trace-Id",HG="AWS_LAMBDA_FUNCTION_NAME",qG="_X_AMZN_TRACE_ID",GG=t=>e=>async r=>{const{request:n}=r;if(!wo.isInstance(n)||t.runtime!=="node"||n.headers.hasOwnProperty(_6))return e(r);const i=process.env[HG],o=process.env[qG],s=a=>typeof a=="string"&&a.length>0;return s(i)&&s(o)&&(n.headers[_6]=o),e({...r,request:n})},WG={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},KG=t=>({applyToStack:e=>{e.add(GG(t),WG)}}),l9=(t,e,r)=>{let n,i,o,s=!1;const a=async()=>{i||(i=t());try{n=await i,o=!0,s=!1}finally{i=void 0}return n};return e===void 0?async l=>((!o||l!=null&&l.forceRefresh)&&(n=await a()),n):async l=>((!o||l!=null&&l.forceRefresh)&&(n=await a()),s?n:r&&!r(n)?(s=!0,n):(e(n)&&await a(),n))};var pv={};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any diff --git a/index.html b/index.html index bcae4a0..edc5bb9 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Demo Waas App - +