0x42dcd51e…043f·#25,775,456·view on Etherscan
!0),s<8?n.set(8,r-s-1,I,!0):s<9?n.set(8,15-s-1+1,I,!0):n.set(8,15-s-1,I,!0);n.set(r-8,8,1,!0)}function Lr(n,A){const t=n.size;let r=-1,o=t-1,s=7,I=0;for(let a=t-1;a>0;a-=2)for(a===6&&a--;;){for(let c=0;c<2;c++)if(!n.isReserved(o,a-c)){let u=!1;I<A.length&&(u=(A[I]>>>s&1)===1),n.set(o,a-c,u),s--,s===-1&&(I++,s=7)}if(o+=r,o<0||t<=o){o-=r,r=-r;break}}}function qr(n,A,t){const r=new mr;t.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),Yr.getCharCountIndicator(c.mode,n)),c.write(r)});const o=Dt.getSymbolTotalCodewords(n),s=Ot.getTotalCodewordsCount(n,A),I=(o-s)*8;for(r.getLengthInBits()+4<=I&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(I-r.getLengthInBits())/8;for(let c=0;c<a;c++)r.put(c%2?17:236,8);return xr(r,n,A)}function xr(n,A,t){const r=Dt.getSymbolTotalCodewords(A),o=Ot.getTotalCodewordsCount(A,t),s=r-o,I=Ot.getBlocksCount(A,t),a=r%I,c=I-a,u=Math.floor(r/I),E=Math.floor(s/I),l=E+1,d=u-E,w=new Ur(d);let p=0;const y=new Array(I),Y=new Array(I);let D=0;const F=new Uint8Array(n.buffer);for(let K=0;K<I;K++){const V=K<c?E:l;y[K]=F.slice(p,p+V),Y[K]=w.encode(y[K]),p+=V,D=Math.max(D,V)}const N=new Uint8Array(r);let m=0,G,S;for(G=0;G<D;G++)for(S=0;S<I;S++)G<y[S].length&&(N[m++]=y[S][G]);for(G=0;G<d;G++)for(S=0;S<I;S++)N[m++]=Y[S][G];return N}function Kr(n,A,t,r){let o;if(Array.isArray(n))o=Rt.fromArray(n);else if(typeof n=="string"){let u=A;if(!u){const E=Rt.rawSplit(n);u=at.getBestVersionForData(E,t)}o=Rt.fromString(n,u||40)}else throw new Error("Invalid data");const s=at.getBestVersionForData(o,t);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=s;else if(A<s)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+s+`.
`);const I=qr(A,t,o),a=Dt.getSymbolSize(A),c=new Fr(a);return Sr(c,A),Mr(c),br(c,A),Lt(c,t,0),A>=7&&Rr(c,A),Lr(c,I),isNaN(r)&&(r=_t.getBestMask(c,Lt.bind(null,c,t))),_t.applyMask(r,c),Lt(c,t,r),{modules:c,version:A,errorCorrectionLevel:t,maskPattern:r,segments:o}}Pe.create=function(A,t){if(typeof A>"u"||A==="")throw new Error("No input text");let r=bt.M,o,s;return typeof t<"u"&&(r=bt.from(t.errorCorrectionLevel,bt.M),o=at.from(t.version),s=_t.from(t.maskPattern),t.toSJISFunc&&Dt.setToSJISFunction(t.toSJISFunc)),Kr(A,o,r,s)};var on={},ae={};(function(n){function A(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let r=t.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+t);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}n.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,I=r.scale||4;return{width:s,scale:s?4:I,margin:o,color:{dark:A(r.color.dark||"#000000ff"),light:A(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},n.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},n.getImageWidth=function(r,o){const s=n.getScale(r,o);return Math.floor((r+o.margin*2)*s)},n.qrToImageData=function(r,o,s){const I=o.modules.size,a=o.modules.data,c=n.getScale(I,s),u=Math.floor((I+s.margin*2)*c),E=s.margin*c,l=[s.color.light,s.color.dark];for(let d=0;d<u;d++)for(let w=0;w<u;w++){let p=(d*u+w)*4,y=s.color.light;if(d>=E&&w>=E&&d<u-E&&w<u-E){const Y=Math.floor((d-E)/c),D=Math.floor((w-E)/c);y=l[a[Y*I+D]?1:0]}r[p++]=y.r,r[p++]=y.g,r[p++]=y.b,r[p]=y.a}}})(ae);(function(n){const A=ae;function t(o,s,I){o.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=I,s.width=I,s.style.height=I+"px",s.style.width=I+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}n.render=function(s,I,a){let c=a,u=I;typeof c>"u"&&(!I||!I.getContext)&&(c=I,I=void 0),I||(u=r()),c=A.getOptions(c);const E=A.getImageWidth(s.modules.size,c),l=u.getContext("2d"),d=l.createImageData(E,E);return A.qrToImageData(d.data,s,c),t(l,u,E),l.putImageData(d,0,0),u},n.renderToDataURL=function(s,I,a){let c=a;typeof c>"u"&&(!I||!I.getContext)&&(c=I,I=void 0),c||(c={});const u=n.render(s,I,c),E=c.type||"image/png",l=c.rendererOpts||{};return u.toDataURL(E,l.quality)}})(on);var sn={};const Hr=ae;function Re(n,A){const t=n.a/255,r=A+'="'+n.hex+'"';return t<1?r+" "+A+'-opacity="'+t.toFixed(2).slice(1)+'"':r}function qt(n,A,t){let r=n+A;return typeof t<"u"&&(r+=" "+t),r}function Tr(n,A,t){let r="",o=0,s=!1,I=0;for(let a=0;a<n.length;a++){const c=Math.floor(a%A),u=Math.floor(a/A);!c&&!s&&(s=!0),n[a]?(I++,a>0&&c>0&&n[a-1]||(r+=s?qt("M",c+t,.5+u+t):qt("m",o,0),o=0,s=!1),c+1<A&&n[a+1]||(r+=qt("h",I),I=0)):o++}return r}sn.render=function(A,t,r){const o=Hr.getOptions(t),s=A.modules.size,I=A.modules.data,a=s+o.margin*2,c=o.color.light.a?"<path "+Re(o.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",u="<path "+Re(o.color.dark,"stroke")+' d="'+Tr(I,s,o.margin)+'"/>',E='viewBox="0 0 '+a+" "+a+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+E+' shape-rendering="crispEdges">'+c+u+`</svg>
`;return typeof r=="function"&&r(null,d),d};const vr=rr,Pt=Pe,gn=on,_r=sn;function Ie(n,A,t,r,o){const s=[].slice.call(arguments,1),I=s.length,a=typeof s[I-1]=="function";if(!a&&!vr())throw new Error("Callback required as last argument");if(a){if(I<2)throw new Error("Too few arguments provided");I===2?(o=t,t=A,A=r=void 0):I===3&&(A.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=t,t=A,A=void 0))}else{if(I<1)throw new Error("Too few arguments provided");return I===1?(t=A,A=r=void 0):I===2&&!A.getContext&&(r=t,t=A,A=void 0),new Promise(function(c,u){try{const E=Pt.create(t,r);c(n(E,A,r))}catch(E){u(E)}})}try{const c=Pt.create(t,r);o(null,n(c,A,r))}catch(c){o(c)}}ZA.create=Pt.create;ZA.toCanvas=Ie.bind(null,gn.render);ZA.toDataURL=Ie.bind(null,gn.renderToDataURL);ZA.toString=Ie.bind(null,function(n,A,t){return _r.render(n,t)});var It;(function(n){const A=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g;function t(o){function s(I,a){return typeof a!="bigint"?a:`${a.toString()}n`}return JSON.stringify(o,s)}n.stringify=t;function r(o){const s=o.replace(A,'$1"$2n"$3');function I(a,c){return typeof c!="string"||!c.match(/^\d+n$/)?c:BigInt(c.slice(0,-1))}return JSON.parse(s,I)}n.parse=r})(It||(It={}));var QA;(function(n){function A(r){return typeof r=="string"?r:It.stringify(r)}n.stringify=A;function t(r){try{return It.parse(r)}catch{return r}}n.parse=t})(QA||(QA={}));var jt;(function(n){function A(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}n.fromView=A})(jt||(jt={}));var Wt,Xt;class an extends Error{cursorOffset;cursorLength;bytesLength;#A=Wt;name=this.#A.name;constructor(A,t,r){super(`Overflow reading ${r} bytes at offset ${A}/${t}`),this.cursorOffset=A,this.cursorLength=t,this.bytesLength=r}static from(A,t){return new Wt(A.offset,A.length,t)}}Wt=an;class In extends Error{cursorOffset;cursorLength;bytesLength;#A=Xt;name=this.#A.name;constructor(A,t,r){super(`Overflow writing ${r} bytes at offset ${A}/${t}`),this.cursorOffset=A,this.cursorLength=t,this.bytesLength=r}static from(A,t){return new Xt(A.offset,A.length,t)}}Xt=In;class jA{bytes;data;offset=0;constructor(A){this.bytes=A,this.data=jt.fromView(A)}get length(){return this.bytes.length}get remaining(){return this.length-this.offset}get before(){return this.bytes.subarray(0,this.offset)}get after(){return this.bytes.subarray(this.offset)}get(A){if(this.remaining<A)throw an.from(this,A);return this.bytes.subarray(this.offset,this.offset+A)}read(A){const t=this.get(A);return this.offset+=A,t}set(A){if(this.remaining<A.length)throw In.from(this,A.length);this.bytes.set(A,this.offset)}write(A){this.set(A),this.offset+=A.length}getUint8(){return this.data.getUint8(this.offset)}readUint8(){const A=this.getUint8();return this.offset++,A}setUint8(A){this.data.setUint8(this.offset,A)}writeUint8(A){this.setUint8(A),this.offset++}getInt8(){return this.data.getInt8(this.offset)}readInt8(){const A=this.getInt8();return this.offset++,A}setInt8(A){this.data.setInt8(this.offset,A)}writeInt8(A){this.setInt8(A),this.offset++}getUint16(A){return this.data.getUint16(this.offset,A)}readUint16(A){const t=this.getUint16(A);return this.offset+=2,t}setUint16(A,t){this.data.setUint16(this.offset,A,t)}writeUint16(A,t){this.setUint16(A,t),this.offset+=2}getInt16(A){return this.data.getInt16(this.offset,A)}readInt16(A){const t=this.getInt16(A);return this.offset+=2,t}setInt16(A,t){this.data.setInt16(this.offset,A,t)}writeInt16(A,t){this.setInt16(A,t),this.offset+=2}getUint24(A){return A?this.bytes[this.offset]|this.bytes[this.offset+1]<<8|this.bytes[this.offset+2]<<16:this.bytes[this.offset]<<16|this.bytes[this.offset+1]<<8|this.bytes[this.offset+2]}readUint24(A){const t=this.getUint24(A);return this.offset+=3,t}setUint24(A,t){t?(this.bytes[this.offset]=A&255,this.bytes[this.offset+1]=A>>8&255,this.bytes[this.offset+2]=A>>16&255):(this.bytes[this.offset]=A>>16&255,this.bytes[this.offset+1]=A>>8&255,this.bytes[this.offset+2]=A&255)}writeUint24(A,t){this.setUint24(A,t),this.offset+=3}getUint32(A){return this.data.getUint32(this.offset,A)}readUint32(A){const t=this.getUint32(A);return this.offset+=4,t}setUint32(A,t){this.data.setUint32(this.offset,A,t)}writeUint32(A,t){this.setUint32(A,t),this.offset+=4}getInt32(A){return this.data.getInt32(this.offset,A)}readInt32(A){const t=this.getInt32(A);return this.offset+=4,t}setInt32(A,t){this.data.setInt32(this.offset,A,t)}writeInt32(A,t){this.setInt32(A,t),this.offset+=4}getBigUint64(A){return this.data.getBigUint64(this.offset,A)}readBigUint64(A){const t=this.getBigUint64(A);return this.offset+=8,t}setBigUint64(A,t){this.data.setBigUint64(this.offset,A,t)}writeBigUint64(A,t){this.setBigUint64(A,t),this.offset+=8}getBigInt64(A){return this.data.getBigInt64(this.offset,A)}readBigInt64(A){const t=this.getBigInt64(A);return this.offset+=8,t}setBigInt64(A,t){this.data.setBigInt64(this.offset,A,t)}writeBigInt64(A,t){this.setBigInt64(A,t),this.offset+=8}getFloat16(A){return this.data.getFloat16(this.offset,A)}readFloat16(A){const t=this.getFloat16(A);return this.offset+=2,t}setFloat16(A,t){this.data.setFloat16(this.offset,A,t)}writeFloat16(A,t){this.setFloat16(A,t),this.offset+=2}getFloat32(A){return this.data.getFloat32(this.offset,A)}readFloat32(A){const t=this.getFloat32(A);return this.offset+=4,t}setFloat32(A,t){this.data.setFloat32(this.offset,A,t)}writeFloat32(A,t){this.setFloat32(A,t),this.offset+=4}getFloat64(A){return this.data.getFloat64(this.offset,A)}readFloat64(A){const t=this.getFloat64(A);return this.offset+=8,t}setFloat64(A,t){this.data.setFloat64(this.offset,A,t)}writeFloat64(A,t){this.setFloat64(A,t),this.offset+=8}}var Bt;(function(n){async function A(r){const o=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32]),s=new jA(new Uint8Array(o.length+r.length));return s.write(o),s.write(r),await crypto.subtle.importKey("pkcs8",s.bytes,"Ed25519",!0,["sign"])}n.importKey=A;async function t(r){const o=await crypto.subtle.exportKey("jwk",r);return delete o.d,delete o.key_ops,await crypto.subtle.importKey("jwk",o,"Ed25519",!0,["verify"])}n.publishKey=t})(Bt||(Bt={}));var ct;(function(n){function A(r){return r.toHex()}n.encode=A;function t(r){return Uint8Array.fromHex("0".repeat(r.length%2)+r)}n.decode=t})(ct||(ct={}));var Vt;(function(n){n.alphabet="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function A(r){if(r.length===0)return"";let o=0;for(;o<r.length&&r[o]===0;)o++;if(o===r.length)return"1".repeat(o);let s="";for(let I=BigInt(`0x${ct.encode(r)}`);I>0n;I=I/58n)s=n.alphabet[Number(I%58n)]+s;return"1".repeat(o)+s}n.encode=A;function t(r){if(r.length===0)return new Uint8Array(0);let o=0;for(;o<r.length&&r[o]==="1";)o++;if(o===r.length)return new Uint8Array(o);let s=BigInt(0);for(let I=o;I<r.length;I++)s=s*58n+BigInt(n.alphabet.indexOf(r[I]));return ct.decode("00".repeat(o)+s.toString(16))}n.decode=t})(Vt||(Vt={}));var Zt;(function(n){async function A(t,r){const I={alg:"EdDSA",typ:"JWT"},a=new Uint8Array([237,1]),c=await Bt.importKey(t),u=await Bt.publishKey(c),E=new Uint8Array(await crypto.subtle.exportKey("raw",u)),l=new jA(new Uint8Array(a.length+E.length));l.write(a),l.write(E);const d=`did:key:z${Vt.encode(l.bytes)}`,w=crypto.getRandomValues(new Uint8Array(32)).toHex(),p=Math.floor(Date.now()/1e3),y=24*60*60,Y=p+y,D={iss:d,sub:w,aud:r,iat:p,exp:Y},F=new TextEncoder().encode(QA.stringify(I)).toBase64({alphabet:"base64url",omitPadding:!0}),N=new TextEncoder().encode(QA.stringify(D)).toBase64({alphabet:"base64url",omitPadding:!0}),m=new TextEncoder().encode(`${F}.${N}`),S=new Uint8Array(await crypto.subtle.sign("Ed25519",c,m)).toBase64({alphabet:"base64url",omitPadding:!0});return`${F}.${N}.${S}`}n.sign=A})(Zt||(Zt={}));class Be{id;method;params;jsonrpc="2.0";constructor(A,t,r){this.id=A,this.method=t,this.params=r}static from(A){const{id:t,method:r,params:o}=A;return new Be(t,r,o)}toJSON(){const{jsonrpc:A,id:t,method:r,params:o}=this;return{jsonrpc:A,id:t,method:r,params:o}}}var zt;(function(n){function A(r){return Array.isArray(r)?r.map(A):r instanceof Error?{name:r.name,message:r.message,cause:A(r.cause)}:r}n.toJSON=A;function t(r){return JSON.stringify(A(r))}n.toString=t})(zt||(zt={}));var Bn;class FA extends Error{#A=Bn;name=this.#A.name;constructor(A){super(void 0,{cause:A})}}Bn=FA;(function(n){function A(t){return t instanceof Error?t:new n(t)}n.wrapAsError=A})(FA||(FA={}));class L{inner;constructor(A){this.inner=A}static new(A){return new L(A)}static void(){return new L(void 0)}static error(A,t){return new L(new Error(A,t))}[Symbol.dispose](){this.inner[Symbol.dispose]()}async[Symbol.asyncDispose](){await this.inner[Symbol.asyncDispose]()}isOk(){return!1}isOkAnd(A){return!1}isOkAndSync(A){return!1}isErr(){return!0}async isErrAnd(A){return await A(this.inner)}isErrAndSync(A){return A(this.inner)}get(){throw new Error}getErr(){return this.inner}getAny(){return this.inner}ok(){return new fA}err(){return new BA(this.inner)}*[Symbol.iterator](){}split(){return[void 0,this.inner]}contains(A){return!1}containsErr(A){return this.inner===A}getOrThrow(){throw this.inner}getErrOrThrow(){return this.inner}getOrNull(){return null}getErrOrNull(){return this.inner}getOr(A){return A}async getOrElse(A){return await A(this.inner)}getOrElseSync(A){return A(this.inner)}checkOrThrow(){throw this.inner}checkErrOrThrow(){return this}checkOrNull(){return null}checkErrOrNull(){return this}await(){return this}async awaitErr(){return new L(await this.inner)}async awaitAll(){return await this.awaitErr()}clear(){return this}clearErr(){return L.void()}inspect(A){return this}inspectSync(A){return this}async inspectErr(A){return await A(this.inner),this}inspectErrSync(A){return A(this.inner),this}set(A){return this}setErr(A){return new L(A)}map(A){return this}mapSync(A){return this}async mapErr(A){return new L(await A(this.inner))}mapErrSync(A){return new L(A(this.inner))}mapOr(A,t){return A}mapOrSync(A,t){return A}async mapOrElse(A,t){return await A(this.inner)}mapOrElseSync(A,t){return A(this.inner)}and(A){return this}andThen(A){return this}andThenSync(A){return this}or(A){return A}async orElse(A){return await A(this.inner)}orElseSync(A){return A(this.inner)}flatten(){return this}}class _{inner;constructor(A){this.inner=A}static new(A){return new _(A)}static void(){return new _(void 0)}[Symbol.dispose](){this.inner[Symbol.dispose]()}async[Symbol.asyncDispose](){await this.inner[Symbol.asyncDispose]()}isOk(){return!0}async isOkAnd(A){return await A(this.inner)}isOkAndSync(A){return A(this.inner)}isErr(){return!1}isErrAnd(A){return!1}isErrAndSync(A){return!1}get(){return this.inner}getErr(){throw new Error}getAny(){return this.inner}ok(){return new BA(this.inner)}err(){return new fA}*[Symbol.iterator](){yield this.inner}split(){return[this.inner,void 0]}contains(A){return this.inner===A}containsErr(A){return!1}getOrThrow(){return this.inner}getErrOrThrow(){throw this.inner}getOrNull(){return this.inner}getErrOrNull(){return null}getOr(A){return this.inner}getOrElse(A){return this.inner}getOrElseSync(A){return this.inner}checkOrThrow(){return this}checkErrOrThrow(){throw this.inner}checkOrNull(){return this}checkErrOrNull(){return null}async await(){return new _(await this.inner)}awaitErr(){return this}async awaitAll(){return await this.await()}clear(){return _.void()}clearErr(){return this}async inspect(A){return await A(this.inner),this}inspectSync(A){return A(this.inner),this}inspectErr(A){return this}inspectErrSync(A){return this}set(A){return new _(A)}setErr(A){return this}async map(A){return new _(await A(this.inner))}mapSync(A){return new _(A(this.inner))}mapErr(A){return this}mapErrSync(A){return this}async mapOr(A,t){return await t(this.inner)}mapOrSync(A,t){return t(this.inner)}async mapOrElse(A,t){return await t(this.inner)}mapOrElseSync(A,t){return t(this.inner)}and(A){return A}async andThen(A){return await A(this.inner)}andThenSync(A){return A(this.inner)}or(A){return this}orElse(A){return this}orElseSync(A){return this}flatten(){return this.inner}}var Ct;(function(n){function A(E){return E?_.void():L.void()}n.assert=A;async function t(E){try{return new _(await E())}catch(l){return new L(l)}}n.runAndWrap=t;function r(E){try{return new _(E())}catch(l){return new L(l)}}n.runAndWrapSync=r;async function o(E){try{return new _(await E())}catch(l){return new L(FA.wrapAsError(l))}}n.runAndWrapAsError=o;function s(E){try{return new _(E())}catch(l){return new L(FA.wrapAsError(l))}}n.runAndWrapAsErrorSync=s;async function I(E){try{return await E()}catch(l){return new L(l)}}n.runOrWrap=I;function a(E){try{return E()}catch(l){return new L(l)}}n.runOrWrapSync=a;async function c(E){try{return await E()}catch(l){return new L(FA.wrapAsError(l))}}n.runOrWrapAsError=c;function u(E){try{return E()}catch(l){return new L(FA.wrapAsError(l))}}n.runOrWrapAsErrorSync=u})(Ct||(Ct={}));class xt extends Error{constructor(){super("Option is a None")}}class fA{inner;constructor(A=void 0){this.inner=A}static new(){return new fA}*[Symbol.iterator](){}isSome(){return!1}isSomeAnd(A){return!1}isSomeAndSync(A){return!1}isNone(){return!0}get(){throw new xt}getOrThrow(){throw new xt}getOrNull(){}getOr(A){return A}async getOrElse(A){return await A()}getOrElseSync(A){return A()}ok(){return new L(new xt)}okOr(A){return new L(A)}async okOrElse(A){return new L(await A())}okOrElseSync(A){return new L(A())}filter(A){return this}filterSync(A){return this}await(){return this}contains(A){return!1}inspect(A){return this}inspectSync(A){return this}map(A){return this}mapSync(A){return this}mapOr(A,t){return A}mapOrSync(A,t){return A}async mapOrElse(A,t){return await A()}mapOrElseSync(A,t){return A()}and(A){return this}andThen(A){return this}andThenSync(A){return this}or(A){return A}async orElse(A){return await A()}orElseSync(A){return A()}xor(A){return A}zip(A){return this}}class BA{inner;constructor(A){this.inner=A}static new(A){return new BA(A)}*[Symbol.iterator](){yield this.inner}isSome(){return!0}async isSomeAnd(A){return await A(this.inner)}isSomeAndSync(A){return A(this.inner)}isNone(){return!1}get(){return this.inner}getOrThrow(){return this.inner}getOrNull(){return this.inner}getOr(A){return this.inner}getOrElse(A){return this.inner}getOrElseSync(A){return this.inner}ok(){return new _(this.inner)}okOr(A){return new _(this.inner)}okOrElse(A){return new _(this.inner)}okOrElseSync(A){return new _(this.inner)}async filter(A){return await A(this.inner)?this:new fA}filterSync(A){return A(this.inner)?this:new fA}async await(){return new BA(await this.inner)}contains(A){return this.inner===A}async inspect(A){return await A(this.inner),this}inspectSync(A){return A(this.inner),this}async map(A){return new BA(await A(this.inner))}mapSync(A){return new BA(A(this.inner))}async mapOr(A,t){return await t(this.inner)}mapOrSync(A,t){return t(this.inner)}async mapOrElse(A,t){return await t(this.inner)}mapOrElseSync(A,t){return t(this.inner)}and(A){return A}async andThen(A){return await A(this.inner)}andThenSync(A){return A(this.inner)}or(A){return this}orElse(A){return this}orElseSync(A){return this}xor(A){return A.isSome()?new fA:this}zip(A){return A.isSome()?new BA([this.inner,A.inner]):A}}var Qt;(function(n){function A(t){return t==null?new fA:new BA(t)}n.wrap=A})(Qt||(Qt={}));var nt,cn,Cn,Qn,En,hn;class U extends Error{code;message;data;#A=nt;name=this.#A.name;static codes={ParseError:-32700,InvalidRequest:-32600,MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603};static messages={ParseError:"Parse error",InvalidRequest:"Invalid Request",MethodNotFound:"Method not found",InvalidParams:"Invalid params",InternalError:"Internal error",ServerError:"Server error"};constructor(A,t,r=void 0){super(t),this.code=A,this.message=t,this.data=r}static from(A){const{code:t,message:r,data:o}=A;return new nt(t,r,o)}static rewrap(A){return A instanceof nt?A:new un(zt.toString(A))}toJSON(){const{code:A,message:t,data:r}=this;return{code:A,message:t,data:r}}}nt=U;class Or extends U{#A=cn;name=this.#A.name;static code=U.codes.ParseError;static message=U.messages.ParseError;constructor(A=U.messages.ParseError){super(U.codes.ParseError,A)}}cn=Or;class ce extends U{#A=Cn;name=this.#A.name;static code=U.codes.InvalidRequest;static message=U.messages.InvalidRequest;constructor(A=U.messages.InvalidRequest){super(U.codes.InvalidRequest,A)}}Cn=ce;class Pr extends U{#A=Qn;name=this.#A.name;static code=U.codes.MethodNotFound;static message=U.messages.MethodNotFound;constructor(A=U.messages.MethodNotFound){super(U.codes.MethodNotFound,A)}}Qn=Pr;class jr extends U{#A=En;name=this.#A.name;static code=U.codes.InvalidParams;static message=U.messages.InvalidParams;constructor(A=U.messages.InvalidParams){super(U.codes.InvalidParams,A)}}En=jr;class un extends U{#A=hn;name=this.#A.name;static code=U.codes.InternalError;static message=U.messages.InternalError;constructor(A=U.messages.InternalError){super(U.codes.InternalError,A)}}hn=un;class WA extends L{id;error;jsonrpc="2.0";constructor(A,t){super(t),this.id=A,this.error=t}static from(A){return new WA(A.id,U.from(A.error))}static rewrap(A,t){return new WA(A,U.rewrap(t.inner))}toJSON(){const{jsonrpc:A,id:t}=this,r=this.error.toJSON();return{jsonrpc:A,id:t,error:r}}}class XA extends _{id;result;jsonrpc="2.0";constructor(A,t){super(t),this.id=A,this.result=t}static from(A){return new XA(A.id,A.result)}static rewrap(A,t){return new XA(A,t.inner)}toJSON(){const{jsonrpc:A,id:t,result:r}=this;return{jsonrpc:A,id:t,result:r}}}var bA;(function(n){function A(r){if("error"in r)return WA.from(r);if("result"in r)return XA.from(r);throw new Error}n.from=A;function t(r,o){return o.isOk()?XA.rewrap(r,o):WA.rewrap(r,o)}n.rewrap=t})(bA||(bA={}));var Wr=function(n,A,t){if(A!=null){if(typeof A!="object"&&typeof A!="function")throw new TypeError("Object expected.");var r,o;if(t){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=A[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=A[Symbol.dispose],t&&(o=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(s){return Promise.reject(s)}}),n.stack.push({value:A,dispose:r,async:t})}else t&&n.stack.push({async:!0});return A},Xr=function(n){return function(A){function t(I){A.error=A.hasError?new n(I,A.error,"An error was suppressed during disposal."):I,A.hasError=!0}var r,o=0;function s(){for(;r=A.stack.pop();)