1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63],{67021:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(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,t){i(e);let r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a,t.default={number:r,bool:n,bytes:i,hash:o,exists:s,output:a}},77961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;let n=r(67021),i=r(85758);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){n.default.exists(this);let{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){let a=Math.min(o-this.pos,s-n);if(a===o){let t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n);continue}r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){n.default.exists(this),n.default.output(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:o,isLE:s}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(0xffffffff),s=Number(r>>i&o),a=Number(r&o),l=n?4:0,u=n?0:4;e.setUint32(t+l,s,n),e.setUint32(t+u,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);let l=(0,i.createView)(e),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=u/4,f=this.get();if(c>f.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)l.setUint32(4*e,f[e],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},36411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto={node:void 0,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0}},90950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;let n=r(67021),i=r(85758);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,n.default.hash(e);let r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return n.default.exists(this),this.iHash.update(e),this}digestInto(e){n.default.exists(this),n.default.bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>
1new o(e,t)},44212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;let n=r(77961),i=r(85758),o=(e,t,r)=>e&t^~e&r,s=(e,t,r)=>e&t^e&r^t&r,a=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),l=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3],this.E=0|l[4],this.F=0|l[5],this.G=0|l[6],this.H=0|l[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:l,D:c,E:f,F:d,G:h,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.rotr)(f,6)^(0,i.rotr)(f,11)^(0,i.rotr)(f,25))+o(f,d,h)+a[e]+u[e]|0,y=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+s(r,n,l)|0;p=h,h=d,d=f,f=c+t|0,c=l,l=n,n=r,r=t+y|0}r=r+this.A|0,n=n+this.B|0,l=l+this.C|0,c=c+this.D|0,f=f+this.E|0,d=d+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,n,l,c,f,d,h,p)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends c{constructor(){super(),this.A=-0x3efa6128,this.B=0x367cd507,this.C=0x3070dd17,this.D=-0x8f1a6c7,this.E=-4191439,this.F=0x68581511,this.G=0x64f98fa7,this.H=-0x4105b05c,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)(()=>new c),t.sha224=(0,i.wrapConstructor)(()=>new f)},85758:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;let n=r(36411);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],!t.isLE)throw Error("Non little-endian hardware is not supported");let i=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw Error("hexToBytes: received invalid unpadded hex");let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){let n=2*r,i=Number.parseInt(e.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");t[r]=i}return t};let o=async()=>{};async function s(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);let e=Date.now()-i;e>=0&&e<r||(await (0,t.nextTick)(),i+=e)}}function a(e){if("string"!=typeof e)throw TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}function l(e){if("string"==typeof e&&(e=a(e)),!(e instanceof Uint8Array))throw TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}t.nextTick=o,t.asyncLoop=s,t.utf8ToBytes=a,t.toBytes=l,t.concatBytes=function(...e){if(!e.every(e=>e instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>
1e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t};class u{clone(){return this._cloneInto()}}t.Hash=u;let c=e=>"[object Object]"===Object.prototype.toString.call(e)&&e.constructor===Object;t.checkOpts=function(e,t){if(void 0!==t&&("object"!=typeof t||!c(t)))throw TypeError("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){let t=t=>e().update(l(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(l(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto.web)return n.crypto.web.getRandomValues(new Uint8Array(e));if(n.crypto.node)return new Uint8Array(n.crypto.node.randomBytes(e).buffer);throw Error("The environment doesn't have randomBytes function")}},59459:(e,t,r)=>{"use strict";let n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.schnorr=t.verify=t.signSync=t.sign=t.getSharedSecret=t.recoverPublicKey=t.getPublicKey=t.Signature=t.Point=t.CURVE=void 0;let o=r(69159),s=BigInt(0),a=BigInt(1),l=BigInt(2),u=BigInt(3),c=BigInt(8),f=Object.freeze({a:s,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:a,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});t.CURVE=f;let d=(e,t)=>(e+t/l)/t,h={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(e){let{n:t}=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-a*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=BigInt("0x100000000000000000000000000000000"),s=d(r*e,t),l=d(-n*e,t),u=_(e-s*r-l*i,t),c=_(-s*n-l*r,t),h=u>o,p=c>o;if(h&&(u=t-u),p&&(c=t-c),u>o||c>o)throw Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:h,k1:u,k2neg:p,k2:c}}};function p(e){let{a:t,b:r}=f,n=_(e*e),i=_(n*e);return _(i+t*e+r)}let y=f.a===s;class g extends Error{constructor(e){super(e)}}function m(e){if(!(e instanceof b))throw TypeError("JacobianPoint expected")}class b{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromAffine(e){if(!(e instanceof E))throw TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(E.ZERO)?b.ZERO:new b(e.x,e.y,a)}static toAffineBatch(e){let t=function(e,t=f.P){let r=Array(e.length),n=$(e.reduce((e,n,i)=>n===s?e:(r[i]=e,_(e*n,t)),a),t);return e.reduceRight((e,n,i)=>n===s?e:(r[i]=_(e*r[i],t),_(e*n,t)),n),r}(e.map(e=>e.z));return e.map((e,r)=>e.toAffine(t[r]))}static normalizeZ(e){return b.toAffineBatch(e).map(b.fromAffine)}equals(e){m(e);let{x:t,y:r,z:n}=this,{x:i,y:o,z:s}=e,a=_(n*n),l=_(s*s),u=_(t*l),c=_(i*a),f=_(_(r*s)*l),d=_(_(o*n)*a);return u===c&&f===d}negate(){return new b(this.x,_(-this.y),this.z)}double(){let{x:e,y:t,z:r}=this,n=_(e*e),i=_(t*t),o=_(i*i),s=e+i,a=_(l*(_(s*s)-n-o)),f=_(u*n),d=_(f*f),h=_(d-l*a),p=_(f*(a-h)-c*o);return new b(h,p,_(l*t*r))}add(e){m(e);let{x:t,y:r,z:n}=this,{x:i,y:o,z:a}=e;if(i===s||o===s)return this;if(t===s||r===s)return e;let u=_(n*n),c=_(a*a),f=_(t*c),d=_(i*u),h=_(_(r*a)*c),p=_(_(o*n)*u),y=_(d-f),g=_(p-h);if(y===s)return g===s?this.double():b.ZERO;let w=_(y*y),v=_(y*w),E=_(f*w),x=_(g*g-v-l*E),S=_(g*(E-x)-h*v);return new b(x,S,_(n*a*y))}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){let t=b.ZERO;if("bigint"==typeof e&&e===s)return t;let r=U(e);if(r===a)return this;if(!y){let e=t,n=this;for(;r>s;)r&a&&(e=e.add(n)),n=n.double(),r>>=a;return e}let{k1neg:n,k1:i,k2neg:o,k2:l}=h.splitScalar(r),u=t,c=t,f=this;for(;i>s||l>s;)i&a&&(u=u.add(f)),l&a&&(c=c.add(f)),f=f.double(),i>>=a,l>>=a;return n&&(u=u.negate()),o&&(c=c.negate()),c=new b(_(c.x*h.beta),c.y,c.z),u.add(c)}precomputeWindow(e){let t=y?128/e+1:256/e+1,r=[],n=this,i=n;for(let o=0;o<t;o++){i=n,r.push(i);for(let t=1;t<2**(e-1);t++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(e,t){!t&&this.equals(b.BASE)&&(t=E.BASE);let r=t&&t._WINDOW_SIZE||1;if(256%r)throw Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=t&&v.get(t);
1!n&&(n=this.precomputeWindow(r),t&&1!==r&&(n=b.normalizeZ(n),v.set(t,n)));let i=b.ZERO,o=b.BASE,s=1+(y?128/r:256/r),l=2**(r-1),u=BigInt(2**r-1),c=2**r,f=BigInt(r);for(let t=0;t<s;t++){let r=t*l,s=Number(e&u);e>>=f,s>l&&(s-=c,e+=a);let d=r+Math.abs(s)-1,h=t%2!=0,p=s<0;0===s?o=o.add(w(h,n[r])):i=i.add(w(p,n[d]))}return{p:i,f:o}}multiply(e,t){let r,n,i=U(e);if(y){let{k1neg:e,k1:o,k2neg:s,k2:a}=h.splitScalar(i),{p:l,f:u}=this.wNAF(o,t),{p:c,f:f}=this.wNAF(a,t);l=w(e,l),c=new b(_((c=w(s,c)).x*h.beta),c.y,c.z),r=l.add(c),n=u.add(f)}else{let{p:e,f:o}=this.wNAF(i,t);r=e,n=o}return b.normalizeZ([r,n])[0]}toAffine(e){let{x:t,y:r,z:n}=this,i=this.equals(b.ZERO);null==e&&(e=i?c:$(n));let o=e,s=_(o*o),l=_(s*o),u=_(t*s),f=_(r*l),d=_(n*o);if(i)return E.ZERO;if(d!==a)throw Error("invZ was invalid");return new E(u,f)}}function w(e,t){let r=t.negate();return e?r:t}b.BASE=new b(f.Gx,f.Gy,a),b.ZERO=new b(s,a,s);let v=new WeakMap;class E{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,v.delete(this)}hasEvenY(){return this.y%l===s}static fromCompressedHex(e){let t=32===e.length,r=P(t?e:e.subarray(1));if(!K(r))throw Error("Point is not on curve");let n=function(e){let{P:t}=f,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),a=BigInt(88),c=e*e*e%t,d=c*c*e%t,h=k(d,u)*d%t,p=k(h,u)*d%t,y=k(p,l)*c%t,g=k(y,n)*y%t,m=k(g,i)*g%t,b=k(m,s)*m%t,w=k(b,a)*b%t,v=k(w,s)*m%t,E=k(v,u)*d%t,x=k(E,o)*g%t,S=k(x,r)*c%t,A=k(S,l);if(A*A%t!==e)throw Error("Cannot find square root");return A}(p(r)),i=(n&a)===a;t?i&&(n=_(-n)):(1&e[0])==1!==i&&(n=_(-n));let o=new E(r,n);return o.assertValidity(),o}static fromUncompressedHex(e){let t=new E(P(e.subarray(1,33)),P(e.subarray(33,65)));return t.assertValidity(),t}static fromHex(e){let t=j(e),r=t.length,n=t[0];if(32===r||33===r&&(2===n||3===n))return this.fromCompressedHex(t);if(65===r&&4===n)return this.fromUncompressedHex(t);throw Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(e){return E.BASE.multiply(W(e))}static fromSignature(e,t,r){let{r:n,s:i}=V(t);if(![0,1,2,3].includes(r))throw Error("Cannot recover: invalid recovery bit");let o=B(j(e)),{n:s}=f,a=2===r||3===r?n+s:n,l=$(a,s),u=_(-o*l,s),c=_(i*l,s),d=1&r?"03":"02",h=E.fromHex(d+R(a)),p=E.BASE.multiplyAndAddUnsafe(h,u,c);if(!p)throw Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(e=!1){return L(this.toHex(e))}toHex(e=!1){let t=R(this.x);if(!e)return`04${t}${R(this.y)}`;{let e=this.hasEvenY()?"02":"03";return`${e}${t}`}}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){let e="Point is not on elliptic curve",{x:t,y:r}=this;if(!K(t)||!K(r))throw Error(e);let n=_(r*r);if(_(n-p(t))!==s)throw Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new E(this.x,_(-this.y))}double(){return b.fromAffine(this).double().toAffine()}add(e){return b.fromAffine(this).add(b.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return b.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,r){let n=b.fromAffine(this),i=t===s||t===a||this!==E.BASE?n.multiplyUnsafe(t):n.multiply(t),o=b.fromAffine(e).multiplyUnsafe(r),l=i.add(o);return l.equals(b.ZERO)?void 0:l.toAffine()}}function x(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function S(e){if(e.length<2||2!==e[0])throw Error(`Invalid signature integer tag: ${I(e)}`);let t=e[1],r=e.subarray(2,t+2);if(!t||r.length!==t)throw Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw Error("Invalid signature integer: trailing length");return{data:P(r),left:e.subarray(t+2)}}t.Point=E,E.BASE=new E(f.Gx,f.Gy),E.ZERO=new E(s,s);class A{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){let t=e instanceof Uint8Array,r="Signature.fromCompact";if("string"!=typeof e&&!t)throw TypeError(`${r}: Expected string or Uint8Array`);let n=t?I(e):e;if(128!==n.length)throw Error(`${r}: Expected 64-byte hex`);return new A(D(n.slice(0,64)),D(n.slice(64,128)))}static fromDER(e){let t=e instanceof Uint8Array;
1if("string"!=typeof e&&!t)throw TypeError("Signature.fromDER: Expected string or Uint8Array");let{r,s:n}=function(e){if(e.length<2||48!=e[0])throw Error(`Invalid signature tag: ${I(e)}`);if(e[1]!==e.length-2)throw Error("Invalid signature: incorrect length");let{data:t,left:r}=S(e.subarray(2)),{data:n,left:i}=S(r);if(i.length)throw Error(`Invalid signature: left bytes after parsing: ${I(i)}`);return{r:t,s:n}}(t?e:L(e));return new A(r,n)}static fromHex(e){return this.fromDER(e)}assertValidity(){let{r:e,s:t}=this;if(!F(e))throw Error("Invalid Signature: r must be 0 < r < n");if(!F(t))throw Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){let e=f.n>>a;return this.s>e}normalizeS(){return this.hasHighS()?new A(this.r,_(-this.s,f.n)):this}toDERRawBytes(){return L(this.toDERHex())}toDERHex(){let e=x(O(this.s)),t=x(O(this.r)),r=e.length/2,n=t.length/2,i=O(r),o=O(n),s=O(n+r+4);return`30${s}02${o}${t}02${i}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return L(this.toCompactHex())}toCompactHex(){return R(this.r)+R(this.s)}}function T(...e){if(!e.every(e=>e instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t}t.Signature=A;let M=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function I(e){if(!(e instanceof Uint8Array))throw Error("Expected Uint8Array");let t="";for(let r=0;r<e.length;r++)t+=M[e[r]];return t}let C=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function R(e){if("bigint"!=typeof e)throw Error("Expected bigint");if(!(s<=e&&e<C))throw Error("Expected number 0 <= n < 2^256");return e.toString(16).padStart(64,"0")}function N(e){let t=L(R(e));if(32!==t.length)throw Error("Error: expected 32 bytes");return t}function O(e){let t=e.toString(16);return 1&t.length?`0${t}`:t}function D(e){if("string"!=typeof e)throw TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}function L(e){if("string"!=typeof e)throw TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw Error("hexToBytes: received invalid unpadded hex"+e.length);let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){let n=2*r,i=Number.parseInt(e.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");t[r]=i}return t}function P(e){return D(I(e))}function j(e){return e instanceof Uint8Array?Uint8Array.from(e):L(e)}function U(e){if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)return BigInt(e);if("bigint"==typeof e&&F(e))return e;throw TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function _(e,t=f.P){let r=e%t;return r>=s?r:t+r}function k(e,t){let{P:r}=f,n=e;for(;t-- >s;)n*=n,n%=r;return n}function $(e,t=f.P){if(e===s||t<=s)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=_(e,t),n=t,i=s,o=a,l=a,u=s;for(;r!==s;){let e=n/r,t=n%r,s=i-l*e,a=o-u*e;n=r,r=t,i=l,o=u,l=s,u=a}if(n!==a)throw Error("invert: does not exist");return _(i,t)}function B(e,t=!1){let r=function(e){let t=8*e.length-256,r=P(e);return t>0?r>>BigInt(t):r}(e);if(t)return r;let{n}=f;return r>=n?r-n:r}class H{constructor(e,t){if(this.hashLen=e,this.qByteLen=t,"number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");this.v=new Uint8Array(e).fill(1),this.k=new Uint8Array(e).fill(0),this.counter=0}hmac(...e){return t.utils.hmacSha256(this.k,...e)}hmacSync(...e){return i(this.k,...e)}checkSync(){if("function"!=typeof i)throw new g("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(e=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),0!==e.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(e=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){this.incr();let e=0,t=[];for(;e<this.qByteLen;){this.v=await this.hmac(this.v);let r=this.v.slice();t.push(r),e+=this.v.length}return T(...t)}generateSync(){this.checkSync(),this.incr();let e=0,t=[];for(;e<this.qByteLen;){this.v=this.hmacSync(this.v);let r=this.v.slice();t.push(r),e+=this.v.length}return T(...t)}}function F(e){return s<e&&e<f.n}function K(e){return s<e&&e<f.P}function z(e,t,r,n=!0){let{n:i}=f,o=B(e,!0);if(!F(o))return;let l=$(o,i),u=E.BASE.multiply(o),c=_(u.x,i);if(c===s)return;let d=_(l*_(t+r*c,i),i);if(d===s)return;let h=new A(c,d),p=(u.x===h.r?0:2)|Number(u.y&a);return n&&h.hasHighS()&&(h=h.normalizeS(),p^=1),{sig:h,recovery:p}}function W(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"==typeof e){if(64!==e.length)throw Error("Expected 32 bytes of private key");t=D(e)}else if(e instanceof Uint8Array){if(32!==e.length)throw Error("Expected 32 bytes of private key");t=P(e)}else throw TypeError("Expected valid private key");if(!F(t))throw Error("Expected private key: 0 < key < n");return t}function G(e){return e instanceof E?(e.assertValidity(),e):E.fromHex(e)}function V(e){if(e instanceof A)return e.assertValidity(),e;try{return A.fromDER(e)}catch(t){return A.fromCompact(e)}}function q(e){let t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?33===n||65===n:r?66===n||130===n:e instanceof E}function Q(e){return P(e.length>32?e.slice(0,32):e)}function Y(e,r,n){if(null==e)throw Error(`sign: expected valid message hash, not "${e}"`);let i=j(e),o=W(r),a=[N(o),function(e){let t=Q(e),r=_(t,f.n);return N(r<s?t:r)}(i)];if(null!=n){!0===n&&(n=t.utils.randomBytes(32));let e=j(n);if(32!==e.length)throw Error("sign: Expected 32 bytes of extra data");a.push(e)}return{seed:T(...a),m:Q(i),d:o}}function Z(e,t){let{sig:r,recovery:n}=e,{der:i,recovered:o}=Object.assign({canonical:!0,der:!0},t),s=i?r.toDERRawBytes():r.toCompactRawBytes();return o?[s,n]:s}
1async function X(e,t,r={}){let n;let{seed:i,m:o,d:s}=Y(e,t,r.extraEntropy),a=new H(32,32);for(await a.reseed(i);!(n=z(await a.generate(),o,s,r.canonical));)await a.reseed();return Z(n,r)}t.getPublicKey=function(e,t=!1){return E.fromPrivateKey(e).toRawBytes(t)},t.recoverPublicKey=function(e,t,r,n=!1){return E.fromSignature(e,t,r).toRawBytes(n)},t.getSharedSecret=function(e,t,r=!1){if(q(e))throw TypeError("getSharedSecret: first arg must be private key");if(!q(t))throw TypeError("getSharedSecret: second arg must be public key");let n=G(t);return n.assertValidity(),n.multiply(W(e)).toRawBytes(r)},t.sign=X,t.signSync=function(e,t,r={}){let n;let{seed:i,m:o,d:s}=Y(e,t,r.extraEntropy),a=new H(32,32);for(a.reseedSync(i);!(n=z(a.generateSync(),o,s,r.canonical));)a.reseedSync();return Z(n,r)};let J={strict:!0};function ee(e){return _(P(e),f.n)}t.verify=function(e,t,r,n=J){let i,o;try{i=V(e),t=j(t)}catch(e){return!1}let{r:s,s:a}=i;if(n.strict&&i.hasHighS())return!1;let l=B(t);try{o=G(r)}catch(e){return!1}let{n:u}=f,c=$(a,u),d=_(l*c,u),h=_(s*c,u),p=E.BASE.multiplyAndAddUnsafe(o,d,h);return!!p&&_(p.x,u)===s};class et{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){let t=j(e);if(64!==t.length)throw TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${t.length}`);return new et(P(t.subarray(0,32)),P(t.subarray(32,64)))}assertValidity(){let{r:e,s:t}=this;if(!K(e)||!F(t))throw Error("Invalid signature")}toHex(){return R(this.r)+R(this.s)}toRawBytes(){return L(this.toHex())}}class er{constructor(e,r,n=t.utils.randomBytes()){if(null==e)throw TypeError(`sign: Expected valid message, not "${e}"`);this.m=j(e);let{x:i,scalar:o}=this.getScalar(W(r));if(this.px=i,this.d=o,this.rand=j(n),32!==this.rand.length)throw TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(e){let t=E.fromPrivateKey(e),r=t.hasEvenY()?e:f.n-e;return{point:t,scalar:r,x:t.toRawX()}}initNonce(e,t){return N(e^P(t))}finalizeNonce(e){let t=_(P(e),f.n);if(t===s)throw Error("sign: Creation of signature failed. k is zero");let{point:r,x:n,scalar:i}=this.getScalar(t);return{R:r,rx:n,k:i}}finalizeSig(e,t,r,n){return new et(e.x,_(t+r*n,f.n)).toRawBytes()}error(){throw Error("sign: Invalid signature produced")}async calc(){let{m:e,d:r,px:n,rand:i}=this,o=t.utils.taggedHash,s=this.initNonce(r,await o(eu.aux,i)),{R:a,rx:l,k:u}=this.finalizeNonce(await o(eu.nonce,s,n,e)),c=ee(await o(eu.challenge,l,n,e)),f=this.finalizeSig(a,u,c,r);return await es(f,e,n)||this.error(),f}calcSync(){let{m:e,d:r,px:n,rand:i}=this,o=t.utils.taggedHashSync,s=this.initNonce(r,o(eu.aux,i)),{R:a,rx:l,k:u}=this.finalizeNonce(o(eu.nonce,s,n,e)),c=ee(o(eu.challenge,l,n,e)),f=this.finalizeSig(a,u,c,r);return ea(f,e,n)||this.error(),f}}async function en(e,t,r){return new er(e,t,r).calc()}function ei(e,t,r){let n=e instanceof et,i=n?e:et.fromHex(e);return n&&i.assertValidity(),{...i,m:j(t),P:G(r)}}function eo(e,t,r,n){let i=E.BASE.multiplyAndAddUnsafe(t,W(r),_(-n,f.n));return!!(i&&i.hasEvenY())&&i.x===e}async function es(e,r,n){try{let{r:i,s:o,m:s,P:a}=ei(e,r,n),l=ee(await t.utils.taggedHash(eu.challenge,N(i),a.toRawX(),s));return eo(i,a,o,l)}catch(e){return!1}}function ea(e,r,n){try{let{r:i,s:o,m:s,P:a}=ei(e,r,n),l=ee(t.utils.taggedHashSync(eu.challenge,N(i),a.toRawX(),s));return eo(i,a,o,l)}catch(e){if(e instanceof g)throw e;return!1}}t.schnorr={Signature:et,getPublicKey:function(e){return E.fromPrivateKey(e).toRawX()},sign:en,verify:es,signSync:function(e,t,r){return new er(e,t,r).calcSync()},verifySync:ea},E.BASE._setWindowSize(8);let el={node:o,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},eu={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},ec={};t.utils={bytesToHex:I,hexToBytes:L,concatBytes:T,mod:_,invert:$,isValidPrivateKey(e){try{return W(e),!0}catch(e){return!1}},_bigintTo32Bytes:N,_normalizePrivateKey:W,hashToPrivateKey:e=>{if((e=j(e)).length<40||e.length>1024)throw Error("Expected valid bytes of private key as per FIPS 186");return N(_(P(e),f.n-a)+a)},randomBytes:(e=32)=>{if(el.web)return el.web.getRandomValues(new Uint8Array(e));if(el.node){let{randomBytes:t}=el.node;return Uint8Array.from(t(e))}throw Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>t.utils.hashToPrivateKey(t.utils.randomBytes(40)),precompute(e=8,t=E.BASE){let r=t===E.BASE?t:new E(t.x,t.y);return r._setWindowSize(e),r.multiply(u),r},sha256:async(...e)=>{if(el.web)return new Uint8Array(await el.web.subtle.digest("SHA-256",T(...e)));if(el.node){let{createHash:t}=el.node,r=t("sha256");
1return e.forEach(e=>r.update(e)),Uint8Array.from(r.digest())}throw Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(el.web){let r=await el.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=T(...t);return new Uint8Array(await el.web.subtle.sign("HMAC",r,n))}if(el.node){let{createHmac:r}=el.node,n=r("sha256",e);return t.forEach(e=>n.update(e)),Uint8Array.from(n.digest())}throw Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...r)=>{let n=ec[e];if(void 0===n){let r=await t.utils.sha256(Uint8Array.from(e,e=>e.charCodeAt(0)));n=T(r,r),ec[e]=n}return t.utils.sha256(n,...r)},taggedHashSync:(e,...t)=>{if("function"!=typeof n)throw new g("sha256Sync is undefined, you need to set it");let r=ec[e];if(void 0===r){let t=n(Uint8Array.from(e,e=>e.charCodeAt(0)));r=T(t,t),ec[e]=r}return n(r,...t)},_JacobianPoint:b},Object.defineProperties(t.utils,{sha256Sync:{configurable:!1,get:()=>n,set(e){n||(n=e)}},hmacSha256Sync:{configurable:!1,get:()=>i,set(e){i||(i=e)}}})},73419:(e,t,r)=>{"use strict";r.d(t,{X:()=>o});var n=r(43306),i=r(37721);class o{constructor(e=n.f3.slice(),t=i.Rf("location",{returnEmptyObject:!0})?.origin,r="",o="/manifest.json",s,a=n._G){this.appDomain=t,this.scopes=e,this.redirectPath=r,this.manifestPath=o,this.coreNode=s,this.authenticatorURL=a}redirectURI(){return`${this.appDomain}${this.redirectPath}`}manifestURI(){return`${this.appDomain}${this.manifestPath}`}}},43306:(e,t,r)=>{"use strict";r.d(t,{_G:()=>n,aL:()=>s,f3:()=>o,lB:()=>i});let n="https://browser.blockstack.org/auth",i={"@type":"Person","@context":"http://schema.org"},o=["store_write"],s="blockstack-session"},30136:(e,t,r)=>{"use strict";r.d(t,{V:()=>q});var n,i=r(73419);let o={MISSING_PARAMETER:"missing_parameter",REMOTE_SERVICE_ERROR:"remote_service_error",INVALID_STATE:"invalid_state",NO_SESSION_DATA:"no_session_data",DOES_NOT_EXIST:"does_not_exist",FAILED_DECRYPTION_ERROR:"failed_decryption_error",INVALID_DID_ERROR:"invalid_did_error",NOT_ENOUGH_FUNDS_ERROR:"not_enough_error",INVALID_AMOUNT_ERROR:"invalid_amount_error",LOGIN_FAILED_ERROR:"login_failed",SIGNATURE_VERIFICATION_ERROR:"signature_verification_failure",CONFLICT_ERROR:"conflict_error",NOT_ENOUGH_PROOF_ERROR:"not_enough_proof_error",BAD_PATH_ERROR:"bad_path_error",VALIDATION_ERROR:"validation_error",PAYLOAD_TOO_LARGE_ERROR:"payload_too_large_error",PRECONDITION_FAILED_ERROR:"precondition_failed_error",UNKNOWN:"unknown"};Object.freeze(o);class s extends Error{constructor(e){super();let t=e.message,r=`Error Code: ${e.code}`,n=this.stack;if(n)r+=`Stack Trace: 2${n}`;else try{throw Error()}catch(e){n=e.stack}t+=` 3If you believe this exception is caused by a bug in stacks.js, 4 please file a bug report: https://github.com/blockstack/stacks.js/issues 5 6${r}`,this.message=t,this.code=e.code,this.parameter=e.parameter?e.parameter:void 0}toString(){return`${super.toString()} 7 code: ${this.code} param: ${this.parameter?this.parameter:"n/a"}`}}class a extends s{constructor(e,t=""){super({code:o.MISSING_PARAMETER,message:t,parameter:e}),this.name="MissingParametersError"}}class l extends s{constructor(e=""){super({code:o.INVALID_DID_ERROR,message:e}),this.name="InvalidDIDError"}}class u extends s{constructor(e){let t=`Failed to login: ${e}`;super({code:o.LOGIN_FAILED_ERROR,message:t}),this.message=t,this.name="LoginFailedError"}}class c extends s{constructor(e="Unable to decrypt cipher object."){super({code:o.FAILED_DECRYPTION_ERROR,message:e}),this.message=e,this.name="FailedDecryptionError"}}class f extends s{constructor(e){super({code:o.INVALID_STATE,message:e}),this.message=e,this.name="InvalidStateError"}}class d extends s{constructor(e){super({code:o.INVALID_STATE,message:e}),this.message=e,this.name="NoSessionDataError"}}let h="1.0.0";class p{constructor(e){this.version=h,this.userData=e.userData,this.transitKey=e.transitKey,this.etags=e.etags?e.etags:{}}static fromJSON(e){if(e.version!==h)throw new f(`JSON data version ${e.version} not supported by SessionData`);return new p({coreNode:e.coreNode,userData:e.userData,transitKey:e.transitKey,etags:e.etags})}toString(){return JSON.stringify(this)}}var y=r(43306);class g{constructor(e){if(e){let t=new p(e);this.setSessionData(t)}}getSessionData(){throw Error("Abstract class")}setSessionData(e){throw Error("Abstract class")}deleteSessionData(){throw Error("Abstract class")}}class m extends g{constructor(e){super(e),this.sessionData||this.setSessionData(new p({}))}getSessionData(){if(!this.sessionData)throw new d("No session data was found.");return this.sessionData}setSessionData(e){return this.sessionData=e,!0}deleteSessionData(){return this.setSessionData(new p({})),!0}}class b extends g{constructor(e){if(super(e),e&&e.storeOptions&&e.storeOptions.localStorageKey&&"string"==typeof e.storeOptions.localStorageKey?this.key=e.storeOptions.localStorageKey:this.key=y.aL,!localStorage.getItem(this.key)){let e=new p({});this.setSessionData(e)}}getSessionData(){let e=localStorage.getItem(this.key);if(!e)throw new d("No session data was found in localStorage");let t=JSON.parse(e);return p.fromJSON(t)}setSessionData(e){return localStorage.setItem(this.key,e.toString()),!0}deleteSessionData(){return localStorage.removeItem(this.key),this.setSessionData(new p({})),!0}}var w=r(3877),v=r(87664);function E(e){if(e&&"btc-addr"===function(e){let t=e.split(":");if(3!==t.length)throw new l("Decentralized IDs must have 3 parts");if("did"!==t[0].toLowerCase())throw new l('Decentralized IDs must start with "did"');return t[1].toLowerCase()}(e))return e.split(":")[2]}async function x(e){return(await Promise.all([function(e){let t=(0,w.decodeToken)(e).payload;if("string"==typeof t)throw Error("Unexpected token payload type of string");if(!t.exp)return!0;{if("number"!=typeof t.exp)return!1;let e=new Date(1e3*t.exp);return!(new Date().getTime()>e.getTime())}}(e),function(e){let t=(0,w.decodeToken)(e).payload;if("string"==typeof t)throw Error("Unexpected token payload type of string");if(!t.iat)return!0;{if("number"!=typeof t.iat)return!1;let e=new Date(1e3*t.iat);return!(new Date().getTime()<e.getTime())}}(e),function(e){let t=(0,w.decodeToken)(e).payload;if("string"==typeof t)throw Error("Unexpected token payload type of string");let r=t.public_keys;if(1===r.length){let t=r[0];try{return new w.TokenVerifier("ES256k",t).verify(e)}catch(e){return!1}}else throw Error("Multiple public keys are not supported")}(e),function(e){let t=(0,w.decodeToken)(e).payload;if("string"==typeof t)throw Error("Unexpected token payload type of string");let r=t.public_keys,n=E(t.iss);if(1===r.length){if((0,v.xc)(r[0])===n)return!0}else throw Error("Multiple public keys are not supported");return!1}(e)])).every(e=>e)}var S=r(37721),A=r(93557),T=r(65530),M=r(91316),I=r(48738);async function C(){if("undefined"!=typeof crypto&&void 0!==crypto.subtle)return{lib:crypto.subtle,name:"subtleCrypto"};try{return{lib:r(68859),name:"nodeCrypto"}}catch(e){throw Error('Crypto lib not found. Either the WebCrypto "crypto.subtle" or Node.js "crypto" module must be available.')}}class R{constructor(e,t){this.createCipher=e,this.createDecipher=t}async encrypt(e,t,r,n){if("aes-128-cbc"!==e&&"aes-256-cbc"!==e)throw Error(`Unsupported cipher algorithm "${e}"`);let i=this.createCipher(e,t,r);return Promise.resolve(new Uint8Array((0,S.eV)(i.update(n),i.final())))}async decrypt(e,t,r,n){if("aes-128-cbc"!==e&&"aes-256-cbc"!==e)throw Error(`Unsupported cipher algorithm "${e}"`);let i=this.createDecipher(e,t,r);return Promise.resolve(new Uint8Array((0,S.eV)(i.update(n),i.final())))}}class N{constructor(e){this.subtleCrypto=e}async encrypt(e,t,r,n){let i,o;if("aes-128-cbc"===e)i="AES-CBC",o=128;else if("aes-256-cbc"===e)i="AES-CBC",o=256;else throw Error(`Unsupported cipher algorithm "${e}"`);let s=await this.subtleCrypto.importKey("raw",t,{name:i,length:o},!1,["encrypt"]);
7return new Uint8Array(await this.subtleCrypto.encrypt({name:i,iv:r},s,n))}async decrypt(e,t,r,n){let i,o;if("aes-128-cbc"===e)i="AES-CBC",o=128;else if("aes-256-cbc"===e)i="AES-CBC",o=256;else throw Error(`Unsupported cipher algorithm "${e}"`);let s=await this.subtleCrypto.importKey("raw",t,{name:i,length:o},!1,["decrypt"]);return new Uint8Array(await this.subtleCrypto.decrypt({name:i,iv:r},s,n))}}async function O(){let e=await C();return"subtleCrypto"===e.name?new N(e.lib):new R(e.lib.createCipheriv,e.lib.createDecipheriv)}var D=r(97480);async function L(e,t,r){let n=await O();return await n.encrypt("aes-256-cbc",t,e,r)}async function P(e,t,r){let n=await O();return await n.decrypt("aes-256-cbc",t,e,r)}function j(e,t){return(0,A.b)(T.J,e,t)}function U(e){let t=(0,D.jf)(e);return{encryptionKey:t.slice(0,32),hmacKey:t.slice(32)}}async function _(e,t,r,i){let o;let s=function(e){let t={result:!1,reason_data:"Invalid public key format",reason:n.InvalidFormat},r={result:!1,reason_data:"Public key is not a point",reason:n.IsNotPoint};if(66!==e.length&&130!==e.length)return t;let i=e.slice(0,2);if(130===e.length&&"04"!==i||66===e.length&&"02"!==i&&"03"!==i||!(null!==e.match(/^[0-9a-f]+$/i)))return t;try{return M.E9.fromHex(e).assertValidity(),{result:!0,reason_data:null,reason:null}}catch(e){return r}}(e);if(!s.result)throw s;let a=M.P6.randomPrivateKey(),l=(0,M.$3)(a,!0),u=(0,M.ZV)(a,e,!0),c=U(u=u.slice(1)),f=M.P6.randomBytes(16),d=await L(f,c.encryptionKey,t),h=(0,S.eV)(f,l,d),p=j(c.hmacKey,h);if(i&&"hex"!==i){if("base64"===i)o=(0,I.fromByteArray)(d);else throw Error(`Unexpected cipherTextEncoding "${i}"`)}else o=(0,S.ci)(d);let y={iv:(0,S.ci)(f),ephemeralPK:(0,S.ci)(l),cipherText:o,mac:(0,S.ci)(p),wasString:r};return i&&"hex"!==i&&(y.cipherTextEncoding=i),y}async function k(e,t){let r;if(!t.ephemeralPK)throw new c("Unable to get public key from cipher object. You might be trying to decrypt an unencrypted object.");let n=t.ephemeralPK,i=(0,M.ZV)(e,n,!0),o=U(i=i.slice(1)),s=(0,S.nr)(t.iv);if(t.cipherTextEncoding&&"hex"!==t.cipherTextEncoding){if("base64"===t.cipherTextEncoding)r=(0,I.toByteArray)(t.cipherText);else throw Error(`Unexpected cipherTextEncoding "${t.cipherText}"`)}else r=(0,S.nr)(t.cipherText);let a=(0,S.eV)(s,(0,S.nr)(n),r),l=j(o.hmacKey,a);if(!function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}((0,S.nr)(t.mac),l))throw new c("Decryption failed: failure in MAC check");let u=await P(s,o.encryptionKey,r);return t.wasString?(0,S.Md)(u):u}async function $(e,t){let r=JSON.parse((0,S.Md)((0,S.nr)(t))),n=await k(e,r);if("string"==typeof n)return n;throw Error("Unable to correctly decrypt private key")}async function B(e,t){let r;let n=Object.assign({},t);if(!n.publicKey){if(!n.privateKey)throw Error("Either public key or private key must be supplied for encryption.");n.publicKey=(0,v.GU)(n.privateKey)}let i="boolean"==typeof n.wasString?n.wasString:"string"==typeof e,o="string"==typeof e?(0,S.iY)(e):e,s=JSON.stringify(await _(n.publicKey,o,i,n.cipherTextEncoding));if(n.sign){"string"==typeof n.sign?r=n.sign:r||(r=n.privateKey);let e=function(e,t){let r="string"==typeof t?(0,S.iY)(t):t,n=(0,v.GU)(e),i=(0,D.Uz)(r),o=(0,M.kS)(i,e);return{signature:(0,S.ci)(o),publicKey:n}}(r,s);s=JSON.stringify({signature:e.signature,publicKey:e.publicKey,cipherText:s})}return s}M.P6.hmacSha256Sync=(e,...t)=>{let r=A.b.create(T.J,e);return t.forEach(e=>r.update(e)),r.digest()},function(e){e.InvalidFormat="InvalidFormat",e.IsNotPoint="IsNotPoint"}(n||(n={}));var H=r(46407);let F={referrerPolicy:"origin",headers:{"x-hiro-product":"stacksjs"}};async function K(e,t){let r={};return Object.assign(r,F,t),await fetch(e,r)}function z(...e){let t,r;let{fetchLib:n,middlewares:i}=(t=K,r=[],e.length>0&&"function"==typeof e[0]&&(t=e.shift()),e.length>0&&(r=e),{fetchLib:t,middlewares:r});return async(e,t)=>{let r={url:e,init:t??{}};for(let e of i)"function"==typeof e.pre&&(r=await Promise.resolve(e.pre({fetch:n,...r}))??r);let o=await n(r.url,r.init);for(let e of i)"function"==typeof e.post&&(o=await Promise.resolve(e.post({fetch:n,url:r.url,init:r.
7init,response:o?.clone()??o}))??o);return o}}var W=r(70189),G=r(69295);let V="_blockstackDidCheckEchoReply";class q{constructor(e){let t=!0;if("undefined"==typeof window&&"undefined"==typeof self&&(t=!1),e&&e.appConfig)this.appConfig=e.appConfig;else if(t)this.appConfig=new i.X;else throw new a("You need to specify options.appConfig");e&&e.sessionStore?this.store=e.sessionStore:t?e?this.store=new b(e.sessionOptions):this.store=new b:e?this.store=new m(e.sessionOptions):this.store=new m}makeAuthRequestToken(e,t,r,n,i,o=(0,S.cG)().getTime(),s={}){let a=this.appConfig;if(!a)throw new f("Missing AppConfig");return e=e||this.generateAndStoreTransitKey(),t=t||a.redirectURI(),r=r||a.manifestURI(),n=n||a.scopes,i=i||a.appDomain,function(e,t,r,n=y.f3.slice(),i,o=(0,S.nD)().getTime(),s={}){let a=e=>{let t=(0,S.Rf)("location",{throwIfUnavailable:!0,usageDesc:`makeAuthRequest([${e}=undefined])`});return t?.origin};t||(t=`${a("redirectURI")}/`),r||(r=`${a("manifestURI")}/manifest.json`),i||(i=a("appDomain"));let l=Object.assign({},s,{jti:(0,S.gS)(),iat:Math.floor(new Date().getTime()/1e3),exp:Math.floor(o/1e3),iss:null,public_keys:[],domain_name:i,manifest_uri:r,redirect_uri:t,version:"1.4.0",do_not_include_profile:!0,supports_hub_url:!0,scopes:n}),u=w.SECP256K1Client.derivePublicKey(e);l.public_keys=[u];let c=(0,v.xc)(u);return l.iss=`did:btc-addr:${c}`,new w.TokenSigner("ES256k",e).sign(l)}(e,t,r,n,i,o,s)}generateAndStoreTransitKey(){let e=this.store.getSessionData(),t=(0,v.Qh)();return e.transitKey=t,this.store.setSessionData(e),t}getAuthResponseToken(){return new URLSearchParams(S.Rf("location",{throwIfUnavailable:!0,usageDesc:"getAuthResponseToken"})?.search).get("authResponse")??""}isSignInPending(){try{if(function(){var e;let t;if("undefined"!=typeof self)t=self;else{if("undefined"==typeof window)return!1;t=window}if(!t.location||!t.localStorage)return!1;let r=t[V];if("boolean"==typeof r)return r;let n=(e=t.location.search)?(/^[?#]/.test(e)?e.slice(1):e).split("&").reduce((e,t)=>{let[r,n]=t.split("=");return e[r]=n?decodeURIComponent(n.replace(/\+/g," ")):"",e},{}):{},i=n.echoReply;if(i){t[V]=!0;let e=`echo-reply-${i}`;return t.localStorage.setItem(e,"success"),t.setTimeout(()=>{let e=n.authContinuation;t.location.href=e},10),!0}return!1}())return H.Y.info("protocolEchoReply detected from isSignInPending call, the page is about to redirect."),!0}catch(e){H.Y.error(`Error checking for protocol echo reply isSignInPending: ${e}`)}return!!this.getAuthResponseToken()}isUserSignedIn(){return!!this.store.getSessionData().userData}async handlePendingSignIn(e=this.getAuthResponseToken(),t=z()){let r;let n=this.store.getSessionData();if(n.userData)throw new u("Existing user session found.");let i=this.store.getSessionData().transitKey,o=this.appConfig&&this.appConfig.coreNode;o||(o=W.fg);let s=(0,w.decodeToken)(e).payload;if("string"==typeof s)throw Error("Unexpected token payload type of string");if(!await x(e))throw new u("Invalid authentication response.");let a=s.private_key,l=s.core_token;if((0,S.se)(s.version,"1.1.0")){if(void 0!==i&&null!=i){if(void 0!==s.private_key&&null!==s.private_key)try{a=await $(i,s.private_key)}catch(e){if(H.Y.warn("Failed decryption of appPrivateKey, will try to use as given"),!M.P6.isValidPrivateKey(s.private_key))throw new u("Failed decrypting appPrivateKey. Usually means that the transit key has changed during login.")}if(null!=l)try{l=await $(i,l)}catch(e){H.Y.info("Failed decryption of coreSessionToken, will try to use as given")}}else throw new u("Authenticating with protocol > 1.1.0 requires transit key, and none found.")}let c=W.lW;(0,S.se)(s.version,"1.2.0")&&null!==s.hubUrl&&void 0!==s.hubUrl&&(c=s.hubUrl),(0,S.se)(s.version,"1.3.0")&&null!==s.associationToken&&void 0!==s.associationToken&&(r=s.associationToken);let f={profile:s.profile,email:s.email,decentralizedID:s.iss,identityAddress:E(s.iss),appPrivateKey:a,coreSessionToken:l,authResponseToken:e,hubUrl:c,appPrivateKeyFromWalletSalt:s.appPrivateKeyFromWalletSalt,coreNode:s.blockstackAPIUrl,gaiaAssociationToken:r},d=s.profile_url;if(!f.profile&&d){let e=await t(d);if(e.ok){let t=JSON.parse(await e.text());f.profile=function(e,t=null){let r;r=t?function(e,t){let r=(0,w.decodeToken)(e),n=r.payload;if("string"==typeof n)throw Error("Unexpected token payload type of string");if(n.hasOwnProperty("subject")&&n.subject){if(!n.subject.hasOwnProperty("publicKey"))throw Error("Token doesn't have a subject public key")}else throw Error("Token doesn't have a subject");
7if(n.hasOwnProperty("issuer")&&n.issuer){if(!n.issuer.hasOwnProperty("publicKey"))throw Error("Token doesn't have an issuer public key")}else throw Error("Token doesn't have an issuer");if(!n.hasOwnProperty("claim"))throw Error("Token doesn't have a claim");let i=n.issuer.publicKey,o=(0,G.EJ)(i);if(t===i);else if(t===o);else throw Error("Token issuer public key does not match the verifying value");let s=new w.TokenVerifier(r.header.alg,i);if(!s)throw Error("Invalid token verifier");if(!s.verify(e))throw Error("Token verification failed");return r}(e,t):(0,w.decodeToken)(e);let n={};if(r.hasOwnProperty("payload")){let e=r.payload;if("string"==typeof e)throw Error("Unexpected token payload type of string");e.hasOwnProperty("claim")&&(n=e.claim)}return n}(t[0].token)}else f.profile=Object.assign({},y.lB)}else f.profile=s.profile;return n.userData=f,this.store.setSessionData(n),f}loadUserData(){let e=this.store.getSessionData().userData;if(!e)throw new f("No user data found. Did the user sign in?");return e}encryptContent(e,t){let r=Object.assign({},t);return r.privateKey||(r.privateKey=this.loadUserData().appPrivateKey),B(e,r)}decryptContent(e,t){let r=Object.assign({},t);return r.privateKey||(r.privateKey=this.loadUserData().appPrivateKey),function(e,t){let r=Object.assign({},t);if(!r.privateKey)throw Error("Private key is required for decryption.");try{let t=JSON.parse(e);return k(r.privateKey,t)}catch(e){if(e instanceof SyntaxError)throw Error("Failed to parse encrypted content JSON. The content may not be encrypted. If using getFile, try passing { decrypt: false }.");throw e}}(e,r)}signUserOut(e){this.store.deleteSessionData(),e&&"undefined"!=typeof location&&location.href&&(location.href=e)}}q.prototype.makeAuthRequest=q.prototype.makeAuthRequestToken},70604:(e,t,r)=>{"use strict";function n(e,t){return(e[t+0]<<8|e[t+1])>>>0}function i(e,t,r=0){return e[r+0]=t>>>8,e[r+1]=t>>>0,e}function o(e,t){return e[t]}function s(e,t,r=0){return e[r]=t,e}function a(e,t){return 0x1000000*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]}function l(e,t,r=0){return e[r+3]=t,t>>>=8,e[r+2]=t,t>>>=8,e[r+1]=t,t>>>=8,e[r]=t,e}r.d(t,{Ag:()=>a,Cg:()=>s,Q$:()=>o,T4:()=>l,cQ:()=>i,n8:()=>n})},70189:(e,t,r)=>{"use strict";r.d(t,{IE:()=>i,fg:()=>n,it:()=>o,lW:()=>s,sQ:()=>a});let n="https://api.mainnet.hiro.so",i="https://api.testnet.hiro.so",o="http://localhost:3999",s="https://hub.blockstack.org",a=33},95353:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(37721);function i(e){let t="string"==typeof e?(0,n.nr)(e):e;if(32!=t.length&&33!=t.length)throw Error(`Improperly formatted private-key. Private-key byte length should be 32 or 33. Length provided: ${t.length}`);if(33==t.length&&1!==t[32])throw Error("Improperly formatted private-key. 33 bytes indicate compressed key, but the last byte must be == 01");return t}},46407:(e,t,r)=>{"use strict";r.d(t,{Y:()=>a});let n={logLevel:"debug"},i=["debug","info","warn","error","none"],o={},s={};for(let e=0;e<i.length;e++){let t=i[e];o[t]=e,s[e]=t}class a{static error(e){this.shouldLog("error")&&console.error(this.logMessage("error",e))}static warn(e){this.shouldLog("warn")&&console.warn(this.logMessage("warn",e))}static info(e){this.shouldLog("info")&&console.log(this.logMessage("info",e))}static debug(e){this.shouldLog("debug")&&console.log(this.logMessage("debug",e))}static logMessage(e,t){return`[${e.toUpperCase()}] ${t}`}static shouldLog(e){return o[n.logLevel]<=o[e]}}},37721:(e,t,r)=>{"use strict";r.d(t,{$O:()=>C,$j:()=>y,HN:()=>c,I4:()=>d,Md:()=>E,QD:()=>x,Qs:()=>S,Rf:()=>l,WR:()=>h,WW:()=>I,cG:()=>o,ci:()=>b,cn:()=>g,eV:()=>M,gS:()=>a,iY:()=>v,jk:()=>p,nD:()=>i,nr:()=>w,sO:()=>u,se:()=>s,y_:()=>f});var n=r(46407);function i(){return new Date(new Date().setMonth(new Date().getMonth()+1))}function o(){return new Date(new Date().setHours(new Date().getHours()+1))}function s(e,t){(void 0===e||""===e)&&(e="0.0.0"),(void 0===t||""===e)&&(t="0.0.0");let r=e.split(".").map(e=>parseInt(e,10)),n=t.split(".").map(e=>parseInt(e,10));for(let i=0;i<t.length;i++)if(i>=e.length&&n.push(0),r[i]<n[i])return!1;return!0}function a(){let e=new Date().getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)})}function l(e,{throwIfUnavailable:t,usageDesc:i,returnEmptyObject:o}={}){let s;try{if(s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("Unexpected runtime environment - no supported global scope (`window`, `self`, `global`) available")}()){let t=s[e];if(t)return t}}catch(t){n.Y.error(`Error getting object '${e}' from global scope '${s}': ${t}`)}if(t){var a,u;let t=(a=s,u=e.toString(),i?`Use of '${i}' requires \`${u}\` which is unavailable on the '${a}' object within the currently executing environment.`:`\`${u}\` is unavailable on the '${a}' object within the currently executing environment.`);throw n.Y.error(t),Error(t)}if(o)return{}}function u(e,t){return p(c(e),t)}function c(e){if("bigint"==typeof e)return e;if("string"==typeof e)return BigInt(e);if("number"==typeof e){if(!Number.isInteger(e))throw RangeError("Invalid value. Values of type 'number' must be an integer.");if(e>Number.MAX_SAFE_INTEGER)throw RangeError(`Invalid value. Values of type 'number' must be less than or equal to ${Number.MAX_SAFE_INTEGER}. For larger values, try using a BigInt instead.`);return BigInt(e)}if(C(e,Uint8Array))return BigInt(`0x${b(e)}`);throw TypeError("intToBigInt: Invalid value type. Must be a number, bigint, BigInt-compatible string, or Uint8Array.")}function f(e){if("string"!=typeof e)throw TypeError(`hexToBigInt: expected string, got ${typeof e}`);return BigInt(`0x${e}`)}function d(e,t=8){return("bigint"==typeof e?e:c(e)).toString(16).padStart(2*t,"0")}function h(e){return parseInt(e,16)}function p(e,t=16){return w(d(e,t))}function y(e,t){if(e<-(BigInt(1)<<t-BigInt(1))||(BigInt(1)<<t-BigInt(1))-BigInt(1)<e)throw`Unable to represent integer in width: ${t}`;return e>=BigInt(0)?BigInt(e):e+(BigInt(1)<<t)}function g(e){var t,r,n;return t=BigInt(`0x${b(e)}`),(n=(r=BigInt(8*e.byteLength))-BigInt(1),t&BigInt(1)<<n)?t-(BigInt(1)<<r):t}let m=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function b(e){if(!(e instanceof Uint8Array))throw Error("Uint8Array expected");let t="";
7for(let r of e)t+=m[r];return t}function w(e){var t;if("string"!=typeof e)throw TypeError(`hexToBytes: expected string, got ${typeof e}`);let r=new Uint8Array((e=(t=e,e=/^0x/i.test(t)?t.slice(2):t).length%2?`0${e}`:e).length/2);for(let t=0;t<r.length;t++){let n=2*t,i=Number.parseInt(e.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");r[t]=i}return r}function v(e){return new TextEncoder().encode(e)}function E(e){return new TextDecoder().decode(e)}function x(e){let t=[];for(let r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return new Uint8Array(t)}function S(e){return String.fromCharCode.apply(null,e)}function A(e){return!Number.isInteger(e)||e<0||e>255}function T(e){if(e.some(A))throw Error("Some values are invalid bytes.");return new Uint8Array(e)}function M(...e){if(!e.every(e=>e instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t}function I(e){return M(...e.map(e=>"number"==typeof e?T([e]):e instanceof Array?T(e):e))}function C(e,t){return e instanceof t||e?.constructor?.name?.toLowerCase()===t.name}},11898:(e,t,r)=>{"use strict";let n,i;r.d(t,{b:()=>Z,g:()=>b,h:()=>h,p:()=>ec,r:()=>ee});let o=!1,s=!1,a=(e,t="")=>()=>{},l=(e,t)=>()=>{},u={},c=e=>null!=e,f=e=>"object"==(e=typeof e)||"function"===e;function d(e){var t,r,n;return null!==(n=null===(r=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===r?void 0:r.getAttribute("content"))&&void 0!==n?n:void 0}let h=(e,t,...r)=>{let n=null,i=!1,o=!1,s=[],a=t=>{for(let r=0;r<t.length;r++)Array.isArray(n=t[r])?a(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!f(n))&&(n=String(n)),i&&o?s[s.length-1].$text$+=n:s.push(i?p(null,n):n),o=i)};if(a(r),t){let e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter(t=>e[t]).join(" "))}let l=p(e,null);return l.$attrs$=t,s.length>0&&(l.$children$=s),l},p=(e,t)=>{let r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r},y={},g=e=>e&&e.$tag$===y,m=(e,t)=>null!=e&&!f(e)&&4&t?"false"!==e&&(""===e||!!e):e,b=e=>J(e).$hostElement$,w=(e,t,r)=>{let n=eu.ce(t,r);return e.dispatchEvent(n),n},v=new WeakMap,E=(e,t,r)=>{let n=es.get(e);ef&&r?"string"==typeof(n=n||new CSSStyleSheet)?n=t:n.replaceSync(t):n=t,es.set(e,n)},x=(e,t,r,n)=>{var i;let o=A(t),s=es.get(o);if(e=11===e.nodeType?e:el,s){if("string"==typeof s){let t;e=e.head||e;let r=v.get(e);if(r||v.set(e,r=new Set),!r.has(o)){{(t=el.createElement("style")).innerHTML=s;let r=null!==(i=eu.$nonce$)&&void 0!==i?i:d(el);null!=r&&t.setAttribute("nonce",r),e.insertBefore(t,e.querySelector("link"))}r&&r.add(o)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s])}return o},S=e=>{let t=e.$cmpMeta$,r=e.$hostElement$,n=t.$flags$,i=a("attachStyles",t.$tagName$),o=x(r.shadowRoot?r.shadowRoot:r.getRootNode(),t);10&n&&(r["s-sc"]=o,r.classList.add(o+"-h")),i()},A=(e,t)=>"sc-"+e.$tagName$,T=(e,t,r,n,i,o)=>{if(r!==n){let s=er(e,t),a=t.toLowerCase();if("class"===t){let t=e.classList,i=I(r),o=I(n);t.remove(...i.filter(e=>e&&!o.includes(e))),t.add(...o.filter(e=>e&&!i.includes(e)))}else if(s||"o"!==t[0]||"n"!==t[1]){let a=f(n);if((s||a&&null!==n)&&!i)try{if(e.tagName.includes("-"))e[t]=n;else{let i=null==n?"":n;"list"===t?s=!1:(null==r||e[t]!=i)&&(e[t]=i)}}catch(e){}null==n||!1===n?(!1!==n||""===e.getAttribute(t))&&e.removeAttribute(t):(!s||4&o||i)&&!a&&(n=!0===n?"":n,e.setAttribute(t,n))}else t="-"===t[2]?t.slice(3):er(ea,a)?a.slice(2):a[2]+t.slice(3),r&&eu.rel(e,t,r,!1),n&&eu.ael(e,t,n,!1)}},M=/\s/,I=e=>e?e.split(M):[],C=(e,t,r,n)=>{let i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,o=e&&e.$attrs$||u,s=t.$attrs$||u;for(n in o)n in s||T(i,n,o[n],void 0,r,t.$flags$);for(n in s)T(i,n,o[n],s[n],r,t.$flags$)},R=(e,t,r,i)=>{let s,a;let l=t.$children$[r],u=0;if(null!==l.$text$)s=l.$elm$=el.createTextNode(l.$text$);else{if(o||(o="svg"===l.$tag$),s=l.$elm$=el.createElementNS(o?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.$tag$),o&&"foreignObject"===l.$tag$&&(o=!1),C(null,l,o),c(n)&&s["s-si"]!==n&&s.classList.add(s["s-si"]=n),l.$children$)for(u=0;
7u<l.$children$.length;++u)(a=R(e,l,u))&&s.appendChild(a);"svg"===l.$tag$?o=!1:"foreignObject"===s.tagName&&(o=!0)}return s},N=(e,t,r,n,o,s)=>{let a,l=e;for(l.shadowRoot&&l.tagName===i&&(l=l.shadowRoot);o<=s;++o)n[o]&&(a=R(null,r,o))&&(n[o].$elm$=a,l.insertBefore(a,t))},O=(e,t,r,n,i)=>{for(;t<=r;++t)(n=e[t])&&(0,n.$elm$).remove()},D=(e,t,r,n)=>{let i,o=0,s=0,a=t.length-1,l=t[0],u=t[a],c=n.length-1,f=n[0],d=n[c];for(;o<=a&&s<=c;)null==l?l=t[++o]:null==u?u=t[--a]:null==f?f=n[++s]:null==d?d=n[--c]:L(l,f)?(P(l,f),l=t[++o],f=n[++s]):L(u,d)?(P(u,d),u=t[--a],d=n[--c]):L(l,d)?(P(l,d),e.insertBefore(l.$elm$,u.$elm$.nextSibling),l=t[++o],d=n[--c]):L(u,f)?(P(u,f),e.insertBefore(u.$elm$,l.$elm$),u=t[--a],f=n[++s]):(i=R(t&&t[s],r,s),f=n[++s],i&&l.$elm$.parentNode.insertBefore(i,l.$elm$));o>a?N(e,null==n[c+1]?null:n[c+1].$elm$,r,n,s,c):s>c&&O(t,o,a)},L=(e,t)=>e.$tag$===t.$tag$,P=(e,t)=>{let r=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,s=t.$tag$,a=t.$text$;null===a?(C(e,t,o="svg"===s||"foreignObject"!==s&&o),null!==n&&null!==i?D(r,n,t,i):null!==i?(null!==e.$text$&&(r.textContent=""),N(r,null,t,i,0,i.length-1)):null!==n&&O(n,0,n.length-1),o&&"svg"===s&&(o=!1)):e.$text$!==a&&(r.data=a)},j=(e,t)=>{let r=e.$hostElement$,o=e.$vnode$||p(null,null),s=g(t)?t:h(null,null,t);i=r.tagName,s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=o.$elm$=r.shadowRoot||r,n=r["s-sc"],P(o,s)},U=(e,t)=>{t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(t=>e.$onRenderResolve$=t))},_=(e,t)=>{if(e.$flags$|=16,4&e.$flags$){e.$flags$|=512;return}return U(e,e.$ancestorComponent$),em(()=>k(e,t))},k=(e,t)=>{let r;let n=a("scheduleUpdate",e.$cmpMeta$.$tagName$),i=e.$lazyInstance$;return n(),K(r,()=>$(e,i,t))},$=async(e,t,r)=>{let n=e.$hostElement$,i=a("update",e.$cmpMeta$.$tagName$),o=n["s-rc"];r&&S(e);let s=a("render",e.$cmpMeta$.$tagName$);B(e,t),o&&(o.map(e=>e()),n["s-rc"]=void 0),s(),i();{let t=n["s-p"],r=()=>H(e);0===t.length?r():(Promise.all(t).then(r),e.$flags$|=4,t.length=0)}},B=(e,t,r)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,j(e,t)}catch(t){en(t,e.$hostElement$)}return null},H=e=>{let t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,n=a("postUpdate",t),i=e.$ancestorComponent$;64&e.$flags$?n():(e.$flags$|=64,z(r),n(),e.$onReadyResolve$(r),i||F()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&eg(()=>_(e,!1)),e.$flags$&=-517},F=e=>{z(el.documentElement),eg(()=>w(ea,"appload",{detail:{namespace:"connect-ui"}}))},K=(e,t)=>e&&e.then?e.then(t):t(),z=e=>e.classList.add("hydrated"),W=(e,t)=>J(e).$instanceValues$.get(t),G=(e,t,r,n)=>{let i=J(e),o=i.$instanceValues$.get(t),s=i.$flags$,a=i.$lazyInstance$;r=m(r,n.$members$[t][0]);let l=Number.isNaN(o)&&Number.isNaN(r),u=r!==o&&!l;(!(8&s)||void 0===o)&&u&&(i.$instanceValues$.set(t,r),a&&(18&s)==2&&_(i,!1))},V=(e,t,r)=>{if(t.$members$){let n=Object.entries(t.$members$),i=e.prototype;if(n.map(([e,[n]])=>{(31&n||2&r&&32&n)&&Object.defineProperty(i,e,{get(){return W(this,e)},set(r){G(this,e,r,t)},configurable:!0,enumerable:!0})}),1&r){let t=new Map;i.attributeChangedCallback=function(e,r,n){eu.jmp(()=>{let r=t.get(e);if(this.hasOwnProperty(r))n=this[r],delete this[r];else if(i.hasOwnProperty(r)&&"number"==typeof this[r]&&this[r]==n)return;this[r]=(null!==n||"boolean"!=typeof this[r])&&n})},e.observedAttributes=n.filter(([e,t])=>15&t[0]).map(([e,r])=>{let n=r[1]||e;return t.set(n,e),n})}}return e},q=async(e,t,r,n,i)=>{if((32&t.$flags$)==0){{if(t.$flags$|=32,(i=eo(r)).then){let e=l();i=await i,e()}i.isProxied||(V(i,r,2),i.isProxied=!0);let e=a("createInstance",r.$tagName$);t.$flags$|=8;try{new i(t)}catch(e){en(e)}t.$flags$&=-9,e()}if(i.style){let e=i.style,t=A(r);if(!es.has(t)){let n=a("registerStyles",r.$tagName$);E(t,e,!!(1&r.$flags$)),n()}}}let o=t.$ancestorComponent$,s=()=>_(t,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()},Q=e=>{if((1&eu.$flags$)==0){let t=J(e),r=t.$cmpMeta$,n=a("connectedCallback",r.$tagName$);if(!(1&t.$flags$)){t.$flags$|=1;{let r=e;for(;r=r.parentNode||r.host;)if(r["s-p"]){U(t,t.$ancestorComponent$=r);break}}r.$members$&&Object.entries(r.$members$).map(([t,[r]])=>{if(31&r&&e.hasOwnProperty(t)){let r=e[t];delete e[t],e[t]=r}}),q(e,t,r)}n()}},Y=e=>{(1&eu.$flags$)==0&&J(e)},Z=(e,t={})=>{var r;let n;let i=a(),o=[],s=t.exclude||[],l=ea.customElements,u=el.head,c=u.querySelector("meta[charset]"),f=el.createElement("style"),h=[],p=!0;Object.assign(eu,t),eu.$resourcesUrl$=new URL(t.resourcesUrl||"./",el.baseURI).href,e.map(e=>{e[1].map(t=>{let r={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};r.$members$=t[2];let i=r.$tagName$,a=class extends HTMLElement{constructor(e){super(e),e=this,et(e,r),1&r.$flags$&&e.attachShadow({mode:"open"})}connectedCallback(){n&&(clearTimeout(n),n=null),p?h.push(this):eu.jmp(()=>Q(this))}disconnectedCallback(){eu.jmp(()=>Y(this))}componentOnReady(){return J(this).$onReadyPromise$}};r.$lazyBundleId$=e[0],s.includes(i)||l.get(i)||(o.push(i),l.define(i,V(a,r,1)))})});{f.innerHTML=o+"{visibility:hidden}.hydrated{visibility:inherit}",f.setAttribute("data-styles","");let e=null!==(r=eu.$nonce$)&&void 0!==r?r:d(el);null!=e&&f.setAttribute("nonce",e),u.insertBefore(f,c?c.nextSibling:u.firstChild)}p=!1,h.length?h.map(e=>e.connectedCallback()):eu.jmp(()=>n=setTimeout(F,30)),i()},X=new WeakMap,J=e=>X.get(e),ee=(e,t)=>
7X.set(t.$lazyInstance$=e,t),et=(e,t)=>{let r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return r.$onReadyPromise$=new Promise(e=>r.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[],X.set(e,r)},er=(e,t)=>t in e,en=(e,t)=>(0,console.error)(e,t),ei=new Map,eo=(e,t,n)=>{let i=e.$tagName$.replace(/-/g,"_"),o=e.$lazyBundleId$,s=ei.get(o);return s?s[i]:n&&BUILD.hotModuleReplacement||"connect-modal"!==o?r(57938)(`./${o}.entry.js`).then(e=>(ei.set(o,e),e[i]),en):r.e(8).then(r.bind(r,8)).then(e=>(ei.set(o,e),e[i]),en)},es=new Map,ea="undefined"!=typeof window?window:{},el=ea.document||{head:{}},eu={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,n)=>e.addEventListener(t,r,n),rel:(e,t,r,n)=>e.removeEventListener(t,r,n),ce:(e,t)=>new CustomEvent(e,t)},ec=e=>Promise.resolve(e),ef=(()=>{try{return new CSSStyleSheet,"function"==typeof new CSSStyleSheet().replaceSync}catch(e){}return!1})(),ed=[],eh=[],ep=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){en(e)}e.length=0},ey=()=>{ep(ed),ep(eh),(s=ed.length>0)&&eu.raf(ey)},eg=e=>ec().then(e),em=e=>{eh.push(e),s||(s=!0,4&eu.$flags$?eg(ey):eu.raf(ey))}},76435:(e,t,r)=>{"use strict";r.d(t,{a:()=>i,b:()=>o,c:()=>a,s:()=>l});let n=()=>"undefined"!=typeof window&&window.webbtc_stx_providers?window.webbtc_stx_providers:[],i=(e=[])=>{if("undefined"==typeof window)return[];let t=n(),r=e.filter(e=>!t.find(t=>t.id===e.id)&&!!o(e.id));return t.concat(r)},o=e=>null==e?void 0:e.split(".").reduce((e,t)=>null==e?void 0:e[t],window),s="STX_PROVIDER",a=()=>"undefined"==typeof window?null:window.localStorage.getItem(s),l=e=>{"undefined"!=typeof window&&window.localStorage.setItem(s,e)}},87664:(e,t,r)=>{"use strict";r.d(t,{qL:()=>h,GU:()=>y,Qh:()=>d,xc:()=>p});var n=r(93557),i=r(65530),o=r(91316),s=r(37721),a=r(95353),l=r(46124),u=r.n(l),c=r(67887),f=r(97480);function d(){return(0,s.ci)(o.P6.randomPrivateKey())}function h(e,t){return function(e){let t=(0,i.J)((0,i.J)(e));return u().encode((0,s.eV)(e,t).slice(0,e.length+4))}((0,s.eV)(new Uint8Array([e]),t.slice(0,20)))}function p(e,t=0){var r;let n="string"==typeof e?(0,s.nr)(e):e;return h(t,(r=(0,f.Uz)(n),(0,c.b)(r)))}function y(e){let t=(0,a.z)(e);return(0,s.ci)((0,o.$3)(t.slice(0,32),!0))}o.P6.hmacSha256Sync=(e,...t)=>{let r=n.b.create(i.J,e);return t.forEach(e=>r.update(e)),r.digest()}},97480:(e,t,r)=>{"use strict";r.d(t,{Uz:()=>o,jf:()=>s});var n=r(65530),i=r(78967);function o(e){return(0,n.J)(e)}function s(e){return(0,i.o)(e)}},31635:(e,t,r)=>{"use strict";var n,i,o;r.d(t,{_Y:()=>c,pH:()=>d,an:()=>f}),function(e){e[e.Testnet=0x80000000]="Testnet",e[e.Mainnet=1]="Mainnet"}(n||(n={})),function(e){e[e.Mainnet=0]="Mainnet",e[e.Testnet=128]="Testnet"}(i||(i={})),function(e){e[e.Mainnet=0x17000000]="Mainnet",e[e.Testnet=0xff000000]="Testnet"}(o||(o={})),r(30551);let s={referrerPolicy:"origin",headers:{"x-hiro-product":"stacksjs"}};async function a(e,t){let r={};return Object.assign(r,s,t),await fetch(e,r)}let l=["mainnet","testnet","devnet","mocknet"];class u{constructor(e){this.version=i.Mainnet,this.chainId=n.Mainnet,this.bnsLookupUrl="https://api.mainnet.hiro.so",this.broadcastEndpoint="/v2/transactions",this.transferFeeEstimateEndpoint="/v2/fees/transfer",this.transactionFeeEstimateEndpoint="/v2/fees/transaction",this.accountEndpoint="/v2/accounts",this.contractAbiEndpoint="/v2/contracts/interface",this.readOnlyFunctionCallEndpoint="/v2/contracts/call-read",this.isMainnet=()=>this.version===i.Mainnet,this.getBroadcastApiUrl=()=>`${this.coreApiUrl}${this.broadcastEndpoint}`,this.getTransferFeeEstimateApiUrl=()=>`${this.coreApiUrl}${this.transferFeeEstimateEndpoint}`,this.getTransactionFeeEstimateApiUrl=()=>`${this.coreApiUrl}${this.transactionFeeEstimateEndpoint}`,this.getAccountApiUrl=e=>`${this.coreApiUrl}${this.accountEndpoint}/${e}?proof=0`,this.getAccountExtendedBalancesApiUrl=e=>`${this.coreApiUrl}/extended/v1/address/${e}/balances`,this.getAbiApiUrl=(e,t)=>`${this.coreApiUrl}${this.contractAbiEndpoint}/${e}/${t}`,this.getReadOnlyFunctionCallApiUrl=(e,t,r)=>`${this.coreApiUrl}${this.readOnlyFunctionCallEndpoint}/${e}/${t}/${encodeURIComponent(r)}`,this.getInfoUrl=()=>`${this.coreApiUrl}/v2/info`,this.getBlockTimeInfoUrl=()=>`${this.coreApiUrl}
7/extended/v1/info/network_block_times`,this.getPoxInfoUrl=()=>`${this.coreApiUrl}/v2/pox`,this.getRewardsUrl=(e,t)=>{let r=`${this.coreApiUrl}/extended/v1/burnchain/rewards/${e}`;return t&&(r=`${r}?limit=${t.limit}&offset=${t.offset}`),r},this.getRewardsTotalUrl=e=>`${this.coreApiUrl}/extended/v1/burnchain/rewards/${e}/total`,this.getRewardHoldersUrl=(e,t)=>{let r=`${this.coreApiUrl}/extended/v1/burnchain/reward_slot_holders/${e}`;return t&&(r=`${r}?limit=${t.limit}&offset=${t.offset}`),r},this.getStackerInfoUrl=(e,t)=>`${this.coreApiUrl}${this.readOnlyFunctionCallEndpoint} 8 ${e}/${t}/get-stacker-info`,this.getDataVarUrl=(e,t,r)=>`${this.coreApiUrl}/v2/data_var/${e}/${t}/${r}?proof=0`,this.getMapEntryUrl=(e,t,r)=>`${this.coreApiUrl}/v2/map_entry/${e}/${t}/${r}?proof=0`,this.coreApiUrl=e.url,this.fetchFn=e.fetchFn??function(...e){let t,r;let{fetchLib:n,middlewares:i}=(t=a,r=[],e.length>0&&"function"==typeof e[0]&&(t=e.shift()),e.length>0&&(r=e),{fetchLib:t,middlewares:r});return async(e,t)=>{let r={url:e,init:t??{}};for(let e of i)"function"==typeof e.pre&&(r=await Promise.resolve(e.pre({fetch:n,...r}))??r);let o=await n(r.url,r.init);for(let e of i)"function"==typeof e.post&&(o=await Promise.resolve(e.post({fetch:n,url:r.url,init:r.init,response:o?.clone()??o}))??o);return o}}()}getNameInfo(e){let t=`${this.bnsLookupUrl}/v1/names/${e}`;return this.fetchFn(t).then(e=>{if(404===e.status)throw Error("Name not found");if(200===e.status)return e.json();throw Error(`Bad response status: ${e.status}`)}).then(e=>e.address?Object.assign({},e,{address:e.address}):e)}}u.fromName=e=>{switch(e){case"mainnet":return new c;case"testnet":return new f;case"devnet":return new h;case"mocknet":return new d;default:throw Error(`Invalid network name provided. Must be one of the following: ${l.join(", ")}`)}},u.fromNameOrNetwork=e=>"string"!=typeof e&&"version"in e?e:u.fromName(e);class c extends u{constructor(e){super({url:e?.url??"https://api.mainnet.hiro.so",fetchFn:e?.fetchFn}),this.version=i.Mainnet,this.chainId=n.Mainnet}}class f extends u{constructor(e){super({url:e?.url??"https://api.testnet.hiro.so",fetchFn:e?.fetchFn}),this.version=i.Testnet,this.chainId=n.Testnet}}class d extends u{constructor(e){super({url:e?.url??"http://localhost:3999",fetchFn:e?.fetchFn}),this.version=i.Testnet,this.chainId=n.Testnet}}let h=d},63207:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e))throw Error(`Wrong integer: ${e}`)}function i(...e){let t=(e,t)=>r=>e(t(r));return{encode:Array.from(e).reverse().reduce((e,r)=>e?t(e,r.encode):r.encode,void 0),decode:e.reduce((e,r)=>e?t(e,r.decode):r.decode,void 0)}}function o(e){return{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(n(t),t<0||t>=e.length)throw Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[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 r=e.indexOf(t);if(-1===r)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return r})}}}function s(e=""){if("string"!=typeof e)throw Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if(n(e),"string"!=typeof t)throw Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw Error("padding.encode input should be array of str
8ings");for(let e of r)if("string"!=typeof e)throw Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function l(e){if("function"!=typeof e)throw Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,r){if(t<2)throw Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw Error("convertRadix: data should be array");if(!e.length)return[];let i=0,o=[],s=Array.from(e);for(s.forEach(e=>{if(n(e),e<0||e>=t)throw Error(`Wrong integer: ${e}`)});;){let e=0,n=!0;for(let o=i;o<s.length;o++){let a=s[o],l=t*e+a;if(!Number.isSafeInteger(l)||t*e/t!==e||l-a!=t*e||(e=l%r,s[o]=Math.floor(l/r),!Number.isSafeInteger(s[o])||s[o]*r+e!==l))throw Error("convertRadix: carry overflow");n&&(s[o]?n=!1:i=o)}if(o.push(e),n)break}for(let t=0;t<e.length-1&&0===e[t];t++)o.push(0);return o.reverse()}r.d(t,{KN:()=>H}),r(65530);let c=(e,t)=>t?c(t,e%t):e,f=(e,t)=>e+(t-c(e,t));function d(e,t,r,i){if(!Array.isArray(e))throw Error("convertRadix2: data should be array");if(t<=0||t>32)throw Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw Error(`convertRadix2: wrong to=${r}`);if(f(t,r)>32)throw Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${f(t,r)}`);let o=0,s=0,a=2**r-1,l=[];for(let i of e){if(n(i),i>=2**t)throw Error(`convertRadix2: invalid data word=${i} from=${t}`);if(o=o<<t|i,s+t>32)throw Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=r;s-=r)l.push((o>>s-r&a)>>>0);o&=2**s-1}if(o=o<<r-s&a,!i&&s>=t)throw Error("Excess padding");if(!i&&o)throw Error(`Non-zero padding: ${o}`);return i&&s>0&&l.push(o>>>0),l}function h(e,t=!1){if(n(e),e<=0||e>32)throw Error("radix2: bits should be in (0..32]");if(f(8,e)>32||f(e,8)>32)throw Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw Error("radix2.encode input should be Uint8Array");return d(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw Error("radix2.decode input should be array of strings");return Uint8Array.from(d(r,e,8,t))}}}function p(e){if("function"!=typeof e)throw Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}i(h(4),o("0123456789ABCDEF"),s("")),i(h(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),s("")),i(h(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),s("")),i(h(5),o("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),s(""),l(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),i(h(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),s("")),i(h(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),s(""));let y=e=>{var t;return i((t=58,n(58),{encode:e=>{if(!(e instanceof Uint8Array))throw Error("radix.encode input should be Uint8Array");return u(Array.from(e),256,58)},decode:e=>{if(!Array.isArray(e)||e.length&&"number"!=typeof e[0])throw Error("radix.decode input should be array of strings");return Uint8Array.from(u(e,58,256))}}),o(e),s(""))};y("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),y("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),y("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");let g=i(o("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),s("")),m=[0x3b6a57b2,0x26508e6d,0x1ea119fa,0x3d4233dd,0x2a1462b3];function b(e){let t=e>>25,r=(0x1ffffff&e)<<5;for(let e=0;e<m.length;e++)(t>>e&1)==1&&(r^=m[e]);return r}function w(e,t,r=1){let n=e.length,i=1;for(let t=0;t<n;t++){let r=e.charCodeAt(t);if(r<33||r>126)throw Error(`Invalid prefix (${e})`);i=b(i)^r>>5}i=b(i);for(let t=0;t<n;t++)i=b(i)^31&e.charCodeAt(t);for(let e of t)i=b(i)^e;for(let e=0;e<6;e++)i=b(i);return i^=r,g.encode(d([i%0x40000000],30,5,!1))}function v(e){let t="bech32"===e?1:0x2bc830a3,r=h(5),n=r.decode,i=r.encode,o=p(n);function s(e,r=90){if("string"!=typeof e)throw Error(`bech32.decode input should be string, not ${typeof e}`);if(e.length<8||!1!==r&&e.length>
8r)throw TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);let n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw Error("String must be lowercase or uppercase");let i=(e=n).lastIndexOf("1");if(0===i||-1===i)throw Error('Letter "1" must be present between prefix and data only');let o=e.slice(0,i),a=e.slice(i+1);if(a.length<6)throw Error("Data must be at least 6 characters long");let l=g.decode(a).slice(0,-6),u=w(o,l,t);if(!a.endsWith(u))throw Error(`Invalid checksum in ${e}: expected "${u}"`);return{prefix:o,words:l}}let a=p(s);return{encode:function(e,r,n=90){if("string"!=typeof e)throw Error(`bech32.encode prefix should be string, not ${typeof e}`);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw Error(`bech32.encode words should be array of numbers, not ${typeof r}`);let i=e.length+7+r.length;if(!1!==n&&i>n)throw TypeError(`Length ${i} exceeds limit ${n}`);return e=e.toLowerCase(),`${e}1${g.encode(r)}${w(e,r,t)}`},decode:s,decodeToBytes:function(e){let{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:a,fromWords:n,fromWordsUnsafe:o,toWords:i}}let E=v("bech32"),x=v("bech32m");i(h(4),o("0123456789abcdef"),s(""),l(e=>{if("string"!=typeof e||e.length%2)throw TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));var S,A,T,M,I,C,R,N,O=r(37721),D=r(87664),L=r(70189);!function(e){e[e.Mainnet=1]="Mainnet",e[e.Testnet=0x80000000]="Testnet"}(S||(S={})),function(e){e[e.Mainnet=0x17000000]="Mainnet",e[e.Testnet=0xff000000]="Testnet"}(A||(A={})),S.Mainnet,function(e){e[e.Mainnet=0]="Mainnet",e[e.Testnet=128]="Testnet"}(T||(T={})),function(e){e[e.MainnetSingleSig=22]="MainnetSingleSig",e[e.MainnetMultiSig=20]="MainnetMultiSig",e[e.TestnetSingleSig=26]="TestnetSingleSig",e[e.TestnetMultiSig=21]="TestnetMultiSig"}(M||(M={})),T.Mainnet,S.Mainnet,T.Mainnet,A.Mainnet,M.MainnetSingleSig,M.MainnetMultiSig,L.fg;let P={chainId:S.Testnet,transactionVersion:T.Testnet,peerNetworkId:A.Testnet,magicBytes:"T2",bootAddress:"ST000000000000000000002AMW42H",addressVersion:{singleSig:M.TestnetSingleSig,multiSig:M.TestnetMultiSig},client:{baseUrl:L.IE}},j={...P,addressVersion:{...P.addressVersion},magicBytes:"id",client:{baseUrl:L.it}},U=(j.addressVersion,j.client,["mainnet","testnet","devnet","mocknet"]);var _=r(21634);!function(e){e[e.P2PKH=0]="P2PKH",e[e.P2SH=1]="P2SH",e[e.P2SHP2WPKH=2]="P2SHP2WPKH",e[e.P2SHP2WSH=3]="P2SHP2WSH",e[e.P2WPKH=4]="P2WPKH",e[e.P2WSH=5]="P2WSH",e[e.P2TR=6]="P2TR"}(I||(I={}));let k={mainnet:{P2PKH:0,P2SH:5},testnet:{P2PKH:111,P2SH:196},devnet:{P2PKH:111,P2SH:196},mocknet:{P2PKH:111,P2SH:196}},$={mainnet:"bc",testnet:"tb",devnet:"bcrt",mocknet:"bcrt"};!function(e){e.Period1="Period1",e.Period2a="Period2a",e.Period2b="Period2b",e.Period3="Period3"}(C||(C={})),function(e){e[e.ERR_STACKING_UNREACHABLE=255]="ERR_STACKING_UNREACHABLE",e[e.ERR_STACKING_CORRUPTED_STATE=254]="ERR_STACKING_CORRUPTED_STATE",e[e.ERR_STACKING_INSUFFICIENT_FUNDS=1]="ERR_STACKING_INSUFFICIENT_FUNDS",e[e.ERR_STACKING_INVALID_LOCK_PERIOD=2]="ERR_STACKING_INVALID_LOCK_PERIOD",e[e.ERR_STACKING_ALREADY_STACKED=3]="ERR_STACKING_ALREADY_STACKED",e[e.ERR_STACKING_NO_SUCH_PRINCIPAL=4]="ERR_STACKING_NO_SUCH_PRINCIPAL",e[e.ERR_STACKING_EXPIRED=5]="ERR_STACKING_EXPIRED",e[e.ERR_STACKING_STX_LOCKED=6]="ERR_STACKING_STX_LOCKED",e[e.ERR_STACKING_PERMISSION_DENIED=9]="ERR_STACKING_PERMISSION_DENIED",e[e.ERR_STACKING_THRESHOLD_NOT_MET=11]="ERR_STACKING_THRESHOLD_NOT_MET",e[e.ERR_STACKING_POX_ADDRESS_IN_USE=12]="ERR_STACKING_POX_ADDRESS_IN_USE",e[e.ERR_STACKING_INVALID_POX_ADDRESS=13]="ERR_STACKING_INVALID_POX_ADDRESS",e[e.ERR_STACKING_ALREADY_REJECTED=17]="ERR_STACKING_ALREADY_REJECTED",e[e.ERR_STACKING_INVALID_AMOUNT=18]="ERR_STACKING_INVALID_AMOUNT",e[e.ERR_NOT_ALLOWED=19]="ERR_NOT_ALLOWED",e[e.ERR_STACKING_ALREADY_DELEGATED=20]="ERR_STACKING_ALREADY_DELEGATED",e[e.ERR_DELEGATION_EXPIRES_DURING_LOCK=21]="ERR_DELEGATION_EXPIRES_DURING_LOCK",e[e.ERR_DELEGATION_TOO_MUCH_LOCKED=22]="ERR_DELEGATION_TOO_MUCH_LOCKED",e[e.ERR_DELEGATION_POX_ADDR_REQUIRED=23]="ERR_DELEGATION_POX_ADDR_REQUIRED",e[e.ERR_INVALID_START_BURN_HEIGHT=24]="ERR_INVALID_START_BURN_HEIGHT",e[e.ERR_NOT_CURRENT_STACKER=25]="ERR_NOT_CURRENT_STACKER",e[e.ERR_STACK_EXTEND_NOT_LOCKED=26]="ERR_STACK_EXTEND_NOT_LOCKED",e[e.ERR_STACK_INCREASE_NOT_LOCKED=27]="ERR_STACK_INCREASE_NOT_LOCKED",e[e.ERR_DELEGATION_NO_REWARD_SLOT=28]="ERR_DELEGATION_NO_REWARD_SLOT",e[e.ERR_DELEGATION_WRONG_REWARD_SLOT=29]="ERR_DELEGATION_WRONG_REWARD_SLOT",e[e.ERR_STACKING_IS_DELEGATED=30]="ERR_STACKING_IS_DELEGATED",e[e.ERR_STACKING_NOT_DELEGATED=31]="ERR_STACKING_NOT_DELEGATED"}(R||(R={}));function B(e,t,r){if(!U.includes(r))throw Error("Invalid network.");switch("string"==typeof t&&(t=(0,O.nr)(t)),e){case I.P2PKH:case I.P2SH:case I.P2SHP2WPKH:case I.P2SHP2WSH:{let n=function(e,t){switch(e){case I.P2PKH:return k[t].P2PKH;case I.P2SH:case I.P2SHP2WPKH:case I.P2SHP2WSH:return k[t].P2SH;
8default:throw Error("Invalid pox address version")}}(e,r);return(0,D.qL)(n,t)}case I.P2WPKH:case I.P2WSH:{let e=E.toWords(t);return E.encode($[r],[0,...e])}case I.P2TR:{let e=x.toWords(t);return x.encode($[r],[1,...e])}}throw Error(`Unexpected address version: ${e}`)}function H(...e){return"number"==typeof e[0]?B(e[0],e[1],e[2]):function(e,t){let r=function(e){if(e.type!==_.yp.Tuple||!e.value)throw Error("Invalid argument, expected ClarityValue to be a TupleCV");if(!("version"in e.value)||!("hashbytes"in e.value))throw Error("Invalid argument, expected Clarity tuple value to contain `version` and `hashbytes` keys");let t=e.value.version,r=e.value.hashbytes;if(t.type!==_.yp.Buffer||r.type!==_.yp.Buffer)throw Error("Invalid argument, expected Clarity tuple value to contain `version` and `hashbytes` buffers");return{version:(0,O.nr)(t.value)[0],hashBytes:(0,O.nr)(r.value)}}(e);return B(r.version,r.hashBytes,t)}(e[0],e[1])}!function(e){e.StackStx="stack-stx",e.AggregateCommit="agg-commit",e.AggregateIncrease="agg-increase",e.StackExtend="stack-extend",e.StackIncrease="stack-increase"}(N||(N={}))},23528:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var n=r(37721),i=r(70604);let o=new Map;class s{constructor(e){this.consumed=0,this.source="string"==typeof e?(0,n.nr)(e):e}readBytes(e){let t=this.source.subarray(this.consumed,this.consumed+e);return this.consumed+=e,t}readUInt32BE(){return(0,i.Ag)(this.readBytes(4),0)}readUInt8(){return(0,i.Q$)(this.readBytes(1),0)}readUInt16BE(){return(0,i.n8)(this.readBytes(2),0)}readBigUIntLE(e){let t=this.readBytes(e).slice().reverse(),r=(0,n.ci)(t);return BigInt(`0x${r}`)}readBigUIntBE(e){let t=this.readBytes(e),r=(0,n.ci)(t);return BigInt(`0x${r}`)}get readOffset(){return this.consumed}set readOffset(e){this.consumed=e}get internalBytes(){return this.source}readUInt8Enum(e,t){let r=this.readUInt8();if(function e(t,r){let n=o.get(t);if(void 0!==n)return n(r);let i=function(e){let t=new Set(Object.values(e).filter(e=>"number"==typeof e));return e=>t.has(e)}(t);return o.set(t,i),e(t,r)}(e,r))return r;throw t(r)}}},4451:(e,t,r)=>{"use strict";r.d(t,{YN:()=>s,md:()=>o});var n=r(21634),i=r(37721);function o(e,t=!1){switch(e.type){case n.yp.BoolTrue:return!0;case n.yp.BoolFalse:return!1;case n.yp.Int:case n.yp.UInt:if(t)return e.value.toString();return e.value;case n.yp.Buffer:return`0x${e.value}`;case n.yp.OptionalNone:return null;case n.yp.OptionalSome:case n.yp.ResponseErr:case n.yp.ResponseOk:return s(e.value);case n.yp.PrincipalStandard:case n.yp.PrincipalContract:return e.value;case n.yp.List:return e.value.map(e=>s(e));case n.yp.Tuple:let r={};return Object.keys(e.value).forEach(t=>{r[t]=s(e.value[t])}),r;case n.yp.StringASCII:case n.yp.StringUTF8:return e.value}}function s(e){switch(e.type){case n.yp.ResponseErr:return{type:a(e),value:o(e,!0),success:!1};case n.yp.ResponseOk:return{type:a(e),value:o(e,!0),success:!0};default:return{type:a(e),value:o(e,!0)}}}function a(e){switch(e.type){case n.yp.BoolTrue:case n.yp.BoolFalse:return"bool";case n.yp.Int:return"int";case n.yp.UInt:return"uint";case n.yp.Buffer:return`(buff ${Math.ceil(e.value.length/2)})`;case n.yp.OptionalNone:return"(optional none)";case n.yp.OptionalSome:return`(optional ${a(e.value)})`;case n.yp.ResponseErr:return`(response UnknownType ${a(e.value)})`;case n.yp.ResponseOk:return`(response ${a(e.value)} UnknownType)`;case n.yp.PrincipalStandard:case n.yp.PrincipalContract:return"principal";case n.yp.List:return`(list ${e.value.length} ${e.value.length?a(e.value[0]):"UnknownType"})`;case n.yp.Tuple:return`(tuple ${Object.keys(e.value).map(t=>`(${t} ${a(e.value[t])})`).join(" ")})`;case n.yp.StringASCII:return`(string-ascii ${(0,i.QD)(e.value).length})`;case n.yp.StringUTF8:return`(string-utf8 ${(0,i.iY)(e.value).length})`}}},21634:(e,t,r)=>{"use strict";var n,i;function o(e){return i[e]}r.d(t,{QM:()=>i,YC:()=>o,yp:()=>n}),function(e){e.Int="int",e.UInt="uint",e.Buffer="buffer",e.BoolTrue="true",e.BoolFalse="false",e.PrincipalStandard="address",e.PrincipalContract="contract",e.ResponseOk="ok",e.ResponseErr="err",e.OptionalNone="none",e.OptionalSome="some",e.List="list",e.Tuple="tuple",e.StringASCII="ascii",e.StringUTF8="utf8"}(n||(n={})),function(e){e[e.int=0]="int",e[e.uint=1]="uint",e[e.buffer=2]="buffer",e[e.true=3]="true",e[e.false=4]="false",e[e.address=5]="address",e[e.contract=6]="contract",e[e.ok=7]="ok",e[e.err=8]="err",e[e.none=9]="none",e[e.some=10]="some",e[e.list=11]="list",e[e.tuple=12]="tuple",e[e.ascii=13]="ascii",e[e.utf8=14]="utf8"}(i||(i={}))},52662:(e,t,r)=>{"use strict";r.d(t,{i:()=>function e(t){var r,m;let b;if("string"==typeof t){let e="0x"===t.slice(0,2).toLowerCase();b=new p.n((0,n.nr)(e?t.slice(2):t))}else t instanceof Uint8Array?b=new p.n(t):b=t;switch(b.readUInt8Enum(i.QM,e=>{throw new y.xv(`Cannot recognize Clarity Type: ${e}`)})){case i.QM.int:return(0,o.q)((0,n.cn)(b.readBytes(16)));case i.QM.uint:return(0,o.R)(b.readBytes(16));case i.QM.buffer:let w=b.readUInt32BE();return(0,s.B)(b.readBytes(w));case i.QM.true:return a();case i.QM.false:return l();case i.QM.address:let v=(0,g.BR)(b);return(0,u.D9)(v);case i.QM.contract:let E=(0,g.BR)(b),x=(0,g.ET)(b);return(0,u.I0)(E,x);case i.QM.ok:return r=e(b),{type:i.yp.ResponseOk,value:r};case i.QM.err:return m=e(b),{type:i.yp.ResponseErr,value:m};case i.QM.none:return(0,c.hr)();case i.QM.some:return(0,c.PK)(e(b));case i.QM.list:let S=b.readUInt32BE(),A=[];for(let t=0;t<S;t++)A.push(e(b));return{type:i.yp.List,value:A};case i.QM.tuple:let T=b.readUInt32BE(),M={};for(let t=0;t<T;t++){let t=(0,g.ET)(b).content;if(void 0===t)throw new y.xv('"content" is undefined');M[t]=e(b)}return(0,f.M)(M);case i.QM.ascii:let I=b.readUInt32BE();return d((0,n.Qs)(b.readBytes(I)));case i.QM.utf8:let C=b.readUInt32BE();return h((0,n.Md)(b.readBytes(C)));
8default:throw new y.xv("Unable to deserialize Clarity Value from Uint8Array. Could not find valid Clarity Type.")}}});var n=r(37721),i=r(21634),o=r(17257),s=r(25370);let a=()=>({type:i.yp.BoolTrue}),l=()=>({type:i.yp.BoolFalse});var u=r(53849),c=r(72009),f=r(89033);let d=e=>({type:i.yp.StringASCII,value:e}),h=e=>({type:i.yp.StringUTF8,value:e});var p=r(23528),y=r(3587),g=r(91608)},38608:(e,t,r)=>{"use strict";r.d(t,{E:()=>p,a:()=>h});var n=r(37721),i=r(70604),o=r(15822),s=r(3587),a=r(4762),l=r(91608),u=r(9905),c=r(21634);function f(e,t){return(0,n.WW)([(0,c.YC)(e),t])}function d(e,t){let r=[],o="ascii"==t?(0,n.QD)(e.value):(0,n.iY)(e.value),s=new Uint8Array(4);return(0,i.T4)(s,o.length,0),r.push(s),r.push(o),f(e.type,(0,n.WW)(r))}function h(e){return(0,n.ci)(p(e))}function p(e){switch(e.type){case c.yp.BoolTrue:case c.yp.BoolFalse:return new Uint8Array([(0,c.YC)(e.type)]);case c.yp.OptionalNone:case c.yp.OptionalSome:return e.type===c.yp.OptionalNone?new Uint8Array([(0,c.YC)(e.type)]):f(e.type,p(e.value));case c.yp.Buffer:return function(e){let t=new Uint8Array(4);return(0,i.T4)(t,Math.ceil(e.value.length/2),0),f(e.type,(0,n.eV)(t,(0,n.nr)(e.value)))}(e);case c.yp.UInt:return function(e){let t=(0,n.jk)(BigInt(e.value),o.Pe);return f(e.type,t)}(e);case c.yp.Int:return function(e){let t=(0,n.jk)((0,n.$j)(BigInt(e.value),BigInt(o.Nv)),o.Pe);return f(e.type,t)}(e);case c.yp.PrincipalStandard:return f(e.type,(0,l.lU)((0,u.p6)(e.value)));case c.yp.PrincipalContract:return function(e){let[t,r]=(0,a.ZC)(e.value);return f(e.type,(0,n.eV)((0,l.lU)((0,u.p6)(t)),(0,l.ot)((0,u.v9)(r))))}(e);case c.yp.ResponseOk:case c.yp.ResponseErr:return f(e.type,p(e.value));case c.yp.List:return function(e){let t=[],r=new Uint8Array(4);for(let n of((0,i.T4)(r,e.value.length,0),t.push(r),e.value)){let e=p(n);t.push(e)}return f(e.type,(0,n.WW)(t))}(e);case c.yp.Tuple:return function(e){let t=[],r=new Uint8Array(4);for(let n of((0,i.T4)(r,Object.keys(e.value).length,0),t.push(r),Object.keys(e.value).sort((e,t)=>e.localeCompare(t)))){let r=(0,u.v9)(n);t.push((0,l.ot)(r));let i=p(e.value[n]);t.push(i)}return f(e.type,(0,n.WW)(t))}(e);case c.yp.StringASCII:return d(e,"ascii");case c.yp.StringUTF8:return d(e,"utf8");default:throw new s.TH("Unable to serialize. Invalid Clarity Value.")}}},25370:(e,t,r)=>{"use strict";r.d(t,{B:()=>o});var n=r(37721),i=r(21634);let o=e=>{if(e.byteLength>1048576)throw Error("Cannot construct clarity buffer that is greater than 1MB");return{type:i.yp.Buffer,value:(0,n.ci)(e)}}},17257:(e,t,r)=>{"use strict";r.d(t,{R:()=>c,q:()=>u});var n=r(37721),i=r(21634);let o=BigInt("0xffffffffffffffffffffffffffffffff"),s=BigInt(0),a=BigInt("0x7fffffffffffffffffffffffffffffff"),l=BigInt("-170141183460469231731687303715884105728"),u=e=>{"string"==typeof e&&e.toLowerCase().startsWith("0x")&&(e=(0,n.cn)((0,n.nr)(e))),(0,n.$O)(e,Uint8Array)&&(e=(0,n.cn)(e));let t=(0,n.HN)(e);if(t>a)throw RangeError(`Cannot construct clarity integer from value greater than ${a}`);if(t<l)throw RangeError(`Cannot construct clarity integer form value less than ${l}`);return{type:i.yp.Int,value:t}},c=e=>{let t=(0,n.HN)(e);if(t<s)throw RangeError("Cannot construct unsigned clarity integer from negative value");if(t>o)throw RangeError(`Cannot construct unsigned clarity integer greater than ${o}`);return{type:i.yp.UInt,value:t}}},72009:(e,t,r)=>{"use strict";r.d(t,{PK:()=>o,hr:()=>i});var n=r(21634);function i(){return{type:n.yp.OptionalNone}}function o(e){return{type:n.yp.OptionalSome,value:e}}},53849:(e,t,r)=>{"use strict";r.d(t,{D9:()=>l,I0:()=>u,L0:()=>a});var n=r(37721),i=r(9905),o=r(99850),s=r(21634);function a(e){if(!e.includes("."))return function(e){let t=(0,i.p6)(e);return{type:s.yp.PrincipalStandard,value:(0,o.VM)(t)}}(e);{let[t,r]=e.split(".");return u((0,i.p6)(t),(0,i.v9)(r))}}function l(e){return{type:s.yp.PrincipalStandard,value:(0,o.VM)(e)}}function u(e,t){if((0,n.iY)(t.content).byteLength>=128)throw Error("Contract name must be less than 128 bytes");return{type:s.yp.PrincipalContract,value:`${(0,o.VM)(e)}.${t.content}`}}},89033:(e,t,r)=>{"use strict";r.d(t,{M:()=>o});var n=r(21634),i=r(4762);function o(e){for(let t in e)if(!(0,i.YI)(t))throw Error(`"${t}" is not a valid Clarity name`);return{type:n.yp.Tuple,value:e}}},15822:(e,t,r)=>{"use strict";var n,i,o,s,a,l,u,c,f,d,h,p,y,g,m;r.d(t,{Am:()=>d,Cy:()=>b,DY:()=>f,GY:()=>E,Gr:()=>l,MX:()=>n,Nv:()=>w,Pe:()=>v,UE:()=>S,V3:()=>g,ZA:()=>x,_d:()=>y,dO:()=>u,dV:()=>M,gW:()=>c,hW:()=>s,m4:()=>h,nz:()=>I,sX:()=>a,u0:()=>o,wS:()=>T,y:()=>i,yl:()=>A});let b=128,w=128,v=16,E=32,x=80,S=65,A=32,T=64,M=34,I=0x1000346;!function(e){e[e.TokenTransfer=0]="TokenTransfer",e[e.SmartContract=1]="SmartContract",e[e.VersionedSmartContract=6]="VersionedSmartContract",e[e.ContractCall=2]="ContractCall",e[e.PoisonMicroblock=3]="PoisonMicroblock",e[e.Coinbase=4]="Coinbase",e[e.CoinbaseToAltRecipient=5]="CoinbaseToAltRecipient",e[e.TenureChange=7]="TenureChange",e[e.NakamotoCoinbase=8]="NakamotoCoinbase"}(n||(n={})),function(e){e[e.Clarity1=1]="Clarity1",e[e.Clarity2=2]="Clarity2",e[e.Clarity3=3]="Clarity3"}(i||(i={})),function(e){e[e.OnChainOnly=1]="OnChainOnly",e[e.OffChainOnly=2]="OffChainOnly",e[e.Any=3]="Any"}(o||(o={}));o.OnChainOnly,o.OffChainOnly,o.Any,o.OnChainOnly,o.OnChainOnly,o.OffChainOnly,o.OffChainOnly,o.Any,o.Any,function(e){e[e.Allow=1]="Allow",e[e.Deny=2]="Deny"}(s||(s={})),function(e){e[e.STX=0]="STX",e[e.Fungible=1]="Fungible",e[e.NonFungible=2]="NonFungible"}(a||(a={})),function(e){e[e.Standard=4]="Standard",e[e.Sponsored=5]="Sponsored"}(l||(l={})),function(e){e[e.P2PKH=0]="P2PKH",e[e.P2SH=1]="P2SH",e[e.P2WPKH=2]="P2WPKH",e[e.P2WSH=3]="P2WSH",e[e.P2SHNonSequential=5]="P2SHNonSequential",e[e.P2WSHNonSequential=7]="P2WSHNonSequential"}(u||(u={})),function(e){e[e.Compressed=0]="Compressed",e[e.Uncompressed=1]="Uncompressed"}(c||(c={})),function(e){e[e.Equal=1]="Equal",e[e.Greater=2]="Greater",e[e.GreaterEqual=3]="GreaterEqual",e[e.Less=4]="Less",e[e.LessEqual=5]="LessEqual"}(f||(f={})),function(e){e[e.Sends=16]="Sends",e[e.DoesNotSend=17]="DoesNotSend"}(d||(d={})),function(e){e[e.Origin=1]="Origin",e[e.Standard=2]="Standard",e[e.Contract=3]="Contract"}(h||(h={})),function(e){e[e.STX=0]="STX",e[e.Fungible=1]="Fungible",e[e.NonFungible=2]="NonFungible"}(p||(p={})),function(e){e[e.BlockFound=0]="BlockFound",e[e.Extended=1]="Extended"}(y||(y={})),function(e){e[e.PublicKeyCompressed=0]="PublicKeyCompressed",e[e.PublicKeyUncompressed=1]="PublicKeyUncompressed",e[e.SignatureCompressed=2]="SignatureCompressed",e[e.SignatureUncompressed=3]="SignatureUncompressed"}(g||(g={})),function(e){e.Serialization="Serialization",e.Deserialization="Deserialization",e.SignatureValidation="SignatureValidation",e.FeeTooLow="FeeTooLow",e.BadNonce="BadNonce",e.NotEnoughFunds="NotEnoughFunds",e.NoSuchContract="NoSuchContract",e.NoSuchPublicFunction="NoSuchPublicFunction",e.BadFunctionArgument="BadFunctionArgument",e.ContractAlreadyExists="ContractAlreadyExists",e.PoisonMicroblocksDoNotConflict="PoisonMicroblocksDoNotConflict",e.PoisonMicroblockHasUnknownPubKeyHash="PoisonMicroblockHasUnknownPubKeyHash",e.PoisonMicroblockIsInvalid="PoisonMicroblockIsInvalid",e.BadAddressVersionByte="BadAddressVersionByte",e.NoCoinbaseViaMempool="NoCoinbaseViaMempool",e.ServerFailureNoSuchChainTip="ServerFailureNoSuchChainTip",e.ServerFailureDatabase="ServerFailureDatabase",e.ServerFailureOther="ServerFailureOther"}(m||(m={}))},3587:(e,t,r)=>{"use strict";r.d(t,{S6:()=>a,TH:()=>i,g9:()=>s,xv:()=>o});
8class n extends Error{constructor(e){super(e),this.message=e,this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class i extends n{constructor(e){super(e)}}class o extends n{constructor(e){super(e)}}class s extends n{constructor(e){super(e)}}class a extends n{constructor(e){super(e)}}},69295:(e,t,r)=>{"use strict";r.d(t,{Lg:()=>x,NG:()=>g,EJ:()=>y,m2:()=>w,li:()=>E,D5:()=>m,EG:()=>v,fJ:()=>A,nq:()=>S});var n=r(93557),i=r(65530),o=r(91316),s=r(37721),a=r(70189),l=r(95353),u=r(35580);r(27457);var c=r(15048),f=r(15822),d=r(4762),h=r(99850),p=r(1850);function y(e,t="mainnet"){t=(0,u.tn)(t),e="string"==typeof e?(0,s.nr)(e):e;let r=function(e,t){switch(t=(0,u.tn)(t??u.eN),e){case f.dO.P2PKH:switch(t.transactionVersion){case c.Kn.Mainnet:return c.TK.MainnetSingleSig;case c.Kn.Testnet:return c.TK.TestnetSingleSig;default:throw Error(`Unexpected transactionVersion ${t.transactionVersion} for hashMode ${e}`)}case f.dO.P2SH:case f.dO.P2SHNonSequential:case f.dO.P2WPKH:case f.dO.P2WSH:case f.dO.P2WSHNonSequential:switch(t.transactionVersion){case c.Kn.Mainnet:return c.TK.MainnetMultiSig;case c.Kn.Testnet:return c.TK.TestnetMultiSig;default:throw Error(`Unexpected transactionVersion ${t.transactionVersion} for hashMode ${e}`)}default:throw Error(`Unexpected hashMode ${e}`)}}(f.dO.P2PKH,t),n=(0,h.fi)(r,(0,d.D2)(e));return(0,h.VM)(n)}function g(e){return e="string"==typeof e?(0,s.nr)(e):e,{type:p.l.PublicKey,data:e}}function m(e,t,r=f.gW.Compressed){let n=function(e){if(e.length<129)throw Error("Invalid signature");let t=e.slice(0,2),r=e.slice(2,66),n=e.slice(66);return{recoveryId:(0,s.WR)(t),r,s:n}}(t),i=new o.Pc((0,s.y_)(n.r),(0,s.y_)(n.s)),a=o.E9.fromSignature(e,i,n.recoveryId),l=r===f.gW.Compressed;return a.toHex(l)}function b(e){return"string"==typeof e?e:(0,s.ci)(e)}function w(e){return("string"==typeof e?e.length/2:e.byteLength)===a.sQ}function v(e){return!b(e).startsWith("04")}function E(e){let t=w(e=(0,l.z)(e));return(0,s.ci)((0,o.$3)(e.slice(0,32),t))}function x(e){return o.E9.fromHex(b(e)).toHex(!0)}function S(e){return o.E9.fromHex(b(e)).toHex(!1)}function A(e,t){e=(0,l.z)(e);let[r,n]=(0,o.kS)(t,e.slice(0,32),{canonical:!0,recovered:!0});if(null==n)throw Error("No signature recoveryId received");return(0,s.I4)(n,1)+o.Pc.fromHex(r).toCompactHex()}o.P6.hmacSha256Sync=(e,...t)=>{let r=n.b.create(i.J,e);return t.forEach(e=>r.update(e)),r.digest()}},4762:(e,t,r)=>{"use strict";r.d(t,{D2:()=>m,EE:()=>S,G8:()=>g,Sq:()=>d,UI:()=>w,Xh:()=>p,YI:()=>E,ZC:()=>A,c1:()=>f,pw:()=>h,rD:()=>x,rv:()=>b,tM:()=>v});var n=r(67887),i=r(65530),o=r(78967);r(91316);var s=r(37721);r(27457);var a=r(4702),l=r.n(a),u=r(38608),c=r(52662);let f=e=>e.length%2?`0${e}`:e,d=(e,t)=>e.padEnd(t,"0"),h=(e,t)=>!!e&&(0,s.iY)(e).length>t;function p(e){return l()(e)}let y=e=>(0,n.b)((0,i.J)(e)),g=e=>(0,s.ci)((0,o.pr)(e)),m=e=>(0,s.ci)(y(e)),b=e=>{let t=y(e),r=y((0,s.eV)(new Uint8Array([0]),new Uint8Array([t.length]),t));return(0,s.ci)(r)},w=(e,t)=>{if(e>15||t.length>15)throw Error("P2SH multisig address can only contain up to 15 public keys");let r=[];r.push(80+e),t.forEach(e=>{r.push(e.length),r.push(e)}),r.push(80+t.length),r.push(174);let n=y((0,s.WW)(r));return(0,s.ci)(n)},v=(e,t)=>{if(e>15||t.length>15)throw Error("P2WSH multisig address can only contain up to 15 public keys");let r=[];r.push(80+e),t.forEach(e=>{r.push(e.length),r.push(e)}),r.push(80+t.length),r.push(174);let n=(0,s.WW)(r),o=(0,i.J)(n),a=[];a.push(0),a.push(o.length),a.push(o);let l=y((0,s.WW)(a));return(0,s.ci)(l)};function E(e){return/^[a-zA-Z]([a-zA-Z0-9]|[-_!?+<>=/*])*$|^[-+=/*]$|^[<>]=?$/.test(e)&&e.length<128}function x(e){let t=(0,u.a)(e);return`0x${t}`}function S(e){return(0,c.i)(e)}function A(e){let[t,r]=e.split(".");if(!t||!r)throw Error(`Invalid contract identifier: ${e}`);return[t,r]}},9905:(e,t,r)=>{"use strict";r.d(t,{Ao:()=>w,JT:()=>I,Qm:()=>f,UN:()=>m,V1:()=>p,bZ:()=>b,kI:()=>S,kc:()=>v,lZ:()=>h,oc:()=>E,p6:()=>A,pr:()=>M,ql:()=>g,qu:()=>y,sO:()=>T,v9:()=>x});var n=r(37721),i=r(27457),o=r(53849),s=r(21634),a=r(15048),l=r(15822),u=r(4762),c=r(1850);function f(){return{type:c.l.Address,version:a.TK.MainnetSingleSig,hash160:"0".repeat(40)}}function d(e){if(e&&(0,u.pw)(e,l.dV))throw Error(`Memo exceeds maximum length of ${l.dV} bytes`);return{type:c.l.MemoString,content:e}}function h(e,t){return{type:c.l.LengthPrefixedList,lengthPrefixBytes:t||4,values:e}}function p(e){if((0,n.nr)(e).byteLength!=l.UE)throw Error("Invalid signature");return{type:c.l.MessageSignature,data:e}}function y(e,t,r){return"string"==typeof e&&(e=(0,o.L0)(e)),"string"==typeof r&&(r=d(r)),{t
8ype:c.l.Payload,payloadType:l.MX.TokenTransfer,recipient:e,amount:(0,n.HN)(t),memo:r??d("")}}function g(e,t,r,n){return"string"==typeof t&&(t=x(t)),"string"==typeof r&&(r=x(r)),{type:c.l.Payload,payloadType:l.MX.ContractCall,contractAddress:"string"==typeof e?A(e):e,contractName:t,functionName:r,functionArgs:n}}function m(e,t,r){return"string"==typeof e&&(e=x(e)),"string"==typeof t&&(t=x(t,4,1e5)),"number"==typeof r?{type:c.l.Payload,payloadType:l.MX.VersionedSmartContract,clarityVersion:r,contractName:e,codeBody:t}:{type:c.l.Payload,payloadType:l.MX.SmartContract,contractName:e,codeBody:t}}function b(){return{type:c.l.Payload,payloadType:l.MX.PoisonMicroblock}}function w(e,t){if(e.byteLength!=l.GY)throw Error(`Coinbase buffer size must be ${l.GY} bytes`);return void 0!=t?{type:c.l.Payload,payloadType:l.MX.CoinbaseToAltRecipient,coinbaseBytes:e,recipient:t}:{type:c.l.Payload,payloadType:l.MX.Coinbase,coinbaseBytes:e}}function v(e,t,r){if(e.byteLength!=l.GY)throw Error(`Coinbase buffer size must be ${l.GY} bytes`);if(r.byteLength!=l.ZA)throw Error(`VRF proof buffer size must be ${l.ZA} bytes`);return{type:c.l.Payload,payloadType:l.MX.NakamotoCoinbase,coinbaseBytes:e,recipient:t.type===s.yp.OptionalSome?t.value:void 0,vrfProof:r}}function E(e,t,r,n,i,o,s){return{type:c.l.Payload,payloadType:l.MX.TenureChange,tenureHash:e,previousTenureHash:t,burnViewHash:r,previousTenureEnd:n,previousTenureBlocks:i,cause:o,publicKeyHash:s}}function x(e,t,r){let n=r||l.Cy;if((0,u.pw)(e,n))throw Error(`String length exceeds maximum bytes ${n}`);return{type:c.l.LengthPrefixedString,content:e,lengthPrefixBytes:t||1,maxLengthBytes:n}}function S(e,t,r){return{type:c.l.Asset,address:A(e),contractName:x(t),assetName:x(r)}}function A(e){let t=(0,i.yI)(e);return{type:c.l.Address,version:t[0],hash160:t[1]}}function T(e,t){let r=A(e),n=x(t);return{type:c.l.Principal,prefix:l.m4.Contract,address:r,contractName:n}}function M(e){let t=A(e);return{type:c.l.Principal,prefix:l.m4.Standard,address:t}}function I(e,t){return{pubKeyEncoding:e,type:c.l.TransactionAuthField,contents:t}}},99850:(e,t,r)=>{"use strict";r.d(t,{B$:()=>p,GY:()=>h,VM:()=>d,fi:()=>f,j3:()=>c});var n=r(27457),i=r(15822),o=r(69295),s=r(4762),a=r(9905),l=r(91608),u=r(1850);function c(e,t,r,n){if(0===n.length)throw Error("Invalid number of public keys");if((t===i.dO.P2PKH||t===i.dO.P2WPKH)&&(1!==n.length||1!==r))throw Error("Invalid number of public keys or signatures");if((t===i.dO.P2WPKH||t===i.dO.P2WSH||t===i.dO.P2WSHNonSequential)&&!n.map(e=>e.data).every(o.EG))throw Error("Public keys must be compressed for segwit");switch(t){case i.dO.P2PKH:return f(e,(0,s.D2)(n[0].data));case i.dO.P2WPKH:return f(e,(0,s.rv)(n[0].data));case i.dO.P2SH:case i.dO.P2SHNonSequential:return f(e,(0,s.UI)(r,n.map(l.W3)));case i.dO.P2WSH:case i.dO.P2WSHNonSequential:return f(e,(0,s.tM)(r,n.map(l.W3)))}}function f(e,t){return{type:u.l.Address,version:e,hash160:t}}function d(e){return(0,n.H4)(e.version,e.hash160)}function h(e){let[t,r,n]=e.split(/\.|::/);return(0,a.kI)(t,r,n)}function p(e){if(!e.includes("."))return(0,a.pr)(e);{let[t,r]=e.split(".");return(0,a.sO)(t,r)}}},91608:(e,t,r)=>{"use strict";r.d(t,{BR:()=>m,ET:()=>v,FM:()=>N,LV:()=>R,W3:()=>D,YM:()=>M,ZU:()=>C,d6:()=>A,jL:()=>O,lU:()=>g,nt:()=>T,ot:()=>w});var n=r(37721),i=r(70604),o=r(23528),s=r(38608),a=r(52662),l=r(72009),u=r(15822),c=r(3587),f=r(69295),d=r(4762),h=r(9905),p=r(1850);function y(e){switch(e.type){case p.l.Address:return g(e);case p.l.Principal:return b(e);case p.l.LengthPrefixedString:return w(e);case p.l.MemoString:return function(e){let t=[],r=(0,n.iY)(e.content),i=(0,d.Sq)((0,n.ci)(r),2*u.dV);return t.push((0,n.nr)(i)),(0,n.WW)(t)}(e);case p.l.Asset:return x(e);case p.l.PostCondition:return I(e);case p.l.PublicKey:return D(e);case p.l.LengthPrefixedList:return A(e);case p.l.Payload:return C(e);case p.l.TransactionAuthField:return function(e){let t=[];switch(e.contents.type){case p.l.PublicKey:t.push(e.pubKeyEncoding===u.gW.Compressed?u.V3.PublicKeyCompressed:u.V3.PublicKeyUncompressed),t.push((0,n.nr)((0,f.Lg)(e.contents.data)));break;case p.l.MessageSignature:t.push(e.pubKeyEncoding===u.gW.Compressed?u.V3.SignatureCompressed:u.V3.SignatureUncompressed),t.push(O(e.contents))}return(0,n.WW)(t)}(e);case p.l.MessageSignature:return O(e)}}function g(e){let t=[];return t.push((0,n.nr)((0,n.I4)(e.version,1))),t.push((0,n.nr)(e.hash160)),(0,n.WW)(t)}function m(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e),r=(0,n.WR)((0,n.ci)(t.readBytes(1))),i=(0,n.ci)(t.readBytes(20));return{type:p.l.Address,version:r,hash160:i}}function b(e){let t=[];return t.push(e.prefix),(e.prefix===u.m4.Standard||e.prefix===u.m4.Contract)&&t.push(g(e.address)),e.prefix===u.m4.Contract&&t.push(w(e.contractName)),(0,n.WW)(t)}function w(e){let t=[],r=(0,n.iY)(e.content),i=r.byteLength;return t.push((0,n.nr)((0,n.I4)(i,e.lengthPrefixBytes))),t.push(r),(0,n.WW)(t)}function v(e,t,r){t=t||1;let i=(0,n.$O)(e,o.n)?e:new o.n(e),s=(0,n.WR)((0,n.ci)(i.readBytes(t))),a=(0,n.Md)(i.readBytes(s));return(0,h.v9)(a,t,r??128)}function E(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e),r=(0,n.Md)(t.readBytes(u.dV));return r=r.replace(/\u0000*$/,""),{type:p.l.MemoString,content:r}}function x(e){let t=[];return t.push(g(e.address)),t.push(w(e.contractName)),t.push(w(e.assetName)),(0,n.WW)(t)}function S(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e);return{type:p.l.Asset,address:m(t),contractName:v(t),assetName:v(t)}}function A(e){let t=e.values,r=[];for(let i of(r.push((0,n.nr)((0,n.I4)(t.length,e.lengthPrefixBytes))),t))r.push(y(i));return(0,n.WW)(r)}function T(e,t,r){let i=(0,n.$O)(e,o.n)?e:new o.n(e),s=(0,n.WR)((0,n.ci)(i.readBytes(r||4))),l=[];for(let e=0;e<s;e++)switch(t){case p.l.Address:l.push(m(i));break;case p.l.LengthPrefixedString:l.push(v(i));break;case p.l.MemoString:l.push(E(i));break;case p.l.Asset:l.push(S(i));break;case p.l.PostCondition:l.push(function(e){let t,r,i;let s=(0,n.$O)(e,o.n)?e:new o.n(e),l=s.readUInt8Enum(u.sX,e=>{throw new c.xv(`Could not read ${e} as PostConditionType`)}),f=function(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e),r=t.readUInt8Enum(u.m4,e=>{throw new c.xv(`Unexpected Principal payload type: ${e}`)});if(r===u.m4.Origin)return{type:p.l.Principal,prefix:r};let i=m(t);if(r===u.m4.Standard)return{type:p.l.Principal,prefix:r,address:i};let s=v(t);return{type:p.l.Principal,prefix:r,address:i,contractName:s}}(s);switch(l){case u.sX.STX:return t=s.readUInt8Enum(u.DY,e=>{throw new c.xv(`Could not read ${e} as FungibleConditionCode`)}),i=BigInt(`0x${(0,n.ci)(s.readBytes(8))}`),{type:p.l.PostCondition,conditionType:u.sX.STX,principal:f,conditionCode:t,amount:i};case u.sX.Fungible:return r=S(s),t=s.readUInt8Enum(u.DY,e=>{throw new c.xv(`Could not read ${e} as FungibleConditionCode`)}),i=BigInt(`0x${(0,n.ci)(s.readBytes(8))}`),{type:p.l.PostCondition,conditionType:u.sX.Fungible,principal:f,conditionCode:t,amount:i,asset:r};case u.sX.NonFungible:r=S(s);let d=(0,a.i)(s);return t=s.readUInt8Enum(u.Am,e=>{throw new c.xv(`Could not read ${e} as FungibleConditionCode`)}),{type:p.l.PostCondition,conditionType:u.sX.NonFungible,principal:f,conditionCode:t,asset:r,assetName:d}}}(i));break;case p.l.PublicKey:l.push(L(i));break;case p.l.TransactionAuthField:l.push(function(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e),r=t.readUInt8Enum(u.V3,e=>{throw new c.xv(`Could not read ${e} as AuthFieldType`)});switch(r){case u.V3.PublicKeyCompressed:return(0,h.JT)(u.gW.Compressed,L(t));case u.V3.PublicKeyUncompressed:return(0,h.JT)(u.gW.Uncompressed,(0,f.NG)((0,f.nq)(L(t).data)));case u.V3.SignatureCompressed:return(0,h.JT)(u.gW.Compressed,N(t));case u.V3.SignatureUncompressed:return(0,h.JT)(u.gW.Uncompressed,N(t));default:throw Error(`Unknown auth field type: ${JSON.stringify(r)}`)}}(i))}return(0,h.lZ)(l,r)}function M(e){return(0,n.ci)(I(e))}function I(e){let t=[];
8if(t.push(e.conditionType),t.push(b(e.principal)),(e.conditionType===u.sX.Fungible||e.conditionType===u.sX.NonFungible)&&t.push(x(e.asset)),e.conditionType===u.sX.NonFungible&&t.push((0,s.E)(e.assetName)),t.push(e.conditionCode),e.conditionType===u.sX.STX||e.conditionType===u.sX.Fungible){if(e.amount>BigInt("0xffffffffffffffff"))throw new c.TH("The post-condition amount may not be larger than 8 bytes");t.push((0,n.sO)(e.amount,8))}return(0,n.WW)(t)}function C(e){let t=[];switch(t.push(e.payloadType),e.payloadType){case u.MX.TokenTransfer:t.push((0,s.E)(e.recipient)),t.push((0,n.sO)(e.amount,8)),t.push(y(e.memo));break;case u.MX.ContractCall:t.push(y(e.contractAddress)),t.push(y(e.contractName)),t.push(y(e.functionName));let r=new Uint8Array(4);(0,i.T4)(r,e.functionArgs.length,0),t.push(r),e.functionArgs.forEach(e=>{t.push((0,s.E)(e))});break;case u.MX.SmartContract:t.push(y(e.contractName)),t.push(y(e.codeBody));break;case u.MX.VersionedSmartContract:t.push(e.clarityVersion),t.push(y(e.contractName)),t.push(y(e.codeBody));break;case u.MX.PoisonMicroblock:break;case u.MX.Coinbase:t.push(e.coinbaseBytes);break;case u.MX.CoinbaseToAltRecipient:t.push(e.coinbaseBytes),t.push((0,s.E)(e.recipient));break;case u.MX.NakamotoCoinbase:t.push(e.coinbaseBytes),t.push((0,s.E)(e.recipient?(0,l.PK)(e.recipient):(0,l.hr)())),t.push(e.vrfProof);break;case u.MX.TenureChange:t.push((0,n.nr)(e.tenureHash)),t.push((0,n.nr)(e.previousTenureHash)),t.push((0,n.nr)(e.burnViewHash)),t.push((0,n.nr)(e.previousTenureEnd)),t.push((0,i.T4)(new Uint8Array(4),e.previousTenureBlocks)),t.push((0,i.Cg)(new Uint8Array(1),e.cause)),t.push((0,n.nr)(e.publicKeyHash))}return(0,n.WW)(t)}function R(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e);switch(t.readUInt8Enum(u.MX,e=>{throw Error(`Cannot recognize PayloadType: ${e}`)})){case u.MX.TokenTransfer:let r=(0,a.i)(t),i=(0,n.HN)(t.readBytes(8)),s=E(t);return(0,h.qu)(r,i,s);case u.MX.ContractCall:let l=m(t),c=v(t),f=v(t),d=[],p=t.readUInt32BE();for(let e=0;e<p;e++){let e=(0,a.i)(t);d.push(e)}return(0,h.ql)(l,c,f,d);case u.MX.SmartContract:let y=v(t),g=v(t,4,1e5);return(0,h.UN)(y,g);case u.MX.VersionedSmartContract:{let e=t.readUInt8Enum(u.y,e=>{throw Error(`Cannot recognize ClarityVersion: ${e}`)}),r=v(t),n=v(t,4,u.nz);return(0,h.UN)(r,n,e)}case u.MX.PoisonMicroblock:return(0,h.bZ)();case u.MX.Coinbase:{let e=t.readBytes(u.GY);return(0,h.Ao)(e)}case u.MX.CoinbaseToAltRecipient:{let e=t.readBytes(u.GY),r=(0,a.i)(t);return(0,h.Ao)(e,r)}case u.MX.NakamotoCoinbase:{let e=t.readBytes(u.GY),r=(0,a.i)(t),n=t.readBytes(u.ZA);return(0,h.kc)(e,r,n)}case u.MX.TenureChange:let b=(0,n.ci)(t.readBytes(20)),w=(0,n.ci)(t.readBytes(20)),x=(0,n.ci)(t.readBytes(20)),S=(0,n.ci)(t.readBytes(32)),A=t.readUInt32BE(),T=t.readUInt8Enum(u._d,e=>{throw Error(`Cannot recognize TenureChangeCause: ${e}`)}),M=(0,n.ci)(t.readBytes(20));return(0,h.oc)(b,w,x,S,A,T,M)}}function N(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e);return(0,h.V1)((0,n.ci)(t.readBytes(u.UE)))}function O(e){return(0,n.nr)(e.data)}function D(e){return e.data.slice()}function L(e){let t=(0,n.$O)(e,o.n)?e:new o.n(e),r=t.readUInt8(),i=4===r?u.wS:u.yl;return(0,f.NG)((0,n.WW)([r,t.readBytes(i)]))}},1850:(e,t,r)=>{"use strict";var n;r.d(t,{l:()=>n}),function(e){e[e.Address=0]="Address",e[e.Principal=1]="Principal",e[e.LengthPrefixedString=2]="LengthPrefixedString",e[e.MemoString=3]="MemoString",e[e.Asset=4]="Asset",e[e.PostCondition=5]="PostCondition",e[e.PublicKey=6]="PublicKey",e[e.LengthPrefixedList=7]="LengthPrefixedList",e[e.Payload=8]="Payload",e[e.MessageSignature=9]="MessageSignature",e[e.StructuredDataSignature=10]="StructuredDataSignature",e[e.TransactionAuthField=11]="TransactionAuthField"}(n||(n={}))},15048:(e,t,r)=>{"use strict";var n,i,o,s;r.d(t,{GE:()=>i,Kn:()=>o,TK:()=>s,a_:()=>n}),function(e){e[e.Mainnet=1]="Mainnet",e[e.Testnet=0x80000000]="Testnet"}(n||(n={})),function(e){e[e.Mainnet=0x17000000]="Mainnet",e[e.Testnet=0xff000000]="Testnet"}(i||(i={})),n.Mainnet,function(e){e[e.Mainnet=0]="Mainnet",e[e.Testnet=128]="Testnet"}(o||(o={})),function(e){e[e.MainnetSingleSig=22]="MainnetSingleSig",e[e.MainnetMultiSig=20]="MainnetMultiSig",e[e.TestnetSingleSig=26]="TestnetSingleSig",e[e.TestnetMultiSig=21]="TestnetMultiSig"}(s||(s={})),o.Mainnet},35580:(e,t,r)=>{"use strict";r.d(t,{eN:()=>o,tn:()=>u});var n=r(70189),i=r(15048);let o={chainId:i.a_.Mainnet,transactionVersion:i.Kn.Mainnet,peerNetworkId:i.GE.Mainnet,magicBytes:"X2",bootAddress:"SP000000000000000000002Q6VF78",addressVersion:{singleSig:i.TK.MainnetSingleSig,multiSig:i.TK.MainnetMultiSig},client:{baseUrl:n.fg}},s={chainId:i.a_.Testnet,transactionVersion:i.Kn.Testnet,peerNetworkId:i.GE.Testnet,magicBytes:"T2",bootAddress:"ST000000000000000000002AMW42H",addressVersion:{singleSig:i.TK.TestnetSingleSig,multiSig:i.TK.TestnetMultiSig},client:{baseUrl:n.IE}},a={...s,addressVersion:{...s.addressVersion},magicBytes:"id",client:{baseUrl:n.it}},l={...a,addressVersion:{...a.addressVersion},client:{...a.client}};function u(e){return"string"==typeof e?function(e){switch(e){case"mainnet":return o;case"testnet":return s;
8case"devnet":return a;case"mocknet":return l;default:throw Error(`Unknown network name: ${e}`)}}(e):e}},78369:(e,t,r)=>{"use strict";r.d(t,{Ry:()=>u});var n=new WeakMap,i=new WeakMap,o={},s=0,a=function(e){return e&&(e.host||a(e.parentNode))},l=function(e,t,r,l){var u=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=a(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});o[r]||(o[r]=new WeakMap);var c=o[r],f=[],d=new Set,h=new Set(u),p=function(e){!e||d.has(e)||(d.add(e),p(e.parentNode))};u.forEach(p);var y=function(e){!e||h.has(e)||Array.prototype.forEach.call(e.children,function(e){if(d.has(e))y(e);else try{var t=e.getAttribute(l),o=null!==t&&"false"!==t,s=(n.get(e)||0)+1,a=(c.get(e)||0)+1;n.set(e,s),c.set(e,a),f.push(e),1===s&&o&&i.set(e,!0),1===a&&e.setAttribute(r,"true"),o||e.setAttribute(l,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return y(t),d.clear(),s++,function(){f.forEach(function(e){var t=n.get(e)-1,o=c.get(e)-1;n.set(e,t),c.set(e,o),t||(i.has(e)||e.removeAttribute(l),i.delete(e)),o||e.removeAttribute(r)}),--s||(n=new WeakMap,n=new WeakMap,i=new WeakMap,o={})}},u=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n,i=Array.from(Array.isArray(e)?e:[e]),o=t||(n=e,"undefined"==typeof document?null:(Array.isArray(n)?n[0]:n).ownerDocument.body);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),l(i,o,r,"aria-hidden")):function(){return null}}},35197:e=>{"use strict";e.exports=function(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),o=i.charCodeAt(0);if(255!==t[o])throw TypeError(i+" is ambiguous");t[o]=n}var s=e.length,a=e.charAt(0),l=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function c(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var r=0,n=0,i=0;e[r]===a;)n++,r++;for(var o=(e.length-r)*l+1>>>0,u=new Uint8Array(o);e[r];){var c=e.charCodeAt(r);if(c>255)return;var f=t[c];if(255===f)return;for(var d=0,h=o-1;(0!==f||d<i)&&-1!==h;h--,d++)f+=s*u[h]>>>0,u[h]=f%256>>>0,f=f/256>>>0;if(0!==f)throw Error("Non-zero carry");i=d,r++}for(var p=o-i;p!==o&&0===u[p];)p++;for(var y=new Uint8Array(n+(o-p)),g=n;p!==o;)y[g++]=u[p++];return y}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"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var l=(o-i)*u+1>>>0,c=new Uint8Array(l);i!==o;){for(var f=t[i],d=0,h=l-1;(0!==f||d<n)&&-1!==h;h--,d++)f+=256*c[h]>>>0,c[h]=f%s>>>0,f=f/s>>>0;if(0!==f)throw Error("Non-zero carry");n=d,i++}for(var p=l-n;p!==l&&0===c[p];)p++;for(var y=a.repeat(r);p<l;++p)y+=e.charAt(c[p]);return y},decodeUnsafe:c,decode:function(e){var t=c(e);if(t)return t;throw Error("Non-base"+s+" character")}}}},48738:(e,t)=>{"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),s=o[0],a=o[1],u=new i((s+a)*3/4-a),c=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(function(e,t,n){for(var i,o=[],s=t;s<n;s+=3)o.push(r[(i=(e[s]<<16&0xff0000)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
8+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},46124:(e,t,r)=>{let n=r(35197);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},18627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.c32ToB58=t.b58ToC32=t.c32addressDecode=t.c32address=t.versions=void 0;let n=r(16770),i=r(58842),o=r(85758);t.versions={mainnet:{p2pkh:22,p2sh:20},testnet:{p2pkh:26,p2sh:21}};let s={};s[0]=t.versions.mainnet.p2pkh,s[5]=t.versions.mainnet.p2sh,s[111]=t.versions.testnet.p2pkh,s[196]=t.versions.testnet.p2sh;let a={};function l(e,t){if(!t.match(/^[0-9a-fA-F]{40}$/))throw Error("Invalid argument: not a hash160 hex string");let r=(0,n.c32checkEncode)(e,t);return`S${r}`}function u(e){if(e.length<=5)throw Error("Invalid c32 address: invalid length");if("S"!=e[0])throw Error('Invalid c32 address: must start with "S"');return(0,n.c32checkDecode)(e.slice(1))}a[t.versions.mainnet.p2pkh]=0,a[t.versions.mainnet.p2sh]=5,a[t.versions.testnet.p2pkh]=111,a[t.versions.testnet.p2sh]=196,t.c32address=l,t.c32addressDecode=u,t.b58ToC32=function(e,t=-1){let r;let n=i.decode(e),a=(0,o.bytesToHex)(n.data),u=parseInt((0,o.bytesToHex)(n.prefix),16);return t<0?(r=u,void 0!==s[u]&&(r=s[u])):r=t,l(r,a)},t.c32ToB58=function(e,t=-1){let r;let n=u(e),o=n[0],s=n[1];t<0?(r=o,void 0!==a[o]&&(r=a[o])):r=t;let l=r.toString(16);return 1===l.length&&(l=`0${l}`),i.encode(s,l)}},58842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;let n=r(44212),i=r(85758),o=r(35197),s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";t.encode=function(e,t="00"){let r="string"==typeof e?(0,i.hexToBytes)(e):e,a="string"==typeof t?(0,i.hexToBytes)(t):e;if(!(r instanceof Uint8Array)||!(a instanceof Uint8Array))throw TypeError("Argument must be of type Uint8Array or string");let l=(0,n.sha256)((0,n.sha256)(new Uint8Array([...a,...r])));return o(s).encode([...a,...r,...l.slice(0,4)])},t.decode=function(e){let t=o(s).decode(e),r=t.slice(0,1),i=t.slice(1,-4),a=(0,n.sha256)((0,n.sha256)(new Uint8Array([...r,...i])));return t.slice(-4).forEach((e,t)=>{if(e!==a[t])throw Error("Invalid checksum")}),{prefix:r,data:i}}},16770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.c32checkDecode=t.c32checkEncode=void 0;let n=r(44212),i=r(85758),o=r(84530);function s(e){let t=(0,n.sha256)((0,n.sha256)((0,i.hexToBytes)(e)));return(0,i.bytesToHex)(t.slice(0,4))}t.c32checkEncode=function(e,t){if(e<0||e>=32)throw Error("Invalid version (must be between 0 and 31)");if(!t.match(/^[0-9a-fA-F]*$/))throw Error("Invalid data (not a hex string)");(t=t.toLowerCase()).length%2!=0&&(t=`0${t}`);let r=e.toString(16);1===r.length&&(r=`0${r}`);let n=s(`${r}${t}`),i=(0,o.c32encode)(`${t}${n}`);return`${o.c32[e]}${i}`},t.c32checkDecode=function(e){e=(0,o.c32normalize)(e);let t=(0,o.c32decode)(e.slice(1)),r=e[0],n=o.c32.indexOf(r),i=t.slice(-8),a=n.toString(16);if(1===a.length&&(a=`0${a}`),s(`${a}${t.substring(0,t.length-8)}
8`)!==i)throw Error("Invalid c32check string: checksum mismatch");return[n,t.substring(0,t.length-8)]}},84530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.c32decode=t.c32normalize=t.c32encode=t.c32=void 0;let n=r(85758);t.c32="0123456789ABCDEFGHJKMNPQRSTVWXYZ";let i="0123456789abcdef";function o(e){return e.toUpperCase().replace(/O/g,"0").replace(/L|I/g,"1")}t.c32encode=function(e,r){if(!e.match(/^[0-9a-fA-F]*$/))throw Error("Not a hex-encoded string");e.length%2!=0&&(e=`0${e}`),e=e.toLowerCase();let o=[],s=0;for(let r=e.length-1;r>=0;r--)if(s<4){let n=i.indexOf(e[r])>>s,a=0;0!==r&&(a=i.indexOf(e[r-1]));let l=1+s,u=a%(1<<l)<<5-l,c=t.c32[n+u];s=l,o.unshift(c)}else s=0;let a=0;for(let e=0;e<o.length&&"0"===o[e];e++)a++;o=o.slice(a);let l=new TextDecoder().decode((0,n.hexToBytes)(e)).match(/^\u0000*/),u=l?l[0].length:0;for(let e=0;e<u;e++)o.unshift(t.c32[0]);if(r){let e=r-o.length;for(let r=0;r<e;r++)o.unshift(t.c32[0])}return o.join("")},t.c32normalize=o,t.c32decode=function(e,r){if(!(e=o(e)).match(`^[${t.c32}]*$`))throw Error("Not a c32-encoded string");let n=e.match(`^${t.c32[0]}*`),s=n?n[0].length:0,a=[],l=0,u=0;for(let r=e.length-1;r>=0;r--){4===u&&(a.unshift(i[l]),u=0,l=0);let n=(t.c32.indexOf(e[r])<<u)+l,o=i[n%16];if(u+=1,(l=n>>4)>1<<u)throw Error("Panic error in decoding.");a.unshift(o)}a.unshift(i[l]),a.length%2==1&&a.unshift("0");let c=0;for(let e=0;e<a.length&&"0"===a[e];e++)c++;let f=(a=a.slice(c-c%2)).join("");for(let e=0;e<s;e++)f=`00${f}`;if(r){let e=2*r-f.length;for(let t=0;t<e;t+=2)f=`00${f}`}return f}},27457:(e,t,r)=>{"use strict";t.yI=t.H4=void 0,r(84530),r(16770);let n=r(18627);Object.defineProperty(t,"H4",{enumerable:!0,get:function(){return n.c32address}}),Object.defineProperty(t,"yI",{enumerable:!0,get:function(){return n.c32addressDecode}})},30551:function(e,t,r){var n;n="undefined"!=typeof self?self:this,function(e){var t="undefined"!=typeof globalThis&&globalThis||void 0!==n&&n||void 0!==r.g&&r.g||{},i={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function d(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function h(e){var t=new FileReader,r=d(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e){if("string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e)}}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(i.blob)return this.blob().then(h);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,o=f(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,r=d(t=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},i.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=a(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},c.prototype.delete=function(e){delete this.map[a(e)]},c.prototype.get=function(e){return e=a(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},c.prototype.set=function(e,t){this.map[a(e)]=l(t)},c.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),u(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),u(e)},i.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var g=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function m(e,r){if(!(this instanceof m))throw TypeError('Please use the "new" operator, this DOM object c
8onstructor cannot be called as a function.');var n,i,o=(r=r||{}).body;if(e instanceof m){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,r.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=r.credentials||this.credentials||"same-origin",(r.headers||!this.headers)&&(this.headers=new c(r.headers)),this.method=(i=(n=r.method||this.method||"GET").toUpperCase(),g.indexOf(i)>-1?i:n),this.mode=r.mode||this.mode||null,this.signal=r.signal||this.signal||function(){if("AbortController"in t)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),("GET"===this.method||"HEAD"===this.method)&&("no-store"===r.cache||"no-cache"===r.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function w(e,t){if(!(this instanceof w))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];w.redirect=function(e,t){if(-1===v.indexOf(t))throw RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function E(r,n){return new Promise(function(o,s){var u=new m(r,n);if(u.signal&&u.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var f=new XMLHttpRequest;function d(){f.abort()}if(f.onload=function(){var e,t,r={statusText:f.statusText,headers:(e=f.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===u.url.indexOf("file://")&&(f.status<200||f.status>599)?r.status=200:r.status=f.status,r.url="responseURL"in f?f.responseURL:r.headers.get("X-Request-URL");var n="response"in f?f.response:f.responseText;setTimeout(function(){o(new w(n,r))},0)},f.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},f.ontimeout=function(){setTimeout(function(){s(TypeError("Network request timed out"))},0)},f.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},f.open(u.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?f.withCredentials=!0:"omit"===u.credentials&&(f.withCredentials=!1),"responseType"in f&&(i.blob?f.responseType="blob":i.arrayBuffer&&(f.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof c||t.Headers&&n.headers instanceof t.Headers)){var h=[];
8Object.getOwnPropertyNames(n.headers).forEach(function(e){h.push(a(e)),f.setRequestHeader(e,l(n.headers[e]))}),u.headers.forEach(function(e,t){-1===h.indexOf(t)&&f.setRequestHeader(t,e)})}else u.headers.forEach(function(e,t){f.setRequestHeader(t,e)});u.signal&&(u.signal.addEventListener("abort",d),f.onreadystatechange=function(){4===f.readyState&&u.signal.removeEventListener("abort",d)}),f.send(void 0===u._bodyInit?null:u._bodyInit)})}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=c,t.Request=m,t.Response=w),e.Headers=c,e.Request=m,e.Response=w,e.fetch=E,Object.defineProperty(e,"__esModule",{value:!0})}({})},44735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=t.unescape=t.escape=t.pad=void 0;let n=r(48738);function i(e){return`${e}${"=".repeat(4-(e.length%4||4))}`}function o(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function s(e){return i(e).replace(/-/g,"+").replace(/_/g,"/")}t.pad=i,t.escape=o,t.unescape=s,t.encode=function(e){return o((0,n.fromByteArray)(new TextEncoder().encode(e)))},t.decode=function(e){return new TextDecoder().decode((0,n.toByteArray)(i(s(e))))}},66073:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cryptoClients=t.SECP256K1Client=void 0;let n=r(27703);Object.defineProperty(t,"SECP256K1Client",{enumerable:!0,get:function(){return n.SECP256K1Client}});let i={ES256K:n.SECP256K1Client};t.cryptoClients=i},27703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECP256K1Client=void 0;let n=r(90950),i=r(44212),o=r(59459),s=r(25569),a=r(97702),l=r(85758);o.utils.hmacSha256Sync=(e,...t)=>{let r=n.hmac.create(i.sha256,e);return t.forEach(e=>r.update(e)),r.digest()};class u{static derivePublicKey(e,t=!0){return 66===e.length&&(e=e.slice(0,64)),e.length<64&&(e=e.padStart(64,"0")),(0,l.bytesToHex)(o.getPublicKey(e,t))}static signHash(e,t,r="jose"){if(!e||!t)throw new a.MissingParametersError("a signing input hash and private key are all required");let n=o.signSync(e,t.slice(0,64),{der:!0,canonical:!1});if("der"===r)return(0,l.bytesToHex)(n);if("jose"===r)return(0,s.derToJose)(n,"ES256");throw Error("Invalid signature format")}static loadSignature(e){return(0,s.joseToDer)(e,"ES256")}static verifyHash(e,t,r){if(!e||!t||!r)throw new a.MissingParametersError("a signing input hash, der signature, and public key are all required");return o.verify(t,e,r,{strict:!1})}}t.SECP256K1Client=u,u.algorithmName="ES256K"},48803:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.hashSha256Async=t.hashSha256=void 0;let i=r(44212);function o(e){return(0,i.sha256)(e)}t.hashSha256=o,t.hashSha256Async=function(e){return n(this,void 0,void 0,function*(){try{if("undefined"!=typeof crypto&&void 0!==crypto.subtle){let t="string"==typeof e?new TextEncoder().encode(e):e,r=yield crypto.subtle.digest("SHA-256",t);return new Uint8Array(r)}{let t=r(18971);if(!t.createHash)throw Error("`crypto` module does not contain `createHash`");return Promise.resolve(t.createHash("sha256").update(e).digest())}}catch(t){return console.log(t),console.log('Crypto lib not found. Neither the global `crypto.subtle` Web Crypto API, nor the or the Node.js `require("crypto").createHash` module is available. Falling back to JS implementation.'),Promise.resolve(o(e))}})}},2516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeToken=void 0;let n=r(44735);t.decodeToken=function(e){if("string"==typeof e){let t=e.split(".");return{header:JSON.parse(n.decode(t[0])),payload:JSON.parse(n.decode(t[1])),signature:t[2]}}if("object"==typeof e){if("string"!=typeof e.payload)throw Error("Expected token payload to be a base64 or json string");let t=e.payload;"{"!==e.payload[0]&&(t=n.decode(t));let r=[];return e.header.map(e=>{let t=JSON.parse(n.decode(e));r.push(t)}),{header:r,payload:JSON.parse(t),signature:e.signature}}}},25569:(e,t,r)=>{"use strict";
8Object.defineProperty(t,"__esModule",{value:!0}),t.joseToDer=t.derToJose=void 0;let n=r(48738),i=r(44735);function o(e){return(e/8|0)+(e%8==0?0:1)}let s={ES256:o(256),ES384:o(384),ES512:o(521)};function a(e){let t=s[e];if(t)return t;throw Error(`Unknown algorithm "${e}"`)}function l(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,n.toByteArray)((0,i.pad)(e));throw TypeError("ECDSA signature must be a Base64 string or a Uint8Array")}function u(e,t,r){let n=0;for(;t+n<r&&0===e[t+n];)++n;return e[t+n]>=128&&--n,n}t.derToJose=function(e,t){let r=l(e),o=a(t),s=o+1,u=r.length,c=0;if(48!==r[c++])throw Error('Could not find expected "seq"');let f=r[c++];if(129===f&&(f=r[c++]),u-c<f)throw Error(`"seq" specified length of "${f}", only "${u-c}" remaining`);if(2!==r[c++])throw Error('Could not find expected "int" for "r"');let d=r[c++];if(u-c-2<d)throw Error(`"r" specified length of "${d}", only "${u-c-2}" available`);if(s<d)throw Error(`"r" specified length of "${d}", max of "${s}" is acceptable`);let h=c;if(c+=d,2!==r[c++])throw Error('Could not find expected "int" for "s"');let p=r[c++];if(u-c!==p)throw Error(`"s" specified length of "${p}", expected "${u-c}"`);if(s<p)throw Error(`"s" specified length of "${p}", max of "${s}" is acceptable`);let y=c;if((c+=p)!==u)throw Error(`Expected to consume entire array, but "${u-c}" bytes remain`);let g=o-d,m=o-p,b=new Uint8Array(g+d+m+p);for(c=0;c<g;++c)b[c]=0;b.set(r.subarray(h+Math.max(-g,0),h+d),c),c=o;for(let e=c;c<e+m;++c)b[c]=0;return b.set(r.subarray(y+Math.max(-m,0),y+p),c),(0,i.escape)((0,n.fromByteArray)(b))},t.joseToDer=function(e,t){e=l(e);let r=a(t),n=e.length;if(n!==2*r)throw TypeError(`"${t}" signatures must be "${2*r}" bytes, saw "${n}"`);let i=u(e,0,r),o=u(e,r,e.length),s=r-i,c=r-o,f=2+s+1+1+c,d=f<128,h=new Uint8Array((d?2:3)+f),p=0;return h[p++]=48,d?h[p++]=f:(h[p++]=129,h[p++]=255&f),h[p++]=2,h[p++]=s,i<0?(h[p++]=0,h.set(e.subarray(0,r),p),p+=r):(h.set(e.subarray(i,r),p),p+=r-i),h[p++]=2,h[p++]=c,o<0?(h[p++]=0,h.set(e.subarray(r),p)):h.set(e.subarray(r+o),p),h}},97702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTokenError=t.MissingParametersError=void 0;class r extends Error{constructor(e){super(),this.name="MissingParametersError",this.message=e||""}}t.MissingParametersError=r;class n extends Error{constructor(e){super(),this.name="InvalidTokenError",this.message=e||""}}t.InvalidTokenError=n},3877:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(97471),t),i(r(53279),t),i(r(2516),t),i(r(97702),t),i(r(66073),t)},97471:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenSigner=t.createUnsecuredToken=void 0;let i=r(44735),o=r(66073),s=r(97702),a=r(48803);function l(e,t){let r=[];return r.push(i.encode(JSON.stringify(t))),r.push(i.encode(JSON.stringify(e))),r.join(".")}t.createUnsecuredToken=function(e){return l(e,{typ:"JWT",alg:"none"})+"."};class u{constructor(e,t){if(!(e&&t))throw new s.MissingParametersError("a signing algorithm and private key are required");if("string"!=typeof e)throw Error("signing algorithm parameter must be a string");if(e=e.toUpperCase(),!o.cryptoClients.hasOwnProperty(e))throw Error("invalid signing algorithm");this.tokenType="JWT",this.cryptoClient=o.cryptoClients[e],this.rawPrivateKey=t}header(e={}){return Object.assign({},{typ:this.tokenType,alg:this.cryptoClient.algorithmName},e)}sign(e,t=!1,r={}){let n=this.header(r),i=l(e,n),o=(0,a.hashSha256)(i);return this.createWithSignedHash(e,t,n,i,o)}signAsync(e,t=!1,r={}){return n(this,void 0,void 0,function*(){let n=this.header(r),i=l(e,n),o=yield(0,a.hashSha256Async)(i);return this.createWithSignedHash(e,t,n,i,o)})}createWithSignedHash(e,t,r,n,o){let s=this.cryptoClient.signHash(o,this.rawPrivateKey);return t?{header:[i.encode(JSON.stringify(r))],payload:JSON.stringify(e),signature:[s]}:[n,s].join(".")}}t.TokenSigner=u},53279:(e,t,r)=>{"use strict";
8Object.defineProperty(t,"__esModule",{value:!0}),t.TokenVerifier=void 0;let n=r(44735),i=r(66073),o=r(97702),s=r(48803);class a{constructor(e,t){if(!(e&&t))throw new o.MissingParametersError("a signing algorithm and public key are required");if("string"!=typeof e)throw"signing algorithm parameter must be a string";if(e=e.toUpperCase(),!i.cryptoClients.hasOwnProperty(e))throw"invalid signing algorithm";this.tokenType="JWT",this.cryptoClient=i.cryptoClients[e],this.rawPublicKey=t}verify(e){return"string"==typeof e?this.verifyCompact(e,!1):"object"==typeof e&&this.verifyExpanded(e,!1)}verifyAsync(e){return"string"==typeof e?this.verifyCompact(e,!0):"object"==typeof e?this.verifyExpanded(e,!0):Promise.resolve(!1)}verifyCompact(e,t){let r=e.split("."),n=r[0]+"."+r[1],i=e=>{let t=this.cryptoClient.loadSignature(r[2]);return this.cryptoClient.verifyHash(e,t,this.rawPublicKey)};return t?(0,s.hashSha256Async)(n).then(e=>i(e)):i((0,s.hashSha256)(n))}verifyExpanded(e,t){let r=[e.header.join("."),n.encode(e.payload)].join("."),i=!0,o=t=>(e.signature.map(e=>{let r=this.cryptoClient.loadSignature(e);this.cryptoClient.verifyHash(t,r,this.rawPublicKey)||(i=!1)}),i);return t?(0,s.hashSha256Async)(r).then(e=>o(e)):o((0,s.hashSha256)(r))}}t.TokenVerifier=a},4702:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i="[object Arguments]",o="[object Boolean]",s="[object Date]",a="[object Function]",l="[object GeneratorFunction]",u="[object Map]",c="[object Number]",f="[object Object]",d="[object Promise]",h="[object RegExp]",p="[object Set]",y="[object String]",g="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",v="[object Float32Array]",E="[object Float64Array]",x="[object Int8Array]",S="[object Int16Array]",A="[object Int32Array]",T="[object Uint8Array]",M="[object Uint8ClampedArray]",I="[object Uint16Array]",C="[object Uint32Array]",R=/\w*$/,N=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,D={};D[i]=D["[object Array]"]=D[b]=D[w]=D[o]=D[s]=D[v]=D[E]=D[x]=D[S]=D[A]=D[u]=D[c]=D[f]=D[h]=D[p]=D[y]=D[g]=D[T]=D[M]=D[I]=D[C]=!0,D["[object Error]"]=D[a]=D[m]=!1;var L="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,P="object"==typeof self&&self&&self.Object===Object&&self,j=L||P||Function("return this")(),U=t&&!t.nodeType&&t,_=U&&e&&!e.nodeType&&e,k=_&&_.exports===U;function $(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function H(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function F(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function K(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function z(e,t){return function(r){return e(t(r))}}function W(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var G=Array.prototype,V=Function.prototype,q=Object.prototype,Q=j["__core-js_shared__"],Y=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Z=V.toString,X=q.hasOwnProperty,J=q.toString,ee=RegExp("^"+Z.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=k?j.Buffer:void 0,er=j.Symbol,en=j.Uint8Array,ei=z(Object.getPrototypeOf,Object),eo=Object.create,es=q.propertyIsEnumerable,ea=G.splice,el=Object.getOwnPropertySymbols,eu=et?et.isBuffer:void 0,ec=z(Object.keys,Object),ef=eL(j,"DataView"),ed=eL(j,"Map"),eh=eL(j,"Promise"),ep=eL(j,"Set"),ey=eL(j,"WeakMap"),eg=eL(Object,"create"),em=e_(ef),eb=e_(ed),ew=e_(eh),ev=e_(ep),eE=e_(ey),ex=er?er.prototype:void 0,eS=ex?ex.valueOf:void 0;function eA(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eT(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eM(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eI(e){this.__data__=new eT(e)}function eC(e,t,r){var n=e[t];X.call(e,t)&&ek(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function eR(e,t){for(var r=e.length;r--;)if(ek(e[r][0],t))return r;return -1}function eN(e){var t=new e.constructor(e.byteLength);return new en(t).set(new en(e)),t}function eO(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n?n(r[s],e[s],s,r,e):void 0;eC(r,s,void 0===a?e[s]:a)}return r}function eD(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function eL(e,t){var r=null==e?void 0:e[t];return!(!eK(r)||Y&&Y in r)&&(eF(r)||F(r)?ee:N).test(e_(r))?r:void 0}eA.prototype.clear=function(){this.__data__=eg?eg(null):{}},eA.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},eA.prototype.get=function(e){var t=this.__data__;if(eg){var r=t[e];return r===n?void 0:r}return X.call(t,e)?t[e]:void 0},eA.prototype.has=function(e){var t=this.__data__;return eg?void 0!==t[e]:X.call(t,e)},eA.prototype.set=function(e,t){return this.__data__[e]=eg&&void 0===t?n:t,this},eT.prototype.clear=function(){this.__data__=[]},eT.prototype.delete=function(e){var t=this.__data__,r=eR(t,e);return!(r<0)&&(r==t.length-1?t.pop():ea.call(t,r,1),!0)},eT.prototype.get=function(e){var t=this.__data__,r=eR(t,e);return r<0?void 0:t[r][1]},eT.prototype.has=function(e){return eR(this.__data__,e)>-1},eT.prototype.set=function(e,t){var r=this.__data__,n=eR(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},eM.prototype.clear=function(){this.__data__={hash:new eA,map:new(ed||eT),string:new eA}},eM.prototype.delete=function(e){return eD(this,e).delete(e)},eM.prototype.get=function(e){return eD(this,e).get(e)},eM.prototype.has=function(e){return eD(this,e).has(e)},eM.prototype.set=function(e,t){return eD(this,e).set(e,t),this},eI.prototype.clear=function(){this.__data__=new eT},eI.prototype.delete=function(e){return this.__data__.delete(e)},eI.prototype.get=function(e){return this.__data__.get(e)},eI.prototype.has=function(e){return this.__data__.has(e)},eI.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eT){var n=r.__data__;if(!ed||n.length<199)return n.push([e,t]),this;r=this.__data__=new eM(n)}return r.set(e,t),this};var eP=el?z(el,Object):function(){return[]},ej=function(e){return J.call(e)};function eU(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||q)}function e_(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ek(e,t){return e===t||e!=e&&t!=t}
8(ef&&ej(new ef(new ArrayBuffer(1)))!=w||ed&&ej(new ed)!=u||eh&&ej(eh.resolve())!=d||ep&&ej(new ep)!=p||ey&&ej(new ey)!=m)&&(ej=function(e){var t=J.call(e),r=t==f?e.constructor:void 0,n=r?e_(r):void 0;if(n)switch(n){case em:return w;case eb:return u;case ew:return d;case ev:return p;case eE:return m}return t});var e$=Array.isArray;function eB(e){var t;return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=0x1fffffffffffff&&!eF(e)}var eH=eu||function(){return!1};function eF(e){var t=eK(e)?J.call(e):"";return t==a||t==l}function eK(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ez(e){return eB(e)?function(e,t){var r,n=e$(e)||e&&"object"==typeof e&&eB(e)&&X.call(e,"callee")&&(!es.call(e,"callee")||J.call(e)==i)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],o=n.length,s=!!o;for(var a in e)X.call(e,a)&&!(s&&("length"==a||(r=null==(r=o)?0x1fffffffffffff:r)&&("number"==typeof a||O.test(a))&&a>-1&&a%1==0&&a<r))&&n.push(a);return n}(e):function(e){if(!eU(e))return ec(e);var t=[];for(var r in Object(e))X.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return function e(t,r,n,d,m,N,O){if(d&&(L=N?d(t,m,N,O):d(t)),void 0!==L)return L;if(!eK(t))return t;var L,P=e$(t);if(P){if(j=t.length,U=t.constructor(j),j&&"string"==typeof t[0]&&X.call(t,"index")&&(U.index=t.index,U.input=t.input),L=U,!r)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(t,L)}else{var j,U,_,k,z,G,V=ej(t),q=V==a||V==l;if(eH(t))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(t,r);if(V==f||V==i||q&&!N){if(F(t))return N?t:{};if(L="function"!=typeof(_=q?{}:t).constructor||eU(_)?{}:eK(k=ei(_))?eo(k):{},!r)return z=(G=L)&&eO(t,ez(t),G),eO(t,eP(t),z)}else{if(!D[V])return N?t:{};L=function(e,t,r,n){var i,a,l,f=e.constructor;switch(t){case b:return eN(e);case o:case s:return new f(+e);case w:return i=n?eN(e.buffer):e.buffer,new e.constructor(i,e.byteOffset,e.byteLength);case v:case E:case x:case S:case A:case T:case M:case I:case C:return a=n?eN(e.buffer):e.buffer,new e.constructor(a,e.byteOffset,e.length);case u:return H(n?r(K(e),!0):K(e),$,new e.constructor);case c:case y:return new f(e);case h:return(l=new e.constructor(e.source,R.exec(e))).lastIndex=e.lastIndex,l;case p:return H(n?r(W(e),!0):W(e),B,new e.constructor);case g:return eS?Object(eS.call(e)):{}}}(t,V,e,r)}}O||(O=new eI);var Q=O.get(t);if(Q)return Q;if(O.set(t,L),!P){var Y,Z,J=n?(Z=ez(Y=t),e$(Y)?Z:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(Z,eP(Y))):ez(t)}return!function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(J||t,function(i,o){J&&(i=t[o=i]),eC(L,o,e(i,r,n,d,o,t,O))}),L}(e,!0,!0)}},22468:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(78030).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},28165:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(78030).Z)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},6884:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(78030).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},23787:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(78030).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},86162:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(78030).Z)("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]])},89896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(78030).Z)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},49418:(e,t,r)=>{"use strict";r.d(t,{Z:()=>G});var n,i,o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}Object.create,Object.create;var a=("function"==typeof SuppressedError&&SuppressedError,r(2265)),l="right-scroll-bar-position",u="width-before-scroll-bar";function c(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var f="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,d=new WeakMap;function h(e){return e}var p=function(e){void 0===e&&(e={});var t,r,n,i=(void 0===t&&(t=h),r=[],n=!1,{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var i=t(e,n);return r.push(i),function(){r=r.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var i=r;
8r=[],i.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},s=function(){return Promise.resolve().then(o)};s(),r={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),r}}}});return i.options=o({async:!0,ssr:!1},e),i}(),y=function(){},g=a.forwardRef(function(e,t){var r,n,i,l,u=a.useRef(null),h=a.useState({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:y}),g=h[0],m=h[1],b=e.forwardProps,w=e.children,v=e.className,E=e.removeScrollBar,x=e.enabled,S=e.shards,A=e.sideCar,T=e.noRelative,M=e.noIsolation,I=e.inert,C=e.allowPinchZoom,R=e.as,N=e.gapMode,O=s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=(r=[u,t],n=function(e){return r.forEach(function(t){return c(t,e)})},(i=(0,a.useState)(function(){return{value:null,callback:n,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=n,l=i.facade,f(function(){var e=d.get(l);if(e){var t=new Set(e),n=new Set(r),i=l.current;t.forEach(function(e){n.has(e)||c(e,null)}),n.forEach(function(e){t.has(e)||c(e,i)})}d.set(l,r)},[r]),l),L=o(o({},O),g);return a.createElement(a.Fragment,null,x&&a.createElement(A,{sideCar:p,removeScrollBar:E,shards:S,noRelative:T,noIsolation:M,inert:I,setCallbacks:m,allowPinchZoom:!!C,lockRef:u,gapMode:N}),b?a.cloneElement(a.Children.only(w),o(o({},L),{ref:D})):a.createElement(void 0===R?"div":R,o({},L,{className:v,ref:D}),w))});g.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},g.classNames={fullWidth:u,zeroRight:l};var m=function(e){var t=e.sideCar,r=s(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return a.createElement(n,o({},r))};m.isSideCarExport=!0;var b=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i||r.nc;return t&&e.setAttribute("nonce",t),e}())){var o,s;(o=t).styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n)),s=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(s)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},w=function(){var e=b();return function(t,r){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},v=function(){var e=w();return function(t){return e(t.styles,t.dynamic),null}},E={left:0,top:0,right:0,gap:0},x=function(e){return parseInt(e||"",10)||0},S=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[x(r),x(n),x(i)]},A=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return E;var t=S(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},T=v(),M="data-scroll-locked",I=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,a=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(a,"px ").concat(n,";\n }\n body[").concat(M,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(s,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(l," {\n right: ").concat(a,"px ").concat(n,";\n }\n \n .").concat(u," {\n margin-right: ").concat(a,"px ").concat(n,";\n }\n \n .").concat(l," .").concat(l," {\n right: 0 ").concat(n,";\n }\n \n .").concat(u," .").concat(u," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(M,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},C=function(){var e=parseInt(document.body.getAttribute(M)||"0",10);return isFinite(e)?e:0},R=function(){a.useEffect(function(){return document.body.setAttribute(M,(C()+1).toString()),function(){var e=C()-1;e<=0?document.body.removeAttribute(M):document.body.setAttribute(M,e.toString())}},[])},N=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n;R();var o=a.useMemo(function(){return A(i)},[i]);return a.createElement(T,{styles:I(o,!t,i,r?"":"!important")})},O=!1;if("undefined"!=typeof window)try{var D=Object.defineProperty({},"passive",{get:function(){return O=!0,!0}});window.addEventListener("test",D,D),window.removeEventListener("test",D,D)}catch(e){O=!1}var L=!!O&&{passive:!1},P=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===r[t])},j=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),U(e,n
8)){var i=_(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},U=function(e,t){return"v"===e?P(t,"overflowY"):P(t,"overflowX")},_=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},k=function(e,t,r,n,i){var o,s=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),a=s*n,l=r.target,u=t.contains(l),c=!1,f=a>0,d=0,h=0;do{var p=_(e,l),y=p[0],g=p[1]-p[2]-s*y;(y||g)&&U(e,l)&&(d+=g,h+=y),l=l.parentNode.host||l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return f&&(i&&1>Math.abs(d)||!i&&a>d)?c=!0:!f&&(i&&1>Math.abs(h)||!i&&-a>h)&&(c=!0),c},$=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},B=function(e){return[e.deltaX,e.deltaY]},H=function(e){return e&&"current"in e?e.current:e},F=0,K=[];let z=(n=function(e){var t=a.useRef([]),r=a.useRef([0,0]),n=a.useRef(),i=a.useState(F++)[0],o=a.useState(v)[0],s=a.useRef(e);a.useEffect(function(){s.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(H),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var i,o=$(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],c=e.target,f=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===f&&"range"===c.type)return!1;var d=j(f,c);if(!d)return!0;if(d?i=f:(i="v"===f?"h":"v",d=j(f,c)),!d)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var h=n.current||i;return k(h,t,e,"h"===h?l:u,!0)},[]),u=a.useCallback(function(e){if(K.length&&K[K.length-1]===o){var r="deltaY"in e?B(e):$(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta)[0]===r[0]&&n[1]===r[1]})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(s.current.shards||[]).map(H).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?l(e,i[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=a.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),f=a.useCallback(function(e){r.current=$(e),n.current=void 0},[]),d=a.useCallback(function(t){c(t.type,B(t),t.target,l(t,e.lockRef.current))},[]),h=a.useCallback(function(t){c(t.type,$(t),t.target,l(t,e.lockRef.current))},[]);a.useEffect(function(){return K.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",u,L),document.addEventListener("touchmove",u,L),document.addEventListener("touchstart",f,L),function(){K=K.filter(function(e){return e!==o}),document.removeEventListener("wheel",u,L),document.removeEventListener("touchmove",u,L),document.removeEventListener("touchstart",f,L)}},[]);var p=e.removeScrollBar,y=e.inert;return a.createElement(a.Fragment,null,y?a.createElement(o,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?a.createElement(N,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},p.useMedium(n),m);var W=a.forwardRef(function(e,t){return a.createElement(g,o({},e,{ref:t,sideCar:z}))});W.classNames=g.classNames;let G=W},65376:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`Wrong positive integer: ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}r.d(t,{ZP:()=>
8o});let o={number:n,bool:function(e){if("boolean"!=typeof e)throw Error(`Expected boolean, not ${e}`)},bytes:i,hash:function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)},exists:function(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")},output:function(e,t){i(e);let r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}}},97529:(e,t,r)=>{"use strict";r.d(t,{N:()=>o});var n=r(65376),i=r(96711);class o extends i.kb{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.GL)(this.buffer)}update(e){n.ZP.exists(this);let{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.O0)(e)).length;for(let n=0;n<s;){let a=Math.min(o-this.pos,s-n);if(a===o){let t=(0,i.GL)(e);for(;o<=s-n;n+=o)this.process(t,n);continue}r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){n.ZP.exists(this),n.ZP.output(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:o,isLE:s}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(0xffffffff),s=Number(r>>i&o),a=Number(r&o),l=n?4:0,u=n?0:4;e.setUint32(t+l,s,n),e.setUint32(t+u,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);let l=(0,i.GL)(e),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=u/4,f=this.get();if(c>f.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)l.setUint32(4*e,f[e],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}},93557:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var n=r(65376),i=r(96711);class o extends i.kb{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,n.ZP.hash(e);let r=(0,i.O0)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return n.ZP.exists(this),this.iHash.update(e),this}digestInto(e){n.ZP.exists(this),n.ZP.bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let s=(e,t,r)=>new o(e,t).update(r).digest();s.create=(e,t)=>new o(e,t)},67887:(e,t,r)=>{"use strict";r.d(t,{b:()=>w});var n=r(97529),i=r(96711);let o=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),s=Uint8Array.from({length:16},(e,t)=>t),a=s.map(e=>(9*e+5)%16),l=[s],u=[a];for(let e=0;e<4;e++)for(let t of[l,u])t.push(t[e].map(e=>o[e]));let c=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),f=l.map((e,t)=>e.map(e=>c[t][e])),d=u.map((e,t)=>e.map(e=>c[t][e])),h=new Uint32Array([0,0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xa953fd4e]),p=new Uint32Array([0x50a28be6,0x5c4dd124,0x6d703ef3,0x7a6d76e9,0]),y=(e,t)=>e<<t|e>>>32-t;function g(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}let m=new Uint32Array(16);class b extends n.N{constructor(){super(64,20,8,!0),this.h0=0x67452301,this.h1=-0x10325477,this.h2=-0x67452302,this.h3=0x10325476,this.h4=-0x3c2d1e10}get(){let{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|
8i}process(e,t){for(let r=0;r<16;r++,t+=4)m[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,s=0|this.h2,a=s,c=0|this.h3,b=c,w=0|this.h4,v=w;for(let e=0;e<5;e++){let t=4-e,E=h[e],x=p[e],S=l[e],A=u[e],T=f[e],M=d[e];for(let t=0;t<16;t++){let n=y(r+g(e,i,s,c)+m[S[t]]+E,T[t])+w|0;r=w,w=c,c=0|y(s,10),s=i,i=n}for(let e=0;e<16;e++){let r=y(n+g(t,o,a,b)+m[A[e]]+x,M[e])+v|0;n=v,v=b,b=0|y(a,10),a=o,o=r}}this.set(this.h1+s+b|0,this.h2+c+v|0,this.h3+w+n|0,this.h4+r+o|0,this.h0+i+a|0)}roundClean(){m.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}let w=(0,i.hE)(()=>new b)},65530:(e,t,r)=>{"use strict";r.d(t,{J:()=>d});var n=r(97529),i=r(96711);let o=(e,t,r)=>e&t^~e&r,s=(e,t,r)=>e&t^e&r^t&r,a=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),l=new Uint32Array([0x6a09e66
87,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),u=new Uint32Array(64);class c extends n.N{constructor(){super(64,32,8,!1),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3],this.E=0|l[4],this.F=0|l[5],this.G=0|l[6],this.H=0|l[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=u[e-15],r=u[e-2],n=(0,i.np)(t,7)^(0,i.np)(t,18)^t>>>3,o=(0,i.np)(r,17)^(0,i.np)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:l,D:c,E:f,F:d,G:h,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.np)(f,6)^(0,i.np)(f,11)^(0,i.np)(f,25))+o(f,d,h)+a[e]+u[e]|0,y=((0,i.np)(r,2)^(0,i.np)(r,13)^(0,i.np)(r,22))+s(r,n,l)|0;p=h,h=d,d=f,f=c+t|0,c=l,l=n,n=r,r=t+y|0}r=r+this.A|0,n=n+this.B|0,l=l+this.C|0,c=c+this.D|0,f=f+this.E|0,d=d+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,n,l,c,f,d,h,p)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends c{constructor(){super(),this.A=-0x3efa6128,this.B=0x367cd507,this.C=0x3070dd17,this.D=-0x8f1a6c7,this.E=-4191439,this.F=0x68581511,this.G=0x64f98fa7,this.H=-0x4105b05c,this.outputLen=28}}let d=(0,i.hE)(()=>new c);(0,i.hE)(()=>new f)},78967:(e,t,r)=>{"use strict";r.d(t,{o:()=>g,pr:()=>m});var n=r(97529);let i=BigInt(0x100000000-1),o=BigInt(32),s={split:function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let s=0;s<e.length;s++){let{h:a,l}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>o&i)}:{h:0|Number(e>>o&i),l:0|Number(e&i)}}(e[s],t);[r[s],n[s]]=[a,l]}return[r,n]},shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,add:function(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/0x100000000|0)|0,add5H:(e,t,r,n,i,o)=>t+r+n+i+o+(e/0x100000000|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)};var a=r(96711);let[l,u]=s.split(["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
85771202a","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))),c=new Uint32Array(80),f=new Uint32Array(80);class d extends n.N{constructor(){super(128,64,16,!1),this.Ah=0x6a09e667,this.Al=-0xc4336f8,this.Bh=-0x4498517b,this.Bl=-0x7b3558c5,this.Ch=0x3c6ef372,this.Cl=-0x16b07d5,this.Dh=-0x5ab00ac6,this.Dl=0x5f1d36f1,this.Eh=0x510e527f,this.El=-0x52197d2f,this.Fh=-0x64fa9774,this.Fl=0x2b3e6c1f,this.Gh=0x1f83d9ab,this.Gl=-0x4be4295,this.Hh=0x5be0cd19,this.Hl=0x137e2179}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:l,El:u,Fh:c,Fl:f,Gh:d,Gl:h,Hh:p,Hl:y}=this;return[e,t,r,n,i,o,s,a,l,u,c,f,d,h,p,y]}set(e,t,r,n,i,o,s,a,l,u,c,f,d,h,p,y){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|l,this.El=0|u,this.Fh=0|c,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|y}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t),f[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|c[e-15],r=0|f[e-15],n=s.rotrSH(t,r,1)^s.rotrSH(t,r,8)^s.shrSH(t,r,7),i=s.rotrSL(t,r,1)^s.rotrSL(t,r,8)^s.shrSL(t,r,7),o=0|c[e-2],a=0|f[e-2],l=s.rotrSH(o,a,19)^s.rotrBH(o,a,61)^s.shrSH(o,a,6),u=s.rotrSL(o,a,19)^s.rotrBL(o,a,61)^s.shrSL(o,a,6),d=s.add4L(i,u,f[e-7],f[e-16]),h=s.add4H(d,n,l,c[e-7],c[e-16]);c[e]=0|h,f[e]=0|d}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:a,Cl:d,Dh:h,Dl:p,Eh:y,El:g,Fh:m,Fl:b,Gh:w,Gl:v,Hh:E,Hl:x}=this;for(let e=0;e<80;e++){let t=s.rotrSH(y,g,14)^s.rotrSH(y,g,18)^s.rotrBH(y,g,41),S=s.rotrSL(y,g,14)^s.rotrSL(y,g,18)^s.rotrBL(y,g,41),A=y&m^~y&w,T=g&b^~g&v,M=s.add5L(x,S,T,u[e],f[e]),I=s.add5H(M,E,t,A,l[e],c[e]),C=0|M,R=s.rotrSH(r,n,28)^s.rotrBH(r,n,34)^s.rotrBH(r,n,39),N=s.rotrSL(r,n,28)^s.rotrBL(r,n,34)^s.rotrBL(r,n,39),O=r&i^r&a^i&a,D=n&o^n&d^o&d;E=0|w,x=0|v,w=0|m,v=0|b,m=0|y,b=0|g,({h:y,l:g}=s.add(0|h,0|p,0|I,0|C)),h=0|a,p=0|d,a=0|i,d=0|o,i=0|r,o=0|n;let L=s.add3L(C,N,D);r=s.add3H(L,I,R,O),n=0|L}({h:r,l:n}=s.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=s.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:a,l:d}=s.add(0|this.Ch,0|this.Cl,0|a,0|d)),({h:h,l:p}=s.add(0|this.Dh,0|this.Dl,0|h,0|p)),({h:y,l:g}=s.add(0|this.Eh,0|this.El,0|y,0|g)),({h:m,l:b}=s.add(0|this.Fh,0|this.Fl,0|m,0|b)),({h:w,l:v}=s.add(0|this.Gh,0|this.Gl,0|w,0|v)),({h:E,l:x}=s.add(0|this.Hh,0|this.Hl,0|E,0|x)),this.set(r,n,i,o,a,d,h,p,y,g,m,b,w,v,E,x)}roundClean(){c.fill(0),f.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class h extends d{constructor(){super(),this.Ah=-0x73c2c838,this.Al=0x19544da2,this.Bh=0x73e19966,this.Bl=-0x76232b2a,this.Ch=0x1dfab7ae,this.Cl=0x32ff9c82,this.Dh=0x679dd514,this.Dl=0x582f9fcf,this.Eh=0xf6d2b69,this.El=0x7bd44da8,this.Fh=0x77e36f73,this.Fl=0x4c48942,this.Gh=0x3f9d85a8,this.Gl=0x6a1d36c8,this.Hh=0x1112e6ad,this.Hl=-0x6e296d5f,this.outputLen=28}}class p extends d{constructor(){super(),this.Ah=0x22312194,this.Al=-0x3d408d4,this.Bh=-0x60aaa05d,this.Bl=-0x37b39b3e,this.Ch=0x2393b86b,this.Cl=0x6f53b151,this.Dh=-0x69c788e7,this.Dl=0x5940eabd,this.Eh=-0x69d7c11e,this.El=-0x5771001d,this.Fh=-0x41a1e1db,this.Fl=0x53863992,this.Gh=0x2b0199fc,this.Gl=0x2c85b8aa,this.Hh=0xeb72ddc,this.Hl=-0x7e3ad35e,this.outputLen=32}}class y extends d{constructor(){super(),this.Ah=-0x344462a3,this.Al=-0x3efa6128,this.Bh=0x629a292a,this.Bl=0x367cd507,this.Ch=-0x6ea6fea6,this.Cl=0x3070dd17,this.Dh=0x152fecd8,this.Dl=-0x8f1a6c7,this.Eh=0x67332667,this.El=-4191439,this.Fh=-0x714bb579,this.Fl=0x68581511,this.Gh=-0x24f3d1f3,this.Gl=0x64f98fa7,this.Hh=0x47b5481d,this.Hl=-0x4105b05c,this.outputLen=48}}let g=(0,a.hE)(()=>new d);(0,a.hE)(()=>new h);let m=(0,a.hE)(()=>new p);(0,a.hE)(()=>new y)},96711:(e,t,r)=>{"use strict";r.d(t,{kb:()=>s,GL:()=>n,np:()=>i,O0:()=>o,hE:()=>a}),"object"==typeof self&&"crypto"in self&&self.crypto;let n=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),i=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([0x11223344]).buffer)[0])throw Error("Non little-endian hardware is not supported");function o(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}(e)),!(e instanceof Uint8Array))throw TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));class s{clone(){return this._cloneInto()}}function a(e){let t=t=>e().update(o(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}},91316:(e,t,r)=>{"use strict";let n,i;r.d(t,{$3:()=>V,E9:()=>x,P6:()=>er,Pc:()=>T,ZV:()=>Q,kS:()=>Z});var o,s=r(95856);let a=BigInt(0),l=BigInt(1),u=BigInt(2),c=BigInt(3),f=BigInt(8),d=Object.freeze({a:a,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),h=(e,t)=>(e+t/u)/t,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(e){let{n:t}=d,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-l*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=BigInt("0x100000000000000000000000000000000"),s=h(r*e,t),a=h(-n*e,t),u=k(e-s*r-a*i,t),c=k(-s*n-a*r,t),f=u>o,p=c>o;if(f&&(u=t-u),p&&(c=t-c),u>o||c>o)throw Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:p,k2:c}}};function y(e){let{a:t,b:r}=d,n=k(e*e),i=k(n*e);return k(i+t*e+r)}let g=d.a===a;
8class m extends Error{constructor(e){super(e)}}function b(e){if(!(e instanceof w))throw TypeError("JacobianPoint expected")}class w{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromAffine(e){if(!(e instanceof x))throw TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(x.ZERO)?w.ZERO:new w(e.x,e.y,l)}static toAffineBatch(e){let t=function(e,t=d.P){let r=Array(e.length),n=B(e.reduce((e,n,i)=>n===a?e:(r[i]=e,k(e*n,t)),l),t);return e.reduceRight((e,n,i)=>n===a?e:(r[i]=k(e*r[i],t),k(e*n,t)),n),r}(e.map(e=>e.z));return e.map((e,r)=>e.toAffine(t[r]))}static normalizeZ(e){return w.toAffineBatch(e).map(w.fromAffine)}equals(e){b(e);let{x:t,y:r,z:n}=this,{x:i,y:o,z:s}=e,a=k(n*n),l=k(s*s),u=k(t*l),c=k(i*a),f=k(k(r*s)*l),d=k(k(o*n)*a);return u===c&&f===d}negate(){return new w(this.x,k(-this.y),this.z)}double(){let{x:e,y:t,z:r}=this,n=k(e*e),i=k(t*t),o=k(i*i),s=e+i,a=k(u*(k(s*s)-n-o)),l=k(c*n),d=k(l*l),h=k(d-u*a),p=k(l*(a-h)-f*o);return new w(h,p,k(u*t*r))}add(e){b(e);let{x:t,y:r,z:n}=this,{x:i,y:o,z:s}=e;if(i===a||o===a)return this;if(t===a||r===a)return e;let l=k(n*n),c=k(s*s),f=k(t*c),d=k(i*l),h=k(k(r*s)*c),p=k(k(o*n)*l),y=k(d-f),g=k(p-h);if(y===a)return g===a?this.double():w.ZERO;let m=k(y*y),v=k(y*m),E=k(f*m),x=k(g*g-v-u*E),S=k(g*(E-x)-h*v);return new w(x,S,k(n*s*y))}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){let t=w.ZERO;if("bigint"==typeof e&&e===a)return t;let r=_(e);if(r===l)return this;if(!g){let e=t,n=this;for(;r>a;)r&l&&(e=e.add(n)),n=n.double(),r>>=l;return e}let{k1neg:n,k1:i,k2neg:o,k2:s}=p.splitScalar(r),u=t,c=t,f=this;for(;i>a||s>a;)i&l&&(u=u.add(f)),s&l&&(c=c.add(f)),f=f.double(),i>>=l,s>>=l;return n&&(u=u.negate()),o&&(c=c.negate()),c=new w(k(c.x*p.beta),c.y,c.z),u.add(c)}precomputeWindow(e){let t=g?128/e+1:256/e+1,r=[],n=this,i=n;for(let o=0;o<t;o++){i=n,r.push(i);for(let t=1;t<2**(e-1);t++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(e,t){!t&&this.equals(w.BASE)&&(t=x.BASE);let r=t&&t._WINDOW_SIZE||1;if(256%r)throw Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=t&&E.get(t);!n&&(n=this.precomputeWindow(r),t&&1!==r&&(n=w.normalizeZ(n),E.set(t,n)));let i=w.ZERO,o=w.BASE,s=1+(g?128/r:256/r),a=2**(r-1),u=BigInt(2**r-1),c=2**r,f=BigInt(r);for(let t=0;t<s;t++){let r=t*a,s=Number(e&u);e>>=f,s>a&&(s-=c,e+=l);let d=r+Math.abs(s)-1,h=t%2!=0,p=s<0;0===s?o=o.add(v(h,n[r])):i=i.add(v(p,n[d]))}return{p:i,f:o}}multiply(e,t){let r,n,i=_(e);if(g){let{k1neg:e,k1:o,k2neg:s,k2:a}=p.splitScalar(i),{p:l,f:u}=this.wNAF(o,t),{p:c,f:f}=this.wNAF(a,t);l=v(e,l),c=new w(k((c=v(s,c)).x*p.beta),c.y,c.z),r=l.add(c),n=u.add(f)}else{let{p:e,f:o}=this.wNAF(i,t);r=e,n=o}return w.normalizeZ([r,n])[0]}toAffine(e){let{x:t,y:r,z:n}=this,i=this.equals(w.ZERO);null==e&&(e=i?f:B(n));let o=e,s=k(o*o),a=k(s*o),u=k(t*s),c=k(r*a),d=k(n*o);if(i)return x.ZERO;if(d!==l)throw Error("invZ was invalid");return new x(u,c)}}function v(e,t){let r=t.negate();return e?r:t}w.BASE=new w(d.Gx,d.Gy,l),w.ZERO=new w(a,l,a);let E=new WeakMap;class x{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,E.delete(this)}hasEvenY(){return this.y%u===a}static fromCompressedHex(e){let t=32===e.length,r=j(t?e:e.subarray(1));if(!z(r))throw Error("Point is not on curve");let n=function(e){let{P:t}=d,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),a=BigInt(88),l=e*e*e%t,f=l*l*e%t,h=$(f,c)*f%t,p=$(h,c)*f%t,y=$(p,u)*l%t,g=$(y,n)*y%t,m=$(g,i)*g%t,b=$(m,s)*m%t,w=$(b,a)*b%t,v=$(w,s)*m%t,E=$(v,c)*f%t,x=$(E,o)*g%t,S=$(x,r)*l%t,A=$(S,u);if(A*A%t!==e)throw Error("Cannot find square root");return A}(y(r)),i=(n&l)===l;t?i&&(n=k(-n)):(1&e[0])==1!==i&&(n=k(-n));let o=new x(r,n);return o.assertValidity(),o}static fromUncompressedHex(e){let t=new x(j(e.subarray(1,33)),j(e.subarray(33,65)));return t.assertValidity(),t}static fromHex(e){let t=U(e),r=t.length,n=t[0];if(32===r||33===r&&(2===n||3===n))return this.fromCompressedHex(t);if(65===r&&4===n)return this.fromUncompressedHex(t);throw Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(e){return x.BASE.multiply(W(e))}static fromSignature(e,t,r){let{r:n,s:i}=function(e){if(e instanceof T)return e.assertValidity(),e;try{return T.fromDER(e)}catch(t){return T.fromCompact(e)}}(t);if(![0,1,2,3].includes(r))throw Error("Cannot recover: invalid recovery bit");let o=H(U(e)),{n:s}=d,a=2===r||3===r?n+s:n,l=B(a,s),u=k(-o*l,s),c=k(i*l,s),f=1&r?"03":"02",h=x.fromHex(f+N(a)),p=x.BASE.multiplyAndAddUnsafe(h,u,c);if(!p)throw Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(e=!1){return P(this.toHex(e))}toHex(e=!1){let t=N(this.x);if(!e)return`04${t}${N(this.y)}`;{let e=this.hasEvenY()?"02":"03";return`${e}${t}`}}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){let e="Point is not on elliptic curve",{x:t,y:r}=this;if(!z(t)||!z(r))throw Error(e);let n=k(r*r);if(k(n-y(t))!==a)throw Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new x(this.x,k(-this.y))}double(){return w.fromAffine(this).double().toAffine()}add(e){return w.fromAffine(this).add(w.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return w.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,r){let n=w.fromAffine(this),i=t===a||t===l||this!==x.BASE?n.multiplyUnsafe(t):n.multiply(t),o=w.fromAffine(e).multiplyUnsafe(r),s=i.add(o);return s.equals(w.ZERO)?void 0:s.toAffine()}}function S(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function A(e){if(e.length<2||2!==e[0])throw Error(`Invalid signature integer tag: ${C(e)}`);let t=e[1],r=e.subarray(2,t+2);if(!t||r.length!==t)throw Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw Error("Invalid signature integer: trailing length");return{data:j(r),left:e.subarray(t+2)}}x.BASE=new x(d.Gx,d.Gy),x.ZERO=new x(a,a);class T{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){let t=e instanceof Uint8Array,r="Signature.fromCompact";if("string"!=typeof e&&!t)throw TypeError(`${r}: Expected string or Uint8Array`);let n=t?C(e):e;if(128!==n.length)throw Error(`${r}: Expected 64-byte hex`);return new T(L(n.slice(0,64)),L(n.slice(64,128)))}static fromDER(e){let t=e instanceof Uint8Array;
8if("string"!=typeof e&&!t)throw TypeError("Signature.fromDER: Expected string or Uint8Array");let{r,s:n}=function(e){if(e.length<2||48!=e[0])throw Error(`Invalid signature tag: ${C(e)}`);if(e[1]!==e.length-2)throw Error("Invalid signature: incorrect length");let{data:t,left:r}=A(e.subarray(2)),{data:n,left:i}=A(r);if(i.length)throw Error(`Invalid signature: left bytes after parsing: ${C(i)}`);return{r:t,s:n}}(t?e:P(e));return new T(r,n)}static fromHex(e){return this.fromDER(e)}assertValidity(){let{r:e,s:t}=this;if(!K(e))throw Error("Invalid Signature: r must be 0 < r < n");if(!K(t))throw Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){let e=d.n>>l;return this.s>e}normalizeS(){return this.hasHighS()?new T(this.r,k(-this.s,d.n)):this}toDERRawBytes(){return P(this.toDERHex())}toDERHex(){let e=S(D(this.s)),t=S(D(this.r)),r=e.length/2,n=t.length/2,i=D(r),o=D(n),s=D(n+r+4);return`30${s}02${o}${t}02${i}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return P(this.toCompactHex())}toCompactHex(){return N(this.r)+N(this.s)}}function M(...e){if(!e.every(e=>e instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t}let I=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function C(e){if(!(e instanceof Uint8Array))throw Error("Expected Uint8Array");let t="";for(let r=0;r<e.length;r++)t+=I[e[r]];return t}let R=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function N(e){if("bigint"!=typeof e)throw Error("Expected bigint");if(!(a<=e&&e<R))throw Error("Expected number 0 <= n < 2^256");return e.toString(16).padStart(64,"0")}function O(e){let t=P(N(e));if(32!==t.length)throw Error("Error: expected 32 bytes");return t}function D(e){let t=e.toString(16);return 1&t.length?`0${t}`:t}function L(e){if("string"!=typeof e)throw TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}function P(e){if("string"!=typeof e)throw TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw Error("hexToBytes: received invalid unpadded hex"+e.length);let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){let n=2*r,i=Number.parseInt(e.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");t[r]=i}return t}function j(e){return L(C(e))}function U(e){return e instanceof Uint8Array?Uint8Array.from(e):P(e)}function _(e){if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)return BigInt(e);if("bigint"==typeof e&&K(e))return e;throw TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function k(e,t=d.P){let r=e%t;return r>=a?r:t+r}function $(e,t){let{P:r}=d,n=e;for(;t-- >a;)n*=n,n%=r;return n}function B(e,t=d.P){if(e===a||t<=a)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=k(e,t),n=t,i=a,o=l,s=l,u=a;for(;r!==a;){let e=n/r,t=n%r,a=i-s*e,l=o-u*e;n=r,r=t,i=s,o=u,s=a,u=l}if(n!==l)throw Error("invert: does not exist");return k(i,t)}function H(e,t=!1){let r=function(e){let t=8*e.length-256,r=j(e);return t>0?r>>BigInt(t):r}(e);if(t)return r;let{n}=d;return r>=n?r-n:r}class F{constructor(e,t){if(this.hashLen=e,this.qByteLen=t,"number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");this.v=new Uint8Array(e).fill(1),this.k=new Uint8Array(e).fill(0),this.counter=0}hmac(...e){return er.hmacSha256(this.k,...e)}hmacSync(...e){return i(this.k,...e)}checkSync(){if("function"!=typeof i)throw new m("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(e=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),0!==e.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(e=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){this.incr();let e=0,t=[];for(;e<this.qByteLen;){this.v=await this.hmac(this.v);let r=this.v.slice();t.push(r),e+=this.v.length}return M(...t)}generateSync(){this.checkSync(),this.incr();let e=0,t=[];for(;e<this.qByteLen;){this.v=this.hmacSync(this.v);let r=this.v.slice();t.push(r),e+=this.v.length}return M(...t)}}function K(e){return a<e&&e<d.n}function z(e){return a<e&&e<d.P}function W(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"==typeof e){if(64!==e.length)throw Error("Expected 32 bytes of private key");t=L(e)}else if(e instanceof Uint8Array){if(32!==e.length)throw Error("Expected 32 bytes of private key");t=j(e)}else throw TypeError("Expected valid private key");if(!K(t))throw Error("Expected private key: 0 < key < n");return t}function G(e){return e instanceof x?(e.assertValidity(),e):x.fromHex(e)}function V(e,t=!1){return x.fromPrivateKey(e).toRawBytes(t)}function q(e){let t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?33===n||65===n:r?66===n||130===n:e instanceof x}function Q(e,t,r=!1){if(q(e))throw TypeError("getSharedSecret: first arg must be private key");if(!q(t))throw TypeError("getSharedSecret: second arg must be public key");let n=G(t);return n.assertValidity(),n.multiply(W(e)).toRawBytes(r)}function Y(e){return j(e.length>32?e.slice(0,32):e)}function Z(e,t,r={}){let n;let{seed:i,m:o,d:s}=function(e,t,r){if(null==e)throw Error(`sign: expected valid message hash, not "${e}"`);let n=U(e),i=W(t),o=[O(i),function(e){let t=Y(e),r=k(t,d.n);return O(r<a?t:r)}(n)];if(null!=r){!0===r&&(r=er.randomBytes(32));let e=U(r);if(32!==e.length)throw Error("sign: Expected 32 bytes of extra data");o.push(e)}return{seed:M(...o),m:Y(n),d:i}}(e,t,r.extraEntropy),u=new F(32,32);for(u.reseedSync(i);!(n=function(e,t,r,n=!0){let{n:i}=d,o=H(e,!0);if(!K(o))return;let s=B(o,i),u=x.BASE.multiply(o),c=k(u.x,i);if(c===a)return;let f=k(s*k(t+r*c,i),i);if(f===a)return;let h=new T(c,f),p=(u.x===h.r?0:2)|Number(u.y&l);return n&&h.hasHighS()&&(h=h.normalizeS(),p^=1),{sig:h,recovery:p}}(u.generateSync(),o,s,r.canonical));)u.reseedSync();return function(e,t){let{sig:r,recovery:n}=e,{der:i,recovered:o}=Object.assign({canonical:!0,der:!0},t),s=i?r.toDERRawBytes():r.toCompactRawBytes();return o?[s,n]:s}(n,r)}class X{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){let t=U(e);if(64!==t.length)throw TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${t.length}`);return new X(j(t.subarray(0,32)),j(t.subarray(32,64)))}assertValidity(){let{r:e,s:t}=this;if(!z(e)||!K(t))throw Error("Invalid signature")}toHex(){return N(this.r)+N(this.s)}toRawBytes(){return P(this.toHex())}}x.BASE._setWindowSize(8);let J={node:o||(o=r.t(s,2)),web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},ee={challenge:"BIP0340/challenge"},et={},er={bytesToHex:C,hexToBytes:P,concatBytes:M,mod:k,invert:B,isValidPrivateKey(e){try{return W(e),!0}catch(e){return!1}},_bigintTo32Bytes:O,_normalizePrivateKey:W,hashToPrivateKey:e=>{if((e=U(e)).length<40||e.length>1024)throw Error("Expected valid bytes of private key as per FIPS 186");return O(k(j(e),d.n-l)+l)},randomBytes:(e=32)=>{if(J.web)return J.web.getRandomValues(new Uint8Array(e));if(J.node){let{randomBytes:t}=J.node;return Uint8Array.from(t(e))}throw Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>er.hashToPrivateKey(er.randomBytes(40)),precompute(e=8,t=x.BASE){let r=t===x.BASE?t:new x(t.x,t.y);return r._setWindowSize(e),r.multiply(c),r},sha256:async(...e)=>{if(J.web)return new Uint8Array(await J.web.subtle.digest("SHA-256",M(...e)));if(J.node){let{createHash:t}=J.node,r=t("sha256");
8return e.forEach(e=>r.update(e)),Uint8Array.from(r.digest())}throw Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(J.web){let r=await J.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=M(...t);return new Uint8Array(await J.web.subtle.sign("HMAC",r,n))}if(J.node){let{createHmac:r}=J.node,n=r("sha256",e);return t.forEach(e=>n.update(e)),Uint8Array.from(n.digest())}throw Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...t)=>{let r=et[e];if(void 0===r){let t=await er.sha256(Uint8Array.from(e,e=>e.charCodeAt(0)));r=M(t,t),et[e]=r}return er.sha256(r,...t)},taggedHashSync:(e,...t)=>{if("function"!=typeof n)throw new m("sha256Sync is undefined, you need to set it");let r=et[e];if(void 0===r){let t=n(Uint8Array.from(e,e=>e.charCodeAt(0)));r=M(t,t),et[e]=r}return n(r,...t)},_JacobianPoint:w};Object.defineProperties(er,{sha256Sync:{configurable:!1,get:()=>n,set(e){n||(n=e)}},hmacSha256Sync:{configurable:!1,get:()=>i,set(e){i||(i=e)}}})},38620:(e,t,r)=>{"use strict";function n(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{B:()=>c});var i,o=r(2265),s=r(98324),a=r(1584),l=r(71538),u=r(57437);function c(e){let t=e+"CollectionProvider",[r,n]=(0,s.b)(t),[i,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),f=e=>{let{scope:t,children:r}=e,n=o.useRef(null),s=o.useRef(new Map).current;return(0,u.jsx)(i,{scope:t,itemMap:s,collectionRef:n,children:r})};f.displayName=t;let d=e+"CollectionSlot",h=(0,l.Z8)(d),p=o.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=c(d,r),o=(0,a.e)(t,i.collectionRef);return(0,u.jsx)(h,{ref:o,children:n})});p.displayName=d;let y=e+"CollectionItemSlot",g="data-radix-collection-item",m=(0,l.Z8)(y),b=o.forwardRef((e,t)=>{let{scope:r,children:n,...i}=e,s=o.useRef(null),l=(0,a.e)(t,s),f=c(y,r);return o.useEffect(()=>(f.itemMap.set(s,{ref:s,...i}),()=>void f.itemMap.delete(s))),(0,u.jsx)(m,{[g]:"",ref:l,children:n})});return b.displayName=y,[{Provider:f,Slot:p,ItemSlot:b},function(t){let r=c(e+"CollectionConsumer",t);return o.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(g,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}},87513:(e,t,r)=>{"use strict";r.d(t,{gm:()=>o});var n=r(2265);r(57437);var i=n.createContext(void 0);function o(e){let t=n.useContext(i);return e||t||"ltr"}},53938:(e,t,r)=>{"use strict";r.d(t,{I0:()=>m,XB:()=>d,fC:()=>g});var n,i=r(2265),o=r(78149),s=r(25171),a=r(1584),l=r(75137),u=r(57437),c="dismissableLayer.update",f=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d=i.forwardRef((e,t)=>{var r,d;let{disableOutsidePointerEvents:h=!1,onEscapeKeyDown:g,onPointerDownOutside:m,onFocusOutside:b,onInteractOutside:w,onDismiss:v,...E}=e,x=i.useContext(f),[S,A]=i.useState(null),T=null!==(d=null==S?void 0:S.ownerDocument)&&void 0!==d?d:null===(r=globalThis)||void 0===r?void 0:r.document,[,M]=i.useState({}),I=(0,a.e)(t,e=>A(e)),C=Array.from(x.layers),[R]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),N=C.indexOf(R),O=S?C.indexOf(S):-1,D=x.layersWithOutsidePointerEventsDisabled.size>0,L=O>=N,P=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,n=(0,l.W)(e),o=i.useRef(!1),s=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){y("dismissableLayer.pointerDownOutside",n,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",s.current),s.current=t,r.addEventListener("click",s.current,{once:!0})):t()}else r.removeEventListener("click",s.current);o.current=!1},t=window.setTimeout(()=>{r.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",s.current)}},[r,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,r=[...x.branches].some(e=>e.contains(t));!L||r||(null==m||m(e),null==w||w(e),e.defaultPrevented||null==v||v())},T),j=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,n=(0,l.W)(e),o=i.useRef(!1);return i.useEffect(()=>{let e=e=>
8{e.target&&!o.current&&y("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)},[r,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;[...x.branches].some(e=>e.contains(t))||(null==b||b(e),null==w||w(e),e.defaultPrevented||null==v||v())},T);return!function(e,t=globalThis?.document){let r=(0,l.W)(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{O!==x.layers.size-1||(null==g||g(e),!e.defaultPrevented&&v&&(e.preventDefault(),v()))},T),i.useEffect(()=>{if(S)return h&&(0===x.layersWithOutsidePointerEventsDisabled.size&&(n=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(S)),x.layers.add(S),p(),()=>{h&&1===x.layersWithOutsidePointerEventsDisabled.size&&(T.body.style.pointerEvents=n)}},[S,T,h,x]),i.useEffect(()=>()=>{S&&(x.layers.delete(S),x.layersWithOutsidePointerEventsDisabled.delete(S),p())},[S,x]),i.useEffect(()=>{let e=()=>M({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,u.jsx)(s.WV.div,{...E,ref:I,style:{pointerEvents:D?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,o.M)(e.onFocusCapture,j.onFocusCapture),onBlurCapture:(0,o.M)(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:(0,o.M)(e.onPointerDownCapture,P.onPointerDownCapture)})});d.displayName="DismissableLayer";var h=i.forwardRef((e,t)=>{let r=i.useContext(f),n=i.useRef(null),o=(0,a.e)(t,n);return i.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,u.jsx)(s.WV.div,{...e,ref:o})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function y(e,t,r,n){let{discrete:i}=n,o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),i?(0,s.jH)(o,a):o.dispatchEvent(a)}h.displayName="DismissableLayerBranch";var g=d,m=h},21220:(e,t,r)=>{"use strict";r.d(t,{oC:()=>td,VY:()=>tl,ZA:()=>tu,ck:()=>tf,wU:()=>ty,__:()=>tc,Uv:()=>ta,Ee:()=>th,Rk:()=>tp,fC:()=>to,Z0:()=>tg,Tr:()=>tm,tu:()=>tw,fF:()=>tb,xz:()=>ts});var n=r(2265),i=r(78149),o=r(1584),s=r(98324),a=r(91715),l=r(25171),u=r(38620),c=r(87513),f=r(53938),d=r(20589),h=r(80467),p=r(53201),y=r(25510),g=r(56935),m=r(31383),b=r(75137),w=r(57437),v="rovingFocusGroup.onEntryFocus",E={bubbles:!1,cancelable:!0},x="RovingFocusGroup",[S,A,T]=(0,u.B)(x),[M,I]=(0,s.b)(x,[T]),[C,R]=M(x),N=n.forwardRef((e,t)=>(0,w.jsx)(S.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(S.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(O,{...e,ref:t})})}));N.displayName=x;var O=n.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:s,loop:u=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:y,preventScrollOnEntryFocus:g=!1,...m}=e,S=n.useRef(null),T=(0,o.e)(t,S),M=(0,c.gm)(f),[I,R]=(0,a.T)({prop:d,defaultProp:null!=h?h:null,onChange:p,caller:x}),[N,O]=n.useState(!1),D=(0,b.W)(y),L=A(r),P=n.useRef(!1),[U,_]=n.useState(0);return n.useEffect(()=>{let e=S.current;if(e)return e.addEventListener(v,D),()=>e.removeEventListener(v,D)},[D]),(0,w.jsx)(C,{scope:r,orientation:s,dir:M,loop:u,currentTabStopId:I,onItemFocus:n.useCallback(e=>R(e),[R]),onItemShiftTab:n.useCallback(()=>O(!0),[]),onFocusableItemAdd:n.useCallback(()=>_(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>_(e=>e-1),[]),children:(0,w.jsx)(l.WV.div,{tabIndex:N||0===U?-1:0,"data-orientation":s,...m,ref:T,style:{outline:"none",...e.style},onMouseDown:(0,i.M)(e.onMouseDown,()=>{P.current=!0}),onFocus:(0,i.M)(e.onFocus,e=>{let t=!P.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(v,E);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=L().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===I),...e].filter(Boolean).map(e=>e.ref.current),g)}}P.current=!1}),onBlur:(0,i.M)(e.onBlur,()=>O(!1))})})}),D="RovingFocusGroupItem",L=n.forwardRef((e,t)=>
8{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:a,children:u,...c}=e,f=(0,p.M)(),d=a||f,h=R(D,r),y=h.currentTabStopId===d,g=A(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=h;return n.useEffect(()=>{if(o)return m(),()=>b()},[o,m,b]),(0,w.jsx)(S.ItemSlot,{scope:r,id:d,focusable:o,active:s,children:(0,w.jsx)(l.WV.span,{tabIndex:y?0:-1,"data-orientation":h.orientation,...c,ref:t,onMouseDown:(0,i.M)(e.onMouseDown,e=>{o?h.onItemFocus(d):e.preventDefault()}),onFocus:(0,i.M)(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:(0,i.M)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return P[i]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=g().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=h.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>j(r))}}),children:"function"==typeof u?u({isCurrentTabStop:y,hasTabStop:null!=v}):u})})});L.displayName=D;var P={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function j(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var U=r(71538),_=r(78369),k=r(49418),$=["Enter"," "],B=["ArrowUp","PageDown","End"],H=["ArrowDown","PageUp","Home",...B],F={ltr:[...$,"ArrowRight"],rtl:[...$,"ArrowLeft"]},K={ltr:["ArrowLeft"],rtl:["ArrowRight"]},z="Menu",[W,G,V]=(0,u.B)(z),[q,Q]=(0,s.b)(z,[V,y.D7,I]),Y=(0,y.D7)(),Z=I(),[X,J]=q(z),[ee,et]=q(z),er=e=>{let{__scopeMenu:t,open:r=!1,children:i,dir:o,onOpenChange:s,modal:a=!0}=e,l=Y(t),[u,f]=n.useState(null),d=n.useRef(!1),h=(0,b.W)(s),p=(0,c.gm)(o);return n.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,w.jsx)(y.fC,{...l,children:(0,w.jsx)(X,{scope:t,open:r,onOpenChange:h,content:u,onContentChange:f,children:(0,w.jsx)(ee,{scope:t,onClose:n.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:p,modal:a,children:i})})})};er.displayName=z;var en=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,i=Y(r);return(0,w.jsx)(y.ee,{...i,...n,ref:t})});en.displayName="MenuAnchor";var ei="MenuPortal",[eo,es]=q(ei,{forceMount:void 0}),ea=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:i}=e,o=J(ei,t);return(0,w.jsx)(eo,{scope:t,forceMount:r,children:(0,w.jsx)(m.z,{present:r||o.open,children:(0,w.jsx)(g.h,{asChild:!0,container:i,children:n})})})};ea.displayName=ei;var el="MenuContent",[eu,ec]=q(el),ef=n.forwardRef((e,t)=>{let r=es(el,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,o=J(el,e.__scopeMenu),s=et(el,e.__scopeMenu);return(0,w.jsx)(W.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(m.z,{present:n||o.open,children:(0,w.jsx)(W.Slot,{scope:e.__scopeMenu,children:s.modal?(0,w.jsx)(ed,{...i,ref:t}):(0,w.jsx)(eh,{...i,ref:t})})})})}),ed=n.forwardRef((e,t)=>{let r=J(el,e.__scopeMenu),s=n.useRef(null),a=(0,o.e)(t,s);return n.useEffect(()=>{let e=s.current;if(e)return(0,_.Ry)(e)},[]),(0,w.jsx)(ey,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:(0,i.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),eh=n.forwardRef((e,t)=>{let r=J(el,e.__scopeMenu);return(0,w.jsx)(ey,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),ep=(0,U.Z8)("MenuContent.ScrollLock"),ey=n.forwardRef((e,t)=>
8{let{__scopeMenu:r,loop:s=!1,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEntryFocus:p,onEscapeKeyDown:g,onPointerDownOutside:m,onFocusOutside:b,onInteractOutside:v,onDismiss:E,disableOutsideScroll:x,...S}=e,A=J(el,r),T=et(el,r),M=Y(r),I=Z(r),C=G(r),[R,O]=n.useState(null),D=n.useRef(null),L=(0,o.e)(t,D,A.onContentChange),P=n.useRef(0),j=n.useRef(""),U=n.useRef(0),_=n.useRef(null),$=n.useRef("right"),F=n.useRef(0),K=x?k.Z:n.Fragment,z=e=>{var t,r;let n=j.current+e,i=C().filter(e=>!e.disabled),o=document.activeElement,s=null===(t=i.find(e=>e.ref.current===o))||void 0===t?void 0:t.textValue,a=function(e,t,r){var n;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=(n=Math.max(r?e.indexOf(r):-1,0),e.map((t,r)=>e[(n+r)%e.length]));1===i.length&&(o=o.filter(e=>e!==r));let s=o.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return s!==r?s:void 0}(i.map(e=>e.textValue),n,s),l=null===(r=i.find(e=>e.textValue===a))||void 0===r?void 0:r.ref.current;!function e(t){j.current=t,window.clearTimeout(P.current),""!==t&&(P.current=window.setTimeout(()=>e(""),1e3))}(n),l&&setTimeout(()=>l.focus())};n.useEffect(()=>()=>window.clearTimeout(P.current),[]),(0,d.EW)();let W=n.useCallback(e=>{var t,r;return $.current===(null===(t=_.current)||void 0===t?void 0:t.side)&&function(e,t){return!!t&&function(e,t){let{x:r,y:n}=e,i=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let s=t[e],a=t[o],l=s.x,u=s.y,c=a.x,f=a.y;u>n!=f>n&&r<(c-l)*(n-u)/(f-u)+l&&(i=!i)}return i}({x:e.clientX,y:e.clientY},t)}(e,null===(r=_.current)||void 0===r?void 0:r.area)},[]);return(0,w.jsx)(eu,{scope:r,searchRef:j,onItemEnter:n.useCallback(e=>{W(e)&&e.preventDefault()},[W]),onItemLeave:n.useCallback(e=>{var t;W(e)||(null===(t=D.current)||void 0===t||t.focus(),O(null))},[W]),onTriggerLeave:n.useCallback(e=>{W(e)&&e.preventDefault()},[W]),pointerGraceTimerRef:U,onPointerGraceIntentChange:n.useCallback(e=>{_.current=e},[]),children:(0,w.jsx)(K,{...x?{as:ep,allowPinchZoom:!0}:void 0,children:(0,w.jsx)(h.M,{asChild:!0,trapped:a,onMountAutoFocus:(0,i.M)(l,e=>{var t;e.preventDefault(),null===(t=D.current)||void 0===t||t.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:(0,w.jsx)(f.XB,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:g,onPointerDownOutside:m,onFocusOutside:b,onInteractOutside:v,onDismiss:E,children:(0,w.jsx)(N,{asChild:!0,...I,dir:T.dir,orientation:"vertical",loop:s,currentTabStopId:R,onCurrentTabStopIdChange:O,onEntryFocus:(0,i.M)(p,e=>{T.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,w.jsx)(y.VY,{role:"menu","aria-orientation":"vertical","data-state":eK(A.open),"data-radix-menu-content":"",dir:T.dir,...M,...S,ref:L,style:{outline:"none",...S.style},onKeyDown:(0,i.M)(S.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&z(e.key));let i=D.current;if(e.target!==i||!H.includes(e.key))return;e.preventDefault();let o=C().filter(e=>!e.disabled).map(e=>e.ref.current);B.includes(e.key)&&o.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(o)}),onBlur:(0,i.M)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(P.current),j.current="")}),onPointerMove:(0,i.M)(e.onPointerMove,eG(e=>{let t=e.target,r=F.current!==e.clientX;if(e.currentTarget.contains(t)&&r){let t=e.clientX>F.current?"right":"left";$.current=t,F.current=e.clientX}}))})})})})})})});ef.displayName=el;var eg=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,w.jsx)(l.WV.div,{role:"group",...n,ref:t})});eg.displayName="MenuGroup";var em=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,w.jsx)(l.WV.div,{...n,ref:t})});em.displayName="MenuLabel";var eb="MenuItem",ew="menu.itemSelect",ev=n.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:s,...a}=e,u=n.useRef(null),c=et(eb,e.__scopeMenu),f=ec(eb,e.__scopeMenu),d=(0,o.e)(t,u),h=n.useRef(!1);return(0,w.jsx)(eE,{...a,ref:d,disabled:r,onClick:(0,i.M)(e.onClick,()=>{let e=u.current;if(!r&&e){let t=new CustomEvent(ew,{bubbles:!0,cancelable:!0});e.addEventListener(ew,e=>null==s?void 0:s(e),{once:!0}),(0,l.jH)(e,t),t.defaultPrevented?h.current=!1:c.onClose()}}),onPointerDown:t=>{var r;null===(r=e.onPointerDown)||void 0===r||r.call(e,t),h.current=!0},onPointerUp:(0,i.M)(e.onPointerUp,e=>{var t;h.current||null===(t=e.currentTarget)||void 0===t||t.click()}),onKeyDown:(0,i.M)(e.onKeyDown,e=>{let t=""!==f.searchRef.current;
8!r&&(!t||" "!==e.key)&&$.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ev.displayName=eb;var eE=n.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:s=!1,textValue:a,...u}=e,c=ec(eb,r),f=Z(r),d=n.useRef(null),h=(0,o.e)(t,d),[p,y]=n.useState(!1),[g,m]=n.useState("");return n.useEffect(()=>{let e=d.current;if(e){var t;m((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}},[u.children]),(0,w.jsx)(W.ItemSlot,{scope:r,disabled:s,textValue:null!=a?a:g,children:(0,w.jsx)(L,{asChild:!0,...f,focusable:!s,children:(0,w.jsx)(l.WV.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...u,ref:h,onPointerMove:(0,i.M)(e.onPointerMove,eG(e=>{s?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,i.M)(e.onPointerLeave,eG(e=>c.onItemLeave(e))),onFocus:(0,i.M)(e.onFocus,()=>y(!0)),onBlur:(0,i.M)(e.onBlur,()=>y(!1))})})})}),ex=n.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...o}=e;return(0,w.jsx)(eN,{scope:e.__scopeMenu,checked:r,children:(0,w.jsx)(ev,{role:"menuitemcheckbox","aria-checked":ez(r)?"mixed":r,...o,ref:t,"data-state":eW(r),onSelect:(0,i.M)(o.onSelect,()=>null==n?void 0:n(!!ez(r)||!r),{checkForDefaultPrevented:!1})})})});ex.displayName="MenuCheckboxItem";var eS="MenuRadioGroup",[eA,eT]=q(eS,{value:void 0,onValueChange:()=>{}}),eM=n.forwardRef((e,t)=>{let{value:r,onValueChange:n,...i}=e,o=(0,b.W)(n);return(0,w.jsx)(eA,{scope:e.__scopeMenu,value:r,onValueChange:o,children:(0,w.jsx)(eg,{...i,ref:t})})});eM.displayName=eS;var eI="MenuRadioItem",eC=n.forwardRef((e,t)=>{let{value:r,...n}=e,o=eT(eI,e.__scopeMenu),s=r===o.value;return(0,w.jsx)(eN,{scope:e.__scopeMenu,checked:s,children:(0,w.jsx)(ev,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":eW(s),onSelect:(0,i.M)(n.onSelect,()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,r)},{checkForDefaultPrevented:!1})})})});eC.displayName=eI;var eR="MenuItemIndicator",[eN,eO]=q(eR,{checked:!1}),eD=n.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...i}=e,o=eO(eR,r);return(0,w.jsx)(m.z,{present:n||ez(o.checked)||!0===o.checked,children:(0,w.jsx)(l.WV.span,{...i,ref:t,"data-state":eW(o.checked)})})});eD.displayName=eR;var eL=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,w.jsx)(l.WV.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});eL.displayName="MenuSeparator";var eP=n.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,i=Y(r);return(0,w.jsx)(y.Eh,{...i,...n,ref:t})});eP.displayName="MenuArrow";var ej="MenuSub",[eU,e_]=q(ej),ek=e=>{let{__scopeMenu:t,children:r,open:i=!1,onOpenChange:o}=e,s=J(ej,t),a=Y(t),[l,u]=n.useState(null),[c,f]=n.useState(null),d=(0,b.W)(o);return n.useEffect(()=>(!1===s.open&&d(!1),()=>d(!1)),[s.open,d]),(0,w.jsx)(y.fC,{...a,children:(0,w.jsx)(X,{scope:t,open:i,onOpenChange:d,content:c,onContentChange:f,children:(0,w.jsx)(eU,{scope:t,contentId:(0,p.M)(),triggerId:(0,p.M)(),trigger:l,onTriggerChange:u,children:r})})})};ek.displayName=ej;var e$="MenuSubTrigger",eB=n.forwardRef((e,t)=>{let r=J(e$,e.__scopeMenu),s=et(e$,e.__scopeMenu),a=e_(e$,e.__scopeMenu),l=ec(e$,e.__scopeMenu),u=n.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=l,d={__scopeMenu:e.__scopeMenu},h=n.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return n.useEffect(()=>h,[h]),n.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),f(null)}},[c,f]),(0,w.jsx)(en,{asChild:!0,...d,children:(0,w.jsx)(eE,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":eK(r.open),...e,ref:(0,o.F)(t,a.onTriggerChange),onClick:t=>{var n;null===(n=e.onClick)||void 0===n||n.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:(0,i.M)(e.onPointerMove,eG(t=>{l.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||u.current||(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{r.onOpenChange(!0),h()},100))})),onPointerLeave:(0,i.M)(e.onPointerLeave,eG(e=>{var t,n;h();let i=null===(t=r.content)||void 0===t?void 0:t.getBoundingClientRect();if(i){let t=null===(n=r.content)||void 0===n?void 0:n.dataset.side,o="right"===t,s=i[o?"left":"right"],a=i[o?"right":"left"];l.onPointerGraceIntentChange({area:[{x:e.clientX+(o?-5:5),y:e.clientY},{x:s,y:i.top},{x:a,y:i.top},{x:a,y:i.bottom},{x:s,y:i.bottom}],side:t}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(e),e.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:(0,i.M)(e.onKeyDown,t=>{let n=""!==l.searchRef.current;if(!e.disabled&&(!n||" "!==t.key)&&F[s.dir].includes(t.key)){var i;r.onOpenChange(!0),null===(i=r.content)||void 0===i||i.focus(),t.preventDefault()}})})})});eB.displayName=e$;var eH="MenuSubContent",eF=n.forwardRef((e,t)=>
8{let r=es(el,e.__scopeMenu),{forceMount:s=r.forceMount,...a}=e,l=J(el,e.__scopeMenu),u=et(el,e.__scopeMenu),c=e_(eH,e.__scopeMenu),f=n.useRef(null),d=(0,o.e)(t,f);return(0,w.jsx)(W.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(m.z,{present:s||l.open,children:(0,w.jsx)(W.Slot,{scope:e.__scopeMenu,children:(0,w.jsx)(ey,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;u.isUsingKeyboardRef.current&&(null===(t=f.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,i.M)(e.onFocusOutside,e=>{e.target!==c.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:(0,i.M)(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:(0,i.M)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=K[u.dir].includes(e.key);if(t&&r){var n;l.onOpenChange(!1),null===(n=c.trigger)||void 0===n||n.focus(),e.preventDefault()}})})})})})});function eK(e){return e?"open":"closed"}function ez(e){return"indeterminate"===e}function eW(e){return ez(e)?"indeterminate":e?"checked":"unchecked"}function eG(e){return t=>"mouse"===t.pointerType?e(t):void 0}eF.displayName=eH;var eV="DropdownMenu",[eq,eQ]=(0,s.b)(eV,[Q]),eY=Q(),[eZ,eX]=eq(eV),eJ=e=>{let{__scopeDropdownMenu:t,children:r,dir:i,open:o,defaultOpen:s,onOpenChange:l,modal:u=!0}=e,c=eY(t),f=n.useRef(null),[d,h]=(0,a.T)({prop:o,defaultProp:null!=s&&s,onChange:l,caller:eV});return(0,w.jsx)(eZ,{scope:t,triggerId:(0,p.M)(),triggerRef:f,contentId:(0,p.M)(),open:d,onOpenChange:h,onOpenToggle:n.useCallback(()=>h(e=>!e),[h]),modal:u,children:(0,w.jsx)(er,{...c,open:d,onOpenChange:h,dir:i,modal:u,children:r})})};eJ.displayName=eV;var e0="DropdownMenuTrigger",e1=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,a=eX(e0,r),u=eY(r);return(0,w.jsx)(en,{asChild:!0,...u,children:(0,w.jsx)(l.WV.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:(0,o.F)(t,a.triggerRef),onPointerDown:(0,i.M)(e.onPointerDown,e=>{n||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:(0,i.M)(e.onKeyDown,e=>{!n&&(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});e1.displayName=e0;var e2=e=>{let{__scopeDropdownMenu:t,...r}=e,n=eY(t);return(0,w.jsx)(ea,{...n,...r})};e2.displayName="DropdownMenuPortal";var e4="DropdownMenuContent",e3=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,s=eX(e4,r),a=eY(r),l=n.useRef(!1);return(0,w.jsx)(ef,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...o,ref:t,onCloseAutoFocus:(0,i.M)(e.onCloseAutoFocus,e=>{var t;l.current||null===(t=s.triggerRef.current)||void 0===t||t.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:(0,i.M)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!s.modal||n)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e3.displayName=e4;var e8=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eg,{...i,...n,ref:t})});e8.displayName="DropdownMenuGroup";var e5=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(em,{...i,...n,ref:t})});e5.displayName="DropdownMenuLabel";var e6=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(ev,{...i,...n,ref:t})});e6.displayName="DropdownMenuItem";var e7=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(ex,{...i,...n,ref:t})});e7.displayName="DropdownMenuCheckboxItem";var e9=n.forwardRef((e,t)=>
8{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eM,{...i,...n,ref:t})});e9.displayName="DropdownMenuRadioGroup";var te=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eC,{...i,...n,ref:t})});te.displayName="DropdownMenuRadioItem";var tt=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eD,{...i,...n,ref:t})});tt.displayName="DropdownMenuItemIndicator";var tr=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eL,{...i,...n,ref:t})});tr.displayName="DropdownMenuSeparator",n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eP,{...i,...n,ref:t})}).displayName="DropdownMenuArrow";var tn=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eB,{...i,...n,ref:t})});tn.displayName="DropdownMenuSubTrigger";var ti=n.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eY(r);return(0,w.jsx)(eF,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ti.displayName="DropdownMenuSubContent";var to=eJ,ts=e1,ta=e2,tl=e3,tu=e8,tc=e5,tf=e6,td=e7,th=e9,tp=te,ty=tt,tg=tr,tm=e=>{let{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:i,defaultOpen:o}=e,s=eY(t),[l,u]=(0,a.T)({prop:n,defaultProp:null!=o&&o,onChange:i,caller:"DropdownMenuSub"});return(0,w.jsx)(ek,{...s,open:l,onOpenChange:u,children:r})},tb=tn,tw=ti},20589:(e,t,r)=>{"use strict";r.d(t,{EW:()=>o});var n=r(2265),i=0;function o(){n.useEffect(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:s()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:s()),i++,()=>{1===i&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),i--}},[])}function s(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}},80467:(e,t,r)=>{"use strict";r.d(t,{M:()=>f});var n=r(2265),i=r(1584),o=r(25171),s=r(75137),a=r(57437),l="focusScope.autoFocusOnMount",u="focusScope.autoFocusOnUnmount",c={bubbles:!1,cancelable:!0},f=n.forwardRef((e,t)=>{let{loop:r=!1,trapped:f=!1,onMountAutoFocus:g,onUnmountAutoFocus:m,...b}=e,[w,v]=n.useState(null),E=(0,s.W)(g),x=(0,s.W)(m),S=n.useRef(null),A=(0,i.e)(t,e=>v(e)),T=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(f){let e=function(e){if(T.paused||!w)return;let t=e.target;w.contains(t)?S.current=t:p(S.current,{select:!0})},t=function(e){if(T.paused||!w)return;let t=e.relatedTarget;null===t||w.contains(t)||p(S.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&p(w)});return w&&r.observe(w,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[f,w,T.paused]),n.useEffect(()=>{if(w){y.add(T);let e=document.activeElement;if(!w.contains(e)){let t=new CustomEvent(l,c);w.addEventListener(l,E),w.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(p(n,{select:t}),document.activeElement!==r)return}(d(w).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&p(w))}return()=>{w.removeEventListener(l,E),setTimeout(()=>{let t=new CustomEvent(u,c);w.addEventListener(u,x),w.dispatchEvent(t),t.defaultPrevented||p(null!=e?e:document.body,{select:!0}),w.removeEventListener(u,x),y.remove(T)},0)}}},[w,E,x,T]);let M=n.useCallback(e=>{if(!r&&!f||T.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[i,o]=function(e){let t=d(e);return[h(t,e),h(t.reverse(),e)]}(t);i&&o?e.shiftKey||n!==o?e.shiftKey&&n===i&&(e.preventDefault(),r&&p(o,{select:!0})):(e.preventDefault(),r&&p(i,{select:!0})):n===t&&e.preventDefault()}},[r,f,T.paused]);return(0,a.jsx)(o.WV.div,{tabIndex:-1,...b,ref:A,onKeyDown:M})});function d(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function h(e,t){for(let r of e)if(!function(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function p(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}f.displayName="FocusScope";var y=function(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=g(e,t)).unshift(t)},remove(t){var r;null===(r=(e=g(e,t))[0])||void 0===r||r.resume()}}}();function g(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}},25510:(e,t,r)=>{"use strict";r.d(t,{ee:()=>eY,Eh:()=>eX,VY:()=>eZ,fC:()=>eQ,D7:()=>eL});var n=r(2265);let i=["top","right","bottom","left"],o=Math.min,s=Math.max,a=Math.round,l=Math.floor,u=e=>({x:e,y:e}
8),c={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function d(e,t){return"function"==typeof e?e(t):e}function h(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function m(e){return["top","bottom"].includes(h(e))?"y":"x"}function b(e){return e.replace(/start|end/g,e=>f[e])}function w(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function v(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function E(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function x(e,t,r){let n,{reference:i,floating:o}=e,s=m(t),a=y(m(t)),l=g(a),u=h(t),c="y"===s,f=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,b=i[l]/2-o[l]/2;switch(u){case"top":n={x:f,y:i.y-o.height};break;case"bottom":n={x:f,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:d};break;case"left":n={x:i.x-o.width,y:d};break;default:n={x:i.x,y:i.y}}switch(p(t)){case"start":n[a]-=b*(r&&c?-1:1);break;case"end":n[a]+=b*(r&&c?-1:1)}return n}let S=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=o.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=x(u,n,l),d=n,h={},p=0;for(let r=0;r<a.length;r++){let{name:o,fn:y}=a[r],{x:g,y:m,data:b,reset:w}=await y({x:c,y:f,initialPlacement:n,placement:d,strategy:i,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=g?g:c,f=null!=m?m:f,h={...h,[o]:{...h[o],...b}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(u=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:c,y:f}=x(u,d,l)),r=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:h}};async function A(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=d(t,e),y=v(p),g=a[h?"floating"===f?"reference":"floating":f],m=E(await o.getClippingRect({element:null==(r=await (null==o.isElement?void 0:o.isElement(g)))||r?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),b="floating"===f?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),x=await (null==o.isElement?void 0:o.isElement(w))&&await (null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},S=E(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:l}):b);return{top:(m.top-S.top+y.top)/x.y,bottom:(S.bottom-m.bottom+y.bottom)/x.y,left:(m.left-S.left+y.left)/x.x,right:(S.right-m.right+y.right)/x.x}}function T(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function M(e){return i.some(t=>e[t]>=0)}async function I(e,t){let{placement:r,platform:n,elements:i}=e,o=await (null==n.isRTL?void 0:n.isRTL(i.floating)),s=h(r),a=p(r),l="y"===m(r),u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,f=d(t,e),{mainAxis:y,crossAxis:g,alignmentAxis:b}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof b&&(g="end"===a?-1*b:b),l?{x:g*c,y:y*u}:{x:y*u,y:g*c}}function C(){return"undefined"!=typeof window}function R(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function O(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return!!C()&&(e instanceof Node||e instanceof N(e).Node)}function L(e){return!!C()&&(e instanceof Element||e instanceof N(e).Element)}function P(e){return!!C()&&(e instanceof HTMLElement||e instanceof N(e).HTMLElement)}function j(e){return!!C()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function U(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function _(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function k(e){let t=$(),r=L(e)?H(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function $(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function B(e){return["html","body","#document"].includes(R(e))}function H(e){return N(e).getComputedStyle(e)}function F(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if("html"===R(e))return e;let t=e.assignedSlot||e.parentNode||j(e)&&e.host||O(e);return j(t)?t.host:t}function z(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=K(t);return B(r)?t.ownerDocument?t.ownerDocument.body:t.body:P(r)&&U(r)?r:e(r)}(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),s=N(i);if(o){let e=W(s);
8return t.concat(s,s.visualViewport||[],U(i)?i:[],e&&r?z(e):[])}return t.concat(i,z(i,[],r))}function W(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function G(e){let t=H(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=P(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,l=a(r)!==o||a(n)!==s;return l&&(r=o,n=s),{width:r,height:n,$:l}}function V(e){return L(e)?e:e.contextElement}function q(e){let t=V(e);if(!P(t))return u(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=G(t),s=(o?a(r.width):r.width)/n,l=(o?a(r.height):r.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}let Q=u(0);function Y(e){let t=N(e);return $()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Q}function Z(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let o=e.getBoundingClientRect(),s=V(e),a=u(1);t&&(n?L(n)&&(a=q(n)):a=q(e));let l=(void 0===(i=r)&&(i=!1),n&&(!i||n===N(s))&&i)?Y(s):u(0),c=(o.left+l.x)/a.x,f=(o.top+l.y)/a.y,d=o.width/a.x,h=o.height/a.y;if(s){let e=N(s),t=n&&L(n)?N(n):n,r=e,i=W(r);for(;i&&n&&t!==r;){let e=q(i),t=i.getBoundingClientRect(),n=H(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,f*=e.y,d*=e.x,h*=e.y,c+=o,f+=s,i=W(r=N(i))}}return E({width:d,height:h,x:c,y:f})}function X(e,t){let r=F(e).scrollLeft;return t?t.left+r:Z(O(e)).left+r}function J(e,t,r){void 0===r&&(r=!1);let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:X(e,n)),y:n.top+t.scrollTop}}function ee(e,t,r){let n;if("viewport"===t)n=function(e,t){let r=N(e),n=O(e),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let e=$();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,r);else if("document"===t)n=function(e){let t=O(e),r=F(e),n=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=s(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+X(e),l=-r.scrollTop;return"rtl"===H(n).direction&&(a+=s(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:l}}(O(e));else if(L(t))n=function(e,t){let r=Z(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=P(e)?q(e):u(1),s=e.clientWidth*o.x;return{width:s,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}(t,r);else{let r=Y(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return E(n)}function et(e){return"static"===H(e).position}function er(e,t){if(!P(e)||"fixed"===H(e).position)return null;if(t)return t(e);let r=e.offsetParent;return O(e)===r&&(r=r.ownerDocument.body),r}function en(e,t){let r=N(e);if(_(e))return r;if(!P(e)){let t=K(e);for(;t&&!B(t);){if(L(t)&&!et(t))return t;t=K(t)}return r}let n=er(e,t);for(;n&&["table","td","th"].includes(R(n))&&et(n);)n=er(n,t);return n&&B(n)&&et(n)&&!k(n)?r:n||function(e){let t=K(e);for(;P(t)&&!B(t);){if(k(t))return t;if(_(t))break;t=K(t)}return null}(e)||r}let ei=async function(e){let t=this.getOffsetParent||en,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=P(t),i=O(t),o="fixed"===r,s=Z(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=u(0);if(n||!n&&!o){if(("body"!==R(t)||U(i))&&(a=F(t)),n){let e=Z(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=X(i))}o&&!n&&i&&(l.x=X(i));let c=!i||n||o?u(0):J(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},eo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o="fixed"===i,s=O(n),a=!!t&&_(t.floating);if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=u(1),f=u(0),d=P(n);
8if((d||!d&&!o)&&(("body"!==R(n)||U(s))&&(l=F(n)),P(n))){let e=Z(n);c=q(n),f.x=e.x+n.clientLeft,f.y=e.y+n.clientTop}let h=!s||d||o?u(0):J(s,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+h.x,y:r.y*c.y-l.scrollTop*c.y+f.y+h.y}},getDocumentElement:O,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?_(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=z(e,[],!1).filter(e=>L(e)&&"body"!==R(e)),i=null,o="fixed"===H(e).position,s=o?K(e):e;for(;L(s)&&!B(s);){let t=H(s),r=k(s);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||U(s)&&!r&&function e(t,r){let n=K(t);return!(n===r||!L(n)||B(n))&&("fixed"===H(n).position||e(n,r))}(e,s))?n=n.filter(e=>e!==s):i=t,s=K(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=a[0],u=a.reduce((e,r)=>{let n=ee(t,r,i);return e.top=s(n.top,e.top),e.right=o(n.right,e.right),e.bottom=o(n.bottom,e.bottom),e.left=s(n.left,e.left),e},ee(t,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:en,getElementRects:ei,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=G(e);return{width:t,height:r}},getScale:q,isElement:L,isRTL:function(e){return"rtl"===H(e).direction}};function es(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ea=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:a,platform:l,elements:u,middlewareData:c}=t,{element:f,padding:h=0}=d(e,t)||{};if(null==f)return{};let b=v(h),w={x:r,y:n},E=y(m(i)),x=g(E),S=await l.getDimensions(f),A="y"===E,T=A?"clientHeight":"clientWidth",M=a.reference[x]+a.reference[E]-w[E]-a.floating[x],I=w[E]-a.reference[E],C=await (null==l.getOffsetParent?void 0:l.getOffsetParent(f)),R=C?C[T]:0;R&&await (null==l.isElement?void 0:l.isElement(C))||(R=u.floating[T]||a.floating[x]);let N=R/2-S[x]/2-1,O=o(b[A?"top":"left"],N),D=o(b[A?"bottom":"right"],N),L=R-S[x]-D,P=R/2-S[x]/2+(M/2-I/2),j=s(O,o(P,L)),U=!c.arrow&&null!=p(i)&&P!==j&&a.reference[x]/2-(P<O?O:D)-S[x]/2<0,_=U?P<O?P-O:P-L:0;return{[E]:w[E]+_,data:{[E]:j,centerOffset:P-j-_,...U&&{alignmentOffset:_}},reset:U}}}),el=(e,t,r)=>{let n=new Map,i={platform:eo,...r},o={...i.platform,_c:n};return S(e,t,{...i,platform:o})};var eu=r(54887),ec="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function ef(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!ef(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!ef(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function ed(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eh(e,t){let r=ed(e);return Math.round(t*r)/r}function ep(e){let t=n.useRef(e);return ec(()=>{t.current=e}),t}let ey=e=>({name:"arrow",options:e,fn(t){let{element:r,padding:n}="function"==typeof e?e(t):e;return r&&({}).hasOwnProperty.call(r,"current")?null!=r.current?ea({element:r.current,padding:n}).fn(t):{}:r?ea({element:r,padding:n}).fn(t):{}}}),eg=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:s,middlewareData:a}=t,l=await I(t,e);return s===(null==(r=a.offset)?void 0:r.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}}(e),options:[e,t]}),em=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...c}=d(e,t),f={x:r,y:n},p=await A(t,c),g=m(h(i)),b=y(g),w=f[b],v=f[g];if(a){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",r=w+p[e],n=w-p[t];w=s(r,o(w,n))}if(l){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",r=v+p[e],n=v-p[t];v=s(r,o(v,n))}let E=u.fn({...t,[b]:w,[g]:v});return{...E,data:{x:E.x-r,y:E.y-n,enabled:{[b]:a,[g]:l}}}}}}(e),options:[e,t]}),eb=(e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=d(e,t),c={x:r,y:n},f=m(i),p=y(f),g=c[p],b=c[f],w=d(a,t),v="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){let e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+v.mainAxis,r=o.reference[p]+o.reference[e]-v.mainAxis;g<t?g=t:g>r&&(g=r)}if(u){var E,x;let e="y"===p?"width":"height",t=["top","left"].includes(h(i)),r=o.reference[f]-o.floating[e]+(t&&(null==(E=s.offset)?void 0:E[f])||0)+(t?0:v.crossAxis),n=o.reference[f]+o.reference[e]+(t?0:(null==(x=s.offset)?void 0:x[f])||0)-(t?v.crossAxis:0);b<r?b=r:b>n&&(b=n)}return{[p]:g,[f]:b}}}}(e),options:[e,t]}),ew=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n,i,o,s,a;let{placement:l,middlewareData:u,rects:c,initialPlacement:f,platform:v,elements:E}=t,{mainAxis:x=!0,crossAxis:S=!0,fallbackPlacements:T,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:I="none",flipAlignment:C=!0,...R}=d(e,t);if(null!=(r=u.arrow)&&r.alignmentOffset)return{};let N=h(l),O=m(f),D=h(f)===f,L=await (null==v.isRTL?void 0:v.isRTL(E.floating)),P=T||(D||!C?[w(f)]:function(e){let t=w(e);return[b(e),t,b(t)]}(f)),j="none"!==I;!T&&j&&P.push(...function(e,t,r,n){let i=p(e),o=function(e,t,r){let n=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(r)return t?i:n;return t?n:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(h(e),"start"===r,n);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(b)))),o}(f,C,I,L));let U=[f,...P],_=await A(t,R),k=[],$=(null==(n=u.flip)?void 0:n.overflows)||[];if(x&&k.push(_[N]),S){let e=function(e,t,r){void 0===r&&(r=!1);let n=p(e),i=y(m(e)),o=g(i),s="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=w(s)),[s,w(s)]}(l,c,L);k.push(_[e[0]],_[e[1]])}if($=[...$,{placement:l,overflows:k}],!k.every(e=>e<=0)){let e=((null==(i=u.flip)?void 0:i.index)||0)+1,t=U[e];if(t){let r="alignment"===S&&O!==m(t),n=(null==(s=$[0])?void 0:s.overflows[0])>0;
8if(!r||n)return{data:{index:e,overflows:$},reset:{placement:t}}}let r=null==(o=$.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(M){case"bestFit":{let e=null==(a=$.filter(e=>{if(j){let t=m(e.placement);return t===O||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=f}if(l!==r)return{reset:{placement:r}}}return{}}}}(e),options:[e,t]}),ev=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;let i,a;let{placement:l,rects:u,platform:c,elements:f}=t,{apply:y=()=>{},...g}=d(e,t),b=await A(t,g),w=h(l),v=p(l),E="y"===m(l),{width:x,height:S}=u.floating;"top"===w||"bottom"===w?(i=w,a=v===(await (null==c.isRTL?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(a=w,i="end"===v?"top":"bottom");let T=S-b.top-b.bottom,M=x-b.left-b.right,I=o(S-b[i],T),C=o(x-b[a],M),R=!t.middlewareData.shift,N=I,O=C;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(O=M),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(N=T),R&&!v){let e=s(b.left,0),t=s(b.right,0),r=s(b.top,0),n=s(b.bottom,0);E?O=x-2*(0!==e||0!==t?e+t:s(b.left,b.right)):N=S-2*(0!==r||0!==n?r+n:s(b.top,b.bottom))}await y({...t,availableWidth:O,availableHeight:N});let D=await c.getDimensions(f.floating);return x!==D.width||S!==D.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}),eE=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=d(e,t);switch(n){case"referenceHidden":{let e=T(await A(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:M(e)}}}case"escaped":{let e=T(await A(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:M(e)}}}default:return{}}}}}(e),options:[e,t]}),ex=(e,t)=>({...ey(e),options:[e,t]});var eS=r(25171),eA=r(57437),eT=n.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...o}=e;return(0,eA.jsx)(eS.WV.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,eA.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eT.displayName="Arrow";var eM=r(1584),eI=r(98324),eC=r(75137),eR=r(1336),eN=r(75238),eO="Popper",[eD,eL]=(0,eI.b)(eO),[eP,ej]=eD(eO),eU=e=>{let{__scopePopper:t,children:r}=e,[i,o]=n.useState(null);return(0,eA.jsx)(eP,{scope:t,anchor:i,onAnchorChange:o,children:r})};eU.displayName=eO;var e_="PopperAnchor",ek=n.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:i,...o}=e,s=ej(e_,r),a=n.useRef(null),l=(0,eM.e)(t,a);return n.useEffect(()=>{s.onAnchorChange((null==i?void 0:i.current)||a.current)}),i?null:(0,eA.jsx)(eS.WV.div,{...o,ref:l})});ek.displayName=e_;var e$="PopperContent",[eB,eH]=eD(e$),eF=n.forwardRef((e,t)=>{var r,i,a,u,c,f,d,h;let{__scopePopper:p,side:y="bottom",sideOffset:g=0,align:m="center",alignOffset:b=0,arrowPadding:w=0,avoidCollisions:v=!0,collisionBoundary:E=[],collisionPadding:x=0,sticky:S="partial",hideWhenDetached:A=!1,updatePositionStrategy:T="optimized",onPlaced:M,...I}=e,C=ej(e$,p),[R,N]=n.useState(null),D=(0,eM.e)(t,e=>N(e)),[L,P]=n.useState(null),j=(0,eN.t)(L),U=null!==(d=null==j?void 0:j.width)&&void 0!==d?d:0,_=null!==(h=null==j?void 0:j.height)&&void 0!==h?h:0,k="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},$=Array.isArray(E)?E:[E],B=$.length>0,H={padding:k,boundary:$.filter(eG),altBoundary:B},{refs:F,floatingStyles:K,placement:W,isPositioned:G,middlewareData:q}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:o,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[f,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=n.useState(i);ef(h,i)||p(i);let[y,g]=n.useState(null),[m,b]=n.useState(null),w=n.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),v=n.useCallback(e=>{e!==A.current&&(A.current=e,b(e))},[]),E=s||y,x=a||m,S=n.useRef(null),A=n.useRef(null),T=n.useRef(f),M=null!=u,I=ep(u),C=ep(o),R=ep(c),N=n.useCallback(()=>
8{if(!S.current||!A.current)return;let e={placement:t,strategy:r,middleware:h};C.current&&(e.platform=C.current),el(S.current,A.current,e).then(e=>{let t={...e,isPositioned:!1!==R.current};O.current&&!ef(T.current,t)&&(T.current=t,eu.flushSync(()=>{d(t)}))})},[h,t,r,C,R]);ec(()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let O=n.useRef(!1);ec(()=>(O.current=!0,()=>{O.current=!1}),[]),ec(()=>{if(E&&(S.current=E),x&&(A.current=x),E&&x){if(I.current)return I.current(E,x,N);N()}},[E,x,N,I,M]);let D=n.useMemo(()=>({reference:S,floating:A,setReference:w,setFloating:v}),[w,v]),L=n.useMemo(()=>({reference:E,floating:x}),[E,x]),P=n.useMemo(()=>{let e={position:r,left:0,top:0};if(!L.floating)return e;let t=eh(L.floating,f.x),n=eh(L.floating,f.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...ed(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,L.floating,f.x,f.y]);return n.useMemo(()=>({...f,update:N,refs:D,elements:L,floatingStyles:P}),[f,N,D,L,P])}({strategy:"fixed",placement:y+("center"!==m?"-"+m:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,h=V(e),p=a||u?[...h?z(h):[],...z(t)]:[];p.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),u&&e.addEventListener("resize",r)});let y=h&&f?function(e,t){let r,n=null,i=O(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function u(c,f){void 0===c&&(c=!1),void 0===f&&(f=1),a();let d=e.getBoundingClientRect(),{left:h,top:p,width:y,height:g}=d;if(c||t(),!y||!g)return;let m=l(p),b=l(i.clientWidth-(h+y)),w={rootMargin:-m+"px "+-b+"px "+-l(i.clientHeight-(p+g))+"px "+-l(h)+"px",threshold:s(0,o(1,f))||1},v=!0;function E(t){let n=t[0].intersectionRatio;if(n!==f){if(!v)return u();n?u(!1,n):r=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==n||es(d,e.getBoundingClientRect())||u(),v=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(E,w)}n.observe(e)}(!0),a}(h,r):null,g=-1,m=null;c&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===h&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),r()}),h&&!d&&m.observe(h),m.observe(t));let b=d?Z(e):null;return d&&function t(){let n=Z(e);b&&!es(b,n)&&r(),b=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;p.forEach(e=>{a&&e.removeEventListener("scroll",r),u&&e.removeEventListener("resize",r)}),null==y||y(),null==(e=m)||e.disconnect(),m=null,d&&cancelAnimationFrame(i)}}(...t,{animationFrame:"always"===T})},elements:{reference:C.anchor},middleware:[eg({mainAxis:g+_,alignmentAxis:b}),v&&em({mainAxis:!0,crossAxis:!1,limiter:"partial"===S?eb():void 0,...H}),v&&ew({...H}),ev({...H,apply:e=>{let{elements:t,rects:r,availableWidth:n,availableHeight:i}=e,{width:o,height:s}=r.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(n,"px")),a.setProperty("--radix-popper-available-height","".concat(i,"px")),a.setProperty("--radix-popper-anchor-width","".concat(o,"px")),a.setProperty("--radix-popper-anchor-height","".concat(s,"px"))}}),L&&ex({element:L,padding:w}),eV({arrowWidth:U,arrowHeight:_}),A&&eE({strategy:"referenceHidden",...H})]}),[Q,Y]=eq(W),X=(0,eC.W)(M);(0,eR.b)(()=>{G&&(null==X||X())},[G,X]);let J=null===(r=q.arrow)||void 0===r?void 0:r.x,ee=null===(i=q.arrow)||void 0===i?void 0:i.y,et=(null===(a=q.arrow)||void 0===a?void 0:a.centerOffset)!==0,[er,en]=n.useState();return(0,eR.b)(()=>{R&&en(window.getComputedStyle(R).zIndex)},[R]),(0,eA.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:G?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:er,"--radix-popper-transform-origin":[null===(u=q.transformOrigin)||void 0===u?void 0:u.x,null===(c=q.transformOrigin)||void 0===c?void 0:c.y].join(" "),...(null===(f=q.hide)||void 0===f?void 0:f.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eA.jsx)(eB,{scope:p,placedSide:Q,onArrowChange:P,arrowX:J,arrowY:ee,shouldHideArrow:et,children:(0,eA.jsx)(eS.WV.div,{"data-side":Q,"data-align":Y,...I,ref:D,style:{...I.style,animation:G?void 0:"none"}})})})});eF.displayName=e$;var eK="PopperArrow",ez={top:"bottom",right:"left",bottom:"top",left:"r
8ight"},eW=n.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=eH(eK,r),o=ez[i.placedSide];return(0,eA.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,eA.jsx)(eT,{...n,ref:t,style:{...n.style,display:"block"}})})});function eG(e){return null!==e}eW.displayName=eK;var eV=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i,o,s;let{placement:a,rects:l,middlewareData:u}=t,c=(null===(r=u.arrow)||void 0===r?void 0:r.centerOffset)!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[h,p]=eq(a),y={start:"0%",center:"50%",end:"100%"}[p],g=(null!==(o=null===(n=u.arrow)||void 0===n?void 0:n.x)&&void 0!==o?o:0)+f/2,m=(null!==(s=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==s?s:0)+d/2,b="",w="";return"bottom"===h?(b=c?y:"".concat(g,"px"),w="".concat(-d,"px")):"top"===h?(b=c?y:"".concat(g,"px"),w="".concat(l.floating.height+d,"px")):"right"===h?(b="".concat(-d,"px"),w=c?y:"".concat(m,"px")):"left"===h&&(b="".concat(l.floating.width+d,"px"),w=c?y:"".concat(m,"px")),{data:{x:b,y:w}}}});function eq(e){let[t,r="center"]=e.split("-");return[t,r]}var eQ=eU,eY=ek,eZ=eF,eX=eW},56935:(e,t,r)=>{"use strict";r.d(t,{h:()=>l});var n=r(2265),i=r(54887),o=r(25171),s=r(1336),a=r(57437),l=n.forwardRef((e,t)=>{var r,l;let{container:u,...c}=e,[f,d]=n.useState(!1);(0,s.b)(()=>d(!0),[]);let h=u||f&&(null===(l=globalThis)||void 0===l?void 0:null===(r=l.document)||void 0===r?void 0:r.body);return h?i.createPortal((0,a.jsx)(o.WV.div,{...c,ref:t}),h):null});l.displayName="Portal"},75137:(e,t,r)=>{"use strict";r.d(t,{W:()=>i});var n=r(2265);function i(e){let t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}},75238:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var n=r(2265),i=r(1336);function o(e){let[t,r]=n.useState(void 0);return(0,i.b)(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}},19056:(e,t,r)=>{"use strict";r.d(t,{UQ:()=>ti,n$:()=>tR});var n,i,o,s,a,l,u,c,f,d,h,p,y,g,m,b,w,v,E,x,S,A,T,M,I,C,R=r(73419),N=r(30136),O=r(3877),D=r(76435);!function(e){e[e.Testnet=0x80000000]="Testnet",e[e.Mainnet=1]="Mainnet"}(n||(n={})),function(e){e[e.Mainnet=0]="Mainnet",e[e.Testnet=128]="Testnet"}(i||(i={})),function(e){e[e.Mainnet=0x17000000]="Mainnet",e[e.Testnet=0xff000000]="Testnet"}(o||(o={})),r(30551);let L={referrerPolicy:"origin",headers:{"x-hiro-product":"stacksjs"}};async function P(e,t){let r={};return Object.assign(r,L,t),await fetch(e,r)}let j=["mainnet","testnet","devnet","mocknet"];class U{constructor(e){this.version=i.Mainnet,this.chainId=n.Mainnet,this.bnsLookupUrl="https://api.mainnet.hiro.so",this.broadcastEndpoint="/v2/transactions",this.transferFeeEstimateEndpoint="/v2/fees/transfer",this.transactionFeeEstimateEndpoint="/v2/fees/transaction",this.accountEndpoint="/v2/accounts",this.contractAbiEndpoint="/v2/contracts/interface",this.readOnlyFunctionCallEndpoint="/v2/contracts/call-read",this.isMainnet=()=>this.version===i.Mainnet,this.getBroadcastApiUrl=()=>`${this.coreApiUrl}${this.broadcastEndpoint}`,this.getTransferFeeEstimateApiUrl=()=>`${this.coreApiUrl}${this.transferFeeEstimateEndpoint}`,this.getTransactionFeeEstimateApiUrl=()=>`${this.coreApiUrl}${this.transactionFeeEstimateEndpoint}`,this.getAccountApiUrl=e=>`${this.coreApiUrl}${this.accountEndpoint}/${e}?proof=0`,this.getAccountExtendedBalancesApiUrl=e=>`${this.coreApiUrl}/extended/v1/address/${e}/balances`,this.getAbiApiUrl=(e,t)=>`${this.coreApiUrl}${this.contractAbiEndpoint}/${e}/${t}`,this.getReadOnlyFunctionCallApiUrl=(e,t,r)=>`${this.coreApiUrl}${this.readOnlyFunctionCallEndpoint}/${e}/${t}/${encodeURIComponent(r)}`,this.getInfoUrl=()=>`${this.coreApiUrl}/v2/info`,this.getBlockTimeInfoUrl=()=>`${this.coreApiUrl}
8/extended/v1/info/network_block_times`,this.getPoxInfoUrl=()=>`${this.coreApiUrl}/v2/pox`,this.getRewardsUrl=(e,t)=>{let r=`${this.coreApiUrl}/extended/v1/burnchain/rewards/${e}`;return t&&(r=`${r}?limit=${t.limit}&offset=${t.offset}`),r},this.getRewardsTotalUrl=e=>`${this.coreApiUrl}/extended/v1/burnchain/rewards/${e}/total`,this.getRewardHoldersUrl=(e,t)=>{let r=`${this.coreApiUrl}/extended/v1/burnchain/reward_slot_holders/${e}`;return t&&(r=`${r}?limit=${t.limit}&offset=${t.offset}`),r},this.getStackerInfoUrl=(e,t)=>`${this.coreApiUrl}${this.readOnlyFunctionCallEndpoint} 9 ${e}/${t}/get-stacker-info`,this.getDataVarUrl=(e,t,r)=>`${this.coreApiUrl}/v2/data_var/${e}/${t}/${r}?proof=0`,this.getMapEntryUrl=(e,t,r)=>`${this.coreApiUrl}/v2/map_entry/${e}/${t}/${r}?proof=0`,this.coreApiUrl=e.url,this.fetchFn=e.fetchFn??function(...e){let t,r;let{fetchLib:n,middlewares:i}=(t=P,r=[],e.length>0&&"function"==typeof e[0]&&(t=e.shift()),e.length>0&&(r=e),{fetchLib:t,middlewares:r});return async(e,t)=>{let r={url:e,init:t??{}};for(let e of i)"function"==typeof e.pre&&(r=await Promise.resolve(e.pre({fetch:n,...r}))??r);let o=await n(r.url,r.init);for(let e of i)"function"==typeof e.post&&(o=await Promise.resolve(e.post({fetch:n,url:r.url,init:r.init,response:o?.clone()??o}))??o);return o}}()}getNameInfo(e){let t=`${this.bnsLookupUrl}/v1/names/${e}`;return this.fetchFn(t).then(e=>{if(404===e.status)throw Error("Name not found");if(200===e.status)return e.json();throw Error(`Bad response status: ${e.status}`)}).then(e=>e.address?Object.assign({},e,{address:e.address}):e)}}U.fromName=e=>{switch(e){case"mainnet":return new _;case"testnet":return new k;case"devnet":return new B;case"mocknet":return new $;default:throw Error(`Invalid network name provided. Must be one of the following: ${j.join(", ")}`)}},U.fromNameOrNetwork=e=>"string"!=typeof e&&"version"in e?e:U.fromName(e);class _ extends U{constructor(e){super({url:e?.url??"https://api.mainnet.hiro.so",fetchFn:e?.fetchFn}),this.version=i.Mainnet,this.chainId=n.Mainnet}}class k extends U{constructor(e){super({url:e?.url??"https://api.testnet.hiro.so",fetchFn:e?.fetchFn}),this.version=i.Testnet,this.chainId=n.Testnet}}class $ extends U{constructor(e){super({url:e?.url??"http://localhost:3999",fetchFn:e?.fetchFn}),this.version=i.Testnet,this.chainId=n.Testnet}}let B=$;!function(e){e[e.Mainnet=1]="Mainnet",e[e.Testnet=0x80000000]="Testnet"}(s||(s={})),function(e){e[e.Mainnet=0x17000000]="Mainnet",e[e.Testnet=0xff000000]="Testnet"}(a||(a={})),s.Mainnet,function(e){e[e.Mainnet=0]="Mainnet",e[e.Testnet=128]="Testnet"}(l||(l={})),function(e){e[e.MainnetSingleSig=22]="MainnetSingleSig",e[e.MainnetMultiSig=20]="MainnetMultiSig",e[e.TestnetSingleSig=26]="TestnetSingleSig",e[e.TestnetMultiSig=21]="TestnetMultiSig"}(u||(u={})),l.Mainnet;var H=r(37721),F=r(15822),K=r(1850),z=r(99850),W=r(91608);function G(e){let t=function(e){switch(e.type){case"stx-postcondition":return{type:K.l.PostCondition,conditionType:F.sX.STX,principal:"origin"===e.address?{type:K.l.Principal,prefix:F.m4.Origin}:(0,z.B$)(e.address),conditionCode:c[e.condition],amount:BigInt(e.amount)};case"ft-postcondition":return{type:K.l.PostCondition,conditionType:F.sX.Fungible,principal:"origin"===e.address?{type:K.l.Principal,prefix:F.m4.Origin}:(0,z.B$)(e.address),conditionCode:c[e.condition],amount:BigInt(e.amount),asset:(0,z.GY)(e.asset)};case"nft-postcondition":return{type:K.l.PostCondition,conditionType:F.sX.NonFungible,principal:"origin"===e.address?{type:K.l.Principal,prefix:F.m4.Origin}:(0,z.B$)(e.address),conditionCode:c[e.condition],asset:(0,z.GY)(e.asset),assetName:e.assetId};default:throw Error("Invalid post condition type")}}(e);return(0,W.YM)(t)}!function(e){e[e.eq=1]="eq",e[e.gt=2]="gt",e[e.lt=4]="lt",e[e.gte=3]="gte",e[e.lte=5]="lte",e[e.sent=16]="sent",e[e["not-sent"]=17]="not-sent"}(c||(c={}));var V=r(70604),q=r(35580),Q=r(15048),Y=r(23528),Z=r(3587),X=r(69295),J=r(4762),ee=r(9905);function et(){return{type:K.l.MessageSignature,data:(0,H.ci)(new Uint8Array(F.UE))}}function er(e,t,r,n){let i=(0,z.j3)(0,e,1,[(0,X.NG)(t)]).hash160,o=(0,X.EG)(t)?F.gW.Compressed:F.gW.Uncompressed;return{hashMode:e,signer:i,nonce:(0,H.HN)(r),fee:(0,H.HN)(n),keyEncoding:o,signature:et()}}function en(e){return"signature"in e}function ei(e){return e===F.dO.P2SH||e===F.dO.P2WSH}function eo(e){let t=(0,J.Xh)(e);return t.nonce=0,t.fee=0,en(t)?t.signature=et():t.fields=[],{...t,nonce:BigInt(0),fee:BigInt(0)}}function es(e){return en(e)?function(e){let t=[e.hashMode,(0,H.nr)(e.signer),(0,H.sO)(e.nonce,8),(0,H.sO)(e.fee,8),e.keyEncoding,(0,W.jL)(e.signature)];return(0,H.WW)(t)}(e):function(e){let t=[e.hashMode,(0,H.nr)(e.signer),(0,H.sO)(e.nonce,8),(0,H.sO)(e.fee,8)],r
9=(0,ee.lZ)(e.fields);t.push((0,W.d6)(r));let n=new Uint8Array(2);return(0,V.cQ)(n,e.signaturesRequired,0),t.push(n),(0,H.WW)(t)}(e)}function ea(e){let t=e.readUInt8Enum(F.dO,e=>{throw new Z.xv(`Could not parse ${e} as AddressHashMode`)});return t===F.dO.P2PKH||t===F.dO.P2WPKH?function(e,t){let r=(0,H.ci)(t.readBytes(20)),n=BigInt(`0x${(0,H.ci)(t.readBytes(8))}`),i=BigInt(`0x${(0,H.ci)(t.readBytes(8))}`),o=t.readUInt8Enum(F.gW,e=>{throw new Z.xv(`Could not parse ${e} as PubKeyEncoding`)});if(e===F.dO.P2WPKH&&o!=F.gW.Compressed)throw new Z.xv("Failed to parse singlesig spending condition: incomaptible hash mode and key encoding");return{hashMode:e,signer:r,nonce:n,fee:i,keyEncoding:o,signature:(0,W.FM)(t)}}(t,e):function(e,t){let r=(0,H.ci)(t.readBytes(20)),n=BigInt("0x"+(0,H.ci)(t.readBytes(8))),i=BigInt("0x"+(0,H.ci)(t.readBytes(8))),o=(0,W.nt)(t,K.l.TransactionAuthField).values,s=!1,a=0;for(let e of o)switch(e.contents.type){case K.l.PublicKey:(0,X.EG)(e.contents.data)||(s=!0);break;case K.l.MessageSignature:if(e.pubKeyEncoding===F.gW.Uncompressed&&(s=!0),65536===(a+=1))throw new Z.S6("Failed to parse multisig spending condition: too many signatures")}let l=t.readUInt16BE();if(s&&(e===F.dO.P2WSH||e===F.dO.P2WSHNonSequential))throw new Z.S6("Uncompressed keys are not allowed in this hash mode");return{hashMode:e,signer:r,nonce:n,fee:i,fields:o,signaturesRequired:l}}(t,e)}function el(e,t,r,n){let i=e+(0,H.ci)(new Uint8Array([t]))+(0,H.ci)((0,H.sO)(r,8))+(0,H.ci)((0,H.sO)(n,8));if(49!==(0,H.nr)(i).byteLength)throw Error("Invalid signature hash length");return(0,J.G8)((0,H.nr)(i))}function eu(e,t,r){let n=33+F.UE,i=(0,X.EG)(t.data)?F.gW.Compressed:F.gW.Uncompressed,o=e+(0,J.c1)(i.toString(16))+r,s=(0,H.nr)(o);if(s.byteLength>n)throw Error("Invalid signature hash length");return(0,J.G8)(s)}function ec(e,t,r,n,i,o){let s=el(e,t,r,n),a=(0,X.NG)((0,X.D5)(s,o,i)),l=eu(s,a,o);return{pubKey:a,nextSigHash:l}}function ef(e){return{authType:F.Gr.Standard,spendingCondition:e}}function ed(e,t){return{authType:F.Gr.Sponsored,spendingCondition:e,sponsorSpendingCondition:t||er(F.dO.P2PKH,"0".repeat(66),0,0)}}function eh(e){if(e.spendingCondition)switch(e.authType){case F.Gr.Standard:return ef(eo(e.spendingCondition));case F.Gr.Sponsored:return ed(eo(e.spendingCondition),function(){let e=er(F.dO.P2PKH,"",0,0);return e.signer=(0,ee.Qm)().hash160,e.keyEncoding=F.gW.Compressed,e.signature=et(),e}());default:throw new Z.g9("Unexpected authorization type for signing")}throw Error("Authorization missing SpendingCondition")}class ep{constructor({auth:e,payload:t,postConditions:r=(0,ee.lZ)([]),postConditionMode:n=F.hW.Deny,transactionVersion:i,chainId:o,network:s="mainnet"}){s=(0,q.tn)(s),this.transactionVersion=i??s.transactionVersion,this.chainId=o??s.chainId,this.auth=e,"amount"in t?this.payload={...t,amount:(0,H.HN)(t.amount)}:this.payload=t,this.postConditionMode=n,this.postConditions=r,this.anchorMode=F.u0.Any}signBegin(){let e=(0,J.Xh)(this);return e.auth=eh(e.auth),e.txid()}verifyBegin(){let e=(0,J.Xh)(this);return e.auth=eh(e.auth),e.txid()}verifyOrigin(){return function(e,t){switch(e.authType){case F.Gr.Standard:case F.Gr.Sponsored:var r,n;return r=e.spendingCondition,n=F.Gr.Standard,en(r)?function(e,t,r){let{pubKey:n,nextSigHash:i}=ec(t,r,e.fee,e.nonce,e.keyEncoding,e.signature.data),o=(0,z.j3)(0,e.hashMode,1,[n]).hash160;if(o!==e.signer)throw new Z.S6(`Signer hash does not equal hash of public key(s): ${o} != ${e.signer}`);return i}(r,t,n):function(e,t,r){var n;let i=[],o=t,s=!1,a=0;for(let t of e.fields)switch(t.contents.type){case K.l.PublicKey:(0,X.EG)(t.contents.data)||(s=!0),i.push(t.contents);break;case K.l.MessageSignature:t.pubKeyEncoding===F.gW.Uncompressed&&(s=!0);let{pubKey:n,nextSigHash:l}=ec(o,r,e.fee,e.nonce,t.pubKeyEncoding,t.contents.data);if(ei(e.hashMode)&&(o=l),i.push(n),65536===(a+=1))throw new Z.S6("Too many signatures")}if(ei(e.hashMode)&&a!==e.signaturesRequired||((n=e.hashMode)===F.dO.P2SHNonSequential||n===F.dO.P2WSHNonSequential)&&a<e.signaturesRequired)throw new Z.S6("Incorrect number of signatures");if(s&&(e.hashMode===F.dO.P2WSH||e.hashMode===F.dO.P2WSHNonSequential))throw new Z.S6("Uncompressed keys are not allowed in this hash mode");let l=(0,z.j3)(0,e.hashMode,e.signaturesRequired,i).hash160;if(l!==e.signer)throw new Z.S6(`Signer hash does not equal hash of public key(s): ${l} != ${e.signer}`);return o}(r,t,n);default:throw new Z.g9("Invalid origin auth type")}}(this.auth,this.verifyBegin())}signNextOrigin(e,t){if(void 0===this.auth.spendingCondition)throw Error('"auth.spendingCondition" is undefined');if(void 0===this.auth.authType)throw Error('"auth.authType" is undefined');return this.signAndAppend(this.auth.spendingCondition,e,F.Gr.Standard,t)}signNextSponsor(e,t){if(this.auth.authType===F.Gr.Sponsored)return this.signAndAppend(this.auth.sponsorSpendingCondition,e,F.Gr.Sponsored,t);throw Error('"auth.sponsorSpendingCondition" is undefined')}appendPubkey(e){let t="object"==typeof e&&"type"in e?e:(0,X.NG)(e),r=this.auth.spendingCondition;if(r&&!en(r)){let e=(0,X.EG)(t.data);r.fields.push((0,ee.JT)(e?F.gW.Compressed:F.gW.Uncompressed,t))}
9else throw Error("Can't append public key to a singlesig condition")}signAndAppend(e,t,r,n){let{nextSig:i,nextSigHash:o}=function(e,t,r,n,i){let o=el(e,t,r,n),s=(0,X.fJ)(i,o),a=eu(o,(0,X.NG)((0,X.li)(i)),s);return{nextSig:s,nextSigHash:a}}(t,r,e.fee,e.nonce,n);if(en(e))e.signature=(0,ee.V1)(i);else{let t=(0,X.m2)(n);e.fields.push((0,ee.JT)(t?F.gW.Compressed:F.gW.Uncompressed,(0,ee.V1)(i)))}return o}txid(){let e=this.serializeBytes();return(0,J.G8)(e)}setSponsor(e){if(this.auth.authType!=F.Gr.Sponsored)throw new Z.g9("Cannot sponsor sign a non-sponsored transaction");this.auth=function(e,t){let r={...t,nonce:(0,H.HN)(t.nonce),fee:(0,H.HN)(t.fee)};return{...e,sponsorSpendingCondition:r}}(this.auth,e)}setFee(e){this.auth=function(e,t){switch(e.authType){case F.Gr.Standard:let r={...e.spendingCondition,fee:(0,H.HN)(t)};return{...e,spendingCondition:r};case F.Gr.Sponsored:let n={...e.sponsorSpendingCondition,fee:(0,H.HN)(t)};return{...e,sponsorSpendingCondition:n}}}(this.auth,e)}setNonce(e){this.auth=function(e,t){let r={...e.spendingCondition,nonce:(0,H.HN)(t)};return{...e,spendingCondition:r}}(this.auth,e)}setSponsorNonce(e){if(this.auth.authType!=F.Gr.Sponsored)throw new Z.g9("Cannot sponsor sign a non-sponsored transaction");this.auth=function(e,t){let r={...e.sponsorSpendingCondition,nonce:(0,H.HN)(t)};return{...e,sponsorSpendingCondition:r}}(this.auth,e)}serialize(){return(0,H.ci)(this.serializeBytes())}serializeBytes(){if(void 0===this.transactionVersion)throw new Z.TH('"transactionVersion" is undefined');if(void 0===this.chainId)throw new Z.TH('"chainId" is undefined');if(void 0===this.auth)throw new Z.TH('"auth" is undefined');if(void 0===this.payload)throw new Z.TH('"payload" is undefined');let e=[];e.push(this.transactionVersion);let t=new Uint8Array(4);return(0,V.T4)(t,this.chainId,0),e.push(t),e.push(function(e){let t=[];switch(t.push(e.authType),e.authType){case F.Gr.Standard:t.push(es(e.spendingCondition));break;case F.Gr.Sponsored:t.push(es(e.spendingCondition)),t.push(es(e.sponsorSpendingCondition))}return(0,H.WW)(t)}(this.auth)),e.push(this.anchorMode),e.push(this.postConditionMode),e.push((0,W.d6)(this.postConditions)),e.push((0,W.ZU)(this.payload)),(0,H.WW)(e)}}var ey=r(38608);function eg(e,t){let r=e;if("number"==typeof r){if(!Number.isInteger(r))throw RangeError("Invalid value. Values of type 'number' must be an integer.");if(r>Number.MAX_SAFE_INTEGER)throw RangeError(`Invalid value. Values of type 'number' must be less than or equal to ${Number.MAX_SAFE_INTEGER}. For larger values, try using a BigInt instead.`);return BigInt(r)}if("string"==typeof r){if(r.toLowerCase().startsWith("0x")){let e=r.slice(2);r=eE(e=e.padStart(e.length+e.length%2,"0"))}else try{return BigInt(r)}catch(e){if(e instanceof SyntaxError)throw RangeError(`Invalid value. String integer '${r}' is not finite.`)}}if("bigint"==typeof r)return r;if(r instanceof Uint8Array){var n,i,o;return t?BigInt((n=BigInt(`0x${ev(r)}`),(o=(i=BigInt(8*r.byteLength))-BigInt(1),n&BigInt(1)<<o)?n-(BigInt(1)<<i):n).toString()):BigInt(`0x${ev(r)}`)}if(null!=r&&"object"==typeof r&&"BN"===r.constructor.name)return BigInt(r.toString());throw TypeError("Invalid value type. Must be a number, bigint, integer-string, hex-string, or Uint8Array.")}function em(e,t=8){return("bigint"==typeof e?e:eg(e,!1)).toString(16).padStart(2*t,"0")}function eb(e,t=16){return eE(em(e,t))}let ew=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ev(e){if(!(e instanceof Uint8Array))throw Error("Uint8Array expected");let t="";for(let r of e)t+=ew[r];return t}function eE(e){if("string"!=typeof e)throw TypeError(`hexToBytes: expected string, got ${typeof e}`);let t=(e=e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e).length%2?`0${e}`:e,r=new Uint8Array(t.length/2);for(let e=0;e<r.length;e++){let n=2*e,i=Number.parseInt(t.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");r[e]=i}return r}function ex(e){return new TextEncoder().encode(e)}function eS(e){return!Number.isInteger(e)||e<0||e>255}function eA(e){if(e.some(eS))throw Error("Some values are invalid bytes.");return new Uint8Array(e)}function eT(...e){if(!e.every(e=>e instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>
9e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t}function eM(e){return eT(...e.map(e=>"number"==typeof e?eA([e]):e instanceof Array?eA(e):e))}!function(e){e[e.Testnet=0x80000000]="Testnet",e[e.Mainnet=1]="Mainnet"}(f||(f={})),f.Mainnet,function(e){e[e.Address=0]="Address",e[e.Principal=1]="Principal",e[e.LengthPrefixedString=2]="LengthPrefixedString",e[e.MemoString=3]="MemoString",e[e.AssetInfo=4]="AssetInfo",e[e.PostCondition=5]="PostCondition",e[e.PublicKey=6]="PublicKey",e[e.LengthPrefixedList=7]="LengthPrefixedList",e[e.Payload=8]="Payload",e[e.MessageSignature=9]="MessageSignature",e[e.StructuredDataSignature=10]="StructuredDataSignature",e[e.TransactionAuthField=11]="TransactionAuthField"}(d||(d={})),function(e){e[e.TokenTransfer=0]="TokenTransfer",e[e.SmartContract=1]="SmartContract",e[e.VersionedSmartContract=6]="VersionedSmartContract",e[e.ContractCall=2]="ContractCall",e[e.PoisonMicroblock=3]="PoisonMicroblock",e[e.Coinbase=4]="Coinbase",e[e.CoinbaseToAltRecipient=5]="CoinbaseToAltRecipient",e[e.TenureChange=7]="TenureChange",e[e.NakamotoCoinbase=8]="NakamotoCoinbase"}(h||(h={})),function(e){e[e.Clarity1=1]="Clarity1",e[e.Clarity2=2]="Clarity2",e[e.Clarity3=3]="Clarity3"}(p||(p={})),function(e){e[e.OnChainOnly=1]="OnChainOnly",e[e.OffChainOnly=2]="OffChainOnly",e[e.Any=3]="Any"}(y||(y={}));y.OnChainOnly,y.OffChainOnly,y.Any,y.OnChainOnly,y.OnChainOnly,y.OffChainOnly,y.OffChainOnly,y.Any,y.Any,function(e){e[e.Mainnet=0]="Mainnet",e[e.Testnet=128]="Testnet"}(g||(g={})),g.Mainnet,function(e){e[e.Allow=1]="Allow",e[e.Deny=2]="Deny"}(m||(m={})),function(e){e[e.STX=0]="STX",e[e.Fungible=1]="Fungible",e[e.NonFungible=2]="NonFungible"}(b||(b={})),function(e){e[e.Standard=4]="Standard",e[e.Sponsored=5]="Sponsored"}(w||(w={})),function(e){e[e.SerializeP2PKH=0]="SerializeP2PKH",e[e.SerializeP2SH=1]="SerializeP2SH",e[e.SerializeP2WPKH=2]="SerializeP2WPKH",e[e.SerializeP2WSH=3]="SerializeP2WSH",e[e.SerializeP2SHNonSequential=5]="SerializeP2SHNonSequential",e[e.SerializeP2WSHNonSequential=7]="SerializeP2WSHNonSequential"}(v||(v={})),function(e){e[e.MainnetSingleSig=22]="MainnetSingleSig",e[e.MainnetMultiSig=20]="MainnetMultiSig",e[e.TestnetSingleSig=26]="TestnetSingleSig",e[e.TestnetMultiSig=21]="TestnetMultiSig"}(E||(E={})),function(e){e[e.Compressed=0]="Compressed",e[e.Uncompressed=1]="Uncompressed"}(x||(x={})),function(e){e[e.Equal=1]="Equal",e[e.Greater=2]="Greater",e[e.GreaterEqual=3]="GreaterEqual",e[e.Less=4]="Less",e[e.LessEqual=5]="LessEqual"}(S||(S={})),function(e){e[e.Sends=16]="Sends",e[e.DoesNotSend=17]="DoesNotSend"}(A||(A={})),function(e){e[e.Origin=1]="Origin",e[e.Standard=2]="Standard",e[e.Contract=3]="Contract"}(T||(T={})),function(e){e[e.STX=0]="STX",e[e.Fungible=1]="Fungible",e[e.NonFungible=2]="NonFungible"}(M||(M={})),function(e){e.Serialization="Serialization",e.Deserialization="Deserialization",e.SignatureValidation="SignatureValidation",e.FeeTooLow="FeeTooLow",e.BadNonce="BadNonce",e.NotEnoughFunds="NotEnoughFunds",e.NoSuchContract="NoSuchContract",e.NoSuchPublicFunction="NoSuchPublicFunction",e.BadFunctionArgument="BadFunctionArgument",e.ContractAlreadyExists="ContractAlreadyExists",e.PoisonMicroblocksDoNotConflict="PoisonMicroblocksDoNotConflict",e.PoisonMicroblockHasUnknownPubKeyHash="PoisonMicroblockHasUnknownPubKeyHash",e.PoisonMicroblockIsInvalid="PoisonMicroblockIsInvalid",e.BadAddressVersionByte="BadAddressVersionByte",e.NoCoinbaseViaMempool="NoCoinbaseViaMempool",e.ServerFailureNoSuchChainTip="ServerFailureNoSuchChainTip",e.TooMuchChaining="TooMuchChaining",e.ConflictingNonceInMempool="ConflictingNonceInMempool",e.BadTransactionVersion="BadTransactionVersion",e.TransferRecipientCannotEqualSender="TransferRecipientCannotEqualSender",e.TransferAmountMustBePositive="TransferAmountMustBePositive",e.ServerFailureDatabase="ServerFailureDatabase",e.EstimatorError="EstimatorError",e.TemporarilyBlacklisted="TemporarilyBlacklisted",e.ServerFailureOther="ServerFailureOther"}(I||(I={}));class eI extends Error{constructor(e){super(e),this.message=e,this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class eC extends eI{constructor(e){super(e)}}function eR(e,t,r=0){return e[r+3]=t,t>>>=8,e[r+2]=t,t>>>=8,e[r+1]=t,t>>>=8,e[r]=t,e}r(27457),r(67887),r(65530),r(78967),r(91316),r(4702);let eN=(e,t)=>!!e&&ex(e).length>t;function eO(e,t){return eM([e,t])}function eD(e,t){let r=[],n="ascii"==t?function(e){let t=[];for(let r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return new Uint8Array(t)}(e.data):ex(e.data),i=new Uint8Array(4);return eR(i,n.length,0),r.push(i),r.push(n),eO(e.type,eM(r))}function eL(e){switch(e.type){case C.BoolTrue:case C.BoolFalse:return new Uint8Array([e.type]);case C.OptionalNone:case C.OptionalSome:return e.type===C.OptionalNone?new Uint8Array([e.type]):eO(e.type,eL(e.value));case C.Buffer:return function(e){let t=new Uint8Array(4);return eR(t,e.buffer.length,0),eO(e.type,eT(t,e.buffer))}(e);case C.UInt:return function(e){let t=eb(e.value,16);return eO(e.type,t)}(e);case C.Int:return function(e){let t=eb(function(e,t){if(e<-(BigInt(1)<<t-BigInt(1))||(BigInt(1)<<t-BigInt(1))-BigInt(1)<e)throw`Unable to represent integer in width: ${t}`;return e>=BigInt(0)?BigInt(e):e+(BigInt(1)<<t)}(e.value,BigInt(128)),16);return eO(e.type,t)}(e);case C.PrincipalStandard:return eO(e.type,eP(e.address));case C.PrincipalContract:return eO(e.type,eT(eP(e.address),ej(e.contractName)));case C.ResponseOk:case C.ResponseErr:return eO(e.type,eL(e.value));case C.List:return function(e){let t=[],r=new Uint8Array(4);for(let n of(eR(r,e.list.length,0),t.push(r),e.list)){let e=eL(n);t.push(e)}return eO(e.type,eM(t))}(e);case C.Tuple:return function(e){let t=[],r=new Uint8Array(4);for(let n of(eR(r,Object.keys(e.data).length,0),t.push(r),Object.keys(e.data).sort((e,t)=>
9e.localeCompare(t)))){let r=function(e,t,r){if(eN(e,128))throw Error("String length exceeds maximum bytes 128");return{type:d.LengthPrefixedString,content:e,lengthPrefixBytes:1,maxLengthBytes:128}}(n);t.push(ej(r));let i=eL(e.data[n]);t.push(i)}return eO(e.type,eM(t))}(e);case C.StringASCII:return eD(e,"ascii");case C.StringUTF8:return eD(e,"utf8");default:throw new eC("Unable to serialize. Invalid Clarity Value.")}}function eP(e){let t=[];return t.push(eE(em(e.version,1))),t.push(eE(e.hash160)),eM(t)}function ej(e){let t=[],r=ex(e.content),n=r.byteLength;return t.push(eE(em(n,e.lengthPrefixBytes))),t.push(r),eM(t)}function eU(e,t,r){t=t||1;let n=hexToInt(bytesToHex(e.readBytes(t)));return createLPString(bytesToUtf8(e.readBytes(n)),t,r??128)}!function(e){e[e.Int=0]="Int",e[e.UInt=1]="UInt",e[e.Buffer=2]="Buffer",e[e.BoolTrue=3]="BoolTrue",e[e.BoolFalse=4]="BoolFalse",e[e.PrincipalStandard=5]="PrincipalStandard",e[e.PrincipalContract=6]="PrincipalContract",e[e.ResponseOk=7]="ResponseOk",e[e.ResponseErr=8]="ResponseErr",e[e.OptionalNone=9]="OptionalNone",e[e.OptionalSome=10]="OptionalSome",e[e.List=11]="List",e[e.Tuple=12]="Tuple",e[e.StringASCII=13]="StringASCII",e[e.StringUTF8=14]="StringUTF8"}(C||(C={}));function e_(e){let t=[];if(t.push(e.conditionType),t.push(function(e){let t=[];return t.push(e.prefix),t.push(eP(e.address)),e.prefix===T.Contract&&t.push(ej(e.contractName)),eM(t)}(e.principal)),(e.conditionType===b.Fungible||e.conditionType===b.NonFungible)&&t.push(function(e){let t=[];return t.push(eP(e.address)),t.push(ej(e.contractName)),t.push(ej(e.assetName)),eM(t)}(e.assetInfo)),e.conditionType===b.NonFungible&&t.push(eL(e.assetName)),t.push(e.conditionCode),e.conditionType===b.STX||e.conditionType===b.Fungible){if(e.amount>BigInt("0xffffffffffffffff"))throw new eC("The post-condition amount may not be larger than 8 bytes");t.push(eb(eg(e.amount,!1),8))}return eM(t)}var ek=r(11898);let e$=()=>(0,ek.p)(),eB=(e,t)=>"undefined"==typeof window?Promise.resolve():e$().then(()=>(0,ek.b)([["connect-modal",[[1,"connect-modal",{defaultProviders:[16],installedProviders:[16],persistSelection:[4,"persist-selection"],callback:[16],cancelCallback:[16]}]]]],t));!function(){if("undefined"!=typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}}();var eH=Object.defineProperty,eF=Object.defineProperties,eK=Object.getOwnPropertyDescriptors,ez=Object.getOwnPropertySymbols,eW=Object.prototype.hasOwnProperty,eG=Object.prototype.propertyIsEnumerable,eV=(e,t,r)=>t in e?eH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eq=(e,t)=>{for(var r in t||(t={}))eW.call(t,r)&&eV(e,r,t[r]);if(ez)for(var r of ez(t))eG.call(t,r)&&eV(e,r,t[r]);return e},eQ=(e,t)=>eF(e,eK(t)),eY=(e,t)=>{var r={};for(var n in e)eW.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ez)for(var n of ez(e))0>t.indexOf(n)&&eG.call(e,n)&&(r[n]=e[n]);return r};function eZ(){return(0,D.b)((0,D.c)())||window.StacksProvider||window.BlockstackProvider}function eX(e){return e?"string"==typeof e?U.fromName(e):"version"in e?e:"url"in e?new _({url:e.url}):e.transactionVersion===l.Mainnet?new _({url:e.client.baseUrl}):new k({url:e.client.baseUrl}):new k}"undefined"!=typeof window&&(window.__CONNECT_VERSION__="__VERSION__");var eJ=e=>{if(!e){let t=new R.X(["store_write"],document.location.href);e=new N.V({appConfig:t})}return e},e0=async(e,t=eZ())=>{if(!t)throw Error("[Connect] No installed Stacks wallet found");let{redirectTo:r="/",manifestPath:n,onFinish:i,onCancel:o,sendToSignIn:s=!1,userSession:a,appDetails:l}=e,u=eJ(a);u.isUserSignedIn()&&u.signUserOut();let c=u.generateAndStoreTransitKey(),f=u.makeAuthRequest(c,`${document.location.origin}${r}`,`${document.location.origin}${n}`,u.appConfig.scopes,void 0,void 0,{sendToSignIn:s,appDetails:l,connectVersion:"__VERSION__"});try{let e=await t.authenticationRequest(f);await u.handlePendingSignIn(e);let r=(0,O.decodeToken)(e),n=null==r?void 0:r.payload;null==i||i({authResponse:e,authResponsePayload:n,userSession:u})}catch(e){console.error("[Connect] Error during auth request",e),null==o||o()}},e1=(e=>
9(e.ContractCall="contract_call",e.ContractDeploy="smart_contract",e.STXTransfer="token_transfer",e))(e1||{}),e2=(e=>(e.BUFFER="buffer",e.UINT="uint",e.INT="int",e.PRINCIPAL="principal",e.BOOL="bool",e))(e2||{}),e4=e=>{let t=e;if(!t){let e=new R.X(["store_write"],document.location.href);t=new N.V({appConfig:e})}return t};function e3(e){try{return e4(e).loadUserData().appPrivateKey}catch(e){return!1}}var e8=e=>{let t=e4(e).loadUserData().appPrivateKey,r=O.SECP256K1Client.derivePublicKey(t);return{privateKey:t,publicKey:r}};async function e5(e,t){let{postConditions:r}=e;return r&&r.length>0&&"string"!=typeof r[0]&&(r="string"==typeof r[0].type?r.map(G):r.map(e=>(0,H.ci)(e_(e)))),new O.TokenSigner("ES256k",t).signAsync(eQ(eq({},e),{postConditions:r}))}function e6(e){let{postConditions:t}=e;return t&&t.length>0&&"string"!=typeof t[0]&&(t="string"==typeof t[0].type?t.map(G):t.map(e=>(0,H.ci)(e_(e)))),(0,O.createUnsecuredToken)(eQ(eq({},e),{postConditions:t}))}var e7=async({token:e,options:t},r)=>{var n,i,o;try{let o=await r.transactionRequest(e),{txRaw:s}=o,a=(0,H.nr)(s.replace(/^0x/,"")),l=function(e){let t=(0,H.$O)(e,Y.n)?e:new Y.n(e),r=t.readUInt8Enum(Q.Kn,e=>{throw Error(`Could not parse ${e} as TransactionVersion`)}),n=t.readUInt32BE(),i=function(e){let t;switch(e.readUInt8Enum(F.Gr,e=>{throw new Z.xv(`Could not parse ${e} as AuthType`)})){case F.Gr.Standard:return ef(t=ea(e));case F.Gr.Sponsored:return t=ea(e),ed(t,ea(e))}}(t),o=t.readUInt8Enum(F.u0,e=>{throw Error(`Could not parse ${e} as AnchorMode`)}),s=t.readUInt8Enum(F.hW,e=>{throw Error(`Could not parse ${e} as PostConditionMode`)}),a=(0,W.nt)(t,K.l.PostCondition),l=new ep({transactionVersion:r,chainId:n,auth:i,payload:(0,W.LV)(t),postConditions:a,postConditionMode:s});return l.anchorMode=o,l}(a);if("sponsored"in t&&t.sponsored){null==(n=t.onFinish)||n.call(t,eQ(eq({},o),{stacksTransaction:l}));return}null==(i=t.onFinish)||i.call(t,eQ(eq({},o),{stacksTransaction:l}))}catch(e){console.error("[Connect] Error during transaction request",e),null==(o=t.onCancel)||o.call(t)}},e9=async e=>{let{functionArgs:t,appDetails:r,userSession:n}=e,i=eY(e,["functionArgs","appDetails","userSession"]),o=t.map(e=>"string"==typeof e?e:"string"==typeof e.type?(0,ey.a)(e):(0,H.ci)(eL(e)));if(e3(n)){let{privateKey:e,publicKey:t}=e8(n),s=eQ(eq({},i),{functionArgs:o,txType:"contract_call",publicKey:t});return r&&(s.appDetails=r),e5(s,e)}let s=eQ(eq({},i),{functionArgs:o,txType:"contract_call"});return r&&(s.appDetails=r),e6(s)},te=async e=>{let{appDetails:t,userSession:r}=e,n=eY(e,["appDetails","userSession"]);if(e3(r)){let{privateKey:e,publicKey:i}=e8(r),o=eQ(eq({},n),{publicKey:i,txType:"smart_contract"});return t&&(o.appDetails=t),e5(o,e)}let i=eQ(eq({},n),{txType:"smart_contract"});return t&&(i.appDetails=t),e6(i)},tt=async e=>{let{amount:t,appDetails:r,userSession:n}=e,i=eY(e,["amount","appDetails","userSession"]);if(e3(n)){let{privateKey:e,publicKey:o}=e8(n),s=eQ(eq({},i),{amount:t.toString(10),publicKey:o,txType:"token_transfer"});return r&&(s.appDetails=r),e5(s,e)}let o=eQ(eq({},i),{amount:t.toString(10),txType:"token_transfer"});return r&&(o.appDetails=r),e6(o)},tr=async e=>{let{txHex:t,appDetails:r,userSession:n}=e,i=eY(e,["txHex","appDetails","userSession"]);if(e3(n)){let{privateKey:e,publicKey:o}=e8(n),s=eQ(eq({},i),{txHex:t,publicKey:o});return r&&(s.appDetails=r),e5(s,e)}let o=eQ(eq({},i),{txHex:t});return r&&(o.appDetails=r),e6(o)};async function tn(e,t,r){let n,i,o;return e7({token:await t(eQ(eq(eq({},(n=eX(e.network),i=e4(e.userSession),o=eQ(eq({},e),{network:n,userSession:i}),eq({stxAddress:function(e){var t;let{stxAddress:r,userSession:n,network:i}=e;if(r)return r;if(!n||!i)return;let o=null==(t=null==n?void 0:n.loadUserData().profile)?void 0:t.stxAddress,a={[s.Mainnet]:"mainnet",[s.Testnet]:"testnet"},l=eX(i);return null==o?void 0:o[a[l.chainId]]}(o)},o))),e),{network:eX(e.network)})),options:e},r)}function ti(e,t=eZ()){if(!t)throw Error("[Connect] No installed Stacks wallet found");return tn(e,e9,t)}async function to(e,t){return new O.TokenSigner("ES256k",t).signAsync(eq({},e))}async function ts({token:e,options:t},r){var n,i;if(!r)throw Error("[Connect] No installed Stacks wallet found");
9try{let i=await r.psbtRequest(e);null==(n=t.onFinish)||n.call(t,i)}catch(e){console.error("[Connect] Error during psbt request",e),null==(i=t.onCancel)||i.call(t)}}var ta=async e=>{let{allowedSighash:t,hex:r,signAtIndex:n,userSession:i}=e,o=eY(e,["allowedSighash","hex","signAtIndex","userSession"]);if(e3(i)){let{privateKey:e,publicKey:s}=e8(i);return to(eQ(eq({},o),{allowedSighash:t,hex:r,signAtIndex:n,publicKey:s}),e)}let s=eq({},o);return(0,O.createUnsecuredToken)(s)};async function tl(e,t,r){let n,i,o;return ts({token:await t(eq(eq({},(n=eX(e.network),i=e4(e.userSession),o=eQ(eq({},e),{network:n,userSession:i}),eq({},o))),e)),options:e},r)}async function tu(e,t){return new O.TokenSigner("ES256k",t).signAsync(eq({},e))}function tc(e){let t=eX(e.network),r=e4(e.userSession),n=eQ(eq({},e),{network:t,userSession:r});return eq({stxAddress:function(e){var t;let{userSession:r,network:n}=e;if(!r||!n)return;let i=null==(t=null==r?void 0:r.loadUserData().profile)?void 0:t.stxAddress,o={[s.Mainnet]:"mainnet",[s.Testnet]:"testnet"},a=eX(n);return null==i?void 0:i[o[a.chainId]]}(n)},n)}async function tf({token:e,options:t},r){var n,i;try{let i=await r.signatureRequest(e);null==(n=t.onFinish)||n.call(t,i)}catch(e){console.error("[Connect] Error during signature request",e),null==(i=t.onCancel)||i.call(t)}}var td=async e=>{let{userSession:t}=e,r=eY(e,["userSession"]);if(e3(t)){let{privateKey:e,publicKey:n}=e8(t);return tu(eQ(eq({},r),{publicKey:n}),e)}let n=eq({},r);return(0,O.createUnsecuredToken)(n)};async function th(e,t,r){return tf({token:await t(eq(eq({},tc(e)),e)),options:e},r)}async function tp(e,t,r){return tb({token:await t(eq(eq({},tc(e)),e)),options:e},r)}function ty(e){let{message:t,domain:r}=e;return"string"==typeof t.type&&"string"==typeof r.type?eQ(eq({},e),{message:(0,ey.a)(t),domain:(0,ey.a)(r)}):eQ(eq({},e),{message:(0,H.ci)(eL(t)),domain:(0,H.ci)(eL(r))})}async function tg(e,t){return new O.TokenSigner("ES256k",t).signAsync(ty(e))}async function tm(e){let{userSession:t}=e,r=eY(e,["userSession"]);if(e3(t)){let{privateKey:e,publicKey:n}=e8(t);return tg(eQ(eq({},r),{publicKey:n}),e)}return(0,O.createUnsecuredToken)(ty(e))}async function tb({token:e,options:t},r){var n,i;try{let i=await r.structuredDataSignatureRequest(e);null==(n=t.onFinish)||n.call(t,i)}catch(e){console.error("[Connect] Error during signature request",e),null==(i=t.onCancel)||i.call(t)}}async function tw(e,t){return new O.TokenSigner("ES256k",t).signAsync(eq({},e))}async function tv({token:e,options:t},r){var n,i;try{let i=await r.profileUpdateRequest(e);null==(n=t.onFinish)||n.call(t,i)}catch(e){console.error("[Connect] Error during signature request",e),null==(i=t.onCancel)||i.call(t)}}var tE=async e=>{let{userSession:t,profile:r}=e,n=eY(e,["userSession","profile"]);if(e3(t)){let{privateKey:e,publicKey:i}=e8(t);return tw(eQ(eq({},n),{profile:r,publicKey:i}),e)}let i=eq({},n);return(0,O.createUnsecuredToken)(i)};async function tx(e,t,r){let n,i,o;return tv({token:await t(eq(eq({},(n=eX(e.network),i=e4(e.userSession),o=eQ(eq({},e),{network:n,userSession:i}),eq({},o))),e)),options:e},r)}var tS=(e=>(e[e.DEFAULT=0]="DEFAULT",e[e.ALL=1]="ALL",e[e.NONE=2]="NONE",e[e.SINGLE=3]="SINGLE",e[e.ANYONECANPAY=128]="ANYONECANPAY",e))(tS||{}),tA="asigna-stx",tT=(e,t)=>new Promise(r=>{window.addEventListener("message",function e(n){n.data.source===tA&&n.data[t]&&(r(n.data[t]),window.removeEventListener("message",e))}),window.top.postMessage(tM(e,t),"*")}),tM=(e,t)=>({source:tA,[t]:e});"undefined"!=typeof window&&window.top!==window.self&&(window.AsignaProvider={authenticationRequest:async e=>tT(e,"authenticationRequest"),transactionRequest:async e=>tT(e,"transactionRequest")});var tI=[{id:"LeatherProvider",name:"Leather",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiByeD0iMjYuODM4NyIgZmlsbD0iIzEyMTAwRiIvPgo8cGF0aCBkPSJNNzQuOTE3MSA1Mi43MTE0QzgyLjQ3NjYgNTEuNTQwOCA5My40MDg3IDQzLjU4MDQgOTMuNDA4NyAzNy4zNzYxQzkzLjQwODcgMzUuNTAzMSA5MS44OTY4IDM0LjIxNTQgODkuNjg3MSAzNC4yMTU0Qzg1LjUwMDQgMzQuMjE1NCA3OC40MDYxIDQwLjUzNjggNzQuOTE3MSA1Mi43MTE0Wk0zOS45MTEgODMuNDk5MUMzMC4wMjU2IDgzLjQ5OTEgMjkuMjExNSA5My4zMzI0IDM5LjA5NjkgOTMuMzMyNEM0My41MTYzIDkzLjMzMjQgNDguODY2MSA5MS41NzY0IDUxLjY1NzMgODguNDE1N0M0Ny41ODY4IDg0LjkwMzggNDQuMjE0MSA4My40OTkxIDM5LjkxMSA4My40OTkxWk0xMDIuODI5IDc5LjI4NDhDMTAzLjQxIDk1Ljc5MDcgOTUuMDM2OSAxMDUuMDM5IDgwLjg0ODQgMTA1LjAzO
9UM3Mi40NzQ4IDEwNS4wMzkgNjguMjg4MSAxMDEuODc4IDU5LjMzMyA5Ni4wMjQ5QzU0LjY4MSAxMDEuMTc2IDQ1Ljg0MjMgMTA1LjAzOSAzOC41MTU0IDEwNS4wMzlDMTMuMjc4NSAxMDUuMDM5IDE0LjMyNTIgNzIuODQ2MyA0MC4wMjczIDcyLjg0NjNDNDUuMzc3MSA3Mi44NDYzIDQ5LjkxMjggNzQuMjUxMSA1NS43Mjc3IDc3Ljg4TDU5LjU2NTYgNjQuNDE3N0M0My43NDg5IDYwLjA4NjQgMzUuODQwNSA0Ny45MTE4IDQzLjYzMjYgMzAuNDY5M0g1Ni4xOTI5QzQ5LjIxNSA0Mi4wNTg2IDUzLjk4MzIgNTEuNjU3OCA2Mi44MjIgNTIuNzExNEM2Ny41OTAzIDM1LjczNzIgNzcuODI0NiAyMi41MDkgOTEuNDMxNiAyMi41MDlDOTkuMTA3NCAyMi41MDkgMTA1LjE1NSAyNy41NDI4IDEwNS4xNTUgMzYuNjczN0MxMDUuMTU1IDUxLjMwNjYgODYuMDgxOSA2My4yNDcxIDcxLjY2MDcgNjQuNDE3N0w2NS43Mjk1IDg1LjM3MjFDNzIuNDc0OCA5My4yMTUzIDkxLjE5OSAxMDAuODI0IDkxLjE5OSA3OS4yODQ4SDEwMi44MjlaIiBmaWxsPSIjRjVGMUVEIi8+Cjwvc3ZnPgo=",webUrl:"https://leather.io",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/hiro-wallet/ldinpeekobnhjjdofggfgjlcehhmanlj",mozillaAddOnsUrl:"https://leather.io/install-extension"},{id:"XverseProviders.StacksProvider",name:"Xverse Wallet",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMxNzE3MTciIGQ9Ik0wIDBoNjAwdjYwMEgweiIvPjxwYXRoIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTQ0MCA0MzUuNHYtNTFjMC0yLS44LTMuOS0yLjItNS4zTDIyMCAxNjIuMmE3LjYgNy42IDAgMCAwLTUuNC0yLjJoLTUxLjFjLTIuNSAwLTQuNiAyLTQuNiA0LjZ2NDcuM2MwIDIgLjggNCAyLjIgNS40bDc4LjIgNzcuOGE0LjYgNC42IDAgMCAxIDAgNi41bC03OSA3OC43Yy0xIC45LTEuNCAyLTEuNCAzLjJ2NTJjMCAyLjQgMiA0LjUgNC42IDQuNUgyNDljMi42IDAgNC42LTIgNC42LTQuNlY0MDVjMC0xLjIuNS0yLjQgMS40LTMuM2w0Mi40LTQyLjJhNC42IDQuNiAwIDAgMSA2LjQgMGw3OC43IDc4LjRhNy42IDcuNiAwIDAgMCA1LjQgMi4yaDQ3LjVjMi41IDAgNC42LTIgNC42LTQuNloiLz48cGF0aCBmaWxsPSIjRUU3QTMwIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0zMjUuNiAyMjcuMmg0Mi44YzIuNiAwIDQuNiAyLjEgNC42IDQuNnY0Mi42YzAgNCA1IDYuMSA4IDMuMmw1OC43LTU4LjVjLjgtLjggMS4zLTIgMS4zLTMuMnYtNTEuMmMwLTIuNi0yLTQuNi00LjYtNC42TDM4NCAxNjBjLTEuMiAwLTIuNC41LTMuMyAxLjNsLTU4LjQgNTguMWE0LjYgNC42IDAgMCAwIDMuMiA3LjhaIi8+PC9nPjwvc3ZnPg==",webUrl:"https://xverse.app",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg",googlePlayStoreUrl:"https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse",iOSAppStoreUrl:"https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513",mozillaAddOnsUrl:"https://www.xverse.app/download"},{id:"AsignaProvider",name:"Asigna Multisig",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMDEwMCIgZD0iTTAgMGgzMnYzMkgweiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNS4xMSA1LjU1YTMgMyAwIDAgMC0xLjgyIDEuM2wtLjA1LjA4LS40My43Mi0uMDcuMTEtLjUuODUtLjA1LjA5LTEuMjkgMi4xOC0uMDQuMDctLjQ3LjgtLjA2LjEtLjQ2Ljc4LS4wNy4xMS0xLjYzIDIuNzYtLjA3LjExLS4zOC42Ni0uMDUuMDgtLjczIDEuMjQtLjM1LjYtLjQuNjctLjA1LjA5TDUuMSAyMC43bC0uMTEuMTgtLjE0LjIzLS4wNy4xMy0uMzMuNTUtLjA0LjA3di4wMWExLjI2IDEuMjYgMCAwIDAtLjE0LjQ3IDEuMzEgMS4zMSAwIDAgMCAxLjI0IDEuNGgxLjVsLjA1LS4wNi4wNC0uMDYuODctMS4yMS4wNS0uMDguNzctMS4wNy4wNS0uMDcuNC0uNTcuMDUtLjA2LjI0LS4zNGExLjUyIDEuNTIgMCAwIDEgMS4zOS0uNjIgMS41IDEuNSAwIDAgMSAuNjQuMiAxLjQ3IDEuNDcgMCAwIDEgLjczIDEuMjcgMS40NCAxLjQ0IDAgMCAxLS4yNy44NGwtLjYzLjg4LS4wNS4wNy0uMzIuNDUtLjA2LjA4LS4wOC4xMi0uMTIuMTYtLjA1LjA4aDIuMTNhMi4zMiAyLjMyIDAgMCAwIDEuNzctLjk2bDEuMTgtMS42My43Ny0xLjA4IDEuMy0xLjhhMS4yNCAxLjI0IDAgMCAxIC41NS0uNDNsLjA4LS4wM2ExLjMgMS4zIDAgMCAxIC4zLS4wNiAxLjI4IDEuMjggMCAwIDEgMS4xNS41NGwuMTEuMmExLjEzIDEuMTMgMCAwIDEgLjEuNDEgMS4xOSAxLjE5IDAgMCAxLS4yMy43N2wtLjAzLjA1LS41Ny44LS43Ljk4LS4yNy4zN2ExLjIyIDEuMjIgMCAwIDAtLjIuNSAxLjA1IDEuMDUgMCAwIDAtLjAyLjIzdi4wNmExLjE3IDEuMTcgMCAwIDAgLjE0LjQzbC4wMi4wNS4wNy4xYTEuNDQgMS40NCAwIDAgMCAuMS4xMWwuMDUuMDYuMDEuMDFhMS44IDEuOCAwIDAgMCAuMTQuMWMwIC4wMi4wMi4wMy4wNC4wM2ExIDEgMCAwIDAgLjA4LjA1bC4wNy4wNGExLjI1IDEuMjUgMCAwIDAgLjUuMWg2LjljLjEgMCAuMi0uMDEuMjktLjAzbC4wNi0uMDJhMS4yNyAxLjI3IDAgMCAwIC4yNy0uMS41Ny41NyAwIDAgMCAuMDctLjAzIDEuMjEgMS4yMSAwIDAgMCAuMjYtLjE5bC4wOC0uMDdhLjkyLjkyIDAgMCAwIC4xNS0uMTkgMS41NSAxLjU1IDAgMCAwIC4wOS0uMTdsLjAyLS4wNWExLjIyIDEuMjIgMCAwIDAgLjA4LS4yNnYtLjA0bC4wMi0uMDh2LS4wOGExLjMyIDEuMzIgMCAwIDAtLjItLjc0bC0xLjYtMi42NC0uMDYtLjEtLjItLjMyLS4zMy0uNTR2LS4wMWwtLjA1LS4wOC0xLjMtMi4xNS0uMDctLjEtLjA0LS4wNi0uOC0xLjMyLS4wNC0uMDctLjItLjM0LS4xLS4xNC0uMS0uMTYtLjUzLS45LS4xMy0uMi0uMDktLjE0LTIuMTctMy41Ny0uMDQtLjA3LS43Mi0xLjE5LS4wNS0uMDctLjQtLjY1YTIuNjUgMi42NSAwIDAgMC0uMy0uNCAyLjk2IDIuOTYgMCAwIDAtLjk3LS43NCAzLjA0IDMuMDQgMCAwIDAtMS4zLS4zYy0uMjUgMC0uNS4wNC0uNzQuMVoiLz48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMTkgMTYuM2E1LjQ1IDUuNDUgMCAwIDAtLjgzIDEuNTZsLS4wNC4xNWExLjM2IDEuMzYgMCAwIDEgLjI4LS4xNiAxLjI0IDEuMjQgMCAwIDEgLjM4LS4wOGguMWExLjI4IDEuMjggMCAwIDEgMS4wNS41NGMuMDQuMDYuMDguMTMuMS4yYTEuMjQgMS4yNCAwIDAgMSAuMDkuMjcgMS4xOSAxLjE5IDAgMCAxLS4yLjkxbC0uMDQuMDUtLjU3Ljc5LS43Ljk5LS4yNy4zN2ExLjIzIDEuMjMgMCAwIDAtLjIuNDIgMS4wNiAxLjA2IDAgMCAwLS4wMi4zMXYuMDZhMS4xNyAxLjE3IDAgMCAwIC4xNi40Ny45My45MyAwIDAgMCAuMDcuMSAxLjUgMS41IDAgMCAwIC4xLjEybC4wNS4wNmguMDFhMS45NCAxLjk0IDAgMCAwIC4wOS4wOCAxIDEgMCAwIDAgLjE3LjFsLjA3LjA0YTEuMjUgMS4yNSAwIDAgMCAuNS4xaDYuOWMuMSAwIC4yIDAgLjI4LS4wMmwuMDctLjAyYTEuMzIgMS4zMiAwIDAgMCAuMzQtLjEzbC4xNi0uMS4wMy0uMDNhMS4yOSAxLjI5IDAgMCAwIC4yLS4yIDIuNDMgMi40MyAwIDAgMCAuMTItLjE3Yy4wMy0uMDMuMDUtLjA4LjA3LS4xMmwuMDItLjA1YTEuMjEgMS4yMSAwIDAgMCAuMDktLjN2LS4wOGwuMDEtLjA5YTEuMzIgMS4zMiAwIDAgMC0uMi0uNzNsLTEuNi0yLjY0LS4wNi0uMS0uMi0uMzItLjMzLS41NHYtLjAybC0uMDUtLjA3LTEuMy0yLjE1LS4xMi0uMDctLjA3LS4wNGE0Ljk0IDQuOTQgMCAwIDAtMi40Ni0uNjdjLTEuMDMgMC0xLjc2LjU3LTIuMjYgMS4yWiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xMi4yOSAyMS4wOGMwIC4yOS0uMDkuNTgtLjI3Ljg0bC0xLjMxIDEuODRIN2wyLjUyLTMuNTNhMS41NCAxLjU0IDAgMCAxIDIuMS0uMzZjLjQzLjI4LjY2Ljc0LjY2IDEuMloiLz48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTEuMTYgMjEuMjVhLjU2LjU2IDAgMCAxLS41Ny41NS41Ni41NiAwIDAgMS0uNTctLjU2LjU2LjU2IDAgMCAxIC41Ny0uNTUuNTYuNTYgMCAwIDEgLjU3LjU2WiIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgeDE9IjE1LjIzIiB4Mj0iMTkuMyIgeTE9IjI1Ljc4IiB5Mj0iNi4xMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM2NTIyRjQiLz48c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzlCNkJGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0E1ODVGRiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iMjIuNTkiIHgyPSIyNC44IiB5MT0iMjQuNzEiIHkyPSIxNS41MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM0MjFGOEIiLz48c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzcyMzBGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzk3NzNGRiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==",webUrl:"https://asigna.io",chromeWebStoreUrl:"https://stx.asigna.io/"}];function tC(e,t=!0){return function(r,n){var i;if(n)return e(r,n);let o=(0,D.c)(),s=eZ();if(o&&s)return e(r,s);if("undefined"==typeof window)return;eB(window);let a=null!=(i=null==r?void 0:r.defaultProviders)?i:tI,l=(0,D.a)(a),u=d
9ocument.createElement("connect-modal");u.defaultProviders=a,u.installedProviders=l,u.persistSelection=t;let c=document.body.style.overflow;document.body.style.overflow="hidden";let f=()=>{u.remove(),document.body.style.overflow=c};u.callback=t=>{f(),e(r,t)},u.cancelCallback=()=>{var e;f(),null==(e=r.onCancel)||e.call(r)},document.body.appendChild(u);let d=e=>{"Escape"===e.key&&(document.removeEventListener("keydown",d),u.remove())};document.addEventListener("keydown",d)}}var tR=tC(e0,!1);tC(function(e,t=eZ()){if(!t)throw Error("[Connect] No installed Stacks wallet found");return tn(e,tt,t)}),tC(ti),tC(function(e,t=eZ()){if(!t)throw Error("[Connect] No installed Stacks wallet found");return tn(e,te,t)}),tC(function(e,t=eZ()){if(!t)throw Error("[Connect] No installed Stacks wallet found");return tn(e,tr,t)}),tC(function(e,t=eZ()){return tl(e,ta,t)}),tC(function(e,t=eZ()){if(!t)throw Error("[Connect] No installed Stacks wallet found");return tx(e,tE,t)}),tC(function(e,t=eZ()){if(!t)throw Error("[Connect] No installed Stacks wallet found");return th(e,td,t)}),tC(function(e,t=eZ()){if(!t)throw Error("[Connect] No installed Stacks wallet found");return tp(e,tm,t)})},34939:(e,t,r)=>{"use strict";r.d(t,{j:()=>o});var n=r(49010),i=r(56298),o=new class extends n.l{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!i.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}}},69948:(e,t,r)=>{"use strict";r.d(t,{Vr:()=>i});var n=e=>setTimeout(e,0),i=function(){let e=[],t=0,r=e=>{e()},i=e=>{e()},o=n,s=n=>{t?e.push(n):o(()=>{r(n)})},a=()=>{let t=e;e=[],t.length&&o(()=>{i(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||a()}return r},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{o=e}}}()},49937:(e,t,r)=>{"use strict";r.d(t,{N:()=>o});var n=r(49010),i=r(56298),o=new class extends n.l{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!i.sk&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}}},2459:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,z:()=>l});var n=r(56298),i=r(69948),o=r(30924),s=r(43494),a=class extends s.F{#i;#o;#s;#a;#l;#u;#c;constructor(e){super(),this.#c=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#s=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#s.remove(this)}setData(e,t){let r=(0,n.oE)(this.state.data,e,this.options);return this.#f({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#l?.promise;return this.#l?.cancel(e),t?t.then(n.ZT).catch(n.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some(e=>!1!==(0,n.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===n.CN||this.state.dataUpdateCount+this.state.errorUpdate
9Count===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,n.Kp)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.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.#l&&(this.#c?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#f({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#c=!0,r.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:()=>{let e=(0,n.cG)(this.options,t),r={client:this.#a,queryKey:this.queryKey,meta:this.meta};return(i(r),this.#c=!1,this.options.persister)?this.options.persister(e,r,this):e(r)}};i(s),this.options.behavior?.onFetch(s,this),this.#o=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#f({type:"fetch",meta:s.fetchOptions?.meta});let a=e=>{(0,o.DV)(e)&&e.silent||this.#f({type:"error",error:e}),(0,o.DV)(e)||(this.#s.config.onError?.(e,this),this.#s.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#l=(0,o.Mz)({initialPromise:t?.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e){a(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){a(e);return}this.#s.config.onSuccess?.(e,this),this.#s.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:a,onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}),this.#l.start()}#f(e){this.state=(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":return{...t,...l(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if((0,o.DV)(r)&&r.revert&&this.#o)return{...this.#o,fetchStatus:"idle"};return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.Vr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function l(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,o.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},43494:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var n=r(56298),i=class{#d;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.PN)(this.gcTime)&&(this.#d=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n.sk?1/0:3e5))}clearGcTimeout(){this.#d&&(clearTimeout(this.#d),this.#d=void 0)}}},30924:(e,t,r)=>{"use strict";r.d(t,{DV:()=>c,Kw:()=>l,Mz:()=>f});var n=r(34939),i=r(49937),o=r(56922),s=r(56298);function a(e){return Math.min(1e3*2**e,3e4)}function l(e){return(e??"online")!=="online"||i.N.isOnline()}
9var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){return e instanceof u}function f(e){let t,r=!1,c=0,f=!1,d=(0,o.O)(),h=()=>n.j.isFocused()&&("always"===e.networkMode||i.N.isOnline())&&e.canRun(),p=()=>l(e.networkMode)&&e.canRun(),y=r=>{f||(f=!0,e.onSuccess?.(r),t?.(),d.resolve(r))},g=r=>{f||(f=!0,e.onError?.(r),t?.(),d.reject(r))},m=()=>new Promise(r=>{t=e=>{(f||h())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,f||e.onContinue?.()}),b=()=>{let t;if(f)return;let n=0===c?e.initialPromise:void 0;try{t=n??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(y).catch(t=>{if(f)return;let n=e.retry??(s.sk?0:3),i=e.retryDelay??a,o="function"==typeof i?i(c,t):i,l=!0===n||"number"==typeof n&&c<n||"function"==typeof n&&n(c,t);if(r||!l){g(t);return}c++,e.onFail?.(c,t),(0,s._v)(o).then(()=>h()?void 0:m()).then(()=>{r?g(t):b()})})};return{promise:d,cancel:t=>{f||(g(new u(t)),e.abort?.())},continue:()=>(t?.(),d),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:p,start:()=>(p()?b():m().then(b),d)}}},49010:(e,t,r)=>{"use strict";r.d(t,{l:()=>n});var n=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(){}}},56922:(e,t,r)=>{"use strict";function n(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}r.d(t,{O:()=>n})},56298:(e,t,r)=>{"use strict";r.d(t,{CN:()=>S,Ht:()=>x,KC:()=>l,Kp:()=>a,L3:()=>T,Nc:()=>u,PN:()=>s,Rm:()=>d,SE:()=>o,VS:()=>y,VX:()=>E,X7:()=>f,Ym:()=>h,ZT:()=>i,_v:()=>w,_x:()=>c,cG:()=>A,oE:()=>v,sk:()=>n,to:()=>p});var n="undefined"==typeof window||"Deno"in globalThis;function i(){}function o(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t){return"function"==typeof e?e(t):e}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(n){if(t.queryHash!==d(s,t.options))return!1}else if(!p(t.queryKey,s))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!i||i===t.state.fetchStatus)&&(!o||!!o(t))}function f(e,t){let{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(h(t.options.mutationKey)!==h(o))return!1}else if(!p(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function d(e,t){return(t?.queryKeyHashFn||h)(e)}function h(e){return JSON.stringify(e,(e,t)=>m(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function p(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>p(e[r],t[r]))}function y(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function m(e){if(!b(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(b(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function b(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e){return new Promise(t=>{setTimeout(t,e)})}function v(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=g(t)&&g(r);if(n||m(t)&&m(r)){let i=n?t:Object.keys(t),o=i.length,s=n?r:Object.keys(r),a=s.length,l=n?[]:{},u=0;for(let o=0;o<a;o++){let a=n?o:s[o];(!n&&i.includes(a)||n)&&void 0===t[a]&&void 0===r[a]?(l[a]=void 0,u++):(l[a]=e(t[a],r[a]),l[a]===t[a]&&void 0!==t[a]&&u++)}return o===a&&u===o?t:l}return r}(e,t):t}function E(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function x(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var S=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==S?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function T(e,t){return"function"==typeof e?e(...t):!!e}},93191:(e,t,r)=>{"use strict";r.d(t,{NL:()=>s,aH:()=>a});var n=r(2265),i=r(57437),o=n.createContext(void 0),s=e=>{let t=n.useContext(o);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},a=e=>{let{client:t,children:r}=e;return n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(o.Provider,{value:t,children:r})}},65118:(e,t,r)=>{"use strict";r.d(t,{a:()=>I});var n=r(34939),i=r(69948),o=r(2459),s=r(49010),a=r(56922),l=r(56298),u=class extends s.l{constructor(e,t){super(),this.options=t,this.#a=e,this.#h=null,this.#p=(0,a.O)(),this.options.experimental_prefetchInRender||this.#p.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#a;#y=void 0;#g=void 0;#m=void 0;#b;#w;#p;#h;#v;#E;#x;#S;#A;#T;#M=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#y.addObserver(this),c(this.#y,this.options)?this.#I():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return f(this.#y,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f(this.#y,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#N(),this.#y.removeObserver(this)}setOptions(e){let t=this.options,r=this.#y;if(this.options=this.#a.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,l.Nc)(this.options.enabled,this.#y))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#y.setOptions(this.options),t._defaulted&&!(0,l.VS)(this.options,t)&&this.#a.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#y,observer:this});let n=this.hasListeners();n&&d(this.#y,r,this.options,t)&&this.#I(),this.updateResult(),n&&(this.#y!==r||(0,l.Nc)(this.options.enabled,this.#y)!==(0,l.Nc)(t.enabled,this.#y)||(0,l.KC)(this.options.staleTime,this.#y)!==(0,l.KC)(t.staleTime,this.#y))&&this.#D();let i=this.#L();n&&(this.#y!==r||(0,l.Nc)(this.options.enabled,this.#y)!==(0,l.Nc)(t.enabled,this.#y)||i!==this.#T)&&this.#P(i)}getOptimisticResult(e){let t=this.#a.getQueryCache().build(this.#a,e),r=this.createResult(t,e);return(0,l.VS)(this.getCurrentResult(),r)||(this.#m=r,this.#w=this.options,this.#b=this.#y.state),r}getCurrentResult(){return this.#m}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),Reflect.get(e,r))})}trackProp(e){this.#M.add(e)}getCurrentQuery(){return this.#y}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#a.defaultQueryOptions(e),r=this.#a.getQueryCache().build(this.#a,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#I({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#m))}#I(e){this.#O();let t=this.#y.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l.ZT)),t}#D(){this.#R();let e=(0,l.KC)(this.options.staleTime,this.#y);if(l.sk||this.#m.isStale||!(0,l.PN)(e))return;let t=(0,l.Kp)(this.#m.dataUpdatedAt,e);this.#S=setTimeout(()=>{this.#m.isStale||this.updateResult()},t+1)}#L(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#y):this.options.refetchInterval)??!1}#P(e){this.#N(),this.#T=e,!l.sk&&!1!==(0,l.Nc)(this.options.enabled,this.#y)&&(0,l.PN)(this.#T)&&0!==this.#T&&(this.#A=setInterval(()=>
9{(this.options.refetchIntervalInBackground||n.j.isFocused())&&this.#I()},this.#T))}#C(){this.#D(),this.#P(this.#L())}#R(){this.#S&&(clearTimeout(this.#S),this.#S=void 0)}#N(){this.#A&&(clearInterval(this.#A),this.#A=void 0)}createResult(e,t){let r;let n=this.#y,i=this.options,s=this.#m,u=this.#b,f=this.#w,p=e!==n?e.state:this.#g,{state:y}=e,g={...y},m=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&c(e,t),a=r&&d(e,n,t,i);(s||a)&&(g={...g,...(0,o.z)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:v}=g;r=g.data;let E=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===v){let e;s?.isPlaceholderData&&t.placeholderData===f?.placeholderData?(e=s.data,E=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#x?.state.data,this.#x):t.placeholderData,void 0!==e&&(v="success",r=(0,l.oE)(s?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!E){if(s&&r===u?.data&&t.select===this.#v)r=this.#E;else try{this.#v=t.select,r=t.select(r),r=(0,l.oE)(s?.data,r,t),this.#E=r,this.#h=null}catch(e){this.#h=e}}this.#h&&(b=this.#h,r=this.#E,w=Date.now(),v="error");let x="fetching"===g.fetchStatus,S="pending"===v,A="error"===v,T=S&&x,M=void 0!==r,I={status:v,fetchStatus:g.fetchStatus,isPending:S,isSuccess:"success"===v,isError:A,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:x,isRefetching:x&&!S,isLoadingError:A&&!M,isPaused:"paused"===g.fetchStatus,isPlaceholderData:m,isRefetchError:A&&M,isStale:h(e,t),refetch:this.refetch,promise:this.#p};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===I.status?e.reject(I.error):void 0!==I.data&&e.resolve(I.data)},r=()=>{t(this.#p=I.promise=(0,a.O)())},i=this.#p;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":("error"===I.status||I.data!==i.value)&&r();break;case"rejected":("error"!==I.status||I.error!==i.reason)&&r()}}return I}updateResult(){let e=this.#m,t=this.createResult(this.#y,this.options);this.#b=this.#y.state,this.#w=this.options,void 0!==this.#b.data&&(this.#x=this.#y),(0,l.VS)(t,e)||(this.#m=t,this.#j({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#M.size)return!0;let n=new Set(r??this.#M);return this.options.throwOnError&&n.add("error"),Object.keys(this.#m).some(t=>this.#m[t]!==e[t]&&n.has(t))})()}))}#O(){let e=this.#a.getQueryCache().build(this.#a,this.options);if(e===this.#y)return;let t=this.#y;this.#y=e,this.#g=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#j(e){i.Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#m)}),this.#a.getQueryCache().notify({query:this.#y,type:"observerResultsUpdated"})})}};function c(e,t){return!1!==(0,l.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&f(e,t,t.refetchOnMount)}function f(e,t,r){if(!1!==(0,l.Nc)(t.enabled,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&h(e,t)}return!1}function d(e,t,r,n){return(e!==t||!1===(0,l.Nc)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&h(e,r)}function h(e,t){return!1!==(0,l.Nc)(t.enabled,e)&&e.isStaleByTime((0,l.KC)(t.staleTime,e))}var p=r(2265),y=r(93191);r(57437);var g=p.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),m=()=>p.useContext(g),b=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},w=e=>{p.useEffect(()=>{e.clearReset()},[e])},v=e=>{let{result:t,errorResetBoundary:r,throwOnError:n,query:i,suspense:o}=e;return t.isError&&!r.isReset()&&!t.isFetching&&i&&(o&&void 0===t.data||(0,l.L3)(n,[t.error,i]))},E=p.createContext(!1),x=()=>p.useContext(E);E.Provider;var S=e=>{let t=e.staleTime;e.suspense&&(e.staleTime="function"==typeof t?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},A=(e,t)=>
9e.isLoading&&e.isFetching&&!t,T=(e,t)=>e?.suspense&&t.isPending,M=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function I(e,t){return function(e,t,r){var n,o,s,a,u;let c=(0,y.NL)(r),f=x(),d=m(),h=c.defaultQueryOptions(e);null===(o=c.getDefaultOptions().queries)||void 0===o||null===(n=o._experimental_beforeQuery)||void 0===n||n.call(o,h),h._optimisticResults=f?"isRestoring":"optimistic",S(h),b(h,d),w(d);let g=!c.getQueryCache().get(h.queryHash),[E]=p.useState(()=>new t(c,h)),I=E.getOptimisticResult(h),C=!f&&!1!==e.subscribed;if(p.useSyncExternalStore(p.useCallback(e=>{let t=C?E.subscribe(i.Vr.batchCalls(e)):l.ZT;return E.updateResult(),t},[E,C]),()=>E.getCurrentResult(),()=>E.getCurrentResult()),p.useEffect(()=>{E.setOptions(h)},[h,E]),T(h,I))throw M(h,E,d);if(v({result:I,errorResetBoundary:d,throwOnError:h.throwOnError,query:c.getQueryCache().get(h.queryHash),suspense:h.suspense}))throw I.error;if(null===(a=c.getDefaultOptions().queries)||void 0===a||null===(s=a._experimental_afterQuery)||void 0===s||s.call(a,h,I),h.experimental_prefetchInRender&&!l.sk&&A(I,f)){let e=g?M(h,E,d):null===(u=c.getQueryCache().get(h.queryHash))||void 0===u?void 0:u.promise;null==e||e.catch(l.ZT).finally(()=>{E.updateResult()})}return h.notifyOnChangeProps?I:E.trackResult(I)}(e,u,t)}},38472:(e,t,r)=>{"use strict";let n;r.d(t,{Z:()=>tu});var i,o,s,a={};function l(e,t){return function(){return e.apply(t,arguments)}}r.r(a),r.d(a,{hasBrowserEnv:()=>ed,hasStandardBrowserEnv:()=>ep,hasStandardBrowserWebWorkerEnv:()=>ey,navigator:()=>eh,origin:()=>eg});var u=r(20357);let{toString:c}=Object.prototype,{getPrototypeOf:f}=Object,{iterator:d,toStringTag:h}=Symbol,p=(e=>t=>{let r=c.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),y=e=>(e=e.toLowerCase(),t=>p(t)===e),g=e=>t=>typeof t===e,{isArray:m}=Array,b=g("undefined"),w=y("ArrayBuffer"),v=g("string"),E=g("function"),x=g("number"),S=e=>null!==e&&"object"==typeof e,A=e=>{if("object"!==p(e))return!1;let t=f(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(h in e)&&!(d in e)},T=y("Date"),M=y("File"),I=y("Blob"),C=y("FileList"),R=y("URLSearchParams"),[N,O,D,L]=["ReadableStream","Request","Response","Headers"].map(y);function P(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e){if("object"!=typeof e&&(e=[e]),m(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}}function j(e,t){let r;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,_=e=>!b(e)&&e!==U,k=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&f(Uint8Array)),$=y("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),H=y("RegExp"),F=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};P(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},K=y("AsyncFunction"),z=(i="function"==typeof setImmediate,o=E(U.postMessage),i?setImmediate:o?((e,t)=>(U.addEventListener("message",({source:r,data:n})=>{r===U&&n===e&&t.length&&t.shift()()},!1),r=>{t.push(r),U.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e)),W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(U):void 0!==u&&u.nextTick||z,G={isArray:m,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||E(e.append)&&("formdata"===(t=p(e))||"object"===t&&E(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer)},isString:v,isNumber:x,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:A,isReadableStream:N,isRequest:O,isResponse:D,isHeaders:L,isUndefined:b,isDate:T,isFile:M,isBlob:I,isRegExp:H,isFunction:E,isStream:e=>S(e)&&E(e.pipe),isURLSearchParams:R,isTypedArray:k,isFileList:C,forEach:P,merge:function e(){let{caseless:t}=_(this)&&this||{},r={},n=(n,i)=>{let o=t&&j(r,i)||i;A(r[o])&&A(n)?r[o]=e(r[o],n):A(n)?r[o]=e({},n):m(n)?r[o]=n.slice():r[o]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&P(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(P(t,(t,n)=>{r&&E(t)?e[n]=l(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;let a={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=!1!==r&&f(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:p,kindOfTest:y,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!x(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r;let n=(e&&e[d]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>
9{let r;let n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:$,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:F,freezeMethods:e=>{F(e,(t,r)=>{if(E(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(E(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(e=>{e.forEach(e=>{r[e]=!0})})(m(e)?e:String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:j,global:U,isContextDefined:_,isSpecCompliantForm:function(e){return!!(e&&E(e.append)&&"FormData"===e[h]&&e[d])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;let i=m(e)?[]:{};return P(e,(e,t)=>{let o=r(e,n+1);b(o)||(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:K,isThenable:e=>e&&(S(e)||E(e))&&E(e.then)&&E(e.catch),setImmediate:z,asap:W,isIterable:e=>null!=e&&E(e[d])};function V(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}G.inherits(V,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});let q=V.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Q[e]={value:e}}),Object.defineProperties(V,Q),Object.defineProperty(q,"isAxiosError",{value:!0}),V.from=(e,t,r,n,i,o)=>{let s=Object.create(q);return G.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),V.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var Y=r(86300).Buffer;function Z(e){return G.isPlainObject(e)||G.isArray(e)}function X(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function J(e,t,r){return e?e.concat(t).map(function(e,t){return e=X(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let ee=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)}),et=function(e,t,r){if(!G.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!G.isUndefined(t[e])})).metaTokens,i=r.visitor||u,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(i))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new V("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Y.from(e):e}function u(e,r,i){let a=e;if(e&&!i&&"object"==typeof e){if(G.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var u;if(G.isArray(e)&&(u=e,G.isArray(u)&&!u.some(Z))||(G.isFileList(e)||G.endsWith(r,"[]"))&&(a=G.toArray(e)))return r=X(r),a.forEach(function(e,n){G.isUndefined(e)||null===e||t.append(!0===s?J([r],n,o):null===s?r:r+"[]",l(e))}),!1}}return!!Z(e)||(t.append(J(i,r,o),l(e)),!1)}let c=[],f=Object.assign(ee,{defaultVisitor:u,convertValue:l,isVisitable:Z});if(!G.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!G.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),G.forEach(r,function(r,o){!0===(!(G.isUndefined(r)||null===r)&&i.call(t,r,G.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])}),c.pop()}}(e),t};function er(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function en(e,t){this._pairs=[],e&&et(e,this,t)}let ei=en.prototype;function eo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function es(e,t,r){let n;if(!t)return e;let i=r&&r.encode||eo;G.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize;if(n=o?o(t,r):G.isURLSearchParams(t)?t.toString():new en(t,r).toString(i)){let t=e.indexOf("#");
9-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ei.append=function(e,t){this._pairs.push([e,t])},ei.toString=function(e){let t=e?function(t){return e.call(this,t,er)}:er;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class ea{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,function(t){null!==t&&e(t)})}}let el={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eu="undefined"!=typeof URLSearchParams?URLSearchParams:en,ec="undefined"!=typeof FormData?FormData:null,ef="undefined"!=typeof Blob?Blob:null,ed="undefined"!=typeof window&&"undefined"!=typeof document,eh="object"==typeof navigator&&navigator||void 0,ep=ed&&(!eh||0>["ReactNative","NativeScript","NS"].indexOf(eh.product)),ey="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eg=ed&&window.location.href||"http://localhost",em={...a,isBrowser:!0,classes:{URLSearchParams:eu,FormData:ec,Blob:ef},protocols:["http","https","file","blob","url","data"]},eb=function(e){if(G.isFormData(e)&&G.isFunction(e.entries)){let t={};return G.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;let s=Number.isFinite(+o),a=i>=t.length;return(o=!o&&G.isArray(n)?n.length:o,a)?G.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r:(n[o]&&G.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&G.isArray(n[o])&&(n[o]=function(e){let t,r;let n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(n[o]))),!s}(G.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null},ew={transitional:el,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r;let n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=G.isObject(e);if(o&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return i?JSON.stringify(eb(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){var s,a;return(s=e,a=this.formSerializer,et(s,new em.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return em.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},a))).toString()}if((r=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return et(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){let t=this.transitional||ew.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw V.from(e,V.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:em.classes.FormData,Blob:em.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],e=>{ew.headers[e]={}});let ev=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),eE=e=>{let t,r,n;let i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&ev[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i},ex=Symbol("internals");function eS(e){return e&&String(e).trim().toLowerCase()}function eA(e){return!1===e||null==e?e:G.isArray(e)?e.map(eA):String(e)}let eT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function eM(e,t,r,n,i){if(G.isFunction(n))return n.call(this,t,r);if(i&&(t=r),G.isString(t)){if(G.isString(n))return -1!==t.indexOf(n);if(G.isRegExp(n))return n.test(t)}}class eI{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=eS(t);if(!i)throw Error("header name must be a non-empty string");let o=G.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=eA(e))}let o=(e,t)=>G.forEach(e,(e,r)=>i(e,r,t));if(G.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(G.isString(e)&&(e=e.trim())&&!eT(e))o(eE(e),t);else if(G.isObject(e)&&G.isIterable(e)){let r={},n,i;for(let t of e){if(!G.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?G.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=eS(e)){let r=G.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t)return function(e){let t;let r=Object.create(null),n=/([^\s,;
9=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}(e);if(G.isFunction(t))return t.call(this,e,r);if(G.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eS(e)){let r=G.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||eM(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=eS(e)){let i=G.findKey(r,e);i&&(!t||eM(r,r[i],i,t))&&(delete r[i],n=!0)}}return G.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||eM(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return G.forEach(this,(n,i)=>{let o=G.findKey(r,i);if(o){t[o]=eA(n),delete t[i];return}let s=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();s!==i&&delete t[i],t[s]=eA(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return G.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&G.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[ex]=this[ex]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=eS(e);t[n]||(!function(e,t){let r=G.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return G.isArray(e)?e.forEach(n):n(e),this}}function eC(e,t){let r=this||ew,n=t||r,i=eI.from(n.headers),o=n.data;return G.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function eR(e){return!!(e&&e.__CANCEL__)}function eN(e,t,r){V.call(this,null==e?"canceled":e,V.ERR_CANCELED,t,r),this.name="CanceledError"}function eO(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new V("Request failed with status code "+r.status,[V.ERR_BAD_REQUEST,V.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}eI.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(eI.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),G.freezeMethods(eI),G.inherits(eN,V,{__CANCEL__:!0});let eD=function(e,t){let r;let n=Array(e=e||10),i=Array(e),o=0,s=0;return t=void 0!==t?t:1e3,function(a){let l=Date.now(),u=i[s];r||(r=l),n[o]=a,i[o]=l;let c=s,f=0;for(;c!==o;)f+=n[c++],c%=e;if((o=(o+1)%e)===s&&(s=(s+1)%e),l-r<t)return;let d=u&&l-u;return d?Math.round(1e3*f/d):void 0}},eL=function(e,t){let r,n,i=0,o=1e3/t,s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{let t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},o-a)))},()=>r&&s(r)]},eP=(e,t,r=3)=>{let n=0,i=eD(50,250);return eL(r=>{let o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a);n=o,e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},ej=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},eU=e=>(...t)=>G.asap(()=>e(...t)),e_=em.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,em.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(em.origin),em.navigator&&/(msie|trident)/i.test(em.navigator.userAgent)):()=>!0,ek=em.hasStandardBrowserEnv?{write(e,t,r,n,i,o){let s=[e+"="+encodeURIComponent(t)];G.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),G.isString(n)&&s.push("path="+n),G.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function e$(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let eB=e=>e instanceof eI?{...e}:e;function eH(e,t){t=t||{};let r={};function n(e,t,r,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function i(e,t,r,i){return G.isUndefined(t)?G.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function o(e,t){if(!G.isUndefined(t))return n(void 0,t)}function s(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}let l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>i(eB(e),eB(t),r,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),function(n){let o=l[n]||i,s=o(e[n],t[n],n);G.isUndefined(s)&&o!==a||(r[n]=s)}),r}let eF=e=>{let t;let r=eH({},e),{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=r;if(r.headers=a=eI.from(a),r.url=es(e$(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),G.isFormData(n)){if(em.hasStandardBrowserEnv||em.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(t=a.getContentType())){let[e,...r]=t?t.split(";").map(e=>
9e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...r].join("; "))}}if(em.hasStandardBrowserEnv&&(i&&G.isFunction(i)&&(i=i(r)),i||!1!==i&&e_(r.url))){let e=o&&s&&ek.read(s);e&&a.set(o,e)}return r},eK="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o,s,a;let l=eF(e),u=l.data,c=eI.from(l.headers).normalize(),{responseType:f,onUploadProgress:d,onDownloadProgress:h}=l;function p(){s&&s(),a&&a(),l.cancelToken&&l.cancelToken.unsubscribe(n),l.signal&&l.signal.removeEventListener("abort",n)}let y=new XMLHttpRequest;function g(){if(!y)return;let n=eI.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());eO(function(e){t(e),p()},function(e){r(e),p()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(l.method.toUpperCase(),l.url,!0),y.timeout=l.timeout,"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(g)},y.onabort=function(){y&&(r(new V("Request aborted",V.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new V("Network Error",V.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",n=l.transitional||el;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),r(new V(t,n.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,e,y)),y=null},void 0===u&&c.setContentType(null),"setRequestHeader"in y&&G.forEach(c.toJSON(),function(e,t){y.setRequestHeader(t,e)}),G.isUndefined(l.withCredentials)||(y.withCredentials=!!l.withCredentials),f&&"json"!==f&&(y.responseType=l.responseType),h&&([o,a]=eP(h,!0),y.addEventListener("progress",o)),d&&y.upload&&([i,s]=eP(d),y.upload.addEventListener("progress",i),y.upload.addEventListener("loadend",s)),(l.cancelToken||l.signal)&&(n=t=>{y&&(r(!t||t.type?new eN(null,e,y):t),y.abort(),y=null)},l.cancelToken&&l.cancelToken.subscribe(n),l.signal&&(l.signal.aborted?n():l.signal.addEventListener("abort",n)));let m=function(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l.url);if(m&&-1===em.protocols.indexOf(m)){r(new V("Unsupported protocol "+m+":",V.ERR_BAD_REQUEST,e));return}y.send(u||null)})},ez=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,s();let t=e instanceof Error?e:this.reason;n.abort(t instanceof V?t:new eN(t instanceof Error?t.message:t))}},o=t&&setTimeout(()=>{o=null,i(new V(`timeout ${t} of ms exceeded`,V.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:a}=n;return a.unsubscribe=()=>G.asap(s),a}},eW=function*(e,t){let r,n=e.byteLength;if(!t||n<t){yield e;return}let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},eG=async function*(e,t){for await(let r of eV(e))yield*eW(r,t)},eV=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},eq=(e,t,r,n)=>{let i;let o=eG(e,t),s=0,a=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t){a(),e.close();return}let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},eQ="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,eY=eQ&&"function"==typeof ReadableStream,eZ=eQ&&("function"==typeof TextEncoder?(n=new TextEncoder,e=>n.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer())),eX=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},eJ=eY&&eX(()=>{let e=!1,t=new Request(em.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),e0=eY&&eX(()=>G.isReadableStream(new Response("").body)),e1={stream:e0&&(e=>e.body)};eQ&&(s=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e
9=>{e1[e]||(e1[e]=G.isFunction(s[e])?t=>t[e]():(t,r)=>{throw new V(`Response type '${e}' is not supported`,V.ERR_NOT_SUPPORT,r)})}));let e2=async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){let t=new Request(em.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e))?(await eZ(e)).byteLength:void 0},e4=async(e,t)=>{let r=G.toFiniteNumber(e.getContentLength());return null==r?e2(t):r},e3={http:null,xhr:eK,fetch:eQ&&(async e=>{let t,r,{url:n,method:i,data:o,signal:s,cancelToken:a,timeout:l,onDownloadProgress:u,onUploadProgress:c,responseType:f,headers:d,withCredentials:h="same-origin",fetchOptions:p}=eF(e);f=f?(f+"").toLowerCase():"text";let y=ez([s,a&&a.toAbortSignal()],l),g=y&&y.unsubscribe&&(()=>{y.unsubscribe()});try{if(c&&eJ&&"get"!==i&&"head"!==i&&0!==(r=await e4(d,o))){let e,t=new Request(n,{method:"POST",body:o,duplex:"half"});if(G.isFormData(o)&&(e=t.headers.get("content-type"))&&d.setContentType(e),t.body){let[e,n]=ej(r,eP(eU(c)));o=eq(t.body,65536,e,n)}}G.isString(h)||(h=h?"include":"omit");let s="credentials"in Request.prototype;t=new Request(n,{...p,signal:y,method:i.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:s?h:void 0});let a=await fetch(t),l=e0&&("stream"===f||"response"===f);if(e0&&(u||l&&g)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=a[t]});let t=G.toFiniteNumber(a.headers.get("content-length")),[r,n]=u&&ej(t,eP(eU(u),!0))||[];a=new Response(eq(a.body,65536,r,()=>{n&&n(),g&&g()}),e)}f=f||"text";let m=await e1[G.findKey(e1,f)||"text"](a,e);return!l&&g&&g(),await new Promise((r,n)=>{eO(r,n,{data:m,headers:eI.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:t})})}catch(r){if(g&&g(),r&&"TypeError"===r.name&&/Load failed|fetch/i.test(r.message))throw Object.assign(new V("Network Error",V.ERR_NETWORK,e,t),{cause:r.cause||r});throw V.from(r,r&&r.code,e,t)}})};G.forEach(e3,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let e8=e=>`- ${e}`,e5=e=>G.isFunction(e)||null===e||!1===e,e6={getAdapter:e=>{let t,r;let{length:n}=e=G.isArray(e)?e:[e],i={};for(let o=0;o<n;o++){let n;if(r=t=e[o],!e5(t)&&void 0===(r=e3[(n=String(t)).toLowerCase()]))throw new V(`Unknown adapter '${n}'`);if(r)break;i[n||"#"+o]=r}if(!r){let e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new V("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(e8).join("\n"):" "+e8(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r}};function e7(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eN(null,e)}function e9(e){return e7(e),e.headers=eI.from(e.headers),e.data=eC.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),e6.getAdapter(e.adapter||ew.adapter)(e).then(function(t){return e7(e),t.data=eC.call(e,e.transformResponse,t),t.headers=eI.from(t.headers),t},function(t){return!eR(t)&&(e7(e),t&&t.response&&(t.response.data=eC.call(e,e.transformResponse,t.response),t.response.headers=eI.from(t.response.headers))),Promise.reject(t)})}let te="1.9.0",tt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tr={};tt.transitional=function(e,t,r){function n(e,t){return"[Axios v"+te+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new V(n(i," has been removed"+(t?" in "+t:"")),V.ERR_DEPRECATED);return t&&!tr[i]&&(tr[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},tt.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let tn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],s=t[o];if(s){let t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new V("option "+o+" must be "+r,V.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new V("Unknown option "+o,V.ERR_BAD_OPTION)}},validators:tt},ti=tn.validators;class to{constructor(e){this.defaults=e||{},this.interceptors={request:new ea,response:new ea}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:s}=t=eH(this.defaults,t);void 0!==i&&tn.assertOptions(i,{silentJSONParsing:ti.transitional(ti.boolean),forcedJSONParsing:ti.transitional(ti.boolean),clarifyTimeoutError:ti.transitional(ti.boolean)}
9,!1),null!=o&&(G.isFunction(o)?t.paramsSerializer={serialize:o}:tn.assertOptions(o,{encode:ti.function,serialize:ti.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tn.assertOptions(t,{baseUrl:ti.spelling("baseURL"),withXsrfToken:ti.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&G.merge(s.common,s[t.method]);s&&G.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=eI.concat(a,s);let l=[],u=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(u=u&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let f=0;if(!u){let e=[e9.bind(this),void 0];for(e.unshift.apply(e,l),e.push.apply(e,c),n=e.length,r=Promise.resolve(t);f<n;)r=r.then(e[f++],e[f++]);return r}n=l.length;let d=t;for(f=0;f<n;){let e=l[f++],t=l[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{r=e9.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,n=c.length;f<n;)r=r.then(c[f++],c[f++]);return r}getUri(e){return es(e$((e=eH(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(e){to.prototype[e]=function(t,r){return this.request(eH(r||{},{method:e,url:t,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(eH(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}to.prototype[e]=t(),to.prototype[e+"Form"]=t(!0)});class ts{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});let r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;let n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new eN(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ts(function(t){e=t}),cancel:e}}}let ta={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
9alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ta).forEach(([e,t])=>{ta[t]=e});let tl=function e(t){let r=new to(t),n=l(to.prototype.request,r);return G.extend(n,to.prototype,r,{allOwnKeys:!0}),G.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(eH(t,r))},n}(ew);tl.Axios=to,tl.CanceledError=eN,tl.CancelToken=ts,tl.isCancel=eR,tl.VERSION=te,tl.toFormData=et,tl.AxiosError=V,tl.Cancel=tl.CanceledError,tl.all=function(e){return Promise.all(e)},tl.spread=function(e){return function(t){return e.apply(null,t)}},tl.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},tl.mergeConfig=eH,tl.AxiosHeaders=eI,tl.formToJSON=e=>eb(G.isHTMLForm(e)?new FormData(e):e),tl.getAdapter=e6.getAdapter,tl.HttpStatusCode=ta,tl.default=tl;let tu=tl},53742:(e,t,r)=>{"use strict";r.d(t,{Dv:()=>h,KO:()=>p});var n=r(2265),i=r(59910),o=r(2935);let s=(0,n.createContext)(void 0);function a(e){let t=(0,n.useContext)(s);return(null==e?void 0:e.store)||t||(0,i.K7)()}let l=e=>"function"==typeof(null==e?void 0:e.then),u=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},c=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw u(e),e}),f=new WeakMap,d=(e,t)=>{let r=f.get(e);return r||(r=new Promise((n,i)=>{let s=e,a=e=>t=>{s===e&&n(t)},u=e=>t=>{s===e&&i(t)},c=()=>{try{let e=t();l(e)?(f.set(e,r),s=e,e.then(a(e),u(e)),(0,o.XB)(e,c)):n(e)}catch(e){i(e)}};e.then(a(e),u(e)),(0,o.XB)(e,c)}),f.set(e,r)),r};function h(e,t){let{delay:r,unstable_promiseStatus:i=!n.use}=t||{},o=a(t),[[s,f,h],p]=(0,n.useReducer)(t=>{let r=o.get(e);return Object.is(t[0],r)&&t[1]===o&&t[2]===e?t:[r,o,e]},void 0,()=>[o.get(e),o,e]),y=s;if((f!==o||h!==e)&&(p(),y=o.get(e)),(0,n.useEffect)(()=>
9{let t=o.sub(e,()=>{if(i)try{let t=o.get(e);l(t)&&u(d(t,()=>o.get(e)))}catch(e){}if("number"==typeof r){setTimeout(p,r);return}p()});return p(),t},[o,e,r,i]),(0,n.useDebugValue)(y),l(y)){let t=d(y,()=>o.get(e));return i&&u(t),c(t)}return y}function p(e,t){return[h(e,t),function(e,t){let r=a(t);return(0,n.useCallback)(function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!("write"in e))throw Error("not writable atom");return r.set(e,...n)},[r,e])}(e,t)]}},59910:(e,t,r)=>{"use strict";let n,i;r.d(t,{K7:()=>f,cn:()=>a});var o=r(2935);let s=0;function a(e,t){let r=`atom${++s}`,n={toString(){return this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?n.read=e:(n.init=e,n.read=l,n.write=u),t&&(n.write=t),n}function l(e){return e(this)}function u(e,t,r){return t(this,"function"==typeof r?r(e(this)):r)}let c=()=>{let e=0,t=(0,o.YN)({}),r=new WeakMap,n=new WeakMap,i=(0,o.k_)(r,n,void 0,void 0,void 0,void 0,t,void 0,(t,r,n,...i)=>e?n(t,...i):t.write(r,n,...i)),s=new Set;return t.m.add(void 0,e=>{s.add(e),r.get(e).m=n.get(e)}),t.u.add(void 0,e=>{s.delete(e);let t=r.get(e);delete t.m}),Object.assign(i,{dev4_get_internal_weak_map:()=>(console.log("Deprecated: Use devstore from the devtools library"),r),dev4_get_mounted_atoms:()=>s,dev4_restore_atoms:t=>{i.set({read:()=>null,write:(r,n)=>{++e;try{for(let[e,r]of t)"init"in e&&n(e,r)}finally{--e}}})}})};function f(){return i||(i=n?n():c(),globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=i),globalThis.__JOTAI_DEFAULT_STORE__!==i&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044")),i}},2935:(e,t,r)=>{"use strict";r.d(t,{XB:()=>E,YN:()=>v,k_:()=>w});let n=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,i=e=>"init"in e,o=e=>!!e.write,s=e=>"v"in e||"e"in e,a=e=>{if("e"in e)throw e.e;if(!("v"in e))throw Error("[Bug] atom state is not initialized");return e.v},l=new WeakMap,u=e=>{var t;return d(e)&&!!(null==(t=l.get(e))?void 0:t[0])},c=e=>{let t=l.get(e);(null==t?void 0:t[0])&&(t[0]=!1,t[1].forEach(e=>e()))},f=(e,t)=>{let r=l.get(e);if(!r){r=[!0,new Set],l.set(e,r);let t=()=>{r[0]=!1};e.then(t,t)}r[1].add(t)},d=e=>"function"==typeof(null==e?void 0:e.then),h=(e,t,r)=>{r.p.has(e)||(r.p.add(e),t.then(()=>{r.p.delete(e)},()=>{r.p.delete(e)}))},p=(e,t,r)=>{let n=r(e),i="v"in n,o=n.v;if(d(t))for(let i of n.d.keys())h(e,t,r(i));n.v=t,delete n.e,i&&Object.is(o,n.v)||(++n.n,d(o)&&c(o))},y=(e,t,r)=>{var n;let i=new Set;for(let t of(null==(n=r.get(e))?void 0:n.t)||[])r.has(t)&&i.add(t);for(let e of t.p)i.add(e);return i},g=()=>{let e=new Set,t=()=>{e.forEach(e=>e())};return t.add=t=>(e.add(t),()=>{e.delete(t)}),t},m=()=>{let e={},t=new WeakMap,r=r=>{var n,i;null==(n=t.get(e))||n.forEach(e=>e(r)),null==(i=t.get(r))||i.forEach(e=>e())};return r.add=(r,n)=>{let i=r||e,o=(t.has(i)?t:t.set(i,new Set)).get(i);return o.add(n),()=>{null==o||o.delete(n),o.size||t.delete(i)}},r},b=Symbol(),w=(e=new WeakMap,t=new WeakMap,r=new WeakMap,l=new Set,c=new Set,g=new Set,m={},w=(e,...t)=>e.read(...t),v=(e,...t)=>e.write(...t),E=(e,t)=>{var r;return null==(r=e.unstable_onInit)?void 0:r.call(e,t)},x=(e,t)=>{var r;return null==(r=e.onMount)?void 0:r.call(e,t)},...S)=>{let A=S[0]||(t=>{if(!t)throw Error("Atom is undefined or null");let r=e.get(t);return r||(r={d:new Map,p:new Set,n:0},e.set(t,r),null==E||E(t,L)),r}),T=S[1]||(()=>{let e=[],r=t=>{try{t()}catch(t){e.push(t)}};do{m.f&&r(m.f);let e=new Set,n=e.add.bind(e);l.forEach(e=>{var r;return null==(r=t.get(e))?void 0:r.l.forEach(n)}),l.clear(),g.forEach(n),g.clear(),c.forEach(n),c.clear(),e.forEach(r),l.size&&M()}while(l.size||g.size||c.size);if(e.length)throw AggregateError(e)}),M=S[2]||(()=>{let e=[],n=new WeakSet,i=new WeakSet,o=Array.from(l);for(;o.length;){let s=o[o.length-1],a=A(s);if(i.has(s)){o.pop();continue}if(n.has(s)){if(r.get(s)===a.n)e.push([s,a]);else if(r.has(s))throw Error("[Bug] invalidated atom exists");i.add(s),o.pop();continue}for(let e of(n.add(s),y(s,a,t)))n.has(e)||o.push(e)}for(let t=e.length-1;t>=0;--t){let[n,i]=e[t],o=!1;for(let e of i.d.keys())if(e!==n&&l.has(e)){o=!0;break}
9o&&(I(n),N(n)),r.delete(n)}}),I=S[3]||(e=>{var c;let y,g;let b=A(e);if(s(b)&&(t.has(e)&&r.get(e)!==b.n||Array.from(b.d).every(([e,t])=>I(e).n===t)))return b;b.d.clear();let v=!0,E=()=>{t.has(e)&&(N(e),M(),T())},x=b.n;try{let r=w(e,r=>{var o;if(n(e,r)){let e=A(r);if(!s(e)){if(i(r))p(r,r.init,A);else throw Error("no atom init")}return a(e)}let l=I(r);try{return a(l)}finally{b.d.set(r,l.n),u(b.v)&&h(e,b.v,l),null==(o=t.get(r))||o.t.add(e),v||E()}},{get signal(){return y||(y=new AbortController),y.signal},get setSelf(){return o(e)||console.warn("setSelf function cannot be used with read-only atom"),!g&&o(e)&&(g=(...t)=>{if(v&&console.warn("setSelf function cannot be called in sync"),!v)try{return R(e,...t)}finally{M(),T()}}),g}});return p(e,r,A),d(r)&&(f(r,()=>null==y?void 0:y.abort()),r.then(E,E)),b}catch(e){return delete b.v,b.e=e,++b.n,b}finally{v=!1,x!==b.n&&r.get(e)===x&&(r.set(e,b.n),l.add(e),null==(c=m.c)||c.call(m,e))}}),C=S[4]||(e=>{let n=[e];for(;n.length;){let e=n.pop(),i=A(e);for(let o of y(e,i,t)){let e=A(o);r.set(o,e.n),n.push(o)}}}),R=S[5]||((e,...t)=>{let r=!0;try{return v(e,e=>a(I(e)),(t,...o)=>{var s;let a=A(t);try{if(!n(e,t))return R(t,...o);{if(!i(t))throw Error("atom not writable");let e=a.n,r=o[0];p(t,r,A),N(t),e!==a.n&&(l.add(t),null==(s=m.c)||s.call(m,t),C(t));return}}finally{r||(M(),T())}},...t)}finally{r=!1}}),N=S[6]||(e=>{var r;let n=A(e),i=t.get(e);if(i&&!u(n.v)){for(let[t,o]of n.d)if(!i.d.has(t)){let n=A(t);O(t).t.add(e),i.d.add(t),o!==n.n&&(l.add(t),null==(r=m.c)||r.call(m,t),C(t))}for(let t of i.d||[])if(!n.d.has(t)){i.d.delete(t);let r=D(t);null==r||r.t.delete(e)}}}),O=S[7]||(e=>{var r;let n=A(e),i=t.get(e);if(!i){for(let t of(I(e),n.d.keys()))O(t).t.add(e);i={l:new Set,d:new Set(n.d.keys()),t:new Set},t.set(e,i),null==(r=m.m)||r.call(m,e),o(e)&&c.add(()=>{let t=!0;try{let r=x(e,(...r)=>{try{return R(e,...r)}finally{t||(M(),T())}});r&&(i.u=()=>{t=!0;try{r()}finally{t=!1}})}finally{t=!1}})}return i}),D=S[8]||(e=>{var r;let n=A(e),i=t.get(e);if(i&&!i.l.size&&!Array.from(i.t).some(r=>{var n;return null==(n=t.get(r))?void 0:n.d.has(e)})){for(let o of(i.u&&g.add(i.u),i=void 0,t.delete(e),null==(r=m.u)||r.call(m,e),n.d.keys())){let t=D(o);null==t||t.t.delete(e)}return}return i}),L={get:e=>a(I(e)),set:(e,...t)=>{try{return R(e,...t)}finally{M(),T()}},sub:(e,t)=>{let r=O(e).l;return r.add(t),T(),()=>{r.delete(t),D(e),T()}}};return Object.defineProperty(L,b,{value:[e,t,r,l,c,g,m,w,v,E,x,A,T,M,I,C,R,N,O,D]}),L},v=e=>(e.c||(e.c=m()),e.m||(e.m=m()),e.u||(e.u=m()),e.f||(e.f=g()),e),E=f}}]);
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.