1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1435],{5759:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});class r{isAvailable(){try{return"undefined"!=typeof window&&void 0!==window.localStorage}catch{return!1}}constructor({key:e,version:t}){this.key=`${e}.${t}`}set(e){if(this.isAvailable())try{let t=JSON.stringify(e);localStorage.setItem(this.key,t)}catch(e){console.warn(`Failed to save to storage [${this.key}]:`,e)}}get(){if(!this.isAvailable())return null;try{let e=localStorage.getItem(this.key);if(null===e)return null;return JSON.parse(e)}catch(e){return console.warn(`Failed to load from storage [${this.key}]:`,e),null}}remove(){if(this.isAvailable())try{localStorage.removeItem(this.key)}catch(e){console.warn(`Failed to remove from storage [${this.key}]:`,e)}}}},7325:(e,t,n)=>{"use strict";n.d(t,{W:()=>s});var r=n(20801),i=n(44724);function s(){let{client:e}=(0,i.f)();return{namespaces:(0,r.useMemo)(()=>e.getNamespaces(),[e])}}},7844:(e,t,n)=>{"use strict";function r(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}function i(e,t=""){if("number"!=typeof e){let n=t&&`"${t}" `;throw TypeError(`${n}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let n=t&&`"${t}" `;throw RangeError(`${n}expected integer >= 0, got ${e}`)}}function s(e,t,n=""){let i=r(e),o=e?.length,a=void 0!==t;if(!i||a&&o!==t){let r=(n&&`"${n}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(i?`length=${o}`:`type=${typeof e}`);if(!i)throw TypeError(r);throw RangeError(r)}return e}function o(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function a(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function l(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}n.d(t,{ev:()=>e8});let c="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function h(e){if(s(e),c)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=u[e[n]];return t}let d={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function p(e){if("string"!=typeof e)throw TypeError("hex string expected, got "+typeof e);if(c)try{return Uint8Array.fromHex(e)}catch(e){if(e instanceof SyntaxError)throw RangeError(e.message);throw e}let t=e.length,n=t/2;if(t%2)throw RangeError("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=f(e.charCodeAt(i)),s=f(e.charCodeAt(i+1));if(void 0===n||void 0===s)throw RangeError('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);r[t]=16*n+s}return r}class g{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=l(this.buffer)}update(e){o(this),s(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);if(o===r){let t=l(e);for(;r<=i-s;s+=r)this.process(t,s);continue}n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){o(this);s(e,void 0,"digestInto() output");let t=this.outputLen;if(e.length<t)throw RangeError('"digestInto() output" expected to be of length >='+t);this.finished=!0;let{buffer:n,view:r,blockLen:i,isLE:c}=this,{pos:u}=this;n[u++]=128,a(this.buffer.subarray(u)),this.padOffset>i-u&&(this.process(r,0),u=0);for(let e=u;e<i;e++)n[e]=0;r.setBigUint64(i-8,BigInt(8*this.length),c),this.process(r,0);let h=l(e),d=this.outputLen;if(d%4)throw Error("_sha2: outputLen must be aligned to 32bit");let f=d/4,p=this.get();if(f>p.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<f;e++)h.setUint32(4*e,p[e],c)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){(e||=new this.constructor).set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.destroyed=s,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}
1let m=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]),y=BigInt(0x100000000-1),w=BigInt(32),b=(e,t,n)=>e>>>n,N=(e,t,n)=>e<<32-n|t>>>n,v=(e,t,n)=>e>>>n|t<<32-n,I=(e,t,n)=>e<<32-n|t>>>n,x=(e,t,n)=>e<<64-n|t>>>n-32,C=(e,t,n)=>e>>>n-32|t<<64-n;function M(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/0x100000000|0)|0,l:0|i}}let E=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),j=(e,t,n,r)=>t+n+r+(e/0x100000000|0)|0,A=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),S=(e,t,n,r,i)=>t+n+r+i+(e/0x100000000|0)|0,D=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),T=(e,t,n,r,i,s)=>t+n+r+i+s+(e/0x100000000|0)|0,O=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),_=new Uint32Array(64),L=function(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let s=0;s<n;s++){let{h:n,l:o}=function(e,t=!1){return t?{h:Number(e&y),l:Number(e>>w&y)}:{h:0|Number(e>>w&y),l:0|Number(e&y)}}(e[s],t);[r[s],i[s]]=[n,o]}return[r,i]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
15771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),z=L[0],U=L[1],R=new Uint32Array(80),k=new Uint32Array(80);class P extends g{constructor(e){super(128,e,16,!1)}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:s,Dh:o,Dl:a,Eh:l,El:c,Fh:u,Fl:h,Gh:d,Gl:f,Hh:p,Hl:g}=this;return[e,t,n,r,i,s,o,a,l,c,u,h,d,f,p,g]}set(e,t,n,r,i,s,o,a,l,c,u,h,d,f,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|o,this.Dl=0|a,this.Eh=0|l,this.El=0|c,this.Fh=0|u,this.Fl=0|h,this.Gh=0|d,this.Gl=0|f,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let n=0;n<16;n++,t+=4)R[n]=e.getUint32(t),k[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|R[e-15],n=0|k[e-15],r=v(t,n,1)^v(t,n,8)^b(t,n,7),i=I(t,n,1)^I(t,n,8)^N(t,n,7),s=0|R[e-2],o=0|k[e-2],a=v(s,o,19)^x(s,o,61)^b(s,o,6),l=A(i,I(s,o,19)^C(s,o,61)^N(s,o,6),k[e-7],k[e-16]),c=S(l,r,a,R[e-7],R[e-16]);R[e]=0|c,k[e]=0|l}let{Ah:n,Al:r,Bh:i,Bl:s,Ch:o,Cl:a,Dh:l,Dl:c,Eh:u,El:h,Fh:d,Fl:f,Gh:p,Gl:g,Hh:m,Hl:y}=this;for(let e=0;e<80;e++){let t=v(u,h,14)^v(u,h,18)^x(u,h,41),w=I(u,h,14)^I(u,h,18)^C(u,h,41),b=u&d^~u&p,N=D(y,w,h&f^~h&g,U[e],k[e]),A=T(N,m,t,b,z[e],R[e]),S=0|N,O=v(n,r,28)^x(n,r,34)^x(n,r,39),_=I(n,r,28)^C(n,r,34)^C(n,r,39),L=n&i^n&o^i&o,P=r&s^r&a^s&a;m=0|p,y=0|g,p=0|d,g=0|f,d=0|u,f=0|h,({h:u,l:h}=M(0|l,0|c,0|A,0|S)),l=0|o,c=0|a,o=0|i,a=0|s,i=0|n,s=0|r;let B=E(S,_,P);n=j(B,A,O,L),r=0|B}({h:n,l:r}=M(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:s}=M(0|this.Bh,0|this.Bl,0|i,0|s)),({h:o,l:a}=M(0|this.Ch,0|this.Cl,0|o,0|a)),({h:l,l:c}=M(0|this.Dh,0|this.Dl,0|l,0|c)),({h:u,l:h}=M(0|this.Eh,0|this.El,0|u,0|h)),({h:d,l:f}=M(0|this.Fh,0|this.Fl,0|d,0|f)),({h:p,l:g}=M(0|this.Gh,0|this.Gl,0|p,0|g)),({h:m,l:y}=M(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(n,r,i,s,o,a,l,c,u,h,d,f,p,g,m,y)}roundClean(){a(R,k)}destroy(){this.destroyed=!0,a(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class B extends P{Ah=0|m[0];Al=0|m[1];Bh=0|m[2];Bl=0|m[3];Ch=0|m[4];Cl=0|m[5];Dh=0|m[6];Dl=0|m[7];Eh=0|m[8];El=0|m[9];Fh=0|m[10];Fl=0|m[11];Gh=0|m[12];Gl=0|m[13];Hh=0|m[14];Hl=0|m[15];constructor(){super(64)}}let Q=function(e,t={}){let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}(()=>new B,{oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,3])}),W=(e,t,n)=>s(e,t,n),F=(...e)=>(function(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];s(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n})(...e),G=e=>(function(e=32){i(e,"bytesLength");let t="object"==typeof globalThis?globalThis.crypto:null;if("function"!=typeof t?.getRandomValues)throw Error("crypto.getRandomValues must be defined");if(e>65536)throw RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))})(e),Y=BigInt(0),$=BigInt(1);function q(e,t=""){if("boolean"!=typeof e)throw TypeError((t&&`"${t}" `)+"expected boolean, got type="+typeof e);return e}function Z(e,t=""){if("number"!=typeof e)throw TypeError((t&&`"${t}" `)+"expected number, got type="+typeof e);if(!Number.isSafeInteger(e))throw RangeError((t&&`"${t}" `)+"expected safe integer, got "+e)}function H(e){if("string"!=typeof e)throw TypeError("hex string expected, got "+typeof e);return""===e?Y:BigInt("0x"+e)}function V(e){return H(h(X(s(e)).reverse()))}function K(e,t){if(i(t),0===t)throw RangeError("zero length");let n=(e=function(e){if("bigint"==typeof e){if(!ee(e))throw RangeError("positive bigint expected, got "+e)}else i(e);return e}(e)).toString(16);if(n.length>2*t)throw RangeError("number too large");return p(n.padStart(2*t,"0"))}function X(e){return Uint8Array.from(W(e))}function J(e){if("string"!=typeof e)throw TypeError("ascii string expected, got "+typeof e);return Uint8Array.from(e,(t,n)=>{let r=t.charCodeAt(0);if(1!==t.length||r>
1127)throw RangeError(`string contains non-ASCII character "${e[n]}" with code ${r} at position ${n}`);return r})}let ee=e=>"bigint"==typeof e&&Y<=e;function et(e,t,n,r){if(!(ee(t)&&ee(n)&&ee(r))||!(n<=t)||!(t<r))throw RangeError("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function en(e,t={},n={}){if("[object Object]"!==Object.prototype.toString.call(e))throw TypeError("expected valid options object");let r=(t,n)=>Object.entries(t).forEach(([t,r])=>(function(t,n,r){if(!r&&"function"!==n&&!Object.hasOwn(e,t))throw TypeError(`param "${t}" is invalid: expected own property`);let i=e[t];if(r&&void 0===i)return;let s=typeof i;if(s!==n||null===i)throw TypeError(`param "${t}" is invalid: expected ${n}, got ${s}`)})(t,r,n));r(t,!1),r(n,!0)}let er=()=>{throw Error("not implemented")},ei=BigInt(0),es=BigInt(1),eo=BigInt(2),ea=BigInt(3),el=BigInt(4),ec=BigInt(5),eu=BigInt(7),eh=BigInt(8),ed=BigInt(9),ef=BigInt(16);function ep(e,t){if(t<=ei)throw Error("mod: expected positive modulus, got "+t);let n=e%t;return n>=ei?n:t+n}function eg(e,t,n){if(t<ei)throw Error("pow2: expected non-negative exponent, got "+t);let r=e;for(;t-- >ei;)r*=r,r%=n;return r}function em(e,t){if(e===ei)throw Error("invert: expected non-zero number");if(t<=ei)throw Error("invert: expected positive modulus, got "+t);let n=ep(e,t),r=t,i=ei,s=es,o=es,a=ei;for(;n!==ei;){let e=r/n,t=r-n*e,l=i-o*e,c=s-a*e;r=n,n=t,i=o,s=a,o=l,a=c}if(r!==es)throw Error("invert: does not exist");return ep(i,t)}function ey(e,t,n){if(!e.eql(e.sqr(t),n))throw Error("Cannot find square root")}function ew(e,t){let n=(e.ORDER+es)/el,r=e.pow(t,n);return ey(e,r,t),r}function eb(e,t){let n=(e.ORDER-ec)/eh,r=e.mul(t,eo),i=e.pow(r,n),s=e.mul(t,i),o=e.mul(e.mul(s,eo),i),a=e.mul(s,e.sub(o,e.ONE));return ey(e,a,t),a}function eN(e){if(e<ea)throw Error("sqrt is not defined for small field");let t=e-es,n=0;for(;t%eo===ei;)t/=eo,n++;let r=eo,i=ej(e);for(;1===eC(i,r);)if(r++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===n)return ew;let s=i.pow(r,t),o=(t+es)/eo;return function(e,r){if(e.is0(r))return r;if(1!==eC(e,r))throw Error("Cannot find square root");let i=n,a=e.mul(e.ONE,s),l=e.pow(r,t),c=e.pow(r,o);for(;!e.eql(l,e.ONE);){if(e.is0(l))return e.ZERO;let t=1,n=e.sqr(l);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw Error("Cannot find square root");let r=es<<BigInt(i-t-1),s=e.pow(a,r);i=t,a=e.sqr(s),l=e.mul(l,a),c=e.mul(c,s)}return c}}let ev=(e,t)=>
1(ep(e,t)&es)===es,eI=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ex(e,t,n=!1){let r=Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),s=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),s),r}function eC(e,t){let n=(e.ORDER-es)/eo,r=e.pow(t,n),i=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),o=e.eql(r,e.neg(e.ONE));if(!i&&!s&&!o)throw Error("invalid Legendre symbol result");return i?1:s?0:-1}let eM=new WeakMap;class eE{ORDER;BITS;BYTES;isLE;ZERO=ei;ONE=es;_lengths;_mod;constructor(e,t={}){let n;if(e<=es)throw Error("invalid field: expected ORDER > 1, got "+e);this.isLE=!1,null!=t&&"object"==typeof t&&("number"==typeof t.BITS&&(n=t.BITS),"function"==typeof t.sqrt&&Object.defineProperty(this,"sqrt",{value:t.sqrt,enumerable:!0}),"boolean"==typeof t.isLE&&(this.isLE=t.isLE),t.allowedLengths&&(this._lengths=Object.freeze(t.allowedLengths.slice())),"boolean"==typeof t.modFromBytes&&(this._mod=t.modFromBytes));let{nBitLength:r,nByteLength:s}=function(e,t){if(void 0!==t&&i(t),e<=ei)throw Error("invalid n length: expected positive n, got "+e);if(void 0!==t&&t<1)throw Error("invalid n length: expected positive bit length, got "+t);let n=function(e){let t;if(e<Y)throw Error("expected non-negative bigint, got "+e);for(t=0;e>Y;e>>=$,t+=1);return t}(e);if(void 0!==t&&t<n)throw Error(`invalid n length: expected bit length (${n}) >= n.length (${t})`);let r=void 0!==t?t:n,s=Math.ceil(r/8);return{nBitLength:r,nByteLength:s}}(e,n);if(s>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=e,this.BITS=r,this.BYTES=s,Object.freeze(this)}create(e){return ep(e,this.ORDER)}isValid(e){if("bigint"!=typeof e)throw TypeError("invalid field element: expected bigint, got "+typeof e);return ei<=e&&e<this.ORDER}is0(e){return e===ei}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&es)===es}neg(e){return ep(-e,this.ORDER)}eql(e,t){return e===t}sqr(e){return ep(e*e,this.ORDER)}add(e,t){return ep(e+t,this.ORDER)}sub(e,t){return ep(e-t,this.ORDER)}mul(e,t){return ep(e*t,this.ORDER)}pow(e,t){var n=t;if(n<ei)throw Error("invalid exponent, negatives unsupported");if(n===ei)return this.ONE;if(n===es)return e;let r=this.ONE,i=e;for(;n>ei;)n&es&&(r=this.mul(r,i)),i=this.sqr(i),n>>=es;return r}div(e,t){return ep(e*em(t,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,t){return e+t}subN(e,t){return e-t}mulN(e,t){return e*t}inv(e){return em(e,this.ORDER)}sqrt(e){var t;let n=eM.get(this);return n||eM.set(this,n=(t=this.ORDER)%el===ea?ew:t%eh===ec?eb:t%ef===ed?function(e){let t=ej(e),n=eN(e),r=n(t,t.neg(t.ONE)),i=n(t,r),s=n(t,t.neg(r)),o=(e+eu)/ef;return(e,t)=>{let n=e.pow(t,o),a=e.mul(n,r),l=e.mul(n,i),c=e.mul(n,s),u=e.eql(e.sqr(a),t),h=e.eql(e.sqr(l),t);n=e.cmov(n,a,u),a=e.cmov(c,l,h);let d=e.eql(e.sqr(a),t),f=e.cmov(n,a,d);return ey(e,f,t),f}}(t):eN(t)),n(this,e)}toBytes(e){return this.isLE?K(e,this.BYTES).reverse():K(e,this.BYTES)}fromBytes(e,t=!1){W(e);let{_lengths:n,BYTES:r,isLE:i,ORDER:s,_mod:o}=this;if(n){if(e.length<1||!n.includes(e.length)||e.length>r)throw Error("Field.fromBytes: expected "+n+" bytes, got "+e.length);let t=new Uint8Array(r);t.set(e,i?0:t.length-e.length),e=t}if(e.length!==r)throw Error("Field.fromBytes: expected "+r+" bytes, got "+e.length);let a=i?V(e):H(h(e));if(o&&(a=ep(a,s)),!t&&!this.isValid(a))throw Error("invalid field element: outside of range 0..ORDER");return a}invertBatch(e){return ex(this,e)}cmov(e,t,n){return q(n,"condition"),n?t:e}}function ej(e,t={}){return new eE(e,t)}Object.freeze(eE.prototype);let eA=BigInt(0),eS=BigInt(1);function eD(e,t){let n=t.negate();return e?n:t}function eT(e,t){let n=ex(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function eO(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function e_(e,t){eO(e,t);let n=Math.ceil(t/e)+1,r=2**(e-1),i=2**e;return{windows:n,windowSize:r,mask:($<<BigInt(e))-$,maxNumber:i,shiftBy:BigInt(e)}}
vendor: 1,188 bytes, line 1
1function eL(e,t,n){let{windowSize:r,mask:i,maxNumber:s,shiftBy:o}=n,a=Number(e&i),l=e>>o;a>r&&(a-=s,l+=eS);let c=t*r,u=c+Math.abs(a)-1,h=0===a;return{nextN:l,offset:u,isZero:h,isNeg:a<0,isNegF:t%2!=0,offsetF:c}}let ez=new WeakMap,eU=new WeakMap;function eR(e){return eU.get(e)||1}function ek(e){if(e!==eA)throw Error("invalid wNAF")}class eP{BASE;ZERO;Fn;bits;constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>eA;)t&eS&&(n=n.add(r)),r=r.double(),t>>=eS;return n}precomputeWindow(e,t){let{windows:n,windowSize:r}=e_(t,this.bits),i=[],s=e,o=s;for(let e=0;e<n;e++){o=s,i.push(o);for(let e=1;e<r;e++)o=o.add(s),i.push(o);s=o.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw Error("invalid scalar");let r=this.ZERO,i=this.BASE,s=e_(e,this.bits);for(let e=0;e<s.windows;e++){let{nextN:o,offset:a,isZero:l,isNeg:c,isNegF:u,offsetF:h}=eL(n,e,s);n=o,l?i=i.add(eD(u,t[h])):r=r.add(eD(c,t[a]))}return ek(n),{p:r,f:i}}wNAFUnsafe(e,t,n,r=this.ZERO){let i=e_(e,this.bits);for(let e=0;e<i.windows&&n!==eA;e++){let{nextN:s,offset:o,isZero:a,isNeg:l}=eL(n,e,i);if(n=s,!a){let e=t[o];r=r.add(l?e.negate():e)}}return ek(n),r}
1getPrecomputes(e,t,n){let r=ez.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"==typeof n&&(r=n(r)),ez.set(t,r))),r}cached(e,t,n){let r=eR(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){let i=eR(e);return 1===i?this._unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){eO(t,this.bits),eU.set(e,t),ez.delete(e)}hasCache(e){return 1!==eR(e)}}function eB(e,t,n){if(!t)return ej(e,{isLE:n});if(t.ORDER!==e)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return!function(e){if(en(e,eI.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",BYTES:"number",BITS:"number"})),Z(e.BYTES,"BYTES"),Z(e.BITS,"BITS"),e.BYTES<1||e.BITS<1)throw Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=es)throw Error("invalid field: expected ORDER > 1, got "+e.ORDER)}(t),t}let eQ=BigInt(0),eW=BigInt(1),eF=BigInt(2),eG=BigInt(8);class eY{static BASE;static ZERO;static Fp;static Fn;ep;constructor(e){this.ep=e}static fromBytes(e){er()}static fromHex(e){er()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return h(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.ep.precompute(e,t),this}}function e$(e,t){if(Z(e),Z(t),t<0||t>4)throw Error("invalid I2OSP length: "+t);if(e<0||e>2**(8*t)-1)throw Error("invalid I2OSP input: "+e);let n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function eq(e,t,n,i){W(e),Z(n),(t=function(e){if(!r(e)&&"string"!=typeof e)throw Error("DST must be Uint8Array or ascii string");let t="string"==typeof e?J(e):e;if(0===t.length)throw Error("DST must be non-empty");return t}(t)).length>255&&(t=i(F(J("H2C-OVERSIZE-DST-"),t)));let{outputLen:s,blockLen:o}=i,a=Math.ceil(n/s);if(n>65535||a>255)throw Error("expand_message_xmd: invalid lenInBytes");let l=F(t,e$(t.length,1)),c=new Uint8Array(o),u=e$(n,2),h=Array(a),d=i(F(c,e,u,e$(0,1),l));h[0]=i(F(d,e$(1,1),l));for(let e=1;e<a;e++){let t=[function(e,t){let n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}(d,h[e-1]),e$(e+1,1),l];h[e]=i(F(...t))}return F(...h).slice(0,n)}let eZ="HashToScalar-",eH=BigInt(0),eV=BigInt(1),eK=BigInt(2),eX=BigInt(5),eJ=BigInt(8),e0=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),e1={p:e0,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:eJ,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")},e2=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function e3(e,t){let n=ep(t*t*t,e0),r=function(e){let t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),s=e*e%e0*e%e0,o=eg(s,eK,e0)*s%e0,a=eg(o,eV,e0)*e%e0,l=eg(a,eX,e0)*a%e0,c=eg(l,t,e0)*l%e0,u=eg(c,n,e0)*c%e0,h=eg(u,r,e0)*u%e0,d=eg(h,i,e0)*h%e0,f=eg(d,i,e0)*h%e0,p=eg(f,t,e0)*l%e0;return{pow_p_5_8:eg(p,eK,e0)*e%e0,b2:s}}(e*ep(n*n*t,e0)).pow_p_5_8,i=ep(e*n*r,e0),s=ep(t*i*i,e0),o=i,a=ep(i*e2,e0),l=s===e,c=s===ep(-e,e0),u=s===ep(-e*e2,e0);return l&&(i=o),(c||u)&&(i=a),ev(i,e0)&&(i=ep(-i,e0)),{isValid:l||c,value:i}}let e4=function(e,t={}){let n=function(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let n=t[e];if(!("bigint"==typeof n&&n>eA))throw Error(`CURVE.${e} must be positive bigint`)}let i=eB(t.p,n.Fp,r),s=eB(t.n,n.Fn,r);for(let n of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!i.isValid(t[n]))throw Error(`CURVE.${n} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:s}}("edwards",e,t,t.FpFnLE),{Fp:r,Fn:i}=n,s=n.CURVE,{h:o}=s;en(t,{},{uvRatio:"function"});let a=eF<<BigInt(8*i.BYTES)-eW,l=e=>r.create(e),c=void 0===t.uvRatio?(e,t)=>{try{return{isValid:!0,value:r.sqrt(r.div(e,t))}}catch(e){return{isValid:!1,value:eQ}}}:t.uvRatio;if(!function(e,t,n,r){let i=e.sqr(n),s=e.sqr(r),o=e.add(e.mul(t.a,i),s),a=e.add(e.ONE,e.mul(t.d,e.mul(i,s)));return e.eql(o,a)}(r,s,s.Gx,s.Gy))throw Error("bad curve params: generator point");function u(e,t,n=!1){return et("coordinate "+e,t,n?eW:eQ,a),t}function d(e){if(!(e instanceof f))throw Error("EdwardsPoint expected")}class f{static BASE=new f(s.Gx,s.Gy,eW,l(s.Gx*s.Gy));static ZERO=new f(eQ,eW,eW,eQ);static Fp=r;static Fn=i;X;Y;Z;T;constructor(e,t,n,r){this.X=u("x",e),this.Y=u("y",t),this.Z=u("z",n,!0),this.T=u("t",r),Object.freeze(this)}static CURVE(){return s}static fromAffine(e){if(e instanceof f)throw Error("extended point not allowed");let{x:t,y:n}=e||{};return u("x",t),u("y",n),new f(t,n,eW,l(t*n))}static fromBytes(e,t=!1){let n=r.BYTES,{a:i,d:o}=s;e=X(W(e,n,"point")),q(t,"zip215");let u=X(e),h=e[n-1];u[n-1]=-129&h;let d=V(u);et("point.y",d,eQ,t?a:r.ORDER);let p=l(d*d),{isValid:g,value:m}=c(l(p-eW),l(o*p-i));if(!g)throw Error("bad point: invalid y coordinate");let y=(m&eW)===eW,w=(128&h)!=0;if(!t&&m===eQ&&w)throw Error("bad point: x=0 and x_0=1");return w!==y&&(m=l(-m)),f.fromAffine({x:m,y:d})}static fromHex(e,t=!1){return f.fromBytes(p(e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return g.createCache(this,e),t||this.multiply(eF),this}assertValidity(){let{a:e,d:t}=s;if(this.is0())throw Error("bad point: ZERO");let{X:n,Y:r,Z:i,T:o}=this,a=l(n*n),c=l(r*r),u=l(i*i),h=l(u*u),d=l(a*e);if(l(u*l(d+c))!==l(h+l(t*l(a*c))))throw Error("bad point: equation left != right (1)");
1if(l(n*r)!==l(i*o))throw Error("bad point: equation left != right (2)")}equals(e){d(e);let{X:t,Y:n,Z:r}=this,{X:i,Y:s,Z:o}=e,a=l(t*o),c=l(i*r),u=l(n*o),h=l(s*r);return a===c&&u===h}is0(){return this.equals(f.ZERO)}negate(){return new f(l(-this.X),this.Y,this.Z,l(-this.T))}double(){let{a:e}=s,{X:t,Y:n,Z:r}=this,i=l(t*t),o=l(n*n),a=l(eF*l(r*r)),c=l(e*i),u=t+n,h=l(l(u*u)-i-o),d=c+o,p=d-a,g=c-o,m=l(h*p),y=l(d*g),w=l(h*g);return new f(m,y,l(p*d),w)}add(e){d(e);let{a:t,d:n}=s,{X:r,Y:i,Z:o,T:a}=this,{X:c,Y:u,Z:h,T:p}=e,g=l(r*c),m=l(i*u),y=l(a*n*p),w=l(o*h),b=l((r+i)*(c+u)-g-m),N=w-y,v=w+y,I=l(m-t*g),x=l(b*N),C=l(v*I),M=l(b*I);return new f(x,C,l(N*v),M)}subtract(e){return d(e),this.add(e.negate())}multiply(e){if(!i.isValidNot0(e))throw RangeError("invalid scalar: expected 1 <= sc < curve.n");let{p:t,f:n}=g.cached(this,e,e=>eT(f,e));return eT(f,[t,n])[0]}multiplyUnsafe(e){if(!i.isValid(e))throw RangeError("invalid scalar: expected 0 <= sc < curve.n");return e===eQ?f.ZERO:this.is0()||e===eW?this:g.unsafe(this,e,e=>eT(f,e))}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return g.unsafe(this,s.n).is0()}toAffine(e){let t=e,{X:n,Y:i,Z:s}=this,o=this.is0();null==t&&(t=o?eG:r.inv(s));let a=l(n*t),c=l(i*t),u=r.mul(s,t);if(o)return{x:eQ,y:eW};if(u!==eW)throw Error("invZ was invalid");return{x:a,y:c}}clearCofactor(){return o===eW?this:this.multiplyUnsafe(o)}toBytes(){let{x:e,y:t}=this.toAffine(),n=r.toBytes(t);return n[n.length-1]|=e&eW?128:0,n}toHex(){return h(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let g=new eP(f,i.BITS);return i.BITS>=8&&f.BASE.precompute(8),Object.freeze(f.prototype),Object.freeze(f),f}(e1,{uvRatio:e3}),e5=e4.Fp,e6=e4.Fn,e8=function(e,t,n={}){if("function"!=typeof t)throw Error('"hash" function param is required');en(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",zip215:"boolean",mapToCurve:"function"});let{prehash:i}=n,{BASE:s,Fp:o,Fn:a}=e,l=t.outputLen,c=2*o.BYTES;if(void 0!==l&&(Z(l,"hash.outputLen"),l!==c))throw Error(`hash.outputLen must be ${c}, got ${l}`);let u=void 0===n.randomBytes?G:n.randomBytes,h=void 0===n.adjustScalarBytes?e=>e:n.adjustScalarBytes,d=void 0===n.domain?(e,t,n)=>{if(q(n,"phflag"),t.length||n)throw Error("Contexts/pre-hash are not supported");return e}:n.domain;function f(e){return a.create(V(e))}function p(e){let{head:n,prefix:r,scalar:i}=function(e){let n=b.secretKey;W(e,b.secretKey,"secretKey");let r=W(t(e),2*n,"hashedSecretKey"),i=h(r.slice(0,n)),s=r.slice(n,2*n),o=f(i);return{head:i,prefix:s,scalar:o}}(e),o=s.multiply(i),a=o.toBytes();return{head:n,prefix:r,scalar:i,point:o,pointBytes:a}}function g(e){return p(e).pointBytes}function m(e=Uint8Array.of(),...n){return f(t(d(F(...n),W(e,void 0,"context"),!!i)))}let y={zip215:n.zip215},w=o.BYTES,b={secretKey:w,publicKey:w,signature:2*w,seed:w};function N(e){return W(e=void 0===e?u(b.seed):e,b.seed,"seed")}let v={getExtendedPublicKey:p,randomSecretKey:N,isValidSecretKey:function(e){return r(e)&&e.length===b.secretKey},isValidPublicKey:function(t,n){try{return!!e.fromBytes(t,void 0===n?y.zip215:n)}catch(e){return!1}},toMontgomery(t){let{y:n}=e.fromBytes(t),r=b.publicKey,i=32===r;if(!i&&57!==r)throw Error("only defined for 25519 and 448");let s=i?o.div(eW+n,eW-n):o.div(n-eW,n+eW);return o.toBytes(s)},toMontgomerySecret(e){let n=b.secretKey;return W(e,n),h(t(e.subarray(0,n))).subarray(0,n)}};return Object.freeze(b),Object.freeze(v),Object.freeze({keygen:function(e){let t=N(e);return{secretKey:t,publicKey:g(t)}},getPublicKey:g,sign:function(e,t,n={}){e=W(e,void 0,"message"),i&&(e=i(e));let{prefix:r,scalar:o,pointBytes:l}=p(t),c=m(n.context,r,e),u=s.multiply(c).toBytes(),h=m(n.context,u,l,e),d=a.create(c+h*o);if(!a.isValid(d))throw Error("sign failed: invalid s");return W(F(u,a.toBytes(d)),b.signature,"result")},verify:function(t,n,r,o=y){let a,l,c,{context:u}=o,h=void 0===o.zip215?!!y.zip215:o.zip215,d=b.signature;t=W(t,d,"signature"),n=W(n,void 0,"message"),r=W(r,b.publicKey,"publicKey"),void 0!==h&&q(h,"zip215"),i&&(n=i(n));let f=d/2,p=t.subarray(0,f),g=V(t.subarray(f,d));try{a=e.fromBytes(r,h),l=e.fromBytes(p,h),c=s.multiplyUnsafe(g)}catch(e){return!1}if(!h&&a.isSmallOrder())return!1;let w=m(u,p,r,n);return l.add(a.multiplyUnsafe(w)).subtract(c).clearCofactor().is0()},utils:v,Point:e,lengths:b})}(e4,Q,Object.assign({adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[3
11]|=64,e},zip215:!0},{})),e9=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),e7=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),te=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),tt=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),tn=e=>e3(eV,e),tr=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ti=e=>e5.create(V(e)&tr);function ts(e){let{d:t}=e1,n=e=>e5.create(e),r=n(e2*e*e),i=n((r+eV)*te),s=BigInt(-1),o=n((s-t*r)*n(r+t)),{isValid:a,value:l}=e3(i,o),c=n(l*e);ev(c,e0)||(c=n(-c)),a||(l=c),a||(s=r);let u=n(s*(r-eV)*tt-o),h=l*l,d=n((l+l)*o),f=n(u*e9),p=n(eV-h),g=n(eV+h);return new e4(n(d*g),n(p*f),n(f*g),n(d*p))}class to extends eY{static BASE=new to(e4.BASE);static ZERO=new to(e4.ZERO);static Fp=e5;static Fn=e6;constructor(e){super(e)}static fromAffine(e){return new to(e4.fromAffine(e))}assertSame(e){if(!(e instanceof to))throw Error("RistrettoPoint expected")}init(e){return new to(e)}static fromBytes(e){s(e,32);let{a:t,d:n}=e1,r=e=>e5.create(e),i=ti(e);if(!function(e,t){if(e=W(e),t=W(t),e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}(e5.toBytes(i),e)||ev(i,e0))throw Error("invalid ristretto255 encoding 1");let o=r(i*i),a=r(eV+t*o),l=r(eV-t*o),c=r(a*a),u=r(l*l),h=r(t*n*c-u),{isValid:d,value:f}=tn(r(h*u)),p=r(f*l),g=r(f*p*h),m=r((i+i)*p);ev(m,e0)&&(m=r(-m));let y=r(a*g),w=r(m*y);if(!d||ev(w,e0)||y===eH)throw Error("invalid ristretto255 encoding 2");return new to(new e4(m,y,eV,w))}static fromHex(e){return to.fromBytes(p(e))}toBytes(){let e,{X:t,Y:n,Z:r,T:i}=this.ep,s=e=>e5.create(e),o=s(s(r+n)*s(r-n)),a=s(t*n),l=s(a*a),{value:c}=tn(s(o*l)),u=s(c*o),h=s(c*a),d=s(u*h*i);if(ev(i*d,e0)){let r=s(n*e2),i=s(t*e2);t=r,n=i,e=s(u*e7)}else e=h;ev(t*d,e0)&&(n=s(-n));let f=s((r-n)*e);return ev(f,e0)&&(f=s(-f)),e5.toBytes(f)}equals(e){this.assertSame(e);let{X:t,Y:n}=this.ep,{X:r,Y:i}=e.ep,s=e=>e5.create(e),o=s(t*i)===s(n*r),a=s(n*i)===s(t*r);return o||a}is0(){return this.equals(to.ZERO)}}Object.freeze(to.BASE),Object.freeze(to.ZERO),Object.freeze(to.prototype),Object.freeze(to);let ta=Object.freeze({Point:to,hashToCurve(e,t){let n=eq(e,t?.DST===void 0?"ristretto255_XMD:SHA-512_R255MAP_RO_":t.DST,64,Q);return ta.deriveToCurve(n)},hashToScalar(e,t={DST:eZ}){let n=eq(e,t.DST,64,Q);return e6.create(V(n))},deriveToCurve(e){s(e,64);let t=ts(ti(e.subarray(0,32))),n=ts(ti(e.subarray(32,64)));return new to(t.add(n))}})},10484:e=>{e.exports={walletButton:"styles_module-U5TRY5PT_walletButton__9YqaW",icon:"styles_module-U5TRY5PT_icon__XumXR",meta:"styles_module-U5TRY5PT_meta__lOPUT",name:"styles_module-U5TRY5PT_name__1fEAZ",namespaces:"styles_module-U5TRY5PT_namespaces__p8sh_",error:"styles_module-U5TRY5PT_error__fj4im"}},10499:(e,t,n)=>{"use strict";n.d(t,{y:()=>o});var r=n(20801),i=n(11147),s=n(44724);function o(e){let{client:t}=(0,s.f)(),n=(0,r.useMemo)(()=>{if(!e){let e=[];return{onWallets:()=>()=>e,getWallets:()=>e}}return t.getNamespace(e)},[e]);if(!n)throw new i.V(e);return(0,r.useSyncExternalStore)(e=>n.onWallets(e),()=>n.getWallets(),()=>n.getWallets())}},10713:e=>{e.exports={link:"styles_module-VWMJAIVE_link__lUPVo"}},11147:(e,t,n)=>{"use strict";n.d(t,{T:()=>s,V:()=>i});var r=n(92973);class i extends r.C{constructor(e){super(`Namespace not found: ${e}`,"NAMESPACE_NOT_FOUND",{namespaceId:e}),this.name="NamespaceNotFoundError"}}class s extends r.C{constructor(e,t){super(`Account not found: ${e}`,"ACCOUNT_NOT_FOUND",{address:e,namespace:t}),this.name="AccountNotFoundError"}}},11246:e=>{e.exports={wcTitle:"styles_module-5FM5SDSC_wcTitle__ORp0e"}},17582:(e,t,n)=>{"use strict";n.d(t,{F:()=>r});let r="solana:signMessage"},20911:e=>{e.exports={description:"styles_module-JFMC6A5G_description__Rxv_O"}},21286:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},21329:e=>{e.exports={container:"styles_module-WGWNXHEK_container__B9Jbu"}},21911:e=>{e.exports={message:"styles_module-27BC6Q35_message__1dJ6v"}},22024:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(92973);class i extends r.C{constructor(e,t){super(`Invalid chain reference for ${t}: ${e}`,"INVALID_CHAIN_REF",{chainRef:e,namespace:t}),this.name="InvalidChainRefError"}}},22829:e=>{e.exports={searchBar:"styles_module-5L4UXGVZ_searchBar__My5tt",focused:"styles_module-5L4UXGVZ_focused__xdoR7",searchIcon:"styles_module-5L4UXGVZ_searchIcon__93DcK",input:"styles_module-5L4UXGVZ_input__vfuoy",clearButton:"styles_module-5L4UXGVZ_clearButton__rQCcc"}},23879:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var r=n(21286),i=new class extends r.Q{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if("undefined"!=typeof window&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n
1)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}}},28688:(e,t,n)=>{"use strict";n.d(t,{$:()=>a,s:()=>o});var r=n(61485),i=n(59852),s=n(49605),o=class extends i.k{#r;#i;#s;#o;constructor(e){super(),this.#r=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#i=[],this.state=e.state||a(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#i.includes(e)||(this.#i.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#i=this.#i.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#i.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#a({type:"continue"})},n={client:this.#r,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=(0,s.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let r="pending"===this.state.status,i=!this.#o.canStart();try{if(r)t();else{this.#a({type:"pending",variables:e,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:i})}let s=await this.#o.start();return await this.#s.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#s.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#a({type:"success",data:s}),s}catch(t){try{await this.#s.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#s.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#a({type:"error",error:t}),t}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),r.jG.batch(()=>{this.#i.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},28914:e=>{e.exports={sectionSub:"styles_module-5S7A3MI3_sectionSub__Ww2JD"}},29436:(e,t,n)=>{"use strict";n.d(t,{dV:()=>i,pJ:()=>s});var r=n(92973);class i extends r.C{constructor(e,t){super(`${e} must be used within ${t}`,"REACT_CONTEXT_ERROR",{hookName:e,providerName:t}),this.name="ReactContextError"}}class s extends r.C{constructor(e,t){super(t?`${e} is required. ${t}`:`${e} is required`,"MISSING_REQUIRED_PARAM",{paramName:e,context:t}),this.name="MissingRequiredParamError"}}r.C},29757:e=>{e.exports={header:"styles_module-GSNHG7ET_header__hdxKm",title:"styles_module-GSNHG7ET_title__HUKMm",close:"styles_module-GSNHG7ET_close__UxtDt",back:"styles_module-GSNHG7ET_back__6UHk0"}},29814:e=>{e.exports={placeholder:"styles_module-PXUDS327_placeholder__tJzM4"}},31488:e=>{e.exports={modal:"styles_module-5C4YIUDE_modal__RhFZ5",slideUpMobile:"styles_module-5C4YIUDE_slideUpMobile__Qt5nq"}}
1,33952:(e,t,n)=>{"use strict";n.d(t,{Gq:()=>a,LC:()=>o,Z:()=>s,_r:()=>c,qf:()=>l,yt:()=>i});var r=n(92973);class i extends r.C{constructor(){super("No active session","NO_ACTIVE_SESSION"),this.name="NoActiveSessionError"}}class s extends r.C{constructor(){super("Connection already in progress","CONNECTION_IN_PROGRESS"),this.name="ConnectionInProgressError"}}class o extends r.C{constructor(e){super(`Wallet already connected: ${e}`,"WALLET_ALREADY_CONNECTED",{walletId:e}),this.name="WalletAlreadyConnectedError"}}class a extends r.C{constructor(e){super(e?`No wallet connected. Please connect a ${e} wallet first.`:"No wallet connected. Please connect a wallet first.","NO_WALLET_CONNECTED",{namespace:e}),this.name="NoWalletConnectedError"}}class l extends r.C{constructor(){super("No wallet found in connection","WALLET_NOT_FOUND_IN_CONNECTION"),this.name="WalletNotFoundInConnectionError"}}class c extends r.C{constructor(e,t){super(t?`Failed to connect to ${e}: ${t}`:`Failed to connect to ${e}`,"CONNECTION_FAILED",{walletName:e,reason:t}),this.name="ConnectionFailedError"}}},39885:(e,t,n)=>{"use strict";n.d(t,{e:()=>a});var r=n(20801),i=n(44724),s=n(77509),o=n(10499);function a({namespaceId:e}={}){let{client:t}=(0,i.f)(),n=(0,r.useSyncExternalStore)(e=>t.onError(e),()=>t.getError(),()=>t.getError()),l=(0,r.useSyncExternalStore)(e=>t.onIsLoading(e),()=>t.getIsLoading(),()=>t.getIsLoading()),c=(0,s.S)(),u=(0,o.y)(e),h=(0,r.useCallback)(async({wallet:e})=>{await t.connect({wallet:e})},[]),d=(0,r.useCallback)(({namespaceId:e}={})=>{t.disconnect({namespaceId:e})},[]),f=(0,r.useCallback)(({namespaceId:e}={})=>{t.abortConnect({namespaceId:e})},[]),p=(0,r.useSyncExternalStore)(e=>t.onConnectionAborted(e),()=>t.getConnectionAborted(),()=>t.getConnectionAborted());return{connect:h,disconnect:d,abortConnect:f,isConnectionAborted:p,clearError:(0,r.useCallback)(()=>{t.clearError()},[]),error:n,isLoading:l,wallets:e?u:c}}},40114:(e,t,n)=>{"use strict";n.d(t,{j:()=>s,k:()=>i});var r=n(92973);class i extends r.C{constructor(e){super(`No chain provided for ${e}`,"MISSING_CHAIN",{namespace:e}),this.name="MissingChainError"}}class s extends r.C{constructor(e,t){super("Wallet must have a namespaceId","MISSING_NAMESPACE_ID",{walletId:e,walletType:t}),this.name="MissingNamespaceIdError"}}},40643:e=>{e.exports={grid:"styles_module-Y3MUWEOL_grid__UNacC"}},41272:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var r=n(21286),i=new class extends r.Q{#l;#t;#n;constructor(){super(),this.#n=e=>{if("undefined"!=typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#l!==e&&(this.#l=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#l?this.#l:globalThis.document?.visibilityState!=="hidden"}}},41446:(e,t,n)=>{"use strict";n.d(t,{Kp:()=>l,My:()=>s,Tl:()=>c,aT:()=>o,if:()=>a,rk:()=>u});let r=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function s(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=r[e[n]];return t.join("")}function o(e){let t=e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e;if(t.length%2!=0)throw Error("Invalid hex string: odd length");if(!/^[0-9a-fA-F]*$/.test(t))throw Error("Invalid hex string: invalid chars");let n=new Uint8Array(t.length/2);for(let e=0;e<n.length;e++)n[e]=parseInt(t.slice(2*e,2*e+2),16);return n}function a(e){let t=[];for(let n=0;n<e.length;n+=8192){let r=e.subarray(n,n+8192);t.push(String.fromCharCode(...r))}return btoa(t.join(""))}function l(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function c(e){if(0===e.length)return"";let t=0;for(;t<e.length&&0===e[t];)t++;let n=0n;for(let r=t;r<e.length;r++)n=256n*n+BigInt(e[r]);let r=[];for(;n>0n;)r.push(i[Number(n%58n)]),n/=58n;return"1".repeat(t)+r.reverse().join("")}function u(e){if(0===e.length)return new Uint8Array(0);let t=0;for(;t<e.length&&"1"===e[t];)t++;let n=0n;for(let r=t;r<e.length;r++){let t=i.indexOf(e[r]);if(t<0)throw Error(`Invalid base58 character: ${e[r]}`);n=58n*n+BigInt(t)}let r=[];for(;n>0n;)r.push(Number(n%256n)),n/=256n;r.reverse();
1let s=new Uint8Array(t+r.length);return s.set(r,t),s}},43127:(e,t,n)=>{"use strict";n.d(t,{$:()=>s,N:()=>i});var r=n(92973);class i extends r.C{constructor(e,t){super(`Unsupported method: ${e}`,"UNSUPPORTED_METHOD",{method:e,namespace:t}),this.name="UnsupportedMethodError"}}class s extends r.C{constructor(e,t){super(`Chain not supported: ${e}`,"CHAIN_NOT_SUPPORTED",{chainId:e,supportedChains:t}),this.name="ChainNotSupportedError"}}},44724:(e,t,n)=>{"use strict";n.d(t,{w:()=>b,f:()=>N});var r=n(80069),i=n(20801),s=n(50340),o=n(71562),a=n(11147);class l{constructor(){this.isLoading=!1,this.error=null,this.events=new s.v}getConnectionAborted(){return this.connectionAborted}getWallets(){return this.wallets}getWallet(e){return this.wallets.find(t=>t.id===e||(0,o.P)(t.name)===e)}getConnections(){return this.connections}getNamespaces(){return this.namespaces}getServices(){return this.services}getIsLoading(){return this.isLoading}getError(){return this.error}setIsLoading(e){this.isLoading=e,this.events.emit("isLoading",this.isLoading)}setError(e){this.error=e,this.events.emit("error",this.error)}setConnectionAborted(e){return this.connectionAborted=e,this.events.emit("connectionAborted",this.connectionAborted)}onWallets(e){return this.events.on("wallets",e)}onConnections(e){return this.events.on("connections",e)}onConnectionAborted(e){return this.events.on("connectionAborted",e)}onIsLoading(e){return this.events.on("isLoading",e)}onError(e){return this.events.on("error",e)}onConnection(e,t){let n=this.namespaces.find(t=>t.id===e);if(!n)throw new a.V(e);return n.onConnection(t)}getNamespace(e){return this.namespaces.find(t=>t.id===e)}setConnection(e,t){this.connections={...this.connections,[e]:t},this.events.emit("connections",this.connections)}updateWallet(e,t){this.wallets=this.wallets.map(n=>n.id===e||(0,o.P)(n.name)===e?t(n):n),this.events.emit("wallets",this.wallets)}addWallets(e){this.wallets=[...this.wallets,...e],this.events.emit("wallets",this.wallets)}clearAllListeners(){this.namespaces.forEach(e=>e.clearAllListeners()),this.events.clear()}}let c={NAMESPACES:{EVENTS:{ADDRESS_CHANGED:["accountChanged","accountsChanged"],CHAIN_REFERENCE_CHANGED:["chainChanged"]}}};var u=n(5759);class h{constructor(){this.lastConnectedWalletId=new u.w({key:"trust-connect.caip.lastWallet",version:"0.0.0"})}saveLastConnectedWalletId(e){this.lastConnectedWalletId.set(e)}getLastConnectedWalletId(){return this.lastConnectedWalletId.get()}clearLastConnectedWalletId(){this.lastConnectedWalletId.remove()}}var d=n(77279),f=n(33952);class p extends h{constructor({namespaces:e,caipWallets:t}){for(let t of(super(),this.namespaces=new Map,e))this.namespaces.set(t.id,t);this.wallets=t||[],this.start()}start(){let e=this.getLastConnectedWalletId();if(e)for(let t of this.wallets)t.id===e&&this.reconnect({wallet:t})}async reconnect({wallet:e}){let t;this.startListeners(e);try{t=await e.__internal.reconnect()}catch{}finally{if(!t){e.__internal.clearAllListeners(),this.clearLastConnectedWalletId();return}}this.setConnections({session:t,wallet:e})}async connect(e){let t;this.startListeners(e);try{if(!(t=await e.__internal.connect()))throw new f.yt}catch(t){throw e.__internal.clearAllListeners(),t}this.setConnections({session:t,wallet:e})}disconnect(){for(let e of this.namespaces.values()){let t=e.getConnection();"connected"===t.status&&(t.wallet.__internal.clearAllListeners(),this.clearLastConnectedWalletId(),e.setConnection({status:"disconnected",wallet:void 0,address:void 0,chain:void 0}),t.wallet.__internal.disconnect())}}abortConnect(){for(let e of this.wallets)e.__internal.abortConnect(),e.__internal.clearAllListeners();for(let e of this.namespaces.values()){let t=e.getConnection();"connecting"===t.status&&t.wallet&&(t.wallet.__internal.abortConnect(),t.wallet.__internal.clearAllListeners(),this.clearLastConnectedWalletId(),e.setConnection({status:"disconnected",wallet:void 0,address:void 0,chain:void 0}))}}onSessionEvent(e){let{chainId:t,event:n}=e,r=(0,d.jT)(t),i=this.namespaces.get(r),s=i?.getConnection();if(s&&"connected"===s.status){if(c.NAMESPACES.EVENTS.ADDRESS_CHANGED.includes(n.name)){let e=n.data;s.wallet.__internal.setAddress(e[0])}else if(c.NAMESPACES.EVENTS.CHAIN_REFERENCE_CHANGED.includes(n.name)){let e=(0,d.wb)(n.data);s.wallet.__internal.setChain({namespace:r,reference:e})}}}setConnections({session:e,wallet:t}){let n=!1;for(let[r,i]of Object.entries(e.namespaces)){let e=i.accounts[0],s=i.chains[0];if(!e){console.error(`Wallet ${t.id} was unable to connect with namespace ${r}`);continue}let o=(0,d.MI)(e),a=(0,d.wb)(s),l=this.namespaces.get(r);if(!l){console.error(`Namespace ${r} not found`);continue}n=!0,l.setConnection({status:"connected",wallet:t,address:o,chain:{namespace:l.id,reference:a}})}n?this.saveLastConnectedWalletId(t.id):this.disconnect()}startListeners(e){e.__internal.clearAllListeners(),e.__internal.handleOnCaipSessionEvent(this.onSessionEvent.bind(this)),e.__internal.handleOnCaipSessionDelete(this.disconnect.bind(this)),e.__internal.startListeners()}}var g=n(40114);class m extends l{constructor(e){super(),this.wallets=[],this.connections={},this.namespaces=[],this.services=[],this.connectionAborted=!1;let t=[],n=new Map;this.namespaces=e.namespaces.map(e=>{let{namespace:t,scope:r}=e.__createNamespace();return n.set(t.id,r),t}),this.services=e.services?.map(e=>{let r=e.__createService({scopes:n});return r.caipWallet&&t.push(r.caipWallet),r})||[],this.caipController=new p({namespaces:this.namespaces,caipWallets:t}),this.start()}start(){for(let e of this.namespaces){let t=e.id,n=e.getWallets();this.computeNamespaceWallet({namespaceId:t,wallets:n});let r=e.getConnection();this.setConnection(t,r),e.onWallets(e=>{this.computeNamespaceWallet({namespaceId:t,wallets:e})}),e.onConnection(e=>{this.setConnection(t,e)})}}async connect({wallet:e}){try{if(this.setConnectionAborted(!1),this.setIsLoading(!0),this.setError(null),"caip"===e.type)return await this.caipController.connect(e);
1if(!e.namespaceIds.length)throw new g.j(e.id,e.type);let t=this.getNamespace(e.namespaceIds[0]);if(!t)throw new a.V(e.namespaceIds[0]);return await t.connect(e)}catch(t){let e=t instanceof Error?t:Error("object"==typeof t&&null!==t&&"message"in t?String(t.message):JSON.stringify(t));throw this.setError(e),e}finally{this.setIsLoading(!1)}}disconnect({namespaceId:e}={}){try{if(e)return void this.getNamespace(e)?.disconnect();for(let e of Object.values(this.connections))if(e.wallet?.type==="caip")this.caipController.disconnect();else for(let e of this.namespaces)e.disconnect()}catch(e){"message"in e&&console.error(e.message)}}abortConnect({namespaceId:e}={}){if(this.setConnectionAborted(!0),this.setIsLoading(!1),this.setError(null),e){let t=this.getNamespace(e);t&&t.abortConnect();return}for(let e of this.namespaces)e.abortConnect();this.caipController.abortConnect()}clearError(){this.setError(null)}computeNamespaceWallet({namespaceId:e,wallets:t}){let n=[];for(let r of t){let t,i=!1,s=(0,o.P)(r.name);(t=this.getWallet(r.id))||(i=!!(t=this.getWallet(s))),t?(r.id=t.id,this.updateWallet(i?s:r.id,t=>({...t,namespaceIds:new Set([...t.namespaceIds,...r.namespaceIds]),namespaces:{...t.namespaces,[e]:r}}))):n.push({id:r.id,name:r.name,type:r.type,icon:r.icon,namespaceIds:new Set([e]),namespaces:{[e]:r}})}n.length>0&&this.addWallets(n)}}var y=n(29436);let w=(0,i.createContext)(null);function b({children:e,config:t}){let[n]=(0,i.useState)(()=>new m(t));return(0,r.jsx)(w.Provider,{value:{client:n},children:e})}function N(){let e=(0,i.useContext)(w);if(!e)throw new y.dV("useTrustConnectContext","TrustConnectProvider");return e}},45679:e=>{e.exports={loading:"styles_module-GCRMKZIZ_loading__EjKVK"}},46945:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var r=n(20801),i=n(11147),s=n(44724);function o(e){let{namespaceId:t}=e,{client:n}=(0,s.f)(),o=(0,r.useMemo)(()=>{let e=n.getNamespace(t);if(!e)throw new i.V(t);return e},[t,n]),a=(0,r.useSyncExternalStore)(e=>o.onConnection(e),()=>o.getConnection(),()=>o.getConnection());return{connection:a,isConnected:"connected"===a.status,isConnecting:"connecting"===a.status,address:a.address,chain:a.chain,wallet:a.wallet,status:a.status}}},47132:e=>{e.exports={qr:"styles_module-BH6BB6HX_qr__GA74F"}},49327:(e,t,n)=>{"use strict";n.d(t,{H:()=>i});var r=n(96100),i=(()=>{let e=()=>r.S$;return{isServer:()=>e(),setIsServer(t){e=t}}})()},49605:(e,t,n)=>{"use strict";n.d(t,{cc:()=>c,v_:()=>l,II:()=>u});var r=n(41272),i=n(23879),s=n(49327),o=n(96100);function a(e){return Math.min(1e3*2**e,3e4)}function l(e){return(e??"online")!=="online"||i.t.isOnline()}var c=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function u(e){let t,n=!1,u=0,h=function(){let e,t,n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}(),d=()=>r.m.isFocused()&&("always"===e.networkMode||i.t.isOnline())&&e.canRun(),f=()=>l(e.networkMode)&&e.canRun(),p=e=>{"pending"===h.status&&(t?.(),h.resolve(e))},g=e=>{"pending"===h.status&&(t?.(),h.reject(e))},m=()=>new Promise(n=>{t=e=>{("pending"!==h.status||d())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,"pending"===h.status&&e.onContinue?.()}),y=()=>{let t;if("pending"!==h.status)return;let r=0===u?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(p).catch(t=>{if("pending"!==h.status)return;let r=e.retry??3*!s.H.isServer(),i=e.retryDelay??a,l="function"==typeof i?i(u,t):i,c=!0===r||"number"==typeof r&&u<r||"function"==typeof r&&r(u,t);if(n||!c)return void g(t);u++,e.onFail?.(u,t),(0,o.yy)(l).then(()=>d()?void 0:m()).then(()=>{n?g(t):y()})})};return{promise:h,status:()=>h.status,cancel:t=>{if("pending"===h.status){let n=new c(t);g(n),e.onCancel?.(n)}},continue:()=>(t?.(),h),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:f,start:()=>(f()?y():m().then(y),h)}}},49827:e=>{e.exports={actions:"styles_module-ZPYBUUD6_actions__HRpwo"}},50340:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});
1class r{constructor(){this.listeners=new Map}on(e,t){let n=this.listeners.get(e);return n||(n=new Set,this.listeners.set(e,n)),n.add(t),()=>this.off(e,t)}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))}emit(e,t){let n=this.listeners.get(e);if(n)for(let e of[...n])try{e(t)}catch(e){console.error(e)}}clear(e){e?this.listeners.delete(e):this.listeners.clear()}}},51524:(e,t,n)=>{"use strict";n.d(t,{M:()=>r,d:()=>i});let r={ID:"walletConnect",NAME:"WalletConnect",TYPE:"caip",ICON:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTYiIGhlaWdodD0iOTYiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzJfMjM1NjIpIj4KPHBhdGggZD0iTTk2IDQ4Qzk2IDIxLjQ5MDMgNzQuNTA5NyAwIDQ4IDBDMjEuNDkwMyAwIDAgMjEuNDkwMyAwIDQ4QzAgNzQuNTA5NyAyMS40OTAzIDk2IDQ4IDk2Qzc0LjUwOTcgOTYgOTYgNzQuNTA5NyA5NiA0OFoiIGZpbGw9InVybCgjcGFpbnQwX3JhZGlhbF8yXzIzNTYyKSIvPgo8cGF0aCBkPSJNMzEuNzI3NyAzNC41OTkxQzQwLjcxNTEgMjUuNzk5NiA1NS4yODY3IDI1Ljc5OTYgNjQuMjc0MSAzNC41OTkxTDY1LjM1NTcgMzUuNjU4MUM2NS44MDUxIDM2LjA5ODEgNjUuODA1MSAzNi44MTE0IDY1LjM1NTcgMzcuMjUxNEw2MS42NTU2IDQwLjg3NDFDNjEuNDMwOSA0MS4wOTQxIDYxLjA2NjcgNDEuMDk0MSA2MC44NDIgNDAuODc0MUw1OS4zNTM1IDM5LjQxNjhDNTMuMDgzNiAzMy4yNzgxIDQyLjkxODIgMzMuMjc4MSAzNi42NDgzIDM5LjQxNjhMMzUuMDU0MyA0MC45Nzc1QzM0LjgyOTYgNDEuMTk3NSAzNC40NjUzIDQxLjE5NzUgMzQuMjQwNiA0MC45Nzc1TDMwLjU0MDUgMzcuMzU0OEMzMC4wOTExIDM2LjkxNDggMzAuMDkxMSAzNi4yMDE1IDMwLjU0MDUgMzUuNzYxNUwzMS43Mjc3IDM0LjU5OTFaTTcxLjkyNjMgNDIuMDkxM0w3NS4yMTk0IDQ1LjMxNTVDNzUuNjY4OCA0NS43NTU1IDc1LjY2ODggNDYuNDY4OCA3NS4yMTk0IDQ2LjkwODhMNjAuMzcwNSA2MS40NDczQzU5LjkyMTIgNjEuODg3MyA1OS4xOTI2IDYxLjg4NzMgNTguNzQzMiA2MS40NDczQzU4Ljc0MzIgNjEuNDQ3MyA1OC43NDMyIDYxLjQ0NzMgNTguNzQzMiA2MS40NDczTDQ4LjIwNDQgNTEuMTI4OUM0OC4wOTIgNTEuMDE4OSA0Ny45MDk5IDUxLjAxODkgNDcuNzk3NiA1MS4xMjg5QzQ3Ljc5NzYgNTEuMTI4OSA0Ny43OTc2IDUxLjEyODkgNDcuNzk3NiA1MS4xMjg5TDM3LjI1OSA2MS40NDczQzM2LjgwOTYgNjEuODg3MyAzNi4wODEgNjEuODg3MyAzNS42MzE2IDYxLjQ0NzNDMzUuNjMxNiA2MS40NDczIDM1LjYzMTYgNjEuNDQ3MyAzNS42MzE2IDYxLjQ0NzNMMjAuNzgyMyA0Ni45MDg2QzIwLjMzMyA0Ni40Njg2IDIwLjMzMyA0NS43NTUzIDIwLjc4MjMgNDUuMzE1M0wyNC4wNzU1IDQyLjA5MTFDMjQuNTI0OCA0MS42NTExIDI1LjI1MzQgNDEuNjUxMSAyNS43MDI4IDQyLjA5MTFMMzYuMjQxOCA1Mi40MDk2QzM2LjM1NDEgNTIuNTE5NiAzNi41MzYyIDUyLjUxOTYgMzYuNjQ4NiA1Mi40MDk2QzM2LjY0ODYgNTIuNDA5NiAzNi42NDg2IDUyLjQwOTYgMzYuNjQ4NiA1Mi40MDk2TDQ3LjE4NyA0Mi4wOTExQzQ3LjYzNjQgNDEuNjUxMSA0OC4zNjUgNDEuNjUxMSA0OC44MTQ0IDQyLjA5MTFDNDguODE0NCA0Mi4wOTExIDQ4LjgxNDQgNDIuMDkxMSA0OC44MTQ0IDQyLjA5MTFMNTkuMzUzMyA1Mi40MDk2QzU5LjQ2NTcgNTIuNTE5NiA1OS42NDc4IDUyLjUxOTYgNTkuNzYwMiA1Mi40MDk2TDcwLjI5OSA0Mi4wOTEzQzcwLjc0ODMgNDEuNjUxMyA3MS40NzY5IDQxLjY1MTMgNzEuOTI2MyA0Mi4wOTEzWiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8ZGVmcz4KPHJhZGlhbEdyYWRpZW50IGlkPSJwYWludDBfcmFkaWFsXzJfMjM1NjIiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCA0OCkgc2NhbGUoOTYpIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzVEOURGNiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMDZGRkYiLz4KPC9yYWRpYWxHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yXzIzNTYyIj4KPHJlY3Qgd2lkdGg9Ijk2IiBoZWlnaHQ9Ijk2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},i={EIP155:{ID:"eip155",EVENTS:{ACCOUNTS_CHANGED:"accountsChanged",CHAIN_CHANGED:"chainChanged"}},SOLANA:{ID:"solana",EVENTS:{ACCOUNTS_CHANGED:"accountsChanged",CHAIN_CHANGED:"chainChanged"}},BIP122:{ID:"bip122",EVENTS:{ACCOUNTS_CHANGED:"accountsChanged",CHAIN_CHANGED:"chainChanged"}}}},52255:e=>{e.exports={error:"styles_module-5TDOAM3X_error__tSx_s"}},52644:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});let r="solana:signOffchainMessage"},54090:e=>{e.exports={grid:"styles_module-KIOD6JAJ_grid__yUI_n"}},55381:e=>{e.exports={button:"styles_module-YJSZIZTZ_button__26GId"}},56869:(e,t,n)=>{"use strict";n.d(t,{Gv:()=>r,I8:()=>i,Xg:()=>s});let r={CONNECT:"standard:connect",DISCONNECT:"standard:disconnect",EVENTS:"standard:events",SIGN_TRANSACTION:"solana:signTransaction",SIGN_AND_SEND_TRANSACTION:"solana:signAndSendTransaction",SIGN_MESSAGE:"solana:signMessage"},i={ID:"solana",NAME:"Solana",CHAINS:[],METHODS:{GET_ACCOUNTS:"getAccounts",REQUEST_ACCOUNTS:"requestAccounts",SIGN_MESSAGE:"signMessage",SIGN_TRANSACTION:"signTransaction",SIGN_ALL_TRANSACTIONS:"signAllTransactions",SIGN_AND_SEND_TRANSACTION:"signAndSendTransaction"},EVENTS:{ACCOUNTS_CHANGED:"accountsChanged",CHAIN_CHANGED:"chainChanged",DISCONNECT:"disconnect"}},s="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTYiIGhlaWdodD0iOTYiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNDgiIGN5PSI0OCIgcj0iNDgiIGZpbGw9ImJsYWNrIi8+CjxtYXNrIGlkPSJtYXNrMF8yXzIwNjgyIiBzdHlsZT0ibWFzay10eXBlOmx1bWluYW5jZSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMjEiIHk9IjI0IiB3aWR0aD0iNTQiIGhlaWdodD0iNDgiPgo8cGF0aCBkPSJNNzQuNzkxOCAyNEgyMS4yMTg4VjcySDc0Ljc5MThWMjRaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfMl8yMDY4MikiPgo8cGF0aCBkPSJNNzQuNTE1OCA2MS44NDQ1TDY1LjY3MiA3MS4zNDYyQzY1LjQ3OTggNzEuNTUyNyA2NS4yNDcxIDcxLjcxNzIgNjQuOTg4OCA3MS44Mjk3QzY0LjczMDMgNzEuOTQyMSA2NC40NTE0IDcyLjAwMDIgNjQuMTY5NiA3MkgyMi4yNDU1QzIyLjA0NTQgNzIgMjEuODQ5NyA3MS45NDE0IDIxLjY4MjQgNzEuODMxNUMyMS41MTUyIDcxLjcyMTYgMjEuMzgzNiA3MS41NjUyI
1DIxLjMwMzggNzEuMzgxNUMyMS4yMjQxIDcxLjE5NzYgMjEuMTk5NyA3MC45OTQ2IDIxLjIzMzYgNzAuNzk3QzIxLjI2NzUgNzAuNTk5NCAyMS4zNTgzIDcwLjQxNjIgMjEuNDk0OCA3MC4yNjk3TDMwLjM0NTMgNjAuNzY4QzMwLjUzNyA2MC41NjIxIDMwLjc2ODkgNjAuMzk3OSAzMS4wMjY2IDYwLjI4NTRDMzEuMjg0MiA2MC4xNzMgMzEuNTYyMiA2MC4xMTQ3IDMxLjg0MzIgNjAuMTE0Mkg3My43NjUxQzczLjk2NSA2MC4xMTQyIDc0LjE2MDcgNjAuMTcyOCA3NC4zMjggNjAuMjgyN0M3NC40OTU0IDYwLjM5MjYgNzQuNjI2OSA2MC41NDkxIDc0LjcwNjcgNjAuNzMyOUM3NC43ODY1IDYwLjkxNjYgNzQuODEwOCA2MS4xMTk4IDc0Ljc3NjkgNjEuMzE3MkM3NC43NDMgNjEuNTE0OCA3NC42NTIyIDYxLjY5OCA3NC41MTU4IDYxLjg0NDVaTTY1LjY3MiA0Mi43MTA5QzY1LjQ3OTggNDIuNTA0NSA2NS4yNDcxIDQyLjMzOTkgNjQuOTg4OCA0Mi4yMjc1QzY0LjczMDMgNDIuMTE1IDY0LjQ1MTQgNDIuMDU2OSA2NC4xNjk2IDQyLjA1NzFIMjIuMjQ1NUMyMi4wNDU0IDQyLjA1NzEgMjEuODQ5NyA0Mi4xMTU3IDIxLjY4MjQgNDIuMjI1NkMyMS41MTUyIDQyLjMzNTUgMjEuMzgzNiA0Mi40OTIgMjEuMzAzOCA0Mi42NzU3QzIxLjIyNDEgNDIuODU5NSAyMS4xOTk3IDQzLjA2MjYgMjEuMjMzNiA0My4yNjAxQzIxLjI2NzUgNDMuNDU3NyAyMS4zNTgzIDQzLjY0MDkgMjEuNDk0OCA0My43ODc0TDMwLjM0NTMgNTMuMjg5MUMzMC41MzcgNTMuNDk1IDMwLjc2ODkgNTMuNjU5MiAzMS4wMjY2IDUzLjc3MTdDMzEuMjg0MiA1My44ODQyIDMxLjU2MjIgNTMuOTQyNCAzMS44NDMyIDUzLjk0MjlINzMuNzY1MUM3My45NjUgNTMuOTQyOSA3NC4xNjA3IDUzLjg4NDMgNzQuMzI4IDUzLjc3NDRDNzQuNDk1NCA1My42NjQ1IDc0LjYyNjkgNTMuNTA4IDc0LjcwNjcgNTMuMzI0MkM3NC43ODY1IDUzLjE0MDUgNzQuODEwOCA1Mi45MzczIDc0Ljc3NjkgNTIuNzM5OUM3NC43NDMgNTIuNTQyMyA3NC42NTIyIDUyLjM1OTEgNzQuNTE1OCA1Mi4yMTI2TDY1LjY3MiA0Mi43MTA5Wk0yMi4yNDU1IDM1Ljg4NTdINjQuMTY5NkM2NC40NTE0IDM1Ljg4NTkgNjQuNzMwMyAzNS44Mjc5IDY0Ljk4ODggMzUuNzE1NEM2NS4yNDcxIDM1LjYwMyA2NS40Nzk4IDM1LjQzODQgNjUuNjcyIDM1LjIzMkw3NC41MTU4IDI1LjczMDNDNzQuNjUyMiAyNS41ODM4IDc0Ljc0MyAyNS40MDA1IDc0Ljc3NjkgMjUuMjAzQzc0LjgxMDggMjUuMDA1NSA3NC43ODY1IDI0LjgwMjQgNzQuNzA2NyAyNC42MTg2Qzc0LjYyNjkgMjQuNDM0OCA3NC40OTU0IDI0LjI3ODMgNzQuMzI4IDI0LjE2ODRDNzQuMTYwNyAyNC4wNTg2IDczLjk2NSAyNCA3My43NjUxIDI0SDMxLjg0MzJDMzEuNTYyMiAyNC4wMDA1IDMxLjI4NDIgMjQuMDU4NyAzMS4wMjY2IDI0LjE3MTJDMzAuNzY4OSAyNC4yODM2IDMwLjUzNyAyNC40NDc5IDMwLjM0NTMgMjQuNjUzN0wyMS40OTcxIDM0LjE1NTRDMjEuMzYwNyAzNC4zMDE4IDIxLjI3IDM0LjQ4NDkgMjEuMjM2IDM0LjY4MjFDMjEuMjAyIDM0Ljg3OTQgMjEuMjI2MiAzNS4wODI0IDIxLjMwNTcgMzUuMjY2MUMyMS4zODUxIDM1LjQ0OTggMjEuNTE2NCAzNS42MDYzIDIxLjY4MzMgMzUuNzE2M0MyMS44NTAyIDM1LjgyNjQgMjIuMDQ1NiAzNS44ODUzIDIyLjI0NTUgMzUuODg1N1oiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8yXzIwNjgyKSIvPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMl8yMDY4MiIgeDE9IjI1Ljc0MDkiIHkxPSI3My4xNDM5IiB4Mj0iNjkuNzkzNiIgeTI9IjIzLjU3MjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agb2Zmc2V0PSIwLjA4IiBzdG9wLWNvbG9yPSIjOTk0NUZGIi8+CjxzdG9wIG9mZnNldD0iMC4zIiBzdG9wLWNvbG9yPSIjODc1MkYzIi8+CjxzdG9wIG9mZnNldD0iMC41IiBzdG9wLWNvbG9yPSIjNTQ5N0Q1Ii8+CjxzdG9wIG9mZnNldD0iMC42IiBzdG9wLWNvbG9yPSIjNDNCNENBIi8+CjxzdG9wIG9mZnNldD0iMC43MiIgc3RvcC1jb2xvcj0iIzI4RTBCOSIvPgo8c3RvcCBvZmZzZXQ9IjAuOTciIHN0b3AtY29sb3I9IiMxOUZCOUIiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K"},56943:e=>{e.exports={namespaceButton:"styles_module-U6N4VKTA_namespaceButton__JduNA",icon:"styles_module-U6N4VKTA_icon__I9mJf",meta:"styles_module-U6N4VKTA_meta__EdfQ6",name:"styles_module-U6N4VKTA_name__5zZCv",connectedWith:"styles_module-U6N4VKTA_connectedWith__k4LpW",connectedWalletIcon:"styles_module-U6N4VKTA_connectedWalletIcon__UD3L8",namespaceBar:"styles_module-U6N4VKTA_namespaceBar__EKotW"}},59852:(e,t,n)=>{"use strict";n.d(t,{k:()=>o});var r=n(89073),i=n(49327),s=n(96100),o=class{#c;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,s.gn)(this.gcTime)&&(this.#c=r.zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(i.H.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#c&&(r.zs.clearTimeout(this.#c),this.#c=void 0)}}},60010:e=>{e.exports={container:"styles_module-RKS6GYHN_container__r_ho8"}},60743:e=>{e.exports={spacer:"styles_module-4I5UVTXZ_spacer__V81eI",sectionTitle:"styles_module-4I5UVTXZ_sectionTitle__QdGFa",badge:"styles_module-4I5UVTXZ_badge__lqXcy",badgeIcon:"styles_module-4I5UVTXZ_badgeIcon__BpwKO"}},61485:(e,t,n)=>{"use strict";n.d(t,{jG:()=>i});var r=n(89073).Zq,i=function(){let e=[],t=0,n=e=>{e()},i=e=>{e()},s=r,o=r=>{t?e.push(r):s(()=>{n(r)})};return{batch:r=>{let o;t++;try{o=r()}finally{--t||(()=>{let t=e;e=[],t.length&&s(()=>{i(()=>
1{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{s=e}}}()},64776:(e,t,n)=>{"use strict";n.d(t,{o:()=>x});class r{}var i=n(50340),s=n(51524),o=n(89249),a=n(33952),l=n(77279),c=n(41446),u=n(22024);let{EIP155:h,SOLANA:d,BIP122:f}=s.d,p={[h.ID]:{parseAccount:e=>(0,l.MI)(e),parseChain:e=>{let t=(0,l.wb)(e),n=Number(t);if(!Number.isFinite(n))throw new u.A(t,h.ID);return(0,l.xS)({namespace:h.ID,reference:n.toString()})},getInterceptor:async()=>{let{interceptEip155Requests:e}=await n.e(3534).then(n.bind(n,53534));return e},buildContext:(e,t,n)=>({client:n,session:t,currentChainId:e.chainId,currentAddress:e.address,supportedChains:t.namespaces.eip155?.chains||[]}),parseAccountsChangedEvent:e=>({address:e[0]}),parseChainChangedEvent:e=>{let t=Number(e);return{chainId:(0,l.xS)({namespace:h.ID,reference:t.toString()})}}},[d.ID]:{parseAccount:e=>(0,l.MI)(e),parseChain:e=>e,getInterceptor:async()=>{let{interceptSolanaRequests:e}=await n.e(5281).then(n.bind(n,25281));return e},buildContext:(e,t,n)=>({client:n,session:t,currentChainId:e.chainId,currentAccount:e.pubkey?{pubkey:e.pubkey}:void 0}),parseAccountsChangedEvent:e=>({pubkey:e[0]}),parseChainChangedEvent:e=>({chainId:e})},[f.ID]:{parseAccount:e=>(0,l.MI)(e),parseChain:e=>e,getInterceptor:async()=>{let{interceptBIP122Requests:e}=await n.e(319).then(n.bind(n,30319));return e},buildContext:(e,t,n)=>({client:n,session:t,currentChainId:e.chainId,currentAccount:e.address?{address:e.address,publicKey:e.publicKey,addressType:e.addressType}:void 0}),parseAccountsChangedEvent:e=>{let t=e[0];return{address:t?.address,publicKey:t?.publicKey?(0,c.aT)(t.publicKey):void 0,addressType:t?.addressType}},parseChainChangedEvent:e=>({chainId:e})}};class g extends Error{constructor(e){super(e),this.code="ABORT_ERROR",this.name="AbortError"}}let{EIP155:m,SOLANA:y,BIP122:w}=s.d;class b extends o.g{constructor(e){super(),this.options=e,this.namespaceIds=[],this.id=s.M.ID,this.type="caip",this.name=s.M.NAME,this.icon=s.M.ICON,this.accounts=new Map,this.unsubscribers=[],this.service=e.walletConnectService}getAccount(e){return this.accounts.get(e)??{}}setAccount(e,t){this.accounts.set(e,t)}updateAccount(e,t){let n=this.getAccount(e);this.accounts.set(e,{...n,...t})}resetAllAccounts(){this.accounts.clear()}async cleanupPendingPairings(){try{let e=await this.service.getSignClientInstance(),t=e.core.pairing.getPairings(),n=e.proposal.getAll(),r=new Set(e.session.getAll().map(e=>e.pairingTopic).filter(Boolean));for(let n of t)r.has(n.topic)||e.core.expirer.set(n.topic,0);await Promise.allSettled(n.map(t=>e.proposal.delete(t.id,{code:5e3,message:"Cleanup"})))}catch(e){console.warn("Failed to cleanup WalletConnect pairings:",e)}}async connect(){return this.connectPromise||(this.connectPromise=(async()=>{try{this.service.setUri("");let e=await this.reconnect();if(e)return e;await this.cleanupPendingPairings();let t=await this.service.getSignClientInstance(),{uri:n,approval:r}=await t.connect(await this.service.getConnectParams());n&&this.service.setUri(n),this.abortController=new AbortController;let i=this.abortController.signal,s=await Promise.race([r(),new Promise((e,t)=>{i.addEventListener("abort",()=>{t(new g("Connection aborted"))})})]);this.currentSession=s,await this.startListeners();let o={};for(let[e,t]of Object.entries(s.namespaces))o[e]={chains:t.chains||[],methods:t.methods,events:t.events,accounts:t.accounts};return this.service.setUri(""),this.onConnect(o),{namespaces:o}}catch(e){if(this.abortController=void 0,this.service.setUri(""),this.connectPromise=void 0,e instanceof g)return{namespaces:{}};throw e}finally{this.connectPromise=void 0}})()),this.connectPromise}disconnectRemainingSessions(e){let t=e.session.getAll();if(t.length)for(let n of t.slice(0,-1))e.disconnect({topic:n.topic,reason:{code:6e3,message:"Disconnecting from old session"}}).catch(e=>console.warn(`Unable to disconnect from old session ${n.topic}`,e))}async reconnect(){let e=await this.service.getSignClientInstance(),t=e.session.getAll();if(!t.length)return;let n=t[t.length-1];this.currentSession=n,this.disconnectRemainingSessions(e),this.startListeners();let r={};for(let[e,t]of Object.entries(n.namespaces))r[e]={chains:t.chains||[],methods:t.methods,events:t.events,accounts:t.accounts};return this.onConnect(r),{namespaces:r}}async disconnect(){try{if(this.stopListeners(),!this.currentSession)return;let e=this.currentSession.topic,t=await this.service.getSignClientInstance();for(let n of(this.resetAllAccounts(),this.emitCaipSessionEvent({chainId:`${m.ID}:1`,event:{name:m.EVENTS.ACCOUNTS_CHANGED,data:[]}}),t.disconnect({topic:e,reason:{code:6e3,message:"User disconnected"}}),t.pairing.getAll()))t.core.expirer.set(n.topic,0);this.currentSession=void 0,this.service.setUri("")}catch(e){throw e}}async getProvider(){let e=await this.service.getSignClientInstance();if(!this.currentSession)throw new a.yt;let t=this.currentSession;return{request:async n=>{let r=(0,l.jT)(n.chainId),i=p[r];
1if(!i)return e.request({topic:t.topic,chainId:n.chainId,request:{method:n.request.method,params:n.request.params}});let s=this.getAccount(r);return(await i.getInterceptor())(i.buildContext(s,t,e),n)}}}async startListeners(){if(!this.currentSession)return;this.stopListeners();let e=await this.service.getSignClientInstance(),t=this.currentSession.topic,n=e=>{if(e.topic!==t)return;let n=(0,l.jT)(e.params.chainId),r=p[n],i=s.d[n.toUpperCase()];if(!r||!i)return void this.emitCaipSessionEvent({chainId:e.params.chainId,event:e.params.event});if(e.params.event.name===i.EVENTS.ACCOUNTS_CHANGED){let t=r.parseAccountsChangedEvent(e.params.event.data);this.updateAccount(n,t);let s=this.getAccount(n).chainId||e.params.chainId;this.emitCaipSessionEvent({chainId:s,event:{name:i.EVENTS.ACCOUNTS_CHANGED,data:e.params.event.data}})}if(e.params.event.name===i.EVENTS.CHAIN_CHANGED){let t=r.parseChainChangedEvent(e.params.event.data);this.updateAccount(n,t);let s=this.getAccount(n),o=s.chainId||e.params.chainId;this.emitCaipSessionEvent({chainId:o,event:{name:i.EVENTS.CHAIN_CHANGED,data:s.chainId}})}this.emitCaipSessionEvent({chainId:e.params.chainId,event:e.params.event})},r=e=>{e.topic===t&&(this.currentSession=void 0,this.service.setUri(""),this.stopListeners(),this.emitCaipSessionDelete())};e.on("session_event",n),e.on("session_delete",r),this.unsubscribers=[()=>e.off("session_event",n),()=>e.off("session_delete",r)]}stopListeners(){this.unsubscribers.forEach(e=>e()),this.unsubscribers=[]}onConnect(e){for(let[t,n]of Object.entries(e)){let e=p[t];if(!e||!n)continue;let r=n.chains?.[0],i=n.accounts[0];if(!r||!i)continue;let s=e.parseChain(r),o=e.parseAccount(i);t===m.ID?this.setAccount(m.ID,{address:o,chainId:s}):t===y.ID?this.setAccount(y.ID,{pubkey:o,chainId:s}):t===w.ID&&this.setAccount(w.ID,{address:o,chainId:s})}}}let N=new Set(["solana"]);class v extends r{constructor(e){super(),this.id=s.M.ID,this.caipWallet=new b({walletConnectService:this}),this.wcEvents=new i.v,this.scopes=e.scopes,this.projectId=e.projectId,this.metadata=e.metadata,this.signClientPromise=e.signClientPromise,this.start()}async start(){this.signClientInstance=await this.signClientPromise}async getSignClientInstance(){return this.signClientInstance?this.signClientInstance:this.signClientPromise}async getConnectParams(){let e={};for(let[t,n]of this.scopes){let r=function(e,t){let n=[];for(let e of t.CHAINS)n.push(`${t.ID}:${e}`);if(!N.has(e))return{...t,CHAINS:n};let r={};for(let[n,i]of Object.entries(t.METHODS))i.includes("_")?r[n]=i:r[n]=`${e}_${i}`;return{...t,METHODS:r,CHAINS:n}}(t,n);e[t]={chains:r.CHAINS,methods:Object.values(r.METHODS),events:Object.values(r.EVENTS)}}return{optionalNamespaces:e}}getCaipWallet(){return this.caipWallet}getUri(){return this.uri}setUri(e){this.uri=e,this.wcEvents.emit("uri",this.uri)}onUri(e){return this.wcEvents.on("uri",e)}offUri(e){return this.wcEvents.off("uri",e)}clearAllListeners(){this.wcEvents.clear()}}var I=n(99515);function x(e){let t;if(!e.projectId)throw new I.$d;return{__createService:({scopes:r})=>new v({projectId:e.projectId,metadata:e.metadata,scopes:r,signClientPromise:t||(t=(async()=>{let{SignClient:t}=await Promise.all([n.e(4168),n.e(3785),n.e(6058)]).then(n.bind(n,6058));return t.init({projectId:e.projectId,metadata:e.metadata})})())})}}},65470:(e,t,n)=>{"use strict";n.d(t,{xn:()=>r});let r="solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"},69493:(e,t,n)=>{"use strict";n.d(t,{H:()=>h,B:()=>d});var r=n(80069),i=n(20801),s=n(39885),o=n(7325),a=n(29436);let l="trust-connect-theme",c=(()=>{let e=[],t=null;return{subscribe:n=>{if(e.push(n),"undefined"!=typeof window&&!t){t=window.matchMedia("(prefers-color-scheme: dark)");let n=()=>{e.forEach(e=>e())};t.addEventListener?t.addEventListener("change",n):t.addListener(n)}return()=>{e=e.filter(e=>e!==n)}},getSnapshot:()=>"undefined"==typeof window?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",getServerSnapshot:()=>"light"}})(),u=(0,i.createContext)(null);function h({children:e,theme:t}){let[n,a]=(0,i.useState)(!1),[h,d]=(0,i.useState)("wallets"),[f,p]=(0,i.useState)("wallet"),g=(0,i.useRef)([]),[m,y]=(0,i.useState)(void 0),[w,b]=(0,i.useState)(null),{theme:N,resolvedTheme:v,setTheme:I,toggleTheme:x}=function(e){let[t,n]=(0,i.useState)(()=>e??function(){if("undefined"==typeof window)return"auto";
1try{let e=localStorage.getItem(l);if("light"===e||"dark"===e||"auto"===e)return e}catch{}return"auto"}()),r=(0,i.useSyncExternalStore)(c.subscribe,c.getSnapshot,c.getServerSnapshot),s=(0,i.useMemo)(()=>"auto"===t?r:t,[t,r]);(0,i.useEffect)(()=>{"undefined"!=typeof document&&document.documentElement.setAttribute("data-tcui-theme",s)},[s]);let o=(0,i.useCallback)(e=>{n(e);try{localStorage.setItem(l,e)}catch{}},[]),a=(0,i.useCallback)(()=>{o("dark"===s?"light":"dark")},[s,o]);return{theme:t,resolvedTheme:s,setTheme:o,toggleTheme:a}}(t),{clearError:C,abortConnect:M,isLoading:E}=(0,s.e)(),{namespaces:j}=(0,o.W)();(0,i.useEffect)(()=>{1===j.length&&p("namespace")},[j]);let A=(0,i.useCallback)(e=>{g.current.push(h),d(e)},[h]),S=(0,i.useCallback)(()=>{C(),E&&M(),d(g.current.pop()??("wallet"===f?"wallets":"networks"))},[C,M,f,E]),D=(0,i.useCallback)((e={})=>{p(e.type||"wallet"),a(!0),g.current=[],y(e.namespaceId),b(null)},[]),T=(0,i.useCallback)(()=>{a(!1),y(void 0),b(null),g.current=[],d("wallets")},[]),O=(0,i.useMemo)(()=>({isOpen:n,view:h,namespaceFilter:m,targetWallet:w,theme:N,resolvedTheme:v,modalType:f,open:D,close:T,setView:A,goBack:S,setNamespaceFilter:y,setTargetWallet:b,setTheme:I,toggleTheme:x}),[n,h,m,w,N,v,f,D,T,A,S,y,b,I,x]);return(0,r.jsx)(u.Provider,{value:O,children:e})}function d(){let e=(0,i.useContext)(u);if(!e)throw new a.dV("useTrustModal","TrustModalProvider");return e}},69760:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=function(e){if(e.length>=255)throw TypeError("Alphabet too long");let t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){let r=e.charAt(n),i=r.charCodeAt(0);if(255!==t[i])throw TypeError(r+" is ambiguous");t[i]=n}let n=e.length,r=e.charAt(0),i=Math.log(n)/Math.log(256),s=Math.log(256)/Math.log(n);function o(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;let s=0,o=0,a=0;for(;e[s]===r;)o++,s++;let l=(e.length-s)*i+1>>>0,c=new Uint8Array(l);for(;s<e.length;){let r=e.charCodeAt(s);if(r>255)return;let i=t[r];if(255===i)return;let o=0;for(let e=l-1;(0!==i||o<a)&&-1!==e;e--,o++)i+=n*c[e]>>>0,c[e]=i%256>>>0,i=i/256>>>0;if(0!==i)throw Error("Non-zero carry");a=o,s++}let u=l-a;for(;u!==l&&0===c[u];)u++;let h=new Uint8Array(o+(l-u)),d=o;for(;u!==l;)h[d++]=c[u++];return h}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,o=0,a=0,l=t.length;for(;a!==l&&0===t[a];)a++,i++;let c=(l-a)*s+1>>>0,u=new Uint8Array(c);for(;a!==l;){let e=t[a],r=0;for(let t=c-1;(0!==e||r<o)&&-1!==t;t--,r++)e+=256*u[t]>>>0,u[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw Error("Non-zero carry");o=r,a++}let h=c-o;for(;h!==c&&0===u[h];)h++;let d=r.repeat(i);for(;h<c;++h)d+=e.charAt(u[h]);return d},decodeUnsafe:o,decode:function(e){let t=o(e);if(t)return t;throw Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},70121:e=>{e.exports={grid:"styles_module-FMH4FUT5_grid__YBomL",loadingMore:"styles_module-FMH4FUT5_loadingMore__xAHvF"}},70348:e=>{e.exports={error:"styles_module-4QHLSLTJ_error__PTcaJ"}},71336:e=>{e.exports={empty:"styles_module-IZSJLNB4_empty__hkyhA"}},71432:(e,t,n)=>{"use strict";n.d(t,{Y:()=>g});var r=n(20801),i=n(28688),s=n(61485),o=n(21286),a=n(96100),l=class extends o.Q{#r;#u=void 0;#h;#d;constructor(e,t){super(),this.#r=e,this.setOptions(t),this.bindMethods(),this.#f()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#r.defaultMutationOptions(e),(0,a.f8)(this.options,t)||this.#r.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#h,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.EN)(t.mutationKey)!==(0,a.EN)(this.options.mutationKey)?this.reset():this.#h?.state.status==="pending"&&this.#h.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#h?.removeObserver(this)}onMutationUpdate(e){this.#f(),this.#p(e)}getCurrentResult(){return this.#u}reset(){this.#h?.removeObserver(this),this.#h=void 0,this.#f(),this.#p()}mutate(e,t){return this.#d=t,this.#h?.removeObserver(this),this.#h=this.#r.getMutationCache().build(this.#r,this.options),this.#h.addObserver(this),this.#h.execute(e)}#f(){let e=this.#h?.state??(0,i.$)();this.#u={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#p(e){s.jG.batch(()=>
1{if(this.#d&&this.hasListeners()){let t=this.#u.variables,n=this.#u.context,r={client:this.#r,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#d.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#d.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#d.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#d.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#u)})})}},c=n(81838),u=n(44724),h=n(77279),d=n(56869),f=n(33952),p=n(11147);function g(e={}){let{client:t}=(0,u.f)(),{mutationOptions:n}=e,i=t.connections[d.I8.ID];return function(e,t){let n=(0,c.jE)(void 0),[i]=r.useState(()=>new l(n,e));r.useEffect(()=>{i.setOptions(e)},[i,e]);let o=r.useSyncExternalStore(r.useCallback(e=>i.subscribe(s.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=r.useCallback((e,t)=>{i.mutate(e,t).catch(a.lQ)},[i]);if(o.error&&(0,a.GU)(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}({mutationKey:["solana","signMessage"],mutationFn:async e=>{if(i?.status!=="connected")throw new f.Gq(d.I8.ID);let t=i.wallet;if(!t)throw new f.qf;let n=i.address;if(!n)throw new p.T("",d.I8.ID);let r=await t.getProvider(),s=(0,h.xS)(i.chain),o=new TextEncoder().encode(e.message),a=await r.request({chainId:s,request:{method:"signMessage",params:{address:n,message:o}}});return{signedMessage:a.signedMessage,signature:a.signature,signatureType:a.signatureType}},...n})}},71562:(e,t,n)=>{"use strict";function r(e){return e.toLowerCase().split(/\s+/)[0]}n.d(t,{P:()=>r})},73957:(e,t,n)=>{"use strict";n.d(t,{E:()=>w});var r=n(96100),i=n(61485),s=n(49605),o=n(59852);function a(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}var l=class extends o.k{#g;#m;#y;#w;#r;#o;#b;#N;constructor(e){super(),this.#N=!1,this.#b=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#w=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#m=u(this.options),this.state=e.state??this.#m,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#g}get promise(){return this.#o?.promise}setOptions(e){if(this.options={...this.#b,...e},e?._type&&(this.#g=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=u(this.options);void 0!==e.data&&(this.setState(c(e.data,e.dataUpdatedAt)),this.#m=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#w.remove(this)}setData(e,t){let n=(0,r.pl)(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#a({type:"setState",state:e})}cancel(e){let t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(r.lQ).catch(r.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#m}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,r.nU)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===r.hT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,r.d2)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,r.j3)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#w.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#o&&(this.#N||this.#v()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#w.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#v(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){var n;if("idle"!==this.state.fetchStatus&&this.#o?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#N=!0,i.signal)}
1)},l=()=>{let e=(0,r.ZM)(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return o(e),e})();return(this.#N=!1,this.options.persister)?this.options.persister(e,n,this):e(n)},c=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:l};return o(e),e})(),u="infinite"===this.#g?(n=this.options.pages,{onFetch:(e,t)=>{let i=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],l=e.state.data?.pageParams||[],c={pages:[],pageParams:[]},u=0,h=async()=>{let t=!1,h=(0,r.ZM)(e.options,e.fetchOptions),d=async(n,i,s)=>{if(t)return Promise.reject(e.signal.reason);if(null==i&&n.pages.length)return Promise.resolve(n);let o=(()=>{let n={client:e.client,queryKey:e.queryKey,pageParam:i,direction:s?"backward":"forward",meta:e.options.meta};return(0,r.ox)(n,()=>e.signal,()=>t=!0),n})(),a=await h(o),{maxPages:l}=e.options,c=s?r.ZZ:r.y9;return{pages:c(n.pages,a,l),pageParams:c(n.pageParams,i,l)}};if(s&&o.length){let e="backward"===s,t={pages:o,pageParams:l},n=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:a)(i,t);c=await d(t,n,e)}else{let e=n??o.length;do{let e=0===u?l[0]??i.initialPageParam:a(i,c);if(u>0&&null==e)break;c=await d(c,e),u++}while(u<e)}return c};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t):e.fetchFn=h}}):this.options.behavior;u?.onFetch(c,this),this.#y=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#o=(0,s.II)({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:e=>{e instanceof s.cc&&e.revert&&this.setState({...this.#y,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{let e=await this.#o.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#w.config.onSuccess?.(e,this),this.#w.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof s.cc){if(e.silent)return this.#o.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#a({type:"error",error:e}),this.#w.config.onError?.(e,this),this.#w.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#a(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var n,r;return{...t,...(n=t.data,r=this.options,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.v_)(r.networkMode)?"fetching":"paused",...void 0===n&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":let i={...t,...c(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#y=e.manual?i:void 0,i;case"error":let o=e.error;return{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),i.jG.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#w.notify({query:this,type:"updated",action:e})})}};function c(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function u(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var h=n(21286),d=class extends h.Q{constructor(e={}){super(),this.config=e,this.#I=new Map}#I;build(e,t,n){let i=t.queryKey,s=t.queryHash??(0,r.F$)(i,t),o=this.get(s);return o||(o=new l({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#I.has(e.queryHash)||(this.#I.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#I.get(e.queryHash);t&&(e.destroy(),t===e&&this.#I.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.jG.batch(()=>
1{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#I.get(e)}getAll(){return[...this.#I.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.MK)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r.MK)(e,t)):t}notify(e){i.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.jG.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.jG.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},f=n(28688),p=class extends h.Q{constructor(e={}){super(),this.config=e,this.#x=new Set,this.#C=new Map,this.#M=0}#x;#C;#M;build(e,t,n){let r=new f.s({client:e,mutationCache:this,mutationId:++this.#M,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#x.add(e);let t=g(e);if("string"==typeof t){let n=this.#C.get(t);n?n.push(e):this.#C.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#x.delete(e)){let t=g(e);if("string"==typeof t){let n=this.#C.get(t);if(n)if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#C.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=g(e);if("string"!=typeof t)return!0;{let n=this.#C.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=g(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#C.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){i.jG.batch(()=>{this.#x.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#x.clear(),this.#C.clear()})}getAll(){return Array.from(this.#x)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.nJ)(e,t))}notify(e){i.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return i.jG.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.lQ))))}};function g(e){return e.options.scope?.id}var m=n(41272),y=n(23879),w=class{#E;#s;#b;#j;#A;#S;#D;#T;constructor(e={}){this.#E=e.queryCache||new d,this.#s=e.mutationCache||new p,this.#b=e.defaultOptions||{},this.#j=new Map,this.#A=new Map,this.#S=0}mount(){this.#S++,1===this.#S&&(this.#D=m.m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#E.onFocus())}),this.#T=y.t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#E.onOnline())}))}unmount(){this.#S--,0===this.#S&&(this.#D?.(),this.#D=void 0,this.#T?.(),this.#T=void 0)}isFetching(e){return this.#E.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#s.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#E.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#E.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,r.d2)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#E.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let i=this.defaultQueryOptions({queryKey:e}),s=this.#E.get(i.queryHash),o=s?.state.data,a=(0,r.Zw)(t,o);if(void 0!==a)return this.#E.build(this,i).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return i.jG.batch(()=>this.#E.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#E.get(t.queryHash)?.state}removeQueries(e){let t=this.#E;i.jG.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#E;return i.jG.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(i.jG.batch(()=>this.#E.findAll(e).map(e=>e.cancel(n)))).then(r.lQ).catch(r.lQ)}invalidateQueries(e,t={}){return i.jG.batch(()=>(this.#E.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(i.jG.batch(()=>this.#E.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.lQ)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#E.build(this,t);return n.isStaleByTime((0,r.d2)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.lQ).catch(r.lQ)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.lQ).catch(r.lQ)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return y.t.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#E}getMutationCache(){return this.#s}getDefaultOptions(){return this.#b}setDefaultOptions(e){this.#b=e}setQueryDefaults(e,t){this.#j.set((0,r.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#j.values()],n={};return t.forEach(t=>{(0,r.Cp)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#A.set((0,r.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#A.values()],n={};return t.forEach(t=>{(0,r.Cp)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#b.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#b.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}
1clear(){this.#E.clear(),this.#s.clear()}}},75772:(e,t,n)=>{"use strict";n.d(t,{j:()=>N});var r=n(40114),i=n(77279),s=n(5759),o=n(50340);class a{constructor({id:e}){this.events=new o.v,this.lastConnectedWalletId=new s.w({key:`trust-connect.namespace.${e}.lastWallet`,version:"0.0.0"})}getConnection(){return this.connection}getWallets(){return this.wallets}onConnection(e){return this.events.on("connection",e)}onWallets(e){return this.events.on("wallets",e)}setConnection(e){this.connection=e,this.events.emit("connection",e)}addWallets(e){this.wallets=[...this.wallets,...e],this.events.emit("wallets",this.wallets)}clearAllListeners(){this.registries.forEach(e=>e.clearAllListeners()),this.events.clear()}saveLastConnectedWalletId(e){this.lastConnectedWalletId.set(e)}getLastConnectedWalletId(){return this.lastConnectedWalletId.get()}clearLastConnectedWalletId(){this.lastConnectedWalletId.remove()}}var l=n(33952);class c extends a{constructor({registries:e,id:t,icon:n,name:r,rpcUrls:i}){super({id:t}),this.connection={status:"disconnected",wallet:void 0,address:void 0,chain:void 0},this.wallets=[],this.id=t,this.name=r,this.icon=n,this.registries=e,this.rpcUrls=i,e.forEach(e=>{e.onWallets(e=>{this.reconnect(e),this.addWallets(e)});let t=e.getWallets();this.reconnect(t),this.addWallets(t)})}async connectOrReconnect({wallet:e,functionName:t}){let n=this.getConnection();if("connecting"===n.status)throw new l.Z;if("connected"===n.status)throw new l.LC(n.wallet.id);this.setConnection({status:"connecting",wallet:e,address:void 0,chain:void 0});try{e.__internal.clearAllListeners(),e.__internal.handleOnAddress(this.onAddress.bind(this)),e.__internal.handleOnChain(this.onChain.bind(this)),e.__internal.startListeners();let n=await e.__internal[t]();n?.address&&n?.chain?(this.saveLastConnectedWalletId(e.id),this.setConnection({status:"connected",wallet:e,address:n.address,chain:n.chain})):(this.internalDisconnect(),e.__internal.clearAllListeners())}catch(t){throw this.internalDisconnect(),e.__internal.clearAllListeners(),t}}internalDisconnect(){this.clearLastConnectedWalletId(),this.setConnection({status:"disconnected",wallet:void 0,address:void 0,chain:void 0})}async connect(e){return this.connectOrReconnect({wallet:e,functionName:"connect"})}async reconnect(e){if("disconnected"!==this.getConnection().status)return;let t=this.getLastConnectedWalletId();if(!t)return;let n=e.find(e=>e.id===t);n&&this.connectOrReconnect({wallet:n,functionName:"reconnect"})}disconnect(){let e=this.getConnection();"connected"===e.status&&(e.wallet.__internal.clearAllListeners(),this.internalDisconnect(),e.wallet.__internal.disconnect())}abortConnect(){let e=this.getConnection();"connecting"===e.status&&e.wallet&&(e.wallet.__internal.abortConnect(),e.wallet.__internal.clearAllListeners(),this.internalDisconnect())}onAddress(e){let t=this.getConnection();"connected"===t.status&&(e?this.setConnection({...t,address:e}):(t.wallet.__internal.clearAllListeners(),this.internalDisconnect()))}onChain(e){let t=this.getConnection();if("connected"===t.status){if(!e)throw new r.k(this.id);this.setConnection({...t,chain:e})}}}class u{constructor(){this.events=new o.v}getWallets(){return this.wallets}onWallets(e){return this.events.on("wallets",e)}addWallet(e){this.wallets.push(e),this.events.emit("wallets",this.wallets)}setWallets(e){this.wallets=e,this.events.emit("wallets",this.wallets)}clearAllListeners(){this.events.clear(),this.stopListeners()}}var h=n(89249),d=n(71562),f=n(43127),p=n(11147),g=n(56869);function m(e,t){return e.features?.[t]}class y extends h.g{constructor({wallet:e,chainRef:t}){super(),this.namespaceIds=[g.I8.ID],this.type="namespace",this.chainRef=t,this.standard_wallet=e,this.id=(0,d.P)(e.name),this.name=e.name,this.icon=e.icon??""}async getProvider(){let e=this.standard_wallet,t=this;return{request:async n=>{let{request:r,chainId:i}=n,s=r.method,o=`solana:${r.method}`,a=m(e,o);if(!a?.[s])throw new f.N(o,g.I8.ID);if("signAndSendAllTransactions"===r.method){let t=r.params.inputs.map(t=>{let n=e.accounts.find(e=>e.address===t.address);if(!n)throw new p.T(t.address,g.I8.ID);return{account:n,transaction:t.transaction,chain:t.chain,options:t.options}}),[n]=await a[s]({inputs:t,options:r.params.options});return n}let l=t.account;if("address"in r.params&&"string"==typeof r.params.address){let t=e.accounts.find(e=>e.address===r.params.address);if(!t)throw new p.T(r.params.address,g.I8.ID);l=t}let[c]=await a[s]({account:l,chain:i,...r.params});return c}}}async connect(){let e=m(this.standard_wallet,g.Gv.CONNECT);if(!e?.connect)throw new f.N(g.Gv.CONNECT,g.I8.ID);try{let{accounts:t}=await e.connect();this.account=t?.[0]??this.standard_wallet.accounts?.[0];let n=this.account?.address,r={namespace:this.namespaceIds[0],reference:this.chainRef};return{address:n,chain:r}}catch(e){throw console.error("Solana wallet connect error:",e),new l._r(this.name,e instanceof Error?e.message:"Unknown error")}}async reconnect(){let e=this.standard_wallet.accounts?.[0];this.account=e;let t=e?.address;return t?{address:t,chain:{namespace:this.namespaceIds[0],reference:this.chainRef}}:this.connect()}async disconnect(){let e=m(this.standard_wallet,g.Gv.DISCONNECT);e?.disconnect&&await e.disconnect(),this.account=void 0,this.__internal.setAddress(void 0),this.__internal.setChain(void 0)}startListeners(){let e=m(this.standard_wallet,g.Gv.EVENTS);e?.on&&(this.offChange?.(),this.offChange=e.on("change",e=>
1{if("accounts"in e){let e=this.standard_wallet.accounts?.[0];this.account=e,this.__internal.setAddress(e?.address)}}))}stopListeners(){this.offChange?.(),this.offChange=void 0}}let w="wallet-standard:register-wallet";class b extends u{constructor({chainRef:e}){super(),this.wallets=[],this.onRegisterWalletBound=e=>this.onRegisterWallet(e),this.appReadyApi={register:e=>this.registerWallet(e)},this.chainRef=e,this.start()}registerWallet(e){if(this.wallets.some(t=>t.id===e.name)||!e.chains.some(e=>e.startsWith(g.I8.ID)))return;let t=new y({wallet:e,chainRef:this.chainRef});this.setWallets([...this.wallets,t])}onRegisterWallet(e){let t=e.detail;"function"==typeof t&&t(this.appReadyApi)}start(){window.addEventListener(w,this.onRegisterWalletBound),window.dispatchEvent(new CustomEvent("wallet-standard:app-ready",{detail:this.appReadyApi}))}stopListeners(){window.removeEventListener(w,this.onRegisterWalletBound)}}function N(e){if(!e.chain)throw new r.k(g.I8.ID);let t=e.chain,{reference:n}=(0,i.qP)(t),s={...g.I8,CHAINS:[n]};return{__createNamespace:()=>{let t=new b({chainRef:n});return{namespace:new c({registries:[...e.registries??[],t],id:s.ID,name:s.NAME,icon:g.Xg,rpcUrls:e.rpcUrls}),scope:s}}}}},76292:e=>{e.exports={body:"styles_module-ZISFY5AO_body__l7Twm"}},77279:(e,t,n)=>{"use strict";function r(e){let t=e.toString();if(!t.includes(":"))return e;let[n,r]=t.split(":");return r}function i(e){if(!e.includes(":"))return e;let t=e.split(":");return t[t.length-1]}function s(e){if(!e.includes(":"))return e;let[t,n]=e.split(":");return t}function o(e){let[t,n]=e.split(":");return{namespace:t,reference:n}}function a({namespace:e,reference:t}){return`${e}:${t}`}n.d(t,{MI:()=>i,jT:()=>s,qP:()=>o,wb:()=>r,xS:()=>a})},77509:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var r=n(20801),i=n(44724),s=n(10499);function o({namespaceId:e}={}){let{client:t}=(0,i.f)(),n=(0,s.y)(e),a=(0,r.useSyncExternalStore)(e=>t.onWallets(e),()=>t.getWallets(),()=>t.getWallets());return{wallets:e?n:a}}},81838:(e,t,n)=>{"use strict";n.d(t,{Ht:()=>a,jE:()=>o});var r=n(20801),i=n(80069),s=r.createContext(void 0),o=e=>{let t=r.useContext(s);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},a=e=>{let{client:t,children:n}=e;return r.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:n})}},83575:()=>{},85394:(e,t,n)=>{"use strict";n.d(t,{w$:()=>th});var r=n(44724),i=n(69493);n(83575);var s=n(80069),o=n(20801),a=n(68),l=n(39885);function c({layout:e,views:t,mobileViews:n}){let{overlay:r,wrapper:c,header:u,body:h,error:d}=e,{isOpen:f,view:p,close:g,goBack:m,setNamespaceFilter:y,setTargetWallet:w,modalType:b}=(0,i.B)(),[N]=(0,o.useState)(()=>(function(){if("undefined"==typeof window)return!1;let e=navigator.userAgent||navigator.vendor||window.opera,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e),n="ontouchstart"in window||navigator.maxTouchPoints>0,r=window.innerWidth<768;return t||n&&r})()),{abortConnect:v,error:I,isLoading:x}=(0,l.e)(),{bodyRef:C,wrapperRef:M}=function({dependencyList:e}){let t=(0,o.useRef)(null),n=(0,o.useRef)(null),r=(0,o.useRef)(0),i=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{let e=t.current,s=n.current;if(!e||!s)return;s.style.overflow="hidden";let o=s.querySelector("header"),a=o?.clientHeight,l=e.clientHeight,c=window.getComputedStyle(s),u=Number.parseFloat(c.paddingTop),h=Number.parseFloat(c.paddingBottom),d=u+h+Number.parseFloat(c.borderTopWidth)+Number.parseFloat(c.borderBottomWidth),f=Number.parseFloat(c.minHeight)||0;r.current||(r.current=Math.max(l+a+d,f)),i.current=!1;let p=new ResizeObserver(e=>{for(let t of e){let e=Math.max(t.borderBoxSize[0].blockSize+a+d,f),n=r.current;Math.abs(n-e)>1&&!i.current&&(i.current=!0,s.style.transition="none",s.style.height=`${n}px`,requestAnimationFrame(()=>{s.style.transition="height 0.2s ease-out",s.style.height=`${e}px`,setTimeout(()=>{s.style.height="auto"},301)}),r.current=e)}});return p.observe(e),()=>{p.disconnect(),i.current=!1,s.style.transition="none",s.style.height="auto"}},e),{bodyRef:t,wrapperRef:n}}({dependencyList:[p,f]}
1),E=N?n:t,j=E.find(e=>e.tag===p),A=j?.title;return((0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&g()};return f&&window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,g]),(0,o.useEffect)(()=>{!f&&(w(null),y(void 0),x&&v())},[f,v,w,y]),f)?(0,a.createPortal)((0,s.jsx)(r,{onClick:g,children:(0,s.jsxs)(c,{onClick:e=>e.stopPropagation(),wrapperRef:M,children:[(0,s.jsx)(u,{title:A,showBack:p!==("wallet"===b||N?"wallets":"networks")&&"namespace"!==b,onBack:m,onClose:g}),(0,s.jsxs)(h,{bodyRef:C,children:[E.map(e=>{if(p===e.tag){let t=e.node;return(0,s.jsx)(t,{},e.tag)}return null}),!N&&I&&(0,s.jsx)(d,{message:I.message})]})]})}),document.body):null}var u=n(51524);function h(){let{client:e}=(0,r.f)();return(0,o.useMemo)(()=>e.getServices().find(e=>e.id===u.M.ID),[e])}var d=n(99515);function f(){let e=h(),{connect:t,isLoading:n,error:r}=(0,l.e)(),i=(0,o.useCallback)(async()=>{if(!e)throw new d.lW;let n=e.getCaipWallet();if(!n)throw new d.eF;e.setUri(""),await t({wallet:n})},[t,e]),s=(0,o.useCallback)(t=>{if(!e)throw new d.lK;let n=e.getUri();if(!n)throw new d.XV;let r=t.mobile?.universal||t.mobile?.native||t.mobile_link;if(!r)throw new d.Bd(t.name);let i=`${r}wc?uri=${encodeURIComponent(n)}`;window.open(i,"_blank","noreferrer noopener")},[e]),a=(0,o.useSyncExternalStore)(t=>e?e.onUri(()=>t()):()=>{},()=>e?.getUri(),()=>e?.getUri());return{uri:a,generateUri:i,openWalletLink:s,isUriLoading:n&&!a,error:r,wallet:(0,o.useMemo)(()=>e?.getCaipWallet(),[e])}}class p{constructor(e,t=300){this.baseUrl="https://explorer-api.walletconnect.com/v3",this.searchDebounceTimer=null,this.pendingSearchPromise=null,this.projectId=e,this.searchDebounceMs=t}async fetchWallets(e={}){return e.search&&e.search.trim()?this.fetchWalletsWithDebounce(e):this.fetchFromApi(e)}async fetchWalletsWithDebounce(e){return this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.pendingSearchPromise||(this.pendingSearchPromise=new Promise((t,n)=>{this.searchDebounceTimer=setTimeout(async()=>{try{let n=await this.fetchFromApi(e);this.pendingSearchPromise=null,t(n)}catch(e){this.pendingSearchPromise=null,n(e)}},this.searchDebounceMs)})),this.pendingSearchPromise}async fetchFromApi(e){let t=this.buildWalletsQueryParams(e),n=`${this.baseUrl}/wallets?${t.toString()}`;try{let e=await fetch(n);if(!e.ok)throw new d.nG(e.status,e.statusText);let t=await e.json(),r=Object.values(t.listings);return{count:r.length,data:r.map(e=>({...e,iconUrl:this.getLogoUrl(e.image_id,"md")}))}}catch(e){throw Error(`Error fetching wallets from Explorer API: ${e instanceof Error?e.message:String(e)}`)}}getLogoUrl(e,t="md"){return`${this.baseUrl}/logo/${t}/${e}?projectId=${this.projectId}`}buildWalletsQueryParams(e){let t=new URLSearchParams({projectId:this.projectId});return void 0!==e.page&&void 0!==e.entries&&(t.append("page",String(e.page)),t.append("entries",String(e.entries))),e.search&&t.append("search",e.search),e.ids&&e.ids.length>0&&t.append("ids",e.ids.join(",")),e.chains&&e.chains.length>0&&t.append("chains",e.chains.join(",")),e.platforms&&e.platforms.length>0&&t.append("platforms",e.platforms.join(",")),e.sdks&&e.sdks.length>0&&t.append("sdks",e.sdks.join(",")),e.standards&&e.standards.length>0&&t.append("standards",e.standards.join(",")),t}}function g({components:e}){let{wrapper:t,search:n,loading:r,emptyState:a,walletsList:c,footer:u}=e,[g,m]=(0,o.useState)(""),[y,w]=(0,o.useState)(null),[b,N]=(0,o.useState)(null),{close:v}=(0,i.B)(),{isConnectionAborted:I}=(0,l.e)(),{error:x,openWalletLink:C,generateUri:M,isUriLoading:E,uri:j}=f(),{wallets:A,isLoading:S,isLoadingMore:D,error:T,hasMore:O,loadMore:_}=function({query:e,entries:t}={query:"",entries:10}){let n=h();if(!n)throw new d._T;let r=(0,o.useMemo)(()=>new p(n.projectId),[n]),[i,s]=(0,o.useState)([]),[a,l]=(0,o.useState)(!1),[c,u]=(0,o.useState)(!1),[f,g]=(0,o.useState)(null),[m,y]=(0,o.useState)(!0),w=(0,o.useRef)(1),b=function(){if("undefined"==typeof window)return"desktop";let e=navigator.userAgent||navigator.vendor||window.opera;return/iPad|iPhone|iPod/.test(e)&&!window.MSStream?"ios":/android/i.test(e)?"android":"desktop"}(),N=(0,o.useCallback)(async(e,n=!1)=>{n&&(w.current=1,s([]),y(!0)),n?l(!0):u(!0),g(null);try{let i=await r.fetchWallets({page:w.current,entries:t||10,search:e,platforms:"desktop"===b?void 0:[b]});n?s(i.data):s(e=>[...e,...i.data]),y(10===i.data.length),w.current+=1}catch(e){g(e instanceof Error?e:Error("Failed to fetch wallets"))}finally{l(!1),u(!1)}},[r,b]),v=(0,o.useCallback)(()=>{!c&&m&&N(e,!1)},[N,e,c,m]);return(0,o.useEffect)(()=>{let t=setTimeout(()=>{N(e,!0)},300);return()=>clearTimeout(t)},[e,N]),{wallets:i,isLoading:a,isLoadingMore:c,error:f,hasMore:m,loadMore:v}}({query:g}),L=(0,o.useRef)(null),z=async e=>{w(e.id),N(null),C(e)};async function U(){await M(),T||I||v()}if((0,o.useEffect)(()=>{j||E||U()},[j,E]),(0,o.useEffect)(()=>{x&&y&&(N(x.message),w(null))},[x,y]),(0,o.useEffect)(()=>{let e=L.current;if(!e)return;let t=null,n=()=>{t||(t=setTimeout(()=>{let{scrollTop:n,scrollHeight:r,clientHeight:i}=e;r-n-i<100&&O&&!D&&_(),t=null},150))};return e.addEventListener("scroll",n,{passive:!0}),()=>{e.removeEventListener("scroll",n),t&&clearTimeout(t)}},[O,D,_,A.length,S,E]),T)return(0,s.jsx)(a,{});let R=S||E;return(0,s.jsxs)(t,{children:[(0,s.jsx)(n,{searchQuery:g,setSearchQuery:m,uri:j}),R&&(0,s.jsx)(r,{}),!R&&0===A.length&&(0,s.jsx)(a,{searchQuery:g}),!R&&A.length>0&&(0,s.jsx)(c,{wallets:A,connectingWalletId:y,connectionError:b,isLoadingMore:D,scrollRef:L,onWalletClick:z}),(0,s.jsx)(u,{})]})}var m=n(71336),y=n(45679);function w(){let[e,t]=(0,o.useState)(!1);return{copied:e,copy:(0,o.useCallback)(async e=>{try{return await navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),2e3),!0}catch(e){return console.error("Unable to copy:",e),!1}},[])}}var b=n(22829),N=n(93271),v=n(70121),I=n(10484),x=n(60010);let C={ID:"trust",NAME:"Trust Wallet",INSTALL_LINK:"https://trustwallet.com/download",LOGO:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTYiIGhlaWdodD0iOTYiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDIxLjU2MjVMNDguNDk3NCAxMVY4NC4xMjA5QzI1LjI4NDcgNzQuMzcwNiAxNiA1NS42ODQzIDE2IDQ1LjEyNFYyMS41NjI1WiIgZmlsbD0iIzA1MDBGRiIvPgo8cGF0aCBkPSJNODAuOTk3NCAyMS41NjI1TDQ4LjUgMTFWODQuMTIwOUM3MS43MTI4IDc0LjM3MDYgODAuOTk3NCA1NS42ODQzIDgwLjk5NzQgNDUuMTI0VjIxLjU2MjVaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMTgyXzExMDE4KSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzE4Ml8xMTAxOCIgeDE9IjcyLjM2NTIiIHkxPSI1Ljg3OTYiIHgyPSI0Ny44MTYxIiB5Mj0iODMuMTIyIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIG9mZnNldD0iMC4wMiIgc3RvcC1jb2xvcj0iIzAw
1MDBGRiIvPgo8c3RvcCBvZmZzZXQ9IjAuMDgiIHN0b3AtY29sb3I9IiMwMDk0RkYiLz4KPHN0b3Agb2Zmc2V0PSIwLjE2IiBzdG9wLWNvbG9yPSIjNDhGRjkxIi8+CjxzdG9wIG9mZnNldD0iMC40MiIgc3RvcC1jb2xvcj0iIzAwOTRGRiIvPgo8c3RvcCBvZmZzZXQ9IjAuNjgiIHN0b3AtY29sb3I9IiMwMDM4RkYiLz4KPHN0b3Agb2Zmc2V0PSIwLjkiIHN0b3AtY29sb3I9IiMwNTAwRkYiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K"};function M({components:e}){let{wrapper:t,description:n,link:r}=e;return(0,s.jsxs)(t,{children:[(0,s.jsx)(n,{children:"Don't have a wallet?"}),(0,s.jsx)(r,{onClick:()=>{window.open(C.INSTALL_LINK,"_blank","noopener,noreferrer")},children:"Install Trust Wallet"})]})}var E=n(99232),j=n(20911),A=n(10713),S=n(77509);function D(){let{client:e}=(0,r.f)();return{connections:(0,o.useSyncExternalStore)(t=>e.onConnections(t),()=>e.getConnections(),()=>e.getConnections())}}var T=n(7325);function O({namespaceId:e}={}){let{connections:t}=D();return(0,o.useMemo)(()=>{let n=[],r=[];if(e){let i=t[e];i?.wallet?.id&&("connected"===i.status?n.push(i.wallet.id):"connecting"===i.status&&r.push(i.wallet.id))}else for(let e of Object.values(t))e?.wallet?.id&&("connected"===e.status?n.push(e.wallet.id):"connecting"===e.status&&r.push(e.wallet.id));return{connectedWalletIds:n,connectingWalletIds:r}},[t,e])}var _=n(29436);async function L({wallet:e,namespaceId:t,connect:n}){if("caip"===e.type)return void await n({wallet:e});if(!t)return void console.error("Select a namespace before connecting");let r=e.namespaces[t];if(!r)return void console.error(`Wallet ${e.id} does not support namespace ${t}`);await n({wallet:r})}function z({components:e}){let{emptyState:t,header:n,grid:r,walletButton:a,walletConnectButton:c}=e,{wallets:u}=(0,S.S)(),{connect:h,disconnect:d}=(0,l.e)(),{connections:f}=D(),{namespaces:p}=(0,T.W)(),{modalType:g,namespaceFilter:m,setTargetWallet:y,setView:w}=(0,i.B)(),{connectedWalletIds:b,connectingWalletIds:N}=O({namespaceId:m}),v=(0,o.useMemo)(()=>[...m?u.filter(e=>Object.keys(e.namespaces).includes(m)):u].sort((e,t)=>e.id===C.ID?-1:+(t.id===C.ID)),[u,m]),I=(0,o.useMemo)(()=>new Map(p.map(e=>[e.id,e.icon])),[p]),x=(0,o.useMemo)(()=>m?f[m]:null,[f,m]),M=x?.status==="connected",E=async e=>{if("wallet"===g){y(e),w("networks");return}if("namespace"===g){if(!m)throw new _.pJ("namespaceFilter");let t=f[m];if(t&&"connected"===t.status)return void d();L({wallet:e,namespaceId:m,connect:h})}},j=(0,o.useMemo)(()=>m&&p.find(e=>e.id===m)?.name||"",[m]);if(0===v.length){let e="namespace"===g?`No ${j} wallets found.`:void 0;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t,{message:e}),(0,s.jsx)(c,{})]})}return(0,s.jsxs)(s.Fragment,{children:[m&&(0,s.jsx)(n,{namespaceName:j}),(0,s.jsx)(r,{children:v.map(e=>{let t=b.includes(e.id),n=N.includes(e.id);return(0,s.jsx)(a,{name:e.name,icon:e.icon,active:t,variant:"default",actionLabel:t?"wallet"===g?"Manage":"Disconnect":"Connect",onClick:()=>E(e),disabled:"namespace"===g&&M&&!b.includes(e.id),loading:n,supportedNamespaceIcons:(e=>{if("wallet"===g)return Array.from(e.namespaceIds).map(e=>I.get(e)).filter(Boolean)})(e)},e.id)})}),(0,s.jsx)(c,{})]})}function U({components:e}){let{title:t,grid:n,walletButton:r}=e,{wallet:o,generateUri:a}=f(),{setView:c}=(0,i.B)(),{connectedWalletIds:u,connectingWalletIds:h}=O(),{disconnect:d}=(0,l.e)();if(!o)return null;let p=u.includes(o.id),g=h.includes(o.id),m=u.length>0&&!u.includes(o.id),y=async()=>{if(p)return void d();c("qr"),await a()};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t,{}),(0,s.jsx)(n,{children:(0,s.jsx)(r,{name:o.name,icon:o.icon,active:p,variant:"walletconnect",actionLabel:p?"Disconnect":"Connect",onClick:y,disabled:m,loading:g},o.id)})]})}var R=n(11246),k=n(40643);function P({message:e,components:t}){let{wrapper:n,message:r,walletButton:i}=t;return(0,s.jsxs)(n,{children:[(0,s.jsx)(r,{children:e||"No wallets found. Get Trust Wallet to get started."}),(0,s.jsx)(i,{name:C.NAME,icon:C.LOGO,actionLabel:"Install",onClick:()=>{window.open(C.INSTALL_LINK,"_blank","noopener,noreferrer")}})]})}var B=n(21329),Q=n(21911),W=n(28914),F=n(54090);function G({components:e}){let{header:t,grid:n,namespaceButton:r}=e,{namespaces:o}=(0,T.W)(),{connections:a}=D(),{connect:c,disconnect:u}=(0,l.e)(),{targetWallet:h,modalType:d,setTargetWallet:f,setNamespaceFilter:p,setVie
1w:g}=(0,i.B)(),m=async e=>{if("wallet"===d){if(!h)return void console.error("No wallet was previously selected, select a wallet before connecting.");let t=a[e];return t&&"connected"===t.status?void u({namespaceId:e}):void await L({wallet:h,namespaceId:e,connect:c})}if("namespace"===d){f(null),p(e),g("wallets");return}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t,{targetWallet:h}),(0,s.jsx)(n,{children:o.map(e=>{if(h&&!Array.from(h.namespaceIds).includes(e.id))return;let t=a[e.id],n=t&&"connected"===t.status,i=n?t.wallet:null,o=n&&h&&i?.id!==h.id,l=h?n?"Disconnect":"Connect":"Select";return(0,s.jsx)(r,{icon:e.icon,label:e.name,onClick:()=>m(e.id),actionLabel:l,loading:t?.status==="connecting",connectedWallet:o?i:void 0},e.id)})})]})}var Y=n(56943),$=n(60743);function q({components:e}){let{wrapper:t,placeholder:n,qrCode:r,actions:a,button:l,error:c,spinner:h}=e,d=(0,o.useMemo)(()=>u.M.ICON,[]),{uri:p,isUriLoading:g,error:m,wallet:y}=f(),{copied:b,copy:N}=w(),{close:v}=(0,i.B)(),{connectedWalletIds:I}=O(),x=async()=>{p&&await N(p)};return(0,o.useEffect)(()=>{y&&I.includes(y.id)&&v()},[y,I]),(0,s.jsxs)(t,{children:[g||!p?(0,s.jsx)(n,{children:(0,s.jsx)(h,{})}):(0,s.jsx)(r,{arena:d,value:p}),(0,s.jsx)(a,{children:(0,s.jsx)(l,{onClick:x,disabled:!p||g,children:b?"Copied!":"Copy to clipboard"})}),m&&(0,s.jsx)(c,{message:m.message})]})}var Z=n(47132),H=n(29814),V=n(49827),K=n(55381),X=n(52255);let J={newline:10,reset:27};function ee(e,t){return e.toString(2).padStart(t,"0")}function et(e,t){let n=e%t;return n>=0?n:t+n}function en(e,t){return Array(e).fill(t)}function er(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24}function ei(e){let t=0,n=0;for(let r of e)t=Math.max(t,r.length),n+=r.length;let r=new Uint8Array(n),i=0;for(let n=0;n<t;n++)for(let t of e)n<t.length&&(r[i++]=t[n]);return r}function es(e){return Object.freeze({has:t=>e.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw Error("alphabet.decode input should be array of strings");return t.map(t=>{if("string"!=typeof t)throw Error(`alphabet.decode: not string element=${t}`);let n=e.indexOf(t);if(-1===n)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return n})},encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw Error("alphabet.encode input should be an array of numbers");return t.map(t=>{if(!Number.isSafeInteger(t))throw Error(`integer expected: ${t}`);if(t<0||t>=e.length)throw Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]})}})}function eo(e){if(32!==e.length)throw Error("expects 32 element matrix");let t=[0x55555555,0x33333333,0xf0f0f0f,0xff00ff,65535];for(let n=0;n<5;n++){let r=t[n]>>>0,i=1<<n,s=i<<1;for(let t=0;t<32;t+=s)for(let n=0;n<i;n++){let s=t+n,o=s+i,a=e[s]>>>0,l=e[o]>>>0,c=(a>>>i^l)&r;e[s]=(a^c<<i)>>>0,e[o]=(l^c)>>>0}}}let ea=e=>1<<(31&e)>>>0,el=(e,t)=>0===t?0:32===t?0xffffffff:(1<<t)-1<<e>>>0;class ec{static size(e,t){if("number"==typeof e&&(e={height:e,width:e}),!Number.isSafeInteger(e.height)&&e.height!==1/0)throw Error(`Bitmap: invalid height=${e.height} (${typeof e.height})`);if(!Number.isSafeInteger(e.width)&&e.width!==1/0)throw Error(`Bitmap: invalid width=${e.width} (${typeof e.width})`);return void 0!==t&&(e={width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}),e}static fromString(e){let t,n=(e=e.replace(/^\n+/g,"").replace(/\n+$/g,"")).split(String.fromCharCode(J.newline)),r=n.length,i=[];for(let e of n){let n=e.split("").map(e=>{if("X"===e)return!0;if(" "===e)return!1;if("?"!==e)throw Error(`Bitmap.fromString: unknown symbol=${e}`)});if(void 0!==t&&n.length!==t)throw Error(`Bitmap.fromString different row sizes: width=${t} cur=${n.length}`);t=n.length,i.push(n)}return void 0===t&&(t=0),new ec({height:r,width:t},i)}defined;value;tailMask;words;fullWords;height;width;constructor(e,t){let{height:n,width:r}=ec.size(e);if(!Number.isSafeInteger(n)||n<=0)throw Error(`Bitmap: invalid height=${n}, expected positive safe integer dimension`);
1if(!Number.isSafeInteger(r)||r<=0)throw Error(`Bitmap: invalid width=${r}, expected positive safe integer dimension`);if(this.height=n,this.width=r,this.tailMask=el(0,31&r||32),this.words=0|Math.ceil(r/32),this.fullWords=0|Math.floor(r/32),this.value=new Uint32Array(this.words*n),this.defined=new Uint32Array(this.value.length),t){if(t.length!==n)throw Error(`Bitmap: data height mismatch: exp=${n} got=${t.length}`);for(let e=0;e<n;e++){let n=t[e];if(!n||n.length!==r)throw Error(`Bitmap: data width mismatch at y=${e}: exp=${r} got=${n?.length}`);for(let t=0;t<r;t++)this.set(t,e,n[t])}}}point(e){return this.get(e.x,e.y)}isInside(e){return 0<=e.x&&e.x<this.width&&0<=e.y&&e.y<this.height}size(e){if(!e)return{height:this.height,width:this.width};let{x:t,y:n}=this.xy(e);return{height:this.height-n,width:this.width-t}}xy(e){if("number"==typeof e&&(e={x:e,y:e}),!Number.isSafeInteger(e.x))throw Error(`Bitmap: invalid x=${e.x}`);if(!Number.isSafeInteger(e.y))throw Error(`Bitmap: invalid y=${e.y}`);return e.x=et(e.x,this.width),e.y=et(e.y,this.height),e}wordIndex(e,t){return t*this.words+(e>>>5)}bitIndex(e,t){return{word:this.wordIndex(e,t),bit:31&e}}isDefined(e,t){let n=this.wordIndex(e,t),r=ea(e);return(this.defined[n]&r)!=0}get(e,t){let n=this.wordIndex(e,t),r=ea(e);return(this.value[n]&r)!=0}maskWord(e,t,n){let{defined:r,value:i}=this;r[e]|=t,i[e]=i[e]&~t|-n&t}set(e,t,n){void 0!==n&&this.maskWord(this.wordIndex(e,t),ea(e),n)}fillRectConst(e,t,n,r,i){if(n<=0||r<=0||void 0===i)return;let{value:s,defined:o,words:a}=this,l=e>>>5,c=e+n-1>>>5,u=31&e,h=e+n-1&31;for(let e=0;e<r;e++){let n=(t+e)*a;if(l===c){let e=el(u,h-u+1);this.maskWord(n+l,e,i);continue}this.maskWord(n+l,el(u,32-u),i);for(let e=l+1;e<c;e++)o[n+e]=0xffffffff,s[n+e]=0xffffffff*!!i;this.maskWord(n+c,el(0,h+1),i)}}rectWords(e,t,n,r,i){for(let s=0;s<r;s++){let r=t+s;for(let t=0;t<n;){let o=e+t,{bit:a,word:l}=this.bitIndex(o,r),c=Math.min(32-a,n-t);i(l,o,t,s,c),t+=c}}}rect(e,t,n){let{x:r,y:i}=this.xy(e),{height:s,width:o}=ec.size(t,this.size({x:r,y:i}));if("function"!=typeof n)return this.fillRectConst(r,i,o,s,n),this;let{defined:a,value:l}=this;return this.rectWords(r,i,o,s,(e,t,r,i,s)=>{let o=0,c=l[e];for(let e=0;e<s;e++){let s=ea(t+e),a=n({x:r+e,y:i},(c&s)!=0);void 0!==a&&(o|=s,c=c&~s|-a&s)}a[e]|=o,l[e]=c}),this}rectRead(e,t,n){let{x:r,y:i}=this.xy(e),{height:s,width:o}=ec.size(t,this.size({x:r,y:i})),{value:a}=this;return this.rectWords(r,i,o,s,(e,t,r,i,s)=>{let o=a[e];for(let e=0;e<s;e++){let s=ea(t+e);n({x:r+e,y:i},(o&s)!=0)}}),this}hLine(e,t,n){return this.rect(e,{width:t,height:1},n)}vLine(e,t,n){return this.rect(e,{width:1,height:t},n)}border(e=2,t){if(!Number.isSafeInteger(e)||e<=0)throw Error(`Bitmap.border: invalid size=${e}`);let n=new ec({height:this.height+2*e,width:this.width+2*e});return n.rect(0,1/0,t),n.embed({x:e,y:e},this),n}embed(e,t){let{x:n,y:r}=this.xy(e),{height:i,width:s}=ec.size(t.size(),this.size({x:n,y:r}));if(s<=0||i<=0)return this;let{value:o,defined:a}=this,{words:l,value:c}=t;for(let e=0;e<i;e++){let i=e*l;for(let u=0;u<s;){let h=n+u,{word:d,bit:f}=this.bitIndex(h,r+e),{word:p,bit:g}=t.bitIndex(u,e),m=Math.min(32-f,s-u),y=c[p],w=g&&p+1<i+l?c[p+1]:0,b=g?(y>>>g|w<<32-g)>>>0:y,N=el(f,m),v=(b&el(0,m))<<f>>>0;a[d]|=N,o[d]=o[d]&~N|v,u+=m}}return this}rectSlice(e,t=this.size()){let{x:n,y:r}=this.xy(e),{height:i,width:s}=ec.size(t,this.size({x:n,y:r})),o=new ec({height:i,width:s});return this.rectRead({x:n,y:r},{height:i,width:s},(e,t)=>{this.isDefined(n+e.x,r+e.y)&&o.set(e.x,e.y,t)}),o}transpose(){let{height:e,width:t,value:n,defined:r,words:i}=this,s=new ec({height:t,width:e}),{words:o,value:a,defined:l,tailMask:c}=s,u=new Uint32Array(32),h=new Uint32Array(32);for(let d=0;d<e;d+=32)for(let f=0;f<i;f++){let i=Math.min(32,e-d);for(let e=0;e<i;e++){let t=this.wordIndex(32*f,d+e);u[e]=n[t],h[e]=r[t]}u.fill(0,i),h.fill(0,i),eo(u),eo(h);for(let e=0;e<32;e++){let n=32*f+e;if(n>=t)break;let r=s.wordIndex(d,n),i=d>>>5==o-1?c:0xffffffff;a[r]=u[e]&i,l[r]=h[e]&i}}return s}negate(){let e=this.defined.length;for(let t=0;t<e;t++)this.value[t]=~this.value[t],this.defined[t]=0xffffffff;return this}scale(e){if(!Number.isSafeInteger(e)||e>1024)throw Error(`invalid scale factor: ${e}`);let{height:t,width:n}=this;return new ec({height:e*t,width:e*n}).rect({x:0,y:0},1/0,({x:t,y:n})=>this.get(t/e|0,n/e|0))}clone(){let e=new ec(this.size());return e.defined.set(this.defined),e.value.set(this.value),e}assertDrawn(){let{height:e,width:t,defined:n,tailMask:r,fullWords:i,words:s}=this;if(e&&t)for(let t=0;t<e;t++){let e=t*s;for(let t=0;t<i;t++)if(0xffffffff!==n[e+t])throw Error("Invalid color type=undefined");if(s!==i&&(n[e+i]&r)!==r)throw Error("Invalid color type=undefined")}}countPatternInRow(e,t,...n){if(!Number.isSafeInteger(t)||t<=0||t>=32)throw Error("wrong patternLen");let r=(1<<t)-1,{height:i,width:s,value:o,words:a}=this;if(!Number.isSafeInteger(e)||e<0||e>=i)return 0;let l=0,c=this.wordIndex(0,e);for(let e=0,i=0;e<a;e++){let u=o[c+e],h=e===a-1&&31&s||32;for(let s=0;s<h;s++)if(i=(i<<1|u>>>s&1)&r,!(32*e+s+1<t)){for(let e of n)if(i===e){l++;break}}}return l}getRuns(e,t){let n,{height:r,width:i,value:s,words:o}=this;if(0===i||!Number.isSafeInteger(e)||e<0||e>=r)return;let a=0,l=this.wordIndex(0,e);for(let e=0;e<o;
1e++){let r=s[l+e],c=e===o-1&&31&i||32;for(let e=0;e<c;e++){let i=(r&1<<e)!=0;if(i===n){a++;continue}void 0!==n&&t(a,n),n=i,a=1}}void 0!==n&&t(a,n)}popcnt(){let{height:e,width:t,words:n,fullWords:r,tailMask:i}=this;if(!e||!t)return 0;let s=0;for(let t=0;t<e;t++){let e=t*n;for(let t=0;t<r;t++)s+=er(this.value[e+t]);n!==r&&(s+=er(this.value[e+r]&i))}return s}countBoxes2x2(e){let{height:t,width:n,words:r}=this;if(n<2||!Number.isSafeInteger(e)||e<0||e+1>=t)return 0;let i=this.wordIndex(0,e),s=this.wordIndex(0,e+1),o=0==(31&n)?0x7fffffff:el(0,n-1&31),a=0;for(let e=0;e<r;e++){let t=this.value[i+e],n=this.value[s+e],l=(~(t^n)>>>0&~(t^(t>>>1|(1&(e+1<r?this.value[i+e+1]>>>0:0))<<31)>>>0)>>>0&~(n^(n>>>1|(1&(e+1<r?this.value[s+e+1]>>>0:0))<<31)>>>0)>>>0)>>>0;e===r-1&&(l&=o),a+=er(l)}return a}toString(){let e=String.fromCharCode(J.newline),t="";for(let n=0;n<this.height;n++){let r="";for(let e=0;e<this.width;e++){let t=this.get(e,n);r+=this.isDefined(e,n)?t?"X":" ":"?"}t+=r+(n+1===this.height?"":e)}return t}toRaw(){let e=Array.from({length:this.height},()=>Array(this.width));for(let t=0;t<this.height;t++){let n=e[t];for(let e=0;e<this.width;e++)n[e]=this.get(e,t)}return e}toASCII(){let{height:e,width:t}=this,n="";for(let r=0;r<e;r+=2){for(let i=0;i<t;i++){let t=this.get(i,r),s=r+1>=e||this.get(i,r+1);t||s?!t&&s?n+="â":t&&!s?n+="â":t&&s&&(n+=" "):n+="â"}n+=String.fromCharCode(J.newline)}return n}toTerm(){let e=String.fromCharCode(J.reset),t=e+"[0m",n=e+"[1;47m "+t,r=e+"[40m "+t,i=String.fromCharCode(J.newline),s="";for(let e=0;e<this.height;e++){for(let t=0;t<this.width;t++)s+=this.get(t,e)?r:n;s+=i}return s}toSVG(e=!0){let t,n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="";return this.rectRead(0,1/0,(i,s)=>{if(!s)return;let{x:o,y:a}=i;if(!e){n+=`<rect x="${o}" y="${a}" width="1" height="1" />`;return}let l=`M${o} ${a}`;if(t){let e=`m${o-t.x} ${a-t.y}`;e.length<=l.length&&(l=e)}let c=o<10?`H${o}`:"h-1";r+=`${l}h1v1${c}Z`,t=i}),e&&(n+=`<path d="${r}"/>`),n+="</svg>"}toGIF(){let e=e=>[255&e,e>>>8&255],t=[...e(this.width),...e(this.height)],n=[];this.rectRead(0,1/0,(e,t)=>n.push(+(!0===t)));let r=[71,73,70,56,55,97,...t,246,0,0,255,255,255,...en(381,0),44,0,0,0,0,...t,0,7],i=Math.floor(n.length/126);for(let e=0;e<i;e++)r.push(127,128,...n.slice(126*e,126*(e+1)).map(e=>+e));return r.push(n.length%126+1,128,...n.slice(126*i).map(e=>+e)),r.push(1,129,0,59),new Uint8Array(r)}toImage(e=!1){let{height:t,width:n}=this.size(),r=new Uint8Array(t*n*(e?3:4)),i=0;for(let s=0;s<t;s++)for(let t=0;t<n;t++){let n=255*!this.get(t,s);r[i++]=n,r[i++]=n,r[i++]=n,e||(r[i++]=255)}return{height:t,width:n,data:r}}}let eu=Object.freeze(["low","medium","quartile","high"]),eh=Object.freeze(["numeric","alphanumeric","byte","kanji","eci"]),ed=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],ef={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},ep={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},eg=Object.freeze({size:Object.freeze({encode:e=>21+4*(e-1),decode:e=>(e-17)/4}),sizeType:e=>Math.floor((e+7)/17),alignmentPatterns(e){if(1===e)return[];let t=eg.size.encode(e)-6-1,n=t-6,r=Math.ceil(n/28),i=Math.floor(n/r);i%2?i+=1:n%r*2>=r&&(i+=2);let s=[6];for(let e=1;e<r;e++)s.push(t-(r-e)*i);return s.push(t),s},ECCode:Object.freeze({low:1,medium:0,quartile:3,high:2}),formatMask:21522,formatBits(e,t){let n=eg.ECCode[e]<<3|t,r=n;for(let e=0;e<10;e++)r=r<<1^(r>>9)*1335;return(n<<10|r)^eg.formatMask},versionBits(e){let t=e;for(let e=0;e<12;e++)t=t<<1^(t>>11)*7973;return e<<12|t},alphabet:Object.freeze({numeric:es("0123456789"),alphanumerc:es("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")}),lengthBits:(e,t)=>({numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]})[t][eg.sizeType(e)],modeBits:Object.freeze({numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"}),capacity(e,t){let n=ed[e-1],r=ef[t][e-1],i=ep[t][e-1],s=Math.floor(n/i)-r,o=i-n%i;return{words:r,numBlocks:i,shortBlocks:o,blockLen:s,capacity:(n-r*i)*8,total:(r+s)*i+i-o}}}),em=Object.freeze([(e,t)=>(e+t)%2==0,(e,t)=>t%2==0,(e,t)=>e%3==0,(e,t)=>(e+t)%3==0,(e,t)=>(Math.floor(t/2)+Math.floor(e/3))%2==0,(e,t)=>e*t%2+e*t%3==0,(e,t)=>(e*t%2+e*t%3)%2==0,(e,t)=>((e+t)%2+e*t%3)%2==0]),ey={tables:(e=>{let t=en(256,0),n=en(256,0);for(let e=0,r=1;e<256;e++)t[e]=r,n[r]=e,256&(r<<=1)&&(r^=285);return{exp:t,log:n}})(0),exp:e=>ey.tables.exp[e],log(e){if(0===e)throw Error(`GF.log: invalid arg=${e}`);return ey.tables.log[e]%255},mul:(e,t)=>
10===e||0===t?0:ey.tables.exp[(ey.tables.log[e]+ey.tables.log[t])%255],add:(e,t)=>e^t,pow:(e,t)=>ey.tables.exp[ey.tables.log[e]*t%255],inv(e){if(0===e)throw Error(`GF.inverse: invalid arg=${e}`);return ey.tables.exp[255-ey.tables.log[e]]},polynomial(e){if(0==e.length)throw Error("GF.polymomial: invalid length");if(0!==e[0])return e;let t=0;for(;t<e.length-1&&0==e[t];t++);return e.slice(t)},monomial(e,t){if(e<0)throw Error(`GF.monomial: invalid degree=${e}`);if(0==t)return[0];let n=en(e+1,0);return n[0]=t,ey.polynomial(n)},degree:e=>e.length-1,coefficient:(e,t)=>e[ey.degree(e)-t],mulPoly(e,t){if(0===e[0]||0===t[0])return[0];let n=en(e.length+t.length-1,0);for(let r=0;r<e.length;r++)for(let i=0;i<t.length;i++)n[r+i]=ey.add(n[r+i],ey.mul(e[r],t[i]));return ey.polynomial(n)},mulPolyScalar(e,t){if(0==t)return[0];if(1==t)return e;let n=en(e.length,0);for(let r=0;r<e.length;r++)n[r]=ey.mul(e[r],t);return ey.polynomial(n)},mulPolyMonomial(e,t,n){if(t<0)throw Error("GF.mulPolyMonomial: invalid degree");if(0==n)return[0];let r=en(e.length+t,0);for(let t=0;t<e.length;t++)r[t]=ey.mul(e[t],n);return ey.polynomial(r)},addPoly(e,t){if(0===e[0])return t;if(0===t[0])return e;let n=e,r=t;n.length>r.length&&([n,r]=[r,n]);let i=en(r.length,0),s=r.length-n.length,o=r.slice(0,s);for(let e=0;e<o.length;e++)i[e]=o[e];for(let e=s;e<r.length;e++)i[e]=ey.add(n[e-s],r[e]);return ey.polynomial(i)},remainderPoly(e,t){let n=Array.from(e);for(let r=0;r<e.length-t.length+1;r++){let e=n[r];if(0!==e)for(let i=1;i<t.length;i++)0!==t[i]&&(n[r+i]=ey.add(n[r+i],ey.mul(t[i],e)))}return n.slice(e.length-t.length+1,n.length)},divisorPoly(e){let t=[1];for(let n=0;n<e;n++)t=ey.mulPoly(t,[1,ey.pow(2,n)]);return t},evalPoly(e,t){if(0==t)return ey.coefficient(e,0);let n=e[0];for(let r=1;r<e.length;r++)n=ey.add(ey.mul(t,n),e[r]);return n},euclidian(e,t,n){ey.degree(e)<ey.degree(t)&&([e,t]=[t,e]);let r=e,i=t,s=[0],o=[1];for(;2*ey.degree(i)>=n;){let e=r,t=s;if(r=i,s=o,0===r[0])throw Error("rLast[0] === 0");i=e;let n=[0],a=ey.inv(r[0]);for(;ey.degree(i)>=ey.degree(r)&&0!==i[0];){let e=ey.degree(i)-ey.degree(r),t=ey.mul(i[0],a);n=ey.addPoly(n,ey.monomial(e,t)),i=ey.addPoly(i,ey.mulPolyMonomial(r,e,t))}if(n=ey.mulPoly(n,s),o=ey.addPoly(n,t),ey.degree(i)>=ey.degree(r))throw Error(`Division failed r: ${i}, rLast: ${r}`)}let a=ey.coefficient(o,0);if(0==a)throw Error("sigmaTilde(0) was zero");let l=ey.inv(a);return[ey.mulPolyScalar(o,l),ey.mulPolyScalar(i,l)]}};function ew(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function eb(e,t,n,r,i=ew){let s="",o=n.length;if("numeric"===r){let e=eg.alphabet.numeric.decode(n.split("")),t=e.length;for(let n=0;n<t-2;n+=3)s+=ee(100*e[n]+10*e[n+1]+e[n+2],10);t%3==1?s+=ee(e[t-1],4):t%3==2&&(s+=ee(10*e[t-2]+e[t-1],7))}else if("alphanumeric"===r){let e=eg.alphabet.alphanumerc.decode(n.split("")),t=e.length;for(let n=0;n<t-1;n+=2)s+=ee(45*e[n]+e[n+1],11);t%2==1&&(s+=ee(e[t-1],6))}else if("byte"===r){let e=i(n);o=e.length,s=Array.from(e).map(e=>ee(e,8)).join("")}else throw Error("encode: unsupported type");let{capacity:a}=eg.capacity(e,t),l=ee(o,eg.lengthBits(e,r)),c=eg.modeBits[r]+l+s;if(c.length>a)throw Error("Capacity overflow");(c+="0".repeat(Math.min(4,Math.max(0,a-c.length)))).length%8&&(c+="0".repeat(8-c.length%8));let u="1110110000010001";for(let e=0;c.length!==a;e++)c+=u[e%u.length];let h=Uint8Array.from(c.match(/(.{8})/g).map(e=>Number(`0b${e}`)));return(function(e,t){let{words:n,shortBlocks:r,numBlocks:i,blockLen:s,total:o}=eg.capacity(e,t),a={encode(e){let t=ey.divisorPoly(n),r=Array.from(e);return r.push(...t.slice(0,-1).fill(0)),Uint8Array.from(ey.remainderPoly(r,t))},decode(e){let t=e.slice(),r=ey.polynomial(Array.from(e)),i=en(n,0),s=!1;for(let e=0;e<n;e++){let t=ey.evalPoly(r,ey.exp(e));i[i.length-1-e]=t,0!==t&&(s=!0)}if(!s)return t;i=ey.polynomial(i);let o=ey.monomial(n,1),[a,l]=ey.euclidian(o,i,n),c=en(ey.degree(a),0),u=0;for(let e=1;e<256&&u<c.length;e++)0===ey.evalPoly(a,e)&&(c[u++]=ey.inv(e));if(u!==c.length)throw Error("RS.decode: invalid errors number");for(let e=0;e<c.length;e++){let n=t.length-1-ey.log(c[e]);if(n<0)throw Error("RS.decode: invalid error location");let r=ey.inv(c[e]),i=1;for(let t=0;t<c.length;t++)e!==t&&(i=ey.mul(i,ey.add(1,ey.mul(c[t],r))));t[n]=ey.add(t[n],ey.mul(ey.evalPoly(l,r),ey.inv(i)))}return t}};return{encode(e){let t=[],n=[];for(let o=0;o<i;o++){let i=s+ +!(o<r);t.push(e.subarray(0,i)),n.push(a.encode(e.subarray(0,i))),e=e.subarray(i)}let o=ei(t),l=ei(n),c=new Uint8Array(o.length+l.length);return c.set(o),c.set(l,o.length),c},decode(e){if(e.length!==o)throw Error(`interleave.decode: len(data)=${e.length}, total=${o}`);let t=[];for(let e=0;e<i;e++){let i=e<r;t.push(new Uint8Array(n+s+ +!i))}let l=0;for(let n=0;n<s;n++)for(let r=0;r<i;r++)t[r][n]=e[l++];for(let n=r;n<i;n++)t[n][s]=e[l++];for(let o=s;o<s+n;o++)for(let n=0;n<i;n++){let i=n<r;t[n][o+ +!i]=e[l++]}let c=[];for(let e of t)c.push(...Array.from(a.decode(e)).slice(0,-n));return Uint8Array.from(c)}}})(e,t).encode(h)}function eN(e,t,n,r,i=!1){let s=function(e,t,n,r=!1){let i=eg.size.encode(e),s=new ec(i+2),o=new ec(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);s=(s=s.embed(0,o).embed({x:-o.width,y:0},o).embed({x:0,y:-o.height},o)).rectSlice(1,i);let a=new ec(1).rect(0,1,!0).border(1,!1).border(1,!0),l=eg.alignmentPatterns(e);for(let e of l)for(let t of l)s.isDefined(t,e)||s.embed({x:t-2,y:e-2},a);s=s.hLine({x:0,y:6},1/0,({x:e})=>s.isDefined(e,6)?void 0:e%2==0).vLine({x:6,y:0},1/0,({y:e})=>s.isDefined(6,e)?void 0:e%2==0);
1{let e=eg.formatBits(t,n),o=t=>!r&&(e>>t&1)==1;for(let e=0;e<6;e++)s.set(8,e,o(e));for(let e=6;e<8;e++)s.set(8,e+1,o(e));for(let e=8;e<15;e++)s.set(8,i-15+e,o(e));for(let e=0;e<8;e++)s.set(i-e-1,8,o(e));for(let e=8;e<9;e++)s.set(15-e-1+1,8,o(e));for(let e=9;e<15;e++)s.set(15-e-1,8,o(e));s.set(8,i-8,!r)}if(e>=7){let t=eg.versionBits(e);for(let e=0;e<18;e+=1){let n=!r&&(t>>e&1)==1,o=Math.floor(e/3),a=e%3+i-8-3;s.set(a,o,n),s.set(o,a,n)}}return s}(e,t,r,i),o=0,a=8*n.length;if(!function(e,t,n){let r=e.height,i=em[t],s=-1,o=r-1;for(let t=r-1;t>0;t-=2){for(6==t&&(t=5);;o+=s){for(let r=0;r<2;r+=1){let s=t-r;e.isDefined(s,o)||n(s,o,i(s,o))}if(o+s<0||o+s>=r)break}s=-s}}(s,r,(e,t,r)=>{let i=!1;o<a&&(i=(n[o>>>3]>>(7-o&7)&1)!=0,o++),s.set(e,t,i!==r)}),o!==a)throw Error("QR: bytes left after draw");return s}let ev=e=>{let t=e.map(e=>e?"1":"0").join("");return{len:t.length,n:Number(`0b${t}`)}},eI=[!0,!1,!0,!0,!0,!1,!0],ex=[!1,!1,!1,!1],eC=ev([...eI,...ex]),eM=ev([...ex,...eI]);function eE(e){let{arena:t,...n}=e;return(0,s.jsxs)(eE.Root,{...n,children:[(0,s.jsx)(eE.Finder,{}),(0,s.jsx)(eE.Cells,{}),t&&(0,s.jsx)(eE.Arena,{children:"string"==typeof t?(0,s.jsx)("img",{alt:"Arena",src:t,style:{borderRadius:1,height:"100%",objectFit:"cover",width:"100%"}}):t})]})}!function(e){function t(t){let{children:n,size:r="100%",value:i,version:a,errorCorrection:l,...c}=t,u=o.useMemo(()=>(o.Children.map(n,e=>o.isValidElement(e)&&"string"!=typeof e.type&&"displayName"in e.type&&"Arena"===e.type.displayName||null)??[]).some(Boolean),[n]),h=o.useMemo(()=>{let e=l;return u&&"low"===l&&(e="medium"),function(e,t={}){let{errorCorrection:n,version:r}=t,i=function(e,t="raw",n={}){let r=void 0!==n.ecc?n.ecc:"medium";if(!eu.includes(r))throw Error(`Invalid error correction mode=${r}. Expected: ${eu}`);let i=void 0!==n.encoding?n.encoding:function(e){let t="numeric";for(let n of e)if(!eg.alphabet.numeric.has(n)&&(t="alphanumeric",!eg.alphabet.alphanumerc.has(n)))return"byte";return t}(e);if(!eh.includes(i))throw Error(`Encoding: invalid mode=${i}. Expected: ${eh}`);if("kanji"===i||"eci"===i)throw Error(`Encoding: ${i} is not supported (yet?).`);void 0!==n.mask&&function(e){if(![0,1,2,3,4,5,6,7].includes(e)||!em[e])throw Error(`Invalid mask=${e}. Expected number [0..7]`)}(n.mask);let s=n.version,o,a=Error("Unknown error");if(void 0!==s){var l=s;if(!Number.isSafeInteger(l)||l<1||l>40)throw Error(`Invalid version=${l}. Expected number [1..40]`);o=eb(s,r,e,i,n.textEncoder)}else for(let t=1;t<=40;t++)try{o=eb(t,r,e,i,n.textEncoder),s=t;break}catch(e){a=e}if(!s||!o)throw a;let c=function(e,t,n,r){if(void 0===r){let i,s,o=(s=1/0,{add(e,t){e>=s||(i=t,s=e)},get:()=>i,score:()=>s});for(let r=0;r<em.length;r++)o.add(function(e){let{width:t,height:n}=e,r=e.transpose(),i=0;for(let t=0;t<n;t++)e.getRuns(t,e=>{e>=5&&(i+=3+(e-5))});for(let e=0;e<t;e++)r.getRuns(e,e=>{e>=5&&(i+=3+(e-5))});let s=0;for(let t=0;t<n-1;t++)s+=3*e.countBoxes2x2(t);let o=0;for(let t=0;t<n;t++)o+=40*e.countPatternInRow(t,eC.len,eC.n,eM.n);for(let e=0;e<t;e++)o+=40*r.countPatternInRow(e,eC.len,eC.n,eM.n);let a=n*t,l=Math.ceil(Math.max(0,Math.abs(100*e.popcnt()-50*a)-5*a)/(5*a));return i+s+o+10*l}(eN(e,t,n,r,!0)),r);r=o.get()}if(void 0===r)throw Error("Cannot find mask");return eN(e,t,n,r)}(s,r,o,n.mask);c.assertDrawn();let u=void 0===n.border?2:n.border;if(!Number.isSafeInteger(u)||u<=0)throw Error(`invalid border=${u}`);if(c=c.border(u,!1),void 0!==n.scale&&(c=c.scale(n.scale)),"raw"===t)return c.toRaw();if("ascii"===t)return c.toASCII();if("svg"===t)return c.toSVG(n.optimize);if("gif"===t)return c.toGIF();if("term"===t)return c.toTerm();else throw Error(`Unknown output: ${t}`)}(e,"raw",{border:0,ecc:n,scale:1,version:r});return{edgeLength:i.length,finderLength:7,grid:i,value:e}}(i,{errorCorrection:e,version:a})},[i,u,l,a]),d=+h.edgeLength,f=h.finderLength/2,p=u?Math.floor(d/4):0,g=o.useMemo(()=>({arenaSize:p,cellSize:1,edgeSize:d,qrcode:h,finderSize:f}),[p,d,h,f]);return(0,s.jsx)(e.Context.Provider,{value:g,children:(0,s.jsxs)("svg",{...c,width:r,height:r,viewBox:`0 0 ${d} ${d}`,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"QR Code"}),n]})})}function n(t){let{className:n,fill:r,innerClassName:i,radius:a=.25}=t,{cellSize:l,edgeSize:c,finderSize:u}=o.useContext(e.Context);function h({position:e}){let t=u-(u-l)-l/2;"top-right"===e&&(t=c-u-(u-l)-l/2);let o=u-(u-l)-l/2;"bottom-left"===e&&(o=c-u-(u-l)-l/2);let h=u-1.5*l;"top-right"===e&&(h=c-u-1.5*l);let d=u-1.5*l;return"bottom-left"===e&&(d=c-u-1.5*l),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{className:n,stroke:r??"currentColor",fill:"transparent",x:t,y:o,width:l+(u-l)*2,height:l+(u-l)*2,rx:2*a*(u-l),ry:2*a*(u-l),strokeWidth:l}),(0,s.jsx)("rect",{className:i,fill:r??"currentColor",x:h,y:d,width:3*l,height:3*l,rx:2*a*l,ry:2*a*l})]})}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h,{position:"top-left"}),(0,s.jsx)(h,{position:"top-right"}),(0,s.jsx)(h,{position:"bottom-left"})]})}function r(t){let{className:n,fill:r="currentColor",inset:i=!0,radius:a=1}=t,{arenaSize:l,cellSize:c,qrcode:u}=o.useContext(e.Context),{edgeLength:h,finderLength:d}=u,f=o.useMemo(()=>{let e="";for(let t=0;t<u.grid.length;t++){let n=u.grid[t];if(n)for(let r=0;r<n.length;r++){if(!n[r])continue;let s=h/2-l/2,o=s+l;if(t>=s&&t<=o&&r>=s&&r<=o)continue;let u=t<d&&r<d,f=t<d&&r>=h-d,p=t>=h-d&&r<d;if(u||f||p)continue;let g=i?.1*c:0,m=(c-2*g)/2,y=r*c+c/2,w=t*c+c/2,b=y-m,N=y+m,v=w-m,I=w+m,x=a*m;e+=`M ${b+x},${v} L ${N-x},${v} A ${x},${x} 0 0,1 ${N},${v+x} L ${N},${I-x} A ${x},${x} 0 0,1 ${N-x},${I} L ${b+x},${I} A ${x},${x} 0 0,1 ${b},${I-x} L ${b},${v+x} A ${x},${x} 0 0,1 ${b+x},${v} z`}}return e},[l,c,h,d,u.grid,i,a]);return(0,s.jsx)("path",{className:n,d:f,fill:r})}function i(t){let{children:n}=t,{arenaSize:r,cellSize:i,edgeSize:a}=o.useContext(e.Context),l=Math.ceil(a/2-r/2),c=r+r%2;return(0,s.jsx)("foreignObject",{x:l,y:l,width:c,height:c,children:(0,s.jsx)("div",{style:{alignItems:"center",display:"flex",fontSize:1,justifyContent:"center",height:"100%",overflow:"hidden",
1width:"100%",padding:i/2,boxSizing:"border-box"},children:n})})}e.Context=o.createContext(null),e.Root=t,(t=e.Root||(e.Root={})).displayName="Root",e.Finder=n,(n=e.Finder||(e.Finder={})).displayName="Finder",e.Cells=r,(r=e.Cells||(e.Cells={})).displayName="Cells",e.Arena=i,(i=e.Arena||(e.Arena={})).displayName="Arena"}(eE||(eE={}));var ej=n(89205),eA=n(31488),eS=n(29757),eD=n(76292),eT=n(70348);function eO({searchQuery:e}){return e?(0,s.jsxs)("div",{className:m.empty,children:['No wallets found for "',e,'"']}):(0,s.jsx)("div",{className:m.empty,children:"No wallets available"})}function e_(){return(0,s.jsx)("div",{className:y.loading,children:"Loading wallets..."})}function eL(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,s.jsx)("path",{d:"M7.33333 12.6667C10.2789 12.6667 12.6667 10.2789 12.6667 7.33333C12.6667 4.38781 10.2789 2 7.33333 2C4.38781 2 2 4.38781 2 7.33333C2 10.2789 4.38781 12.6667 7.33333 12.6667Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M14 14L11.1 11.1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ez(){return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"16",height:"16",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 6l12 12M6 18L18 6"})})}function eU({value:e,onChange:t,placeholder:n="Search..."}){let[r,i]=(0,o.useState)(!1);return(0,s.jsxs)("div",{className:`${b.searchBar} ${r?b.focused:""}`,children:[(0,s.jsx)("div",{className:b.searchIcon,children:(0,s.jsx)(eL,{})}),(0,s.jsx)("input",{type:"text",value:e,onChange:e=>{t(e.target.value)},onFocus:()=>i(!0),onBlur:()=>i(!1),placeholder:n,className:b.input}),e&&(0,s.jsx)("button",{type:"button",onClick:()=>{t("")},className:b.clearButton,"aria-label":"Clear search",children:(0,s.jsx)(ez,{})})]})}function eR(){return(0,s.jsx)("svg",{className:"tcui-check-icon",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,s.jsx)("path",{d:"M6.66667 0C2.98667 0 0 2.98667 0 6.66667C0 10.3467 2.98667 13.3333 6.66667 13.3333C10.3467 13.3333 13.3333 10.3467 13.3333 6.66667C13.3333 2.98667 10.3467 0 6.66667 0ZM9.8 5.05333L6.45333 9.12667C6.34 9.26667 6.16667 9.35333 5.98667 9.36667C5.96667 9.37333 5.95333 9.37333 5.94 9.37333C5.77333 9.37333 5.61333 9.30667 5.48667 9.19333L3.59333 7.44667C3.32667 7.2 3.30667 6.77333 3.56 6.50667C3.80667 6.23333 4.22667 6.22 4.5 6.46667L5.87333 7.73333L8.77333 4.20667C9.00667 3.92 9.42667 3.88 9.70667 4.11333C9.99333 4.34667 10.0333 4.76667 9.8 5.05333Z",fill:"currentColor"})})}function ek(){return(0,s.jsxs)("svg",{className:"tcui-copy-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,s.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})}function eP({searchQuery:e,setSearchQuery:t,uri:n}){let{copied:r,copy:i}=w(),o=async()=>{n&&await i(n)};return(0,s.jsxs)("div",{className:N.searchContainer,children:[(0,s.jsx)(eU,{value:e,onChange:t,placeholder:"Search wallets..."}),(0,s.jsx)("button",{type:"button",onClick:o,className:N.copyButton,"aria-label":"Copy WalletConnect URI",disabled:!n,"data-copied":r,children:r?(0,s.jsx)(eR,{}):(0,s.jsx)(ek,{})})]})}function eB(){return(0,s.jsx)("span",{className:"tcui-spinner","aria-hidden":!0})}function eQ({name:e,icon:t,variant:n="default",active:r=!1,actionLabel:i="Connect",onClick:o,disabled:a,loading:l,error:c,supportedNamespaceIcons:u}){let h=()=>{a||l||o?.()};return(0,s.jsxs)("div",{className:I.walletButton,"data-variant":n,"data-active":r,"data-disabled":a,"data-loading":l,role:"button",tabIndex:0,onClick:h,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),h())},children:[(0,s.jsx)("span",{className:I.icon,"aria-hidden":!0,children:(0,s.jsx)("img",{src:t,alt:e})}),(0,s.jsxs)("span",{className:I.meta,children:[(0,s.jsxs)("span",{className:I.name,children:[e,r&&(0,s.jsx)(eR,{})]}),u&&u.length>0&&(0,s.jsx)("span",{className:I.namespaces,children:u.map((e,t)=>(0,s.jsx)("img",{src:e,alt:""},t))}),c&&(0,s.jsx)("span",{className:I.error,children:c})]}),(0,s.jsx)("span",{className:`tcui-button ${r?"":"tcui-button-primary"}`,"data-loading":l,children:l?(0,s.jsx)(eB,{}):i})]})}function eW({wallets:e,connectingWalletId:t,connectionError:n,isLoadingMore:r,scrollRef:i,onWalletClick:o}){return(0,s.jsxs)("div",{className:v.grid,ref:i,children:[e.map(e=>(0,s.jsx)(eQ,{name:e.name,icon:e.iconUrl,active:!1,variant:"default",actionLabel:"Connect",onClick:()=>o(e),loading:t===e.id,error:n??void 0},e.id)),r&&(0,s.jsx)("div",{className:v.loadingMore,children:(0,s.jsx)(eB,{})})]})}function eF({children:e}){return(0,s.jsx)("div",{className:x.container,children:e})}function eG({children:e}){return(0,s.jsx)("div",{className:E.container,children:e})}function eY({children:e}){return(0,s.jsx)("div",{className:j.description,children:e})}function e$({onClick:e,children:t}){return(0,s.jsx)("button",{className:A.link,onClick:e,children:t})}function eq(){return(0,s.jsx)(M,{components:{wrapper:eG,description:eY,link:e$}})}function eZ(){return(0,s.jsx)(g,{components:{wrapper:eF,search:eP,loading:e_,emptyState:eO,walletsList:eW,footer:eq}})}
1function eH(){return(0,s.jsx)("p",{className:R.wcTitle,children:"Scan QR with your wallet"})}function eV({children:e}){return(0,s.jsx)("div",{className:k.grid,children:e})}function eK(){return(0,s.jsx)(U,{components:{title:eH,grid:eV,walletButton:eQ}})}function eX({children:e}){return(0,s.jsx)("div",{className:B.container,children:e})}function eJ({children:e}){return(0,s.jsx)("div",{className:Q.message,children:e})}function e0({message:e}){return(0,s.jsx)(P,{message:e,components:{wrapper:eX,message:eJ,walletButton:eQ}})}function e1({namespaceName:e}){return(0,s.jsxs)("p",{className:W.sectionSub,children:["Connect to ",e]})}function e2({children:e}){return(0,s.jsx)("div",{className:F.grid,children:e})}function e3(){return(0,s.jsx)(z,{components:{emptyState:e0,header:e1,grid:e2,walletButton:eQ,walletConnectButton:eK}})}function e4({icon:e,label:t,onClick:n,actionLabel:r,loading:i,disabled:o,connectedWallet:a}){let l=()=>{o||i||n?.()};return(0,s.jsxs)("div",{className:Y.namespaceButton,role:"button",tabIndex:0,onClick:l,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l())},"data-disabled":o,"data-loading":i,children:[(0,s.jsx)("img",{width:28,src:e}),(0,s.jsxs)("span",{className:Y.meta,children:[(0,s.jsx)("span",{className:Y.name,children:t}),a&&(0,s.jsxs)("span",{className:Y.connectedWith,children:[(0,s.jsx)("img",{src:a.icon,alt:"",className:Y.connectedWalletIcon}),a.name]})]}),r&&(0,s.jsx)("span",{className:"tcui-button tcui-button-primary","data-loading":i,children:i?(0,s.jsx)(eB,{}):r})]})}function e5({targetWallet:e}){return(0,s.jsxs)("div",{className:$.spacer,children:[(0,s.jsx)("h3",{className:$.sectionTitle,children:"Namespaces"}),e&&(0,s.jsxs)("span",{className:$.badge,children:[(0,s.jsx)("img",{src:e.icon,alt:e.name,className:$.badgeIcon}),e.name]})]})}function e6({children:e}){return(0,s.jsx)("div",{className:F.grid,children:e})}function e8(){return(0,s.jsx)(G,{components:{header:e5,grid:e6,namespaceButton:e4}})}function e9({children:e}){return(0,s.jsx)("div",{className:Z.qr,role:"region","aria-label":"WalletConnect QR code",children:e})}function e7({children:e}){return(0,s.jsx)("div",{className:H.placeholder,children:e})}function te({children:e}){return(0,s.jsx)("div",{className:V.actions,children:e})}function tt({onClick:e,disabled:t,children:n}){return(0,s.jsx)("button",{className:K.button,type:"button",onClick:e,disabled:t,children:n})}function tn({message:e}){return(0,s.jsx)("div",{className:X.error,children:e})}function tr(){return(0,s.jsx)(q,{components:{wrapper:e9,placeholder:e7,qrCode:eE,actions:te,button:tt,error:tn,spinner:eB}})}function ti({onClick:e,children:t}){return(0,s.jsx)("div",{className:ej.overlay,role:"presentation",onClick:e,children:t})}function ts({children:e,onClick:t,wrapperRef:n}){return(0,s.jsx)("div",{ref:n,className:eA.modal,role:"dialog","aria-modal":"true","aria-label":"TrustConnect modal",onClick:t,children:e})}function to(){return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"20",height:"20",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 18l-6-6 6-6"})})}function ta({title:e,showBack:t,onBack:n,onClose:r}){return(0,s.jsxs)("header",{className:eS.header,children:[t&&n&&(0,s.jsx)("button",{type:"button",className:eS.back,onClick:n,"aria-label":"Go back",children:(0,s.jsx)(to,{})}),(0,s.jsx)("h2",{className:eS.title,children:e}),(0,s.jsx)("button",{type:"button",className:eS.close,onClick:r,"aria-label":"Close modal",children:(0,s.jsx)(ez,{})})]})}function tl({children:e,bodyRef:t}){return(0,s.jsx)("div",{ref:t,className:eD.body,children:e})}function tc({message:e}){return(0,s.jsxs)("div",{className:eT.error,children:["Error: ",e]})}function tu(){return(0,s.jsx)(c,{layout:{overlay:ti,wrapper:ts,header:ta,body:tl,error:tc},views:[{title:"Connect a wallet",tag:"wallets",node:e3},{title:"Select a network",tag:"networks",node:e8},{title:"Scan with mobile wallet",tag:"qr",node:tr}],mobileViews:[{title:"Connect a wallet",tag:"wallets",node:eZ}]})}function th({children:e,config:t,theme:n}){return(0,s.jsx)(r.w,{config:t,children:(0,s.jsxs)(i.H,{theme:n,
1children:[e,(0,s.jsx)(tu,{})]})})}},89073:(e,t,n)=>{"use strict";n.d(t,{Zq:()=>s,zs:()=>i});var r={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},i=new class{#O=r;#_=!1;setTimeoutProvider(e){this.#O=e}setTimeout(e,t){return this.#O.setTimeout(e,t)}clearTimeout(e){this.#O.clearTimeout(e)}setInterval(e,t){return this.#O.setInterval(e,t)}clearInterval(e){this.#O.clearInterval(e)}};function s(e){setTimeout(e,0)}},89205:e=>{e.exports={overlay:"styles_module-2IXPYHX5_overlay__R6N6w",fadeIn:"styles_module-2IXPYHX5_fadeIn__6fjbR"}},89249:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(50340);class i{constructor(){this.events=new r.v,this.__internal={connect:this.connect.bind(this),reconnect:this.reconnect.bind(this),disconnect:this.disconnect.bind(this),abortConnect:this.abortConnect.bind(this),startListeners:this.startListeners.bind(this),stopListeners:this.stopListeners.bind(this),handleOnCaipSessionEvent:this.handleOnCaipSessionEvent.bind(this),handleOnCaipSessionDelete:this.handleOnCaipSessionDelete.bind(this),handleOnAddress:this.handleOnAddress.bind(this),handleOnChain:this.handleOnChain.bind(this),setAddress:this.emitAddress.bind(this),setChain:this.emitChain.bind(this),clearAllListeners:this.clearAllListeners.bind(this)}}abortConnect(){this.abortController&&(this.abortController.abort(),this.abortController=void 0)}handleOnCaipSessionEvent(e){this.events.on("session_event",e)}handleOnCaipSessionDelete(e){this.events.on("session_delete",e)}handleOnAddress(e){return this.events.on("address",e)}handleOnChain(e){return this.events.on("chain",e)}emitCaipSessionEvent(e){this.events.emit("session_event",e)}emitCaipSessionDelete(){this.events.emit("session_delete",void 0)}emitAddress(e){this.events.emit("address",e)}emitChain(e){this.events.emit("chain",e)}clearAllListeners(){this.events.clear(),this.__internal.stopListeners()}}},92973:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});class r extends Error{constructor(e,t,n){super(e),this.name="TrustConnectError",this.code=t,this.context=n??{}}}},93271:e=>{e.exports={searchContainer:"styles_module-HR3VQZUH_searchContainer__6a6_1",copyButton:"styles_module-HR3VQZUH_copyButton__Lqhan"}},96100:(e,t,n)=>{"use strict";n.d(t,{Cp:()=>g,EN:()=>p,F$:()=>f,GU:()=>j,MK:()=>h,S$:()=>i,ZM:()=>E,ZZ:()=>C,Zw:()=>o,d2:()=>c,f8:()=>y,gn:()=>a,hT:()=>M,j3:()=>l,lQ:()=>s,nJ:()=>d,nU:()=>u,ox:()=>A,pl:()=>I,y9:()=>x,yy:()=>v});var r=n(89073),i="undefined"==typeof window||"Deno"in globalThis;function s(){}function o(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t){return"function"==typeof e?e(t):e}function u(e,t){return"function"==typeof e?e(t):e}function h(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==f(o,t.options))return!1}else if(!g(t.queryKey,o))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!i||i===t.state.fetchStatus)&&(!s||!!s(t))}function d(e,t){let{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(p(t.options.mutationKey)!==p(s))return!1}else if(!g(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function f(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function g(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(n=>g(e[n],t[n]))}var m=Object.prototype.hasOwnProperty;function y(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!N(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!N(n)&&!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function N(e){return"[object Object]"===Object.prototype.toString.call(e)}function v(e){return new Promise(t=>{r.zs.setTimeout(t,e)})}function I(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?function e(t,n,r=0){if(t===n)return t;if(r>500)return n;let i=w(t)&&w(n);if(!i&&!(b(t)&&b(n)))return n;let s=(i?t:Object.keys(t)).length,o=i?n:Object.keys(n),a=o.length,l=i?Array(a):{},c=0;for(let u=0;u<a;
1u++){let a=i?u:o[u],h=t[a],d=n[a];if(h===d){l[a]=h,(i?u<s:m.call(t,a))&&c++;continue}if(null===h||null===d||"object"!=typeof h||"object"!=typeof d){l[a]=d;continue}let f=e(h,d,r+1);l[a]=f,f===h&&c++}return s===a&&c===s?t:l}(e,t):t}function x(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function C(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var M=Symbol();function E(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==M?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function j(e,t){return"function"==typeof e?e(...t):!!e}function A(e,t,n){let r,i=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),i||(i=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)}),e}},96788:(e,t,n)=>{"use strict";let r,i;n.d(t,{N:()=>m,d:()=>u});var s,o=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},a=function(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};let l=new Set,c={};function u(){if(i||(i=Object.freeze({register:h,get:d,on:f}),"undefined"==typeof window))return i;let e=Object.freeze({register:h});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new g(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return i}function h(...e){return(e=e.filter(e=>!l.has(e))).length?(e.forEach(e=>{r=void 0,l.add(e)}),c.register?.forEach(t=>p(()=>t(...e))),function(){e.forEach(e=>{r=void 0,l.delete(e)}),c.unregister?.forEach(t=>p(()=>t(...e)))}):()=>{}}function d(){return r||(r=[...l]),r}function f(e,t){return c[e]?.push(t)||(c[e]=[t]),function(){c[e]=c[e]?.filter(e=>t!==e)}}function p(e){try{e()}catch(e){console.error(e)}}class g extends Event{get detail(){return o(this,s,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),s.set(this,void 0),a(this,s,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}function m(){if(i||(i=u(),"undefined"==typeof window))return i;let e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),i;let{register:t}=i,n=(...e)=>e.forEach(e=>p(()=>e({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:n})})}catch(e){return console.error("window.navigator.wallets could not be set"),i}return n(...e),i}s=new WeakMap},99232:e=>{e.exports={container:"styles_module-NDDQJHO2_container__KH5il"}},99515:(e,t,n)=>{"use strict";n.d(t,{$d:()=>i,Bd:()=>l,XV:()=>a,_T:()=>c,eF:()=>u,lK:()=>o,lW:()=>s,nG:()=>h});var r=n(92973);class i extends r.C{constructor(){super("projectId is required","MISSING_PROJECT_ID"),this.name="MissingProjectIdError"}}class s extends r.C{constructor(){super("WalletConnect client not available","WALLETCONNECT_CLIENT_NOT_AVAILABLE"),this.name="WalletConnectClientNotAvailableError"}}class o extends r.C{constructor(){super("WalletConnect service not available","WALLETCONNECT_SERVICE_NOT_AVAILABLE"),this.name="WalletConnectServiceNotAvailableError"}}class a extends r.C{constructor(){super("Link is not ready. Generate URI first by calling prepareLink().","LINK_NOT_READY"),this.name="LinkNotReadyError"}}class l extends r.C{constructor(e){super(`Wallet ${e} does not have a mobile deep link.`,"MISSING_MOBILE_DEEP_LINK",{walletName:e}),this.name="MissingMobileDeepLinkError"}}class c extends r.C{constructor(){super("WalletConnect service has not initialized","WALLETCONNECT_SERVICE_NOT_INITIALIZED"),this.name="WalletConnectServiceNotInitializedError"}}class u extends r.C{constructor(){super("CaipWallet not initialized.","CAIP_WALLET_NOT_INITIALIZED"),this.name="CaipWalletNotInitializedError"}}class h extends r.C{constructor(e,t){super(`Failed to fetch wallets: ${e} ${t}`,"WALLETCONNECT_EXPLORER_API_ERROR",{status:e,statusText:t}),this.name="WalletConnectExplorerApiError"}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.