PageSourceSearch

https://nowpayments.io/js/7691.ce9c2eaecdd47e6a141e.js

js nowpayments.io collected 2026-09-24 08:33:04 UTC 243,129 bytes, 2 lines download raw bytes

1/*! For license information please see 7691.ce9c2eaecdd47e6a141e.js.LICENSE.txt */
2(self.webpackChunknowpayments_front=self.webpackChunknowpayments_front||[]).push([[7691],{67557:(e,t)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function r(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function s(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function i(e,...t){if(!s(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){i(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=t.isBytes=void 0,t.number=n,t.bool=r,t.isBytes=s,t.bytes=i,t.hash=o,t.exists=a,t.output=c;const u={number:n,bool:r,bytes:i,hash:o,exists:a,output:c};t.default=u},37202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashMD=t.Maj=t.Chi=void 0;const r=n(67557),s=n(99175);t.Chi=(e,t,n)=>e&t^~e&n,t.Maj=(e,t,n)=>e&t^e&n^t&n;class i extends s.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,s.createView)(this.buffer)}update(e){(0,r.exists)(this);const{view:t,buffer:n,blockLen:i}=this,o=(e=(0,s.toBytes)(e)).length;for(let r=0;r<o;){const a=Math.min(i-this.pos,o-r);if(a===i){const t=(0,s.createView)(e);for(;i<=o-r;r+=i)this.process(t,r);continue}n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.exists)(this),(0,r.output)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:i,isLE:o}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(n,0),a=0);for(let e=a;e<i;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(n>>s&i),a=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+u,a,r)}(n,i-8,BigInt(8*this.length),o),this.process(n,0);const c=(0,s.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:s,destroyed:i,pos:o}=this;return e.length=r,e.pos=o,e.finished=s,e.destroyed=i,r%t&&e.buffer.set(n),e}}t.HashMD=i},25145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},39615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const r=n(67557),s=n(99175);class i extends s.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(e);const n=(0,s.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return(0,r.exists)(this),this.iHash.update(e),this}digestInto(e){(0,r.exists)(this),(0,r.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:s,blockLen:i,outputLen:o}=this;return e.finished=r,e.destroyed=s,e.blockLen=i,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i,t.hmac=(e,t,n)=>new i(e,t).update(n).digest(),t.hmac.create=(e,t)=>
2new i(e,t)},22623:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const r=n(37202),s=n(99175),i=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class c extends r.HashMD{constructor(){super(64,32,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4],this.F=0|o[5],this.G=0|o[6],this.H=0|o[7]}get(){const{A:e,B:t,C:n,D:r,E:s,F:i,G:o,H:a}=this;return[e,t,n,r,s,i,o,a]}set(e,t,n,r,s,i,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|s,this.F=0|i,this.G=0|o,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,s.rotr)(t,7)^(0,s.rotr)(t,18)^t>>>3,i=(0,s.rotr)(n,17)^(0,s.rotr)(n,19)^n>>>10;a[e]=i+a[e-7]+r+a[e-16]|0}let{A:n,B:o,C:c,D:u,E:l,F:d,G:f,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,s.rotr)(l,6)^(0,s.rotr)(l,11)^(0,s.rotr)(l,25))+(0,r.Chi)(l,d,f)+i[e]+a[e]|0,p=((0,s.rotr)(n,2)^(0,s.rotr)(n,13)^(0,s.rotr)(n,22))+(0,r.Maj)(n,o,c)|0;h=f,f=d,d=l,l=u+t|0,u=c,c=o,o=n,n=t+p|0}n=n+this.A|0,o=o+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,o,c,u,l,d,f,h)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class u extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,s.wrapConstructor)(()=>new c),t.sha224=(0,s.wrapConstructor)(()=>new u)},99175:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;const r=n(25145),s=n(67557);t.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name},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.rotl=(e,t)=>
2e<<t|e>>>32-t>>>0,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,t.byteSwapIfBE=t.isLE?e=>e:e=>(0,t.byteSwap)(e),t.byteSwap32=function(e){for(let n=0;n<e.length;n++)e[n]=(0,t.byteSwap)(e[n])};const i=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));t.bytesToHex=function(e){(0,s.bytes)(e);let t="";for(let n=0;n<e.length;n++)t+=i[e[n]];return t};function o(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function a(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function c(e){return"string"==typeof e&&(e=a(e)),(0,s.bytes)(e),e}t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,s=0;t<n;t++,s+=2){const n=o(e.charCodeAt(s)),i=o(e.charCodeAt(s+1));if(void 0===n||void 0===i){const t=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+s)}r[t]=16*n+i}return r},t.nextTick=async()=>{},t.asyncLoop=async function(e,n,r){let s=Date.now();for(let i=0;i<e;i++){r(i);const e=Date.now()-s;e>=0&&e<n||(await(0,t.nextTick)(),s+=e)}},t.utf8ToBytes=a,t.toBytes=c,t.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];(0,s.bytes)(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const s=e[t];n.set(s,r),r+=s.length}return n},t.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(c(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(c(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(c(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},9598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.schnorr=t.verify=t.signSync=t.sign=t.getSharedSecret=t.recoverPublicKey=t.getPublicKey=t.hexToBytes=t.bytesToHex=t.Signature=t.Point=t.CURVE=void 0;const r=n(14923),s=BigInt(0),i=BigInt(1),o=BigInt(2),a=BigInt(3),c=BigInt(8),u=Object.freeze({a:s,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:i,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});t.CURVE=u;const l=(e,t)=>(e+t/o)/t,d={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(e){const{n:t}=u,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-i*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,a=BigInt("0x100000000000000000000000000000000"),c=l(o*e,t),d=l(-r*e,t);let f=z(e-c*n-d*s,t),h=z(-c*r-d*o,t);const p=f>a,g=h>a;if(p&&(f=t-f),g&&(h=t-h),f>a||h>a)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:p,k1:f,k2neg:g,k2:h}}};function f(e){const{a:t,b:n}=u,r=z(e*e),s=z(r*e);return z(s+t*e+n)}const h=u.a===s;
2class p extends Error{constructor(e){super(e)}}function g(e){if(!(e instanceof y))throw new TypeError("JacobianPoint expected")}class y{constructor(e,t,n){this.x=e,this.y=t,this.z=n}static fromAffine(e){if(!(e instanceof b))throw new TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(b.ZERO)?y.ZERO:new y(e.x,e.y,i)}static toAffineBatch(e){const t=function(e,t=u.P){const n=new Array(e.length),r=F(e.reduce((e,r,i)=>r===s?e:(n[i]=e,z(e*r,t)),i),t);return e.reduceRight((e,r,i)=>r===s?e:(n[i]=z(e*n[i],t),z(e*r,t)),r),n}(e.map(e=>e.z));return e.map((e,n)=>e.toAffine(t[n]))}static normalizeZ(e){return y.toAffineBatch(e).map(y.fromAffine)}equals(e){g(e);const{x:t,y:n,z:r}=this,{x:s,y:i,z:o}=e,a=z(r*r),c=z(o*o),u=z(t*c),l=z(s*a),d=z(z(n*o)*c),f=z(z(i*r)*a);return u===l&&d===f}negate(){return new y(this.x,z(-this.y),this.z)}double(){const{x:e,y:t,z:n}=this,r=z(e*e),s=z(t*t),i=z(s*s),u=e+s,l=z(o*(z(u*u)-r-i)),d=z(a*r),f=z(d*d),h=z(f-o*l),p=z(d*(l-h)-c*i),g=z(o*t*n);return new y(h,p,g)}add(e){g(e);const{x:t,y:n,z:r}=this,{x:i,y:a,z:c}=e;if(i===s||a===s)return this;if(t===s||n===s)return e;const u=z(r*r),l=z(c*c),d=z(t*l),f=z(i*u),h=z(z(n*c)*l),p=z(z(a*r)*u),w=z(f-d),m=z(p-h);if(w===s)return m===s?this.double():y.ZERO;const b=z(w*w),v=z(w*b),E=z(d*b),A=z(m*m-v-o*E),M=z(m*(E-A)-h*v),N=z(r*c*w);return new y(A,M,N)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const t=y.ZERO;if("bigint"==typeof e&&e===s)return t;let n=R(e);if(n===i)return this;if(!h){let e=t,r=this;for(;n>s;)n&i&&(e=e.add(r)),r=r.double(),n>>=i;return e}let{k1neg:r,k1:o,k2neg:a,k2:c}=d.splitScalar(n),u=t,l=t,f=this;for(;o>s||c>s;)o&i&&(u=u.add(f)),c&i&&(l=l.add(f)),f=f.double(),o>>=i,c>>=i;return r&&(u=u.negate()),a&&(l=l.negate()),l=new y(z(l.x*d.beta),l.y,l.z),u.add(l)}precomputeWindow(e){const t=h?128/e+1:256/e+1,n=[];let r=this,s=r;for(let i=0;i<t;i++){s=r,n.push(s);for(let t=1;t<2**(e-1);t++)s=s.add(r),n.push(s);r=s.double()}return n}wNAF(e,t){!t&&this.equals(y.BASE)&&(t=b.BASE);const n=t&&t._WINDOW_SIZE||1;if(256%n)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let r=t&&m.get(t);r||(r=this.precomputeWindow(n),t&&1!==n&&(r=y.normalizeZ(r),m.set(t,r)));let s=y.ZERO,o=y.BASE;const a=1+(h?128/n:256/n),c=2**(n-1),u=BigInt(2**n-1),l=2**n,d=BigInt(n);for(let t=0;t<a;t++){const n=t*c;let a=Number(e&u);e>>=d,a>c&&(a-=l,e+=i);const f=n,h=n+Math.abs(a)-1,p=t%2!=0,g=a<0;0===a?o=o.add(w(p,r[f])):s=s.add(w(g,r[h]))}return{p:s,f:o}}multiply(e,t){let n,r,s=R(e);if(h){const{k1neg:e,k1:i,k2neg:o,k2:a}=d.splitScalar(s);let{p:c,f:u}=this.wNAF(i,t),{p:l,f}=this.wNAF(a,t);c=w(e,c),l=w(o,l),l=new y(z(l.x*d.beta),l.y,l.z),n=c.add(l),r=u.add(f)}else{const{p:e,f:i}=this.wNAF(s,t);n=e,r=i}return y.normalizeZ([n,r])[0]}toAffine(e){const{x:t,y:n,z:r}=this,s=this.equals(y.ZERO);null==e&&(e=s?c:F(r));const o=e,a=z(o*o),u=z(a*o),l=z(t*a),d=z(n*u),f=z(r*o);if(s)return b.ZERO;if(f!==i)throw new Error("invZ was invalid");return new b(l,d)}}function w(e,t){const n=t.negate();return e?n:t}y.BASE=new y(u.Gx,u.Gy,i),y.ZERO=new y(s,i,s);const m=new WeakMap;class b{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,m.delete(this)}hasEvenY(){return this.y%o===s}static fromCompressedHex(e){const t=32===e.length,n=L(t?e:e.subarray(1));if(!G(n))throw new Error("Point is not on curve");let r=function(e){const{P:t}=u,n=BigInt(6),r=BigInt(11),s=BigInt(22),i=BigInt(23),c=BigInt(44),l=BigInt(88),d=e*e*e%t,f=d*d*e%t,h=U(f,a)*f%t,p=U(h,a)*f%t,g=U(p,o)*d%t,y=U(g,r)*g%t,w=U(y,s)*y%t,m=U(w,c)*w%t,b=U(m,l)*m%t,v=U(b,c)*w%t,E=U(v,a)*f%t,A=U(E,i)*y%t,M=U(A,n)*d%t,N=U(M,o);if(N*N%t!==e)throw new Error("Cannot find square root");return N}(f(n));const s=(r&i)===i;t?s&&(r=z(-r)):!(1&~e[0])!==s&&(r=z(-r));const c=new b(n,r);return c.assertValidity(),c}static fromUncompressedHex(e){const t=L(e.subarray(1,33)),n=L(e.subarray(33,65)),r=new b(t,n);return r.assertValidity(),r}static fromHex(e){const t=B(e),n=t.length,r=t[0];if(32===n)return this.fromCompressedHex(t);if(33===n&&(2===r||3===r))return this.fromCompressedHex(t);if(65===n&&4===r)return this.fromUncompressedHex(t);
2throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${n}`)}static fromPrivateKey(e){return b.BASE.multiply(K(e))}static fromSignature(e,t,n){const{r,s}=Z(t);if(![0,1,2,3].includes(n))throw new Error("Cannot recover: invalid recovery bit");const i=H(B(e)),{n:o}=u,a=2===n||3===n?r+o:r,c=F(a,o),l=z(-i*c,o),d=z(s*c,o),f=1&n?"03":"02",h=b.fromHex(f+P(a)),p=b.BASE.multiplyAndAddUnsafe(h,l,d);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(e=!1){return T(this.toHex(e))}toHex(e=!1){const t=P(this.x);return e?`${this.hasEvenY()?"02":"03"}${t}`:`04${t}${P(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:t,y:n}=this;if(!G(t)||!G(n))throw new Error(e);const r=z(n*n);if(z(r-f(t))!==s)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new b(this.x,z(-this.y))}double(){return y.fromAffine(this).double().toAffine()}add(e){return y.fromAffine(this).add(y.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return y.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,n){const r=y.fromAffine(this),o=t===s||t===i||this!==b.BASE?r.multiplyUnsafe(t):r.multiply(t),a=y.fromAffine(e).multiplyUnsafe(n),c=o.add(a);return c.equals(y.ZERO)?void 0:c.toAffine()}}function v(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function E(e){if(e.length<2||2!==e[0])throw new Error(`Invalid signature integer tag: ${I(e)}`);const t=e[1],n=e.subarray(2,t+2);if(!t||n.length!==t)throw new Error("Invalid signature integer: wrong length");if(0===n[0]&&n[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:L(n),left:e.subarray(t+2)}}t.Point=b,b.BASE=new b(u.Gx,u.Gy),b.ZERO=new b(s,s);class A{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){const t=M(e),n="Signature.fromCompact";if("string"!=typeof e&&!t)throw new TypeError(`${n}: Expected string or Uint8Array`);const r=t?I(e):e;if(128!==r.length)throw new Error(`${n}: Expected 64-byte hex`);return new A(D(r.slice(0,64)),D(r.slice(64,128)))}static fromDER(e){const t=M(e);if("string"!=typeof e&&!t)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:n,s:r}=function(e){if(e.length<2||48!=e[0])throw new Error(`Invalid signature tag: ${I(e)}`);if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:n}=E(e.subarray(2)),{data:r,left:s}=E(n);if(s.length)throw new Error(`Invalid signature: left bytes after parsing: ${I(s)}`);return{r:t,s:r}}(t?e:T(e));return new A(n,r)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:t}=this;if(!Y(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Y(t))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=u.n>>i;return this.s>e}normalizeS(){return this.hasHighS()?new A(this.r,z(-this.s,u.n)):this}toDERRawBytes(){return T(this.toDERHex())}toDERHex(){const e=v(_(this.s)),t=v(_(this.r)),n=e.length/2,r=t.length/2,s=_(n),i=_(r);return`30${_(r+n+4)}02${i}${t}02${s}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return T(this.toCompactHex())}toCompactHex(){return P(this.r)+P(this.s)}}function M(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function N(e){if(!M(e))throw new Error("Uint8Array expected")}function x(...e){if(e.every(N),1===e.length)return e[0];const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const s=e[t];n.set(s,r),r+=s.length}return n}t.Signature=A;const S=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function I(e){N(e);let t="";for(let n=0;n<e.length;n++)t+=S[e[n]];return t}t.bytesToHex=I;const O={_0:48,_9:57,A:65,F:70,a:97,f:102};function k(e){return e>=O._0&&e<=O._9?e-O._0:e>=O.A&&e<=O.F?e-(O.A-10):e>=O.a&&e<=O.f?e-(O.a-10):void 0}function T(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);
2const r=new Uint8Array(n);for(let t=0,s=0;t<n;t++,s+=2){const n=k(e.charCodeAt(s)),i=k(e.charCodeAt(s+1));if(void 0===n||void 0===i){const t=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+s)}r[t]=16*n+i}return r}t.hexToBytes=T;const C=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function P(e){if("bigint"!=typeof e)throw new Error("Expected bigint");if(!(s<=e&&e<C))throw new Error("Expected number 0 <= n < 2^256");return e.toString(16).padStart(64,"0")}function j(e){const t=T(P(e));if(32!==t.length)throw new Error("Error: expected 32 bytes");return t}function _(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function D(e){if("string"!=typeof e)throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}function L(e){return D(I(e))}function B(e){return M(e)?Uint8Array.from(e):T(e)}function R(e){if("number"==typeof e&&Number.isSafeInteger(e)&&e>0)return BigInt(e);if("bigint"==typeof e&&Y(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function z(e,t=u.P){const n=e%t;return n>=s?n:t+n}function U(e,t){const{P:n}=u;let r=e;for(;t-- >s;)r*=r,r%=n;return r}function F(e,t=u.P){if(e===s||t<=s)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=z(e,t),r=t,o=s,a=i,c=i,l=s;for(;n!==s;){const e=r/n,t=r%n,s=o-c*e,i=a-l*e;r=n,n=t,o=c,a=l,c=s,l=i}if(r!==i)throw new Error("invert: does not exist");return z(o,t)}function H(e,t=!1){const n=function(e){const t=8*e.length-256,n=L(e);return t>0?n>>BigInt(t):n}(e);if(t)return n;const{n:r}=u;return n>=r?n-r:n}let W,q;class ${constructor(e,t){if(this.hashLen=e,this.qByteLen=t,"number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new 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 q(this.k,...e)}checkSync(){if("function"!=typeof q)throw new p("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new 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;const t=[];for(;e<this.qByteLen;){this.v=await this.hmac(this.v);const n=this.v.slice();t.push(n),e+=this.v.length}return x(...t)}generateSync(){this.checkSync(),this.incr();let e=0;const t=[];for(;e<this.qByteLen;){this.v=this.hmacSync(this.v);const n=this.v.slice();t.push(n),e+=this.v.length}return x(...t)}}function Y(e){return s<e&&e<u.n}function G(e){return s<e&&e<u.P}function Q(e,t,n,r=!0){const{n:o}=u,a=H(e,!0);if(!Y(a))return;const c=F(a,o),l=b.BASE.multiply(a),d=z(l.x,o);if(d===s)return;const f=z(c*z(t+n*d,o),o);if(f===s)return;let h=new A(d,f),p=(l.x===h.r?0:2)|Number(l.y&i);return r&&h.hasHighS()&&(h=h.normalizeS(),p^=1),{sig:h,recovery:p}}function K(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 new Error("Expected 32 bytes of private key");t=D(e)}else{if(!M(e))throw new TypeError("Expected valid private key");if(32!==e.length)throw new Error("Expected 32 bytes of private key");t=L(e)}if(!Y(t))throw new Error("Expected private key: 0 < key < n");return t}function V(e){return e instanceof b?(e.assertValidity(),e):b.fromHex(e)}function Z(e){if(e instanceof A)return e.assertValidity(),e;try{return A.fromDER(e)}catch(t){return A.fromCompact(e)}}function J(e){const t=M(e),n="string"==typeof e,r=(t||n)&&e.length;return t?33===r||65===r:n?66===r||130===r:e instanceof b}function X(e){return L(e.length>32?e.slice(0,32):e)}function ee(e){const t=X(e),n=z(t,u.n);return te(n<s?t:n)}function te(e){return j(e)}function ne(e,n,r){if(null==e)throw new Error(`sign: expected valid message hash, not "${e}"`);const s=B(e),i=K(n),o=[te(i),ee(s)];if(null!=r){!0===r&&(r=t.utils.randomBytes(32));const e=B(r);if(32!==e.length)throw new Error("sign: Expected 32 bytes of extra data");o.push(e)}return{seed:x(...o),m:X(s),d:i}}function re(e,t){const{sig:n,recovery:r}=e,{der:s,recovered:i}=Object.assign({canonical:!0,der:!0}
2,t),o=s?n.toDERRawBytes():n.toCompactRawBytes();return i?[o,r]:o}t.getPublicKey=function(e,t=!1){return b.fromPrivateKey(e).toRawBytes(t)},t.recoverPublicKey=function(e,t,n,r=!1){return b.fromSignature(e,t,n).toRawBytes(r)},t.getSharedSecret=function(e,t,n=!1){if(J(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!J(t))throw new TypeError("getSharedSecret: second arg must be public key");const r=V(t);return r.assertValidity(),r.multiply(K(e)).toRawBytes(n)},t.sign=async function(e,t,n={}){const{seed:r,m:s,d:i}=ne(e,t,n.extraEntropy),o=new $(32,32);let a;for(await o.reseed(r);!(a=Q(await o.generate(),s,i,n.canonical));)await o.reseed();return re(a,n)},t.signSync=function(e,t,n={}){const{seed:r,m:s,d:i}=ne(e,t,n.extraEntropy),o=new $(32,32);let a;for(o.reseedSync(r);!(a=Q(o.generateSync(),s,i,n.canonical));)o.reseedSync();return re(a,n)};const se={strict:!0};function ie(e){return z(L(e),u.n)}t.verify=function(e,t,n,r=se){let s;try{s=Z(e),t=B(t)}catch(e){return!1}const{r:i,s:o}=s;if(r.strict&&s.hasHighS())return!1;const a=H(t);let c;try{c=V(n)}catch(e){return!1}const{n:l}=u,d=F(o,l),f=z(a*d,l),h=z(i*d,l),p=b.BASE.multiplyAndAddUnsafe(c,f,h);return!!p&&z(p.x,l)===i};class oe{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){const t=B(e);if(64!==t.length)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${t.length}`);const n=L(t.subarray(0,32)),r=L(t.subarray(32,64));return new oe(n,r)}assertValidity(){const{r:e,s:t}=this;if(!G(e)||!Y(t))throw new Error("Invalid signature")}toHex(){return P(this.r)+P(this.s)}toRawBytes(){return T(this.toHex())}}class ae{constructor(e,n,r=t.utils.randomBytes()){if(null==e)throw new TypeError(`sign: Expected valid message, not "${e}"`);this.m=B(e);const{x:s,scalar:i}=this.getScalar(K(n));if(this.px=s,this.d=i,this.rand=B(r),32!==this.rand.length)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(e){const t=b.fromPrivateKey(e),n=t.hasEvenY()?e:u.n-e;return{point:t,scalar:n,x:t.toRawX()}}initNonce(e,t){return j(e^L(t))}finalizeNonce(e){const t=z(L(e),u.n);if(t===s)throw new Error("sign: Creation of signature failed. k is zero");const{point:n,x:r,scalar:i}=this.getScalar(t);return{R:n,rx:r,k:i}}finalizeSig(e,t,n,r){return new oe(e.x,z(t+n*r,u.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:e,d:n,px:r,rand:s}=this,i=t.utils.taggedHash,o=this.initNonce(n,await i(he.aux,s)),{R:a,rx:c,k:u}=this.finalizeNonce(await i(he.nonce,o,r,e)),l=ie(await i(he.challenge,c,r,e)),d=this.finalizeSig(a,u,l,n);return await le(d,e,r)||this.error(),d}calcSync(){const{m:e,d:n,px:r,rand:s}=this,i=t.utils.taggedHashSync,o=this.initNonce(n,i(he.aux,s)),{R:a,rx:c,k:u}=this.finalizeNonce(i(he.nonce,o,r,e)),l=ie(i(he.challenge,c,r,e)),d=this.finalizeSig(a,u,l,n);return de(d,e,r)||this.error(),d}}function ce(e,t,n){const r=e instanceof oe,s=r?e:oe.fromHex(e);return r&&s.assertValidity(),{...s,m:B(t),P:V(n)}}function ue(e,t,n,r){const s=b.BASE.multiplyAndAddUnsafe(t,K(n),z(-r,u.n));return!(!s||!s.hasEvenY()||s.x!==e)}async function le(e,n,r){try{const{r:s,s:i,m:o,P:a}=ce(e,n,r),c=ie(await t.utils.taggedHash(he.challenge,j(s),a.toRawX(),o));return ue(s,a,i,c)}catch(e){return!1}}function de(e,n,r){try{const{r:s,s:i,m:o,P:a}=ce(e,n,r),c=ie(t.utils.taggedHashSync(he.challenge,j(s),a.toRawX(),o));return ue(s,a,i,c)}catch(e){if(e instanceof p)throw e;return!1}}t.schnorr={Signature:oe,getPublicKey:function(e){return b.fromPrivateKey(e).toRawX()},sign:async function(e,t,n){return new ae(e,t,n).calc()},verify:le,signSync:function(e,t,n){return new ae(e,t,n).calcSync()},verifySync:de},b.BASE._setWindowSize(8);const fe={node:r,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},he={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},pe={};t.utils={bytesToHex:I,hexToBytes:T,concatBytes:x,mod:z,invert:F,isValidPrivateKey(e){try{return K(e),!0}catch(e){return!1}},_bigintTo32Bytes:j,_normalizePrivateKey:K,hashToPrivateKey:e=>{if((e=B(e)).length<40||e.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return j(z(L(e),u.n-i)+i)},randomBytes:(e=32)=>{if(fe.web)return fe.web.getRandomValues(new Uint8Array(e));if(fe.node){const{randomBytes:t}=fe.node;return Uint8Array.from(t(e))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>t.utils.hashToPrivateKey(t.utils.randomBytes(40)),precompute(e=8,t=b.BASE){const n=t===b.BASE?t:new b(t.x,t.y);return n._setWindowSize(e),n.multiply(a),n},sha256:async(...e)=>{if(fe.web){const t=await fe.web.subtle.digest("SHA-256",x(...e));return new Uint8Array(t)}if(fe.node){const{createHash:t}=fe.node,n=t("sha256");
2return e.forEach(e=>n.update(e)),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(fe.web){const n=await fe.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),r=x(...t),s=await fe.web.subtle.sign("HMAC",n,r);return new Uint8Array(s)}if(fe.node){const{createHmac:n}=fe.node,r=n("sha256",e);return t.forEach(e=>r.update(e)),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...n)=>{let r=pe[e];if(void 0===r){const n=await t.utils.sha256(Uint8Array.from(e,e=>e.charCodeAt(0)));r=x(n,n),pe[e]=r}return t.utils.sha256(r,...n)},taggedHashSync:(e,...t)=>{if("function"!=typeof W)throw new p("sha256Sync is undefined, you need to set it");let n=pe[e];if(void 0===n){const t=W(Uint8Array.from(e,e=>e.charCodeAt(0)));n=x(t,t),pe[e]=n}return W(n,...t)},_JacobianPoint:y},Object.defineProperties(t.utils,{sha256Sync:{configurable:!1,get:()=>W,set(e){W||(W=e)}},hmacSha256Sync:{configurable:!1,get:()=>q,set(e){q||(q=e)}}})},20867:(e,t,n)=>{"use strict";const r=n(67526),s=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=a(n);const s=r.write(e,t);return s!==n&&(r=r.slice(0,s)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const s=function(e){if(c.isBuffer(e)){const t=0|p(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?a(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),a(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),n=a(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function p(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let s=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(s)return r?-1:Y(e).length;t=(""+t).toLowerCase(),s=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}
vendor: 5,624 bytes, line 2
2function m(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,s){let i,o=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){let r=-1;for(i=n;i<a;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*o}else-1!==r&&(i-=i-r),r=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const s=e.length-n;r?(r=Number(r))>s&&(r=s):r=s;const i=t.length;let o;for(r>i/2&&(r=i/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(V(r))return o;e[n+o]=r}return o}function E(e,t,n,r){return Q(Y(t,e.length-n),e,n,r)}function A(e,t,n,r){return Q(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function M(e,t,n,r){return Q(G(t),e,n,r)}function N(e,t,n,r){return Q(function(e,t){let n,r,s;const i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,s=n%256,i.push(s),i.push(r);return i}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);const r=[];let s=t;for(;s<n;){const t=e[s];let i=null,o=t>239?4:t>223?3:t>191?2:1;if(s+o<=n){let n,r,a,c;switch(o){case 1:t<128&&(i=t);break;case 2:n=e[s+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[s+1],r=e[s+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[s+1],r=e[s+2],a=e[s+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),s+=o}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=I));return n}(r)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let s=0,i=Math.min(n,r);s<i;++s)if(e[s]!==t[s]){n=e[s],r=t[s];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let s=0;for(n=0;n<e.length;++n){let t=e[n];if(K(t,Uint8Array))s+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,s)):Uint8Array.prototype.set.call(r,t,s);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,s)}s+=t.length}return r},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)w(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):y.apply(this,arguments)}
vendor: 11,988 bytes, line 2
2,c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.IS;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,s){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(s>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const a=Math.min(i,o),u=this.slice(r,s),l=e.slice(t,n);for(let e=0;e<a;++e)if(u[e]!==l[e]){i=u[e],o=l[e];break}return i<o?-1:o<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const s=this.length-t;if((void 0===n||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return M(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function O(e,t,n){let r="";n=Math.min(e.length,n);for(let s=t;s<n;++s)r+=String.fromCharCode(127&e[s]);return r}function k(e,t,n){let r="";n=Math.min(e.length,n);for(let s=t;s<n;++s)r+=String.fromCharCode(e[s]);return r}function T(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let s="";for(let r=t;r<n;++r)s+=Z[e[r]];return s}function C(e,t,n){const r=e.slice(t,n);let s="";for(let e=0;e<r.length-1;e+=2)s+=String.fromCharCode(r[e]+256*r[e+1]);return s}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,s,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function _(e,t,n,r,s){H(t,r,s,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function D(e,t,n,r,s){H(t,r,s,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function L(e,t,n,r,s,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||L(e,0,n,4),s.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return t=+t,n>>>=0,i||L(e,0,n,8),s.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],s=1,i=0;for(;++i<t&&(s*=256);)r+=this[e+i]*s;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],s=1;for(;t>0&&(s*=256);)r+=this[e+--t]*s;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,s=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(s)<<BigInt(32))}),c.prototype.readBigUInt64BE=J(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],s=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(s)}),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],s=1,i=0;for(;++i<t&&(s*=256);)r+=this[e+i]*s;return s*=128,r>=s&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,s=1,i=this[e+--r];for(;r>0&&(s*=256);)i+=this[e+--r]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=J(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);let s=1,i=0;for(this[t]=255&e;++i<n&&(s*=256);)this[t+i]=e/s&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);let s=n-1,i=1;for(this[t+s]=255&e;--s>=0&&(i*=256);)this[t+s]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=J(function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let s=0,i=1,o=0;for(this[t]=255&e;++s<n&&(i*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/i|0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let s=n-1,i=1,o=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i|0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=J(function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const s=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),s},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),o=i.length;
2if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=i[s%o]}return this};const z={};function U(e,t,n){z[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,r,s,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let s;throw s=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new z.ERR_OUT_OF_RANGE("value",s,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||q(t,e.length-(n+1))}(r,s,i)}function W(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,s=n;return Number.isInteger(n)&&Math.abs(n)>2**32?s=F(String(n)):"bigint"==typeof n&&(s=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(s=F(s)),s+="n"),r+=` It must be ${t}. Received ${s}`,r},RangeError);const $=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let n;t=t||1/0;const r=e.length;let s=null;const i=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!s){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&i.push(239,191,189);continue}s=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(t-=3)>-1&&i.push(239,191,189);if(s=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function G(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,n,r){let s;for(s=0;s<r&&!(s+n>=t.length||s>=e.length);++s)t[s+n]=e[s];return s}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let s=0;s<16;++s)t[r+s]=e[n]+e[s]}return t}();function J(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},46880:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),s=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";
vendor: 19,973 bytes, line 2
2case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var s=e.getVersionPrecision(t),i=e.getVersionPrecision(n),o=Math.max(s,i),a=0,c=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var s=e[n];if(t(s,n))return s}},e.assign=function(e){for(var t,n,r=e,s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var a=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=i.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=s,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=n(91))&&r.__esModule?r:{default:r},i=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new s.default(e,t)},e.parse=function(e){return new s.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}],null&&o(t.prototype,null),n&&o(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),s=c(n(93)),i=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,s={},i=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(s[t]=o,i+=1):"object"==typeof o&&(n[t]=o,r+=1)}),r>0){var o=Object.keys(n),c=a.default.find(o,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=a.default.find(o,function(e){return t.isPlatform(e)});if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}}if(i>0){var f=Object.keys(s),h=a.default.find(f,function(e){return t.isBrowser(e,!0)});if(void 0!==h)return this.compareVersion(s[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),s=a.default.getBrowserTypeByAlias(r);return t&&s&&(r=s.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(s,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=s.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(t,e),version:s.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=s.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=s.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=s.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||s.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);
2return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=s.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=s.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},n=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},n=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},35921:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=t.unescape=t.escape=t.pad=void 0;const r=n(67526);function s(e){return`${e}${"=".repeat(4-(e.length%4||4))}`}function i(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function o(e){return s(e).replace(/-/g,"+").replace(/_/g,"/")}t.pad=s,t.escape=i,t.unescape=o,t.encode=function(e){return i((0,r.fromByteArray)((new TextEncoder).encode(e)))},t.decode=function(e){return(new TextDecoder).decode((0,r.toByteArray)(s(o(e))))}},61161:(e,t,n)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.cryptoClients=t.SECP256K1Client=void 0;const r=n(92485);Object.defineProperty(t,"SECP256K1Client",{enumerable:!0,get:function(){return r.SECP256K1Client}});const s={ES256K:r.SECP256K1Client};t.cryptoClients=s},92485:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECP256K1Client=void 0;const r=n(39615),s=n(22623),i=n(9598),o=n(96216),a=n(68886),c=n(99175);i.utils.hmacSha256Sync=(e,...t)=>{const n=r.hmac.create(s.sha256,e);return t.forEach(e=>n.update(e)),n.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,c.bytesToHex)(i.getPublicKey(e,t))}static signHash(e,t,n="jose"){if(!e||!t)throw new a.MissingParametersError("a signing input hash and private key are all required");const r=i.signSync(e,t.slice(0,64),{der:!0,canonical:!1});if("der"===n)return(0,c.bytesToHex)(r);if("jose"===n)return(0,o.derToJose)(r,"ES256");throw Error("Invalid signature format")}static loadSignature(e){return(0,o.joseToDer)(e,"ES256")}static verifyHash(e,t,n){if(!e||!t||!n)throw new a.MissingParametersError("a signing input hash, der signature, and public key are all required");return i.verify(t,e,n,{strict:!1})}}t.SECP256K1Client=u,u.algorithmName="ES256K"},97990:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.hashSha256Async=t.hashSha256=void 0;const s=n(22623);function i(e){return(0,s.sha256)(e)}t.hashSha256=i,t.hashSha256Async=function(e){return r(this,void 0,void 0,function*(){try{if("undefined"!=typeof crypto&&void 0!==crypto.subtle){const t="string"==typeof e?(new TextEncoder).encode(e):e,n=yield crypto.subtle.digest("SHA-256",t);return new Uint8Array(n)}{const t=n(32632);if(!t.createHash)throw new 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(i(e))}})}},21827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeToken=void 0;const r=n(35921);t.decodeToken=function(e){if("string"==typeof e){const t=e.split(".");return{header:JSON.parse(r.decode(t[0])),payload:JSON.parse(r.decode(t[1])),signature:t[2]}}if("object"==typeof e){if("string"!=typeof e.payload)throw new Error("Expected token payload to be a base64 or json string");let t=e.payload;"{"!==e.payload[0]&&(t=r.decode(t));const n=[];return e.header.map(e=>{const t=JSON.parse(r.decode(e));n.push(t)}),{header:n,payload:JSON.parse(t),signature:e.signature}}}},96216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joseToDer=t.derToJose=void 0;const r=n(67526),s=n(35921);function i(e){return(e/8|0)+(e%8==0?0:1)}const o={ES256:i(256),ES384:i(384),ES512:i(521)};function a(e){const t=o[e];if(t)return t;throw new Error(`Unknown algorithm "${e}"`)}function c(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,r.toByteArray)((0,s.pad)(e));throw new TypeError("ECDSA signature must be a Base64 string or a Uint8Array")}function u(e,t,n){let r=0;for(;t+r<n&&0===e[t+r];)++r;return e[t+r]>=128&&--r,r}t.derToJose=function(e,t){const n=c(e),i=a(t),o=i+1,u=n.length;let l=0;if(48!==n[l++])throw new Error('Could not find expected "seq"');let d=n[l++];if(129===d&&(d=n[l++]),u-l<d)throw new Error(`"seq" specified length of "${d}", only "${u-l}" remaining`);if(2!==n[l++])throw new Error('Could not find expected "int" for "r"');const f=n[l++];if(u-l-2<f)throw new Error(`"r" specified length of "${f}", only "${u-l-2}" available`);if(o<f)throw new Error(`"r" specified length of "${f}", max of "${o}" is acceptable`);const h=l;if(l+=f,2!==n[l++])throw new Error('Could not find expected "int" for "s"');const p=n[l++];if(u-l!==p)throw new Error(`"s" specified length of "${p}", expected "${u-l}"`);if(o<p)throw new Error(`"s" specified length of "${p}", max of "${o}" is acceptable`);const g=l;if(l+=p,l!==u)throw new Error(`Expected to consume entire array, but "${u-l}" bytes remain`);const y=i-f,w=i-p,m=new Uint8Array(y+f+w+p);for(l=0;l<y;++l)m[l]=0;m.set(n.subarray(h+Math.max(-y,0),h+f),l),l=i;for(const e=l;l<e+w;++l)m[l]=0;return m.set(n.subarray(g+Math.max(-w,0),g+p),l),(0,s.escape)((0,r.fromByteArray)(m))},t.joseToDer=function(e,t){e=c(e);const n=a(t),r=e.length;if(r!==2*n)throw new TypeError(`"${t}" signatures must be "${2*n}" bytes, saw "${r}"`);const s=u(e,0,n),i=u(e,n,e.length),o=n-s,l=n-i,d=2+o+1+1+l,f=d<128,h=new Uint8Array((f?2:3)+d);let p=0;return h[p++]=48,f?h[p++]=d:(h[p++]=129,h[p++]=255&d),h[p++]=2,h[p++]=o,s<0?(h[p++]=0,h.set(e.subarray(0,n),p),p+=n):(h.set(e.subarray(s,n),p),p+=n-s),h[p++]=2,h[p++]=l,i<0?(h[p++]=0,h.set(e.subarray(n),p)):h.set(e.subarray(n+i),p),h}},68886:(e,t)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTokenError=t.MissingParametersError=void 0;class n extends Error{constructor(e){super(),this.name="MissingParametersError",this.message=e||""}}t.MissingParametersError=n;class r extends Error{constructor(e){super(),this.name="InvalidTokenError",this.message=e||""}}t.InvalidTokenError=r},69057:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(90675),t),s(n(2695),t),s(n(21827),t),s(n(68886),t),s(n(61161),t)},90675:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(s,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenSigner=t.createUnsecuredToken=void 0;const s=n(35921),i=n(61161),o=n(68886),a=n(97990);function c(e,t){const n=[],r=s.encode(JSON.stringify(t));n.push(r);const i=s.encode(JSON.stringify(e));return n.push(i),n.join(".")}t.createUnsecuredToken=function(e){return c(e,{typ:"JWT",alg:"none"})+"."},t.TokenSigner=class{constructor(e,t){if(!e||!t)throw new o.MissingParametersError("a signing algorithm and private key are required");if("string"!=typeof e)throw new Error("signing algorithm parameter must be a string");if(e=e.toUpperCase(),!i.cryptoClients.hasOwnProperty(e))throw new Error("invalid signing algorithm");this.tokenType="JWT",this.cryptoClient=i.cryptoClients[e],this.rawPrivateKey=t}header(e={}){const t={typ:this.tokenType,alg:this.cryptoClient.algorithmName};return Object.assign({},t,e)}sign(e,t=!1,n={}){const r=this.header(n),s=c(e,r),i=(0,a.hashSha256)(s);return this.createWithSignedHash(e,t,r,s,i)}signAsync(e,t=!1,n={}){return r(this,void 0,void 0,function*(){const r=this.header(n),s=c(e,r),i=yield(0,a.hashSha256Async)(s);return this.createWithSignedHash(e,t,r,s,i)})}createWithSignedHash(e,t,n,r,i){const o=this.cryptoClient.signHash(i,this.rawPrivateKey);return t?{header:[s.encode(JSON.stringify(n))],payload:JSON.stringify(e),signature:[o]}:[r,o].join(".")}}},2695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenVerifier=void 0;const r=n(35921),s=n(61161),i=n(68886),o=n(97990);t.TokenVerifier=class{constructor(e,t){if(!e||!t)throw new i.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(),!s.cryptoClients.hasOwnProperty(e))throw"invalid signing algorithm";this.tokenType="JWT",this.cryptoClient=s.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){const n=e.split("."),r=n[0]+"."+n[1],s=e=>{const t=this.cryptoClient.loadSignature(n[2]);return this.cryptoClient.verifyHash(e,t,this.rawPublicKey)};if(t)return(0,o.hashSha256Async)(r).then(e=>s(e));{const e=(0,o.hashSha256)(r);return s(e)}}verifyExpanded(e,t){const n=[e.header.join("."),r.encode(e.payload)].join(".");let s=!0;const i=t=>(e.signature.map(e=>{const n=this.cryptoClient.loadSignature(e);this.cryptoClient.verifyHash(t,n,this.rawPublicKey)||(s=!1)}),s);if(t)return(0,o.hashSha256Async)(n).then(e=>i(e));{const e=(0,o.hashSha256)(n);return i(e)}}}},7691:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AddressPurpose:()=>Ji,BitcoinAdapter:()=>Co,mapSatsConnectAddressPurpose:()=>Xi});var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>Qe,hasStandardBrowserEnv:()=>Ve,hasStandardBrowserWebWorkerEnv:()=>Ze,navigator:()=>Ke,origin:()=>Je}),n(82512),n(22001);var s=n(26742),i=n(24376),o=n(36875),a=n(91110),c=n(6056),u=n(7717),l=n(27508),d=n(70424),f=n(35306);const h=0,p=1;var g=n(75532);n(39031),n(27907),n(36647),n(37007),n(48287).hp,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var y=n(66009);function w(e){const t=typeof e;return"string"===t?`"${e}"`:"number"===t||"bigint"===t||"boolean"===t?`${e}
2`:"object"===t||"function"===t?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function m(e,t,n,r,s){const i=s&&"input"in s?s.input:n.value,o=s?.expected??e.expects??null,a=s?.received??w(i),c={kind:e.kind,type:e.type,input:i,expected:o,received:a,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:e.requirement,path:s?.path,issues:s?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u="schema"===e.kind,l=s?.message??e.message??(e.reference,void c.lang)??(u?void c.lang:null)??r.message??void c.lang;l&&(c.message="function"==typeof l?l(c):l),u&&(n.typed=!1),n.issues?n.issues.push(c):n.issues=[c]}function b(e,t){return Object.hasOwn(e,t)&&"__proto__"!==t&&"prototype"!==t&&"constructor"!==t}function v(e,t){const n=[...new Set(e)];return n.length>1?`(${n.join(` ${t} `)})`:n[0]??"never"}function E(e,t,n){return"function"==typeof e.default?e.default(t,n):e.default}function A(e,t){return!e._run({typed:!1,value:t},{abortEarly:!0}).issues}function M(e,t){return{kind:"schema",type:"array",reference:M,expects:"Array",async:!1,item:e,message:t,_run(e,t){const n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<n.length;r++){const s=n[r],i=this.item._run({typed:!1,value:s},t);if(i.issues){const o={type:"array",origin:"value",input:n,key:r,value:s};for(const t of i.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=i.issues),t.abortEarly){e.typed=!1;break}}i.typed||(e.typed=!1),e.value.push(i.value)}}else m(this,"type",e,t);return e}}}function N(e){return{kind:"schema",type:"boolean",reference:N,expects:"boolean",async:!1,message:e,_run(e,t){return"boolean"==typeof e.value?e.typed=!0:m(this,"type",e,t),e}}}function x(e,t){const n=Object.entries(e).filter(([e])=>isNaN(+e)).map(([,e])=>e);return{kind:"schema",type:"enum",reference:x,expects:v(n.map(w),"|"),async:!1,enum:e,options:n,message:t,_run(e,t){return this.options.includes(e.value)?e.typed=!0:m(this,"type",e,t),e}}}function S(e,t){return{kind:"schema",type:"literal",reference:S,expects:w(e),async:!1,literal:e,message:t,_run(e,t){return e.value===this.literal?e.typed=!0:m(this,"type",e,t),e}}}function I(e,t){return{kind:"schema",type:"non_optional",reference:I,expects:"!undefined",async:!1,wrapped:e,message:t,_run(e,t){return void 0===e.value?(m(this,"type",e,t),e):this.wrapped._run(e,t)}}}function O(e){return{kind:"schema",type:"null",reference:O,expects:"null",async:!1,message:e,_run(e,t){return null===e.value?e.typed=!0:m(this,"type",e,t),e}}}function k(e,...t){const n={kind:"schema",type:"nullish",reference:k,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,_run(e,t){return null!==e.value&&void 0!==e.value||("default"in this&&(e.value=E(this,e,t)),null!==e.value&&void 0!==e.value)?this.wrapped._run(e,t):(e.typed=!0,e)}};return 0 in t&&(n.default=t[0]),n}function T(e){return{kind:"schema",type:"number",reference:T,expects:"number",async:!1,message:e,_run(e,t){return"number"!=typeof e.value||isNaN(e.value)?m(this,"type",e,t):e.typed=!0,e}}}function C(e,t){return{kind:"schema",type:"object",reference:C,expects:"Object",async:!1,entries:e,message:t,_run(e,t){const n=e.value;if(n&&"object"==typeof n){e.typed=!0,e.value={};for(const r in this.entries){const s=n[r],i=this.entries[r]._run({typed:!1,value:s},t);if(i.issues){const o={type:"object",origin:"value",input:n,key:r,value:s};for(const t of i.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=i.issues),t.abortEarly){e.typed=!1;break}}i.typed||(e.typed=!1),(void 0!==i.value||r in n)&&(e.value[r]=i.value)}}else m(this,"type",e,t);return e}}}function P(e,...t){const n={kind:"schema",type:"optional",reference:P,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,_run(e,t){return void 0===e.value&&("default"in this&&(e.value=E(this,e,t)),void 0===e.value)?(e.typed=!0,e):this.wrapped._run(e,t)}};return 0 in t&&(n.default=t[0]),n}function j(e){return{kind:"schema",type:"string",reference:j,expects:"string",async:!1,message:e,_run(e,t){return"string"==typeof e.value?e.typed=!0:m(this,"type",e,t),e}}}function _(e){let t;if(e)for(const n of e)t?t.push(...n.issues):t=n.issues;return t}function D(e,t){return{kind:"schema",type:"union",reference:D,expects:v(e.map(e=>e.expects),"|"),async:!1,options:e,message:t,_run(e,t){let n,r,s;for(const i of this.options){const o=i._run({typed:!1,value:e.value},t);if(o.typed){if(!o.issues){n=o;break}r?r.push(o):r=[o]}else s?s.push(o):s=[o]}if(n)return n;if(r){if(1===r.length)return r[0];m(this,"type",e,t,{issues:_(r)}),e.typed=!0}else{if(1===s?.length)return s[0];m(this,"type",e,t,{issues:_(s)})}return e}}}function L(){return{kind:"schema",type:"unknown",reference:L,expects:"unknown",async:!1,_run:e=>(e.typed=!0,e)}}function B(e,t,n){return{kind:"schema",type:"variant",reference:B,expects:"Object",async:!1,key:e,options:t,message:n,_run(e,t){const n=e.value;if(n&&"object"==typeof n){let r,s=0,i=this.key,o=[];const a=(e,c)=>{for(const u of e.options){if("variant"===u.type)a(u,new Set(c).add(u.key));else{let e=!0,a=0;for(const r of c){if(u.entries[r]._run({typed:!1,value:n[r]},t).issues){e=!1,i!==r&&(s<a||s===a&&r in n&&!(i in n))&&(s=a,i=r,o=[]),i===r&&o.push(u.entries[r].expects);break}a++}if(e){const e=u._run({typed:!1,value:n},t);(!r||!r.typed&&e.typed)&&(r=e)}}if(r&&!r.issues)break}};if(a(this,new Set([this.key])),r)return r;
2m(this,"type",e,t,{input:n[i],expected:v(o,"|"),path:[{type:"object",origin:"value",input:n,key:i,value:n[i]}]})}else m(this,"type",e,t);return e}}}function R(e,t){const n={...e.entries};for(const e of t)delete n[e];return{...e,entries:n}}function z(...e){return{...e[0],pipe:e,_run(t,n){for(const r of e)if("metadata"!==r.kind){if(t.issues&&("schema"===r.kind||"transformation"===r.kind)){t.typed=!1;break}t.issues&&(n.abortEarly||n.abortPipeEarly)||(t=r._run(t,n))}return t}}}function U(e,t){return function(){return e.apply(t,arguments)}}n(69057),Error;var F=n(65606);const{toString:H}=Object.prototype,{getPrototypeOf:W}=Object,q=($=Object.create(null),e=>{const t=H.call(e);return $[t]||($[t]=t.slice(8,-1).toLowerCase())});var $;const Y=e=>(e=e.toLowerCase(),t=>q(t)===e),G=e=>t=>typeof t===e,{isArray:Q}=Array,K=G("undefined"),V=Y("ArrayBuffer"),Z=G("string"),J=G("function"),X=G("number"),ee=e=>null!==e&&"object"==typeof e,te=e=>{if("object"!==q(e))return!1;const t=W(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ne=Y("Date"),re=Y("File"),se=Y("Blob"),ie=Y("FileList"),oe=Y("URLSearchParams"),[ae,ce,ue,le]=["ReadableStream","Request","Response","Headers"].map(Y);function de(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),Q(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let o;for(r=0;r<i;r++)o=s[r],t.call(null,e[o],o,e)}}function fe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const he="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,pe=e=>!K(e)&&e!==he,ge=(ye="undefined"!=typeof Uint8Array&&W(Uint8Array),e=>ye&&e instanceof ye);var ye;const we=Y("HTMLFormElement"),me=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),be=Y("RegExp"),ve=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};de(n,(n,s)=>{let i;!1!==(i=t(n,s,e))&&(r[s]=i||n)}),Object.defineProperties(e,r)},Ee=Y("AsyncFunction"),Ae=(Me="function"==typeof setImmediate,Ne=J(he.postMessage),Me?setImmediate:Ne?(xe=`axios@${Math.random()}`,Se=[],he.addEventListener("message",({source:e,data:t})=>{e===he&&t===xe&&Se.length&&Se.shift()()},!1),e=>{Se.push(e),he.postMessage(xe,"*")}):e=>setTimeout(e));var Me,Ne,xe,Se;const Ie="undefined"!=typeof queueMicrotask?queueMicrotask.bind(he):void 0!==F&&F.nextTick||Ae,Oe={isArray:Q,isArrayBuffer:V,isBuffer:function(e){return null!==e&&!K(e)&&null!==e.constructor&&!K(e.constructor)&&J(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||J(e.append)&&("formdata"===(t=q(e))||"object"===t&&J(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&V(e.buffer),t},isString:Z,isNumber:X,isBoolean:e=>!0===e||!1===e,isObject:ee,isPlainObject:te,isReadableStream:ae,isRequest:ce,isResponse:ue,isHeaders:le,isUndefined:K,isDate:ne,isFile:re,isBlob:se,isRegExp:be,isFunction:J,isStream:e=>ee(e)&&J(e.pipe),isURLSearchParams:oe,isTypedArray:ge,isFileList:ie,forEach:de,merge:function e(){const{caseless:t}=pe(this)&&this||{},n={},r=(r,s)=>{const i=t&&fe(n,s)||s;te(n[i])&&te(r)?n[i]=e(n[i],r):te(r)?n[i]=e({},r):Q(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&de(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(de(t,(t,r)=>{n&&J(t)?e[r]=U(t,n):e[r]=t},{allOwnKeys:r}),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,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],r&&!r(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&W(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:q,kindOfTest:Y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!X(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n}
2,forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:we,hasOwnProperty:me,hasOwnProp:me,reduceDescriptors:ve,freezeMethods:e=>{ve(e,(t,n)=>{if(J(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];J(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:fe,global:he,isContextDefined:pe,isSpecCompliantForm:function(e){return!!(e&&J(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ee(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const s=Q(e)?[]:{};return de(e,(e,t)=>{const i=n(e,r+1);!K(i)&&(s[t]=i)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:Ee,isThenable:e=>e&&(ee(e)||J(e))&&J(e.then)&&J(e.catch),setImmediate:Ae,asap:Ie};function ke(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}Oe.inherits(ke,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:Oe.toJSONObject(this.config),code:this.code,status:this.status}}});const Te=ke.prototype,Ce={};["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=>{Ce[e]={value:e}}),Object.defineProperties(ke,Ce),Object.defineProperty(Te,"isAxiosError",{value:!0}),ke.from=(e,t,n,r,s,i)=>{const o=Object.create(Te);return Oe.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),ke.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Pe=ke;var je=n(20867).hp;function _e(e){return Oe.isPlainObject(e)||Oe.isArray(e)}function De(e){return Oe.endsWith(e,"[]")?e.slice(0,-2):e}function Le(e,t,n){return e?e.concat(t).map(function(e,t){return e=De(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Be=Oe.toFlatObject(Oe,{},null,function(e){return/^is[A-Z]/.test(e)}),Re=function(e,t,n){if(!Oe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Oe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Oe.isUndefined(t[e])})).metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Oe.isSpecCompliantForm(t);if(!Oe.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Oe.isDate(e))return e.toISOString();if(!a&&Oe.isBlob(e))throw new Pe("Blob is not supported. Use a Buffer instead.");return Oe.isArrayBuffer(e)||Oe.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):je.from(e):e}function u(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(Oe.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Oe.isArray(e)&&function(e){return Oe.isArray(e)&&!e.some(_e)}(e)||(Oe.isFileList(e)||Oe.endsWith(n,"[]"))&&(a=Oe.toArray(e)))return n=De(n),a.forEach(function(e,r){!Oe.isUndefined(e)&&null!==e&&t.append(!0===o?Le([n],r,i):null===o?n:n+"[]",c(e))}),!1;return!!_e(e)||(t.append(Le(s,n,i),c(e)),!1)}const l=[],d=Object.assign(Be,{defaultVisitor:u,convertValue:c,isVisitable:_e});if(!Oe.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Oe.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Oe.forEach(n,function(n,i){!0===(!(Oe.isUndefined(n)||null===n)&&s.call(t,n,Oe.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),l.pop()}}(e),t};
vendor: 9,330 bytes, line 2
2function ze(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ue(e,t){this._pairs=[],e&&Re(e,this,t)}const Fe=Ue.prototype;Fe.append=function(e,t){this._pairs.push([e,t])},Fe.toString=function(e){const t=e?function(t){return e.call(this,t,ze)}:ze;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const He=Ue;function We(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qe(e,t,n){if(!t)return e;const r=n&&n.encode||We;Oe.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(i=s?s(t,n):Oe.isURLSearchParams(t)?t.toString():new He(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const $e=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Oe.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ye={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ge={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:He,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Qe="undefined"!=typeof window&&"undefined"!=typeof document,Ke="object"==typeof navigator&&navigator||void 0,Ve=Qe&&(!Ke||["ReactNative","NativeScript","NS"].indexOf(Ke.product)<0),Ze="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Je=Qe&&window.location.href||"http://localhost",Xe={...r,...Ge},et=function(e){function t(e,n,r,s){let i=e[s++];if("__proto__"===i)return!0;const o=Number.isFinite(+i),a=s>=e.length;return i=!i&&Oe.isArray(r)?r.length:i,a?(Oe.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!o):(r[i]&&Oe.isObject(r[i])||(r[i]=[]),t(e,n,r[i],s)&&Oe.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}(r[i])),!o)}if(Oe.isFormData(e)&&Oe.isFunction(e.entries)){const n={};return Oe.forEachEntry(e,(e,r)=>{t(function(e){return Oe.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null},tt={transitional:Ye,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=Oe.isObject(e);if(s&&Oe.isHTMLForm(e)&&(e=new FormData(e)),Oe.isFormData(e))return r?JSON.stringify(et(e)):e;if(Oe.isArrayBuffer(e)||Oe.isBuffer(e)||Oe.isStream(e)||Oe.isFile(e)||Oe.isBlob(e)||Oe.isReadableStream(e))return e;if(Oe.isArrayBufferView(e))return e.buffer;if(Oe.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Re(e,new Xe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Xe.isNode&&Oe.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Oe.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Re(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e){if(Oe.isString(e))try{return(0,JSON.parse)(e),Oe.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||tt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Oe.isResponse(e)||Oe.isReadableStream(e))return e;if(e&&Oe.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Pe.from(e,Pe.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:Xe.classes.FormData,Blob:Xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Oe.forEach(["delete","get","head","post","put","patch"],e=>{tt.headers[e]={}});const nt=tt,rt=Oe.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"]),st=Symbol("internals");function it(e){return e&&String(e).trim().toLowerCase()}function ot(e){return!1===e||null==e?e:Oe.isArray(e)?e.map(ot):String(e)}function at(e,t,n,r,s){return Oe.isFunction(r)?r.call(this,t,n):(s&&(t=n),Oe.isString(t)?Oe.isString(r)?-1!==t.indexOf(r):Oe.isRegExp(r)?r.test(t):void 0:void 0)}class ct{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=it(t);if(!s)throw new Error("header name must be a non-empty string");const i=Oe.findKey(r,s);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ot(e))}const i=(e,t)=>Oe.forEach(e,(e,n)=>s(e,n,t));if(Oe.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Oe.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&rt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Oe.isHeaders(e))for(const[t,r]of e.entries())s(r,t,n);else null!=e&&s(t,e,n);return this}get(e,t){if(e=it(e)){const n=Oe.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Oe.isFunction(t))return t.call(this,e,n);if(Oe.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=it(e)){const n=Oe.findKey(this,e);return!(!n||void 0===this[n]||t&&!at(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=it(e)){const s=Oe.findKey(n,e);!s||t&&!at(0,n[s],s,t)||(delete n[s],r=!0)}}return Oe.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!at(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return Oe.forEach(this,(r,s)=>{const i=Oe.findKey(n,s);if(i)return t[i]=ot(r),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(s):String(s).trim();o!==s&&delete t[s],t[o]=ot(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Oe.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Oe.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[st]=this[st]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=it(e);t[r]||(function(e,t){const n=Oe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})})}(n,e),t[r]=!0)}return Oe.isArray(e)?e.forEach(r):r(e),this}}ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Oe.reduceDescriptors(ct.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Oe.freezeMethods(ct);const ut=ct;function lt(e,t){const n=this||nt,r=t||n,s=ut.from(r.headers);let i=r.data;return Oe.forEach(e,function(e){i=e.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function dt(e){return!(!e||!e.__CANCEL__)}function ft(e,t,n){Pe.call(this,null==e?"canceled":e,Pe.ERR_CANCELED,t,n),this.name="CanceledError"}Oe.inherits(ft,Pe,{__CANCEL__:!0});const ht=ft;function pt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Pe("Request failed with status code "+n.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const gt=(e,t,n=3)=>{let r=0;const s=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,i=0,o=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[o];s||(s=c),n[i]=a,r[i]=c;let l=o,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,s=0,i=1e3/t;const o=(t,i=Date.now())=>{s=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=i?o(e,t):(n=e,r||(r=setTimeout(()=>{r=null,o(n)},i-a)))},()=>n&&o(n)]}(n=>
2{const i=n.loaded,o=n.lengthComputable?n.total:void 0,a=i-r,c=s(a);r=i,e({loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&i<=o?(o-i)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},yt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},wt=e=>(...t)=>Oe.asap(()=>e(...t)),mt=Xe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Xe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Xe.origin),Xe.navigator&&/(msie|trident)/i.test(Xe.navigator.userAgent)):()=>!0,bt=Xe.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];Oe.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Oe.isString(r)&&o.push("path="+r),Oe.isString(s)&&o.push("domain="+s),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function vt(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Et=e=>e instanceof ut?{...e}:e;function At(e,t){t=t||{};const n={};function r(e,t,n,r){return Oe.isPlainObject(e)&&Oe.isPlainObject(t)?Oe.merge.call({caseless:r},e,t):Oe.isPlainObject(t)?Oe.merge({},t):Oe.isArray(t)?t.slice():t}function s(e,t,n,s){return Oe.isUndefined(t)?Oe.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function i(e,t){if(!Oe.isUndefined(t))return r(void 0,t)}function o(e,t){return Oe.isUndefined(t)?Oe.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,i){return i in t?r(n,s):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,n)=>s(Et(e),Et(t),0,!0)};return Oe.forEach(Object.keys(Object.assign({},e,t)),function(r){const i=c[r]||s,o=i(e[r],t[r],r);Oe.isUndefined(o)&&i!==a||(n[r]=o)}),n}const Mt=e=>{const t=At({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:c}=t;if(t.headers=a=ut.from(a),t.url=qe(vt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Oe.isFormData(r))if(Xe.hasStandardBrowserEnv||Xe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Xe.hasStandardBrowserEnv&&(s&&Oe.isFunction(s)&&(s=s(t)),s||!1!==s&&mt(t.url))){const e=i&&o&&bt.read(o);e&&a.set(i,e)}return t},Nt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Mt(e);let s=r.data;const i=ut.from(r.headers).normalize();let o,a,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function y(){if(!g)return;const r=ut.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());pt(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(n(new Pe("Request aborted",Pe.ECONNABORTED,e,g)),g=null)}
vendor: 1,143 bytes, line 2
2,g.onerror=function(){n(new Pe("Network Error",Pe.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Ye;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Pe(t,s.clarifyTimeoutError?Pe.ETIMEDOUT:Pe.ECONNABORTED,e,g)),g=null},void 0===s&&i.setContentType(null),"setRequestHeader"in g&&Oe.forEach(i.toJSON(),function(e,t){g.setRequestHeader(t,e)}),Oe.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),h&&([c,l]=gt(h,!0),g.addEventListener("progress",c)),f&&g.upload&&([a,u]=gt(f),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(o=t=>{g&&(n(!t||t.type?new ht(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const w=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);w&&-1===Xe.protocols.indexOf(w)?n(new Pe("Unsupported protocol "+w+":",Pe.ERR_BAD_REQUEST,e)):g.send(s||null)})},xt=(e,t)=>
2{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Pe?t:new ht(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,s(new Pe(`timeout ${t} of ms exceeded`,Pe.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=r;return a.unsubscribe=()=>Oe.asap(o),a}},St=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},It=(e,t,n,r)=>{const s=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*St(n,t)}(e,t);let i,o=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=o+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},Ot="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,kt=Ot&&"function"==typeof ReadableStream,Tt=Ot&&("function"==typeof TextEncoder?(Ct=new TextEncoder,e=>Ct.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ct;const Pt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},jt=kt&&Pt(()=>{let e=!1;const t=new Request(Xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),_t=kt&&Pt(()=>Oe.isReadableStream(new Response("").body)),Dt={stream:_t&&(e=>e.body)};var Lt;Ot&&(Lt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Dt[e]&&(Dt[e]=Oe.isFunction(Lt[e])?t=>t[e]():(t,n)=>{throw new Pe(`Response type '${e}' is not supported`,Pe.ERR_NOT_SUPPORT,n)})}));const Bt=Ot&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:d="same-origin",fetchOptions:f}=Mt(e);u=u?(u+"").toLowerCase():"text";let h,p=xt([s,i&&i.toAbortSignal()],o);const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&jt&&"get"!==n&&"head"!==n&&0!==(y=await(async(e,t)=>{const n=Oe.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Oe.isBlob(e))return e.size;if(Oe.isSpecCompliantForm(e)){const t=new Request(Xe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Oe.isArrayBufferView(e)||Oe.isArrayBuffer(e)?e.byteLength:(Oe.isURLSearchParams(e)&&(e+=""),Oe.isString(e)?(await Tt(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Oe.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=yt(y,gt(wt(c)));r=It(n.body,65536,e,t)}}Oe.isString(d)||(d=d?"include":"omit");const s="credentials"in Request.prototype;h=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let i=await fetch(h);const o=_t&&("stream"===u||"response"===u);if(_t&&(a||o&&g)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=Oe.toFiniteNumber(i.headers.get("content-length")),[n,r]=a&&yt(t,gt(wt(a),!0))||[];i=new Response(It(i.body,65536,n,()=>{r&&r(),g&&g()}),e)}u=u||"text";let w=await Dt[Oe.findKey(Dt,u)||"text"](i,e);return!o&&g&&g(),await new Promise((t,n)=>{pt(t,n,{data:w,headers:ut.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:h})})}catch(t){if(g&&g(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Pe("Network Error",Pe.ERR_NETWORK,e,h),{cause:t.cause||t});throw Pe.from(t,t&&t.code,e,h)}}),Rt={http:null,xhr:Nt,fetch:Bt};Oe.forEach(Rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});
2const zt=e=>`- ${e}`,Ut=e=>Oe.isFunction(e)||null===e||!1===e,Ft=e=>{e=Oe.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Ut(n)&&(r=Rt[(t=String(n)).toLowerCase()],void 0===r))throw new Pe(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+i]=r}if(!r){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let n=t?e.length>1?"since :\n"+e.map(zt).join("\n"):" "+zt(e[0]):"as no adapter specified";throw new Pe("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ht(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ht(null,e)}function Wt(e){return Ht(e),e.headers=ut.from(e.headers),e.data=lt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ft(e.adapter||nt.adapter)(e).then(function(t){return Ht(e),t.data=lt.call(e,e.transformResponse,t),t.headers=ut.from(t.headers),t},function(t){return dt(t)||(Ht(e),t&&t.response&&(t.response.data=lt.call(e,e.transformResponse,t.response),t.response.headers=ut.from(t.response.headers))),Promise.reject(t)})}const qt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const $t={};qt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,i)=>{if(!1===e)throw new Pe(r(s," has been removed"+(t?" in "+t:"")),Pe.ERR_DEPRECATED);return t&&!$t[s]&&($t[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,i)}},qt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Yt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Pe("options must be an object",Pe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const t=e[i],n=void 0===t||o(t,i,e);if(!0!==n)throw new Pe("option "+i+" must be "+n,Pe.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Pe("Unknown option "+i,Pe.ERR_BAD_OPTION)}},validators:qt},Gt=Yt.validators;class Qt{constructor(e){this.defaults=e,this.interceptors={request:new $e,response:new $e}}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=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=At(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&Yt.assertOptions(n,{silentJSONParsing:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean)},!1),null!=r&&(Oe.isFunction(r)?t.paramsSerializer={serialize:r}:Yt.assertOptions(r,{encode:Gt.function,serialize:Gt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Yt.assertOptions(t,{baseUrl:Gt.spelling("baseURL"),withXsrfToken:Gt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=s&&Oe.merge(s.common,s[t.method]);s&&Oe.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=ut.concat(i,s);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[Wt.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=o.length;let f=t;for(d=0;d<l;){const e=o[d++],t=o[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=Wt.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return qe(vt((e=At(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Oe.forEach(["delete","get","head","options"],function(e){Qt.prototype[e]=function(t,n){return this.request(At(n||{},{method:e,url:t,data:(n||{}).data}))}}),Oe.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,s){return this.request(At(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Qt.prototype[e]=t(),Qt.prototype[e+"Form"]=t(!0)});const Kt=Qt;class Vt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,s){n.reason||(n.reason=new ht(e,r,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
2subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new Vt(function(t){e=t});return{token:t,cancel:e}}}const Zt=Vt,Jt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent: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(Jt).forEach(([e,t])=>{Jt[t]=e});const Xt=Jt,en=function e(t){const n=new Kt(t),r=U(Kt.prototype.request,n);return Oe.extend(r,Kt.prototype,n,{allOwnKeys:!0}),Oe.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(At(t,n))},r}(nt);en.Axios=Kt,en.CanceledError=ht,en.CancelToken=Zt,en.isCancel=dt,en.VERSION="1.8.4",en.toFormData=Re,en.AxiosError=Pe,en.Cancel=en.CanceledError,en.all=function(e){return Promise.all(e)},en.spread=function(e){return function(t){return e.apply(null,t)}},en.isAxiosError=function(e){return Oe.isObject(e)&&!0===e.isAxiosError},en.mergeConfig=At,en.AxiosHeaders=ut,en.formToJSON=e=>et(Oe.isHTMLForm(e)?new FormData(e):e),en.getAdapter=Ft,en.HttpStatusCode=Xt,en.default=en;const tn=en;var nn=function(){return nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},nn.apply(this,arguments)},rn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";(()=>{const e=Array(256).fill(-1);for(let t=0;t<58;++t)e[rn.charCodeAt(t)]=t})();var sn,on,an,cn=e=>{if(!e||"string"!=typeof e)throw new Error(`Expected base58 string but got “${e}”`);if(e.match(/[IOl0]/gmu))throw new Error(`Invalid base58 character “${e.match(/[IOl0]/gmu)}”`);const t=e.match(/^1+/gmu),n=t?t[0].length:0,r=(e.length-n)*(Math.log(58)/Math.log(256))+1>>>0;return new Uint8Array([...new Uint8Array(n),...e.match(/.{1}/gmu).map(e=>rn.indexOf(e)).reduce((e,t)=>e.map(e=>{const n=58*e+t;return t=n>>8,n}),new Uint8Array(r)).reverse().filter((s=!1,e=>s=s||e))]);var s},un=(sn=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;const n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={};for(let e=0;e<32;e++){const t=n.charAt(e);r[t]=e}function s(e){const t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){let t=1;for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);if(r<33||r>126)return"Invalid prefix ("+e+")";t=s(t)^r>>5}t=s(t);for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);t=s(t)^31&r}return t}function o(e,t,n,r){let s=0,i=0;const o=(1<<n)-1,a=[];for(let r=0;r<e.length;++r)for(s=s<<t|e[r],i+=t;i>=n;)i-=n,a.push(s>>i&o);if(r)i>0&&a.push(s<<n-i&o);else{if(i>=t)return"Excess padding";if(s<<n-i&o)return"Non-zero padding"}return a}function a(e){return o(e,8,5,!0)}function c(e){const t=o(e,5,8,!1);if(Array.isArray(t))return t}function u(e){const t=o(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function o(e,n){if(n=n||90,e.length<8)return e+" too short";if(e.length>n)return"Exceeds length limit";const o=e.toLowerCase(),a=e.toUpperCase();if(e!==o&&e!==a)return"Mixed-case string "+e;const c=(e=o).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;const u=e.slice(0,c),l=e.slice(c+1);if(l.length<6)return"Data too short";let d=i(u);if("string"==typeof d)return d;const f=[];for(let e=0;e<l.length;++e){const t=l.charAt(e),n=r[t];if(void 0===n)return"Unknown character "+t;d=s(d)^n,e+6>=l.length||f.push(n)}return d!==t?"Invalid checksum for "+e:{prefix:u,words:f}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const n=o(e,t);if("object"==typeof n)return n},decode:function(e,t){const n=o(e,t);if("object"==typeof n)return n;throw new Error(n)},encode:function(e,r,o){if(o=o||90,e.length+7+r.length>
2o)throw new TypeError("Exceeds length limit");let a=i(e=e.toLowerCase());if("string"==typeof a)throw new Error(a);let c=e+"1";for(let e=0;e<r.length;++e){const t=r[e];if(t>>5)throw new Error("Non 5-bit word");a=s(a)^t,c+=n.charAt(t)}for(let e=0;e<6;++e)a=s(a);a^=t;for(let e=0;e<6;++e)c+=n.charAt(a>>5*(5-e)&31);return c},toWords:a,fromWordsUnsafe:c,fromWords:u}}t.bech32=l("bech32"),t.bech32m=l("bech32m")},sn(on={exports:{}},on.exports),on.exports);(an=un)&&an.__esModule&&Object.prototype.hasOwnProperty.call(an,"default")&&an.default;var ln=un.bech32m,dn=un.bech32;const fn=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];class hn{constructor(){this.A=1779033703,this.B=-1150833019,this.C=1013904242,this.D=-1521486534,this.E=1359893119,this.F=-1694144372,this.G=528734635,this.H=1541459225,this._size=0,this._sp=0,(!gn||yn>=8e3)&&(gn=new ArrayBuffer(8e3),yn=0),this._byte=new Uint8Array(gn,yn,80),this._word=new Int32Array(gn,yn,20),yn+=80}update(e){if("string"==typeof e)return this._utf8(e);if(null==e)throw new TypeError("Invalid type: "+typeof e);const t=e.byteOffset,n=e.byteLength;let r=n/64|0,s=0;if(r&&!(3&t)&&!(this._size%64)){const n=new Int32Array(e.buffer,t,16*r);for(;r--;)this._int32(n,s>>2),s+=64;this._size+=s}if(1!==e.BYTES_PER_ELEMENT&&e.buffer){const r=new Uint8Array(e.buffer,t+s,n-s);return this._uint8(r)}return s===n?this:this._uint8(e,s)}_uint8(e,t){const{_byte:n,_word:r}=this,s=e.length;for(t|=0;t<s;){const i=this._size%64;let o=i;for(;t<s&&o<64;)n[o++]=e[t++];o>=64&&this._int32(r),this._size+=o-i}return this}_utf8(e){const{_byte:t,_word:n}=this,r=e.length;let s=this._sp;for(let i=0;i<r;){const o=this._size%64;let a=o;for(;i<r&&a<64;){let n=0|e.charCodeAt(i++);n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<55296||n>57343?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):s?(n=((1023&s)<<10)+(1023&n)+65536,t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n,s=0):s=n}a>=64&&(this._int32(n),n[0]=n[16]),this._size+=a-o}return this._sp=s,this}_int32(e,t){let{A:n,B:r,C:s,D:i,E:o,F:a,G:c,H:u}=this,l=0;for(t|=0;l<16;)pn[l++]=mn(e[t++]);for(l=16;l<64;l++)pn[l]=Nn(pn[l-2])+pn[l-7]+Mn(pn[l-15])+pn[l-16]|0;for(l=0;l<64;l++){const e=u+An(o)+bn(o,a,c)+fn[l]+pn[l]|0,t=En(n)+vn(n,r,s)|0;u=c,c=a,a=o,o=i+e|0,i=s,s=r,r=n,n=e+t|0}this.A=n+this.A|0,this.B=r+this.B|0,this.C=s+this.C|0,this.D=i+this.D|0,this.E=o+this.E|0,this.F=a+this.F|0,this.G=c+this.G|0,this.H=u+this.H|0}digest(e){const{_byte:t,_word:n}=this;let r=this._size%64|0;for(t[r++]=128;3&r;)t[r++]=0;if(r>>=2,r>14){for(;r<16;)n[r++]=0;r=0,this._int32(n)}for(;r<16;)n[r++]=0;const s=8*this._size,i=(4294967295&s)>>>0,o=(s-i)/4294967296;return o&&(n[14]=mn(o)),i&&(n[15]=mn(i)),this._int32(n),"hex"===e?this._hex():this._bin()}_hex(){const{A:e,B:t,C:n,D:r,E:s,F:i,G:o,H:a}=this;return wn(e)+wn(t)+wn(n)+wn(r)+wn(s)+wn(i)+wn(o)+wn(a)}_bin(){const{A:e,B:t,C:n,D:r,E:s,F:i,G:o,H:a,_byte:c,_word:u}=this;return u[0]=mn(e),u[1]=mn(t),u[2]=mn(n),u[3]=mn(r),u[4]=mn(s),u[5]=mn(i),u[6]=mn(o),u[7]=mn(a),c.slice(0,32)}}const pn=new Int32Array(64);let gn,yn=0;const wn=e=>(e+4294967296).toString(16).substr(-8),mn=254===new Uint8Array(new Uint16Array([65279]).buffer)[0]?e=>e:e=>e<<24&4278190080|e<<8&16711680|e>>8&65280|e>>24&255,bn=(e,t,n)=>n^e&(t^n),vn=(e,t,n)=>e&t|n&(e|t),En=e=>(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),An=e=>(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7),Mn=e=>(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,Nn=e=>(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10;var xn,Sn,In=function(e){return(new hn).update(e).digest()};!function(e){e.mainnet="mainnet",e.testnet="testnet",e.regtest="regtest"}(xn||(xn={})),function(e){e.p2pkh="p2pkh",e.p2sh="p2sh",e.p2wpkh="p2wpkh",e.p2wsh="p2wsh",e.p2tr="p2tr"}(Sn||(Sn={}));var On,kn={0:{type:Sn.p2pkh,network:xn.mainnet},111:{type:Sn.p2pkh,network:xn.testnet},5:{type:Sn.p2sh,network:xn.mainnet},196:{type:Sn.p2sh,network:xn.testnet}},Tn=function(e){var t,n=e.substr(0,2).toLowerCase();if("bc"===n||"tb"===n)return function(e){var t;try{t=e.startsWith("bc1p")||e.startsWith("tb1p")||e.startsWith("bcrt1p")?ln.decode(e):dn.decode(e)}catch(e){throw new Error("Invalid address")}
2var n={bc:xn.mainnet,tb:xn.testnet,bcrt:xn.regtest}[t.prefix];if(void 0===n)throw new Error("Invalid address");var r=t.words[0];if(r<0||r>16)throw new Error("Invalid address");return{bech32:!0,network:n,address:e,type:20===dn.fromWords(t.words.slice(1)).length?Sn.p2wpkh:1===r?Sn.p2tr:Sn.p2wsh}}(e);try{t=cn(e)}catch(e){throw new Error("Invalid address")}var r=t.length;if(25!==r)throw new Error("Invalid address");var s=t[0],i=t.slice(r-4,r),o=t.slice(0,r-4),a=In(In(o)).slice(0,4);if(i.some(function(e,t){return e!==a[t]}))throw new Error("Invalid address");if(!Object.keys(kn).map(Number).includes(s))throw new Error("Invalid address");return nn(nn({},kn[s]),{address:e,bech32:!1})},Cn=n(20867),Pn=function e(t,n){return{kind:"schema",type:"picklist",reference:e,expects:v(t.map(w),"|"),async:!1,options:t,message:n,_run(e,t){return this.options.includes(e.value)?e.typed=!0:m(this,"type",e,t),e}}}(["software","ledger","keystone"]),jn=(e=>(e.Ordinals="ordinals",e.Payment="payment",e.Stacks="stacks",e))(jn||{}),_n=(e=>(e.p2pkh="p2pkh",e.p2sh="p2sh",e.p2wpkh="p2wpkh",e.p2wsh="p2wsh",e.p2tr="p2tr",e.stacks="stacks",e))(_n||{}),Dn=C({address:j(),publicKey:j(),purpose:x(jn),addressType:x(_n),walletType:Pn}),Ln=(e=>(e.Mainnet="Mainnet",e.Testnet="Testnet",e.Testnet4="Testnet4",e.Signet="Signet",e.Regtest="Regtest",e))(Ln||{}),Bn=P(D([j(),T(),O()])),Rn=C({jsonrpc:S("2.0"),method:j(),params:P(D([M(L()),function e(t,n){return{kind:"schema",type:"loose_object",reference:e,expects:"Object",async:!1,entries:t,message:n,_run(e,t){const n=e.value;if(n&&"object"==typeof n){e.typed=!0,e.value={};for(const r in this.entries){const s=n[r],i=this.entries[r]._run({typed:!1,value:s},t);if(i.issues){const o={type:"object",origin:"value",input:n,key:r,value:s};for(const t of i.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=i.issues),t.abortEarly){e.typed=!1;break}}i.typed||(e.typed=!1),(void 0!==i.value||r in n)&&(e.value[r]=i.value)}if(!e.issues||!t.abortEarly)for(const t in n)b(n,t)&&!(t in this.entries)&&(e.value[t]=n[t])}else m(this,"type",e,t);return e}}}({}),O()])),id:(On=Bn,On.wrapped)}),zn=(e=>(e[e.PARSE_ERROR=-32700]="PARSE_ERROR",e[e.INVALID_REQUEST=-32600]="INVALID_REQUEST",e[e.METHOD_NOT_FOUND=-32601]="METHOD_NOT_FOUND",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.INTERNAL_ERROR=-32603]="INTERNAL_ERROR",e[e.USER_REJECTION=-32e3]="USER_REJECTION",e[e.METHOD_NOT_SUPPORTED=-32001]="METHOD_NOT_SUPPORTED",e[e.ACCESS_DENIED=-32002]="ACCESS_DENIED",e))(zn||{}),Un=C({jsonrpc:S("2.0"),result:I(L()),id:Bn}),Fn=C({jsonrpc:S("2.0"),error:I(L()),id:Bn});function Hn(){return window.btc_providers||(window.btc_providers=[]),window.btc_providers}function Wn(e){return e?.split(".").reduce((e,t)=>e?.[t],window)}function qn(){return localStorage.getItem("sats-connect_defaultProvider")}D([Un,Fn]),B("type",[C({type:S("accountChange"),addresses:P(M(Dn))}),C({type:S("networkChange"),bitcoin:C({name:x(Ln)}),stacks:C({name:j()})}),C({type:S("disconnect")})]);var $n=C({contract:j(),functionName:j(),arguments:P(M(j())),functionArgs:P(M(j())),postConditions:P(M(j())),postConditionMode:P(D([S("allow"),S("deny")]))}),Yn=(C({txid:j(),transaction:j()}),C({...Rn.entries,...C({method:S("stx_callContract"),params:$n,id:j()}).entries}),C({name:j(),clarityCode:j(),clarityVersion:P(j()),postConditions:P(M(j())),postConditionMode:P(D([S("allow"),S("deny")]))})),Gn=(C({txid:j(),transaction:j()}),C({...Rn.entries,...C({method:S("stx_deployContract"),params:Yn,id:j()}).entries}),C({read:P(N())})),Qn=C({readNetwork:P(N())}),Kn=C({type:S("account"),resourceId:j(),clientId:j(),actions:Gn}),Vn=C({type:S("wallet"),resourceId:j(),clientId:j(),actions:Qn}),Zn=B("type",[C({...R(Kn,["clientId"]).entries}),C({...R(Vn,["clientId"]).entries})]),Jn=B("type",[Kn,Vn]),Xn=k(M(Zn)),er=(S(!0),C({...Rn.entries,...C({method:S("wallet_requestPermissions"),params:Xn,id:j()}).entries}),k(O())),tr=(k(O()),C({...Rn.entries,...C({method:S("wallet_renouncePermissions"),params:er,id:j()}).entries}),k(O())),nr=(k(O()),C({...Rn.entries,...C({method:S("wallet_disconnect"),params:tr,id:j()}).entries}),k(O())),rr=(C({...Rn.entries,...C({method:S("wallet_getWalletType"),params:nr,id:j()}).entries}),k(O())),sr=(M(Jn),C({...Rn.entries,...C({method:S("wallet_getCurrentPermissions"),params:rr,id:j()}).entries}),k(O())),ir=C({bitcoin:C({name:x(Ln)}),stacks:C({name:j()})}),or=(C({...Rn.entries,...C({method:S("wallet_getNetwork"),params:sr,id:j()}).entries}),C({name:x(Ln)})),ar=(k(O()),C({...Rn.entries,...C({method:S("wallet_changeNetwork"),params:or,id:j()}).entries}),k(O())),cr=(C({id:j(),addresses:M(Dn),walletType:Pn,network:ir}),C({...Rn.entries,...C({method:S("wallet_getAccount"),params:ar,id:j()}).entries}),k(C({permissions:P(M(Zn)),addresses:P(M(x(jn))),message:P(z(j(),function e(t,n){return{kind:"val
2idation",type:"max_length",reference:e,async:!1,expects:`<=${t}`,requirement:t,message:n,_run(e,t){return e.typed&&e.value.length>this.requirement&&m(this,"length",e,t,{received:`${e.value.length}`}),e}}}(80,"The message must not exceed 80 characters."))),network:P(x(Ln))}))),ur=(C({id:j(),addresses:M(Dn),walletType:Pn,network:ir}),C({...Rn.entries,...C({method:S("wallet_connect"),params:cr,id:j()}).entries}),k(O())),lr=(C({addresses:M(C({address:j(),publicKey:j(),gaiaHubUrl:j(),gaiaAppKey:j()})),network:ir}),C({...Rn.entries,...C({method:S("stx_getAccounts"),params:ur,id:j()}).entries}),k(C({message:P(j())}))),dr=(C({addresses:M(Dn),network:ir}),C({...Rn.entries,...C({method:S("stx_getAddresses"),params:lr,id:j()}).entries}),C({message:j()})),fr=(C({signature:j(),publicKey:j()}),C({...Rn.entries,...C({method:S("stx_signMessage"),params:dr,id:j()}).entries}),C({domain:j(),message:j(),publicKey:P(j())})),hr=(C({signature:j(),publicKey:j()}),C({...Rn.entries,...C({method:S("stx_signStructuredMessage"),params:fr,id:j()}).entries}),C({transaction:j(),pubkey:P(j()),broadcast:P(N())})),pr=(C({transaction:j()}),C({...Rn.entries,...C({method:S("stx_signTransaction"),params:hr,id:j()}).entries}),C({transactions:z(M(z(j(),function e(t,n){return{kind:"validation",type:"check",reference:e,async:!1,expects:null,requirement:t,message:n,_run(e,t){return e.typed&&!this.requirement(e.value)&&m(this,"input",e,t),e}}}(e=>!0,"Invalid hex-encoded Stacks transaction."))),function e(t,n){return{kind:"validation",type:"min_length",reference:e,async:!1,expects:`>=${t}`,requirement:t,message:n,_run(e,t){return e.typed&&e.value.length<this.requirement&&m(this,"length",e,t,{received:`${e.value.length}`}),e}}}(1)),broadcast:P(N())})),gr=(C({transactions:M(j())}),C({...Rn.entries,...C({method:S("stx_signTransactions"),params:pr,id:j()}).entries}),C({amount:D([T(),j()]),recipient:j(),memo:P(j()),version:P(j()),postConditionMode:P(T()),postConditions:P(M(j())),pubkey:P(j())})),yr=(C({txid:j(),transaction:j()}),C({...Rn.entries,...C({method:S("stx_transferStx"),params:gr,id:j()}).entries}),k(O())),wr=(C({version:j(),methods:P(M(j())),supports:M(j())}),C({...Rn.entries,...C({method:S("getInfo"),params:yr,id:j()}).entries}),C({purposes:M(x(jn)),message:P(j())})),mr=(C({addresses:M(Dn),network:ir}),C({...Rn.entries,...C({method:S("getAddresses"),params:wr,id:j()}).entries}),(e=>(e.ECDSA="ECDSA",e.BIP322="BIP322",e))(mr||{})),br=C({address:j(),message:j(),protocol:P(x(mr))}),vr=(C({signature:j(),messageHash:j(),address:j(),protocol:x(mr)}),C({...Rn.entries,...C({method:S("signMessage"),params:br,id:j()}).entries}),C({recipients:M(C({address:j(),amount:T()}))})),Er=(C({txid:j()}),C({...Rn.entries,...C({method:S("sendTransfer"),params:vr,id:j()}).entries}),C({psbt:j(),signInputs:function e(t,n,r){return{kind:"schema",type:"record",reference:e,expects:"Object",async:!1,key:t,value:n,message:r,_run(e,t){const n=e.value;if(n&&"object"==typeof n){e.typed=!0,e.value={};for(const r in n)if(b(n,r)){const s=n[r],i=this.key._run({typed:!1,value:r},t);if(i.issues){const o={type:"object",origin:"key",input:n,key:r,value:s};for(const t of i.issues)t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=i.issues),t.abortEarly){e.typed=!1;break}}const o=this.value._run({typed:!1,value:s},t);if(o.issues){const i={type:"object",origin:"value",input:n,key:r,value:s};for(const t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=o.issues),t.abortEarly){e.typed=!1;break}}i.typed&&o.typed||(e.typed=!1),i.typed&&(e.value[i.value]=o.value)}}else m(this,"type",e,t);return e}}}(j(),M(T())),broadcast:P(N())})),Ar=(C({psbt:j(),txid:P(j())}),C({...Rn.entries,...C({method:S("signPsbt"),params:Er,id:j()}).entries}),C({purposes:M(x(jn)),message:P(j())})),Mr=(M(C({...Dn.entries,...C({walletType:Pn}).entries})),C({...Rn.entries,...C({method:S("getAccounts"),params:Ar,id:j()}).entries}),k(O()),C({confirmed:j(),unconfirmed:j(),total:j()}),C({...Rn.entries,...C({method:S("getBalance"),id:j()}).entries}),C({amount:j(),cap:j(),heightStart:P(j()),heightEnd:P(j()),offsetStart:P(j()),offsetEnd:P(j())})),Nr=C({contentType:j(),contentBase64:j()}),xr=C({runeName:j(),divisibility:P(T()),symbol:P(j()),premine:P(j()),isMintable:N(),delegateInscriptionId:P(j()),destinationAddress:j(),refundAddress:j(),feeRate:T(),appServiceFee:P(T()),appServiceFeeAddress:P(j()),terms:P(Mr),inscriptionDetail
2s:P(Nr),network:P(x(Ln))}),Sr=(C({orderId:j(),fundTransactionId:j(),fundingAddress:j()}),C({...Rn.entries,...C({method:S("runes_etch"),params:xr,id:j()}).entries}),k(O())),Ir=(C({balances:M(C({runeName:j(),amount:j(),divisibility:T(),symbol:j(),inscriptionId:k(j()),spendableBalance:j()}))}),C({...Rn.entries,...C({method:S("runes_getBalance"),params:Sr,id:j()}).entries}),C({appServiceFee:P(T()),appServiceFeeAddress:P(j()),destinationAddress:j(),feeRate:T(),refundAddress:j(),repeats:T(),runeName:j(),network:P(x(Ln))})),Or=(C({orderId:j(),fundTransactionId:j(),fundingAddress:j()}),C({...Rn.entries,...C({method:S("runes_mint"),params:Ir,id:j()}).entries}),C({recipients:M(C({runeName:j(),amount:j(),address:j()}))})),kr=(C({txid:j()}),C({...Rn.entries,...C({method:S("runes_transfer"),params:Or,id:j()}).entries}),C({offset:T(),limit:T()})),Tr=(C({total:T(),limit:T(),offset:T(),inscriptions:M(C({inscriptionId:j(),inscriptionNumber:j(),address:j(),collectionName:P(j()),postage:j(),contentLength:j(),contentType:j(),timestamp:T(),offset:T(),genesisTransaction:j(),output:j()}))}),C({...Rn.entries,...C({method:S("ord_getInscriptions"),params:kr,id:j()}).entries}),C({transfers:M(C({address:j(),inscriptionId:j()}))})),Cr=(C({txid:j()}),C({...Rn.entries,...C({method:S("ord_sendInscriptions"),params:Tr,id:j()}).entries}),async(e,t,n)=>{let r=window.XverseProviders?.BitcoinProvider||window.BitcoinProvider;if(n&&(r=await Wn(n)),!r)throw new Error("no wallet provider was found");if(!e)throw new Error("A wallet method is required");const s=await r.request(e,t);return A(Fn,s)?{status:"error",error:s.error}:A(Un,s)?{status:"success",result:s.result}:{status:"error",error:{code:-32603,message:"Received unknown response from provider.",data:s}}}),Pr={Mainnet:"",Testnet:"-testnet",Testnet4:"-testnet4",Signet:"-signet"},jr=(e="Mainnet")=>{if("Regtest"===e)throw new Error(`Ordinals API does not support ${e} network`);return`https://ordinals${Pr[e]}.xverse.app/v1`},_r=class{client;constructor(e){this.client=tn.create({baseURL:jr(e)})}parseError=e=>({code:e.response?.status,message:JSON.stringify(e.response?.data)});estimateMintCost=async e=>{try{return{data:(await this.client.post("/runes/mint/estimate",{...e})).data}}catch(e){const t=e;return{error:this.parseError(t)}}};estimateEtchCost=async e=>{try{return{data:(await this.client.post("/runes/etch/estimate",{...e})).data}}catch(e){const t=e;return{error:this.parseError(t)}}};createMintOrder=async e=>{try{return{data:(await this.client.post("/runes/mint/orders",{...e})).data}}catch(e){const t=e;return{error:this.parseError(t)}}};createEtchOrder=async e=>{try{return{data:(await this.client.post("/runes/etch/orders",{...e})).data}}catch(e){const t=e;return{error:this.parseError(t)}}};executeMint=async(e,t)=>{try{return{data:(await this.client.post(`/runes/mint/orders/${e}/execute`,{fundTransactionId:t})).data}}catch(e){const t=e;return{error:this.parseError(t)}}};executeEtch=async(e,t)=>{try{return{data:(await this.client.post(`/runes/etch/orders/${e}/execute`,{fundTransactionId:t})).data}}catch(e){const t=e;return{error:this.parseError(t)}}};getOrder=async e=>{try{return{data:(await this.client.get(`/orders/${e}`)).data}}catch(e){const t=e;return{error:this.parseError(t)}}};rbfOrder=async e=>{const{orderId:t,newFeeRate:n}=e;try{return{data:(await this.client.post(`/orders/${t}/rbf-estimate`,{newFeeRate:n})).data}}catch(e){const t=e;return{error:this.parseError(t)}}}},Dr={},Lr=(e="Mainnet")=>(Dr[e]||(Dr[e]=new _r(e)),Dr[e]),Br=class{async mintRunes(e){try{const t=await this.requestInternal("getInfo",null).catch(()=>null);if(t&&"success"===t.status){const n=t.result.methods?.includes("runes_mint");if(n){const t=await this.requestInternal("runes_mint",e);if(t){if("success"===t.status)return t;if("error"===t.status&&-32601!==t.error.code)return t}}}const n={destinationAddress:e.destinationAddress,feeRate:e.feeRate,refundAddress:e.refundAddress,repeats:e.repeats,runeName:e.runeName,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress},r=await new _r(e.network).createMintOrder(n);if(!r.data)return{status:"error",error:{code:400===r.error.code?-32600:-32603,message:r.error.message}};const s=await this.requestInternal("sendTransfer",{recipients:[{address:r.data.fundAddress,amount:r.data.fundAmount}]});return"success"!==s.status?s:(await new _r(e.network).executeMint(r.data.orderId,s.result.txid),{status:"success",result:{orderId:r.data.orderId,fundTransactionId:s.result.txid,fundingAddress:r.data.fundAddress}})}catch(e){return{status:"error",error:{code:-32603,message:e.message}}}}async etchRunes(e){const t={destinationAddress:e.destinationAddress,refundAddress:e.refundAddress,feeRate:e.feeRate,runeName:e.runeName,divisibility:e.divisibility,symbol:e.symbol,premine:e.premine,isMintable:e.isMintable,terms:e.terms,inscriptionDetail
2s:e.inscriptionDetails,delegateInscriptionId:e.delegateInscriptionId,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress};try{const n=await this.requestInternal("getInfo",null).catch(()=>null);if(n&&"success"===n.status){const t=n.result.methods?.includes("runes_etch");if(t){const t=await this.requestInternal("runes_etch",e);if(t){if("success"===t.status)return t;if("error"===t.status&&-32601!==t.error.code)return t}}}const r=await new _r(e.network).createEtchOrder(t);if(!r.data)return{status:"error",error:{code:400===r.error.code?-32600:-32603,message:r.error.message}};const s=await this.requestInternal("sendTransfer",{recipients:[{address:r.data.fundAddress,amount:r.data.fundAmount}]});return"success"!==s.status?s:(await new _r(e.network).executeEtch(r.data.orderId,s.result.txid),{status:"success",result:{orderId:r.data.orderId,fundTransactionId:s.result.txid,fundingAddress:r.data.fundAddress}})}catch(e){return{status:"error",error:{code:-32603,message:e.message}}}}async estimateMint(e){const t={destinationAddress:e.destinationAddress,feeRate:e.feeRate,repeats:e.repeats,runeName:e.runeName,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress},n=await Lr(e.network).estimateMintCost(t);return n.data?{status:"success",result:n.data}:{status:"error",error:{code:400===n.error.code?-32600:-32603,message:n.error.message}}}async estimateEtch(e){const t={destinationAddress:e.destinationAddress,feeRate:e.feeRate,runeName:e.runeName,divisibility:e.divisibility,symbol:e.symbol,premine:e.premine,isMintable:e.isMintable,terms:e.terms,inscriptionDetails:e.inscriptionDetails,delegateInscriptionId:e.delegateInscriptionId,appServiceFee:e.appServiceFee,appServiceFeeAddress:e.appServiceFeeAddress},n=await Lr(e.network).estimateEtchCost(t);return n.data?{status:"success",result:n.data}:{status:"error",error:{code:400===n.error.code?-32600:-32603,message:n.error.message}}}async getOrder(e){const t=await Lr(e.network).getOrder(e.id);return t.data?{status:"success",result:t.data}:{status:"error",error:{code:400===t.error.code||404===t.error.code?-32600:-32603,message:t.error.message}}}async estimateRbfOrder(e){const t={newFeeRate:e.newFeeRate,orderId:e.orderId},n=await Lr(e.network).rbfOrder(t);return n.data?{status:"success",result:{fundingAddress:n.data.fundingAddress,rbfCost:n.data.rbfCost}}:{status:"error",error:{code:400===n.error.code||404===n.error.code?-32600:-32603,message:n.error.message}}}async rbfOrder(e){try{const t={newFeeRate:e.newFeeRate,orderId:e.orderId},n=await Lr(e.network).rbfOrder(t);if(!n.data)return{status:"error",error:{code:400===n.error.code||404===n.error.code?-32600:-32603,message:n.error.message}};const r=await this.requestInternal("sendTransfer",{recipients:[{address:n.data.fundingAddress,amount:n.data.rbfCost}]});return"success"!==r.status?r:{status:"success",result:{fundingAddress:n.data.fundingAddress,orderId:t.orderId,fundRBFTransactionId:r.result.txid}}}catch(e){return{status:"error",error:{code:-32603,message:e.message}}}}async request(e,t){switch(e){case"runes_mint":return this.mintRunes(t);case"runes_etch":return this.etchRunes(t);case"runes_estimateMint":return this.estimateMint(t);case"runes_estimateEtch":return this.estimateEtch(t);case"runes_getOrder":return this.getOrder(t);case"runes_estimateRbfOrder":return this.estimateRbfOrder(t);case"runes_rbfOrder":return this.rbfOrder(t);default:return this.requestInternal(e,t)}}};function Rr(e){let t=[];for(let n in e){let r=e[n];for(let e of r)t.push({index:e,address:n})}return t}var zr=class extends Br{id="";constructor(e){super(),this.id=e}requestInternal=async(e,t)=>Cr(e,t,this.id);addListener=(...e)=>{throw new Error("Method not supported for `BaseAdapter`.")}},Ur={fordefi:{id:"FordefiProviders.UtxoProvider",name:"Fordefi",webUrl:"https://www.fordefi.com/",chromeWebStoreUrl:"https://chromewebstore.google.com/detail/fordefi/hcmehenccjdmfbojapcbcofkgdpbnlle",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzEzNDk0XzY2MjU0KSI+CjxwYXRoIGQ9Ik0xMC44NzY5IDE1LjYzNzhIMS41VjE4LjM5OUMxLjUgMTkuODAxMyAyLjYzNDQ3IDIwLjkzOCA0LjAzMzkyIDIwLjkzOEg4LjI0OTkyTDEwLjg3NjkgMTUuNjM3OFoiIGZpbGw9IiM3OTk0RkYiLz4KPHBhdGggZD0iTTEuNSA5Ljc3NTUxSDE5LjA1MTZMMTcuMDEzOSAxMy44NzExSDEuNVY5Ljc3NTUxWiIgZmlsbD0iIzQ4NkRGRiIvPgo8cGF0aCBkPSJNNy42NTk5NiAzSDEuNTI0NDFWOC4wMDcwNEgyMi40NjEyVjNIMTYuMzI1NlY2LjczOTQ0SDE1LjA2MDZWM0g4LjkyNTAyVjYuNzM5NDRINy42NTk5NlYzWiIgZmlsbD0iIzVDRDFGQSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzEzNDk0XzY2MjU0Ij4KPHJlY3Qgd2lkdGg9IjIxIiBoZWlnaHQ9IjE4IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMS41IDMpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},xverse:{id:"XverseProviders.BitcoinProvider",name:"Xverse",webUrl:"https://www.xverse.app/",googlePlayStoreUrl:"https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse",iOSAppStoreUrl:"https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513",chromeWebStoreUrl:"https://chromewebstore.google.com/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgdmlld0JveD0iMCAwIDEwMiAxMDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJJY29uX0FydCAoRWRpdCBNZSkiPgo8cmVjdCB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgZmlsbD0iIzE4MTgxOCIvPgo8ZyBpZD0iTG9nby9FbWJsZW0iIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yMF8xMjIzKSI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik03NC42NTQyIDczLjg4ODNWNjUuMjMxMkM3NC42NTQyIDY0Ljg4OCA3NC41MTc3IDY0LjU2MDYgNzQuMjc0NSA2NC4zMTc0TDM3LjQzOTcgMjcuNDgyNUMzNy4xOTY1IDI3LjIzOTIgMzYuODY5MSAyNy4xMDI4IDM2LjUyNTggMjcuMTAyOEgyNy44NjlDMjcuNDQxNiAyNy4xMDI4IDI3LjA5MzggMjcuNDUwNiAyNy4wOTM4ID
2I3Ljg3OFYzNS45MjExQzI3LjA5MzggMzYuMjY0NCAyNy4yMzAyIDM2LjU5MTcgMjcuNDczNCAzNi44MzVMNDAuNjk1MiA1MC4wNTY3QzQwLjk5NzUgNTAuMzU5MSA0MC45OTc1IDUwLjg1MDEgNDAuNjk1MiA1MS4xNTI0TDI3LjMyMTEgNjQuNTI2NUMyNy4xNzU2IDY0LjY3MiAyNy4wOTM4IDY0Ljg2OTggMjcuMDkzOCA2NS4wNzQ0VjczLjg4ODNDMjcuMDkzOCA3NC4zMTUzIDI3LjQ0MTYgNzQuNjYzNSAyNy44NjkgNzQuNjYzNUg0Mi4zMzQyQzQyLjc2MTYgNzQuNjYzNSA0My4xMDk0IDc0LjMxNTMgNDMuMTA5NCA3My44ODgzVjY4LjY5NThDNDMuMTA5NCA2OC40OTEyIDQzLjE5MTIgNjguMjkzNSA0My4zMzY4IDY4LjE0NzlMNTAuNTExNCA2MC45NzMzQzUwLjgxMzggNjAuNjcwOSA1MS4zMDQ4IDYwLjY3MDkgNTEuNjA3MiA2MC45NzMzTDY0LjkxOTggNzQuMjg2MUM2NS4xNjMxIDc0LjUyOTMgNjUuNDkwNCA3NC42NjU4IDY1LjgzMzcgNzQuNjY1OEg3My44NzY3Qzc0LjMwNDIgNzQuNjY1OCA3NC42NTE5IDc0LjMxNzYgNzQuNjUxOSA3My44OTA2TDc0LjY1NDIgNzMuODg4M1oiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGlkPSJWZWN0b3JfMiIgZD0iTTU1LjM1OCAzOC41NjcySDYyLjYwMzFDNjMuMDMyOCAzOC41NjcyIDYzLjM4MjkgMzguOTE3MyA2My4zODI5IDM5LjM0NjlWNDYuNTkyMUM2My4zODI5IDQ3LjI4NzcgNjQuMjI0IDQ3LjYzNTUgNjQuNzE1MSA0Ny4xNDIyTDc0LjY1NDEgMzcuMTg3M0M3NC43OTk0IDM3LjA0MTggNzQuODgxNiAzNi44NDQgNzQuODgxNiAzNi42MzcxVjI3LjkxODlDNzQuODgxNiAyNy40ODkyIDc0LjUzMzQgMjcuMTM5MSA3NC4xMDE3IDI3LjEzOTFMNjUuMjUzOCAyNy4xMjc3QzY1LjA0NyAyNy4xMjc3IDY0Ljg0OTIgMjcuMjA5NiA2NC43MDE0IDI3LjM1NTFMNTQuODA1NiAzNy4yMzVDNTQuMzE0NSAzNy43MjYgNTQuNjYyMyAzOC41NjcyIDU1LjM1NTcgMzguNTY3Mkg1NS4zNThaIiBmaWxsPSIjRUU3QTMwIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMF8xMjIzIj4KPHJlY3Qgd2lkdGg9IjQ3LjgxMjUiIGhlaWdodD0iNDcuODEyNSIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3LjA5MzggMjcuMDkzOCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"},unisat:{id:"unisat",name:"Unisat",webUrl:"https://unisat.io/",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgwIiBoZWlnaHQ9IjE4MCIgdmlld0JveD0iMCAwIDE4MCAxODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxODAiIGhlaWdodD0iMTgwIiBmaWxsPSJibGFjayIvPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTAwNTBfNDE3MSkiPgo8cGF0aCBkPSJNMTEzLjY2IDI5LjI4OTdMMTQzLjk3IDU5LjMwOTdDMTQ2LjU1IDYxLjg1OTcgMTQ3LjgyIDY0LjQzOTcgMTQ3Ljc4IDY3LjAzOTdDMTQ3Ljc0IDY5LjYzOTcgMTQ2LjYzIDcyLjAwOTcgMTQ0LjQ2IDc0LjE1OTdDMTQyLjE5IDc2LjQwOTcgMTM5Ljc0IDc3LjU0OTcgMTM3LjEyIDc3LjU5OTdDMTM0LjUgNzcuNjM5NyAxMzEuOSA3Ni4zNzk3IDEyOS4zMiA3My44Mjk3TDk4LjMxOTkgNDMuMTI5N0M5NC43OTk5IDM5LjYzOTcgOTEuMzk5OSAzNy4xNjk3IDg4LjEyOTkgMzUuNzE5N0M4NC44NTk5IDM0LjI2OTcgODEuNDE5OSAzNC4wMzk3IDc3LjgxOTkgMzUuMDM5N0M3NC4yMDk5IDM2LjAyOTcgNzAuMzM5OSAzOC41Nzk3IDY2LjE4OTkgNDIuNjc5N0M2MC40Njk5IDQ4LjM0OTcgNTcuNzM5OSA1My42Njk3IDU4LjAxOTkgNTguNjM5N0M1OC4yOTk5IDYzLjYwOTcgNjEuMTM5OSA2OC43Njk3IDY2LjUyOTkgNzQuMDk5N0w5Ny43Nzk5IDEwNS4wNkMxMDAuMzkgMTA3LjY0IDEwMS42NyAxMTAuMjIgMTAxLjYzIDExMi43OEMxMDEuNTkgMTE1LjM1IDEwMC40NyAxMTcuNzIgOTguMjU5OSAxMTkuOTFDOTYuMDU5OSAxMjIuMDkgOTMuNjI5OSAxMjMuMjMgOTAuOTg5OSAxMjMuMzJDODguMzQ5OSAxMjMuNDEgODUuNzE5OSAxMjIuMTYgODMuMTE5OSAxMTkuNThMNTIuODA5OSA4OS41NTk3QzQ3Ljg3OTkgODQuNjc5NyA0NC4zMTk5IDgwLjA1OTcgNDIuMTI5OSA3NS42OTk3QzM5LjkzOTkgNzEuMzM5NyAzOS4xMTk5IDY2LjQwOTcgMzkuNjg5OSA2MC45MDk3QzQwLjE5OTkgNTYuMTk5NyA0MS43MDk5IDUxLjYzOTcgNDQuMjI5OSA0Ny4yMTk3QzQ2LjczOTkgNDIuNzk5NyA1MC4zMzk5IDM4LjI3OTcgNTUuMDA5OSAzMy42NDk3QzYwLjU2OTkgMjguMTM5NyA2NS44Nzk5IDIzLjkxOTcgNzAuOTM5OSAyMC45Nzk3Qzc1Ljk4OTkgMTguMDM5NyA4MC44Nzk5IDE2LjQwOTcgODUuNTk5OSAxNi4wNjk3QzkwLjMyOTkgMTUuNzI5NyA5NC45ODk5IDE2LjY2OTcgOTkuNTk5OSAxOC44ODk3QzEwNC4yMSAyMS4xMDk3IDEwOC44OSAyNC41Njk3IDExMy42NSAyOS4yODk3SDExMy42NloiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xMDA1MF80MTcxKSIvPgo8cGF0aCBkPSJNNjYuMTA5OSAxNTAuNDJMMzUuODA5OSAxMjAuNEMzMy4yMjk5IDExNy44NCAzMS45NTk5IDExNS4yNyAzMS45OTk5IDExMi42N0MzMi4wMzk5IDExMC4wNyAzMy4xNDk5IDEwNy43IDM1LjMxOTkgMTA1LjU1QzM3LjU4OTkgMTAzLjMgNDAuMDM5OSAxMDIuMTYgNDIuNjU5OSAxMDIuMTFDNDUuMjc5OSAxMDIuMDcgNDcuODc5OSAxMDMuMzIgNTAuNDU5OSAxMDUuODhMODEuNDQ5OSAxMzYuNThDODQuOTc5OSAxNDAuMDcgODguMzY5OSAxNDIuNTQgOTEuNjM5OSAxNDMuOTlDOTQuOTA5OSAxNDUuNDQgOTguMzQ5OSAxNDUuNjYgMTAxLjk2IDE0NC42N0MxMDUuNTcgMTQzLjY4IDEwOS40NCAxNDEuMTMgMTEzLjU5IDEzNy4wMkMxMTkuMzEgMTMxLjM1IDEyMi4wNCAxMjYuMDMgMTIxLjc2IDEyMS4wNkMxMjEuNDggMTE2LjA5IDExOC42NCAxMTAuOTMgMTEzLjI1IDEwNS41OUw5Ni41OTk5IDg5LjI0MDFDOTMuOTg5OSA4Ni42NjAxIDkyLjcwOTkgODQuMDgwMSA5Mi43NDk5IDgxLjUyMDFDOTIuNzg5OSA3OC45NTAxIDkzLjkwOTkgNzYuNTgwMSA5Ni4xMTk5IDc0LjM5MDFDOTguMzE5OSA3Mi4yMTAxIDEwMC43NSA3MS4wNzAxIDEwMy4zOSA3MC45ODAxQzEwNi4wMyA3MC44OTAxIDEwOC42NiA3Mi4xNDAxIDExMS4yNiA3NC43MjAxTDEyNi45NiA5MC4xMzAxQzEzMS44OSA5NS4wMTAxIDEzNS40NSA5OS42MzAxIDEzNy42NCAxM
2DMuOTlDMTM5LjgzIDEwOC4zNSAxNDAuNjUgMTEzLjI4IDE0MC4wOCAxMTguNzhDMTM5LjU3IDEyMy40OSAxMzguMDYgMTI4LjA1IDEzNS41NCAxMzIuNDdDMTMzLjAzIDEzNi44OSAxMjkuNDMgMTQxLjQxIDEyNC43NiAxNDYuMDRDMTE5LjIgMTUxLjU1IDExMy44OSAxNTUuNzcgMTA4LjgzIDE1OC43MUMxMDMuNzcgMTYxLjY1IDk4Ljg3OTkgMTYzLjI5IDk0LjE0OTkgMTYzLjYzQzg5LjQxOTkgMTYzLjk3IDg0Ljc1OTkgMTYzLjAzIDgwLjE0OTkgMTYwLjgxQzc1LjUzOTkgMTU4LjU5IDcwLjg1OTkgMTU1LjEzIDY2LjA5OTkgMTUwLjQxTDY2LjEwOTkgMTUwLjQyWiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzEwMDUwXzQxNzEpIi8+CjxwYXRoIGQ9Ik04NS4wMDk5IDcyLjk1OTJDOTEuMTU2OCA3Mi45NTkyIDk2LjEzOTkgNjcuOTc2MSA5Ni4xMzk5IDYxLjgyOTJDOTYuMTM5OSA1NS42ODIzIDkxLjE1NjggNTAuNjk5MiA4NS4wMDk5IDUwLjY5OTJDNzguODYzIDUwLjY5OTIgNzMuODc5OSA1NS42ODIzIDczLjg3OTkgNjEuODI5MkM3My44Nzk5IDY3Ljk3NjEgNzguODYzIDcyLjk1OTIgODUuMDA5OSA3Mi45NTkyWiIgZmlsbD0idXJsKCNwYWludDJfcmFkaWFsXzEwMDUwXzQxNzEpIi8+CjwvZz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xMDA1MF80MTcxIiB4MT0iMTM4Ljk4NSIgeTE9IjQ2Ljc3OTUiIHgyPSI0NS4wNTI5IiB5Mj0iODguNTIzMyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMjAxQzFCIi8+CjxzdG9wIG9mZnNldD0iMC4zNiIgc3RvcC1jb2xvcj0iIzc3MzkwRCIvPgo8c3RvcCBvZmZzZXQ9IjAuNjciIHN0b3AtY29sb3I9IiNFQTgxMDEiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRjRCODUyIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQxX2xpbmVhcl8xMDA1MF80MTcxIiB4MT0iNDMuMzgxMiIgeTE9IjEzNC4xNjciIHgyPSIxNTIuMjMxIiB5Mj0iMTAxLjc3MSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMUYxRDFDIi8+CjxzdG9wIG9mZnNldD0iMC4zNyIgc3RvcC1jb2xvcj0iIzc3MzkwRCIvPgo8c3RvcCBvZmZzZXQ9IjAuNjciIHN0b3AtY29sb3I9IiNFQTgxMDEiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRjRGQjUyIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQyX3JhZGlhbF8xMDA1MF80MTcxIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDg1LjAwOTkgNjEuODM5Mikgc2NhbGUoMTEuMTMpIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y0Qjg1MiIvPgo8c3RvcCBvZmZzZXQ9IjAuMzMiIHN0b3AtY29sb3I9IiNFQTgxMDEiLz4KPHN0b3Agb2Zmc2V0PSIwLjY0IiBzdG9wLWNvbG9yPSIjNzczOTBEIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzIxMUMxRCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzEwMDUwXzQxNzEiPgo8cmVjdCB3aWR0aD0iMTE1Ljc3IiBoZWlnaHQ9IjE0Ny43IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzIgMTYpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="}},Fr={[Ur.fordefi.id]:class extends Br{id=Ur.fordefi.id;requestInternal=async(e,t)=>{const n=Wn(this.id);if(!n)throw new Error("no wallet provider was found");if(!e)throw new Error("A wallet method is required");return await n.request(e,t)};addListener=(e,t)=>{const n=Wn(this.id);if(!n)throw new Error("no wallet provider was found");return n.addListener?n.addListener(e,t):(console.error("The wallet provider you are using does not support the addListener method. Please update your wallet provider."),()=>{})}},[Ur.xverse.id]:class extends Br{id=Ur.xverse.id;requestInternal=async(e,t)=>Cr(e,t,this.id);addListener=(e,t)=>((e,t,n)=>{let r=window.XverseProviders?.BitcoinProvider||window.BitcoinProvider;if(n&&(r=Wn(n)),!r)throw new Error("no wallet provider was found");return r.addListener?r.addListener(e,t):(console.error("The wallet provider you are using does not support the addListener method. Please update your wallet provider."),()=>{})})(e,t,this.id)},[Ur.unisat.id]:class extends Br{id=Ur.unisat.id;async getAccounts(e){const{purposes:t}=e;if(t.includes("stacks"))throw new Error("Only bitcoin addresses are supported");const n=await window.unisat.requestAccounts(),r=await window.unisat.getPublicKey(),s=n[0],i=Tn(n[0]).type,o=i===Sn.p2tr?r.slice(2):r,a={address:s,publicKey:o,addressType:i,purpose:"payment",walletType:"software"},c={address:s,publicKey:o,addressType:i,purpose:"ordinals",walletType:"software"},u=[];return t.includes("payment")&&u.push({...a,walletType:"software"}),t.includes("ordinals")&&u.push({...c,walletType:"software"}),u}async signMessage(e){const{message:t,address:n}=e,r=Tn(n).type;return[Sn.p2wpkh,Sn.p2tr].includes(r)?{address:n,messageHash:"",signature:await window.unisat.signMessage(t,"bip322-simple"),protocol:"BIP322"}:{address:n,messageHash:"",signature:await window.unisat.signMessage(t,"ecdsa"),protocol:"ECDSA"}}async sendTransfer(e){const{recipients:t}=e;if(t.length>1)throw new Error("Only one recipient is supported by this wallet provider");return{txid:await window.unisat.sendBitcoin(t[0].address,t[0].amount)}}async signPsbt(e){const{psbt:t,signInputs:n,broadcast:r}=e,s=Cn.hp.from(t,"base64").toString("hex"),i=await window.unisat.signPsbt(s,{autoFinalized:r,toSignInputs:Rr(n)}),o=Cn.hp.from(i,"hex").toString("base64");let a;return r&&(a=await window.unisat.pushPsbt(i)),{psbt:o,txid:a}}requestInternal=async(e,t)=>{try{switch(e){case"getAccounts":return{status:"success",result:await this.getAccounts(t)};case"sendTransfer":return{status:"success",result:await this.sendTransfer(t)};case"signMessage":return{status:"success",result:await this.signMessage(t)};case"signPsbt":return{status:"success",result:await this.signPsbt(t)};default:{const e={code:-32001,message:"Method not supported by the selected wallet"};return console.error("Error calling the method",e),{status:"error",error:e}}}}catch(e){return console.error("Error calling the method",e),{status:"error",error:{code:4001===e.code?-32e3:-32603,message:e.message?e.message:"Wallet method call error",data:e}}}};addListener=(e,t)=>{switch(e){case"accountChange":{const e=()=>{t({type:"accountChange"})};return window.unisat.on("accountsChanged",e),()=>{window.unisat.removeListener("accountsChanged",e)}}case"networkChange":{const e=()=>{t({type:"networkChange"})};return window.unisat.on("networkChanged",e),()=>{window.unisat.removeListener("networkChanged",e)}}default:return console.error("Event not supported by the selected wallet"),()=>{}}}}};Symbol("solid-proxy"),Symbol("solid-track"),Symbol("fallback");var Hr=n(46880);function Wr(e){const t=function(e){const t=Hr.getParser(window.navigator.userAgent);return t.satisfies({desktop:{chrome:">=1"}})?e.chromeWebStoreUrl:t.satisfies({desktop:{firefox:">=1"}})?e.mozillaAddOnsUrl:t.satisfies({android:{chrome:">=1",safari:">=1"}})?e.googlePlayStoreUrl:t.satisfies({ios:{chrome:">=1",safari:">=1"}})?e.iOSAppStoreUrl:void 0}(e);return t?{installPrompt:{url:t}}:(console.error(`[makeDefaultConfig]: No app store URL found for ${e.name}.`),{})}function qr(e){if(e)try{return JSON.parse(e)}catch{return e}}function $r(e,t,n){if(null==n||!1===n)return e.removeAttribute(t);let r=JSON.stringify(n);e.__updating[t]=!0,"true"===r&&(r=""),e.setAttribute(t,r),Promise.resolve().then(()=>delete e.__updating[t])}function Yr(e){return null!=e&&("object"==typeof e||"function"==typeof e)}let Gr;function Qr(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(e=>t[e].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=function(e,t){const n=function(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return t[n]=Object.assign({},r),Yr(r.value)&&!function(e){return"[object Function]"===Object.prototype.toString.call(e)}(r.value)&&!Array.isArray(r.value)&&(t[n].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[n].value=r.value.slice(0)),t},{})}(t);return Object.keys(t).forEach(t=>{const r=n[t],s=e.getAttribute(r.attribute),i=e[t];s&&(r.value=r.parse?qr(s):s),null!=i&&(r.value=Array.isArray(i)?i.slice(0):i),r.reflect&&$r(e,r.attribute,r.value),Object.defineProperty(e,t,{get:()=>r.value,set(e){const n=r.value;r.value=e,r.reflect&&$r(this,r.attribute,r.value);for(let r=0,s=this.__propertyChangedCallbacks.length;r<s;r++)this.__propertyChangedCallbacks[r](t,e,n)},enumerable:!0,configurable:!0})}),n}(this,t);const e=function(e){return Object.keys(e).reduce((t,n)=>(t[n]=e[n].value,t),{})}(this.props),n=this.Component,r=Gr;try{Gr=this,this.__initialized=!0,function(e){return"function"==typeof e&&0===e.toString().indexOf("class")}(n)?new n(e,{element:this}):n(e,{element:this})}finally{Gr=r}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let e=null;for(;e=this.__releaseCallbacks.pop();)e(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(e,n,r){if(this.__initialized&&!this.__updating[e]&&(e=this.lookupProp(e))in t){if(null==r&&!this[e])return;this[e]=t[e].parse?qr(r):r}}lookupProp(e){if(t)return n.find(n=>e===n||e===t[n].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(e){this.__releaseCallbacks.push(e)}addPropertyChangedCallback(e){this.__propertyChangedCallbacks.push(e)}}}const Kr=Symbol("solid-proxy"),Vr=Symbol("solid-track"),Zr={equals:(e,t)=>e===t};let Jr=As;const Xr=1,es=2,ts={owned:null,cleanups:null,context:null,owner:null};var ns=null;
vendor: 2,284 bytes, line 2
2let rs=null,ss=null,is=null,os=null,as=0;function cs(e,t){const n=ss,r=ns,s=0===e.length,i=void 0===t?r:t,o=s?ts:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=s?e:()=>e(()=>hs(()=>Ss(o)));ns=o,ss=null;try{return Es(a,!0)}finally{ss=n,ns=r}}function us(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},Zr,t):Zr).equals||void 0};return[ys.bind(n),e=>("function"==typeof e&&(e=e(n.value)),ws(n,e))]}function ls(e,t,n){ms(bs(e,t,!1,Xr))}function ds(e,t,n){Jr=Ms;const r=bs(e,t,!1,Xr);(!n||!n.render)&&(r.user=!0),os?os.push(r):ms(r)}function fs(e,t,n){n=n?Object.assign({},Zr,n):Zr;const r=bs(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ms(r),ys.bind(r)}function hs(e){if(null===ss)return e();const t=ss;ss=null;try{return e()}finally{ss=t}}function ps(e){return null===ns||(null===ns.cleanups?ns.cleanups=[e]:ns.cleanups.push(e)),e}function gs(e){const t=fs(e),n=fs(()=>Os(t()));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function ys(){if(this.sources&&this.state)if(this.state===Xr)ms(this);else{const e=is;is=null,Es(()=>Ns(this),!1),is=e}if(ss){const e=this.observers?this.observers.length:0;ss.sources?(ss.sources.push(this),ss.sourceSlots.push(e)):(ss.sources=[this],ss.sourceSlots=[e]),this.observers?(this.observers.push(ss),this.observerSlots.push(ss.sources.length-1)):(this.observers=[ss],this.observerSlots=[ss.sources.length-1])}return this.value}function ws(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Es(()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=rs&&rs.running;r&&rs.disposed.has(n),(r?!n.tState:!n.state)&&(n.pure?is.push(n):os.push(n),n.observers&&xs(n)),r||(n.state=Xr)}if(is.length>1e6)throw is=[],new Error},!1)),t}function ms(e){if(!e.fn)return;Ss(e);const t=as;!function(e,t,n){let r;const s=ns,i=ss;ss=ns=e;try{r=e.fn(t)}catch(t){return e.pure&&(e.state=Xr,e.owned&&e.owned.forEach(Ss),e.owned=null),e.updatedAt=n+1,Is(t)}finally{ss=i,ns=s}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?ws(e,r):e.value=r,e.updatedAt=n)}(e,e.value,t)}function bs(e,t,n,r=Xr,s){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,
2sourceSlots:null,cleanups:null,value:t,owner:ns,context:ns?ns.context:null,pure:n};return null===ns||ns!==ts&&(ns.owned?ns.owned.push(i):ns.owned=[i]),i}function vs(e){if(0===e.state)return;if(e.state===es)return Ns(e);if(e.suspense&&hs(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<as);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if((e=t[n]).state===Xr)ms(e);else if(e.state===es){const n=is;is=null,Es(()=>Ns(e,t[0]),!1),is=n}}function Es(e,t){if(is)return e();let n=!1;t||(is=[]),os?n=!0:os=[],as++;try{const t=e();return function(e){if(is&&(As(is),is=null),e)return;const t=os;os=null,t.length&&Es(()=>Jr(t),!1)}(n),t}catch(e){n||(os=null),is=null,Is(e)}}function As(e){for(let t=0;t<e.length;t++)vs(e[t])}function Ms(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:vs(r)}for(t=0;t<n;t++)vs(e[t])}function Ns(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const e=r.state;e===Xr?r!==t&&(!r.updatedAt||r.updatedAt<as)&&vs(r):e===es&&Ns(r,t)}}}function xs(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=es,n.pure?is.push(n):os.push(n),n.observers&&xs(n))}}function Ss(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),s=t.observerSlots.pop();n<r.length&&(e.sourceSlots[s]=n,r[n]=e,t.observerSlots[n]=s)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ss(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Is(e,t=ns){throw function(e){return e instanceof Error?e:new Error("string"==typeof e?e:"Unknown error",{cause:e})}(e)}function Os(e){if("function"==typeof e&&!e.length)return Os(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Os(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}const ks=Symbol("fallback");function Ts(e){for(let t=0;t<e.length;t++)e[t]()}function Cs(e,t){return hs(()=>e(t||{}))}function Ps(){return!0}const js={get:(e,t,n)=>t===Kr?n:e.get(t),has:(e,t)=>t===Kr||e.has(t),set:Ps,deleteProperty:Ps,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:Ps,deleteProperty:Ps}),ownKeys:e=>e.keys()};function _s(e){return(e="function"==typeof e?e():e)?e:{}}function Ds(){for(let e=0,t=this.length;e<t;++e){const t=this[e]();if(void 0!==t)return t}}const Ls=e=>`Stale read from <${e}>.`;function Bs(e){const t="fallback"in e&&{fallback:()=>e.fallback};return fs(function(e,t,n={}){let r=[],s=[],i=[],o=0,a=t.length>1?[]:null;return ps(()=>Ts(i)),()=>{let c,u,l=e()||[];return l[Vr],hs(()=>{let e,t,f,h,p,g,y,w,m,b=l.length;if(0===b)0!==o&&(Ts(i),i=[],r=[],s=[],o=0,a&&(a=[])),n.fallback&&(r=[ks],s[0]=cs(e=>(i[0]=e,n.fallback())),o=1);else if(0===o){for(s=new Array(b),u=0;u<b;u++)r[u]=l[u],s[u]=cs(d);o=b}else{for(f=new Array(b),h=new Array(b),a&&(p=new Array(b)),g=0,y=Math.min(o,b);g<y&&r[g]===l[g];g++);for(y=o-1,w=b-1;y>=g&&w>=g&&r[y]===l[w];y--,w--)f[w]=s[y],h[w]=i[y],a&&(p[w]=a[y]);for(e=new Map,t=new Array(w+1),u=w;u>=g;u--)m=l[u],c=e.get(m),t[u]=void 0===c?-1:c,e.set(m,u);for(c=g;c<=y;c++)m=r[c],u=e.get(m),void 0!==u&&-1!==u?(f[u]=s[c],h[u]=i[c],a&&(p[u]=a[c]),u=t[u],e.set(m,u)):i[c]();for(u=g;u<b;u++)u in f?(s[u]=f[u],i[u]=h[u],a&&(a[u]=p[u],a[u](u))):s[u]=cs(d);s=s.slice(0,o=b),r=l.slice(0)}return s});function d(e){if(i[u]=e,a){const[e,n]=us(u);return a[u]=n,t(l[u],e)}return t(l[u])}}}(()=>e.each,e.children,t||void 0))}function Rs(e){const t=e.keyed,n=fs(()=>e.when,void 0,{equals:(e,n)=>t?e===n:!e==!n});return fs(()=>{const r=n();if(r){const s=e.children;return"function"==typeof s&&s.length>0?hs(()=>s(t?r:()=>{if(!hs(n))throw Ls("Show");return e.when})):s}return e.fallback},void 0,void 0)}function zs(e){let t=!1;const n=gs(()=>e.children),r=fs(()=>{let e=n();Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++){const r=e[n].when;if(r)return t=!!e[n].keyed,[n,r,e[n]]}return[-1]},void 0,{equals:(e,n)=>(t?e[1]===n[1]:!e[1]==!n[1])&&e[2]===n[2]});return fs(()=>{const[n,s,i]=r();if(n<0)return e.fallback;const o=i.children;return"function"==typeof o&&o.length>0?hs(()=>o(t?s:()=>
2{if(hs(r)[0]!==n)throw Ls("Match");return i.when})):o},void 0,void 0)}function Us(e){return e}const Fs=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),Hs=new Set(["innerHTML","textContent","innerText","children"]),Ws=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),qs=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}}),$s=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ys={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Gs="_$DX_DELEGATE";function Qs(e,t,n){let r;const s=()=>{const t=document.createElement("template");return t.innerHTML=e,n?t.content.firstChild.firstChild:t.content.firstChild},i=t?()=>hs(()=>document.importNode(r||(r=s()),!0)):()=>(r||(r=s())).cloneNode(!0);return i.cloneNode=i,i}function Ks(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function Vs(e,t,n){if(!t)return n?Ks(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let s,i;for(i in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&r.removeProperty(i),delete n[i];for(i in t)s=t[i],s!==n[i]&&(r.setProperty(i,s),n[i]=s);return n}function Zs(e,t,n){return hs(()=>e(t,n))}function Js(e,t,n,r){if(void 0!==n&&!r&&(r=[]),"function"!=typeof t)return ni(e,t,r,n);ls(r=>ni(e,t(),r,n),r)}function Xs(e,t,n){const r=t.trim().split(/\s+/);for(let t=0,s=r.length;t<s;t++)e.classList.toggle(r[t],n)}function ei(e,t,n,r,s,i){let o,a,c,u,l;if("style"===t)return Vs(e,n,r);if("classList"===t)return function(e,t,n={}){const r=Object.keys(t||{}),s=Object.keys(n);let i,o;for(i=0,o=s.length;i<o;i++){const r=s[i];!r||"undefined"===r||t[r]||(Xs(e,r,!1),delete n[r])}for(i=0,o=r.length;i<o;i++){const s=r[i],o=!!t[s];!s||"undefined"===s||n[s]===o||!o||(Xs(e,s,!0),n[s]=o)}return n}(e,n,r);if(n===r)return r;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const s=t.slice(3);r&&e.removeEventListener(s,r),n&&e.addEventListener(s,n)}else if("oncapture:"===t.slice(0,10)){const s=t.slice(10);r&&e.removeEventListener(s,r,!0),n&&e.addEventListener(s,n,!0)}else if("on"===t.slice(0,2)){const s=t.slice(2).toLowerCase(),i=$s.has(s);if(!i&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(s,t)}(i||n)&&(function(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n)}(e,s,n,i),i&&function(e,t=window.document){const n=t[Gs]||(t[Gs]=new Set);for(let r=0,s=e.length;r<s;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,ti))}}([s]))}else if("attr:"===t.slice(0,5))Ks(e,t.slice(5),n);else if((l="prop:"===t.slice(0,5))||(c=Hs.has(t))||!s&&((u=function(e,t){const n=qs[e];return"object"==typeof n?n[t]?n.$:void 0:n}(t,e.tagName))||(a=Fs.has(t)))||(o=e.nodeName.includes("-")))l&&(t=t.slice(5),a=!0),"class"===t||"className"===t?function(e,t){null==t?e.removeAttribute("class"):e.className=t}(e,n):!o||a||c?e[u||t]=n:e[function(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}(t)]=n;else{const r=s&&t.indexOf(":")>-1&&Ys[t.split(":")[0]];r?function(e,t,n,r){null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}(e,r,t,n):Ks(e,Ws[t]||t,n)}return n}function ti(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n||document});n;){const r=n[t];if(r&&!n.disabled){const s=n[`${t}Data`];if(void 0!==s?r.call(n,s,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}
2function ni(e,t,n,r,s){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,o=void 0!==r;if(e=o&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),o){let s=n[0];s&&3===s.nodeType?s.data!==t&&(s.data=t):s=document.createTextNode(t),n=ii(e,n,r,s)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i)n=ii(e,n,r);else{if("function"===i)return ls(()=>{let s=t();for(;"function"==typeof s;)s=s();n=ni(e,s,n,r)}),()=>n;if(Array.isArray(t)){const i=[],a=n&&Array.isArray(n);if(ri(i,t,n,s))return ls(()=>n=ni(e,i,n,r,!0)),()=>n;if(0===i.length){if(n=ii(e,n,r),o)return n}else a?0===n.length?si(e,i,r):function(e,t,n){let r=n.length,s=t.length,i=r,o=0,a=0,c=t[s-1].nextSibling,u=null;for(;o<s||a<i;)if(t[o]!==n[a]){for(;t[s-1]===n[i-1];)s--,i--;if(s===o){const t=i<r?a?n[a-1].nextSibling:n[i-a]:c;for(;a<i;)e.insertBefore(n[a++],t)}else if(i===a)for(;o<s;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[i-1]&&n[a]===t[s-1]){const r=t[--s].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--i],r),t[s]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}const r=u.get(t[o]);if(null!=r)if(a<r&&r<i){let c,l=o,d=1;for(;++l<s&&l<i&&null!=(c=u.get(t[l]))&&c===r+d;)d++;if(d>r-a){const s=t[o];for(;a<r;)e.insertBefore(n[a++],s)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}else o++,a++}(e,n,i):(n&&ii(e),si(e,i));n=i}else if(t.nodeType){if(Array.isArray(n)){if(o)return n=ii(e,n,r,t);ii(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function ri(e,t,n,r){let s=!1;for(let i=0,o=t.length;i<o;i++){let o,a=t[i],c=n&&n[e.length];if(null!=a&&!0!==a&&!1!==a)if("object"==(o=typeof a)&&a.nodeType)e.push(a);else if(Array.isArray(a))s=ri(e,a,c)||s;else if("function"===o)if(r){for(;"function"==typeof a;)a=a();s=ri(e,Array.isArray(a)?a:[a],Array.isArray(c)?c:[c])||s}else e.push(a),s=!0;else{const t=String(a);c&&3===c.nodeType&&c.data===t?e.push(c):e.push(document.createTextNode(t))}}return s}function si(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function ii(e,t,n,r){if(void 0===n)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let r=!1;for(let i=t.length-1;i>=0;i--){const o=t[i];if(s!==o){const t=o.parentNode===e;r||i?t&&o.remove():t?e.replaceChild(s,o):e.insertBefore(s,n)}else r=!0}}else e.insertBefore(s,n);return[s]}const oi="sats-connect_wallet-provider-selector_select",ai="sats-connect_wallet-provider-selector_cancel",ci="sats-connect_wallet-provider-selector_open",ui="sats-connect_wallet-provider-selector_close",li="sats-connect_wallet-provider-selector_walletOpen",di="sats-connect_wallet-provider-selector_walletClose",fi={color:"#181818","font-size":"18px","font-weight":"700","line-height":"1.4"},hi={color:"#181818","font-size":"14px","font-weight":"400","line-height":"1.4"},pi={color:"#181818","font-size":"14px","font-weight":"500"};var gi=Qs('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><g id=XCircle><path id=Vector d="M12 2.25C10.0716 2.25 8.18657 2.82183 6.58319 3.89317C4.97982 4.96451 3.73013 6.48726 2.99218 8.26884C2.25422 10.0504 2.06114 12.0108 2.43735 13.9021C2.81355 15.7934 3.74215 17.5307 5.10571 18.8943C6.46928 20.2579 8.20656 21.1865 10.0979 21.5627C11.9892 21.9389 13.9496 21.7458 15.7312 21.0078C17.5127 20.2699 19.0355 19.0202 20.1068 17.4168C21.1782 15.8134 21.75 13.9284 21.75 12C21.745 9.41566 20.7162 6.93859 18.8888 5.11118C17.0614 3.28378 14.5843 2.25496 12 2.25ZM15.5344 14.4656C15.6752 14.6078 15.7542 14.7999 15.7542 15C15.7542 15.2001 15.6752 15.3922 15.5344 15.5344C15.391 15.673 15.1994 15.7505 15 15.7505C14.8006 15.7505 14.609 15.673 14.4656 15.5344L12 13.0594L9.53438 15.5344C9.39102 15.673 9.19942 15.7505 9 15.7505C8.80059 15.7505 8.60898 15.673 8.46563 15.5344C8.32479 15.3922 8.24578 15.2001 8.24578 15C8.24578 14.7999 8.32479 14.6078 8.46563 14.4656L10.9406 12L8.46563 9.53437C8.34603 9.38865 8.28491 9.20366 8.29416 9.01537C8.30341 8.82708 8.38236 8.6489
26 8.51566 8.51566C8.64896 8.38236 8.82708 8.3034 9.01537 8.29416C9.20366 8.28491 9.38866 8.34603 9.53438 8.46563L12 10.9406L14.4656 8.46563C14.6114 8.34603 14.7963 8.28491 14.9846 8.29416C15.1729 8.3034 15.351 8.38236 15.4843 8.51566C15.6176 8.64896 15.6966 8.82708 15.7058 9.01537C15.7151 9.20366 15.654 9.38865 15.5344 9.53437L13.0594 12L15.5344 14.4656Z"fill=black fill-opacity=0.3>'),yi=Qs("<style>\n          .close-selector-button:focus-visible {\n            outline: 2px solid #181818;\n            outline-offset: -0.25px;\n          }\n        "),wi=Qs("<div role=button tabindex=0 class=close-selector-button>");function mi(e){return(()=>{var t=gi();return t.style.setProperty("display","block"),function(e,t={},n,r){const s={};r||ls(()=>s.children=ni(e,t.children,s.children)),ls(()=>t.ref&&t.ref(e)),ls(()=>function(e,t,n,r,s={},i=!1){t||(t={});for(const r in s)if(!(r in t)){if("children"===r)continue;s[r]=ei(e,r,null,s[r],n,i)}for(const o in t){if("children"===o){r||ni(e,t.children);continue}const a=t[o];s[o]=ei(e,o,a,s[o],n,i)}}(e,t,n,!0,s,!0))}(t,e,!0,!0),t})()}function bi(e){function t(t){("Enter"===t.key||" "===t.key)&&e.onClose()}return[yi(),(()=>{var n=wi();return n.style.setProperty("position","absolute"),n.style.setProperty("top","16px"),n.style.setProperty("right","16px"),n.style.setProperty("background","none"),n.style.setProperty("border","none"),n.style.setProperty("cursor","pointer"),n.style.setProperty("padding","0"),n.style.setProperty("margin","0"),n.style.setProperty("border-radius","50%"),n.addEventListener("click",e.onClose),n.addEventListener("keydown",t),Js(n,Cs(mi,{})),n})()]}var vi=Qs("<style>\n/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n::before,\n::after {\n\tbox-sizing: border-box;\n\tmargin: 0; /* Remove all margins from everywhere. */\n}\n\n:host {\n\t/* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */\n\tfont-family:\n\t\t'DM Sans', /* Note: not part of modern-normalize, added specifically for this project. */\n\t\tsystem-ui,\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n\tline-height: 1.15; /* 1. Correct the line height in all browsers. */\n\t-webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */\n\t-moz-tab-size: 4; /* 3. Use a more readable tab size (opinionated). */\n\ttab-size: 4; /* 3 */\n}\n\n/*\nSections\n========\n*/\n\n:host {\n\tmargin: 0; /* Remove the margin in all browsers. */\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n\theight: 0; /* 1 */\n\tcolor: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n\ttext-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n\tfont-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n\tfont-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n\tfont-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n\tfont-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n\tfont-size: 75%;\n\tline-height: 0;\n\tposition: relative;\n\tvertical-align: baseline;\n}\n\nsub {\n\tbottom: -0.25em;\n}\n\nsup {\n\ttop: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n\ttext-indent: 0; /* 1 */\n\tborder-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n\tfont-family: inherit; /* 1 */\n\tfont-size: 100%; /* 1 */\n\tline-height: 1.15; /* 1 */\n\tmargin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n\ttext-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[t
2ype='button'],\n[type='reset'],\n[type='submit'] {\n\t-webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n::-moz-focus-inner {\n\tborder-style: none;\n\tpadding: 0;\n}\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n:-moz-focusring {\n\toutline: 1px dotted ButtonText;\n}\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n:-moz-ui-invalid {\n\tbox-shadow: none;\n}\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n\tpadding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n\tvertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n\theight: auto;\n}\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n\t-webkit-appearance: textfield; /* 1 */\n\toutline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n\t-webkit-appearance: none;\n}\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n::-webkit-file-upload-button {\n\t-webkit-appearance: button; /* 1 */\n\tfont: inherit; /* 2 */\n}\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n\tdisplay: list-item;\n}\n");function Ei(){return vi()}var Ai=Qs("<div class=divider><div>");function Mi(){return(()=>{var e=Ai(),t=e.firstChild;return t.style.setProperty("height","100%"),t.style.setProperty("width","1px"),t.style.setProperty("background","#dcdcdc"),e})()}var Ni=Qs("<div>");function xi(e){return(()=>{var t=Ni();return t.style.setProperty("padding","24px"),t.style.setProperty("height","100%"),Js(t,()=>e.children),t})()}var Si=Qs("<div>");function Ii(e){return(()=>{var t=Si();return t.style.setProperty("display","flex"),t.style.setProperty("flex-direction","column"),t.style.setProperty("justify-content","center"),t.style.setProperty("align-items","center"),t.style.setProperty("height","100%"),Js(t,()=>e.children),t})()}var Oi=Qs("<div><div>🤔</div><div>What is a wallet?</div><p>Wallets let you send, receive, store and display digital assets like Bitcoin, Stacks, Ordinals & NFTs.</p><p>Explore Bitcoin apps by connecting your wallet.");function ki(){return(()=>{var e=Oi(),t=e.firstChild,n=t.nextSibling,r=n.nextSibling,s=r.nextSibling;return e.style.setProperty("display","flex"),e.style.setProperty("flex-direction","column"),e.style.setProperty("row-gap","8px"),e.style.setProperty("justify-content","center"),e.style.setProperty("align-items","center"),t.style.setProperty("font-size","50px"),t.style.setProperty("line-height","140%"),ls(e=>{var t=fi,i=hi,o=hi;return e.e=Vs(n,t,e.e),e.t=Vs(r,i,e.t),e.a=Vs(s,o,e.a),e},{e:void 0,t:void 0,a:void 0}),e})()}function Ti(e){var t;const n=null==(t=e.installPrompt)?void 0:t.url;n?window.open(n,"_blank"):console.error("No install prompt URL found for",e.id)}var Ci=Qs("<style>\n          .install-prompt-button:focus-visible {\n            outline: 2px solid #181818;\n            outline-offset: 2px;\n          }\n        "),Pi=Qs("<div><img><h1>Don't have <!>?</h1><p>Download it on the Chrome web store.</p><div class=install-prompt-button role=button tabindex=0>Get");function ji(e){function t(t){("Enter"===t.key||" "===t.key)&&Ti(e.option)}function n(){Ti(e.option)}return[Ci(),(()=>{var r=Pi(),s=r.firstChild,i=s.nextSibling,o=i.firstChild.nextSibling;o.nextSibling;var a=i.nextSibling,c=a.nextSibling;return r.style.setProperty("display","flex"),r.style.setProperty("flex-direction","column"),r.style.setProperty("align-items","center"),r.style.setProperty("row-gap","16px"),s.style.setProperty("border-radius","12px"),s.style.setProperty("height","64px"),s.style.setProperty("width","64px"),s.style.setProperty("object-fit","cover"),Js(i,()=>e.option.name,o),c.addEventListener("click",n),c.addEventListener("keydown",t),ls(t=>{var n=e.option.icon,r=e.option.name,o={...fi,"text-align":"center"},u=hi,l={...pi,cursor:"pointer","border-radius":"12px",background:"#181818",color:"white",padding:"12px 16px"};return n!==t.e&&Ks(s,"src",t.e=n),r!==t.t&&Ks(s,"alt",t.t=r),t.a=Vs(i,o,t.a),t.o=Vs(a,u,t.o),t.i=Vs(c,l,t.i),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()]}var _i=Qs('<svg width=20 height=20 viewBox="0 0 20 20"xmlns=http://www.w3.org/2000/svg><circle cx=10 cy=10 r=9.05 stroke=black stroke-width=1.9 fill=none stroke-dasharray="42.65 14.22"stroke-dashoffset=0><animateTransform attributeName=transform attributeType=XML type=rotate from="0 10 10"to="360 10 10"dur=0.75s repeatCount=indefinite>'),Di=Qs("<div>");const Li=()=>_i();function Bi(){return(e=Di()).style.setProperty("display","flex"),e.style.setProperty("justify-content","center"),e.style.setProperty("align-items","center"),e.style.setProperty("height","100%"),e.style.setProperty("animation","spin 1s linear infinite"),Js(e,Cs(Li,{})),e;var e}var Ri=Qs("<div><img><h1>Opening <!>...</h1><p>Confirm the operation in ");function zi(e){return(()=>{var t=Ri(),n=t.firstChild,r=n.nextSibling,s=r.firstChild.nextSibling;s.nextSibling;var i=r.nextSibling;return i.firstChild,t.style.setProperty("display","flex"),t.style.setProperty("flex-direction","column"),t.style.setProperty("align-items","center"),t.style.setProperty("row-gap","16px"),n.style.setProperty("border-radius","12px"),n.style.setProperty("height","64px"),n.style.setProperty("width","64px"),n.style.setProperty("object-fit","cover"),Js(r,()=>e.option.name,s),Js(i,()=>e.option.name,null),Js(t,Cs(Bi,{}),null),ls(t=>{var s=e.option.icon,o=e.option.name,a={...fi,"text-align":"center"},c=hi;return s!==t.e&&Ks(n,"src",t.e=s),o!==t.t&&Ks(n,"alt",t.t=o),t.a=Vs(r,a,t.a),t.o=Vs(i,c,t.o),t},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()}var Ui=Qs("<div><div tabindex=0><img><div>");function Fi(e){function t(){e.onProviderSelected(e.id)}const n=fs(()=>Zi(e)?"button":"link");function r(e){"link"!==n()?"button"!==n()||("Enter"===e.key||" "===e.key)&&t():"Enter"===e.key&&t()}const[s,i]=us(!1),[o,a]=us(!1),c=()=>s()||o();return(()=>{var s=Ui(),o=s.firstChild,u=o.firstChild,l=u.nextSibling;return s.style.setProperty("aspect-ratio","1 / 1"),s.style.setProperty("overflow","hidden"),o.style.setProperty("display","flex"),o.style.setProperty("flex-direction","column"),o.style.setProperty("row-gap","12px"),o.style.setProperty("align-items","center"),o.style.setProperty("cursor","pointer"),o.style.setProperty("outline","none"),o.style.setProperty("padding-top","10px"),o.addEventListener("click",t),o.addEventListener("keydown",r),o.addEventListener("mouseenter",()=>i(!0)),o.addEventListener("mouseleave",()=>i(!1)),o.addEventListener("focus",()=>a(!0)),o.addEventListener("blur",()=>a(!1)),u.style.setProperty("width","56px"),u.style.setProperty("height","56px"),u.style.setProperty("object-fit","cover"),u.style.setProperty("border-radius","12px"),Js(l,()=>e.name),ls(t=>{var r=n(),s=c()?"6px solid rgba(24, 24, 24, 0.20)":"none",i=e.icon,a=e.name,d={...hi,color:c()?"rgba(24, 24, 24, 0.60)":void 0,"text-align":"center"};return r!==t.e&&Ks(o,"role",t.e=r),s!==t.t&&(null!=(t.t=s)?u.style.setProperty("outline",s):u.style.removeProperty("outline")),i!==t.a&&Ks(u,"src",t.a=i),a!==t.o&&Ks(u,"alt",t.o=a),t.i=Vs(l,d,t.i),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),s})()}var Hi=Qs('<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&amp;display=swap"rel=stylesheet>'),Wi=Qs("<div class=side-panel>"),qi=Qs('<div><div></div><div><div class=card-width-container><div class=card-height-container><div class=card><div class=card-grid><div class=main-panel><div></div><div></div><div class=wallets-grid-container data-desc="wallet grid container for padding"><div class=wallets-grid data-desc="wallet grid container">'),$i=Qs("<div><style>\n        @keyframes wallet-selector-fade-in {\n          from {opacity: 0; transform: translateY(40px);}\n          to {opacity: 1; transform: translateY(0);}\n        }\n\n        @keyframes wallet-selector-fade-out {\n          from {opacity: 1; transform: translateY(0);}\n          to {opacity: 0; transform: translateY(40px);}\n        }\n        @keyframes wallet-selector-blur-in {\n          from {opacity: 0; backdrop-filter: blur(0px);}\n          to {opacity: 1; backdrop-filter: blur(10px);}\n        }\n\n        @keyframes wallet-selector-blur-out {\n          from {opacity: 1; backdrop-filter: blur(10px);}\n          to {opacity: 0; backdrop-filter: blur(0px);}\n        }\n      </style><style>");const Yi="24px";function Gi(){const[e,t]=us(),[n,r]=us(),[s,i]=us(),[o,a]=us(!1),[c,u]=us(!1),[l,d]=us([]),[f,h]=us({type:"none"}),p=()=>l().some(e=>function(e){return!Zi(e)}(e));function g(){const e=new CustomEvent(ai,{bubbles:!0,composed:!0});window.dispatchEvent(e),a(!1)}function y(e){"Escape"===e.key&&g()}function w(t){const n=l().find(e=>e.id===t);if(Zi(n))return void(function(){const t=e(),n=s();return!(!t||!n||!t.contains(n)||"none"===getComputedStyle(n).display)}()?h({type:"install-wallet-prompt",option:n}):Ti(n));const r=new CustomEvent(oi,{detail:t,bubbles:!0,composed:!0});window.dispatchEvent(r)}function m(e){Es(()=>{a(!0),u(!0);const t=e.detail.options;d(t),t.some(e=>!e.installPrompt)?h({type:"explainer"}):h({type:"none"})},!1)}function b(){a(!1)}ds(()=>{o()?window.addEventListener("keydown",y):window.removeEventListener("keydown",y)});const v=()=>{o()||u(!1)};function E(e){const t=e.detail;h({type:"opening-wallet",option:l().find(e=>e.id===t)})}function A(){h({type:"explainer"})}function M(e){const t=e.target;if(!t)return;const r=n();r&&(r.contains(t)||g())}return function(e){ds(()=>hs(e))}(()=>{window.addEventListener(ci,m),window.addEventListener(ui,b),window.addEventListener(li,E),window.addEventListener(di,A),document.head.appendChild(Hi())}),ps(()=>{window.removeEventListener(ci,m),window.removeEventListener(ui,b)}),(()=>{var e=$i(),n=e.firstChild,s=n.nextSibling;return Zs(t,e),e.style.setProperty("inset","0"),e.addEventListener("click",M),e.addEventListener("keydown",()=>{console.log("Inside root keydown")}),Js(e,Cs(Ei,{}),n),Js(s,()=>`\n        .card-width-container {\n          container: card-width-container / inline-size;\n          display: flex;\n          justify-content: center;\n          align-items: center;\n          height: 100%;\n          width: 740px;\n        }\n\n        .card-height-container {\n          display: flex;\n          flex-direction: column;\n          align-items: center;\n          justify-content: flex-end;\n          height: 100%;\n          width: 100%;\n        }\n\n        .card {\n          min-height: 340px;\n          max-height: calc(100vh - 8rem);\n          width: 100%;\n          border-top-left-radius: ${Yi};\n          border-top-right-radius: ${Yi};\n\n          background: rgb(196, 177, 217);\n          overflow: hidden;\n\n          display: flex;\n          flex-direction: column;\n\n          position: "relative"; /* For the close button */\n          background-color: #ffffff;\n          display: ${c()?"block":"none"};\n\n          box-shadow: 0px 8px 64px 0px rgba(0, 0, 0, 0.25);\n          animation: ${o()?"wallet-selector-fade-in 0.4s cubic-bezier(.05, .7, .1, 1
2) forwards":"wallet-selector-fade-out 0.2s cubic-bezier(.3, 0, .8, .15) forwards"};\n        }\n\n        .card-grid {\n          flex-grow: 1;\n          height: 100%;\n          \n          display: grid;\n          grid-template-columns: 1fr;\n          grid-template-areas: "mainPanel";\n        }\n\n        .main-panel {\n          height: 100%;\n          overflow: hidden;\n          display: flex;\n          flex-direction: column;\n          grid-area: mainPanel;\n        }\n\n        .wallets-grid-container {\n          overflow: auto;\n          flex-grow: 1;\n        }\n\n        .wallets-grid {\n          display: grid;\n          grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));\n          align-content: start;\n\n          padding-left: 24px;\n          padding-right: 24px;\n          padding-bottom: 40px;\n        }\n\n        .divider {\n          display: none;\n          grid-area: divider;\n        }\n\n        .side-panel {\n          display: none;\n          grid-area: sidePanel;\n        }\n\n        @container card-width-container (width > 400px) {\n          .card-height-container {\n            justify-content: center;\n          }\n\n          .card {\n            max-width: calc(100vw - 2rem);\n            max-height: 460px;\n            ${p()?"":"width: 360px;"}\n            border-bottom-left-radius: ${Yi};\n            border-bottom-right-radius: ${Yi};\n          }\n\n          .card-grid {\n            grid-template-columns: ${p()?"5fr auto 4fr":"1fr"};\n            grid-template-areas: ${p()?'"mainPanel divider sidePanel"':'"mainPanel"'};\n          }\n\n          .divider {\n            display: block;\n          }\n\n          .side-panel {\n            display: flex;\n            flex-direction: column;\n            justify-content: center;\n            align-items: center;\n          }\n        }\n      `),Js(e,Cs(Rs,{get when(){return c()},get children(){var e=qi(),t=e.firstChild,n=t.nextSibling,s=n.firstChild.firstChild.firstChild,a=s.firstChild,c=a.firstChild.firstChild,u=c.nextSibling,d=u.nextSibling.firstChild;return e.style.setProperty("position","fixed"),e.style.setProperty("inset","0"),t.style.setProperty("background-color","#FFFFFF80"),t.style.setProperty("position","absolute"),t.style.setProperty("inset","0"),n.style.setProperty("display","flex"),n.style.setProperty("justify-content","center"),n.style.setProperty("align-items","center"),n.style.setProperty("height","100%"),Zs(r,s),s.addEventListener("animationend",v),Js(c,()=>p()?"Choose wallet to connect":"Don't have a wallet?"),Js(u,()=>p()?"Start by selecting one of the wallets below and confirming the connection.":"Start by installing one of the wallets below."),Js(d,Cs(Bs,{get each(){return l()},children:e=>Cs(Fi,function(...e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];t=t||!!r&&Kr in r,e[n]="function"==typeof r?(t=!0,fs(r)):r}if(t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=_s(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in _s(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(_s(e[n])));return[...new Set(t)]}},js);const n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){const s=e[t];if(!s)continue;const i=Object.getOwnPropertyNames(s);for(let e=i.length-1;e>=0;e--){const t=i[e];if("__proto__"===t||"constructor"===t)continue;const o=Object.getOwnPropertyDescriptor(s,t);if(r[t]){const e=n[t];e&&(o.get?e.push(o.get.bind(s)):void 0!==o.value&&e.push(()=>o.value))}else r[t]=o.get?{enumerable:!0,configurable:!0,get:Ds.bind(n[t]=[o.get.bind(s)])}:void 0!==o.value?o:void 0}}const s={},i=Object.keys(r);for(let e=i.length-1;e>=0;e--){const t=i[e],n=r[t];n&&n.get?Object.defineProperty(s,t,n):s[t]=n?n.value:void 0}return s}(e,{onProviderSelected:w}))})),Js(a,Cs(Rs,{get when(){return"none"!==f().type},get children(){return Cs(Mi,{})}}),null),Js(a,Cs(Rs,{get when(){return"none"!==f().type},get children(){var e=Wi();return Zs(i,e),Js(e,Cs(xi,{get children(){return Cs(Ii,{get children(){return Cs(zs,{fallback:null,get children(){return[Cs(Us,{get when(){return"install-wallet-prompt"===f().type},get children(){return Cs(ji,{get option(){return f().option}})}}),Cs(Us,{get when(){return"explainer"===f().type},get children(){return Cs(ki,{})}}),Cs(Us,{get when(){return"opening-wallet"===f().type},get children(){return Cs(zi,{get option(){return f().option}})}})]}})}})}})),e}}
2),null),Js(s,Cs(bi,{onClose:g}),null),ls(e=>{var n=o()?"wallet-selector-blur-in 0.2s cubic-bezier(.05, .7, .1, 1) forwards":"wallet-selector-blur-out 0.2s cubic-bezier(.3, 0, .8, .15) forwards",r={...fi,margin:"0","padding-top":"24px","padding-left":"24px","padding-right":"24px","padding-bottom":"16px"},s={...hi,"padding-left":"24px","padding-right":"24px","padding-bottom":"30px"};return n!==e.e&&(null!=(e.e=n)?t.style.setProperty("animation",n):t.style.removeProperty("animation")),e.t=Vs(c,r,e.t),e.a=Vs(u,s,e.a),e},{e:void 0,t:void 0,a:void 0}),e}}),null),ls(()=>null!=(c()?"fixed":"static")?e.style.setProperty("position",c()?"fixed":"static"):e.style.removeProperty("position")),e})()}const Qi="sats-connect-wallet-provider-selector",Ki=Qi;function Vi(){if(customElements.get(Ki))return;!function(e,t,n){2===arguments.length&&(n=t,t={}),function(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:s}=n;return n=>{if(!e)throw new Error("tag is required to register a Component");let i=customElements.get(e);return i?(i.prototype.Component=n,i):(i=Qr(r,function(e){return e?Object.keys(e).reduce((t,n)=>{const r=e[n];return t[n]=Yr(r)&&"value"in r?r:{value:r},t[n].attribute||(t[n].attribute=function(e){return e.replace(/\.?([A-Z]+)/g,(e,t)=>"-"+t.toLowerCase()).replace("_","-").replace(/^-/,"")}(n)),t[n].parse="parse"in t[n]?t[n].parse:"string"!=typeof t[n].value,t},{}):{}}(t)),i.prototype.Component=n,i.prototype.registeredTag=e,customElements.define(e,i,s),i)}}(e,t)(function(e){return(t,n)=>{const{element:r}=n;return cs(s=>{const i=function(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[s,i]=us(e[t[r]]);Object.defineProperty(n,t[r],{get:s,set(e){i(()=>e)}})}return n}(t);r.addPropertyChangedCallback((e,t)=>i[e]=t),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const o=e(i,n);return Js(r.renderRoot,o)},function(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&(!t.assignedSlot||!t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}(r))}}(n))}(Ki,Gi);const e=document.createElement(Ki);e.id=Qi,e.style.position="relative",e.style.zIndex="999999",document.body.appendChild(e)}function Zi(e){return!!e.installPrompt}var Ji;function Xi(e){switch(e){case jn.Payment:return Ji.Payment;case jn.Ordinals:return Ji.Ordinal;case jn.Stacks:return Ji.Stacks;default:return}}new class{providerId;defaultAdapters=Fr;createCustomConfig;isProviderSet(){return!!this.providerId}setCreateCustomConfig(e){this.createCustomConfig=e}async selectProvider(){const e=Object.values(Ur).map(e=>{return{...e,isInstalled:(t=e.id,!!Wn(t))};var t});if(0===e.length)throw new Error("No wallets detected, may want to prompt user to install a wallet.");const t=this.createCustomConfig?this.createCustomConfig(e):function(e){const t={options:[]},n=e.find(e=>e.id===Ur.xverse.id);if(t.options.push(n||{...Ur.xverse,...Wr(Ur.xverse)}),void 0!==window.ReactNativeWebView)return t;const r=e.find(e=>"unisat"===e.id);return r&&r.isInstalled&&t.options.push(r),t.options=t.options.concat(e.filter(e=>e.id!==Ur.xverse.id&&"unisat"!==e.id).map(e=>({...e,...e.isInstalled?{}:Wr(e)}))),t}(e),n=await(r=t,new Promise((e,t)=>{if(!document.getElementById(Qi))return void t("Failed to detect the wallet provider selector.");function n(){window.removeEventListener(oi,s),window.removeEventListener(ai,i)}function s(t){e(t.detail),n()}function i(){t(),n()}window.addEventListener(oi,s),window.addEventListener(ai,i);const o=new CustomEvent(ci,{detail:r});window.dispatchEvent(o)}));var r;this.providerId=n}async disconnect(){await this.request("wallet_renouncePermissions",void 0),this.providerId=void 0,localStorage.removeItem("sats-connect_defaultProvider")}async request(e,t){Vi();const n=qn();if(!this.isProviderSet())if(n)this.providerId=n;else try{await this.selectProvider()}catch{return{status:"error",error:{code:zn.INTERNAL_ERROR,message:"Failed to select the provider. User may have cancelled the selection prompt."}}}const r=this.defaultAdapters[this.providerId];!function(e){const t=new CustomEvent(li,{detail:e});window.dispatchEvent(t)}(this.providerId);const s=r?await(new r).request(e,t):await new zr(this.providerId).request(e,t);var i;return function(){const e=new CustomEvent(di);window.dispatchEvent(e)}(),"error"===s?.status&&s.error?.code===zn.USER_REJECTION?n||(this.providerId=void 0):(i=this.providerId,localStorage.setItem("sats-connect_defaultProvider",i)),function(){const e=new CustomEvent(ui);window.dispatchEvent(e)}(),s||{status:"error",error:{code:zn.INTERNAL_ERROR,message:"Wallet Error processing the request"}}}addListener=(e,t)=>{const n=qn();if(!this.isProviderSet()&&n&&(this.providerId=n),!this.isProviderSet())return console.error("No wallet provider selected. The user must first select a wallet before adding listeners to wallet events."),()=>{};const r=this.defaultAdapters[this.providerId];return r&&(new r).addListener?(new r).addListener(e,t):(console.error("The wallet provider you are using does not support the addListener method. Please update your wallet provider."),()=>{})}},function(e){e.Ordinal="ordinal",e.Payment="payment",e.Stacks="stx"}(Ji||(Ji={}));class eo{constructor(){this.listeners={accountsChanged:[],chainChanged:[],connect:[],disconnect:[],display_uri:[],message:[]}}on(e,t){this.listeners[e].push(t)}removeListener(e,t){e in this.listeners&&(this.listeners[e]=this.listeners[e].filter(e=>e!==t))}
2emit(e,t){e in this.listeners&&this.listeners[e].forEach(e=>e(t))}}var to=n(48287).hp;class no extends y.F{constructor({provider:e,chains:t,getActiveChain:n}){super({provider:e,caipNetworks:t,namespace:i.o.CHAIN.BITCOIN}),this.eventEmitter=new eo,this.emit=this.eventEmitter.emit.bind(this.eventEmitter),this.on=this.eventEmitter.on.bind(this.eventEmitter),this.removeListener=this.eventEmitter.removeListener.bind(this.eventEmitter),this.getActiveChain=n}get chains(){return this.sessionChains.map(e=>this.caipNetworks.find(t=>t.caipNetworkId===e)).filter(Boolean)}async connect(){return Promise.reject(new Error("Connection of WalletConnectProvider should be done via UniversalAdapter"))}async signMessage({message:e,address:t,protocol:n}){this.checkIfMethodIsSupported("signMessage");const r=await this.internalRequest({method:"signMessage",params:{message:e,account:t,address:t,protocol:n}});return to.from(r.signature,"hex").toString("base64")}async sendTransfer({recipient:e,amount:t}){this.checkIfMethodIsSupported("sendTransfer");const n=this.getAccount(!0);return(await this.internalRequest({method:"sendTransfer",params:{account:n,recipientAddress:e,amount:t}})).txid}async getAccountAddresses(){return this.checkIfMethodIsSupported("getAccountAddresses"),(await this.internalRequest({method:"getAccountAddresses",params:void 0})).map(e=>({address:e,purpose:Ji.Payment}))}async signPSBT(e){this.checkIfMethodIsSupported("signPsbt");const t=this.getAccount(!0),n=await this.internalRequest({method:"signPsbt",params:{account:t,psbt:e.psbt,signInputs:e.signInputs,broadcast:e.broadcast}});return{psbt:n.psbt,txid:n.txid}}async switchNetwork(e){return Promise.resolve()}request(e){return this.internalRequest(e)}setDefaultChain(e){this.provider.setDefaultChain(e)}get sessionChains(){return u.k.getChainsFromNamespaces(this.provider.session?.namespaces)}getAccount(e){const t=c.W.getAccountData(i.o.CHAIN.BITCOIN)?.caipAddress,n=this.provider.session?.namespaces[i.o.CHAIN.BITCOIN]?.accounts.find(e=>f.y.isLowerCaseMatch(e,t));if(!n){if(e)throw new Error("Account not found");return}const r=n.split(":")[2];if(r)return r;if(e)throw new Error("Address not found")}checkIfMethodIsSupported(e){if(!this.provider.session?.namespaces.bip122?.methods.includes(e))throw new Error(`Method ${e} is not supported`)}async internalRequest({method:e,params:t}){const n=this.getActiveChain();if(!n)throw new Error("Chain not found");return await this.provider.request({method:e,params:t},n.caipNetworkId)}}var ro=n(83601);function so(e){if(!e)throw new Error("mapCaipNetworkToXverseName: Invalid caipNetworkId provided");switch(e){case g.X5s.caipNetworkId:return Ln.Mainnet;case g.IDU.caipNetworkId:return Ln.Testnet4;default:throw new Error(`Network ${e} not supported by Xverse wallet`)}}class io extends eo{constructor({provider:e,requestedChains:t}){super(),this.chain="bip122",this.type="ANNOUNCED",this.requestedChains=[],this.walletUnsubscribes=[],this.wallet=e,this.requestedChains=t,this.provider=this}get id(){return this.name}get name(){return this.wallet.name}get explorerId(){return ro.L.ConnectorExplorerIds[this.wallet.name]}get imageUrl(){return this.wallet.icon}get chains(){return this.requestedChains.filter(e=>"bip122"===e.chainNamespace)}async request(e){return this.internalRequest(e.method,e.params)}async connect(){const e=c.W.getActiveCaipNetwork(i.o.CHAIN.BITCOIN),t=so(e?.caipNetworkId),n=await this.getAccountAddresses().then(e=>e[0]?.address).catch(()=>this.internalRequest("wallet_connect",{network:t}).then(e=>e?.addresses.map(e=>({...e,purpose:Xi(e.purpose)})).find(e=>e.purpose===Ji.Payment)?.address));if(!n)throw new Error("No address available");return this.bindEvents(),this.emit("accountsChanged",[n]),n}async disconnect(){await this.internalRequest("wallet_disconnect",null),this.unbindEvents()}async getAccountAddresses(){const e=await this.internalRequest("getAddresses",{purposes:[jn.Payment,jn.Ordinals,jn.Stacks],message:"Connect to your wallet"});if(0===e.addresses.length)throw new Error("No address available");return e.addresses.map(e=>({...e,purpose:Xi(e.purpose)}))}static hasProviders(){return!!s.w.isClient()&&Hn().length>0}static async getWallets({requestedChains:e}
2){return s.w.isClient()?(await f.y.withRetry({conditionFn:()=>io.hasProviders(),intervalMs:200,maxRetries:3}),Hn().map(t=>new io({provider:t,requestedChains:e}))):[]}async signMessage(e){const t=e.protocol?.toUpperCase();return(await this.internalRequest("signMessage",{...e,protocol:t})).signature}async signPSBT(e){const t=e.signInputs.reduce((e,t)=>{const n=e[t.address]||[];return n.push(t.index),{...e,[t.address]:n}},{});return await this.internalRequest("signPsbt",{psbt:e.psbt,broadcast:e.broadcast,signInputs:t})}async switchNetwork(e){const t=so(e);await this.internalRequest("wallet_changeNetwork",{name:t})}async sendTransfer({amount:e,recipient:t}){const n=Number(e);if(isNaN(n))throw new Error("Invalid amount");return(await this.internalRequest("sendTransfer",{recipients:[{address:t,amount:n}]})).txid}getWalletProvider(){return Wn(this.wallet.id)}async internalRequest(e,t){const n=await this.getWalletProvider().request(e,t).catch(e=>{if("jsonrpc"in e&&"error"in e)return e;throw e});if("result"in n)return n.result;throw{...n.error,name:"RPCError"}}bindEvents(){this.unbindEvents();const e=this.getWalletProvider();"function"==typeof e.addListener?this.walletUnsubscribes.push(e.addListener("accountChange",async e=>{const t=await this.connect();this.emit("accountsChanged",[t])}),e.addListener("disconnect",e=>{this.emit("disconnect")}),e.addListener("networkChange",e=>{const t=function(e){switch(e){case Ln.Mainnet:return g.X5s.caipNetworkId;case Ln.Testnet4:return g.IDU.caipNetworkId;default:throw new Error(`Network ${e} not supported by Xverse wallet`)}}(e.stacks.name);this.emit("chainChanged",t)})):console.warn(`SatsConnectConnector:bindEvents - wallet provider "${this.name}" does not support events`)}unbindEvents(){this.walletUnsubscribes.forEach(e=>e()),this.walletUnsubscribes=[]}}var oo=n(48287).hp;class ao extends io{constructor({connector:e}){if(e.wallet.id!==ao.ProviderId)throw new Error("LeatherConnector: wallet must be a LeatherProvider");super({provider:e.wallet,requestedChains:e.requestedChains})}get imageUrl(){return this.wallet?.icon?.replace("data:image/svg","data:image/svg+xml")}async getAccountAddresses(){return this.connectedAccounts||(this.connectedAccounts=await super.getAccountAddresses()),this.connectedAccounts}disconnect(){return this.connectedAccounts=void 0,Promise.resolve()}async sendTransfer({amount:e,recipient:t}){const n={recipients:[{address:t,amount:e}],network:this.getNetwork()};return(await this.internalRequest("sendTransfer",n)).txid}async signPSBT({psbt:e,broadcast:t=!1,signInputs:n}){const r=n?.[0],s={hex:oo.from(e,"base64").toString("hex"),network:this.getNetwork(),broadcast:t,signAtIndex:r?.index,allowedSighash:r?.sighashTypes},i=await this.internalRequest("signPsbt",s);return{psbt:oo.from(i.hex,"hex").toString("base64"),txid:i.txid}}async signMessage(e){const t=this.getNetwork(),n=e.protocol?.toUpperCase();return(await this.internalRequest("signMessage",{...e,protocol:n,network:t.toLowerCase()})).signature}async switchNetwork(e){return Promise.resolve()}getNetwork(){const e=c.W.getActiveCaipNetwork(i.o.CHAIN.BITCOIN);switch(e?.caipNetworkId){case g.X5s.caipNetworkId:return"mainnet";case g.IDU.caipNetworkId:return"testnet";case g.tw4.caipNetworkId:return"signet";default:throw new Error("LeatherConnector: unsupported network")}}}ao.ProviderId="LeatherProvider";class co extends Error{constructor(e,t,n){super("Wallet call is not supported"),this.name="MethodNotSupported",this.method=t,this.walletId=e,console.error(`BitcoinAdapter:MethodNotSupportedError:${e} - The connected wallet doesn't support the method "${t}".${n?` ${n}`:""}`)}}const uo={parseSatoshis(e,t){const n=parseFloat(e)/10**t.nativeCurrency.decimals;return Intl.NumberFormat("en-US",{maximumFractionDigits:t.nativeCurrency.decimals}).format(n)}};var lo=n(48287).hp;const fo={[g.X5s.caipNetworkId]:"bitcoin",[g.IDU.caipNetworkId]:"bitcoinTestnet"};class ho extends eo{constructor({wallet:e,requestedChains:t,imageUrl:n,requestedCaipNetworkId:r}){super(),this.id="OKX",this.name="OKX Wallet",this.chain="bip122",this.type="ANNOUNCED",this.explorerId=ro.L.ConnectorExplorerIds[i.o.CONNECTOR_ID.OKX],this.provider=this,this.requestedChains=[],this.wallet=e,this.requestedChains=t,this.imageUrl=n,this.requestedCaipNetworkId=r}get chains(){return this.requestedChains.filter(e=>e.caipNetworkId===c.W.getActiveCaipNetwork(i.o.CHAIN.BITCOIN)?.caipNetworkId)}async connect(){const e=await this.wallet.connect();
2return this.bindEvents(),this.emit("accountsChanged",[e.address]),e.address}async disconnect(){this.unbindEvents(),await this.wallet.disconnect()}async getAccountAddresses(){const e=await this.wallet.getAccounts(),t=await this.wallet.getPublicKey();return e.map(e=>({address:e,purpose:Ji.Payment,publicKey:t}))}async signMessage(e){const t="bip322"===e.protocol?"bip322-simple":e.protocol;return this.wallet.signMessage(e.message,t)}async sendTransfer(e){const t=c.W.getActiveCaipNetwork(i.o.CHAIN.BITCOIN);if(!t)throw new Error("No active network available");const n=(await this.wallet.getAccounts())[0];if(!n)throw new Error("No account available");return(await this.wallet.send({from:n,to:e.recipient,value:uo.parseSatoshis(e.amount,t)})).txhash}async signPSBT(e){const t=lo.from(e.psbt,"base64").toString("hex");let n;e.signInputs?.length>0&&(n={autoFinalized:!1,toSignInputs:e.signInputs.map(e=>({index:e.index,address:e.address,sighashTypes:e.sighashTypes,publicKey:e.publicKey,disableTweakSigner:e.disableTweakSigner}))});const r=await this.wallet.signPsbt(t,n);let s;if(e.broadcast){if(e.signInputs?.length>0)throw new Error("Broadcast not supported for partial signing");s=await this.wallet.pushPsbt(r)}return{psbt:lo.from(r,"hex").toString("base64"),txid:s}}async switchNetwork(e){const t=ho.getWallet({requestedChains:this.requestedChains,requestedCaipNetworkId:e});if(!t)throw new Error(`${this.name} wallet does not support network switching`);this.unbindEvents(),this.wallet=t.wallet;try{await this.connect()}catch(e){throw new Error(`${this.name} wallet does not support network switching`)}}request(e){return Promise.reject(new co(this.id,"request"))}bindEvents(){this.unbindEvents(),this.wallet.on("accountChanged",e=>{"object"==typeof e&&e&&"address"in e&&this.emit("accountsChanged",[e.address])}),this.wallet.on("disconnect",()=>{this.emit("disconnect")})}unbindEvents(){this.wallet.removeAllListeners()}static getWallet(e){if(!s.w.isClient())return;let t;const n=window?.okxwallet,r=fo[e.requestedCaipNetworkId];return t=n?.[r]||n?.bitcoin,t?new ho({wallet:t,imageUrl:n?.cardano?.icon||"",...e}):void 0}async getPublicKey(){return this.wallet.getPublicKey()}}var po=n(48287).hp;class go extends eo{constructor({id:e,name:t,wallet:n,requestedChains:r,imageUrl:s}){super(),this.chain="bip122",this.type="ANNOUNCED",this.provider=this,this.requestedChains=[],this.id=e,this.name=t,this.wallet=n,this.requestedChains=r,this.imageUrl=s}get chains(){return this.requestedChains.filter(e=>e.chainNamespace===i.o.CHAIN.BITCOIN)}async connect(){const[e]=await this.wallet.requestAccounts();if(!e)throw new Error("No account found");return this.bindEvents(),this.emit("accountsChanged",[e]),e}async disconnect(){return this.unbindEvents(),Promise.resolve()}async getAccountAddresses(){const e=await this.wallet.requestAccounts(),t=await this.wallet.getPublicKey();return e.map(e=>({address:e,purpose:Ji.Payment,publicKey:t}))}async signMessage(e){const t="bip322"===e.protocol?"bip322-simple":e.protocol;return this.wallet.signMessage(e.message,t)}async sendTransfer(e){const t=c.W.getActiveCaipNetwork(i.o.CHAIN.BITCOIN);if(!t)throw new Error("No active network available");if(!(await this.wallet.getAccounts())[0])throw new Error("No account available");return await this.wallet.sendBitcoin(e.recipient,Number(uo.parseSatoshis(e.amount,t)))}async signPSBT(e){const t=po.from(e.psbt,"base64").toString("hex");let n;e.signInputs?.length>0&&(n={autoFinalized:!1,toSignInputs:e.signInputs.map(e=>({index:e.index,address:e.address,sighashTypes:e.sighashTypes,publicKey:e.publicKey,disableTweakSigner:e.disableTweakSigner,useTweakedSigner:e.useTweakedSigner}))});const r=await this.wallet.signPsbt(t,n);let s;if(e.broadcast){if(e.signInputs?.length>0)throw new Error("Broadcast not supported for partial signing");s=await this.wallet.pushPsbt(r)}return{psbt:po.from(r,"hex").toString("base64"),txid:s}}async switchNetwork(e){const t=this.getNetwork(e);await this.wallet.switchChain(t)}request(e){return Promise.reject(new co(this.id,"request"))}onAccountsChanged(e){"object"==typeof e&&e&&"address"in e&&this.emit
2("accountsChanged",[e.address])}bindEvents(){this.unbindEvents(),this.wallet.on("accountsChanged",this.onAccountsChanged.bind(this))}unbindEvents(){this.wallet.removeListener("accountsChanged",this.onAccountsChanged.bind(this))}static getWallet(e){if(!s.w.isClient())return;const t=window;let n;switch(e.id){case"unisat":n=t?.unisat;break;case"bitget":n=t?.bitkeep?.unisat;break;case"binancew3w":n=t?.binancew3w?.bitcoin;break;default:throw new Error(`Unsupported wallet id: ${e.id}`)}return n?new go({wallet:n,...e}):void 0}async getPublicKey(){return this.wallet.getPublicKey()}getNetwork(e){switch(e){case g.X5s.caipNetworkId:return"BITCOIN_MAINNET";case g.IDU.caipNetworkId:return"BITCOIN_TESTNET";case g.tw4.caipNetworkId:return"BITCOIN_SIGNET";default:throw new Error("UnisatConnector: unsupported network")}}}var yo;let wo;const mo=new Set,bo={};function vo(){if(wo)return wo;if(wo=Object.freeze({register:Eo,get:Mo,on:No}),"undefined"==typeof window)return wo;const e=Object.freeze({register:Eo});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new So(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return wo}function Eo(...e){return(e=e.filter(e=>!mo.has(e))).length?(e.forEach(e=>function(e){Ao=void 0,mo.add(e)}(e)),bo.register?.forEach(t=>xo(()=>t(...e))),function(){e.forEach(e=>function(e){Ao=void 0,mo.delete(e)}(e)),bo.unregister?.forEach(t=>xo(()=>t(...e)))}):()=>{}}let Ao;function Mo(){return Ao||(Ao=[...mo]),Ao}function No(e,t){return bo[e]?.push(t)||(bo[e]=[t]),function(){bo[e]=bo[e]?.filter(e=>t!==e)}}function xo(e){try{e()}catch(e){console.error(e)}}class So extends Event{get detail(){return function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}(this,yo,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),yo.set(this,void 0),function(e,t,n,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?s.call(e,n):s?s.value=n:t.set(e,n)}(this,yo,e,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}yo=new WeakMap;var Io=n(48287).hp;class Oo extends eo{constructor({wallet:e,requestedChains:t}){super(),this.chain="bip122",this.type="ANNOUNCED",this.requestedChains=[],this.provider=this,this.wallet=e,this.requestedChains=t,this.provider=this}get id(){return this.name}get name(){return this.wallet.name}get imageUrl(){return this.wallet.icon}get explorerId(){return ro.L.ConnectorExplorerIds[this.name]}get chains(){return this.wallet.chains.map(e=>this.requestedChains.find(t=>{switch(e){case"bitcoin:mainnet":return t.caipNetworkId===g.X5s.caipNetworkId;case"bitcoin:testnet":return t.caipNetworkId===g.IDU.caipNetworkId;default:return t.caipNetworkId===e}})).filter(Boolean)}async connect(){const e=this.getWalletFeature("bitcoin:connect"),t=(await e.connect({purposes:["payment","ordinals"]})).accounts[0];if(!t)throw new Error("No account found");return t.address}async getAccountAddresses(){const e=new Set,t=this.wallet.accounts.map(e=>{const{address:t,purpose:n,publicKey:r}=e;return{address:t,purpose:n??Ji.Payment,publicKey:Io.from(r).toString("hex")}}).filter(t=>!e.has(t.address)&&(e.add(t.address),!0));return Promise.resolve(t)}async signMessage(e){e.protocol&&console.warn("WalletStandardConnector:signMessage - protocol parameter not supported in WalletStandard:bitcoin - sign
2Message");const t=this.getWalletFeature("bitcoin:signMessage"),n=this.wallet.accounts.find(t=>t.address===e.address);if(!n)throw new Error("Account not found");const r=(new TextEncoder).encode(e.message),s=(await t.signMessage({account:n,message:r}))[0];if(!s)throw new Error("No response from wallet");return Io.from(s.signature).toString("base64")}async signPSBT(e){const t=this.getWalletFeature("bitcoin:signTransaction");if(e.broadcast)throw new co(this.id,"signPSBT","This wallet does not support broadcasting, please broadcast it manually or contact the development team.");const n=e.signInputs.map(e=>{const t=this.wallet.accounts.find(t=>t.address===e.address);if(!t)throw new Error(`Account with address ${e.address} not found`);return{account:t,signingIndexes:[e.index],sigHash:void 0}}),r=(await t.signTransaction({psbt:new Uint8Array(Io.from(e.psbt,"base64")),inputsToSign:n}))[0];if(!r)throw new Error("No response from wallet");return{psbt:Io.from(r.signedPsbt).toString("base64"),txid:void 0}}async sendTransfer(e){return Promise.reject(new co(this.id,"sendTransfer",'Please use "signPSBT" instead and broadcast the transaction manually.'))}async disconnect(){return Promise.resolve()}async request(e){return Promise.reject(new co(this.id,"request"))}getWalletFeature(e){if(!(e in this.wallet.features))throw new co(this.id,e);return this.wallet.features[e]}static watchWallets({callback:e,requestedChains:t}){const{get:n,on:r}=vo();function s(e){return e.filter(e=>"bitcoin:connect"in e.features).map(e=>new Oo({wallet:e,requestedChains:t}))}return e(...s(n())),r("register",(...t)=>e(...s(t)))}async switchNetwork(e){const t=this.wallet.features["bitcoin:switchNetwork"];if(t&&"function"==typeof t.switchNetwork)return await t.switchNetwork(e),void this.emit("change",{accounts:this.wallet.accounts});throw new Error(`${this.name} wallet does not support network switching`)}}const ko={getUTXOs:async({network:e,address:t})=>{const n=e.caipNetworkId===g.IDU.caipNetworkId,r=await fetch(`https://mempool.space${n?"/testnet":""}/api/address/${t}/utxo`);return r.ok?await r.json():(console.warn(`Failed to fetch UTXOs: ${await r.text()}`),[])}},To=[{id:"unisat",name:"Unisat Wallet",imageUrl:"https://imagedelivery.net/_aTEfDRm7z3tKgu9JhfeKA/530e8a71-f014-46e5-1302-26d1eff60200/sm"},{id:"bitget",name:"Bitget Wallet",imageUrl:s.w.isClient()?window?.bitkeep?.suiWallet?.icon??"":""},{id:"binancew3w",name:"Binance Web3 Wallet",imageUrl:"https://imagedelivery.net/_aTEfDRm7z3tKgu9JhfeKA/7c1961a6-9c4c-4632-8710-d02a43df1300/sm"}];
2class Co extends a.X{constructor({api:e={},...t}={}){super({namespace:i.o.CHAIN.BITCOIN,adapterType:i.o.ADAPTER_TYPES.BITCOIN,...t}),this.balancePromises={},this.universalProvider=void 0,this.api={...ko,...e}}async connect(e){const t=this.connectors.find(t=>t.id===e.id);if(!t)throw new Error("connectionControllerClient:connectExternal - connector is undefined");const n=t.chains.find(t=>t.id===e.chainId)||t.chains[0];if(!n)throw new Error("The connector does not support any of the requested chains");const r=this.getConnection({address:e.address,connectorId:t.id,connections:this.connections,connectors:this.connectors});if(r?.account)return this.emit("accountChanged",{address:r.account.address,chainId:r.caipNetwork?.id,connector:t}),{id:t.id,type:t.type,address:r.account.address,chainId:n.id,provider:t.provider};const s=await t.connect().catch(e=>{throw new o.vx(e)}),a=await this.getAccounts({id:t.id});return this.emit("accountChanged",{address:s,chainId:n.id,connector:t}),this.addConnection({connectorId:t.id,accounts:a.accounts.map(e=>({address:e.address,type:e.type,publicKey:e.publicKey,path:e.path})),caipNetwork:n}),t.id!==i.o.CONNECTOR_ID.WALLET_CONNECT&&this.listenProviderEvents(t.id,t),{id:t.id,type:t.type,address:s,chainId:n.id,provider:t.provider}}async getAccounts(e){const t=await(this.connectors.find(t=>t.id===e.id)?.getAccountAddresses().catch(()=>[])),n=c.W.getActiveCaipNetwork(this.namespace);let r=n?t?.map(e=>s.w.createAccount({caipAddress:`${n.caipNetworkId}:${e.address}`,type:e.purpose||"payment",publicKey:e.publicKey,path:e.path})):void 0;if(r&&r.length>1){const e=r[h],t=r[p];r=[s.w.createAccount({caipAddress:`${n?.caipNetworkId}:${e?.address??""}`,type:"payment",publicKey:e?.publicKey??"",path:e?.path??""}),s.w.createAccount({caipAddress:`${n?.caipNetworkId}:${t?.address??""}`,type:"ordinal",publicKey:t?.publicKey??"",path:t?.path??""})]}return{accounts:r||[]}}async syncConnectors(e){Oo.watchWallets({callback:this.addConnector.bind(this),requestedChains:this.networks});const t=await io.getWallets({requestedChains:this.networks});this.addConnector(...t.map(e=>e.wallet.id===ao.ProviderId?new ao({connector:e}):e));const n=ho.getWallet({requestedChains:this.networks,requestedCaipNetworkId:c.W.getActiveCaipNetwork(i.o.CHAIN.BITCOIN)?.caipNetworkId});n&&this.addConnector(n),To.forEach(e=>{const t=go.getWallet({...e,requestedChains:this.networks});t&&this.addConnector(t)})}syncConnection(e){return this.connect({id:e.id,chainId:e.chainId,type:""})}async onAccountsChanged(e,t,n=!0){if(e.length>0){const{address:n}=s.w.getAccount(e[0]),r=await this.getAccounts({id:t}),o=this.getConnection({connectorId:t,connections:this.connections,connectors:this.connectors});n&&f.y.isLowerCaseMatch(this.getConnectorId(i.o.CHAIN.BITCOIN),t)&&this.emit("accountChanged",{address:n,chainId:o?.caipNetwork?.id,connector:o?.connector}),this.addConnection({connectorId:t,accounts:r.accounts.map(e=>({address:e.address,type:e.type,publicKey:e.publicKey,path:e.path})),caipNetwork:o?.caipNetwork})}else n&&this.onDisconnect(t)}async syncConnections({connectToFirstConnector:e,caipNetwork:t}){await Promise.all(this.connectors.filter(e=>{const{hasDisconnected:t,hasConnected:n}=f.y.getConnectorStorageInfo(e.id,this.namespace);return!t&&n}).map(async e=>{if(e.id===i.o.CONNECTOR_ID.WALLET_CONNECT){const n=u.k.getWalletConnectAccounts(this.universalProvider,this.namespace);return void(n.length>0&&this.addConnection({connectorId:e.id,accounts:n.map(e=>({address:e.address})),caipNetwork:t}))}const n=await e.connect(),r=await e.getAccountAddresses();let o=t?r?.map(e=>s.w.createAccount({caipAddress:`${t.caipNetworkId}:${e.address}`,type:e.purpose||"payment",publicKey:e.publicKey,path:e.path})):void 0;if(o&&o.length>1){const e=o[h],n=o[p];o=[s.w.createAccount({caipAddress:`${t?.caipNetworkId}:${e?.address??""}`,type:"payment",publicKey:e?.publicKey??"",path:e?.path??""}),s.w.createAccount({caipAddress:`${t?.caipNetworkId}:${n?.address??""}`,type:"ordinal",publicKey:n?.publicKey??"",path:n?.path??""})]}const a=e.chains.find(e=>e.id===t?.id)||e.chains[0];if(!a)throw new Error("The connector does not support any of the requested chains");
2n&&(this.listenProviderEvents(e.id,e.provider),this.addConnection({connectorId:e.id,accounts:(o||[]).map(e=>({address:e.address,type:e.type,publicKey:e.publicKey,path:e.path})),caipNetwork:t}))})),e&&this.emitFirstAvailableConnection()}async disconnectAll(){const e=await Promise.all(this.connections.map(async e=>{const t=this.connectors.find(t=>f.y.isLowerCaseMatch(t.id,e.connectorId));if(!t)throw new Error("Connector not found");return await this.disconnect({id:t.id}),e}));return{connections:e}}async signMessage(e){const t=e.provider;if(!t)throw new Error("BitcoinAdapter:signMessage - connector is undefined");return{signature:await t.signMessage({message:e.message,address:e.address})}}getWalletConnectProvider(e){return new no({provider:e.provider,chains:e.caipNetworks,getActiveChain:()=>c.W.getCaipNetworkByNamespace(this.namespace)})}async writeSolanaTransaction(){return Promise.resolve({hash:""})}async disconnect(e){if(e.id){const t=this.connectors.find(t=>f.y.isLowerCaseMatch(t.id,e.id));if(!t?.provider)throw new Error("BitcoinAdapter:disconnect - connector.provider is undefined");const n=this.getConnection({connectorId:e.id,connections:this.connections,connectors:this.connectors});return await t.provider.disconnect(),this.removeProviderListeners(t.id),this.deleteConnection(t.id),0===this.connections.length?this.emit("disconnect"):this.emitFirstAvailableConnection(),{connections:n?[n]:[]}}return this.disconnectAll()}async getBalance(e){const t=e.caipNetwork,n=e.address;if(!n)return Promise.resolve({balance:"0.00",symbol:"BTC"});if(t&&t.chainNamespace===this.namespace){const e=`${t?.caipNetworkId}:${n}`,r=this.balancePromises[e];if(r)return r;const s=l.i.getNativeBalanceCacheForCaipAddress(e);return s?{balance:s.balance,symbol:s.symbol}:(this.balancePromises[e]=new Promise(async r=>{const s=(await this.api.getUTXOs({network:t,address:n})).reduce((e,t)=>e+t.value,0),i=uo.parseSatoshis(s.toString(),t);l.i.updateNativeBalanceCache({caipAddress:e,balance:i,symbol:t.nativeCurrency.symbol,timestamp:Date.now()}),r({balance:i,symbol:t.nativeCurrency.symbol})}).finally(()=>{delete this.balancePromises[e]}),this.balancePromises[e]||Promise.resolve({balance:"0.00",symbol:"BTC"}))}return Promise.resolve({balance:"0",symbol:g.X5s.nativeCurrency.symbol})}async switchNetwork(e){const t=d.G.getProviderId(e.caipNetwork.chainNamespace),n=d.G.getProvider(e.caipNetwork.chainNamespace);if("WALLET_CONNECT"===t||"AUTH"===t)return await super.switchNetwork(e);if(!n)throw new Error("BitcoinAdapter:switchNetwork - provider is undefined");return await n.switchNetwork(e.caipNetwork.caipNetworkId)}estimateGas(e){return Promise.resolve({})}sendTransaction(e){return Promise.resolve({})}writeContract(e){return Promise.resolve({})}parseUnits(e){return BigInt(0)}formatUnits(e){return""}grantPermissions(e){return Promise.resolve({})}getCapabilities(e){return Promise.resolve({})}revokePermissions(e){return Promise.resolve("0x")}async walletGetAssets(e){return Promise.resolve({})}async onChainChanged(e,t){const n=this.connectors.find(e=>e.id===t);if(!n)throw new Error("BitcoinAdapter:onChainChanged - connector is undefined");const{address:r}=await this.connect({id:n.id,chainId:e,type:""}),s=await this.getAccounts({id:n.id}),o=n.chains.find(t=>t.id===e)||n.chains[0];f.y.isLowerCaseMatch(this.getConnectorId(i.o.CHAIN.BITCOIN),n.id)&&this.emit("switchNetwork",{chainId:e,address:r}),this.addConnection({connectorId:n.id,accounts:s.accounts.map(e=>({address:e.address,type:e.type,publicKey:e.publicKey,path:e.path})),caipNetwork:o})}setAuthProvider(){}async setUniversalProvider(e){this.universalProvider=e;const t=i.o.CONNECTOR_ID.WALLET_CONNECT;return u.k.listenWcProvider({universalProvider:e,namespace:i.o.CHAIN.BITCOIN,onConnect:e=>this.onConnect(e,t),onDisconnect:()=>this.onDisconnect(t),onAccountsChanged:e=>super.onAccountsChanged(e,t,!1)}),this.addConnector(new no({provider:e,chains:this.getCaipNetworks(),getActiveChain:()=>c.W.getCaipNetworkByNamespace(this.namespace)})),Promise.resolve()}}}}]);

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.