@babylonlabs-io/wallet-connector 2.0.16 → 2.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var I8=Object.defineProperty;var m8=(o,g,c)=>g in o?I8(o,g,{enumerable:!0,configurable:!0,writable:!0,value:c}):o[g]=c;var Gi=(o,g,c)=>m8(o,typeof g!="symbol"?g+"":g,c);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ETHWalletProvider=require("./ETHWalletProvider-wp9s8vtc.cjs"),jsxRuntime=require("react/jsx-runtime"),coreUi=require("@babylonlabs-io/core-ui"),pA=require("bitcoinjs-lib"),Y=require("@keystonehq/sdk"),stargate=require("@cosmjs/stargate"),kt=require("react"),reactDom=require("react-dom"),tailwindMerge=require("tailwind-merge"),networks$2=require("@reown/appkit/networks"),ledgerVaultSigner=require("@babylonlabs-io/ledger-vault-signer"),appkitAdapterBitcoin=require("@reown/appkit-adapter-bitcoin"),react=require("@reown/appkit/react"),reactQuery=require("@tanstack/react-query");function _interopNamespaceDefault(o){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const c in o)if(c!=="default"){const y=Object.getOwnPropertyDescriptor(o,c);Object.defineProperty(g,c,y.get?y:{enumerable:!0,get:()=>o[c]})}}return g.default=o,Object.freeze(g)}const pA__namespace=_interopNamespaceDefault(pA);var buffer$3={},base64Js$1={};base64Js$1.byteLength=byteLength;base64Js$1.toByteArray=toByteArray;base64Js$1.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$2=0,len=code.length;i$2<len;++i$2)lookup[i$2]=code[i$2],revLookup[code.charCodeAt(i$2)]=i$2;revLookup[45]=62;revLookup[95]=63;function getLens(o){var g=o.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=o.indexOf("=");c===-1&&(c=g);var y=c===g?0:4-c%4;return[c,y]}function byteLength(o){var g=getLens(o),c=g[0],y=g[1];return(c+y)*3/4-y}function _byteLength(o,g,c){return(g+c)*3/4-c}function toByteArray(o){var g,c=getLens(o),y=c[0],t=c[1],d=new Arr(_byteLength(o,y,t)),E=0,B=t>0?y-4:y,D;for(D=0;D<B;D+=4)g=revLookup[o.charCodeAt(D)]<<18|revLookup[o.charCodeAt(D+1)]<<12|revLookup[o.charCodeAt(D+2)]<<6|revLookup[o.charCodeAt(D+3)],d[E++]=g>>16&255,d[E++]=g>>8&255,d[E++]=g&255;return t===2&&(g=revLookup[o.charCodeAt(D)]<<2|revLookup[o.charCodeAt(D+1)]>>4,d[E++]=g&255),t===1&&(g=revLookup[o.charCodeAt(D)]<<10|revLookup[o.charCodeAt(D+1)]<<4|revLookup[o.charCodeAt(D+2)]>>2,d[E++]=g>>8&255,d[E++]=g&255),d}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[o&63]}function encodeChunk(o,g,c){for(var y,t=[],d=g;d<c;d+=3)y=(o[d]<<16&16711680)+(o[d+1]<<8&65280)+(o[d+2]&255),t.push(tripletToBase64(y));return t.join("")}function fromByteArray(o){for(var g,c=o.length,y=c%3,t=[],d=16383,E=0,B=c-y;E<B;E+=d)t.push(encodeChunk(o,E,E+d>B?B:E+d));return y===1?(g=o[c-1],t.push(lookup[g>>2]+lookup[g<<4&63]+"==")):y===2&&(g=(o[c-2]<<8)+o[c-1],t.push(lookup[g>>10]+lookup[g>>4&63]+lookup[g<<2&63]+"=")),t.join("")}var ieee754$1={};ieee754$1.read=function(o,g,c,y,t){var d,E,B=t*8-y-1,D=(1<<B)-1,x=D>>1,v=-7,F=c?t-1:0,M=c?-1:1,U=o[g+F];for(F+=M,d=U&(1<<-v)-1,U>>=-v,v+=B;v>0;d=d*256+o[g+F],F+=M,v-=8);for(E=d&(1<<-v)-1,d>>=-v,v+=y;v>0;E=E*256+o[g+F],F+=M,v-=8);if(d===0)d=1-x;else{if(d===D)return E?NaN:(U?-1:1)*(1/0);E=E+Math.pow(2,y),d=d-x}return(U?-1:1)*E*Math.pow(2,d-y)};ieee754$1.write=function(o,g,c,y,t,d){var E,B,D,x=d*8-t-1,v=(1<<x)-1,F=v>>1,M=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=y?0:d-1,L=y?1:-1,H=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(B=isNaN(g)?1:0,E=v):(E=Math.floor(Math.log(g)/Math.LN2),g*(D=Math.pow(2,-E))<1&&(E--,D*=2),E+F>=1?g+=M/D:g+=M*Math.pow(2,1-F),g*D>=2&&(E++,D/=2),E+F>=v?(B=0,E=v):E+F>=1?(B=(g*D-1)*Math.pow(2,t),E=E+F):(B=g*Math.pow(2,F-1)*Math.pow(2,t),E=0));t>=8;o[c+U]=B&255,U+=L,B/=256,t-=8);for(E=E<<t|B,x+=t;x>0;o[c+U]=E&255,U+=L,E/=256,x-=8);o[c+U-L]|=H*128};(function(o){const g=base64Js$1,c=ieee754$1,y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=v,o.SlowBuffer=ze,o.INSPECT_MAX_BYTES=50;const t=2147483647;o.kMaxLength=t;const{Uint8Array:d,ArrayBuffer:E,SharedArrayBuffer:B}=globalThis;v.TYPED_ARRAY_SUPPORT=D(),!v.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function D(){try{const Cr=new d(1),Er={foo:function(){return 42}};return Object.setPrototypeOf(Er,d.prototype),Object.setPrototypeOf(Cr,Er),Cr.foo()===42}catch{return!1}}Object.defineProperty(v.prototype,"parent",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.byteOffset}});function x(Cr){if(Cr>t)throw new RangeError('The value "'+Cr+'" is invalid for option "size"');const Er=new d(Cr);return Object.setPrototypeOf(Er,v.prototype),Er}function v(Cr,Er,xr){if(typeof Cr=="number"){if(typeof Er=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return L(Cr)}return F(Cr,Er,xr)}v.poolSize=8192;function F(Cr,Er,xr){if(typeof Cr=="string")return H(Cr,Er);if(E.isView(Cr))return ge(Cr);if(Cr==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Cr);if(ti(Cr,E)||Cr&&ti(Cr.buffer,E)||typeof B<"u"&&(ti(Cr,B)||Cr&&ti(Cr.buffer,B)))return Ie(Cr,Er,xr);if(typeof Cr=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const si=Cr.valueOf&&Cr.valueOf();if(si!=null&&si!==Cr)return v.from(si,Er,xr);const Ci=Ee(Cr);if(Ci)return Ci;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Cr[Symbol.toPrimitive]=="function")return v.from(Cr[Symbol.toPrimitive]("string"),Er,xr);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Cr)}v.from=function(Cr,Er,xr){return F(Cr,Er,xr)},Object.setPrototypeOf(v.prototype,d.prototype),Object.setPrototypeOf(v,d);function M(Cr){if(typeof Cr!="number")throw new TypeError('"size" argument must be of type number');if(Cr<0)throw new RangeError('The value "'+Cr+'" is invalid for option "size"')}function U(Cr,Er,xr){return M(Cr),Cr<=0?x(Cr):Er!==void 0?typeof xr=="string"?x(Cr).fill(Er,xr):x(Cr).fill(Er):x(Cr)}v.alloc=function(Cr,Er,xr){return U(Cr,Er,xr)};function L(Cr){return M(Cr),x(Cr<0?0:Se(Cr)|0)}v.allocUnsafe=function(Cr){return L(Cr)},v.allocUnsafeSlow=function(Cr){return L(Cr)};function H(Cr,Er){if((typeof Er!="string"||Er==="")&&(Er="utf8"),!v.isEncoding(Er))throw new TypeError("Unknown encoding: "+Er);const xr=He(Cr,Er)|0;let si=x(xr);const Ci=si.write(Cr,Er);return Ci!==xr&&(si=si.slice(0,Ci)),si}function fe(Cr){const Er=Cr.length<0?0:Se(Cr.length)|0,xr=x(Er);for(let si=0;si<Er;si+=1)xr[si]=Cr[si]&255;return xr}function ge(Cr){if(ti(Cr,d)){const Er=new d(Cr);return Ie(Er.buffer,Er.byteOffset,Er.byteLength)}return fe(Cr)}function Ie(Cr,Er,xr){if(Er<0||Cr.byteLength<Er)throw new RangeError('"offset" is outside of buffer bounds');if(Cr.byteLength<Er+(xr||0))throw new RangeError('"length" is outside of buffer bounds');let si;return Er===void 0&&xr===void 0?si=new d(Cr):xr===void 0?si=new d(Cr,Er):si=new d(Cr,Er,xr),Object.setPrototypeOf(si,v.prototype),si}function Ee(Cr){if(v.isBuffer(Cr)){const Er=Se(Cr.length)|0,xr=x(Er);return xr.length===0||Cr.copy(xr,0,0,Er),xr}if(Cr.length!==void 0)return typeof Cr.length!="number"||Lr(Cr.length)?x(0):fe(Cr);if(Cr.type==="Buffer"&&Array.isArray(Cr.data))return fe(Cr.data)}function Se(Cr){if(Cr>=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return Cr|0}function ze(Cr){return+Cr!=Cr&&(Cr=0),v.alloc(+Cr)}v.isBuffer=function(Er){return Er!=null&&Er._isBuffer===!0&&Er!==v.prototype},v.compare=function(Er,xr){if(ti(Er,d)&&(Er=v.from(Er,Er.offset,Er.byteLength)),ti(xr,d)&&(xr=v.from(xr,xr.offset,xr.byteLength)),!v.isBuffer(Er)||!v.isBuffer(xr))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Er===xr)return 0;let si=Er.length,Ci=xr.length;for(let bi=0,Ri=Math.min(si,Ci);bi<Ri;++bi)if(Er[bi]!==xr[bi]){si=Er[bi],Ci=xr[bi];break}return si<Ci?-1:Ci<si?1:0},v.isEncoding=function(Er){switch(String(Er).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}},v.concat=function(Er,xr){if(!Array.isArray(Er))throw new TypeError('"list" argument must be an Array of Buffers');if(Er.length===0)return v.alloc(0);let si;if(xr===void 0)for(xr=0,si=0;si<Er.length;++si)xr+=Er[si].length;const Ci=v.allocUnsafe(xr);let bi=0;for(si=0;si<Er.length;++si){let Ri=Er[si];if(ti(Ri,d))bi+Ri.length>Ci.length?(v.isBuffer(Ri)||(Ri=v.from(Ri)),Ri.copy(Ci,bi)):d.prototype.set.call(Ci,Ri,bi);else if(v.isBuffer(Ri))Ri.copy(Ci,bi);else throw new TypeError('"list" argument must be an Array of Buffers');bi+=Ri.length}return Ci};function He(Cr,Er){if(v.isBuffer(Cr))return Cr.length;if(E.isView(Cr)||ti(Cr,E))return Cr.byteLength;if(typeof Cr!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Cr);const xr=Cr.length,si=arguments.length>2&&arguments[2]===!0;if(!si&&xr===0)return 0;let Ci=!1;for(;;)switch(Er){case"ascii":case"latin1":case"binary":return xr;case"utf8":case"utf-8":return fi(Cr).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xr*2;case"hex":return xr>>>1;case"base64":return oi(Cr).length;default:if(Ci)return si?-1:fi(Cr).length;Er=(""+Er).toLowerCase(),Ci=!0}}v.byteLength=He;function Ne(Cr,Er,xr){let si=!1;if((Er===void 0||Er<0)&&(Er=0),Er>this.length||((xr===void 0||xr>this.length)&&(xr=this.length),xr<=0)||(xr>>>=0,Er>>>=0,xr<=Er))return"";for(Cr||(Cr="utf8");;)switch(Cr){case"hex":return sr(this,Er,xr);case"utf8":case"utf-8":return st(this,Er,xr);case"ascii":return xt(this,Er,xr);case"latin1":case"binary":return ir(this,Er,xr);case"base64":return Et(this,Er,xr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yr(this,Er,xr);default:if(si)throw new TypeError("Unknown encoding: "+Cr);Cr=(Cr+"").toLowerCase(),si=!0}}v.prototype._isBuffer=!0;function Pe(Cr,Er,xr){const si=Cr[Er];Cr[Er]=Cr[xr],Cr[xr]=si}v.prototype.swap16=function(){const Er=this.length;if(Er%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let xr=0;xr<Er;xr+=2)Pe(this,xr,xr+1);return this},v.prototype.swap32=function(){const Er=this.length;if(Er%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let xr=0;xr<Er;xr+=4)Pe(this,xr,xr+3),Pe(this,xr+1,xr+2);return this},v.prototype.swap64=function(){const Er=this.length;if(Er%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let xr=0;xr<Er;xr+=8)Pe(this,xr,xr+7),Pe(this,xr+1,xr+6),Pe(this,xr+2,xr+5),Pe(this,xr+3,xr+4);return this},v.prototype.toString=function(){const Er=this.length;return Er===0?"":arguments.length===0?st(this,0,Er):Ne.apply(this,arguments)},v.prototype.toLocaleString=v.prototype.toString,v.prototype.equals=function(Er){if(!v.isBuffer(Er))throw new TypeError("Argument must be a Buffer");return this===Er?!0:v.compare(this,Er)===0},v.prototype.inspect=function(){let Er="";const xr=o.INSPECT_MAX_BYTES;return Er=this.toString("hex",0,xr).replace(/(.{2})/g,"$1 ").trim(),this.length>xr&&(Er+=" ... "),"<Buffer "+Er+">"},y&&(v.prototype[y]=v.prototype.inspect),v.prototype.compare=function(Er,xr,si,Ci,bi){if(ti(Er,d)&&(Er=v.from(Er,Er.offset,Er.byteLength)),!v.isBuffer(Er))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Er);if(xr===void 0&&(xr=0),si===void 0&&(si=Er?Er.length:0),Ci===void 0&&(Ci=0),bi===void 0&&(bi=this.length),xr<0||si>Er.length||Ci<0||bi>this.length)throw new RangeError("out of range index");if(Ci>=bi&&xr>=si)return 0;if(Ci>=bi)return-1;if(xr>=si)return 1;if(xr>>>=0,si>>>=0,Ci>>>=0,bi>>>=0,this===Er)return 0;let Ri=bi-Ci,li=si-xr;const zi=Math.min(Ri,li),Kn=this.slice(Ci,bi),Hn=Er.slice(xr,si);for(let os=0;os<zi;++os)if(Kn[os]!==Hn[os]){Ri=Kn[os],li=Hn[os];break}return Ri<li?-1:li<Ri?1:0};function ve(Cr,Er,xr,si,Ci){if(Cr.length===0)return-1;if(typeof xr=="string"?(si=xr,xr=0):xr>2147483647?xr=2147483647:xr<-2147483648&&(xr=-2147483648),xr=+xr,Lr(xr)&&(xr=Ci?0:Cr.length-1),xr<0&&(xr=Cr.length+xr),xr>=Cr.length){if(Ci)return-1;xr=Cr.length-1}else if(xr<0)if(Ci)xr=0;else return-1;if(typeof Er=="string"&&(Er=v.from(Er,si)),v.isBuffer(Er))return Er.length===0?-1:Fe(Cr,Er,xr,si,Ci);if(typeof Er=="number")return Er=Er&255,typeof d.prototype.indexOf=="function"?Ci?d.prototype.indexOf.call(Cr,Er,xr):d.prototype.lastIndexOf.call(Cr,Er,xr):Fe(Cr,[Er],xr,si,Ci);throw new TypeError("val must be string, number or Buffer")}function Fe(Cr,Er,xr,si,Ci){let bi=1,Ri=Cr.length,li=Er.length;if(si!==void 0&&(si=String(si).toLowerCase(),si==="ucs2"||si==="ucs-2"||si==="utf16le"||si==="utf-16le")){if(Cr.length<2||Er.length<2)return-1;bi=2,Ri/=2,li/=2,xr/=2}function zi(Hn,os){return bi===1?Hn[os]:Hn.readUInt16BE(os*bi)}let Kn;if(Ci){let Hn=-1;for(Kn=xr;Kn<Ri;Kn++)if(zi(Cr,Kn)===zi(Er,Hn===-1?0:Kn-Hn)){if(Hn===-1&&(Hn=Kn),Kn-Hn+1===li)return Hn*bi}else Hn!==-1&&(Kn-=Kn-Hn),Hn=-1}else for(xr+li>Ri&&(xr=Ri-li),Kn=xr;Kn>=0;Kn--){let Hn=!0;for(let os=0;os<li;os++)if(zi(Cr,Kn+os)!==zi(Er,os)){Hn=!1;break}if(Hn)return Kn}return-1}v.prototype.includes=function(Er,xr,si){return this.indexOf(Er,xr,si)!==-1},v.prototype.indexOf=function(Er,xr,si){return ve(this,Er,xr,si,!0)},v.prototype.lastIndexOf=function(Er,xr,si){return ve(this,Er,xr,si,!1)};function be(Cr,Er,xr,si){xr=Number(xr)||0;const Ci=Cr.length-xr;si?(si=Number(si),si>Ci&&(si=Ci)):si=Ci;const bi=Er.length;si>bi/2&&(si=bi/2);let Ri;for(Ri=0;Ri<si;++Ri){const li=parseInt(Er.substr(Ri*2,2),16);if(Lr(li))return Ri;Cr[xr+Ri]=li}return Ri}function Be(Cr,Er,xr,si){return zr(fi(Er,Cr.length-xr),Cr,xr,si)}function ke(Cr,Er,xr,si){return zr(Bi(Er),Cr,xr,si)}function xe(Cr,Er,xr,si){return zr(oi(Er),Cr,xr,si)}function De(Cr,Er,xr,si){return zr($r(Er,Cr.length-xr),Cr,xr,si)}v.prototype.write=function(Er,xr,si,Ci){if(xr===void 0)Ci="utf8",si=this.length,xr=0;else if(si===void 0&&typeof xr=="string")Ci=xr,si=this.length,xr=0;else if(isFinite(xr))xr=xr>>>0,isFinite(si)?(si=si>>>0,Ci===void 0&&(Ci="utf8")):(Ci=si,si=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const bi=this.length-xr;if((si===void 0||si>bi)&&(si=bi),Er.length>0&&(si<0||xr<0)||xr>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ci||(Ci="utf8");let Ri=!1;for(;;)switch(Ci){case"hex":return be(this,Er,xr,si);case"utf8":case"utf-8":return Be(this,Er,xr,si);case"ascii":case"latin1":case"binary":return ke(this,Er,xr,si);case"base64":return xe(this,Er,xr,si);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,Er,xr,si);default:if(Ri)throw new TypeError("Unknown encoding: "+Ci);Ci=(""+Ci).toLowerCase(),Ri=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Et(Cr,Er,xr){return Er===0&&xr===Cr.length?g.fromByteArray(Cr):g.fromByteArray(Cr.slice(Er,xr))}function st(Cr,Er,xr){xr=Math.min(Cr.length,xr);const si=[];let Ci=Er;for(;Ci<xr;){const bi=Cr[Ci];let Ri=null,li=bi>239?4:bi>223?3:bi>191?2:1;if(Ci+li<=xr){let zi,Kn,Hn,os;switch(li){case 1:bi<128&&(Ri=bi);break;case 2:zi=Cr[Ci+1],(zi&192)===128&&(os=(bi&31)<<6|zi&63,os>127&&(Ri=os));break;case 3:zi=Cr[Ci+1],Kn=Cr[Ci+2],(zi&192)===128&&(Kn&192)===128&&(os=(bi&15)<<12|(zi&63)<<6|Kn&63,os>2047&&(os<55296||os>57343)&&(Ri=os));break;case 4:zi=Cr[Ci+1],Kn=Cr[Ci+2],Hn=Cr[Ci+3],(zi&192)===128&&(Kn&192)===128&&(Hn&192)===128&&(os=(bi&15)<<18|(zi&63)<<12|(Kn&63)<<6|Hn&63,os>65535&&os<1114112&&(Ri=os))}}Ri===null?(Ri=65533,li=1):Ri>65535&&(Ri-=65536,si.push(Ri>>>10&1023|55296),Ri=56320|Ri&1023),si.push(Ri),Ci+=li}return er(si)}const Dt=4096;function er(Cr){const Er=Cr.length;if(Er<=Dt)return String.fromCharCode.apply(String,Cr);let xr="",si=0;for(;si<Er;)xr+=String.fromCharCode.apply(String,Cr.slice(si,si+=Dt));return xr}function xt(Cr,Er,xr){let si="";xr=Math.min(Cr.length,xr);for(let Ci=Er;Ci<xr;++Ci)si+=String.fromCharCode(Cr[Ci]&127);return si}function ir(Cr,Er,xr){let si="";xr=Math.min(Cr.length,xr);for(let Ci=Er;Ci<xr;++Ci)si+=String.fromCharCode(Cr[Ci]);return si}function sr(Cr,Er,xr){const si=Cr.length;(!Er||Er<0)&&(Er=0),(!xr||xr<0||xr>si)&&(xr=si);let Ci="";for(let bi=Er;bi<xr;++bi)Ci+=Rr[Cr[bi]];return Ci}function yr(Cr,Er,xr){const si=Cr.slice(Er,xr);let Ci="";for(let bi=0;bi<si.length-1;bi+=2)Ci+=String.fromCharCode(si[bi]+si[bi+1]*256);return Ci}v.prototype.slice=function(Er,xr){const si=this.length;Er=~~Er,xr=xr===void 0?si:~~xr,Er<0?(Er+=si,Er<0&&(Er=0)):Er>si&&(Er=si),xr<0?(xr+=si,xr<0&&(xr=0)):xr>si&&(xr=si),xr<Er&&(xr=Er);const Ci=this.subarray(Er,xr);return Object.setPrototypeOf(Ci,v.prototype),Ci};function wr(Cr,Er,xr){if(Cr%1!==0||Cr<0)throw new RangeError("offset is not uint");if(Cr+Er>xr)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUintLE=v.prototype.readUIntLE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=this[Er],bi=1,Ri=0;for(;++Ri<xr&&(bi*=256);)Ci+=this[Er+Ri]*bi;return Ci},v.prototype.readUintBE=v.prototype.readUIntBE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=this[Er+--xr],bi=1;for(;xr>0&&(bi*=256);)Ci+=this[Er+--xr]*bi;return Ci},v.prototype.readUint8=v.prototype.readUInt8=function(Er,xr){return Er=Er>>>0,xr||wr(Er,1,this.length),this[Er]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,2,this.length),this[Er]|this[Er+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,2,this.length),this[Er]<<8|this[Er+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),(this[Er]|this[Er+1]<<8|this[Er+2]<<16)+this[Er+3]*16777216},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),this[Er]*16777216+(this[Er+1]<<16|this[Er+2]<<8|this[Er+3])},v.prototype.readBigUInt64LE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=xr+this[++Er]*2**8+this[++Er]*2**16+this[++Er]*2**24,bi=this[++Er]+this[++Er]*2**8+this[++Er]*2**16+si*2**24;return BigInt(Ci)+(BigInt(bi)<<BigInt(32))}),v.prototype.readBigUInt64BE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=xr*2**24+this[++Er]*2**16+this[++Er]*2**8+this[++Er],bi=this[++Er]*2**24+this[++Er]*2**16+this[++Er]*2**8+si;return(BigInt(Ci)<<BigInt(32))+BigInt(bi)}),v.prototype.readIntLE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=this[Er],bi=1,Ri=0;for(;++Ri<xr&&(bi*=256);)Ci+=this[Er+Ri]*bi;return bi*=128,Ci>=bi&&(Ci-=Math.pow(2,8*xr)),Ci},v.prototype.readIntBE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=xr,bi=1,Ri=this[Er+--Ci];for(;Ci>0&&(bi*=256);)Ri+=this[Er+--Ci]*bi;return bi*=128,Ri>=bi&&(Ri-=Math.pow(2,8*xr)),Ri},v.prototype.readInt8=function(Er,xr){return Er=Er>>>0,xr||wr(Er,1,this.length),this[Er]&128?(255-this[Er]+1)*-1:this[Er]},v.prototype.readInt16LE=function(Er,xr){Er=Er>>>0,xr||wr(Er,2,this.length);const si=this[Er]|this[Er+1]<<8;return si&32768?si|4294901760:si},v.prototype.readInt16BE=function(Er,xr){Er=Er>>>0,xr||wr(Er,2,this.length);const si=this[Er+1]|this[Er]<<8;return si&32768?si|4294901760:si},v.prototype.readInt32LE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),this[Er]|this[Er+1]<<8|this[Er+2]<<16|this[Er+3]<<24},v.prototype.readInt32BE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),this[Er]<<24|this[Er+1]<<16|this[Er+2]<<8|this[Er+3]},v.prototype.readBigInt64LE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=this[Er+4]+this[Er+5]*2**8+this[Er+6]*2**16+(si<<24);return(BigInt(Ci)<<BigInt(32))+BigInt(xr+this[++Er]*2**8+this[++Er]*2**16+this[++Er]*2**24)}),v.prototype.readBigInt64BE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=(xr<<24)+this[++Er]*2**16+this[++Er]*2**8+this[++Er];return(BigInt(Ci)<<BigInt(32))+BigInt(this[++Er]*2**24+this[++Er]*2**16+this[++Er]*2**8+si)}),v.prototype.readFloatLE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),c.read(this,Er,!0,23,4)},v.prototype.readFloatBE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),c.read(this,Er,!1,23,4)},v.prototype.readDoubleLE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,8,this.length),c.read(this,Er,!0,52,8)},v.prototype.readDoubleBE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,8,this.length),c.read(this,Er,!1,52,8)};function qr(Cr,Er,xr,si,Ci,bi){if(!v.isBuffer(Cr))throw new TypeError('"buffer" argument must be a Buffer instance');if(Er>Ci||Er<bi)throw new RangeError('"value" argument is out of bounds');if(xr+si>Cr.length)throw new RangeError("Index out of range")}v.prototype.writeUintLE=v.prototype.writeUIntLE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,si=si>>>0,!Ci){const li=Math.pow(2,8*si)-1;qr(this,Er,xr,si,li,0)}let bi=1,Ri=0;for(this[xr]=Er&255;++Ri<si&&(bi*=256);)this[xr+Ri]=Er/bi&255;return xr+si},v.prototype.writeUintBE=v.prototype.writeUIntBE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,si=si>>>0,!Ci){const li=Math.pow(2,8*si)-1;qr(this,Er,xr,si,li,0)}let bi=si-1,Ri=1;for(this[xr+bi]=Er&255;--bi>=0&&(Ri*=256);)this[xr+bi]=Er/Ri&255;return xr+si},v.prototype.writeUint8=v.prototype.writeUInt8=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,1,255,0),this[xr]=Er&255,xr+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,65535,0),this[xr]=Er&255,this[xr+1]=Er>>>8,xr+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,65535,0),this[xr]=Er>>>8,this[xr+1]=Er&255,xr+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,4294967295,0),this[xr+3]=Er>>>24,this[xr+2]=Er>>>16,this[xr+1]=Er>>>8,this[xr]=Er&255,xr+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,4294967295,0),this[xr]=Er>>>24,this[xr+1]=Er>>>16,this[xr+2]=Er>>>8,this[xr+3]=Er&255,xr+4};function Mr(Cr,Er,xr,si,Ci){br(Er,si,Ci,Cr,xr,7);let bi=Number(Er&BigInt(4294967295));Cr[xr++]=bi,bi=bi>>8,Cr[xr++]=bi,bi=bi>>8,Cr[xr++]=bi,bi=bi>>8,Cr[xr++]=bi;let Ri=Number(Er>>BigInt(32)&BigInt(4294967295));return Cr[xr++]=Ri,Ri=Ri>>8,Cr[xr++]=Ri,Ri=Ri>>8,Cr[xr++]=Ri,Ri=Ri>>8,Cr[xr++]=Ri,xr}function Dr(Cr,Er,xr,si,Ci){br(Er,si,Ci,Cr,xr,7);let bi=Number(Er&BigInt(4294967295));Cr[xr+7]=bi,bi=bi>>8,Cr[xr+6]=bi,bi=bi>>8,Cr[xr+5]=bi,bi=bi>>8,Cr[xr+4]=bi;let Ri=Number(Er>>BigInt(32)&BigInt(4294967295));return Cr[xr+3]=Ri,Ri=Ri>>8,Cr[xr+2]=Ri,Ri=Ri>>8,Cr[xr+1]=Ri,Ri=Ri>>8,Cr[xr]=Ri,xr+8}v.prototype.writeBigUInt64LE=Ir(function(Er,xr=0){return Mr(this,Er,xr,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeBigUInt64BE=Ir(function(Er,xr=0){return Dr(this,Er,xr,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeIntLE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,!Ci){const zi=Math.pow(2,8*si-1);qr(this,Er,xr,si,zi-1,-zi)}let bi=0,Ri=1,li=0;for(this[xr]=Er&255;++bi<si&&(Ri*=256);)Er<0&&li===0&&this[xr+bi-1]!==0&&(li=1),this[xr+bi]=(Er/Ri>>0)-li&255;return xr+si},v.prototype.writeIntBE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,!Ci){const zi=Math.pow(2,8*si-1);qr(this,Er,xr,si,zi-1,-zi)}let bi=si-1,Ri=1,li=0;for(this[xr+bi]=Er&255;--bi>=0&&(Ri*=256);)Er<0&&li===0&&this[xr+bi+1]!==0&&(li=1),this[xr+bi]=(Er/Ri>>0)-li&255;return xr+si},v.prototype.writeInt8=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,1,127,-128),Er<0&&(Er=255+Er+1),this[xr]=Er&255,xr+1},v.prototype.writeInt16LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,32767,-32768),this[xr]=Er&255,this[xr+1]=Er>>>8,xr+2},v.prototype.writeInt16BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,32767,-32768),this[xr]=Er>>>8,this[xr+1]=Er&255,xr+2},v.prototype.writeInt32LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,2147483647,-2147483648),this[xr]=Er&255,this[xr+1]=Er>>>8,this[xr+2]=Er>>>16,this[xr+3]=Er>>>24,xr+4},v.prototype.writeInt32BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,2147483647,-2147483648),Er<0&&(Er=4294967295+Er+1),this[xr]=Er>>>24,this[xr+1]=Er>>>16,this[xr+2]=Er>>>8,this[xr+3]=Er&255,xr+4},v.prototype.writeBigInt64LE=Ir(function(Er,xr=0){return Mr(this,Er,xr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeBigInt64BE=Ir(function(Er,xr=0){return Dr(this,Er,xr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Qr(Cr,Er,xr,si,Ci,bi){if(xr+si>Cr.length)throw new RangeError("Index out of range");if(xr<0)throw new RangeError("Index out of range")}function Xr(Cr,Er,xr,si,Ci){return Er=+Er,xr=xr>>>0,Ci||Qr(Cr,Er,xr,4),c.write(Cr,Er,xr,si,23,4),xr+4}v.prototype.writeFloatLE=function(Er,xr,si){return Xr(this,Er,xr,!0,si)},v.prototype.writeFloatBE=function(Er,xr,si){return Xr(this,Er,xr,!1,si)};function Wr(Cr,Er,xr,si,Ci){return Er=+Er,xr=xr>>>0,Ci||Qr(Cr,Er,xr,8),c.write(Cr,Er,xr,si,52,8),xr+8}v.prototype.writeDoubleLE=function(Er,xr,si){return Wr(this,Er,xr,!0,si)},v.prototype.writeDoubleBE=function(Er,xr,si){return Wr(this,Er,xr,!1,si)},v.prototype.copy=function(Er,xr,si,Ci){if(!v.isBuffer(Er))throw new TypeError("argument should be a Buffer");if(si||(si=0),!Ci&&Ci!==0&&(Ci=this.length),xr>=Er.length&&(xr=Er.length),xr||(xr=0),Ci>0&&Ci<si&&(Ci=si),Ci===si||Er.length===0||this.length===0)return 0;if(xr<0)throw new RangeError("targetStart out of bounds");if(si<0||si>=this.length)throw new RangeError("Index out of range");if(Ci<0)throw new RangeError("sourceEnd out of bounds");Ci>this.length&&(Ci=this.length),Er.length-xr<Ci-si&&(Ci=Er.length-xr+si);const bi=Ci-si;return this===Er&&typeof d.prototype.copyWithin=="function"?this.copyWithin(xr,si,Ci):d.prototype.set.call(Er,this.subarray(si,Ci),xr),bi},v.prototype.fill=function(Er,xr,si,Ci){if(typeof Er=="string"){if(typeof xr=="string"?(Ci=xr,xr=0,si=this.length):typeof si=="string"&&(Ci=si,si=this.length),Ci!==void 0&&typeof Ci!="string")throw new TypeError("encoding must be a string");if(typeof Ci=="string"&&!v.isEncoding(Ci))throw new TypeError("Unknown encoding: "+Ci);if(Er.length===1){const Ri=Er.charCodeAt(0);(Ci==="utf8"&&Ri<128||Ci==="latin1")&&(Er=Ri)}}else typeof Er=="number"?Er=Er&255:typeof Er=="boolean"&&(Er=Number(Er));if(xr<0||this.length<xr||this.length<si)throw new RangeError("Out of range index");if(si<=xr)return this;xr=xr>>>0,si=si===void 0?this.length:si>>>0,Er||(Er=0);let bi;if(typeof Er=="number")for(bi=xr;bi<si;++bi)this[bi]=Er;else{const Ri=v.isBuffer(Er)?Er:v.from(Er,Ci),li=Ri.length;if(li===0)throw new TypeError('The value "'+Er+'" is invalid for argument "value"');for(bi=0;bi<si-xr;++bi)this[bi+xr]=Ri[bi%li]}return this};const Ur={};function Sr(Cr,Er,xr){Ur[Cr]=class extends xr{constructor(){super(),Object.defineProperty(this,"message",{value:Er.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Cr}]`,this.stack,delete this.name}get code(){return Cr}set code(Ci){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ci,writable:!0})}toString(){return`${this.name} [${Cr}]: ${this.message}`}}}Sr("ERR_BUFFER_OUT_OF_BOUNDS",function(Cr){return Cr?`${Cr} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Sr("ERR_INVALID_ARG_TYPE",function(Cr,Er){return`The "${Cr}" argument must be of type number. Received type ${typeof Er}`},TypeError),Sr("ERR_OUT_OF_RANGE",function(Cr,Er,xr){let si=`The value of "${Cr}" is out of range.`,Ci=xr;return Number.isInteger(xr)&&Math.abs(xr)>2**32?Ci=Gr(String(xr)):typeof xr=="bigint"&&(Ci=String(xr),(xr>BigInt(2)**BigInt(32)||xr<-(BigInt(2)**BigInt(32)))&&(Ci=Gr(Ci)),Ci+="n"),si+=` It must be ${Er}. Received ${Ci}`,si},RangeError);function Gr(Cr){let Er="",xr=Cr.length;const si=Cr[0]==="-"?1:0;for(;xr>=si+4;xr-=3)Er=`_${Cr.slice(xr-3,xr)}${Er}`;return`${Cr.slice(0,xr)}${Er}`}function Fr(Cr,Er,xr){Ar(Er,"offset"),(Cr[Er]===void 0||Cr[Er+xr]===void 0)&&cr(Er,Cr.length-(xr+1))}function br(Cr,Er,xr,si,Ci,bi){if(Cr>xr||Cr<Er){const Ri=typeof Er=="bigint"?"n":"";let li;throw Er===0||Er===BigInt(0)?li=`>= 0${Ri} and < 2${Ri} ** ${(bi+1)*8}${Ri}`:li=`>= -(2${Ri} ** ${(bi+1)*8-1}${Ri}) and < 2 ** ${(bi+1)*8-1}${Ri}`,new Ur.ERR_OUT_OF_RANGE("value",li,Cr)}Fr(si,Ci,bi)}function Ar(Cr,Er){if(typeof Cr!="number")throw new Ur.ERR_INVALID_ARG_TYPE(Er,"number",Cr)}function cr(Cr,Er,xr){throw Math.floor(Cr)!==Cr?(Ar(Cr,xr),new Ur.ERR_OUT_OF_RANGE("offset","an integer",Cr)):Er<0?new Ur.ERR_BUFFER_OUT_OF_BOUNDS:new Ur.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Er}`,Cr)}const hr=/[^+/0-9A-Za-z-_]/g;function jr(Cr){if(Cr=Cr.split("=")[0],Cr=Cr.trim().replace(hr,""),Cr.length<2)return"";for(;Cr.length%4!==0;)Cr=Cr+"=";return Cr}function fi(Cr,Er){Er=Er||1/0;let xr;const si=Cr.length;let Ci=null;const bi=[];for(let Ri=0;Ri<si;++Ri){if(xr=Cr.charCodeAt(Ri),xr>55295&&xr<57344){if(!Ci){if(xr>56319){(Er-=3)>-1&&bi.push(239,191,189);continue}else if(Ri+1===si){(Er-=3)>-1&&bi.push(239,191,189);continue}Ci=xr;continue}if(xr<56320){(Er-=3)>-1&&bi.push(239,191,189),Ci=xr;continue}xr=(Ci-55296<<10|xr-56320)+65536}else Ci&&(Er-=3)>-1&&bi.push(239,191,189);if(Ci=null,xr<128){if((Er-=1)<0)break;bi.push(xr)}else if(xr<2048){if((Er-=2)<0)break;bi.push(xr>>6|192,xr&63|128)}else if(xr<65536){if((Er-=3)<0)break;bi.push(xr>>12|224,xr>>6&63|128,xr&63|128)}else if(xr<1114112){if((Er-=4)<0)break;bi.push(xr>>18|240,xr>>12&63|128,xr>>6&63|128,xr&63|128)}else throw new Error("Invalid code point")}return bi}function Bi(Cr){const Er=[];for(let xr=0;xr<Cr.length;++xr)Er.push(Cr.charCodeAt(xr)&255);return Er}function $r(Cr,Er){let xr,si,Ci;const bi=[];for(let Ri=0;Ri<Cr.length&&!((Er-=2)<0);++Ri)xr=Cr.charCodeAt(Ri),si=xr>>8,Ci=xr%256,bi.push(Ci),bi.push(si);return bi}function oi(Cr){return g.toByteArray(jr(Cr))}function zr(Cr,Er,xr,si){let Ci;for(Ci=0;Ci<si&&!(Ci+xr>=Er.length||Ci>=Cr.length);++Ci)Er[Ci+xr]=Cr[Ci];return Ci}function ti(Cr,Er){return Cr instanceof Er||Cr!=null&&Cr.constructor!=null&&Cr.constructor.name!=null&&Cr.constructor.name===Er.name}function Lr(Cr){return Cr!==Cr}const Rr=function(){const Cr="0123456789abcdef",Er=new Array(256);for(let xr=0;xr<16;++xr){const si=xr*16;for(let Ci=0;Ci<16;++Ci)Er[si+Ci]=Cr[xr]+Cr[Ci]}return Er}();function Ir(Cr){return typeof BigInt>"u"?pr:Cr}function pr(){throw new Error("BigInt not supported")}})(buffer$3);const Buffer=buffer$3.Buffer;var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function getAugmentedNamespace(o){if(Object.prototype.hasOwnProperty.call(o,"__esModule"))return o;var g=o.default;if(typeof g=="function"){var c=function y(){return this instanceof y?Reflect.construct(g,arguments,this.constructor):g.apply(this,arguments)};c.prototype=g.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(o).forEach(function(y){var t=Object.getOwnPropertyDescriptor(o,y);Object.defineProperty(c,y,t.get?t:{enumerable:!0,get:function(){return o[y]}})}),c}var dist$q={},secp256k1$7={},sha2={},_md$1={},utils$l={},crypto$7={},hasRequiredCrypto$4;function requireCrypto$4(){return hasRequiredCrypto$4||(hasRequiredCrypto$4=1,Object.defineProperty(crypto$7,"__esModule",{value:!0}),crypto$7.crypto=void 0,crypto$7.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),crypto$7}var hasRequiredUtils$j;function requireUtils$j(){return hasRequiredUtils$j||(hasRequiredUtils$j=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.wrapXOFConstructorWithOpts=o.wrapConstructorWithOpts=o.wrapConstructor=o.Hash=o.nextTick=o.swap32IfBE=o.byteSwapIfBE=o.swap8IfBE=o.isLE=void 0,o.isBytes=c,o.anumber=y,o.abytes=t,o.ahash=d,o.aexists=E,o.aoutput=B,o.u8=D,o.u32=x,o.clean=v,o.createView=F,o.rotr=M,o.rotl=U,o.byteSwap=L,o.byteSwap32=H,o.bytesToHex=Ie,o.hexToBytes=ze,o.asyncLoop=Ne,o.utf8ToBytes=Pe,o.bytesToUtf8=ve,o.toBytes=Fe,o.kdfInputToBytes=be,o.concatBytes=Be,o.checkOpts=ke,o.createHasher=De,o.createOptHasher=Et,o.createXOFer=st,o.randomBytes=Dt;const g=requireCrypto$4();function c(er){return er instanceof Uint8Array||ArrayBuffer.isView(er)&&er.constructor.name==="Uint8Array"}function y(er){if(!Number.isSafeInteger(er)||er<0)throw new Error("positive integer expected, got "+er)}function t(er,...xt){if(!c(er))throw new Error("Uint8Array expected");if(xt.length>0&&!xt.includes(er.length))throw new Error("Uint8Array expected of length "+xt+", got length="+er.length)}function d(er){if(typeof er!="function"||typeof er.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");y(er.outputLen),y(er.blockLen)}function E(er,xt=!0){if(er.destroyed)throw new Error("Hash instance has been destroyed");if(xt&&er.finished)throw new Error("Hash#digest() has already been called")}function B(er,xt){t(er);const ir=xt.outputLen;if(er.length<ir)throw new Error("digestInto() expects output buffer of length at least "+ir)}function D(er){return new Uint8Array(er.buffer,er.byteOffset,er.byteLength)}function x(er){return new Uint32Array(er.buffer,er.byteOffset,Math.floor(er.byteLength/4))}function v(...er){for(let xt=0;xt<er.length;xt++)er[xt].fill(0)}function F(er){return new DataView(er.buffer,er.byteOffset,er.byteLength)}function M(er,xt){return er<<32-xt|er>>>xt}function U(er,xt){return er<<xt|er>>>32-xt>>>0}o.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function L(er){return er<<24&4278190080|er<<8&16711680|er>>>8&65280|er>>>24&255}o.swap8IfBE=o.isLE?er=>er:er=>L(er),o.byteSwapIfBE=o.swap8IfBE;function H(er){for(let xt=0;xt<er.length;xt++)er[xt]=L(er[xt]);return er}o.swap32IfBE=o.isLE?er=>er:H;const fe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ge=Array.from({length:256},(er,xt)=>xt.toString(16).padStart(2,"0"));function Ie(er){if(t(er),fe)return er.toHex();let xt="";for(let ir=0;ir<er.length;ir++)xt+=ge[er[ir]];return xt}const Ee={_0:48,_9:57,A:65,F:70,a:97,f:102};function Se(er){if(er>=Ee._0&&er<=Ee._9)return er-Ee._0;if(er>=Ee.A&&er<=Ee.F)return er-(Ee.A-10);if(er>=Ee.a&&er<=Ee.f)return er-(Ee.a-10)}function ze(er){if(typeof er!="string")throw new Error("hex string expected, got "+typeof er);if(fe)return Uint8Array.fromHex(er);const xt=er.length,ir=xt/2;if(xt%2)throw new Error("hex string expected, got unpadded hex of length "+xt);const sr=new Uint8Array(ir);for(let yr=0,wr=0;yr<ir;yr++,wr+=2){const qr=Se(er.charCodeAt(wr)),Mr=Se(er.charCodeAt(wr+1));if(qr===void 0||Mr===void 0){const Dr=er[wr]+er[wr+1];throw new Error('hex string expected, got non-hex character "'+Dr+'" at index '+wr)}sr[yr]=qr*16+Mr}return sr}const He=async()=>{};o.nextTick=He;async function Ne(er,xt,ir){let sr=Date.now();for(let yr=0;yr<er;yr++){ir(yr);const wr=Date.now()-sr;wr>=0&&wr<xt||(await(0,o.nextTick)(),sr+=wr)}}function Pe(er){if(typeof er!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(er))}function ve(er){return new TextDecoder().decode(er)}function Fe(er){return typeof er=="string"&&(er=Pe(er)),t(er),er}function be(er){return typeof er=="string"&&(er=Pe(er)),t(er),er}function Be(...er){let xt=0;for(let sr=0;sr<er.length;sr++){const yr=er[sr];t(yr),xt+=yr.length}const ir=new Uint8Array(xt);for(let sr=0,yr=0;sr<er.length;sr++){const wr=er[sr];ir.set(wr,yr),yr+=wr.length}return ir}function ke(er,xt){if(xt!==void 0&&{}.toString.call(xt)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(er,xt)}class xe{}o.Hash=xe;function De(er){const xt=sr=>er().update(Fe(sr)).digest(),ir=er();return xt.outputLen=ir.outputLen,xt.blockLen=ir.blockLen,xt.create=()=>er(),xt}function Et(er){const xt=(sr,yr)=>er(yr).update(Fe(sr)).digest(),ir=er({});return xt.outputLen=ir.outputLen,xt.blockLen=ir.blockLen,xt.create=sr=>er(sr),xt}function st(er){const xt=(sr,yr)=>er(yr).update(Fe(sr)).digest(),ir=er({});return xt.outputLen=ir.outputLen,xt.blockLen=ir.blockLen,xt.create=sr=>er(sr),xt}o.wrapConstructor=De,o.wrapConstructorWithOpts=Et,o.wrapXOFConstructorWithOpts=st;function Dt(er=32){if(g.crypto&&typeof g.crypto.getRandomValues=="function")return g.crypto.getRandomValues(new Uint8Array(er));if(g.crypto&&typeof g.crypto.randomBytes=="function")return Uint8Array.from(g.crypto.randomBytes(er));throw new Error("crypto.getRandomValues must be defined")}}(utils$l)),utils$l}var hasRequired_md$1;function require_md$1(){if(hasRequired_md$1)return _md$1;hasRequired_md$1=1,Object.defineProperty(_md$1,"__esModule",{value:!0}),_md$1.SHA512_IV=_md$1.SHA384_IV=_md$1.SHA224_IV=_md$1.SHA256_IV=_md$1.HashMD=void 0,_md$1.setBigUint64=g,_md$1.Chi=c,_md$1.Maj=y;const o=requireUtils$j();function g(d,E,B,D){if(typeof d.setBigUint64=="function")return d.setBigUint64(E,B,D);const x=BigInt(32),v=BigInt(4294967295),F=Number(B>>x&v),M=Number(B&v),U=D?4:0,L=D?0:4;d.setUint32(E+U,F,D),d.setUint32(E+L,M,D)}function c(d,E,B){return d&E^~d&B}function y(d,E,B){return d&E^d&B^E&B}class t extends o.Hash{constructor(E,B,D,x){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=E,this.outputLen=B,this.padOffset=D,this.isLE=x,this.buffer=new Uint8Array(E),this.view=(0,o.createView)(this.buffer)}update(E){(0,o.aexists)(this),E=(0,o.toBytes)(E),(0,o.abytes)(E);const{view:B,buffer:D,blockLen:x}=this,v=E.length;for(let F=0;F<v;){const M=Math.min(x-this.pos,v-F);if(M===x){const U=(0,o.createView)(E);for(;x<=v-F;F+=x)this.process(U,F);continue}D.set(E.subarray(F,F+M),this.pos),this.pos+=M,F+=M,this.pos===x&&(this.process(B,0),this.pos=0)}return this.length+=E.length,this.roundClean(),this}digestInto(E){(0,o.aexists)(this),(0,o.aoutput)(E,this),this.finished=!0;const{buffer:B,view:D,blockLen:x,isLE:v}=this;let{pos:F}=this;B[F++]=128,(0,o.clean)(this.buffer.subarray(F)),this.padOffset>x-F&&(this.process(D,0),F=0);for(let fe=F;fe<x;fe++)B[fe]=0;g(D,x-8,BigInt(this.length*8),v),this.process(D,0);const M=(0,o.createView)(E),U=this.outputLen;if(U%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const L=U/4,H=this.get();if(L>H.length)throw new Error("_sha2: outputLen bigger than state");for(let fe=0;fe<L;fe++)M.setUint32(4*fe,H[fe],v)}digest(){const{buffer:E,outputLen:B}=this;this.digestInto(E);const D=E.slice(0,B);return this.destroy(),D}_cloneInto(E){E||(E=new this.constructor),E.set(...this.get());const{blockLen:B,buffer:D,length:x,finished:v,destroyed:F,pos:M}=this;return E.destroyed=F,E.finished=v,E.length=x,E.pos=M,x%B&&E.buffer.set(D),E}clone(){return this._cloneInto()}}return _md$1.HashMD=t,_md$1.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_md$1.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),_md$1.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),_md$1.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),_md$1}var _u64$1={},hasRequired_u64$1;function require_u64$1(){if(hasRequired_u64$1)return _u64$1;hasRequired_u64$1=1,Object.defineProperty(_u64$1,"__esModule",{value:!0}),_u64$1.toBig=_u64$1.shrSL=_u64$1.shrSH=_u64$1.rotrSL=_u64$1.rotrSH=_u64$1.rotrBL=_u64$1.rotrBH=_u64$1.rotr32L=_u64$1.rotr32H=_u64$1.rotlSL=_u64$1.rotlSH=_u64$1.rotlBL=_u64$1.rotlBH=_u64$1.add5L=_u64$1.add5H=_u64$1.add4L=_u64$1.add4H=_u64$1.add3L=_u64$1.add3H=void 0,_u64$1.add=ge,_u64$1.fromBig=c,_u64$1.split=y;const o=BigInt(2**32-1),g=BigInt(32);function c(ve,Fe=!1){return Fe?{h:Number(ve&o),l:Number(ve>>g&o)}:{h:Number(ve>>g&o)|0,l:Number(ve&o)|0}}function y(ve,Fe=!1){const be=ve.length;let Be=new Uint32Array(be),ke=new Uint32Array(be);for(let xe=0;xe<be;xe++){const{h:De,l:Et}=c(ve[xe],Fe);[Be[xe],ke[xe]]=[De,Et]}return[Be,ke]}const t=(ve,Fe)=>BigInt(ve>>>0)<<g|BigInt(Fe>>>0);_u64$1.toBig=t;const d=(ve,Fe,be)=>ve>>>be;_u64$1.shrSH=d;const E=(ve,Fe,be)=>ve<<32-be|Fe>>>be;_u64$1.shrSL=E;const B=(ve,Fe,be)=>ve>>>be|Fe<<32-be;_u64$1.rotrSH=B;const D=(ve,Fe,be)=>ve<<32-be|Fe>>>be;_u64$1.rotrSL=D;const x=(ve,Fe,be)=>ve<<64-be|Fe>>>be-32;_u64$1.rotrBH=x;const v=(ve,Fe,be)=>ve>>>be-32|Fe<<64-be;_u64$1.rotrBL=v;const F=(ve,Fe)=>Fe;_u64$1.rotr32H=F;const M=(ve,Fe)=>ve;_u64$1.rotr32L=M;const U=(ve,Fe,be)=>ve<<be|Fe>>>32-be;_u64$1.rotlSH=U;const L=(ve,Fe,be)=>Fe<<be|ve>>>32-be;_u64$1.rotlSL=L;const H=(ve,Fe,be)=>Fe<<be-32|ve>>>64-be;_u64$1.rotlBH=H;const fe=(ve,Fe,be)=>ve<<be-32|Fe>>>64-be;_u64$1.rotlBL=fe;function ge(ve,Fe,be,Be){const ke=(Fe>>>0)+(Be>>>0);return{h:ve+be+(ke/2**32|0)|0,l:ke|0}}const Ie=(ve,Fe,be)=>(ve>>>0)+(Fe>>>0)+(be>>>0);_u64$1.add3L=Ie;const Ee=(ve,Fe,be,Be)=>Fe+be+Be+(ve/2**32|0)|0;_u64$1.add3H=Ee;const Se=(ve,Fe,be,Be)=>(ve>>>0)+(Fe>>>0)+(be>>>0)+(Be>>>0);_u64$1.add4L=Se;const ze=(ve,Fe,be,Be,ke)=>Fe+be+Be+ke+(ve/2**32|0)|0;_u64$1.add4H=ze;const He=(ve,Fe,be,Be,ke)=>(ve>>>0)+(Fe>>>0)+(be>>>0)+(Be>>>0)+(ke>>>0);_u64$1.add5L=He;const Ne=(ve,Fe,be,Be,ke,xe)=>Fe+be+Be+ke+xe+(ve/2**32|0)|0;_u64$1.add5H=Ne;const Pe={fromBig:c,split:y,toBig:t,shrSH:d,shrSL:E,rotrSH:B,rotrSL:D,rotrBH:x,rotrBL:v,rotr32H:F,rotr32L:M,rotlSH:U,rotlSL:L,rotlBH:H,rotlBL:fe,add:ge,add3L:Ie,add3H:Ee,add4L:Se,add4H:ze,add5H:Ne,add5L:He};return _u64$1.default=Pe,_u64$1}var hasRequiredSha2;function requireSha2(){if(hasRequiredSha2)return sha2;hasRequiredSha2=1,Object.defineProperty(sha2,"__esModule",{value:!0}),sha2.sha512_224=sha2.sha512_256=sha2.sha384=sha2.sha512=sha2.sha224=sha2.sha256=sha2.SHA512_256=sha2.SHA512_224=sha2.SHA384=sha2.SHA512=sha2.SHA224=sha2.SHA256=void 0;const o=require_md$1(),g=require_u64$1(),c=requireUtils$j(),y=Uint32Array.from([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]),t=new Uint32Array(64);class d extends o.HashMD{constructor(Ee=32){super(64,Ee,8,!1),this.A=o.SHA256_IV[0]|0,this.B=o.SHA256_IV[1]|0,this.C=o.SHA256_IV[2]|0,this.D=o.SHA256_IV[3]|0,this.E=o.SHA256_IV[4]|0,this.F=o.SHA256_IV[5]|0,this.G=o.SHA256_IV[6]|0,this.H=o.SHA256_IV[7]|0}get(){const{A:Ee,B:Se,C:ze,D:He,E:Ne,F:Pe,G:ve,H:Fe}=this;return[Ee,Se,ze,He,Ne,Pe,ve,Fe]}set(Ee,Se,ze,He,Ne,Pe,ve,Fe){this.A=Ee|0,this.B=Se|0,this.C=ze|0,this.D=He|0,this.E=Ne|0,this.F=Pe|0,this.G=ve|0,this.H=Fe|0}process(Ee,Se){for(let ke=0;ke<16;ke++,Se+=4)t[ke]=Ee.getUint32(Se,!1);for(let ke=16;ke<64;ke++){const xe=t[ke-15],De=t[ke-2],Et=(0,c.rotr)(xe,7)^(0,c.rotr)(xe,18)^xe>>>3,st=(0,c.rotr)(De,17)^(0,c.rotr)(De,19)^De>>>10;t[ke]=st+t[ke-7]+Et+t[ke-16]|0}let{A:ze,B:He,C:Ne,D:Pe,E:ve,F:Fe,G:be,H:Be}=this;for(let ke=0;ke<64;ke++){const xe=(0,c.rotr)(ve,6)^(0,c.rotr)(ve,11)^(0,c.rotr)(ve,25),De=Be+xe+(0,o.Chi)(ve,Fe,be)+y[ke]+t[ke]|0,st=((0,c.rotr)(ze,2)^(0,c.rotr)(ze,13)^(0,c.rotr)(ze,22))+(0,o.Maj)(ze,He,Ne)|0;Be=be,be=Fe,Fe=ve,ve=Pe+De|0,Pe=Ne,Ne=He,He=ze,ze=De+st|0}ze=ze+this.A|0,He=He+this.B|0,Ne=Ne+this.C|0,Pe=Pe+this.D|0,ve=ve+this.E|0,Fe=Fe+this.F|0,be=be+this.G|0,Be=Be+this.H|0,this.set(ze,He,Ne,Pe,ve,Fe,be,Be)}roundClean(){(0,c.clean)(t)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,c.clean)(this.buffer)}}sha2.SHA256=d;class E extends d{constructor(){super(28),this.A=o.SHA224_IV[0]|0,this.B=o.SHA224_IV[1]|0,this.C=o.SHA224_IV[2]|0,this.D=o.SHA224_IV[3]|0,this.E=o.SHA224_IV[4]|0,this.F=o.SHA224_IV[5]|0,this.G=o.SHA224_IV[6]|0,this.H=o.SHA224_IV[7]|0}}sha2.SHA224=E;const B=g.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(Ie=>BigInt(Ie))),D=B[0],x=B[1],v=new Uint32Array(80),F=new Uint32Array(80);class M extends o.HashMD{constructor(Ee=64){super(128,Ee,16,!1),this.Ah=o.SHA512_IV[0]|0,this.Al=o.SHA512_IV[1]|0,this.Bh=o.SHA512_IV[2]|0,this.Bl=o.SHA512_IV[3]|0,this.Ch=o.SHA512_IV[4]|0,this.Cl=o.SHA512_IV[5]|0,this.Dh=o.SHA512_IV[6]|0,this.Dl=o.SHA512_IV[7]|0,this.Eh=o.SHA512_IV[8]|0,this.El=o.SHA512_IV[9]|0,this.Fh=o.SHA512_IV[10]|0,this.Fl=o.SHA512_IV[11]|0,this.Gh=o.SHA512_IV[12]|0,this.Gl=o.SHA512_IV[13]|0,this.Hh=o.SHA512_IV[14]|0,this.Hl=o.SHA512_IV[15]|0}get(){const{Ah:Ee,Al:Se,Bh:ze,Bl:He,Ch:Ne,Cl:Pe,Dh:ve,Dl:Fe,Eh:be,El:Be,Fh:ke,Fl:xe,Gh:De,Gl:Et,Hh:st,Hl:Dt}=this;return[Ee,Se,ze,He,Ne,Pe,ve,Fe,be,Be,ke,xe,De,Et,st,Dt]}set(Ee,Se,ze,He,Ne,Pe,ve,Fe,be,Be,ke,xe,De,Et,st,Dt){this.Ah=Ee|0,this.Al=Se|0,this.Bh=ze|0,this.Bl=He|0,this.Ch=Ne|0,this.Cl=Pe|0,this.Dh=ve|0,this.Dl=Fe|0,this.Eh=be|0,this.El=Be|0,this.Fh=ke|0,this.Fl=xe|0,this.Gh=De|0,this.Gl=Et|0,this.Hh=st|0,this.Hl=Dt|0}process(Ee,Se){for(let ir=0;ir<16;ir++,Se+=4)v[ir]=Ee.getUint32(Se),F[ir]=Ee.getUint32(Se+=4);for(let ir=16;ir<80;ir++){const sr=v[ir-15]|0,yr=F[ir-15]|0,wr=g.rotrSH(sr,yr,1)^g.rotrSH(sr,yr,8)^g.shrSH(sr,yr,7),qr=g.rotrSL(sr,yr,1)^g.rotrSL(sr,yr,8)^g.shrSL(sr,yr,7),Mr=v[ir-2]|0,Dr=F[ir-2]|0,Qr=g.rotrSH(Mr,Dr,19)^g.rotrBH(Mr,Dr,61)^g.shrSH(Mr,Dr,6),Xr=g.rotrSL(Mr,Dr,19)^g.rotrBL(Mr,Dr,61)^g.shrSL(Mr,Dr,6),Wr=g.add4L(qr,Xr,F[ir-7],F[ir-16]),Ur=g.add4H(Wr,wr,Qr,v[ir-7],v[ir-16]);v[ir]=Ur|0,F[ir]=Wr|0}let{Ah:ze,Al:He,Bh:Ne,Bl:Pe,Ch:ve,Cl:Fe,Dh:be,Dl:Be,Eh:ke,El:xe,Fh:De,Fl:Et,Gh:st,Gl:Dt,Hh:er,Hl:xt}=this;for(let ir=0;ir<80;ir++){const sr=g.rotrSH(ke,xe,14)^g.rotrSH(ke,xe,18)^g.rotrBH(ke,xe,41),yr=g.rotrSL(ke,xe,14)^g.rotrSL(ke,xe,18)^g.rotrBL(ke,xe,41),wr=ke&De^~ke&st,qr=xe&Et^~xe&Dt,Mr=g.add5L(xt,yr,qr,x[ir],F[ir]),Dr=g.add5H(Mr,er,sr,wr,D[ir],v[ir]),Qr=Mr|0,Xr=g.rotrSH(ze,He,28)^g.rotrBH(ze,He,34)^g.rotrBH(ze,He,39),Wr=g.rotrSL(ze,He,28)^g.rotrBL(ze,He,34)^g.rotrBL(ze,He,39),Ur=ze&Ne^ze&ve^Ne&ve,Sr=He&Pe^He&Fe^Pe&Fe;er=st|0,xt=Dt|0,st=De|0,Dt=Et|0,De=ke|0,Et=xe|0,{h:ke,l:xe}=g.add(be|0,Be|0,Dr|0,Qr|0),be=ve|0,Be=Fe|0,ve=Ne|0,Fe=Pe|0,Ne=ze|0,Pe=He|0;const Gr=g.add3L(Qr,Wr,Sr);ze=g.add3H(Gr,Dr,Xr,Ur),He=Gr|0}({h:ze,l:He}=g.add(this.Ah|0,this.Al|0,ze|0,He|0)),{h:Ne,l:Pe}=g.add(this.Bh|0,this.Bl|0,Ne|0,Pe|0),{h:ve,l:Fe}=g.add(this.Ch|0,this.Cl|0,ve|0,Fe|0),{h:be,l:Be}=g.add(this.Dh|0,this.Dl|0,be|0,Be|0),{h:ke,l:xe}=g.add(this.Eh|0,this.El|0,ke|0,xe|0),{h:De,l:Et}=g.add(this.Fh|0,this.Fl|0,De|0,Et|0),{h:st,l:Dt}=g.add(this.Gh|0,this.Gl|0,st|0,Dt|0),{h:er,l:xt}=g.add(this.Hh|0,this.Hl|0,er|0,xt|0),this.set(ze,He,Ne,Pe,ve,Fe,be,Be,ke,xe,De,Et,st,Dt,er,xt)}roundClean(){(0,c.clean)(v,F)}destroy(){(0,c.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}sha2.SHA512=M;class U extends M{constructor(){super(48),this.Ah=o.SHA384_IV[0]|0,this.Al=o.SHA384_IV[1]|0,this.Bh=o.SHA384_IV[2]|0,this.Bl=o.SHA384_IV[3]|0,this.Ch=o.SHA384_IV[4]|0,this.Cl=o.SHA384_IV[5]|0,this.Dh=o.SHA384_IV[6]|0,this.Dl=o.SHA384_IV[7]|0,this.Eh=o.SHA384_IV[8]|0,this.El=o.SHA384_IV[9]|0,this.Fh=o.SHA384_IV[10]|0,this.Fl=o.SHA384_IV[11]|0,this.Gh=o.SHA384_IV[12]|0,this.Gl=o.SHA384_IV[13]|0,this.Hh=o.SHA384_IV[14]|0,this.Hl=o.SHA384_IV[15]|0}}sha2.SHA384=U;const L=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),H=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class fe extends M{constructor(){super(28),this.Ah=L[0]|0,this.Al=L[1]|0,this.Bh=L[2]|0,this.Bl=L[3]|0,this.Ch=L[4]|0,this.Cl=L[5]|0,this.Dh=L[6]|0,this.Dl=L[7]|0,this.Eh=L[8]|0,this.El=L[9]|0,this.Fh=L[10]|0,this.Fl=L[11]|0,this.Gh=L[12]|0,this.Gl=L[13]|0,this.Hh=L[14]|0,this.Hl=L[15]|0}}sha2.SHA512_224=fe;class ge extends M{constructor(){super(32),this.Ah=H[0]|0,this.Al=H[1]|0,this.Bh=H[2]|0,this.Bl=H[3]|0,this.Ch=H[4]|0,this.Cl=H[5]|0,this.Dh=H[6]|0,this.Dl=H[7]|0,this.Eh=H[8]|0,this.El=H[9]|0,this.Fh=H[10]|0,this.Fl=H[11]|0,this.Gh=H[12]|0,this.Gl=H[13]|0,this.Hh=H[14]|0,this.Hl=H[15]|0}}return sha2.SHA512_256=ge,sha2.sha256=(0,c.createHasher)(()=>new d),sha2.sha224=(0,c.createHasher)(()=>new E),sha2.sha512=(0,c.createHasher)(()=>new M),sha2.sha384=(0,c.createHasher)(()=>new U),sha2.sha512_256=(0,c.createHasher)(()=>new ge),sha2.sha512_224=(0,c.createHasher)(()=>new fe),sha2}var _shortw_utils$1={},weierstrass$3={},hmac$5={},hasRequiredHmac$3;function requireHmac$3(){return hasRequiredHmac$3||(hasRequiredHmac$3=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.hmac=o.HMAC=void 0;const g=requireUtils$j();class c extends g.Hash{constructor(d,E){super(),this.finished=!1,this.destroyed=!1,(0,g.ahash)(d);const B=(0,g.toBytes)(E);if(this.iHash=d.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const D=this.blockLen,x=new Uint8Array(D);x.set(B.length>D?d.create().update(B).digest():B);for(let v=0;v<x.length;v++)x[v]^=54;this.iHash.update(x),this.oHash=d.create();for(let v=0;v<x.length;v++)x[v]^=106;this.oHash.update(x),(0,g.clean)(x)}update(d){return(0,g.aexists)(this),this.iHash.update(d),this}digestInto(d){(0,g.aexists)(this),(0,g.abytes)(d,this.outputLen),this.finished=!0,this.iHash.digestInto(d),this.oHash.update(d),this.oHash.digestInto(d),this.destroy()}digest(){const d=new Uint8Array(this.oHash.outputLen);return this.digestInto(d),d}_cloneInto(d){d||(d=Object.create(Object.getPrototypeOf(this),{}));const{oHash:E,iHash:B,finished:D,destroyed:x,blockLen:v,outputLen:F}=this;return d=d,d.finished=D,d.destroyed=x,d.blockLen=v,d.outputLen=F,d.oHash=E._cloneInto(d.oHash),d.iHash=B._cloneInto(d.iHash),d}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}o.HMAC=c;const y=(t,d,E)=>new c(t,d).update(E).digest();o.hmac=y,o.hmac.create=(t,d)=>new c(t,d)}(hmac$5)),hmac$5}var utils$k={},hasRequiredUtils$i;function requireUtils$i(){return hasRequiredUtils$i||(hasRequiredUtils$i=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.notImplemented=o.bitMask=o.utf8ToBytes=o.randomBytes=o.isBytes=o.hexToBytes=o.concatBytes=o.bytesToUtf8=o.bytesToHex=o.anumber=o.abytes=void 0,o.abool=d,o._abool2=E,o._abytes2=B,o.numberToHexUnpadded=D,o.hexToNumber=x,o.bytesToNumberBE=v,o.bytesToNumberLE=F,o.numberToBytesBE=M,o.numberToBytesLE=U,o.numberToVarBytesBE=L,o.ensureBytes=H,o.equalBytes=fe,o.copyBytes=ge,o.asciiToBytes=Ie,o.inRange=Se,o.aInRange=ze,o.bitLen=He,o.bitGet=Ne,o.bitSet=Pe,o.createHmacDrbg=Fe,o.validateObject=Be,o.isHash=ke,o._validateObject=xe,o.memoized=Et;const g=requireUtils$j();var c=requireUtils$j();Object.defineProperty(o,"abytes",{enumerable:!0,get:function(){return c.abytes}}),Object.defineProperty(o,"anumber",{enumerable:!0,get:function(){return c.anumber}}),Object.defineProperty(o,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(o,"bytesToUtf8",{enumerable:!0,get:function(){return c.bytesToUtf8}}),Object.defineProperty(o,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(o,"hexToBytes",{enumerable:!0,get:function(){return c.hexToBytes}}),Object.defineProperty(o,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(o,"randomBytes",{enumerable:!0,get:function(){return c.randomBytes}}),Object.defineProperty(o,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});const y=BigInt(0),t=BigInt(1);function d(st,Dt){if(typeof Dt!="boolean")throw new Error(st+" boolean expected, got "+Dt)}function E(st,Dt=""){if(typeof st!="boolean"){const er=Dt&&`"${Dt}"`;throw new Error(er+"expected boolean, got type="+typeof st)}return st}function B(st,Dt,er=""){const xt=(0,g.isBytes)(st),ir=st==null?void 0:st.length,sr=Dt!==void 0;if(!xt||sr&&ir!==Dt){const yr=er&&`"${er}" `,wr=sr?` of length ${Dt}`:"",qr=xt?`length=${ir}`:`type=${typeof st}`;throw new Error(yr+"expected Uint8Array"+wr+", got "+qr)}return st}function D(st){const Dt=st.toString(16);return Dt.length&1?"0"+Dt:Dt}function x(st){if(typeof st!="string")throw new Error("hex string expected, got "+typeof st);return st===""?y:BigInt("0x"+st)}function v(st){return x((0,g.bytesToHex)(st))}function F(st){return(0,g.abytes)(st),x((0,g.bytesToHex)(Uint8Array.from(st).reverse()))}function M(st,Dt){return(0,g.hexToBytes)(st.toString(16).padStart(Dt*2,"0"))}function U(st,Dt){return M(st,Dt).reverse()}function L(st){return(0,g.hexToBytes)(D(st))}function H(st,Dt,er){let xt;if(typeof Dt=="string")try{xt=(0,g.hexToBytes)(Dt)}catch(sr){throw new Error(st+" must be hex string or Uint8Array, cause: "+sr)}else if((0,g.isBytes)(Dt))xt=Uint8Array.from(Dt);else throw new Error(st+" must be hex string or Uint8Array");const ir=xt.length;if(typeof er=="number"&&ir!==er)throw new Error(st+" of length "+er+" expected, got "+ir);return xt}function fe(st,Dt){if(st.length!==Dt.length)return!1;let er=0;for(let xt=0;xt<st.length;xt++)er|=st[xt]^Dt[xt];return er===0}function ge(st){return Uint8Array.from(st)}function Ie(st){return Uint8Array.from(st,(Dt,er)=>{const xt=Dt.charCodeAt(0);if(Dt.length!==1||xt>127)throw new Error(`string contains non-ASCII character "${st[er]}" with code ${xt} at position ${er}`);return xt})}const Ee=st=>typeof st=="bigint"&&y<=st;function Se(st,Dt,er){return Ee(st)&&Ee(Dt)&&Ee(er)&&Dt<=st&&st<er}function ze(st,Dt,er,xt){if(!Se(Dt,er,xt))throw new Error("expected valid "+st+": "+er+" <= n < "+xt+", got "+Dt)}function He(st){let Dt;for(Dt=0;st>y;st>>=t,Dt+=1);return Dt}function Ne(st,Dt){return st>>BigInt(Dt)&t}function Pe(st,Dt,er){return st|(er?t:y)<<BigInt(Dt)}const ve=st=>(t<<BigInt(st))-t;o.bitMask=ve;function Fe(st,Dt,er){if(typeof st!="number"||st<2)throw new Error("hashLen must be a number");if(typeof Dt!="number"||Dt<2)throw new Error("qByteLen must be a number");if(typeof er!="function")throw new Error("hmacFn must be a function");const xt=Wr=>new Uint8Array(Wr),ir=Wr=>Uint8Array.of(Wr);let sr=xt(st),yr=xt(st),wr=0;const qr=()=>{sr.fill(1),yr.fill(0),wr=0},Mr=(...Wr)=>er(yr,sr,...Wr),Dr=(Wr=xt(0))=>{yr=Mr(ir(0),Wr),sr=Mr(),Wr.length!==0&&(yr=Mr(ir(1),Wr),sr=Mr())},Qr=()=>{if(wr++>=1e3)throw new Error("drbg: tried 1000 values");let Wr=0;const Ur=[];for(;Wr<Dt;){sr=Mr();const Sr=sr.slice();Ur.push(Sr),Wr+=sr.length}return(0,g.concatBytes)(...Ur)};return(Wr,Ur)=>{qr(),Dr(Wr);let Sr;for(;!(Sr=Ur(Qr()));)Dr();return qr(),Sr}}const be={bigint:st=>typeof st=="bigint",function:st=>typeof st=="function",boolean:st=>typeof st=="boolean",string:st=>typeof st=="string",stringOrUint8Array:st=>typeof st=="string"||(0,g.isBytes)(st),isSafeInteger:st=>Number.isSafeInteger(st),array:st=>Array.isArray(st),field:(st,Dt)=>Dt.Fp.isValid(st),hash:st=>typeof st=="function"&&Number.isSafeInteger(st.outputLen)};function Be(st,Dt,er={}){const xt=(ir,sr,yr)=>{const wr=be[sr];if(typeof wr!="function")throw new Error("invalid validator function");const qr=st[ir];if(!(yr&&qr===void 0)&&!wr(qr,st))throw new Error("param "+String(ir)+" is invalid. Expected "+sr+", got "+qr)};for(const[ir,sr]of Object.entries(Dt))xt(ir,sr,!1);for(const[ir,sr]of Object.entries(er))xt(ir,sr,!0);return st}function ke(st){return typeof st=="function"&&Number.isSafeInteger(st.outputLen)}function xe(st,Dt,er={}){if(!st||typeof st!="object")throw new Error("expected valid options object");function xt(ir,sr,yr){const wr=st[ir];if(yr&&wr===void 0)return;const qr=typeof wr;if(qr!==sr||wr===null)throw new Error(`param "${ir}" is invalid: expected ${sr}, got ${qr}`)}Object.entries(Dt).forEach(([ir,sr])=>xt(ir,sr,!1)),Object.entries(er).forEach(([ir,sr])=>xt(ir,sr,!0))}const De=()=>{throw new Error("not implemented")};o.notImplemented=De;function Et(st){const Dt=new WeakMap;return(er,...xt)=>{const ir=Dt.get(er);if(ir!==void 0)return ir;const sr=st(er,...xt);return Dt.set(er,sr),sr}}}(utils$k)),utils$k}var curve$2={},modular$1={},hasRequiredModular$1;function requireModular$1(){if(hasRequiredModular$1)return modular$1;hasRequiredModular$1=1,Object.defineProperty(modular$1,"__esModule",{value:!0}),modular$1.isNegativeLE=void 0,modular$1.mod=F,modular$1.pow=M,modular$1.pow2=U,modular$1.invert=L,modular$1.tonelliShanks=Ee,modular$1.FpSqrt=Se,modular$1.validateField=Ne,modular$1.FpPow=Pe,modular$1.FpInvertBatch=ve,modular$1.FpDiv=Fe,modular$1.FpLegendre=be,modular$1.FpIsSquare=Be,modular$1.nLength=ke,modular$1.Field=xe,modular$1.FpSqrtOdd=De,modular$1.FpSqrtEven=Et,modular$1.hashToPrivateScalar=st,modular$1.getFieldBytesLength=Dt,modular$1.getMinHashLength=er,modular$1.mapHashToField=xt;const o=requireUtils$i(),g=BigInt(0),c=BigInt(1),y=BigInt(2),t=BigInt(3),d=BigInt(4),E=BigInt(5),B=BigInt(7),D=BigInt(8),x=BigInt(9),v=BigInt(16);function F(ir,sr){const yr=ir%sr;return yr>=g?yr:sr+yr}function M(ir,sr,yr){return Pe(xe(yr),ir,sr)}function U(ir,sr,yr){let wr=ir;for(;sr-- >g;)wr*=wr,wr%=yr;return wr}function L(ir,sr){if(ir===g)throw new Error("invert: expected non-zero number");if(sr<=g)throw new Error("invert: expected positive modulus, got "+sr);let yr=F(ir,sr),wr=sr,qr=g,Mr=c;for(;yr!==g;){const Qr=wr/yr,Xr=wr%yr,Wr=qr-Mr*Qr;wr=yr,yr=Xr,qr=Mr,Mr=Wr}if(wr!==c)throw new Error("invert: does not exist");return F(qr,sr)}function H(ir,sr,yr){if(!ir.eql(ir.sqr(sr),yr))throw new Error("Cannot find square root")}function fe(ir,sr){const yr=(ir.ORDER+c)/d,wr=ir.pow(sr,yr);return H(ir,wr,sr),wr}function ge(ir,sr){const yr=(ir.ORDER-E)/D,wr=ir.mul(sr,y),qr=ir.pow(wr,yr),Mr=ir.mul(sr,qr),Dr=ir.mul(ir.mul(Mr,y),qr),Qr=ir.mul(Mr,ir.sub(Dr,ir.ONE));return H(ir,Qr,sr),Qr}function Ie(ir){const sr=xe(ir),yr=Ee(ir),wr=yr(sr,sr.neg(sr.ONE)),qr=yr(sr,wr),Mr=yr(sr,sr.neg(wr)),Dr=(ir+B)/v;return(Qr,Xr)=>{let Wr=Qr.pow(Xr,Dr),Ur=Qr.mul(Wr,wr);const Sr=Qr.mul(Wr,qr),Gr=Qr.mul(Wr,Mr),Fr=Qr.eql(Qr.sqr(Ur),Xr),br=Qr.eql(Qr.sqr(Sr),Xr);Wr=Qr.cmov(Wr,Ur,Fr),Ur=Qr.cmov(Gr,Sr,br);const Ar=Qr.eql(Qr.sqr(Ur),Xr),cr=Qr.cmov(Wr,Ur,Ar);return H(Qr,cr,Xr),cr}}function Ee(ir){if(ir<t)throw new Error("sqrt is not defined for small field");let sr=ir-c,yr=0;for(;sr%y===g;)sr/=y,yr++;let wr=y;const qr=xe(ir);for(;be(qr,wr)===1;)if(wr++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(yr===1)return fe;let Mr=qr.pow(wr,sr);const Dr=(sr+c)/y;return function(Xr,Wr){if(Xr.is0(Wr))return Wr;if(be(Xr,Wr)!==1)throw new Error("Cannot find square root");let Ur=yr,Sr=Xr.mul(Xr.ONE,Mr),Gr=Xr.pow(Wr,sr),Fr=Xr.pow(Wr,Dr);for(;!Xr.eql(Gr,Xr.ONE);){if(Xr.is0(Gr))return Xr.ZERO;let br=1,Ar=Xr.sqr(Gr);for(;!Xr.eql(Ar,Xr.ONE);)if(br++,Ar=Xr.sqr(Ar),br===Ur)throw new Error("Cannot find square root");const cr=c<<BigInt(Ur-br-1),hr=Xr.pow(Sr,cr);Ur=br,Sr=Xr.sqr(hr),Gr=Xr.mul(Gr,Sr),Fr=Xr.mul(Fr,hr)}return Fr}}function Se(ir){return ir%d===t?fe:ir%D===E?ge:ir%v===x?Ie(ir):Ee(ir)}const ze=(ir,sr)=>(F(ir,sr)&c)===c;modular$1.isNegativeLE=ze;const He=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Ne(ir){const sr={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},yr=He.reduce((wr,qr)=>(wr[qr]="function",wr),sr);return(0,o._validateObject)(ir,yr),ir}function Pe(ir,sr,yr){if(yr<g)throw new Error("invalid exponent, negatives unsupported");if(yr===g)return ir.ONE;if(yr===c)return sr;let wr=ir.ONE,qr=sr;for(;yr>g;)yr&c&&(wr=ir.mul(wr,qr)),qr=ir.sqr(qr),yr>>=c;return wr}function ve(ir,sr,yr=!1){const wr=new Array(sr.length).fill(yr?ir.ZERO:void 0),qr=sr.reduce((Dr,Qr,Xr)=>ir.is0(Qr)?Dr:(wr[Xr]=Dr,ir.mul(Dr,Qr)),ir.ONE),Mr=ir.inv(qr);return sr.reduceRight((Dr,Qr,Xr)=>ir.is0(Qr)?Dr:(wr[Xr]=ir.mul(Dr,wr[Xr]),ir.mul(Dr,Qr)),Mr),wr}function Fe(ir,sr,yr){return ir.mul(sr,typeof yr=="bigint"?L(yr,ir.ORDER):ir.inv(yr))}function be(ir,sr){const yr=(ir.ORDER-c)/y,wr=ir.pow(sr,yr),qr=ir.eql(wr,ir.ONE),Mr=ir.eql(wr,ir.ZERO),Dr=ir.eql(wr,ir.neg(ir.ONE));if(!qr&&!Mr&&!Dr)throw new Error("invalid Legendre symbol result");return qr?1:Mr?0:-1}function Be(ir,sr){return be(ir,sr)===1}function ke(ir,sr){sr!==void 0&&(0,o.anumber)(sr);const yr=sr!==void 0?sr:ir.toString(2).length,wr=Math.ceil(yr/8);return{nBitLength:yr,nByteLength:wr}}function xe(ir,sr,yr=!1,wr={}){if(ir<=g)throw new Error("invalid field: expected ORDER > 0, got "+ir);let qr,Mr,Dr=!1,Qr;if(typeof sr=="object"&&sr!=null){if(wr.sqrt||yr)throw new Error("cannot specify opts in two arguments");const Gr=sr;Gr.BITS&&(qr=Gr.BITS),Gr.sqrt&&(Mr=Gr.sqrt),typeof Gr.isLE=="boolean"&&(yr=Gr.isLE),typeof Gr.modFromBytes=="boolean"&&(Dr=Gr.modFromBytes),Qr=Gr.allowedLengths}else typeof sr=="number"&&(qr=sr),wr.sqrt&&(Mr=wr.sqrt);const{nBitLength:Xr,nByteLength:Wr}=ke(ir,qr);if(Wr>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let Ur;const Sr=Object.freeze({ORDER:ir,isLE:yr,BITS:Xr,BYTES:Wr,MASK:(0,o.bitMask)(Xr),ZERO:g,ONE:c,allowedLengths:Qr,create:Gr=>F(Gr,ir),isValid:Gr=>{if(typeof Gr!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof Gr);return g<=Gr&&Gr<ir},is0:Gr=>Gr===g,isValidNot0:Gr=>!Sr.is0(Gr)&&Sr.isValid(Gr),isOdd:Gr=>(Gr&c)===c,neg:Gr=>F(-Gr,ir),eql:(Gr,Fr)=>Gr===Fr,sqr:Gr=>F(Gr*Gr,ir),add:(Gr,Fr)=>F(Gr+Fr,ir),sub:(Gr,Fr)=>F(Gr-Fr,ir),mul:(Gr,Fr)=>F(Gr*Fr,ir),pow:(Gr,Fr)=>Pe(Sr,Gr,Fr),div:(Gr,Fr)=>F(Gr*L(Fr,ir),ir),sqrN:Gr=>Gr*Gr,addN:(Gr,Fr)=>Gr+Fr,subN:(Gr,Fr)=>Gr-Fr,mulN:(Gr,Fr)=>Gr*Fr,inv:Gr=>L(Gr,ir),sqrt:Mr||(Gr=>(Ur||(Ur=Se(ir)),Ur(Sr,Gr))),toBytes:Gr=>yr?(0,o.numberToBytesLE)(Gr,Wr):(0,o.numberToBytesBE)(Gr,Wr),fromBytes:(Gr,Fr=!0)=>{if(Qr){if(!Qr.includes(Gr.length)||Gr.length>Wr)throw new Error("Field.fromBytes: expected "+Qr+" bytes, got "+Gr.length);const Ar=new Uint8Array(Wr);Ar.set(Gr,yr?0:Ar.length-Gr.length),Gr=Ar}if(Gr.length!==Wr)throw new Error("Field.fromBytes: expected "+Wr+" bytes, got "+Gr.length);let br=yr?(0,o.bytesToNumberLE)(Gr):(0,o.bytesToNumberBE)(Gr);if(Dr&&(br=F(br,ir)),!Fr&&!Sr.isValid(br))throw new Error("invalid field element: outside of range 0..ORDER");return br},invertBatch:Gr=>ve(Sr,Gr),cmov:(Gr,Fr,br)=>br?Fr:Gr});return Object.freeze(Sr)}function De(ir,sr){if(!ir.isOdd)throw new Error("Field doesn't have isOdd");const yr=ir.sqrt(sr);return ir.isOdd(yr)?yr:ir.neg(yr)}function Et(ir,sr){if(!ir.isOdd)throw new Error("Field doesn't have isOdd");const yr=ir.sqrt(sr);return ir.isOdd(yr)?ir.neg(yr):yr}function st(ir,sr,yr=!1){ir=(0,o.ensureBytes)("privateHash",ir);const wr=ir.length,qr=ke(sr).nByteLength+8;if(qr<24||wr<qr||wr>1024)throw new Error("hashToPrivateScalar: expected "+qr+"-1024 bytes of input, got "+wr);const Mr=yr?(0,o.bytesToNumberLE)(ir):(0,o.bytesToNumberBE)(ir);return F(Mr,sr-c)+c}function Dt(ir){if(typeof ir!="bigint")throw new Error("field order must be bigint");const sr=ir.toString(2).length;return Math.ceil(sr/8)}function er(ir){const sr=Dt(ir);return sr+Math.ceil(sr/2)}function xt(ir,sr,yr=!1){const wr=ir.length,qr=Dt(sr),Mr=er(sr);if(wr<16||wr<Mr||wr>1024)throw new Error("expected "+Mr+"-1024 bytes of input, got "+wr);const Dr=yr?(0,o.bytesToNumberLE)(ir):(0,o.bytesToNumberBE)(ir),Qr=F(Dr,sr-c)+c;return yr?(0,o.numberToBytesLE)(Qr,qr):(0,o.numberToBytesBE)(Qr,qr)}return modular$1}var hasRequiredCurve$2;function requireCurve$2(){if(hasRequiredCurve$2)return curve$2;hasRequiredCurve$2=1,Object.defineProperty(curve$2,"__esModule",{value:!0}),curve$2.wNAF=void 0,curve$2.negateCt=t,curve$2.normalizeZ=d,curve$2.mulEndoUnsafe=fe,curve$2.pippenger=ge,curve$2.precomputeMSMUnsafe=Ie,curve$2.validateBasic=Ee,curve$2._createCurveFields=ze;const o=requireUtils$i(),g=requireModular$1(),c=BigInt(0),y=BigInt(1);function t(He,Ne){const Pe=Ne.negate();return He?Pe:Ne}function d(He,Ne){const Pe=(0,g.FpInvertBatch)(He.Fp,Ne.map(ve=>ve.Z));return Ne.map((ve,Fe)=>He.fromAffine(ve.toAffine(Pe[Fe])))}function E(He,Ne){if(!Number.isSafeInteger(He)||He<=0||He>Ne)throw new Error("invalid window size, expected [1.."+Ne+"], got W="+He)}function B(He,Ne){E(He,Ne);const Pe=Math.ceil(Ne/He)+1,ve=2**(He-1),Fe=2**He,be=(0,o.bitMask)(He),Be=BigInt(He);return{windows:Pe,windowSize:ve,mask:be,maxNumber:Fe,shiftBy:Be}}function D(He,Ne,Pe){const{windowSize:ve,mask:Fe,maxNumber:be,shiftBy:Be}=Pe;let ke=Number(He&Fe),xe=He>>Be;ke>ve&&(ke-=be,xe+=y);const De=Ne*ve,Et=De+Math.abs(ke)-1,st=ke===0,Dt=ke<0,er=Ne%2!==0;return{nextN:xe,offset:Et,isZero:st,isNeg:Dt,isNegF:er,offsetF:De}}function x(He,Ne){if(!Array.isArray(He))throw new Error("array expected");He.forEach((Pe,ve)=>{if(!(Pe instanceof Ne))throw new Error("invalid point at index "+ve)})}function v(He,Ne){if(!Array.isArray(He))throw new Error("array of scalars expected");He.forEach((Pe,ve)=>{if(!Ne.isValid(Pe))throw new Error("invalid scalar at index "+ve)})}const F=new WeakMap,M=new WeakMap;function U(He){return M.get(He)||1}function L(He){if(He!==c)throw new Error("invalid wNAF")}class H{constructor(Ne,Pe){this.BASE=Ne.BASE,this.ZERO=Ne.ZERO,this.Fn=Ne.Fn,this.bits=Pe}_unsafeLadder(Ne,Pe,ve=this.ZERO){let Fe=Ne;for(;Pe>c;)Pe&y&&(ve=ve.add(Fe)),Fe=Fe.double(),Pe>>=y;return ve}precomputeWindow(Ne,Pe){const{windows:ve,windowSize:Fe}=B(Pe,this.bits),be=[];let Be=Ne,ke=Be;for(let xe=0;xe<ve;xe++){ke=Be,be.push(ke);for(let De=1;De<Fe;De++)ke=ke.add(Be),be.push(ke);Be=ke.double()}return be}wNAF(Ne,Pe,ve){if(!this.Fn.isValid(ve))throw new Error("invalid scalar");let Fe=this.ZERO,be=this.BASE;const Be=B(Ne,this.bits);for(let ke=0;ke<Be.windows;ke++){const{nextN:xe,offset:De,isZero:Et,isNeg:st,isNegF:Dt,offsetF:er}=D(ve,ke,Be);ve=xe,Et?be=be.add(t(Dt,Pe[er])):Fe=Fe.add(t(st,Pe[De]))}return L(ve),{p:Fe,f:be}}wNAFUnsafe(Ne,Pe,ve,Fe=this.ZERO){const be=B(Ne,this.bits);for(let Be=0;Be<be.windows&&ve!==c;Be++){const{nextN:ke,offset:xe,isZero:De,isNeg:Et}=D(ve,Be,be);if(ve=ke,!De){const st=Pe[xe];Fe=Fe.add(Et?st.negate():st)}}return L(ve),Fe}getPrecomputes(Ne,Pe,ve){let Fe=F.get(Pe);return Fe||(Fe=this.precomputeWindow(Pe,Ne),Ne!==1&&(typeof ve=="function"&&(Fe=ve(Fe)),F.set(Pe,Fe))),Fe}cached(Ne,Pe,ve){const Fe=U(Ne);return this.wNAF(Fe,this.getPrecomputes(Fe,Ne,ve),Pe)}unsafe(Ne,Pe,ve,Fe){const be=U(Ne);return be===1?this._unsafeLadder(Ne,Pe,Fe):this.wNAFUnsafe(be,this.getPrecomputes(be,Ne,ve),Pe,Fe)}createCache(Ne,Pe){E(Pe,this.bits),M.set(Ne,Pe),F.delete(Ne)}hasCache(Ne){return U(Ne)!==1}}curve$2.wNAF=H;function fe(He,Ne,Pe,ve){let Fe=Ne,be=He.ZERO,Be=He.ZERO;for(;Pe>c||ve>c;)Pe&y&&(be=be.add(Fe)),ve&y&&(Be=Be.add(Fe)),Fe=Fe.double(),Pe>>=y,ve>>=y;return{p1:be,p2:Be}}function ge(He,Ne,Pe,ve){x(Pe,He),v(ve,Ne);const Fe=Pe.length,be=ve.length;if(Fe!==be)throw new Error("arrays of points and scalars must have equal length");const Be=He.ZERO,ke=(0,o.bitLen)(BigInt(Fe));let xe=1;ke>12?xe=ke-3:ke>4?xe=ke-2:ke>0&&(xe=2);const De=(0,o.bitMask)(xe),Et=new Array(Number(De)+1).fill(Be),st=Math.floor((Ne.BITS-1)/xe)*xe;let Dt=Be;for(let er=st;er>=0;er-=xe){Et.fill(Be);for(let ir=0;ir<be;ir++){const sr=ve[ir],yr=Number(sr>>BigInt(er)&De);Et[yr]=Et[yr].add(Pe[ir])}let xt=Be;for(let ir=Et.length-1,sr=Be;ir>0;ir--)sr=sr.add(Et[ir]),xt=xt.add(sr);if(Dt=Dt.add(xt),er!==0)for(let ir=0;ir<xe;ir++)Dt=Dt.double()}return Dt}function Ie(He,Ne,Pe,ve){E(ve,Ne.BITS),x(Pe,He);const Fe=He.ZERO,be=2**ve-1,Be=Math.ceil(Ne.BITS/ve),ke=(0,o.bitMask)(ve),xe=Pe.map(De=>{const Et=[];for(let st=0,Dt=De;st<be;st++)Et.push(Dt),Dt=Dt.add(De);return Et});return De=>{if(v(De,Ne),De.length>Pe.length)throw new Error("array of scalars must be smaller than array of points");let Et=Fe;for(let st=0;st<Be;st++){if(Et!==Fe)for(let er=0;er<ve;er++)Et=Et.double();const Dt=BigInt(Be*ve-(st+1)*ve);for(let er=0;er<De.length;er++){const xt=De[er],ir=Number(xt>>Dt&ke);ir&&(Et=Et.add(xe[er][ir-1]))}}return Et}}function Ee(He){return(0,g.validateField)(He.Fp),(0,o.validateObject)(He,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,g.nLength)(He.n,He.nBitLength),...He,p:He.Fp.ORDER})}function Se(He,Ne,Pe){if(Ne){if(Ne.ORDER!==He)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,g.validateField)(Ne),Ne}else return(0,g.Field)(He,{isLE:Pe})}function ze(He,Ne,Pe={},ve){if(ve===void 0&&(ve=He==="edwards"),!Ne||typeof Ne!="object")throw new Error(`expected valid ${He} CURVE object`);for(const xe of["p","n","h"]){const De=Ne[xe];if(!(typeof De=="bigint"&&De>c))throw new Error(`CURVE.${xe} must be positive bigint`)}const Fe=Se(Ne.p,Pe.Fp,ve),be=Se(Ne.n,Pe.Fn,ve),ke=["Gx","Gy","a",He==="weierstrass"?"b":"d"];for(const xe of ke)if(!Fe.isValid(Ne[xe]))throw new Error(`CURVE.${xe} must be valid field element of CURVE.Fp`);return Ne=Object.freeze(Object.assign({},Ne)),{CURVE:Ne,Fp:Fe,Fn:be}}return curve$2}var hasRequiredWeierstrass$1;function requireWeierstrass$1(){return hasRequiredWeierstrass$1||(hasRequiredWeierstrass$1=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.DER=o.DERErr=void 0,o._splitEndoScalar=B,o._normFnElement=fe,o.weierstrassN=ge,o.SWUFpSqrtRatio=Ee,o.mapToCurveSimpleSWU=Se,o.ecdh=He,o.ecdsa=Ne,o.weierstrassPoints=Pe,o._legacyHelperEquat=be,o.weierstrass=xe;const g=requireHmac$3(),c=requireUtils$j(),y=requireUtils$i(),t=requireCurve$2(),d=requireModular$1(),E=(De,Et)=>(De+(De>=0?Et:-Et)/U)/Et;function B(De,Et,st){const[[Dt,er],[xt,ir]]=Et,sr=E(ir*De,st),yr=E(-er*De,st);let wr=De-sr*Dt-yr*xt,qr=-sr*er-yr*ir;const Mr=wr<F,Dr=qr<F;Mr&&(wr=-wr),Dr&&(qr=-qr);const Qr=(0,y.bitMask)(Math.ceil((0,y.bitLen)(st)/2))+M;if(wr<F||wr>=Qr||qr<F||qr>=Qr)throw new Error("splitScalar (endomorphism): failed, k="+De);return{k1neg:Mr,k1:wr,k2neg:Dr,k2:qr}}function D(De){if(!["compact","recovered","der"].includes(De))throw new Error('Signature format must be "compact", "recovered", or "der"');return De}function x(De,Et){const st={};for(let Dt of Object.keys(Et))st[Dt]=De[Dt]===void 0?Et[Dt]:De[Dt];return(0,y._abool2)(st.lowS,"lowS"),(0,y._abool2)(st.prehash,"prehash"),st.format!==void 0&&D(st.format),st}class v extends Error{constructor(Et=""){super(Et)}}o.DERErr=v,o.DER={Err:v,_tlv:{encode:(De,Et)=>{const{Err:st}=o.DER;if(De<0||De>256)throw new st("tlv.encode: wrong tag");if(Et.length&1)throw new st("tlv.encode: unpadded data");const Dt=Et.length/2,er=(0,y.numberToHexUnpadded)(Dt);if(er.length/2&128)throw new st("tlv.encode: long form length too big");const xt=Dt>127?(0,y.numberToHexUnpadded)(er.length/2|128):"";return(0,y.numberToHexUnpadded)(De)+xt+er+Et},decode(De,Et){const{Err:st}=o.DER;let Dt=0;if(De<0||De>256)throw new st("tlv.encode: wrong tag");if(Et.length<2||Et[Dt++]!==De)throw new st("tlv.decode: wrong tlv");const er=Et[Dt++],xt=!!(er&128);let ir=0;if(!xt)ir=er;else{const yr=er&127;if(!yr)throw new st("tlv.decode(long): indefinite length not supported");if(yr>4)throw new st("tlv.decode(long): byte length is too big");const wr=Et.subarray(Dt,Dt+yr);if(wr.length!==yr)throw new st("tlv.decode: length bytes not complete");if(wr[0]===0)throw new st("tlv.decode(long): zero leftmost byte");for(const qr of wr)ir=ir<<8|qr;if(Dt+=yr,ir<128)throw new st("tlv.decode(long): not minimal encoding")}const sr=Et.subarray(Dt,Dt+ir);if(sr.length!==ir)throw new st("tlv.decode: wrong value length");return{v:sr,l:Et.subarray(Dt+ir)}}},_int:{encode(De){const{Err:Et}=o.DER;if(De<F)throw new Et("integer: negative integers are not allowed");let st=(0,y.numberToHexUnpadded)(De);if(Number.parseInt(st[0],16)&8&&(st="00"+st),st.length&1)throw new Et("unexpected DER parsing assertion: unpadded hex");return st},decode(De){const{Err:Et}=o.DER;if(De[0]&128)throw new Et("invalid signature integer: negative");if(De[0]===0&&!(De[1]&128))throw new Et("invalid signature integer: unnecessary leading zero");return(0,y.bytesToNumberBE)(De)}},toSig(De){const{Err:Et,_int:st,_tlv:Dt}=o.DER,er=(0,y.ensureBytes)("signature",De),{v:xt,l:ir}=Dt.decode(48,er);if(ir.length)throw new Et("invalid signature: left bytes after parsing");const{v:sr,l:yr}=Dt.decode(2,xt),{v:wr,l:qr}=Dt.decode(2,yr);if(qr.length)throw new Et("invalid signature: left bytes after parsing");return{r:st.decode(sr),s:st.decode(wr)}},hexFromSig(De){const{_tlv:Et,_int:st}=o.DER,Dt=Et.encode(2,st.encode(De.r)),er=Et.encode(2,st.encode(De.s)),xt=Dt+er;return Et.encode(48,xt)}};const F=BigInt(0),M=BigInt(1),U=BigInt(2),L=BigInt(3),H=BigInt(4);function fe(De,Et){const{BYTES:st}=De;let Dt;if(typeof Et=="bigint")Dt=Et;else{let er=(0,y.ensureBytes)("private key",Et);try{Dt=De.fromBytes(er)}catch{throw new Error(`invalid private key: expected ui8a of size ${st}, got ${typeof Et}`)}}if(!De.isValidNot0(Dt))throw new Error("invalid private key: out of range [1..N-1]");return Dt}function ge(De,Et={}){const st=(0,t._createCurveFields)("weierstrass",De,Et),{Fp:Dt,Fn:er}=st;let xt=st.CURVE;const{h:ir,n:sr}=xt;(0,y._validateObject)(Et,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:yr}=Et;if(yr&&(!Dt.is0(xt.a)||typeof yr.beta!="bigint"||!Array.isArray(yr.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const wr=ze(Dt,er);function qr(){if(!Dt.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function Mr(oi,zr,ti){const{x:Lr,y:Rr}=zr.toAffine(),Ir=Dt.toBytes(Lr);if((0,y._abool2)(ti,"isCompressed"),ti){qr();const pr=!Dt.isOdd(Rr);return(0,y.concatBytes)(Ie(pr),Ir)}else return(0,y.concatBytes)(Uint8Array.of(4),Ir,Dt.toBytes(Rr))}function Dr(oi){(0,y._abytes2)(oi,void 0,"Point");const{publicKey:zr,publicKeyUncompressed:ti}=wr,Lr=oi.length,Rr=oi[0],Ir=oi.subarray(1);if(Lr===zr&&(Rr===2||Rr===3)){const pr=Dt.fromBytes(Ir);if(!Dt.isValid(pr))throw new Error("bad point: is not on curve, wrong x");const Cr=Wr(pr);let Er;try{Er=Dt.sqrt(Cr)}catch(Ci){const bi=Ci instanceof Error?": "+Ci.message:"";throw new Error("bad point: is not on curve, sqrt error"+bi)}qr();const xr=Dt.isOdd(Er);return(Rr&1)===1!==xr&&(Er=Dt.neg(Er)),{x:pr,y:Er}}else if(Lr===ti&&Rr===4){const pr=Dt.BYTES,Cr=Dt.fromBytes(Ir.subarray(0,pr)),Er=Dt.fromBytes(Ir.subarray(pr,pr*2));if(!Ur(Cr,Er))throw new Error("bad point: is not on curve");return{x:Cr,y:Er}}else throw new Error(`bad point: got length ${Lr}, expected compressed=${zr} or uncompressed=${ti}`)}const Qr=Et.toBytes||Mr,Xr=Et.fromBytes||Dr;function Wr(oi){const zr=Dt.sqr(oi),ti=Dt.mul(zr,oi);return Dt.add(Dt.add(ti,Dt.mul(oi,xt.a)),xt.b)}function Ur(oi,zr){const ti=Dt.sqr(zr),Lr=Wr(oi);return Dt.eql(ti,Lr)}if(!Ur(xt.Gx,xt.Gy))throw new Error("bad curve params: generator point");const Sr=Dt.mul(Dt.pow(xt.a,L),H),Gr=Dt.mul(Dt.sqr(xt.b),BigInt(27));if(Dt.is0(Dt.add(Sr,Gr)))throw new Error("bad curve params: a or b");function Fr(oi,zr,ti=!1){if(!Dt.isValid(zr)||ti&&Dt.is0(zr))throw new Error(`bad point coordinate ${oi}`);return zr}function br(oi){if(!(oi instanceof fi))throw new Error("ProjectivePoint expected")}function Ar(oi){if(!yr||!yr.basises)throw new Error("no endo");return B(oi,yr.basises,er.ORDER)}const cr=(0,y.memoized)((oi,zr)=>{const{X:ti,Y:Lr,Z:Rr}=oi;if(Dt.eql(Rr,Dt.ONE))return{x:ti,y:Lr};const Ir=oi.is0();zr==null&&(zr=Ir?Dt.ONE:Dt.inv(Rr));const pr=Dt.mul(ti,zr),Cr=Dt.mul(Lr,zr),Er=Dt.mul(Rr,zr);if(Ir)return{x:Dt.ZERO,y:Dt.ZERO};if(!Dt.eql(Er,Dt.ONE))throw new Error("invZ was invalid");return{x:pr,y:Cr}}),hr=(0,y.memoized)(oi=>{if(oi.is0()){if(Et.allowInfinityPoint&&!Dt.is0(oi.Y))return;throw new Error("bad point: ZERO")}const{x:zr,y:ti}=oi.toAffine();if(!Dt.isValid(zr)||!Dt.isValid(ti))throw new Error("bad point: x or y not field elements");if(!Ur(zr,ti))throw new Error("bad point: equation left != right");if(!oi.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function jr(oi,zr,ti,Lr,Rr){return ti=new fi(Dt.mul(ti.X,oi),ti.Y,ti.Z),zr=(0,t.negateCt)(Lr,zr),ti=(0,t.negateCt)(Rr,ti),zr.add(ti)}class fi{constructor(zr,ti,Lr){this.X=Fr("x",zr),this.Y=Fr("y",ti,!0),this.Z=Fr("z",Lr),Object.freeze(this)}static CURVE(){return xt}static fromAffine(zr){const{x:ti,y:Lr}=zr||{};if(!zr||!Dt.isValid(ti)||!Dt.isValid(Lr))throw new Error("invalid affine point");if(zr instanceof fi)throw new Error("projective point not allowed");return Dt.is0(ti)&&Dt.is0(Lr)?fi.ZERO:new fi(ti,Lr,Dt.ONE)}static fromBytes(zr){const ti=fi.fromAffine(Xr((0,y._abytes2)(zr,void 0,"point")));return ti.assertValidity(),ti}static fromHex(zr){return fi.fromBytes((0,y.ensureBytes)("pointHex",zr))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(zr=8,ti=!0){return $r.createCache(this,zr),ti||this.multiply(L),this}assertValidity(){hr(this)}hasEvenY(){const{y:zr}=this.toAffine();if(!Dt.isOdd)throw new Error("Field doesn't support isOdd");return!Dt.isOdd(zr)}equals(zr){br(zr);const{X:ti,Y:Lr,Z:Rr}=this,{X:Ir,Y:pr,Z:Cr}=zr,Er=Dt.eql(Dt.mul(ti,Cr),Dt.mul(Ir,Rr)),xr=Dt.eql(Dt.mul(Lr,Cr),Dt.mul(pr,Rr));return Er&&xr}negate(){return new fi(this.X,Dt.neg(this.Y),this.Z)}double(){const{a:zr,b:ti}=xt,Lr=Dt.mul(ti,L),{X:Rr,Y:Ir,Z:pr}=this;let Cr=Dt.ZERO,Er=Dt.ZERO,xr=Dt.ZERO,si=Dt.mul(Rr,Rr),Ci=Dt.mul(Ir,Ir),bi=Dt.mul(pr,pr),Ri=Dt.mul(Rr,Ir);return Ri=Dt.add(Ri,Ri),xr=Dt.mul(Rr,pr),xr=Dt.add(xr,xr),Cr=Dt.mul(zr,xr),Er=Dt.mul(Lr,bi),Er=Dt.add(Cr,Er),Cr=Dt.sub(Ci,Er),Er=Dt.add(Ci,Er),Er=Dt.mul(Cr,Er),Cr=Dt.mul(Ri,Cr),xr=Dt.mul(Lr,xr),bi=Dt.mul(zr,bi),Ri=Dt.sub(si,bi),Ri=Dt.mul(zr,Ri),Ri=Dt.add(Ri,xr),xr=Dt.add(si,si),si=Dt.add(xr,si),si=Dt.add(si,bi),si=Dt.mul(si,Ri),Er=Dt.add(Er,si),bi=Dt.mul(Ir,pr),bi=Dt.add(bi,bi),si=Dt.mul(bi,Ri),Cr=Dt.sub(Cr,si),xr=Dt.mul(bi,Ci),xr=Dt.add(xr,xr),xr=Dt.add(xr,xr),new fi(Cr,Er,xr)}add(zr){br(zr);const{X:ti,Y:Lr,Z:Rr}=this,{X:Ir,Y:pr,Z:Cr}=zr;let Er=Dt.ZERO,xr=Dt.ZERO,si=Dt.ZERO;const Ci=xt.a,bi=Dt.mul(xt.b,L);let Ri=Dt.mul(ti,Ir),li=Dt.mul(Lr,pr),zi=Dt.mul(Rr,Cr),Kn=Dt.add(ti,Lr),Hn=Dt.add(Ir,pr);Kn=Dt.mul(Kn,Hn),Hn=Dt.add(Ri,li),Kn=Dt.sub(Kn,Hn),Hn=Dt.add(ti,Rr);let os=Dt.add(Ir,Cr);return Hn=Dt.mul(Hn,os),os=Dt.add(Ri,zi),Hn=Dt.sub(Hn,os),os=Dt.add(Lr,Rr),Er=Dt.add(pr,Cr),os=Dt.mul(os,Er),Er=Dt.add(li,zi),os=Dt.sub(os,Er),si=Dt.mul(Ci,Hn),Er=Dt.mul(bi,zi),si=Dt.add(Er,si),Er=Dt.sub(li,si),si=Dt.add(li,si),xr=Dt.mul(Er,si),li=Dt.add(Ri,Ri),li=Dt.add(li,Ri),zi=Dt.mul(Ci,zi),Hn=Dt.mul(bi,Hn),li=Dt.add(li,zi),zi=Dt.sub(Ri,zi),zi=Dt.mul(Ci,zi),Hn=Dt.add(Hn,zi),Ri=Dt.mul(li,Hn),xr=Dt.add(xr,Ri),Ri=Dt.mul(os,Hn),Er=Dt.mul(Kn,Er),Er=Dt.sub(Er,Ri),Ri=Dt.mul(Kn,li),si=Dt.mul(os,si),si=Dt.add(si,Ri),new fi(Er,xr,si)}subtract(zr){return this.add(zr.negate())}is0(){return this.equals(fi.ZERO)}multiply(zr){const{endo:ti}=Et;if(!er.isValidNot0(zr))throw new Error("invalid scalar: out of range");let Lr,Rr;const Ir=pr=>$r.cached(this,pr,Cr=>(0,t.normalizeZ)(fi,Cr));if(ti){const{k1neg:pr,k1:Cr,k2neg:Er,k2:xr}=Ar(zr),{p:si,f:Ci}=Ir(Cr),{p:bi,f:Ri}=Ir(xr);Rr=Ci.add(Ri),Lr=jr(ti.beta,si,bi,pr,Er)}else{const{p:pr,f:Cr}=Ir(zr);Lr=pr,Rr=Cr}return(0,t.normalizeZ)(fi,[Lr,Rr])[0]}multiplyUnsafe(zr){const{endo:ti}=Et,Lr=this;if(!er.isValid(zr))throw new Error("invalid scalar: out of range");if(zr===F||Lr.is0())return fi.ZERO;if(zr===M)return Lr;if($r.hasCache(this))return this.multiply(zr);if(ti){const{k1neg:Rr,k1:Ir,k2neg:pr,k2:Cr}=Ar(zr),{p1:Er,p2:xr}=(0,t.mulEndoUnsafe)(fi,Lr,Ir,Cr);return jr(ti.beta,Er,xr,Rr,pr)}else return $r.unsafe(Lr,zr)}multiplyAndAddUnsafe(zr,ti,Lr){const Rr=this.multiplyUnsafe(ti).add(zr.multiplyUnsafe(Lr));return Rr.is0()?void 0:Rr}toAffine(zr){return cr(this,zr)}isTorsionFree(){const{isTorsionFree:zr}=Et;return ir===M?!0:zr?zr(fi,this):$r.unsafe(this,sr).is0()}clearCofactor(){const{clearCofactor:zr}=Et;return ir===M?this:zr?zr(fi,this):this.multiplyUnsafe(ir)}isSmallOrder(){return this.multiplyUnsafe(ir).is0()}toBytes(zr=!0){return(0,y._abool2)(zr,"isCompressed"),this.assertValidity(),Qr(fi,this,zr)}toHex(zr=!0){return(0,y.bytesToHex)(this.toBytes(zr))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(zr=!0){return this.toBytes(zr)}_setWindowSize(zr){this.precompute(zr)}static normalizeZ(zr){return(0,t.normalizeZ)(fi,zr)}static msm(zr,ti){return(0,t.pippenger)(fi,er,zr,ti)}static fromPrivateKey(zr){return fi.BASE.multiply(fe(er,zr))}}fi.BASE=new fi(xt.Gx,xt.Gy,Dt.ONE),fi.ZERO=new fi(Dt.ZERO,Dt.ONE,Dt.ZERO),fi.Fp=Dt,fi.Fn=er;const Bi=er.BITS,$r=new t.wNAF(fi,Et.endo?Math.ceil(Bi/2):Bi);return fi.BASE.precompute(8),fi}function Ie(De){return Uint8Array.of(De?2:3)}function Ee(De,Et){const st=De.ORDER;let Dt=F;for(let Xr=st-M;Xr%U===F;Xr/=U)Dt+=M;const er=Dt,xt=U<<er-M-M,ir=xt*U,sr=(st-M)/ir,yr=(sr-M)/U,wr=ir-M,qr=xt,Mr=De.pow(Et,sr),Dr=De.pow(Et,(sr+M)/U);let Qr=(Xr,Wr)=>{let Ur=Mr,Sr=De.pow(Wr,wr),Gr=De.sqr(Sr);Gr=De.mul(Gr,Wr);let Fr=De.mul(Xr,Gr);Fr=De.pow(Fr,yr),Fr=De.mul(Fr,Sr),Sr=De.mul(Fr,Wr),Gr=De.mul(Fr,Xr);let br=De.mul(Gr,Sr);Fr=De.pow(br,qr);let Ar=De.eql(Fr,De.ONE);Sr=De.mul(Gr,Dr),Fr=De.mul(br,Ur),Gr=De.cmov(Sr,Gr,Ar),br=De.cmov(Fr,br,Ar);for(let cr=er;cr>M;cr--){let hr=cr-U;hr=U<<hr-M;let jr=De.pow(br,hr);const fi=De.eql(jr,De.ONE);Sr=De.mul(Gr,Ur),Ur=De.mul(Ur,Ur),jr=De.mul(br,Ur),Gr=De.cmov(Sr,Gr,fi),br=De.cmov(jr,br,fi)}return{isValid:Ar,value:Gr}};if(De.ORDER%H===L){const Xr=(De.ORDER-L)/H,Wr=De.sqrt(De.neg(Et));Qr=(Ur,Sr)=>{let Gr=De.sqr(Sr);const Fr=De.mul(Ur,Sr);Gr=De.mul(Gr,Fr);let br=De.pow(Gr,Xr);br=De.mul(br,Fr);const Ar=De.mul(br,Wr),cr=De.mul(De.sqr(br),Sr),hr=De.eql(cr,Ur);let jr=De.cmov(Ar,br,hr);return{isValid:hr,value:jr}}}return Qr}function Se(De,Et){(0,d.validateField)(De);const{A:st,B:Dt,Z:er}=Et;if(!De.isValid(st)||!De.isValid(Dt)||!De.isValid(er))throw new Error("mapToCurveSimpleSWU: invalid opts");const xt=Ee(De,er);if(!De.isOdd)throw new Error("Field does not have .isOdd()");return ir=>{let sr,yr,wr,qr,Mr,Dr,Qr,Xr;sr=De.sqr(ir),sr=De.mul(sr,er),yr=De.sqr(sr),yr=De.add(yr,sr),wr=De.add(yr,De.ONE),wr=De.mul(wr,Dt),qr=De.cmov(er,De.neg(yr),!De.eql(yr,De.ZERO)),qr=De.mul(qr,st),yr=De.sqr(wr),Dr=De.sqr(qr),Mr=De.mul(Dr,st),yr=De.add(yr,Mr),yr=De.mul(yr,wr),Dr=De.mul(Dr,qr),Mr=De.mul(Dr,Dt),yr=De.add(yr,Mr),Qr=De.mul(sr,wr);const{isValid:Wr,value:Ur}=xt(yr,Dr);Xr=De.mul(sr,ir),Xr=De.mul(Xr,Ur),Qr=De.cmov(Qr,wr,Wr),Xr=De.cmov(Xr,Ur,Wr);const Sr=De.isOdd(ir)===De.isOdd(Xr);Xr=De.cmov(De.neg(Xr),Xr,Sr);const Gr=(0,d.FpInvertBatch)(De,[qr],!0)[0];return Qr=De.mul(Qr,Gr),{x:Qr,y:Xr}}}function ze(De,Et){return{secretKey:Et.BYTES,publicKey:1+De.BYTES,publicKeyUncompressed:1+2*De.BYTES,publicKeyHasPrefix:!0,signature:2*Et.BYTES}}function He(De,Et={}){const{Fn:st}=De,Dt=Et.randomBytes||y.randomBytes,er=Object.assign(ze(De.Fp,st),{seed:(0,d.getMinHashLength)(st.ORDER)});function xt(Qr){try{return!!fe(st,Qr)}catch{return!1}}function ir(Qr,Xr){const{publicKey:Wr,publicKeyUncompressed:Ur}=er;try{const Sr=Qr.length;return Xr===!0&&Sr!==Wr||Xr===!1&&Sr!==Ur?!1:!!De.fromBytes(Qr)}catch{return!1}}function sr(Qr=Dt(er.seed)){return(0,d.mapHashToField)((0,y._abytes2)(Qr,er.seed,"seed"),st.ORDER)}function yr(Qr,Xr=!0){return De.BASE.multiply(fe(st,Qr)).toBytes(Xr)}function wr(Qr){const Xr=sr(Qr);return{secretKey:Xr,publicKey:yr(Xr)}}function qr(Qr){if(typeof Qr=="bigint")return!1;if(Qr instanceof De)return!0;const{secretKey:Xr,publicKey:Wr,publicKeyUncompressed:Ur}=er;if(st.allowedLengths||Xr===Wr)return;const Sr=(0,y.ensureBytes)("key",Qr).length;return Sr===Wr||Sr===Ur}function Mr(Qr,Xr,Wr=!0){if(qr(Qr)===!0)throw new Error("first arg must be private key");if(qr(Xr)===!1)throw new Error("second arg must be public key");const Ur=fe(st,Qr);return De.fromHex(Xr).multiply(Ur).toBytes(Wr)}return Object.freeze({getPublicKey:yr,getSharedSecret:Mr,keygen:wr,Point:De,utils:{isValidSecretKey:xt,isValidPublicKey:ir,randomSecretKey:sr,isValidPrivateKey:xt,randomPrivateKey:sr,normPrivateKeyToScalar:Qr=>fe(st,Qr),precompute(Qr=8,Xr=De.BASE){return Xr.precompute(Qr,!1)}},lengths:er})}function Ne(De,Et,st={}){(0,c.ahash)(Et),(0,y._validateObject)(st,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const Dt=st.randomBytes||y.randomBytes,er=st.hmac||((ti,...Lr)=>(0,g.hmac)(Et,ti,(0,y.concatBytes)(...Lr))),{Fp:xt,Fn:ir}=De,{ORDER:sr,BITS:yr}=ir,{keygen:wr,getPublicKey:qr,getSharedSecret:Mr,utils:Dr,lengths:Qr}=He(De,st),Xr={prehash:!1,lowS:typeof st.lowS=="boolean"?st.lowS:!1,format:void 0,extraEntropy:!1},Wr="compact";function Ur(ti){const Lr=sr>>M;return ti>Lr}function Sr(ti,Lr){if(!ir.isValidNot0(Lr))throw new Error(`invalid signature ${ti}: out of range 1..Point.Fn.ORDER`);return Lr}function Gr(ti,Lr){D(Lr);const Rr=Qr.signature,Ir=Lr==="compact"?Rr:Lr==="recovered"?Rr+1:void 0;return(0,y._abytes2)(ti,Ir,`${Lr} signature`)}class Fr{constructor(Lr,Rr,Ir){this.r=Sr("r",Lr),this.s=Sr("s",Rr),Ir!=null&&(this.recovery=Ir),Object.freeze(this)}static fromBytes(Lr,Rr=Wr){Gr(Lr,Rr);let Ir;if(Rr==="der"){const{r:xr,s:si}=o.DER.toSig((0,y._abytes2)(Lr));return new Fr(xr,si)}Rr==="recovered"&&(Ir=Lr[0],Rr="compact",Lr=Lr.subarray(1));const pr=ir.BYTES,Cr=Lr.subarray(0,pr),Er=Lr.subarray(pr,pr*2);return new Fr(ir.fromBytes(Cr),ir.fromBytes(Er),Ir)}static fromHex(Lr,Rr){return this.fromBytes((0,y.hexToBytes)(Lr),Rr)}addRecoveryBit(Lr){return new Fr(this.r,this.s,Lr)}recoverPublicKey(Lr){const Rr=xt.ORDER,{r:Ir,s:pr,recovery:Cr}=this;if(Cr==null||![0,1,2,3].includes(Cr))throw new Error("recovery id invalid");if(sr*U<Rr&&Cr>1)throw new Error("recovery id is ambiguous for h>1 curve");const xr=Cr===2||Cr===3?Ir+sr:Ir;if(!xt.isValid(xr))throw new Error("recovery id 2 or 3 invalid");const si=xt.toBytes(xr),Ci=De.fromBytes((0,y.concatBytes)(Ie((Cr&1)===0),si)),bi=ir.inv(xr),Ri=Ar((0,y.ensureBytes)("msgHash",Lr)),li=ir.create(-Ri*bi),zi=ir.create(pr*bi),Kn=De.BASE.multiplyUnsafe(li).add(Ci.multiplyUnsafe(zi));if(Kn.is0())throw new Error("point at infinify");return Kn.assertValidity(),Kn}hasHighS(){return Ur(this.s)}toBytes(Lr=Wr){if(D(Lr),Lr==="der")return(0,y.hexToBytes)(o.DER.hexFromSig(this));const Rr=ir.toBytes(this.r),Ir=ir.toBytes(this.s);if(Lr==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return(0,y.concatBytes)(Uint8Array.of(this.recovery),Rr,Ir)}return(0,y.concatBytes)(Rr,Ir)}toHex(Lr){return(0,y.bytesToHex)(this.toBytes(Lr))}assertValidity(){}static fromCompact(Lr){return Fr.fromBytes((0,y.ensureBytes)("sig",Lr),"compact")}static fromDER(Lr){return Fr.fromBytes((0,y.ensureBytes)("sig",Lr),"der")}normalizeS(){return this.hasHighS()?new Fr(this.r,ir.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,y.bytesToHex)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,y.bytesToHex)(this.toBytes("compact"))}}const br=st.bits2int||function(Lr){if(Lr.length>8192)throw new Error("input is too large");const Rr=(0,y.bytesToNumberBE)(Lr),Ir=Lr.length*8-yr;return Ir>0?Rr>>BigInt(Ir):Rr},Ar=st.bits2int_modN||function(Lr){return ir.create(br(Lr))},cr=(0,y.bitMask)(yr);function hr(ti){return(0,y.aInRange)("num < 2^"+yr,ti,F,cr),ir.toBytes(ti)}function jr(ti,Lr){return(0,y._abytes2)(ti,void 0,"message"),Lr?(0,y._abytes2)(Et(ti),void 0,"prehashed message"):ti}function fi(ti,Lr,Rr){if(["recovered","canonical"].some(li=>li in Rr))throw new Error("sign() legacy options not supported");const{lowS:Ir,prehash:pr,extraEntropy:Cr}=x(Rr,Xr);ti=jr(ti,pr);const Er=Ar(ti),xr=fe(ir,Lr),si=[hr(xr),hr(Er)];if(Cr!=null&&Cr!==!1){const li=Cr===!0?Dt(Qr.secretKey):Cr;si.push((0,y.ensureBytes)("extraEntropy",li))}const Ci=(0,y.concatBytes)(...si),bi=Er;function Ri(li){const zi=br(li);if(!ir.isValidNot0(zi))return;const Kn=ir.inv(zi),Hn=De.BASE.multiply(zi).toAffine(),os=ir.create(Hn.x);if(os===F)return;const ts=ir.create(Kn*ir.create(bi+os*xr));if(ts===F)return;let Gs=(Hn.x===os?0:2)|Number(Hn.y&M),jn=ts;return Ir&&Ur(ts)&&(jn=ir.neg(ts),Gs^=1),new Fr(os,jn,Gs)}return{seed:Ci,k2sig:Ri}}function Bi(ti,Lr,Rr={}){ti=(0,y.ensureBytes)("message",ti);const{seed:Ir,k2sig:pr}=fi(ti,Lr,Rr);return(0,y.createHmacDrbg)(Et.outputLen,ir.BYTES,er)(Ir,pr)}function $r(ti){let Lr;const Rr=typeof ti=="string"||(0,y.isBytes)(ti),Ir=!Rr&&ti!==null&&typeof ti=="object"&&typeof ti.r=="bigint"&&typeof ti.s=="bigint";if(!Rr&&!Ir)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(Ir)Lr=new Fr(ti.r,ti.s);else if(Rr){try{Lr=Fr.fromBytes((0,y.ensureBytes)("sig",ti),"der")}catch(pr){if(!(pr instanceof o.DER.Err))throw pr}if(!Lr)try{Lr=Fr.fromBytes((0,y.ensureBytes)("sig",ti),"compact")}catch{return!1}}return Lr||!1}function oi(ti,Lr,Rr,Ir={}){const{lowS:pr,prehash:Cr,format:Er}=x(Ir,Xr);if(Rr=(0,y.ensureBytes)("publicKey",Rr),Lr=jr((0,y.ensureBytes)("message",Lr),Cr),"strict"in Ir)throw new Error("options.strict was renamed to lowS");const xr=Er===void 0?$r(ti):Fr.fromBytes((0,y.ensureBytes)("sig",ti),Er);if(xr===!1)return!1;try{const si=De.fromBytes(Rr);if(pr&&xr.hasHighS())return!1;const{r:Ci,s:bi}=xr,Ri=Ar(Lr),li=ir.inv(bi),zi=ir.create(Ri*li),Kn=ir.create(Ci*li),Hn=De.BASE.multiplyUnsafe(zi).add(si.multiplyUnsafe(Kn));return Hn.is0()?!1:ir.create(Hn.x)===Ci}catch{return!1}}function zr(ti,Lr,Rr={}){const{prehash:Ir}=x(Rr,Xr);return Lr=jr(Lr,Ir),Fr.fromBytes(ti,"recovered").recoverPublicKey(Lr).toBytes()}return Object.freeze({keygen:wr,getPublicKey:qr,getSharedSecret:Mr,utils:Dr,lengths:Qr,Point:De,sign:Bi,verify:oi,recoverPublicKey:zr,Signature:Fr,hash:Et})}function Pe(De){const{CURVE:Et,curveOpts:st}=ve(De),Dt=ge(Et,st);return Be(De,Dt)}function ve(De){const Et={a:De.a,b:De.b,p:De.Fp.ORDER,n:De.n,h:De.h,Gx:De.Gx,Gy:De.Gy},st=De.Fp;let Dt=De.allowedPrivateKeyLengths?Array.from(new Set(De.allowedPrivateKeyLengths.map(ir=>Math.ceil(ir/2)))):void 0;const er=(0,d.Field)(Et.n,{BITS:De.nBitLength,allowedLengths:Dt,modFromBytes:De.wrapPrivateKey}),xt={Fp:st,Fn:er,allowInfinityPoint:De.allowInfinityPoint,endo:De.endo,isTorsionFree:De.isTorsionFree,clearCofactor:De.clearCofactor,fromBytes:De.fromBytes,toBytes:De.toBytes};return{CURVE:Et,curveOpts:xt}}function Fe(De){const{CURVE:Et,curveOpts:st}=ve(De),Dt={hmac:De.hmac,randomBytes:De.randomBytes,lowS:De.lowS,bits2int:De.bits2int,bits2int_modN:De.bits2int_modN};return{CURVE:Et,curveOpts:st,hash:De.hash,ecdsaOpts:Dt}}function be(De,Et,st){function Dt(er){const xt=De.sqr(er),ir=De.mul(xt,er);return De.add(De.add(ir,De.mul(er,Et)),st)}return Dt}function Be(De,Et){const{Fp:st,Fn:Dt}=Et;function er(ir){return(0,y.inRange)(ir,M,Dt.ORDER)}const xt=be(st,De.a,De.b);return Object.assign({},{CURVE:De,Point:Et,ProjectivePoint:Et,normPrivateKeyToScalar:ir=>fe(Dt,ir),weierstrassEquation:xt,isWithinCurveOrder:er})}function ke(De,Et){const st=Et.Point;return Object.assign({},Et,{ProjectivePoint:st,CURVE:Object.assign({},De,(0,d.nLength)(st.Fn.ORDER,st.Fn.BITS))})}function xe(De){const{CURVE:Et,curveOpts:st,hash:Dt,ecdsaOpts:er}=Fe(De),xt=ge(Et,st),ir=Ne(xt,Dt,er);return ke(De,ir)}}(weierstrass$3)),weierstrass$3}var hasRequired_shortw_utils$1;function require_shortw_utils$1(){if(hasRequired_shortw_utils$1)return _shortw_utils$1;hasRequired_shortw_utils$1=1,Object.defineProperty(_shortw_utils$1,"__esModule",{value:!0}),_shortw_utils$1.getHash=g,_shortw_utils$1.createCurve=c;const o=requireWeierstrass$1();function g(y){return{hash:y}}function c(y,t){const d=E=>(0,o.weierstrass)({...y,hash:E});return{...d(t),create:d}}return _shortw_utils$1}var hashToCurve$1={},hasRequiredHashToCurve$1;function requireHashToCurve$1(){return hasRequiredHashToCurve$1||(hasRequiredHashToCurve$1=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o._DST_scalar=void 0,o.expand_message_xmd=D,o.expand_message_xof=x,o.hash_to_field=v,o.isogenyMap=F,o.createHasher=M;const g=requireUtils$i(),c=requireModular$1(),y=g.bytesToNumberBE;function t(U,L){if(E(U),E(L),U<0||U>=1<<8*L)throw new Error("invalid I2OSP input: "+U);const H=Array.from({length:L}).fill(0);for(let fe=L-1;fe>=0;fe--)H[fe]=U&255,U>>>=8;return new Uint8Array(H)}function d(U,L){const H=new Uint8Array(U.length);for(let fe=0;fe<U.length;fe++)H[fe]=U[fe]^L[fe];return H}function E(U){if(!Number.isSafeInteger(U))throw new Error("number expected")}function B(U){if(!(0,g.isBytes)(U)&&typeof U!="string")throw new Error("DST must be Uint8Array or string");return typeof U=="string"?(0,g.utf8ToBytes)(U):U}function D(U,L,H,fe){(0,g.abytes)(U),E(H),L=B(L),L.length>255&&(L=fe((0,g.concatBytes)((0,g.utf8ToBytes)("H2C-OVERSIZE-DST-"),L)));const{outputLen:ge,blockLen:Ie}=fe,Ee=Math.ceil(H/ge);if(H>65535||Ee>255)throw new Error("expand_message_xmd: invalid lenInBytes");const Se=(0,g.concatBytes)(L,t(L.length,1)),ze=t(0,Ie),He=t(H,2),Ne=new Array(Ee),Pe=fe((0,g.concatBytes)(ze,U,He,t(0,1),Se));Ne[0]=fe((0,g.concatBytes)(Pe,t(1,1),Se));for(let Fe=1;Fe<=Ee;Fe++){const be=[d(Pe,Ne[Fe-1]),t(Fe+1,1),Se];Ne[Fe]=fe((0,g.concatBytes)(...be))}return(0,g.concatBytes)(...Ne).slice(0,H)}function x(U,L,H,fe,ge){if((0,g.abytes)(U),E(H),L=B(L),L.length>255){const Ie=Math.ceil(2*fe/8);L=ge.create({dkLen:Ie}).update((0,g.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(L).digest()}if(H>65535||L.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return ge.create({dkLen:H}).update(U).update(t(H,2)).update(L).update(t(L.length,1)).digest()}function v(U,L,H){(0,g._validateObject)(H,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:fe,k:ge,m:Ie,hash:Ee,expand:Se,DST:ze}=H;if(!(0,g.isHash)(H.hash))throw new Error("expected valid hash");(0,g.abytes)(U),E(L);const He=fe.toString(2).length,Ne=Math.ceil((He+ge)/8),Pe=L*Ie*Ne;let ve;if(Se==="xmd")ve=D(U,ze,Pe,Ee);else if(Se==="xof")ve=x(U,ze,Pe,ge,Ee);else if(Se==="_internal_pass")ve=U;else throw new Error('expand must be "xmd" or "xof"');const Fe=new Array(L);for(let be=0;be<L;be++){const Be=new Array(Ie);for(let ke=0;ke<Ie;ke++){const xe=Ne*(ke+be*Ie),De=ve.subarray(xe,xe+Ne);Be[ke]=(0,c.mod)(y(De),fe)}Fe[be]=Be}return Fe}function F(U,L){const H=L.map(fe=>Array.from(fe).reverse());return(fe,ge)=>{const[Ie,Ee,Se,ze]=H.map(Pe=>Pe.reduce((ve,Fe)=>U.add(U.mul(ve,fe),Fe))),[He,Ne]=(0,c.FpInvertBatch)(U,[Ee,ze],!0);return fe=U.mul(Ie,He),ge=U.mul(ge,U.mul(Se,Ne)),{x:fe,y:ge}}}o._DST_scalar=(0,g.utf8ToBytes)("HashToScalar-");function M(U,L,H){if(typeof L!="function")throw new Error("mapToCurve() must be defined");function fe(Ie){return U.fromAffine(L(Ie))}function ge(Ie){const Ee=Ie.clearCofactor();return Ee.equals(U.ZERO)?U.ZERO:(Ee.assertValidity(),Ee)}return{defaults:H,hashToCurve(Ie,Ee){const Se=Object.assign({},H,Ee),ze=v(Ie,2,Se),He=fe(ze[0]),Ne=fe(ze[1]);return ge(He.add(Ne))},encodeToCurve(Ie,Ee){const Se=H.encodeDST?{DST:H.encodeDST}:{},ze=Object.assign({},H,Se,Ee),He=v(Ie,1,ze),Ne=fe(He[0]);return ge(Ne)},mapToCurve(Ie){if(!Array.isArray(Ie))throw new Error("expected array of bigints");for(const Ee of Ie)if(typeof Ee!="bigint")throw new Error("expected array of bigints");return ge(fe(Ie))},hashToScalar(Ie,Ee){const Se=U.Fn.ORDER,ze=Object.assign({},H,{p:Se,m:1,DST:o._DST_scalar},Ee);return v(Ie,1,ze)[0][0]}}}}(hashToCurve$1)),hashToCurve$1}var hasRequiredSecp256k1$5;function requireSecp256k1$5(){return hasRequiredSecp256k1$5||(hasRequiredSecp256k1$5=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.encodeToCurve=o.hashToCurve=o.secp256k1_hasher=o.schnorr=o.secp256k1=void 0;const g=requireSha2(),c=requireUtils$j(),y=require_shortw_utils$1(),t=requireHashToCurve$1(),d=requireModular$1(),E=requireWeierstrass$1(),B=requireUtils$i(),D={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},x={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},v=BigInt(0),F=BigInt(1),M=BigInt(2);function U(ke){const xe=D.p,De=BigInt(3),Et=BigInt(6),st=BigInt(11),Dt=BigInt(22),er=BigInt(23),xt=BigInt(44),ir=BigInt(88),sr=ke*ke*ke%xe,yr=sr*sr*ke%xe,wr=(0,d.pow2)(yr,De,xe)*yr%xe,qr=(0,d.pow2)(wr,De,xe)*yr%xe,Mr=(0,d.pow2)(qr,M,xe)*sr%xe,Dr=(0,d.pow2)(Mr,st,xe)*Mr%xe,Qr=(0,d.pow2)(Dr,Dt,xe)*Dr%xe,Xr=(0,d.pow2)(Qr,xt,xe)*Qr%xe,Wr=(0,d.pow2)(Xr,ir,xe)*Xr%xe,Ur=(0,d.pow2)(Wr,xt,xe)*Qr%xe,Sr=(0,d.pow2)(Ur,De,xe)*yr%xe,Gr=(0,d.pow2)(Sr,er,xe)*Dr%xe,Fr=(0,d.pow2)(Gr,Et,xe)*sr%xe,br=(0,d.pow2)(Fr,M,xe);if(!L.eql(L.sqr(br),ke))throw new Error("Cannot find square root");return br}const L=(0,d.Field)(D.p,{sqrt:U});o.secp256k1=(0,y.createCurve)({...D,Fp:L,lowS:!0,endo:x},g.sha256);const H={};function fe(ke,...xe){let De=H[ke];if(De===void 0){const Et=(0,g.sha256)((0,B.utf8ToBytes)(ke));De=(0,B.concatBytes)(Et,Et),H[ke]=De}return(0,g.sha256)((0,B.concatBytes)(De,...xe))}const ge=ke=>ke.toBytes(!0).slice(1),Ie=o.secp256k1.Point,Ee=ke=>ke%M===v;function Se(ke){const{Fn:xe,BASE:De}=Ie,Et=(0,E._normFnElement)(xe,ke),st=De.multiply(Et);return{scalar:Ee(st.y)?Et:xe.neg(Et),bytes:ge(st)}}function ze(ke){const xe=L;if(!xe.isValidNot0(ke))throw new Error("invalid x: Fail if x ≥ p");const De=xe.create(ke*ke),Et=xe.create(De*ke+BigInt(7));let st=xe.sqrt(Et);Ee(st)||(st=xe.neg(st));const Dt=Ie.fromAffine({x:ke,y:st});return Dt.assertValidity(),Dt}const He=B.bytesToNumberBE;function Ne(...ke){return Ie.Fn.create(He(fe("BIP0340/challenge",...ke)))}function Pe(ke){return Se(ke).bytes}function ve(ke,xe,De=(0,c.randomBytes)(32)){const{Fn:Et}=Ie,st=(0,B.ensureBytes)("message",ke),{bytes:Dt,scalar:er}=Se(xe),xt=(0,B.ensureBytes)("auxRand",De,32),ir=Et.toBytes(er^He(fe("BIP0340/aux",xt))),sr=fe("BIP0340/nonce",ir,Dt,st),{bytes:yr,scalar:wr}=Se(sr),qr=Ne(yr,Dt,st),Mr=new Uint8Array(64);if(Mr.set(yr,0),Mr.set(Et.toBytes(Et.create(wr+qr*er)),32),!Fe(Mr,st,Dt))throw new Error("sign: Invalid signature produced");return Mr}function Fe(ke,xe,De){const{Fn:Et,BASE:st}=Ie,Dt=(0,B.ensureBytes)("signature",ke,64),er=(0,B.ensureBytes)("message",xe),xt=(0,B.ensureBytes)("publicKey",De,32);try{const ir=ze(He(xt)),sr=He(Dt.subarray(0,32));if(!(0,B.inRange)(sr,F,D.p))return!1;const yr=He(Dt.subarray(32,64));if(!(0,B.inRange)(yr,F,D.n))return!1;const wr=Ne(Et.toBytes(sr),ge(ir),er),qr=st.multiplyUnsafe(yr).add(ir.multiplyUnsafe(Et.neg(wr))),{x:Mr,y:Dr}=qr.toAffine();return!(qr.is0()||!Ee(Dr)||Mr!==sr)}catch{return!1}}o.schnorr=(()=>{const De=(st=(0,c.randomBytes)(48))=>(0,d.mapHashToField)(st,D.n);o.secp256k1.utils.randomSecretKey;function Et(st){const Dt=De(st);return{secretKey:Dt,publicKey:Pe(Dt)}}return{keygen:Et,getPublicKey:Pe,sign:ve,verify:Fe,Point:Ie,utils:{randomSecretKey:De,randomPrivateKey:De,taggedHash:fe,lift_x:ze,pointToBytes:ge,numberToBytesBE:B.numberToBytesBE,bytesToNumberBE:B.bytesToNumberBE,mod:d.mod},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();const be=(0,t.isogenyMap)(L,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(ke=>ke.map(xe=>BigInt(xe)))),Be=(0,E.mapToCurveSimpleSWU)(L,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:L.create(BigInt("-11"))});o.secp256k1_hasher=(0,t.createHasher)(o.secp256k1.Point,ke=>{const{x:xe,y:De}=Be(L.create(ke[0]));return be(xe,De)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:L.ORDER,m:1,k:128,expand:"xmd",hash:g.sha256}),o.hashToCurve=o.secp256k1_hasher.hashToCurve,o.encodeToCurve=o.secp256k1_hasher.encodeToCurve}(secp256k1$7)),secp256k1$7}var utils$j={},hasRequiredUtils$h;function requireUtils$h(){if(hasRequiredUtils$h)return utils$j;hasRequiredUtils$h=1,Object.defineProperty(utils$j,"__esModule",{value:!0}),utils$j.isHash=utils$j.validateObject=utils$j.memoized=utils$j.notImplemented=utils$j.createHmacDrbg=utils$j.bitMask=utils$j.bitSet=utils$j.bitGet=utils$j.bitLen=utils$j.aInRange=utils$j.inRange=utils$j.asciiToBytes=utils$j.copyBytes=utils$j.equalBytes=utils$j.ensureBytes=utils$j.numberToVarBytesBE=utils$j.numberToBytesLE=utils$j.numberToBytesBE=utils$j.bytesToNumberLE=utils$j.bytesToNumberBE=utils$j.hexToNumber=utils$j.numberToHexUnpadded=utils$j.abool=utils$j.utf8ToBytes=utils$j.randomBytes=utils$j.isBytes=utils$j.hexToBytes=utils$j.concatBytes=utils$j.bytesToUtf8=utils$j.bytesToHex=utils$j.anumber=utils$j.abytes=void 0;const o=requireUtils$i();return utils$j.abytes=o.abytes,utils$j.anumber=o.anumber,utils$j.bytesToHex=o.bytesToHex,utils$j.bytesToUtf8=o.bytesToUtf8,utils$j.concatBytes=o.concatBytes,utils$j.hexToBytes=o.hexToBytes,utils$j.isBytes=o.isBytes,utils$j.randomBytes=o.randomBytes,utils$j.utf8ToBytes=o.utf8ToBytes,utils$j.abool=o.abool,utils$j.numberToHexUnpadded=o.numberToHexUnpadded,utils$j.hexToNumber=o.hexToNumber,utils$j.bytesToNumberBE=o.bytesToNumberBE,utils$j.bytesToNumberLE=o.bytesToNumberLE,utils$j.numberToBytesBE=o.numberToBytesBE,utils$j.numberToBytesLE=o.numberToBytesLE,utils$j.numberToVarBytesBE=o.numberToVarBytesBE,utils$j.ensureBytes=o.ensureBytes,utils$j.equalBytes=o.equalBytes,utils$j.copyBytes=o.copyBytes,utils$j.asciiToBytes=o.asciiToBytes,utils$j.inRange=o.inRange,utils$j.aInRange=o.aInRange,utils$j.bitLen=o.bitLen,utils$j.bitGet=o.bitGet,utils$j.bitSet=o.bitSet,utils$j.bitMask=o.bitMask,utils$j.createHmacDrbg=o.createHmacDrbg,utils$j.notImplemented=o.notImplemented,utils$j.memoized=o.memoized,utils$j.validateObject=o.validateObject,utils$j.isHash=o.isHash,utils$j}var hasRequiredDist$q;function requireDist$q(){if(hasRequiredDist$q)return dist$q;hasRequiredDist$q=1;var o=requireSecp256k1$5(),g=requireModular$1(),c=requireUtils$h();function y(Ir){var pr=Object.create(null);return Ir&&Object.keys(Ir).forEach(function(Cr){if(Cr!=="default"){var Er=Object.getOwnPropertyDescriptor(Ir,Cr);Object.defineProperty(pr,Cr,Er.get?Er:{enumerable:!0,get:function(){return Ir[Cr]}})}}),pr.default=Ir,Object.freeze(pr)}var t=y(g),d=y(c);const E=o.secp256k1.ProjectivePoint,B="Expected Private",D="Expected Point",x="Expected Tweak",v="Expected Hash",F="Expected Signature",M="Expected Extra Data (32 bytes)",U="Expected Scalar",L="Bad Recovery Id",H=32,fe=32,ge=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65]),Ie=32,Ee=new Uint8Array(32),Se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,69,81,35,25,80,183,95,196,64,45,161,114,47,201,186,238]),ze=BigInt(1);function He(Ir){return Ir instanceof Uint8Array}function Ne(Ir,pr){for(let Cr=0;Cr<32;++Cr)if(Ir[Cr]!==pr[Cr])return Ir[Cr]<pr[Cr]?-1:1;return 0}function Pe(Ir){return Ne(Ir,Ee)===0}function ve(Ir){return!(!(Ir instanceof Uint8Array)||Ir.length!==fe||Ne(Ir,ge)>=0)}function Fe(Ir){return Ir instanceof Uint8Array&&Ir.length===64&&Ne(Ir.subarray(0,32),ge)<0&&Ne(Ir.subarray(32,64),ge)<0}function be(Ir){return He(Ir)&&Ir.length===64&&Ne(Ir.subarray(0,32),Se)<0}function Be(Ir){return!(Pe(Ir.subarray(0,32))||Pe(Ir.subarray(32,64)))}function ke(Ir){return Ir instanceof Uint8Array&&Ir.length===H}function xe(Ir){return Ir===void 0||Ir instanceof Uint8Array&&Ir.length===Ie}function De(Ir){let pr;if(typeof Ir=="bigint")pr=Ir;else if(typeof Ir=="number"&&Number.isSafeInteger(Ir)&&Ir>=0)pr=BigInt(Ir);else if(typeof Ir=="string"){if(Ir.length!==64)throw new Error("Expected 32 bytes of private scalar");pr=d.hexToNumber(Ir)}else if(Ir instanceof Uint8Array){if(Ir.length!==32)throw new Error("Expected 32 bytes of private scalar");pr=d.bytesToNumberBE(Ir)}else throw new TypeError("Expected valid private scalar");if(pr<0)throw new Error("Expected private scalar >= 0");return pr}function Et(Ir){return o.secp256k1.utils.normPrivateKeyToScalar(Ir)}function st(Ir,pr){const Cr=Et(Ir),Er=De(pr),xr=d.numberToBytesBE(t.mod(Cr+Er,o.secp256k1.CURVE.n),32);return o.secp256k1.utils.isValidPrivateKey(xr)?xr:null}function Dt(Ir,pr){const Cr=Et(Ir),Er=De(pr),xr=d.numberToBytesBE(t.mod(Cr-Er,o.secp256k1.CURVE.n),32);return o.secp256k1.utils.isValidPrivateKey(xr)?xr:null}function er(Ir){const pr=Et(Ir),Cr=d.numberToBytesBE(o.secp256k1.CURVE.n-pr,32);return o.secp256k1.utils.isValidPrivateKey(Cr)?Cr:null}function xt(Ir,pr,Cr){const Er=qr(Ir),xr=De(pr),si=E.BASE.multiplyAndAddUnsafe(Er,xr,ze);if(!si)throw new Error("Tweaked point at infinity");return si.toRawBytes(Cr)}function ir(Ir,pr,Cr){const Er=qr(Ir),xr=typeof pr=="string"?pr:d.bytesToHex(pr),si=d.hexToNumber(xr);return Er.multiply(si).toRawBytes(Cr)}function sr(Ir,pr){return Ir===void 0?pr!==void 0?Qr(pr):!0:!!Ir}function yr(Ir){try{return Ir()}catch{return null}}function wr(Ir){return o.schnorr.utils.lift_x(d.bytesToNumberBE(Ir))}function qr(Ir){return Ir.length===32?wr(Ir):E.fromHex(Ir)}function Mr(Ir,pr){if(Ir.length===32!==pr)return!1;try{return pr?!!wr(Ir):!!E.fromHex(Ir)}catch{return!1}}function Dr(Ir){return Mr(Ir,!1)}function Qr(Ir){return Mr(Ir,!1)&&Ir.length===33}function Xr(Ir){return o.secp256k1.utils.isValidPrivateKey(Ir)}function Wr(Ir){return Mr(Ir,!0)}function Ur(Ir,pr){if(!Wr(Ir))throw new Error(D);if(!ve(pr))throw new Error(x);return yr(()=>{const Cr=xt(Ir,pr,!0);return{parity:Cr[0]%2===1?1:0,xOnlyPubkey:Cr.slice(1)}})}function Sr(Ir){if(!Dr(Ir))throw new Error(D);return Ir.slice(1,33)}function Gr(Ir,pr){if(!Xr(Ir))throw new Error(B);return yr(()=>o.secp256k1.getPublicKey(Ir,sr(pr)))}function Fr(Ir){if(!Xr(Ir))throw new Error(B);return Sr(Gr(Ir))}function br(Ir,pr){if(!Dr(Ir))throw new Error(D);return qr(Ir).toRawBytes(sr(pr,Ir))}function Ar(Ir,pr,Cr){if(!Dr(Ir))throw new Error(D);if(!ve(pr))throw new Error(x);return yr(()=>ir(Ir,pr,sr(Cr,Ir)))}function cr(Ir,pr,Cr){if(!Dr(Ir)||!Dr(pr))throw new Error(D);return yr(()=>{const Er=qr(Ir),xr=qr(pr);return Er.equals(xr.negate())?null:Er.add(xr).toRawBytes(sr(Cr,Ir))})}function hr(Ir,pr,Cr){if(!Dr(Ir))throw new Error(D);if(!ve(pr))throw new Error(x);return yr(()=>xt(Ir,pr,sr(Cr,Ir)))}function jr(Ir,pr){if(!Xr(Ir))throw new Error(B);if(!ve(pr))throw new Error(x);return yr(()=>st(Ir,pr))}function fi(Ir,pr){if(!Xr(Ir))throw new Error(B);if(!ve(pr))throw new Error(x);return yr(()=>Dt(Ir,pr))}function Bi(Ir){if(!Xr(Ir))throw new Error(B);return er(Ir)}function $r(Ir,pr,Cr){if(!Xr(pr))throw new Error(B);if(!ke(Ir))throw new Error(U);if(!xe(Cr))throw new Error(M);return o.secp256k1.sign(Ir,pr,{extraEntropy:Cr}).toCompactRawBytes()}function oi(Ir,pr,Cr){if(!Xr(pr))throw new Error(B);if(!ke(Ir))throw new Error(U);if(!xe(Cr))throw new Error(M);const Er=o.secp256k1.sign(Ir,pr,{extraEntropy:Cr});return{signature:Er.toCompactRawBytes(),recoveryId:Er.recovery}}function zr(Ir,pr,Cr){if(!Xr(pr))throw new Error(B);if(!ke(Ir))throw new Error(U);if(!xe(Cr))throw new Error(M);return o.schnorr.sign(Ir,pr,Cr)}function ti(Ir,pr,Cr,Er){if(!ke(Ir))throw new Error(v);if(!Fe(pr)||!Be(pr))throw new Error(F);if(Cr&2&&!be(pr))throw new Error(L);if(!Wr(pr.subarray(0,32)))throw new Error(F);const si=o.secp256k1.Signature.fromCompact(pr).addRecoveryBit(Cr).recoverPublicKey(Ir);if(!si)throw new Error(F);return si.toRawBytes(sr(Er))}function Lr(Ir,pr,Cr,Er){if(!Dr(pr))throw new Error(D);if(!Fe(Cr))throw new Error(F);if(!ke(Ir))throw new Error(U);return o.secp256k1.verify(Cr,Ir,pr,{lowS:Er})}function Rr(Ir,pr,Cr){if(!Wr(pr))throw new Error(D);if(!Fe(Cr))throw new Error(F);if(!ke(Ir))throw new Error(U);return o.schnorr.verify(Cr,Ir,pr)}return dist$q.isPoint=Dr,dist$q.isPointCompressed=Qr,dist$q.isPrivate=Xr,dist$q.isXOnlyPoint=Wr,dist$q.pointAdd=cr,dist$q.pointAddScalar=hr,dist$q.pointCompress=br,dist$q.pointFromScalar=Gr,dist$q.pointMultiply=Ar,dist$q.privateAdd=jr,dist$q.privateNegate=Bi,dist$q.privateSub=fi,dist$q.recover=ti,dist$q.sign=$r,dist$q.signRecoverable=oi,dist$q.signSchnorr=zr,dist$q.verify=Lr,dist$q.verifySchnorr=Rr,dist$q.xOnlyPointAddTweak=Ur,dist$q.xOnlyPointFromPoint=Sr,dist$q.xOnlyPointFromScalar=Fr,dist$q}var distExports$1=requireDist$q();const ye=getDefaultExportFromCjs(distExports$1);var dist$p={},utils$i={},stringHelper={},commonjsBrowser={},v1$2={},rng$3={},hasRequiredRng$1;function requireRng$1(){if(hasRequiredRng$1)return rng$3;hasRequiredRng$1=1,Object.defineProperty(rng$3,"__esModule",{value:!0}),rng$3.default=c;let o;const g=new Uint8Array(16);function c(){if(!o&&(o=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(g)}return rng$3}var stringify$2={},validate$3={},regex$1={},hasRequiredRegex$1;function requireRegex$1(){if(hasRequiredRegex$1)return regex$1;hasRequiredRegex$1=1,Object.defineProperty(regex$1,"__esModule",{value:!0}),regex$1.default=void 0;var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return regex$1.default=o,regex$1}var hasRequiredValidate$1;function requireValidate$1(){if(hasRequiredValidate$1)return validate$3;hasRequiredValidate$1=1,Object.defineProperty(validate$3,"__esModule",{value:!0}),validate$3.default=void 0;var o=g(requireRegex$1());function g(t){return t&&t.__esModule?t:{default:t}}function c(t){return typeof t=="string"&&o.default.test(t)}var y=c;return validate$3.default=y,validate$3}var hasRequiredStringify$1;function requireStringify$1(){if(hasRequiredStringify$1)return stringify$2;hasRequiredStringify$1=1,Object.defineProperty(stringify$2,"__esModule",{value:!0}),stringify$2.default=void 0,stringify$2.unsafeStringify=y;var o=g(requireValidate$1());function g(E){return E&&E.__esModule?E:{default:E}}const c=[];for(let E=0;E<256;++E)c.push((E+256).toString(16).slice(1));function y(E,B=0){return c[E[B+0]]+c[E[B+1]]+c[E[B+2]]+c[E[B+3]]+"-"+c[E[B+4]]+c[E[B+5]]+"-"+c[E[B+6]]+c[E[B+7]]+"-"+c[E[B+8]]+c[E[B+9]]+"-"+c[E[B+10]]+c[E[B+11]]+c[E[B+12]]+c[E[B+13]]+c[E[B+14]]+c[E[B+15]]}function t(E,B=0){const D=y(E,B);if(!(0,o.default)(D))throw TypeError("Stringified UUID is invalid");return D}var d=t;return stringify$2.default=d,stringify$2}var hasRequiredV1$1;function requireV1$1(){if(hasRequiredV1$1)return v1$2;hasRequiredV1$1=1,Object.defineProperty(v1$2,"__esModule",{value:!0}),v1$2.default=void 0;var o=c(requireRng$1()),g=requireStringify$1();function c(x){return x&&x.__esModule?x:{default:x}}let y,t,d=0,E=0;function B(x,v,F){let M=v&&F||0;const U=v||new Array(16);x=x||{};let L=x.node||y,H=x.clockseq!==void 0?x.clockseq:t;if(L==null||H==null){const ze=x.random||(x.rng||o.default)();L==null&&(L=y=[ze[0]|1,ze[1],ze[2],ze[3],ze[4],ze[5]]),H==null&&(H=t=(ze[6]<<8|ze[7])&16383)}let fe=x.msecs!==void 0?x.msecs:Date.now(),ge=x.nsecs!==void 0?x.nsecs:E+1;const Ie=fe-d+(ge-E)/1e4;if(Ie<0&&x.clockseq===void 0&&(H=H+1&16383),(Ie<0||fe>d)&&x.nsecs===void 0&&(ge=0),ge>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=fe,E=ge,t=H,fe+=122192928e5;const Ee=((fe&268435455)*1e4+ge)%4294967296;U[M++]=Ee>>>24&255,U[M++]=Ee>>>16&255,U[M++]=Ee>>>8&255,U[M++]=Ee&255;const Se=fe/4294967296*1e4&268435455;U[M++]=Se>>>8&255,U[M++]=Se&255,U[M++]=Se>>>24&15|16,U[M++]=Se>>>16&255,U[M++]=H>>>8|128,U[M++]=H&255;for(let ze=0;ze<6;++ze)U[M+ze]=L[ze];return v||(0,g.unsafeStringify)(U)}var D=B;return v1$2.default=D,v1$2}var v3$2={},v35$2={},parse$2={},hasRequiredParse$2;function requireParse$2(){if(hasRequiredParse$2)return parse$2;hasRequiredParse$2=1,Object.defineProperty(parse$2,"__esModule",{value:!0}),parse$2.default=void 0;var o=g(requireValidate$1());function g(t){return t&&t.__esModule?t:{default:t}}function c(t){if(!(0,o.default)(t))throw TypeError("Invalid UUID");let d;const E=new Uint8Array(16);return E[0]=(d=parseInt(t.slice(0,8),16))>>>24,E[1]=d>>>16&255,E[2]=d>>>8&255,E[3]=d&255,E[4]=(d=parseInt(t.slice(9,13),16))>>>8,E[5]=d&255,E[6]=(d=parseInt(t.slice(14,18),16))>>>8,E[7]=d&255,E[8]=(d=parseInt(t.slice(19,23),16))>>>8,E[9]=d&255,E[10]=(d=parseInt(t.slice(24,36),16))/1099511627776&255,E[11]=d/4294967296&255,E[12]=d>>>24&255,E[13]=d>>>16&255,E[14]=d>>>8&255,E[15]=d&255,E}var y=c;return parse$2.default=y,parse$2}var hasRequiredV35$1;function requireV35$1(){if(hasRequiredV35$1)return v35$2;hasRequiredV35$1=1,Object.defineProperty(v35$2,"__esModule",{value:!0}),v35$2.URL=v35$2.DNS=void 0,v35$2.default=E;var o=requireStringify$1(),g=c(requireParse$2());function c(B){return B&&B.__esModule?B:{default:B}}function y(B){B=unescape(encodeURIComponent(B));const D=[];for(let x=0;x<B.length;++x)D.push(B.charCodeAt(x));return D}const t="6ba7b810-9dad-11d1-80b4-00c04fd430c8";v35$2.DNS=t;const d="6ba7b811-9dad-11d1-80b4-00c04fd430c8";v35$2.URL=d;function E(B,D,x){function v(F,M,U,L){var H;if(typeof F=="string"&&(F=y(F)),typeof M=="string"&&(M=(0,g.default)(M)),((H=M)===null||H===void 0?void 0:H.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let fe=new Uint8Array(16+F.length);if(fe.set(M),fe.set(F,M.length),fe=x(fe),fe[6]=fe[6]&15|D,fe[8]=fe[8]&63|128,U){L=L||0;for(let ge=0;ge<16;++ge)U[L+ge]=fe[ge];return U}return(0,o.unsafeStringify)(fe)}try{v.name=B}catch{}return v.DNS=t,v.URL=d,v}return v35$2}var md5$5={},hasRequiredMd5$3;function requireMd5$3(){if(hasRequiredMd5$3)return md5$5;hasRequiredMd5$3=1,Object.defineProperty(md5$5,"__esModule",{value:!0}),md5$5.default=void 0;function o(U){if(typeof U=="string"){const L=unescape(encodeURIComponent(U));U=new Uint8Array(L.length);for(let H=0;H<L.length;++H)U[H]=L.charCodeAt(H)}return g(y(t(U),U.length*8))}function g(U){const L=[],H=U.length*32,fe="0123456789abcdef";for(let ge=0;ge<H;ge+=8){const Ie=U[ge>>5]>>>ge%32&255,Ee=parseInt(fe.charAt(Ie>>>4&15)+fe.charAt(Ie&15),16);L.push(Ee)}return L}function c(U){return(U+64>>>9<<4)+14+1}function y(U,L){U[L>>5]|=128<<L%32,U[c(L)-1]=L;let H=1732584193,fe=-271733879,ge=-1732584194,Ie=271733878;for(let Ee=0;Ee<U.length;Ee+=16){const Se=H,ze=fe,He=ge,Ne=Ie;H=D(H,fe,ge,Ie,U[Ee],7,-680876936),Ie=D(Ie,H,fe,ge,U[Ee+1],12,-389564586),ge=D(ge,Ie,H,fe,U[Ee+2],17,606105819),fe=D(fe,ge,Ie,H,U[Ee+3],22,-1044525330),H=D(H,fe,ge,Ie,U[Ee+4],7,-176418897),Ie=D(Ie,H,fe,ge,U[Ee+5],12,1200080426),ge=D(ge,Ie,H,fe,U[Ee+6],17,-1473231341),fe=D(fe,ge,Ie,H,U[Ee+7],22,-45705983),H=D(H,fe,ge,Ie,U[Ee+8],7,1770035416),Ie=D(Ie,H,fe,ge,U[Ee+9],12,-1958414417),ge=D(ge,Ie,H,fe,U[Ee+10],17,-42063),fe=D(fe,ge,Ie,H,U[Ee+11],22,-1990404162),H=D(H,fe,ge,Ie,U[Ee+12],7,1804603682),Ie=D(Ie,H,fe,ge,U[Ee+13],12,-40341101),ge=D(ge,Ie,H,fe,U[Ee+14],17,-1502002290),fe=D(fe,ge,Ie,H,U[Ee+15],22,1236535329),H=x(H,fe,ge,Ie,U[Ee+1],5,-165796510),Ie=x(Ie,H,fe,ge,U[Ee+6],9,-1069501632),ge=x(ge,Ie,H,fe,U[Ee+11],14,643717713),fe=x(fe,ge,Ie,H,U[Ee],20,-373897302),H=x(H,fe,ge,Ie,U[Ee+5],5,-701558691),Ie=x(Ie,H,fe,ge,U[Ee+10],9,38016083),ge=x(ge,Ie,H,fe,U[Ee+15],14,-660478335),fe=x(fe,ge,Ie,H,U[Ee+4],20,-405537848),H=x(H,fe,ge,Ie,U[Ee+9],5,568446438),Ie=x(Ie,H,fe,ge,U[Ee+14],9,-1019803690),ge=x(ge,Ie,H,fe,U[Ee+3],14,-187363961),fe=x(fe,ge,Ie,H,U[Ee+8],20,1163531501),H=x(H,fe,ge,Ie,U[Ee+13],5,-1444681467),Ie=x(Ie,H,fe,ge,U[Ee+2],9,-51403784),ge=x(ge,Ie,H,fe,U[Ee+7],14,1735328473),fe=x(fe,ge,Ie,H,U[Ee+12],20,-1926607734),H=v(H,fe,ge,Ie,U[Ee+5],4,-378558),Ie=v(Ie,H,fe,ge,U[Ee+8],11,-2022574463),ge=v(ge,Ie,H,fe,U[Ee+11],16,1839030562),fe=v(fe,ge,Ie,H,U[Ee+14],23,-35309556),H=v(H,fe,ge,Ie,U[Ee+1],4,-1530992060),Ie=v(Ie,H,fe,ge,U[Ee+4],11,1272893353),ge=v(ge,Ie,H,fe,U[Ee+7],16,-155497632),fe=v(fe,ge,Ie,H,U[Ee+10],23,-1094730640),H=v(H,fe,ge,Ie,U[Ee+13],4,681279174),Ie=v(Ie,H,fe,ge,U[Ee],11,-358537222),ge=v(ge,Ie,H,fe,U[Ee+3],16,-722521979),fe=v(fe,ge,Ie,H,U[Ee+6],23,76029189),H=v(H,fe,ge,Ie,U[Ee+9],4,-640364487),Ie=v(Ie,H,fe,ge,U[Ee+12],11,-421815835),ge=v(ge,Ie,H,fe,U[Ee+15],16,530742520),fe=v(fe,ge,Ie,H,U[Ee+2],23,-995338651),H=F(H,fe,ge,Ie,U[Ee],6,-198630844),Ie=F(Ie,H,fe,ge,U[Ee+7],10,1126891415),ge=F(ge,Ie,H,fe,U[Ee+14],15,-1416354905),fe=F(fe,ge,Ie,H,U[Ee+5],21,-57434055),H=F(H,fe,ge,Ie,U[Ee+12],6,1700485571),Ie=F(Ie,H,fe,ge,U[Ee+3],10,-1894986606),ge=F(ge,Ie,H,fe,U[Ee+10],15,-1051523),fe=F(fe,ge,Ie,H,U[Ee+1],21,-2054922799),H=F(H,fe,ge,Ie,U[Ee+8],6,1873313359),Ie=F(Ie,H,fe,ge,U[Ee+15],10,-30611744),ge=F(ge,Ie,H,fe,U[Ee+6],15,-1560198380),fe=F(fe,ge,Ie,H,U[Ee+13],21,1309151649),H=F(H,fe,ge,Ie,U[Ee+4],6,-145523070),Ie=F(Ie,H,fe,ge,U[Ee+11],10,-1120210379),ge=F(ge,Ie,H,fe,U[Ee+2],15,718787259),fe=F(fe,ge,Ie,H,U[Ee+9],21,-343485551),H=d(H,Se),fe=d(fe,ze),ge=d(ge,He),Ie=d(Ie,Ne)}return[H,fe,ge,Ie]}function t(U){if(U.length===0)return[];const L=U.length*8,H=new Uint32Array(c(L));for(let fe=0;fe<L;fe+=8)H[fe>>5]|=(U[fe/8]&255)<<fe%32;return H}function d(U,L){const H=(U&65535)+(L&65535);return(U>>16)+(L>>16)+(H>>16)<<16|H&65535}function E(U,L){return U<<L|U>>>32-L}function B(U,L,H,fe,ge,Ie){return d(E(d(d(L,U),d(fe,Ie)),ge),H)}function D(U,L,H,fe,ge,Ie,Ee){return B(L&H|~L&fe,U,L,ge,Ie,Ee)}function x(U,L,H,fe,ge,Ie,Ee){return B(L&fe|H&~fe,U,L,ge,Ie,Ee)}function v(U,L,H,fe,ge,Ie,Ee){return B(L^H^fe,U,L,ge,Ie,Ee)}function F(U,L,H,fe,ge,Ie,Ee){return B(H^(L|~fe),U,L,ge,Ie,Ee)}var M=o;return md5$5.default=M,md5$5}var hasRequiredV3$1;function requireV3$1(){if(hasRequiredV3$1)return v3$2;hasRequiredV3$1=1,Object.defineProperty(v3$2,"__esModule",{value:!0}),v3$2.default=void 0;var o=c(requireV35$1()),g=c(requireMd5$3());function c(d){return d&&d.__esModule?d:{default:d}}var t=(0,o.default)("v3",48,g.default);return v3$2.default=t,v3$2}var v4$3={},native$3={},hasRequiredNative$2;function requireNative$2(){if(hasRequiredNative$2)return native$3;hasRequiredNative$2=1,Object.defineProperty(native$3,"__esModule",{value:!0}),native$3.default=void 0;var g={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return native$3.default=g,native$3}var hasRequiredV4$1;function requireV4$1(){if(hasRequiredV4$1)return v4$3;hasRequiredV4$1=1,Object.defineProperty(v4$3,"__esModule",{value:!0}),v4$3.default=void 0;var o=y(requireNative$2()),g=y(requireRng$1()),c=requireStringify$1();function y(E){return E&&E.__esModule?E:{default:E}}function t(E,B,D){if(o.default.randomUUID&&!B&&!E)return o.default.randomUUID();E=E||{};const x=E.random||(E.rng||g.default)();if(x[6]=x[6]&15|64,x[8]=x[8]&63|128,B){D=D||0;for(let v=0;v<16;++v)B[D+v]=x[v];return B}return(0,c.unsafeStringify)(x)}var d=t;return v4$3.default=d,v4$3}var v5$2={},sha1$5={},hasRequiredSha1$3;function requireSha1$3(){if(hasRequiredSha1$3)return sha1$5;hasRequiredSha1$3=1,Object.defineProperty(sha1$5,"__esModule",{value:!0}),sha1$5.default=void 0;function o(t,d,E,B){switch(t){case 0:return d&E^~d&B;case 1:return d^E^B;case 2:return d&E^d&B^E&B;case 3:return d^E^B}}function g(t,d){return t<<d|t>>>32-d}function c(t){const d=[1518500249,1859775393,2400959708,3395469782],E=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const v=unescape(encodeURIComponent(t));t=[];for(let F=0;F<v.length;++F)t.push(v.charCodeAt(F))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const B=t.length/4+2,D=Math.ceil(B/16),x=new Array(D);for(let v=0;v<D;++v){const F=new Uint32Array(16);for(let M=0;M<16;++M)F[M]=t[v*64+M*4]<<24|t[v*64+M*4+1]<<16|t[v*64+M*4+2]<<8|t[v*64+M*4+3];x[v]=F}x[D-1][14]=(t.length-1)*8/Math.pow(2,32),x[D-1][14]=Math.floor(x[D-1][14]),x[D-1][15]=(t.length-1)*8&4294967295;for(let v=0;v<D;++v){const F=new Uint32Array(80);for(let ge=0;ge<16;++ge)F[ge]=x[v][ge];for(let ge=16;ge<80;++ge)F[ge]=g(F[ge-3]^F[ge-8]^F[ge-14]^F[ge-16],1);let M=E[0],U=E[1],L=E[2],H=E[3],fe=E[4];for(let ge=0;ge<80;++ge){const Ie=Math.floor(ge/20),Ee=g(M,5)+o(Ie,U,L,H)+fe+d[Ie]+F[ge]>>>0;fe=H,H=L,L=g(U,30)>>>0,U=M,M=Ee}E[0]=E[0]+M>>>0,E[1]=E[1]+U>>>0,E[2]=E[2]+L>>>0,E[3]=E[3]+H>>>0,E[4]=E[4]+fe>>>0}return[E[0]>>24&255,E[0]>>16&255,E[0]>>8&255,E[0]&255,E[1]>>24&255,E[1]>>16&255,E[1]>>8&255,E[1]&255,E[2]>>24&255,E[2]>>16&255,E[2]>>8&255,E[2]&255,E[3]>>24&255,E[3]>>16&255,E[3]>>8&255,E[3]&255,E[4]>>24&255,E[4]>>16&255,E[4]>>8&255,E[4]&255]}var y=c;return sha1$5.default=y,sha1$5}var hasRequiredV5$1;function requireV5$1(){if(hasRequiredV5$1)return v5$2;hasRequiredV5$1=1,Object.defineProperty(v5$2,"__esModule",{value:!0}),v5$2.default=void 0;var o=c(requireV35$1()),g=c(requireSha1$3());function c(d){return d&&d.__esModule?d:{default:d}}var t=(0,o.default)("v5",80,g.default);return v5$2.default=t,v5$2}var nil$2={},hasRequiredNil$1;function requireNil$1(){if(hasRequiredNil$1)return nil$2;hasRequiredNil$1=1,Object.defineProperty(nil$2,"__esModule",{value:!0}),nil$2.default=void 0;var o="00000000-0000-0000-0000-000000000000";return nil$2.default=o,nil$2}var version$4={},hasRequiredVersion$2;function requireVersion$2(){if(hasRequiredVersion$2)return version$4;hasRequiredVersion$2=1,Object.defineProperty(version$4,"__esModule",{value:!0}),version$4.default=void 0;var o=g(requireValidate$1());function g(t){return t&&t.__esModule?t:{default:t}}function c(t){if(!(0,o.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}var y=c;return version$4.default=y,version$4}var hasRequiredCommonjsBrowser;function requireCommonjsBrowser(){return hasRequiredCommonjsBrowser||(hasRequiredCommonjsBrowser=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"NIL",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(o,"parse",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(o,"v1",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(o,"v3",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(o,"v4",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(o,"v5",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(o,"validate",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(o,"version",{enumerable:!0,get:function(){return E.default}});var g=v(requireV1$1()),c=v(requireV3$1()),y=v(requireV4$1()),t=v(requireV5$1()),d=v(requireNil$1()),E=v(requireVersion$2()),B=v(requireValidate$1()),D=v(requireStringify$1()),x=v(requireParse$2());function v(F){return F&&F.__esModule?F:{default:F}}}(commonjsBrowser)),commonjsBrowser}var buffer$2={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=B,base64Js.toByteArray=x,base64Js.fromByteArray=M;for(var o=[],g=[],c=typeof Uint8Array<"u"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,d=y.length;t<d;++t)o[t]=y[t],g[y.charCodeAt(t)]=t;g[45]=62,g[95]=63;function E(U){var L=U.length;if(L%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var H=U.indexOf("=");H===-1&&(H=L);var fe=H===L?0:4-H%4;return[H,fe]}function B(U){var L=E(U),H=L[0],fe=L[1];return(H+fe)*3/4-fe}function D(U,L,H){return(L+H)*3/4-H}function x(U){var L,H=E(U),fe=H[0],ge=H[1],Ie=new c(D(U,fe,ge)),Ee=0,Se=ge>0?fe-4:fe,ze;for(ze=0;ze<Se;ze+=4)L=g[U.charCodeAt(ze)]<<18|g[U.charCodeAt(ze+1)]<<12|g[U.charCodeAt(ze+2)]<<6|g[U.charCodeAt(ze+3)],Ie[Ee++]=L>>16&255,Ie[Ee++]=L>>8&255,Ie[Ee++]=L&255;return ge===2&&(L=g[U.charCodeAt(ze)]<<2|g[U.charCodeAt(ze+1)]>>4,Ie[Ee++]=L&255),ge===1&&(L=g[U.charCodeAt(ze)]<<10|g[U.charCodeAt(ze+1)]<<4|g[U.charCodeAt(ze+2)]>>2,Ie[Ee++]=L>>8&255,Ie[Ee++]=L&255),Ie}function v(U){return o[U>>18&63]+o[U>>12&63]+o[U>>6&63]+o[U&63]}function F(U,L,H){for(var fe,ge=[],Ie=L;Ie<H;Ie+=3)fe=(U[Ie]<<16&16711680)+(U[Ie+1]<<8&65280)+(U[Ie+2]&255),ge.push(v(fe));return ge.join("")}function M(U){for(var L,H=U.length,fe=H%3,ge=[],Ie=16383,Ee=0,Se=H-fe;Ee<Se;Ee+=Ie)ge.push(F(U,Ee,Ee+Ie>Se?Se:Ee+Ie));return fe===1?(L=U[H-1],ge.push(o[L>>2]+o[L<<4&63]+"==")):fe===2&&(L=(U[H-2]<<8)+U[H-1],ge.push(o[L>>10]+o[L>>4&63]+o[L<<2&63]+"=")),ge.join("")}return base64Js}var ieee754={};var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function(o,g,c,y,t){var d,E,B=t*8-y-1,D=(1<<B)-1,x=D>>1,v=-7,F=c?t-1:0,M=c?-1:1,U=o[g+F];for(F+=M,d=U&(1<<-v)-1,U>>=-v,v+=B;v>0;d=d*256+o[g+F],F+=M,v-=8);for(E=d&(1<<-v)-1,d>>=-v,v+=y;v>0;E=E*256+o[g+F],F+=M,v-=8);if(d===0)d=1-x;else{if(d===D)return E?NaN:(U?-1:1)*(1/0);E=E+Math.pow(2,y),d=d-x}return(U?-1:1)*E*Math.pow(2,d-y)},ieee754.write=function(o,g,c,y,t,d){var E,B,D,x=d*8-t-1,v=(1<<x)-1,F=v>>1,M=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=y?0:d-1,L=y?1:-1,H=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(B=isNaN(g)?1:0,E=v):(E=Math.floor(Math.log(g)/Math.LN2),g*(D=Math.pow(2,-E))<1&&(E--,D*=2),E+F>=1?g+=M/D:g+=M*Math.pow(2,1-F),g*D>=2&&(E++,D/=2),E+F>=v?(B=0,E=v):E+F>=1?(B=(g*D-1)*Math.pow(2,t),E=E+F):(B=g*Math.pow(2,F-1)*Math.pow(2,t),E=0));t>=8;o[c+U]=B&255,U+=L,B/=256,t-=8);for(E=E<<t|B,x+=t;x>0;o[c+U]=E&255,U+=L,E/=256,x-=8);o[c+U-L]|=H*128}),ieee754}var hasRequiredBuffer$2;function requireBuffer$2(){return hasRequiredBuffer$2||(hasRequiredBuffer$2=1,function(o){const g=requireBase64Js(),c=requireIeee754(),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=B,o.SlowBuffer=Ie,o.INSPECT_MAX_BYTES=50;const t=2147483647;o.kMaxLength=t,B.TYPED_ARRAY_SUPPORT=d(),!B.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function d(){try{const Rr=new Uint8Array(1),Ir={foo:function(){return 42}};return Object.setPrototypeOf(Ir,Uint8Array.prototype),Object.setPrototypeOf(Rr,Ir),Rr.foo()===42}catch{return!1}}Object.defineProperty(B.prototype,"parent",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.buffer}}),Object.defineProperty(B.prototype,"offset",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.byteOffset}});function E(Rr){if(Rr>t)throw new RangeError('The value "'+Rr+'" is invalid for option "size"');const Ir=new Uint8Array(Rr);return Object.setPrototypeOf(Ir,B.prototype),Ir}function B(Rr,Ir,pr){if(typeof Rr=="number"){if(typeof Ir=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(Rr)}return D(Rr,Ir,pr)}B.poolSize=8192;function D(Rr,Ir,pr){if(typeof Rr=="string")return M(Rr,Ir);if(ArrayBuffer.isView(Rr))return L(Rr);if(Rr==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rr);if($r(Rr,ArrayBuffer)||Rr&&$r(Rr.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($r(Rr,SharedArrayBuffer)||Rr&&$r(Rr.buffer,SharedArrayBuffer)))return H(Rr,Ir,pr);if(typeof Rr=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Cr=Rr.valueOf&&Rr.valueOf();if(Cr!=null&&Cr!==Rr)return B.from(Cr,Ir,pr);const Er=fe(Rr);if(Er)return Er;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Rr[Symbol.toPrimitive]=="function")return B.from(Rr[Symbol.toPrimitive]("string"),Ir,pr);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rr)}B.from=function(Rr,Ir,pr){return D(Rr,Ir,pr)},Object.setPrototypeOf(B.prototype,Uint8Array.prototype),Object.setPrototypeOf(B,Uint8Array);function x(Rr){if(typeof Rr!="number")throw new TypeError('"size" argument must be of type number');if(Rr<0)throw new RangeError('The value "'+Rr+'" is invalid for option "size"')}function v(Rr,Ir,pr){return x(Rr),Rr<=0?E(Rr):Ir!==void 0?typeof pr=="string"?E(Rr).fill(Ir,pr):E(Rr).fill(Ir):E(Rr)}B.alloc=function(Rr,Ir,pr){return v(Rr,Ir,pr)};function F(Rr){return x(Rr),E(Rr<0?0:ge(Rr)|0)}B.allocUnsafe=function(Rr){return F(Rr)},B.allocUnsafeSlow=function(Rr){return F(Rr)};function M(Rr,Ir){if((typeof Ir!="string"||Ir==="")&&(Ir="utf8"),!B.isEncoding(Ir))throw new TypeError("Unknown encoding: "+Ir);const pr=Ee(Rr,Ir)|0;let Cr=E(pr);const Er=Cr.write(Rr,Ir);return Er!==pr&&(Cr=Cr.slice(0,Er)),Cr}function U(Rr){const Ir=Rr.length<0?0:ge(Rr.length)|0,pr=E(Ir);for(let Cr=0;Cr<Ir;Cr+=1)pr[Cr]=Rr[Cr]&255;return pr}function L(Rr){if($r(Rr,Uint8Array)){const Ir=new Uint8Array(Rr);return H(Ir.buffer,Ir.byteOffset,Ir.byteLength)}return U(Rr)}function H(Rr,Ir,pr){if(Ir<0||Rr.byteLength<Ir)throw new RangeError('"offset" is outside of buffer bounds');if(Rr.byteLength<Ir+(pr||0))throw new RangeError('"length" is outside of buffer bounds');let Cr;return Ir===void 0&&pr===void 0?Cr=new Uint8Array(Rr):pr===void 0?Cr=new Uint8Array(Rr,Ir):Cr=new Uint8Array(Rr,Ir,pr),Object.setPrototypeOf(Cr,B.prototype),Cr}function fe(Rr){if(B.isBuffer(Rr)){const Ir=ge(Rr.length)|0,pr=E(Ir);return pr.length===0||Rr.copy(pr,0,0,Ir),pr}if(Rr.length!==void 0)return typeof Rr.length!="number"||oi(Rr.length)?E(0):U(Rr);if(Rr.type==="Buffer"&&Array.isArray(Rr.data))return U(Rr.data)}function ge(Rr){if(Rr>=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return Rr|0}function Ie(Rr){return+Rr!=Rr&&(Rr=0),B.alloc(+Rr)}B.isBuffer=function(Ir){return Ir!=null&&Ir._isBuffer===!0&&Ir!==B.prototype},B.compare=function(Ir,pr){if($r(Ir,Uint8Array)&&(Ir=B.from(Ir,Ir.offset,Ir.byteLength)),$r(pr,Uint8Array)&&(pr=B.from(pr,pr.offset,pr.byteLength)),!B.isBuffer(Ir)||!B.isBuffer(pr))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ir===pr)return 0;let Cr=Ir.length,Er=pr.length;for(let xr=0,si=Math.min(Cr,Er);xr<si;++xr)if(Ir[xr]!==pr[xr]){Cr=Ir[xr],Er=pr[xr];break}return Cr<Er?-1:Er<Cr?1:0},B.isEncoding=function(Ir){switch(String(Ir).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}},B.concat=function(Ir,pr){if(!Array.isArray(Ir))throw new TypeError('"list" argument must be an Array of Buffers');if(Ir.length===0)return B.alloc(0);let Cr;if(pr===void 0)for(pr=0,Cr=0;Cr<Ir.length;++Cr)pr+=Ir[Cr].length;const Er=B.allocUnsafe(pr);let xr=0;for(Cr=0;Cr<Ir.length;++Cr){let si=Ir[Cr];if($r(si,Uint8Array))xr+si.length>Er.length?(B.isBuffer(si)||(si=B.from(si)),si.copy(Er,xr)):Uint8Array.prototype.set.call(Er,si,xr);else if(B.isBuffer(si))si.copy(Er,xr);else throw new TypeError('"list" argument must be an Array of Buffers');xr+=si.length}return Er};function Ee(Rr,Ir){if(B.isBuffer(Rr))return Rr.length;if(ArrayBuffer.isView(Rr)||$r(Rr,ArrayBuffer))return Rr.byteLength;if(typeof Rr!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Rr);const pr=Rr.length,Cr=arguments.length>2&&arguments[2]===!0;if(!Cr&&pr===0)return 0;let Er=!1;for(;;)switch(Ir){case"ascii":case"latin1":case"binary":return pr;case"utf8":case"utf-8":return cr(Rr).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pr*2;case"hex":return pr>>>1;case"base64":return fi(Rr).length;default:if(Er)return Cr?-1:cr(Rr).length;Ir=(""+Ir).toLowerCase(),Er=!0}}B.byteLength=Ee;function Se(Rr,Ir,pr){let Cr=!1;if((Ir===void 0||Ir<0)&&(Ir=0),Ir>this.length||((pr===void 0||pr>this.length)&&(pr=this.length),pr<=0)||(pr>>>=0,Ir>>>=0,pr<=Ir))return"";for(Rr||(Rr="utf8");;)switch(Rr){case"hex":return er(this,Ir,pr);case"utf8":case"utf-8":return xe(this,Ir,pr);case"ascii":return st(this,Ir,pr);case"latin1":case"binary":return Dt(this,Ir,pr);case"base64":return ke(this,Ir,pr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,Ir,pr);default:if(Cr)throw new TypeError("Unknown encoding: "+Rr);Rr=(Rr+"").toLowerCase(),Cr=!0}}B.prototype._isBuffer=!0;function ze(Rr,Ir,pr){const Cr=Rr[Ir];Rr[Ir]=Rr[pr],Rr[pr]=Cr}B.prototype.swap16=function(){const Ir=this.length;if(Ir%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let pr=0;pr<Ir;pr+=2)ze(this,pr,pr+1);return this},B.prototype.swap32=function(){const Ir=this.length;if(Ir%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let pr=0;pr<Ir;pr+=4)ze(this,pr,pr+3),ze(this,pr+1,pr+2);return this},B.prototype.swap64=function(){const Ir=this.length;if(Ir%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let pr=0;pr<Ir;pr+=8)ze(this,pr,pr+7),ze(this,pr+1,pr+6),ze(this,pr+2,pr+5),ze(this,pr+3,pr+4);return this},B.prototype.toString=function(){const Ir=this.length;return Ir===0?"":arguments.length===0?xe(this,0,Ir):Se.apply(this,arguments)},B.prototype.toLocaleString=B.prototype.toString,B.prototype.equals=function(Ir){if(!B.isBuffer(Ir))throw new TypeError("Argument must be a Buffer");return this===Ir?!0:B.compare(this,Ir)===0},B.prototype.inspect=function(){let Ir="";const pr=o.INSPECT_MAX_BYTES;return Ir=this.toString("hex",0,pr).replace(/(.{2})/g,"$1 ").trim(),this.length>pr&&(Ir+=" ... "),"<Buffer "+Ir+">"},y&&(B.prototype[y]=B.prototype.inspect),B.prototype.compare=function(Ir,pr,Cr,Er,xr){if($r(Ir,Uint8Array)&&(Ir=B.from(Ir,Ir.offset,Ir.byteLength)),!B.isBuffer(Ir))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ir);if(pr===void 0&&(pr=0),Cr===void 0&&(Cr=Ir?Ir.length:0),Er===void 0&&(Er=0),xr===void 0&&(xr=this.length),pr<0||Cr>Ir.length||Er<0||xr>this.length)throw new RangeError("out of range index");if(Er>=xr&&pr>=Cr)return 0;if(Er>=xr)return-1;if(pr>=Cr)return 1;if(pr>>>=0,Cr>>>=0,Er>>>=0,xr>>>=0,this===Ir)return 0;let si=xr-Er,Ci=Cr-pr;const bi=Math.min(si,Ci),Ri=this.slice(Er,xr),li=Ir.slice(pr,Cr);for(let zi=0;zi<bi;++zi)if(Ri[zi]!==li[zi]){si=Ri[zi],Ci=li[zi];break}return si<Ci?-1:Ci<si?1:0};function He(Rr,Ir,pr,Cr,Er){if(Rr.length===0)return-1;if(typeof pr=="string"?(Cr=pr,pr=0):pr>2147483647?pr=2147483647:pr<-2147483648&&(pr=-2147483648),pr=+pr,oi(pr)&&(pr=Er?0:Rr.length-1),pr<0&&(pr=Rr.length+pr),pr>=Rr.length){if(Er)return-1;pr=Rr.length-1}else if(pr<0)if(Er)pr=0;else return-1;if(typeof Ir=="string"&&(Ir=B.from(Ir,Cr)),B.isBuffer(Ir))return Ir.length===0?-1:Ne(Rr,Ir,pr,Cr,Er);if(typeof Ir=="number")return Ir=Ir&255,typeof Uint8Array.prototype.indexOf=="function"?Er?Uint8Array.prototype.indexOf.call(Rr,Ir,pr):Uint8Array.prototype.lastIndexOf.call(Rr,Ir,pr):Ne(Rr,[Ir],pr,Cr,Er);throw new TypeError("val must be string, number or Buffer")}function Ne(Rr,Ir,pr,Cr,Er){let xr=1,si=Rr.length,Ci=Ir.length;if(Cr!==void 0&&(Cr=String(Cr).toLowerCase(),Cr==="ucs2"||Cr==="ucs-2"||Cr==="utf16le"||Cr==="utf-16le")){if(Rr.length<2||Ir.length<2)return-1;xr=2,si/=2,Ci/=2,pr/=2}function bi(li,zi){return xr===1?li[zi]:li.readUInt16BE(zi*xr)}let Ri;if(Er){let li=-1;for(Ri=pr;Ri<si;Ri++)if(bi(Rr,Ri)===bi(Ir,li===-1?0:Ri-li)){if(li===-1&&(li=Ri),Ri-li+1===Ci)return li*xr}else li!==-1&&(Ri-=Ri-li),li=-1}else for(pr+Ci>si&&(pr=si-Ci),Ri=pr;Ri>=0;Ri--){let li=!0;for(let zi=0;zi<Ci;zi++)if(bi(Rr,Ri+zi)!==bi(Ir,zi)){li=!1;break}if(li)return Ri}return-1}B.prototype.includes=function(Ir,pr,Cr){return this.indexOf(Ir,pr,Cr)!==-1},B.prototype.indexOf=function(Ir,pr,Cr){return He(this,Ir,pr,Cr,!0)},B.prototype.lastIndexOf=function(Ir,pr,Cr){return He(this,Ir,pr,Cr,!1)};function Pe(Rr,Ir,pr,Cr){pr=Number(pr)||0;const Er=Rr.length-pr;Cr?(Cr=Number(Cr),Cr>Er&&(Cr=Er)):Cr=Er;const xr=Ir.length;Cr>xr/2&&(Cr=xr/2);let si;for(si=0;si<Cr;++si){const Ci=parseInt(Ir.substr(si*2,2),16);if(oi(Ci))return si;Rr[pr+si]=Ci}return si}function ve(Rr,Ir,pr,Cr){return Bi(cr(Ir,Rr.length-pr),Rr,pr,Cr)}function Fe(Rr,Ir,pr,Cr){return Bi(hr(Ir),Rr,pr,Cr)}function be(Rr,Ir,pr,Cr){return Bi(fi(Ir),Rr,pr,Cr)}function Be(Rr,Ir,pr,Cr){return Bi(jr(Ir,Rr.length-pr),Rr,pr,Cr)}B.prototype.write=function(Ir,pr,Cr,Er){if(pr===void 0)Er="utf8",Cr=this.length,pr=0;else if(Cr===void 0&&typeof pr=="string")Er=pr,Cr=this.length,pr=0;else if(isFinite(pr))pr=pr>>>0,isFinite(Cr)?(Cr=Cr>>>0,Er===void 0&&(Er="utf8")):(Er=Cr,Cr=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const xr=this.length-pr;if((Cr===void 0||Cr>xr)&&(Cr=xr),Ir.length>0&&(Cr<0||pr<0)||pr>this.length)throw new RangeError("Attempt to write outside buffer bounds");Er||(Er="utf8");let si=!1;for(;;)switch(Er){case"hex":return Pe(this,Ir,pr,Cr);case"utf8":case"utf-8":return ve(this,Ir,pr,Cr);case"ascii":case"latin1":case"binary":return Fe(this,Ir,pr,Cr);case"base64":return be(this,Ir,pr,Cr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Be(this,Ir,pr,Cr);default:if(si)throw new TypeError("Unknown encoding: "+Er);Er=(""+Er).toLowerCase(),si=!0}},B.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ke(Rr,Ir,pr){return Ir===0&&pr===Rr.length?g.fromByteArray(Rr):g.fromByteArray(Rr.slice(Ir,pr))}function xe(Rr,Ir,pr){pr=Math.min(Rr.length,pr);const Cr=[];let Er=Ir;for(;Er<pr;){const xr=Rr[Er];let si=null,Ci=xr>239?4:xr>223?3:xr>191?2:1;if(Er+Ci<=pr){let bi,Ri,li,zi;switch(Ci){case 1:xr<128&&(si=xr);break;case 2:bi=Rr[Er+1],(bi&192)===128&&(zi=(xr&31)<<6|bi&63,zi>127&&(si=zi));break;case 3:bi=Rr[Er+1],Ri=Rr[Er+2],(bi&192)===128&&(Ri&192)===128&&(zi=(xr&15)<<12|(bi&63)<<6|Ri&63,zi>2047&&(zi<55296||zi>57343)&&(si=zi));break;case 4:bi=Rr[Er+1],Ri=Rr[Er+2],li=Rr[Er+3],(bi&192)===128&&(Ri&192)===128&&(li&192)===128&&(zi=(xr&15)<<18|(bi&63)<<12|(Ri&63)<<6|li&63,zi>65535&&zi<1114112&&(si=zi))}}si===null?(si=65533,Ci=1):si>65535&&(si-=65536,Cr.push(si>>>10&1023|55296),si=56320|si&1023),Cr.push(si),Er+=Ci}return Et(Cr)}const De=4096;function Et(Rr){const Ir=Rr.length;if(Ir<=De)return String.fromCharCode.apply(String,Rr);let pr="",Cr=0;for(;Cr<Ir;)pr+=String.fromCharCode.apply(String,Rr.slice(Cr,Cr+=De));return pr}function st(Rr,Ir,pr){let Cr="";pr=Math.min(Rr.length,pr);for(let Er=Ir;Er<pr;++Er)Cr+=String.fromCharCode(Rr[Er]&127);return Cr}function Dt(Rr,Ir,pr){let Cr="";pr=Math.min(Rr.length,pr);for(let Er=Ir;Er<pr;++Er)Cr+=String.fromCharCode(Rr[Er]);return Cr}function er(Rr,Ir,pr){const Cr=Rr.length;(!Ir||Ir<0)&&(Ir=0),(!pr||pr<0||pr>Cr)&&(pr=Cr);let Er="";for(let xr=Ir;xr<pr;++xr)Er+=zr[Rr[xr]];return Er}function xt(Rr,Ir,pr){const Cr=Rr.slice(Ir,pr);let Er="";for(let xr=0;xr<Cr.length-1;xr+=2)Er+=String.fromCharCode(Cr[xr]+Cr[xr+1]*256);return Er}B.prototype.slice=function(Ir,pr){const Cr=this.length;Ir=~~Ir,pr=pr===void 0?Cr:~~pr,Ir<0?(Ir+=Cr,Ir<0&&(Ir=0)):Ir>Cr&&(Ir=Cr),pr<0?(pr+=Cr,pr<0&&(pr=0)):pr>Cr&&(pr=Cr),pr<Ir&&(pr=Ir);const Er=this.subarray(Ir,pr);return Object.setPrototypeOf(Er,B.prototype),Er};function ir(Rr,Ir,pr){if(Rr%1!==0||Rr<0)throw new RangeError("offset is not uint");if(Rr+Ir>pr)throw new RangeError("Trying to access beyond buffer length")}B.prototype.readUintLE=B.prototype.readUIntLE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=this[Ir],xr=1,si=0;for(;++si<pr&&(xr*=256);)Er+=this[Ir+si]*xr;return Er},B.prototype.readUintBE=B.prototype.readUIntBE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=this[Ir+--pr],xr=1;for(;pr>0&&(xr*=256);)Er+=this[Ir+--pr]*xr;return Er},B.prototype.readUint8=B.prototype.readUInt8=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,1,this.length),this[Ir]},B.prototype.readUint16LE=B.prototype.readUInt16LE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,2,this.length),this[Ir]|this[Ir+1]<<8},B.prototype.readUint16BE=B.prototype.readUInt16BE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,2,this.length),this[Ir]<<8|this[Ir+1]},B.prototype.readUint32LE=B.prototype.readUInt32LE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),(this[Ir]|this[Ir+1]<<8|this[Ir+2]<<16)+this[Ir+3]*16777216},B.prototype.readUint32BE=B.prototype.readUInt32BE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),this[Ir]*16777216+(this[Ir+1]<<16|this[Ir+2]<<8|this[Ir+3])},B.prototype.readBigUInt64LE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=pr+this[++Ir]*2**8+this[++Ir]*2**16+this[++Ir]*2**24,xr=this[++Ir]+this[++Ir]*2**8+this[++Ir]*2**16+Cr*2**24;return BigInt(Er)+(BigInt(xr)<<BigInt(32))}),B.prototype.readBigUInt64BE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=pr*2**24+this[++Ir]*2**16+this[++Ir]*2**8+this[++Ir],xr=this[++Ir]*2**24+this[++Ir]*2**16+this[++Ir]*2**8+Cr;return(BigInt(Er)<<BigInt(32))+BigInt(xr)}),B.prototype.readIntLE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=this[Ir],xr=1,si=0;for(;++si<pr&&(xr*=256);)Er+=this[Ir+si]*xr;return xr*=128,Er>=xr&&(Er-=Math.pow(2,8*pr)),Er},B.prototype.readIntBE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=pr,xr=1,si=this[Ir+--Er];for(;Er>0&&(xr*=256);)si+=this[Ir+--Er]*xr;return xr*=128,si>=xr&&(si-=Math.pow(2,8*pr)),si},B.prototype.readInt8=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,1,this.length),this[Ir]&128?(255-this[Ir]+1)*-1:this[Ir]},B.prototype.readInt16LE=function(Ir,pr){Ir=Ir>>>0,pr||ir(Ir,2,this.length);const Cr=this[Ir]|this[Ir+1]<<8;return Cr&32768?Cr|4294901760:Cr},B.prototype.readInt16BE=function(Ir,pr){Ir=Ir>>>0,pr||ir(Ir,2,this.length);const Cr=this[Ir+1]|this[Ir]<<8;return Cr&32768?Cr|4294901760:Cr},B.prototype.readInt32LE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),this[Ir]|this[Ir+1]<<8|this[Ir+2]<<16|this[Ir+3]<<24},B.prototype.readInt32BE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),this[Ir]<<24|this[Ir+1]<<16|this[Ir+2]<<8|this[Ir+3]},B.prototype.readBigInt64LE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=this[Ir+4]+this[Ir+5]*2**8+this[Ir+6]*2**16+(Cr<<24);return(BigInt(Er)<<BigInt(32))+BigInt(pr+this[++Ir]*2**8+this[++Ir]*2**16+this[++Ir]*2**24)}),B.prototype.readBigInt64BE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=(pr<<24)+this[++Ir]*2**16+this[++Ir]*2**8+this[++Ir];return(BigInt(Er)<<BigInt(32))+BigInt(this[++Ir]*2**24+this[++Ir]*2**16+this[++Ir]*2**8+Cr)}),B.prototype.readFloatLE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),c.read(this,Ir,!0,23,4)},B.prototype.readFloatBE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),c.read(this,Ir,!1,23,4)},B.prototype.readDoubleLE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,8,this.length),c.read(this,Ir,!0,52,8)},B.prototype.readDoubleBE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,8,this.length),c.read(this,Ir,!1,52,8)};function sr(Rr,Ir,pr,Cr,Er,xr){if(!B.isBuffer(Rr))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ir>Er||Ir<xr)throw new RangeError('"value" argument is out of bounds');if(pr+Cr>Rr.length)throw new RangeError("Index out of range")}B.prototype.writeUintLE=B.prototype.writeUIntLE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,Cr=Cr>>>0,!Er){const Ci=Math.pow(2,8*Cr)-1;sr(this,Ir,pr,Cr,Ci,0)}let xr=1,si=0;for(this[pr]=Ir&255;++si<Cr&&(xr*=256);)this[pr+si]=Ir/xr&255;return pr+Cr},B.prototype.writeUintBE=B.prototype.writeUIntBE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,Cr=Cr>>>0,!Er){const Ci=Math.pow(2,8*Cr)-1;sr(this,Ir,pr,Cr,Ci,0)}let xr=Cr-1,si=1;for(this[pr+xr]=Ir&255;--xr>=0&&(si*=256);)this[pr+xr]=Ir/si&255;return pr+Cr},B.prototype.writeUint8=B.prototype.writeUInt8=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,1,255,0),this[pr]=Ir&255,pr+1},B.prototype.writeUint16LE=B.prototype.writeUInt16LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,65535,0),this[pr]=Ir&255,this[pr+1]=Ir>>>8,pr+2},B.prototype.writeUint16BE=B.prototype.writeUInt16BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,65535,0),this[pr]=Ir>>>8,this[pr+1]=Ir&255,pr+2},B.prototype.writeUint32LE=B.prototype.writeUInt32LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,4294967295,0),this[pr+3]=Ir>>>24,this[pr+2]=Ir>>>16,this[pr+1]=Ir>>>8,this[pr]=Ir&255,pr+4},B.prototype.writeUint32BE=B.prototype.writeUInt32BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,4294967295,0),this[pr]=Ir>>>24,this[pr+1]=Ir>>>16,this[pr+2]=Ir>>>8,this[pr+3]=Ir&255,pr+4};function yr(Rr,Ir,pr,Cr,Er){Sr(Ir,Cr,Er,Rr,pr,7);let xr=Number(Ir&BigInt(4294967295));Rr[pr++]=xr,xr=xr>>8,Rr[pr++]=xr,xr=xr>>8,Rr[pr++]=xr,xr=xr>>8,Rr[pr++]=xr;let si=Number(Ir>>BigInt(32)&BigInt(4294967295));return Rr[pr++]=si,si=si>>8,Rr[pr++]=si,si=si>>8,Rr[pr++]=si,si=si>>8,Rr[pr++]=si,pr}function wr(Rr,Ir,pr,Cr,Er){Sr(Ir,Cr,Er,Rr,pr,7);let xr=Number(Ir&BigInt(4294967295));Rr[pr+7]=xr,xr=xr>>8,Rr[pr+6]=xr,xr=xr>>8,Rr[pr+5]=xr,xr=xr>>8,Rr[pr+4]=xr;let si=Number(Ir>>BigInt(32)&BigInt(4294967295));return Rr[pr+3]=si,si=si>>8,Rr[pr+2]=si,si=si>>8,Rr[pr+1]=si,si=si>>8,Rr[pr]=si,pr+8}B.prototype.writeBigUInt64LE=ti(function(Ir,pr=0){return yr(this,Ir,pr,BigInt(0),BigInt("0xffffffffffffffff"))}),B.prototype.writeBigUInt64BE=ti(function(Ir,pr=0){return wr(this,Ir,pr,BigInt(0),BigInt("0xffffffffffffffff"))}),B.prototype.writeIntLE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,!Er){const bi=Math.pow(2,8*Cr-1);sr(this,Ir,pr,Cr,bi-1,-bi)}let xr=0,si=1,Ci=0;for(this[pr]=Ir&255;++xr<Cr&&(si*=256);)Ir<0&&Ci===0&&this[pr+xr-1]!==0&&(Ci=1),this[pr+xr]=(Ir/si>>0)-Ci&255;return pr+Cr},B.prototype.writeIntBE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,!Er){const bi=Math.pow(2,8*Cr-1);sr(this,Ir,pr,Cr,bi-1,-bi)}let xr=Cr-1,si=1,Ci=0;for(this[pr+xr]=Ir&255;--xr>=0&&(si*=256);)Ir<0&&Ci===0&&this[pr+xr+1]!==0&&(Ci=1),this[pr+xr]=(Ir/si>>0)-Ci&255;return pr+Cr},B.prototype.writeInt8=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,1,127,-128),Ir<0&&(Ir=255+Ir+1),this[pr]=Ir&255,pr+1},B.prototype.writeInt16LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,32767,-32768),this[pr]=Ir&255,this[pr+1]=Ir>>>8,pr+2},B.prototype.writeInt16BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,32767,-32768),this[pr]=Ir>>>8,this[pr+1]=Ir&255,pr+2},B.prototype.writeInt32LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,2147483647,-2147483648),this[pr]=Ir&255,this[pr+1]=Ir>>>8,this[pr+2]=Ir>>>16,this[pr+3]=Ir>>>24,pr+4},B.prototype.writeInt32BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,2147483647,-2147483648),Ir<0&&(Ir=4294967295+Ir+1),this[pr]=Ir>>>24,this[pr+1]=Ir>>>16,this[pr+2]=Ir>>>8,this[pr+3]=Ir&255,pr+4},B.prototype.writeBigInt64LE=ti(function(Ir,pr=0){return yr(this,Ir,pr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),B.prototype.writeBigInt64BE=ti(function(Ir,pr=0){return wr(this,Ir,pr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qr(Rr,Ir,pr,Cr,Er,xr){if(pr+Cr>Rr.length)throw new RangeError("Index out of range");if(pr<0)throw new RangeError("Index out of range")}function Mr(Rr,Ir,pr,Cr,Er){return Ir=+Ir,pr=pr>>>0,Er||qr(Rr,Ir,pr,4),c.write(Rr,Ir,pr,Cr,23,4),pr+4}B.prototype.writeFloatLE=function(Ir,pr,Cr){return Mr(this,Ir,pr,!0,Cr)},B.prototype.writeFloatBE=function(Ir,pr,Cr){return Mr(this,Ir,pr,!1,Cr)};function Dr(Rr,Ir,pr,Cr,Er){return Ir=+Ir,pr=pr>>>0,Er||qr(Rr,Ir,pr,8),c.write(Rr,Ir,pr,Cr,52,8),pr+8}B.prototype.writeDoubleLE=function(Ir,pr,Cr){return Dr(this,Ir,pr,!0,Cr)},B.prototype.writeDoubleBE=function(Ir,pr,Cr){return Dr(this,Ir,pr,!1,Cr)},B.prototype.copy=function(Ir,pr,Cr,Er){if(!B.isBuffer(Ir))throw new TypeError("argument should be a Buffer");if(Cr||(Cr=0),!Er&&Er!==0&&(Er=this.length),pr>=Ir.length&&(pr=Ir.length),pr||(pr=0),Er>0&&Er<Cr&&(Er=Cr),Er===Cr||Ir.length===0||this.length===0)return 0;if(pr<0)throw new RangeError("targetStart out of bounds");if(Cr<0||Cr>=this.length)throw new RangeError("Index out of range");if(Er<0)throw new RangeError("sourceEnd out of bounds");Er>this.length&&(Er=this.length),Ir.length-pr<Er-Cr&&(Er=Ir.length-pr+Cr);const xr=Er-Cr;return this===Ir&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(pr,Cr,Er):Uint8Array.prototype.set.call(Ir,this.subarray(Cr,Er),pr),xr},B.prototype.fill=function(Ir,pr,Cr,Er){if(typeof Ir=="string"){if(typeof pr=="string"?(Er=pr,pr=0,Cr=this.length):typeof Cr=="string"&&(Er=Cr,Cr=this.length),Er!==void 0&&typeof Er!="string")throw new TypeError("encoding must be a string");if(typeof Er=="string"&&!B.isEncoding(Er))throw new TypeError("Unknown encoding: "+Er);if(Ir.length===1){const si=Ir.charCodeAt(0);(Er==="utf8"&&si<128||Er==="latin1")&&(Ir=si)}}else typeof Ir=="number"?Ir=Ir&255:typeof Ir=="boolean"&&(Ir=Number(Ir));if(pr<0||this.length<pr||this.length<Cr)throw new RangeError("Out of range index");if(Cr<=pr)return this;pr=pr>>>0,Cr=Cr===void 0?this.length:Cr>>>0,Ir||(Ir=0);let xr;if(typeof Ir=="number")for(xr=pr;xr<Cr;++xr)this[xr]=Ir;else{const si=B.isBuffer(Ir)?Ir:B.from(Ir,Er),Ci=si.length;if(Ci===0)throw new TypeError('The value "'+Ir+'" is invalid for argument "value"');for(xr=0;xr<Cr-pr;++xr)this[xr+pr]=si[xr%Ci]}return this};const Qr={};function Xr(Rr,Ir,pr){Qr[Rr]=class extends pr{constructor(){super(),Object.defineProperty(this,"message",{value:Ir.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Rr}]`,this.stack,delete this.name}get code(){return Rr}set code(Er){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Er,writable:!0})}toString(){return`${this.name} [${Rr}]: ${this.message}`}}}Xr("ERR_BUFFER_OUT_OF_BOUNDS",function(Rr){return Rr?`${Rr} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Xr("ERR_INVALID_ARG_TYPE",function(Rr,Ir){return`The "${Rr}" argument must be of type number. Received type ${typeof Ir}`},TypeError),Xr("ERR_OUT_OF_RANGE",function(Rr,Ir,pr){let Cr=`The value of "${Rr}" is out of range.`,Er=pr;return Number.isInteger(pr)&&Math.abs(pr)>2**32?Er=Wr(String(pr)):typeof pr=="bigint"&&(Er=String(pr),(pr>BigInt(2)**BigInt(32)||pr<-(BigInt(2)**BigInt(32)))&&(Er=Wr(Er)),Er+="n"),Cr+=` It must be ${Ir}. Received ${Er}`,Cr},RangeError);function Wr(Rr){let Ir="",pr=Rr.length;const Cr=Rr[0]==="-"?1:0;for(;pr>=Cr+4;pr-=3)Ir=`_${Rr.slice(pr-3,pr)}${Ir}`;return`${Rr.slice(0,pr)}${Ir}`}function Ur(Rr,Ir,pr){Gr(Ir,"offset"),(Rr[Ir]===void 0||Rr[Ir+pr]===void 0)&&Fr(Ir,Rr.length-(pr+1))}function Sr(Rr,Ir,pr,Cr,Er,xr){if(Rr>pr||Rr<Ir){const si=typeof Ir=="bigint"?"n":"";let Ci;throw Ir===0||Ir===BigInt(0)?Ci=`>= 0${si} and < 2${si} ** ${(xr+1)*8}${si}`:Ci=`>= -(2${si} ** ${(xr+1)*8-1}${si}) and < 2 ** ${(xr+1)*8-1}${si}`,new Qr.ERR_OUT_OF_RANGE("value",Ci,Rr)}Ur(Cr,Er,xr)}function Gr(Rr,Ir){if(typeof Rr!="number")throw new Qr.ERR_INVALID_ARG_TYPE(Ir,"number",Rr)}function Fr(Rr,Ir,pr){throw Math.floor(Rr)!==Rr?(Gr(Rr,pr),new Qr.ERR_OUT_OF_RANGE("offset","an integer",Rr)):Ir<0?new Qr.ERR_BUFFER_OUT_OF_BOUNDS:new Qr.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Ir}`,Rr)}const br=/[^+/0-9A-Za-z-_]/g;function Ar(Rr){if(Rr=Rr.split("=")[0],Rr=Rr.trim().replace(br,""),Rr.length<2)return"";for(;Rr.length%4!==0;)Rr=Rr+"=";return Rr}function cr(Rr,Ir){Ir=Ir||1/0;let pr;const Cr=Rr.length;let Er=null;const xr=[];for(let si=0;si<Cr;++si){if(pr=Rr.charCodeAt(si),pr>55295&&pr<57344){if(!Er){if(pr>56319){(Ir-=3)>-1&&xr.push(239,191,189);continue}else if(si+1===Cr){(Ir-=3)>-1&&xr.push(239,191,189);continue}Er=pr;continue}if(pr<56320){(Ir-=3)>-1&&xr.push(239,191,189),Er=pr;continue}pr=(Er-55296<<10|pr-56320)+65536}else Er&&(Ir-=3)>-1&&xr.push(239,191,189);if(Er=null,pr<128){if((Ir-=1)<0)break;xr.push(pr)}else if(pr<2048){if((Ir-=2)<0)break;xr.push(pr>>6|192,pr&63|128)}else if(pr<65536){if((Ir-=3)<0)break;xr.push(pr>>12|224,pr>>6&63|128,pr&63|128)}else if(pr<1114112){if((Ir-=4)<0)break;xr.push(pr>>18|240,pr>>12&63|128,pr>>6&63|128,pr&63|128)}else throw new Error("Invalid code point")}return xr}function hr(Rr){const Ir=[];for(let pr=0;pr<Rr.length;++pr)Ir.push(Rr.charCodeAt(pr)&255);return Ir}function jr(Rr,Ir){let pr,Cr,Er;const xr=[];for(let si=0;si<Rr.length&&!((Ir-=2)<0);++si)pr=Rr.charCodeAt(si),Cr=pr>>8,Er=pr%256,xr.push(Er),xr.push(Cr);return xr}function fi(Rr){return g.toByteArray(Ar(Rr))}function Bi(Rr,Ir,pr,Cr){let Er;for(Er=0;Er<Cr&&!(Er+pr>=Ir.length||Er>=Rr.length);++Er)Ir[Er+pr]=Rr[Er];return Er}function $r(Rr,Ir){return Rr instanceof Ir||Rr!=null&&Rr.constructor!=null&&Rr.constructor.name!=null&&Rr.constructor.name===Ir.name}function oi(Rr){return Rr!==Rr}const zr=function(){const Rr="0123456789abcdef",Ir=new Array(256);for(let pr=0;pr<16;++pr){const Cr=pr*16;for(let Er=0;Er<16;++Er)Ir[Cr+Er]=Rr[pr]+Rr[Er]}return Ir}();function ti(Rr){return typeof BigInt>"u"?Lr:Rr}function Lr(){throw new Error("BigInt not supported")}}(buffer$2)),buffer$2}var coin$1={},hasRequiredCoin$1;function requireCoin$1(){if(hasRequiredCoin$1)return coin$1;hasRequiredCoin$1=1,Object.defineProperty(coin$1,"__esModule",{value:!0}),coin$1.getCoinSymbol=o;function o(g){var c;return(c={0:"BTC",2:"LTC",3:"DOGE",4:"RDD",5:"DASH",6:"PPC",7:"NMC",8:"FTC",9:"XCP",10:"BLK",11:"NSR",12:"NBT",13:"MZC",14:"VIA",15:"XCH",16:"RBY",17:"GRS",18:"DGC",19:"CCN",20:"DGB",22:"MONA",23:"CLAM",24:"XPM",25:"NEOS",26:"JBS",27:"ZRC",28:"VTC",29:"NXT",30:"BURST",31:"MUE",32:"ZOOM",33:"VASH",34:"CDN",35:"SDC",36:"PKB",37:"PND",38:"START",39:"MOIN",40:"EXP",41:"EMC2",42:"DCR",43:"XEM",44:"PART",45:"ARG",48:"SHR",49:"GCR",50:"NVC",51:"AC",52:"BTCD",53:"DOPE",54:"TPC",55:"AIB",56:"EDRC",57:"SYS",58:"SLR",59:"SMLY",60:"ETH",61:"ETC",62:"PSB",63:"LDCN",65:"XBC",66:"IOP",67:"NXS",68:"INSN",69:"OK",70:"BRIT",71:"CMP",72:"CRW",73:"BELA",74:"ICX",75:"FJC",76:"MIX",77:"XVG",78:"EFL",79:"CLUB",80:"RICHX",81:"POT",82:"QRK",83:"TRC",84:"GRC",85:"AUR",86:"IXC",87:"NLG",88:"BITB",89:"BTA",90:"XMY",91:"BSD",92:"UNO",93:"MTR",94:"GB",95:"SHM",96:"CRX",97:"BIQ",98:"EVO",99:"STO",100:"BIGUP",101:"GAME",102:"DLC",103:"ZYD",104:"DBIC",105:"STRAT",106:"SH",107:"MARS",108:"UBQ",109:"PTC",110:"NRO",111:"ARK",112:"USC",113:"THC",114:"LINX",115:"ECN",116:"DNR",117:"PINK",118:"ATOM",119:"PIVX",120:"FLASH",121:"ZEN",122:"PUT",123:"ZNY",124:"UNIFY",125:"XST",126:"BRK",127:"VC",128:"XMR",129:"VOX",130:"NAV",131:"FCT",132:"EC",133:"ZEC",134:"LSK",135:"STEEM",136:"XZC",137:"RBTC",139:"RPT",140:"LBC",141:"KMD",142:"BSQ",143:"RIC",144:"XRP",145:"BCH",146:"NEBL",147:"ZCL",148:"XLM",149:"NLC2",150:"WHL",151:"ERC",152:"DMD",153:"BTM",154:"BIO",155:"XWCC",156:"BTG",157:"BTC2X",158:"SSN",159:"TOA",160:"BTX",161:"ACC",162:"BCO",163:"ELLA",164:"PIRL",165:"XNO",166:"VIVO",167:"FRST",168:"HNC",169:"BUZZ",170:"MBRS",171:"HC",172:"HTML",173:"ODN",174:"ONX",175:"RVN",176:"GBX",177:"BTCZ",178:"POA",179:"NYC",180:"MXT",181:"WC",182:"MNX",183:"BTCP",184:"MUSIC",185:"BCA",186:"CRAVE",187:"STAK",188:"WBTC",189:"LCH",190:"EXCL",192:"LCC",193:"XFE",194:"EOS",195:"TRX",196:"KOBO",197:"HUSH",198:"BAN",199:"ETF",200:"OMNI",201:"BIFI",202:"UFO",203:"CNMC",204:"BCN",205:"RIN",206:"ATP",207:"EVT",208:"ATN",209:"BIS",210:"NEET",211:"BOPO",212:"OOT",213:"ALIAS",214:"MONK",215:"BOXY",216:"FLO",217:"MEC",218:"BTDX",219:"XAX",220:"ANON",221:"LTZ",222:"BITG",223:"ICP",224:"SMART",225:"XUEZ",226:"HLM",227:"WEB",228:"ACM",229:"NOS",230:"BITC",231:"HTH",232:"TZC",233:"VAR",234:"IOV",235:"FIO",236:"BSV",237:"DXN",238:"QRL",239:"PCX",240:"LOKI",242:"NIM",243:"SOV",244:"JCT",245:"SLP",246:"EWT",247:"UC",248:"EXOS",249:"ECA",250:"SOOM",251:"XRD",252:"FREE",253:"NPW",254:"BST",256:"NANO",257:"BTCC",259:"ZEST",260:"ABT",261:"PION",262:"DT3",263:"ZBUX",264:"KPL",265:"TPAY",266:"ZILLA",267:"ANK",268:"BCC",269:"HPB",270:"ONE",271:"SBC",272:"IPC",273:"DMTC",274:"OGC",275:"SHIT",276:"ANDES",277:"AREPA",278:"BOLI",279:"RIL",280:"HTR",281:"FCTID",282:"BRAVO",283:"ALGO",284:"BZX",285:"GXX",286:"HEAT",287:"XDN",288:"FSN",289:"CPC",290:"BOLD",291:"IOST",292:"TKEY",293:"USE",294:"BCZ",295:"IOC",296:"ASF",297:"MASS",298:"FAIR",299:"NUKO",300:"GNX",301:"DIVI",302:"CMT",303:"EUNO",304:"IOTX",305:"ONION",306:"8BIT",307:"ATC",308:"BTS",309:"CKB",310:"UGAS",311:"ADS",312:"ARA",313:"ZIL",314:"MOAC",315:"SWTC",316:"VNSC",317:"PLUG",318:"MAN",319:"ECC",320:"RPD",321:"RAP",322:"GARD",323:"ZER",324:"EBST",325:"SHARD",326:"MRX",327:"CMM",328:"BLOCK",329:"AUDAX",330:"LUNA",331:"ZPM",332:"KUVA",333:"MEM",334:"CS",335:"SWIFT",336:"FIX",337:"CPC",338:"VGO",339:"DVT",340:"N8V",341:"MTNS",342:"BLAST",343:"DCT",344:"AUX",345:"USDP",346:"HTDF",347:"YEC",348:"QLC",349:"TEA",350:"ARW",351:"MDM",352:"CYB",353:"LTO",354:"DOT",355:"AEON",356:"RES",357:"AYA",358:"DAPS",359:"CSC",360:"VSYS",361:"NOLLAR",362:"XNOS",363:"CPU",364:"LAMB",365:"VCT",366:"CZR",367:"ABBC",368:"HET",369:"XAS",370:"VDL",371:"MED",372:"ZVC",373:"VESTX",374:"DBT",375:"SEOS",376:"MXW",377:"ZNZ",378:"XCX",379:"SOX",380:"NYZO",381:"ULC",382:"RYO",383:"KAL",384:"XSN",385:"DOGEC",386:"BMV",387:"QBC",388:"IMG",389:"QOS",390:"PKT",391:"LHD",392:"CENNZ",393:"HSN",394:"CRO",395:"UMBRU",396:"EVER",397:"NEAR",398:"XPC",399:"ZOC",400:"NIX",401:"UC",402:"GALI",403:"OLT",404:"XBI",405:"DONU",406:"EARTHS",407:"HDD",408:"SUGAR",409:"AILE",410:"TENT",411:"TAN",412:"AIN",413:"MSR",414:"SUMO",415:"ETN",416:"BYTZ",417:"WOW",418:"XTNC",419:"LTHN",420:"NODE",421:"AGM",422:"CCX",423:"TNET",424:"TELOS",425:"AION",426:"BC",427:"KTV",428:"ZCR",429:"ERG",430:"PESO",431:"BTC2",432:"XRPHD",433:"WE",434:"KSM",435:"PCN",436:"NCH",437:"ICU",438:"LN",439:"DTP",440:"BTCR",441:"AERGO",442:"XTH",443:"LV",444:"PHR",445:"VITAE",446:"COCOS",447:"DIN",448:"SPL",449:"YCE",450:"XLR",451:"KTS",452:"DGLD",453:"XNS",454:"EM",455:"SHN",456:"SEELE",457:"AE",458:"ODX",459:"KAVA",460:"GLEEC",461:"FIL",462:"RUTA",463:"CSDT",464:"ETI",465:"ZSLP",466:"ERE",467:"DX",468:"CPS",469:"BTH",470:"MESG",471:"FIMK",472:"AR",473:"OGO",474:"ROSE",475:"BARE",476:"GLEEC",477:"CLR",478:"RNG",479:"OLO",480:"PEXA",481:"MOON",482:"OCEAN",483:"BNT",484:"AMO",485:"FCH",486:"LAT",487:"COIN",488:"VEO",489:"CCA",490:"GFN",491:"BIP",492:"KPG",493:"FIN",494:"BAND",495:"DROP",496:"BHT",497:"LYRA",498:"CS",499:"RUPX",500:"THETA",501:"SOL",502:"THT",503:"CFX",504:"KUMA",505:"HASH",506:"CSPR",507:"EARTH",508:"EGLD",509:"CHI",510:"KOTO",511:"OTC",512:"XRD",513:"SEELEN",514:"AETH",515:"DNA",516:"VEE",517:"SIERRA",518:"LET",519:"BSC",520:"BTCV",521:"ABA",522:"SCC",523:"EDG",524:"AMS",525:"GOSS",526:"BU",527:"GRAM",528:"YAP",529:"SCRT",530:"NOVO",531:"GHOST",532:"HST",533:"PRJ",534:"YOU",535:"XHV",536:"BYND",537:"JOYS",538:"VAL",539:"FLOW",540:"SMESH",541:"SCDO",542:"IQS",543:"BIND",544:"COINEVO",545:"SCRIBE",546:"HYN",547:"BHP",548:"BBC",549:"MKF",550:"XDC",551:"STR",552:"SUM",553:"HBC",555:"BCS",556:"KTS",557:"LKR",558:"TAO",559:"XWC",560:"DEAL",561:"NTY",562:"TOP",564:"AG",565:"CICO",566:"IRIS",567:"NCG",568:"LRG",569:"SERO",570:"BDX",571:"CCXX",572:"SLS",573:"SRM",575:"VIVT",576:"BPS",577:"NKN",578:"ICL",579:"BONO",580:"PLC",581:"DUN",582:"DMCH",583:"CTC",584:"KELP",585:"GBCR",586:"XDAG",587:"PRV",588:"SCAP",589:"TFUEL",590:"GTM",591:"RNL",592:"GRIN",593:"MWC",594:"DOCK",595:"POLYX",596:"DIVER",597:"XEP",598:"APN",599:"TFC",600:"UTE",601:"MTC",602:"NC",603:"XINY",604:"DYN",605:"BUFS",606:"STOS",607:"TON",608:"TAFT",609:"HYDRA",610:"NOR",613:"WCN",614:"OPT",615:"PSWAP",616:"VAL",617:"XOR",618:"SSP",619:"DEI",621:"ZERO",622:"ALPHA",623:"BDECO",624:"NOBL",625:"EAST",626:"KDA",627:"SOUL",628:"LORE",629:"FNR",630:"NEXUS",631:"QTZ",632:"XMA",633:"CALL",634:"VAL",635:"POKT",636:"EMIT",637:"APTOS",638:"ADON",639:"BTSG",640:"LFC",641:"KCS",642:"KCC",643:"AZERO",644:"TREE",645:"LX",646:"XLN",647:"CIC",648:"ZRB",650:"UCO",651:"SFX",652:"SFT",653:"WSFX",654:"USDG",655:"WMP",659:"KOIN",660:"PIRATE",663:"SFRX",666:"ACT",667:"PRKL",668:"SSC",669:"GC",670:"PLGR",671:"MPLGR",672:"KNOX",673:"ZED",674:"CNDL",675:"WLKR",676:"WLKRR",677:"YUNGE",678:"Voken",679:"APL",680:"Evrynet",681:"NENG",682:"CHTA",685:"OAS",686:"KAR",688:"CET",690:"KLV",694:"VTBC",698:"VEIL",699:"GTB",700:"XDAI",701:"COM",702:"CCC",707:"MCOIN",711:"CHC",712:"SERF",713:"XTL",714:"BNB",715:"SIN",716:"DLN",717:"BONTE",718:"PEER",725:"MCX",730:"HEALIOS",731:"BMK",734:"DENTX",737:"ATOP",747:"CFG",750:"XPRT",757:"HONEY",768:"BALLZ",770:"COSA",771:"BR",775:"PLSR",776:"KEY",777:"BTW",780:"PLCUC",781:"PLCUX",782:"PLCU",784:"SUI",786:"UIDD",787:"ACA",788:"BNC",789:"TAU",799:"PDEX",800:"BEET",801:"DST",804:"ZKS",808:"QVT",809:"SDN",810:"ASTR",813:"MEER",818:"VET",819:"REEF",820:"CLO",822:"BDB",827:"ACE",828:"CCN",831:"CRUZ",832:"SAPP",833:"777",834:"KYAN",835:"AZR",836:"CFL",837:"DASHD",838:"TRTT",839:"UCR",840:"PNY",841:"BECN",842:"MONK",843:"SAGA",844:"SUV",845:"ESK",846:"OWO",847:"PEPS",848:"BIR",849:"MOBIC",850:"FLS",852:"DSM",853:"PRCY",858:"HVH",866:"MOB",868:"IF",877:"NAM",880:"LUM",883:"ZBC",886:"ADF",888:"NEO",889:"TOMO",890:"XSEL",896:"LKSC",898:"AS",899:"XEC",900:"LMO",901:"NXT",904:"HNT",907:"FIS",909:"SGE",911:"GERT",916:"META",917:"FRA",919:"CCD",921:"AVN",925:"DIP",928:"GHM",931:"RUNE",945:"UNLOCK",955:"LTP",960:"VKAX",966:"MATIC",968:"UNW",970:"TWINS",977:"TLOS",981:"TAFECO",985:"AU",987:"VCG",988:"XAZAB",989:"AIOZ",990:"CORE",991:"PEC",992:"UNT",993:"XRB",994:"QUAI",995:"CAPS",996:"OKT",997:"SUM",998:"LBTC",999:"BCD",1e3:"BTN",1001:"TT",1002:"BKT",1003:"NODL",1004:"PCOIN",1005:"TAO",1006:"HSK",1007:"FTM",1008:"RPG",1010:"HT",1011:"ELV",1013:"BIC",1020:"EVC",1022:"XRD",1023:"ONE",1024:"ONT",1025:"CZZ",1026:"KEX",1027:"MCM",1032:"BTCR",1042:"MFID",1111:"BBC",1120:"RISE",1122:"CMT",1128:"ETSC",1129:"DFI",1130:"DFI",1137:"$DAG",1145:"CDY",1155:"EFI",1170:"HOO",1234:"ALPH",1284:"GLMR",1285:"MOVR",1298:"WPC",1308:"WEI",1337:"DFC",1397:"HYC",1410:"TENTSLP",1510:"XSC",1512:"AAC",1533:"BEAM",1555:"APC",1616:"ELF",1618:"AUDL",1620:"ATH",1627:"LUME",1642:"NEW",1657:"BTA",1668:"NEOX",1669:"MEWC",1688:"BCX",1729:"XTZ",1776:"LBTC",1777:"BBP",1784:"JPYS",1789:"VEGA",1815:"ADA",1818:"CUBE",1856:"TES",1888:"ZTX",1899:"XEC",1901:"CLC",1919:"VIPS",1926:"CITY",1955:"XX",1977:"XMX",1984:"TRTL",1985:"SLRT",1986:"QTH",1987:"EGEM",1988:"MIRA",1989:"HODL",1990:"PHL",1991:"SC",1996:"MYT",1997:"POLIS",1998:"XMCC",1999:"COLX",2e3:"GIN",2001:"MNP",2002:"MLN",2017:"KIN",2018:"EOSC",2019:"GBT",2020:"PKC",2021:"SKT",2022:"XHT",2048:"MCASH",2049:"TRUE",2086:"KILT",2109:"SAMA",2112:"IoTE",2137:"XRG",2182:"CHZ",2221:"ASK",2301:"QTUM",2302:"ETP",2303:"GXC",2304:"CRP",2305:"ELA",2338:"SNOW",2365:"XIN",2570:"AOA",2718:"NAS",2894:"REOSC",2941:"BND",3003:"LUX",3030:"HBAR",3077:"COS",3276:"CCC",3333:"SXP",3377:"ROI",3381:"DYN",3383:"SEQ",3552:"DEO",3564:"DST",3601:"CY",4040:"FC8",4096:"YEE",4218:"IOTA",4219:"SMR",4242:"AXE",4343:"XYM",4444:"C4E",4919:"XVM",5006:"SBC",5248:"FIC",5353:"HNS",5404:"ISK",5467:"ALTME",5555:"FUND",5757:"STX",5895:"VOW",5920:"SLU",6060:"GO",6174:"MOI",6599:"RSC",6666:"BPA",6688:"SAFE",6779:"COTI",6969:"ROGER",7091:"TOPL",7331:"KLY",7341:"SHFT",7777:"BTV",8e3:"SKY",8192:"PAC",8217:"KLAY",8339:"BTQ",8444:"XCH",8680:"PLMNT",8888:"SBTC",8964:"NULS",8997:"BBC",8998:"JGC",8999:"BTP",9e3:"AVAX",9001:"ARB1",9002:"BOBA",9003:"LOOP",9004:"STRK",9005:"AVAXC",9006:"BSC",9797:"NRG",9888:"BTF",9999:"GOD",1e4:"FO",10226:"RTM",10291:"XRC",10605:"XPI",11111:"ESS",12345:"IPOS",12586:"MINA",13107:"BTY",13108:"YCC",14001:"WAX",15845:"SDGO",16181:"XTX",16754:"ARDR",18e3:"MTR",19165:"SAFE",19167:"FLUX",19169:"RITO",20036:"XND",21004:"C4EI",21888:"PCT",22504:"PWR",25252:"BELL",25718:"CHX",29223:"NEXA",31102:"ESN",33416:"TEO",33878:"BTCS",34952:"BTT",37992:"FXTC",39321:"AMA",42069:"FACT",43028:"AXIV",49262:"EVE",49344:"STASH",52752:"CELO",61616:"TH",65536:"KETH",69420:"GRLC",70007:"GWL",77777:"ZYN",88888:"RYO",99999:"WICC",100500:"HOME",101010:"STC",105105:"STRAX",111111:"KAS",161803:"APTA",200625:"AKA",200665:"GENOM",246529:"ATS",261131:"ZAMA",314159:"PI",333332:"VALUE",333333:"3333",424242:"X42",534352:"SCR",666666:"VITE",888888:"SEA",1048576:"AMAX",1171337:"ILT",1313114:"ETHO",1313500:"XERO",1712144:"LAX",3924011:"EPK",4741444:"HYD",5249353:"BCO",5249354:"BHD",5264462:"PTN",5655640:"VLX",5718350:"WAN",5741564:"WAVES",5741565:"WEST",6382179:"ABC",6517357:"CRM",7562605:"SEM",7567736:"ION",7777777:"FCT",7825266:"WGR",7825267:"OBSR",8163271:"AFS",15118976:"XDS",61717561:"AQUA",88888888:"HATCH",91927009:"kUSD",99999996:"GENS",99999997:"EQ",99999998:"FLUID",99999999:"QKC",608589380:"FVDC"}[g])!==null&&c!==void 0?c:""}return coin$1}var hasRequiredStringHelper;function requireStringHelper(){return hasRequiredStringHelper||(hasRequiredStringHelper=1,function(o){var g=stringHelper&&stringHelper.__createBinding||(Object.create?function(M,U,L,H){H===void 0&&(H=L);var fe=Object.getOwnPropertyDescriptor(U,L);(!fe||("get"in fe?!U.__esModule:fe.writable||fe.configurable))&&(fe={enumerable:!0,get:function(){return U[L]}}),Object.defineProperty(M,H,fe)}:function(M,U,L,H){H===void 0&&(H=L),M[H]=U[L]}),c=stringHelper&&stringHelper.__setModuleDefault||(Object.create?function(M,U){Object.defineProperty(M,"default",{enumerable:!0,value:U})}:function(M,U){M.default=U}),y=stringHelper&&stringHelper.__importStar||function(){var M=function(U){return M=Object.getOwnPropertyNames||function(L){var H=[];for(var fe in L)Object.prototype.hasOwnProperty.call(L,fe)&&(H[H.length]=fe);return H},M(U)};return function(U){if(U&&U.__esModule)return U;var L={};if(U!=null)for(var H=M(U),fe=0;fe<H.length;fe++)H[fe]!=="default"&&g(L,U,H[fe]);return c(L,U),L}}(),t=stringHelper&&stringHelper.__exportStar||function(M,U){for(var L in M)L!=="default"&&!Object.prototype.hasOwnProperty.call(U,L)&&g(U,M,L)};Object.defineProperty(o,"__esModule",{value:!0}),o.uuid=void 0,o.toHex=B,o.toBuffer=D,o.uuidParse=x,o.uuidStringify=v,o.parsePath=F;const d=y(requireCommonjsBrowser());o.uuid=d;const E=requireBuffer$2();t(requireCoin$1(),o);function B(M){return M===void 0?"":E.Buffer.from(M).toString("hex")}function D(M){return E.Buffer.from(M??"","hex")}function x(M){return E.Buffer.from(d.parse(M))}function v(M){return d.stringify(M)}function F(M){return M.replace(/^m\//i,"").split("/").map(L=>{const H=L.endsWith("'");return{index:Number(H?L.substring(0,L.length-1):L),hardened:H}})}}(stringHelper)),stringHelper}var crypto$6={},dist$o={},extendStatics=function(o,g){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,y){c.__proto__=y}||function(c,y){for(var t in y)Object.prototype.hasOwnProperty.call(y,t)&&(c[t]=y[t])},extendStatics(o,g)};function __extends(o,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");extendStatics(o,g);function c(){this.constructor=o}o.prototype=g===null?Object.create(g):(c.prototype=g.prototype,new c)}var __assign=function(){return __assign=Object.assign||function(g){for(var c,y=1,t=arguments.length;y<t;y++){c=arguments[y];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(g[d]=c[d])}return g},__assign.apply(this,arguments)};function __rest(o,g){var c={};for(var y in o)Object.prototype.hasOwnProperty.call(o,y)&&g.indexOf(y)<0&&(c[y]=o[y]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,y=Object.getOwnPropertySymbols(o);t<y.length;t++)g.indexOf(y[t])<0&&Object.prototype.propertyIsEnumerable.call(o,y[t])&&(c[y[t]]=o[y[t]]);return c}function __decorate(o,g,c,y){var t=arguments.length,d=t<3?g:y===null?y=Object.getOwnPropertyDescriptor(g,c):y,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(o,g,c,y);else for(var B=o.length-1;B>=0;B--)(E=o[B])&&(d=(t<3?E(d):t>3?E(g,c,d):E(g,c))||d);return t>3&&d&&Object.defineProperty(g,c,d),d}function __param(o,g){return function(c,y){g(c,y,o)}}function __esDecorate(o,g,c,y,t,d){function E(ge){if(ge!==void 0&&typeof ge!="function")throw new TypeError("Function expected");return ge}for(var B=y.kind,D=B==="getter"?"get":B==="setter"?"set":"value",x=!g&&o?y.static?o:o.prototype:null,v=g||(x?Object.getOwnPropertyDescriptor(x,y.name):{}),F,M=!1,U=c.length-1;U>=0;U--){var L={};for(var H in y)L[H]=H==="access"?{}:y[H];for(var H in y.access)L.access[H]=y.access[H];L.addInitializer=function(ge){if(M)throw new TypeError("Cannot add initializers after decoration has completed");d.push(E(ge||null))};var fe=(0,c[U])(B==="accessor"?{get:v.get,set:v.set}:v[D],L);if(B==="accessor"){if(fe===void 0)continue;if(fe===null||typeof fe!="object")throw new TypeError("Object expected");(F=E(fe.get))&&(v.get=F),(F=E(fe.set))&&(v.set=F),(F=E(fe.init))&&t.unshift(F)}else(F=E(fe))&&(B==="field"?t.unshift(F):v[D]=F)}x&&Object.defineProperty(x,y.name,v),M=!0}function __runInitializers(o,g,c){for(var y=arguments.length>2,t=0;t<g.length;t++)c=y?g[t].call(o,c):g[t].call(o);return y?c:void 0}function __propKey(o){return typeof o=="symbol"?o:"".concat(o)}function __setFunctionName(o,g,c){return typeof g=="symbol"&&(g=g.description?"[".concat(g.description,"]"):""),Object.defineProperty(o,"name",{configurable:!0,value:c?"".concat(c," ",g):g})}function __metadata(o,g){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(o,g)}function __awaiter$1(o,g,c,y){function t(d){return d instanceof c?d:new c(function(E){E(d)})}return new(c||(c=Promise))(function(d,E){function B(v){try{x(y.next(v))}catch(F){E(F)}}function D(v){try{x(y.throw(v))}catch(F){E(F)}}function x(v){v.done?d(v.value):t(v.value).then(B,D)}x((y=y.apply(o,g||[])).next())})}function __generator(o,g){var c={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},y,t,d,E=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return E.next=B(0),E.throw=B(1),E.return=B(2),typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function B(x){return function(v){return D([x,v])}}function D(x){if(y)throw new TypeError("Generator is already executing.");for(;E&&(E=0,x[0]&&(c=0)),c;)try{if(y=1,t&&(d=x[0]&2?t.return:x[0]?t.throw||((d=t.return)&&d.call(t),0):t.next)&&!(d=d.call(t,x[1])).done)return d;switch(t=0,d&&(x=[x[0]&2,d.value]),x[0]){case 0:case 1:d=x;break;case 4:return c.label++,{value:x[1],done:!1};case 5:c.label++,t=x[1],x=[0];continue;case 7:x=c.ops.pop(),c.trys.pop();continue;default:if(d=c.trys,!(d=d.length>0&&d[d.length-1])&&(x[0]===6||x[0]===2)){c=0;continue}if(x[0]===3&&(!d||x[1]>d[0]&&x[1]<d[3])){c.label=x[1];break}if(x[0]===6&&c.label<d[1]){c.label=d[1],d=x;break}if(d&&c.label<d[2]){c.label=d[2],c.ops.push(x);break}d[2]&&c.ops.pop(),c.trys.pop();continue}x=g.call(o,c)}catch(v){x=[6,v],t=0}finally{y=d=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}}var __createBinding=Object.create?function(o,g,c,y){y===void 0&&(y=c);var t=Object.getOwnPropertyDescriptor(g,c);(!t||("get"in t?!g.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return g[c]}}),Object.defineProperty(o,y,t)}:function(o,g,c,y){y===void 0&&(y=c),o[y]=g[c]};function __exportStar(o,g){for(var c in o)c!=="default"&&!Object.prototype.hasOwnProperty.call(g,c)&&__createBinding(g,o,c)}function __values$1(o){var g=typeof Symbol=="function"&&Symbol.iterator,c=g&&o[g],y=0;if(c)return c.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&y>=o.length&&(o=void 0),{value:o&&o[y++],done:!o}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(o,g){var c=typeof Symbol=="function"&&o[Symbol.iterator];if(!c)return o;var y=c.call(o),t,d=[],E;try{for(;(g===void 0||g-- >0)&&!(t=y.next()).done;)d.push(t.value)}catch(B){E={error:B}}finally{try{t&&!t.done&&(c=y.return)&&c.call(y)}finally{if(E)throw E.error}}return d}function __spread(){for(var o=[],g=0;g<arguments.length;g++)o=o.concat(__read(arguments[g]));return o}function __spreadArrays(){for(var o=0,g=0,c=arguments.length;g<c;g++)o+=arguments[g].length;for(var y=Array(o),t=0,g=0;g<c;g++)for(var d=arguments[g],E=0,B=d.length;E<B;E++,t++)y[t]=d[E];return y}function __spreadArray(o,g,c){if(c||arguments.length===2)for(var y=0,t=g.length,d;y<t;y++)(d||!(y in g))&&(d||(d=Array.prototype.slice.call(g,0,y)),d[y]=g[y]);return o.concat(d||Array.prototype.slice.call(g))}function __await(o){return this instanceof __await?(this.v=o,this):new __await(o)}function __asyncGenerator(o,g,c){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var y=c.apply(o,g||[]),t,d=[];return t=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),B("next"),B("throw"),B("return",E),t[Symbol.asyncIterator]=function(){return this},t;function E(U){return function(L){return Promise.resolve(L).then(U,F)}}function B(U,L){y[U]&&(t[U]=function(H){return new Promise(function(fe,ge){d.push([U,H,fe,ge])>1||D(U,H)})},L&&(t[U]=L(t[U])))}function D(U,L){try{x(y[U](L))}catch(H){M(d[0][3],H)}}function x(U){U.value instanceof __await?Promise.resolve(U.value.v).then(v,F):M(d[0][2],U)}function v(U){D("next",U)}function F(U){D("throw",U)}function M(U,L){U(L),d.shift(),d.length&&D(d[0][0],d[0][1])}}function __asyncDelegator(o){var g,c;return g={},y("next"),y("throw",function(t){throw t}),y("return"),g[Symbol.iterator]=function(){return this},g;function y(t,d){g[t]=o[t]?function(E){return(c=!c)?{value:__await(o[t](E)),done:!1}:d?d(E):E}:d}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var g=o[Symbol.asyncIterator],c;return g?g.call(o):(o=typeof __values$1=="function"?__values$1(o):o[Symbol.iterator](),c={},y("next"),y("throw"),y("return"),c[Symbol.asyncIterator]=function(){return this},c);function y(d){c[d]=o[d]&&function(E){return new Promise(function(B,D){E=o[d](E),t(B,D,E.done,E.value)})}}function t(d,E,B,D){Promise.resolve(D).then(function(x){d({value:x,done:B})},E)}}function __makeTemplateObject(o,g){return Object.defineProperty?Object.defineProperty(o,"raw",{value:g}):o.raw=g,o}var __setModuleDefault=Object.create?function(o,g){Object.defineProperty(o,"default",{enumerable:!0,value:g})}:function(o,g){o.default=g},ownKeys=function(o){return ownKeys=Object.getOwnPropertyNames||function(g){var c=[];for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(c[c.length]=y);return c},ownKeys(o)};function __importStar(o){if(o&&o.__esModule)return o;var g={};if(o!=null)for(var c=ownKeys(o),y=0;y<c.length;y++)c[y]!=="default"&&__createBinding(g,o,c[y]);return __setModuleDefault(g,o),g}function __importDefault(o){return o&&o.__esModule?o:{default:o}}function __classPrivateFieldGet(o,g,c,y){if(c==="a"&&!y)throw new TypeError("Private accessor was defined without a getter");if(typeof g=="function"?o!==g||!y:!g.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return c==="m"?y:c==="a"?y.call(o):y?y.value:g.get(o)}function __classPrivateFieldSet(o,g,c,y,t){if(y==="m")throw new TypeError("Private method is not writable");if(y==="a"&&!t)throw new TypeError("Private accessor was defined without a setter");if(typeof g=="function"?o!==g||!t:!g.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return y==="a"?t.call(o,c):t?t.value=c:g.set(o,c),c}function __classPrivateFieldIn(o,g){if(g===null||typeof g!="object"&&typeof g!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof o=="function"?g===o:o.has(g)}function __addDisposableResource(o,g,c){if(g!=null){if(typeof g!="object"&&typeof g!="function")throw new TypeError("Object expected.");var y,t;if(c){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");y=g[Symbol.asyncDispose]}if(y===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");y=g[Symbol.dispose],c&&(t=y)}if(typeof y!="function")throw new TypeError("Object not disposable.");t&&(y=function(){try{t.call(this)}catch(d){return Promise.reject(d)}}),o.stack.push({value:g,dispose:y,async:c})}else c&&o.stack.push({async:!0});return g}var _SuppressedError=typeof SuppressedError=="function"?SuppressedError:function(o,g,c){var y=new Error(c);return y.name="SuppressedError",y.error=o,y.suppressed=g,y};function __disposeResources(o){function g(d){o.error=o.hasError?new _SuppressedError(d,o.error,"An error was suppressed during disposal."):d,o.hasError=!0}var c,y=0;function t(){for(;c=o.stack.pop();)try{if(!c.async&&y===1)return y=0,o.stack.push(c),Promise.resolve().then(t);if(c.dispose){var d=c.dispose.call(c.value);if(c.async)return y|=2,Promise.resolve(d).then(t,function(E){return g(E),t()})}else y|=1}catch(E){g(E)}if(y===1)return o.hasError?Promise.reject(o.error):Promise.resolve();if(o.hasError)throw o.error}return t()}function __rewriteRelativeImportExtension(o,g){return typeof o=="string"&&/^\.\.?\//.test(o)?o.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(c,y,t,d,E){return y?g?".jsx":".js":t&&(!d||!E)?c:t+d+"."+E.toLowerCase()+"js"}):o}const tslib_es6={__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter:__awaiter$1,__generator,__createBinding,__exportStar,__values:__values$1,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__addDisposableResource,__disposeResources,__rewriteRelativeImportExtension},tslib_es6$1=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource,get __assign(){return __assign},__asyncDelegator,__asyncGenerator,__asyncValues,__await,__awaiter:__awaiter$1,__classPrivateFieldGet,__classPrivateFieldIn,__classPrivateFieldSet,__createBinding,__decorate,__disposeResources,__esDecorate,__exportStar,__extends,__generator,__importDefault,__importStar,__makeTemplateObject,__metadata,__param,__propKey,__read,__rest,__rewriteRelativeImportExtension,__runInitializers,__setFunctionName,__spread,__spreadArray,__spreadArrays,__values:__values$1,default:tslib_es6},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(tslib_es6$1);var patchCBOR$2={},utils$h={},lib$8={},cborSync$5={exports:{}},DataItem$2={},hasRequiredDataItem$2;function requireDataItem$2(){if(hasRequiredDataItem$2)return DataItem$2;hasRequiredDataItem$2=1,Object.defineProperty(DataItem$2,"__esModule",{value:!0}),DataItem$2.DataItem=void 0;class o{constructor(c,y){this.setTag=t=>{this.tag=t},this.clearTag=()=>{this.tag=void 0},this.getTag=()=>this.tag,this.getData=()=>this.data,this.data=c,this.tag=y}}return DataItem$2.DataItem=o,DataItem$2}var cborSync$4=cborSync$5.exports,hasRequiredCborSync$2;function requireCborSync$2(){return hasRequiredCborSync$2||(hasRequiredCborSync$2=1,function(o){(function(g,c){o.exports?o.exports=c():g.CBOR=c()})(cborSync$4,function(){const{DataItem:g}=requireDataItem$2();var c=function(){function y(Ne){this.$hex=Ne}y.prototype={length:function(){return this.$hex.length/2},toString:function(Ne){if(!Ne||Ne==="hex"||Ne===16)return this.$hex;if(Ne==="utf-8"){for(var Pe="",ve=0;ve<this.$hex.length;ve+=2)Pe+="%"+this.$hex.substring(ve,ve+2);return decodeURIComponent(Pe)}if(Ne==="latin"){for(var Pe=[],ve=0;ve<this.$hex.length;ve+=2)Pe.push(parseInt(this.$hex.substring(ve,ve+2),16));return String.fromCharCode.apply(String,Pe)}throw new Error("Unrecognised format: "+Ne)}},y.fromLatinString=function(Ne){for(var Pe="",ve=0;ve<Ne.length;ve++){var Fe=Ne.charCodeAt(ve).toString(16);Fe.length===1&&(Fe="0"+Fe),Pe+=Fe}return new y(Pe)},y.fromUtf8String=function(Ne){for(var Pe=encodeURIComponent(Ne),ve="",Fe=0;Fe<Pe.length;Fe++)if(Pe.charAt(Fe)==="%")ve+=Pe.substring(Fe+1,Fe+3),Fe+=2;else{var be=Pe.charCodeAt(Fe).toString(16);be.length<2&&(be="0"+be),ve+=be}return new y(ve)};var t=[],d={},E=function(Ne){return function(){throw new Error(Ne+" not implemented")}};function B(){}B.prototype={peekByte:E("peekByte"),readByte:E("readByte"),readChunk:E("readChunk"),readFloat16:function(){var Ne=this.readUint16(),Pe=(Ne&32767)>>10,ve=Ne&1023,Fe=Ne&32768;if(Pe===31)return ve===0?Fe?-1/0:1/0:NaN;var be=Pe?Math.pow(2,Pe-25)*(1024+ve):Math.pow(2,-24)*ve;return Fe?-be:be},readFloat32:function(){var Ne=this.readUint32(),Pe=(Ne&2147483647)>>23,ve=Ne&8388607,Fe=Ne&2147483648;if(Pe===255)return ve===0?Fe?-1/0:1/0:NaN;var be=Pe?Math.pow(2,Pe-23-127)*(8388608+ve):Math.pow(2,-149)*ve;return Fe?-be:be},readFloat64:function(){var Ne=this.readUint32(),Pe=this.readUint32(),ve=Ne>>20&2047,Fe=(Ne&1048575)*4294967296+Pe,be=Ne&2147483648;if(ve===2047)return Fe===0?be?-1/0:1/0:NaN;var Be=ve?Math.pow(2,ve-52-1023)*(4503599627370496+Fe):Math.pow(2,-1074)*Fe;return be?-Be:Be},readUint16:function(){return this.readByte()*256+this.readByte()},readUint32:function(){return this.readUint16()*65536+this.readUint16()},readUint64:function(){return this.readUint32()*4294967296+this.readUint32()}};function D(){}D.prototype={writeByte:E("writeByte"),result:E("result"),writeFloat16:E("writeFloat16"),writeFloat32:E("writeFloat32"),writeFloat64:E("writeFloat64"),writeUint16:function(Ne){this.writeByte(Ne>>8&255),this.writeByte(Ne&255)},writeUint32:function(Ne){this.writeUint16(Ne>>16&65535),this.writeUint16(Ne&65535)},writeUint64:function(Ne){if(Ne>=9007199254740992||Ne<=-9007199254740992)throw new Error("Cannot encode Uint64 of: "+Ne+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(Ne/4294967296)),this.writeUint32(Ne%4294967296)},writeString:E("writeString"),canWriteBinary:function(Ne){return!1},writeBinary:E("writeChunk")};function x(Ne){var Pe=Ne.readByte(),ve=Pe>>5,Fe=Pe&31;return{type:ve,value:Fe}}function v(Ne,Pe){var ve=Ne.value;if(ve<24)return ve;if(ve==24)return Pe.readByte();if(ve==25)return Pe.readUint16();if(ve==26)return Pe.readUint32();if(ve==27)return Pe.readUint64();if(ve==31)return null;E("Additional info: "+ve)()}function F(Ne,Pe,ve){ve.writeByte(Ne<<5|Pe)}function M(Ne,Pe,ve){var Fe=Ne<<5;Pe<24?ve.writeByte(Fe|Pe):Pe<256?(ve.writeByte(Fe|24),ve.writeByte(Pe)):Pe<65536?(ve.writeByte(Fe|25),ve.writeUint16(Pe)):Pe<4294967296?(ve.writeByte(Fe|26),ve.writeUint32(Pe)):(ve.writeByte(Fe|27),ve.writeUint64(Pe))}var U=new Error;function L(Ne){var Pe=x(Ne);switch(Pe.type){case 0:return v(Pe,Ne);case 1:return-1-v(Pe,Ne);case 2:return Ne.readChunk(v(Pe,Ne));case 3:var ve=Ne.readChunk(v(Pe,Ne));return ve.toString("utf-8");case 4:case 5:var Fe=v(Pe,Ne),Et=[];if(Fe!==null){Pe.type===5&&(Fe*=2);for(var be=0;be<Fe;be++)Et[be]=L(Ne)}else for(var Be;(Be=L(Ne))!==U;)Et.push(Be);if(Pe.type===5){for(var ke={},be=0;be<Et.length;be+=2)ke[Et[be]]=Et[be+1];return ke}else return Et;case 6:var xe=v(Pe,Ne),De=d[xe],Et=L(Ne);return De?De(Et):Et;case 7:if(Pe.value===25)return Ne.readFloat16();if(Pe.value===26)return Ne.readFloat32();if(Pe.value===27)return Ne.readFloat64();switch(v(Pe,Ne)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case null:return U;default:throw new Error("Unknown fixed value: "+Pe.value)}default:throw new Error("Unsupported header: "+JSON.stringify(Pe))}throw new Error("not implemented yet")}function H(Ne,Pe){for(var ve=0;ve<t.length;ve++){var Fe=t[ve].fn(Ne);if(Fe!==void 0)return M(6,t[ve].tag,Pe),H(Fe,Pe)}if(Ne&&typeof Ne.toCBOR=="function"&&(Ne=Ne.toCBOR()),Ne===!1)M(7,20,Pe);else if(Ne===!0)M(7,21,Pe);else if(Ne===null)M(7,22,Pe);else if(Ne===void 0)M(7,23,Pe);else if(typeof Ne=="number")Math.floor(Ne)===Ne&&Ne<9007199254740992&&Ne>-9007199254740992?Ne<0?M(1,-1-Ne,Pe):M(0,Ne,Pe):(F(7,27,Pe),Pe.writeFloat64(Ne));else if(typeof Ne=="string")Pe.writeString(Ne,function(Be){M(3,Be,Pe)});else if(Pe.canWriteBinary(Ne))Pe.writeBinary(Ne,function(Be){M(2,Be,Pe)});else if(typeof Ne=="object")if(Ie.config.useToJSON&&typeof Ne.toJSON=="function"&&(Ne=Ne.toJSON()),Array.isArray(Ne)){M(4,Ne.length,Pe);for(var ve=0;ve<Ne.length;ve++)H(Ne[ve],Pe)}else{var be=Object.keys(Ne);M(5,be.length,Pe);for(var ve=0;ve<be.length;ve++){const ke=parseInt(be[ve]);isNaN(ke)?(H(be[ve],Pe),H(Ne[be[ve]],Pe)):(H(ke,Pe),H(Ne[be[ve]],Pe))}}else throw new Error("CBOR encoding not supported: "+Ne)}var fe=[],ge=[],Ie={config:{useToJSON:!0},addWriter:function(Ne,Pe){typeof Ne=="string"?ge.push(function(ve){if(Ne===ve)return Pe(ve)}):ge.push(Ne)},addReader:function(Ne,Pe){typeof Ne=="string"?fe.push(function(ve,Fe){if(Ne===Fe)return Pe(ve,Fe)}):fe.push(Ne)},encode:function(Ne,Pe){for(var ve=0;ve<ge.length;ve++){var Fe=ge[ve],be=Fe(Pe);if(be)return H(Ne,be),be.result()}throw new Error("Unsupported output format: "+Pe)},encodeDataItem:function(Ne,Pe){for(var ve=0;ve<ge.length;ve++){var Fe=ge[ve],be=Fe(Pe);if(be)return Ne.getTag()!==void 0?(H(Ne,be),be.result()):(H(Ne.getData(),be),be.result())}throw new Error("Unsupported output format: "+Pe)},decode:function(Ne,Pe){for(var ve=0;ve<fe.length;ve++){var Fe=fe[ve],be=Fe(Ne,Pe);if(be)return L(be)}throw new Error("Unsupported input format: "+Pe)},decodeToDataItem:function(Ne,Pe){for(var ve=0;ve<fe.length;ve++){var Fe=fe[ve],be=Fe(Ne,Pe);if(be){const Be=L(be);return Be instanceof g?Be:new g(Be)}}throw new Error("Unsupported input format: "+Pe)},addSemanticEncode:function(Ne,Pe){if(typeof Ne!="number"||Ne%1!==0||Ne<0)throw new Error("Tag must be a positive integer");return t.push({tag:Ne,fn:Pe}),this},addSemanticDecode:function(Ne,Pe){if(typeof Ne!="number"||Ne%1!==0||Ne<0)throw new Error("Tag must be a positive integer");return d[Ne]=Pe,this}};function Ee(Ne){this.buffer=Ne,this.pos=0}Ee.prototype=Object.create(B.prototype),Ee.prototype.peekByte=function(){return this.buffer[this.pos]},Ee.prototype.readByte=function(){return this.buffer[this.pos++]},Ee.prototype.readUint16=function(){var Ne=this.buffer.readUInt16BE(this.pos);return this.pos+=2,Ne},Ee.prototype.readUint32=function(){var Ne=this.buffer.readUInt32BE(this.pos);return this.pos+=4,Ne},Ee.prototype.readFloat32=function(){var Ne=this.buffer.readFloatBE(this.pos);return this.pos+=4,Ne},Ee.prototype.readFloat64=function(){var Ne=this.buffer.readDoubleBE(this.pos);return this.pos+=8,Ne},Ee.prototype.readChunk=function(Ne){var Pe=Buffer.alloc(Ne);return this.buffer.copy(Pe,0,this.pos,this.pos+=Ne),Pe};function Se(Ne){this.byteLength=0,this.defaultBufferLength=16384,this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0,this.completeBuffers=[],this.stringFormat=Ne}Se.prototype=Object.create(D.prototype),Se.prototype.writeByte=function(Ne){this.latestBuffer[this.latestBufferOffset++]=Ne,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0),this.byteLength++},Se.prototype.writeFloat32=function(Ne){var Pe=Buffer.alloc(4);Pe.writeFloatBE(Ne,0),this.writeBuffer(Pe)},Se.prototype.writeFloat64=function(Ne){var Pe=Buffer.alloc(8);Pe.writeDoubleBE(Ne,0),this.writeBuffer(Pe)},Se.prototype.writeString=function(Ne,Pe){var ve=Buffer.from(Ne,"utf-8");Pe(ve.length),this.writeBuffer(ve)},Se.prototype.canWriteBinary=function(Ne){return Ne instanceof Buffer},Se.prototype.writeBinary=function(Ne,Pe){Pe(Ne.length),this.writeBuffer(Ne)},Se.prototype.writeBuffer=function(Ne){if(!(Ne instanceof Buffer))throw new TypeError("BufferWriter only accepts Buffers");this.latestBufferOffset?this.latestBuffer.length-this.latestBufferOffset>=Ne.length?(Ne.copy(this.latestBuffer,this.latestBufferOffset),this.latestBufferOffset+=Ne.length,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0)):(this.completeBuffers.push(this.latestBuffer.slice(0,this.latestBufferOffset)),this.completeBuffers.push(Ne),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0):this.completeBuffers.push(Ne),this.byteLength+=Ne.length},Se.prototype.result=function(){for(var Ne=Buffer.alloc(this.byteLength),Pe=0,ve=0;ve<this.completeBuffers.length;ve++){var Fe=this.completeBuffers[ve];Fe.copy(Ne,Pe,0,Fe.length),Pe+=Fe.length}return this.latestBufferOffset&&this.latestBuffer.copy(Ne,Pe,0,this.latestBufferOffset),this.stringFormat?Ne.toString(this.stringFormat):Ne},typeof Buffer=="function"&&(Ie.addReader(function(Ne,Pe){if(Buffer.isBuffer(Ne))return new Ee(Ne);if(Pe==="hex"||Pe==="base64"){var ve=Buffer.from(Ne,Pe);return new Ee(ve)}}),Ie.addWriter(function(Ne){if(!Ne||Ne==="buffer")return new Se;if(Ne==="hex"||Ne==="base64")return new Se(Ne)}));function ze(Ne){this.hex=Ne,this.pos=0}ze.prototype=Object.create(B.prototype),ze.prototype.peekByte=function(){var Ne=this.hex.substring(this.pos,2);return parseInt(Ne,16)},ze.prototype.readByte=function(){var Ne=this.hex.substring(this.pos,this.pos+2);return this.pos+=2,parseInt(Ne,16)},ze.prototype.readChunk=function(Ne){var Pe=this.hex.substring(this.pos,this.pos+Ne*2);return this.pos+=Ne*2,typeof Buffer=="function"?Buffer.from(Pe,"hex"):new y(Pe)};function He(Ne){this.$hex="",this.finalFormat=Ne||"hex"}return He.prototype=Object.create(D.prototype),He.prototype.writeByte=function(Ne){if(Ne<0||Ne>255)throw new Error("Byte value out of range: "+Ne);var Pe=Ne.toString(16);Pe.length==1&&(Pe="0"+Pe),this.$hex+=Pe},He.prototype.canWriteBinary=function(Ne){return Ne instanceof y||typeof Buffer=="function"&&Ne instanceof Buffer},He.prototype.writeBinary=function(Ne,Pe){if(Ne instanceof y)Pe(Ne.length()),this.$hex+=Ne.$hex;else if(typeof Buffer=="function"&&Ne instanceof Buffer)Pe(Ne.length),this.$hex+=Ne.toString("hex");else throw new TypeError("HexWriter only accepts BinaryHex or Buffers")},He.prototype.result=function(){return this.finalFormat==="buffer"&&typeof Buffer=="function"?Buffer.from(this.$hex,"hex"):new y(this.$hex).toString(this.finalFormat)},He.prototype.writeString=function(Ne,Pe){var ve=y.fromUtf8String(Ne);Pe(ve.length()),this.$hex+=ve.$hex},Ie.addReader(function(Ne,Pe){if(Ne instanceof y||Ne.$hex)return new ze(Ne.$hex);if(Pe==="hex")return new ze(Ne)}),Ie.addWriter(function(Ne){if(Ne==="hex")return new He}),Ie}();return c.addSemanticEncode(0,function(y){if(y instanceof Date)return y.toISOString()}).addSemanticDecode(0,function(y){return new Date(y)}).addSemanticDecode(1,function(y){return new Date(y)}),c})}(cborSync$5)),cborSync$5.exports}var hasRequiredLib$8;function requireLib$8(){return hasRequiredLib$8||(hasRequiredLib$8=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.DataItem=o.addWriter=o.addReader=o.addSemanticEncode=o.addSemanticDecode=o.decodeToDataItem=o.encodeDataItem=void 0;var g=requireCborSync$2();Object.defineProperty(o,"encodeDataItem",{enumerable:!0,get:function(){return g.encodeDataItem}}),Object.defineProperty(o,"decodeToDataItem",{enumerable:!0,get:function(){return g.decodeToDataItem}}),Object.defineProperty(o,"addSemanticDecode",{enumerable:!0,get:function(){return g.addSemanticDecode}}),Object.defineProperty(o,"addSemanticEncode",{enumerable:!0,get:function(){return g.addSemanticEncode}}),Object.defineProperty(o,"addReader",{enumerable:!0,get:function(){return g.addReader}}),Object.defineProperty(o,"addWriter",{enumerable:!0,get:function(){return g.addWriter}});var c=requireDataItem$2();Object.defineProperty(o,"DataItem",{enumerable:!0,get:function(){return c.DataItem}})}(lib$8)),lib$8}var hasRequiredUtils$g;function requireUtils$g(){if(hasRequiredUtils$g)return utils$h;hasRequiredUtils$g=1,Object.defineProperty(utils$h,"__esModule",{value:!0}),utils$h.patchTags=void 0;const o=requireLib$8(),g=[],c=y=>{y.forEach(t=>{g.find(d=>d===t)||((0,o.addSemanticEncode)(t,d=>{if(d instanceof o.DataItem&&d.getTag()===t)return d.getData()}),(0,o.addSemanticDecode)(t,d=>new o.DataItem(d,t)),g.push(t))})};return utils$h.patchTags=c,utils$h}var RegistryType$3={},hasRequiredRegistryType$3;function requireRegistryType$3(){if(hasRequiredRegistryType$3)return RegistryType$3;hasRequiredRegistryType$3=1,Object.defineProperty(RegistryType$3,"__esModule",{value:!0}),RegistryType$3.RegistryTypes=RegistryType$3.RegistryType=void 0;class o{constructor(c,y){this.type=c,this.tag=y,this.getTag=()=>this.tag,this.getType=()=>this.type}}return RegistryType$3.RegistryType=o,RegistryType$3.RegistryTypes={UUID:new o("uuid",37),BYTES:new o("bytes",void 0),CRYPTO_HDKEY:new o("crypto-hdkey",303),CRYPTO_KEYPATH:new o("crypto-keypath",304),CRYPTO_COIN_INFO:new o("crypto-coin-info",305),CRYPTO_ECKEY:new o("crypto-eckey",306),CRYPTO_OUTPUT:new o("crypto-output",308),CRYPTO_PSBT:new o("crypto-psbt",310),CRYPTO_PSBT_EXTEND:new o("crypto-psbt-extend",312),CRYPTO_ACCOUNT:new o("crypto-account",311),CRYPTO_MULTI_ACCOUNTS:new o("crypto-multi-accounts",1103),QR_HARDWARE_CALL:new o("qr-hardware-call",1201),KEY_DERIVATION_CALL:new o("key-derivation-call",1301),KEY_DERIVATION_SCHEMA:new o("key-derivation-schema",1302),DERIVE_CONTEXT_HASH_CALL:new o("derive-context-hash-call",1303)},RegistryType$3}var ScriptExpression$2={},hasRequiredScriptExpression$2;function requireScriptExpression$2(){return hasRequiredScriptExpression$2||(hasRequiredScriptExpression$2=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.ScriptExpressions=o.ScriptExpression=void 0;class g{constructor(y,t){this.tag=y,this.expression=t,this.getTag=()=>this.tag,this.getExpression=()=>this.expression}}o.ScriptExpression=g,g.fromTag=c=>Object.values(o.ScriptExpressions).find(t=>t.getTag()===c),o.ScriptExpressions={SCRIPT_HASH:new g(400,"sh"),WITNESS_SCRIPT_HASH:new g(401,"wsh"),PUBLIC_KEY:new g(402,"pk"),PUBLIC_KEY_HASH:new g(403,"pkh"),WITNESS_PUBLIC_KEY_HASH:new g(404,"wpkh"),COMBO:new g(405,"combo"),MULTISIG:new g(406,"multi"),SORTED_MULTISIG:new g(407,"sortedmulti"),ADDRESS:new g(307,"addr"),RAW_SCRIPT:new g(408,"raw")}}(ScriptExpression$2)),ScriptExpression$2}var hasRequiredPatchCBOR$2;function requirePatchCBOR$2(){if(hasRequiredPatchCBOR$2)return patchCBOR$2;hasRequiredPatchCBOR$2=1,Object.defineProperty(patchCBOR$2,"__esModule",{value:!0});const o=requireUtils$g(),g=requireRegistryType$3(),c=requireScriptExpression$2(),y=Object.values(g.RegistryTypes).filter(d=>!!d.getTag()).map(d=>d.getTag()),t=Object.values(c.ScriptExpressions).map(d=>d.getTag());return(0,o.patchTags)(y.concat(t)),patchCBOR$2}var CryptoHDKey$2={},inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(g,c){c&&(g.super_=c,g.prototype=Object.create(c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(g,c){if(c){g.super_=c;var y=function(){};y.prototype=c.prototype,g.prototype=new y,g.prototype.constructor=g}}),inherits_browser.exports}var safeBuffer$1={exports:{}};var hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(o,g){var c=requireBuffer$2(),y=c.Buffer;function t(E,B){for(var D in E)B[D]=E[D]}y.from&&y.alloc&&y.allocUnsafe&&y.allocUnsafeSlow?o.exports=c:(t(c,g),g.Buffer=d);function d(E,B,D){return y(E,B,D)}d.prototype=Object.create(y.prototype),t(y,d),d.from=function(E,B,D){if(typeof E=="number")throw new TypeError("Argument must not be a number");return y(E,B,D)},d.alloc=function(E,B,D){if(typeof E!="number")throw new TypeError("Argument must be a number");var x=y(E);return B!==void 0?typeof D=="string"?x.fill(B,D):x.fill(B):x.fill(0),x},d.allocUnsafe=function(E){if(typeof E!="number")throw new TypeError("Argument must be a number");return y(E)},d.allocUnsafeSlow=function(E){if(typeof E!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(E)}}(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var readableBrowser$1={exports:{}},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var o=typeof Reflect=="object"?Reflect:null,g=o&&typeof o.apply=="function"?o.apply:function(ze,He,Ne){return Function.prototype.apply.call(ze,He,Ne)},c;o&&typeof o.ownKeys=="function"?c=o.ownKeys:Object.getOwnPropertySymbols?c=function(ze){return Object.getOwnPropertyNames(ze).concat(Object.getOwnPropertySymbols(ze))}:c=function(ze){return Object.getOwnPropertyNames(ze)};function y(Se){console&&console.warn&&console.warn(Se)}var t=Number.isNaN||function(ze){return ze!==ze};function d(){d.init.call(this)}events.exports=d,events.exports.once=ge,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var E=10;function B(Se){if(typeof Se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Se)}Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return E},set:function(Se){if(typeof Se!="number"||Se<0||t(Se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Se+".");E=Se}}),d.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},d.prototype.setMaxListeners=function(ze){if(typeof ze!="number"||ze<0||t(ze))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ze+".");return this._maxListeners=ze,this};function D(Se){return Se._maxListeners===void 0?d.defaultMaxListeners:Se._maxListeners}d.prototype.getMaxListeners=function(){return D(this)},d.prototype.emit=function(ze){for(var He=[],Ne=1;Ne<arguments.length;Ne++)He.push(arguments[Ne]);var Pe=ze==="error",ve=this._events;if(ve!==void 0)Pe=Pe&&ve.error===void 0;else if(!Pe)return!1;if(Pe){var Fe;if(He.length>0&&(Fe=He[0]),Fe instanceof Error)throw Fe;var be=new Error("Unhandled error."+(Fe?" ("+Fe.message+")":""));throw be.context=Fe,be}var Be=ve[ze];if(Be===void 0)return!1;if(typeof Be=="function")g(Be,this,He);else for(var ke=Be.length,xe=L(Be,ke),Ne=0;Ne<ke;++Ne)g(xe[Ne],this,He);return!0};function x(Se,ze,He,Ne){var Pe,ve,Fe;if(B(He),ve=Se._events,ve===void 0?(ve=Se._events=Object.create(null),Se._eventsCount=0):(ve.newListener!==void 0&&(Se.emit("newListener",ze,He.listener?He.listener:He),ve=Se._events),Fe=ve[ze]),Fe===void 0)Fe=ve[ze]=He,++Se._eventsCount;else if(typeof Fe=="function"?Fe=ve[ze]=Ne?[He,Fe]:[Fe,He]:Ne?Fe.unshift(He):Fe.push(He),Pe=D(Se),Pe>0&&Fe.length>Pe&&!Fe.warned){Fe.warned=!0;var be=new Error("Possible EventEmitter memory leak detected. "+Fe.length+" "+String(ze)+" listeners added. Use emitter.setMaxListeners() to increase limit");be.name="MaxListenersExceededWarning",be.emitter=Se,be.type=ze,be.count=Fe.length,y(be)}return Se}d.prototype.addListener=function(ze,He){return x(this,ze,He,!1)},d.prototype.on=d.prototype.addListener,d.prototype.prependListener=function(ze,He){return x(this,ze,He,!0)};function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function F(Se,ze,He){var Ne={fired:!1,wrapFn:void 0,target:Se,type:ze,listener:He},Pe=v.bind(Ne);return Pe.listener=He,Ne.wrapFn=Pe,Pe}d.prototype.once=function(ze,He){return B(He),this.on(ze,F(this,ze,He)),this},d.prototype.prependOnceListener=function(ze,He){return B(He),this.prependListener(ze,F(this,ze,He)),this},d.prototype.removeListener=function(ze,He){var Ne,Pe,ve,Fe,be;if(B(He),Pe=this._events,Pe===void 0)return this;if(Ne=Pe[ze],Ne===void 0)return this;if(Ne===He||Ne.listener===He)--this._eventsCount===0?this._events=Object.create(null):(delete Pe[ze],Pe.removeListener&&this.emit("removeListener",ze,Ne.listener||He));else if(typeof Ne!="function"){for(ve=-1,Fe=Ne.length-1;Fe>=0;Fe--)if(Ne[Fe]===He||Ne[Fe].listener===He){be=Ne[Fe].listener,ve=Fe;break}if(ve<0)return this;ve===0?Ne.shift():H(Ne,ve),Ne.length===1&&(Pe[ze]=Ne[0]),Pe.removeListener!==void 0&&this.emit("removeListener",ze,be||He)}return this},d.prototype.off=d.prototype.removeListener,d.prototype.removeAllListeners=function(ze){var He,Ne,Pe;if(Ne=this._events,Ne===void 0)return this;if(Ne.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ne[ze]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ne[ze]),this;if(arguments.length===0){var ve=Object.keys(Ne),Fe;for(Pe=0;Pe<ve.length;++Pe)Fe=ve[Pe],Fe!=="removeListener"&&this.removeAllListeners(Fe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(He=Ne[ze],typeof He=="function")this.removeListener(ze,He);else if(He!==void 0)for(Pe=He.length-1;Pe>=0;Pe--)this.removeListener(ze,He[Pe]);return this};function M(Se,ze,He){var Ne=Se._events;if(Ne===void 0)return[];var Pe=Ne[ze];return Pe===void 0?[]:typeof Pe=="function"?He?[Pe.listener||Pe]:[Pe]:He?fe(Pe):L(Pe,Pe.length)}d.prototype.listeners=function(ze){return M(this,ze,!0)},d.prototype.rawListeners=function(ze){return M(this,ze,!1)},d.listenerCount=function(Se,ze){return typeof Se.listenerCount=="function"?Se.listenerCount(ze):U.call(Se,ze)},d.prototype.listenerCount=U;function U(Se){var ze=this._events;if(ze!==void 0){var He=ze[Se];if(typeof He=="function")return 1;if(He!==void 0)return He.length}return 0}d.prototype.eventNames=function(){return this._eventsCount>0?c(this._events):[]};function L(Se,ze){for(var He=new Array(ze),Ne=0;Ne<ze;++Ne)He[Ne]=Se[Ne];return He}function H(Se,ze){for(;ze+1<Se.length;ze++)Se[ze]=Se[ze+1];Se.pop()}function fe(Se){for(var ze=new Array(Se.length),He=0;He<ze.length;++He)ze[He]=Se[He].listener||Se[He];return ze}function ge(Se,ze){return new Promise(function(He,Ne){function Pe(Fe){Se.removeListener(ze,ve),Ne(Fe)}function ve(){typeof Se.removeListener=="function"&&Se.removeListener("error",Pe),He([].slice.call(arguments))}Ee(Se,ze,ve,{once:!0}),ze!=="error"&&Ie(Se,Pe,{once:!0})})}function Ie(Se,ze,He){typeof Se.on=="function"&&Ee(Se,"error",ze,He)}function Ee(Se,ze,He,Ne){if(typeof Se.on=="function")Ne.once?Se.once(ze,He):Se.on(ze,He);else if(typeof Se.addEventListener=="function")Se.addEventListener(ze,function Pe(ve){Ne.once&&Se.removeEventListener(ze,Pe),He(ve)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Se)}return events.exports}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$2$2=getAugmentedNamespace(__viteBrowserExternal$1);var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function o(L,H){var fe=Object.keys(L);if(Object.getOwnPropertySymbols){var ge=Object.getOwnPropertySymbols(L);H&&(ge=ge.filter(function(Ie){return Object.getOwnPropertyDescriptor(L,Ie).enumerable})),fe.push.apply(fe,ge)}return fe}function g(L){for(var H=1;H<arguments.length;H++){var fe=arguments[H]!=null?arguments[H]:{};H%2?o(Object(fe),!0).forEach(function(ge){c(L,ge,fe[ge])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(fe)):o(Object(fe)).forEach(function(ge){Object.defineProperty(L,ge,Object.getOwnPropertyDescriptor(fe,ge))})}return L}function c(L,H,fe){return H=E(H),H in L?Object.defineProperty(L,H,{value:fe,enumerable:!0,configurable:!0,writable:!0}):L[H]=fe,L}function y(L,H){if(!(L instanceof H))throw new TypeError("Cannot call a class as a function")}function t(L,H){for(var fe=0;fe<H.length;fe++){var ge=H[fe];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(L,E(ge.key),ge)}}function d(L,H,fe){return H&&t(L.prototype,H),Object.defineProperty(L,"prototype",{writable:!1}),L}function E(L){var H=B(L,"string");return typeof H=="symbol"?H:String(H)}function B(L,H){if(typeof L!="object"||L===null)return L;var fe=L[Symbol.toPrimitive];if(fe!==void 0){var ge=fe.call(L,H);if(typeof ge!="object")return ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(L)}var D=requireBuffer$2(),x=D.Buffer,v=require$$2$2,F=v.inspect,M=F&&F.custom||"inspect";function U(L,H,fe){x.prototype.copy.call(L,H,fe)}return buffer_list=function(){function L(){y(this,L),this.head=null,this.tail=null,this.length=0}return d(L,[{key:"push",value:function(fe){var ge={data:fe,next:null};this.length>0?this.tail.next=ge:this.head=ge,this.tail=ge,++this.length}},{key:"unshift",value:function(fe){var ge={data:fe,next:this.head};this.length===0&&(this.tail=ge),this.head=ge,++this.length}},{key:"shift",value:function(){if(this.length!==0){var fe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,fe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(fe){if(this.length===0)return"";for(var ge=this.head,Ie=""+ge.data;ge=ge.next;)Ie+=fe+ge.data;return Ie}},{key:"concat",value:function(fe){if(this.length===0)return x.alloc(0);for(var ge=x.allocUnsafe(fe>>>0),Ie=this.head,Ee=0;Ie;)U(Ie.data,ge,Ee),Ee+=Ie.data.length,Ie=Ie.next;return ge}},{key:"consume",value:function(fe,ge){var Ie;return fe<this.head.data.length?(Ie=this.head.data.slice(0,fe),this.head.data=this.head.data.slice(fe)):fe===this.head.data.length?Ie=this.shift():Ie=ge?this._getString(fe):this._getBuffer(fe),Ie}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(fe){var ge=this.head,Ie=1,Ee=ge.data;for(fe-=Ee.length;ge=ge.next;){var Se=ge.data,ze=fe>Se.length?Se.length:fe;if(ze===Se.length?Ee+=Se:Ee+=Se.slice(0,fe),fe-=ze,fe===0){ze===Se.length?(++Ie,ge.next?this.head=ge.next:this.head=this.tail=null):(this.head=ge,ge.data=Se.slice(ze));break}++Ie}return this.length-=Ie,Ee}},{key:"_getBuffer",value:function(fe){var ge=x.allocUnsafe(fe),Ie=this.head,Ee=1;for(Ie.data.copy(ge),fe-=Ie.data.length;Ie=Ie.next;){var Se=Ie.data,ze=fe>Se.length?Se.length:fe;if(Se.copy(ge,ge.length-fe,0,ze),fe-=ze,fe===0){ze===Se.length?(++Ee,Ie.next?this.head=Ie.next:this.head=this.tail=null):(this.head=Ie,Ie.data=Se.slice(ze));break}++Ee}return this.length-=Ee,ge}},{key:M,value:function(fe,ge){return F(this,g(g({},ge),{},{depth:0,customInspect:!1}))}}]),L}(),buffer_list}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;function o(E,B){var D=this,x=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return x||v?(B?B(E):E&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ETHWalletProvider.process$1.nextTick(t,this,E)):ETHWalletProvider.process$1.nextTick(t,this,E)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(E||null,function(F){!B&&F?D._writableState?D._writableState.errorEmitted?ETHWalletProvider.process$1.nextTick(c,D):(D._writableState.errorEmitted=!0,ETHWalletProvider.process$1.nextTick(g,D,F)):ETHWalletProvider.process$1.nextTick(g,D,F):B?(ETHWalletProvider.process$1.nextTick(c,D),B(F)):ETHWalletProvider.process$1.nextTick(c,D)}),this)}function g(E,B){t(E,B),c(E)}function c(E){E._writableState&&!E._writableState.emitClose||E._readableState&&!E._readableState.emitClose||E.emit("close")}function y(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function t(E,B){E.emit("error",B)}function d(E,B){var D=E._readableState,x=E._writableState;D&&D.autoDestroy||x&&x.autoDestroy?E.destroy(B):E.emit("error",B)}return destroy_1$1={destroy:o,undestroy:y,errorOrDestroy:d},destroy_1$1}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function o(B,D){B.prototype=Object.create(D.prototype),B.prototype.constructor=B,B.__proto__=D}var g={};function c(B,D,x){x||(x=Error);function v(M,U,L){return typeof D=="string"?D:D(M,U,L)}var F=function(M){o(U,M);function U(L,H,fe){return M.call(this,v(L,H,fe))||this}return U}(x);F.prototype.name=x.name,F.prototype.code=B,g[B]=F}function y(B,D){if(Array.isArray(B)){var x=B.length;return B=B.map(function(v){return String(v)}),x>2?"one of ".concat(D," ").concat(B.slice(0,x-1).join(", "),", or ")+B[x-1]:x===2?"one of ".concat(D," ").concat(B[0]," or ").concat(B[1]):"of ".concat(D," ").concat(B[0])}else return"of ".concat(D," ").concat(String(B))}function t(B,D,x){return B.substr(0,D.length)===D}function d(B,D,x){return(x===void 0||x>B.length)&&(x=B.length),B.substring(x-D.length,x)===D}function E(B,D,x){return typeof x!="number"&&(x=0),x+D.length>B.length?!1:B.indexOf(D,x)!==-1}return c("ERR_INVALID_OPT_VALUE",function(B,D){return'The value "'+D+'" is invalid for option "'+B+'"'},TypeError),c("ERR_INVALID_ARG_TYPE",function(B,D,x){var v;typeof D=="string"&&t(D,"not ")?(v="must not be",D=D.replace(/^not /,"")):v="must be";var F;if(d(B," argument"))F="The ".concat(B," ").concat(v," ").concat(y(D,"type"));else{var M=E(B,".")?"property":"argument";F='The "'.concat(B,'" ').concat(M," ").concat(v," ").concat(y(D,"type"))}return F+=". Received type ".concat(typeof x),F},TypeError),c("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),c("ERR_METHOD_NOT_IMPLEMENTED",function(B){return"The "+B+" method is not implemented"}),c("ERR_STREAM_PREMATURE_CLOSE","Premature close"),c("ERR_STREAM_DESTROYED",function(B){return"Cannot call "+B+" after a stream was destroyed"}),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),c("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),c("ERR_STREAM_WRITE_AFTER_END","write after end"),c("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),c("ERR_UNKNOWN_ENCODING",function(B){return"Unknown encoding: "+B},TypeError),c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=g,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var o=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function g(y,t,d){return y.highWaterMark!=null?y.highWaterMark:t?y[d]:null}function c(y,t,d,E){var B=g(t,E,d);if(B!=null){if(!(isFinite(B)&&Math.floor(B)===B)||B<0){var D=E?d:"highWaterMark";throw new o(D,B)}return Math.floor(B)}return y.objectMode?16:16*1024}return state={getHighWaterMark:c},state}var browser$b,hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b;hasRequiredBrowser$b=1,browser$b=o;function o(c,y){if(g("noDeprecation"))return c;var t=!1;function d(){if(!t){if(g("throwDeprecation"))throw new Error(y);g("traceDeprecation")?console.trace(y):console.warn(y),t=!0}return c.apply(this,arguments)}return d}function g(c){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var y=commonjsGlobal.localStorage[c];return y==null?!1:String(y).toLowerCase()==="true"}return browser$b}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1,_stream_writable$1=Pe;function o(Mr){var Dr=this;this.next=null,this.entry=null,this.finish=function(){qr(Dr,Mr)}}var g;Pe.WritableState=He;var c={deprecate:requireBrowser$b()},y=requireStreamBrowser$1(),t=requireBuffer$2().Buffer,d=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function E(Mr){return t.from(Mr)}function B(Mr){return t.isBuffer(Mr)||Mr instanceof d}var D=requireDestroy$1(),x=requireState(),v=x.getHighWaterMark,F=requireErrorsBrowser().codes,M=F.ERR_INVALID_ARG_TYPE,U=F.ERR_METHOD_NOT_IMPLEMENTED,L=F.ERR_MULTIPLE_CALLBACK,H=F.ERR_STREAM_CANNOT_PIPE,fe=F.ERR_STREAM_DESTROYED,ge=F.ERR_STREAM_NULL_VALUES,Ie=F.ERR_STREAM_WRITE_AFTER_END,Ee=F.ERR_UNKNOWN_ENCODING,Se=D.errorOrDestroy;requireInherits_browser()(Pe,y);function ze(){}function He(Mr,Dr,Qr){g=g||require_stream_duplex$1(),Mr=Mr||{},typeof Qr!="boolean"&&(Qr=Dr instanceof g),this.objectMode=!!Mr.objectMode,Qr&&(this.objectMode=this.objectMode||!!Mr.writableObjectMode),this.highWaterMark=v(this,Mr,"writableHighWaterMark",Qr),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Xr=Mr.decodeStrings===!1;this.decodeStrings=!Xr,this.defaultEncoding=Mr.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Wr){Et(Dr,Wr)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Mr.emitClose!==!1,this.autoDestroy=!!Mr.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}He.prototype.getBuffer=function(){for(var Dr=this.bufferedRequest,Qr=[];Dr;)Qr.push(Dr),Dr=Dr.next;return Qr},function(){try{Object.defineProperty(He.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(Pe,Symbol.hasInstance,{value:function(Dr){return Ne.call(this,Dr)?!0:this!==Pe?!1:Dr&&Dr._writableState instanceof He}})):Ne=function(Dr){return Dr instanceof this};function Pe(Mr){g=g||require_stream_duplex$1();var Dr=this instanceof g;if(!Dr&&!Ne.call(Pe,this))return new Pe(Mr);this._writableState=new He(Mr,this,Dr),this.writable=!0,Mr&&(typeof Mr.write=="function"&&(this._write=Mr.write),typeof Mr.writev=="function"&&(this._writev=Mr.writev),typeof Mr.destroy=="function"&&(this._destroy=Mr.destroy),typeof Mr.final=="function"&&(this._final=Mr.final)),y.call(this)}Pe.prototype.pipe=function(){Se(this,new H)};function ve(Mr,Dr){var Qr=new Ie;Se(Mr,Qr),ETHWalletProvider.process$1.nextTick(Dr,Qr)}function Fe(Mr,Dr,Qr,Xr){var Wr;return Qr===null?Wr=new ge:typeof Qr!="string"&&!Dr.objectMode&&(Wr=new M("chunk",["string","Buffer"],Qr)),Wr?(Se(Mr,Wr),ETHWalletProvider.process$1.nextTick(Xr,Wr),!1):!0}Pe.prototype.write=function(Mr,Dr,Qr){var Xr=this._writableState,Wr=!1,Ur=!Xr.objectMode&&B(Mr);return Ur&&!t.isBuffer(Mr)&&(Mr=E(Mr)),typeof Dr=="function"&&(Qr=Dr,Dr=null),Ur?Dr="buffer":Dr||(Dr=Xr.defaultEncoding),typeof Qr!="function"&&(Qr=ze),Xr.ending?ve(this,Qr):(Ur||Fe(this,Xr,Mr,Qr))&&(Xr.pendingcb++,Wr=Be(this,Xr,Ur,Mr,Dr,Qr)),Wr},Pe.prototype.cork=function(){this._writableState.corked++},Pe.prototype.uncork=function(){var Mr=this._writableState;Mr.corked&&(Mr.corked--,!Mr.writing&&!Mr.corked&&!Mr.bufferProcessing&&Mr.bufferedRequest&&er(this,Mr))},Pe.prototype.setDefaultEncoding=function(Dr){if(typeof Dr=="string"&&(Dr=Dr.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Dr+"").toLowerCase())>-1))throw new Ee(Dr);return this._writableState.defaultEncoding=Dr,this},Object.defineProperty(Pe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function be(Mr,Dr,Qr){return!Mr.objectMode&&Mr.decodeStrings!==!1&&typeof Dr=="string"&&(Dr=t.from(Dr,Qr)),Dr}Object.defineProperty(Pe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Be(Mr,Dr,Qr,Xr,Wr,Ur){if(!Qr){var Sr=be(Dr,Xr,Wr);Xr!==Sr&&(Qr=!0,Wr="buffer",Xr=Sr)}var Gr=Dr.objectMode?1:Xr.length;Dr.length+=Gr;var Fr=Dr.length<Dr.highWaterMark;if(Fr||(Dr.needDrain=!0),Dr.writing||Dr.corked){var br=Dr.lastBufferedRequest;Dr.lastBufferedRequest={chunk:Xr,encoding:Wr,isBuf:Qr,callback:Ur,next:null},br?br.next=Dr.lastBufferedRequest:Dr.bufferedRequest=Dr.lastBufferedRequest,Dr.bufferedRequestCount+=1}else ke(Mr,Dr,!1,Gr,Xr,Wr,Ur);return Fr}function ke(Mr,Dr,Qr,Xr,Wr,Ur,Sr){Dr.writelen=Xr,Dr.writecb=Sr,Dr.writing=!0,Dr.sync=!0,Dr.destroyed?Dr.onwrite(new fe("write")):Qr?Mr._writev(Wr,Dr.onwrite):Mr._write(Wr,Ur,Dr.onwrite),Dr.sync=!1}function xe(Mr,Dr,Qr,Xr,Wr){--Dr.pendingcb,Qr?(ETHWalletProvider.process$1.nextTick(Wr,Xr),ETHWalletProvider.process$1.nextTick(yr,Mr,Dr),Mr._writableState.errorEmitted=!0,Se(Mr,Xr)):(Wr(Xr),Mr._writableState.errorEmitted=!0,Se(Mr,Xr),yr(Mr,Dr))}function De(Mr){Mr.writing=!1,Mr.writecb=null,Mr.length-=Mr.writelen,Mr.writelen=0}function Et(Mr,Dr){var Qr=Mr._writableState,Xr=Qr.sync,Wr=Qr.writecb;if(typeof Wr!="function")throw new L;if(De(Qr),Dr)xe(Mr,Qr,Xr,Dr,Wr);else{var Ur=xt(Qr)||Mr.destroyed;!Ur&&!Qr.corked&&!Qr.bufferProcessing&&Qr.bufferedRequest&&er(Mr,Qr),Xr?ETHWalletProvider.process$1.nextTick(st,Mr,Qr,Ur,Wr):st(Mr,Qr,Ur,Wr)}}function st(Mr,Dr,Qr,Xr){Qr||Dt(Mr,Dr),Dr.pendingcb--,Xr(),yr(Mr,Dr)}function Dt(Mr,Dr){Dr.length===0&&Dr.needDrain&&(Dr.needDrain=!1,Mr.emit("drain"))}function er(Mr,Dr){Dr.bufferProcessing=!0;var Qr=Dr.bufferedRequest;if(Mr._writev&&Qr&&Qr.next){var Xr=Dr.bufferedRequestCount,Wr=new Array(Xr),Ur=Dr.corkedRequestsFree;Ur.entry=Qr;for(var Sr=0,Gr=!0;Qr;)Wr[Sr]=Qr,Qr.isBuf||(Gr=!1),Qr=Qr.next,Sr+=1;Wr.allBuffers=Gr,ke(Mr,Dr,!0,Dr.length,Wr,"",Ur.finish),Dr.pendingcb++,Dr.lastBufferedRequest=null,Ur.next?(Dr.corkedRequestsFree=Ur.next,Ur.next=null):Dr.corkedRequestsFree=new o(Dr),Dr.bufferedRequestCount=0}else{for(;Qr;){var Fr=Qr.chunk,br=Qr.encoding,Ar=Qr.callback,cr=Dr.objectMode?1:Fr.length;if(ke(Mr,Dr,!1,cr,Fr,br,Ar),Qr=Qr.next,Dr.bufferedRequestCount--,Dr.writing)break}Qr===null&&(Dr.lastBufferedRequest=null)}Dr.bufferedRequest=Qr,Dr.bufferProcessing=!1}Pe.prototype._write=function(Mr,Dr,Qr){Qr(new U("_write()"))},Pe.prototype._writev=null,Pe.prototype.end=function(Mr,Dr,Qr){var Xr=this._writableState;return typeof Mr=="function"?(Qr=Mr,Mr=null,Dr=null):typeof Dr=="function"&&(Qr=Dr,Dr=null),Mr!=null&&this.write(Mr,Dr),Xr.corked&&(Xr.corked=1,this.uncork()),Xr.ending||wr(this,Xr,Qr),this},Object.defineProperty(Pe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function xt(Mr){return Mr.ending&&Mr.length===0&&Mr.bufferedRequest===null&&!Mr.finished&&!Mr.writing}function ir(Mr,Dr){Mr._final(function(Qr){Dr.pendingcb--,Qr&&Se(Mr,Qr),Dr.prefinished=!0,Mr.emit("prefinish"),yr(Mr,Dr)})}function sr(Mr,Dr){!Dr.prefinished&&!Dr.finalCalled&&(typeof Mr._final=="function"&&!Dr.destroyed?(Dr.pendingcb++,Dr.finalCalled=!0,ETHWalletProvider.process$1.nextTick(ir,Mr,Dr)):(Dr.prefinished=!0,Mr.emit("prefinish")))}function yr(Mr,Dr){var Qr=xt(Dr);if(Qr&&(sr(Mr,Dr),Dr.pendingcb===0&&(Dr.finished=!0,Mr.emit("finish"),Dr.autoDestroy))){var Xr=Mr._readableState;(!Xr||Xr.autoDestroy&&Xr.endEmitted)&&Mr.destroy()}return Qr}function wr(Mr,Dr,Qr){Dr.ending=!0,yr(Mr,Dr),Qr&&(Dr.finished?ETHWalletProvider.process$1.nextTick(Qr):Mr.once("finish",Qr)),Dr.ended=!0,Mr.writable=!1}function qr(Mr,Dr,Qr){var Xr=Mr.entry;for(Mr.entry=null;Xr;){var Wr=Xr.callback;Dr.pendingcb--,Wr(Qr),Xr=Xr.next}Dr.corkedRequestsFree.next=Mr}return Object.defineProperty(Pe.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Dr){this._writableState&&(this._writableState.destroyed=Dr)}}),Pe.prototype.destroy=D.destroy,Pe.prototype._undestroy=D.undestroy,Pe.prototype._destroy=function(Mr,Dr){Dr(Mr)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var o=Object.keys||function(x){var v=[];for(var F in x)v.push(F);return v};_stream_duplex$1=E;var g=require_stream_readable$1(),c=require_stream_writable$1();requireInherits_browser()(E,g);for(var y=o(c.prototype),t=0;t<y.length;t++){var d=y[t];E.prototype[d]||(E.prototype[d]=c.prototype[d])}function E(x){if(!(this instanceof E))return new E(x);g.call(this,x),c.call(this,x),this.allowHalfOpen=!0,x&&(x.readable===!1&&(this.readable=!1),x.writable===!1&&(this.writable=!1),x.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",B)))}Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function B(){this._writableState.ended||ETHWalletProvider.process$1.nextTick(D,this)}function D(x){x.end()}return Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=v,this._writableState.destroyed=v)}}),_stream_duplex$1}var string_decoder$1={},hasRequiredString_decoder$1;function requireString_decoder$1(){if(hasRequiredString_decoder$1)return string_decoder$1;hasRequiredString_decoder$1=1;var o=requireSafeBuffer$1().Buffer,g=o.isEncoding||function(ge){switch(ge=""+ge,ge&&ge.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(ge){if(!ge)return"utf8";for(var Ie;;)switch(ge){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return ge;default:if(Ie)return;ge=(""+ge).toLowerCase(),Ie=!0}}function y(ge){var Ie=c(ge);if(typeof Ie!="string"&&(o.isEncoding===g||!g(ge)))throw new Error("Unknown encoding: "+ge);return Ie||ge}string_decoder$1.StringDecoder=t;function t(ge){this.encoding=y(ge);var Ie;switch(this.encoding){case"utf16le":this.text=F,this.end=M,Ie=4;break;case"utf8":this.fillLast=D,Ie=4;break;case"base64":this.text=U,this.end=L,Ie=3;break;default:this.write=H,this.end=fe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(Ie)}t.prototype.write=function(ge){if(ge.length===0)return"";var Ie,Ee;if(this.lastNeed){if(Ie=this.fillLast(ge),Ie===void 0)return"";Ee=this.lastNeed,this.lastNeed=0}else Ee=0;return Ee<ge.length?Ie?Ie+this.text(ge,Ee):this.text(ge,Ee):Ie||""},t.prototype.end=v,t.prototype.text=x,t.prototype.fillLast=function(ge){if(this.lastNeed<=ge.length)return ge.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);ge.copy(this.lastChar,this.lastTotal-this.lastNeed,0,ge.length),this.lastNeed-=ge.length};function d(ge){return ge<=127?0:ge>>5===6?2:ge>>4===14?3:ge>>3===30?4:ge>>6===2?-1:-2}function E(ge,Ie,Ee){var Se=Ie.length-1;if(Se<Ee)return 0;var ze=d(Ie[Se]);return ze>=0?(ze>0&&(ge.lastNeed=ze-1),ze):--Se<Ee||ze===-2?0:(ze=d(Ie[Se]),ze>=0?(ze>0&&(ge.lastNeed=ze-2),ze):--Se<Ee||ze===-2?0:(ze=d(Ie[Se]),ze>=0?(ze>0&&(ze===2?ze=0:ge.lastNeed=ze-3),ze):0))}function B(ge,Ie,Ee){if((Ie[0]&192)!==128)return ge.lastNeed=0,"�";if(ge.lastNeed>1&&Ie.length>1){if((Ie[1]&192)!==128)return ge.lastNeed=1,"�";if(ge.lastNeed>2&&Ie.length>2&&(Ie[2]&192)!==128)return ge.lastNeed=2,"�"}}function D(ge){var Ie=this.lastTotal-this.lastNeed,Ee=B(this,ge);if(Ee!==void 0)return Ee;if(this.lastNeed<=ge.length)return ge.copy(this.lastChar,Ie,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);ge.copy(this.lastChar,Ie,0,ge.length),this.lastNeed-=ge.length}function x(ge,Ie){var Ee=E(this,ge,Ie);if(!this.lastNeed)return ge.toString("utf8",Ie);this.lastTotal=Ee;var Se=ge.length-(Ee-this.lastNeed);return ge.copy(this.lastChar,0,Se),ge.toString("utf8",Ie,Se)}function v(ge){var Ie=ge&&ge.length?this.write(ge):"";return this.lastNeed?Ie+"�":Ie}function F(ge,Ie){if((ge.length-Ie)%2===0){var Ee=ge.toString("utf16le",Ie);if(Ee){var Se=Ee.charCodeAt(Ee.length-1);if(Se>=55296&&Se<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ge[ge.length-2],this.lastChar[1]=ge[ge.length-1],Ee.slice(0,-1)}return Ee}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ge[ge.length-1],ge.toString("utf16le",Ie,ge.length-1)}function M(ge){var Ie=ge&&ge.length?this.write(ge):"";if(this.lastNeed){var Ee=this.lastTotal-this.lastNeed;return Ie+this.lastChar.toString("utf16le",0,Ee)}return Ie}function U(ge,Ie){var Ee=(ge.length-Ie)%3;return Ee===0?ge.toString("base64",Ie):(this.lastNeed=3-Ee,this.lastTotal=3,Ee===1?this.lastChar[0]=ge[ge.length-1]:(this.lastChar[0]=ge[ge.length-2],this.lastChar[1]=ge[ge.length-1]),ge.toString("base64",Ie,ge.length-Ee))}function L(ge){var Ie=ge&&ge.length?this.write(ge):"";return this.lastNeed?Ie+this.lastChar.toString("base64",0,3-this.lastNeed):Ie}function H(ge){return ge.toString(this.encoding)}function fe(ge){return ge&&ge.length?this.write(ge):""}return string_decoder$1}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var o=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function g(d){var E=!1;return function(){if(!E){E=!0;for(var B=arguments.length,D=new Array(B),x=0;x<B;x++)D[x]=arguments[x];d.apply(this,D)}}}function c(){}function y(d){return d.setHeader&&typeof d.abort=="function"}function t(d,E,B){if(typeof E=="function")return t(d,null,E);E||(E={}),B=g(B||c);var D=E.readable||E.readable!==!1&&d.readable,x=E.writable||E.writable!==!1&&d.writable,v=function(){d.writable||M()},F=d._writableState&&d._writableState.finished,M=function(){x=!1,F=!0,D||B.call(d)},U=d._readableState&&d._readableState.endEmitted,L=function(){D=!1,U=!0,x||B.call(d)},H=function(Ee){B.call(d,Ee)},fe=function(){var Ee;if(D&&!U)return(!d._readableState||!d._readableState.ended)&&(Ee=new o),B.call(d,Ee);if(x&&!F)return(!d._writableState||!d._writableState.ended)&&(Ee=new o),B.call(d,Ee)},ge=function(){d.req.on("finish",M)};return y(d)?(d.on("complete",M),d.on("abort",fe),d.req?ge():d.on("request",ge)):x&&!d._writableState&&(d.on("end",v),d.on("close",v)),d.on("end",L),d.on("finish",M),E.error!==!1&&d.on("error",H),d.on("close",fe),function(){d.removeListener("complete",M),d.removeListener("abort",fe),d.removeListener("request",ge),d.req&&d.req.removeListener("finish",M),d.removeListener("end",v),d.removeListener("close",v),d.removeListener("finish",M),d.removeListener("end",L),d.removeListener("error",H),d.removeListener("close",fe)}}return endOfStream=t,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var o;function g(Ee,Se,ze){return Se=c(Se),Se in Ee?Object.defineProperty(Ee,Se,{value:ze,enumerable:!0,configurable:!0,writable:!0}):Ee[Se]=ze,Ee}function c(Ee){var Se=y(Ee,"string");return typeof Se=="symbol"?Se:String(Se)}function y(Ee,Se){if(typeof Ee!="object"||Ee===null)return Ee;var ze=Ee[Symbol.toPrimitive];if(ze!==void 0){var He=ze.call(Ee,Se);if(typeof He!="object")return He;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Se==="string"?String:Number)(Ee)}var t=requireEndOfStream(),d=Symbol("lastResolve"),E=Symbol("lastReject"),B=Symbol("error"),D=Symbol("ended"),x=Symbol("lastPromise"),v=Symbol("handlePromise"),F=Symbol("stream");function M(Ee,Se){return{value:Ee,done:Se}}function U(Ee){var Se=Ee[d];if(Se!==null){var ze=Ee[F].read();ze!==null&&(Ee[x]=null,Ee[d]=null,Ee[E]=null,Se(M(ze,!1)))}}function L(Ee){ETHWalletProvider.process$1.nextTick(U,Ee)}function H(Ee,Se){return function(ze,He){Ee.then(function(){if(Se[D]){ze(M(void 0,!0));return}Se[v](ze,He)},He)}}var fe=Object.getPrototypeOf(function(){}),ge=Object.setPrototypeOf((o={get stream(){return this[F]},next:function(){var Se=this,ze=this[B];if(ze!==null)return Promise.reject(ze);if(this[D])return Promise.resolve(M(void 0,!0));if(this[F].destroyed)return new Promise(function(ve,Fe){ETHWalletProvider.process$1.nextTick(function(){Se[B]?Fe(Se[B]):ve(M(void 0,!0))})});var He=this[x],Ne;if(He)Ne=new Promise(H(He,this));else{var Pe=this[F].read();if(Pe!==null)return Promise.resolve(M(Pe,!1));Ne=new Promise(this[v])}return this[x]=Ne,Ne}},g(o,Symbol.asyncIterator,function(){return this}),g(o,"return",function(){var Se=this;return new Promise(function(ze,He){Se[F].destroy(null,function(Ne){if(Ne){He(Ne);return}ze(M(void 0,!0))})})}),o),fe),Ie=function(Se){var ze,He=Object.create(ge,(ze={},g(ze,F,{value:Se,writable:!0}),g(ze,d,{value:null,writable:!0}),g(ze,E,{value:null,writable:!0}),g(ze,B,{value:null,writable:!0}),g(ze,D,{value:Se._readableState.endEmitted,writable:!0}),g(ze,v,{value:function(Pe,ve){var Fe=He[F].read();Fe?(He[x]=null,He[d]=null,He[E]=null,Pe(M(Fe,!1))):(He[d]=Pe,He[E]=ve)},writable:!0}),ze));return He[x]=null,t(Se,function(Ne){if(Ne&&Ne.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Pe=He[E];Pe!==null&&(He[x]=null,He[d]=null,He[E]=null,Pe(Ne)),He[B]=Ne;return}var ve=He[d];ve!==null&&(He[x]=null,He[d]=null,He[E]=null,ve(M(void 0,!0))),He[D]=!0}),Se.on("readable",L.bind(null,He)),He};return async_iterator=Ie,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1,_stream_readable$1=ve;var o;ve.ReadableState=Pe,requireEvents().EventEmitter;var g=function(Sr,Gr){return Sr.listeners(Gr).length},c=requireStreamBrowser$1(),y=requireBuffer$2().Buffer,t=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function d(Ur){return y.from(Ur)}function E(Ur){return y.isBuffer(Ur)||Ur instanceof t}var B=require$$2$2,D;B&&B.debuglog?D=B.debuglog("stream"):D=function(){};var x=requireBuffer_list(),v=requireDestroy$1(),F=requireState(),M=F.getHighWaterMark,U=requireErrorsBrowser().codes,L=U.ERR_INVALID_ARG_TYPE,H=U.ERR_STREAM_PUSH_AFTER_EOF,fe=U.ERR_METHOD_NOT_IMPLEMENTED,ge=U.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ie,Ee,Se;requireInherits_browser()(ve,c);var ze=v.errorOrDestroy,He=["error","close","destroy","pause","resume"];function Ne(Ur,Sr,Gr){if(typeof Ur.prependListener=="function")return Ur.prependListener(Sr,Gr);!Ur._events||!Ur._events[Sr]?Ur.on(Sr,Gr):Array.isArray(Ur._events[Sr])?Ur._events[Sr].unshift(Gr):Ur._events[Sr]=[Gr,Ur._events[Sr]]}function Pe(Ur,Sr,Gr){o=o||require_stream_duplex$1(),Ur=Ur||{},typeof Gr!="boolean"&&(Gr=Sr instanceof o),this.objectMode=!!Ur.objectMode,Gr&&(this.objectMode=this.objectMode||!!Ur.readableObjectMode),this.highWaterMark=M(this,Ur,"readableHighWaterMark",Gr),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Ur.emitClose!==!1,this.autoDestroy=!!Ur.autoDestroy,this.destroyed=!1,this.defaultEncoding=Ur.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ur.encoding&&(Ie||(Ie=requireString_decoder$1().StringDecoder),this.decoder=new Ie(Ur.encoding),this.encoding=Ur.encoding)}function ve(Ur){if(o=o||require_stream_duplex$1(),!(this instanceof ve))return new ve(Ur);var Sr=this instanceof o;this._readableState=new Pe(Ur,this,Sr),this.readable=!0,Ur&&(typeof Ur.read=="function"&&(this._read=Ur.read),typeof Ur.destroy=="function"&&(this._destroy=Ur.destroy)),c.call(this)}Object.defineProperty(ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Sr){this._readableState&&(this._readableState.destroyed=Sr)}}),ve.prototype.destroy=v.destroy,ve.prototype._undestroy=v.undestroy,ve.prototype._destroy=function(Ur,Sr){Sr(Ur)},ve.prototype.push=function(Ur,Sr){var Gr=this._readableState,Fr;return Gr.objectMode?Fr=!0:typeof Ur=="string"&&(Sr=Sr||Gr.defaultEncoding,Sr!==Gr.encoding&&(Ur=y.from(Ur,Sr),Sr=""),Fr=!0),Fe(this,Ur,Sr,!1,Fr)},ve.prototype.unshift=function(Ur){return Fe(this,Ur,null,!0,!1)};function Fe(Ur,Sr,Gr,Fr,br){D("readableAddChunk",Sr);var Ar=Ur._readableState;if(Sr===null)Ar.reading=!1,Et(Ur,Ar);else{var cr;if(br||(cr=Be(Ar,Sr)),cr)ze(Ur,cr);else if(Ar.objectMode||Sr&&Sr.length>0)if(typeof Sr!="string"&&!Ar.objectMode&&Object.getPrototypeOf(Sr)!==y.prototype&&(Sr=d(Sr)),Fr)Ar.endEmitted?ze(Ur,new ge):be(Ur,Ar,Sr,!0);else if(Ar.ended)ze(Ur,new H);else{if(Ar.destroyed)return!1;Ar.reading=!1,Ar.decoder&&!Gr?(Sr=Ar.decoder.write(Sr),Ar.objectMode||Sr.length!==0?be(Ur,Ar,Sr,!1):er(Ur,Ar)):be(Ur,Ar,Sr,!1)}else Fr||(Ar.reading=!1,er(Ur,Ar))}return!Ar.ended&&(Ar.length<Ar.highWaterMark||Ar.length===0)}function be(Ur,Sr,Gr,Fr){Sr.flowing&&Sr.length===0&&!Sr.sync?(Sr.awaitDrain=0,Ur.emit("data",Gr)):(Sr.length+=Sr.objectMode?1:Gr.length,Fr?Sr.buffer.unshift(Gr):Sr.buffer.push(Gr),Sr.needReadable&&st(Ur)),er(Ur,Sr)}function Be(Ur,Sr){var Gr;return!E(Sr)&&typeof Sr!="string"&&Sr!==void 0&&!Ur.objectMode&&(Gr=new L("chunk",["string","Buffer","Uint8Array"],Sr)),Gr}ve.prototype.isPaused=function(){return this._readableState.flowing===!1},ve.prototype.setEncoding=function(Ur){Ie||(Ie=requireString_decoder$1().StringDecoder);var Sr=new Ie(Ur);this._readableState.decoder=Sr,this._readableState.encoding=this._readableState.decoder.encoding;for(var Gr=this._readableState.buffer.head,Fr="";Gr!==null;)Fr+=Sr.write(Gr.data),Gr=Gr.next;return this._readableState.buffer.clear(),Fr!==""&&this._readableState.buffer.push(Fr),this._readableState.length=Fr.length,this};var ke=1073741824;function xe(Ur){return Ur>=ke?Ur=ke:(Ur--,Ur|=Ur>>>1,Ur|=Ur>>>2,Ur|=Ur>>>4,Ur|=Ur>>>8,Ur|=Ur>>>16,Ur++),Ur}function De(Ur,Sr){return Ur<=0||Sr.length===0&&Sr.ended?0:Sr.objectMode?1:Ur!==Ur?Sr.flowing&&Sr.length?Sr.buffer.head.data.length:Sr.length:(Ur>Sr.highWaterMark&&(Sr.highWaterMark=xe(Ur)),Ur<=Sr.length?Ur:Sr.ended?Sr.length:(Sr.needReadable=!0,0))}ve.prototype.read=function(Ur){D("read",Ur),Ur=parseInt(Ur,10);var Sr=this._readableState,Gr=Ur;if(Ur!==0&&(Sr.emittedReadable=!1),Ur===0&&Sr.needReadable&&((Sr.highWaterMark!==0?Sr.length>=Sr.highWaterMark:Sr.length>0)||Sr.ended))return D("read: emitReadable",Sr.length,Sr.ended),Sr.length===0&&Sr.ended?Qr(this):st(this),null;if(Ur=De(Ur,Sr),Ur===0&&Sr.ended)return Sr.length===0&&Qr(this),null;var Fr=Sr.needReadable;D("need readable",Fr),(Sr.length===0||Sr.length-Ur<Sr.highWaterMark)&&(Fr=!0,D("length less than watermark",Fr)),Sr.ended||Sr.reading?(Fr=!1,D("reading or ended",Fr)):Fr&&(D("do read"),Sr.reading=!0,Sr.sync=!0,Sr.length===0&&(Sr.needReadable=!0),this._read(Sr.highWaterMark),Sr.sync=!1,Sr.reading||(Ur=De(Gr,Sr)));var br;return Ur>0?br=Dr(Ur,Sr):br=null,br===null?(Sr.needReadable=Sr.length<=Sr.highWaterMark,Ur=0):(Sr.length-=Ur,Sr.awaitDrain=0),Sr.length===0&&(Sr.ended||(Sr.needReadable=!0),Gr!==Ur&&Sr.ended&&Qr(this)),br!==null&&this.emit("data",br),br};function Et(Ur,Sr){if(D("onEofChunk"),!Sr.ended){if(Sr.decoder){var Gr=Sr.decoder.end();Gr&&Gr.length&&(Sr.buffer.push(Gr),Sr.length+=Sr.objectMode?1:Gr.length)}Sr.ended=!0,Sr.sync?st(Ur):(Sr.needReadable=!1,Sr.emittedReadable||(Sr.emittedReadable=!0,Dt(Ur)))}}function st(Ur){var Sr=Ur._readableState;D("emitReadable",Sr.needReadable,Sr.emittedReadable),Sr.needReadable=!1,Sr.emittedReadable||(D("emitReadable",Sr.flowing),Sr.emittedReadable=!0,ETHWalletProvider.process$1.nextTick(Dt,Ur))}function Dt(Ur){var Sr=Ur._readableState;D("emitReadable_",Sr.destroyed,Sr.length,Sr.ended),!Sr.destroyed&&(Sr.length||Sr.ended)&&(Ur.emit("readable"),Sr.emittedReadable=!1),Sr.needReadable=!Sr.flowing&&!Sr.ended&&Sr.length<=Sr.highWaterMark,Mr(Ur)}function er(Ur,Sr){Sr.readingMore||(Sr.readingMore=!0,ETHWalletProvider.process$1.nextTick(xt,Ur,Sr))}function xt(Ur,Sr){for(;!Sr.reading&&!Sr.ended&&(Sr.length<Sr.highWaterMark||Sr.flowing&&Sr.length===0);){var Gr=Sr.length;if(D("maybeReadMore read 0"),Ur.read(0),Gr===Sr.length)break}Sr.readingMore=!1}ve.prototype._read=function(Ur){ze(this,new fe("_read()"))},ve.prototype.pipe=function(Ur,Sr){var Gr=this,Fr=this._readableState;switch(Fr.pipesCount){case 0:Fr.pipes=Ur;break;case 1:Fr.pipes=[Fr.pipes,Ur];break;default:Fr.pipes.push(Ur);break}Fr.pipesCount+=1,D("pipe count=%d opts=%j",Fr.pipesCount,Sr);var br=(!Sr||Sr.end!==!1)&&Ur!==ETHWalletProvider.process$1.stdout&&Ur!==ETHWalletProvider.process$1.stderr,Ar=br?hr:Lr;Fr.endEmitted?ETHWalletProvider.process$1.nextTick(Ar):Gr.once("end",Ar),Ur.on("unpipe",cr);function cr(Rr,Ir){D("onunpipe"),Rr===Gr&&Ir&&Ir.hasUnpiped===!1&&(Ir.hasUnpiped=!0,Bi())}function hr(){D("onend"),Ur.end()}var jr=ir(Gr);Ur.on("drain",jr);var fi=!1;function Bi(){D("cleanup"),Ur.removeListener("close",zr),Ur.removeListener("finish",ti),Ur.removeListener("drain",jr),Ur.removeListener("error",oi),Ur.removeListener("unpipe",cr),Gr.removeListener("end",hr),Gr.removeListener("end",Lr),Gr.removeListener("data",$r),fi=!0,Fr.awaitDrain&&(!Ur._writableState||Ur._writableState.needDrain)&&jr()}Gr.on("data",$r);function $r(Rr){D("ondata");var Ir=Ur.write(Rr);D("dest.write",Ir),Ir===!1&&((Fr.pipesCount===1&&Fr.pipes===Ur||Fr.pipesCount>1&&Wr(Fr.pipes,Ur)!==-1)&&!fi&&(D("false write response, pause",Fr.awaitDrain),Fr.awaitDrain++),Gr.pause())}function oi(Rr){D("onerror",Rr),Lr(),Ur.removeListener("error",oi),g(Ur,"error")===0&&ze(Ur,Rr)}Ne(Ur,"error",oi);function zr(){Ur.removeListener("finish",ti),Lr()}Ur.once("close",zr);function ti(){D("onfinish"),Ur.removeListener("close",zr),Lr()}Ur.once("finish",ti);function Lr(){D("unpipe"),Gr.unpipe(Ur)}return Ur.emit("pipe",Gr),Fr.flowing||(D("pipe resume"),Gr.resume()),Ur};function ir(Ur){return function(){var Gr=Ur._readableState;D("pipeOnDrain",Gr.awaitDrain),Gr.awaitDrain&&Gr.awaitDrain--,Gr.awaitDrain===0&&g(Ur,"data")&&(Gr.flowing=!0,Mr(Ur))}}ve.prototype.unpipe=function(Ur){var Sr=this._readableState,Gr={hasUnpiped:!1};if(Sr.pipesCount===0)return this;if(Sr.pipesCount===1)return Ur&&Ur!==Sr.pipes?this:(Ur||(Ur=Sr.pipes),Sr.pipes=null,Sr.pipesCount=0,Sr.flowing=!1,Ur&&Ur.emit("unpipe",this,Gr),this);if(!Ur){var Fr=Sr.pipes,br=Sr.pipesCount;Sr.pipes=null,Sr.pipesCount=0,Sr.flowing=!1;for(var Ar=0;Ar<br;Ar++)Fr[Ar].emit("unpipe",this,{hasUnpiped:!1});return this}var cr=Wr(Sr.pipes,Ur);return cr===-1?this:(Sr.pipes.splice(cr,1),Sr.pipesCount-=1,Sr.pipesCount===1&&(Sr.pipes=Sr.pipes[0]),Ur.emit("unpipe",this,Gr),this)},ve.prototype.on=function(Ur,Sr){var Gr=c.prototype.on.call(this,Ur,Sr),Fr=this._readableState;return Ur==="data"?(Fr.readableListening=this.listenerCount("readable")>0,Fr.flowing!==!1&&this.resume()):Ur==="readable"&&!Fr.endEmitted&&!Fr.readableListening&&(Fr.readableListening=Fr.needReadable=!0,Fr.flowing=!1,Fr.emittedReadable=!1,D("on readable",Fr.length,Fr.reading),Fr.length?st(this):Fr.reading||ETHWalletProvider.process$1.nextTick(yr,this)),Gr},ve.prototype.addListener=ve.prototype.on,ve.prototype.removeListener=function(Ur,Sr){var Gr=c.prototype.removeListener.call(this,Ur,Sr);return Ur==="readable"&&ETHWalletProvider.process$1.nextTick(sr,this),Gr},ve.prototype.removeAllListeners=function(Ur){var Sr=c.prototype.removeAllListeners.apply(this,arguments);return(Ur==="readable"||Ur===void 0)&&ETHWalletProvider.process$1.nextTick(sr,this),Sr};function sr(Ur){var Sr=Ur._readableState;Sr.readableListening=Ur.listenerCount("readable")>0,Sr.resumeScheduled&&!Sr.paused?Sr.flowing=!0:Ur.listenerCount("data")>0&&Ur.resume()}function yr(Ur){D("readable nexttick read 0"),Ur.read(0)}ve.prototype.resume=function(){var Ur=this._readableState;return Ur.flowing||(D("resume"),Ur.flowing=!Ur.readableListening,wr(this,Ur)),Ur.paused=!1,this};function wr(Ur,Sr){Sr.resumeScheduled||(Sr.resumeScheduled=!0,ETHWalletProvider.process$1.nextTick(qr,Ur,Sr))}function qr(Ur,Sr){D("resume",Sr.reading),Sr.reading||Ur.read(0),Sr.resumeScheduled=!1,Ur.emit("resume"),Mr(Ur),Sr.flowing&&!Sr.reading&&Ur.read(0)}ve.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Mr(Ur){var Sr=Ur._readableState;for(D("flow",Sr.flowing);Sr.flowing&&Ur.read()!==null;);}ve.prototype.wrap=function(Ur){var Sr=this,Gr=this._readableState,Fr=!1;Ur.on("end",function(){if(D("wrapped end"),Gr.decoder&&!Gr.ended){var cr=Gr.decoder.end();cr&&cr.length&&Sr.push(cr)}Sr.push(null)}),Ur.on("data",function(cr){if(D("wrapped data"),Gr.decoder&&(cr=Gr.decoder.write(cr)),!(Gr.objectMode&&cr==null)&&!(!Gr.objectMode&&(!cr||!cr.length))){var hr=Sr.push(cr);hr||(Fr=!0,Ur.pause())}});for(var br in Ur)this[br]===void 0&&typeof Ur[br]=="function"&&(this[br]=function(hr){return function(){return Ur[hr].apply(Ur,arguments)}}(br));for(var Ar=0;Ar<He.length;Ar++)Ur.on(He[Ar],this.emit.bind(this,He[Ar]));return this._read=function(cr){D("wrapped _read",cr),Fr&&(Fr=!1,Ur.resume())},this},typeof Symbol=="function"&&(ve.prototype[Symbol.asyncIterator]=function(){return Ee===void 0&&(Ee=requireAsync_iterator()),Ee(this)}),Object.defineProperty(ve.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ve.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ve.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Sr){this._readableState&&(this._readableState.flowing=Sr)}}),ve._fromList=Dr,Object.defineProperty(ve.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Dr(Ur,Sr){if(Sr.length===0)return null;var Gr;return Sr.objectMode?Gr=Sr.buffer.shift():!Ur||Ur>=Sr.length?(Sr.decoder?Gr=Sr.buffer.join(""):Sr.buffer.length===1?Gr=Sr.buffer.first():Gr=Sr.buffer.concat(Sr.length),Sr.buffer.clear()):Gr=Sr.buffer.consume(Ur,Sr.decoder),Gr}function Qr(Ur){var Sr=Ur._readableState;D("endReadable",Sr.endEmitted),Sr.endEmitted||(Sr.ended=!0,ETHWalletProvider.process$1.nextTick(Xr,Sr,Ur))}function Xr(Ur,Sr){if(D("endReadableNT",Ur.endEmitted,Ur.length),!Ur.endEmitted&&Ur.length===0&&(Ur.endEmitted=!0,Sr.readable=!1,Sr.emit("end"),Ur.autoDestroy)){var Gr=Sr._writableState;(!Gr||Gr.autoDestroy&&Gr.finished)&&Sr.destroy()}}typeof Symbol=="function"&&(ve.from=function(Ur,Sr){return Se===void 0&&(Se=requireFromBrowser()),Se(ve,Ur,Sr)});function Wr(Ur,Sr){for(var Gr=0,Fr=Ur.length;Gr<Fr;Gr++)if(Ur[Gr]===Sr)return Gr;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=B;var o=requireErrorsBrowser().codes,g=o.ERR_METHOD_NOT_IMPLEMENTED,c=o.ERR_MULTIPLE_CALLBACK,y=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=o.ERR_TRANSFORM_WITH_LENGTH_0,d=require_stream_duplex$1();requireInherits_browser()(B,d);function E(v,F){var M=this._transformState;M.transforming=!1;var U=M.writecb;if(U===null)return this.emit("error",new c);M.writechunk=null,M.writecb=null,F!=null&&this.push(F),U(v);var L=this._readableState;L.reading=!1,(L.needReadable||L.length<L.highWaterMark)&&this._read(L.highWaterMark)}function B(v){if(!(this instanceof B))return new B(v);d.call(this,v),this._transformState={afterTransform:E.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,v&&(typeof v.transform=="function"&&(this._transform=v.transform),typeof v.flush=="function"&&(this._flush=v.flush)),this.on("prefinish",D)}function D(){var v=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(F,M){x(v,F,M)}):x(this,null,null)}B.prototype.push=function(v,F){return this._transformState.needTransform=!1,d.prototype.push.call(this,v,F)},B.prototype._transform=function(v,F,M){M(new g("_transform()"))},B.prototype._write=function(v,F,M){var U=this._transformState;if(U.writecb=M,U.writechunk=v,U.writeencoding=F,!U.transforming){var L=this._readableState;(U.needTransform||L.needReadable||L.length<L.highWaterMark)&&this._read(L.highWaterMark)}},B.prototype._read=function(v){var F=this._transformState;F.writechunk!==null&&!F.transforming?(F.transforming=!0,this._transform(F.writechunk,F.writeencoding,F.afterTransform)):F.needTransform=!0},B.prototype._destroy=function(v,F){d.prototype._destroy.call(this,v,function(M){F(M)})};function x(v,F,M){if(F)return v.emit("error",F);if(M!=null&&v.push(M),v._writableState.length)throw new t;if(v._transformState.transforming)throw new y;return v.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=g;var o=require_stream_transform$1();requireInherits_browser()(g,o);function g(c){if(!(this instanceof g))return new g(c);o.call(this,c)}return g.prototype._transform=function(c,y,t){t(null,c)},_stream_passthrough$1}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var o;function g(M){var U=!1;return function(){U||(U=!0,M.apply(void 0,arguments))}}var c=requireErrorsBrowser().codes,y=c.ERR_MISSING_ARGS,t=c.ERR_STREAM_DESTROYED;function d(M){if(M)throw M}function E(M){return M.setHeader&&typeof M.abort=="function"}function B(M,U,L,H){H=g(H);var fe=!1;M.on("close",function(){fe=!0}),o===void 0&&(o=requireEndOfStream()),o(M,{readable:U,writable:L},function(Ie){if(Ie)return H(Ie);fe=!0,H()});var ge=!1;return function(Ie){if(!fe&&!ge){if(ge=!0,E(M))return M.abort();if(typeof M.destroy=="function")return M.destroy();H(Ie||new t("pipe"))}}}function D(M){M()}function x(M,U){return M.pipe(U)}function v(M){return!M.length||typeof M[M.length-1]!="function"?d:M.pop()}function F(){for(var M=arguments.length,U=new Array(M),L=0;L<M;L++)U[L]=arguments[L];var H=v(U);if(Array.isArray(U[0])&&(U=U[0]),U.length<2)throw new y("streams");var fe,ge=U.map(function(Ie,Ee){var Se=Ee<U.length-1,ze=Ee>0;return B(Ie,Se,ze,function(He){fe||(fe=He),He&&ge.forEach(D),!Se&&(ge.forEach(D),H(fe))})});return U.reduce(x)}return pipeline_1=F,pipeline_1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,function(o,g){g=o.exports=require_stream_readable$1(),g.Stream=g,g.Readable=g,g.Writable=require_stream_writable$1(),g.Duplex=require_stream_duplex$1(),g.Transform=require_stream_transform$1(),g.PassThrough=require_stream_passthrough$1(),g.finished=requireEndOfStream(),g.pipeline=requirePipeline()}(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var o=requireSafeBuffer$1().Buffer,g=requireReadableBrowser$1().Transform,c=requireInherits_browser();function y(d,E){if(!o.isBuffer(d)&&typeof d!="string")throw new TypeError(E+" must be a string or a buffer")}function t(d){g.call(this),this._block=o.allocUnsafe(d),this._blockSize=d,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return c(t,g),t.prototype._transform=function(d,E,B){var D=null;try{this.update(d,E)}catch(x){D=x}B(D)},t.prototype._flush=function(d){var E=null;try{this.push(this.digest())}catch(B){E=B}d(E)},t.prototype.update=function(d,E){if(y(d,"Data"),this._finalized)throw new Error("Digest already called");o.isBuffer(d)||(d=o.from(d,E));for(var B=this._block,D=0;this._blockOffset+d.length-D>=this._blockSize;){for(var x=this._blockOffset;x<this._blockSize;)B[x++]=d[D++];this._update(),this._blockOffset=0}for(;D<d.length;)B[this._blockOffset++]=d[D++];for(var v=0,F=d.length*8;F>0;++v)this._length[v]+=F,F=this._length[v]/4294967296|0,F>0&&(this._length[v]-=4294967296*F);return this},t.prototype._update=function(){throw new Error("_update is not implemented")},t.prototype.digest=function(d){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var E=this._digest();d!==void 0&&(E=E.toString(d)),this._block.fill(0),this._blockOffset=0;for(var B=0;B<4;++B)this._length[B]=0;return E},t.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=t,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var o=requireInherits_browser(),g=requireHashBase$1(),c=requireSafeBuffer$1().Buffer,y=new Array(16);function t(){g.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}o(t,g),t.prototype._update=function(){for(var v=y,F=0;F<16;++F)v[F]=this._block.readInt32LE(F*4);var M=this._a,U=this._b,L=this._c,H=this._d;M=E(M,U,L,H,v[0],3614090360,7),H=E(H,M,U,L,v[1],3905402710,12),L=E(L,H,M,U,v[2],606105819,17),U=E(U,L,H,M,v[3],3250441966,22),M=E(M,U,L,H,v[4],4118548399,7),H=E(H,M,U,L,v[5],1200080426,12),L=E(L,H,M,U,v[6],2821735955,17),U=E(U,L,H,M,v[7],4249261313,22),M=E(M,U,L,H,v[8],1770035416,7),H=E(H,M,U,L,v[9],2336552879,12),L=E(L,H,M,U,v[10],4294925233,17),U=E(U,L,H,M,v[11],2304563134,22),M=E(M,U,L,H,v[12],1804603682,7),H=E(H,M,U,L,v[13],4254626195,12),L=E(L,H,M,U,v[14],2792965006,17),U=E(U,L,H,M,v[15],1236535329,22),M=B(M,U,L,H,v[1],4129170786,5),H=B(H,M,U,L,v[6],3225465664,9),L=B(L,H,M,U,v[11],643717713,14),U=B(U,L,H,M,v[0],3921069994,20),M=B(M,U,L,H,v[5],3593408605,5),H=B(H,M,U,L,v[10],38016083,9),L=B(L,H,M,U,v[15],3634488961,14),U=B(U,L,H,M,v[4],3889429448,20),M=B(M,U,L,H,v[9],568446438,5),H=B(H,M,U,L,v[14],3275163606,9),L=B(L,H,M,U,v[3],4107603335,14),U=B(U,L,H,M,v[8],1163531501,20),M=B(M,U,L,H,v[13],2850285829,5),H=B(H,M,U,L,v[2],4243563512,9),L=B(L,H,M,U,v[7],1735328473,14),U=B(U,L,H,M,v[12],2368359562,20),M=D(M,U,L,H,v[5],4294588738,4),H=D(H,M,U,L,v[8],2272392833,11),L=D(L,H,M,U,v[11],1839030562,16),U=D(U,L,H,M,v[14],4259657740,23),M=D(M,U,L,H,v[1],2763975236,4),H=D(H,M,U,L,v[4],1272893353,11),L=D(L,H,M,U,v[7],4139469664,16),U=D(U,L,H,M,v[10],3200236656,23),M=D(M,U,L,H,v[13],681279174,4),H=D(H,M,U,L,v[0],3936430074,11),L=D(L,H,M,U,v[3],3572445317,16),U=D(U,L,H,M,v[6],76029189,23),M=D(M,U,L,H,v[9],3654602809,4),H=D(H,M,U,L,v[12],3873151461,11),L=D(L,H,M,U,v[15],530742520,16),U=D(U,L,H,M,v[2],3299628645,23),M=x(M,U,L,H,v[0],4096336452,6),H=x(H,M,U,L,v[7],1126891415,10),L=x(L,H,M,U,v[14],2878612391,15),U=x(U,L,H,M,v[5],4237533241,21),M=x(M,U,L,H,v[12],1700485571,6),H=x(H,M,U,L,v[3],2399980690,10),L=x(L,H,M,U,v[10],4293915773,15),U=x(U,L,H,M,v[1],2240044497,21),M=x(M,U,L,H,v[8],1873313359,6),H=x(H,M,U,L,v[15],4264355552,10),L=x(L,H,M,U,v[6],2734768916,15),U=x(U,L,H,M,v[13],1309151649,21),M=x(M,U,L,H,v[4],4149444226,6),H=x(H,M,U,L,v[11],3174756917,10),L=x(L,H,M,U,v[2],718787259,15),U=x(U,L,H,M,v[9],3951481745,21),this._a=this._a+M|0,this._b=this._b+U|0,this._c=this._c+L|0,this._d=this._d+H|0},t.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var v=c.allocUnsafe(16);return v.writeInt32LE(this._a,0),v.writeInt32LE(this._b,4),v.writeInt32LE(this._c,8),v.writeInt32LE(this._d,12),v};function d(v,F){return v<<F|v>>>32-F}function E(v,F,M,U,L,H,fe){return d(v+(F&M|~F&U)+L+H|0,fe)+F|0}function B(v,F,M,U,L,H,fe){return d(v+(F&U|M&~U)+L+H|0,fe)+F|0}function D(v,F,M,U,L,H,fe){return d(v+(F^M^U)+L+H|0,fe)+F|0}function x(v,F,M,U,L,H,fe){return d(v+(M^(F|~U))+L+H|0,fe)+F|0}return md5_js=t,md5_js}var ripemd160$5,hasRequiredRipemd160$2;function requireRipemd160$2(){if(hasRequiredRipemd160$2)return ripemd160$5;hasRequiredRipemd160$2=1;var o=requireBuffer$2().Buffer,g=requireInherits_browser(),c=requireHashBase$1(),y=new Array(16),t=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],E=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],D=[0,1518500249,1859775393,2400959708,2840853838],x=[1352829926,1548603684,1836072691,2053994217,0];function v(){c.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}g(v,c),v.prototype._update=function(){for(var ge=y,Ie=0;Ie<16;++Ie)ge[Ie]=this._block.readInt32LE(Ie*4);for(var Ee=this._a|0,Se=this._b|0,ze=this._c|0,He=this._d|0,Ne=this._e|0,Pe=this._a|0,ve=this._b|0,Fe=this._c|0,be=this._d|0,Be=this._e|0,ke=0;ke<80;ke+=1){var xe,De;ke<16?(xe=M(Ee,Se,ze,He,Ne,ge[t[ke]],D[0],E[ke]),De=fe(Pe,ve,Fe,be,Be,ge[d[ke]],x[0],B[ke])):ke<32?(xe=U(Ee,Se,ze,He,Ne,ge[t[ke]],D[1],E[ke]),De=H(Pe,ve,Fe,be,Be,ge[d[ke]],x[1],B[ke])):ke<48?(xe=L(Ee,Se,ze,He,Ne,ge[t[ke]],D[2],E[ke]),De=L(Pe,ve,Fe,be,Be,ge[d[ke]],x[2],B[ke])):ke<64?(xe=H(Ee,Se,ze,He,Ne,ge[t[ke]],D[3],E[ke]),De=U(Pe,ve,Fe,be,Be,ge[d[ke]],x[3],B[ke])):(xe=fe(Ee,Se,ze,He,Ne,ge[t[ke]],D[4],E[ke]),De=M(Pe,ve,Fe,be,Be,ge[d[ke]],x[4],B[ke])),Ee=Ne,Ne=He,He=F(ze,10),ze=Se,Se=xe,Pe=Be,Be=be,be=F(Fe,10),Fe=ve,ve=De}var Et=this._b+ze+be|0;this._b=this._c+He+Be|0,this._c=this._d+Ne+Pe|0,this._d=this._e+Ee+ve|0,this._e=this._a+Se+Fe|0,this._a=Et},v.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var ge=o.alloc?o.alloc(20):new o(20);return ge.writeInt32LE(this._a,0),ge.writeInt32LE(this._b,4),ge.writeInt32LE(this._c,8),ge.writeInt32LE(this._d,12),ge.writeInt32LE(this._e,16),ge};function F(ge,Ie){return ge<<Ie|ge>>>32-Ie}function M(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie^Ee^Se)+He+Ne|0,Pe)+ze|0}function U(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie&Ee|~Ie&Se)+He+Ne|0,Pe)+ze|0}function L(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+((Ie|~Ee)^Se)+He+Ne|0,Pe)+ze|0}function H(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie&Se|Ee&~Se)+He+Ne|0,Pe)+ze|0}function fe(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie^(Ee|~Se))+He+Ne|0,Pe)+ze|0}return ripemd160$5=v,ripemd160$5}var sha_js={exports:{}},isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var o={}.toString;return isarray$1=Array.isArray||function(g){return o.call(g)=="[object Array]"},isarray$1}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range$1,hasRequiredRange$1;function requireRange$1(){return hasRequiredRange$1||(hasRequiredRange$1=1,range$1=RangeError),range$1}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max$1,hasRequiredMax$1;function requireMax$1(){return hasRequiredMax$1||(hasRequiredMax$1=1,max$1=Math.max),max$1}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow$1,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow$1=Math.pow),pow$1}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(g){return g!==g}),_isNaN}var sign$3,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$3;hasRequiredSign$1=1;var o=require_isNaN();return sign$3=function(c){return o(c)||c===0?c:c<0?-1:1},sign$3}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var o=requireGOPD();if(o)try{o([],"length")}catch{o=null}return gopd=o,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var o=Object.defineProperty||!1;if(o)try{o({},"a",{value:1})}catch{o=!1}return esDefineProperty=o,esDefineProperty}var shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var g={},c=Symbol("test"),y=Object(c);if(typeof c=="string"||Object.prototype.toString.call(c)!=="[object Symbol]"||Object.prototype.toString.call(y)!=="[object Symbol]")return!1;var t=42;g[c]=t;for(var d in g)return!1;if(typeof Object.keys=="function"&&Object.keys(g).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(g).length!==0)return!1;var E=Object.getOwnPropertySymbols(g);if(E.length!==1||E[0]!==c||!Object.prototype.propertyIsEnumerable.call(g,c))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var B=Object.getOwnPropertyDescriptor(g,c);if(B.value!==t||B.enumerable!==!0)return!1}return!0}),shams$1}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var o=typeof Symbol<"u"&&Symbol,g=requireShams$1();return hasSymbols=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var o=requireEsObjectAtoms();return Object_getPrototypeOf=o.getPrototypeOf||null,Object_getPrototypeOf}var implementation$4,hasRequiredImplementation$4;function requireImplementation$4(){if(hasRequiredImplementation$4)return implementation$4;hasRequiredImplementation$4=1;var o="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,c=Math.max,y="[object Function]",t=function(D,x){for(var v=[],F=0;F<D.length;F+=1)v[F]=D[F];for(var M=0;M<x.length;M+=1)v[M+D.length]=x[M];return v},d=function(D,x){for(var v=[],F=x,M=0;F<D.length;F+=1,M+=1)v[M]=D[F];return v},E=function(B,D){for(var x="",v=0;v<B.length;v+=1)x+=B[v],v+1<B.length&&(x+=D);return x};return implementation$4=function(D){var x=this;if(typeof x!="function"||g.apply(x)!==y)throw new TypeError(o+x);for(var v=d(arguments,1),F,M=function(){if(this instanceof F){var ge=x.apply(this,t(v,arguments));return Object(ge)===ge?ge:this}return x.apply(D,t(v,arguments))},U=c(0,x.length-v.length),L=[],H=0;H<U;H++)L[H]="$"+H;if(F=Function("binder","return function ("+E(L,",")+"){ return binder.apply(this,arguments); }")(M),x.prototype){var fe=function(){};fe.prototype=x.prototype,F.prototype=new fe,fe.prototype=null}return F},implementation$4}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var o=requireImplementation$4();return functionBind=Function.prototype.bind||o,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var o=requireFunctionBind(),g=requireFunctionApply(),c=requireFunctionCall(),y=requireReflectApply();return actualApply=y||o.call(c,g),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var o=requireFunctionBind(),g=requireType(),c=requireFunctionCall(),y=requireActualApply();return callBindApplyHelpers=function(d){if(d.length<1||typeof d[0]!="function")throw new g("a function is required");return y(o,c,d)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var o=requireCallBindApplyHelpers(),g=requireGopd(),c;try{c=[].__proto__===Array.prototype}catch(E){if(!E||typeof E!="object"||!("code"in E)||E.code!=="ERR_PROTO_ACCESS")throw E}var y=!!c&&g&&g(Object.prototype,"__proto__"),t=Object,d=t.getPrototypeOf;return get=y&&typeof y.get=="function"?o([y.get]):typeof d=="function"?function(B){return d(B==null?B:t(B))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var o=requireReflect_getPrototypeOf(),g=requireObject_getPrototypeOf(),c=requireGet();return getProto=o?function(t){return o(t)}:g?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return g(t)}:c?function(t){return c(t)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var o=Function.prototype.call,g=Object.prototype.hasOwnProperty,c=requireFunctionBind();return hasown=c.call(o,g),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var o,g=requireEsObjectAtoms(),c=requireEsErrors(),y=require_eval(),t=requireRange$1(),d=requireRef(),E=requireSyntax(),B=requireType(),D=requireUri(),x=requireAbs(),v=requireFloor(),F=requireMax$1(),M=requireMin(),U=requirePow(),L=requireRound(),H=requireSign$1(),fe=Function,ge=function(Xr){try{return fe('"use strict"; return ('+Xr+").constructor;")()}catch{}},Ie=requireGopd(),Ee=requireEsDefineProperty(),Se=function(){throw new B},ze=Ie?function(){try{return arguments.callee,Se}catch{try{return Ie(arguments,"callee").get}catch{return Se}}}():Se,He=requireHasSymbols()(),Ne=requireGetProto(),Pe=requireObject_getPrototypeOf(),ve=requireReflect_getPrototypeOf(),Fe=requireFunctionApply(),be=requireFunctionCall(),Be={},ke=typeof Uint8Array>"u"||!Ne?o:Ne(Uint8Array),xe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":He&&Ne?Ne([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":Be,"%AsyncGenerator%":Be,"%AsyncGeneratorFunction%":Be,"%AsyncIteratorPrototype%":Be,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":c,"%eval%":eval,"%EvalError%":y,"%Float16Array%":typeof Float16Array>"u"?o:Float16Array,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":fe,"%GeneratorFunction%":Be,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&Ne?Ne(Ne([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!Ne?o:Ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":Ie,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":t,"%ReferenceError%":d,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!Ne?o:Ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&Ne?Ne(""[Symbol.iterator]()):o,"%Symbol%":He?Symbol:o,"%SyntaxError%":E,"%ThrowTypeError%":ze,"%TypedArray%":ke,"%TypeError%":B,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":D,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet,"%Function.prototype.call%":be,"%Function.prototype.apply%":Fe,"%Object.defineProperty%":Ee,"%Object.getPrototypeOf%":Pe,"%Math.abs%":x,"%Math.floor%":v,"%Math.max%":F,"%Math.min%":M,"%Math.pow%":U,"%Math.round%":L,"%Math.sign%":H,"%Reflect.getPrototypeOf%":ve};if(Ne)try{null.error}catch(Xr){var De=Ne(Ne(Xr));xe["%Error.prototype%"]=De}var Et=function Xr(Wr){var Ur;if(Wr==="%AsyncFunction%")Ur=ge("async function () {}");else if(Wr==="%GeneratorFunction%")Ur=ge("function* () {}");else if(Wr==="%AsyncGeneratorFunction%")Ur=ge("async function* () {}");else if(Wr==="%AsyncGenerator%"){var Sr=Xr("%AsyncGeneratorFunction%");Sr&&(Ur=Sr.prototype)}else if(Wr==="%AsyncIteratorPrototype%"){var Gr=Xr("%AsyncGenerator%");Gr&&Ne&&(Ur=Ne(Gr.prototype))}return xe[Wr]=Ur,Ur},st={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Dt=requireFunctionBind(),er=requireHasown(),xt=Dt.call(be,Array.prototype.concat),ir=Dt.call(Fe,Array.prototype.splice),sr=Dt.call(be,String.prototype.replace),yr=Dt.call(be,String.prototype.slice),wr=Dt.call(be,RegExp.prototype.exec),qr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mr=/\\(\\)?/g,Dr=function(Wr){var Ur=yr(Wr,0,1),Sr=yr(Wr,-1);if(Ur==="%"&&Sr!=="%")throw new E("invalid intrinsic syntax, expected closing `%`");if(Sr==="%"&&Ur!=="%")throw new E("invalid intrinsic syntax, expected opening `%`");var Gr=[];return sr(Wr,qr,function(Fr,br,Ar,cr){Gr[Gr.length]=Ar?sr(cr,Mr,"$1"):br||Fr}),Gr},Qr=function(Wr,Ur){var Sr=Wr,Gr;if(er(st,Sr)&&(Gr=st[Sr],Sr="%"+Gr[0]+"%"),er(xe,Sr)){var Fr=xe[Sr];if(Fr===Be&&(Fr=Et(Sr)),typeof Fr>"u"&&!Ur)throw new B("intrinsic "+Wr+" exists, but is not available. Please file an issue!");return{alias:Gr,name:Sr,value:Fr}}throw new E("intrinsic "+Wr+" does not exist!")};return getIntrinsic=function(Wr,Ur){if(typeof Wr!="string"||Wr.length===0)throw new B("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ur!="boolean")throw new B('"allowMissing" argument must be a boolean');if(wr(/^%?[^%]*%?$/,Wr)===null)throw new E("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Sr=Dr(Wr),Gr=Sr.length>0?Sr[0]:"",Fr=Qr("%"+Gr+"%",Ur),br=Fr.name,Ar=Fr.value,cr=!1,hr=Fr.alias;hr&&(Gr=hr[0],ir(Sr,xt([0,1],hr)));for(var jr=1,fi=!0;jr<Sr.length;jr+=1){var Bi=Sr[jr],$r=yr(Bi,0,1),oi=yr(Bi,-1);if(($r==='"'||$r==="'"||$r==="`"||oi==='"'||oi==="'"||oi==="`")&&$r!==oi)throw new E("property names with quotes must have matching quotes");if((Bi==="constructor"||!fi)&&(cr=!0),Gr+="."+Bi,br="%"+Gr+"%",er(xe,br))Ar=xe[br];else if(Ar!=null){if(!(Bi in Ar)){if(!Ur)throw new B("base intrinsic for "+Wr+" exists, but the property is not available.");return}if(Ie&&jr+1>=Sr.length){var zr=Ie(Ar,Bi);fi=!!zr,fi&&"get"in zr&&!("originalValue"in zr.get)?Ar=zr.get:Ar=Ar[Bi]}else fi=er(Ar,Bi),Ar=Ar[Bi];fi&&!cr&&(xe[br]=Ar)}}return Ar},getIntrinsic}var callBound$1,hasRequiredCallBound$1;function requireCallBound$1(){if(hasRequiredCallBound$1)return callBound$1;hasRequiredCallBound$1=1;var o=requireGetIntrinsic(),g=requireCallBindApplyHelpers(),c=g([o("%String.prototype.indexOf%")]);return callBound$1=function(t,d){var E=o(t,!!d);return typeof E=="function"&&c(t,".prototype.")>-1?g([E]):E},callBound$1}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var o=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,c,y;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{c=Object.defineProperty({},"length",{get:function(){throw y}}),y={},g(function(){throw 42},null,c)}catch(Ie){Ie!==y&&(g=null)}else g=null;var t=/^\s*class\b/,d=function(Ee){try{var Se=o.call(Ee);return t.test(Se)}catch{return!1}},E=function(Ee){try{return d(Ee)?!1:(o.call(Ee),!0)}catch{return!1}},B=Object.prototype.toString,D="[object Object]",x="[object Function]",v="[object GeneratorFunction]",F="[object HTMLAllCollection]",M="[object HTML document.all class]",U="[object HTMLCollection]",L=typeof Symbol=="function"&&!!Symbol.toStringTag,H=!(0 in[,]),fe=function(){return!1};if(typeof document=="object"){var ge=document.all;B.call(ge)===B.call(document.all)&&(fe=function(Ee){if((H||!Ee)&&(typeof Ee>"u"||typeof Ee=="object"))try{var Se=B.call(Ee);return(Se===F||Se===M||Se===U||Se===D)&&Ee("")==null}catch{}return!1})}return isCallable=g?function(Ee){if(fe(Ee))return!0;if(!Ee||typeof Ee!="function"&&typeof Ee!="object")return!1;try{g(Ee,null,c)}catch(Se){if(Se!==y)return!1}return!d(Ee)&&E(Ee)}:function(Ee){if(fe(Ee))return!0;if(!Ee||typeof Ee!="function"&&typeof Ee!="object")return!1;if(L)return E(Ee);if(d(Ee))return!1;var Se=B.call(Ee);return Se!==x&&Se!==v&&!/^\[object HTML/.test(Se)?!1:E(Ee)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var o=requireIsCallable(),g=Object.prototype.toString,c=Object.prototype.hasOwnProperty,y=function(D,x,v){for(var F=0,M=D.length;F<M;F++)c.call(D,F)&&(v==null?x(D[F],F,D):x.call(v,D[F],F,D))},t=function(D,x,v){for(var F=0,M=D.length;F<M;F++)v==null?x(D.charAt(F),F,D):x.call(v,D.charAt(F),F,D)},d=function(D,x,v){for(var F in D)c.call(D,F)&&(v==null?x(D[F],F,D):x.call(v,D[F],F,D))};function E(B){return g.call(B)==="[object Array]"}return forEach=function(D,x,v){if(!o(x))throw new TypeError("iterator must be a function");var F;arguments.length>=3&&(F=v),E(D)?y(D,x,F):typeof D=="string"?t(D,x,F):d(D,x,F)},forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var o=requirePossibleTypedArrayNames(),g=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var y=[],t=0;t<o.length;t++)typeof g[o[t]]=="function"&&(y[y.length]=o[t]);return y},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var o=requireEsDefineProperty(),g=requireSyntax(),c=requireType(),y=requireGopd();return defineDataProperty=function(d,E,B){if(!d||typeof d!="object"&&typeof d!="function")throw new c("`obj` must be an object or a function`");if(typeof E!="string"&&typeof E!="symbol")throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new c("`loose`, if provided, must be a boolean");var D=arguments.length>3?arguments[3]:null,x=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,F=arguments.length>6?arguments[6]:!1,M=!!y&&y(d,E);if(o)o(d,E,{configurable:v===null&&M?M.configurable:!v,enumerable:D===null&&M?M.enumerable:!D,value:B,writable:x===null&&M?M.writable:!x});else if(F||!D&&!x&&!v)d[E]=B;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var o=requireEsDefineProperty(),g=function(){return!!o};return g.hasArrayLengthDefineBug=function(){if(!o)return null;try{return o([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=g,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var o=requireGetIntrinsic(),g=requireDefineDataProperty(),c=requireHasPropertyDescriptors()(),y=requireGopd(),t=requireType(),d=o("%Math.floor%");return setFunctionLength=function(B,D){if(typeof B!="function")throw new t("`fn` is not a function");if(typeof D!="number"||D<0||D>4294967295||d(D)!==D)throw new t("`length` must be a positive 32-bit integer");var x=arguments.length>2&&!!arguments[2],v=!0,F=!0;if("length"in B&&y){var M=y(B,"length");M&&!M.configurable&&(v=!1),M&&!M.writable&&(F=!1)}return(v||F||!x)&&(c?g(B,"length",D,!0,!0):g(B,"length",D)),B},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var o=requireFunctionBind(),g=requireFunctionApply(),c=requireActualApply();return applyBind=function(){return c(o,g,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,function(o){var g=requireSetFunctionLength(),c=requireEsDefineProperty(),y=requireCallBindApplyHelpers(),t=requireApplyBind();o.exports=function(E){var B=y(arguments),D=E.length-(arguments.length-1);return g(B,1+(D>0?D:0),!0)},c?c(o.exports,"apply",{value:t}):o.exports.apply=t}(callBind)),callBind.exports}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var o=requireShams$1();return shams=function(){return o()&&!!Symbol.toStringTag},shams}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var o=requireForEach(),g=requireAvailableTypedArrays(),c=requireCallBind(),y=requireCallBound$1(),t=requireGopd(),d=requireGetProto(),E=y("Object.prototype.toString"),B=requireShams()(),D=typeof globalThis>"u"?commonjsGlobal:globalThis,x=g(),v=y("String.prototype.slice"),F=y("Array.prototype.indexOf",!0)||function(fe,ge){for(var Ie=0;Ie<fe.length;Ie+=1)if(fe[Ie]===ge)return Ie;return-1},M={__proto__:null};B&&t&&d?o(x,function(H){var fe=new D[H];if(Symbol.toStringTag in fe&&d){var ge=d(fe),Ie=t(ge,Symbol.toStringTag);if(!Ie&&ge){var Ee=d(ge);Ie=t(Ee,Symbol.toStringTag)}M["$"+H]=c(Ie.get)}}):o(x,function(H){var fe=new D[H],ge=fe.slice||fe.set;ge&&(M["$"+H]=c(ge))});var U=function(fe){var ge=!1;return o(M,function(Ie,Ee){if(!ge)try{"$"+Ie(fe)===Ee&&(ge=v(Ee,1))}catch{}}),ge},L=function(fe){var ge=!1;return o(M,function(Ie,Ee){if(!ge)try{Ie(fe),ge=v(Ee,1)}catch{}}),ge};return whichTypedArray=function(fe){if(!fe||typeof fe!="object")return!1;if(!B){var ge=v(E(fe),8,-1);return F(x,ge)>-1?ge:ge!=="Object"?!1:L(fe)}return t?U(fe):null},whichTypedArray}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var o=requireWhichTypedArray();return isTypedArray=function(c){return!!o(c)},isTypedArray}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var o=requireType(),g=requireCallBound$1(),c=g("TypedArray.prototype.buffer",!0),y=requireIsTypedArray();return typedArrayBuffer=c||function(d){if(!y(d))throw new o("Not a Typed Array");return d.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer;hasRequiredToBuffer$1=1;var o=requireSafeBuffer$1().Buffer,g=requireIsarray$1(),c=requireTypedArrayBuffer(),y=ArrayBuffer.isView||function(D){try{return c(D),!0}catch{return!1}},t=typeof Uint8Array<"u",d=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",E=d&&(o.prototype instanceof Uint8Array||o.TYPED_ARRAY_SUPPORT);return toBuffer=function(D,x){if(D instanceof o)return D;if(typeof D=="string")return o.from(D,x);if(d&&y(D)){if(D.byteLength===0)return o.alloc(0);if(E){var v=o.from(D.buffer,D.byteOffset,D.byteLength);if(v.byteLength===D.byteLength)return v}var F=D instanceof Uint8Array?D:new Uint8Array(D.buffer,D.byteOffset,D.byteLength),M=o.from(F);if(M.length===D.byteLength)return M}if(t&&D instanceof Uint8Array)return o.from(D);var U=g(D);if(U)for(var L=0;L<D.length;L+=1){var H=D[L];if(typeof H!="number"||H<0||H>255||~~H!==H)throw new RangeError("Array items must be numbers in the range 0-255.")}if(U||o.isBuffer(D)&&D.constructor&&typeof D.constructor.isBuffer=="function"&&D.constructor.isBuffer(D))return o.from(D);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var hash$p,hasRequiredHash$2;function requireHash$2(){if(hasRequiredHash$2)return hash$p;hasRequiredHash$2=1;var o=requireSafeBuffer$1().Buffer,g=requireToBuffer$1();function c(y,t){this._block=o.alloc(y),this._finalSize=t,this._blockSize=y,this._len=0}return c.prototype.update=function(y,t){y=g(y,t||"utf8");for(var d=this._block,E=this._blockSize,B=y.length,D=this._len,x=0;x<B;){for(var v=D%E,F=Math.min(B-x,E-v),M=0;M<F;M++)d[v+M]=y[x+M];D+=F,x+=F,D%E===0&&this._update(d)}return this._len+=B,this},c.prototype.digest=function(y){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var d=this._len*8;if(d<=4294967295)this._block.writeUInt32BE(d,this._blockSize-4);else{var E=(d&4294967295)>>>0,B=(d-E)/4294967296;this._block.writeUInt32BE(B,this._blockSize-8),this._block.writeUInt32BE(E,this._blockSize-4)}this._update(this._block);var D=this._hash();return y?D.toString(y):D},c.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$p=c,hash$p}var sha$2,hasRequiredSha$2;function requireSha$2(){if(hasRequiredSha$2)return sha$2;hasRequiredSha$2=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function d(){this.init(),this._w=t,g.call(this,64,56)}o(d,g),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function E(x){return x<<5|x>>>27}function B(x){return x<<30|x>>>2}function D(x,v,F,M){return x===0?v&F|~v&M:x===2?v&F|v&M|F&M:v^F^M}return d.prototype._update=function(x){for(var v=this._w,F=this._a|0,M=this._b|0,U=this._c|0,L=this._d|0,H=this._e|0,fe=0;fe<16;++fe)v[fe]=x.readInt32BE(fe*4);for(;fe<80;++fe)v[fe]=v[fe-3]^v[fe-8]^v[fe-14]^v[fe-16];for(var ge=0;ge<80;++ge){var Ie=~~(ge/20),Ee=E(F)+D(Ie,M,U,L)+H+v[ge]+y[Ie]|0;H=L,L=U,U=B(M),M=F,F=Ee}this._a=F+this._a|0,this._b=M+this._b|0,this._c=U+this._c|0,this._d=L+this._d|0,this._e=H+this._e|0},d.prototype._hash=function(){var x=c.allocUnsafe(20);return x.writeInt32BE(this._a|0,0),x.writeInt32BE(this._b|0,4),x.writeInt32BE(this._c|0,8),x.writeInt32BE(this._d|0,12),x.writeInt32BE(this._e|0,16),x},sha$2=d,sha$2}var sha1$4,hasRequiredSha1$2;function requireSha1$2(){if(hasRequiredSha1$2)return sha1$4;hasRequiredSha1$2=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function d(){this.init(),this._w=t,g.call(this,64,56)}o(d,g),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function E(v){return v<<1|v>>>31}function B(v){return v<<5|v>>>27}function D(v){return v<<30|v>>>2}function x(v,F,M,U){return v===0?F&M|~F&U:v===2?F&M|F&U|M&U:F^M^U}return d.prototype._update=function(v){for(var F=this._w,M=this._a|0,U=this._b|0,L=this._c|0,H=this._d|0,fe=this._e|0,ge=0;ge<16;++ge)F[ge]=v.readInt32BE(ge*4);for(;ge<80;++ge)F[ge]=E(F[ge-3]^F[ge-8]^F[ge-14]^F[ge-16]);for(var Ie=0;Ie<80;++Ie){var Ee=~~(Ie/20),Se=B(M)+x(Ee,U,L,H)+fe+F[Ie]+y[Ee]|0;fe=H,H=L,L=D(U),U=M,M=Se}this._a=M+this._a|0,this._b=U+this._b|0,this._c=L+this._c|0,this._d=H+this._d|0,this._e=fe+this._e|0},d.prototype._hash=function(){var v=c.allocUnsafe(20);return v.writeInt32BE(this._a|0,0),v.writeInt32BE(this._b|0,4),v.writeInt32BE(this._c|0,8),v.writeInt32BE(this._d|0,12),v.writeInt32BE(this._e|0,16),v},sha1$4=d,sha1$4}var sha256$8,hasRequiredSha256$4;function requireSha256$4(){if(hasRequiredSha256$4)return sha256$8;hasRequiredSha256$4=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[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],t=new Array(64);function d(){this.init(),this._w=t,g.call(this,64,56)}o(d,g),d.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function E(M,U,L){return L^M&(U^L)}function B(M,U,L){return M&U|L&(M|U)}function D(M){return(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10)}function x(M){return(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7)}function v(M){return(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3}function F(M){return(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10}return d.prototype._update=function(M){for(var U=this._w,L=this._a|0,H=this._b|0,fe=this._c|0,ge=this._d|0,Ie=this._e|0,Ee=this._f|0,Se=this._g|0,ze=this._h|0,He=0;He<16;++He)U[He]=M.readInt32BE(He*4);for(;He<64;++He)U[He]=F(U[He-2])+U[He-7]+v(U[He-15])+U[He-16]|0;for(var Ne=0;Ne<64;++Ne){var Pe=ze+x(Ie)+E(Ie,Ee,Se)+y[Ne]+U[Ne]|0,ve=D(L)+B(L,H,fe)|0;ze=Se,Se=Ee,Ee=Ie,Ie=ge+Pe|0,ge=fe,fe=H,H=L,L=Pe+ve|0}this._a=L+this._a|0,this._b=H+this._b|0,this._c=fe+this._c|0,this._d=ge+this._d|0,this._e=Ie+this._e|0,this._f=Ee+this._f|0,this._g=Se+this._g|0,this._h=ze+this._h|0},d.prototype._hash=function(){var M=c.allocUnsafe(32);return M.writeInt32BE(this._a,0),M.writeInt32BE(this._b,4),M.writeInt32BE(this._c,8),M.writeInt32BE(this._d,12),M.writeInt32BE(this._e,16),M.writeInt32BE(this._f,20),M.writeInt32BE(this._g,24),M.writeInt32BE(this._h,28),M},sha256$8=d,sha256$8}var sha224$2,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$2;hasRequiredSha224=1;var o=requireInherits_browser(),g=requireSha256$4(),c=requireHash$2(),y=requireSafeBuffer$1().Buffer,t=new Array(64);function d(){this.init(),this._w=t,c.call(this,64,56)}return o(d,g),d.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},d.prototype._hash=function(){var E=y.allocUnsafe(28);return E.writeInt32BE(this._a,0),E.writeInt32BE(this._b,4),E.writeInt32BE(this._c,8),E.writeInt32BE(this._d,12),E.writeInt32BE(this._e,16),E.writeInt32BE(this._f,20),E.writeInt32BE(this._g,24),E},sha224$2=d,sha224$2}var sha512$4,hasRequiredSha512$1;function requireSha512$1(){if(hasRequiredSha512$1)return sha512$4;hasRequiredSha512$1=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],t=new Array(160);function d(){this.init(),this._w=t,g.call(this,128,112)}o(d,g),d.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function E(H,fe,ge){return ge^H&(fe^ge)}function B(H,fe,ge){return H&fe|ge&(H|fe)}function D(H,fe){return(H>>>28|fe<<4)^(fe>>>2|H<<30)^(fe>>>7|H<<25)}function x(H,fe){return(H>>>14|fe<<18)^(H>>>18|fe<<14)^(fe>>>9|H<<23)}function v(H,fe){return(H>>>1|fe<<31)^(H>>>8|fe<<24)^H>>>7}function F(H,fe){return(H>>>1|fe<<31)^(H>>>8|fe<<24)^(H>>>7|fe<<25)}function M(H,fe){return(H>>>19|fe<<13)^(fe>>>29|H<<3)^H>>>6}function U(H,fe){return(H>>>19|fe<<13)^(fe>>>29|H<<3)^(H>>>6|fe<<26)}function L(H,fe){return H>>>0<fe>>>0?1:0}return d.prototype._update=function(H){for(var fe=this._w,ge=this._ah|0,Ie=this._bh|0,Ee=this._ch|0,Se=this._dh|0,ze=this._eh|0,He=this._fh|0,Ne=this._gh|0,Pe=this._hh|0,ve=this._al|0,Fe=this._bl|0,be=this._cl|0,Be=this._dl|0,ke=this._el|0,xe=this._fl|0,De=this._gl|0,Et=this._hl|0,st=0;st<32;st+=2)fe[st]=H.readInt32BE(st*4),fe[st+1]=H.readInt32BE(st*4+4);for(;st<160;st+=2){var Dt=fe[st-30],er=fe[st-30+1],xt=v(Dt,er),ir=F(er,Dt);Dt=fe[st-4],er=fe[st-4+1];var sr=M(Dt,er),yr=U(er,Dt),wr=fe[st-14],qr=fe[st-14+1],Mr=fe[st-32],Dr=fe[st-32+1],Qr=ir+qr|0,Xr=xt+wr+L(Qr,ir)|0;Qr=Qr+yr|0,Xr=Xr+sr+L(Qr,yr)|0,Qr=Qr+Dr|0,Xr=Xr+Mr+L(Qr,Dr)|0,fe[st]=Xr,fe[st+1]=Qr}for(var Wr=0;Wr<160;Wr+=2){Xr=fe[Wr],Qr=fe[Wr+1];var Ur=B(ge,Ie,Ee),Sr=B(ve,Fe,be),Gr=D(ge,ve),Fr=D(ve,ge),br=x(ze,ke),Ar=x(ke,ze),cr=y[Wr],hr=y[Wr+1],jr=E(ze,He,Ne),fi=E(ke,xe,De),Bi=Et+Ar|0,$r=Pe+br+L(Bi,Et)|0;Bi=Bi+fi|0,$r=$r+jr+L(Bi,fi)|0,Bi=Bi+hr|0,$r=$r+cr+L(Bi,hr)|0,Bi=Bi+Qr|0,$r=$r+Xr+L(Bi,Qr)|0;var oi=Fr+Sr|0,zr=Gr+Ur+L(oi,Fr)|0;Pe=Ne,Et=De,Ne=He,De=xe,He=ze,xe=ke,ke=Be+Bi|0,ze=Se+$r+L(ke,Be)|0,Se=Ee,Be=be,Ee=Ie,be=Fe,Ie=ge,Fe=ve,ve=Bi+oi|0,ge=$r+zr+L(ve,Bi)|0}this._al=this._al+ve|0,this._bl=this._bl+Fe|0,this._cl=this._cl+be|0,this._dl=this._dl+Be|0,this._el=this._el+ke|0,this._fl=this._fl+xe|0,this._gl=this._gl+De|0,this._hl=this._hl+Et|0,this._ah=this._ah+ge+L(this._al,ve)|0,this._bh=this._bh+Ie+L(this._bl,Fe)|0,this._ch=this._ch+Ee+L(this._cl,be)|0,this._dh=this._dh+Se+L(this._dl,Be)|0,this._eh=this._eh+ze+L(this._el,ke)|0,this._fh=this._fh+He+L(this._fl,xe)|0,this._gh=this._gh+Ne+L(this._gl,De)|0,this._hh=this._hh+Pe+L(this._hl,Et)|0},d.prototype._hash=function(){var H=c.allocUnsafe(64);function fe(ge,Ie,Ee){H.writeInt32BE(ge,Ee),H.writeInt32BE(Ie,Ee+4)}return fe(this._ah,this._al,0),fe(this._bh,this._bl,8),fe(this._ch,this._cl,16),fe(this._dh,this._dl,24),fe(this._eh,this._el,32),fe(this._fh,this._fl,40),fe(this._gh,this._gl,48),fe(this._hh,this._hl,56),H},sha512$4=d,sha512$4}var sha384$2,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$2;hasRequiredSha384=1;var o=requireInherits_browser(),g=requireSha512$1(),c=requireHash$2(),y=requireSafeBuffer$1().Buffer,t=new Array(160);function d(){this.init(),this._w=t,c.call(this,128,112)}return o(d,g),d.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},d.prototype._hash=function(){var E=y.allocUnsafe(48);function B(D,x,v){E.writeInt32BE(D,v),E.writeInt32BE(x,v+4)}return B(this._ah,this._al,0),B(this._bh,this._bl,8),B(this._ch,this._cl,16),B(this._dh,this._dl,24),B(this._eh,this._el,32),B(this._fh,this._fl,40),E},sha384$2=d,sha384$2}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,function(o){o.exports=function(c){var y=c.toLowerCase(),t=o.exports[y];if(!t)throw new Error(y+" is not supported (we accept pull requests)");return new t},o.exports.sha=requireSha$2(),o.exports.sha1=requireSha1$2(),o.exports.sha224=requireSha224(),o.exports.sha256=requireSha256$4(),o.exports.sha384=requireSha384(),o.exports.sha512=requireSha512$1()}(sha_js)),sha_js.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var o=requireSafeBuffer$1().Buffer,g=require$$2$2.Transform,c=requireString_decoder$1().StringDecoder,y=requireInherits_browser();function t(D){g.call(this),this.hashMode=typeof D=="string",this.hashMode?this[D]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}y(t,g);var d=typeof Uint8Array<"u",E=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(o.prototype instanceof Uint8Array||o.TYPED_ARRAY_SUPPORT);function B(D,x){if(D instanceof o)return D;if(typeof D=="string")return o.from(D,x);if(E&&ArrayBuffer.isView(D)){if(D.byteLength===0)return o.alloc(0);var v=o.from(D.buffer,D.byteOffset,D.byteLength);if(v.byteLength===D.byteLength)return v}if(d&&D instanceof Uint8Array||o.isBuffer(D)&&D.constructor&&typeof D.constructor.isBuffer=="function"&&D.constructor.isBuffer(D))return o.from(D);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return t.prototype.update=function(D,x,v){var F=B(D,x),M=this._update(F);return this.hashMode?this:(v&&(M=this._toString(M,v)),M)},t.prototype.setAutoPadding=function(){},t.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},t.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},t.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},t.prototype._transform=function(D,x,v){var F;try{this.hashMode?this._update(D):this.push(this._update(D))}catch(M){F=M}finally{v(F)}},t.prototype._flush=function(D){var x;try{this.push(this.__final())}catch(v){x=v}D(x)},t.prototype._finalOrDigest=function(D){var x=this.__final()||o.alloc(0);return D&&(x=this._toString(x,D,!0)),x},t.prototype._toString=function(D,x,v){if(this._decoder||(this._decoder=new c(x),this._encoding=x),this._encoding!==x)throw new Error("can’t switch encodings");var F=this._decoder.write(D);return v&&(F+=this._decoder.end()),F},cipherBase=t,cipherBase}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1;var o=requireInherits_browser(),g=requireMd5_js(),c=requireRipemd160$2(),y=requireSha_js(),t=requireCipherBase();function d(E){t.call(this,"digest"),this._hash=E}return o(d,t),d.prototype._update=function(E){this._hash.update(E)},d.prototype._final=function(){return this._hash.digest()},browser$a=function(B){return B=B.toLowerCase(),B==="md5"?new g:B==="rmd160"||B==="ripemd160"?new c:new d(y(B))},browser$a}var src$3,hasRequiredSrc$3;function requireSrc$3(){if(hasRequiredSrc$3)return src$3;hasRequiredSrc$3=1;var o=requireSafeBuffer$1().Buffer;function g(c){if(c.length>=255)throw new TypeError("Alphabet too long");for(var y=new Uint8Array(256),t=0;t<y.length;t++)y[t]=255;for(var d=0;d<c.length;d++){var E=c.charAt(d),B=E.charCodeAt(0);if(y[B]!==255)throw new TypeError(E+" is ambiguous");y[B]=d}var D=c.length,x=c.charAt(0),v=Math.log(D)/Math.log(256),F=Math.log(256)/Math.log(D);function M(H){if((Array.isArray(H)||H instanceof Uint8Array)&&(H=o.from(H)),!o.isBuffer(H))throw new TypeError("Expected Buffer");if(H.length===0)return"";for(var fe=0,ge=0,Ie=0,Ee=H.length;Ie!==Ee&&H[Ie]===0;)Ie++,fe++;for(var Se=(Ee-Ie)*F+1>>>0,ze=new Uint8Array(Se);Ie!==Ee;){for(var He=H[Ie],Ne=0,Pe=Se-1;(He!==0||Ne<ge)&&Pe!==-1;Pe--,Ne++)He+=256*ze[Pe]>>>0,ze[Pe]=He%D>>>0,He=He/D>>>0;if(He!==0)throw new Error("Non-zero carry");ge=Ne,Ie++}for(var ve=Se-ge;ve!==Se&&ze[ve]===0;)ve++;for(var Fe=x.repeat(fe);ve<Se;++ve)Fe+=c.charAt(ze[ve]);return Fe}function U(H){if(typeof H!="string")throw new TypeError("Expected String");if(H.length===0)return o.alloc(0);for(var fe=0,ge=0,Ie=0;H[fe]===x;)ge++,fe++;for(var Ee=(H.length-fe)*v+1>>>0,Se=new Uint8Array(Ee);fe<H.length;){var ze=H.charCodeAt(fe);if(ze>255)return;var He=y[ze];if(He===255)return;for(var Ne=0,Pe=Ee-1;(He!==0||Ne<Ie)&&Pe!==-1;Pe--,Ne++)He+=D*Se[Pe]>>>0,Se[Pe]=He%256>>>0,He=He/256>>>0;if(He!==0)throw new Error("Non-zero carry");Ie=Ne,fe++}for(var ve=Ee-Ie;ve!==Ee&&Se[ve]===0;)ve++;var Fe=o.allocUnsafe(ge+(Ee-ve));Fe.fill(0,0,ge);for(var be=ge;ve!==Ee;)Fe[be++]=Se[ve++];return Fe}function L(H){var fe=U(H);if(fe)return fe;throw new Error("Non-base"+D+" character")}return{encode:M,decodeUnsafe:U,decode:L}}return src$3=g,src$3}var bs58$1,hasRequiredBs58$1;function requireBs58$1(){if(hasRequiredBs58$1)return bs58$1;hasRequiredBs58$1=1;var o=requireSrc$3(),g="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return bs58$1=o(g),bs58$1}var base$3,hasRequiredBase$3;function requireBase$3(){if(hasRequiredBase$3)return base$3;hasRequiredBase$3=1;var o=requireBs58$1(),g=requireSafeBuffer$1().Buffer;return base$3=function(c){function y(B){var D=c(B);return o.encode(g.concat([B,D],B.length+4))}function t(B){var D=B.slice(0,-4),x=B.slice(-4),v=c(D);if(!(x[0]^v[0]|x[1]^v[1]|x[2]^v[2]|x[3]^v[3]))return D}function d(B){var D=o.decodeUnsafe(B);if(D)return t(D)}function E(B){var D=o.decode(B),x=t(D);if(!x)throw new Error("Invalid checksum");return x}return{encode:y,decode:E,decodeUnsafe:d}},base$3}var bs58check$1,hasRequiredBs58check$1;function requireBs58check$1(){if(hasRequiredBs58check$1)return bs58check$1;hasRequiredBs58check$1=1;var o=requireBrowser$a(),g=requireBase$3();function c(y){var t=o("sha256").update(y).digest();return o("sha256").update(t).digest()}return bs58check$1=g(c),bs58check$1}var CryptoCoinInfo$2={},RegistryItem$2={},dist$n={},ur$1={},errors$6={},hasRequiredErrors$6;function requireErrors$6(){if(hasRequiredErrors$6)return errors$6;hasRequiredErrors$6=1,Object.defineProperty(errors$6,"__esModule",{value:!0}),errors$6.InvalidChecksumError=errors$6.InvalidSequenceComponentError=errors$6.InvalidTypeError=errors$6.InvalidPathLengthError=errors$6.InvalidSchemeError=void 0;class o extends Error{constructor(){super("Invalid Scheme"),this.name="InvalidSchemeError"}}errors$6.InvalidSchemeError=o;class g extends Error{constructor(){super("Invalid Path"),this.name="InvalidPathLengthError"}}errors$6.InvalidPathLengthError=g;class c extends Error{constructor(){super("Invalid Type"),this.name="InvalidTypeError"}}errors$6.InvalidTypeError=c;class y extends Error{constructor(){super("Invalid Sequence Component"),this.name="InvalidSequenceComponentError"}}errors$6.InvalidSequenceComponentError=y;class t extends Error{constructor(){super("Invalid Checksum"),this.name="InvalidChecksumError"}}return errors$6.InvalidChecksumError=t,errors$6}var utils$g={},buffer$1={};var hasRequiredBuffer$1;function requireBuffer$1(){return hasRequiredBuffer$1||(hasRequiredBuffer$1=1,function(o){var g=requireBase64Js(),c=requireIeee754(),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=B,o.SlowBuffer=Ie,o.INSPECT_MAX_BYTES=50;var t=2147483647;o.kMaxLength=t,B.TYPED_ARRAY_SUPPORT=d(),!B.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function d(){try{var Ar=new Uint8Array(1),cr={foo:function(){return 42}};return Object.setPrototypeOf(cr,Uint8Array.prototype),Object.setPrototypeOf(Ar,cr),Ar.foo()===42}catch{return!1}}Object.defineProperty(B.prototype,"parent",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.buffer}}),Object.defineProperty(B.prototype,"offset",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.byteOffset}});function E(Ar){if(Ar>t)throw new RangeError('The value "'+Ar+'" is invalid for option "size"');var cr=new Uint8Array(Ar);return Object.setPrototypeOf(cr,B.prototype),cr}function B(Ar,cr,hr){if(typeof Ar=="number"){if(typeof cr=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(Ar)}return D(Ar,cr,hr)}B.poolSize=8192;function D(Ar,cr,hr){if(typeof Ar=="string")return M(Ar,cr);if(ArrayBuffer.isView(Ar))return L(Ar);if(Ar==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ar);if(Gr(Ar,ArrayBuffer)||Ar&&Gr(Ar.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Gr(Ar,SharedArrayBuffer)||Ar&&Gr(Ar.buffer,SharedArrayBuffer)))return H(Ar,cr,hr);if(typeof Ar=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var jr=Ar.valueOf&&Ar.valueOf();if(jr!=null&&jr!==Ar)return B.from(jr,cr,hr);var fi=fe(Ar);if(fi)return fi;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ar[Symbol.toPrimitive]=="function")return B.from(Ar[Symbol.toPrimitive]("string"),cr,hr);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ar)}B.from=function(Ar,cr,hr){return D(Ar,cr,hr)},Object.setPrototypeOf(B.prototype,Uint8Array.prototype),Object.setPrototypeOf(B,Uint8Array);function x(Ar){if(typeof Ar!="number")throw new TypeError('"size" argument must be of type number');if(Ar<0)throw new RangeError('The value "'+Ar+'" is invalid for option "size"')}function v(Ar,cr,hr){return x(Ar),Ar<=0?E(Ar):cr!==void 0?typeof hr=="string"?E(Ar).fill(cr,hr):E(Ar).fill(cr):E(Ar)}B.alloc=function(Ar,cr,hr){return v(Ar,cr,hr)};function F(Ar){return x(Ar),E(Ar<0?0:ge(Ar)|0)}B.allocUnsafe=function(Ar){return F(Ar)},B.allocUnsafeSlow=function(Ar){return F(Ar)};function M(Ar,cr){if((typeof cr!="string"||cr==="")&&(cr="utf8"),!B.isEncoding(cr))throw new TypeError("Unknown encoding: "+cr);var hr=Ee(Ar,cr)|0,jr=E(hr),fi=jr.write(Ar,cr);return fi!==hr&&(jr=jr.slice(0,fi)),jr}function U(Ar){for(var cr=Ar.length<0?0:ge(Ar.length)|0,hr=E(cr),jr=0;jr<cr;jr+=1)hr[jr]=Ar[jr]&255;return hr}function L(Ar){if(Gr(Ar,Uint8Array)){var cr=new Uint8Array(Ar);return H(cr.buffer,cr.byteOffset,cr.byteLength)}return U(Ar)}function H(Ar,cr,hr){if(cr<0||Ar.byteLength<cr)throw new RangeError('"offset" is outside of buffer bounds');if(Ar.byteLength<cr+(hr||0))throw new RangeError('"length" is outside of buffer bounds');var jr;return cr===void 0&&hr===void 0?jr=new Uint8Array(Ar):hr===void 0?jr=new Uint8Array(Ar,cr):jr=new Uint8Array(Ar,cr,hr),Object.setPrototypeOf(jr,B.prototype),jr}function fe(Ar){if(B.isBuffer(Ar)){var cr=ge(Ar.length)|0,hr=E(cr);return hr.length===0||Ar.copy(hr,0,0,cr),hr}if(Ar.length!==void 0)return typeof Ar.length!="number"||Fr(Ar.length)?E(0):U(Ar);if(Ar.type==="Buffer"&&Array.isArray(Ar.data))return U(Ar.data)}function ge(Ar){if(Ar>=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return Ar|0}function Ie(Ar){return+Ar!=Ar&&(Ar=0),B.alloc(+Ar)}B.isBuffer=function(cr){return cr!=null&&cr._isBuffer===!0&&cr!==B.prototype},B.compare=function(cr,hr){if(Gr(cr,Uint8Array)&&(cr=B.from(cr,cr.offset,cr.byteLength)),Gr(hr,Uint8Array)&&(hr=B.from(hr,hr.offset,hr.byteLength)),!B.isBuffer(cr)||!B.isBuffer(hr))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(cr===hr)return 0;for(var jr=cr.length,fi=hr.length,Bi=0,$r=Math.min(jr,fi);Bi<$r;++Bi)if(cr[Bi]!==hr[Bi]){jr=cr[Bi],fi=hr[Bi];break}return jr<fi?-1:fi<jr?1:0},B.isEncoding=function(cr){switch(String(cr).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}},B.concat=function(cr,hr){if(!Array.isArray(cr))throw new TypeError('"list" argument must be an Array of Buffers');if(cr.length===0)return B.alloc(0);var jr;if(hr===void 0)for(hr=0,jr=0;jr<cr.length;++jr)hr+=cr[jr].length;var fi=B.allocUnsafe(hr),Bi=0;for(jr=0;jr<cr.length;++jr){var $r=cr[jr];if(Gr($r,Uint8Array))Bi+$r.length>fi.length?B.from($r).copy(fi,Bi):Uint8Array.prototype.set.call(fi,$r,Bi);else if(B.isBuffer($r))$r.copy(fi,Bi);else throw new TypeError('"list" argument must be an Array of Buffers');Bi+=$r.length}return fi};function Ee(Ar,cr){if(B.isBuffer(Ar))return Ar.length;if(ArrayBuffer.isView(Ar)||Gr(Ar,ArrayBuffer))return Ar.byteLength;if(typeof Ar!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ar);var hr=Ar.length,jr=arguments.length>2&&arguments[2]===!0;if(!jr&&hr===0)return 0;for(var fi=!1;;)switch(cr){case"ascii":case"latin1":case"binary":return hr;case"utf8":case"utf-8":return Qr(Ar).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hr*2;case"hex":return hr>>>1;case"base64":return Ur(Ar).length;default:if(fi)return jr?-1:Qr(Ar).length;cr=(""+cr).toLowerCase(),fi=!0}}B.byteLength=Ee;function Se(Ar,cr,hr){var jr=!1;if((cr===void 0||cr<0)&&(cr=0),cr>this.length||((hr===void 0||hr>this.length)&&(hr=this.length),hr<=0)||(hr>>>=0,cr>>>=0,hr<=cr))return"";for(Ar||(Ar="utf8");;)switch(Ar){case"hex":return er(this,cr,hr);case"utf8":case"utf-8":return xe(this,cr,hr);case"ascii":return st(this,cr,hr);case"latin1":case"binary":return Dt(this,cr,hr);case"base64":return ke(this,cr,hr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,cr,hr);default:if(jr)throw new TypeError("Unknown encoding: "+Ar);Ar=(Ar+"").toLowerCase(),jr=!0}}B.prototype._isBuffer=!0;function ze(Ar,cr,hr){var jr=Ar[cr];Ar[cr]=Ar[hr],Ar[hr]=jr}B.prototype.swap16=function(){var cr=this.length;if(cr%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var hr=0;hr<cr;hr+=2)ze(this,hr,hr+1);return this},B.prototype.swap32=function(){var cr=this.length;if(cr%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var hr=0;hr<cr;hr+=4)ze(this,hr,hr+3),ze(this,hr+1,hr+2);return this},B.prototype.swap64=function(){var cr=this.length;if(cr%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var hr=0;hr<cr;hr+=8)ze(this,hr,hr+7),ze(this,hr+1,hr+6),ze(this,hr+2,hr+5),ze(this,hr+3,hr+4);return this},B.prototype.toString=function(){var cr=this.length;return cr===0?"":arguments.length===0?xe(this,0,cr):Se.apply(this,arguments)},B.prototype.toLocaleString=B.prototype.toString,B.prototype.equals=function(cr){if(!B.isBuffer(cr))throw new TypeError("Argument must be a Buffer");return this===cr?!0:B.compare(this,cr)===0},B.prototype.inspect=function(){var cr="",hr=o.INSPECT_MAX_BYTES;return cr=this.toString("hex",0,hr).replace(/(.{2})/g,"$1 ").trim(),this.length>hr&&(cr+=" ... "),"<Buffer "+cr+">"},y&&(B.prototype[y]=B.prototype.inspect),B.prototype.compare=function(cr,hr,jr,fi,Bi){if(Gr(cr,Uint8Array)&&(cr=B.from(cr,cr.offset,cr.byteLength)),!B.isBuffer(cr))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof cr);if(hr===void 0&&(hr=0),jr===void 0&&(jr=cr?cr.length:0),fi===void 0&&(fi=0),Bi===void 0&&(Bi=this.length),hr<0||jr>cr.length||fi<0||Bi>this.length)throw new RangeError("out of range index");if(fi>=Bi&&hr>=jr)return 0;if(fi>=Bi)return-1;if(hr>=jr)return 1;if(hr>>>=0,jr>>>=0,fi>>>=0,Bi>>>=0,this===cr)return 0;for(var $r=Bi-fi,oi=jr-hr,zr=Math.min($r,oi),ti=this.slice(fi,Bi),Lr=cr.slice(hr,jr),Rr=0;Rr<zr;++Rr)if(ti[Rr]!==Lr[Rr]){$r=ti[Rr],oi=Lr[Rr];break}return $r<oi?-1:oi<$r?1:0};function He(Ar,cr,hr,jr,fi){if(Ar.length===0)return-1;if(typeof hr=="string"?(jr=hr,hr=0):hr>2147483647?hr=2147483647:hr<-2147483648&&(hr=-2147483648),hr=+hr,Fr(hr)&&(hr=fi?0:Ar.length-1),hr<0&&(hr=Ar.length+hr),hr>=Ar.length){if(fi)return-1;hr=Ar.length-1}else if(hr<0)if(fi)hr=0;else return-1;if(typeof cr=="string"&&(cr=B.from(cr,jr)),B.isBuffer(cr))return cr.length===0?-1:Ne(Ar,cr,hr,jr,fi);if(typeof cr=="number")return cr=cr&255,typeof Uint8Array.prototype.indexOf=="function"?fi?Uint8Array.prototype.indexOf.call(Ar,cr,hr):Uint8Array.prototype.lastIndexOf.call(Ar,cr,hr):Ne(Ar,[cr],hr,jr,fi);throw new TypeError("val must be string, number or Buffer")}function Ne(Ar,cr,hr,jr,fi){var Bi=1,$r=Ar.length,oi=cr.length;if(jr!==void 0&&(jr=String(jr).toLowerCase(),jr==="ucs2"||jr==="ucs-2"||jr==="utf16le"||jr==="utf-16le")){if(Ar.length<2||cr.length<2)return-1;Bi=2,$r/=2,oi/=2,hr/=2}function zr(pr,Cr){return Bi===1?pr[Cr]:pr.readUInt16BE(Cr*Bi)}var ti;if(fi){var Lr=-1;for(ti=hr;ti<$r;ti++)if(zr(Ar,ti)===zr(cr,Lr===-1?0:ti-Lr)){if(Lr===-1&&(Lr=ti),ti-Lr+1===oi)return Lr*Bi}else Lr!==-1&&(ti-=ti-Lr),Lr=-1}else for(hr+oi>$r&&(hr=$r-oi),ti=hr;ti>=0;ti--){for(var Rr=!0,Ir=0;Ir<oi;Ir++)if(zr(Ar,ti+Ir)!==zr(cr,Ir)){Rr=!1;break}if(Rr)return ti}return-1}B.prototype.includes=function(cr,hr,jr){return this.indexOf(cr,hr,jr)!==-1},B.prototype.indexOf=function(cr,hr,jr){return He(this,cr,hr,jr,!0)},B.prototype.lastIndexOf=function(cr,hr,jr){return He(this,cr,hr,jr,!1)};function Pe(Ar,cr,hr,jr){hr=Number(hr)||0;var fi=Ar.length-hr;jr?(jr=Number(jr),jr>fi&&(jr=fi)):jr=fi;var Bi=cr.length;jr>Bi/2&&(jr=Bi/2);for(var $r=0;$r<jr;++$r){var oi=parseInt(cr.substr($r*2,2),16);if(Fr(oi))return $r;Ar[hr+$r]=oi}return $r}function ve(Ar,cr,hr,jr){return Sr(Qr(cr,Ar.length-hr),Ar,hr,jr)}function Fe(Ar,cr,hr,jr){return Sr(Xr(cr),Ar,hr,jr)}function be(Ar,cr,hr,jr){return Sr(Ur(cr),Ar,hr,jr)}function Be(Ar,cr,hr,jr){return Sr(Wr(cr,Ar.length-hr),Ar,hr,jr)}B.prototype.write=function(cr,hr,jr,fi){if(hr===void 0)fi="utf8",jr=this.length,hr=0;else if(jr===void 0&&typeof hr=="string")fi=hr,jr=this.length,hr=0;else if(isFinite(hr))hr=hr>>>0,isFinite(jr)?(jr=jr>>>0,fi===void 0&&(fi="utf8")):(fi=jr,jr=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Bi=this.length-hr;if((jr===void 0||jr>Bi)&&(jr=Bi),cr.length>0&&(jr<0||hr<0)||hr>this.length)throw new RangeError("Attempt to write outside buffer bounds");fi||(fi="utf8");for(var $r=!1;;)switch(fi){case"hex":return Pe(this,cr,hr,jr);case"utf8":case"utf-8":return ve(this,cr,hr,jr);case"ascii":case"latin1":case"binary":return Fe(this,cr,hr,jr);case"base64":return be(this,cr,hr,jr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Be(this,cr,hr,jr);default:if($r)throw new TypeError("Unknown encoding: "+fi);fi=(""+fi).toLowerCase(),$r=!0}},B.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ke(Ar,cr,hr){return cr===0&&hr===Ar.length?g.fromByteArray(Ar):g.fromByteArray(Ar.slice(cr,hr))}function xe(Ar,cr,hr){hr=Math.min(Ar.length,hr);for(var jr=[],fi=cr;fi<hr;){var Bi=Ar[fi],$r=null,oi=Bi>239?4:Bi>223?3:Bi>191?2:1;if(fi+oi<=hr){var zr,ti,Lr,Rr;switch(oi){case 1:Bi<128&&($r=Bi);break;case 2:zr=Ar[fi+1],(zr&192)===128&&(Rr=(Bi&31)<<6|zr&63,Rr>127&&($r=Rr));break;case 3:zr=Ar[fi+1],ti=Ar[fi+2],(zr&192)===128&&(ti&192)===128&&(Rr=(Bi&15)<<12|(zr&63)<<6|ti&63,Rr>2047&&(Rr<55296||Rr>57343)&&($r=Rr));break;case 4:zr=Ar[fi+1],ti=Ar[fi+2],Lr=Ar[fi+3],(zr&192)===128&&(ti&192)===128&&(Lr&192)===128&&(Rr=(Bi&15)<<18|(zr&63)<<12|(ti&63)<<6|Lr&63,Rr>65535&&Rr<1114112&&($r=Rr))}}$r===null?($r=65533,oi=1):$r>65535&&($r-=65536,jr.push($r>>>10&1023|55296),$r=56320|$r&1023),jr.push($r),fi+=oi}return Et(jr)}var De=4096;function Et(Ar){var cr=Ar.length;if(cr<=De)return String.fromCharCode.apply(String,Ar);for(var hr="",jr=0;jr<cr;)hr+=String.fromCharCode.apply(String,Ar.slice(jr,jr+=De));return hr}function st(Ar,cr,hr){var jr="";hr=Math.min(Ar.length,hr);for(var fi=cr;fi<hr;++fi)jr+=String.fromCharCode(Ar[fi]&127);return jr}function Dt(Ar,cr,hr){var jr="";hr=Math.min(Ar.length,hr);for(var fi=cr;fi<hr;++fi)jr+=String.fromCharCode(Ar[fi]);return jr}function er(Ar,cr,hr){var jr=Ar.length;(!cr||cr<0)&&(cr=0),(!hr||hr<0||hr>jr)&&(hr=jr);for(var fi="",Bi=cr;Bi<hr;++Bi)fi+=br[Ar[Bi]];return fi}function xt(Ar,cr,hr){for(var jr=Ar.slice(cr,hr),fi="",Bi=0;Bi<jr.length-1;Bi+=2)fi+=String.fromCharCode(jr[Bi]+jr[Bi+1]*256);return fi}B.prototype.slice=function(cr,hr){var jr=this.length;cr=~~cr,hr=hr===void 0?jr:~~hr,cr<0?(cr+=jr,cr<0&&(cr=0)):cr>jr&&(cr=jr),hr<0?(hr+=jr,hr<0&&(hr=0)):hr>jr&&(hr=jr),hr<cr&&(hr=cr);var fi=this.subarray(cr,hr);return Object.setPrototypeOf(fi,B.prototype),fi};function ir(Ar,cr,hr){if(Ar%1!==0||Ar<0)throw new RangeError("offset is not uint");if(Ar+cr>hr)throw new RangeError("Trying to access beyond buffer length")}B.prototype.readUintLE=B.prototype.readUIntLE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=this[cr],Bi=1,$r=0;++$r<hr&&(Bi*=256);)fi+=this[cr+$r]*Bi;return fi},B.prototype.readUintBE=B.prototype.readUIntBE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=this[cr+--hr],Bi=1;hr>0&&(Bi*=256);)fi+=this[cr+--hr]*Bi;return fi},B.prototype.readUint8=B.prototype.readUInt8=function(cr,hr){return cr=cr>>>0,hr||ir(cr,1,this.length),this[cr]},B.prototype.readUint16LE=B.prototype.readUInt16LE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,2,this.length),this[cr]|this[cr+1]<<8},B.prototype.readUint16BE=B.prototype.readUInt16BE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,2,this.length),this[cr]<<8|this[cr+1]},B.prototype.readUint32LE=B.prototype.readUInt32LE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),(this[cr]|this[cr+1]<<8|this[cr+2]<<16)+this[cr+3]*16777216},B.prototype.readUint32BE=B.prototype.readUInt32BE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),this[cr]*16777216+(this[cr+1]<<16|this[cr+2]<<8|this[cr+3])},B.prototype.readIntLE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=this[cr],Bi=1,$r=0;++$r<hr&&(Bi*=256);)fi+=this[cr+$r]*Bi;return Bi*=128,fi>=Bi&&(fi-=Math.pow(2,8*hr)),fi},B.prototype.readIntBE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=hr,Bi=1,$r=this[cr+--fi];fi>0&&(Bi*=256);)$r+=this[cr+--fi]*Bi;return Bi*=128,$r>=Bi&&($r-=Math.pow(2,8*hr)),$r},B.prototype.readInt8=function(cr,hr){return cr=cr>>>0,hr||ir(cr,1,this.length),this[cr]&128?(255-this[cr]+1)*-1:this[cr]},B.prototype.readInt16LE=function(cr,hr){cr=cr>>>0,hr||ir(cr,2,this.length);var jr=this[cr]|this[cr+1]<<8;return jr&32768?jr|4294901760:jr},B.prototype.readInt16BE=function(cr,hr){cr=cr>>>0,hr||ir(cr,2,this.length);var jr=this[cr+1]|this[cr]<<8;return jr&32768?jr|4294901760:jr},B.prototype.readInt32LE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),this[cr]|this[cr+1]<<8|this[cr+2]<<16|this[cr+3]<<24},B.prototype.readInt32BE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),this[cr]<<24|this[cr+1]<<16|this[cr+2]<<8|this[cr+3]},B.prototype.readFloatLE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),c.read(this,cr,!0,23,4)},B.prototype.readFloatBE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),c.read(this,cr,!1,23,4)},B.prototype.readDoubleLE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,8,this.length),c.read(this,cr,!0,52,8)},B.prototype.readDoubleBE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,8,this.length),c.read(this,cr,!1,52,8)};function sr(Ar,cr,hr,jr,fi,Bi){if(!B.isBuffer(Ar))throw new TypeError('"buffer" argument must be a Buffer instance');if(cr>fi||cr<Bi)throw new RangeError('"value" argument is out of bounds');if(hr+jr>Ar.length)throw new RangeError("Index out of range")}B.prototype.writeUintLE=B.prototype.writeUIntLE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,jr=jr>>>0,!fi){var Bi=Math.pow(2,8*jr)-1;sr(this,cr,hr,jr,Bi,0)}var $r=1,oi=0;for(this[hr]=cr&255;++oi<jr&&($r*=256);)this[hr+oi]=cr/$r&255;return hr+jr},B.prototype.writeUintBE=B.prototype.writeUIntBE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,jr=jr>>>0,!fi){var Bi=Math.pow(2,8*jr)-1;sr(this,cr,hr,jr,Bi,0)}var $r=jr-1,oi=1;for(this[hr+$r]=cr&255;--$r>=0&&(oi*=256);)this[hr+$r]=cr/oi&255;return hr+jr},B.prototype.writeUint8=B.prototype.writeUInt8=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,1,255,0),this[hr]=cr&255,hr+1},B.prototype.writeUint16LE=B.prototype.writeUInt16LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,65535,0),this[hr]=cr&255,this[hr+1]=cr>>>8,hr+2},B.prototype.writeUint16BE=B.prototype.writeUInt16BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,65535,0),this[hr]=cr>>>8,this[hr+1]=cr&255,hr+2},B.prototype.writeUint32LE=B.prototype.writeUInt32LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,4294967295,0),this[hr+3]=cr>>>24,this[hr+2]=cr>>>16,this[hr+1]=cr>>>8,this[hr]=cr&255,hr+4},B.prototype.writeUint32BE=B.prototype.writeUInt32BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,4294967295,0),this[hr]=cr>>>24,this[hr+1]=cr>>>16,this[hr+2]=cr>>>8,this[hr+3]=cr&255,hr+4},B.prototype.writeIntLE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,!fi){var Bi=Math.pow(2,8*jr-1);sr(this,cr,hr,jr,Bi-1,-Bi)}var $r=0,oi=1,zr=0;for(this[hr]=cr&255;++$r<jr&&(oi*=256);)cr<0&&zr===0&&this[hr+$r-1]!==0&&(zr=1),this[hr+$r]=(cr/oi>>0)-zr&255;return hr+jr},B.prototype.writeIntBE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,!fi){var Bi=Math.pow(2,8*jr-1);sr(this,cr,hr,jr,Bi-1,-Bi)}var $r=jr-1,oi=1,zr=0;for(this[hr+$r]=cr&255;--$r>=0&&(oi*=256);)cr<0&&zr===0&&this[hr+$r+1]!==0&&(zr=1),this[hr+$r]=(cr/oi>>0)-zr&255;return hr+jr},B.prototype.writeInt8=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,1,127,-128),cr<0&&(cr=255+cr+1),this[hr]=cr&255,hr+1},B.prototype.writeInt16LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,32767,-32768),this[hr]=cr&255,this[hr+1]=cr>>>8,hr+2},B.prototype.writeInt16BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,32767,-32768),this[hr]=cr>>>8,this[hr+1]=cr&255,hr+2},B.prototype.writeInt32LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,2147483647,-2147483648),this[hr]=cr&255,this[hr+1]=cr>>>8,this[hr+2]=cr>>>16,this[hr+3]=cr>>>24,hr+4},B.prototype.writeInt32BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,2147483647,-2147483648),cr<0&&(cr=4294967295+cr+1),this[hr]=cr>>>24,this[hr+1]=cr>>>16,this[hr+2]=cr>>>8,this[hr+3]=cr&255,hr+4};function yr(Ar,cr,hr,jr,fi,Bi){if(hr+jr>Ar.length)throw new RangeError("Index out of range");if(hr<0)throw new RangeError("Index out of range")}function wr(Ar,cr,hr,jr,fi){return cr=+cr,hr=hr>>>0,fi||yr(Ar,cr,hr,4),c.write(Ar,cr,hr,jr,23,4),hr+4}B.prototype.writeFloatLE=function(cr,hr,jr){return wr(this,cr,hr,!0,jr)},B.prototype.writeFloatBE=function(cr,hr,jr){return wr(this,cr,hr,!1,jr)};function qr(Ar,cr,hr,jr,fi){return cr=+cr,hr=hr>>>0,fi||yr(Ar,cr,hr,8),c.write(Ar,cr,hr,jr,52,8),hr+8}B.prototype.writeDoubleLE=function(cr,hr,jr){return qr(this,cr,hr,!0,jr)},B.prototype.writeDoubleBE=function(cr,hr,jr){return qr(this,cr,hr,!1,jr)},B.prototype.copy=function(cr,hr,jr,fi){if(!B.isBuffer(cr))throw new TypeError("argument should be a Buffer");if(jr||(jr=0),!fi&&fi!==0&&(fi=this.length),hr>=cr.length&&(hr=cr.length),hr||(hr=0),fi>0&&fi<jr&&(fi=jr),fi===jr||cr.length===0||this.length===0)return 0;if(hr<0)throw new RangeError("targetStart out of bounds");if(jr<0||jr>=this.length)throw new RangeError("Index out of range");if(fi<0)throw new RangeError("sourceEnd out of bounds");fi>this.length&&(fi=this.length),cr.length-hr<fi-jr&&(fi=cr.length-hr+jr);var Bi=fi-jr;return this===cr&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(hr,jr,fi):Uint8Array.prototype.set.call(cr,this.subarray(jr,fi),hr),Bi},B.prototype.fill=function(cr,hr,jr,fi){if(typeof cr=="string"){if(typeof hr=="string"?(fi=hr,hr=0,jr=this.length):typeof jr=="string"&&(fi=jr,jr=this.length),fi!==void 0&&typeof fi!="string")throw new TypeError("encoding must be a string");if(typeof fi=="string"&&!B.isEncoding(fi))throw new TypeError("Unknown encoding: "+fi);if(cr.length===1){var Bi=cr.charCodeAt(0);(fi==="utf8"&&Bi<128||fi==="latin1")&&(cr=Bi)}}else typeof cr=="number"?cr=cr&255:typeof cr=="boolean"&&(cr=Number(cr));if(hr<0||this.length<hr||this.length<jr)throw new RangeError("Out of range index");if(jr<=hr)return this;hr=hr>>>0,jr=jr===void 0?this.length:jr>>>0,cr||(cr=0);var $r;if(typeof cr=="number")for($r=hr;$r<jr;++$r)this[$r]=cr;else{var oi=B.isBuffer(cr)?cr:B.from(cr,fi),zr=oi.length;if(zr===0)throw new TypeError('The value "'+cr+'" is invalid for argument "value"');for($r=0;$r<jr-hr;++$r)this[$r+hr]=oi[$r%zr]}return this};var Mr=/[^+/0-9A-Za-z-_]/g;function Dr(Ar){if(Ar=Ar.split("=")[0],Ar=Ar.trim().replace(Mr,""),Ar.length<2)return"";for(;Ar.length%4!==0;)Ar=Ar+"=";return Ar}function Qr(Ar,cr){cr=cr||1/0;for(var hr,jr=Ar.length,fi=null,Bi=[],$r=0;$r<jr;++$r){if(hr=Ar.charCodeAt($r),hr>55295&&hr<57344){if(!fi){if(hr>56319){(cr-=3)>-1&&Bi.push(239,191,189);continue}else if($r+1===jr){(cr-=3)>-1&&Bi.push(239,191,189);continue}fi=hr;continue}if(hr<56320){(cr-=3)>-1&&Bi.push(239,191,189),fi=hr;continue}hr=(fi-55296<<10|hr-56320)+65536}else fi&&(cr-=3)>-1&&Bi.push(239,191,189);if(fi=null,hr<128){if((cr-=1)<0)break;Bi.push(hr)}else if(hr<2048){if((cr-=2)<0)break;Bi.push(hr>>6|192,hr&63|128)}else if(hr<65536){if((cr-=3)<0)break;Bi.push(hr>>12|224,hr>>6&63|128,hr&63|128)}else if(hr<1114112){if((cr-=4)<0)break;Bi.push(hr>>18|240,hr>>12&63|128,hr>>6&63|128,hr&63|128)}else throw new Error("Invalid code point")}return Bi}function Xr(Ar){for(var cr=[],hr=0;hr<Ar.length;++hr)cr.push(Ar.charCodeAt(hr)&255);return cr}function Wr(Ar,cr){for(var hr,jr,fi,Bi=[],$r=0;$r<Ar.length&&!((cr-=2)<0);++$r)hr=Ar.charCodeAt($r),jr=hr>>8,fi=hr%256,Bi.push(fi),Bi.push(jr);return Bi}function Ur(Ar){return g.toByteArray(Dr(Ar))}function Sr(Ar,cr,hr,jr){for(var fi=0;fi<jr&&!(fi+hr>=cr.length||fi>=Ar.length);++fi)cr[fi+hr]=Ar[fi];return fi}function Gr(Ar,cr){return Ar instanceof cr||Ar!=null&&Ar.constructor!=null&&Ar.constructor.name!=null&&Ar.constructor.name===cr.name}function Fr(Ar){return Ar!==Ar}var br=function(){for(var Ar="0123456789abcdef",cr=new Array(256),hr=0;hr<16;++hr)for(var jr=hr*16,fi=0;fi<16;++fi)cr[jr+fi]=Ar[hr]+Ar[fi];return cr}()}(buffer$1)),buffer$1}var bufferExports$1=requireBuffer$1();const createBuffer=bufferExports$1.Buffer.from&&bufferExports$1.Buffer.alloc&&bufferExports$1.Buffer.allocUnsafe&&bufferExports$1.Buffer.allocUnsafeSlow?bufferExports$1.Buffer.from:o=>new bufferExports$1.Buffer(o);function defineCrc(o,g){const c=(y,t)=>g(y,t)>>>0;return c.signed=g,c.unsigned=c,c.model=o,c}const crc1=defineCrc("crc1",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g,y=0;for(let t=0;t<o.length;t++){const d=o[t];y+=d}return c+=y%256,c%256});let TABLE$8=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];typeof Int32Array<"u"&&(TABLE$8=new Int32Array(TABLE$8));const crc8=defineCrc("crc-8",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE$8[(c^t)&255]&255}return c});let TABLE$7=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];typeof Int32Array<"u"&&(TABLE$7=new Int32Array(TABLE$7));const crc81wire=defineCrc("dallas-1-wire",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE$7[(c^t)&255]&255}return c});let TABLE$6=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(TABLE$6=new Int32Array(TABLE$6));const crc16=defineCrc("crc-16",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$6[(c^t)&255]^c>>8)&65535}return c});let TABLE$5=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];typeof Int32Array<"u"&&(TABLE$5=new Int32Array(TABLE$5));const crc16ccitt=defineCrc("ccitt",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:65535;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$5[(c>>8^t)&255]^c<<8)&65535}return c});let TABLE$4=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(TABLE$4=new Int32Array(TABLE$4));const crc16modbus=defineCrc("crc-16-modbus",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:65535;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$4[(c^t)&255]^c>>8)&65535}return c}),crc16xmodem=defineCrc("xmodem",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:0;for(let y=0;y<o.length;y++){const t=o[y];let d=c>>>8&255;d^=t&255,d^=d>>>4,c=c<<8&65535,c^=d,d=d<<5&65535,c^=d,d=d<<7&65535,c^=d}return c});let TABLE$3=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];typeof Int32Array<"u"&&(TABLE$3=new Int32Array(TABLE$3));const crc16kermit=defineCrc("kermit",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:0;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$3[(c^t)&255]^c>>8)&65535}return c});let TABLE$2=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];typeof Int32Array<"u"&&(TABLE$2=new Int32Array(TABLE$2));const crc24=defineCrc("crc-24",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:11994318;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$2[(c>>16^t)&255]^c<<8)&16777215}return c});let TABLE$1=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(TABLE$1=new Int32Array(TABLE$1));const crc32$1=defineCrc("crc-32",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=g===0?0:~~g^-1;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE$1[(c^t)&255]^c>>>8}return c^-1});let TABLE=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(TABLE=new Int32Array(TABLE));const crcjam=defineCrc("jam",function(o,g=-1){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=g===0?0:~~g;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE[(c^t)&255]^c>>>8}return c}),index={crc1,crc8,crc81wire,crc16,crc16ccitt,crc16modbus,crc16xmodem,crc16kermit,crc24,crc32:crc32$1,crcjam},crc=Object.freeze(Object.defineProperty({__proto__:null,crc1,crc16,crc16ccitt,crc16kermit,crc16modbus,crc16xmodem,crc24,crc32:crc32$1,crc8,crc81wire,crcjam,default:index},Symbol.toStringTag,{value:"Module"})),require$$1$4=getAugmentedNamespace(crc);var hasRequiredUtils$f;function requireUtils$f(){if(hasRequiredUtils$f)return utils$g;hasRequiredUtils$f=1;var o=utils$g&&utils$g.__importDefault||function(fe){return fe&&fe.__esModule?fe:{default:fe}};Object.defineProperty(utils$g,"__esModule",{value:!0}),utils$g.bufferXOR=utils$g.setDifference=utils$g.arrayContains=utils$g.arraysEqual=utils$g.hasPrefix=utils$g.isURType=utils$g.intToBytes=utils$g.toUint32=utils$g.getCRCHex=utils$g.getCRC=utils$g.split=utils$g.partition=utils$g.sha256Hash=void 0;const g=o(requireSha_js()),c=require$$1$4,y=fe=>g.default("sha256").update(fe).digest();utils$g.sha256Hash=y;const t=(fe,ge)=>fe.match(new RegExp(".{1,"+ge+"}","g"))||[fe];utils$g.partition=t;const d=(fe,ge)=>[fe.slice(0,-ge),fe.slice(-ge)];utils$g.split=d;const E=fe=>c.crc32(fe);utils$g.getCRC=E;const B=fe=>c.crc32(fe).toString(16).padStart(8,"0");utils$g.getCRCHex=B;const D=fe=>fe>>>0;utils$g.toUint32=D;const x=fe=>{const ge=new ArrayBuffer(4);return new DataView(ge).setUint32(0,fe,!1),Buffer.from(ge)};utils$g.intToBytes=x;const v=fe=>fe.split("").every((ge,Ie)=>{let Ee=fe.charCodeAt(Ie);return 97<=Ee&&Ee<=122||48<=Ee&&Ee<=57||Ee===45});utils$g.isURType=v;const F=(fe,ge)=>fe.indexOf(ge)===0;utils$g.hasPrefix=F;const M=(fe,ge)=>fe.length!==ge.length?!1:fe.every(Ie=>ge.includes(Ie));utils$g.arraysEqual=M;const U=(fe,ge)=>ge.every(Ie=>fe.includes(Ie));utils$g.arrayContains=U;const L=(fe,ge)=>fe.filter(Ie=>ge.indexOf(Ie)<0);utils$g.setDifference=L;const H=(fe,ge)=>{const Ie=Math.max(fe.length,ge.length),Ee=Buffer.allocUnsafe(Ie);for(let Se=0;Se<Ie;++Se)Ee[Se]=fe[Se]^ge[Se];return Ee};return utils$g.bufferXOR=H,utils$g}var cbor={},main$5={exports:{}},main$4=main$5.exports,hasRequiredMain$4;function requireMain$4(){return hasRequiredMain$4||(hasRequiredMain$4=1,function(o){(function(g,c){o.exports?o.exports=c():g.CBOR=c()})(main$4,function(){var g=function(){function c(He){this.$hex=He}c.prototype={length:function(){return this.$hex.length/2},toString:function(He){if(!He||He==="hex"||He===16)return this.$hex;if(He==="utf-8"){for(var Ne="",Pe=0;Pe<this.$hex.length;Pe+=2)Ne+="%"+this.$hex.substring(Pe,Pe+2);return decodeURIComponent(Ne)}if(He==="latin"){for(var Ne=[],Pe=0;Pe<this.$hex.length;Pe+=2)Ne.push(parseInt(this.$hex.substring(Pe,Pe+2),16));return String.fromCharCode.apply(String,Ne)}throw new Error("Unrecognised format: "+He)}},c.fromLatinString=function(He){for(var Ne="",Pe=0;Pe<He.length;Pe++){var ve=He.charCodeAt(Pe).toString(16);ve.length===1&&(ve="0"+ve),Ne+=ve}return new c(Ne)},c.fromUtf8String=function(He){for(var Ne=encodeURIComponent(He),Pe="",ve=0;ve<Ne.length;ve++)if(Ne.charAt(ve)==="%")Pe+=Ne.substring(ve+1,ve+3),ve+=2;else{var Fe=Ne.charCodeAt(ve).toString(16);Fe.length<2&&(Fe="0"+Fe),Pe+=Fe}return new c(Pe)};var y=[],t={},d=function(He){return function(){throw new Error(He+" not implemented")}};function E(){}E.prototype={peekByte:d("peekByte"),readByte:d("readByte"),readChunk:d("readChunk"),readFloat16:function(){var He=this.readUint16(),Ne=(He&32767)>>10,Pe=He&1023,ve=He&32768;if(Ne===31)return Pe===0?ve?-1/0:1/0:NaN;var Fe=Ne?Math.pow(2,Ne-25)*(1024+Pe):Math.pow(2,-24)*Pe;return ve?-Fe:Fe},readFloat32:function(){var He=this.readUint32(),Ne=(He&2147483647)>>23,Pe=He&8388607,ve=He&2147483648;if(Ne===255)return Pe===0?ve?-1/0:1/0:NaN;var Fe=Ne?Math.pow(2,Ne-23-127)*(8388608+Pe):Math.pow(2,-149)*Pe;return ve?-Fe:Fe},readFloat64:function(){var He=this.readUint32(),Ne=this.readUint32(),Pe=He>>20&2047,ve=(He&1048575)*4294967296+Ne,Fe=He&2147483648;if(Pe===2047)return ve===0?Fe?-1/0:1/0:NaN;var be=Pe?Math.pow(2,Pe-52-1023)*(4503599627370496+ve):Math.pow(2,-1074)*ve;return Fe?-be:be},readUint16:function(){return this.readByte()*256+this.readByte()},readUint32:function(){return this.readUint16()*65536+this.readUint16()},readUint64:function(){return this.readUint32()*4294967296+this.readUint32()}};function B(){}B.prototype={writeByte:d("writeByte"),result:d("result"),writeFloat16:d("writeFloat16"),writeFloat32:d("writeFloat32"),writeFloat64:d("writeFloat64"),writeUint16:function(He){this.writeByte(He>>8&255),this.writeByte(He&255)},writeUint32:function(He){this.writeUint16(He>>16&65535),this.writeUint16(He&65535)},writeUint64:function(He){if(He>=9007199254740992||He<=-9007199254740992)throw new Error("Cannot encode Uint64 of: "+He+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(He/4294967296)),this.writeUint32(He%4294967296)},writeString:d("writeString"),canWriteBinary:function(He){return!1},writeBinary:d("writeChunk")};function D(He){var Ne=He.readByte(),Pe=Ne>>5,ve=Ne&31;return{type:Pe,value:ve}}function x(He,Ne){var Pe=He.value;if(Pe<24)return Pe;if(Pe==24)return Ne.readByte();if(Pe==25)return Ne.readUint16();if(Pe==26)return Ne.readUint32();if(Pe==27)return Ne.readUint64();if(Pe==31)return null;d("Additional info: "+Pe)()}function v(He,Ne,Pe){Pe.writeByte(He<<5|Ne)}function F(He,Ne,Pe){var ve=He<<5;Ne<24?Pe.writeByte(ve|Ne):Ne<256?(Pe.writeByte(ve|24),Pe.writeByte(Ne)):Ne<65536?(Pe.writeByte(ve|25),Pe.writeUint16(Ne)):Ne<4294967296?(Pe.writeByte(ve|26),Pe.writeUint32(Ne)):(Pe.writeByte(ve|27),Pe.writeUint64(Ne))}var M=new Error;function U(He){var Ne=D(He);switch(Ne.type){case 0:return x(Ne,He);case 1:return-1-x(Ne,He);case 2:return He.readChunk(x(Ne,He));case 3:var Pe=He.readChunk(x(Ne,He));return Pe.toString("utf-8");case 4:case 5:var ve=x(Ne,He),De=[];if(ve!==null){Ne.type===5&&(ve*=2);for(var Fe=0;Fe<ve;Fe++)De[Fe]=U(He)}else for(var be;(be=U(He))!==M;)De.push(be);if(Ne.type===5){for(var Be={},Fe=0;Fe<De.length;Fe+=2)Be[De[Fe]]=De[Fe+1];return Be}else return De;case 6:var ke=x(Ne,He),xe=t[ke],De=U(He);return xe?xe(De):De;case 7:if(Ne.value===25)return He.readFloat16();if(Ne.value===26)return He.readFloat32();if(Ne.value===27)return He.readFloat64();switch(x(Ne,He)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case null:return M;default:throw new Error("Unknown fixed value: "+Ne.value)}default:throw new Error("Unsupported header: "+JSON.stringify(Ne))}throw new Error("not implemented yet")}function L(He,Ne){for(var Pe=0;Pe<y.length;Pe++){var ve=y[Pe].fn(He);if(ve!==void 0)return F(6,y[Pe].tag,Ne),L(ve,Ne)}if(He&&typeof He.toCBOR=="function"&&(He=He.toCBOR()),He===!1)F(7,20,Ne);else if(He===!0)F(7,21,Ne);else if(He===null)F(7,22,Ne);else if(He===void 0)F(7,23,Ne);else if(typeof He=="number")Math.floor(He)===He&&He<9007199254740992&&He>-9007199254740992?He<0?F(1,-1-He,Ne):F(0,He,Ne):(v(7,27,Ne),Ne.writeFloat64(He));else if(typeof He=="string")Ne.writeString(He,function(be){F(3,be,Ne)});else if(Ne.canWriteBinary(He))Ne.writeBinary(He,function(be){F(2,be,Ne)});else if(typeof He=="object")if(ge.config.useToJSON&&typeof He.toJSON=="function"&&(He=He.toJSON()),Array.isArray(He)){F(4,He.length,Ne);for(var Pe=0;Pe<He.length;Pe++)L(He[Pe],Ne)}else{var Fe=Object.keys(He);F(5,Fe.length,Ne);for(var Pe=0;Pe<Fe.length;Pe++)L(Fe[Pe],Ne),L(He[Fe[Pe]],Ne)}else throw new Error("CBOR encoding not supported: "+He)}var H=[],fe=[],ge={config:{useToJSON:!0},addWriter:function(He,Ne){typeof He=="string"?fe.push(function(Pe){if(He===Pe)return Ne(Pe)}):fe.push(He)},addReader:function(He,Ne){typeof He=="string"?H.push(function(Pe,ve){if(He===ve)return Ne(Pe,ve)}):H.push(He)},encode:function(He,Ne){for(var Pe=0;Pe<fe.length;Pe++){var ve=fe[Pe],Fe=ve(Ne);if(Fe)return L(He,Fe),Fe.result()}throw new Error("Unsupported output format: "+Ne)},decode:function(He,Ne){for(var Pe=0;Pe<H.length;Pe++){var ve=H[Pe],Fe=ve(He,Ne);if(Fe)return U(Fe)}throw new Error("Unsupported input format: "+Ne)},addSemanticEncode:function(He,Ne){if(typeof He!="number"||He%1!==0||He<0)throw new Error("Tag must be a positive integer");return y.push({tag:He,fn:Ne}),this},addSemanticDecode:function(He,Ne){if(typeof He!="number"||He%1!==0||He<0)throw new Error("Tag must be a positive integer");return t[He]=Ne,this},Reader:E,Writer:B};function Ie(He){this.buffer=He,this.pos=0}Ie.prototype=Object.create(E.prototype),Ie.prototype.peekByte=function(){return this.buffer[this.pos]},Ie.prototype.readByte=function(){return this.buffer[this.pos++]},Ie.prototype.readUint16=function(){var He=this.buffer.readUInt16BE(this.pos);return this.pos+=2,He},Ie.prototype.readUint32=function(){var He=this.buffer.readUInt32BE(this.pos);return this.pos+=4,He},Ie.prototype.readFloat32=function(){var He=this.buffer.readFloatBE(this.pos);return this.pos+=4,He},Ie.prototype.readFloat64=function(){var He=this.buffer.readDoubleBE(this.pos);return this.pos+=8,He},Ie.prototype.readChunk=function(He){var Ne=Buffer.alloc(He);return this.buffer.copy(Ne,0,this.pos,this.pos+=He),Ne};function Ee(He){this.byteLength=0,this.defaultBufferLength=16384,this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0,this.completeBuffers=[],this.stringFormat=He}Ee.prototype=Object.create(B.prototype),Ee.prototype.writeByte=function(He){this.latestBuffer[this.latestBufferOffset++]=He,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0),this.byteLength++},Ee.prototype.writeFloat32=function(He){var Ne=Buffer.alloc(4);Ne.writeFloatBE(He,0),this.writeBuffer(Ne)},Ee.prototype.writeFloat64=function(He){var Ne=Buffer.alloc(8);Ne.writeDoubleBE(He,0),this.writeBuffer(Ne)},Ee.prototype.writeString=function(He,Ne){var Pe=Buffer.from(He,"utf-8");Ne(Pe.length),this.writeBuffer(Pe)},Ee.prototype.canWriteBinary=function(He){return He instanceof Buffer},Ee.prototype.writeBinary=function(He,Ne){Ne(He.length),this.writeBuffer(He)},Ee.prototype.writeBuffer=function(He){if(!(He instanceof Buffer))throw new TypeError("BufferWriter only accepts Buffers");this.latestBufferOffset?this.latestBuffer.length-this.latestBufferOffset>=He.length?(He.copy(this.latestBuffer,this.latestBufferOffset),this.latestBufferOffset+=He.length,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0)):(this.completeBuffers.push(this.latestBuffer.slice(0,this.latestBufferOffset)),this.completeBuffers.push(He),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0):this.completeBuffers.push(He),this.byteLength+=He.length},Ee.prototype.result=function(){for(var He=Buffer.alloc(this.byteLength),Ne=0,Pe=0;Pe<this.completeBuffers.length;Pe++){var ve=this.completeBuffers[Pe];ve.copy(He,Ne,0,ve.length),Ne+=ve.length}return this.latestBufferOffset&&this.latestBuffer.copy(He,Ne,0,this.latestBufferOffset),this.stringFormat?He.toString(this.stringFormat):He},typeof Buffer=="function"&&(ge.addReader(function(He,Ne){if(He instanceof Buffer)return new Ie(He);if(Ne==="hex"||Ne==="base64"){var Pe=Buffer.from(He,Ne);return new Ie(Pe)}}),ge.addWriter(function(He){if(!He||He==="buffer")return new Ee;if(He==="hex"||He==="base64")return new Ee(He)}));function Se(He){this.hex=He,this.pos=0}Se.prototype=Object.create(E.prototype),Se.prototype.peekByte=function(){var He=this.hex.substring(this.pos,2);return parseInt(He,16)},Se.prototype.readByte=function(){var He=this.hex.substring(this.pos,this.pos+2);return this.pos+=2,parseInt(He,16)},Se.prototype.readChunk=function(He){var Ne=this.hex.substring(this.pos,this.pos+He*2);return this.pos+=He*2,typeof Buffer=="function"?Buffer.from(Ne,"hex"):new c(Ne)};function ze(He){this.$hex="",this.finalFormat=He||"hex"}return ze.prototype=Object.create(B.prototype),ze.prototype.writeByte=function(He){if(He<0||He>255)throw new Error("Byte value out of range: "+He);var Ne=He.toString(16);Ne.length==1&&(Ne="0"+Ne),this.$hex+=Ne},ze.prototype.canWriteBinary=function(He){return He instanceof c||typeof Buffer=="function"&&He instanceof Buffer},ze.prototype.writeBinary=function(He,Ne){if(He instanceof c)Ne(He.length()),this.$hex+=He.$hex;else if(typeof Buffer=="function"&&He instanceof Buffer)Ne(He.length),this.$hex+=He.toString("hex");else throw new TypeError("HexWriter only accepts BinaryHex or Buffers")},ze.prototype.result=function(){return this.finalFormat==="buffer"&&typeof Buffer=="function"?Buffer.from(this.$hex,"hex"):new c(this.$hex).toString(this.finalFormat)},ze.prototype.writeString=function(He,Ne){var Pe=c.fromUtf8String(He);Ne(Pe.length()),this.$hex+=Pe.$hex},ge.addReader(function(He,Ne){if(He instanceof c||He.$hex)return new Se(He.$hex);if(Ne==="hex")return new Se(He)}),ge.addWriter(function(He){if(He==="hex")return new ze}),ge}();return g.addSemanticEncode(0,function(c){if(c instanceof Date)return c.toISOString()}).addSemanticDecode(0,function(c){return new Date(c)}).addSemanticDecode(1,function(c){return new Date(c)}),g})}(main$5)),main$5.exports}var hasRequiredCbor;function requireCbor(){if(hasRequiredCbor)return cbor;hasRequiredCbor=1,Object.defineProperty(cbor,"__esModule",{value:!0}),cbor.cborDecode=cbor.cborEncode=void 0;const o=requireMain$4(),g=y=>o.encode(y);cbor.cborEncode=g;const c=y=>o.decode(Buffer.isBuffer(y)?y:Buffer.from(y,"hex"));return cbor.cborDecode=c,cbor}var hasRequiredUr$1;function requireUr$1(){if(hasRequiredUr$1)return ur$1;hasRequiredUr$1=1,Object.defineProperty(ur$1,"__esModule",{value:!0});const o=requireErrors$6(),g=requireUtils$f(),c=requireCbor();class y{constructor(d,E="bytes"){if(this._cborPayload=d,this._type=E,!g.isURType(this._type))throw new o.InvalidTypeError}static fromBuffer(d){return new y(c.cborEncode(d))}static from(d,E){return y.fromBuffer(Buffer.from(d,E))}decodeCBOR(){return c.cborDecode(this._cborPayload)}get type(){return this._type}get cbor(){return this._cborPayload}equals(d){return this.type===d.type&&this.cbor.equals(d.cbor)}}return ur$1.default=y,ur$1}var urEncoder={},fountainEncoder={},assert$2={exports:{}},errors$5={},util$1={},types$a={},isArguments$1,hasRequiredIsArguments$1;function requireIsArguments$1(){if(hasRequiredIsArguments$1)return isArguments$1;hasRequiredIsArguments$1=1;var o=requireShams()(),g=requireCallBound$1(),c=g("Object.prototype.toString"),y=function(B){return o&&B&&typeof B=="object"&&Symbol.toStringTag in B?!1:c(B)==="[object Arguments]"},t=function(B){return y(B)?!0:B!==null&&typeof B=="object"&&"length"in B&&typeof B.length=="number"&&B.length>=0&&c(B)!=="[object Array]"&&"callee"in B&&c(B.callee)==="[object Function]"},d=function(){return y(arguments)}();return y.isLegacyArguments=t,isArguments$1=d?y:t,isArguments$1}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var o=requireCallBound$1(),g=requireShams()(),c=requireHasown(),y=requireGopd(),t;if(g){var d=o("RegExp.prototype.exec"),E={},B=function(){throw E},D={toString:B,valueOf:B};typeof Symbol.toPrimitive=="symbol"&&(D[Symbol.toPrimitive]=B),t=function(M){if(!M||typeof M!="object")return!1;var U=y(M,"lastIndex"),L=U&&c(U,"value");if(!L)return!1;try{d(M,D)}catch(H){return H===E}}}else{var x=o("Object.prototype.toString"),v="[object RegExp]";t=function(M){return!M||typeof M!="object"&&typeof M!="function"?!1:x(M)===v}}return isRegex=t,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var o=requireCallBound$1(),g=requireIsRegex(),c=o("RegExp.prototype.exec"),y=requireType();return safeRegexTest=function(d){if(!g(d))throw new y("`regex` must be a RegExp");return function(B){return c(d,B)!==null}},safeRegexTest}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var o=requireCallBound$1(),g=requireSafeRegexTest(),c=g(/^\s*(?:function)?\*/),y=requireShams()(),t=requireGetProto(),d=o("Object.prototype.toString"),E=o("Function.prototype.toString"),B=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch{}},D;return isGeneratorFunction=function(v){if(typeof v!="function")return!1;if(c(E(v)))return!0;if(!y){var F=d(v);return F==="[object GeneratorFunction]"}if(!t)return!1;if(typeof D>"u"){var M=B();D=M?t(M):!1}return t(v)===D},isGeneratorFunction}var hasRequiredTypes$a;function requireTypes$a(){return hasRequiredTypes$a||(hasRequiredTypes$a=1,function(o){var g=requireIsArguments$1(),c=requireIsGeneratorFunction(),y=requireWhichTypedArray(),t=requireIsTypedArray();function d(jr){return jr.call.bind(jr)}var E=typeof BigInt<"u",B=typeof Symbol<"u",D=d(Object.prototype.toString),x=d(Number.prototype.valueOf),v=d(String.prototype.valueOf),F=d(Boolean.prototype.valueOf);if(E)var M=d(BigInt.prototype.valueOf);if(B)var U=d(Symbol.prototype.valueOf);function L(jr,fi){if(typeof jr!="object")return!1;try{return fi(jr),!0}catch{return!1}}o.isArgumentsObject=g,o.isGeneratorFunction=c,o.isTypedArray=t;function H(jr){return typeof Promise<"u"&&jr instanceof Promise||jr!==null&&typeof jr=="object"&&typeof jr.then=="function"&&typeof jr.catch=="function"}o.isPromise=H;function fe(jr){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(jr):t(jr)||yr(jr)}o.isArrayBufferView=fe;function ge(jr){return y(jr)==="Uint8Array"}o.isUint8Array=ge;function Ie(jr){return y(jr)==="Uint8ClampedArray"}o.isUint8ClampedArray=Ie;function Ee(jr){return y(jr)==="Uint16Array"}o.isUint16Array=Ee;function Se(jr){return y(jr)==="Uint32Array"}o.isUint32Array=Se;function ze(jr){return y(jr)==="Int8Array"}o.isInt8Array=ze;function He(jr){return y(jr)==="Int16Array"}o.isInt16Array=He;function Ne(jr){return y(jr)==="Int32Array"}o.isInt32Array=Ne;function Pe(jr){return y(jr)==="Float32Array"}o.isFloat32Array=Pe;function ve(jr){return y(jr)==="Float64Array"}o.isFloat64Array=ve;function Fe(jr){return y(jr)==="BigInt64Array"}o.isBigInt64Array=Fe;function be(jr){return y(jr)==="BigUint64Array"}o.isBigUint64Array=be;function Be(jr){return D(jr)==="[object Map]"}Be.working=typeof Map<"u"&&Be(new Map);function ke(jr){return typeof Map>"u"?!1:Be.working?Be(jr):jr instanceof Map}o.isMap=ke;function xe(jr){return D(jr)==="[object Set]"}xe.working=typeof Set<"u"&&xe(new Set);function De(jr){return typeof Set>"u"?!1:xe.working?xe(jr):jr instanceof Set}o.isSet=De;function Et(jr){return D(jr)==="[object WeakMap]"}Et.working=typeof WeakMap<"u"&&Et(new WeakMap);function st(jr){return typeof WeakMap>"u"?!1:Et.working?Et(jr):jr instanceof WeakMap}o.isWeakMap=st;function Dt(jr){return D(jr)==="[object WeakSet]"}Dt.working=typeof WeakSet<"u"&&Dt(new WeakSet);function er(jr){return Dt(jr)}o.isWeakSet=er;function xt(jr){return D(jr)==="[object ArrayBuffer]"}xt.working=typeof ArrayBuffer<"u"&&xt(new ArrayBuffer);function ir(jr){return typeof ArrayBuffer>"u"?!1:xt.working?xt(jr):jr instanceof ArrayBuffer}o.isArrayBuffer=ir;function sr(jr){return D(jr)==="[object DataView]"}sr.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&sr(new DataView(new ArrayBuffer(1),0,1));function yr(jr){return typeof DataView>"u"?!1:sr.working?sr(jr):jr instanceof DataView}o.isDataView=yr;var wr=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function qr(jr){return D(jr)==="[object SharedArrayBuffer]"}function Mr(jr){return typeof wr>"u"?!1:(typeof qr.working>"u"&&(qr.working=qr(new wr)),qr.working?qr(jr):jr instanceof wr)}o.isSharedArrayBuffer=Mr;function Dr(jr){return D(jr)==="[object AsyncFunction]"}o.isAsyncFunction=Dr;function Qr(jr){return D(jr)==="[object Map Iterator]"}o.isMapIterator=Qr;function Xr(jr){return D(jr)==="[object Set Iterator]"}o.isSetIterator=Xr;function Wr(jr){return D(jr)==="[object Generator]"}o.isGeneratorObject=Wr;function Ur(jr){return D(jr)==="[object WebAssembly.Module]"}o.isWebAssemblyCompiledModule=Ur;function Sr(jr){return L(jr,x)}o.isNumberObject=Sr;function Gr(jr){return L(jr,v)}o.isStringObject=Gr;function Fr(jr){return L(jr,F)}o.isBooleanObject=Fr;function br(jr){return E&&L(jr,M)}o.isBigIntObject=br;function Ar(jr){return B&&L(jr,U)}o.isSymbolObject=Ar;function cr(jr){return Sr(jr)||Gr(jr)||Fr(jr)||br(jr)||Ar(jr)}o.isBoxedPrimitive=cr;function hr(jr){return typeof Uint8Array<"u"&&(ir(jr)||Mr(jr))}o.isAnyArrayBuffer=hr,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(jr){Object.defineProperty(o,jr,{enumerable:!1,value:function(){throw new Error(jr+" is not supported in userland")}})})}(types$a)),types$a}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,function(o){var g=Object.getOwnPropertyDescriptors||function(yr){for(var wr=Object.keys(yr),qr={},Mr=0;Mr<wr.length;Mr++)qr[wr[Mr]]=Object.getOwnPropertyDescriptor(yr,wr[Mr]);return qr},c=/%[sdj%]/g;o.format=function(sr){if(!ze(sr)){for(var yr=[],wr=0;wr<arguments.length;wr++)yr.push(E(arguments[wr]));return yr.join(" ")}for(var wr=1,qr=arguments,Mr=qr.length,Dr=String(sr).replace(c,function(Xr){if(Xr==="%%")return"%";if(wr>=Mr)return Xr;switch(Xr){case"%s":return String(qr[wr++]);case"%d":return Number(qr[wr++]);case"%j":try{return JSON.stringify(qr[wr++])}catch{return"[Circular]"}default:return Xr}}),Qr=qr[wr];wr<Mr;Qr=qr[++wr])Ie(Qr)||!ve(Qr)?Dr+=" "+Qr:Dr+=" "+E(Qr);return Dr},o.deprecate=function(sr,yr){if(typeof ETHWalletProvider.process$1<"u"&&ETHWalletProvider.process$1.noDeprecation===!0)return sr;if(typeof ETHWalletProvider.process$1>"u")return function(){return o.deprecate(sr,yr).apply(this,arguments)};var wr=!1;function qr(){if(!wr){if(ETHWalletProvider.process$1.throwDeprecation)throw new Error(yr);ETHWalletProvider.process$1.traceDeprecation?console.trace(yr):console.error(yr),wr=!0}return sr.apply(this,arguments)}return qr};var y={},t=/^$/;if(ETHWalletProvider.process$1.env.NODE_DEBUG){var d=ETHWalletProvider.process$1.env.NODE_DEBUG;d=d.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),t=new RegExp("^"+d+"$","i")}o.debuglog=function(sr){if(sr=sr.toUpperCase(),!y[sr])if(t.test(sr)){var yr=ETHWalletProvider.process$1.pid;y[sr]=function(){var wr=o.format.apply(o,arguments);console.error("%s %d: %s",sr,yr,wr)}}else y[sr]=function(){};return y[sr]};function E(sr,yr){var wr={seen:[],stylize:D};return arguments.length>=3&&(wr.depth=arguments[2]),arguments.length>=4&&(wr.colors=arguments[3]),ge(yr)?wr.showHidden=yr:yr&&o._extend(wr,yr),Ne(wr.showHidden)&&(wr.showHidden=!1),Ne(wr.depth)&&(wr.depth=2),Ne(wr.colors)&&(wr.colors=!1),Ne(wr.customInspect)&&(wr.customInspect=!0),wr.colors&&(wr.stylize=B),v(wr,sr,wr.depth)}o.inspect=E,E.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},E.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function B(sr,yr){var wr=E.styles[yr];return wr?"\x1B["+E.colors[wr][0]+"m"+sr+"\x1B["+E.colors[wr][1]+"m":sr}function D(sr,yr){return sr}function x(sr){var yr={};return sr.forEach(function(wr,qr){yr[wr]=!0}),yr}function v(sr,yr,wr){if(sr.customInspect&&yr&&Be(yr.inspect)&&yr.inspect!==o.inspect&&!(yr.constructor&&yr.constructor.prototype===yr)){var qr=yr.inspect(wr,sr);return ze(qr)||(qr=v(sr,qr,wr)),qr}var Mr=F(sr,yr);if(Mr)return Mr;var Dr=Object.keys(yr),Qr=x(Dr);if(sr.showHidden&&(Dr=Object.getOwnPropertyNames(yr)),be(yr)&&(Dr.indexOf("message")>=0||Dr.indexOf("description")>=0))return M(yr);if(Dr.length===0){if(Be(yr)){var Xr=yr.name?": "+yr.name:"";return sr.stylize("[Function"+Xr+"]","special")}if(Pe(yr))return sr.stylize(RegExp.prototype.toString.call(yr),"regexp");if(Fe(yr))return sr.stylize(Date.prototype.toString.call(yr),"date");if(be(yr))return M(yr)}var Wr="",Ur=!1,Sr=["{","}"];if(fe(yr)&&(Ur=!0,Sr=["[","]"]),Be(yr)){var Gr=yr.name?": "+yr.name:"";Wr=" [Function"+Gr+"]"}if(Pe(yr)&&(Wr=" "+RegExp.prototype.toString.call(yr)),Fe(yr)&&(Wr=" "+Date.prototype.toUTCString.call(yr)),be(yr)&&(Wr=" "+M(yr)),Dr.length===0&&(!Ur||yr.length==0))return Sr[0]+Wr+Sr[1];if(wr<0)return Pe(yr)?sr.stylize(RegExp.prototype.toString.call(yr),"regexp"):sr.stylize("[Object]","special");sr.seen.push(yr);var Fr;return Ur?Fr=U(sr,yr,wr,Qr,Dr):Fr=Dr.map(function(br){return L(sr,yr,wr,Qr,br,Ur)}),sr.seen.pop(),H(Fr,Wr,Sr)}function F(sr,yr){if(Ne(yr))return sr.stylize("undefined","undefined");if(ze(yr)){var wr="'"+JSON.stringify(yr).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return sr.stylize(wr,"string")}if(Se(yr))return sr.stylize(""+yr,"number");if(ge(yr))return sr.stylize(""+yr,"boolean");if(Ie(yr))return sr.stylize("null","null")}function M(sr){return"["+Error.prototype.toString.call(sr)+"]"}function U(sr,yr,wr,qr,Mr){for(var Dr=[],Qr=0,Xr=yr.length;Qr<Xr;++Qr)Dt(yr,String(Qr))?Dr.push(L(sr,yr,wr,qr,String(Qr),!0)):Dr.push("");return Mr.forEach(function(Wr){Wr.match(/^\d+$/)||Dr.push(L(sr,yr,wr,qr,Wr,!0))}),Dr}function L(sr,yr,wr,qr,Mr,Dr){var Qr,Xr,Wr;if(Wr=Object.getOwnPropertyDescriptor(yr,Mr)||{value:yr[Mr]},Wr.get?Wr.set?Xr=sr.stylize("[Getter/Setter]","special"):Xr=sr.stylize("[Getter]","special"):Wr.set&&(Xr=sr.stylize("[Setter]","special")),Dt(qr,Mr)||(Qr="["+Mr+"]"),Xr||(sr.seen.indexOf(Wr.value)<0?(Ie(wr)?Xr=v(sr,Wr.value,null):Xr=v(sr,Wr.value,wr-1),Xr.indexOf(`
1
+ "use strict";var I8=Object.defineProperty;var m8=(o,g,c)=>g in o?I8(o,g,{enumerable:!0,configurable:!0,writable:!0,value:c}):o[g]=c;var Gi=(o,g,c)=>m8(o,typeof g!="symbol"?g+"":g,c);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ETHWalletProvider=require("./ETHWalletProvider-B1utrSWQ.cjs"),jsxRuntime=require("react/jsx-runtime"),coreUi=require("@babylonlabs-io/core-ui"),pA=require("bitcoinjs-lib"),Y=require("@keystonehq/sdk"),stargate=require("@cosmjs/stargate"),kt=require("react"),reactDom=require("react-dom"),tailwindMerge=require("tailwind-merge"),networks$2=require("@reown/appkit/networks"),ledgerVaultSigner=require("@babylonlabs-io/ledger-vault-signer"),appkitAdapterBitcoin=require("@reown/appkit-adapter-bitcoin"),react=require("@reown/appkit/react"),reactQuery=require("@tanstack/react-query");function _interopNamespaceDefault(o){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const c in o)if(c!=="default"){const y=Object.getOwnPropertyDescriptor(o,c);Object.defineProperty(g,c,y.get?y:{enumerable:!0,get:()=>o[c]})}}return g.default=o,Object.freeze(g)}const pA__namespace=_interopNamespaceDefault(pA);var buffer$3={},base64Js$1={};base64Js$1.byteLength=byteLength;base64Js$1.toByteArray=toByteArray;base64Js$1.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$2=0,len=code.length;i$2<len;++i$2)lookup[i$2]=code[i$2],revLookup[code.charCodeAt(i$2)]=i$2;revLookup[45]=62;revLookup[95]=63;function getLens(o){var g=o.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=o.indexOf("=");c===-1&&(c=g);var y=c===g?0:4-c%4;return[c,y]}function byteLength(o){var g=getLens(o),c=g[0],y=g[1];return(c+y)*3/4-y}function _byteLength(o,g,c){return(g+c)*3/4-c}function toByteArray(o){var g,c=getLens(o),y=c[0],t=c[1],d=new Arr(_byteLength(o,y,t)),E=0,B=t>0?y-4:y,D;for(D=0;D<B;D+=4)g=revLookup[o.charCodeAt(D)]<<18|revLookup[o.charCodeAt(D+1)]<<12|revLookup[o.charCodeAt(D+2)]<<6|revLookup[o.charCodeAt(D+3)],d[E++]=g>>16&255,d[E++]=g>>8&255,d[E++]=g&255;return t===2&&(g=revLookup[o.charCodeAt(D)]<<2|revLookup[o.charCodeAt(D+1)]>>4,d[E++]=g&255),t===1&&(g=revLookup[o.charCodeAt(D)]<<10|revLookup[o.charCodeAt(D+1)]<<4|revLookup[o.charCodeAt(D+2)]>>2,d[E++]=g>>8&255,d[E++]=g&255),d}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[o&63]}function encodeChunk(o,g,c){for(var y,t=[],d=g;d<c;d+=3)y=(o[d]<<16&16711680)+(o[d+1]<<8&65280)+(o[d+2]&255),t.push(tripletToBase64(y));return t.join("")}function fromByteArray(o){for(var g,c=o.length,y=c%3,t=[],d=16383,E=0,B=c-y;E<B;E+=d)t.push(encodeChunk(o,E,E+d>B?B:E+d));return y===1?(g=o[c-1],t.push(lookup[g>>2]+lookup[g<<4&63]+"==")):y===2&&(g=(o[c-2]<<8)+o[c-1],t.push(lookup[g>>10]+lookup[g>>4&63]+lookup[g<<2&63]+"=")),t.join("")}var ieee754$1={};ieee754$1.read=function(o,g,c,y,t){var d,E,B=t*8-y-1,D=(1<<B)-1,x=D>>1,v=-7,F=c?t-1:0,M=c?-1:1,U=o[g+F];for(F+=M,d=U&(1<<-v)-1,U>>=-v,v+=B;v>0;d=d*256+o[g+F],F+=M,v-=8);for(E=d&(1<<-v)-1,d>>=-v,v+=y;v>0;E=E*256+o[g+F],F+=M,v-=8);if(d===0)d=1-x;else{if(d===D)return E?NaN:(U?-1:1)*(1/0);E=E+Math.pow(2,y),d=d-x}return(U?-1:1)*E*Math.pow(2,d-y)};ieee754$1.write=function(o,g,c,y,t,d){var E,B,D,x=d*8-t-1,v=(1<<x)-1,F=v>>1,M=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=y?0:d-1,L=y?1:-1,H=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(B=isNaN(g)?1:0,E=v):(E=Math.floor(Math.log(g)/Math.LN2),g*(D=Math.pow(2,-E))<1&&(E--,D*=2),E+F>=1?g+=M/D:g+=M*Math.pow(2,1-F),g*D>=2&&(E++,D/=2),E+F>=v?(B=0,E=v):E+F>=1?(B=(g*D-1)*Math.pow(2,t),E=E+F):(B=g*Math.pow(2,F-1)*Math.pow(2,t),E=0));t>=8;o[c+U]=B&255,U+=L,B/=256,t-=8);for(E=E<<t|B,x+=t;x>0;o[c+U]=E&255,U+=L,E/=256,x-=8);o[c+U-L]|=H*128};(function(o){const g=base64Js$1,c=ieee754$1,y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=v,o.SlowBuffer=ze,o.INSPECT_MAX_BYTES=50;const t=2147483647;o.kMaxLength=t;const{Uint8Array:d,ArrayBuffer:E,SharedArrayBuffer:B}=globalThis;v.TYPED_ARRAY_SUPPORT=D(),!v.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function D(){try{const Cr=new d(1),Er={foo:function(){return 42}};return Object.setPrototypeOf(Er,d.prototype),Object.setPrototypeOf(Cr,Er),Cr.foo()===42}catch{return!1}}Object.defineProperty(v.prototype,"parent",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.byteOffset}});function x(Cr){if(Cr>t)throw new RangeError('The value "'+Cr+'" is invalid for option "size"');const Er=new d(Cr);return Object.setPrototypeOf(Er,v.prototype),Er}function v(Cr,Er,xr){if(typeof Cr=="number"){if(typeof Er=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return L(Cr)}return F(Cr,Er,xr)}v.poolSize=8192;function F(Cr,Er,xr){if(typeof Cr=="string")return H(Cr,Er);if(E.isView(Cr))return ge(Cr);if(Cr==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Cr);if(ti(Cr,E)||Cr&&ti(Cr.buffer,E)||typeof B<"u"&&(ti(Cr,B)||Cr&&ti(Cr.buffer,B)))return Ie(Cr,Er,xr);if(typeof Cr=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const si=Cr.valueOf&&Cr.valueOf();if(si!=null&&si!==Cr)return v.from(si,Er,xr);const Ci=Ee(Cr);if(Ci)return Ci;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Cr[Symbol.toPrimitive]=="function")return v.from(Cr[Symbol.toPrimitive]("string"),Er,xr);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Cr)}v.from=function(Cr,Er,xr){return F(Cr,Er,xr)},Object.setPrototypeOf(v.prototype,d.prototype),Object.setPrototypeOf(v,d);function M(Cr){if(typeof Cr!="number")throw new TypeError('"size" argument must be of type number');if(Cr<0)throw new RangeError('The value "'+Cr+'" is invalid for option "size"')}function U(Cr,Er,xr){return M(Cr),Cr<=0?x(Cr):Er!==void 0?typeof xr=="string"?x(Cr).fill(Er,xr):x(Cr).fill(Er):x(Cr)}v.alloc=function(Cr,Er,xr){return U(Cr,Er,xr)};function L(Cr){return M(Cr),x(Cr<0?0:Se(Cr)|0)}v.allocUnsafe=function(Cr){return L(Cr)},v.allocUnsafeSlow=function(Cr){return L(Cr)};function H(Cr,Er){if((typeof Er!="string"||Er==="")&&(Er="utf8"),!v.isEncoding(Er))throw new TypeError("Unknown encoding: "+Er);const xr=He(Cr,Er)|0;let si=x(xr);const Ci=si.write(Cr,Er);return Ci!==xr&&(si=si.slice(0,Ci)),si}function fe(Cr){const Er=Cr.length<0?0:Se(Cr.length)|0,xr=x(Er);for(let si=0;si<Er;si+=1)xr[si]=Cr[si]&255;return xr}function ge(Cr){if(ti(Cr,d)){const Er=new d(Cr);return Ie(Er.buffer,Er.byteOffset,Er.byteLength)}return fe(Cr)}function Ie(Cr,Er,xr){if(Er<0||Cr.byteLength<Er)throw new RangeError('"offset" is outside of buffer bounds');if(Cr.byteLength<Er+(xr||0))throw new RangeError('"length" is outside of buffer bounds');let si;return Er===void 0&&xr===void 0?si=new d(Cr):xr===void 0?si=new d(Cr,Er):si=new d(Cr,Er,xr),Object.setPrototypeOf(si,v.prototype),si}function Ee(Cr){if(v.isBuffer(Cr)){const Er=Se(Cr.length)|0,xr=x(Er);return xr.length===0||Cr.copy(xr,0,0,Er),xr}if(Cr.length!==void 0)return typeof Cr.length!="number"||Lr(Cr.length)?x(0):fe(Cr);if(Cr.type==="Buffer"&&Array.isArray(Cr.data))return fe(Cr.data)}function Se(Cr){if(Cr>=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return Cr|0}function ze(Cr){return+Cr!=Cr&&(Cr=0),v.alloc(+Cr)}v.isBuffer=function(Er){return Er!=null&&Er._isBuffer===!0&&Er!==v.prototype},v.compare=function(Er,xr){if(ti(Er,d)&&(Er=v.from(Er,Er.offset,Er.byteLength)),ti(xr,d)&&(xr=v.from(xr,xr.offset,xr.byteLength)),!v.isBuffer(Er)||!v.isBuffer(xr))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Er===xr)return 0;let si=Er.length,Ci=xr.length;for(let bi=0,Ri=Math.min(si,Ci);bi<Ri;++bi)if(Er[bi]!==xr[bi]){si=Er[bi],Ci=xr[bi];break}return si<Ci?-1:Ci<si?1:0},v.isEncoding=function(Er){switch(String(Er).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}},v.concat=function(Er,xr){if(!Array.isArray(Er))throw new TypeError('"list" argument must be an Array of Buffers');if(Er.length===0)return v.alloc(0);let si;if(xr===void 0)for(xr=0,si=0;si<Er.length;++si)xr+=Er[si].length;const Ci=v.allocUnsafe(xr);let bi=0;for(si=0;si<Er.length;++si){let Ri=Er[si];if(ti(Ri,d))bi+Ri.length>Ci.length?(v.isBuffer(Ri)||(Ri=v.from(Ri)),Ri.copy(Ci,bi)):d.prototype.set.call(Ci,Ri,bi);else if(v.isBuffer(Ri))Ri.copy(Ci,bi);else throw new TypeError('"list" argument must be an Array of Buffers');bi+=Ri.length}return Ci};function He(Cr,Er){if(v.isBuffer(Cr))return Cr.length;if(E.isView(Cr)||ti(Cr,E))return Cr.byteLength;if(typeof Cr!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Cr);const xr=Cr.length,si=arguments.length>2&&arguments[2]===!0;if(!si&&xr===0)return 0;let Ci=!1;for(;;)switch(Er){case"ascii":case"latin1":case"binary":return xr;case"utf8":case"utf-8":return fi(Cr).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xr*2;case"hex":return xr>>>1;case"base64":return oi(Cr).length;default:if(Ci)return si?-1:fi(Cr).length;Er=(""+Er).toLowerCase(),Ci=!0}}v.byteLength=He;function Ne(Cr,Er,xr){let si=!1;if((Er===void 0||Er<0)&&(Er=0),Er>this.length||((xr===void 0||xr>this.length)&&(xr=this.length),xr<=0)||(xr>>>=0,Er>>>=0,xr<=Er))return"";for(Cr||(Cr="utf8");;)switch(Cr){case"hex":return sr(this,Er,xr);case"utf8":case"utf-8":return st(this,Er,xr);case"ascii":return xt(this,Er,xr);case"latin1":case"binary":return ir(this,Er,xr);case"base64":return Et(this,Er,xr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yr(this,Er,xr);default:if(si)throw new TypeError("Unknown encoding: "+Cr);Cr=(Cr+"").toLowerCase(),si=!0}}v.prototype._isBuffer=!0;function Pe(Cr,Er,xr){const si=Cr[Er];Cr[Er]=Cr[xr],Cr[xr]=si}v.prototype.swap16=function(){const Er=this.length;if(Er%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let xr=0;xr<Er;xr+=2)Pe(this,xr,xr+1);return this},v.prototype.swap32=function(){const Er=this.length;if(Er%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let xr=0;xr<Er;xr+=4)Pe(this,xr,xr+3),Pe(this,xr+1,xr+2);return this},v.prototype.swap64=function(){const Er=this.length;if(Er%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let xr=0;xr<Er;xr+=8)Pe(this,xr,xr+7),Pe(this,xr+1,xr+6),Pe(this,xr+2,xr+5),Pe(this,xr+3,xr+4);return this},v.prototype.toString=function(){const Er=this.length;return Er===0?"":arguments.length===0?st(this,0,Er):Ne.apply(this,arguments)},v.prototype.toLocaleString=v.prototype.toString,v.prototype.equals=function(Er){if(!v.isBuffer(Er))throw new TypeError("Argument must be a Buffer");return this===Er?!0:v.compare(this,Er)===0},v.prototype.inspect=function(){let Er="";const xr=o.INSPECT_MAX_BYTES;return Er=this.toString("hex",0,xr).replace(/(.{2})/g,"$1 ").trim(),this.length>xr&&(Er+=" ... "),"<Buffer "+Er+">"},y&&(v.prototype[y]=v.prototype.inspect),v.prototype.compare=function(Er,xr,si,Ci,bi){if(ti(Er,d)&&(Er=v.from(Er,Er.offset,Er.byteLength)),!v.isBuffer(Er))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Er);if(xr===void 0&&(xr=0),si===void 0&&(si=Er?Er.length:0),Ci===void 0&&(Ci=0),bi===void 0&&(bi=this.length),xr<0||si>Er.length||Ci<0||bi>this.length)throw new RangeError("out of range index");if(Ci>=bi&&xr>=si)return 0;if(Ci>=bi)return-1;if(xr>=si)return 1;if(xr>>>=0,si>>>=0,Ci>>>=0,bi>>>=0,this===Er)return 0;let Ri=bi-Ci,li=si-xr;const zi=Math.min(Ri,li),Kn=this.slice(Ci,bi),Hn=Er.slice(xr,si);for(let os=0;os<zi;++os)if(Kn[os]!==Hn[os]){Ri=Kn[os],li=Hn[os];break}return Ri<li?-1:li<Ri?1:0};function ve(Cr,Er,xr,si,Ci){if(Cr.length===0)return-1;if(typeof xr=="string"?(si=xr,xr=0):xr>2147483647?xr=2147483647:xr<-2147483648&&(xr=-2147483648),xr=+xr,Lr(xr)&&(xr=Ci?0:Cr.length-1),xr<0&&(xr=Cr.length+xr),xr>=Cr.length){if(Ci)return-1;xr=Cr.length-1}else if(xr<0)if(Ci)xr=0;else return-1;if(typeof Er=="string"&&(Er=v.from(Er,si)),v.isBuffer(Er))return Er.length===0?-1:Fe(Cr,Er,xr,si,Ci);if(typeof Er=="number")return Er=Er&255,typeof d.prototype.indexOf=="function"?Ci?d.prototype.indexOf.call(Cr,Er,xr):d.prototype.lastIndexOf.call(Cr,Er,xr):Fe(Cr,[Er],xr,si,Ci);throw new TypeError("val must be string, number or Buffer")}function Fe(Cr,Er,xr,si,Ci){let bi=1,Ri=Cr.length,li=Er.length;if(si!==void 0&&(si=String(si).toLowerCase(),si==="ucs2"||si==="ucs-2"||si==="utf16le"||si==="utf-16le")){if(Cr.length<2||Er.length<2)return-1;bi=2,Ri/=2,li/=2,xr/=2}function zi(Hn,os){return bi===1?Hn[os]:Hn.readUInt16BE(os*bi)}let Kn;if(Ci){let Hn=-1;for(Kn=xr;Kn<Ri;Kn++)if(zi(Cr,Kn)===zi(Er,Hn===-1?0:Kn-Hn)){if(Hn===-1&&(Hn=Kn),Kn-Hn+1===li)return Hn*bi}else Hn!==-1&&(Kn-=Kn-Hn),Hn=-1}else for(xr+li>Ri&&(xr=Ri-li),Kn=xr;Kn>=0;Kn--){let Hn=!0;for(let os=0;os<li;os++)if(zi(Cr,Kn+os)!==zi(Er,os)){Hn=!1;break}if(Hn)return Kn}return-1}v.prototype.includes=function(Er,xr,si){return this.indexOf(Er,xr,si)!==-1},v.prototype.indexOf=function(Er,xr,si){return ve(this,Er,xr,si,!0)},v.prototype.lastIndexOf=function(Er,xr,si){return ve(this,Er,xr,si,!1)};function be(Cr,Er,xr,si){xr=Number(xr)||0;const Ci=Cr.length-xr;si?(si=Number(si),si>Ci&&(si=Ci)):si=Ci;const bi=Er.length;si>bi/2&&(si=bi/2);let Ri;for(Ri=0;Ri<si;++Ri){const li=parseInt(Er.substr(Ri*2,2),16);if(Lr(li))return Ri;Cr[xr+Ri]=li}return Ri}function Be(Cr,Er,xr,si){return zr(fi(Er,Cr.length-xr),Cr,xr,si)}function ke(Cr,Er,xr,si){return zr(Bi(Er),Cr,xr,si)}function xe(Cr,Er,xr,si){return zr(oi(Er),Cr,xr,si)}function De(Cr,Er,xr,si){return zr($r(Er,Cr.length-xr),Cr,xr,si)}v.prototype.write=function(Er,xr,si,Ci){if(xr===void 0)Ci="utf8",si=this.length,xr=0;else if(si===void 0&&typeof xr=="string")Ci=xr,si=this.length,xr=0;else if(isFinite(xr))xr=xr>>>0,isFinite(si)?(si=si>>>0,Ci===void 0&&(Ci="utf8")):(Ci=si,si=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const bi=this.length-xr;if((si===void 0||si>bi)&&(si=bi),Er.length>0&&(si<0||xr<0)||xr>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ci||(Ci="utf8");let Ri=!1;for(;;)switch(Ci){case"hex":return be(this,Er,xr,si);case"utf8":case"utf-8":return Be(this,Er,xr,si);case"ascii":case"latin1":case"binary":return ke(this,Er,xr,si);case"base64":return xe(this,Er,xr,si);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,Er,xr,si);default:if(Ri)throw new TypeError("Unknown encoding: "+Ci);Ci=(""+Ci).toLowerCase(),Ri=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Et(Cr,Er,xr){return Er===0&&xr===Cr.length?g.fromByteArray(Cr):g.fromByteArray(Cr.slice(Er,xr))}function st(Cr,Er,xr){xr=Math.min(Cr.length,xr);const si=[];let Ci=Er;for(;Ci<xr;){const bi=Cr[Ci];let Ri=null,li=bi>239?4:bi>223?3:bi>191?2:1;if(Ci+li<=xr){let zi,Kn,Hn,os;switch(li){case 1:bi<128&&(Ri=bi);break;case 2:zi=Cr[Ci+1],(zi&192)===128&&(os=(bi&31)<<6|zi&63,os>127&&(Ri=os));break;case 3:zi=Cr[Ci+1],Kn=Cr[Ci+2],(zi&192)===128&&(Kn&192)===128&&(os=(bi&15)<<12|(zi&63)<<6|Kn&63,os>2047&&(os<55296||os>57343)&&(Ri=os));break;case 4:zi=Cr[Ci+1],Kn=Cr[Ci+2],Hn=Cr[Ci+3],(zi&192)===128&&(Kn&192)===128&&(Hn&192)===128&&(os=(bi&15)<<18|(zi&63)<<12|(Kn&63)<<6|Hn&63,os>65535&&os<1114112&&(Ri=os))}}Ri===null?(Ri=65533,li=1):Ri>65535&&(Ri-=65536,si.push(Ri>>>10&1023|55296),Ri=56320|Ri&1023),si.push(Ri),Ci+=li}return er(si)}const Dt=4096;function er(Cr){const Er=Cr.length;if(Er<=Dt)return String.fromCharCode.apply(String,Cr);let xr="",si=0;for(;si<Er;)xr+=String.fromCharCode.apply(String,Cr.slice(si,si+=Dt));return xr}function xt(Cr,Er,xr){let si="";xr=Math.min(Cr.length,xr);for(let Ci=Er;Ci<xr;++Ci)si+=String.fromCharCode(Cr[Ci]&127);return si}function ir(Cr,Er,xr){let si="";xr=Math.min(Cr.length,xr);for(let Ci=Er;Ci<xr;++Ci)si+=String.fromCharCode(Cr[Ci]);return si}function sr(Cr,Er,xr){const si=Cr.length;(!Er||Er<0)&&(Er=0),(!xr||xr<0||xr>si)&&(xr=si);let Ci="";for(let bi=Er;bi<xr;++bi)Ci+=Rr[Cr[bi]];return Ci}function yr(Cr,Er,xr){const si=Cr.slice(Er,xr);let Ci="";for(let bi=0;bi<si.length-1;bi+=2)Ci+=String.fromCharCode(si[bi]+si[bi+1]*256);return Ci}v.prototype.slice=function(Er,xr){const si=this.length;Er=~~Er,xr=xr===void 0?si:~~xr,Er<0?(Er+=si,Er<0&&(Er=0)):Er>si&&(Er=si),xr<0?(xr+=si,xr<0&&(xr=0)):xr>si&&(xr=si),xr<Er&&(xr=Er);const Ci=this.subarray(Er,xr);return Object.setPrototypeOf(Ci,v.prototype),Ci};function wr(Cr,Er,xr){if(Cr%1!==0||Cr<0)throw new RangeError("offset is not uint");if(Cr+Er>xr)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUintLE=v.prototype.readUIntLE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=this[Er],bi=1,Ri=0;for(;++Ri<xr&&(bi*=256);)Ci+=this[Er+Ri]*bi;return Ci},v.prototype.readUintBE=v.prototype.readUIntBE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=this[Er+--xr],bi=1;for(;xr>0&&(bi*=256);)Ci+=this[Er+--xr]*bi;return Ci},v.prototype.readUint8=v.prototype.readUInt8=function(Er,xr){return Er=Er>>>0,xr||wr(Er,1,this.length),this[Er]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,2,this.length),this[Er]|this[Er+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,2,this.length),this[Er]<<8|this[Er+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),(this[Er]|this[Er+1]<<8|this[Er+2]<<16)+this[Er+3]*16777216},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),this[Er]*16777216+(this[Er+1]<<16|this[Er+2]<<8|this[Er+3])},v.prototype.readBigUInt64LE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=xr+this[++Er]*2**8+this[++Er]*2**16+this[++Er]*2**24,bi=this[++Er]+this[++Er]*2**8+this[++Er]*2**16+si*2**24;return BigInt(Ci)+(BigInt(bi)<<BigInt(32))}),v.prototype.readBigUInt64BE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=xr*2**24+this[++Er]*2**16+this[++Er]*2**8+this[++Er],bi=this[++Er]*2**24+this[++Er]*2**16+this[++Er]*2**8+si;return(BigInt(Ci)<<BigInt(32))+BigInt(bi)}),v.prototype.readIntLE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=this[Er],bi=1,Ri=0;for(;++Ri<xr&&(bi*=256);)Ci+=this[Er+Ri]*bi;return bi*=128,Ci>=bi&&(Ci-=Math.pow(2,8*xr)),Ci},v.prototype.readIntBE=function(Er,xr,si){Er=Er>>>0,xr=xr>>>0,si||wr(Er,xr,this.length);let Ci=xr,bi=1,Ri=this[Er+--Ci];for(;Ci>0&&(bi*=256);)Ri+=this[Er+--Ci]*bi;return bi*=128,Ri>=bi&&(Ri-=Math.pow(2,8*xr)),Ri},v.prototype.readInt8=function(Er,xr){return Er=Er>>>0,xr||wr(Er,1,this.length),this[Er]&128?(255-this[Er]+1)*-1:this[Er]},v.prototype.readInt16LE=function(Er,xr){Er=Er>>>0,xr||wr(Er,2,this.length);const si=this[Er]|this[Er+1]<<8;return si&32768?si|4294901760:si},v.prototype.readInt16BE=function(Er,xr){Er=Er>>>0,xr||wr(Er,2,this.length);const si=this[Er+1]|this[Er]<<8;return si&32768?si|4294901760:si},v.prototype.readInt32LE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),this[Er]|this[Er+1]<<8|this[Er+2]<<16|this[Er+3]<<24},v.prototype.readInt32BE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),this[Er]<<24|this[Er+1]<<16|this[Er+2]<<8|this[Er+3]},v.prototype.readBigInt64LE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=this[Er+4]+this[Er+5]*2**8+this[Er+6]*2**16+(si<<24);return(BigInt(Ci)<<BigInt(32))+BigInt(xr+this[++Er]*2**8+this[++Er]*2**16+this[++Er]*2**24)}),v.prototype.readBigInt64BE=Ir(function(Er){Er=Er>>>0,Ar(Er,"offset");const xr=this[Er],si=this[Er+7];(xr===void 0||si===void 0)&&cr(Er,this.length-8);const Ci=(xr<<24)+this[++Er]*2**16+this[++Er]*2**8+this[++Er];return(BigInt(Ci)<<BigInt(32))+BigInt(this[++Er]*2**24+this[++Er]*2**16+this[++Er]*2**8+si)}),v.prototype.readFloatLE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),c.read(this,Er,!0,23,4)},v.prototype.readFloatBE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,4,this.length),c.read(this,Er,!1,23,4)},v.prototype.readDoubleLE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,8,this.length),c.read(this,Er,!0,52,8)},v.prototype.readDoubleBE=function(Er,xr){return Er=Er>>>0,xr||wr(Er,8,this.length),c.read(this,Er,!1,52,8)};function qr(Cr,Er,xr,si,Ci,bi){if(!v.isBuffer(Cr))throw new TypeError('"buffer" argument must be a Buffer instance');if(Er>Ci||Er<bi)throw new RangeError('"value" argument is out of bounds');if(xr+si>Cr.length)throw new RangeError("Index out of range")}v.prototype.writeUintLE=v.prototype.writeUIntLE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,si=si>>>0,!Ci){const li=Math.pow(2,8*si)-1;qr(this,Er,xr,si,li,0)}let bi=1,Ri=0;for(this[xr]=Er&255;++Ri<si&&(bi*=256);)this[xr+Ri]=Er/bi&255;return xr+si},v.prototype.writeUintBE=v.prototype.writeUIntBE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,si=si>>>0,!Ci){const li=Math.pow(2,8*si)-1;qr(this,Er,xr,si,li,0)}let bi=si-1,Ri=1;for(this[xr+bi]=Er&255;--bi>=0&&(Ri*=256);)this[xr+bi]=Er/Ri&255;return xr+si},v.prototype.writeUint8=v.prototype.writeUInt8=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,1,255,0),this[xr]=Er&255,xr+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,65535,0),this[xr]=Er&255,this[xr+1]=Er>>>8,xr+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,65535,0),this[xr]=Er>>>8,this[xr+1]=Er&255,xr+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,4294967295,0),this[xr+3]=Er>>>24,this[xr+2]=Er>>>16,this[xr+1]=Er>>>8,this[xr]=Er&255,xr+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,4294967295,0),this[xr]=Er>>>24,this[xr+1]=Er>>>16,this[xr+2]=Er>>>8,this[xr+3]=Er&255,xr+4};function Mr(Cr,Er,xr,si,Ci){br(Er,si,Ci,Cr,xr,7);let bi=Number(Er&BigInt(4294967295));Cr[xr++]=bi,bi=bi>>8,Cr[xr++]=bi,bi=bi>>8,Cr[xr++]=bi,bi=bi>>8,Cr[xr++]=bi;let Ri=Number(Er>>BigInt(32)&BigInt(4294967295));return Cr[xr++]=Ri,Ri=Ri>>8,Cr[xr++]=Ri,Ri=Ri>>8,Cr[xr++]=Ri,Ri=Ri>>8,Cr[xr++]=Ri,xr}function Dr(Cr,Er,xr,si,Ci){br(Er,si,Ci,Cr,xr,7);let bi=Number(Er&BigInt(4294967295));Cr[xr+7]=bi,bi=bi>>8,Cr[xr+6]=bi,bi=bi>>8,Cr[xr+5]=bi,bi=bi>>8,Cr[xr+4]=bi;let Ri=Number(Er>>BigInt(32)&BigInt(4294967295));return Cr[xr+3]=Ri,Ri=Ri>>8,Cr[xr+2]=Ri,Ri=Ri>>8,Cr[xr+1]=Ri,Ri=Ri>>8,Cr[xr]=Ri,xr+8}v.prototype.writeBigUInt64LE=Ir(function(Er,xr=0){return Mr(this,Er,xr,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeBigUInt64BE=Ir(function(Er,xr=0){return Dr(this,Er,xr,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeIntLE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,!Ci){const zi=Math.pow(2,8*si-1);qr(this,Er,xr,si,zi-1,-zi)}let bi=0,Ri=1,li=0;for(this[xr]=Er&255;++bi<si&&(Ri*=256);)Er<0&&li===0&&this[xr+bi-1]!==0&&(li=1),this[xr+bi]=(Er/Ri>>0)-li&255;return xr+si},v.prototype.writeIntBE=function(Er,xr,si,Ci){if(Er=+Er,xr=xr>>>0,!Ci){const zi=Math.pow(2,8*si-1);qr(this,Er,xr,si,zi-1,-zi)}let bi=si-1,Ri=1,li=0;for(this[xr+bi]=Er&255;--bi>=0&&(Ri*=256);)Er<0&&li===0&&this[xr+bi+1]!==0&&(li=1),this[xr+bi]=(Er/Ri>>0)-li&255;return xr+si},v.prototype.writeInt8=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,1,127,-128),Er<0&&(Er=255+Er+1),this[xr]=Er&255,xr+1},v.prototype.writeInt16LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,32767,-32768),this[xr]=Er&255,this[xr+1]=Er>>>8,xr+2},v.prototype.writeInt16BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,2,32767,-32768),this[xr]=Er>>>8,this[xr+1]=Er&255,xr+2},v.prototype.writeInt32LE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,2147483647,-2147483648),this[xr]=Er&255,this[xr+1]=Er>>>8,this[xr+2]=Er>>>16,this[xr+3]=Er>>>24,xr+4},v.prototype.writeInt32BE=function(Er,xr,si){return Er=+Er,xr=xr>>>0,si||qr(this,Er,xr,4,2147483647,-2147483648),Er<0&&(Er=4294967295+Er+1),this[xr]=Er>>>24,this[xr+1]=Er>>>16,this[xr+2]=Er>>>8,this[xr+3]=Er&255,xr+4},v.prototype.writeBigInt64LE=Ir(function(Er,xr=0){return Mr(this,Er,xr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeBigInt64BE=Ir(function(Er,xr=0){return Dr(this,Er,xr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Qr(Cr,Er,xr,si,Ci,bi){if(xr+si>Cr.length)throw new RangeError("Index out of range");if(xr<0)throw new RangeError("Index out of range")}function Xr(Cr,Er,xr,si,Ci){return Er=+Er,xr=xr>>>0,Ci||Qr(Cr,Er,xr,4),c.write(Cr,Er,xr,si,23,4),xr+4}v.prototype.writeFloatLE=function(Er,xr,si){return Xr(this,Er,xr,!0,si)},v.prototype.writeFloatBE=function(Er,xr,si){return Xr(this,Er,xr,!1,si)};function Wr(Cr,Er,xr,si,Ci){return Er=+Er,xr=xr>>>0,Ci||Qr(Cr,Er,xr,8),c.write(Cr,Er,xr,si,52,8),xr+8}v.prototype.writeDoubleLE=function(Er,xr,si){return Wr(this,Er,xr,!0,si)},v.prototype.writeDoubleBE=function(Er,xr,si){return Wr(this,Er,xr,!1,si)},v.prototype.copy=function(Er,xr,si,Ci){if(!v.isBuffer(Er))throw new TypeError("argument should be a Buffer");if(si||(si=0),!Ci&&Ci!==0&&(Ci=this.length),xr>=Er.length&&(xr=Er.length),xr||(xr=0),Ci>0&&Ci<si&&(Ci=si),Ci===si||Er.length===0||this.length===0)return 0;if(xr<0)throw new RangeError("targetStart out of bounds");if(si<0||si>=this.length)throw new RangeError("Index out of range");if(Ci<0)throw new RangeError("sourceEnd out of bounds");Ci>this.length&&(Ci=this.length),Er.length-xr<Ci-si&&(Ci=Er.length-xr+si);const bi=Ci-si;return this===Er&&typeof d.prototype.copyWithin=="function"?this.copyWithin(xr,si,Ci):d.prototype.set.call(Er,this.subarray(si,Ci),xr),bi},v.prototype.fill=function(Er,xr,si,Ci){if(typeof Er=="string"){if(typeof xr=="string"?(Ci=xr,xr=0,si=this.length):typeof si=="string"&&(Ci=si,si=this.length),Ci!==void 0&&typeof Ci!="string")throw new TypeError("encoding must be a string");if(typeof Ci=="string"&&!v.isEncoding(Ci))throw new TypeError("Unknown encoding: "+Ci);if(Er.length===1){const Ri=Er.charCodeAt(0);(Ci==="utf8"&&Ri<128||Ci==="latin1")&&(Er=Ri)}}else typeof Er=="number"?Er=Er&255:typeof Er=="boolean"&&(Er=Number(Er));if(xr<0||this.length<xr||this.length<si)throw new RangeError("Out of range index");if(si<=xr)return this;xr=xr>>>0,si=si===void 0?this.length:si>>>0,Er||(Er=0);let bi;if(typeof Er=="number")for(bi=xr;bi<si;++bi)this[bi]=Er;else{const Ri=v.isBuffer(Er)?Er:v.from(Er,Ci),li=Ri.length;if(li===0)throw new TypeError('The value "'+Er+'" is invalid for argument "value"');for(bi=0;bi<si-xr;++bi)this[bi+xr]=Ri[bi%li]}return this};const Ur={};function Sr(Cr,Er,xr){Ur[Cr]=class extends xr{constructor(){super(),Object.defineProperty(this,"message",{value:Er.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Cr}]`,this.stack,delete this.name}get code(){return Cr}set code(Ci){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ci,writable:!0})}toString(){return`${this.name} [${Cr}]: ${this.message}`}}}Sr("ERR_BUFFER_OUT_OF_BOUNDS",function(Cr){return Cr?`${Cr} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Sr("ERR_INVALID_ARG_TYPE",function(Cr,Er){return`The "${Cr}" argument must be of type number. Received type ${typeof Er}`},TypeError),Sr("ERR_OUT_OF_RANGE",function(Cr,Er,xr){let si=`The value of "${Cr}" is out of range.`,Ci=xr;return Number.isInteger(xr)&&Math.abs(xr)>2**32?Ci=Gr(String(xr)):typeof xr=="bigint"&&(Ci=String(xr),(xr>BigInt(2)**BigInt(32)||xr<-(BigInt(2)**BigInt(32)))&&(Ci=Gr(Ci)),Ci+="n"),si+=` It must be ${Er}. Received ${Ci}`,si},RangeError);function Gr(Cr){let Er="",xr=Cr.length;const si=Cr[0]==="-"?1:0;for(;xr>=si+4;xr-=3)Er=`_${Cr.slice(xr-3,xr)}${Er}`;return`${Cr.slice(0,xr)}${Er}`}function Fr(Cr,Er,xr){Ar(Er,"offset"),(Cr[Er]===void 0||Cr[Er+xr]===void 0)&&cr(Er,Cr.length-(xr+1))}function br(Cr,Er,xr,si,Ci,bi){if(Cr>xr||Cr<Er){const Ri=typeof Er=="bigint"?"n":"";let li;throw Er===0||Er===BigInt(0)?li=`>= 0${Ri} and < 2${Ri} ** ${(bi+1)*8}${Ri}`:li=`>= -(2${Ri} ** ${(bi+1)*8-1}${Ri}) and < 2 ** ${(bi+1)*8-1}${Ri}`,new Ur.ERR_OUT_OF_RANGE("value",li,Cr)}Fr(si,Ci,bi)}function Ar(Cr,Er){if(typeof Cr!="number")throw new Ur.ERR_INVALID_ARG_TYPE(Er,"number",Cr)}function cr(Cr,Er,xr){throw Math.floor(Cr)!==Cr?(Ar(Cr,xr),new Ur.ERR_OUT_OF_RANGE("offset","an integer",Cr)):Er<0?new Ur.ERR_BUFFER_OUT_OF_BOUNDS:new Ur.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Er}`,Cr)}const hr=/[^+/0-9A-Za-z-_]/g;function jr(Cr){if(Cr=Cr.split("=")[0],Cr=Cr.trim().replace(hr,""),Cr.length<2)return"";for(;Cr.length%4!==0;)Cr=Cr+"=";return Cr}function fi(Cr,Er){Er=Er||1/0;let xr;const si=Cr.length;let Ci=null;const bi=[];for(let Ri=0;Ri<si;++Ri){if(xr=Cr.charCodeAt(Ri),xr>55295&&xr<57344){if(!Ci){if(xr>56319){(Er-=3)>-1&&bi.push(239,191,189);continue}else if(Ri+1===si){(Er-=3)>-1&&bi.push(239,191,189);continue}Ci=xr;continue}if(xr<56320){(Er-=3)>-1&&bi.push(239,191,189),Ci=xr;continue}xr=(Ci-55296<<10|xr-56320)+65536}else Ci&&(Er-=3)>-1&&bi.push(239,191,189);if(Ci=null,xr<128){if((Er-=1)<0)break;bi.push(xr)}else if(xr<2048){if((Er-=2)<0)break;bi.push(xr>>6|192,xr&63|128)}else if(xr<65536){if((Er-=3)<0)break;bi.push(xr>>12|224,xr>>6&63|128,xr&63|128)}else if(xr<1114112){if((Er-=4)<0)break;bi.push(xr>>18|240,xr>>12&63|128,xr>>6&63|128,xr&63|128)}else throw new Error("Invalid code point")}return bi}function Bi(Cr){const Er=[];for(let xr=0;xr<Cr.length;++xr)Er.push(Cr.charCodeAt(xr)&255);return Er}function $r(Cr,Er){let xr,si,Ci;const bi=[];for(let Ri=0;Ri<Cr.length&&!((Er-=2)<0);++Ri)xr=Cr.charCodeAt(Ri),si=xr>>8,Ci=xr%256,bi.push(Ci),bi.push(si);return bi}function oi(Cr){return g.toByteArray(jr(Cr))}function zr(Cr,Er,xr,si){let Ci;for(Ci=0;Ci<si&&!(Ci+xr>=Er.length||Ci>=Cr.length);++Ci)Er[Ci+xr]=Cr[Ci];return Ci}function ti(Cr,Er){return Cr instanceof Er||Cr!=null&&Cr.constructor!=null&&Cr.constructor.name!=null&&Cr.constructor.name===Er.name}function Lr(Cr){return Cr!==Cr}const Rr=function(){const Cr="0123456789abcdef",Er=new Array(256);for(let xr=0;xr<16;++xr){const si=xr*16;for(let Ci=0;Ci<16;++Ci)Er[si+Ci]=Cr[xr]+Cr[Ci]}return Er}();function Ir(Cr){return typeof BigInt>"u"?pr:Cr}function pr(){throw new Error("BigInt not supported")}})(buffer$3);const Buffer=buffer$3.Buffer;var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function getAugmentedNamespace(o){if(Object.prototype.hasOwnProperty.call(o,"__esModule"))return o;var g=o.default;if(typeof g=="function"){var c=function y(){return this instanceof y?Reflect.construct(g,arguments,this.constructor):g.apply(this,arguments)};c.prototype=g.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(o).forEach(function(y){var t=Object.getOwnPropertyDescriptor(o,y);Object.defineProperty(c,y,t.get?t:{enumerable:!0,get:function(){return o[y]}})}),c}var dist$q={},secp256k1$7={},sha2={},_md$1={},utils$l={},crypto$7={},hasRequiredCrypto$4;function requireCrypto$4(){return hasRequiredCrypto$4||(hasRequiredCrypto$4=1,Object.defineProperty(crypto$7,"__esModule",{value:!0}),crypto$7.crypto=void 0,crypto$7.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),crypto$7}var hasRequiredUtils$j;function requireUtils$j(){return hasRequiredUtils$j||(hasRequiredUtils$j=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.wrapXOFConstructorWithOpts=o.wrapConstructorWithOpts=o.wrapConstructor=o.Hash=o.nextTick=o.swap32IfBE=o.byteSwapIfBE=o.swap8IfBE=o.isLE=void 0,o.isBytes=c,o.anumber=y,o.abytes=t,o.ahash=d,o.aexists=E,o.aoutput=B,o.u8=D,o.u32=x,o.clean=v,o.createView=F,o.rotr=M,o.rotl=U,o.byteSwap=L,o.byteSwap32=H,o.bytesToHex=Ie,o.hexToBytes=ze,o.asyncLoop=Ne,o.utf8ToBytes=Pe,o.bytesToUtf8=ve,o.toBytes=Fe,o.kdfInputToBytes=be,o.concatBytes=Be,o.checkOpts=ke,o.createHasher=De,o.createOptHasher=Et,o.createXOFer=st,o.randomBytes=Dt;const g=requireCrypto$4();function c(er){return er instanceof Uint8Array||ArrayBuffer.isView(er)&&er.constructor.name==="Uint8Array"}function y(er){if(!Number.isSafeInteger(er)||er<0)throw new Error("positive integer expected, got "+er)}function t(er,...xt){if(!c(er))throw new Error("Uint8Array expected");if(xt.length>0&&!xt.includes(er.length))throw new Error("Uint8Array expected of length "+xt+", got length="+er.length)}function d(er){if(typeof er!="function"||typeof er.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");y(er.outputLen),y(er.blockLen)}function E(er,xt=!0){if(er.destroyed)throw new Error("Hash instance has been destroyed");if(xt&&er.finished)throw new Error("Hash#digest() has already been called")}function B(er,xt){t(er);const ir=xt.outputLen;if(er.length<ir)throw new Error("digestInto() expects output buffer of length at least "+ir)}function D(er){return new Uint8Array(er.buffer,er.byteOffset,er.byteLength)}function x(er){return new Uint32Array(er.buffer,er.byteOffset,Math.floor(er.byteLength/4))}function v(...er){for(let xt=0;xt<er.length;xt++)er[xt].fill(0)}function F(er){return new DataView(er.buffer,er.byteOffset,er.byteLength)}function M(er,xt){return er<<32-xt|er>>>xt}function U(er,xt){return er<<xt|er>>>32-xt>>>0}o.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function L(er){return er<<24&4278190080|er<<8&16711680|er>>>8&65280|er>>>24&255}o.swap8IfBE=o.isLE?er=>er:er=>L(er),o.byteSwapIfBE=o.swap8IfBE;function H(er){for(let xt=0;xt<er.length;xt++)er[xt]=L(er[xt]);return er}o.swap32IfBE=o.isLE?er=>er:H;const fe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ge=Array.from({length:256},(er,xt)=>xt.toString(16).padStart(2,"0"));function Ie(er){if(t(er),fe)return er.toHex();let xt="";for(let ir=0;ir<er.length;ir++)xt+=ge[er[ir]];return xt}const Ee={_0:48,_9:57,A:65,F:70,a:97,f:102};function Se(er){if(er>=Ee._0&&er<=Ee._9)return er-Ee._0;if(er>=Ee.A&&er<=Ee.F)return er-(Ee.A-10);if(er>=Ee.a&&er<=Ee.f)return er-(Ee.a-10)}function ze(er){if(typeof er!="string")throw new Error("hex string expected, got "+typeof er);if(fe)return Uint8Array.fromHex(er);const xt=er.length,ir=xt/2;if(xt%2)throw new Error("hex string expected, got unpadded hex of length "+xt);const sr=new Uint8Array(ir);for(let yr=0,wr=0;yr<ir;yr++,wr+=2){const qr=Se(er.charCodeAt(wr)),Mr=Se(er.charCodeAt(wr+1));if(qr===void 0||Mr===void 0){const Dr=er[wr]+er[wr+1];throw new Error('hex string expected, got non-hex character "'+Dr+'" at index '+wr)}sr[yr]=qr*16+Mr}return sr}const He=async()=>{};o.nextTick=He;async function Ne(er,xt,ir){let sr=Date.now();for(let yr=0;yr<er;yr++){ir(yr);const wr=Date.now()-sr;wr>=0&&wr<xt||(await(0,o.nextTick)(),sr+=wr)}}function Pe(er){if(typeof er!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(er))}function ve(er){return new TextDecoder().decode(er)}function Fe(er){return typeof er=="string"&&(er=Pe(er)),t(er),er}function be(er){return typeof er=="string"&&(er=Pe(er)),t(er),er}function Be(...er){let xt=0;for(let sr=0;sr<er.length;sr++){const yr=er[sr];t(yr),xt+=yr.length}const ir=new Uint8Array(xt);for(let sr=0,yr=0;sr<er.length;sr++){const wr=er[sr];ir.set(wr,yr),yr+=wr.length}return ir}function ke(er,xt){if(xt!==void 0&&{}.toString.call(xt)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(er,xt)}class xe{}o.Hash=xe;function De(er){const xt=sr=>er().update(Fe(sr)).digest(),ir=er();return xt.outputLen=ir.outputLen,xt.blockLen=ir.blockLen,xt.create=()=>er(),xt}function Et(er){const xt=(sr,yr)=>er(yr).update(Fe(sr)).digest(),ir=er({});return xt.outputLen=ir.outputLen,xt.blockLen=ir.blockLen,xt.create=sr=>er(sr),xt}function st(er){const xt=(sr,yr)=>er(yr).update(Fe(sr)).digest(),ir=er({});return xt.outputLen=ir.outputLen,xt.blockLen=ir.blockLen,xt.create=sr=>er(sr),xt}o.wrapConstructor=De,o.wrapConstructorWithOpts=Et,o.wrapXOFConstructorWithOpts=st;function Dt(er=32){if(g.crypto&&typeof g.crypto.getRandomValues=="function")return g.crypto.getRandomValues(new Uint8Array(er));if(g.crypto&&typeof g.crypto.randomBytes=="function")return Uint8Array.from(g.crypto.randomBytes(er));throw new Error("crypto.getRandomValues must be defined")}}(utils$l)),utils$l}var hasRequired_md$1;function require_md$1(){if(hasRequired_md$1)return _md$1;hasRequired_md$1=1,Object.defineProperty(_md$1,"__esModule",{value:!0}),_md$1.SHA512_IV=_md$1.SHA384_IV=_md$1.SHA224_IV=_md$1.SHA256_IV=_md$1.HashMD=void 0,_md$1.setBigUint64=g,_md$1.Chi=c,_md$1.Maj=y;const o=requireUtils$j();function g(d,E,B,D){if(typeof d.setBigUint64=="function")return d.setBigUint64(E,B,D);const x=BigInt(32),v=BigInt(4294967295),F=Number(B>>x&v),M=Number(B&v),U=D?4:0,L=D?0:4;d.setUint32(E+U,F,D),d.setUint32(E+L,M,D)}function c(d,E,B){return d&E^~d&B}function y(d,E,B){return d&E^d&B^E&B}class t extends o.Hash{constructor(E,B,D,x){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=E,this.outputLen=B,this.padOffset=D,this.isLE=x,this.buffer=new Uint8Array(E),this.view=(0,o.createView)(this.buffer)}update(E){(0,o.aexists)(this),E=(0,o.toBytes)(E),(0,o.abytes)(E);const{view:B,buffer:D,blockLen:x}=this,v=E.length;for(let F=0;F<v;){const M=Math.min(x-this.pos,v-F);if(M===x){const U=(0,o.createView)(E);for(;x<=v-F;F+=x)this.process(U,F);continue}D.set(E.subarray(F,F+M),this.pos),this.pos+=M,F+=M,this.pos===x&&(this.process(B,0),this.pos=0)}return this.length+=E.length,this.roundClean(),this}digestInto(E){(0,o.aexists)(this),(0,o.aoutput)(E,this),this.finished=!0;const{buffer:B,view:D,blockLen:x,isLE:v}=this;let{pos:F}=this;B[F++]=128,(0,o.clean)(this.buffer.subarray(F)),this.padOffset>x-F&&(this.process(D,0),F=0);for(let fe=F;fe<x;fe++)B[fe]=0;g(D,x-8,BigInt(this.length*8),v),this.process(D,0);const M=(0,o.createView)(E),U=this.outputLen;if(U%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const L=U/4,H=this.get();if(L>H.length)throw new Error("_sha2: outputLen bigger than state");for(let fe=0;fe<L;fe++)M.setUint32(4*fe,H[fe],v)}digest(){const{buffer:E,outputLen:B}=this;this.digestInto(E);const D=E.slice(0,B);return this.destroy(),D}_cloneInto(E){E||(E=new this.constructor),E.set(...this.get());const{blockLen:B,buffer:D,length:x,finished:v,destroyed:F,pos:M}=this;return E.destroyed=F,E.finished=v,E.length=x,E.pos=M,x%B&&E.buffer.set(D),E}clone(){return this._cloneInto()}}return _md$1.HashMD=t,_md$1.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_md$1.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),_md$1.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),_md$1.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),_md$1}var _u64$1={},hasRequired_u64$1;function require_u64$1(){if(hasRequired_u64$1)return _u64$1;hasRequired_u64$1=1,Object.defineProperty(_u64$1,"__esModule",{value:!0}),_u64$1.toBig=_u64$1.shrSL=_u64$1.shrSH=_u64$1.rotrSL=_u64$1.rotrSH=_u64$1.rotrBL=_u64$1.rotrBH=_u64$1.rotr32L=_u64$1.rotr32H=_u64$1.rotlSL=_u64$1.rotlSH=_u64$1.rotlBL=_u64$1.rotlBH=_u64$1.add5L=_u64$1.add5H=_u64$1.add4L=_u64$1.add4H=_u64$1.add3L=_u64$1.add3H=void 0,_u64$1.add=ge,_u64$1.fromBig=c,_u64$1.split=y;const o=BigInt(2**32-1),g=BigInt(32);function c(ve,Fe=!1){return Fe?{h:Number(ve&o),l:Number(ve>>g&o)}:{h:Number(ve>>g&o)|0,l:Number(ve&o)|0}}function y(ve,Fe=!1){const be=ve.length;let Be=new Uint32Array(be),ke=new Uint32Array(be);for(let xe=0;xe<be;xe++){const{h:De,l:Et}=c(ve[xe],Fe);[Be[xe],ke[xe]]=[De,Et]}return[Be,ke]}const t=(ve,Fe)=>BigInt(ve>>>0)<<g|BigInt(Fe>>>0);_u64$1.toBig=t;const d=(ve,Fe,be)=>ve>>>be;_u64$1.shrSH=d;const E=(ve,Fe,be)=>ve<<32-be|Fe>>>be;_u64$1.shrSL=E;const B=(ve,Fe,be)=>ve>>>be|Fe<<32-be;_u64$1.rotrSH=B;const D=(ve,Fe,be)=>ve<<32-be|Fe>>>be;_u64$1.rotrSL=D;const x=(ve,Fe,be)=>ve<<64-be|Fe>>>be-32;_u64$1.rotrBH=x;const v=(ve,Fe,be)=>ve>>>be-32|Fe<<64-be;_u64$1.rotrBL=v;const F=(ve,Fe)=>Fe;_u64$1.rotr32H=F;const M=(ve,Fe)=>ve;_u64$1.rotr32L=M;const U=(ve,Fe,be)=>ve<<be|Fe>>>32-be;_u64$1.rotlSH=U;const L=(ve,Fe,be)=>Fe<<be|ve>>>32-be;_u64$1.rotlSL=L;const H=(ve,Fe,be)=>Fe<<be-32|ve>>>64-be;_u64$1.rotlBH=H;const fe=(ve,Fe,be)=>ve<<be-32|Fe>>>64-be;_u64$1.rotlBL=fe;function ge(ve,Fe,be,Be){const ke=(Fe>>>0)+(Be>>>0);return{h:ve+be+(ke/2**32|0)|0,l:ke|0}}const Ie=(ve,Fe,be)=>(ve>>>0)+(Fe>>>0)+(be>>>0);_u64$1.add3L=Ie;const Ee=(ve,Fe,be,Be)=>Fe+be+Be+(ve/2**32|0)|0;_u64$1.add3H=Ee;const Se=(ve,Fe,be,Be)=>(ve>>>0)+(Fe>>>0)+(be>>>0)+(Be>>>0);_u64$1.add4L=Se;const ze=(ve,Fe,be,Be,ke)=>Fe+be+Be+ke+(ve/2**32|0)|0;_u64$1.add4H=ze;const He=(ve,Fe,be,Be,ke)=>(ve>>>0)+(Fe>>>0)+(be>>>0)+(Be>>>0)+(ke>>>0);_u64$1.add5L=He;const Ne=(ve,Fe,be,Be,ke,xe)=>Fe+be+Be+ke+xe+(ve/2**32|0)|0;_u64$1.add5H=Ne;const Pe={fromBig:c,split:y,toBig:t,shrSH:d,shrSL:E,rotrSH:B,rotrSL:D,rotrBH:x,rotrBL:v,rotr32H:F,rotr32L:M,rotlSH:U,rotlSL:L,rotlBH:H,rotlBL:fe,add:ge,add3L:Ie,add3H:Ee,add4L:Se,add4H:ze,add5H:Ne,add5L:He};return _u64$1.default=Pe,_u64$1}var hasRequiredSha2;function requireSha2(){if(hasRequiredSha2)return sha2;hasRequiredSha2=1,Object.defineProperty(sha2,"__esModule",{value:!0}),sha2.sha512_224=sha2.sha512_256=sha2.sha384=sha2.sha512=sha2.sha224=sha2.sha256=sha2.SHA512_256=sha2.SHA512_224=sha2.SHA384=sha2.SHA512=sha2.SHA224=sha2.SHA256=void 0;const o=require_md$1(),g=require_u64$1(),c=requireUtils$j(),y=Uint32Array.from([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]),t=new Uint32Array(64);class d extends o.HashMD{constructor(Ee=32){super(64,Ee,8,!1),this.A=o.SHA256_IV[0]|0,this.B=o.SHA256_IV[1]|0,this.C=o.SHA256_IV[2]|0,this.D=o.SHA256_IV[3]|0,this.E=o.SHA256_IV[4]|0,this.F=o.SHA256_IV[5]|0,this.G=o.SHA256_IV[6]|0,this.H=o.SHA256_IV[7]|0}get(){const{A:Ee,B:Se,C:ze,D:He,E:Ne,F:Pe,G:ve,H:Fe}=this;return[Ee,Se,ze,He,Ne,Pe,ve,Fe]}set(Ee,Se,ze,He,Ne,Pe,ve,Fe){this.A=Ee|0,this.B=Se|0,this.C=ze|0,this.D=He|0,this.E=Ne|0,this.F=Pe|0,this.G=ve|0,this.H=Fe|0}process(Ee,Se){for(let ke=0;ke<16;ke++,Se+=4)t[ke]=Ee.getUint32(Se,!1);for(let ke=16;ke<64;ke++){const xe=t[ke-15],De=t[ke-2],Et=(0,c.rotr)(xe,7)^(0,c.rotr)(xe,18)^xe>>>3,st=(0,c.rotr)(De,17)^(0,c.rotr)(De,19)^De>>>10;t[ke]=st+t[ke-7]+Et+t[ke-16]|0}let{A:ze,B:He,C:Ne,D:Pe,E:ve,F:Fe,G:be,H:Be}=this;for(let ke=0;ke<64;ke++){const xe=(0,c.rotr)(ve,6)^(0,c.rotr)(ve,11)^(0,c.rotr)(ve,25),De=Be+xe+(0,o.Chi)(ve,Fe,be)+y[ke]+t[ke]|0,st=((0,c.rotr)(ze,2)^(0,c.rotr)(ze,13)^(0,c.rotr)(ze,22))+(0,o.Maj)(ze,He,Ne)|0;Be=be,be=Fe,Fe=ve,ve=Pe+De|0,Pe=Ne,Ne=He,He=ze,ze=De+st|0}ze=ze+this.A|0,He=He+this.B|0,Ne=Ne+this.C|0,Pe=Pe+this.D|0,ve=ve+this.E|0,Fe=Fe+this.F|0,be=be+this.G|0,Be=Be+this.H|0,this.set(ze,He,Ne,Pe,ve,Fe,be,Be)}roundClean(){(0,c.clean)(t)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,c.clean)(this.buffer)}}sha2.SHA256=d;class E extends d{constructor(){super(28),this.A=o.SHA224_IV[0]|0,this.B=o.SHA224_IV[1]|0,this.C=o.SHA224_IV[2]|0,this.D=o.SHA224_IV[3]|0,this.E=o.SHA224_IV[4]|0,this.F=o.SHA224_IV[5]|0,this.G=o.SHA224_IV[6]|0,this.H=o.SHA224_IV[7]|0}}sha2.SHA224=E;const B=g.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(Ie=>BigInt(Ie))),D=B[0],x=B[1],v=new Uint32Array(80),F=new Uint32Array(80);class M extends o.HashMD{constructor(Ee=64){super(128,Ee,16,!1),this.Ah=o.SHA512_IV[0]|0,this.Al=o.SHA512_IV[1]|0,this.Bh=o.SHA512_IV[2]|0,this.Bl=o.SHA512_IV[3]|0,this.Ch=o.SHA512_IV[4]|0,this.Cl=o.SHA512_IV[5]|0,this.Dh=o.SHA512_IV[6]|0,this.Dl=o.SHA512_IV[7]|0,this.Eh=o.SHA512_IV[8]|0,this.El=o.SHA512_IV[9]|0,this.Fh=o.SHA512_IV[10]|0,this.Fl=o.SHA512_IV[11]|0,this.Gh=o.SHA512_IV[12]|0,this.Gl=o.SHA512_IV[13]|0,this.Hh=o.SHA512_IV[14]|0,this.Hl=o.SHA512_IV[15]|0}get(){const{Ah:Ee,Al:Se,Bh:ze,Bl:He,Ch:Ne,Cl:Pe,Dh:ve,Dl:Fe,Eh:be,El:Be,Fh:ke,Fl:xe,Gh:De,Gl:Et,Hh:st,Hl:Dt}=this;return[Ee,Se,ze,He,Ne,Pe,ve,Fe,be,Be,ke,xe,De,Et,st,Dt]}set(Ee,Se,ze,He,Ne,Pe,ve,Fe,be,Be,ke,xe,De,Et,st,Dt){this.Ah=Ee|0,this.Al=Se|0,this.Bh=ze|0,this.Bl=He|0,this.Ch=Ne|0,this.Cl=Pe|0,this.Dh=ve|0,this.Dl=Fe|0,this.Eh=be|0,this.El=Be|0,this.Fh=ke|0,this.Fl=xe|0,this.Gh=De|0,this.Gl=Et|0,this.Hh=st|0,this.Hl=Dt|0}process(Ee,Se){for(let ir=0;ir<16;ir++,Se+=4)v[ir]=Ee.getUint32(Se),F[ir]=Ee.getUint32(Se+=4);for(let ir=16;ir<80;ir++){const sr=v[ir-15]|0,yr=F[ir-15]|0,wr=g.rotrSH(sr,yr,1)^g.rotrSH(sr,yr,8)^g.shrSH(sr,yr,7),qr=g.rotrSL(sr,yr,1)^g.rotrSL(sr,yr,8)^g.shrSL(sr,yr,7),Mr=v[ir-2]|0,Dr=F[ir-2]|0,Qr=g.rotrSH(Mr,Dr,19)^g.rotrBH(Mr,Dr,61)^g.shrSH(Mr,Dr,6),Xr=g.rotrSL(Mr,Dr,19)^g.rotrBL(Mr,Dr,61)^g.shrSL(Mr,Dr,6),Wr=g.add4L(qr,Xr,F[ir-7],F[ir-16]),Ur=g.add4H(Wr,wr,Qr,v[ir-7],v[ir-16]);v[ir]=Ur|0,F[ir]=Wr|0}let{Ah:ze,Al:He,Bh:Ne,Bl:Pe,Ch:ve,Cl:Fe,Dh:be,Dl:Be,Eh:ke,El:xe,Fh:De,Fl:Et,Gh:st,Gl:Dt,Hh:er,Hl:xt}=this;for(let ir=0;ir<80;ir++){const sr=g.rotrSH(ke,xe,14)^g.rotrSH(ke,xe,18)^g.rotrBH(ke,xe,41),yr=g.rotrSL(ke,xe,14)^g.rotrSL(ke,xe,18)^g.rotrBL(ke,xe,41),wr=ke&De^~ke&st,qr=xe&Et^~xe&Dt,Mr=g.add5L(xt,yr,qr,x[ir],F[ir]),Dr=g.add5H(Mr,er,sr,wr,D[ir],v[ir]),Qr=Mr|0,Xr=g.rotrSH(ze,He,28)^g.rotrBH(ze,He,34)^g.rotrBH(ze,He,39),Wr=g.rotrSL(ze,He,28)^g.rotrBL(ze,He,34)^g.rotrBL(ze,He,39),Ur=ze&Ne^ze&ve^Ne&ve,Sr=He&Pe^He&Fe^Pe&Fe;er=st|0,xt=Dt|0,st=De|0,Dt=Et|0,De=ke|0,Et=xe|0,{h:ke,l:xe}=g.add(be|0,Be|0,Dr|0,Qr|0),be=ve|0,Be=Fe|0,ve=Ne|0,Fe=Pe|0,Ne=ze|0,Pe=He|0;const Gr=g.add3L(Qr,Wr,Sr);ze=g.add3H(Gr,Dr,Xr,Ur),He=Gr|0}({h:ze,l:He}=g.add(this.Ah|0,this.Al|0,ze|0,He|0)),{h:Ne,l:Pe}=g.add(this.Bh|0,this.Bl|0,Ne|0,Pe|0),{h:ve,l:Fe}=g.add(this.Ch|0,this.Cl|0,ve|0,Fe|0),{h:be,l:Be}=g.add(this.Dh|0,this.Dl|0,be|0,Be|0),{h:ke,l:xe}=g.add(this.Eh|0,this.El|0,ke|0,xe|0),{h:De,l:Et}=g.add(this.Fh|0,this.Fl|0,De|0,Et|0),{h:st,l:Dt}=g.add(this.Gh|0,this.Gl|0,st|0,Dt|0),{h:er,l:xt}=g.add(this.Hh|0,this.Hl|0,er|0,xt|0),this.set(ze,He,Ne,Pe,ve,Fe,be,Be,ke,xe,De,Et,st,Dt,er,xt)}roundClean(){(0,c.clean)(v,F)}destroy(){(0,c.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}sha2.SHA512=M;class U extends M{constructor(){super(48),this.Ah=o.SHA384_IV[0]|0,this.Al=o.SHA384_IV[1]|0,this.Bh=o.SHA384_IV[2]|0,this.Bl=o.SHA384_IV[3]|0,this.Ch=o.SHA384_IV[4]|0,this.Cl=o.SHA384_IV[5]|0,this.Dh=o.SHA384_IV[6]|0,this.Dl=o.SHA384_IV[7]|0,this.Eh=o.SHA384_IV[8]|0,this.El=o.SHA384_IV[9]|0,this.Fh=o.SHA384_IV[10]|0,this.Fl=o.SHA384_IV[11]|0,this.Gh=o.SHA384_IV[12]|0,this.Gl=o.SHA384_IV[13]|0,this.Hh=o.SHA384_IV[14]|0,this.Hl=o.SHA384_IV[15]|0}}sha2.SHA384=U;const L=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),H=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class fe extends M{constructor(){super(28),this.Ah=L[0]|0,this.Al=L[1]|0,this.Bh=L[2]|0,this.Bl=L[3]|0,this.Ch=L[4]|0,this.Cl=L[5]|0,this.Dh=L[6]|0,this.Dl=L[7]|0,this.Eh=L[8]|0,this.El=L[9]|0,this.Fh=L[10]|0,this.Fl=L[11]|0,this.Gh=L[12]|0,this.Gl=L[13]|0,this.Hh=L[14]|0,this.Hl=L[15]|0}}sha2.SHA512_224=fe;class ge extends M{constructor(){super(32),this.Ah=H[0]|0,this.Al=H[1]|0,this.Bh=H[2]|0,this.Bl=H[3]|0,this.Ch=H[4]|0,this.Cl=H[5]|0,this.Dh=H[6]|0,this.Dl=H[7]|0,this.Eh=H[8]|0,this.El=H[9]|0,this.Fh=H[10]|0,this.Fl=H[11]|0,this.Gh=H[12]|0,this.Gl=H[13]|0,this.Hh=H[14]|0,this.Hl=H[15]|0}}return sha2.SHA512_256=ge,sha2.sha256=(0,c.createHasher)(()=>new d),sha2.sha224=(0,c.createHasher)(()=>new E),sha2.sha512=(0,c.createHasher)(()=>new M),sha2.sha384=(0,c.createHasher)(()=>new U),sha2.sha512_256=(0,c.createHasher)(()=>new ge),sha2.sha512_224=(0,c.createHasher)(()=>new fe),sha2}var _shortw_utils$1={},weierstrass$3={},hmac$5={},hasRequiredHmac$3;function requireHmac$3(){return hasRequiredHmac$3||(hasRequiredHmac$3=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.hmac=o.HMAC=void 0;const g=requireUtils$j();class c extends g.Hash{constructor(d,E){super(),this.finished=!1,this.destroyed=!1,(0,g.ahash)(d);const B=(0,g.toBytes)(E);if(this.iHash=d.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const D=this.blockLen,x=new Uint8Array(D);x.set(B.length>D?d.create().update(B).digest():B);for(let v=0;v<x.length;v++)x[v]^=54;this.iHash.update(x),this.oHash=d.create();for(let v=0;v<x.length;v++)x[v]^=106;this.oHash.update(x),(0,g.clean)(x)}update(d){return(0,g.aexists)(this),this.iHash.update(d),this}digestInto(d){(0,g.aexists)(this),(0,g.abytes)(d,this.outputLen),this.finished=!0,this.iHash.digestInto(d),this.oHash.update(d),this.oHash.digestInto(d),this.destroy()}digest(){const d=new Uint8Array(this.oHash.outputLen);return this.digestInto(d),d}_cloneInto(d){d||(d=Object.create(Object.getPrototypeOf(this),{}));const{oHash:E,iHash:B,finished:D,destroyed:x,blockLen:v,outputLen:F}=this;return d=d,d.finished=D,d.destroyed=x,d.blockLen=v,d.outputLen=F,d.oHash=E._cloneInto(d.oHash),d.iHash=B._cloneInto(d.iHash),d}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}o.HMAC=c;const y=(t,d,E)=>new c(t,d).update(E).digest();o.hmac=y,o.hmac.create=(t,d)=>new c(t,d)}(hmac$5)),hmac$5}var utils$k={},hasRequiredUtils$i;function requireUtils$i(){return hasRequiredUtils$i||(hasRequiredUtils$i=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.notImplemented=o.bitMask=o.utf8ToBytes=o.randomBytes=o.isBytes=o.hexToBytes=o.concatBytes=o.bytesToUtf8=o.bytesToHex=o.anumber=o.abytes=void 0,o.abool=d,o._abool2=E,o._abytes2=B,o.numberToHexUnpadded=D,o.hexToNumber=x,o.bytesToNumberBE=v,o.bytesToNumberLE=F,o.numberToBytesBE=M,o.numberToBytesLE=U,o.numberToVarBytesBE=L,o.ensureBytes=H,o.equalBytes=fe,o.copyBytes=ge,o.asciiToBytes=Ie,o.inRange=Se,o.aInRange=ze,o.bitLen=He,o.bitGet=Ne,o.bitSet=Pe,o.createHmacDrbg=Fe,o.validateObject=Be,o.isHash=ke,o._validateObject=xe,o.memoized=Et;const g=requireUtils$j();var c=requireUtils$j();Object.defineProperty(o,"abytes",{enumerable:!0,get:function(){return c.abytes}}),Object.defineProperty(o,"anumber",{enumerable:!0,get:function(){return c.anumber}}),Object.defineProperty(o,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(o,"bytesToUtf8",{enumerable:!0,get:function(){return c.bytesToUtf8}}),Object.defineProperty(o,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(o,"hexToBytes",{enumerable:!0,get:function(){return c.hexToBytes}}),Object.defineProperty(o,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(o,"randomBytes",{enumerable:!0,get:function(){return c.randomBytes}}),Object.defineProperty(o,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});const y=BigInt(0),t=BigInt(1);function d(st,Dt){if(typeof Dt!="boolean")throw new Error(st+" boolean expected, got "+Dt)}function E(st,Dt=""){if(typeof st!="boolean"){const er=Dt&&`"${Dt}"`;throw new Error(er+"expected boolean, got type="+typeof st)}return st}function B(st,Dt,er=""){const xt=(0,g.isBytes)(st),ir=st==null?void 0:st.length,sr=Dt!==void 0;if(!xt||sr&&ir!==Dt){const yr=er&&`"${er}" `,wr=sr?` of length ${Dt}`:"",qr=xt?`length=${ir}`:`type=${typeof st}`;throw new Error(yr+"expected Uint8Array"+wr+", got "+qr)}return st}function D(st){const Dt=st.toString(16);return Dt.length&1?"0"+Dt:Dt}function x(st){if(typeof st!="string")throw new Error("hex string expected, got "+typeof st);return st===""?y:BigInt("0x"+st)}function v(st){return x((0,g.bytesToHex)(st))}function F(st){return(0,g.abytes)(st),x((0,g.bytesToHex)(Uint8Array.from(st).reverse()))}function M(st,Dt){return(0,g.hexToBytes)(st.toString(16).padStart(Dt*2,"0"))}function U(st,Dt){return M(st,Dt).reverse()}function L(st){return(0,g.hexToBytes)(D(st))}function H(st,Dt,er){let xt;if(typeof Dt=="string")try{xt=(0,g.hexToBytes)(Dt)}catch(sr){throw new Error(st+" must be hex string or Uint8Array, cause: "+sr)}else if((0,g.isBytes)(Dt))xt=Uint8Array.from(Dt);else throw new Error(st+" must be hex string or Uint8Array");const ir=xt.length;if(typeof er=="number"&&ir!==er)throw new Error(st+" of length "+er+" expected, got "+ir);return xt}function fe(st,Dt){if(st.length!==Dt.length)return!1;let er=0;for(let xt=0;xt<st.length;xt++)er|=st[xt]^Dt[xt];return er===0}function ge(st){return Uint8Array.from(st)}function Ie(st){return Uint8Array.from(st,(Dt,er)=>{const xt=Dt.charCodeAt(0);if(Dt.length!==1||xt>127)throw new Error(`string contains non-ASCII character "${st[er]}" with code ${xt} at position ${er}`);return xt})}const Ee=st=>typeof st=="bigint"&&y<=st;function Se(st,Dt,er){return Ee(st)&&Ee(Dt)&&Ee(er)&&Dt<=st&&st<er}function ze(st,Dt,er,xt){if(!Se(Dt,er,xt))throw new Error("expected valid "+st+": "+er+" <= n < "+xt+", got "+Dt)}function He(st){let Dt;for(Dt=0;st>y;st>>=t,Dt+=1);return Dt}function Ne(st,Dt){return st>>BigInt(Dt)&t}function Pe(st,Dt,er){return st|(er?t:y)<<BigInt(Dt)}const ve=st=>(t<<BigInt(st))-t;o.bitMask=ve;function Fe(st,Dt,er){if(typeof st!="number"||st<2)throw new Error("hashLen must be a number");if(typeof Dt!="number"||Dt<2)throw new Error("qByteLen must be a number");if(typeof er!="function")throw new Error("hmacFn must be a function");const xt=Wr=>new Uint8Array(Wr),ir=Wr=>Uint8Array.of(Wr);let sr=xt(st),yr=xt(st),wr=0;const qr=()=>{sr.fill(1),yr.fill(0),wr=0},Mr=(...Wr)=>er(yr,sr,...Wr),Dr=(Wr=xt(0))=>{yr=Mr(ir(0),Wr),sr=Mr(),Wr.length!==0&&(yr=Mr(ir(1),Wr),sr=Mr())},Qr=()=>{if(wr++>=1e3)throw new Error("drbg: tried 1000 values");let Wr=0;const Ur=[];for(;Wr<Dt;){sr=Mr();const Sr=sr.slice();Ur.push(Sr),Wr+=sr.length}return(0,g.concatBytes)(...Ur)};return(Wr,Ur)=>{qr(),Dr(Wr);let Sr;for(;!(Sr=Ur(Qr()));)Dr();return qr(),Sr}}const be={bigint:st=>typeof st=="bigint",function:st=>typeof st=="function",boolean:st=>typeof st=="boolean",string:st=>typeof st=="string",stringOrUint8Array:st=>typeof st=="string"||(0,g.isBytes)(st),isSafeInteger:st=>Number.isSafeInteger(st),array:st=>Array.isArray(st),field:(st,Dt)=>Dt.Fp.isValid(st),hash:st=>typeof st=="function"&&Number.isSafeInteger(st.outputLen)};function Be(st,Dt,er={}){const xt=(ir,sr,yr)=>{const wr=be[sr];if(typeof wr!="function")throw new Error("invalid validator function");const qr=st[ir];if(!(yr&&qr===void 0)&&!wr(qr,st))throw new Error("param "+String(ir)+" is invalid. Expected "+sr+", got "+qr)};for(const[ir,sr]of Object.entries(Dt))xt(ir,sr,!1);for(const[ir,sr]of Object.entries(er))xt(ir,sr,!0);return st}function ke(st){return typeof st=="function"&&Number.isSafeInteger(st.outputLen)}function xe(st,Dt,er={}){if(!st||typeof st!="object")throw new Error("expected valid options object");function xt(ir,sr,yr){const wr=st[ir];if(yr&&wr===void 0)return;const qr=typeof wr;if(qr!==sr||wr===null)throw new Error(`param "${ir}" is invalid: expected ${sr}, got ${qr}`)}Object.entries(Dt).forEach(([ir,sr])=>xt(ir,sr,!1)),Object.entries(er).forEach(([ir,sr])=>xt(ir,sr,!0))}const De=()=>{throw new Error("not implemented")};o.notImplemented=De;function Et(st){const Dt=new WeakMap;return(er,...xt)=>{const ir=Dt.get(er);if(ir!==void 0)return ir;const sr=st(er,...xt);return Dt.set(er,sr),sr}}}(utils$k)),utils$k}var curve$2={},modular$1={},hasRequiredModular$1;function requireModular$1(){if(hasRequiredModular$1)return modular$1;hasRequiredModular$1=1,Object.defineProperty(modular$1,"__esModule",{value:!0}),modular$1.isNegativeLE=void 0,modular$1.mod=F,modular$1.pow=M,modular$1.pow2=U,modular$1.invert=L,modular$1.tonelliShanks=Ee,modular$1.FpSqrt=Se,modular$1.validateField=Ne,modular$1.FpPow=Pe,modular$1.FpInvertBatch=ve,modular$1.FpDiv=Fe,modular$1.FpLegendre=be,modular$1.FpIsSquare=Be,modular$1.nLength=ke,modular$1.Field=xe,modular$1.FpSqrtOdd=De,modular$1.FpSqrtEven=Et,modular$1.hashToPrivateScalar=st,modular$1.getFieldBytesLength=Dt,modular$1.getMinHashLength=er,modular$1.mapHashToField=xt;const o=requireUtils$i(),g=BigInt(0),c=BigInt(1),y=BigInt(2),t=BigInt(3),d=BigInt(4),E=BigInt(5),B=BigInt(7),D=BigInt(8),x=BigInt(9),v=BigInt(16);function F(ir,sr){const yr=ir%sr;return yr>=g?yr:sr+yr}function M(ir,sr,yr){return Pe(xe(yr),ir,sr)}function U(ir,sr,yr){let wr=ir;for(;sr-- >g;)wr*=wr,wr%=yr;return wr}function L(ir,sr){if(ir===g)throw new Error("invert: expected non-zero number");if(sr<=g)throw new Error("invert: expected positive modulus, got "+sr);let yr=F(ir,sr),wr=sr,qr=g,Mr=c;for(;yr!==g;){const Qr=wr/yr,Xr=wr%yr,Wr=qr-Mr*Qr;wr=yr,yr=Xr,qr=Mr,Mr=Wr}if(wr!==c)throw new Error("invert: does not exist");return F(qr,sr)}function H(ir,sr,yr){if(!ir.eql(ir.sqr(sr),yr))throw new Error("Cannot find square root")}function fe(ir,sr){const yr=(ir.ORDER+c)/d,wr=ir.pow(sr,yr);return H(ir,wr,sr),wr}function ge(ir,sr){const yr=(ir.ORDER-E)/D,wr=ir.mul(sr,y),qr=ir.pow(wr,yr),Mr=ir.mul(sr,qr),Dr=ir.mul(ir.mul(Mr,y),qr),Qr=ir.mul(Mr,ir.sub(Dr,ir.ONE));return H(ir,Qr,sr),Qr}function Ie(ir){const sr=xe(ir),yr=Ee(ir),wr=yr(sr,sr.neg(sr.ONE)),qr=yr(sr,wr),Mr=yr(sr,sr.neg(wr)),Dr=(ir+B)/v;return(Qr,Xr)=>{let Wr=Qr.pow(Xr,Dr),Ur=Qr.mul(Wr,wr);const Sr=Qr.mul(Wr,qr),Gr=Qr.mul(Wr,Mr),Fr=Qr.eql(Qr.sqr(Ur),Xr),br=Qr.eql(Qr.sqr(Sr),Xr);Wr=Qr.cmov(Wr,Ur,Fr),Ur=Qr.cmov(Gr,Sr,br);const Ar=Qr.eql(Qr.sqr(Ur),Xr),cr=Qr.cmov(Wr,Ur,Ar);return H(Qr,cr,Xr),cr}}function Ee(ir){if(ir<t)throw new Error("sqrt is not defined for small field");let sr=ir-c,yr=0;for(;sr%y===g;)sr/=y,yr++;let wr=y;const qr=xe(ir);for(;be(qr,wr)===1;)if(wr++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(yr===1)return fe;let Mr=qr.pow(wr,sr);const Dr=(sr+c)/y;return function(Xr,Wr){if(Xr.is0(Wr))return Wr;if(be(Xr,Wr)!==1)throw new Error("Cannot find square root");let Ur=yr,Sr=Xr.mul(Xr.ONE,Mr),Gr=Xr.pow(Wr,sr),Fr=Xr.pow(Wr,Dr);for(;!Xr.eql(Gr,Xr.ONE);){if(Xr.is0(Gr))return Xr.ZERO;let br=1,Ar=Xr.sqr(Gr);for(;!Xr.eql(Ar,Xr.ONE);)if(br++,Ar=Xr.sqr(Ar),br===Ur)throw new Error("Cannot find square root");const cr=c<<BigInt(Ur-br-1),hr=Xr.pow(Sr,cr);Ur=br,Sr=Xr.sqr(hr),Gr=Xr.mul(Gr,Sr),Fr=Xr.mul(Fr,hr)}return Fr}}function Se(ir){return ir%d===t?fe:ir%D===E?ge:ir%v===x?Ie(ir):Ee(ir)}const ze=(ir,sr)=>(F(ir,sr)&c)===c;modular$1.isNegativeLE=ze;const He=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Ne(ir){const sr={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},yr=He.reduce((wr,qr)=>(wr[qr]="function",wr),sr);return(0,o._validateObject)(ir,yr),ir}function Pe(ir,sr,yr){if(yr<g)throw new Error("invalid exponent, negatives unsupported");if(yr===g)return ir.ONE;if(yr===c)return sr;let wr=ir.ONE,qr=sr;for(;yr>g;)yr&c&&(wr=ir.mul(wr,qr)),qr=ir.sqr(qr),yr>>=c;return wr}function ve(ir,sr,yr=!1){const wr=new Array(sr.length).fill(yr?ir.ZERO:void 0),qr=sr.reduce((Dr,Qr,Xr)=>ir.is0(Qr)?Dr:(wr[Xr]=Dr,ir.mul(Dr,Qr)),ir.ONE),Mr=ir.inv(qr);return sr.reduceRight((Dr,Qr,Xr)=>ir.is0(Qr)?Dr:(wr[Xr]=ir.mul(Dr,wr[Xr]),ir.mul(Dr,Qr)),Mr),wr}function Fe(ir,sr,yr){return ir.mul(sr,typeof yr=="bigint"?L(yr,ir.ORDER):ir.inv(yr))}function be(ir,sr){const yr=(ir.ORDER-c)/y,wr=ir.pow(sr,yr),qr=ir.eql(wr,ir.ONE),Mr=ir.eql(wr,ir.ZERO),Dr=ir.eql(wr,ir.neg(ir.ONE));if(!qr&&!Mr&&!Dr)throw new Error("invalid Legendre symbol result");return qr?1:Mr?0:-1}function Be(ir,sr){return be(ir,sr)===1}function ke(ir,sr){sr!==void 0&&(0,o.anumber)(sr);const yr=sr!==void 0?sr:ir.toString(2).length,wr=Math.ceil(yr/8);return{nBitLength:yr,nByteLength:wr}}function xe(ir,sr,yr=!1,wr={}){if(ir<=g)throw new Error("invalid field: expected ORDER > 0, got "+ir);let qr,Mr,Dr=!1,Qr;if(typeof sr=="object"&&sr!=null){if(wr.sqrt||yr)throw new Error("cannot specify opts in two arguments");const Gr=sr;Gr.BITS&&(qr=Gr.BITS),Gr.sqrt&&(Mr=Gr.sqrt),typeof Gr.isLE=="boolean"&&(yr=Gr.isLE),typeof Gr.modFromBytes=="boolean"&&(Dr=Gr.modFromBytes),Qr=Gr.allowedLengths}else typeof sr=="number"&&(qr=sr),wr.sqrt&&(Mr=wr.sqrt);const{nBitLength:Xr,nByteLength:Wr}=ke(ir,qr);if(Wr>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let Ur;const Sr=Object.freeze({ORDER:ir,isLE:yr,BITS:Xr,BYTES:Wr,MASK:(0,o.bitMask)(Xr),ZERO:g,ONE:c,allowedLengths:Qr,create:Gr=>F(Gr,ir),isValid:Gr=>{if(typeof Gr!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof Gr);return g<=Gr&&Gr<ir},is0:Gr=>Gr===g,isValidNot0:Gr=>!Sr.is0(Gr)&&Sr.isValid(Gr),isOdd:Gr=>(Gr&c)===c,neg:Gr=>F(-Gr,ir),eql:(Gr,Fr)=>Gr===Fr,sqr:Gr=>F(Gr*Gr,ir),add:(Gr,Fr)=>F(Gr+Fr,ir),sub:(Gr,Fr)=>F(Gr-Fr,ir),mul:(Gr,Fr)=>F(Gr*Fr,ir),pow:(Gr,Fr)=>Pe(Sr,Gr,Fr),div:(Gr,Fr)=>F(Gr*L(Fr,ir),ir),sqrN:Gr=>Gr*Gr,addN:(Gr,Fr)=>Gr+Fr,subN:(Gr,Fr)=>Gr-Fr,mulN:(Gr,Fr)=>Gr*Fr,inv:Gr=>L(Gr,ir),sqrt:Mr||(Gr=>(Ur||(Ur=Se(ir)),Ur(Sr,Gr))),toBytes:Gr=>yr?(0,o.numberToBytesLE)(Gr,Wr):(0,o.numberToBytesBE)(Gr,Wr),fromBytes:(Gr,Fr=!0)=>{if(Qr){if(!Qr.includes(Gr.length)||Gr.length>Wr)throw new Error("Field.fromBytes: expected "+Qr+" bytes, got "+Gr.length);const Ar=new Uint8Array(Wr);Ar.set(Gr,yr?0:Ar.length-Gr.length),Gr=Ar}if(Gr.length!==Wr)throw new Error("Field.fromBytes: expected "+Wr+" bytes, got "+Gr.length);let br=yr?(0,o.bytesToNumberLE)(Gr):(0,o.bytesToNumberBE)(Gr);if(Dr&&(br=F(br,ir)),!Fr&&!Sr.isValid(br))throw new Error("invalid field element: outside of range 0..ORDER");return br},invertBatch:Gr=>ve(Sr,Gr),cmov:(Gr,Fr,br)=>br?Fr:Gr});return Object.freeze(Sr)}function De(ir,sr){if(!ir.isOdd)throw new Error("Field doesn't have isOdd");const yr=ir.sqrt(sr);return ir.isOdd(yr)?yr:ir.neg(yr)}function Et(ir,sr){if(!ir.isOdd)throw new Error("Field doesn't have isOdd");const yr=ir.sqrt(sr);return ir.isOdd(yr)?ir.neg(yr):yr}function st(ir,sr,yr=!1){ir=(0,o.ensureBytes)("privateHash",ir);const wr=ir.length,qr=ke(sr).nByteLength+8;if(qr<24||wr<qr||wr>1024)throw new Error("hashToPrivateScalar: expected "+qr+"-1024 bytes of input, got "+wr);const Mr=yr?(0,o.bytesToNumberLE)(ir):(0,o.bytesToNumberBE)(ir);return F(Mr,sr-c)+c}function Dt(ir){if(typeof ir!="bigint")throw new Error("field order must be bigint");const sr=ir.toString(2).length;return Math.ceil(sr/8)}function er(ir){const sr=Dt(ir);return sr+Math.ceil(sr/2)}function xt(ir,sr,yr=!1){const wr=ir.length,qr=Dt(sr),Mr=er(sr);if(wr<16||wr<Mr||wr>1024)throw new Error("expected "+Mr+"-1024 bytes of input, got "+wr);const Dr=yr?(0,o.bytesToNumberLE)(ir):(0,o.bytesToNumberBE)(ir),Qr=F(Dr,sr-c)+c;return yr?(0,o.numberToBytesLE)(Qr,qr):(0,o.numberToBytesBE)(Qr,qr)}return modular$1}var hasRequiredCurve$2;function requireCurve$2(){if(hasRequiredCurve$2)return curve$2;hasRequiredCurve$2=1,Object.defineProperty(curve$2,"__esModule",{value:!0}),curve$2.wNAF=void 0,curve$2.negateCt=t,curve$2.normalizeZ=d,curve$2.mulEndoUnsafe=fe,curve$2.pippenger=ge,curve$2.precomputeMSMUnsafe=Ie,curve$2.validateBasic=Ee,curve$2._createCurveFields=ze;const o=requireUtils$i(),g=requireModular$1(),c=BigInt(0),y=BigInt(1);function t(He,Ne){const Pe=Ne.negate();return He?Pe:Ne}function d(He,Ne){const Pe=(0,g.FpInvertBatch)(He.Fp,Ne.map(ve=>ve.Z));return Ne.map((ve,Fe)=>He.fromAffine(ve.toAffine(Pe[Fe])))}function E(He,Ne){if(!Number.isSafeInteger(He)||He<=0||He>Ne)throw new Error("invalid window size, expected [1.."+Ne+"], got W="+He)}function B(He,Ne){E(He,Ne);const Pe=Math.ceil(Ne/He)+1,ve=2**(He-1),Fe=2**He,be=(0,o.bitMask)(He),Be=BigInt(He);return{windows:Pe,windowSize:ve,mask:be,maxNumber:Fe,shiftBy:Be}}function D(He,Ne,Pe){const{windowSize:ve,mask:Fe,maxNumber:be,shiftBy:Be}=Pe;let ke=Number(He&Fe),xe=He>>Be;ke>ve&&(ke-=be,xe+=y);const De=Ne*ve,Et=De+Math.abs(ke)-1,st=ke===0,Dt=ke<0,er=Ne%2!==0;return{nextN:xe,offset:Et,isZero:st,isNeg:Dt,isNegF:er,offsetF:De}}function x(He,Ne){if(!Array.isArray(He))throw new Error("array expected");He.forEach((Pe,ve)=>{if(!(Pe instanceof Ne))throw new Error("invalid point at index "+ve)})}function v(He,Ne){if(!Array.isArray(He))throw new Error("array of scalars expected");He.forEach((Pe,ve)=>{if(!Ne.isValid(Pe))throw new Error("invalid scalar at index "+ve)})}const F=new WeakMap,M=new WeakMap;function U(He){return M.get(He)||1}function L(He){if(He!==c)throw new Error("invalid wNAF")}class H{constructor(Ne,Pe){this.BASE=Ne.BASE,this.ZERO=Ne.ZERO,this.Fn=Ne.Fn,this.bits=Pe}_unsafeLadder(Ne,Pe,ve=this.ZERO){let Fe=Ne;for(;Pe>c;)Pe&y&&(ve=ve.add(Fe)),Fe=Fe.double(),Pe>>=y;return ve}precomputeWindow(Ne,Pe){const{windows:ve,windowSize:Fe}=B(Pe,this.bits),be=[];let Be=Ne,ke=Be;for(let xe=0;xe<ve;xe++){ke=Be,be.push(ke);for(let De=1;De<Fe;De++)ke=ke.add(Be),be.push(ke);Be=ke.double()}return be}wNAF(Ne,Pe,ve){if(!this.Fn.isValid(ve))throw new Error("invalid scalar");let Fe=this.ZERO,be=this.BASE;const Be=B(Ne,this.bits);for(let ke=0;ke<Be.windows;ke++){const{nextN:xe,offset:De,isZero:Et,isNeg:st,isNegF:Dt,offsetF:er}=D(ve,ke,Be);ve=xe,Et?be=be.add(t(Dt,Pe[er])):Fe=Fe.add(t(st,Pe[De]))}return L(ve),{p:Fe,f:be}}wNAFUnsafe(Ne,Pe,ve,Fe=this.ZERO){const be=B(Ne,this.bits);for(let Be=0;Be<be.windows&&ve!==c;Be++){const{nextN:ke,offset:xe,isZero:De,isNeg:Et}=D(ve,Be,be);if(ve=ke,!De){const st=Pe[xe];Fe=Fe.add(Et?st.negate():st)}}return L(ve),Fe}getPrecomputes(Ne,Pe,ve){let Fe=F.get(Pe);return Fe||(Fe=this.precomputeWindow(Pe,Ne),Ne!==1&&(typeof ve=="function"&&(Fe=ve(Fe)),F.set(Pe,Fe))),Fe}cached(Ne,Pe,ve){const Fe=U(Ne);return this.wNAF(Fe,this.getPrecomputes(Fe,Ne,ve),Pe)}unsafe(Ne,Pe,ve,Fe){const be=U(Ne);return be===1?this._unsafeLadder(Ne,Pe,Fe):this.wNAFUnsafe(be,this.getPrecomputes(be,Ne,ve),Pe,Fe)}createCache(Ne,Pe){E(Pe,this.bits),M.set(Ne,Pe),F.delete(Ne)}hasCache(Ne){return U(Ne)!==1}}curve$2.wNAF=H;function fe(He,Ne,Pe,ve){let Fe=Ne,be=He.ZERO,Be=He.ZERO;for(;Pe>c||ve>c;)Pe&y&&(be=be.add(Fe)),ve&y&&(Be=Be.add(Fe)),Fe=Fe.double(),Pe>>=y,ve>>=y;return{p1:be,p2:Be}}function ge(He,Ne,Pe,ve){x(Pe,He),v(ve,Ne);const Fe=Pe.length,be=ve.length;if(Fe!==be)throw new Error("arrays of points and scalars must have equal length");const Be=He.ZERO,ke=(0,o.bitLen)(BigInt(Fe));let xe=1;ke>12?xe=ke-3:ke>4?xe=ke-2:ke>0&&(xe=2);const De=(0,o.bitMask)(xe),Et=new Array(Number(De)+1).fill(Be),st=Math.floor((Ne.BITS-1)/xe)*xe;let Dt=Be;for(let er=st;er>=0;er-=xe){Et.fill(Be);for(let ir=0;ir<be;ir++){const sr=ve[ir],yr=Number(sr>>BigInt(er)&De);Et[yr]=Et[yr].add(Pe[ir])}let xt=Be;for(let ir=Et.length-1,sr=Be;ir>0;ir--)sr=sr.add(Et[ir]),xt=xt.add(sr);if(Dt=Dt.add(xt),er!==0)for(let ir=0;ir<xe;ir++)Dt=Dt.double()}return Dt}function Ie(He,Ne,Pe,ve){E(ve,Ne.BITS),x(Pe,He);const Fe=He.ZERO,be=2**ve-1,Be=Math.ceil(Ne.BITS/ve),ke=(0,o.bitMask)(ve),xe=Pe.map(De=>{const Et=[];for(let st=0,Dt=De;st<be;st++)Et.push(Dt),Dt=Dt.add(De);return Et});return De=>{if(v(De,Ne),De.length>Pe.length)throw new Error("array of scalars must be smaller than array of points");let Et=Fe;for(let st=0;st<Be;st++){if(Et!==Fe)for(let er=0;er<ve;er++)Et=Et.double();const Dt=BigInt(Be*ve-(st+1)*ve);for(let er=0;er<De.length;er++){const xt=De[er],ir=Number(xt>>Dt&ke);ir&&(Et=Et.add(xe[er][ir-1]))}}return Et}}function Ee(He){return(0,g.validateField)(He.Fp),(0,o.validateObject)(He,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,g.nLength)(He.n,He.nBitLength),...He,p:He.Fp.ORDER})}function Se(He,Ne,Pe){if(Ne){if(Ne.ORDER!==He)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,g.validateField)(Ne),Ne}else return(0,g.Field)(He,{isLE:Pe})}function ze(He,Ne,Pe={},ve){if(ve===void 0&&(ve=He==="edwards"),!Ne||typeof Ne!="object")throw new Error(`expected valid ${He} CURVE object`);for(const xe of["p","n","h"]){const De=Ne[xe];if(!(typeof De=="bigint"&&De>c))throw new Error(`CURVE.${xe} must be positive bigint`)}const Fe=Se(Ne.p,Pe.Fp,ve),be=Se(Ne.n,Pe.Fn,ve),ke=["Gx","Gy","a",He==="weierstrass"?"b":"d"];for(const xe of ke)if(!Fe.isValid(Ne[xe]))throw new Error(`CURVE.${xe} must be valid field element of CURVE.Fp`);return Ne=Object.freeze(Object.assign({},Ne)),{CURVE:Ne,Fp:Fe,Fn:be}}return curve$2}var hasRequiredWeierstrass$1;function requireWeierstrass$1(){return hasRequiredWeierstrass$1||(hasRequiredWeierstrass$1=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.DER=o.DERErr=void 0,o._splitEndoScalar=B,o._normFnElement=fe,o.weierstrassN=ge,o.SWUFpSqrtRatio=Ee,o.mapToCurveSimpleSWU=Se,o.ecdh=He,o.ecdsa=Ne,o.weierstrassPoints=Pe,o._legacyHelperEquat=be,o.weierstrass=xe;const g=requireHmac$3(),c=requireUtils$j(),y=requireUtils$i(),t=requireCurve$2(),d=requireModular$1(),E=(De,Et)=>(De+(De>=0?Et:-Et)/U)/Et;function B(De,Et,st){const[[Dt,er],[xt,ir]]=Et,sr=E(ir*De,st),yr=E(-er*De,st);let wr=De-sr*Dt-yr*xt,qr=-sr*er-yr*ir;const Mr=wr<F,Dr=qr<F;Mr&&(wr=-wr),Dr&&(qr=-qr);const Qr=(0,y.bitMask)(Math.ceil((0,y.bitLen)(st)/2))+M;if(wr<F||wr>=Qr||qr<F||qr>=Qr)throw new Error("splitScalar (endomorphism): failed, k="+De);return{k1neg:Mr,k1:wr,k2neg:Dr,k2:qr}}function D(De){if(!["compact","recovered","der"].includes(De))throw new Error('Signature format must be "compact", "recovered", or "der"');return De}function x(De,Et){const st={};for(let Dt of Object.keys(Et))st[Dt]=De[Dt]===void 0?Et[Dt]:De[Dt];return(0,y._abool2)(st.lowS,"lowS"),(0,y._abool2)(st.prehash,"prehash"),st.format!==void 0&&D(st.format),st}class v extends Error{constructor(Et=""){super(Et)}}o.DERErr=v,o.DER={Err:v,_tlv:{encode:(De,Et)=>{const{Err:st}=o.DER;if(De<0||De>256)throw new st("tlv.encode: wrong tag");if(Et.length&1)throw new st("tlv.encode: unpadded data");const Dt=Et.length/2,er=(0,y.numberToHexUnpadded)(Dt);if(er.length/2&128)throw new st("tlv.encode: long form length too big");const xt=Dt>127?(0,y.numberToHexUnpadded)(er.length/2|128):"";return(0,y.numberToHexUnpadded)(De)+xt+er+Et},decode(De,Et){const{Err:st}=o.DER;let Dt=0;if(De<0||De>256)throw new st("tlv.encode: wrong tag");if(Et.length<2||Et[Dt++]!==De)throw new st("tlv.decode: wrong tlv");const er=Et[Dt++],xt=!!(er&128);let ir=0;if(!xt)ir=er;else{const yr=er&127;if(!yr)throw new st("tlv.decode(long): indefinite length not supported");if(yr>4)throw new st("tlv.decode(long): byte length is too big");const wr=Et.subarray(Dt,Dt+yr);if(wr.length!==yr)throw new st("tlv.decode: length bytes not complete");if(wr[0]===0)throw new st("tlv.decode(long): zero leftmost byte");for(const qr of wr)ir=ir<<8|qr;if(Dt+=yr,ir<128)throw new st("tlv.decode(long): not minimal encoding")}const sr=Et.subarray(Dt,Dt+ir);if(sr.length!==ir)throw new st("tlv.decode: wrong value length");return{v:sr,l:Et.subarray(Dt+ir)}}},_int:{encode(De){const{Err:Et}=o.DER;if(De<F)throw new Et("integer: negative integers are not allowed");let st=(0,y.numberToHexUnpadded)(De);if(Number.parseInt(st[0],16)&8&&(st="00"+st),st.length&1)throw new Et("unexpected DER parsing assertion: unpadded hex");return st},decode(De){const{Err:Et}=o.DER;if(De[0]&128)throw new Et("invalid signature integer: negative");if(De[0]===0&&!(De[1]&128))throw new Et("invalid signature integer: unnecessary leading zero");return(0,y.bytesToNumberBE)(De)}},toSig(De){const{Err:Et,_int:st,_tlv:Dt}=o.DER,er=(0,y.ensureBytes)("signature",De),{v:xt,l:ir}=Dt.decode(48,er);if(ir.length)throw new Et("invalid signature: left bytes after parsing");const{v:sr,l:yr}=Dt.decode(2,xt),{v:wr,l:qr}=Dt.decode(2,yr);if(qr.length)throw new Et("invalid signature: left bytes after parsing");return{r:st.decode(sr),s:st.decode(wr)}},hexFromSig(De){const{_tlv:Et,_int:st}=o.DER,Dt=Et.encode(2,st.encode(De.r)),er=Et.encode(2,st.encode(De.s)),xt=Dt+er;return Et.encode(48,xt)}};const F=BigInt(0),M=BigInt(1),U=BigInt(2),L=BigInt(3),H=BigInt(4);function fe(De,Et){const{BYTES:st}=De;let Dt;if(typeof Et=="bigint")Dt=Et;else{let er=(0,y.ensureBytes)("private key",Et);try{Dt=De.fromBytes(er)}catch{throw new Error(`invalid private key: expected ui8a of size ${st}, got ${typeof Et}`)}}if(!De.isValidNot0(Dt))throw new Error("invalid private key: out of range [1..N-1]");return Dt}function ge(De,Et={}){const st=(0,t._createCurveFields)("weierstrass",De,Et),{Fp:Dt,Fn:er}=st;let xt=st.CURVE;const{h:ir,n:sr}=xt;(0,y._validateObject)(Et,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:yr}=Et;if(yr&&(!Dt.is0(xt.a)||typeof yr.beta!="bigint"||!Array.isArray(yr.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const wr=ze(Dt,er);function qr(){if(!Dt.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function Mr(oi,zr,ti){const{x:Lr,y:Rr}=zr.toAffine(),Ir=Dt.toBytes(Lr);if((0,y._abool2)(ti,"isCompressed"),ti){qr();const pr=!Dt.isOdd(Rr);return(0,y.concatBytes)(Ie(pr),Ir)}else return(0,y.concatBytes)(Uint8Array.of(4),Ir,Dt.toBytes(Rr))}function Dr(oi){(0,y._abytes2)(oi,void 0,"Point");const{publicKey:zr,publicKeyUncompressed:ti}=wr,Lr=oi.length,Rr=oi[0],Ir=oi.subarray(1);if(Lr===zr&&(Rr===2||Rr===3)){const pr=Dt.fromBytes(Ir);if(!Dt.isValid(pr))throw new Error("bad point: is not on curve, wrong x");const Cr=Wr(pr);let Er;try{Er=Dt.sqrt(Cr)}catch(Ci){const bi=Ci instanceof Error?": "+Ci.message:"";throw new Error("bad point: is not on curve, sqrt error"+bi)}qr();const xr=Dt.isOdd(Er);return(Rr&1)===1!==xr&&(Er=Dt.neg(Er)),{x:pr,y:Er}}else if(Lr===ti&&Rr===4){const pr=Dt.BYTES,Cr=Dt.fromBytes(Ir.subarray(0,pr)),Er=Dt.fromBytes(Ir.subarray(pr,pr*2));if(!Ur(Cr,Er))throw new Error("bad point: is not on curve");return{x:Cr,y:Er}}else throw new Error(`bad point: got length ${Lr}, expected compressed=${zr} or uncompressed=${ti}`)}const Qr=Et.toBytes||Mr,Xr=Et.fromBytes||Dr;function Wr(oi){const zr=Dt.sqr(oi),ti=Dt.mul(zr,oi);return Dt.add(Dt.add(ti,Dt.mul(oi,xt.a)),xt.b)}function Ur(oi,zr){const ti=Dt.sqr(zr),Lr=Wr(oi);return Dt.eql(ti,Lr)}if(!Ur(xt.Gx,xt.Gy))throw new Error("bad curve params: generator point");const Sr=Dt.mul(Dt.pow(xt.a,L),H),Gr=Dt.mul(Dt.sqr(xt.b),BigInt(27));if(Dt.is0(Dt.add(Sr,Gr)))throw new Error("bad curve params: a or b");function Fr(oi,zr,ti=!1){if(!Dt.isValid(zr)||ti&&Dt.is0(zr))throw new Error(`bad point coordinate ${oi}`);return zr}function br(oi){if(!(oi instanceof fi))throw new Error("ProjectivePoint expected")}function Ar(oi){if(!yr||!yr.basises)throw new Error("no endo");return B(oi,yr.basises,er.ORDER)}const cr=(0,y.memoized)((oi,zr)=>{const{X:ti,Y:Lr,Z:Rr}=oi;if(Dt.eql(Rr,Dt.ONE))return{x:ti,y:Lr};const Ir=oi.is0();zr==null&&(zr=Ir?Dt.ONE:Dt.inv(Rr));const pr=Dt.mul(ti,zr),Cr=Dt.mul(Lr,zr),Er=Dt.mul(Rr,zr);if(Ir)return{x:Dt.ZERO,y:Dt.ZERO};if(!Dt.eql(Er,Dt.ONE))throw new Error("invZ was invalid");return{x:pr,y:Cr}}),hr=(0,y.memoized)(oi=>{if(oi.is0()){if(Et.allowInfinityPoint&&!Dt.is0(oi.Y))return;throw new Error("bad point: ZERO")}const{x:zr,y:ti}=oi.toAffine();if(!Dt.isValid(zr)||!Dt.isValid(ti))throw new Error("bad point: x or y not field elements");if(!Ur(zr,ti))throw new Error("bad point: equation left != right");if(!oi.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function jr(oi,zr,ti,Lr,Rr){return ti=new fi(Dt.mul(ti.X,oi),ti.Y,ti.Z),zr=(0,t.negateCt)(Lr,zr),ti=(0,t.negateCt)(Rr,ti),zr.add(ti)}class fi{constructor(zr,ti,Lr){this.X=Fr("x",zr),this.Y=Fr("y",ti,!0),this.Z=Fr("z",Lr),Object.freeze(this)}static CURVE(){return xt}static fromAffine(zr){const{x:ti,y:Lr}=zr||{};if(!zr||!Dt.isValid(ti)||!Dt.isValid(Lr))throw new Error("invalid affine point");if(zr instanceof fi)throw new Error("projective point not allowed");return Dt.is0(ti)&&Dt.is0(Lr)?fi.ZERO:new fi(ti,Lr,Dt.ONE)}static fromBytes(zr){const ti=fi.fromAffine(Xr((0,y._abytes2)(zr,void 0,"point")));return ti.assertValidity(),ti}static fromHex(zr){return fi.fromBytes((0,y.ensureBytes)("pointHex",zr))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(zr=8,ti=!0){return $r.createCache(this,zr),ti||this.multiply(L),this}assertValidity(){hr(this)}hasEvenY(){const{y:zr}=this.toAffine();if(!Dt.isOdd)throw new Error("Field doesn't support isOdd");return!Dt.isOdd(zr)}equals(zr){br(zr);const{X:ti,Y:Lr,Z:Rr}=this,{X:Ir,Y:pr,Z:Cr}=zr,Er=Dt.eql(Dt.mul(ti,Cr),Dt.mul(Ir,Rr)),xr=Dt.eql(Dt.mul(Lr,Cr),Dt.mul(pr,Rr));return Er&&xr}negate(){return new fi(this.X,Dt.neg(this.Y),this.Z)}double(){const{a:zr,b:ti}=xt,Lr=Dt.mul(ti,L),{X:Rr,Y:Ir,Z:pr}=this;let Cr=Dt.ZERO,Er=Dt.ZERO,xr=Dt.ZERO,si=Dt.mul(Rr,Rr),Ci=Dt.mul(Ir,Ir),bi=Dt.mul(pr,pr),Ri=Dt.mul(Rr,Ir);return Ri=Dt.add(Ri,Ri),xr=Dt.mul(Rr,pr),xr=Dt.add(xr,xr),Cr=Dt.mul(zr,xr),Er=Dt.mul(Lr,bi),Er=Dt.add(Cr,Er),Cr=Dt.sub(Ci,Er),Er=Dt.add(Ci,Er),Er=Dt.mul(Cr,Er),Cr=Dt.mul(Ri,Cr),xr=Dt.mul(Lr,xr),bi=Dt.mul(zr,bi),Ri=Dt.sub(si,bi),Ri=Dt.mul(zr,Ri),Ri=Dt.add(Ri,xr),xr=Dt.add(si,si),si=Dt.add(xr,si),si=Dt.add(si,bi),si=Dt.mul(si,Ri),Er=Dt.add(Er,si),bi=Dt.mul(Ir,pr),bi=Dt.add(bi,bi),si=Dt.mul(bi,Ri),Cr=Dt.sub(Cr,si),xr=Dt.mul(bi,Ci),xr=Dt.add(xr,xr),xr=Dt.add(xr,xr),new fi(Cr,Er,xr)}add(zr){br(zr);const{X:ti,Y:Lr,Z:Rr}=this,{X:Ir,Y:pr,Z:Cr}=zr;let Er=Dt.ZERO,xr=Dt.ZERO,si=Dt.ZERO;const Ci=xt.a,bi=Dt.mul(xt.b,L);let Ri=Dt.mul(ti,Ir),li=Dt.mul(Lr,pr),zi=Dt.mul(Rr,Cr),Kn=Dt.add(ti,Lr),Hn=Dt.add(Ir,pr);Kn=Dt.mul(Kn,Hn),Hn=Dt.add(Ri,li),Kn=Dt.sub(Kn,Hn),Hn=Dt.add(ti,Rr);let os=Dt.add(Ir,Cr);return Hn=Dt.mul(Hn,os),os=Dt.add(Ri,zi),Hn=Dt.sub(Hn,os),os=Dt.add(Lr,Rr),Er=Dt.add(pr,Cr),os=Dt.mul(os,Er),Er=Dt.add(li,zi),os=Dt.sub(os,Er),si=Dt.mul(Ci,Hn),Er=Dt.mul(bi,zi),si=Dt.add(Er,si),Er=Dt.sub(li,si),si=Dt.add(li,si),xr=Dt.mul(Er,si),li=Dt.add(Ri,Ri),li=Dt.add(li,Ri),zi=Dt.mul(Ci,zi),Hn=Dt.mul(bi,Hn),li=Dt.add(li,zi),zi=Dt.sub(Ri,zi),zi=Dt.mul(Ci,zi),Hn=Dt.add(Hn,zi),Ri=Dt.mul(li,Hn),xr=Dt.add(xr,Ri),Ri=Dt.mul(os,Hn),Er=Dt.mul(Kn,Er),Er=Dt.sub(Er,Ri),Ri=Dt.mul(Kn,li),si=Dt.mul(os,si),si=Dt.add(si,Ri),new fi(Er,xr,si)}subtract(zr){return this.add(zr.negate())}is0(){return this.equals(fi.ZERO)}multiply(zr){const{endo:ti}=Et;if(!er.isValidNot0(zr))throw new Error("invalid scalar: out of range");let Lr,Rr;const Ir=pr=>$r.cached(this,pr,Cr=>(0,t.normalizeZ)(fi,Cr));if(ti){const{k1neg:pr,k1:Cr,k2neg:Er,k2:xr}=Ar(zr),{p:si,f:Ci}=Ir(Cr),{p:bi,f:Ri}=Ir(xr);Rr=Ci.add(Ri),Lr=jr(ti.beta,si,bi,pr,Er)}else{const{p:pr,f:Cr}=Ir(zr);Lr=pr,Rr=Cr}return(0,t.normalizeZ)(fi,[Lr,Rr])[0]}multiplyUnsafe(zr){const{endo:ti}=Et,Lr=this;if(!er.isValid(zr))throw new Error("invalid scalar: out of range");if(zr===F||Lr.is0())return fi.ZERO;if(zr===M)return Lr;if($r.hasCache(this))return this.multiply(zr);if(ti){const{k1neg:Rr,k1:Ir,k2neg:pr,k2:Cr}=Ar(zr),{p1:Er,p2:xr}=(0,t.mulEndoUnsafe)(fi,Lr,Ir,Cr);return jr(ti.beta,Er,xr,Rr,pr)}else return $r.unsafe(Lr,zr)}multiplyAndAddUnsafe(zr,ti,Lr){const Rr=this.multiplyUnsafe(ti).add(zr.multiplyUnsafe(Lr));return Rr.is0()?void 0:Rr}toAffine(zr){return cr(this,zr)}isTorsionFree(){const{isTorsionFree:zr}=Et;return ir===M?!0:zr?zr(fi,this):$r.unsafe(this,sr).is0()}clearCofactor(){const{clearCofactor:zr}=Et;return ir===M?this:zr?zr(fi,this):this.multiplyUnsafe(ir)}isSmallOrder(){return this.multiplyUnsafe(ir).is0()}toBytes(zr=!0){return(0,y._abool2)(zr,"isCompressed"),this.assertValidity(),Qr(fi,this,zr)}toHex(zr=!0){return(0,y.bytesToHex)(this.toBytes(zr))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(zr=!0){return this.toBytes(zr)}_setWindowSize(zr){this.precompute(zr)}static normalizeZ(zr){return(0,t.normalizeZ)(fi,zr)}static msm(zr,ti){return(0,t.pippenger)(fi,er,zr,ti)}static fromPrivateKey(zr){return fi.BASE.multiply(fe(er,zr))}}fi.BASE=new fi(xt.Gx,xt.Gy,Dt.ONE),fi.ZERO=new fi(Dt.ZERO,Dt.ONE,Dt.ZERO),fi.Fp=Dt,fi.Fn=er;const Bi=er.BITS,$r=new t.wNAF(fi,Et.endo?Math.ceil(Bi/2):Bi);return fi.BASE.precompute(8),fi}function Ie(De){return Uint8Array.of(De?2:3)}function Ee(De,Et){const st=De.ORDER;let Dt=F;for(let Xr=st-M;Xr%U===F;Xr/=U)Dt+=M;const er=Dt,xt=U<<er-M-M,ir=xt*U,sr=(st-M)/ir,yr=(sr-M)/U,wr=ir-M,qr=xt,Mr=De.pow(Et,sr),Dr=De.pow(Et,(sr+M)/U);let Qr=(Xr,Wr)=>{let Ur=Mr,Sr=De.pow(Wr,wr),Gr=De.sqr(Sr);Gr=De.mul(Gr,Wr);let Fr=De.mul(Xr,Gr);Fr=De.pow(Fr,yr),Fr=De.mul(Fr,Sr),Sr=De.mul(Fr,Wr),Gr=De.mul(Fr,Xr);let br=De.mul(Gr,Sr);Fr=De.pow(br,qr);let Ar=De.eql(Fr,De.ONE);Sr=De.mul(Gr,Dr),Fr=De.mul(br,Ur),Gr=De.cmov(Sr,Gr,Ar),br=De.cmov(Fr,br,Ar);for(let cr=er;cr>M;cr--){let hr=cr-U;hr=U<<hr-M;let jr=De.pow(br,hr);const fi=De.eql(jr,De.ONE);Sr=De.mul(Gr,Ur),Ur=De.mul(Ur,Ur),jr=De.mul(br,Ur),Gr=De.cmov(Sr,Gr,fi),br=De.cmov(jr,br,fi)}return{isValid:Ar,value:Gr}};if(De.ORDER%H===L){const Xr=(De.ORDER-L)/H,Wr=De.sqrt(De.neg(Et));Qr=(Ur,Sr)=>{let Gr=De.sqr(Sr);const Fr=De.mul(Ur,Sr);Gr=De.mul(Gr,Fr);let br=De.pow(Gr,Xr);br=De.mul(br,Fr);const Ar=De.mul(br,Wr),cr=De.mul(De.sqr(br),Sr),hr=De.eql(cr,Ur);let jr=De.cmov(Ar,br,hr);return{isValid:hr,value:jr}}}return Qr}function Se(De,Et){(0,d.validateField)(De);const{A:st,B:Dt,Z:er}=Et;if(!De.isValid(st)||!De.isValid(Dt)||!De.isValid(er))throw new Error("mapToCurveSimpleSWU: invalid opts");const xt=Ee(De,er);if(!De.isOdd)throw new Error("Field does not have .isOdd()");return ir=>{let sr,yr,wr,qr,Mr,Dr,Qr,Xr;sr=De.sqr(ir),sr=De.mul(sr,er),yr=De.sqr(sr),yr=De.add(yr,sr),wr=De.add(yr,De.ONE),wr=De.mul(wr,Dt),qr=De.cmov(er,De.neg(yr),!De.eql(yr,De.ZERO)),qr=De.mul(qr,st),yr=De.sqr(wr),Dr=De.sqr(qr),Mr=De.mul(Dr,st),yr=De.add(yr,Mr),yr=De.mul(yr,wr),Dr=De.mul(Dr,qr),Mr=De.mul(Dr,Dt),yr=De.add(yr,Mr),Qr=De.mul(sr,wr);const{isValid:Wr,value:Ur}=xt(yr,Dr);Xr=De.mul(sr,ir),Xr=De.mul(Xr,Ur),Qr=De.cmov(Qr,wr,Wr),Xr=De.cmov(Xr,Ur,Wr);const Sr=De.isOdd(ir)===De.isOdd(Xr);Xr=De.cmov(De.neg(Xr),Xr,Sr);const Gr=(0,d.FpInvertBatch)(De,[qr],!0)[0];return Qr=De.mul(Qr,Gr),{x:Qr,y:Xr}}}function ze(De,Et){return{secretKey:Et.BYTES,publicKey:1+De.BYTES,publicKeyUncompressed:1+2*De.BYTES,publicKeyHasPrefix:!0,signature:2*Et.BYTES}}function He(De,Et={}){const{Fn:st}=De,Dt=Et.randomBytes||y.randomBytes,er=Object.assign(ze(De.Fp,st),{seed:(0,d.getMinHashLength)(st.ORDER)});function xt(Qr){try{return!!fe(st,Qr)}catch{return!1}}function ir(Qr,Xr){const{publicKey:Wr,publicKeyUncompressed:Ur}=er;try{const Sr=Qr.length;return Xr===!0&&Sr!==Wr||Xr===!1&&Sr!==Ur?!1:!!De.fromBytes(Qr)}catch{return!1}}function sr(Qr=Dt(er.seed)){return(0,d.mapHashToField)((0,y._abytes2)(Qr,er.seed,"seed"),st.ORDER)}function yr(Qr,Xr=!0){return De.BASE.multiply(fe(st,Qr)).toBytes(Xr)}function wr(Qr){const Xr=sr(Qr);return{secretKey:Xr,publicKey:yr(Xr)}}function qr(Qr){if(typeof Qr=="bigint")return!1;if(Qr instanceof De)return!0;const{secretKey:Xr,publicKey:Wr,publicKeyUncompressed:Ur}=er;if(st.allowedLengths||Xr===Wr)return;const Sr=(0,y.ensureBytes)("key",Qr).length;return Sr===Wr||Sr===Ur}function Mr(Qr,Xr,Wr=!0){if(qr(Qr)===!0)throw new Error("first arg must be private key");if(qr(Xr)===!1)throw new Error("second arg must be public key");const Ur=fe(st,Qr);return De.fromHex(Xr).multiply(Ur).toBytes(Wr)}return Object.freeze({getPublicKey:yr,getSharedSecret:Mr,keygen:wr,Point:De,utils:{isValidSecretKey:xt,isValidPublicKey:ir,randomSecretKey:sr,isValidPrivateKey:xt,randomPrivateKey:sr,normPrivateKeyToScalar:Qr=>fe(st,Qr),precompute(Qr=8,Xr=De.BASE){return Xr.precompute(Qr,!1)}},lengths:er})}function Ne(De,Et,st={}){(0,c.ahash)(Et),(0,y._validateObject)(st,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const Dt=st.randomBytes||y.randomBytes,er=st.hmac||((ti,...Lr)=>(0,g.hmac)(Et,ti,(0,y.concatBytes)(...Lr))),{Fp:xt,Fn:ir}=De,{ORDER:sr,BITS:yr}=ir,{keygen:wr,getPublicKey:qr,getSharedSecret:Mr,utils:Dr,lengths:Qr}=He(De,st),Xr={prehash:!1,lowS:typeof st.lowS=="boolean"?st.lowS:!1,format:void 0,extraEntropy:!1},Wr="compact";function Ur(ti){const Lr=sr>>M;return ti>Lr}function Sr(ti,Lr){if(!ir.isValidNot0(Lr))throw new Error(`invalid signature ${ti}: out of range 1..Point.Fn.ORDER`);return Lr}function Gr(ti,Lr){D(Lr);const Rr=Qr.signature,Ir=Lr==="compact"?Rr:Lr==="recovered"?Rr+1:void 0;return(0,y._abytes2)(ti,Ir,`${Lr} signature`)}class Fr{constructor(Lr,Rr,Ir){this.r=Sr("r",Lr),this.s=Sr("s",Rr),Ir!=null&&(this.recovery=Ir),Object.freeze(this)}static fromBytes(Lr,Rr=Wr){Gr(Lr,Rr);let Ir;if(Rr==="der"){const{r:xr,s:si}=o.DER.toSig((0,y._abytes2)(Lr));return new Fr(xr,si)}Rr==="recovered"&&(Ir=Lr[0],Rr="compact",Lr=Lr.subarray(1));const pr=ir.BYTES,Cr=Lr.subarray(0,pr),Er=Lr.subarray(pr,pr*2);return new Fr(ir.fromBytes(Cr),ir.fromBytes(Er),Ir)}static fromHex(Lr,Rr){return this.fromBytes((0,y.hexToBytes)(Lr),Rr)}addRecoveryBit(Lr){return new Fr(this.r,this.s,Lr)}recoverPublicKey(Lr){const Rr=xt.ORDER,{r:Ir,s:pr,recovery:Cr}=this;if(Cr==null||![0,1,2,3].includes(Cr))throw new Error("recovery id invalid");if(sr*U<Rr&&Cr>1)throw new Error("recovery id is ambiguous for h>1 curve");const xr=Cr===2||Cr===3?Ir+sr:Ir;if(!xt.isValid(xr))throw new Error("recovery id 2 or 3 invalid");const si=xt.toBytes(xr),Ci=De.fromBytes((0,y.concatBytes)(Ie((Cr&1)===0),si)),bi=ir.inv(xr),Ri=Ar((0,y.ensureBytes)("msgHash",Lr)),li=ir.create(-Ri*bi),zi=ir.create(pr*bi),Kn=De.BASE.multiplyUnsafe(li).add(Ci.multiplyUnsafe(zi));if(Kn.is0())throw new Error("point at infinify");return Kn.assertValidity(),Kn}hasHighS(){return Ur(this.s)}toBytes(Lr=Wr){if(D(Lr),Lr==="der")return(0,y.hexToBytes)(o.DER.hexFromSig(this));const Rr=ir.toBytes(this.r),Ir=ir.toBytes(this.s);if(Lr==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return(0,y.concatBytes)(Uint8Array.of(this.recovery),Rr,Ir)}return(0,y.concatBytes)(Rr,Ir)}toHex(Lr){return(0,y.bytesToHex)(this.toBytes(Lr))}assertValidity(){}static fromCompact(Lr){return Fr.fromBytes((0,y.ensureBytes)("sig",Lr),"compact")}static fromDER(Lr){return Fr.fromBytes((0,y.ensureBytes)("sig",Lr),"der")}normalizeS(){return this.hasHighS()?new Fr(this.r,ir.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,y.bytesToHex)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,y.bytesToHex)(this.toBytes("compact"))}}const br=st.bits2int||function(Lr){if(Lr.length>8192)throw new Error("input is too large");const Rr=(0,y.bytesToNumberBE)(Lr),Ir=Lr.length*8-yr;return Ir>0?Rr>>BigInt(Ir):Rr},Ar=st.bits2int_modN||function(Lr){return ir.create(br(Lr))},cr=(0,y.bitMask)(yr);function hr(ti){return(0,y.aInRange)("num < 2^"+yr,ti,F,cr),ir.toBytes(ti)}function jr(ti,Lr){return(0,y._abytes2)(ti,void 0,"message"),Lr?(0,y._abytes2)(Et(ti),void 0,"prehashed message"):ti}function fi(ti,Lr,Rr){if(["recovered","canonical"].some(li=>li in Rr))throw new Error("sign() legacy options not supported");const{lowS:Ir,prehash:pr,extraEntropy:Cr}=x(Rr,Xr);ti=jr(ti,pr);const Er=Ar(ti),xr=fe(ir,Lr),si=[hr(xr),hr(Er)];if(Cr!=null&&Cr!==!1){const li=Cr===!0?Dt(Qr.secretKey):Cr;si.push((0,y.ensureBytes)("extraEntropy",li))}const Ci=(0,y.concatBytes)(...si),bi=Er;function Ri(li){const zi=br(li);if(!ir.isValidNot0(zi))return;const Kn=ir.inv(zi),Hn=De.BASE.multiply(zi).toAffine(),os=ir.create(Hn.x);if(os===F)return;const ts=ir.create(Kn*ir.create(bi+os*xr));if(ts===F)return;let Gs=(Hn.x===os?0:2)|Number(Hn.y&M),jn=ts;return Ir&&Ur(ts)&&(jn=ir.neg(ts),Gs^=1),new Fr(os,jn,Gs)}return{seed:Ci,k2sig:Ri}}function Bi(ti,Lr,Rr={}){ti=(0,y.ensureBytes)("message",ti);const{seed:Ir,k2sig:pr}=fi(ti,Lr,Rr);return(0,y.createHmacDrbg)(Et.outputLen,ir.BYTES,er)(Ir,pr)}function $r(ti){let Lr;const Rr=typeof ti=="string"||(0,y.isBytes)(ti),Ir=!Rr&&ti!==null&&typeof ti=="object"&&typeof ti.r=="bigint"&&typeof ti.s=="bigint";if(!Rr&&!Ir)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(Ir)Lr=new Fr(ti.r,ti.s);else if(Rr){try{Lr=Fr.fromBytes((0,y.ensureBytes)("sig",ti),"der")}catch(pr){if(!(pr instanceof o.DER.Err))throw pr}if(!Lr)try{Lr=Fr.fromBytes((0,y.ensureBytes)("sig",ti),"compact")}catch{return!1}}return Lr||!1}function oi(ti,Lr,Rr,Ir={}){const{lowS:pr,prehash:Cr,format:Er}=x(Ir,Xr);if(Rr=(0,y.ensureBytes)("publicKey",Rr),Lr=jr((0,y.ensureBytes)("message",Lr),Cr),"strict"in Ir)throw new Error("options.strict was renamed to lowS");const xr=Er===void 0?$r(ti):Fr.fromBytes((0,y.ensureBytes)("sig",ti),Er);if(xr===!1)return!1;try{const si=De.fromBytes(Rr);if(pr&&xr.hasHighS())return!1;const{r:Ci,s:bi}=xr,Ri=Ar(Lr),li=ir.inv(bi),zi=ir.create(Ri*li),Kn=ir.create(Ci*li),Hn=De.BASE.multiplyUnsafe(zi).add(si.multiplyUnsafe(Kn));return Hn.is0()?!1:ir.create(Hn.x)===Ci}catch{return!1}}function zr(ti,Lr,Rr={}){const{prehash:Ir}=x(Rr,Xr);return Lr=jr(Lr,Ir),Fr.fromBytes(ti,"recovered").recoverPublicKey(Lr).toBytes()}return Object.freeze({keygen:wr,getPublicKey:qr,getSharedSecret:Mr,utils:Dr,lengths:Qr,Point:De,sign:Bi,verify:oi,recoverPublicKey:zr,Signature:Fr,hash:Et})}function Pe(De){const{CURVE:Et,curveOpts:st}=ve(De),Dt=ge(Et,st);return Be(De,Dt)}function ve(De){const Et={a:De.a,b:De.b,p:De.Fp.ORDER,n:De.n,h:De.h,Gx:De.Gx,Gy:De.Gy},st=De.Fp;let Dt=De.allowedPrivateKeyLengths?Array.from(new Set(De.allowedPrivateKeyLengths.map(ir=>Math.ceil(ir/2)))):void 0;const er=(0,d.Field)(Et.n,{BITS:De.nBitLength,allowedLengths:Dt,modFromBytes:De.wrapPrivateKey}),xt={Fp:st,Fn:er,allowInfinityPoint:De.allowInfinityPoint,endo:De.endo,isTorsionFree:De.isTorsionFree,clearCofactor:De.clearCofactor,fromBytes:De.fromBytes,toBytes:De.toBytes};return{CURVE:Et,curveOpts:xt}}function Fe(De){const{CURVE:Et,curveOpts:st}=ve(De),Dt={hmac:De.hmac,randomBytes:De.randomBytes,lowS:De.lowS,bits2int:De.bits2int,bits2int_modN:De.bits2int_modN};return{CURVE:Et,curveOpts:st,hash:De.hash,ecdsaOpts:Dt}}function be(De,Et,st){function Dt(er){const xt=De.sqr(er),ir=De.mul(xt,er);return De.add(De.add(ir,De.mul(er,Et)),st)}return Dt}function Be(De,Et){const{Fp:st,Fn:Dt}=Et;function er(ir){return(0,y.inRange)(ir,M,Dt.ORDER)}const xt=be(st,De.a,De.b);return Object.assign({},{CURVE:De,Point:Et,ProjectivePoint:Et,normPrivateKeyToScalar:ir=>fe(Dt,ir),weierstrassEquation:xt,isWithinCurveOrder:er})}function ke(De,Et){const st=Et.Point;return Object.assign({},Et,{ProjectivePoint:st,CURVE:Object.assign({},De,(0,d.nLength)(st.Fn.ORDER,st.Fn.BITS))})}function xe(De){const{CURVE:Et,curveOpts:st,hash:Dt,ecdsaOpts:er}=Fe(De),xt=ge(Et,st),ir=Ne(xt,Dt,er);return ke(De,ir)}}(weierstrass$3)),weierstrass$3}var hasRequired_shortw_utils$1;function require_shortw_utils$1(){if(hasRequired_shortw_utils$1)return _shortw_utils$1;hasRequired_shortw_utils$1=1,Object.defineProperty(_shortw_utils$1,"__esModule",{value:!0}),_shortw_utils$1.getHash=g,_shortw_utils$1.createCurve=c;const o=requireWeierstrass$1();function g(y){return{hash:y}}function c(y,t){const d=E=>(0,o.weierstrass)({...y,hash:E});return{...d(t),create:d}}return _shortw_utils$1}var hashToCurve$1={},hasRequiredHashToCurve$1;function requireHashToCurve$1(){return hasRequiredHashToCurve$1||(hasRequiredHashToCurve$1=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o._DST_scalar=void 0,o.expand_message_xmd=D,o.expand_message_xof=x,o.hash_to_field=v,o.isogenyMap=F,o.createHasher=M;const g=requireUtils$i(),c=requireModular$1(),y=g.bytesToNumberBE;function t(U,L){if(E(U),E(L),U<0||U>=1<<8*L)throw new Error("invalid I2OSP input: "+U);const H=Array.from({length:L}).fill(0);for(let fe=L-1;fe>=0;fe--)H[fe]=U&255,U>>>=8;return new Uint8Array(H)}function d(U,L){const H=new Uint8Array(U.length);for(let fe=0;fe<U.length;fe++)H[fe]=U[fe]^L[fe];return H}function E(U){if(!Number.isSafeInteger(U))throw new Error("number expected")}function B(U){if(!(0,g.isBytes)(U)&&typeof U!="string")throw new Error("DST must be Uint8Array or string");return typeof U=="string"?(0,g.utf8ToBytes)(U):U}function D(U,L,H,fe){(0,g.abytes)(U),E(H),L=B(L),L.length>255&&(L=fe((0,g.concatBytes)((0,g.utf8ToBytes)("H2C-OVERSIZE-DST-"),L)));const{outputLen:ge,blockLen:Ie}=fe,Ee=Math.ceil(H/ge);if(H>65535||Ee>255)throw new Error("expand_message_xmd: invalid lenInBytes");const Se=(0,g.concatBytes)(L,t(L.length,1)),ze=t(0,Ie),He=t(H,2),Ne=new Array(Ee),Pe=fe((0,g.concatBytes)(ze,U,He,t(0,1),Se));Ne[0]=fe((0,g.concatBytes)(Pe,t(1,1),Se));for(let Fe=1;Fe<=Ee;Fe++){const be=[d(Pe,Ne[Fe-1]),t(Fe+1,1),Se];Ne[Fe]=fe((0,g.concatBytes)(...be))}return(0,g.concatBytes)(...Ne).slice(0,H)}function x(U,L,H,fe,ge){if((0,g.abytes)(U),E(H),L=B(L),L.length>255){const Ie=Math.ceil(2*fe/8);L=ge.create({dkLen:Ie}).update((0,g.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(L).digest()}if(H>65535||L.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return ge.create({dkLen:H}).update(U).update(t(H,2)).update(L).update(t(L.length,1)).digest()}function v(U,L,H){(0,g._validateObject)(H,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:fe,k:ge,m:Ie,hash:Ee,expand:Se,DST:ze}=H;if(!(0,g.isHash)(H.hash))throw new Error("expected valid hash");(0,g.abytes)(U),E(L);const He=fe.toString(2).length,Ne=Math.ceil((He+ge)/8),Pe=L*Ie*Ne;let ve;if(Se==="xmd")ve=D(U,ze,Pe,Ee);else if(Se==="xof")ve=x(U,ze,Pe,ge,Ee);else if(Se==="_internal_pass")ve=U;else throw new Error('expand must be "xmd" or "xof"');const Fe=new Array(L);for(let be=0;be<L;be++){const Be=new Array(Ie);for(let ke=0;ke<Ie;ke++){const xe=Ne*(ke+be*Ie),De=ve.subarray(xe,xe+Ne);Be[ke]=(0,c.mod)(y(De),fe)}Fe[be]=Be}return Fe}function F(U,L){const H=L.map(fe=>Array.from(fe).reverse());return(fe,ge)=>{const[Ie,Ee,Se,ze]=H.map(Pe=>Pe.reduce((ve,Fe)=>U.add(U.mul(ve,fe),Fe))),[He,Ne]=(0,c.FpInvertBatch)(U,[Ee,ze],!0);return fe=U.mul(Ie,He),ge=U.mul(ge,U.mul(Se,Ne)),{x:fe,y:ge}}}o._DST_scalar=(0,g.utf8ToBytes)("HashToScalar-");function M(U,L,H){if(typeof L!="function")throw new Error("mapToCurve() must be defined");function fe(Ie){return U.fromAffine(L(Ie))}function ge(Ie){const Ee=Ie.clearCofactor();return Ee.equals(U.ZERO)?U.ZERO:(Ee.assertValidity(),Ee)}return{defaults:H,hashToCurve(Ie,Ee){const Se=Object.assign({},H,Ee),ze=v(Ie,2,Se),He=fe(ze[0]),Ne=fe(ze[1]);return ge(He.add(Ne))},encodeToCurve(Ie,Ee){const Se=H.encodeDST?{DST:H.encodeDST}:{},ze=Object.assign({},H,Se,Ee),He=v(Ie,1,ze),Ne=fe(He[0]);return ge(Ne)},mapToCurve(Ie){if(!Array.isArray(Ie))throw new Error("expected array of bigints");for(const Ee of Ie)if(typeof Ee!="bigint")throw new Error("expected array of bigints");return ge(fe(Ie))},hashToScalar(Ie,Ee){const Se=U.Fn.ORDER,ze=Object.assign({},H,{p:Se,m:1,DST:o._DST_scalar},Ee);return v(Ie,1,ze)[0][0]}}}}(hashToCurve$1)),hashToCurve$1}var hasRequiredSecp256k1$5;function requireSecp256k1$5(){return hasRequiredSecp256k1$5||(hasRequiredSecp256k1$5=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.encodeToCurve=o.hashToCurve=o.secp256k1_hasher=o.schnorr=o.secp256k1=void 0;const g=requireSha2(),c=requireUtils$j(),y=require_shortw_utils$1(),t=requireHashToCurve$1(),d=requireModular$1(),E=requireWeierstrass$1(),B=requireUtils$i(),D={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},x={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},v=BigInt(0),F=BigInt(1),M=BigInt(2);function U(ke){const xe=D.p,De=BigInt(3),Et=BigInt(6),st=BigInt(11),Dt=BigInt(22),er=BigInt(23),xt=BigInt(44),ir=BigInt(88),sr=ke*ke*ke%xe,yr=sr*sr*ke%xe,wr=(0,d.pow2)(yr,De,xe)*yr%xe,qr=(0,d.pow2)(wr,De,xe)*yr%xe,Mr=(0,d.pow2)(qr,M,xe)*sr%xe,Dr=(0,d.pow2)(Mr,st,xe)*Mr%xe,Qr=(0,d.pow2)(Dr,Dt,xe)*Dr%xe,Xr=(0,d.pow2)(Qr,xt,xe)*Qr%xe,Wr=(0,d.pow2)(Xr,ir,xe)*Xr%xe,Ur=(0,d.pow2)(Wr,xt,xe)*Qr%xe,Sr=(0,d.pow2)(Ur,De,xe)*yr%xe,Gr=(0,d.pow2)(Sr,er,xe)*Dr%xe,Fr=(0,d.pow2)(Gr,Et,xe)*sr%xe,br=(0,d.pow2)(Fr,M,xe);if(!L.eql(L.sqr(br),ke))throw new Error("Cannot find square root");return br}const L=(0,d.Field)(D.p,{sqrt:U});o.secp256k1=(0,y.createCurve)({...D,Fp:L,lowS:!0,endo:x},g.sha256);const H={};function fe(ke,...xe){let De=H[ke];if(De===void 0){const Et=(0,g.sha256)((0,B.utf8ToBytes)(ke));De=(0,B.concatBytes)(Et,Et),H[ke]=De}return(0,g.sha256)((0,B.concatBytes)(De,...xe))}const ge=ke=>ke.toBytes(!0).slice(1),Ie=o.secp256k1.Point,Ee=ke=>ke%M===v;function Se(ke){const{Fn:xe,BASE:De}=Ie,Et=(0,E._normFnElement)(xe,ke),st=De.multiply(Et);return{scalar:Ee(st.y)?Et:xe.neg(Et),bytes:ge(st)}}function ze(ke){const xe=L;if(!xe.isValidNot0(ke))throw new Error("invalid x: Fail if x ≥ p");const De=xe.create(ke*ke),Et=xe.create(De*ke+BigInt(7));let st=xe.sqrt(Et);Ee(st)||(st=xe.neg(st));const Dt=Ie.fromAffine({x:ke,y:st});return Dt.assertValidity(),Dt}const He=B.bytesToNumberBE;function Ne(...ke){return Ie.Fn.create(He(fe("BIP0340/challenge",...ke)))}function Pe(ke){return Se(ke).bytes}function ve(ke,xe,De=(0,c.randomBytes)(32)){const{Fn:Et}=Ie,st=(0,B.ensureBytes)("message",ke),{bytes:Dt,scalar:er}=Se(xe),xt=(0,B.ensureBytes)("auxRand",De,32),ir=Et.toBytes(er^He(fe("BIP0340/aux",xt))),sr=fe("BIP0340/nonce",ir,Dt,st),{bytes:yr,scalar:wr}=Se(sr),qr=Ne(yr,Dt,st),Mr=new Uint8Array(64);if(Mr.set(yr,0),Mr.set(Et.toBytes(Et.create(wr+qr*er)),32),!Fe(Mr,st,Dt))throw new Error("sign: Invalid signature produced");return Mr}function Fe(ke,xe,De){const{Fn:Et,BASE:st}=Ie,Dt=(0,B.ensureBytes)("signature",ke,64),er=(0,B.ensureBytes)("message",xe),xt=(0,B.ensureBytes)("publicKey",De,32);try{const ir=ze(He(xt)),sr=He(Dt.subarray(0,32));if(!(0,B.inRange)(sr,F,D.p))return!1;const yr=He(Dt.subarray(32,64));if(!(0,B.inRange)(yr,F,D.n))return!1;const wr=Ne(Et.toBytes(sr),ge(ir),er),qr=st.multiplyUnsafe(yr).add(ir.multiplyUnsafe(Et.neg(wr))),{x:Mr,y:Dr}=qr.toAffine();return!(qr.is0()||!Ee(Dr)||Mr!==sr)}catch{return!1}}o.schnorr=(()=>{const De=(st=(0,c.randomBytes)(48))=>(0,d.mapHashToField)(st,D.n);o.secp256k1.utils.randomSecretKey;function Et(st){const Dt=De(st);return{secretKey:Dt,publicKey:Pe(Dt)}}return{keygen:Et,getPublicKey:Pe,sign:ve,verify:Fe,Point:Ie,utils:{randomSecretKey:De,randomPrivateKey:De,taggedHash:fe,lift_x:ze,pointToBytes:ge,numberToBytesBE:B.numberToBytesBE,bytesToNumberBE:B.bytesToNumberBE,mod:d.mod},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();const be=(0,t.isogenyMap)(L,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(ke=>ke.map(xe=>BigInt(xe)))),Be=(0,E.mapToCurveSimpleSWU)(L,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:L.create(BigInt("-11"))});o.secp256k1_hasher=(0,t.createHasher)(o.secp256k1.Point,ke=>{const{x:xe,y:De}=Be(L.create(ke[0]));return be(xe,De)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:L.ORDER,m:1,k:128,expand:"xmd",hash:g.sha256}),o.hashToCurve=o.secp256k1_hasher.hashToCurve,o.encodeToCurve=o.secp256k1_hasher.encodeToCurve}(secp256k1$7)),secp256k1$7}var utils$j={},hasRequiredUtils$h;function requireUtils$h(){if(hasRequiredUtils$h)return utils$j;hasRequiredUtils$h=1,Object.defineProperty(utils$j,"__esModule",{value:!0}),utils$j.isHash=utils$j.validateObject=utils$j.memoized=utils$j.notImplemented=utils$j.createHmacDrbg=utils$j.bitMask=utils$j.bitSet=utils$j.bitGet=utils$j.bitLen=utils$j.aInRange=utils$j.inRange=utils$j.asciiToBytes=utils$j.copyBytes=utils$j.equalBytes=utils$j.ensureBytes=utils$j.numberToVarBytesBE=utils$j.numberToBytesLE=utils$j.numberToBytesBE=utils$j.bytesToNumberLE=utils$j.bytesToNumberBE=utils$j.hexToNumber=utils$j.numberToHexUnpadded=utils$j.abool=utils$j.utf8ToBytes=utils$j.randomBytes=utils$j.isBytes=utils$j.hexToBytes=utils$j.concatBytes=utils$j.bytesToUtf8=utils$j.bytesToHex=utils$j.anumber=utils$j.abytes=void 0;const o=requireUtils$i();return utils$j.abytes=o.abytes,utils$j.anumber=o.anumber,utils$j.bytesToHex=o.bytesToHex,utils$j.bytesToUtf8=o.bytesToUtf8,utils$j.concatBytes=o.concatBytes,utils$j.hexToBytes=o.hexToBytes,utils$j.isBytes=o.isBytes,utils$j.randomBytes=o.randomBytes,utils$j.utf8ToBytes=o.utf8ToBytes,utils$j.abool=o.abool,utils$j.numberToHexUnpadded=o.numberToHexUnpadded,utils$j.hexToNumber=o.hexToNumber,utils$j.bytesToNumberBE=o.bytesToNumberBE,utils$j.bytesToNumberLE=o.bytesToNumberLE,utils$j.numberToBytesBE=o.numberToBytesBE,utils$j.numberToBytesLE=o.numberToBytesLE,utils$j.numberToVarBytesBE=o.numberToVarBytesBE,utils$j.ensureBytes=o.ensureBytes,utils$j.equalBytes=o.equalBytes,utils$j.copyBytes=o.copyBytes,utils$j.asciiToBytes=o.asciiToBytes,utils$j.inRange=o.inRange,utils$j.aInRange=o.aInRange,utils$j.bitLen=o.bitLen,utils$j.bitGet=o.bitGet,utils$j.bitSet=o.bitSet,utils$j.bitMask=o.bitMask,utils$j.createHmacDrbg=o.createHmacDrbg,utils$j.notImplemented=o.notImplemented,utils$j.memoized=o.memoized,utils$j.validateObject=o.validateObject,utils$j.isHash=o.isHash,utils$j}var hasRequiredDist$q;function requireDist$q(){if(hasRequiredDist$q)return dist$q;hasRequiredDist$q=1;var o=requireSecp256k1$5(),g=requireModular$1(),c=requireUtils$h();function y(Ir){var pr=Object.create(null);return Ir&&Object.keys(Ir).forEach(function(Cr){if(Cr!=="default"){var Er=Object.getOwnPropertyDescriptor(Ir,Cr);Object.defineProperty(pr,Cr,Er.get?Er:{enumerable:!0,get:function(){return Ir[Cr]}})}}),pr.default=Ir,Object.freeze(pr)}var t=y(g),d=y(c);const E=o.secp256k1.ProjectivePoint,B="Expected Private",D="Expected Point",x="Expected Tweak",v="Expected Hash",F="Expected Signature",M="Expected Extra Data (32 bytes)",U="Expected Scalar",L="Bad Recovery Id",H=32,fe=32,ge=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65]),Ie=32,Ee=new Uint8Array(32),Se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,69,81,35,25,80,183,95,196,64,45,161,114,47,201,186,238]),ze=BigInt(1);function He(Ir){return Ir instanceof Uint8Array}function Ne(Ir,pr){for(let Cr=0;Cr<32;++Cr)if(Ir[Cr]!==pr[Cr])return Ir[Cr]<pr[Cr]?-1:1;return 0}function Pe(Ir){return Ne(Ir,Ee)===0}function ve(Ir){return!(!(Ir instanceof Uint8Array)||Ir.length!==fe||Ne(Ir,ge)>=0)}function Fe(Ir){return Ir instanceof Uint8Array&&Ir.length===64&&Ne(Ir.subarray(0,32),ge)<0&&Ne(Ir.subarray(32,64),ge)<0}function be(Ir){return He(Ir)&&Ir.length===64&&Ne(Ir.subarray(0,32),Se)<0}function Be(Ir){return!(Pe(Ir.subarray(0,32))||Pe(Ir.subarray(32,64)))}function ke(Ir){return Ir instanceof Uint8Array&&Ir.length===H}function xe(Ir){return Ir===void 0||Ir instanceof Uint8Array&&Ir.length===Ie}function De(Ir){let pr;if(typeof Ir=="bigint")pr=Ir;else if(typeof Ir=="number"&&Number.isSafeInteger(Ir)&&Ir>=0)pr=BigInt(Ir);else if(typeof Ir=="string"){if(Ir.length!==64)throw new Error("Expected 32 bytes of private scalar");pr=d.hexToNumber(Ir)}else if(Ir instanceof Uint8Array){if(Ir.length!==32)throw new Error("Expected 32 bytes of private scalar");pr=d.bytesToNumberBE(Ir)}else throw new TypeError("Expected valid private scalar");if(pr<0)throw new Error("Expected private scalar >= 0");return pr}function Et(Ir){return o.secp256k1.utils.normPrivateKeyToScalar(Ir)}function st(Ir,pr){const Cr=Et(Ir),Er=De(pr),xr=d.numberToBytesBE(t.mod(Cr+Er,o.secp256k1.CURVE.n),32);return o.secp256k1.utils.isValidPrivateKey(xr)?xr:null}function Dt(Ir,pr){const Cr=Et(Ir),Er=De(pr),xr=d.numberToBytesBE(t.mod(Cr-Er,o.secp256k1.CURVE.n),32);return o.secp256k1.utils.isValidPrivateKey(xr)?xr:null}function er(Ir){const pr=Et(Ir),Cr=d.numberToBytesBE(o.secp256k1.CURVE.n-pr,32);return o.secp256k1.utils.isValidPrivateKey(Cr)?Cr:null}function xt(Ir,pr,Cr){const Er=qr(Ir),xr=De(pr),si=E.BASE.multiplyAndAddUnsafe(Er,xr,ze);if(!si)throw new Error("Tweaked point at infinity");return si.toRawBytes(Cr)}function ir(Ir,pr,Cr){const Er=qr(Ir),xr=typeof pr=="string"?pr:d.bytesToHex(pr),si=d.hexToNumber(xr);return Er.multiply(si).toRawBytes(Cr)}function sr(Ir,pr){return Ir===void 0?pr!==void 0?Qr(pr):!0:!!Ir}function yr(Ir){try{return Ir()}catch{return null}}function wr(Ir){return o.schnorr.utils.lift_x(d.bytesToNumberBE(Ir))}function qr(Ir){return Ir.length===32?wr(Ir):E.fromHex(Ir)}function Mr(Ir,pr){if(Ir.length===32!==pr)return!1;try{return pr?!!wr(Ir):!!E.fromHex(Ir)}catch{return!1}}function Dr(Ir){return Mr(Ir,!1)}function Qr(Ir){return Mr(Ir,!1)&&Ir.length===33}function Xr(Ir){return o.secp256k1.utils.isValidPrivateKey(Ir)}function Wr(Ir){return Mr(Ir,!0)}function Ur(Ir,pr){if(!Wr(Ir))throw new Error(D);if(!ve(pr))throw new Error(x);return yr(()=>{const Cr=xt(Ir,pr,!0);return{parity:Cr[0]%2===1?1:0,xOnlyPubkey:Cr.slice(1)}})}function Sr(Ir){if(!Dr(Ir))throw new Error(D);return Ir.slice(1,33)}function Gr(Ir,pr){if(!Xr(Ir))throw new Error(B);return yr(()=>o.secp256k1.getPublicKey(Ir,sr(pr)))}function Fr(Ir){if(!Xr(Ir))throw new Error(B);return Sr(Gr(Ir))}function br(Ir,pr){if(!Dr(Ir))throw new Error(D);return qr(Ir).toRawBytes(sr(pr,Ir))}function Ar(Ir,pr,Cr){if(!Dr(Ir))throw new Error(D);if(!ve(pr))throw new Error(x);return yr(()=>ir(Ir,pr,sr(Cr,Ir)))}function cr(Ir,pr,Cr){if(!Dr(Ir)||!Dr(pr))throw new Error(D);return yr(()=>{const Er=qr(Ir),xr=qr(pr);return Er.equals(xr.negate())?null:Er.add(xr).toRawBytes(sr(Cr,Ir))})}function hr(Ir,pr,Cr){if(!Dr(Ir))throw new Error(D);if(!ve(pr))throw new Error(x);return yr(()=>xt(Ir,pr,sr(Cr,Ir)))}function jr(Ir,pr){if(!Xr(Ir))throw new Error(B);if(!ve(pr))throw new Error(x);return yr(()=>st(Ir,pr))}function fi(Ir,pr){if(!Xr(Ir))throw new Error(B);if(!ve(pr))throw new Error(x);return yr(()=>Dt(Ir,pr))}function Bi(Ir){if(!Xr(Ir))throw new Error(B);return er(Ir)}function $r(Ir,pr,Cr){if(!Xr(pr))throw new Error(B);if(!ke(Ir))throw new Error(U);if(!xe(Cr))throw new Error(M);return o.secp256k1.sign(Ir,pr,{extraEntropy:Cr}).toCompactRawBytes()}function oi(Ir,pr,Cr){if(!Xr(pr))throw new Error(B);if(!ke(Ir))throw new Error(U);if(!xe(Cr))throw new Error(M);const Er=o.secp256k1.sign(Ir,pr,{extraEntropy:Cr});return{signature:Er.toCompactRawBytes(),recoveryId:Er.recovery}}function zr(Ir,pr,Cr){if(!Xr(pr))throw new Error(B);if(!ke(Ir))throw new Error(U);if(!xe(Cr))throw new Error(M);return o.schnorr.sign(Ir,pr,Cr)}function ti(Ir,pr,Cr,Er){if(!ke(Ir))throw new Error(v);if(!Fe(pr)||!Be(pr))throw new Error(F);if(Cr&2&&!be(pr))throw new Error(L);if(!Wr(pr.subarray(0,32)))throw new Error(F);const si=o.secp256k1.Signature.fromCompact(pr).addRecoveryBit(Cr).recoverPublicKey(Ir);if(!si)throw new Error(F);return si.toRawBytes(sr(Er))}function Lr(Ir,pr,Cr,Er){if(!Dr(pr))throw new Error(D);if(!Fe(Cr))throw new Error(F);if(!ke(Ir))throw new Error(U);return o.secp256k1.verify(Cr,Ir,pr,{lowS:Er})}function Rr(Ir,pr,Cr){if(!Wr(pr))throw new Error(D);if(!Fe(Cr))throw new Error(F);if(!ke(Ir))throw new Error(U);return o.schnorr.verify(Cr,Ir,pr)}return dist$q.isPoint=Dr,dist$q.isPointCompressed=Qr,dist$q.isPrivate=Xr,dist$q.isXOnlyPoint=Wr,dist$q.pointAdd=cr,dist$q.pointAddScalar=hr,dist$q.pointCompress=br,dist$q.pointFromScalar=Gr,dist$q.pointMultiply=Ar,dist$q.privateAdd=jr,dist$q.privateNegate=Bi,dist$q.privateSub=fi,dist$q.recover=ti,dist$q.sign=$r,dist$q.signRecoverable=oi,dist$q.signSchnorr=zr,dist$q.verify=Lr,dist$q.verifySchnorr=Rr,dist$q.xOnlyPointAddTweak=Ur,dist$q.xOnlyPointFromPoint=Sr,dist$q.xOnlyPointFromScalar=Fr,dist$q}var distExports$1=requireDist$q();const ye=getDefaultExportFromCjs(distExports$1);var dist$p={},utils$i={},stringHelper={},commonjsBrowser={},v1$2={},rng$3={},hasRequiredRng$1;function requireRng$1(){if(hasRequiredRng$1)return rng$3;hasRequiredRng$1=1,Object.defineProperty(rng$3,"__esModule",{value:!0}),rng$3.default=c;let o;const g=new Uint8Array(16);function c(){if(!o&&(o=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(g)}return rng$3}var stringify$2={},validate$3={},regex$1={},hasRequiredRegex$1;function requireRegex$1(){if(hasRequiredRegex$1)return regex$1;hasRequiredRegex$1=1,Object.defineProperty(regex$1,"__esModule",{value:!0}),regex$1.default=void 0;var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return regex$1.default=o,regex$1}var hasRequiredValidate$1;function requireValidate$1(){if(hasRequiredValidate$1)return validate$3;hasRequiredValidate$1=1,Object.defineProperty(validate$3,"__esModule",{value:!0}),validate$3.default=void 0;var o=g(requireRegex$1());function g(t){return t&&t.__esModule?t:{default:t}}function c(t){return typeof t=="string"&&o.default.test(t)}var y=c;return validate$3.default=y,validate$3}var hasRequiredStringify$1;function requireStringify$1(){if(hasRequiredStringify$1)return stringify$2;hasRequiredStringify$1=1,Object.defineProperty(stringify$2,"__esModule",{value:!0}),stringify$2.default=void 0,stringify$2.unsafeStringify=y;var o=g(requireValidate$1());function g(E){return E&&E.__esModule?E:{default:E}}const c=[];for(let E=0;E<256;++E)c.push((E+256).toString(16).slice(1));function y(E,B=0){return c[E[B+0]]+c[E[B+1]]+c[E[B+2]]+c[E[B+3]]+"-"+c[E[B+4]]+c[E[B+5]]+"-"+c[E[B+6]]+c[E[B+7]]+"-"+c[E[B+8]]+c[E[B+9]]+"-"+c[E[B+10]]+c[E[B+11]]+c[E[B+12]]+c[E[B+13]]+c[E[B+14]]+c[E[B+15]]}function t(E,B=0){const D=y(E,B);if(!(0,o.default)(D))throw TypeError("Stringified UUID is invalid");return D}var d=t;return stringify$2.default=d,stringify$2}var hasRequiredV1$1;function requireV1$1(){if(hasRequiredV1$1)return v1$2;hasRequiredV1$1=1,Object.defineProperty(v1$2,"__esModule",{value:!0}),v1$2.default=void 0;var o=c(requireRng$1()),g=requireStringify$1();function c(x){return x&&x.__esModule?x:{default:x}}let y,t,d=0,E=0;function B(x,v,F){let M=v&&F||0;const U=v||new Array(16);x=x||{};let L=x.node||y,H=x.clockseq!==void 0?x.clockseq:t;if(L==null||H==null){const ze=x.random||(x.rng||o.default)();L==null&&(L=y=[ze[0]|1,ze[1],ze[2],ze[3],ze[4],ze[5]]),H==null&&(H=t=(ze[6]<<8|ze[7])&16383)}let fe=x.msecs!==void 0?x.msecs:Date.now(),ge=x.nsecs!==void 0?x.nsecs:E+1;const Ie=fe-d+(ge-E)/1e4;if(Ie<0&&x.clockseq===void 0&&(H=H+1&16383),(Ie<0||fe>d)&&x.nsecs===void 0&&(ge=0),ge>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=fe,E=ge,t=H,fe+=122192928e5;const Ee=((fe&268435455)*1e4+ge)%4294967296;U[M++]=Ee>>>24&255,U[M++]=Ee>>>16&255,U[M++]=Ee>>>8&255,U[M++]=Ee&255;const Se=fe/4294967296*1e4&268435455;U[M++]=Se>>>8&255,U[M++]=Se&255,U[M++]=Se>>>24&15|16,U[M++]=Se>>>16&255,U[M++]=H>>>8|128,U[M++]=H&255;for(let ze=0;ze<6;++ze)U[M+ze]=L[ze];return v||(0,g.unsafeStringify)(U)}var D=B;return v1$2.default=D,v1$2}var v3$2={},v35$2={},parse$2={},hasRequiredParse$2;function requireParse$2(){if(hasRequiredParse$2)return parse$2;hasRequiredParse$2=1,Object.defineProperty(parse$2,"__esModule",{value:!0}),parse$2.default=void 0;var o=g(requireValidate$1());function g(t){return t&&t.__esModule?t:{default:t}}function c(t){if(!(0,o.default)(t))throw TypeError("Invalid UUID");let d;const E=new Uint8Array(16);return E[0]=(d=parseInt(t.slice(0,8),16))>>>24,E[1]=d>>>16&255,E[2]=d>>>8&255,E[3]=d&255,E[4]=(d=parseInt(t.slice(9,13),16))>>>8,E[5]=d&255,E[6]=(d=parseInt(t.slice(14,18),16))>>>8,E[7]=d&255,E[8]=(d=parseInt(t.slice(19,23),16))>>>8,E[9]=d&255,E[10]=(d=parseInt(t.slice(24,36),16))/1099511627776&255,E[11]=d/4294967296&255,E[12]=d>>>24&255,E[13]=d>>>16&255,E[14]=d>>>8&255,E[15]=d&255,E}var y=c;return parse$2.default=y,parse$2}var hasRequiredV35$1;function requireV35$1(){if(hasRequiredV35$1)return v35$2;hasRequiredV35$1=1,Object.defineProperty(v35$2,"__esModule",{value:!0}),v35$2.URL=v35$2.DNS=void 0,v35$2.default=E;var o=requireStringify$1(),g=c(requireParse$2());function c(B){return B&&B.__esModule?B:{default:B}}function y(B){B=unescape(encodeURIComponent(B));const D=[];for(let x=0;x<B.length;++x)D.push(B.charCodeAt(x));return D}const t="6ba7b810-9dad-11d1-80b4-00c04fd430c8";v35$2.DNS=t;const d="6ba7b811-9dad-11d1-80b4-00c04fd430c8";v35$2.URL=d;function E(B,D,x){function v(F,M,U,L){var H;if(typeof F=="string"&&(F=y(F)),typeof M=="string"&&(M=(0,g.default)(M)),((H=M)===null||H===void 0?void 0:H.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let fe=new Uint8Array(16+F.length);if(fe.set(M),fe.set(F,M.length),fe=x(fe),fe[6]=fe[6]&15|D,fe[8]=fe[8]&63|128,U){L=L||0;for(let ge=0;ge<16;++ge)U[L+ge]=fe[ge];return U}return(0,o.unsafeStringify)(fe)}try{v.name=B}catch{}return v.DNS=t,v.URL=d,v}return v35$2}var md5$5={},hasRequiredMd5$3;function requireMd5$3(){if(hasRequiredMd5$3)return md5$5;hasRequiredMd5$3=1,Object.defineProperty(md5$5,"__esModule",{value:!0}),md5$5.default=void 0;function o(U){if(typeof U=="string"){const L=unescape(encodeURIComponent(U));U=new Uint8Array(L.length);for(let H=0;H<L.length;++H)U[H]=L.charCodeAt(H)}return g(y(t(U),U.length*8))}function g(U){const L=[],H=U.length*32,fe="0123456789abcdef";for(let ge=0;ge<H;ge+=8){const Ie=U[ge>>5]>>>ge%32&255,Ee=parseInt(fe.charAt(Ie>>>4&15)+fe.charAt(Ie&15),16);L.push(Ee)}return L}function c(U){return(U+64>>>9<<4)+14+1}function y(U,L){U[L>>5]|=128<<L%32,U[c(L)-1]=L;let H=1732584193,fe=-271733879,ge=-1732584194,Ie=271733878;for(let Ee=0;Ee<U.length;Ee+=16){const Se=H,ze=fe,He=ge,Ne=Ie;H=D(H,fe,ge,Ie,U[Ee],7,-680876936),Ie=D(Ie,H,fe,ge,U[Ee+1],12,-389564586),ge=D(ge,Ie,H,fe,U[Ee+2],17,606105819),fe=D(fe,ge,Ie,H,U[Ee+3],22,-1044525330),H=D(H,fe,ge,Ie,U[Ee+4],7,-176418897),Ie=D(Ie,H,fe,ge,U[Ee+5],12,1200080426),ge=D(ge,Ie,H,fe,U[Ee+6],17,-1473231341),fe=D(fe,ge,Ie,H,U[Ee+7],22,-45705983),H=D(H,fe,ge,Ie,U[Ee+8],7,1770035416),Ie=D(Ie,H,fe,ge,U[Ee+9],12,-1958414417),ge=D(ge,Ie,H,fe,U[Ee+10],17,-42063),fe=D(fe,ge,Ie,H,U[Ee+11],22,-1990404162),H=D(H,fe,ge,Ie,U[Ee+12],7,1804603682),Ie=D(Ie,H,fe,ge,U[Ee+13],12,-40341101),ge=D(ge,Ie,H,fe,U[Ee+14],17,-1502002290),fe=D(fe,ge,Ie,H,U[Ee+15],22,1236535329),H=x(H,fe,ge,Ie,U[Ee+1],5,-165796510),Ie=x(Ie,H,fe,ge,U[Ee+6],9,-1069501632),ge=x(ge,Ie,H,fe,U[Ee+11],14,643717713),fe=x(fe,ge,Ie,H,U[Ee],20,-373897302),H=x(H,fe,ge,Ie,U[Ee+5],5,-701558691),Ie=x(Ie,H,fe,ge,U[Ee+10],9,38016083),ge=x(ge,Ie,H,fe,U[Ee+15],14,-660478335),fe=x(fe,ge,Ie,H,U[Ee+4],20,-405537848),H=x(H,fe,ge,Ie,U[Ee+9],5,568446438),Ie=x(Ie,H,fe,ge,U[Ee+14],9,-1019803690),ge=x(ge,Ie,H,fe,U[Ee+3],14,-187363961),fe=x(fe,ge,Ie,H,U[Ee+8],20,1163531501),H=x(H,fe,ge,Ie,U[Ee+13],5,-1444681467),Ie=x(Ie,H,fe,ge,U[Ee+2],9,-51403784),ge=x(ge,Ie,H,fe,U[Ee+7],14,1735328473),fe=x(fe,ge,Ie,H,U[Ee+12],20,-1926607734),H=v(H,fe,ge,Ie,U[Ee+5],4,-378558),Ie=v(Ie,H,fe,ge,U[Ee+8],11,-2022574463),ge=v(ge,Ie,H,fe,U[Ee+11],16,1839030562),fe=v(fe,ge,Ie,H,U[Ee+14],23,-35309556),H=v(H,fe,ge,Ie,U[Ee+1],4,-1530992060),Ie=v(Ie,H,fe,ge,U[Ee+4],11,1272893353),ge=v(ge,Ie,H,fe,U[Ee+7],16,-155497632),fe=v(fe,ge,Ie,H,U[Ee+10],23,-1094730640),H=v(H,fe,ge,Ie,U[Ee+13],4,681279174),Ie=v(Ie,H,fe,ge,U[Ee],11,-358537222),ge=v(ge,Ie,H,fe,U[Ee+3],16,-722521979),fe=v(fe,ge,Ie,H,U[Ee+6],23,76029189),H=v(H,fe,ge,Ie,U[Ee+9],4,-640364487),Ie=v(Ie,H,fe,ge,U[Ee+12],11,-421815835),ge=v(ge,Ie,H,fe,U[Ee+15],16,530742520),fe=v(fe,ge,Ie,H,U[Ee+2],23,-995338651),H=F(H,fe,ge,Ie,U[Ee],6,-198630844),Ie=F(Ie,H,fe,ge,U[Ee+7],10,1126891415),ge=F(ge,Ie,H,fe,U[Ee+14],15,-1416354905),fe=F(fe,ge,Ie,H,U[Ee+5],21,-57434055),H=F(H,fe,ge,Ie,U[Ee+12],6,1700485571),Ie=F(Ie,H,fe,ge,U[Ee+3],10,-1894986606),ge=F(ge,Ie,H,fe,U[Ee+10],15,-1051523),fe=F(fe,ge,Ie,H,U[Ee+1],21,-2054922799),H=F(H,fe,ge,Ie,U[Ee+8],6,1873313359),Ie=F(Ie,H,fe,ge,U[Ee+15],10,-30611744),ge=F(ge,Ie,H,fe,U[Ee+6],15,-1560198380),fe=F(fe,ge,Ie,H,U[Ee+13],21,1309151649),H=F(H,fe,ge,Ie,U[Ee+4],6,-145523070),Ie=F(Ie,H,fe,ge,U[Ee+11],10,-1120210379),ge=F(ge,Ie,H,fe,U[Ee+2],15,718787259),fe=F(fe,ge,Ie,H,U[Ee+9],21,-343485551),H=d(H,Se),fe=d(fe,ze),ge=d(ge,He),Ie=d(Ie,Ne)}return[H,fe,ge,Ie]}function t(U){if(U.length===0)return[];const L=U.length*8,H=new Uint32Array(c(L));for(let fe=0;fe<L;fe+=8)H[fe>>5]|=(U[fe/8]&255)<<fe%32;return H}function d(U,L){const H=(U&65535)+(L&65535);return(U>>16)+(L>>16)+(H>>16)<<16|H&65535}function E(U,L){return U<<L|U>>>32-L}function B(U,L,H,fe,ge,Ie){return d(E(d(d(L,U),d(fe,Ie)),ge),H)}function D(U,L,H,fe,ge,Ie,Ee){return B(L&H|~L&fe,U,L,ge,Ie,Ee)}function x(U,L,H,fe,ge,Ie,Ee){return B(L&fe|H&~fe,U,L,ge,Ie,Ee)}function v(U,L,H,fe,ge,Ie,Ee){return B(L^H^fe,U,L,ge,Ie,Ee)}function F(U,L,H,fe,ge,Ie,Ee){return B(H^(L|~fe),U,L,ge,Ie,Ee)}var M=o;return md5$5.default=M,md5$5}var hasRequiredV3$1;function requireV3$1(){if(hasRequiredV3$1)return v3$2;hasRequiredV3$1=1,Object.defineProperty(v3$2,"__esModule",{value:!0}),v3$2.default=void 0;var o=c(requireV35$1()),g=c(requireMd5$3());function c(d){return d&&d.__esModule?d:{default:d}}var t=(0,o.default)("v3",48,g.default);return v3$2.default=t,v3$2}var v4$3={},native$3={},hasRequiredNative$2;function requireNative$2(){if(hasRequiredNative$2)return native$3;hasRequiredNative$2=1,Object.defineProperty(native$3,"__esModule",{value:!0}),native$3.default=void 0;var g={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return native$3.default=g,native$3}var hasRequiredV4$1;function requireV4$1(){if(hasRequiredV4$1)return v4$3;hasRequiredV4$1=1,Object.defineProperty(v4$3,"__esModule",{value:!0}),v4$3.default=void 0;var o=y(requireNative$2()),g=y(requireRng$1()),c=requireStringify$1();function y(E){return E&&E.__esModule?E:{default:E}}function t(E,B,D){if(o.default.randomUUID&&!B&&!E)return o.default.randomUUID();E=E||{};const x=E.random||(E.rng||g.default)();if(x[6]=x[6]&15|64,x[8]=x[8]&63|128,B){D=D||0;for(let v=0;v<16;++v)B[D+v]=x[v];return B}return(0,c.unsafeStringify)(x)}var d=t;return v4$3.default=d,v4$3}var v5$2={},sha1$5={},hasRequiredSha1$3;function requireSha1$3(){if(hasRequiredSha1$3)return sha1$5;hasRequiredSha1$3=1,Object.defineProperty(sha1$5,"__esModule",{value:!0}),sha1$5.default=void 0;function o(t,d,E,B){switch(t){case 0:return d&E^~d&B;case 1:return d^E^B;case 2:return d&E^d&B^E&B;case 3:return d^E^B}}function g(t,d){return t<<d|t>>>32-d}function c(t){const d=[1518500249,1859775393,2400959708,3395469782],E=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const v=unescape(encodeURIComponent(t));t=[];for(let F=0;F<v.length;++F)t.push(v.charCodeAt(F))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const B=t.length/4+2,D=Math.ceil(B/16),x=new Array(D);for(let v=0;v<D;++v){const F=new Uint32Array(16);for(let M=0;M<16;++M)F[M]=t[v*64+M*4]<<24|t[v*64+M*4+1]<<16|t[v*64+M*4+2]<<8|t[v*64+M*4+3];x[v]=F}x[D-1][14]=(t.length-1)*8/Math.pow(2,32),x[D-1][14]=Math.floor(x[D-1][14]),x[D-1][15]=(t.length-1)*8&4294967295;for(let v=0;v<D;++v){const F=new Uint32Array(80);for(let ge=0;ge<16;++ge)F[ge]=x[v][ge];for(let ge=16;ge<80;++ge)F[ge]=g(F[ge-3]^F[ge-8]^F[ge-14]^F[ge-16],1);let M=E[0],U=E[1],L=E[2],H=E[3],fe=E[4];for(let ge=0;ge<80;++ge){const Ie=Math.floor(ge/20),Ee=g(M,5)+o(Ie,U,L,H)+fe+d[Ie]+F[ge]>>>0;fe=H,H=L,L=g(U,30)>>>0,U=M,M=Ee}E[0]=E[0]+M>>>0,E[1]=E[1]+U>>>0,E[2]=E[2]+L>>>0,E[3]=E[3]+H>>>0,E[4]=E[4]+fe>>>0}return[E[0]>>24&255,E[0]>>16&255,E[0]>>8&255,E[0]&255,E[1]>>24&255,E[1]>>16&255,E[1]>>8&255,E[1]&255,E[2]>>24&255,E[2]>>16&255,E[2]>>8&255,E[2]&255,E[3]>>24&255,E[3]>>16&255,E[3]>>8&255,E[3]&255,E[4]>>24&255,E[4]>>16&255,E[4]>>8&255,E[4]&255]}var y=c;return sha1$5.default=y,sha1$5}var hasRequiredV5$1;function requireV5$1(){if(hasRequiredV5$1)return v5$2;hasRequiredV5$1=1,Object.defineProperty(v5$2,"__esModule",{value:!0}),v5$2.default=void 0;var o=c(requireV35$1()),g=c(requireSha1$3());function c(d){return d&&d.__esModule?d:{default:d}}var t=(0,o.default)("v5",80,g.default);return v5$2.default=t,v5$2}var nil$2={},hasRequiredNil$1;function requireNil$1(){if(hasRequiredNil$1)return nil$2;hasRequiredNil$1=1,Object.defineProperty(nil$2,"__esModule",{value:!0}),nil$2.default=void 0;var o="00000000-0000-0000-0000-000000000000";return nil$2.default=o,nil$2}var version$4={},hasRequiredVersion$2;function requireVersion$2(){if(hasRequiredVersion$2)return version$4;hasRequiredVersion$2=1,Object.defineProperty(version$4,"__esModule",{value:!0}),version$4.default=void 0;var o=g(requireValidate$1());function g(t){return t&&t.__esModule?t:{default:t}}function c(t){if(!(0,o.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}var y=c;return version$4.default=y,version$4}var hasRequiredCommonjsBrowser;function requireCommonjsBrowser(){return hasRequiredCommonjsBrowser||(hasRequiredCommonjsBrowser=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"NIL",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(o,"parse",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(o,"v1",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(o,"v3",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(o,"v4",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(o,"v5",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(o,"validate",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(o,"version",{enumerable:!0,get:function(){return E.default}});var g=v(requireV1$1()),c=v(requireV3$1()),y=v(requireV4$1()),t=v(requireV5$1()),d=v(requireNil$1()),E=v(requireVersion$2()),B=v(requireValidate$1()),D=v(requireStringify$1()),x=v(requireParse$2());function v(F){return F&&F.__esModule?F:{default:F}}}(commonjsBrowser)),commonjsBrowser}var buffer$2={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=B,base64Js.toByteArray=x,base64Js.fromByteArray=M;for(var o=[],g=[],c=typeof Uint8Array<"u"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,d=y.length;t<d;++t)o[t]=y[t],g[y.charCodeAt(t)]=t;g[45]=62,g[95]=63;function E(U){var L=U.length;if(L%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var H=U.indexOf("=");H===-1&&(H=L);var fe=H===L?0:4-H%4;return[H,fe]}function B(U){var L=E(U),H=L[0],fe=L[1];return(H+fe)*3/4-fe}function D(U,L,H){return(L+H)*3/4-H}function x(U){var L,H=E(U),fe=H[0],ge=H[1],Ie=new c(D(U,fe,ge)),Ee=0,Se=ge>0?fe-4:fe,ze;for(ze=0;ze<Se;ze+=4)L=g[U.charCodeAt(ze)]<<18|g[U.charCodeAt(ze+1)]<<12|g[U.charCodeAt(ze+2)]<<6|g[U.charCodeAt(ze+3)],Ie[Ee++]=L>>16&255,Ie[Ee++]=L>>8&255,Ie[Ee++]=L&255;return ge===2&&(L=g[U.charCodeAt(ze)]<<2|g[U.charCodeAt(ze+1)]>>4,Ie[Ee++]=L&255),ge===1&&(L=g[U.charCodeAt(ze)]<<10|g[U.charCodeAt(ze+1)]<<4|g[U.charCodeAt(ze+2)]>>2,Ie[Ee++]=L>>8&255,Ie[Ee++]=L&255),Ie}function v(U){return o[U>>18&63]+o[U>>12&63]+o[U>>6&63]+o[U&63]}function F(U,L,H){for(var fe,ge=[],Ie=L;Ie<H;Ie+=3)fe=(U[Ie]<<16&16711680)+(U[Ie+1]<<8&65280)+(U[Ie+2]&255),ge.push(v(fe));return ge.join("")}function M(U){for(var L,H=U.length,fe=H%3,ge=[],Ie=16383,Ee=0,Se=H-fe;Ee<Se;Ee+=Ie)ge.push(F(U,Ee,Ee+Ie>Se?Se:Ee+Ie));return fe===1?(L=U[H-1],ge.push(o[L>>2]+o[L<<4&63]+"==")):fe===2&&(L=(U[H-2]<<8)+U[H-1],ge.push(o[L>>10]+o[L>>4&63]+o[L<<2&63]+"=")),ge.join("")}return base64Js}var ieee754={};var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function(o,g,c,y,t){var d,E,B=t*8-y-1,D=(1<<B)-1,x=D>>1,v=-7,F=c?t-1:0,M=c?-1:1,U=o[g+F];for(F+=M,d=U&(1<<-v)-1,U>>=-v,v+=B;v>0;d=d*256+o[g+F],F+=M,v-=8);for(E=d&(1<<-v)-1,d>>=-v,v+=y;v>0;E=E*256+o[g+F],F+=M,v-=8);if(d===0)d=1-x;else{if(d===D)return E?NaN:(U?-1:1)*(1/0);E=E+Math.pow(2,y),d=d-x}return(U?-1:1)*E*Math.pow(2,d-y)},ieee754.write=function(o,g,c,y,t,d){var E,B,D,x=d*8-t-1,v=(1<<x)-1,F=v>>1,M=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=y?0:d-1,L=y?1:-1,H=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(B=isNaN(g)?1:0,E=v):(E=Math.floor(Math.log(g)/Math.LN2),g*(D=Math.pow(2,-E))<1&&(E--,D*=2),E+F>=1?g+=M/D:g+=M*Math.pow(2,1-F),g*D>=2&&(E++,D/=2),E+F>=v?(B=0,E=v):E+F>=1?(B=(g*D-1)*Math.pow(2,t),E=E+F):(B=g*Math.pow(2,F-1)*Math.pow(2,t),E=0));t>=8;o[c+U]=B&255,U+=L,B/=256,t-=8);for(E=E<<t|B,x+=t;x>0;o[c+U]=E&255,U+=L,E/=256,x-=8);o[c+U-L]|=H*128}),ieee754}var hasRequiredBuffer$2;function requireBuffer$2(){return hasRequiredBuffer$2||(hasRequiredBuffer$2=1,function(o){const g=requireBase64Js(),c=requireIeee754(),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=B,o.SlowBuffer=Ie,o.INSPECT_MAX_BYTES=50;const t=2147483647;o.kMaxLength=t,B.TYPED_ARRAY_SUPPORT=d(),!B.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function d(){try{const Rr=new Uint8Array(1),Ir={foo:function(){return 42}};return Object.setPrototypeOf(Ir,Uint8Array.prototype),Object.setPrototypeOf(Rr,Ir),Rr.foo()===42}catch{return!1}}Object.defineProperty(B.prototype,"parent",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.buffer}}),Object.defineProperty(B.prototype,"offset",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.byteOffset}});function E(Rr){if(Rr>t)throw new RangeError('The value "'+Rr+'" is invalid for option "size"');const Ir=new Uint8Array(Rr);return Object.setPrototypeOf(Ir,B.prototype),Ir}function B(Rr,Ir,pr){if(typeof Rr=="number"){if(typeof Ir=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(Rr)}return D(Rr,Ir,pr)}B.poolSize=8192;function D(Rr,Ir,pr){if(typeof Rr=="string")return M(Rr,Ir);if(ArrayBuffer.isView(Rr))return L(Rr);if(Rr==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rr);if($r(Rr,ArrayBuffer)||Rr&&$r(Rr.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($r(Rr,SharedArrayBuffer)||Rr&&$r(Rr.buffer,SharedArrayBuffer)))return H(Rr,Ir,pr);if(typeof Rr=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Cr=Rr.valueOf&&Rr.valueOf();if(Cr!=null&&Cr!==Rr)return B.from(Cr,Ir,pr);const Er=fe(Rr);if(Er)return Er;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Rr[Symbol.toPrimitive]=="function")return B.from(Rr[Symbol.toPrimitive]("string"),Ir,pr);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rr)}B.from=function(Rr,Ir,pr){return D(Rr,Ir,pr)},Object.setPrototypeOf(B.prototype,Uint8Array.prototype),Object.setPrototypeOf(B,Uint8Array);function x(Rr){if(typeof Rr!="number")throw new TypeError('"size" argument must be of type number');if(Rr<0)throw new RangeError('The value "'+Rr+'" is invalid for option "size"')}function v(Rr,Ir,pr){return x(Rr),Rr<=0?E(Rr):Ir!==void 0?typeof pr=="string"?E(Rr).fill(Ir,pr):E(Rr).fill(Ir):E(Rr)}B.alloc=function(Rr,Ir,pr){return v(Rr,Ir,pr)};function F(Rr){return x(Rr),E(Rr<0?0:ge(Rr)|0)}B.allocUnsafe=function(Rr){return F(Rr)},B.allocUnsafeSlow=function(Rr){return F(Rr)};function M(Rr,Ir){if((typeof Ir!="string"||Ir==="")&&(Ir="utf8"),!B.isEncoding(Ir))throw new TypeError("Unknown encoding: "+Ir);const pr=Ee(Rr,Ir)|0;let Cr=E(pr);const Er=Cr.write(Rr,Ir);return Er!==pr&&(Cr=Cr.slice(0,Er)),Cr}function U(Rr){const Ir=Rr.length<0?0:ge(Rr.length)|0,pr=E(Ir);for(let Cr=0;Cr<Ir;Cr+=1)pr[Cr]=Rr[Cr]&255;return pr}function L(Rr){if($r(Rr,Uint8Array)){const Ir=new Uint8Array(Rr);return H(Ir.buffer,Ir.byteOffset,Ir.byteLength)}return U(Rr)}function H(Rr,Ir,pr){if(Ir<0||Rr.byteLength<Ir)throw new RangeError('"offset" is outside of buffer bounds');if(Rr.byteLength<Ir+(pr||0))throw new RangeError('"length" is outside of buffer bounds');let Cr;return Ir===void 0&&pr===void 0?Cr=new Uint8Array(Rr):pr===void 0?Cr=new Uint8Array(Rr,Ir):Cr=new Uint8Array(Rr,Ir,pr),Object.setPrototypeOf(Cr,B.prototype),Cr}function fe(Rr){if(B.isBuffer(Rr)){const Ir=ge(Rr.length)|0,pr=E(Ir);return pr.length===0||Rr.copy(pr,0,0,Ir),pr}if(Rr.length!==void 0)return typeof Rr.length!="number"||oi(Rr.length)?E(0):U(Rr);if(Rr.type==="Buffer"&&Array.isArray(Rr.data))return U(Rr.data)}function ge(Rr){if(Rr>=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return Rr|0}function Ie(Rr){return+Rr!=Rr&&(Rr=0),B.alloc(+Rr)}B.isBuffer=function(Ir){return Ir!=null&&Ir._isBuffer===!0&&Ir!==B.prototype},B.compare=function(Ir,pr){if($r(Ir,Uint8Array)&&(Ir=B.from(Ir,Ir.offset,Ir.byteLength)),$r(pr,Uint8Array)&&(pr=B.from(pr,pr.offset,pr.byteLength)),!B.isBuffer(Ir)||!B.isBuffer(pr))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ir===pr)return 0;let Cr=Ir.length,Er=pr.length;for(let xr=0,si=Math.min(Cr,Er);xr<si;++xr)if(Ir[xr]!==pr[xr]){Cr=Ir[xr],Er=pr[xr];break}return Cr<Er?-1:Er<Cr?1:0},B.isEncoding=function(Ir){switch(String(Ir).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}},B.concat=function(Ir,pr){if(!Array.isArray(Ir))throw new TypeError('"list" argument must be an Array of Buffers');if(Ir.length===0)return B.alloc(0);let Cr;if(pr===void 0)for(pr=0,Cr=0;Cr<Ir.length;++Cr)pr+=Ir[Cr].length;const Er=B.allocUnsafe(pr);let xr=0;for(Cr=0;Cr<Ir.length;++Cr){let si=Ir[Cr];if($r(si,Uint8Array))xr+si.length>Er.length?(B.isBuffer(si)||(si=B.from(si)),si.copy(Er,xr)):Uint8Array.prototype.set.call(Er,si,xr);else if(B.isBuffer(si))si.copy(Er,xr);else throw new TypeError('"list" argument must be an Array of Buffers');xr+=si.length}return Er};function Ee(Rr,Ir){if(B.isBuffer(Rr))return Rr.length;if(ArrayBuffer.isView(Rr)||$r(Rr,ArrayBuffer))return Rr.byteLength;if(typeof Rr!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Rr);const pr=Rr.length,Cr=arguments.length>2&&arguments[2]===!0;if(!Cr&&pr===0)return 0;let Er=!1;for(;;)switch(Ir){case"ascii":case"latin1":case"binary":return pr;case"utf8":case"utf-8":return cr(Rr).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pr*2;case"hex":return pr>>>1;case"base64":return fi(Rr).length;default:if(Er)return Cr?-1:cr(Rr).length;Ir=(""+Ir).toLowerCase(),Er=!0}}B.byteLength=Ee;function Se(Rr,Ir,pr){let Cr=!1;if((Ir===void 0||Ir<0)&&(Ir=0),Ir>this.length||((pr===void 0||pr>this.length)&&(pr=this.length),pr<=0)||(pr>>>=0,Ir>>>=0,pr<=Ir))return"";for(Rr||(Rr="utf8");;)switch(Rr){case"hex":return er(this,Ir,pr);case"utf8":case"utf-8":return xe(this,Ir,pr);case"ascii":return st(this,Ir,pr);case"latin1":case"binary":return Dt(this,Ir,pr);case"base64":return ke(this,Ir,pr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,Ir,pr);default:if(Cr)throw new TypeError("Unknown encoding: "+Rr);Rr=(Rr+"").toLowerCase(),Cr=!0}}B.prototype._isBuffer=!0;function ze(Rr,Ir,pr){const Cr=Rr[Ir];Rr[Ir]=Rr[pr],Rr[pr]=Cr}B.prototype.swap16=function(){const Ir=this.length;if(Ir%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let pr=0;pr<Ir;pr+=2)ze(this,pr,pr+1);return this},B.prototype.swap32=function(){const Ir=this.length;if(Ir%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let pr=0;pr<Ir;pr+=4)ze(this,pr,pr+3),ze(this,pr+1,pr+2);return this},B.prototype.swap64=function(){const Ir=this.length;if(Ir%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let pr=0;pr<Ir;pr+=8)ze(this,pr,pr+7),ze(this,pr+1,pr+6),ze(this,pr+2,pr+5),ze(this,pr+3,pr+4);return this},B.prototype.toString=function(){const Ir=this.length;return Ir===0?"":arguments.length===0?xe(this,0,Ir):Se.apply(this,arguments)},B.prototype.toLocaleString=B.prototype.toString,B.prototype.equals=function(Ir){if(!B.isBuffer(Ir))throw new TypeError("Argument must be a Buffer");return this===Ir?!0:B.compare(this,Ir)===0},B.prototype.inspect=function(){let Ir="";const pr=o.INSPECT_MAX_BYTES;return Ir=this.toString("hex",0,pr).replace(/(.{2})/g,"$1 ").trim(),this.length>pr&&(Ir+=" ... "),"<Buffer "+Ir+">"},y&&(B.prototype[y]=B.prototype.inspect),B.prototype.compare=function(Ir,pr,Cr,Er,xr){if($r(Ir,Uint8Array)&&(Ir=B.from(Ir,Ir.offset,Ir.byteLength)),!B.isBuffer(Ir))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ir);if(pr===void 0&&(pr=0),Cr===void 0&&(Cr=Ir?Ir.length:0),Er===void 0&&(Er=0),xr===void 0&&(xr=this.length),pr<0||Cr>Ir.length||Er<0||xr>this.length)throw new RangeError("out of range index");if(Er>=xr&&pr>=Cr)return 0;if(Er>=xr)return-1;if(pr>=Cr)return 1;if(pr>>>=0,Cr>>>=0,Er>>>=0,xr>>>=0,this===Ir)return 0;let si=xr-Er,Ci=Cr-pr;const bi=Math.min(si,Ci),Ri=this.slice(Er,xr),li=Ir.slice(pr,Cr);for(let zi=0;zi<bi;++zi)if(Ri[zi]!==li[zi]){si=Ri[zi],Ci=li[zi];break}return si<Ci?-1:Ci<si?1:0};function He(Rr,Ir,pr,Cr,Er){if(Rr.length===0)return-1;if(typeof pr=="string"?(Cr=pr,pr=0):pr>2147483647?pr=2147483647:pr<-2147483648&&(pr=-2147483648),pr=+pr,oi(pr)&&(pr=Er?0:Rr.length-1),pr<0&&(pr=Rr.length+pr),pr>=Rr.length){if(Er)return-1;pr=Rr.length-1}else if(pr<0)if(Er)pr=0;else return-1;if(typeof Ir=="string"&&(Ir=B.from(Ir,Cr)),B.isBuffer(Ir))return Ir.length===0?-1:Ne(Rr,Ir,pr,Cr,Er);if(typeof Ir=="number")return Ir=Ir&255,typeof Uint8Array.prototype.indexOf=="function"?Er?Uint8Array.prototype.indexOf.call(Rr,Ir,pr):Uint8Array.prototype.lastIndexOf.call(Rr,Ir,pr):Ne(Rr,[Ir],pr,Cr,Er);throw new TypeError("val must be string, number or Buffer")}function Ne(Rr,Ir,pr,Cr,Er){let xr=1,si=Rr.length,Ci=Ir.length;if(Cr!==void 0&&(Cr=String(Cr).toLowerCase(),Cr==="ucs2"||Cr==="ucs-2"||Cr==="utf16le"||Cr==="utf-16le")){if(Rr.length<2||Ir.length<2)return-1;xr=2,si/=2,Ci/=2,pr/=2}function bi(li,zi){return xr===1?li[zi]:li.readUInt16BE(zi*xr)}let Ri;if(Er){let li=-1;for(Ri=pr;Ri<si;Ri++)if(bi(Rr,Ri)===bi(Ir,li===-1?0:Ri-li)){if(li===-1&&(li=Ri),Ri-li+1===Ci)return li*xr}else li!==-1&&(Ri-=Ri-li),li=-1}else for(pr+Ci>si&&(pr=si-Ci),Ri=pr;Ri>=0;Ri--){let li=!0;for(let zi=0;zi<Ci;zi++)if(bi(Rr,Ri+zi)!==bi(Ir,zi)){li=!1;break}if(li)return Ri}return-1}B.prototype.includes=function(Ir,pr,Cr){return this.indexOf(Ir,pr,Cr)!==-1},B.prototype.indexOf=function(Ir,pr,Cr){return He(this,Ir,pr,Cr,!0)},B.prototype.lastIndexOf=function(Ir,pr,Cr){return He(this,Ir,pr,Cr,!1)};function Pe(Rr,Ir,pr,Cr){pr=Number(pr)||0;const Er=Rr.length-pr;Cr?(Cr=Number(Cr),Cr>Er&&(Cr=Er)):Cr=Er;const xr=Ir.length;Cr>xr/2&&(Cr=xr/2);let si;for(si=0;si<Cr;++si){const Ci=parseInt(Ir.substr(si*2,2),16);if(oi(Ci))return si;Rr[pr+si]=Ci}return si}function ve(Rr,Ir,pr,Cr){return Bi(cr(Ir,Rr.length-pr),Rr,pr,Cr)}function Fe(Rr,Ir,pr,Cr){return Bi(hr(Ir),Rr,pr,Cr)}function be(Rr,Ir,pr,Cr){return Bi(fi(Ir),Rr,pr,Cr)}function Be(Rr,Ir,pr,Cr){return Bi(jr(Ir,Rr.length-pr),Rr,pr,Cr)}B.prototype.write=function(Ir,pr,Cr,Er){if(pr===void 0)Er="utf8",Cr=this.length,pr=0;else if(Cr===void 0&&typeof pr=="string")Er=pr,Cr=this.length,pr=0;else if(isFinite(pr))pr=pr>>>0,isFinite(Cr)?(Cr=Cr>>>0,Er===void 0&&(Er="utf8")):(Er=Cr,Cr=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const xr=this.length-pr;if((Cr===void 0||Cr>xr)&&(Cr=xr),Ir.length>0&&(Cr<0||pr<0)||pr>this.length)throw new RangeError("Attempt to write outside buffer bounds");Er||(Er="utf8");let si=!1;for(;;)switch(Er){case"hex":return Pe(this,Ir,pr,Cr);case"utf8":case"utf-8":return ve(this,Ir,pr,Cr);case"ascii":case"latin1":case"binary":return Fe(this,Ir,pr,Cr);case"base64":return be(this,Ir,pr,Cr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Be(this,Ir,pr,Cr);default:if(si)throw new TypeError("Unknown encoding: "+Er);Er=(""+Er).toLowerCase(),si=!0}},B.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ke(Rr,Ir,pr){return Ir===0&&pr===Rr.length?g.fromByteArray(Rr):g.fromByteArray(Rr.slice(Ir,pr))}function xe(Rr,Ir,pr){pr=Math.min(Rr.length,pr);const Cr=[];let Er=Ir;for(;Er<pr;){const xr=Rr[Er];let si=null,Ci=xr>239?4:xr>223?3:xr>191?2:1;if(Er+Ci<=pr){let bi,Ri,li,zi;switch(Ci){case 1:xr<128&&(si=xr);break;case 2:bi=Rr[Er+1],(bi&192)===128&&(zi=(xr&31)<<6|bi&63,zi>127&&(si=zi));break;case 3:bi=Rr[Er+1],Ri=Rr[Er+2],(bi&192)===128&&(Ri&192)===128&&(zi=(xr&15)<<12|(bi&63)<<6|Ri&63,zi>2047&&(zi<55296||zi>57343)&&(si=zi));break;case 4:bi=Rr[Er+1],Ri=Rr[Er+2],li=Rr[Er+3],(bi&192)===128&&(Ri&192)===128&&(li&192)===128&&(zi=(xr&15)<<18|(bi&63)<<12|(Ri&63)<<6|li&63,zi>65535&&zi<1114112&&(si=zi))}}si===null?(si=65533,Ci=1):si>65535&&(si-=65536,Cr.push(si>>>10&1023|55296),si=56320|si&1023),Cr.push(si),Er+=Ci}return Et(Cr)}const De=4096;function Et(Rr){const Ir=Rr.length;if(Ir<=De)return String.fromCharCode.apply(String,Rr);let pr="",Cr=0;for(;Cr<Ir;)pr+=String.fromCharCode.apply(String,Rr.slice(Cr,Cr+=De));return pr}function st(Rr,Ir,pr){let Cr="";pr=Math.min(Rr.length,pr);for(let Er=Ir;Er<pr;++Er)Cr+=String.fromCharCode(Rr[Er]&127);return Cr}function Dt(Rr,Ir,pr){let Cr="";pr=Math.min(Rr.length,pr);for(let Er=Ir;Er<pr;++Er)Cr+=String.fromCharCode(Rr[Er]);return Cr}function er(Rr,Ir,pr){const Cr=Rr.length;(!Ir||Ir<0)&&(Ir=0),(!pr||pr<0||pr>Cr)&&(pr=Cr);let Er="";for(let xr=Ir;xr<pr;++xr)Er+=zr[Rr[xr]];return Er}function xt(Rr,Ir,pr){const Cr=Rr.slice(Ir,pr);let Er="";for(let xr=0;xr<Cr.length-1;xr+=2)Er+=String.fromCharCode(Cr[xr]+Cr[xr+1]*256);return Er}B.prototype.slice=function(Ir,pr){const Cr=this.length;Ir=~~Ir,pr=pr===void 0?Cr:~~pr,Ir<0?(Ir+=Cr,Ir<0&&(Ir=0)):Ir>Cr&&(Ir=Cr),pr<0?(pr+=Cr,pr<0&&(pr=0)):pr>Cr&&(pr=Cr),pr<Ir&&(pr=Ir);const Er=this.subarray(Ir,pr);return Object.setPrototypeOf(Er,B.prototype),Er};function ir(Rr,Ir,pr){if(Rr%1!==0||Rr<0)throw new RangeError("offset is not uint");if(Rr+Ir>pr)throw new RangeError("Trying to access beyond buffer length")}B.prototype.readUintLE=B.prototype.readUIntLE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=this[Ir],xr=1,si=0;for(;++si<pr&&(xr*=256);)Er+=this[Ir+si]*xr;return Er},B.prototype.readUintBE=B.prototype.readUIntBE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=this[Ir+--pr],xr=1;for(;pr>0&&(xr*=256);)Er+=this[Ir+--pr]*xr;return Er},B.prototype.readUint8=B.prototype.readUInt8=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,1,this.length),this[Ir]},B.prototype.readUint16LE=B.prototype.readUInt16LE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,2,this.length),this[Ir]|this[Ir+1]<<8},B.prototype.readUint16BE=B.prototype.readUInt16BE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,2,this.length),this[Ir]<<8|this[Ir+1]},B.prototype.readUint32LE=B.prototype.readUInt32LE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),(this[Ir]|this[Ir+1]<<8|this[Ir+2]<<16)+this[Ir+3]*16777216},B.prototype.readUint32BE=B.prototype.readUInt32BE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),this[Ir]*16777216+(this[Ir+1]<<16|this[Ir+2]<<8|this[Ir+3])},B.prototype.readBigUInt64LE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=pr+this[++Ir]*2**8+this[++Ir]*2**16+this[++Ir]*2**24,xr=this[++Ir]+this[++Ir]*2**8+this[++Ir]*2**16+Cr*2**24;return BigInt(Er)+(BigInt(xr)<<BigInt(32))}),B.prototype.readBigUInt64BE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=pr*2**24+this[++Ir]*2**16+this[++Ir]*2**8+this[++Ir],xr=this[++Ir]*2**24+this[++Ir]*2**16+this[++Ir]*2**8+Cr;return(BigInt(Er)<<BigInt(32))+BigInt(xr)}),B.prototype.readIntLE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=this[Ir],xr=1,si=0;for(;++si<pr&&(xr*=256);)Er+=this[Ir+si]*xr;return xr*=128,Er>=xr&&(Er-=Math.pow(2,8*pr)),Er},B.prototype.readIntBE=function(Ir,pr,Cr){Ir=Ir>>>0,pr=pr>>>0,Cr||ir(Ir,pr,this.length);let Er=pr,xr=1,si=this[Ir+--Er];for(;Er>0&&(xr*=256);)si+=this[Ir+--Er]*xr;return xr*=128,si>=xr&&(si-=Math.pow(2,8*pr)),si},B.prototype.readInt8=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,1,this.length),this[Ir]&128?(255-this[Ir]+1)*-1:this[Ir]},B.prototype.readInt16LE=function(Ir,pr){Ir=Ir>>>0,pr||ir(Ir,2,this.length);const Cr=this[Ir]|this[Ir+1]<<8;return Cr&32768?Cr|4294901760:Cr},B.prototype.readInt16BE=function(Ir,pr){Ir=Ir>>>0,pr||ir(Ir,2,this.length);const Cr=this[Ir+1]|this[Ir]<<8;return Cr&32768?Cr|4294901760:Cr},B.prototype.readInt32LE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),this[Ir]|this[Ir+1]<<8|this[Ir+2]<<16|this[Ir+3]<<24},B.prototype.readInt32BE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),this[Ir]<<24|this[Ir+1]<<16|this[Ir+2]<<8|this[Ir+3]},B.prototype.readBigInt64LE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=this[Ir+4]+this[Ir+5]*2**8+this[Ir+6]*2**16+(Cr<<24);return(BigInt(Er)<<BigInt(32))+BigInt(pr+this[++Ir]*2**8+this[++Ir]*2**16+this[++Ir]*2**24)}),B.prototype.readBigInt64BE=ti(function(Ir){Ir=Ir>>>0,Gr(Ir,"offset");const pr=this[Ir],Cr=this[Ir+7];(pr===void 0||Cr===void 0)&&Fr(Ir,this.length-8);const Er=(pr<<24)+this[++Ir]*2**16+this[++Ir]*2**8+this[++Ir];return(BigInt(Er)<<BigInt(32))+BigInt(this[++Ir]*2**24+this[++Ir]*2**16+this[++Ir]*2**8+Cr)}),B.prototype.readFloatLE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),c.read(this,Ir,!0,23,4)},B.prototype.readFloatBE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,4,this.length),c.read(this,Ir,!1,23,4)},B.prototype.readDoubleLE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,8,this.length),c.read(this,Ir,!0,52,8)},B.prototype.readDoubleBE=function(Ir,pr){return Ir=Ir>>>0,pr||ir(Ir,8,this.length),c.read(this,Ir,!1,52,8)};function sr(Rr,Ir,pr,Cr,Er,xr){if(!B.isBuffer(Rr))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ir>Er||Ir<xr)throw new RangeError('"value" argument is out of bounds');if(pr+Cr>Rr.length)throw new RangeError("Index out of range")}B.prototype.writeUintLE=B.prototype.writeUIntLE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,Cr=Cr>>>0,!Er){const Ci=Math.pow(2,8*Cr)-1;sr(this,Ir,pr,Cr,Ci,0)}let xr=1,si=0;for(this[pr]=Ir&255;++si<Cr&&(xr*=256);)this[pr+si]=Ir/xr&255;return pr+Cr},B.prototype.writeUintBE=B.prototype.writeUIntBE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,Cr=Cr>>>0,!Er){const Ci=Math.pow(2,8*Cr)-1;sr(this,Ir,pr,Cr,Ci,0)}let xr=Cr-1,si=1;for(this[pr+xr]=Ir&255;--xr>=0&&(si*=256);)this[pr+xr]=Ir/si&255;return pr+Cr},B.prototype.writeUint8=B.prototype.writeUInt8=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,1,255,0),this[pr]=Ir&255,pr+1},B.prototype.writeUint16LE=B.prototype.writeUInt16LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,65535,0),this[pr]=Ir&255,this[pr+1]=Ir>>>8,pr+2},B.prototype.writeUint16BE=B.prototype.writeUInt16BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,65535,0),this[pr]=Ir>>>8,this[pr+1]=Ir&255,pr+2},B.prototype.writeUint32LE=B.prototype.writeUInt32LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,4294967295,0),this[pr+3]=Ir>>>24,this[pr+2]=Ir>>>16,this[pr+1]=Ir>>>8,this[pr]=Ir&255,pr+4},B.prototype.writeUint32BE=B.prototype.writeUInt32BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,4294967295,0),this[pr]=Ir>>>24,this[pr+1]=Ir>>>16,this[pr+2]=Ir>>>8,this[pr+3]=Ir&255,pr+4};function yr(Rr,Ir,pr,Cr,Er){Sr(Ir,Cr,Er,Rr,pr,7);let xr=Number(Ir&BigInt(4294967295));Rr[pr++]=xr,xr=xr>>8,Rr[pr++]=xr,xr=xr>>8,Rr[pr++]=xr,xr=xr>>8,Rr[pr++]=xr;let si=Number(Ir>>BigInt(32)&BigInt(4294967295));return Rr[pr++]=si,si=si>>8,Rr[pr++]=si,si=si>>8,Rr[pr++]=si,si=si>>8,Rr[pr++]=si,pr}function wr(Rr,Ir,pr,Cr,Er){Sr(Ir,Cr,Er,Rr,pr,7);let xr=Number(Ir&BigInt(4294967295));Rr[pr+7]=xr,xr=xr>>8,Rr[pr+6]=xr,xr=xr>>8,Rr[pr+5]=xr,xr=xr>>8,Rr[pr+4]=xr;let si=Number(Ir>>BigInt(32)&BigInt(4294967295));return Rr[pr+3]=si,si=si>>8,Rr[pr+2]=si,si=si>>8,Rr[pr+1]=si,si=si>>8,Rr[pr]=si,pr+8}B.prototype.writeBigUInt64LE=ti(function(Ir,pr=0){return yr(this,Ir,pr,BigInt(0),BigInt("0xffffffffffffffff"))}),B.prototype.writeBigUInt64BE=ti(function(Ir,pr=0){return wr(this,Ir,pr,BigInt(0),BigInt("0xffffffffffffffff"))}),B.prototype.writeIntLE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,!Er){const bi=Math.pow(2,8*Cr-1);sr(this,Ir,pr,Cr,bi-1,-bi)}let xr=0,si=1,Ci=0;for(this[pr]=Ir&255;++xr<Cr&&(si*=256);)Ir<0&&Ci===0&&this[pr+xr-1]!==0&&(Ci=1),this[pr+xr]=(Ir/si>>0)-Ci&255;return pr+Cr},B.prototype.writeIntBE=function(Ir,pr,Cr,Er){if(Ir=+Ir,pr=pr>>>0,!Er){const bi=Math.pow(2,8*Cr-1);sr(this,Ir,pr,Cr,bi-1,-bi)}let xr=Cr-1,si=1,Ci=0;for(this[pr+xr]=Ir&255;--xr>=0&&(si*=256);)Ir<0&&Ci===0&&this[pr+xr+1]!==0&&(Ci=1),this[pr+xr]=(Ir/si>>0)-Ci&255;return pr+Cr},B.prototype.writeInt8=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,1,127,-128),Ir<0&&(Ir=255+Ir+1),this[pr]=Ir&255,pr+1},B.prototype.writeInt16LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,32767,-32768),this[pr]=Ir&255,this[pr+1]=Ir>>>8,pr+2},B.prototype.writeInt16BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,2,32767,-32768),this[pr]=Ir>>>8,this[pr+1]=Ir&255,pr+2},B.prototype.writeInt32LE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,2147483647,-2147483648),this[pr]=Ir&255,this[pr+1]=Ir>>>8,this[pr+2]=Ir>>>16,this[pr+3]=Ir>>>24,pr+4},B.prototype.writeInt32BE=function(Ir,pr,Cr){return Ir=+Ir,pr=pr>>>0,Cr||sr(this,Ir,pr,4,2147483647,-2147483648),Ir<0&&(Ir=4294967295+Ir+1),this[pr]=Ir>>>24,this[pr+1]=Ir>>>16,this[pr+2]=Ir>>>8,this[pr+3]=Ir&255,pr+4},B.prototype.writeBigInt64LE=ti(function(Ir,pr=0){return yr(this,Ir,pr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),B.prototype.writeBigInt64BE=ti(function(Ir,pr=0){return wr(this,Ir,pr,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qr(Rr,Ir,pr,Cr,Er,xr){if(pr+Cr>Rr.length)throw new RangeError("Index out of range");if(pr<0)throw new RangeError("Index out of range")}function Mr(Rr,Ir,pr,Cr,Er){return Ir=+Ir,pr=pr>>>0,Er||qr(Rr,Ir,pr,4),c.write(Rr,Ir,pr,Cr,23,4),pr+4}B.prototype.writeFloatLE=function(Ir,pr,Cr){return Mr(this,Ir,pr,!0,Cr)},B.prototype.writeFloatBE=function(Ir,pr,Cr){return Mr(this,Ir,pr,!1,Cr)};function Dr(Rr,Ir,pr,Cr,Er){return Ir=+Ir,pr=pr>>>0,Er||qr(Rr,Ir,pr,8),c.write(Rr,Ir,pr,Cr,52,8),pr+8}B.prototype.writeDoubleLE=function(Ir,pr,Cr){return Dr(this,Ir,pr,!0,Cr)},B.prototype.writeDoubleBE=function(Ir,pr,Cr){return Dr(this,Ir,pr,!1,Cr)},B.prototype.copy=function(Ir,pr,Cr,Er){if(!B.isBuffer(Ir))throw new TypeError("argument should be a Buffer");if(Cr||(Cr=0),!Er&&Er!==0&&(Er=this.length),pr>=Ir.length&&(pr=Ir.length),pr||(pr=0),Er>0&&Er<Cr&&(Er=Cr),Er===Cr||Ir.length===0||this.length===0)return 0;if(pr<0)throw new RangeError("targetStart out of bounds");if(Cr<0||Cr>=this.length)throw new RangeError("Index out of range");if(Er<0)throw new RangeError("sourceEnd out of bounds");Er>this.length&&(Er=this.length),Ir.length-pr<Er-Cr&&(Er=Ir.length-pr+Cr);const xr=Er-Cr;return this===Ir&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(pr,Cr,Er):Uint8Array.prototype.set.call(Ir,this.subarray(Cr,Er),pr),xr},B.prototype.fill=function(Ir,pr,Cr,Er){if(typeof Ir=="string"){if(typeof pr=="string"?(Er=pr,pr=0,Cr=this.length):typeof Cr=="string"&&(Er=Cr,Cr=this.length),Er!==void 0&&typeof Er!="string")throw new TypeError("encoding must be a string");if(typeof Er=="string"&&!B.isEncoding(Er))throw new TypeError("Unknown encoding: "+Er);if(Ir.length===1){const si=Ir.charCodeAt(0);(Er==="utf8"&&si<128||Er==="latin1")&&(Ir=si)}}else typeof Ir=="number"?Ir=Ir&255:typeof Ir=="boolean"&&(Ir=Number(Ir));if(pr<0||this.length<pr||this.length<Cr)throw new RangeError("Out of range index");if(Cr<=pr)return this;pr=pr>>>0,Cr=Cr===void 0?this.length:Cr>>>0,Ir||(Ir=0);let xr;if(typeof Ir=="number")for(xr=pr;xr<Cr;++xr)this[xr]=Ir;else{const si=B.isBuffer(Ir)?Ir:B.from(Ir,Er),Ci=si.length;if(Ci===0)throw new TypeError('The value "'+Ir+'" is invalid for argument "value"');for(xr=0;xr<Cr-pr;++xr)this[xr+pr]=si[xr%Ci]}return this};const Qr={};function Xr(Rr,Ir,pr){Qr[Rr]=class extends pr{constructor(){super(),Object.defineProperty(this,"message",{value:Ir.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Rr}]`,this.stack,delete this.name}get code(){return Rr}set code(Er){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Er,writable:!0})}toString(){return`${this.name} [${Rr}]: ${this.message}`}}}Xr("ERR_BUFFER_OUT_OF_BOUNDS",function(Rr){return Rr?`${Rr} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Xr("ERR_INVALID_ARG_TYPE",function(Rr,Ir){return`The "${Rr}" argument must be of type number. Received type ${typeof Ir}`},TypeError),Xr("ERR_OUT_OF_RANGE",function(Rr,Ir,pr){let Cr=`The value of "${Rr}" is out of range.`,Er=pr;return Number.isInteger(pr)&&Math.abs(pr)>2**32?Er=Wr(String(pr)):typeof pr=="bigint"&&(Er=String(pr),(pr>BigInt(2)**BigInt(32)||pr<-(BigInt(2)**BigInt(32)))&&(Er=Wr(Er)),Er+="n"),Cr+=` It must be ${Ir}. Received ${Er}`,Cr},RangeError);function Wr(Rr){let Ir="",pr=Rr.length;const Cr=Rr[0]==="-"?1:0;for(;pr>=Cr+4;pr-=3)Ir=`_${Rr.slice(pr-3,pr)}${Ir}`;return`${Rr.slice(0,pr)}${Ir}`}function Ur(Rr,Ir,pr){Gr(Ir,"offset"),(Rr[Ir]===void 0||Rr[Ir+pr]===void 0)&&Fr(Ir,Rr.length-(pr+1))}function Sr(Rr,Ir,pr,Cr,Er,xr){if(Rr>pr||Rr<Ir){const si=typeof Ir=="bigint"?"n":"";let Ci;throw Ir===0||Ir===BigInt(0)?Ci=`>= 0${si} and < 2${si} ** ${(xr+1)*8}${si}`:Ci=`>= -(2${si} ** ${(xr+1)*8-1}${si}) and < 2 ** ${(xr+1)*8-1}${si}`,new Qr.ERR_OUT_OF_RANGE("value",Ci,Rr)}Ur(Cr,Er,xr)}function Gr(Rr,Ir){if(typeof Rr!="number")throw new Qr.ERR_INVALID_ARG_TYPE(Ir,"number",Rr)}function Fr(Rr,Ir,pr){throw Math.floor(Rr)!==Rr?(Gr(Rr,pr),new Qr.ERR_OUT_OF_RANGE("offset","an integer",Rr)):Ir<0?new Qr.ERR_BUFFER_OUT_OF_BOUNDS:new Qr.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Ir}`,Rr)}const br=/[^+/0-9A-Za-z-_]/g;function Ar(Rr){if(Rr=Rr.split("=")[0],Rr=Rr.trim().replace(br,""),Rr.length<2)return"";for(;Rr.length%4!==0;)Rr=Rr+"=";return Rr}function cr(Rr,Ir){Ir=Ir||1/0;let pr;const Cr=Rr.length;let Er=null;const xr=[];for(let si=0;si<Cr;++si){if(pr=Rr.charCodeAt(si),pr>55295&&pr<57344){if(!Er){if(pr>56319){(Ir-=3)>-1&&xr.push(239,191,189);continue}else if(si+1===Cr){(Ir-=3)>-1&&xr.push(239,191,189);continue}Er=pr;continue}if(pr<56320){(Ir-=3)>-1&&xr.push(239,191,189),Er=pr;continue}pr=(Er-55296<<10|pr-56320)+65536}else Er&&(Ir-=3)>-1&&xr.push(239,191,189);if(Er=null,pr<128){if((Ir-=1)<0)break;xr.push(pr)}else if(pr<2048){if((Ir-=2)<0)break;xr.push(pr>>6|192,pr&63|128)}else if(pr<65536){if((Ir-=3)<0)break;xr.push(pr>>12|224,pr>>6&63|128,pr&63|128)}else if(pr<1114112){if((Ir-=4)<0)break;xr.push(pr>>18|240,pr>>12&63|128,pr>>6&63|128,pr&63|128)}else throw new Error("Invalid code point")}return xr}function hr(Rr){const Ir=[];for(let pr=0;pr<Rr.length;++pr)Ir.push(Rr.charCodeAt(pr)&255);return Ir}function jr(Rr,Ir){let pr,Cr,Er;const xr=[];for(let si=0;si<Rr.length&&!((Ir-=2)<0);++si)pr=Rr.charCodeAt(si),Cr=pr>>8,Er=pr%256,xr.push(Er),xr.push(Cr);return xr}function fi(Rr){return g.toByteArray(Ar(Rr))}function Bi(Rr,Ir,pr,Cr){let Er;for(Er=0;Er<Cr&&!(Er+pr>=Ir.length||Er>=Rr.length);++Er)Ir[Er+pr]=Rr[Er];return Er}function $r(Rr,Ir){return Rr instanceof Ir||Rr!=null&&Rr.constructor!=null&&Rr.constructor.name!=null&&Rr.constructor.name===Ir.name}function oi(Rr){return Rr!==Rr}const zr=function(){const Rr="0123456789abcdef",Ir=new Array(256);for(let pr=0;pr<16;++pr){const Cr=pr*16;for(let Er=0;Er<16;++Er)Ir[Cr+Er]=Rr[pr]+Rr[Er]}return Ir}();function ti(Rr){return typeof BigInt>"u"?Lr:Rr}function Lr(){throw new Error("BigInt not supported")}}(buffer$2)),buffer$2}var coin$1={},hasRequiredCoin$1;function requireCoin$1(){if(hasRequiredCoin$1)return coin$1;hasRequiredCoin$1=1,Object.defineProperty(coin$1,"__esModule",{value:!0}),coin$1.getCoinSymbol=o;function o(g){var c;return(c={0:"BTC",2:"LTC",3:"DOGE",4:"RDD",5:"DASH",6:"PPC",7:"NMC",8:"FTC",9:"XCP",10:"BLK",11:"NSR",12:"NBT",13:"MZC",14:"VIA",15:"XCH",16:"RBY",17:"GRS",18:"DGC",19:"CCN",20:"DGB",22:"MONA",23:"CLAM",24:"XPM",25:"NEOS",26:"JBS",27:"ZRC",28:"VTC",29:"NXT",30:"BURST",31:"MUE",32:"ZOOM",33:"VASH",34:"CDN",35:"SDC",36:"PKB",37:"PND",38:"START",39:"MOIN",40:"EXP",41:"EMC2",42:"DCR",43:"XEM",44:"PART",45:"ARG",48:"SHR",49:"GCR",50:"NVC",51:"AC",52:"BTCD",53:"DOPE",54:"TPC",55:"AIB",56:"EDRC",57:"SYS",58:"SLR",59:"SMLY",60:"ETH",61:"ETC",62:"PSB",63:"LDCN",65:"XBC",66:"IOP",67:"NXS",68:"INSN",69:"OK",70:"BRIT",71:"CMP",72:"CRW",73:"BELA",74:"ICX",75:"FJC",76:"MIX",77:"XVG",78:"EFL",79:"CLUB",80:"RICHX",81:"POT",82:"QRK",83:"TRC",84:"GRC",85:"AUR",86:"IXC",87:"NLG",88:"BITB",89:"BTA",90:"XMY",91:"BSD",92:"UNO",93:"MTR",94:"GB",95:"SHM",96:"CRX",97:"BIQ",98:"EVO",99:"STO",100:"BIGUP",101:"GAME",102:"DLC",103:"ZYD",104:"DBIC",105:"STRAT",106:"SH",107:"MARS",108:"UBQ",109:"PTC",110:"NRO",111:"ARK",112:"USC",113:"THC",114:"LINX",115:"ECN",116:"DNR",117:"PINK",118:"ATOM",119:"PIVX",120:"FLASH",121:"ZEN",122:"PUT",123:"ZNY",124:"UNIFY",125:"XST",126:"BRK",127:"VC",128:"XMR",129:"VOX",130:"NAV",131:"FCT",132:"EC",133:"ZEC",134:"LSK",135:"STEEM",136:"XZC",137:"RBTC",139:"RPT",140:"LBC",141:"KMD",142:"BSQ",143:"RIC",144:"XRP",145:"BCH",146:"NEBL",147:"ZCL",148:"XLM",149:"NLC2",150:"WHL",151:"ERC",152:"DMD",153:"BTM",154:"BIO",155:"XWCC",156:"BTG",157:"BTC2X",158:"SSN",159:"TOA",160:"BTX",161:"ACC",162:"BCO",163:"ELLA",164:"PIRL",165:"XNO",166:"VIVO",167:"FRST",168:"HNC",169:"BUZZ",170:"MBRS",171:"HC",172:"HTML",173:"ODN",174:"ONX",175:"RVN",176:"GBX",177:"BTCZ",178:"POA",179:"NYC",180:"MXT",181:"WC",182:"MNX",183:"BTCP",184:"MUSIC",185:"BCA",186:"CRAVE",187:"STAK",188:"WBTC",189:"LCH",190:"EXCL",192:"LCC",193:"XFE",194:"EOS",195:"TRX",196:"KOBO",197:"HUSH",198:"BAN",199:"ETF",200:"OMNI",201:"BIFI",202:"UFO",203:"CNMC",204:"BCN",205:"RIN",206:"ATP",207:"EVT",208:"ATN",209:"BIS",210:"NEET",211:"BOPO",212:"OOT",213:"ALIAS",214:"MONK",215:"BOXY",216:"FLO",217:"MEC",218:"BTDX",219:"XAX",220:"ANON",221:"LTZ",222:"BITG",223:"ICP",224:"SMART",225:"XUEZ",226:"HLM",227:"WEB",228:"ACM",229:"NOS",230:"BITC",231:"HTH",232:"TZC",233:"VAR",234:"IOV",235:"FIO",236:"BSV",237:"DXN",238:"QRL",239:"PCX",240:"LOKI",242:"NIM",243:"SOV",244:"JCT",245:"SLP",246:"EWT",247:"UC",248:"EXOS",249:"ECA",250:"SOOM",251:"XRD",252:"FREE",253:"NPW",254:"BST",256:"NANO",257:"BTCC",259:"ZEST",260:"ABT",261:"PION",262:"DT3",263:"ZBUX",264:"KPL",265:"TPAY",266:"ZILLA",267:"ANK",268:"BCC",269:"HPB",270:"ONE",271:"SBC",272:"IPC",273:"DMTC",274:"OGC",275:"SHIT",276:"ANDES",277:"AREPA",278:"BOLI",279:"RIL",280:"HTR",281:"FCTID",282:"BRAVO",283:"ALGO",284:"BZX",285:"GXX",286:"HEAT",287:"XDN",288:"FSN",289:"CPC",290:"BOLD",291:"IOST",292:"TKEY",293:"USE",294:"BCZ",295:"IOC",296:"ASF",297:"MASS",298:"FAIR",299:"NUKO",300:"GNX",301:"DIVI",302:"CMT",303:"EUNO",304:"IOTX",305:"ONION",306:"8BIT",307:"ATC",308:"BTS",309:"CKB",310:"UGAS",311:"ADS",312:"ARA",313:"ZIL",314:"MOAC",315:"SWTC",316:"VNSC",317:"PLUG",318:"MAN",319:"ECC",320:"RPD",321:"RAP",322:"GARD",323:"ZER",324:"EBST",325:"SHARD",326:"MRX",327:"CMM",328:"BLOCK",329:"AUDAX",330:"LUNA",331:"ZPM",332:"KUVA",333:"MEM",334:"CS",335:"SWIFT",336:"FIX",337:"CPC",338:"VGO",339:"DVT",340:"N8V",341:"MTNS",342:"BLAST",343:"DCT",344:"AUX",345:"USDP",346:"HTDF",347:"YEC",348:"QLC",349:"TEA",350:"ARW",351:"MDM",352:"CYB",353:"LTO",354:"DOT",355:"AEON",356:"RES",357:"AYA",358:"DAPS",359:"CSC",360:"VSYS",361:"NOLLAR",362:"XNOS",363:"CPU",364:"LAMB",365:"VCT",366:"CZR",367:"ABBC",368:"HET",369:"XAS",370:"VDL",371:"MED",372:"ZVC",373:"VESTX",374:"DBT",375:"SEOS",376:"MXW",377:"ZNZ",378:"XCX",379:"SOX",380:"NYZO",381:"ULC",382:"RYO",383:"KAL",384:"XSN",385:"DOGEC",386:"BMV",387:"QBC",388:"IMG",389:"QOS",390:"PKT",391:"LHD",392:"CENNZ",393:"HSN",394:"CRO",395:"UMBRU",396:"EVER",397:"NEAR",398:"XPC",399:"ZOC",400:"NIX",401:"UC",402:"GALI",403:"OLT",404:"XBI",405:"DONU",406:"EARTHS",407:"HDD",408:"SUGAR",409:"AILE",410:"TENT",411:"TAN",412:"AIN",413:"MSR",414:"SUMO",415:"ETN",416:"BYTZ",417:"WOW",418:"XTNC",419:"LTHN",420:"NODE",421:"AGM",422:"CCX",423:"TNET",424:"TELOS",425:"AION",426:"BC",427:"KTV",428:"ZCR",429:"ERG",430:"PESO",431:"BTC2",432:"XRPHD",433:"WE",434:"KSM",435:"PCN",436:"NCH",437:"ICU",438:"LN",439:"DTP",440:"BTCR",441:"AERGO",442:"XTH",443:"LV",444:"PHR",445:"VITAE",446:"COCOS",447:"DIN",448:"SPL",449:"YCE",450:"XLR",451:"KTS",452:"DGLD",453:"XNS",454:"EM",455:"SHN",456:"SEELE",457:"AE",458:"ODX",459:"KAVA",460:"GLEEC",461:"FIL",462:"RUTA",463:"CSDT",464:"ETI",465:"ZSLP",466:"ERE",467:"DX",468:"CPS",469:"BTH",470:"MESG",471:"FIMK",472:"AR",473:"OGO",474:"ROSE",475:"BARE",476:"GLEEC",477:"CLR",478:"RNG",479:"OLO",480:"PEXA",481:"MOON",482:"OCEAN",483:"BNT",484:"AMO",485:"FCH",486:"LAT",487:"COIN",488:"VEO",489:"CCA",490:"GFN",491:"BIP",492:"KPG",493:"FIN",494:"BAND",495:"DROP",496:"BHT",497:"LYRA",498:"CS",499:"RUPX",500:"THETA",501:"SOL",502:"THT",503:"CFX",504:"KUMA",505:"HASH",506:"CSPR",507:"EARTH",508:"EGLD",509:"CHI",510:"KOTO",511:"OTC",512:"XRD",513:"SEELEN",514:"AETH",515:"DNA",516:"VEE",517:"SIERRA",518:"LET",519:"BSC",520:"BTCV",521:"ABA",522:"SCC",523:"EDG",524:"AMS",525:"GOSS",526:"BU",527:"GRAM",528:"YAP",529:"SCRT",530:"NOVO",531:"GHOST",532:"HST",533:"PRJ",534:"YOU",535:"XHV",536:"BYND",537:"JOYS",538:"VAL",539:"FLOW",540:"SMESH",541:"SCDO",542:"IQS",543:"BIND",544:"COINEVO",545:"SCRIBE",546:"HYN",547:"BHP",548:"BBC",549:"MKF",550:"XDC",551:"STR",552:"SUM",553:"HBC",555:"BCS",556:"KTS",557:"LKR",558:"TAO",559:"XWC",560:"DEAL",561:"NTY",562:"TOP",564:"AG",565:"CICO",566:"IRIS",567:"NCG",568:"LRG",569:"SERO",570:"BDX",571:"CCXX",572:"SLS",573:"SRM",575:"VIVT",576:"BPS",577:"NKN",578:"ICL",579:"BONO",580:"PLC",581:"DUN",582:"DMCH",583:"CTC",584:"KELP",585:"GBCR",586:"XDAG",587:"PRV",588:"SCAP",589:"TFUEL",590:"GTM",591:"RNL",592:"GRIN",593:"MWC",594:"DOCK",595:"POLYX",596:"DIVER",597:"XEP",598:"APN",599:"TFC",600:"UTE",601:"MTC",602:"NC",603:"XINY",604:"DYN",605:"BUFS",606:"STOS",607:"TON",608:"TAFT",609:"HYDRA",610:"NOR",613:"WCN",614:"OPT",615:"PSWAP",616:"VAL",617:"XOR",618:"SSP",619:"DEI",621:"ZERO",622:"ALPHA",623:"BDECO",624:"NOBL",625:"EAST",626:"KDA",627:"SOUL",628:"LORE",629:"FNR",630:"NEXUS",631:"QTZ",632:"XMA",633:"CALL",634:"VAL",635:"POKT",636:"EMIT",637:"APTOS",638:"ADON",639:"BTSG",640:"LFC",641:"KCS",642:"KCC",643:"AZERO",644:"TREE",645:"LX",646:"XLN",647:"CIC",648:"ZRB",650:"UCO",651:"SFX",652:"SFT",653:"WSFX",654:"USDG",655:"WMP",659:"KOIN",660:"PIRATE",663:"SFRX",666:"ACT",667:"PRKL",668:"SSC",669:"GC",670:"PLGR",671:"MPLGR",672:"KNOX",673:"ZED",674:"CNDL",675:"WLKR",676:"WLKRR",677:"YUNGE",678:"Voken",679:"APL",680:"Evrynet",681:"NENG",682:"CHTA",685:"OAS",686:"KAR",688:"CET",690:"KLV",694:"VTBC",698:"VEIL",699:"GTB",700:"XDAI",701:"COM",702:"CCC",707:"MCOIN",711:"CHC",712:"SERF",713:"XTL",714:"BNB",715:"SIN",716:"DLN",717:"BONTE",718:"PEER",725:"MCX",730:"HEALIOS",731:"BMK",734:"DENTX",737:"ATOP",747:"CFG",750:"XPRT",757:"HONEY",768:"BALLZ",770:"COSA",771:"BR",775:"PLSR",776:"KEY",777:"BTW",780:"PLCUC",781:"PLCUX",782:"PLCU",784:"SUI",786:"UIDD",787:"ACA",788:"BNC",789:"TAU",799:"PDEX",800:"BEET",801:"DST",804:"ZKS",808:"QVT",809:"SDN",810:"ASTR",813:"MEER",818:"VET",819:"REEF",820:"CLO",822:"BDB",827:"ACE",828:"CCN",831:"CRUZ",832:"SAPP",833:"777",834:"KYAN",835:"AZR",836:"CFL",837:"DASHD",838:"TRTT",839:"UCR",840:"PNY",841:"BECN",842:"MONK",843:"SAGA",844:"SUV",845:"ESK",846:"OWO",847:"PEPS",848:"BIR",849:"MOBIC",850:"FLS",852:"DSM",853:"PRCY",858:"HVH",866:"MOB",868:"IF",877:"NAM",880:"LUM",883:"ZBC",886:"ADF",888:"NEO",889:"TOMO",890:"XSEL",896:"LKSC",898:"AS",899:"XEC",900:"LMO",901:"NXT",904:"HNT",907:"FIS",909:"SGE",911:"GERT",916:"META",917:"FRA",919:"CCD",921:"AVN",925:"DIP",928:"GHM",931:"RUNE",945:"UNLOCK",955:"LTP",960:"VKAX",966:"MATIC",968:"UNW",970:"TWINS",977:"TLOS",981:"TAFECO",985:"AU",987:"VCG",988:"XAZAB",989:"AIOZ",990:"CORE",991:"PEC",992:"UNT",993:"XRB",994:"QUAI",995:"CAPS",996:"OKT",997:"SUM",998:"LBTC",999:"BCD",1e3:"BTN",1001:"TT",1002:"BKT",1003:"NODL",1004:"PCOIN",1005:"TAO",1006:"HSK",1007:"FTM",1008:"RPG",1010:"HT",1011:"ELV",1013:"BIC",1020:"EVC",1022:"XRD",1023:"ONE",1024:"ONT",1025:"CZZ",1026:"KEX",1027:"MCM",1032:"BTCR",1042:"MFID",1111:"BBC",1120:"RISE",1122:"CMT",1128:"ETSC",1129:"DFI",1130:"DFI",1137:"$DAG",1145:"CDY",1155:"EFI",1170:"HOO",1234:"ALPH",1284:"GLMR",1285:"MOVR",1298:"WPC",1308:"WEI",1337:"DFC",1397:"HYC",1410:"TENTSLP",1510:"XSC",1512:"AAC",1533:"BEAM",1555:"APC",1616:"ELF",1618:"AUDL",1620:"ATH",1627:"LUME",1642:"NEW",1657:"BTA",1668:"NEOX",1669:"MEWC",1688:"BCX",1729:"XTZ",1776:"LBTC",1777:"BBP",1784:"JPYS",1789:"VEGA",1815:"ADA",1818:"CUBE",1856:"TES",1888:"ZTX",1899:"XEC",1901:"CLC",1919:"VIPS",1926:"CITY",1955:"XX",1977:"XMX",1984:"TRTL",1985:"SLRT",1986:"QTH",1987:"EGEM",1988:"MIRA",1989:"HODL",1990:"PHL",1991:"SC",1996:"MYT",1997:"POLIS",1998:"XMCC",1999:"COLX",2e3:"GIN",2001:"MNP",2002:"MLN",2017:"KIN",2018:"EOSC",2019:"GBT",2020:"PKC",2021:"SKT",2022:"XHT",2048:"MCASH",2049:"TRUE",2086:"KILT",2109:"SAMA",2112:"IoTE",2137:"XRG",2182:"CHZ",2221:"ASK",2301:"QTUM",2302:"ETP",2303:"GXC",2304:"CRP",2305:"ELA",2338:"SNOW",2365:"XIN",2570:"AOA",2718:"NAS",2894:"REOSC",2941:"BND",3003:"LUX",3030:"HBAR",3077:"COS",3276:"CCC",3333:"SXP",3377:"ROI",3381:"DYN",3383:"SEQ",3552:"DEO",3564:"DST",3601:"CY",4040:"FC8",4096:"YEE",4218:"IOTA",4219:"SMR",4242:"AXE",4343:"XYM",4444:"C4E",4919:"XVM",5006:"SBC",5248:"FIC",5353:"HNS",5404:"ISK",5467:"ALTME",5555:"FUND",5757:"STX",5895:"VOW",5920:"SLU",6060:"GO",6174:"MOI",6599:"RSC",6666:"BPA",6688:"SAFE",6779:"COTI",6969:"ROGER",7091:"TOPL",7331:"KLY",7341:"SHFT",7777:"BTV",8e3:"SKY",8192:"PAC",8217:"KLAY",8339:"BTQ",8444:"XCH",8680:"PLMNT",8888:"SBTC",8964:"NULS",8997:"BBC",8998:"JGC",8999:"BTP",9e3:"AVAX",9001:"ARB1",9002:"BOBA",9003:"LOOP",9004:"STRK",9005:"AVAXC",9006:"BSC",9797:"NRG",9888:"BTF",9999:"GOD",1e4:"FO",10226:"RTM",10291:"XRC",10605:"XPI",11111:"ESS",12345:"IPOS",12586:"MINA",13107:"BTY",13108:"YCC",14001:"WAX",15845:"SDGO",16181:"XTX",16754:"ARDR",18e3:"MTR",19165:"SAFE",19167:"FLUX",19169:"RITO",20036:"XND",21004:"C4EI",21888:"PCT",22504:"PWR",25252:"BELL",25718:"CHX",29223:"NEXA",31102:"ESN",33416:"TEO",33878:"BTCS",34952:"BTT",37992:"FXTC",39321:"AMA",42069:"FACT",43028:"AXIV",49262:"EVE",49344:"STASH",52752:"CELO",61616:"TH",65536:"KETH",69420:"GRLC",70007:"GWL",77777:"ZYN",88888:"RYO",99999:"WICC",100500:"HOME",101010:"STC",105105:"STRAX",111111:"KAS",161803:"APTA",200625:"AKA",200665:"GENOM",246529:"ATS",261131:"ZAMA",314159:"PI",333332:"VALUE",333333:"3333",424242:"X42",534352:"SCR",666666:"VITE",888888:"SEA",1048576:"AMAX",1171337:"ILT",1313114:"ETHO",1313500:"XERO",1712144:"LAX",3924011:"EPK",4741444:"HYD",5249353:"BCO",5249354:"BHD",5264462:"PTN",5655640:"VLX",5718350:"WAN",5741564:"WAVES",5741565:"WEST",6382179:"ABC",6517357:"CRM",7562605:"SEM",7567736:"ION",7777777:"FCT",7825266:"WGR",7825267:"OBSR",8163271:"AFS",15118976:"XDS",61717561:"AQUA",88888888:"HATCH",91927009:"kUSD",99999996:"GENS",99999997:"EQ",99999998:"FLUID",99999999:"QKC",608589380:"FVDC"}[g])!==null&&c!==void 0?c:""}return coin$1}var hasRequiredStringHelper;function requireStringHelper(){return hasRequiredStringHelper||(hasRequiredStringHelper=1,function(o){var g=stringHelper&&stringHelper.__createBinding||(Object.create?function(M,U,L,H){H===void 0&&(H=L);var fe=Object.getOwnPropertyDescriptor(U,L);(!fe||("get"in fe?!U.__esModule:fe.writable||fe.configurable))&&(fe={enumerable:!0,get:function(){return U[L]}}),Object.defineProperty(M,H,fe)}:function(M,U,L,H){H===void 0&&(H=L),M[H]=U[L]}),c=stringHelper&&stringHelper.__setModuleDefault||(Object.create?function(M,U){Object.defineProperty(M,"default",{enumerable:!0,value:U})}:function(M,U){M.default=U}),y=stringHelper&&stringHelper.__importStar||function(){var M=function(U){return M=Object.getOwnPropertyNames||function(L){var H=[];for(var fe in L)Object.prototype.hasOwnProperty.call(L,fe)&&(H[H.length]=fe);return H},M(U)};return function(U){if(U&&U.__esModule)return U;var L={};if(U!=null)for(var H=M(U),fe=0;fe<H.length;fe++)H[fe]!=="default"&&g(L,U,H[fe]);return c(L,U),L}}(),t=stringHelper&&stringHelper.__exportStar||function(M,U){for(var L in M)L!=="default"&&!Object.prototype.hasOwnProperty.call(U,L)&&g(U,M,L)};Object.defineProperty(o,"__esModule",{value:!0}),o.uuid=void 0,o.toHex=B,o.toBuffer=D,o.uuidParse=x,o.uuidStringify=v,o.parsePath=F;const d=y(requireCommonjsBrowser());o.uuid=d;const E=requireBuffer$2();t(requireCoin$1(),o);function B(M){return M===void 0?"":E.Buffer.from(M).toString("hex")}function D(M){return E.Buffer.from(M??"","hex")}function x(M){return E.Buffer.from(d.parse(M))}function v(M){return d.stringify(M)}function F(M){return M.replace(/^m\//i,"").split("/").map(L=>{const H=L.endsWith("'");return{index:Number(H?L.substring(0,L.length-1):L),hardened:H}})}}(stringHelper)),stringHelper}var crypto$6={},dist$o={},extendStatics=function(o,g){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,y){c.__proto__=y}||function(c,y){for(var t in y)Object.prototype.hasOwnProperty.call(y,t)&&(c[t]=y[t])},extendStatics(o,g)};function __extends(o,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");extendStatics(o,g);function c(){this.constructor=o}o.prototype=g===null?Object.create(g):(c.prototype=g.prototype,new c)}var __assign=function(){return __assign=Object.assign||function(g){for(var c,y=1,t=arguments.length;y<t;y++){c=arguments[y];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(g[d]=c[d])}return g},__assign.apply(this,arguments)};function __rest(o,g){var c={};for(var y in o)Object.prototype.hasOwnProperty.call(o,y)&&g.indexOf(y)<0&&(c[y]=o[y]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,y=Object.getOwnPropertySymbols(o);t<y.length;t++)g.indexOf(y[t])<0&&Object.prototype.propertyIsEnumerable.call(o,y[t])&&(c[y[t]]=o[y[t]]);return c}function __decorate(o,g,c,y){var t=arguments.length,d=t<3?g:y===null?y=Object.getOwnPropertyDescriptor(g,c):y,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(o,g,c,y);else for(var B=o.length-1;B>=0;B--)(E=o[B])&&(d=(t<3?E(d):t>3?E(g,c,d):E(g,c))||d);return t>3&&d&&Object.defineProperty(g,c,d),d}function __param(o,g){return function(c,y){g(c,y,o)}}function __esDecorate(o,g,c,y,t,d){function E(ge){if(ge!==void 0&&typeof ge!="function")throw new TypeError("Function expected");return ge}for(var B=y.kind,D=B==="getter"?"get":B==="setter"?"set":"value",x=!g&&o?y.static?o:o.prototype:null,v=g||(x?Object.getOwnPropertyDescriptor(x,y.name):{}),F,M=!1,U=c.length-1;U>=0;U--){var L={};for(var H in y)L[H]=H==="access"?{}:y[H];for(var H in y.access)L.access[H]=y.access[H];L.addInitializer=function(ge){if(M)throw new TypeError("Cannot add initializers after decoration has completed");d.push(E(ge||null))};var fe=(0,c[U])(B==="accessor"?{get:v.get,set:v.set}:v[D],L);if(B==="accessor"){if(fe===void 0)continue;if(fe===null||typeof fe!="object")throw new TypeError("Object expected");(F=E(fe.get))&&(v.get=F),(F=E(fe.set))&&(v.set=F),(F=E(fe.init))&&t.unshift(F)}else(F=E(fe))&&(B==="field"?t.unshift(F):v[D]=F)}x&&Object.defineProperty(x,y.name,v),M=!0}function __runInitializers(o,g,c){for(var y=arguments.length>2,t=0;t<g.length;t++)c=y?g[t].call(o,c):g[t].call(o);return y?c:void 0}function __propKey(o){return typeof o=="symbol"?o:"".concat(o)}function __setFunctionName(o,g,c){return typeof g=="symbol"&&(g=g.description?"[".concat(g.description,"]"):""),Object.defineProperty(o,"name",{configurable:!0,value:c?"".concat(c," ",g):g})}function __metadata(o,g){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(o,g)}function __awaiter$1(o,g,c,y){function t(d){return d instanceof c?d:new c(function(E){E(d)})}return new(c||(c=Promise))(function(d,E){function B(v){try{x(y.next(v))}catch(F){E(F)}}function D(v){try{x(y.throw(v))}catch(F){E(F)}}function x(v){v.done?d(v.value):t(v.value).then(B,D)}x((y=y.apply(o,g||[])).next())})}function __generator(o,g){var c={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},y,t,d,E=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return E.next=B(0),E.throw=B(1),E.return=B(2),typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function B(x){return function(v){return D([x,v])}}function D(x){if(y)throw new TypeError("Generator is already executing.");for(;E&&(E=0,x[0]&&(c=0)),c;)try{if(y=1,t&&(d=x[0]&2?t.return:x[0]?t.throw||((d=t.return)&&d.call(t),0):t.next)&&!(d=d.call(t,x[1])).done)return d;switch(t=0,d&&(x=[x[0]&2,d.value]),x[0]){case 0:case 1:d=x;break;case 4:return c.label++,{value:x[1],done:!1};case 5:c.label++,t=x[1],x=[0];continue;case 7:x=c.ops.pop(),c.trys.pop();continue;default:if(d=c.trys,!(d=d.length>0&&d[d.length-1])&&(x[0]===6||x[0]===2)){c=0;continue}if(x[0]===3&&(!d||x[1]>d[0]&&x[1]<d[3])){c.label=x[1];break}if(x[0]===6&&c.label<d[1]){c.label=d[1],d=x;break}if(d&&c.label<d[2]){c.label=d[2],c.ops.push(x);break}d[2]&&c.ops.pop(),c.trys.pop();continue}x=g.call(o,c)}catch(v){x=[6,v],t=0}finally{y=d=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}}var __createBinding=Object.create?function(o,g,c,y){y===void 0&&(y=c);var t=Object.getOwnPropertyDescriptor(g,c);(!t||("get"in t?!g.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return g[c]}}),Object.defineProperty(o,y,t)}:function(o,g,c,y){y===void 0&&(y=c),o[y]=g[c]};function __exportStar(o,g){for(var c in o)c!=="default"&&!Object.prototype.hasOwnProperty.call(g,c)&&__createBinding(g,o,c)}function __values$1(o){var g=typeof Symbol=="function"&&Symbol.iterator,c=g&&o[g],y=0;if(c)return c.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&y>=o.length&&(o=void 0),{value:o&&o[y++],done:!o}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(o,g){var c=typeof Symbol=="function"&&o[Symbol.iterator];if(!c)return o;var y=c.call(o),t,d=[],E;try{for(;(g===void 0||g-- >0)&&!(t=y.next()).done;)d.push(t.value)}catch(B){E={error:B}}finally{try{t&&!t.done&&(c=y.return)&&c.call(y)}finally{if(E)throw E.error}}return d}function __spread(){for(var o=[],g=0;g<arguments.length;g++)o=o.concat(__read(arguments[g]));return o}function __spreadArrays(){for(var o=0,g=0,c=arguments.length;g<c;g++)o+=arguments[g].length;for(var y=Array(o),t=0,g=0;g<c;g++)for(var d=arguments[g],E=0,B=d.length;E<B;E++,t++)y[t]=d[E];return y}function __spreadArray(o,g,c){if(c||arguments.length===2)for(var y=0,t=g.length,d;y<t;y++)(d||!(y in g))&&(d||(d=Array.prototype.slice.call(g,0,y)),d[y]=g[y]);return o.concat(d||Array.prototype.slice.call(g))}function __await(o){return this instanceof __await?(this.v=o,this):new __await(o)}function __asyncGenerator(o,g,c){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var y=c.apply(o,g||[]),t,d=[];return t=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),B("next"),B("throw"),B("return",E),t[Symbol.asyncIterator]=function(){return this},t;function E(U){return function(L){return Promise.resolve(L).then(U,F)}}function B(U,L){y[U]&&(t[U]=function(H){return new Promise(function(fe,ge){d.push([U,H,fe,ge])>1||D(U,H)})},L&&(t[U]=L(t[U])))}function D(U,L){try{x(y[U](L))}catch(H){M(d[0][3],H)}}function x(U){U.value instanceof __await?Promise.resolve(U.value.v).then(v,F):M(d[0][2],U)}function v(U){D("next",U)}function F(U){D("throw",U)}function M(U,L){U(L),d.shift(),d.length&&D(d[0][0],d[0][1])}}function __asyncDelegator(o){var g,c;return g={},y("next"),y("throw",function(t){throw t}),y("return"),g[Symbol.iterator]=function(){return this},g;function y(t,d){g[t]=o[t]?function(E){return(c=!c)?{value:__await(o[t](E)),done:!1}:d?d(E):E}:d}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var g=o[Symbol.asyncIterator],c;return g?g.call(o):(o=typeof __values$1=="function"?__values$1(o):o[Symbol.iterator](),c={},y("next"),y("throw"),y("return"),c[Symbol.asyncIterator]=function(){return this},c);function y(d){c[d]=o[d]&&function(E){return new Promise(function(B,D){E=o[d](E),t(B,D,E.done,E.value)})}}function t(d,E,B,D){Promise.resolve(D).then(function(x){d({value:x,done:B})},E)}}function __makeTemplateObject(o,g){return Object.defineProperty?Object.defineProperty(o,"raw",{value:g}):o.raw=g,o}var __setModuleDefault=Object.create?function(o,g){Object.defineProperty(o,"default",{enumerable:!0,value:g})}:function(o,g){o.default=g},ownKeys=function(o){return ownKeys=Object.getOwnPropertyNames||function(g){var c=[];for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(c[c.length]=y);return c},ownKeys(o)};function __importStar(o){if(o&&o.__esModule)return o;var g={};if(o!=null)for(var c=ownKeys(o),y=0;y<c.length;y++)c[y]!=="default"&&__createBinding(g,o,c[y]);return __setModuleDefault(g,o),g}function __importDefault(o){return o&&o.__esModule?o:{default:o}}function __classPrivateFieldGet(o,g,c,y){if(c==="a"&&!y)throw new TypeError("Private accessor was defined without a getter");if(typeof g=="function"?o!==g||!y:!g.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return c==="m"?y:c==="a"?y.call(o):y?y.value:g.get(o)}function __classPrivateFieldSet(o,g,c,y,t){if(y==="m")throw new TypeError("Private method is not writable");if(y==="a"&&!t)throw new TypeError("Private accessor was defined without a setter");if(typeof g=="function"?o!==g||!t:!g.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return y==="a"?t.call(o,c):t?t.value=c:g.set(o,c),c}function __classPrivateFieldIn(o,g){if(g===null||typeof g!="object"&&typeof g!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof o=="function"?g===o:o.has(g)}function __addDisposableResource(o,g,c){if(g!=null){if(typeof g!="object"&&typeof g!="function")throw new TypeError("Object expected.");var y,t;if(c){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");y=g[Symbol.asyncDispose]}if(y===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");y=g[Symbol.dispose],c&&(t=y)}if(typeof y!="function")throw new TypeError("Object not disposable.");t&&(y=function(){try{t.call(this)}catch(d){return Promise.reject(d)}}),o.stack.push({value:g,dispose:y,async:c})}else c&&o.stack.push({async:!0});return g}var _SuppressedError=typeof SuppressedError=="function"?SuppressedError:function(o,g,c){var y=new Error(c);return y.name="SuppressedError",y.error=o,y.suppressed=g,y};function __disposeResources(o){function g(d){o.error=o.hasError?new _SuppressedError(d,o.error,"An error was suppressed during disposal."):d,o.hasError=!0}var c,y=0;function t(){for(;c=o.stack.pop();)try{if(!c.async&&y===1)return y=0,o.stack.push(c),Promise.resolve().then(t);if(c.dispose){var d=c.dispose.call(c.value);if(c.async)return y|=2,Promise.resolve(d).then(t,function(E){return g(E),t()})}else y|=1}catch(E){g(E)}if(y===1)return o.hasError?Promise.reject(o.error):Promise.resolve();if(o.hasError)throw o.error}return t()}function __rewriteRelativeImportExtension(o,g){return typeof o=="string"&&/^\.\.?\//.test(o)?o.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(c,y,t,d,E){return y?g?".jsx":".js":t&&(!d||!E)?c:t+d+"."+E.toLowerCase()+"js"}):o}const tslib_es6={__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter:__awaiter$1,__generator,__createBinding,__exportStar,__values:__values$1,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__addDisposableResource,__disposeResources,__rewriteRelativeImportExtension},tslib_es6$1=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource,get __assign(){return __assign},__asyncDelegator,__asyncGenerator,__asyncValues,__await,__awaiter:__awaiter$1,__classPrivateFieldGet,__classPrivateFieldIn,__classPrivateFieldSet,__createBinding,__decorate,__disposeResources,__esDecorate,__exportStar,__extends,__generator,__importDefault,__importStar,__makeTemplateObject,__metadata,__param,__propKey,__read,__rest,__rewriteRelativeImportExtension,__runInitializers,__setFunctionName,__spread,__spreadArray,__spreadArrays,__values:__values$1,default:tslib_es6},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(tslib_es6$1);var patchCBOR$2={},utils$h={},lib$8={},cborSync$5={exports:{}},DataItem$2={},hasRequiredDataItem$2;function requireDataItem$2(){if(hasRequiredDataItem$2)return DataItem$2;hasRequiredDataItem$2=1,Object.defineProperty(DataItem$2,"__esModule",{value:!0}),DataItem$2.DataItem=void 0;class o{constructor(c,y){this.setTag=t=>{this.tag=t},this.clearTag=()=>{this.tag=void 0},this.getTag=()=>this.tag,this.getData=()=>this.data,this.data=c,this.tag=y}}return DataItem$2.DataItem=o,DataItem$2}var cborSync$4=cborSync$5.exports,hasRequiredCborSync$2;function requireCborSync$2(){return hasRequiredCborSync$2||(hasRequiredCborSync$2=1,function(o){(function(g,c){o.exports?o.exports=c():g.CBOR=c()})(cborSync$4,function(){const{DataItem:g}=requireDataItem$2();var c=function(){function y(Ne){this.$hex=Ne}y.prototype={length:function(){return this.$hex.length/2},toString:function(Ne){if(!Ne||Ne==="hex"||Ne===16)return this.$hex;if(Ne==="utf-8"){for(var Pe="",ve=0;ve<this.$hex.length;ve+=2)Pe+="%"+this.$hex.substring(ve,ve+2);return decodeURIComponent(Pe)}if(Ne==="latin"){for(var Pe=[],ve=0;ve<this.$hex.length;ve+=2)Pe.push(parseInt(this.$hex.substring(ve,ve+2),16));return String.fromCharCode.apply(String,Pe)}throw new Error("Unrecognised format: "+Ne)}},y.fromLatinString=function(Ne){for(var Pe="",ve=0;ve<Ne.length;ve++){var Fe=Ne.charCodeAt(ve).toString(16);Fe.length===1&&(Fe="0"+Fe),Pe+=Fe}return new y(Pe)},y.fromUtf8String=function(Ne){for(var Pe=encodeURIComponent(Ne),ve="",Fe=0;Fe<Pe.length;Fe++)if(Pe.charAt(Fe)==="%")ve+=Pe.substring(Fe+1,Fe+3),Fe+=2;else{var be=Pe.charCodeAt(Fe).toString(16);be.length<2&&(be="0"+be),ve+=be}return new y(ve)};var t=[],d={},E=function(Ne){return function(){throw new Error(Ne+" not implemented")}};function B(){}B.prototype={peekByte:E("peekByte"),readByte:E("readByte"),readChunk:E("readChunk"),readFloat16:function(){var Ne=this.readUint16(),Pe=(Ne&32767)>>10,ve=Ne&1023,Fe=Ne&32768;if(Pe===31)return ve===0?Fe?-1/0:1/0:NaN;var be=Pe?Math.pow(2,Pe-25)*(1024+ve):Math.pow(2,-24)*ve;return Fe?-be:be},readFloat32:function(){var Ne=this.readUint32(),Pe=(Ne&2147483647)>>23,ve=Ne&8388607,Fe=Ne&2147483648;if(Pe===255)return ve===0?Fe?-1/0:1/0:NaN;var be=Pe?Math.pow(2,Pe-23-127)*(8388608+ve):Math.pow(2,-149)*ve;return Fe?-be:be},readFloat64:function(){var Ne=this.readUint32(),Pe=this.readUint32(),ve=Ne>>20&2047,Fe=(Ne&1048575)*4294967296+Pe,be=Ne&2147483648;if(ve===2047)return Fe===0?be?-1/0:1/0:NaN;var Be=ve?Math.pow(2,ve-52-1023)*(4503599627370496+Fe):Math.pow(2,-1074)*Fe;return be?-Be:Be},readUint16:function(){return this.readByte()*256+this.readByte()},readUint32:function(){return this.readUint16()*65536+this.readUint16()},readUint64:function(){return this.readUint32()*4294967296+this.readUint32()}};function D(){}D.prototype={writeByte:E("writeByte"),result:E("result"),writeFloat16:E("writeFloat16"),writeFloat32:E("writeFloat32"),writeFloat64:E("writeFloat64"),writeUint16:function(Ne){this.writeByte(Ne>>8&255),this.writeByte(Ne&255)},writeUint32:function(Ne){this.writeUint16(Ne>>16&65535),this.writeUint16(Ne&65535)},writeUint64:function(Ne){if(Ne>=9007199254740992||Ne<=-9007199254740992)throw new Error("Cannot encode Uint64 of: "+Ne+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(Ne/4294967296)),this.writeUint32(Ne%4294967296)},writeString:E("writeString"),canWriteBinary:function(Ne){return!1},writeBinary:E("writeChunk")};function x(Ne){var Pe=Ne.readByte(),ve=Pe>>5,Fe=Pe&31;return{type:ve,value:Fe}}function v(Ne,Pe){var ve=Ne.value;if(ve<24)return ve;if(ve==24)return Pe.readByte();if(ve==25)return Pe.readUint16();if(ve==26)return Pe.readUint32();if(ve==27)return Pe.readUint64();if(ve==31)return null;E("Additional info: "+ve)()}function F(Ne,Pe,ve){ve.writeByte(Ne<<5|Pe)}function M(Ne,Pe,ve){var Fe=Ne<<5;Pe<24?ve.writeByte(Fe|Pe):Pe<256?(ve.writeByte(Fe|24),ve.writeByte(Pe)):Pe<65536?(ve.writeByte(Fe|25),ve.writeUint16(Pe)):Pe<4294967296?(ve.writeByte(Fe|26),ve.writeUint32(Pe)):(ve.writeByte(Fe|27),ve.writeUint64(Pe))}var U=new Error;function L(Ne){var Pe=x(Ne);switch(Pe.type){case 0:return v(Pe,Ne);case 1:return-1-v(Pe,Ne);case 2:return Ne.readChunk(v(Pe,Ne));case 3:var ve=Ne.readChunk(v(Pe,Ne));return ve.toString("utf-8");case 4:case 5:var Fe=v(Pe,Ne),Et=[];if(Fe!==null){Pe.type===5&&(Fe*=2);for(var be=0;be<Fe;be++)Et[be]=L(Ne)}else for(var Be;(Be=L(Ne))!==U;)Et.push(Be);if(Pe.type===5){for(var ke={},be=0;be<Et.length;be+=2)ke[Et[be]]=Et[be+1];return ke}else return Et;case 6:var xe=v(Pe,Ne),De=d[xe],Et=L(Ne);return De?De(Et):Et;case 7:if(Pe.value===25)return Ne.readFloat16();if(Pe.value===26)return Ne.readFloat32();if(Pe.value===27)return Ne.readFloat64();switch(v(Pe,Ne)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case null:return U;default:throw new Error("Unknown fixed value: "+Pe.value)}default:throw new Error("Unsupported header: "+JSON.stringify(Pe))}throw new Error("not implemented yet")}function H(Ne,Pe){for(var ve=0;ve<t.length;ve++){var Fe=t[ve].fn(Ne);if(Fe!==void 0)return M(6,t[ve].tag,Pe),H(Fe,Pe)}if(Ne&&typeof Ne.toCBOR=="function"&&(Ne=Ne.toCBOR()),Ne===!1)M(7,20,Pe);else if(Ne===!0)M(7,21,Pe);else if(Ne===null)M(7,22,Pe);else if(Ne===void 0)M(7,23,Pe);else if(typeof Ne=="number")Math.floor(Ne)===Ne&&Ne<9007199254740992&&Ne>-9007199254740992?Ne<0?M(1,-1-Ne,Pe):M(0,Ne,Pe):(F(7,27,Pe),Pe.writeFloat64(Ne));else if(typeof Ne=="string")Pe.writeString(Ne,function(Be){M(3,Be,Pe)});else if(Pe.canWriteBinary(Ne))Pe.writeBinary(Ne,function(Be){M(2,Be,Pe)});else if(typeof Ne=="object")if(Ie.config.useToJSON&&typeof Ne.toJSON=="function"&&(Ne=Ne.toJSON()),Array.isArray(Ne)){M(4,Ne.length,Pe);for(var ve=0;ve<Ne.length;ve++)H(Ne[ve],Pe)}else{var be=Object.keys(Ne);M(5,be.length,Pe);for(var ve=0;ve<be.length;ve++){const ke=parseInt(be[ve]);isNaN(ke)?(H(be[ve],Pe),H(Ne[be[ve]],Pe)):(H(ke,Pe),H(Ne[be[ve]],Pe))}}else throw new Error("CBOR encoding not supported: "+Ne)}var fe=[],ge=[],Ie={config:{useToJSON:!0},addWriter:function(Ne,Pe){typeof Ne=="string"?ge.push(function(ve){if(Ne===ve)return Pe(ve)}):ge.push(Ne)},addReader:function(Ne,Pe){typeof Ne=="string"?fe.push(function(ve,Fe){if(Ne===Fe)return Pe(ve,Fe)}):fe.push(Ne)},encode:function(Ne,Pe){for(var ve=0;ve<ge.length;ve++){var Fe=ge[ve],be=Fe(Pe);if(be)return H(Ne,be),be.result()}throw new Error("Unsupported output format: "+Pe)},encodeDataItem:function(Ne,Pe){for(var ve=0;ve<ge.length;ve++){var Fe=ge[ve],be=Fe(Pe);if(be)return Ne.getTag()!==void 0?(H(Ne,be),be.result()):(H(Ne.getData(),be),be.result())}throw new Error("Unsupported output format: "+Pe)},decode:function(Ne,Pe){for(var ve=0;ve<fe.length;ve++){var Fe=fe[ve],be=Fe(Ne,Pe);if(be)return L(be)}throw new Error("Unsupported input format: "+Pe)},decodeToDataItem:function(Ne,Pe){for(var ve=0;ve<fe.length;ve++){var Fe=fe[ve],be=Fe(Ne,Pe);if(be){const Be=L(be);return Be instanceof g?Be:new g(Be)}}throw new Error("Unsupported input format: "+Pe)},addSemanticEncode:function(Ne,Pe){if(typeof Ne!="number"||Ne%1!==0||Ne<0)throw new Error("Tag must be a positive integer");return t.push({tag:Ne,fn:Pe}),this},addSemanticDecode:function(Ne,Pe){if(typeof Ne!="number"||Ne%1!==0||Ne<0)throw new Error("Tag must be a positive integer");return d[Ne]=Pe,this}};function Ee(Ne){this.buffer=Ne,this.pos=0}Ee.prototype=Object.create(B.prototype),Ee.prototype.peekByte=function(){return this.buffer[this.pos]},Ee.prototype.readByte=function(){return this.buffer[this.pos++]},Ee.prototype.readUint16=function(){var Ne=this.buffer.readUInt16BE(this.pos);return this.pos+=2,Ne},Ee.prototype.readUint32=function(){var Ne=this.buffer.readUInt32BE(this.pos);return this.pos+=4,Ne},Ee.prototype.readFloat32=function(){var Ne=this.buffer.readFloatBE(this.pos);return this.pos+=4,Ne},Ee.prototype.readFloat64=function(){var Ne=this.buffer.readDoubleBE(this.pos);return this.pos+=8,Ne},Ee.prototype.readChunk=function(Ne){var Pe=Buffer.alloc(Ne);return this.buffer.copy(Pe,0,this.pos,this.pos+=Ne),Pe};function Se(Ne){this.byteLength=0,this.defaultBufferLength=16384,this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0,this.completeBuffers=[],this.stringFormat=Ne}Se.prototype=Object.create(D.prototype),Se.prototype.writeByte=function(Ne){this.latestBuffer[this.latestBufferOffset++]=Ne,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0),this.byteLength++},Se.prototype.writeFloat32=function(Ne){var Pe=Buffer.alloc(4);Pe.writeFloatBE(Ne,0),this.writeBuffer(Pe)},Se.prototype.writeFloat64=function(Ne){var Pe=Buffer.alloc(8);Pe.writeDoubleBE(Ne,0),this.writeBuffer(Pe)},Se.prototype.writeString=function(Ne,Pe){var ve=Buffer.from(Ne,"utf-8");Pe(ve.length),this.writeBuffer(ve)},Se.prototype.canWriteBinary=function(Ne){return Ne instanceof Buffer},Se.prototype.writeBinary=function(Ne,Pe){Pe(Ne.length),this.writeBuffer(Ne)},Se.prototype.writeBuffer=function(Ne){if(!(Ne instanceof Buffer))throw new TypeError("BufferWriter only accepts Buffers");this.latestBufferOffset?this.latestBuffer.length-this.latestBufferOffset>=Ne.length?(Ne.copy(this.latestBuffer,this.latestBufferOffset),this.latestBufferOffset+=Ne.length,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0)):(this.completeBuffers.push(this.latestBuffer.slice(0,this.latestBufferOffset)),this.completeBuffers.push(Ne),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0):this.completeBuffers.push(Ne),this.byteLength+=Ne.length},Se.prototype.result=function(){for(var Ne=Buffer.alloc(this.byteLength),Pe=0,ve=0;ve<this.completeBuffers.length;ve++){var Fe=this.completeBuffers[ve];Fe.copy(Ne,Pe,0,Fe.length),Pe+=Fe.length}return this.latestBufferOffset&&this.latestBuffer.copy(Ne,Pe,0,this.latestBufferOffset),this.stringFormat?Ne.toString(this.stringFormat):Ne},typeof Buffer=="function"&&(Ie.addReader(function(Ne,Pe){if(Buffer.isBuffer(Ne))return new Ee(Ne);if(Pe==="hex"||Pe==="base64"){var ve=Buffer.from(Ne,Pe);return new Ee(ve)}}),Ie.addWriter(function(Ne){if(!Ne||Ne==="buffer")return new Se;if(Ne==="hex"||Ne==="base64")return new Se(Ne)}));function ze(Ne){this.hex=Ne,this.pos=0}ze.prototype=Object.create(B.prototype),ze.prototype.peekByte=function(){var Ne=this.hex.substring(this.pos,2);return parseInt(Ne,16)},ze.prototype.readByte=function(){var Ne=this.hex.substring(this.pos,this.pos+2);return this.pos+=2,parseInt(Ne,16)},ze.prototype.readChunk=function(Ne){var Pe=this.hex.substring(this.pos,this.pos+Ne*2);return this.pos+=Ne*2,typeof Buffer=="function"?Buffer.from(Pe,"hex"):new y(Pe)};function He(Ne){this.$hex="",this.finalFormat=Ne||"hex"}return He.prototype=Object.create(D.prototype),He.prototype.writeByte=function(Ne){if(Ne<0||Ne>255)throw new Error("Byte value out of range: "+Ne);var Pe=Ne.toString(16);Pe.length==1&&(Pe="0"+Pe),this.$hex+=Pe},He.prototype.canWriteBinary=function(Ne){return Ne instanceof y||typeof Buffer=="function"&&Ne instanceof Buffer},He.prototype.writeBinary=function(Ne,Pe){if(Ne instanceof y)Pe(Ne.length()),this.$hex+=Ne.$hex;else if(typeof Buffer=="function"&&Ne instanceof Buffer)Pe(Ne.length),this.$hex+=Ne.toString("hex");else throw new TypeError("HexWriter only accepts BinaryHex or Buffers")},He.prototype.result=function(){return this.finalFormat==="buffer"&&typeof Buffer=="function"?Buffer.from(this.$hex,"hex"):new y(this.$hex).toString(this.finalFormat)},He.prototype.writeString=function(Ne,Pe){var ve=y.fromUtf8String(Ne);Pe(ve.length()),this.$hex+=ve.$hex},Ie.addReader(function(Ne,Pe){if(Ne instanceof y||Ne.$hex)return new ze(Ne.$hex);if(Pe==="hex")return new ze(Ne)}),Ie.addWriter(function(Ne){if(Ne==="hex")return new He}),Ie}();return c.addSemanticEncode(0,function(y){if(y instanceof Date)return y.toISOString()}).addSemanticDecode(0,function(y){return new Date(y)}).addSemanticDecode(1,function(y){return new Date(y)}),c})}(cborSync$5)),cborSync$5.exports}var hasRequiredLib$8;function requireLib$8(){return hasRequiredLib$8||(hasRequiredLib$8=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.DataItem=o.addWriter=o.addReader=o.addSemanticEncode=o.addSemanticDecode=o.decodeToDataItem=o.encodeDataItem=void 0;var g=requireCborSync$2();Object.defineProperty(o,"encodeDataItem",{enumerable:!0,get:function(){return g.encodeDataItem}}),Object.defineProperty(o,"decodeToDataItem",{enumerable:!0,get:function(){return g.decodeToDataItem}}),Object.defineProperty(o,"addSemanticDecode",{enumerable:!0,get:function(){return g.addSemanticDecode}}),Object.defineProperty(o,"addSemanticEncode",{enumerable:!0,get:function(){return g.addSemanticEncode}}),Object.defineProperty(o,"addReader",{enumerable:!0,get:function(){return g.addReader}}),Object.defineProperty(o,"addWriter",{enumerable:!0,get:function(){return g.addWriter}});var c=requireDataItem$2();Object.defineProperty(o,"DataItem",{enumerable:!0,get:function(){return c.DataItem}})}(lib$8)),lib$8}var hasRequiredUtils$g;function requireUtils$g(){if(hasRequiredUtils$g)return utils$h;hasRequiredUtils$g=1,Object.defineProperty(utils$h,"__esModule",{value:!0}),utils$h.patchTags=void 0;const o=requireLib$8(),g=[],c=y=>{y.forEach(t=>{g.find(d=>d===t)||((0,o.addSemanticEncode)(t,d=>{if(d instanceof o.DataItem&&d.getTag()===t)return d.getData()}),(0,o.addSemanticDecode)(t,d=>new o.DataItem(d,t)),g.push(t))})};return utils$h.patchTags=c,utils$h}var RegistryType$3={},hasRequiredRegistryType$3;function requireRegistryType$3(){if(hasRequiredRegistryType$3)return RegistryType$3;hasRequiredRegistryType$3=1,Object.defineProperty(RegistryType$3,"__esModule",{value:!0}),RegistryType$3.RegistryTypes=RegistryType$3.RegistryType=void 0;class o{constructor(c,y){this.type=c,this.tag=y,this.getTag=()=>this.tag,this.getType=()=>this.type}}return RegistryType$3.RegistryType=o,RegistryType$3.RegistryTypes={UUID:new o("uuid",37),BYTES:new o("bytes",void 0),CRYPTO_HDKEY:new o("crypto-hdkey",303),CRYPTO_KEYPATH:new o("crypto-keypath",304),CRYPTO_COIN_INFO:new o("crypto-coin-info",305),CRYPTO_ECKEY:new o("crypto-eckey",306),CRYPTO_OUTPUT:new o("crypto-output",308),CRYPTO_PSBT:new o("crypto-psbt",310),CRYPTO_PSBT_EXTEND:new o("crypto-psbt-extend",312),CRYPTO_ACCOUNT:new o("crypto-account",311),CRYPTO_MULTI_ACCOUNTS:new o("crypto-multi-accounts",1103),QR_HARDWARE_CALL:new o("qr-hardware-call",1201),KEY_DERIVATION_CALL:new o("key-derivation-call",1301),KEY_DERIVATION_SCHEMA:new o("key-derivation-schema",1302),DERIVE_CONTEXT_HASH_CALL:new o("derive-context-hash-call",1303)},RegistryType$3}var ScriptExpression$2={},hasRequiredScriptExpression$2;function requireScriptExpression$2(){return hasRequiredScriptExpression$2||(hasRequiredScriptExpression$2=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.ScriptExpressions=o.ScriptExpression=void 0;class g{constructor(y,t){this.tag=y,this.expression=t,this.getTag=()=>this.tag,this.getExpression=()=>this.expression}}o.ScriptExpression=g,g.fromTag=c=>Object.values(o.ScriptExpressions).find(t=>t.getTag()===c),o.ScriptExpressions={SCRIPT_HASH:new g(400,"sh"),WITNESS_SCRIPT_HASH:new g(401,"wsh"),PUBLIC_KEY:new g(402,"pk"),PUBLIC_KEY_HASH:new g(403,"pkh"),WITNESS_PUBLIC_KEY_HASH:new g(404,"wpkh"),COMBO:new g(405,"combo"),MULTISIG:new g(406,"multi"),SORTED_MULTISIG:new g(407,"sortedmulti"),ADDRESS:new g(307,"addr"),RAW_SCRIPT:new g(408,"raw")}}(ScriptExpression$2)),ScriptExpression$2}var hasRequiredPatchCBOR$2;function requirePatchCBOR$2(){if(hasRequiredPatchCBOR$2)return patchCBOR$2;hasRequiredPatchCBOR$2=1,Object.defineProperty(patchCBOR$2,"__esModule",{value:!0});const o=requireUtils$g(),g=requireRegistryType$3(),c=requireScriptExpression$2(),y=Object.values(g.RegistryTypes).filter(d=>!!d.getTag()).map(d=>d.getTag()),t=Object.values(c.ScriptExpressions).map(d=>d.getTag());return(0,o.patchTags)(y.concat(t)),patchCBOR$2}var CryptoHDKey$2={},inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(g,c){c&&(g.super_=c,g.prototype=Object.create(c.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(g,c){if(c){g.super_=c;var y=function(){};y.prototype=c.prototype,g.prototype=new y,g.prototype.constructor=g}}),inherits_browser.exports}var safeBuffer$1={exports:{}};var hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(o,g){var c=requireBuffer$2(),y=c.Buffer;function t(E,B){for(var D in E)B[D]=E[D]}y.from&&y.alloc&&y.allocUnsafe&&y.allocUnsafeSlow?o.exports=c:(t(c,g),g.Buffer=d);function d(E,B,D){return y(E,B,D)}d.prototype=Object.create(y.prototype),t(y,d),d.from=function(E,B,D){if(typeof E=="number")throw new TypeError("Argument must not be a number");return y(E,B,D)},d.alloc=function(E,B,D){if(typeof E!="number")throw new TypeError("Argument must be a number");var x=y(E);return B!==void 0?typeof D=="string"?x.fill(B,D):x.fill(B):x.fill(0),x},d.allocUnsafe=function(E){if(typeof E!="number")throw new TypeError("Argument must be a number");return y(E)},d.allocUnsafeSlow=function(E){if(typeof E!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(E)}}(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var readableBrowser$1={exports:{}},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var o=typeof Reflect=="object"?Reflect:null,g=o&&typeof o.apply=="function"?o.apply:function(ze,He,Ne){return Function.prototype.apply.call(ze,He,Ne)},c;o&&typeof o.ownKeys=="function"?c=o.ownKeys:Object.getOwnPropertySymbols?c=function(ze){return Object.getOwnPropertyNames(ze).concat(Object.getOwnPropertySymbols(ze))}:c=function(ze){return Object.getOwnPropertyNames(ze)};function y(Se){console&&console.warn&&console.warn(Se)}var t=Number.isNaN||function(ze){return ze!==ze};function d(){d.init.call(this)}events.exports=d,events.exports.once=ge,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var E=10;function B(Se){if(typeof Se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Se)}Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return E},set:function(Se){if(typeof Se!="number"||Se<0||t(Se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Se+".");E=Se}}),d.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},d.prototype.setMaxListeners=function(ze){if(typeof ze!="number"||ze<0||t(ze))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ze+".");return this._maxListeners=ze,this};function D(Se){return Se._maxListeners===void 0?d.defaultMaxListeners:Se._maxListeners}d.prototype.getMaxListeners=function(){return D(this)},d.prototype.emit=function(ze){for(var He=[],Ne=1;Ne<arguments.length;Ne++)He.push(arguments[Ne]);var Pe=ze==="error",ve=this._events;if(ve!==void 0)Pe=Pe&&ve.error===void 0;else if(!Pe)return!1;if(Pe){var Fe;if(He.length>0&&(Fe=He[0]),Fe instanceof Error)throw Fe;var be=new Error("Unhandled error."+(Fe?" ("+Fe.message+")":""));throw be.context=Fe,be}var Be=ve[ze];if(Be===void 0)return!1;if(typeof Be=="function")g(Be,this,He);else for(var ke=Be.length,xe=L(Be,ke),Ne=0;Ne<ke;++Ne)g(xe[Ne],this,He);return!0};function x(Se,ze,He,Ne){var Pe,ve,Fe;if(B(He),ve=Se._events,ve===void 0?(ve=Se._events=Object.create(null),Se._eventsCount=0):(ve.newListener!==void 0&&(Se.emit("newListener",ze,He.listener?He.listener:He),ve=Se._events),Fe=ve[ze]),Fe===void 0)Fe=ve[ze]=He,++Se._eventsCount;else if(typeof Fe=="function"?Fe=ve[ze]=Ne?[He,Fe]:[Fe,He]:Ne?Fe.unshift(He):Fe.push(He),Pe=D(Se),Pe>0&&Fe.length>Pe&&!Fe.warned){Fe.warned=!0;var be=new Error("Possible EventEmitter memory leak detected. "+Fe.length+" "+String(ze)+" listeners added. Use emitter.setMaxListeners() to increase limit");be.name="MaxListenersExceededWarning",be.emitter=Se,be.type=ze,be.count=Fe.length,y(be)}return Se}d.prototype.addListener=function(ze,He){return x(this,ze,He,!1)},d.prototype.on=d.prototype.addListener,d.prototype.prependListener=function(ze,He){return x(this,ze,He,!0)};function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function F(Se,ze,He){var Ne={fired:!1,wrapFn:void 0,target:Se,type:ze,listener:He},Pe=v.bind(Ne);return Pe.listener=He,Ne.wrapFn=Pe,Pe}d.prototype.once=function(ze,He){return B(He),this.on(ze,F(this,ze,He)),this},d.prototype.prependOnceListener=function(ze,He){return B(He),this.prependListener(ze,F(this,ze,He)),this},d.prototype.removeListener=function(ze,He){var Ne,Pe,ve,Fe,be;if(B(He),Pe=this._events,Pe===void 0)return this;if(Ne=Pe[ze],Ne===void 0)return this;if(Ne===He||Ne.listener===He)--this._eventsCount===0?this._events=Object.create(null):(delete Pe[ze],Pe.removeListener&&this.emit("removeListener",ze,Ne.listener||He));else if(typeof Ne!="function"){for(ve=-1,Fe=Ne.length-1;Fe>=0;Fe--)if(Ne[Fe]===He||Ne[Fe].listener===He){be=Ne[Fe].listener,ve=Fe;break}if(ve<0)return this;ve===0?Ne.shift():H(Ne,ve),Ne.length===1&&(Pe[ze]=Ne[0]),Pe.removeListener!==void 0&&this.emit("removeListener",ze,be||He)}return this},d.prototype.off=d.prototype.removeListener,d.prototype.removeAllListeners=function(ze){var He,Ne,Pe;if(Ne=this._events,Ne===void 0)return this;if(Ne.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ne[ze]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ne[ze]),this;if(arguments.length===0){var ve=Object.keys(Ne),Fe;for(Pe=0;Pe<ve.length;++Pe)Fe=ve[Pe],Fe!=="removeListener"&&this.removeAllListeners(Fe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(He=Ne[ze],typeof He=="function")this.removeListener(ze,He);else if(He!==void 0)for(Pe=He.length-1;Pe>=0;Pe--)this.removeListener(ze,He[Pe]);return this};function M(Se,ze,He){var Ne=Se._events;if(Ne===void 0)return[];var Pe=Ne[ze];return Pe===void 0?[]:typeof Pe=="function"?He?[Pe.listener||Pe]:[Pe]:He?fe(Pe):L(Pe,Pe.length)}d.prototype.listeners=function(ze){return M(this,ze,!0)},d.prototype.rawListeners=function(ze){return M(this,ze,!1)},d.listenerCount=function(Se,ze){return typeof Se.listenerCount=="function"?Se.listenerCount(ze):U.call(Se,ze)},d.prototype.listenerCount=U;function U(Se){var ze=this._events;if(ze!==void 0){var He=ze[Se];if(typeof He=="function")return 1;if(He!==void 0)return He.length}return 0}d.prototype.eventNames=function(){return this._eventsCount>0?c(this._events):[]};function L(Se,ze){for(var He=new Array(ze),Ne=0;Ne<ze;++Ne)He[Ne]=Se[Ne];return He}function H(Se,ze){for(;ze+1<Se.length;ze++)Se[ze]=Se[ze+1];Se.pop()}function fe(Se){for(var ze=new Array(Se.length),He=0;He<ze.length;++He)ze[He]=Se[He].listener||Se[He];return ze}function ge(Se,ze){return new Promise(function(He,Ne){function Pe(Fe){Se.removeListener(ze,ve),Ne(Fe)}function ve(){typeof Se.removeListener=="function"&&Se.removeListener("error",Pe),He([].slice.call(arguments))}Ee(Se,ze,ve,{once:!0}),ze!=="error"&&Ie(Se,Pe,{once:!0})})}function Ie(Se,ze,He){typeof Se.on=="function"&&Ee(Se,"error",ze,He)}function Ee(Se,ze,He,Ne){if(typeof Se.on=="function")Ne.once?Se.once(ze,He):Se.on(ze,He);else if(typeof Se.addEventListener=="function")Se.addEventListener(ze,function Pe(ve){Ne.once&&Se.removeEventListener(ze,Pe),He(ve)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Se)}return events.exports}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$2$2=getAugmentedNamespace(__viteBrowserExternal$1);var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function o(L,H){var fe=Object.keys(L);if(Object.getOwnPropertySymbols){var ge=Object.getOwnPropertySymbols(L);H&&(ge=ge.filter(function(Ie){return Object.getOwnPropertyDescriptor(L,Ie).enumerable})),fe.push.apply(fe,ge)}return fe}function g(L){for(var H=1;H<arguments.length;H++){var fe=arguments[H]!=null?arguments[H]:{};H%2?o(Object(fe),!0).forEach(function(ge){c(L,ge,fe[ge])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(fe)):o(Object(fe)).forEach(function(ge){Object.defineProperty(L,ge,Object.getOwnPropertyDescriptor(fe,ge))})}return L}function c(L,H,fe){return H=E(H),H in L?Object.defineProperty(L,H,{value:fe,enumerable:!0,configurable:!0,writable:!0}):L[H]=fe,L}function y(L,H){if(!(L instanceof H))throw new TypeError("Cannot call a class as a function")}function t(L,H){for(var fe=0;fe<H.length;fe++){var ge=H[fe];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(L,E(ge.key),ge)}}function d(L,H,fe){return H&&t(L.prototype,H),Object.defineProperty(L,"prototype",{writable:!1}),L}function E(L){var H=B(L,"string");return typeof H=="symbol"?H:String(H)}function B(L,H){if(typeof L!="object"||L===null)return L;var fe=L[Symbol.toPrimitive];if(fe!==void 0){var ge=fe.call(L,H);if(typeof ge!="object")return ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(L)}var D=requireBuffer$2(),x=D.Buffer,v=require$$2$2,F=v.inspect,M=F&&F.custom||"inspect";function U(L,H,fe){x.prototype.copy.call(L,H,fe)}return buffer_list=function(){function L(){y(this,L),this.head=null,this.tail=null,this.length=0}return d(L,[{key:"push",value:function(fe){var ge={data:fe,next:null};this.length>0?this.tail.next=ge:this.head=ge,this.tail=ge,++this.length}},{key:"unshift",value:function(fe){var ge={data:fe,next:this.head};this.length===0&&(this.tail=ge),this.head=ge,++this.length}},{key:"shift",value:function(){if(this.length!==0){var fe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,fe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(fe){if(this.length===0)return"";for(var ge=this.head,Ie=""+ge.data;ge=ge.next;)Ie+=fe+ge.data;return Ie}},{key:"concat",value:function(fe){if(this.length===0)return x.alloc(0);for(var ge=x.allocUnsafe(fe>>>0),Ie=this.head,Ee=0;Ie;)U(Ie.data,ge,Ee),Ee+=Ie.data.length,Ie=Ie.next;return ge}},{key:"consume",value:function(fe,ge){var Ie;return fe<this.head.data.length?(Ie=this.head.data.slice(0,fe),this.head.data=this.head.data.slice(fe)):fe===this.head.data.length?Ie=this.shift():Ie=ge?this._getString(fe):this._getBuffer(fe),Ie}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(fe){var ge=this.head,Ie=1,Ee=ge.data;for(fe-=Ee.length;ge=ge.next;){var Se=ge.data,ze=fe>Se.length?Se.length:fe;if(ze===Se.length?Ee+=Se:Ee+=Se.slice(0,fe),fe-=ze,fe===0){ze===Se.length?(++Ie,ge.next?this.head=ge.next:this.head=this.tail=null):(this.head=ge,ge.data=Se.slice(ze));break}++Ie}return this.length-=Ie,Ee}},{key:"_getBuffer",value:function(fe){var ge=x.allocUnsafe(fe),Ie=this.head,Ee=1;for(Ie.data.copy(ge),fe-=Ie.data.length;Ie=Ie.next;){var Se=Ie.data,ze=fe>Se.length?Se.length:fe;if(Se.copy(ge,ge.length-fe,0,ze),fe-=ze,fe===0){ze===Se.length?(++Ee,Ie.next?this.head=Ie.next:this.head=this.tail=null):(this.head=Ie,Ie.data=Se.slice(ze));break}++Ee}return this.length-=Ee,ge}},{key:M,value:function(fe,ge){return F(this,g(g({},ge),{},{depth:0,customInspect:!1}))}}]),L}(),buffer_list}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;function o(E,B){var D=this,x=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return x||v?(B?B(E):E&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ETHWalletProvider.process$1.nextTick(t,this,E)):ETHWalletProvider.process$1.nextTick(t,this,E)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(E||null,function(F){!B&&F?D._writableState?D._writableState.errorEmitted?ETHWalletProvider.process$1.nextTick(c,D):(D._writableState.errorEmitted=!0,ETHWalletProvider.process$1.nextTick(g,D,F)):ETHWalletProvider.process$1.nextTick(g,D,F):B?(ETHWalletProvider.process$1.nextTick(c,D),B(F)):ETHWalletProvider.process$1.nextTick(c,D)}),this)}function g(E,B){t(E,B),c(E)}function c(E){E._writableState&&!E._writableState.emitClose||E._readableState&&!E._readableState.emitClose||E.emit("close")}function y(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function t(E,B){E.emit("error",B)}function d(E,B){var D=E._readableState,x=E._writableState;D&&D.autoDestroy||x&&x.autoDestroy?E.destroy(B):E.emit("error",B)}return destroy_1$1={destroy:o,undestroy:y,errorOrDestroy:d},destroy_1$1}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function o(B,D){B.prototype=Object.create(D.prototype),B.prototype.constructor=B,B.__proto__=D}var g={};function c(B,D,x){x||(x=Error);function v(M,U,L){return typeof D=="string"?D:D(M,U,L)}var F=function(M){o(U,M);function U(L,H,fe){return M.call(this,v(L,H,fe))||this}return U}(x);F.prototype.name=x.name,F.prototype.code=B,g[B]=F}function y(B,D){if(Array.isArray(B)){var x=B.length;return B=B.map(function(v){return String(v)}),x>2?"one of ".concat(D," ").concat(B.slice(0,x-1).join(", "),", or ")+B[x-1]:x===2?"one of ".concat(D," ").concat(B[0]," or ").concat(B[1]):"of ".concat(D," ").concat(B[0])}else return"of ".concat(D," ").concat(String(B))}function t(B,D,x){return B.substr(0,D.length)===D}function d(B,D,x){return(x===void 0||x>B.length)&&(x=B.length),B.substring(x-D.length,x)===D}function E(B,D,x){return typeof x!="number"&&(x=0),x+D.length>B.length?!1:B.indexOf(D,x)!==-1}return c("ERR_INVALID_OPT_VALUE",function(B,D){return'The value "'+D+'" is invalid for option "'+B+'"'},TypeError),c("ERR_INVALID_ARG_TYPE",function(B,D,x){var v;typeof D=="string"&&t(D,"not ")?(v="must not be",D=D.replace(/^not /,"")):v="must be";var F;if(d(B," argument"))F="The ".concat(B," ").concat(v," ").concat(y(D,"type"));else{var M=E(B,".")?"property":"argument";F='The "'.concat(B,'" ').concat(M," ").concat(v," ").concat(y(D,"type"))}return F+=". Received type ".concat(typeof x),F},TypeError),c("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),c("ERR_METHOD_NOT_IMPLEMENTED",function(B){return"The "+B+" method is not implemented"}),c("ERR_STREAM_PREMATURE_CLOSE","Premature close"),c("ERR_STREAM_DESTROYED",function(B){return"Cannot call "+B+" after a stream was destroyed"}),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),c("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),c("ERR_STREAM_WRITE_AFTER_END","write after end"),c("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),c("ERR_UNKNOWN_ENCODING",function(B){return"Unknown encoding: "+B},TypeError),c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=g,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var o=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function g(y,t,d){return y.highWaterMark!=null?y.highWaterMark:t?y[d]:null}function c(y,t,d,E){var B=g(t,E,d);if(B!=null){if(!(isFinite(B)&&Math.floor(B)===B)||B<0){var D=E?d:"highWaterMark";throw new o(D,B)}return Math.floor(B)}return y.objectMode?16:16*1024}return state={getHighWaterMark:c},state}var browser$b,hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b;hasRequiredBrowser$b=1,browser$b=o;function o(c,y){if(g("noDeprecation"))return c;var t=!1;function d(){if(!t){if(g("throwDeprecation"))throw new Error(y);g("traceDeprecation")?console.trace(y):console.warn(y),t=!0}return c.apply(this,arguments)}return d}function g(c){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var y=commonjsGlobal.localStorage[c];return y==null?!1:String(y).toLowerCase()==="true"}return browser$b}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1,_stream_writable$1=Pe;function o(Mr){var Dr=this;this.next=null,this.entry=null,this.finish=function(){qr(Dr,Mr)}}var g;Pe.WritableState=He;var c={deprecate:requireBrowser$b()},y=requireStreamBrowser$1(),t=requireBuffer$2().Buffer,d=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function E(Mr){return t.from(Mr)}function B(Mr){return t.isBuffer(Mr)||Mr instanceof d}var D=requireDestroy$1(),x=requireState(),v=x.getHighWaterMark,F=requireErrorsBrowser().codes,M=F.ERR_INVALID_ARG_TYPE,U=F.ERR_METHOD_NOT_IMPLEMENTED,L=F.ERR_MULTIPLE_CALLBACK,H=F.ERR_STREAM_CANNOT_PIPE,fe=F.ERR_STREAM_DESTROYED,ge=F.ERR_STREAM_NULL_VALUES,Ie=F.ERR_STREAM_WRITE_AFTER_END,Ee=F.ERR_UNKNOWN_ENCODING,Se=D.errorOrDestroy;requireInherits_browser()(Pe,y);function ze(){}function He(Mr,Dr,Qr){g=g||require_stream_duplex$1(),Mr=Mr||{},typeof Qr!="boolean"&&(Qr=Dr instanceof g),this.objectMode=!!Mr.objectMode,Qr&&(this.objectMode=this.objectMode||!!Mr.writableObjectMode),this.highWaterMark=v(this,Mr,"writableHighWaterMark",Qr),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Xr=Mr.decodeStrings===!1;this.decodeStrings=!Xr,this.defaultEncoding=Mr.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Wr){Et(Dr,Wr)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Mr.emitClose!==!1,this.autoDestroy=!!Mr.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}He.prototype.getBuffer=function(){for(var Dr=this.bufferedRequest,Qr=[];Dr;)Qr.push(Dr),Dr=Dr.next;return Qr},function(){try{Object.defineProperty(He.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(Pe,Symbol.hasInstance,{value:function(Dr){return Ne.call(this,Dr)?!0:this!==Pe?!1:Dr&&Dr._writableState instanceof He}})):Ne=function(Dr){return Dr instanceof this};function Pe(Mr){g=g||require_stream_duplex$1();var Dr=this instanceof g;if(!Dr&&!Ne.call(Pe,this))return new Pe(Mr);this._writableState=new He(Mr,this,Dr),this.writable=!0,Mr&&(typeof Mr.write=="function"&&(this._write=Mr.write),typeof Mr.writev=="function"&&(this._writev=Mr.writev),typeof Mr.destroy=="function"&&(this._destroy=Mr.destroy),typeof Mr.final=="function"&&(this._final=Mr.final)),y.call(this)}Pe.prototype.pipe=function(){Se(this,new H)};function ve(Mr,Dr){var Qr=new Ie;Se(Mr,Qr),ETHWalletProvider.process$1.nextTick(Dr,Qr)}function Fe(Mr,Dr,Qr,Xr){var Wr;return Qr===null?Wr=new ge:typeof Qr!="string"&&!Dr.objectMode&&(Wr=new M("chunk",["string","Buffer"],Qr)),Wr?(Se(Mr,Wr),ETHWalletProvider.process$1.nextTick(Xr,Wr),!1):!0}Pe.prototype.write=function(Mr,Dr,Qr){var Xr=this._writableState,Wr=!1,Ur=!Xr.objectMode&&B(Mr);return Ur&&!t.isBuffer(Mr)&&(Mr=E(Mr)),typeof Dr=="function"&&(Qr=Dr,Dr=null),Ur?Dr="buffer":Dr||(Dr=Xr.defaultEncoding),typeof Qr!="function"&&(Qr=ze),Xr.ending?ve(this,Qr):(Ur||Fe(this,Xr,Mr,Qr))&&(Xr.pendingcb++,Wr=Be(this,Xr,Ur,Mr,Dr,Qr)),Wr},Pe.prototype.cork=function(){this._writableState.corked++},Pe.prototype.uncork=function(){var Mr=this._writableState;Mr.corked&&(Mr.corked--,!Mr.writing&&!Mr.corked&&!Mr.bufferProcessing&&Mr.bufferedRequest&&er(this,Mr))},Pe.prototype.setDefaultEncoding=function(Dr){if(typeof Dr=="string"&&(Dr=Dr.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Dr+"").toLowerCase())>-1))throw new Ee(Dr);return this._writableState.defaultEncoding=Dr,this},Object.defineProperty(Pe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function be(Mr,Dr,Qr){return!Mr.objectMode&&Mr.decodeStrings!==!1&&typeof Dr=="string"&&(Dr=t.from(Dr,Qr)),Dr}Object.defineProperty(Pe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Be(Mr,Dr,Qr,Xr,Wr,Ur){if(!Qr){var Sr=be(Dr,Xr,Wr);Xr!==Sr&&(Qr=!0,Wr="buffer",Xr=Sr)}var Gr=Dr.objectMode?1:Xr.length;Dr.length+=Gr;var Fr=Dr.length<Dr.highWaterMark;if(Fr||(Dr.needDrain=!0),Dr.writing||Dr.corked){var br=Dr.lastBufferedRequest;Dr.lastBufferedRequest={chunk:Xr,encoding:Wr,isBuf:Qr,callback:Ur,next:null},br?br.next=Dr.lastBufferedRequest:Dr.bufferedRequest=Dr.lastBufferedRequest,Dr.bufferedRequestCount+=1}else ke(Mr,Dr,!1,Gr,Xr,Wr,Ur);return Fr}function ke(Mr,Dr,Qr,Xr,Wr,Ur,Sr){Dr.writelen=Xr,Dr.writecb=Sr,Dr.writing=!0,Dr.sync=!0,Dr.destroyed?Dr.onwrite(new fe("write")):Qr?Mr._writev(Wr,Dr.onwrite):Mr._write(Wr,Ur,Dr.onwrite),Dr.sync=!1}function xe(Mr,Dr,Qr,Xr,Wr){--Dr.pendingcb,Qr?(ETHWalletProvider.process$1.nextTick(Wr,Xr),ETHWalletProvider.process$1.nextTick(yr,Mr,Dr),Mr._writableState.errorEmitted=!0,Se(Mr,Xr)):(Wr(Xr),Mr._writableState.errorEmitted=!0,Se(Mr,Xr),yr(Mr,Dr))}function De(Mr){Mr.writing=!1,Mr.writecb=null,Mr.length-=Mr.writelen,Mr.writelen=0}function Et(Mr,Dr){var Qr=Mr._writableState,Xr=Qr.sync,Wr=Qr.writecb;if(typeof Wr!="function")throw new L;if(De(Qr),Dr)xe(Mr,Qr,Xr,Dr,Wr);else{var Ur=xt(Qr)||Mr.destroyed;!Ur&&!Qr.corked&&!Qr.bufferProcessing&&Qr.bufferedRequest&&er(Mr,Qr),Xr?ETHWalletProvider.process$1.nextTick(st,Mr,Qr,Ur,Wr):st(Mr,Qr,Ur,Wr)}}function st(Mr,Dr,Qr,Xr){Qr||Dt(Mr,Dr),Dr.pendingcb--,Xr(),yr(Mr,Dr)}function Dt(Mr,Dr){Dr.length===0&&Dr.needDrain&&(Dr.needDrain=!1,Mr.emit("drain"))}function er(Mr,Dr){Dr.bufferProcessing=!0;var Qr=Dr.bufferedRequest;if(Mr._writev&&Qr&&Qr.next){var Xr=Dr.bufferedRequestCount,Wr=new Array(Xr),Ur=Dr.corkedRequestsFree;Ur.entry=Qr;for(var Sr=0,Gr=!0;Qr;)Wr[Sr]=Qr,Qr.isBuf||(Gr=!1),Qr=Qr.next,Sr+=1;Wr.allBuffers=Gr,ke(Mr,Dr,!0,Dr.length,Wr,"",Ur.finish),Dr.pendingcb++,Dr.lastBufferedRequest=null,Ur.next?(Dr.corkedRequestsFree=Ur.next,Ur.next=null):Dr.corkedRequestsFree=new o(Dr),Dr.bufferedRequestCount=0}else{for(;Qr;){var Fr=Qr.chunk,br=Qr.encoding,Ar=Qr.callback,cr=Dr.objectMode?1:Fr.length;if(ke(Mr,Dr,!1,cr,Fr,br,Ar),Qr=Qr.next,Dr.bufferedRequestCount--,Dr.writing)break}Qr===null&&(Dr.lastBufferedRequest=null)}Dr.bufferedRequest=Qr,Dr.bufferProcessing=!1}Pe.prototype._write=function(Mr,Dr,Qr){Qr(new U("_write()"))},Pe.prototype._writev=null,Pe.prototype.end=function(Mr,Dr,Qr){var Xr=this._writableState;return typeof Mr=="function"?(Qr=Mr,Mr=null,Dr=null):typeof Dr=="function"&&(Qr=Dr,Dr=null),Mr!=null&&this.write(Mr,Dr),Xr.corked&&(Xr.corked=1,this.uncork()),Xr.ending||wr(this,Xr,Qr),this},Object.defineProperty(Pe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function xt(Mr){return Mr.ending&&Mr.length===0&&Mr.bufferedRequest===null&&!Mr.finished&&!Mr.writing}function ir(Mr,Dr){Mr._final(function(Qr){Dr.pendingcb--,Qr&&Se(Mr,Qr),Dr.prefinished=!0,Mr.emit("prefinish"),yr(Mr,Dr)})}function sr(Mr,Dr){!Dr.prefinished&&!Dr.finalCalled&&(typeof Mr._final=="function"&&!Dr.destroyed?(Dr.pendingcb++,Dr.finalCalled=!0,ETHWalletProvider.process$1.nextTick(ir,Mr,Dr)):(Dr.prefinished=!0,Mr.emit("prefinish")))}function yr(Mr,Dr){var Qr=xt(Dr);if(Qr&&(sr(Mr,Dr),Dr.pendingcb===0&&(Dr.finished=!0,Mr.emit("finish"),Dr.autoDestroy))){var Xr=Mr._readableState;(!Xr||Xr.autoDestroy&&Xr.endEmitted)&&Mr.destroy()}return Qr}function wr(Mr,Dr,Qr){Dr.ending=!0,yr(Mr,Dr),Qr&&(Dr.finished?ETHWalletProvider.process$1.nextTick(Qr):Mr.once("finish",Qr)),Dr.ended=!0,Mr.writable=!1}function qr(Mr,Dr,Qr){var Xr=Mr.entry;for(Mr.entry=null;Xr;){var Wr=Xr.callback;Dr.pendingcb--,Wr(Qr),Xr=Xr.next}Dr.corkedRequestsFree.next=Mr}return Object.defineProperty(Pe.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Dr){this._writableState&&(this._writableState.destroyed=Dr)}}),Pe.prototype.destroy=D.destroy,Pe.prototype._undestroy=D.undestroy,Pe.prototype._destroy=function(Mr,Dr){Dr(Mr)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var o=Object.keys||function(x){var v=[];for(var F in x)v.push(F);return v};_stream_duplex$1=E;var g=require_stream_readable$1(),c=require_stream_writable$1();requireInherits_browser()(E,g);for(var y=o(c.prototype),t=0;t<y.length;t++){var d=y[t];E.prototype[d]||(E.prototype[d]=c.prototype[d])}function E(x){if(!(this instanceof E))return new E(x);g.call(this,x),c.call(this,x),this.allowHalfOpen=!0,x&&(x.readable===!1&&(this.readable=!1),x.writable===!1&&(this.writable=!1),x.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",B)))}Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function B(){this._writableState.ended||ETHWalletProvider.process$1.nextTick(D,this)}function D(x){x.end()}return Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=v,this._writableState.destroyed=v)}}),_stream_duplex$1}var string_decoder$1={},hasRequiredString_decoder$1;function requireString_decoder$1(){if(hasRequiredString_decoder$1)return string_decoder$1;hasRequiredString_decoder$1=1;var o=requireSafeBuffer$1().Buffer,g=o.isEncoding||function(ge){switch(ge=""+ge,ge&&ge.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(ge){if(!ge)return"utf8";for(var Ie;;)switch(ge){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return ge;default:if(Ie)return;ge=(""+ge).toLowerCase(),Ie=!0}}function y(ge){var Ie=c(ge);if(typeof Ie!="string"&&(o.isEncoding===g||!g(ge)))throw new Error("Unknown encoding: "+ge);return Ie||ge}string_decoder$1.StringDecoder=t;function t(ge){this.encoding=y(ge);var Ie;switch(this.encoding){case"utf16le":this.text=F,this.end=M,Ie=4;break;case"utf8":this.fillLast=D,Ie=4;break;case"base64":this.text=U,this.end=L,Ie=3;break;default:this.write=H,this.end=fe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(Ie)}t.prototype.write=function(ge){if(ge.length===0)return"";var Ie,Ee;if(this.lastNeed){if(Ie=this.fillLast(ge),Ie===void 0)return"";Ee=this.lastNeed,this.lastNeed=0}else Ee=0;return Ee<ge.length?Ie?Ie+this.text(ge,Ee):this.text(ge,Ee):Ie||""},t.prototype.end=v,t.prototype.text=x,t.prototype.fillLast=function(ge){if(this.lastNeed<=ge.length)return ge.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);ge.copy(this.lastChar,this.lastTotal-this.lastNeed,0,ge.length),this.lastNeed-=ge.length};function d(ge){return ge<=127?0:ge>>5===6?2:ge>>4===14?3:ge>>3===30?4:ge>>6===2?-1:-2}function E(ge,Ie,Ee){var Se=Ie.length-1;if(Se<Ee)return 0;var ze=d(Ie[Se]);return ze>=0?(ze>0&&(ge.lastNeed=ze-1),ze):--Se<Ee||ze===-2?0:(ze=d(Ie[Se]),ze>=0?(ze>0&&(ge.lastNeed=ze-2),ze):--Se<Ee||ze===-2?0:(ze=d(Ie[Se]),ze>=0?(ze>0&&(ze===2?ze=0:ge.lastNeed=ze-3),ze):0))}function B(ge,Ie,Ee){if((Ie[0]&192)!==128)return ge.lastNeed=0,"�";if(ge.lastNeed>1&&Ie.length>1){if((Ie[1]&192)!==128)return ge.lastNeed=1,"�";if(ge.lastNeed>2&&Ie.length>2&&(Ie[2]&192)!==128)return ge.lastNeed=2,"�"}}function D(ge){var Ie=this.lastTotal-this.lastNeed,Ee=B(this,ge);if(Ee!==void 0)return Ee;if(this.lastNeed<=ge.length)return ge.copy(this.lastChar,Ie,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);ge.copy(this.lastChar,Ie,0,ge.length),this.lastNeed-=ge.length}function x(ge,Ie){var Ee=E(this,ge,Ie);if(!this.lastNeed)return ge.toString("utf8",Ie);this.lastTotal=Ee;var Se=ge.length-(Ee-this.lastNeed);return ge.copy(this.lastChar,0,Se),ge.toString("utf8",Ie,Se)}function v(ge){var Ie=ge&&ge.length?this.write(ge):"";return this.lastNeed?Ie+"�":Ie}function F(ge,Ie){if((ge.length-Ie)%2===0){var Ee=ge.toString("utf16le",Ie);if(Ee){var Se=Ee.charCodeAt(Ee.length-1);if(Se>=55296&&Se<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ge[ge.length-2],this.lastChar[1]=ge[ge.length-1],Ee.slice(0,-1)}return Ee}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ge[ge.length-1],ge.toString("utf16le",Ie,ge.length-1)}function M(ge){var Ie=ge&&ge.length?this.write(ge):"";if(this.lastNeed){var Ee=this.lastTotal-this.lastNeed;return Ie+this.lastChar.toString("utf16le",0,Ee)}return Ie}function U(ge,Ie){var Ee=(ge.length-Ie)%3;return Ee===0?ge.toString("base64",Ie):(this.lastNeed=3-Ee,this.lastTotal=3,Ee===1?this.lastChar[0]=ge[ge.length-1]:(this.lastChar[0]=ge[ge.length-2],this.lastChar[1]=ge[ge.length-1]),ge.toString("base64",Ie,ge.length-Ee))}function L(ge){var Ie=ge&&ge.length?this.write(ge):"";return this.lastNeed?Ie+this.lastChar.toString("base64",0,3-this.lastNeed):Ie}function H(ge){return ge.toString(this.encoding)}function fe(ge){return ge&&ge.length?this.write(ge):""}return string_decoder$1}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var o=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function g(d){var E=!1;return function(){if(!E){E=!0;for(var B=arguments.length,D=new Array(B),x=0;x<B;x++)D[x]=arguments[x];d.apply(this,D)}}}function c(){}function y(d){return d.setHeader&&typeof d.abort=="function"}function t(d,E,B){if(typeof E=="function")return t(d,null,E);E||(E={}),B=g(B||c);var D=E.readable||E.readable!==!1&&d.readable,x=E.writable||E.writable!==!1&&d.writable,v=function(){d.writable||M()},F=d._writableState&&d._writableState.finished,M=function(){x=!1,F=!0,D||B.call(d)},U=d._readableState&&d._readableState.endEmitted,L=function(){D=!1,U=!0,x||B.call(d)},H=function(Ee){B.call(d,Ee)},fe=function(){var Ee;if(D&&!U)return(!d._readableState||!d._readableState.ended)&&(Ee=new o),B.call(d,Ee);if(x&&!F)return(!d._writableState||!d._writableState.ended)&&(Ee=new o),B.call(d,Ee)},ge=function(){d.req.on("finish",M)};return y(d)?(d.on("complete",M),d.on("abort",fe),d.req?ge():d.on("request",ge)):x&&!d._writableState&&(d.on("end",v),d.on("close",v)),d.on("end",L),d.on("finish",M),E.error!==!1&&d.on("error",H),d.on("close",fe),function(){d.removeListener("complete",M),d.removeListener("abort",fe),d.removeListener("request",ge),d.req&&d.req.removeListener("finish",M),d.removeListener("end",v),d.removeListener("close",v),d.removeListener("finish",M),d.removeListener("end",L),d.removeListener("error",H),d.removeListener("close",fe)}}return endOfStream=t,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var o;function g(Ee,Se,ze){return Se=c(Se),Se in Ee?Object.defineProperty(Ee,Se,{value:ze,enumerable:!0,configurable:!0,writable:!0}):Ee[Se]=ze,Ee}function c(Ee){var Se=y(Ee,"string");return typeof Se=="symbol"?Se:String(Se)}function y(Ee,Se){if(typeof Ee!="object"||Ee===null)return Ee;var ze=Ee[Symbol.toPrimitive];if(ze!==void 0){var He=ze.call(Ee,Se);if(typeof He!="object")return He;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Se==="string"?String:Number)(Ee)}var t=requireEndOfStream(),d=Symbol("lastResolve"),E=Symbol("lastReject"),B=Symbol("error"),D=Symbol("ended"),x=Symbol("lastPromise"),v=Symbol("handlePromise"),F=Symbol("stream");function M(Ee,Se){return{value:Ee,done:Se}}function U(Ee){var Se=Ee[d];if(Se!==null){var ze=Ee[F].read();ze!==null&&(Ee[x]=null,Ee[d]=null,Ee[E]=null,Se(M(ze,!1)))}}function L(Ee){ETHWalletProvider.process$1.nextTick(U,Ee)}function H(Ee,Se){return function(ze,He){Ee.then(function(){if(Se[D]){ze(M(void 0,!0));return}Se[v](ze,He)},He)}}var fe=Object.getPrototypeOf(function(){}),ge=Object.setPrototypeOf((o={get stream(){return this[F]},next:function(){var Se=this,ze=this[B];if(ze!==null)return Promise.reject(ze);if(this[D])return Promise.resolve(M(void 0,!0));if(this[F].destroyed)return new Promise(function(ve,Fe){ETHWalletProvider.process$1.nextTick(function(){Se[B]?Fe(Se[B]):ve(M(void 0,!0))})});var He=this[x],Ne;if(He)Ne=new Promise(H(He,this));else{var Pe=this[F].read();if(Pe!==null)return Promise.resolve(M(Pe,!1));Ne=new Promise(this[v])}return this[x]=Ne,Ne}},g(o,Symbol.asyncIterator,function(){return this}),g(o,"return",function(){var Se=this;return new Promise(function(ze,He){Se[F].destroy(null,function(Ne){if(Ne){He(Ne);return}ze(M(void 0,!0))})})}),o),fe),Ie=function(Se){var ze,He=Object.create(ge,(ze={},g(ze,F,{value:Se,writable:!0}),g(ze,d,{value:null,writable:!0}),g(ze,E,{value:null,writable:!0}),g(ze,B,{value:null,writable:!0}),g(ze,D,{value:Se._readableState.endEmitted,writable:!0}),g(ze,v,{value:function(Pe,ve){var Fe=He[F].read();Fe?(He[x]=null,He[d]=null,He[E]=null,Pe(M(Fe,!1))):(He[d]=Pe,He[E]=ve)},writable:!0}),ze));return He[x]=null,t(Se,function(Ne){if(Ne&&Ne.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Pe=He[E];Pe!==null&&(He[x]=null,He[d]=null,He[E]=null,Pe(Ne)),He[B]=Ne;return}var ve=He[d];ve!==null&&(He[x]=null,He[d]=null,He[E]=null,ve(M(void 0,!0))),He[D]=!0}),Se.on("readable",L.bind(null,He)),He};return async_iterator=Ie,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1,_stream_readable$1=ve;var o;ve.ReadableState=Pe,requireEvents().EventEmitter;var g=function(Sr,Gr){return Sr.listeners(Gr).length},c=requireStreamBrowser$1(),y=requireBuffer$2().Buffer,t=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function d(Ur){return y.from(Ur)}function E(Ur){return y.isBuffer(Ur)||Ur instanceof t}var B=require$$2$2,D;B&&B.debuglog?D=B.debuglog("stream"):D=function(){};var x=requireBuffer_list(),v=requireDestroy$1(),F=requireState(),M=F.getHighWaterMark,U=requireErrorsBrowser().codes,L=U.ERR_INVALID_ARG_TYPE,H=U.ERR_STREAM_PUSH_AFTER_EOF,fe=U.ERR_METHOD_NOT_IMPLEMENTED,ge=U.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ie,Ee,Se;requireInherits_browser()(ve,c);var ze=v.errorOrDestroy,He=["error","close","destroy","pause","resume"];function Ne(Ur,Sr,Gr){if(typeof Ur.prependListener=="function")return Ur.prependListener(Sr,Gr);!Ur._events||!Ur._events[Sr]?Ur.on(Sr,Gr):Array.isArray(Ur._events[Sr])?Ur._events[Sr].unshift(Gr):Ur._events[Sr]=[Gr,Ur._events[Sr]]}function Pe(Ur,Sr,Gr){o=o||require_stream_duplex$1(),Ur=Ur||{},typeof Gr!="boolean"&&(Gr=Sr instanceof o),this.objectMode=!!Ur.objectMode,Gr&&(this.objectMode=this.objectMode||!!Ur.readableObjectMode),this.highWaterMark=M(this,Ur,"readableHighWaterMark",Gr),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Ur.emitClose!==!1,this.autoDestroy=!!Ur.autoDestroy,this.destroyed=!1,this.defaultEncoding=Ur.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ur.encoding&&(Ie||(Ie=requireString_decoder$1().StringDecoder),this.decoder=new Ie(Ur.encoding),this.encoding=Ur.encoding)}function ve(Ur){if(o=o||require_stream_duplex$1(),!(this instanceof ve))return new ve(Ur);var Sr=this instanceof o;this._readableState=new Pe(Ur,this,Sr),this.readable=!0,Ur&&(typeof Ur.read=="function"&&(this._read=Ur.read),typeof Ur.destroy=="function"&&(this._destroy=Ur.destroy)),c.call(this)}Object.defineProperty(ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Sr){this._readableState&&(this._readableState.destroyed=Sr)}}),ve.prototype.destroy=v.destroy,ve.prototype._undestroy=v.undestroy,ve.prototype._destroy=function(Ur,Sr){Sr(Ur)},ve.prototype.push=function(Ur,Sr){var Gr=this._readableState,Fr;return Gr.objectMode?Fr=!0:typeof Ur=="string"&&(Sr=Sr||Gr.defaultEncoding,Sr!==Gr.encoding&&(Ur=y.from(Ur,Sr),Sr=""),Fr=!0),Fe(this,Ur,Sr,!1,Fr)},ve.prototype.unshift=function(Ur){return Fe(this,Ur,null,!0,!1)};function Fe(Ur,Sr,Gr,Fr,br){D("readableAddChunk",Sr);var Ar=Ur._readableState;if(Sr===null)Ar.reading=!1,Et(Ur,Ar);else{var cr;if(br||(cr=Be(Ar,Sr)),cr)ze(Ur,cr);else if(Ar.objectMode||Sr&&Sr.length>0)if(typeof Sr!="string"&&!Ar.objectMode&&Object.getPrototypeOf(Sr)!==y.prototype&&(Sr=d(Sr)),Fr)Ar.endEmitted?ze(Ur,new ge):be(Ur,Ar,Sr,!0);else if(Ar.ended)ze(Ur,new H);else{if(Ar.destroyed)return!1;Ar.reading=!1,Ar.decoder&&!Gr?(Sr=Ar.decoder.write(Sr),Ar.objectMode||Sr.length!==0?be(Ur,Ar,Sr,!1):er(Ur,Ar)):be(Ur,Ar,Sr,!1)}else Fr||(Ar.reading=!1,er(Ur,Ar))}return!Ar.ended&&(Ar.length<Ar.highWaterMark||Ar.length===0)}function be(Ur,Sr,Gr,Fr){Sr.flowing&&Sr.length===0&&!Sr.sync?(Sr.awaitDrain=0,Ur.emit("data",Gr)):(Sr.length+=Sr.objectMode?1:Gr.length,Fr?Sr.buffer.unshift(Gr):Sr.buffer.push(Gr),Sr.needReadable&&st(Ur)),er(Ur,Sr)}function Be(Ur,Sr){var Gr;return!E(Sr)&&typeof Sr!="string"&&Sr!==void 0&&!Ur.objectMode&&(Gr=new L("chunk",["string","Buffer","Uint8Array"],Sr)),Gr}ve.prototype.isPaused=function(){return this._readableState.flowing===!1},ve.prototype.setEncoding=function(Ur){Ie||(Ie=requireString_decoder$1().StringDecoder);var Sr=new Ie(Ur);this._readableState.decoder=Sr,this._readableState.encoding=this._readableState.decoder.encoding;for(var Gr=this._readableState.buffer.head,Fr="";Gr!==null;)Fr+=Sr.write(Gr.data),Gr=Gr.next;return this._readableState.buffer.clear(),Fr!==""&&this._readableState.buffer.push(Fr),this._readableState.length=Fr.length,this};var ke=1073741824;function xe(Ur){return Ur>=ke?Ur=ke:(Ur--,Ur|=Ur>>>1,Ur|=Ur>>>2,Ur|=Ur>>>4,Ur|=Ur>>>8,Ur|=Ur>>>16,Ur++),Ur}function De(Ur,Sr){return Ur<=0||Sr.length===0&&Sr.ended?0:Sr.objectMode?1:Ur!==Ur?Sr.flowing&&Sr.length?Sr.buffer.head.data.length:Sr.length:(Ur>Sr.highWaterMark&&(Sr.highWaterMark=xe(Ur)),Ur<=Sr.length?Ur:Sr.ended?Sr.length:(Sr.needReadable=!0,0))}ve.prototype.read=function(Ur){D("read",Ur),Ur=parseInt(Ur,10);var Sr=this._readableState,Gr=Ur;if(Ur!==0&&(Sr.emittedReadable=!1),Ur===0&&Sr.needReadable&&((Sr.highWaterMark!==0?Sr.length>=Sr.highWaterMark:Sr.length>0)||Sr.ended))return D("read: emitReadable",Sr.length,Sr.ended),Sr.length===0&&Sr.ended?Qr(this):st(this),null;if(Ur=De(Ur,Sr),Ur===0&&Sr.ended)return Sr.length===0&&Qr(this),null;var Fr=Sr.needReadable;D("need readable",Fr),(Sr.length===0||Sr.length-Ur<Sr.highWaterMark)&&(Fr=!0,D("length less than watermark",Fr)),Sr.ended||Sr.reading?(Fr=!1,D("reading or ended",Fr)):Fr&&(D("do read"),Sr.reading=!0,Sr.sync=!0,Sr.length===0&&(Sr.needReadable=!0),this._read(Sr.highWaterMark),Sr.sync=!1,Sr.reading||(Ur=De(Gr,Sr)));var br;return Ur>0?br=Dr(Ur,Sr):br=null,br===null?(Sr.needReadable=Sr.length<=Sr.highWaterMark,Ur=0):(Sr.length-=Ur,Sr.awaitDrain=0),Sr.length===0&&(Sr.ended||(Sr.needReadable=!0),Gr!==Ur&&Sr.ended&&Qr(this)),br!==null&&this.emit("data",br),br};function Et(Ur,Sr){if(D("onEofChunk"),!Sr.ended){if(Sr.decoder){var Gr=Sr.decoder.end();Gr&&Gr.length&&(Sr.buffer.push(Gr),Sr.length+=Sr.objectMode?1:Gr.length)}Sr.ended=!0,Sr.sync?st(Ur):(Sr.needReadable=!1,Sr.emittedReadable||(Sr.emittedReadable=!0,Dt(Ur)))}}function st(Ur){var Sr=Ur._readableState;D("emitReadable",Sr.needReadable,Sr.emittedReadable),Sr.needReadable=!1,Sr.emittedReadable||(D("emitReadable",Sr.flowing),Sr.emittedReadable=!0,ETHWalletProvider.process$1.nextTick(Dt,Ur))}function Dt(Ur){var Sr=Ur._readableState;D("emitReadable_",Sr.destroyed,Sr.length,Sr.ended),!Sr.destroyed&&(Sr.length||Sr.ended)&&(Ur.emit("readable"),Sr.emittedReadable=!1),Sr.needReadable=!Sr.flowing&&!Sr.ended&&Sr.length<=Sr.highWaterMark,Mr(Ur)}function er(Ur,Sr){Sr.readingMore||(Sr.readingMore=!0,ETHWalletProvider.process$1.nextTick(xt,Ur,Sr))}function xt(Ur,Sr){for(;!Sr.reading&&!Sr.ended&&(Sr.length<Sr.highWaterMark||Sr.flowing&&Sr.length===0);){var Gr=Sr.length;if(D("maybeReadMore read 0"),Ur.read(0),Gr===Sr.length)break}Sr.readingMore=!1}ve.prototype._read=function(Ur){ze(this,new fe("_read()"))},ve.prototype.pipe=function(Ur,Sr){var Gr=this,Fr=this._readableState;switch(Fr.pipesCount){case 0:Fr.pipes=Ur;break;case 1:Fr.pipes=[Fr.pipes,Ur];break;default:Fr.pipes.push(Ur);break}Fr.pipesCount+=1,D("pipe count=%d opts=%j",Fr.pipesCount,Sr);var br=(!Sr||Sr.end!==!1)&&Ur!==ETHWalletProvider.process$1.stdout&&Ur!==ETHWalletProvider.process$1.stderr,Ar=br?hr:Lr;Fr.endEmitted?ETHWalletProvider.process$1.nextTick(Ar):Gr.once("end",Ar),Ur.on("unpipe",cr);function cr(Rr,Ir){D("onunpipe"),Rr===Gr&&Ir&&Ir.hasUnpiped===!1&&(Ir.hasUnpiped=!0,Bi())}function hr(){D("onend"),Ur.end()}var jr=ir(Gr);Ur.on("drain",jr);var fi=!1;function Bi(){D("cleanup"),Ur.removeListener("close",zr),Ur.removeListener("finish",ti),Ur.removeListener("drain",jr),Ur.removeListener("error",oi),Ur.removeListener("unpipe",cr),Gr.removeListener("end",hr),Gr.removeListener("end",Lr),Gr.removeListener("data",$r),fi=!0,Fr.awaitDrain&&(!Ur._writableState||Ur._writableState.needDrain)&&jr()}Gr.on("data",$r);function $r(Rr){D("ondata");var Ir=Ur.write(Rr);D("dest.write",Ir),Ir===!1&&((Fr.pipesCount===1&&Fr.pipes===Ur||Fr.pipesCount>1&&Wr(Fr.pipes,Ur)!==-1)&&!fi&&(D("false write response, pause",Fr.awaitDrain),Fr.awaitDrain++),Gr.pause())}function oi(Rr){D("onerror",Rr),Lr(),Ur.removeListener("error",oi),g(Ur,"error")===0&&ze(Ur,Rr)}Ne(Ur,"error",oi);function zr(){Ur.removeListener("finish",ti),Lr()}Ur.once("close",zr);function ti(){D("onfinish"),Ur.removeListener("close",zr),Lr()}Ur.once("finish",ti);function Lr(){D("unpipe"),Gr.unpipe(Ur)}return Ur.emit("pipe",Gr),Fr.flowing||(D("pipe resume"),Gr.resume()),Ur};function ir(Ur){return function(){var Gr=Ur._readableState;D("pipeOnDrain",Gr.awaitDrain),Gr.awaitDrain&&Gr.awaitDrain--,Gr.awaitDrain===0&&g(Ur,"data")&&(Gr.flowing=!0,Mr(Ur))}}ve.prototype.unpipe=function(Ur){var Sr=this._readableState,Gr={hasUnpiped:!1};if(Sr.pipesCount===0)return this;if(Sr.pipesCount===1)return Ur&&Ur!==Sr.pipes?this:(Ur||(Ur=Sr.pipes),Sr.pipes=null,Sr.pipesCount=0,Sr.flowing=!1,Ur&&Ur.emit("unpipe",this,Gr),this);if(!Ur){var Fr=Sr.pipes,br=Sr.pipesCount;Sr.pipes=null,Sr.pipesCount=0,Sr.flowing=!1;for(var Ar=0;Ar<br;Ar++)Fr[Ar].emit("unpipe",this,{hasUnpiped:!1});return this}var cr=Wr(Sr.pipes,Ur);return cr===-1?this:(Sr.pipes.splice(cr,1),Sr.pipesCount-=1,Sr.pipesCount===1&&(Sr.pipes=Sr.pipes[0]),Ur.emit("unpipe",this,Gr),this)},ve.prototype.on=function(Ur,Sr){var Gr=c.prototype.on.call(this,Ur,Sr),Fr=this._readableState;return Ur==="data"?(Fr.readableListening=this.listenerCount("readable")>0,Fr.flowing!==!1&&this.resume()):Ur==="readable"&&!Fr.endEmitted&&!Fr.readableListening&&(Fr.readableListening=Fr.needReadable=!0,Fr.flowing=!1,Fr.emittedReadable=!1,D("on readable",Fr.length,Fr.reading),Fr.length?st(this):Fr.reading||ETHWalletProvider.process$1.nextTick(yr,this)),Gr},ve.prototype.addListener=ve.prototype.on,ve.prototype.removeListener=function(Ur,Sr){var Gr=c.prototype.removeListener.call(this,Ur,Sr);return Ur==="readable"&&ETHWalletProvider.process$1.nextTick(sr,this),Gr},ve.prototype.removeAllListeners=function(Ur){var Sr=c.prototype.removeAllListeners.apply(this,arguments);return(Ur==="readable"||Ur===void 0)&&ETHWalletProvider.process$1.nextTick(sr,this),Sr};function sr(Ur){var Sr=Ur._readableState;Sr.readableListening=Ur.listenerCount("readable")>0,Sr.resumeScheduled&&!Sr.paused?Sr.flowing=!0:Ur.listenerCount("data")>0&&Ur.resume()}function yr(Ur){D("readable nexttick read 0"),Ur.read(0)}ve.prototype.resume=function(){var Ur=this._readableState;return Ur.flowing||(D("resume"),Ur.flowing=!Ur.readableListening,wr(this,Ur)),Ur.paused=!1,this};function wr(Ur,Sr){Sr.resumeScheduled||(Sr.resumeScheduled=!0,ETHWalletProvider.process$1.nextTick(qr,Ur,Sr))}function qr(Ur,Sr){D("resume",Sr.reading),Sr.reading||Ur.read(0),Sr.resumeScheduled=!1,Ur.emit("resume"),Mr(Ur),Sr.flowing&&!Sr.reading&&Ur.read(0)}ve.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Mr(Ur){var Sr=Ur._readableState;for(D("flow",Sr.flowing);Sr.flowing&&Ur.read()!==null;);}ve.prototype.wrap=function(Ur){var Sr=this,Gr=this._readableState,Fr=!1;Ur.on("end",function(){if(D("wrapped end"),Gr.decoder&&!Gr.ended){var cr=Gr.decoder.end();cr&&cr.length&&Sr.push(cr)}Sr.push(null)}),Ur.on("data",function(cr){if(D("wrapped data"),Gr.decoder&&(cr=Gr.decoder.write(cr)),!(Gr.objectMode&&cr==null)&&!(!Gr.objectMode&&(!cr||!cr.length))){var hr=Sr.push(cr);hr||(Fr=!0,Ur.pause())}});for(var br in Ur)this[br]===void 0&&typeof Ur[br]=="function"&&(this[br]=function(hr){return function(){return Ur[hr].apply(Ur,arguments)}}(br));for(var Ar=0;Ar<He.length;Ar++)Ur.on(He[Ar],this.emit.bind(this,He[Ar]));return this._read=function(cr){D("wrapped _read",cr),Fr&&(Fr=!1,Ur.resume())},this},typeof Symbol=="function"&&(ve.prototype[Symbol.asyncIterator]=function(){return Ee===void 0&&(Ee=requireAsync_iterator()),Ee(this)}),Object.defineProperty(ve.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ve.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ve.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Sr){this._readableState&&(this._readableState.flowing=Sr)}}),ve._fromList=Dr,Object.defineProperty(ve.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Dr(Ur,Sr){if(Sr.length===0)return null;var Gr;return Sr.objectMode?Gr=Sr.buffer.shift():!Ur||Ur>=Sr.length?(Sr.decoder?Gr=Sr.buffer.join(""):Sr.buffer.length===1?Gr=Sr.buffer.first():Gr=Sr.buffer.concat(Sr.length),Sr.buffer.clear()):Gr=Sr.buffer.consume(Ur,Sr.decoder),Gr}function Qr(Ur){var Sr=Ur._readableState;D("endReadable",Sr.endEmitted),Sr.endEmitted||(Sr.ended=!0,ETHWalletProvider.process$1.nextTick(Xr,Sr,Ur))}function Xr(Ur,Sr){if(D("endReadableNT",Ur.endEmitted,Ur.length),!Ur.endEmitted&&Ur.length===0&&(Ur.endEmitted=!0,Sr.readable=!1,Sr.emit("end"),Ur.autoDestroy)){var Gr=Sr._writableState;(!Gr||Gr.autoDestroy&&Gr.finished)&&Sr.destroy()}}typeof Symbol=="function"&&(ve.from=function(Ur,Sr){return Se===void 0&&(Se=requireFromBrowser()),Se(ve,Ur,Sr)});function Wr(Ur,Sr){for(var Gr=0,Fr=Ur.length;Gr<Fr;Gr++)if(Ur[Gr]===Sr)return Gr;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=B;var o=requireErrorsBrowser().codes,g=o.ERR_METHOD_NOT_IMPLEMENTED,c=o.ERR_MULTIPLE_CALLBACK,y=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=o.ERR_TRANSFORM_WITH_LENGTH_0,d=require_stream_duplex$1();requireInherits_browser()(B,d);function E(v,F){var M=this._transformState;M.transforming=!1;var U=M.writecb;if(U===null)return this.emit("error",new c);M.writechunk=null,M.writecb=null,F!=null&&this.push(F),U(v);var L=this._readableState;L.reading=!1,(L.needReadable||L.length<L.highWaterMark)&&this._read(L.highWaterMark)}function B(v){if(!(this instanceof B))return new B(v);d.call(this,v),this._transformState={afterTransform:E.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,v&&(typeof v.transform=="function"&&(this._transform=v.transform),typeof v.flush=="function"&&(this._flush=v.flush)),this.on("prefinish",D)}function D(){var v=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(F,M){x(v,F,M)}):x(this,null,null)}B.prototype.push=function(v,F){return this._transformState.needTransform=!1,d.prototype.push.call(this,v,F)},B.prototype._transform=function(v,F,M){M(new g("_transform()"))},B.prototype._write=function(v,F,M){var U=this._transformState;if(U.writecb=M,U.writechunk=v,U.writeencoding=F,!U.transforming){var L=this._readableState;(U.needTransform||L.needReadable||L.length<L.highWaterMark)&&this._read(L.highWaterMark)}},B.prototype._read=function(v){var F=this._transformState;F.writechunk!==null&&!F.transforming?(F.transforming=!0,this._transform(F.writechunk,F.writeencoding,F.afterTransform)):F.needTransform=!0},B.prototype._destroy=function(v,F){d.prototype._destroy.call(this,v,function(M){F(M)})};function x(v,F,M){if(F)return v.emit("error",F);if(M!=null&&v.push(M),v._writableState.length)throw new t;if(v._transformState.transforming)throw new y;return v.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=g;var o=require_stream_transform$1();requireInherits_browser()(g,o);function g(c){if(!(this instanceof g))return new g(c);o.call(this,c)}return g.prototype._transform=function(c,y,t){t(null,c)},_stream_passthrough$1}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var o;function g(M){var U=!1;return function(){U||(U=!0,M.apply(void 0,arguments))}}var c=requireErrorsBrowser().codes,y=c.ERR_MISSING_ARGS,t=c.ERR_STREAM_DESTROYED;function d(M){if(M)throw M}function E(M){return M.setHeader&&typeof M.abort=="function"}function B(M,U,L,H){H=g(H);var fe=!1;M.on("close",function(){fe=!0}),o===void 0&&(o=requireEndOfStream()),o(M,{readable:U,writable:L},function(Ie){if(Ie)return H(Ie);fe=!0,H()});var ge=!1;return function(Ie){if(!fe&&!ge){if(ge=!0,E(M))return M.abort();if(typeof M.destroy=="function")return M.destroy();H(Ie||new t("pipe"))}}}function D(M){M()}function x(M,U){return M.pipe(U)}function v(M){return!M.length||typeof M[M.length-1]!="function"?d:M.pop()}function F(){for(var M=arguments.length,U=new Array(M),L=0;L<M;L++)U[L]=arguments[L];var H=v(U);if(Array.isArray(U[0])&&(U=U[0]),U.length<2)throw new y("streams");var fe,ge=U.map(function(Ie,Ee){var Se=Ee<U.length-1,ze=Ee>0;return B(Ie,Se,ze,function(He){fe||(fe=He),He&&ge.forEach(D),!Se&&(ge.forEach(D),H(fe))})});return U.reduce(x)}return pipeline_1=F,pipeline_1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,function(o,g){g=o.exports=require_stream_readable$1(),g.Stream=g,g.Readable=g,g.Writable=require_stream_writable$1(),g.Duplex=require_stream_duplex$1(),g.Transform=require_stream_transform$1(),g.PassThrough=require_stream_passthrough$1(),g.finished=requireEndOfStream(),g.pipeline=requirePipeline()}(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var o=requireSafeBuffer$1().Buffer,g=requireReadableBrowser$1().Transform,c=requireInherits_browser();function y(d,E){if(!o.isBuffer(d)&&typeof d!="string")throw new TypeError(E+" must be a string or a buffer")}function t(d){g.call(this),this._block=o.allocUnsafe(d),this._blockSize=d,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return c(t,g),t.prototype._transform=function(d,E,B){var D=null;try{this.update(d,E)}catch(x){D=x}B(D)},t.prototype._flush=function(d){var E=null;try{this.push(this.digest())}catch(B){E=B}d(E)},t.prototype.update=function(d,E){if(y(d,"Data"),this._finalized)throw new Error("Digest already called");o.isBuffer(d)||(d=o.from(d,E));for(var B=this._block,D=0;this._blockOffset+d.length-D>=this._blockSize;){for(var x=this._blockOffset;x<this._blockSize;)B[x++]=d[D++];this._update(),this._blockOffset=0}for(;D<d.length;)B[this._blockOffset++]=d[D++];for(var v=0,F=d.length*8;F>0;++v)this._length[v]+=F,F=this._length[v]/4294967296|0,F>0&&(this._length[v]-=4294967296*F);return this},t.prototype._update=function(){throw new Error("_update is not implemented")},t.prototype.digest=function(d){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var E=this._digest();d!==void 0&&(E=E.toString(d)),this._block.fill(0),this._blockOffset=0;for(var B=0;B<4;++B)this._length[B]=0;return E},t.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=t,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var o=requireInherits_browser(),g=requireHashBase$1(),c=requireSafeBuffer$1().Buffer,y=new Array(16);function t(){g.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}o(t,g),t.prototype._update=function(){for(var v=y,F=0;F<16;++F)v[F]=this._block.readInt32LE(F*4);var M=this._a,U=this._b,L=this._c,H=this._d;M=E(M,U,L,H,v[0],3614090360,7),H=E(H,M,U,L,v[1],3905402710,12),L=E(L,H,M,U,v[2],606105819,17),U=E(U,L,H,M,v[3],3250441966,22),M=E(M,U,L,H,v[4],4118548399,7),H=E(H,M,U,L,v[5],1200080426,12),L=E(L,H,M,U,v[6],2821735955,17),U=E(U,L,H,M,v[7],4249261313,22),M=E(M,U,L,H,v[8],1770035416,7),H=E(H,M,U,L,v[9],2336552879,12),L=E(L,H,M,U,v[10],4294925233,17),U=E(U,L,H,M,v[11],2304563134,22),M=E(M,U,L,H,v[12],1804603682,7),H=E(H,M,U,L,v[13],4254626195,12),L=E(L,H,M,U,v[14],2792965006,17),U=E(U,L,H,M,v[15],1236535329,22),M=B(M,U,L,H,v[1],4129170786,5),H=B(H,M,U,L,v[6],3225465664,9),L=B(L,H,M,U,v[11],643717713,14),U=B(U,L,H,M,v[0],3921069994,20),M=B(M,U,L,H,v[5],3593408605,5),H=B(H,M,U,L,v[10],38016083,9),L=B(L,H,M,U,v[15],3634488961,14),U=B(U,L,H,M,v[4],3889429448,20),M=B(M,U,L,H,v[9],568446438,5),H=B(H,M,U,L,v[14],3275163606,9),L=B(L,H,M,U,v[3],4107603335,14),U=B(U,L,H,M,v[8],1163531501,20),M=B(M,U,L,H,v[13],2850285829,5),H=B(H,M,U,L,v[2],4243563512,9),L=B(L,H,M,U,v[7],1735328473,14),U=B(U,L,H,M,v[12],2368359562,20),M=D(M,U,L,H,v[5],4294588738,4),H=D(H,M,U,L,v[8],2272392833,11),L=D(L,H,M,U,v[11],1839030562,16),U=D(U,L,H,M,v[14],4259657740,23),M=D(M,U,L,H,v[1],2763975236,4),H=D(H,M,U,L,v[4],1272893353,11),L=D(L,H,M,U,v[7],4139469664,16),U=D(U,L,H,M,v[10],3200236656,23),M=D(M,U,L,H,v[13],681279174,4),H=D(H,M,U,L,v[0],3936430074,11),L=D(L,H,M,U,v[3],3572445317,16),U=D(U,L,H,M,v[6],76029189,23),M=D(M,U,L,H,v[9],3654602809,4),H=D(H,M,U,L,v[12],3873151461,11),L=D(L,H,M,U,v[15],530742520,16),U=D(U,L,H,M,v[2],3299628645,23),M=x(M,U,L,H,v[0],4096336452,6),H=x(H,M,U,L,v[7],1126891415,10),L=x(L,H,M,U,v[14],2878612391,15),U=x(U,L,H,M,v[5],4237533241,21),M=x(M,U,L,H,v[12],1700485571,6),H=x(H,M,U,L,v[3],2399980690,10),L=x(L,H,M,U,v[10],4293915773,15),U=x(U,L,H,M,v[1],2240044497,21),M=x(M,U,L,H,v[8],1873313359,6),H=x(H,M,U,L,v[15],4264355552,10),L=x(L,H,M,U,v[6],2734768916,15),U=x(U,L,H,M,v[13],1309151649,21),M=x(M,U,L,H,v[4],4149444226,6),H=x(H,M,U,L,v[11],3174756917,10),L=x(L,H,M,U,v[2],718787259,15),U=x(U,L,H,M,v[9],3951481745,21),this._a=this._a+M|0,this._b=this._b+U|0,this._c=this._c+L|0,this._d=this._d+H|0},t.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var v=c.allocUnsafe(16);return v.writeInt32LE(this._a,0),v.writeInt32LE(this._b,4),v.writeInt32LE(this._c,8),v.writeInt32LE(this._d,12),v};function d(v,F){return v<<F|v>>>32-F}function E(v,F,M,U,L,H,fe){return d(v+(F&M|~F&U)+L+H|0,fe)+F|0}function B(v,F,M,U,L,H,fe){return d(v+(F&U|M&~U)+L+H|0,fe)+F|0}function D(v,F,M,U,L,H,fe){return d(v+(F^M^U)+L+H|0,fe)+F|0}function x(v,F,M,U,L,H,fe){return d(v+(M^(F|~U))+L+H|0,fe)+F|0}return md5_js=t,md5_js}var ripemd160$5,hasRequiredRipemd160$2;function requireRipemd160$2(){if(hasRequiredRipemd160$2)return ripemd160$5;hasRequiredRipemd160$2=1;var o=requireBuffer$2().Buffer,g=requireInherits_browser(),c=requireHashBase$1(),y=new Array(16),t=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],E=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],D=[0,1518500249,1859775393,2400959708,2840853838],x=[1352829926,1548603684,1836072691,2053994217,0];function v(){c.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}g(v,c),v.prototype._update=function(){for(var ge=y,Ie=0;Ie<16;++Ie)ge[Ie]=this._block.readInt32LE(Ie*4);for(var Ee=this._a|0,Se=this._b|0,ze=this._c|0,He=this._d|0,Ne=this._e|0,Pe=this._a|0,ve=this._b|0,Fe=this._c|0,be=this._d|0,Be=this._e|0,ke=0;ke<80;ke+=1){var xe,De;ke<16?(xe=M(Ee,Se,ze,He,Ne,ge[t[ke]],D[0],E[ke]),De=fe(Pe,ve,Fe,be,Be,ge[d[ke]],x[0],B[ke])):ke<32?(xe=U(Ee,Se,ze,He,Ne,ge[t[ke]],D[1],E[ke]),De=H(Pe,ve,Fe,be,Be,ge[d[ke]],x[1],B[ke])):ke<48?(xe=L(Ee,Se,ze,He,Ne,ge[t[ke]],D[2],E[ke]),De=L(Pe,ve,Fe,be,Be,ge[d[ke]],x[2],B[ke])):ke<64?(xe=H(Ee,Se,ze,He,Ne,ge[t[ke]],D[3],E[ke]),De=U(Pe,ve,Fe,be,Be,ge[d[ke]],x[3],B[ke])):(xe=fe(Ee,Se,ze,He,Ne,ge[t[ke]],D[4],E[ke]),De=M(Pe,ve,Fe,be,Be,ge[d[ke]],x[4],B[ke])),Ee=Ne,Ne=He,He=F(ze,10),ze=Se,Se=xe,Pe=Be,Be=be,be=F(Fe,10),Fe=ve,ve=De}var Et=this._b+ze+be|0;this._b=this._c+He+Be|0,this._c=this._d+Ne+Pe|0,this._d=this._e+Ee+ve|0,this._e=this._a+Se+Fe|0,this._a=Et},v.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var ge=o.alloc?o.alloc(20):new o(20);return ge.writeInt32LE(this._a,0),ge.writeInt32LE(this._b,4),ge.writeInt32LE(this._c,8),ge.writeInt32LE(this._d,12),ge.writeInt32LE(this._e,16),ge};function F(ge,Ie){return ge<<Ie|ge>>>32-Ie}function M(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie^Ee^Se)+He+Ne|0,Pe)+ze|0}function U(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie&Ee|~Ie&Se)+He+Ne|0,Pe)+ze|0}function L(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+((Ie|~Ee)^Se)+He+Ne|0,Pe)+ze|0}function H(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie&Se|Ee&~Se)+He+Ne|0,Pe)+ze|0}function fe(ge,Ie,Ee,Se,ze,He,Ne,Pe){return F(ge+(Ie^(Ee|~Se))+He+Ne|0,Pe)+ze|0}return ripemd160$5=v,ripemd160$5}var sha_js={exports:{}},isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var o={}.toString;return isarray$1=Array.isArray||function(g){return o.call(g)=="[object Array]"},isarray$1}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range$1,hasRequiredRange$1;function requireRange$1(){return hasRequiredRange$1||(hasRequiredRange$1=1,range$1=RangeError),range$1}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max$1,hasRequiredMax$1;function requireMax$1(){return hasRequiredMax$1||(hasRequiredMax$1=1,max$1=Math.max),max$1}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow$1,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow$1=Math.pow),pow$1}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(g){return g!==g}),_isNaN}var sign$3,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$3;hasRequiredSign$1=1;var o=require_isNaN();return sign$3=function(c){return o(c)||c===0?c:c<0?-1:1},sign$3}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var o=requireGOPD();if(o)try{o([],"length")}catch{o=null}return gopd=o,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var o=Object.defineProperty||!1;if(o)try{o({},"a",{value:1})}catch{o=!1}return esDefineProperty=o,esDefineProperty}var shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var g={},c=Symbol("test"),y=Object(c);if(typeof c=="string"||Object.prototype.toString.call(c)!=="[object Symbol]"||Object.prototype.toString.call(y)!=="[object Symbol]")return!1;var t=42;g[c]=t;for(var d in g)return!1;if(typeof Object.keys=="function"&&Object.keys(g).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(g).length!==0)return!1;var E=Object.getOwnPropertySymbols(g);if(E.length!==1||E[0]!==c||!Object.prototype.propertyIsEnumerable.call(g,c))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var B=Object.getOwnPropertyDescriptor(g,c);if(B.value!==t||B.enumerable!==!0)return!1}return!0}),shams$1}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var o=typeof Symbol<"u"&&Symbol,g=requireShams$1();return hasSymbols=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var o=requireEsObjectAtoms();return Object_getPrototypeOf=o.getPrototypeOf||null,Object_getPrototypeOf}var implementation$4,hasRequiredImplementation$4;function requireImplementation$4(){if(hasRequiredImplementation$4)return implementation$4;hasRequiredImplementation$4=1;var o="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,c=Math.max,y="[object Function]",t=function(D,x){for(var v=[],F=0;F<D.length;F+=1)v[F]=D[F];for(var M=0;M<x.length;M+=1)v[M+D.length]=x[M];return v},d=function(D,x){for(var v=[],F=x,M=0;F<D.length;F+=1,M+=1)v[M]=D[F];return v},E=function(B,D){for(var x="",v=0;v<B.length;v+=1)x+=B[v],v+1<B.length&&(x+=D);return x};return implementation$4=function(D){var x=this;if(typeof x!="function"||g.apply(x)!==y)throw new TypeError(o+x);for(var v=d(arguments,1),F,M=function(){if(this instanceof F){var ge=x.apply(this,t(v,arguments));return Object(ge)===ge?ge:this}return x.apply(D,t(v,arguments))},U=c(0,x.length-v.length),L=[],H=0;H<U;H++)L[H]="$"+H;if(F=Function("binder","return function ("+E(L,",")+"){ return binder.apply(this,arguments); }")(M),x.prototype){var fe=function(){};fe.prototype=x.prototype,F.prototype=new fe,fe.prototype=null}return F},implementation$4}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var o=requireImplementation$4();return functionBind=Function.prototype.bind||o,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var o=requireFunctionBind(),g=requireFunctionApply(),c=requireFunctionCall(),y=requireReflectApply();return actualApply=y||o.call(c,g),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var o=requireFunctionBind(),g=requireType(),c=requireFunctionCall(),y=requireActualApply();return callBindApplyHelpers=function(d){if(d.length<1||typeof d[0]!="function")throw new g("a function is required");return y(o,c,d)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var o=requireCallBindApplyHelpers(),g=requireGopd(),c;try{c=[].__proto__===Array.prototype}catch(E){if(!E||typeof E!="object"||!("code"in E)||E.code!=="ERR_PROTO_ACCESS")throw E}var y=!!c&&g&&g(Object.prototype,"__proto__"),t=Object,d=t.getPrototypeOf;return get=y&&typeof y.get=="function"?o([y.get]):typeof d=="function"?function(B){return d(B==null?B:t(B))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var o=requireReflect_getPrototypeOf(),g=requireObject_getPrototypeOf(),c=requireGet();return getProto=o?function(t){return o(t)}:g?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return g(t)}:c?function(t){return c(t)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var o=Function.prototype.call,g=Object.prototype.hasOwnProperty,c=requireFunctionBind();return hasown=c.call(o,g),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var o,g=requireEsObjectAtoms(),c=requireEsErrors(),y=require_eval(),t=requireRange$1(),d=requireRef(),E=requireSyntax(),B=requireType(),D=requireUri(),x=requireAbs(),v=requireFloor(),F=requireMax$1(),M=requireMin(),U=requirePow(),L=requireRound(),H=requireSign$1(),fe=Function,ge=function(Xr){try{return fe('"use strict"; return ('+Xr+").constructor;")()}catch{}},Ie=requireGopd(),Ee=requireEsDefineProperty(),Se=function(){throw new B},ze=Ie?function(){try{return arguments.callee,Se}catch{try{return Ie(arguments,"callee").get}catch{return Se}}}():Se,He=requireHasSymbols()(),Ne=requireGetProto(),Pe=requireObject_getPrototypeOf(),ve=requireReflect_getPrototypeOf(),Fe=requireFunctionApply(),be=requireFunctionCall(),Be={},ke=typeof Uint8Array>"u"||!Ne?o:Ne(Uint8Array),xe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":He&&Ne?Ne([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":Be,"%AsyncGenerator%":Be,"%AsyncGeneratorFunction%":Be,"%AsyncIteratorPrototype%":Be,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":c,"%eval%":eval,"%EvalError%":y,"%Float16Array%":typeof Float16Array>"u"?o:Float16Array,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":fe,"%GeneratorFunction%":Be,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&Ne?Ne(Ne([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!Ne?o:Ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":Ie,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":t,"%ReferenceError%":d,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!Ne?o:Ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&Ne?Ne(""[Symbol.iterator]()):o,"%Symbol%":He?Symbol:o,"%SyntaxError%":E,"%ThrowTypeError%":ze,"%TypedArray%":ke,"%TypeError%":B,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":D,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet,"%Function.prototype.call%":be,"%Function.prototype.apply%":Fe,"%Object.defineProperty%":Ee,"%Object.getPrototypeOf%":Pe,"%Math.abs%":x,"%Math.floor%":v,"%Math.max%":F,"%Math.min%":M,"%Math.pow%":U,"%Math.round%":L,"%Math.sign%":H,"%Reflect.getPrototypeOf%":ve};if(Ne)try{null.error}catch(Xr){var De=Ne(Ne(Xr));xe["%Error.prototype%"]=De}var Et=function Xr(Wr){var Ur;if(Wr==="%AsyncFunction%")Ur=ge("async function () {}");else if(Wr==="%GeneratorFunction%")Ur=ge("function* () {}");else if(Wr==="%AsyncGeneratorFunction%")Ur=ge("async function* () {}");else if(Wr==="%AsyncGenerator%"){var Sr=Xr("%AsyncGeneratorFunction%");Sr&&(Ur=Sr.prototype)}else if(Wr==="%AsyncIteratorPrototype%"){var Gr=Xr("%AsyncGenerator%");Gr&&Ne&&(Ur=Ne(Gr.prototype))}return xe[Wr]=Ur,Ur},st={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Dt=requireFunctionBind(),er=requireHasown(),xt=Dt.call(be,Array.prototype.concat),ir=Dt.call(Fe,Array.prototype.splice),sr=Dt.call(be,String.prototype.replace),yr=Dt.call(be,String.prototype.slice),wr=Dt.call(be,RegExp.prototype.exec),qr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mr=/\\(\\)?/g,Dr=function(Wr){var Ur=yr(Wr,0,1),Sr=yr(Wr,-1);if(Ur==="%"&&Sr!=="%")throw new E("invalid intrinsic syntax, expected closing `%`");if(Sr==="%"&&Ur!=="%")throw new E("invalid intrinsic syntax, expected opening `%`");var Gr=[];return sr(Wr,qr,function(Fr,br,Ar,cr){Gr[Gr.length]=Ar?sr(cr,Mr,"$1"):br||Fr}),Gr},Qr=function(Wr,Ur){var Sr=Wr,Gr;if(er(st,Sr)&&(Gr=st[Sr],Sr="%"+Gr[0]+"%"),er(xe,Sr)){var Fr=xe[Sr];if(Fr===Be&&(Fr=Et(Sr)),typeof Fr>"u"&&!Ur)throw new B("intrinsic "+Wr+" exists, but is not available. Please file an issue!");return{alias:Gr,name:Sr,value:Fr}}throw new E("intrinsic "+Wr+" does not exist!")};return getIntrinsic=function(Wr,Ur){if(typeof Wr!="string"||Wr.length===0)throw new B("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ur!="boolean")throw new B('"allowMissing" argument must be a boolean');if(wr(/^%?[^%]*%?$/,Wr)===null)throw new E("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Sr=Dr(Wr),Gr=Sr.length>0?Sr[0]:"",Fr=Qr("%"+Gr+"%",Ur),br=Fr.name,Ar=Fr.value,cr=!1,hr=Fr.alias;hr&&(Gr=hr[0],ir(Sr,xt([0,1],hr)));for(var jr=1,fi=!0;jr<Sr.length;jr+=1){var Bi=Sr[jr],$r=yr(Bi,0,1),oi=yr(Bi,-1);if(($r==='"'||$r==="'"||$r==="`"||oi==='"'||oi==="'"||oi==="`")&&$r!==oi)throw new E("property names with quotes must have matching quotes");if((Bi==="constructor"||!fi)&&(cr=!0),Gr+="."+Bi,br="%"+Gr+"%",er(xe,br))Ar=xe[br];else if(Ar!=null){if(!(Bi in Ar)){if(!Ur)throw new B("base intrinsic for "+Wr+" exists, but the property is not available.");return}if(Ie&&jr+1>=Sr.length){var zr=Ie(Ar,Bi);fi=!!zr,fi&&"get"in zr&&!("originalValue"in zr.get)?Ar=zr.get:Ar=Ar[Bi]}else fi=er(Ar,Bi),Ar=Ar[Bi];fi&&!cr&&(xe[br]=Ar)}}return Ar},getIntrinsic}var callBound$1,hasRequiredCallBound$1;function requireCallBound$1(){if(hasRequiredCallBound$1)return callBound$1;hasRequiredCallBound$1=1;var o=requireGetIntrinsic(),g=requireCallBindApplyHelpers(),c=g([o("%String.prototype.indexOf%")]);return callBound$1=function(t,d){var E=o(t,!!d);return typeof E=="function"&&c(t,".prototype.")>-1?g([E]):E},callBound$1}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var o=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,c,y;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{c=Object.defineProperty({},"length",{get:function(){throw y}}),y={},g(function(){throw 42},null,c)}catch(Ie){Ie!==y&&(g=null)}else g=null;var t=/^\s*class\b/,d=function(Ee){try{var Se=o.call(Ee);return t.test(Se)}catch{return!1}},E=function(Ee){try{return d(Ee)?!1:(o.call(Ee),!0)}catch{return!1}},B=Object.prototype.toString,D="[object Object]",x="[object Function]",v="[object GeneratorFunction]",F="[object HTMLAllCollection]",M="[object HTML document.all class]",U="[object HTMLCollection]",L=typeof Symbol=="function"&&!!Symbol.toStringTag,H=!(0 in[,]),fe=function(){return!1};if(typeof document=="object"){var ge=document.all;B.call(ge)===B.call(document.all)&&(fe=function(Ee){if((H||!Ee)&&(typeof Ee>"u"||typeof Ee=="object"))try{var Se=B.call(Ee);return(Se===F||Se===M||Se===U||Se===D)&&Ee("")==null}catch{}return!1})}return isCallable=g?function(Ee){if(fe(Ee))return!0;if(!Ee||typeof Ee!="function"&&typeof Ee!="object")return!1;try{g(Ee,null,c)}catch(Se){if(Se!==y)return!1}return!d(Ee)&&E(Ee)}:function(Ee){if(fe(Ee))return!0;if(!Ee||typeof Ee!="function"&&typeof Ee!="object")return!1;if(L)return E(Ee);if(d(Ee))return!1;var Se=B.call(Ee);return Se!==x&&Se!==v&&!/^\[object HTML/.test(Se)?!1:E(Ee)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var o=requireIsCallable(),g=Object.prototype.toString,c=Object.prototype.hasOwnProperty,y=function(D,x,v){for(var F=0,M=D.length;F<M;F++)c.call(D,F)&&(v==null?x(D[F],F,D):x.call(v,D[F],F,D))},t=function(D,x,v){for(var F=0,M=D.length;F<M;F++)v==null?x(D.charAt(F),F,D):x.call(v,D.charAt(F),F,D)},d=function(D,x,v){for(var F in D)c.call(D,F)&&(v==null?x(D[F],F,D):x.call(v,D[F],F,D))};function E(B){return g.call(B)==="[object Array]"}return forEach=function(D,x,v){if(!o(x))throw new TypeError("iterator must be a function");var F;arguments.length>=3&&(F=v),E(D)?y(D,x,F):typeof D=="string"?t(D,x,F):d(D,x,F)},forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var o=requirePossibleTypedArrayNames(),g=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var y=[],t=0;t<o.length;t++)typeof g[o[t]]=="function"&&(y[y.length]=o[t]);return y},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var o=requireEsDefineProperty(),g=requireSyntax(),c=requireType(),y=requireGopd();return defineDataProperty=function(d,E,B){if(!d||typeof d!="object"&&typeof d!="function")throw new c("`obj` must be an object or a function`");if(typeof E!="string"&&typeof E!="symbol")throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new c("`loose`, if provided, must be a boolean");var D=arguments.length>3?arguments[3]:null,x=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,F=arguments.length>6?arguments[6]:!1,M=!!y&&y(d,E);if(o)o(d,E,{configurable:v===null&&M?M.configurable:!v,enumerable:D===null&&M?M.enumerable:!D,value:B,writable:x===null&&M?M.writable:!x});else if(F||!D&&!x&&!v)d[E]=B;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var o=requireEsDefineProperty(),g=function(){return!!o};return g.hasArrayLengthDefineBug=function(){if(!o)return null;try{return o([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=g,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var o=requireGetIntrinsic(),g=requireDefineDataProperty(),c=requireHasPropertyDescriptors()(),y=requireGopd(),t=requireType(),d=o("%Math.floor%");return setFunctionLength=function(B,D){if(typeof B!="function")throw new t("`fn` is not a function");if(typeof D!="number"||D<0||D>4294967295||d(D)!==D)throw new t("`length` must be a positive 32-bit integer");var x=arguments.length>2&&!!arguments[2],v=!0,F=!0;if("length"in B&&y){var M=y(B,"length");M&&!M.configurable&&(v=!1),M&&!M.writable&&(F=!1)}return(v||F||!x)&&(c?g(B,"length",D,!0,!0):g(B,"length",D)),B},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var o=requireFunctionBind(),g=requireFunctionApply(),c=requireActualApply();return applyBind=function(){return c(o,g,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,function(o){var g=requireSetFunctionLength(),c=requireEsDefineProperty(),y=requireCallBindApplyHelpers(),t=requireApplyBind();o.exports=function(E){var B=y(arguments),D=E.length-(arguments.length-1);return g(B,1+(D>0?D:0),!0)},c?c(o.exports,"apply",{value:t}):o.exports.apply=t}(callBind)),callBind.exports}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var o=requireShams$1();return shams=function(){return o()&&!!Symbol.toStringTag},shams}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var o=requireForEach(),g=requireAvailableTypedArrays(),c=requireCallBind(),y=requireCallBound$1(),t=requireGopd(),d=requireGetProto(),E=y("Object.prototype.toString"),B=requireShams()(),D=typeof globalThis>"u"?commonjsGlobal:globalThis,x=g(),v=y("String.prototype.slice"),F=y("Array.prototype.indexOf",!0)||function(fe,ge){for(var Ie=0;Ie<fe.length;Ie+=1)if(fe[Ie]===ge)return Ie;return-1},M={__proto__:null};B&&t&&d?o(x,function(H){var fe=new D[H];if(Symbol.toStringTag in fe&&d){var ge=d(fe),Ie=t(ge,Symbol.toStringTag);if(!Ie&&ge){var Ee=d(ge);Ie=t(Ee,Symbol.toStringTag)}M["$"+H]=c(Ie.get)}}):o(x,function(H){var fe=new D[H],ge=fe.slice||fe.set;ge&&(M["$"+H]=c(ge))});var U=function(fe){var ge=!1;return o(M,function(Ie,Ee){if(!ge)try{"$"+Ie(fe)===Ee&&(ge=v(Ee,1))}catch{}}),ge},L=function(fe){var ge=!1;return o(M,function(Ie,Ee){if(!ge)try{Ie(fe),ge=v(Ee,1)}catch{}}),ge};return whichTypedArray=function(fe){if(!fe||typeof fe!="object")return!1;if(!B){var ge=v(E(fe),8,-1);return F(x,ge)>-1?ge:ge!=="Object"?!1:L(fe)}return t?U(fe):null},whichTypedArray}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var o=requireWhichTypedArray();return isTypedArray=function(c){return!!o(c)},isTypedArray}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var o=requireType(),g=requireCallBound$1(),c=g("TypedArray.prototype.buffer",!0),y=requireIsTypedArray();return typedArrayBuffer=c||function(d){if(!y(d))throw new o("Not a Typed Array");return d.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer;hasRequiredToBuffer$1=1;var o=requireSafeBuffer$1().Buffer,g=requireIsarray$1(),c=requireTypedArrayBuffer(),y=ArrayBuffer.isView||function(D){try{return c(D),!0}catch{return!1}},t=typeof Uint8Array<"u",d=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",E=d&&(o.prototype instanceof Uint8Array||o.TYPED_ARRAY_SUPPORT);return toBuffer=function(D,x){if(D instanceof o)return D;if(typeof D=="string")return o.from(D,x);if(d&&y(D)){if(D.byteLength===0)return o.alloc(0);if(E){var v=o.from(D.buffer,D.byteOffset,D.byteLength);if(v.byteLength===D.byteLength)return v}var F=D instanceof Uint8Array?D:new Uint8Array(D.buffer,D.byteOffset,D.byteLength),M=o.from(F);if(M.length===D.byteLength)return M}if(t&&D instanceof Uint8Array)return o.from(D);var U=g(D);if(U)for(var L=0;L<D.length;L+=1){var H=D[L];if(typeof H!="number"||H<0||H>255||~~H!==H)throw new RangeError("Array items must be numbers in the range 0-255.")}if(U||o.isBuffer(D)&&D.constructor&&typeof D.constructor.isBuffer=="function"&&D.constructor.isBuffer(D))return o.from(D);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var hash$p,hasRequiredHash$2;function requireHash$2(){if(hasRequiredHash$2)return hash$p;hasRequiredHash$2=1;var o=requireSafeBuffer$1().Buffer,g=requireToBuffer$1();function c(y,t){this._block=o.alloc(y),this._finalSize=t,this._blockSize=y,this._len=0}return c.prototype.update=function(y,t){y=g(y,t||"utf8");for(var d=this._block,E=this._blockSize,B=y.length,D=this._len,x=0;x<B;){for(var v=D%E,F=Math.min(B-x,E-v),M=0;M<F;M++)d[v+M]=y[x+M];D+=F,x+=F,D%E===0&&this._update(d)}return this._len+=B,this},c.prototype.digest=function(y){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var d=this._len*8;if(d<=4294967295)this._block.writeUInt32BE(d,this._blockSize-4);else{var E=(d&4294967295)>>>0,B=(d-E)/4294967296;this._block.writeUInt32BE(B,this._blockSize-8),this._block.writeUInt32BE(E,this._blockSize-4)}this._update(this._block);var D=this._hash();return y?D.toString(y):D},c.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$p=c,hash$p}var sha$2,hasRequiredSha$2;function requireSha$2(){if(hasRequiredSha$2)return sha$2;hasRequiredSha$2=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function d(){this.init(),this._w=t,g.call(this,64,56)}o(d,g),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function E(x){return x<<5|x>>>27}function B(x){return x<<30|x>>>2}function D(x,v,F,M){return x===0?v&F|~v&M:x===2?v&F|v&M|F&M:v^F^M}return d.prototype._update=function(x){for(var v=this._w,F=this._a|0,M=this._b|0,U=this._c|0,L=this._d|0,H=this._e|0,fe=0;fe<16;++fe)v[fe]=x.readInt32BE(fe*4);for(;fe<80;++fe)v[fe]=v[fe-3]^v[fe-8]^v[fe-14]^v[fe-16];for(var ge=0;ge<80;++ge){var Ie=~~(ge/20),Ee=E(F)+D(Ie,M,U,L)+H+v[ge]+y[Ie]|0;H=L,L=U,U=B(M),M=F,F=Ee}this._a=F+this._a|0,this._b=M+this._b|0,this._c=U+this._c|0,this._d=L+this._d|0,this._e=H+this._e|0},d.prototype._hash=function(){var x=c.allocUnsafe(20);return x.writeInt32BE(this._a|0,0),x.writeInt32BE(this._b|0,4),x.writeInt32BE(this._c|0,8),x.writeInt32BE(this._d|0,12),x.writeInt32BE(this._e|0,16),x},sha$2=d,sha$2}var sha1$4,hasRequiredSha1$2;function requireSha1$2(){if(hasRequiredSha1$2)return sha1$4;hasRequiredSha1$2=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function d(){this.init(),this._w=t,g.call(this,64,56)}o(d,g),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function E(v){return v<<1|v>>>31}function B(v){return v<<5|v>>>27}function D(v){return v<<30|v>>>2}function x(v,F,M,U){return v===0?F&M|~F&U:v===2?F&M|F&U|M&U:F^M^U}return d.prototype._update=function(v){for(var F=this._w,M=this._a|0,U=this._b|0,L=this._c|0,H=this._d|0,fe=this._e|0,ge=0;ge<16;++ge)F[ge]=v.readInt32BE(ge*4);for(;ge<80;++ge)F[ge]=E(F[ge-3]^F[ge-8]^F[ge-14]^F[ge-16]);for(var Ie=0;Ie<80;++Ie){var Ee=~~(Ie/20),Se=B(M)+x(Ee,U,L,H)+fe+F[Ie]+y[Ee]|0;fe=H,H=L,L=D(U),U=M,M=Se}this._a=M+this._a|0,this._b=U+this._b|0,this._c=L+this._c|0,this._d=H+this._d|0,this._e=fe+this._e|0},d.prototype._hash=function(){var v=c.allocUnsafe(20);return v.writeInt32BE(this._a|0,0),v.writeInt32BE(this._b|0,4),v.writeInt32BE(this._c|0,8),v.writeInt32BE(this._d|0,12),v.writeInt32BE(this._e|0,16),v},sha1$4=d,sha1$4}var sha256$8,hasRequiredSha256$4;function requireSha256$4(){if(hasRequiredSha256$4)return sha256$8;hasRequiredSha256$4=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[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],t=new Array(64);function d(){this.init(),this._w=t,g.call(this,64,56)}o(d,g),d.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function E(M,U,L){return L^M&(U^L)}function B(M,U,L){return M&U|L&(M|U)}function D(M){return(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10)}function x(M){return(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7)}function v(M){return(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3}function F(M){return(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10}return d.prototype._update=function(M){for(var U=this._w,L=this._a|0,H=this._b|0,fe=this._c|0,ge=this._d|0,Ie=this._e|0,Ee=this._f|0,Se=this._g|0,ze=this._h|0,He=0;He<16;++He)U[He]=M.readInt32BE(He*4);for(;He<64;++He)U[He]=F(U[He-2])+U[He-7]+v(U[He-15])+U[He-16]|0;for(var Ne=0;Ne<64;++Ne){var Pe=ze+x(Ie)+E(Ie,Ee,Se)+y[Ne]+U[Ne]|0,ve=D(L)+B(L,H,fe)|0;ze=Se,Se=Ee,Ee=Ie,Ie=ge+Pe|0,ge=fe,fe=H,H=L,L=Pe+ve|0}this._a=L+this._a|0,this._b=H+this._b|0,this._c=fe+this._c|0,this._d=ge+this._d|0,this._e=Ie+this._e|0,this._f=Ee+this._f|0,this._g=Se+this._g|0,this._h=ze+this._h|0},d.prototype._hash=function(){var M=c.allocUnsafe(32);return M.writeInt32BE(this._a,0),M.writeInt32BE(this._b,4),M.writeInt32BE(this._c,8),M.writeInt32BE(this._d,12),M.writeInt32BE(this._e,16),M.writeInt32BE(this._f,20),M.writeInt32BE(this._g,24),M.writeInt32BE(this._h,28),M},sha256$8=d,sha256$8}var sha224$2,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$2;hasRequiredSha224=1;var o=requireInherits_browser(),g=requireSha256$4(),c=requireHash$2(),y=requireSafeBuffer$1().Buffer,t=new Array(64);function d(){this.init(),this._w=t,c.call(this,64,56)}return o(d,g),d.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},d.prototype._hash=function(){var E=y.allocUnsafe(28);return E.writeInt32BE(this._a,0),E.writeInt32BE(this._b,4),E.writeInt32BE(this._c,8),E.writeInt32BE(this._d,12),E.writeInt32BE(this._e,16),E.writeInt32BE(this._f,20),E.writeInt32BE(this._g,24),E},sha224$2=d,sha224$2}var sha512$4,hasRequiredSha512$1;function requireSha512$1(){if(hasRequiredSha512$1)return sha512$4;hasRequiredSha512$1=1;var o=requireInherits_browser(),g=requireHash$2(),c=requireSafeBuffer$1().Buffer,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],t=new Array(160);function d(){this.init(),this._w=t,g.call(this,128,112)}o(d,g),d.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function E(H,fe,ge){return ge^H&(fe^ge)}function B(H,fe,ge){return H&fe|ge&(H|fe)}function D(H,fe){return(H>>>28|fe<<4)^(fe>>>2|H<<30)^(fe>>>7|H<<25)}function x(H,fe){return(H>>>14|fe<<18)^(H>>>18|fe<<14)^(fe>>>9|H<<23)}function v(H,fe){return(H>>>1|fe<<31)^(H>>>8|fe<<24)^H>>>7}function F(H,fe){return(H>>>1|fe<<31)^(H>>>8|fe<<24)^(H>>>7|fe<<25)}function M(H,fe){return(H>>>19|fe<<13)^(fe>>>29|H<<3)^H>>>6}function U(H,fe){return(H>>>19|fe<<13)^(fe>>>29|H<<3)^(H>>>6|fe<<26)}function L(H,fe){return H>>>0<fe>>>0?1:0}return d.prototype._update=function(H){for(var fe=this._w,ge=this._ah|0,Ie=this._bh|0,Ee=this._ch|0,Se=this._dh|0,ze=this._eh|0,He=this._fh|0,Ne=this._gh|0,Pe=this._hh|0,ve=this._al|0,Fe=this._bl|0,be=this._cl|0,Be=this._dl|0,ke=this._el|0,xe=this._fl|0,De=this._gl|0,Et=this._hl|0,st=0;st<32;st+=2)fe[st]=H.readInt32BE(st*4),fe[st+1]=H.readInt32BE(st*4+4);for(;st<160;st+=2){var Dt=fe[st-30],er=fe[st-30+1],xt=v(Dt,er),ir=F(er,Dt);Dt=fe[st-4],er=fe[st-4+1];var sr=M(Dt,er),yr=U(er,Dt),wr=fe[st-14],qr=fe[st-14+1],Mr=fe[st-32],Dr=fe[st-32+1],Qr=ir+qr|0,Xr=xt+wr+L(Qr,ir)|0;Qr=Qr+yr|0,Xr=Xr+sr+L(Qr,yr)|0,Qr=Qr+Dr|0,Xr=Xr+Mr+L(Qr,Dr)|0,fe[st]=Xr,fe[st+1]=Qr}for(var Wr=0;Wr<160;Wr+=2){Xr=fe[Wr],Qr=fe[Wr+1];var Ur=B(ge,Ie,Ee),Sr=B(ve,Fe,be),Gr=D(ge,ve),Fr=D(ve,ge),br=x(ze,ke),Ar=x(ke,ze),cr=y[Wr],hr=y[Wr+1],jr=E(ze,He,Ne),fi=E(ke,xe,De),Bi=Et+Ar|0,$r=Pe+br+L(Bi,Et)|0;Bi=Bi+fi|0,$r=$r+jr+L(Bi,fi)|0,Bi=Bi+hr|0,$r=$r+cr+L(Bi,hr)|0,Bi=Bi+Qr|0,$r=$r+Xr+L(Bi,Qr)|0;var oi=Fr+Sr|0,zr=Gr+Ur+L(oi,Fr)|0;Pe=Ne,Et=De,Ne=He,De=xe,He=ze,xe=ke,ke=Be+Bi|0,ze=Se+$r+L(ke,Be)|0,Se=Ee,Be=be,Ee=Ie,be=Fe,Ie=ge,Fe=ve,ve=Bi+oi|0,ge=$r+zr+L(ve,Bi)|0}this._al=this._al+ve|0,this._bl=this._bl+Fe|0,this._cl=this._cl+be|0,this._dl=this._dl+Be|0,this._el=this._el+ke|0,this._fl=this._fl+xe|0,this._gl=this._gl+De|0,this._hl=this._hl+Et|0,this._ah=this._ah+ge+L(this._al,ve)|0,this._bh=this._bh+Ie+L(this._bl,Fe)|0,this._ch=this._ch+Ee+L(this._cl,be)|0,this._dh=this._dh+Se+L(this._dl,Be)|0,this._eh=this._eh+ze+L(this._el,ke)|0,this._fh=this._fh+He+L(this._fl,xe)|0,this._gh=this._gh+Ne+L(this._gl,De)|0,this._hh=this._hh+Pe+L(this._hl,Et)|0},d.prototype._hash=function(){var H=c.allocUnsafe(64);function fe(ge,Ie,Ee){H.writeInt32BE(ge,Ee),H.writeInt32BE(Ie,Ee+4)}return fe(this._ah,this._al,0),fe(this._bh,this._bl,8),fe(this._ch,this._cl,16),fe(this._dh,this._dl,24),fe(this._eh,this._el,32),fe(this._fh,this._fl,40),fe(this._gh,this._gl,48),fe(this._hh,this._hl,56),H},sha512$4=d,sha512$4}var sha384$2,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$2;hasRequiredSha384=1;var o=requireInherits_browser(),g=requireSha512$1(),c=requireHash$2(),y=requireSafeBuffer$1().Buffer,t=new Array(160);function d(){this.init(),this._w=t,c.call(this,128,112)}return o(d,g),d.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},d.prototype._hash=function(){var E=y.allocUnsafe(48);function B(D,x,v){E.writeInt32BE(D,v),E.writeInt32BE(x,v+4)}return B(this._ah,this._al,0),B(this._bh,this._bl,8),B(this._ch,this._cl,16),B(this._dh,this._dl,24),B(this._eh,this._el,32),B(this._fh,this._fl,40),E},sha384$2=d,sha384$2}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,function(o){o.exports=function(c){var y=c.toLowerCase(),t=o.exports[y];if(!t)throw new Error(y+" is not supported (we accept pull requests)");return new t},o.exports.sha=requireSha$2(),o.exports.sha1=requireSha1$2(),o.exports.sha224=requireSha224(),o.exports.sha256=requireSha256$4(),o.exports.sha384=requireSha384(),o.exports.sha512=requireSha512$1()}(sha_js)),sha_js.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var o=requireSafeBuffer$1().Buffer,g=require$$2$2.Transform,c=requireString_decoder$1().StringDecoder,y=requireInherits_browser();function t(D){g.call(this),this.hashMode=typeof D=="string",this.hashMode?this[D]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}y(t,g);var d=typeof Uint8Array<"u",E=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(o.prototype instanceof Uint8Array||o.TYPED_ARRAY_SUPPORT);function B(D,x){if(D instanceof o)return D;if(typeof D=="string")return o.from(D,x);if(E&&ArrayBuffer.isView(D)){if(D.byteLength===0)return o.alloc(0);var v=o.from(D.buffer,D.byteOffset,D.byteLength);if(v.byteLength===D.byteLength)return v}if(d&&D instanceof Uint8Array||o.isBuffer(D)&&D.constructor&&typeof D.constructor.isBuffer=="function"&&D.constructor.isBuffer(D))return o.from(D);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return t.prototype.update=function(D,x,v){var F=B(D,x),M=this._update(F);return this.hashMode?this:(v&&(M=this._toString(M,v)),M)},t.prototype.setAutoPadding=function(){},t.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},t.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},t.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},t.prototype._transform=function(D,x,v){var F;try{this.hashMode?this._update(D):this.push(this._update(D))}catch(M){F=M}finally{v(F)}},t.prototype._flush=function(D){var x;try{this.push(this.__final())}catch(v){x=v}D(x)},t.prototype._finalOrDigest=function(D){var x=this.__final()||o.alloc(0);return D&&(x=this._toString(x,D,!0)),x},t.prototype._toString=function(D,x,v){if(this._decoder||(this._decoder=new c(x),this._encoding=x),this._encoding!==x)throw new Error("can’t switch encodings");var F=this._decoder.write(D);return v&&(F+=this._decoder.end()),F},cipherBase=t,cipherBase}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1;var o=requireInherits_browser(),g=requireMd5_js(),c=requireRipemd160$2(),y=requireSha_js(),t=requireCipherBase();function d(E){t.call(this,"digest"),this._hash=E}return o(d,t),d.prototype._update=function(E){this._hash.update(E)},d.prototype._final=function(){return this._hash.digest()},browser$a=function(B){return B=B.toLowerCase(),B==="md5"?new g:B==="rmd160"||B==="ripemd160"?new c:new d(y(B))},browser$a}var src$3,hasRequiredSrc$3;function requireSrc$3(){if(hasRequiredSrc$3)return src$3;hasRequiredSrc$3=1;var o=requireSafeBuffer$1().Buffer;function g(c){if(c.length>=255)throw new TypeError("Alphabet too long");for(var y=new Uint8Array(256),t=0;t<y.length;t++)y[t]=255;for(var d=0;d<c.length;d++){var E=c.charAt(d),B=E.charCodeAt(0);if(y[B]!==255)throw new TypeError(E+" is ambiguous");y[B]=d}var D=c.length,x=c.charAt(0),v=Math.log(D)/Math.log(256),F=Math.log(256)/Math.log(D);function M(H){if((Array.isArray(H)||H instanceof Uint8Array)&&(H=o.from(H)),!o.isBuffer(H))throw new TypeError("Expected Buffer");if(H.length===0)return"";for(var fe=0,ge=0,Ie=0,Ee=H.length;Ie!==Ee&&H[Ie]===0;)Ie++,fe++;for(var Se=(Ee-Ie)*F+1>>>0,ze=new Uint8Array(Se);Ie!==Ee;){for(var He=H[Ie],Ne=0,Pe=Se-1;(He!==0||Ne<ge)&&Pe!==-1;Pe--,Ne++)He+=256*ze[Pe]>>>0,ze[Pe]=He%D>>>0,He=He/D>>>0;if(He!==0)throw new Error("Non-zero carry");ge=Ne,Ie++}for(var ve=Se-ge;ve!==Se&&ze[ve]===0;)ve++;for(var Fe=x.repeat(fe);ve<Se;++ve)Fe+=c.charAt(ze[ve]);return Fe}function U(H){if(typeof H!="string")throw new TypeError("Expected String");if(H.length===0)return o.alloc(0);for(var fe=0,ge=0,Ie=0;H[fe]===x;)ge++,fe++;for(var Ee=(H.length-fe)*v+1>>>0,Se=new Uint8Array(Ee);fe<H.length;){var ze=H.charCodeAt(fe);if(ze>255)return;var He=y[ze];if(He===255)return;for(var Ne=0,Pe=Ee-1;(He!==0||Ne<Ie)&&Pe!==-1;Pe--,Ne++)He+=D*Se[Pe]>>>0,Se[Pe]=He%256>>>0,He=He/256>>>0;if(He!==0)throw new Error("Non-zero carry");Ie=Ne,fe++}for(var ve=Ee-Ie;ve!==Ee&&Se[ve]===0;)ve++;var Fe=o.allocUnsafe(ge+(Ee-ve));Fe.fill(0,0,ge);for(var be=ge;ve!==Ee;)Fe[be++]=Se[ve++];return Fe}function L(H){var fe=U(H);if(fe)return fe;throw new Error("Non-base"+D+" character")}return{encode:M,decodeUnsafe:U,decode:L}}return src$3=g,src$3}var bs58$1,hasRequiredBs58$1;function requireBs58$1(){if(hasRequiredBs58$1)return bs58$1;hasRequiredBs58$1=1;var o=requireSrc$3(),g="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return bs58$1=o(g),bs58$1}var base$3,hasRequiredBase$3;function requireBase$3(){if(hasRequiredBase$3)return base$3;hasRequiredBase$3=1;var o=requireBs58$1(),g=requireSafeBuffer$1().Buffer;return base$3=function(c){function y(B){var D=c(B);return o.encode(g.concat([B,D],B.length+4))}function t(B){var D=B.slice(0,-4),x=B.slice(-4),v=c(D);if(!(x[0]^v[0]|x[1]^v[1]|x[2]^v[2]|x[3]^v[3]))return D}function d(B){var D=o.decodeUnsafe(B);if(D)return t(D)}function E(B){var D=o.decode(B),x=t(D);if(!x)throw new Error("Invalid checksum");return x}return{encode:y,decode:E,decodeUnsafe:d}},base$3}var bs58check$1,hasRequiredBs58check$1;function requireBs58check$1(){if(hasRequiredBs58check$1)return bs58check$1;hasRequiredBs58check$1=1;var o=requireBrowser$a(),g=requireBase$3();function c(y){var t=o("sha256").update(y).digest();return o("sha256").update(t).digest()}return bs58check$1=g(c),bs58check$1}var CryptoCoinInfo$2={},RegistryItem$2={},dist$n={},ur$1={},errors$6={},hasRequiredErrors$6;function requireErrors$6(){if(hasRequiredErrors$6)return errors$6;hasRequiredErrors$6=1,Object.defineProperty(errors$6,"__esModule",{value:!0}),errors$6.InvalidChecksumError=errors$6.InvalidSequenceComponentError=errors$6.InvalidTypeError=errors$6.InvalidPathLengthError=errors$6.InvalidSchemeError=void 0;class o extends Error{constructor(){super("Invalid Scheme"),this.name="InvalidSchemeError"}}errors$6.InvalidSchemeError=o;class g extends Error{constructor(){super("Invalid Path"),this.name="InvalidPathLengthError"}}errors$6.InvalidPathLengthError=g;class c extends Error{constructor(){super("Invalid Type"),this.name="InvalidTypeError"}}errors$6.InvalidTypeError=c;class y extends Error{constructor(){super("Invalid Sequence Component"),this.name="InvalidSequenceComponentError"}}errors$6.InvalidSequenceComponentError=y;class t extends Error{constructor(){super("Invalid Checksum"),this.name="InvalidChecksumError"}}return errors$6.InvalidChecksumError=t,errors$6}var utils$g={},buffer$1={};var hasRequiredBuffer$1;function requireBuffer$1(){return hasRequiredBuffer$1||(hasRequiredBuffer$1=1,function(o){var g=requireBase64Js(),c=requireIeee754(),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=B,o.SlowBuffer=Ie,o.INSPECT_MAX_BYTES=50;var t=2147483647;o.kMaxLength=t,B.TYPED_ARRAY_SUPPORT=d(),!B.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function d(){try{var Ar=new Uint8Array(1),cr={foo:function(){return 42}};return Object.setPrototypeOf(cr,Uint8Array.prototype),Object.setPrototypeOf(Ar,cr),Ar.foo()===42}catch{return!1}}Object.defineProperty(B.prototype,"parent",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.buffer}}),Object.defineProperty(B.prototype,"offset",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.byteOffset}});function E(Ar){if(Ar>t)throw new RangeError('The value "'+Ar+'" is invalid for option "size"');var cr=new Uint8Array(Ar);return Object.setPrototypeOf(cr,B.prototype),cr}function B(Ar,cr,hr){if(typeof Ar=="number"){if(typeof cr=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(Ar)}return D(Ar,cr,hr)}B.poolSize=8192;function D(Ar,cr,hr){if(typeof Ar=="string")return M(Ar,cr);if(ArrayBuffer.isView(Ar))return L(Ar);if(Ar==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ar);if(Gr(Ar,ArrayBuffer)||Ar&&Gr(Ar.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Gr(Ar,SharedArrayBuffer)||Ar&&Gr(Ar.buffer,SharedArrayBuffer)))return H(Ar,cr,hr);if(typeof Ar=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var jr=Ar.valueOf&&Ar.valueOf();if(jr!=null&&jr!==Ar)return B.from(jr,cr,hr);var fi=fe(Ar);if(fi)return fi;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ar[Symbol.toPrimitive]=="function")return B.from(Ar[Symbol.toPrimitive]("string"),cr,hr);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ar)}B.from=function(Ar,cr,hr){return D(Ar,cr,hr)},Object.setPrototypeOf(B.prototype,Uint8Array.prototype),Object.setPrototypeOf(B,Uint8Array);function x(Ar){if(typeof Ar!="number")throw new TypeError('"size" argument must be of type number');if(Ar<0)throw new RangeError('The value "'+Ar+'" is invalid for option "size"')}function v(Ar,cr,hr){return x(Ar),Ar<=0?E(Ar):cr!==void 0?typeof hr=="string"?E(Ar).fill(cr,hr):E(Ar).fill(cr):E(Ar)}B.alloc=function(Ar,cr,hr){return v(Ar,cr,hr)};function F(Ar){return x(Ar),E(Ar<0?0:ge(Ar)|0)}B.allocUnsafe=function(Ar){return F(Ar)},B.allocUnsafeSlow=function(Ar){return F(Ar)};function M(Ar,cr){if((typeof cr!="string"||cr==="")&&(cr="utf8"),!B.isEncoding(cr))throw new TypeError("Unknown encoding: "+cr);var hr=Ee(Ar,cr)|0,jr=E(hr),fi=jr.write(Ar,cr);return fi!==hr&&(jr=jr.slice(0,fi)),jr}function U(Ar){for(var cr=Ar.length<0?0:ge(Ar.length)|0,hr=E(cr),jr=0;jr<cr;jr+=1)hr[jr]=Ar[jr]&255;return hr}function L(Ar){if(Gr(Ar,Uint8Array)){var cr=new Uint8Array(Ar);return H(cr.buffer,cr.byteOffset,cr.byteLength)}return U(Ar)}function H(Ar,cr,hr){if(cr<0||Ar.byteLength<cr)throw new RangeError('"offset" is outside of buffer bounds');if(Ar.byteLength<cr+(hr||0))throw new RangeError('"length" is outside of buffer bounds');var jr;return cr===void 0&&hr===void 0?jr=new Uint8Array(Ar):hr===void 0?jr=new Uint8Array(Ar,cr):jr=new Uint8Array(Ar,cr,hr),Object.setPrototypeOf(jr,B.prototype),jr}function fe(Ar){if(B.isBuffer(Ar)){var cr=ge(Ar.length)|0,hr=E(cr);return hr.length===0||Ar.copy(hr,0,0,cr),hr}if(Ar.length!==void 0)return typeof Ar.length!="number"||Fr(Ar.length)?E(0):U(Ar);if(Ar.type==="Buffer"&&Array.isArray(Ar.data))return U(Ar.data)}function ge(Ar){if(Ar>=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");return Ar|0}function Ie(Ar){return+Ar!=Ar&&(Ar=0),B.alloc(+Ar)}B.isBuffer=function(cr){return cr!=null&&cr._isBuffer===!0&&cr!==B.prototype},B.compare=function(cr,hr){if(Gr(cr,Uint8Array)&&(cr=B.from(cr,cr.offset,cr.byteLength)),Gr(hr,Uint8Array)&&(hr=B.from(hr,hr.offset,hr.byteLength)),!B.isBuffer(cr)||!B.isBuffer(hr))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(cr===hr)return 0;for(var jr=cr.length,fi=hr.length,Bi=0,$r=Math.min(jr,fi);Bi<$r;++Bi)if(cr[Bi]!==hr[Bi]){jr=cr[Bi],fi=hr[Bi];break}return jr<fi?-1:fi<jr?1:0},B.isEncoding=function(cr){switch(String(cr).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}},B.concat=function(cr,hr){if(!Array.isArray(cr))throw new TypeError('"list" argument must be an Array of Buffers');if(cr.length===0)return B.alloc(0);var jr;if(hr===void 0)for(hr=0,jr=0;jr<cr.length;++jr)hr+=cr[jr].length;var fi=B.allocUnsafe(hr),Bi=0;for(jr=0;jr<cr.length;++jr){var $r=cr[jr];if(Gr($r,Uint8Array))Bi+$r.length>fi.length?B.from($r).copy(fi,Bi):Uint8Array.prototype.set.call(fi,$r,Bi);else if(B.isBuffer($r))$r.copy(fi,Bi);else throw new TypeError('"list" argument must be an Array of Buffers');Bi+=$r.length}return fi};function Ee(Ar,cr){if(B.isBuffer(Ar))return Ar.length;if(ArrayBuffer.isView(Ar)||Gr(Ar,ArrayBuffer))return Ar.byteLength;if(typeof Ar!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ar);var hr=Ar.length,jr=arguments.length>2&&arguments[2]===!0;if(!jr&&hr===0)return 0;for(var fi=!1;;)switch(cr){case"ascii":case"latin1":case"binary":return hr;case"utf8":case"utf-8":return Qr(Ar).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hr*2;case"hex":return hr>>>1;case"base64":return Ur(Ar).length;default:if(fi)return jr?-1:Qr(Ar).length;cr=(""+cr).toLowerCase(),fi=!0}}B.byteLength=Ee;function Se(Ar,cr,hr){var jr=!1;if((cr===void 0||cr<0)&&(cr=0),cr>this.length||((hr===void 0||hr>this.length)&&(hr=this.length),hr<=0)||(hr>>>=0,cr>>>=0,hr<=cr))return"";for(Ar||(Ar="utf8");;)switch(Ar){case"hex":return er(this,cr,hr);case"utf8":case"utf-8":return xe(this,cr,hr);case"ascii":return st(this,cr,hr);case"latin1":case"binary":return Dt(this,cr,hr);case"base64":return ke(this,cr,hr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,cr,hr);default:if(jr)throw new TypeError("Unknown encoding: "+Ar);Ar=(Ar+"").toLowerCase(),jr=!0}}B.prototype._isBuffer=!0;function ze(Ar,cr,hr){var jr=Ar[cr];Ar[cr]=Ar[hr],Ar[hr]=jr}B.prototype.swap16=function(){var cr=this.length;if(cr%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var hr=0;hr<cr;hr+=2)ze(this,hr,hr+1);return this},B.prototype.swap32=function(){var cr=this.length;if(cr%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var hr=0;hr<cr;hr+=4)ze(this,hr,hr+3),ze(this,hr+1,hr+2);return this},B.prototype.swap64=function(){var cr=this.length;if(cr%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var hr=0;hr<cr;hr+=8)ze(this,hr,hr+7),ze(this,hr+1,hr+6),ze(this,hr+2,hr+5),ze(this,hr+3,hr+4);return this},B.prototype.toString=function(){var cr=this.length;return cr===0?"":arguments.length===0?xe(this,0,cr):Se.apply(this,arguments)},B.prototype.toLocaleString=B.prototype.toString,B.prototype.equals=function(cr){if(!B.isBuffer(cr))throw new TypeError("Argument must be a Buffer");return this===cr?!0:B.compare(this,cr)===0},B.prototype.inspect=function(){var cr="",hr=o.INSPECT_MAX_BYTES;return cr=this.toString("hex",0,hr).replace(/(.{2})/g,"$1 ").trim(),this.length>hr&&(cr+=" ... "),"<Buffer "+cr+">"},y&&(B.prototype[y]=B.prototype.inspect),B.prototype.compare=function(cr,hr,jr,fi,Bi){if(Gr(cr,Uint8Array)&&(cr=B.from(cr,cr.offset,cr.byteLength)),!B.isBuffer(cr))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof cr);if(hr===void 0&&(hr=0),jr===void 0&&(jr=cr?cr.length:0),fi===void 0&&(fi=0),Bi===void 0&&(Bi=this.length),hr<0||jr>cr.length||fi<0||Bi>this.length)throw new RangeError("out of range index");if(fi>=Bi&&hr>=jr)return 0;if(fi>=Bi)return-1;if(hr>=jr)return 1;if(hr>>>=0,jr>>>=0,fi>>>=0,Bi>>>=0,this===cr)return 0;for(var $r=Bi-fi,oi=jr-hr,zr=Math.min($r,oi),ti=this.slice(fi,Bi),Lr=cr.slice(hr,jr),Rr=0;Rr<zr;++Rr)if(ti[Rr]!==Lr[Rr]){$r=ti[Rr],oi=Lr[Rr];break}return $r<oi?-1:oi<$r?1:0};function He(Ar,cr,hr,jr,fi){if(Ar.length===0)return-1;if(typeof hr=="string"?(jr=hr,hr=0):hr>2147483647?hr=2147483647:hr<-2147483648&&(hr=-2147483648),hr=+hr,Fr(hr)&&(hr=fi?0:Ar.length-1),hr<0&&(hr=Ar.length+hr),hr>=Ar.length){if(fi)return-1;hr=Ar.length-1}else if(hr<0)if(fi)hr=0;else return-1;if(typeof cr=="string"&&(cr=B.from(cr,jr)),B.isBuffer(cr))return cr.length===0?-1:Ne(Ar,cr,hr,jr,fi);if(typeof cr=="number")return cr=cr&255,typeof Uint8Array.prototype.indexOf=="function"?fi?Uint8Array.prototype.indexOf.call(Ar,cr,hr):Uint8Array.prototype.lastIndexOf.call(Ar,cr,hr):Ne(Ar,[cr],hr,jr,fi);throw new TypeError("val must be string, number or Buffer")}function Ne(Ar,cr,hr,jr,fi){var Bi=1,$r=Ar.length,oi=cr.length;if(jr!==void 0&&(jr=String(jr).toLowerCase(),jr==="ucs2"||jr==="ucs-2"||jr==="utf16le"||jr==="utf-16le")){if(Ar.length<2||cr.length<2)return-1;Bi=2,$r/=2,oi/=2,hr/=2}function zr(pr,Cr){return Bi===1?pr[Cr]:pr.readUInt16BE(Cr*Bi)}var ti;if(fi){var Lr=-1;for(ti=hr;ti<$r;ti++)if(zr(Ar,ti)===zr(cr,Lr===-1?0:ti-Lr)){if(Lr===-1&&(Lr=ti),ti-Lr+1===oi)return Lr*Bi}else Lr!==-1&&(ti-=ti-Lr),Lr=-1}else for(hr+oi>$r&&(hr=$r-oi),ti=hr;ti>=0;ti--){for(var Rr=!0,Ir=0;Ir<oi;Ir++)if(zr(Ar,ti+Ir)!==zr(cr,Ir)){Rr=!1;break}if(Rr)return ti}return-1}B.prototype.includes=function(cr,hr,jr){return this.indexOf(cr,hr,jr)!==-1},B.prototype.indexOf=function(cr,hr,jr){return He(this,cr,hr,jr,!0)},B.prototype.lastIndexOf=function(cr,hr,jr){return He(this,cr,hr,jr,!1)};function Pe(Ar,cr,hr,jr){hr=Number(hr)||0;var fi=Ar.length-hr;jr?(jr=Number(jr),jr>fi&&(jr=fi)):jr=fi;var Bi=cr.length;jr>Bi/2&&(jr=Bi/2);for(var $r=0;$r<jr;++$r){var oi=parseInt(cr.substr($r*2,2),16);if(Fr(oi))return $r;Ar[hr+$r]=oi}return $r}function ve(Ar,cr,hr,jr){return Sr(Qr(cr,Ar.length-hr),Ar,hr,jr)}function Fe(Ar,cr,hr,jr){return Sr(Xr(cr),Ar,hr,jr)}function be(Ar,cr,hr,jr){return Sr(Ur(cr),Ar,hr,jr)}function Be(Ar,cr,hr,jr){return Sr(Wr(cr,Ar.length-hr),Ar,hr,jr)}B.prototype.write=function(cr,hr,jr,fi){if(hr===void 0)fi="utf8",jr=this.length,hr=0;else if(jr===void 0&&typeof hr=="string")fi=hr,jr=this.length,hr=0;else if(isFinite(hr))hr=hr>>>0,isFinite(jr)?(jr=jr>>>0,fi===void 0&&(fi="utf8")):(fi=jr,jr=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Bi=this.length-hr;if((jr===void 0||jr>Bi)&&(jr=Bi),cr.length>0&&(jr<0||hr<0)||hr>this.length)throw new RangeError("Attempt to write outside buffer bounds");fi||(fi="utf8");for(var $r=!1;;)switch(fi){case"hex":return Pe(this,cr,hr,jr);case"utf8":case"utf-8":return ve(this,cr,hr,jr);case"ascii":case"latin1":case"binary":return Fe(this,cr,hr,jr);case"base64":return be(this,cr,hr,jr);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Be(this,cr,hr,jr);default:if($r)throw new TypeError("Unknown encoding: "+fi);fi=(""+fi).toLowerCase(),$r=!0}},B.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ke(Ar,cr,hr){return cr===0&&hr===Ar.length?g.fromByteArray(Ar):g.fromByteArray(Ar.slice(cr,hr))}function xe(Ar,cr,hr){hr=Math.min(Ar.length,hr);for(var jr=[],fi=cr;fi<hr;){var Bi=Ar[fi],$r=null,oi=Bi>239?4:Bi>223?3:Bi>191?2:1;if(fi+oi<=hr){var zr,ti,Lr,Rr;switch(oi){case 1:Bi<128&&($r=Bi);break;case 2:zr=Ar[fi+1],(zr&192)===128&&(Rr=(Bi&31)<<6|zr&63,Rr>127&&($r=Rr));break;case 3:zr=Ar[fi+1],ti=Ar[fi+2],(zr&192)===128&&(ti&192)===128&&(Rr=(Bi&15)<<12|(zr&63)<<6|ti&63,Rr>2047&&(Rr<55296||Rr>57343)&&($r=Rr));break;case 4:zr=Ar[fi+1],ti=Ar[fi+2],Lr=Ar[fi+3],(zr&192)===128&&(ti&192)===128&&(Lr&192)===128&&(Rr=(Bi&15)<<18|(zr&63)<<12|(ti&63)<<6|Lr&63,Rr>65535&&Rr<1114112&&($r=Rr))}}$r===null?($r=65533,oi=1):$r>65535&&($r-=65536,jr.push($r>>>10&1023|55296),$r=56320|$r&1023),jr.push($r),fi+=oi}return Et(jr)}var De=4096;function Et(Ar){var cr=Ar.length;if(cr<=De)return String.fromCharCode.apply(String,Ar);for(var hr="",jr=0;jr<cr;)hr+=String.fromCharCode.apply(String,Ar.slice(jr,jr+=De));return hr}function st(Ar,cr,hr){var jr="";hr=Math.min(Ar.length,hr);for(var fi=cr;fi<hr;++fi)jr+=String.fromCharCode(Ar[fi]&127);return jr}function Dt(Ar,cr,hr){var jr="";hr=Math.min(Ar.length,hr);for(var fi=cr;fi<hr;++fi)jr+=String.fromCharCode(Ar[fi]);return jr}function er(Ar,cr,hr){var jr=Ar.length;(!cr||cr<0)&&(cr=0),(!hr||hr<0||hr>jr)&&(hr=jr);for(var fi="",Bi=cr;Bi<hr;++Bi)fi+=br[Ar[Bi]];return fi}function xt(Ar,cr,hr){for(var jr=Ar.slice(cr,hr),fi="",Bi=0;Bi<jr.length-1;Bi+=2)fi+=String.fromCharCode(jr[Bi]+jr[Bi+1]*256);return fi}B.prototype.slice=function(cr,hr){var jr=this.length;cr=~~cr,hr=hr===void 0?jr:~~hr,cr<0?(cr+=jr,cr<0&&(cr=0)):cr>jr&&(cr=jr),hr<0?(hr+=jr,hr<0&&(hr=0)):hr>jr&&(hr=jr),hr<cr&&(hr=cr);var fi=this.subarray(cr,hr);return Object.setPrototypeOf(fi,B.prototype),fi};function ir(Ar,cr,hr){if(Ar%1!==0||Ar<0)throw new RangeError("offset is not uint");if(Ar+cr>hr)throw new RangeError("Trying to access beyond buffer length")}B.prototype.readUintLE=B.prototype.readUIntLE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=this[cr],Bi=1,$r=0;++$r<hr&&(Bi*=256);)fi+=this[cr+$r]*Bi;return fi},B.prototype.readUintBE=B.prototype.readUIntBE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=this[cr+--hr],Bi=1;hr>0&&(Bi*=256);)fi+=this[cr+--hr]*Bi;return fi},B.prototype.readUint8=B.prototype.readUInt8=function(cr,hr){return cr=cr>>>0,hr||ir(cr,1,this.length),this[cr]},B.prototype.readUint16LE=B.prototype.readUInt16LE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,2,this.length),this[cr]|this[cr+1]<<8},B.prototype.readUint16BE=B.prototype.readUInt16BE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,2,this.length),this[cr]<<8|this[cr+1]},B.prototype.readUint32LE=B.prototype.readUInt32LE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),(this[cr]|this[cr+1]<<8|this[cr+2]<<16)+this[cr+3]*16777216},B.prototype.readUint32BE=B.prototype.readUInt32BE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),this[cr]*16777216+(this[cr+1]<<16|this[cr+2]<<8|this[cr+3])},B.prototype.readIntLE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=this[cr],Bi=1,$r=0;++$r<hr&&(Bi*=256);)fi+=this[cr+$r]*Bi;return Bi*=128,fi>=Bi&&(fi-=Math.pow(2,8*hr)),fi},B.prototype.readIntBE=function(cr,hr,jr){cr=cr>>>0,hr=hr>>>0,jr||ir(cr,hr,this.length);for(var fi=hr,Bi=1,$r=this[cr+--fi];fi>0&&(Bi*=256);)$r+=this[cr+--fi]*Bi;return Bi*=128,$r>=Bi&&($r-=Math.pow(2,8*hr)),$r},B.prototype.readInt8=function(cr,hr){return cr=cr>>>0,hr||ir(cr,1,this.length),this[cr]&128?(255-this[cr]+1)*-1:this[cr]},B.prototype.readInt16LE=function(cr,hr){cr=cr>>>0,hr||ir(cr,2,this.length);var jr=this[cr]|this[cr+1]<<8;return jr&32768?jr|4294901760:jr},B.prototype.readInt16BE=function(cr,hr){cr=cr>>>0,hr||ir(cr,2,this.length);var jr=this[cr+1]|this[cr]<<8;return jr&32768?jr|4294901760:jr},B.prototype.readInt32LE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),this[cr]|this[cr+1]<<8|this[cr+2]<<16|this[cr+3]<<24},B.prototype.readInt32BE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),this[cr]<<24|this[cr+1]<<16|this[cr+2]<<8|this[cr+3]},B.prototype.readFloatLE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),c.read(this,cr,!0,23,4)},B.prototype.readFloatBE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,4,this.length),c.read(this,cr,!1,23,4)},B.prototype.readDoubleLE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,8,this.length),c.read(this,cr,!0,52,8)},B.prototype.readDoubleBE=function(cr,hr){return cr=cr>>>0,hr||ir(cr,8,this.length),c.read(this,cr,!1,52,8)};function sr(Ar,cr,hr,jr,fi,Bi){if(!B.isBuffer(Ar))throw new TypeError('"buffer" argument must be a Buffer instance');if(cr>fi||cr<Bi)throw new RangeError('"value" argument is out of bounds');if(hr+jr>Ar.length)throw new RangeError("Index out of range")}B.prototype.writeUintLE=B.prototype.writeUIntLE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,jr=jr>>>0,!fi){var Bi=Math.pow(2,8*jr)-1;sr(this,cr,hr,jr,Bi,0)}var $r=1,oi=0;for(this[hr]=cr&255;++oi<jr&&($r*=256);)this[hr+oi]=cr/$r&255;return hr+jr},B.prototype.writeUintBE=B.prototype.writeUIntBE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,jr=jr>>>0,!fi){var Bi=Math.pow(2,8*jr)-1;sr(this,cr,hr,jr,Bi,0)}var $r=jr-1,oi=1;for(this[hr+$r]=cr&255;--$r>=0&&(oi*=256);)this[hr+$r]=cr/oi&255;return hr+jr},B.prototype.writeUint8=B.prototype.writeUInt8=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,1,255,0),this[hr]=cr&255,hr+1},B.prototype.writeUint16LE=B.prototype.writeUInt16LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,65535,0),this[hr]=cr&255,this[hr+1]=cr>>>8,hr+2},B.prototype.writeUint16BE=B.prototype.writeUInt16BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,65535,0),this[hr]=cr>>>8,this[hr+1]=cr&255,hr+2},B.prototype.writeUint32LE=B.prototype.writeUInt32LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,4294967295,0),this[hr+3]=cr>>>24,this[hr+2]=cr>>>16,this[hr+1]=cr>>>8,this[hr]=cr&255,hr+4},B.prototype.writeUint32BE=B.prototype.writeUInt32BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,4294967295,0),this[hr]=cr>>>24,this[hr+1]=cr>>>16,this[hr+2]=cr>>>8,this[hr+3]=cr&255,hr+4},B.prototype.writeIntLE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,!fi){var Bi=Math.pow(2,8*jr-1);sr(this,cr,hr,jr,Bi-1,-Bi)}var $r=0,oi=1,zr=0;for(this[hr]=cr&255;++$r<jr&&(oi*=256);)cr<0&&zr===0&&this[hr+$r-1]!==0&&(zr=1),this[hr+$r]=(cr/oi>>0)-zr&255;return hr+jr},B.prototype.writeIntBE=function(cr,hr,jr,fi){if(cr=+cr,hr=hr>>>0,!fi){var Bi=Math.pow(2,8*jr-1);sr(this,cr,hr,jr,Bi-1,-Bi)}var $r=jr-1,oi=1,zr=0;for(this[hr+$r]=cr&255;--$r>=0&&(oi*=256);)cr<0&&zr===0&&this[hr+$r+1]!==0&&(zr=1),this[hr+$r]=(cr/oi>>0)-zr&255;return hr+jr},B.prototype.writeInt8=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,1,127,-128),cr<0&&(cr=255+cr+1),this[hr]=cr&255,hr+1},B.prototype.writeInt16LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,32767,-32768),this[hr]=cr&255,this[hr+1]=cr>>>8,hr+2},B.prototype.writeInt16BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,2,32767,-32768),this[hr]=cr>>>8,this[hr+1]=cr&255,hr+2},B.prototype.writeInt32LE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,2147483647,-2147483648),this[hr]=cr&255,this[hr+1]=cr>>>8,this[hr+2]=cr>>>16,this[hr+3]=cr>>>24,hr+4},B.prototype.writeInt32BE=function(cr,hr,jr){return cr=+cr,hr=hr>>>0,jr||sr(this,cr,hr,4,2147483647,-2147483648),cr<0&&(cr=4294967295+cr+1),this[hr]=cr>>>24,this[hr+1]=cr>>>16,this[hr+2]=cr>>>8,this[hr+3]=cr&255,hr+4};function yr(Ar,cr,hr,jr,fi,Bi){if(hr+jr>Ar.length)throw new RangeError("Index out of range");if(hr<0)throw new RangeError("Index out of range")}function wr(Ar,cr,hr,jr,fi){return cr=+cr,hr=hr>>>0,fi||yr(Ar,cr,hr,4),c.write(Ar,cr,hr,jr,23,4),hr+4}B.prototype.writeFloatLE=function(cr,hr,jr){return wr(this,cr,hr,!0,jr)},B.prototype.writeFloatBE=function(cr,hr,jr){return wr(this,cr,hr,!1,jr)};function qr(Ar,cr,hr,jr,fi){return cr=+cr,hr=hr>>>0,fi||yr(Ar,cr,hr,8),c.write(Ar,cr,hr,jr,52,8),hr+8}B.prototype.writeDoubleLE=function(cr,hr,jr){return qr(this,cr,hr,!0,jr)},B.prototype.writeDoubleBE=function(cr,hr,jr){return qr(this,cr,hr,!1,jr)},B.prototype.copy=function(cr,hr,jr,fi){if(!B.isBuffer(cr))throw new TypeError("argument should be a Buffer");if(jr||(jr=0),!fi&&fi!==0&&(fi=this.length),hr>=cr.length&&(hr=cr.length),hr||(hr=0),fi>0&&fi<jr&&(fi=jr),fi===jr||cr.length===0||this.length===0)return 0;if(hr<0)throw new RangeError("targetStart out of bounds");if(jr<0||jr>=this.length)throw new RangeError("Index out of range");if(fi<0)throw new RangeError("sourceEnd out of bounds");fi>this.length&&(fi=this.length),cr.length-hr<fi-jr&&(fi=cr.length-hr+jr);var Bi=fi-jr;return this===cr&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(hr,jr,fi):Uint8Array.prototype.set.call(cr,this.subarray(jr,fi),hr),Bi},B.prototype.fill=function(cr,hr,jr,fi){if(typeof cr=="string"){if(typeof hr=="string"?(fi=hr,hr=0,jr=this.length):typeof jr=="string"&&(fi=jr,jr=this.length),fi!==void 0&&typeof fi!="string")throw new TypeError("encoding must be a string");if(typeof fi=="string"&&!B.isEncoding(fi))throw new TypeError("Unknown encoding: "+fi);if(cr.length===1){var Bi=cr.charCodeAt(0);(fi==="utf8"&&Bi<128||fi==="latin1")&&(cr=Bi)}}else typeof cr=="number"?cr=cr&255:typeof cr=="boolean"&&(cr=Number(cr));if(hr<0||this.length<hr||this.length<jr)throw new RangeError("Out of range index");if(jr<=hr)return this;hr=hr>>>0,jr=jr===void 0?this.length:jr>>>0,cr||(cr=0);var $r;if(typeof cr=="number")for($r=hr;$r<jr;++$r)this[$r]=cr;else{var oi=B.isBuffer(cr)?cr:B.from(cr,fi),zr=oi.length;if(zr===0)throw new TypeError('The value "'+cr+'" is invalid for argument "value"');for($r=0;$r<jr-hr;++$r)this[$r+hr]=oi[$r%zr]}return this};var Mr=/[^+/0-9A-Za-z-_]/g;function Dr(Ar){if(Ar=Ar.split("=")[0],Ar=Ar.trim().replace(Mr,""),Ar.length<2)return"";for(;Ar.length%4!==0;)Ar=Ar+"=";return Ar}function Qr(Ar,cr){cr=cr||1/0;for(var hr,jr=Ar.length,fi=null,Bi=[],$r=0;$r<jr;++$r){if(hr=Ar.charCodeAt($r),hr>55295&&hr<57344){if(!fi){if(hr>56319){(cr-=3)>-1&&Bi.push(239,191,189);continue}else if($r+1===jr){(cr-=3)>-1&&Bi.push(239,191,189);continue}fi=hr;continue}if(hr<56320){(cr-=3)>-1&&Bi.push(239,191,189),fi=hr;continue}hr=(fi-55296<<10|hr-56320)+65536}else fi&&(cr-=3)>-1&&Bi.push(239,191,189);if(fi=null,hr<128){if((cr-=1)<0)break;Bi.push(hr)}else if(hr<2048){if((cr-=2)<0)break;Bi.push(hr>>6|192,hr&63|128)}else if(hr<65536){if((cr-=3)<0)break;Bi.push(hr>>12|224,hr>>6&63|128,hr&63|128)}else if(hr<1114112){if((cr-=4)<0)break;Bi.push(hr>>18|240,hr>>12&63|128,hr>>6&63|128,hr&63|128)}else throw new Error("Invalid code point")}return Bi}function Xr(Ar){for(var cr=[],hr=0;hr<Ar.length;++hr)cr.push(Ar.charCodeAt(hr)&255);return cr}function Wr(Ar,cr){for(var hr,jr,fi,Bi=[],$r=0;$r<Ar.length&&!((cr-=2)<0);++$r)hr=Ar.charCodeAt($r),jr=hr>>8,fi=hr%256,Bi.push(fi),Bi.push(jr);return Bi}function Ur(Ar){return g.toByteArray(Dr(Ar))}function Sr(Ar,cr,hr,jr){for(var fi=0;fi<jr&&!(fi+hr>=cr.length||fi>=Ar.length);++fi)cr[fi+hr]=Ar[fi];return fi}function Gr(Ar,cr){return Ar instanceof cr||Ar!=null&&Ar.constructor!=null&&Ar.constructor.name!=null&&Ar.constructor.name===cr.name}function Fr(Ar){return Ar!==Ar}var br=function(){for(var Ar="0123456789abcdef",cr=new Array(256),hr=0;hr<16;++hr)for(var jr=hr*16,fi=0;fi<16;++fi)cr[jr+fi]=Ar[hr]+Ar[fi];return cr}()}(buffer$1)),buffer$1}var bufferExports$1=requireBuffer$1();const createBuffer=bufferExports$1.Buffer.from&&bufferExports$1.Buffer.alloc&&bufferExports$1.Buffer.allocUnsafe&&bufferExports$1.Buffer.allocUnsafeSlow?bufferExports$1.Buffer.from:o=>new bufferExports$1.Buffer(o);function defineCrc(o,g){const c=(y,t)=>g(y,t)>>>0;return c.signed=g,c.unsigned=c,c.model=o,c}const crc1=defineCrc("crc1",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g,y=0;for(let t=0;t<o.length;t++){const d=o[t];y+=d}return c+=y%256,c%256});let TABLE$8=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];typeof Int32Array<"u"&&(TABLE$8=new Int32Array(TABLE$8));const crc8=defineCrc("crc-8",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE$8[(c^t)&255]&255}return c});let TABLE$7=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];typeof Int32Array<"u"&&(TABLE$7=new Int32Array(TABLE$7));const crc81wire=defineCrc("dallas-1-wire",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE$7[(c^t)&255]&255}return c});let TABLE$6=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(TABLE$6=new Int32Array(TABLE$6));const crc16=defineCrc("crc-16",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=~~g;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$6[(c^t)&255]^c>>8)&65535}return c});let TABLE$5=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];typeof Int32Array<"u"&&(TABLE$5=new Int32Array(TABLE$5));const crc16ccitt=defineCrc("ccitt",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:65535;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$5[(c>>8^t)&255]^c<<8)&65535}return c});let TABLE$4=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(TABLE$4=new Int32Array(TABLE$4));const crc16modbus=defineCrc("crc-16-modbus",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:65535;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$4[(c^t)&255]^c>>8)&65535}return c}),crc16xmodem=defineCrc("xmodem",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:0;for(let y=0;y<o.length;y++){const t=o[y];let d=c>>>8&255;d^=t&255,d^=d>>>4,c=c<<8&65535,c^=d,d=d<<5&65535,c^=d,d=d<<7&65535,c^=d}return c});let TABLE$3=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];typeof Int32Array<"u"&&(TABLE$3=new Int32Array(TABLE$3));const crc16kermit=defineCrc("kermit",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:0;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$3[(c^t)&255]^c>>8)&65535}return c});let TABLE$2=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];typeof Int32Array<"u"&&(TABLE$2=new Int32Array(TABLE$2));const crc24=defineCrc("crc-24",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=typeof g<"u"?~~g:11994318;for(let y=0;y<o.length;y++){const t=o[y];c=(TABLE$2[(c>>16^t)&255]^c<<8)&16777215}return c});let TABLE$1=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(TABLE$1=new Int32Array(TABLE$1));const crc32$1=defineCrc("crc-32",function(o,g){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=g===0?0:~~g^-1;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE$1[(c^t)&255]^c>>>8}return c^-1});let TABLE=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(TABLE=new Int32Array(TABLE));const crcjam=defineCrc("jam",function(o,g=-1){bufferExports$1.Buffer.isBuffer(o)||(o=createBuffer(o));let c=g===0?0:~~g;for(let y=0;y<o.length;y++){const t=o[y];c=TABLE[(c^t)&255]^c>>>8}return c}),index={crc1,crc8,crc81wire,crc16,crc16ccitt,crc16modbus,crc16xmodem,crc16kermit,crc24,crc32:crc32$1,crcjam},crc=Object.freeze(Object.defineProperty({__proto__:null,crc1,crc16,crc16ccitt,crc16kermit,crc16modbus,crc16xmodem,crc24,crc32:crc32$1,crc8,crc81wire,crcjam,default:index},Symbol.toStringTag,{value:"Module"})),require$$1$4=getAugmentedNamespace(crc);var hasRequiredUtils$f;function requireUtils$f(){if(hasRequiredUtils$f)return utils$g;hasRequiredUtils$f=1;var o=utils$g&&utils$g.__importDefault||function(fe){return fe&&fe.__esModule?fe:{default:fe}};Object.defineProperty(utils$g,"__esModule",{value:!0}),utils$g.bufferXOR=utils$g.setDifference=utils$g.arrayContains=utils$g.arraysEqual=utils$g.hasPrefix=utils$g.isURType=utils$g.intToBytes=utils$g.toUint32=utils$g.getCRCHex=utils$g.getCRC=utils$g.split=utils$g.partition=utils$g.sha256Hash=void 0;const g=o(requireSha_js()),c=require$$1$4,y=fe=>g.default("sha256").update(fe).digest();utils$g.sha256Hash=y;const t=(fe,ge)=>fe.match(new RegExp(".{1,"+ge+"}","g"))||[fe];utils$g.partition=t;const d=(fe,ge)=>[fe.slice(0,-ge),fe.slice(-ge)];utils$g.split=d;const E=fe=>c.crc32(fe);utils$g.getCRC=E;const B=fe=>c.crc32(fe).toString(16).padStart(8,"0");utils$g.getCRCHex=B;const D=fe=>fe>>>0;utils$g.toUint32=D;const x=fe=>{const ge=new ArrayBuffer(4);return new DataView(ge).setUint32(0,fe,!1),Buffer.from(ge)};utils$g.intToBytes=x;const v=fe=>fe.split("").every((ge,Ie)=>{let Ee=fe.charCodeAt(Ie);return 97<=Ee&&Ee<=122||48<=Ee&&Ee<=57||Ee===45});utils$g.isURType=v;const F=(fe,ge)=>fe.indexOf(ge)===0;utils$g.hasPrefix=F;const M=(fe,ge)=>fe.length!==ge.length?!1:fe.every(Ie=>ge.includes(Ie));utils$g.arraysEqual=M;const U=(fe,ge)=>ge.every(Ie=>fe.includes(Ie));utils$g.arrayContains=U;const L=(fe,ge)=>fe.filter(Ie=>ge.indexOf(Ie)<0);utils$g.setDifference=L;const H=(fe,ge)=>{const Ie=Math.max(fe.length,ge.length),Ee=Buffer.allocUnsafe(Ie);for(let Se=0;Se<Ie;++Se)Ee[Se]=fe[Se]^ge[Se];return Ee};return utils$g.bufferXOR=H,utils$g}var cbor={},main$5={exports:{}},main$4=main$5.exports,hasRequiredMain$4;function requireMain$4(){return hasRequiredMain$4||(hasRequiredMain$4=1,function(o){(function(g,c){o.exports?o.exports=c():g.CBOR=c()})(main$4,function(){var g=function(){function c(He){this.$hex=He}c.prototype={length:function(){return this.$hex.length/2},toString:function(He){if(!He||He==="hex"||He===16)return this.$hex;if(He==="utf-8"){for(var Ne="",Pe=0;Pe<this.$hex.length;Pe+=2)Ne+="%"+this.$hex.substring(Pe,Pe+2);return decodeURIComponent(Ne)}if(He==="latin"){for(var Ne=[],Pe=0;Pe<this.$hex.length;Pe+=2)Ne.push(parseInt(this.$hex.substring(Pe,Pe+2),16));return String.fromCharCode.apply(String,Ne)}throw new Error("Unrecognised format: "+He)}},c.fromLatinString=function(He){for(var Ne="",Pe=0;Pe<He.length;Pe++){var ve=He.charCodeAt(Pe).toString(16);ve.length===1&&(ve="0"+ve),Ne+=ve}return new c(Ne)},c.fromUtf8String=function(He){for(var Ne=encodeURIComponent(He),Pe="",ve=0;ve<Ne.length;ve++)if(Ne.charAt(ve)==="%")Pe+=Ne.substring(ve+1,ve+3),ve+=2;else{var Fe=Ne.charCodeAt(ve).toString(16);Fe.length<2&&(Fe="0"+Fe),Pe+=Fe}return new c(Pe)};var y=[],t={},d=function(He){return function(){throw new Error(He+" not implemented")}};function E(){}E.prototype={peekByte:d("peekByte"),readByte:d("readByte"),readChunk:d("readChunk"),readFloat16:function(){var He=this.readUint16(),Ne=(He&32767)>>10,Pe=He&1023,ve=He&32768;if(Ne===31)return Pe===0?ve?-1/0:1/0:NaN;var Fe=Ne?Math.pow(2,Ne-25)*(1024+Pe):Math.pow(2,-24)*Pe;return ve?-Fe:Fe},readFloat32:function(){var He=this.readUint32(),Ne=(He&2147483647)>>23,Pe=He&8388607,ve=He&2147483648;if(Ne===255)return Pe===0?ve?-1/0:1/0:NaN;var Fe=Ne?Math.pow(2,Ne-23-127)*(8388608+Pe):Math.pow(2,-149)*Pe;return ve?-Fe:Fe},readFloat64:function(){var He=this.readUint32(),Ne=this.readUint32(),Pe=He>>20&2047,ve=(He&1048575)*4294967296+Ne,Fe=He&2147483648;if(Pe===2047)return ve===0?Fe?-1/0:1/0:NaN;var be=Pe?Math.pow(2,Pe-52-1023)*(4503599627370496+ve):Math.pow(2,-1074)*ve;return Fe?-be:be},readUint16:function(){return this.readByte()*256+this.readByte()},readUint32:function(){return this.readUint16()*65536+this.readUint16()},readUint64:function(){return this.readUint32()*4294967296+this.readUint32()}};function B(){}B.prototype={writeByte:d("writeByte"),result:d("result"),writeFloat16:d("writeFloat16"),writeFloat32:d("writeFloat32"),writeFloat64:d("writeFloat64"),writeUint16:function(He){this.writeByte(He>>8&255),this.writeByte(He&255)},writeUint32:function(He){this.writeUint16(He>>16&65535),this.writeUint16(He&65535)},writeUint64:function(He){if(He>=9007199254740992||He<=-9007199254740992)throw new Error("Cannot encode Uint64 of: "+He+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(He/4294967296)),this.writeUint32(He%4294967296)},writeString:d("writeString"),canWriteBinary:function(He){return!1},writeBinary:d("writeChunk")};function D(He){var Ne=He.readByte(),Pe=Ne>>5,ve=Ne&31;return{type:Pe,value:ve}}function x(He,Ne){var Pe=He.value;if(Pe<24)return Pe;if(Pe==24)return Ne.readByte();if(Pe==25)return Ne.readUint16();if(Pe==26)return Ne.readUint32();if(Pe==27)return Ne.readUint64();if(Pe==31)return null;d("Additional info: "+Pe)()}function v(He,Ne,Pe){Pe.writeByte(He<<5|Ne)}function F(He,Ne,Pe){var ve=He<<5;Ne<24?Pe.writeByte(ve|Ne):Ne<256?(Pe.writeByte(ve|24),Pe.writeByte(Ne)):Ne<65536?(Pe.writeByte(ve|25),Pe.writeUint16(Ne)):Ne<4294967296?(Pe.writeByte(ve|26),Pe.writeUint32(Ne)):(Pe.writeByte(ve|27),Pe.writeUint64(Ne))}var M=new Error;function U(He){var Ne=D(He);switch(Ne.type){case 0:return x(Ne,He);case 1:return-1-x(Ne,He);case 2:return He.readChunk(x(Ne,He));case 3:var Pe=He.readChunk(x(Ne,He));return Pe.toString("utf-8");case 4:case 5:var ve=x(Ne,He),De=[];if(ve!==null){Ne.type===5&&(ve*=2);for(var Fe=0;Fe<ve;Fe++)De[Fe]=U(He)}else for(var be;(be=U(He))!==M;)De.push(be);if(Ne.type===5){for(var Be={},Fe=0;Fe<De.length;Fe+=2)Be[De[Fe]]=De[Fe+1];return Be}else return De;case 6:var ke=x(Ne,He),xe=t[ke],De=U(He);return xe?xe(De):De;case 7:if(Ne.value===25)return He.readFloat16();if(Ne.value===26)return He.readFloat32();if(Ne.value===27)return He.readFloat64();switch(x(Ne,He)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case null:return M;default:throw new Error("Unknown fixed value: "+Ne.value)}default:throw new Error("Unsupported header: "+JSON.stringify(Ne))}throw new Error("not implemented yet")}function L(He,Ne){for(var Pe=0;Pe<y.length;Pe++){var ve=y[Pe].fn(He);if(ve!==void 0)return F(6,y[Pe].tag,Ne),L(ve,Ne)}if(He&&typeof He.toCBOR=="function"&&(He=He.toCBOR()),He===!1)F(7,20,Ne);else if(He===!0)F(7,21,Ne);else if(He===null)F(7,22,Ne);else if(He===void 0)F(7,23,Ne);else if(typeof He=="number")Math.floor(He)===He&&He<9007199254740992&&He>-9007199254740992?He<0?F(1,-1-He,Ne):F(0,He,Ne):(v(7,27,Ne),Ne.writeFloat64(He));else if(typeof He=="string")Ne.writeString(He,function(be){F(3,be,Ne)});else if(Ne.canWriteBinary(He))Ne.writeBinary(He,function(be){F(2,be,Ne)});else if(typeof He=="object")if(ge.config.useToJSON&&typeof He.toJSON=="function"&&(He=He.toJSON()),Array.isArray(He)){F(4,He.length,Ne);for(var Pe=0;Pe<He.length;Pe++)L(He[Pe],Ne)}else{var Fe=Object.keys(He);F(5,Fe.length,Ne);for(var Pe=0;Pe<Fe.length;Pe++)L(Fe[Pe],Ne),L(He[Fe[Pe]],Ne)}else throw new Error("CBOR encoding not supported: "+He)}var H=[],fe=[],ge={config:{useToJSON:!0},addWriter:function(He,Ne){typeof He=="string"?fe.push(function(Pe){if(He===Pe)return Ne(Pe)}):fe.push(He)},addReader:function(He,Ne){typeof He=="string"?H.push(function(Pe,ve){if(He===ve)return Ne(Pe,ve)}):H.push(He)},encode:function(He,Ne){for(var Pe=0;Pe<fe.length;Pe++){var ve=fe[Pe],Fe=ve(Ne);if(Fe)return L(He,Fe),Fe.result()}throw new Error("Unsupported output format: "+Ne)},decode:function(He,Ne){for(var Pe=0;Pe<H.length;Pe++){var ve=H[Pe],Fe=ve(He,Ne);if(Fe)return U(Fe)}throw new Error("Unsupported input format: "+Ne)},addSemanticEncode:function(He,Ne){if(typeof He!="number"||He%1!==0||He<0)throw new Error("Tag must be a positive integer");return y.push({tag:He,fn:Ne}),this},addSemanticDecode:function(He,Ne){if(typeof He!="number"||He%1!==0||He<0)throw new Error("Tag must be a positive integer");return t[He]=Ne,this},Reader:E,Writer:B};function Ie(He){this.buffer=He,this.pos=0}Ie.prototype=Object.create(E.prototype),Ie.prototype.peekByte=function(){return this.buffer[this.pos]},Ie.prototype.readByte=function(){return this.buffer[this.pos++]},Ie.prototype.readUint16=function(){var He=this.buffer.readUInt16BE(this.pos);return this.pos+=2,He},Ie.prototype.readUint32=function(){var He=this.buffer.readUInt32BE(this.pos);return this.pos+=4,He},Ie.prototype.readFloat32=function(){var He=this.buffer.readFloatBE(this.pos);return this.pos+=4,He},Ie.prototype.readFloat64=function(){var He=this.buffer.readDoubleBE(this.pos);return this.pos+=8,He},Ie.prototype.readChunk=function(He){var Ne=Buffer.alloc(He);return this.buffer.copy(Ne,0,this.pos,this.pos+=He),Ne};function Ee(He){this.byteLength=0,this.defaultBufferLength=16384,this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0,this.completeBuffers=[],this.stringFormat=He}Ee.prototype=Object.create(B.prototype),Ee.prototype.writeByte=function(He){this.latestBuffer[this.latestBufferOffset++]=He,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0),this.byteLength++},Ee.prototype.writeFloat32=function(He){var Ne=Buffer.alloc(4);Ne.writeFloatBE(He,0),this.writeBuffer(Ne)},Ee.prototype.writeFloat64=function(He){var Ne=Buffer.alloc(8);Ne.writeDoubleBE(He,0),this.writeBuffer(Ne)},Ee.prototype.writeString=function(He,Ne){var Pe=Buffer.from(He,"utf-8");Ne(Pe.length),this.writeBuffer(Pe)},Ee.prototype.canWriteBinary=function(He){return He instanceof Buffer},Ee.prototype.writeBinary=function(He,Ne){Ne(He.length),this.writeBuffer(He)},Ee.prototype.writeBuffer=function(He){if(!(He instanceof Buffer))throw new TypeError("BufferWriter only accepts Buffers");this.latestBufferOffset?this.latestBuffer.length-this.latestBufferOffset>=He.length?(He.copy(this.latestBuffer,this.latestBufferOffset),this.latestBufferOffset+=He.length,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0)):(this.completeBuffers.push(this.latestBuffer.slice(0,this.latestBufferOffset)),this.completeBuffers.push(He),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0):this.completeBuffers.push(He),this.byteLength+=He.length},Ee.prototype.result=function(){for(var He=Buffer.alloc(this.byteLength),Ne=0,Pe=0;Pe<this.completeBuffers.length;Pe++){var ve=this.completeBuffers[Pe];ve.copy(He,Ne,0,ve.length),Ne+=ve.length}return this.latestBufferOffset&&this.latestBuffer.copy(He,Ne,0,this.latestBufferOffset),this.stringFormat?He.toString(this.stringFormat):He},typeof Buffer=="function"&&(ge.addReader(function(He,Ne){if(He instanceof Buffer)return new Ie(He);if(Ne==="hex"||Ne==="base64"){var Pe=Buffer.from(He,Ne);return new Ie(Pe)}}),ge.addWriter(function(He){if(!He||He==="buffer")return new Ee;if(He==="hex"||He==="base64")return new Ee(He)}));function Se(He){this.hex=He,this.pos=0}Se.prototype=Object.create(E.prototype),Se.prototype.peekByte=function(){var He=this.hex.substring(this.pos,2);return parseInt(He,16)},Se.prototype.readByte=function(){var He=this.hex.substring(this.pos,this.pos+2);return this.pos+=2,parseInt(He,16)},Se.prototype.readChunk=function(He){var Ne=this.hex.substring(this.pos,this.pos+He*2);return this.pos+=He*2,typeof Buffer=="function"?Buffer.from(Ne,"hex"):new c(Ne)};function ze(He){this.$hex="",this.finalFormat=He||"hex"}return ze.prototype=Object.create(B.prototype),ze.prototype.writeByte=function(He){if(He<0||He>255)throw new Error("Byte value out of range: "+He);var Ne=He.toString(16);Ne.length==1&&(Ne="0"+Ne),this.$hex+=Ne},ze.prototype.canWriteBinary=function(He){return He instanceof c||typeof Buffer=="function"&&He instanceof Buffer},ze.prototype.writeBinary=function(He,Ne){if(He instanceof c)Ne(He.length()),this.$hex+=He.$hex;else if(typeof Buffer=="function"&&He instanceof Buffer)Ne(He.length),this.$hex+=He.toString("hex");else throw new TypeError("HexWriter only accepts BinaryHex or Buffers")},ze.prototype.result=function(){return this.finalFormat==="buffer"&&typeof Buffer=="function"?Buffer.from(this.$hex,"hex"):new c(this.$hex).toString(this.finalFormat)},ze.prototype.writeString=function(He,Ne){var Pe=c.fromUtf8String(He);Ne(Pe.length()),this.$hex+=Pe.$hex},ge.addReader(function(He,Ne){if(He instanceof c||He.$hex)return new Se(He.$hex);if(Ne==="hex")return new Se(He)}),ge.addWriter(function(He){if(He==="hex")return new ze}),ge}();return g.addSemanticEncode(0,function(c){if(c instanceof Date)return c.toISOString()}).addSemanticDecode(0,function(c){return new Date(c)}).addSemanticDecode(1,function(c){return new Date(c)}),g})}(main$5)),main$5.exports}var hasRequiredCbor;function requireCbor(){if(hasRequiredCbor)return cbor;hasRequiredCbor=1,Object.defineProperty(cbor,"__esModule",{value:!0}),cbor.cborDecode=cbor.cborEncode=void 0;const o=requireMain$4(),g=y=>o.encode(y);cbor.cborEncode=g;const c=y=>o.decode(Buffer.isBuffer(y)?y:Buffer.from(y,"hex"));return cbor.cborDecode=c,cbor}var hasRequiredUr$1;function requireUr$1(){if(hasRequiredUr$1)return ur$1;hasRequiredUr$1=1,Object.defineProperty(ur$1,"__esModule",{value:!0});const o=requireErrors$6(),g=requireUtils$f(),c=requireCbor();class y{constructor(d,E="bytes"){if(this._cborPayload=d,this._type=E,!g.isURType(this._type))throw new o.InvalidTypeError}static fromBuffer(d){return new y(c.cborEncode(d))}static from(d,E){return y.fromBuffer(Buffer.from(d,E))}decodeCBOR(){return c.cborDecode(this._cborPayload)}get type(){return this._type}get cbor(){return this._cborPayload}equals(d){return this.type===d.type&&this.cbor.equals(d.cbor)}}return ur$1.default=y,ur$1}var urEncoder={},fountainEncoder={},assert$2={exports:{}},errors$5={},util$1={},types$a={},isArguments$1,hasRequiredIsArguments$1;function requireIsArguments$1(){if(hasRequiredIsArguments$1)return isArguments$1;hasRequiredIsArguments$1=1;var o=requireShams()(),g=requireCallBound$1(),c=g("Object.prototype.toString"),y=function(B){return o&&B&&typeof B=="object"&&Symbol.toStringTag in B?!1:c(B)==="[object Arguments]"},t=function(B){return y(B)?!0:B!==null&&typeof B=="object"&&"length"in B&&typeof B.length=="number"&&B.length>=0&&c(B)!=="[object Array]"&&"callee"in B&&c(B.callee)==="[object Function]"},d=function(){return y(arguments)}();return y.isLegacyArguments=t,isArguments$1=d?y:t,isArguments$1}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var o=requireCallBound$1(),g=requireShams()(),c=requireHasown(),y=requireGopd(),t;if(g){var d=o("RegExp.prototype.exec"),E={},B=function(){throw E},D={toString:B,valueOf:B};typeof Symbol.toPrimitive=="symbol"&&(D[Symbol.toPrimitive]=B),t=function(M){if(!M||typeof M!="object")return!1;var U=y(M,"lastIndex"),L=U&&c(U,"value");if(!L)return!1;try{d(M,D)}catch(H){return H===E}}}else{var x=o("Object.prototype.toString"),v="[object RegExp]";t=function(M){return!M||typeof M!="object"&&typeof M!="function"?!1:x(M)===v}}return isRegex=t,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var o=requireCallBound$1(),g=requireIsRegex(),c=o("RegExp.prototype.exec"),y=requireType();return safeRegexTest=function(d){if(!g(d))throw new y("`regex` must be a RegExp");return function(B){return c(d,B)!==null}},safeRegexTest}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var o=requireCallBound$1(),g=requireSafeRegexTest(),c=g(/^\s*(?:function)?\*/),y=requireShams()(),t=requireGetProto(),d=o("Object.prototype.toString"),E=o("Function.prototype.toString"),B=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch{}},D;return isGeneratorFunction=function(v){if(typeof v!="function")return!1;if(c(E(v)))return!0;if(!y){var F=d(v);return F==="[object GeneratorFunction]"}if(!t)return!1;if(typeof D>"u"){var M=B();D=M?t(M):!1}return t(v)===D},isGeneratorFunction}var hasRequiredTypes$a;function requireTypes$a(){return hasRequiredTypes$a||(hasRequiredTypes$a=1,function(o){var g=requireIsArguments$1(),c=requireIsGeneratorFunction(),y=requireWhichTypedArray(),t=requireIsTypedArray();function d(jr){return jr.call.bind(jr)}var E=typeof BigInt<"u",B=typeof Symbol<"u",D=d(Object.prototype.toString),x=d(Number.prototype.valueOf),v=d(String.prototype.valueOf),F=d(Boolean.prototype.valueOf);if(E)var M=d(BigInt.prototype.valueOf);if(B)var U=d(Symbol.prototype.valueOf);function L(jr,fi){if(typeof jr!="object")return!1;try{return fi(jr),!0}catch{return!1}}o.isArgumentsObject=g,o.isGeneratorFunction=c,o.isTypedArray=t;function H(jr){return typeof Promise<"u"&&jr instanceof Promise||jr!==null&&typeof jr=="object"&&typeof jr.then=="function"&&typeof jr.catch=="function"}o.isPromise=H;function fe(jr){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(jr):t(jr)||yr(jr)}o.isArrayBufferView=fe;function ge(jr){return y(jr)==="Uint8Array"}o.isUint8Array=ge;function Ie(jr){return y(jr)==="Uint8ClampedArray"}o.isUint8ClampedArray=Ie;function Ee(jr){return y(jr)==="Uint16Array"}o.isUint16Array=Ee;function Se(jr){return y(jr)==="Uint32Array"}o.isUint32Array=Se;function ze(jr){return y(jr)==="Int8Array"}o.isInt8Array=ze;function He(jr){return y(jr)==="Int16Array"}o.isInt16Array=He;function Ne(jr){return y(jr)==="Int32Array"}o.isInt32Array=Ne;function Pe(jr){return y(jr)==="Float32Array"}o.isFloat32Array=Pe;function ve(jr){return y(jr)==="Float64Array"}o.isFloat64Array=ve;function Fe(jr){return y(jr)==="BigInt64Array"}o.isBigInt64Array=Fe;function be(jr){return y(jr)==="BigUint64Array"}o.isBigUint64Array=be;function Be(jr){return D(jr)==="[object Map]"}Be.working=typeof Map<"u"&&Be(new Map);function ke(jr){return typeof Map>"u"?!1:Be.working?Be(jr):jr instanceof Map}o.isMap=ke;function xe(jr){return D(jr)==="[object Set]"}xe.working=typeof Set<"u"&&xe(new Set);function De(jr){return typeof Set>"u"?!1:xe.working?xe(jr):jr instanceof Set}o.isSet=De;function Et(jr){return D(jr)==="[object WeakMap]"}Et.working=typeof WeakMap<"u"&&Et(new WeakMap);function st(jr){return typeof WeakMap>"u"?!1:Et.working?Et(jr):jr instanceof WeakMap}o.isWeakMap=st;function Dt(jr){return D(jr)==="[object WeakSet]"}Dt.working=typeof WeakSet<"u"&&Dt(new WeakSet);function er(jr){return Dt(jr)}o.isWeakSet=er;function xt(jr){return D(jr)==="[object ArrayBuffer]"}xt.working=typeof ArrayBuffer<"u"&&xt(new ArrayBuffer);function ir(jr){return typeof ArrayBuffer>"u"?!1:xt.working?xt(jr):jr instanceof ArrayBuffer}o.isArrayBuffer=ir;function sr(jr){return D(jr)==="[object DataView]"}sr.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&sr(new DataView(new ArrayBuffer(1),0,1));function yr(jr){return typeof DataView>"u"?!1:sr.working?sr(jr):jr instanceof DataView}o.isDataView=yr;var wr=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function qr(jr){return D(jr)==="[object SharedArrayBuffer]"}function Mr(jr){return typeof wr>"u"?!1:(typeof qr.working>"u"&&(qr.working=qr(new wr)),qr.working?qr(jr):jr instanceof wr)}o.isSharedArrayBuffer=Mr;function Dr(jr){return D(jr)==="[object AsyncFunction]"}o.isAsyncFunction=Dr;function Qr(jr){return D(jr)==="[object Map Iterator]"}o.isMapIterator=Qr;function Xr(jr){return D(jr)==="[object Set Iterator]"}o.isSetIterator=Xr;function Wr(jr){return D(jr)==="[object Generator]"}o.isGeneratorObject=Wr;function Ur(jr){return D(jr)==="[object WebAssembly.Module]"}o.isWebAssemblyCompiledModule=Ur;function Sr(jr){return L(jr,x)}o.isNumberObject=Sr;function Gr(jr){return L(jr,v)}o.isStringObject=Gr;function Fr(jr){return L(jr,F)}o.isBooleanObject=Fr;function br(jr){return E&&L(jr,M)}o.isBigIntObject=br;function Ar(jr){return B&&L(jr,U)}o.isSymbolObject=Ar;function cr(jr){return Sr(jr)||Gr(jr)||Fr(jr)||br(jr)||Ar(jr)}o.isBoxedPrimitive=cr;function hr(jr){return typeof Uint8Array<"u"&&(ir(jr)||Mr(jr))}o.isAnyArrayBuffer=hr,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(jr){Object.defineProperty(o,jr,{enumerable:!1,value:function(){throw new Error(jr+" is not supported in userland")}})})}(types$a)),types$a}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,function(o){var g=Object.getOwnPropertyDescriptors||function(yr){for(var wr=Object.keys(yr),qr={},Mr=0;Mr<wr.length;Mr++)qr[wr[Mr]]=Object.getOwnPropertyDescriptor(yr,wr[Mr]);return qr},c=/%[sdj%]/g;o.format=function(sr){if(!ze(sr)){for(var yr=[],wr=0;wr<arguments.length;wr++)yr.push(E(arguments[wr]));return yr.join(" ")}for(var wr=1,qr=arguments,Mr=qr.length,Dr=String(sr).replace(c,function(Xr){if(Xr==="%%")return"%";if(wr>=Mr)return Xr;switch(Xr){case"%s":return String(qr[wr++]);case"%d":return Number(qr[wr++]);case"%j":try{return JSON.stringify(qr[wr++])}catch{return"[Circular]"}default:return Xr}}),Qr=qr[wr];wr<Mr;Qr=qr[++wr])Ie(Qr)||!ve(Qr)?Dr+=" "+Qr:Dr+=" "+E(Qr);return Dr},o.deprecate=function(sr,yr){if(typeof ETHWalletProvider.process$1<"u"&&ETHWalletProvider.process$1.noDeprecation===!0)return sr;if(typeof ETHWalletProvider.process$1>"u")return function(){return o.deprecate(sr,yr).apply(this,arguments)};var wr=!1;function qr(){if(!wr){if(ETHWalletProvider.process$1.throwDeprecation)throw new Error(yr);ETHWalletProvider.process$1.traceDeprecation?console.trace(yr):console.error(yr),wr=!0}return sr.apply(this,arguments)}return qr};var y={},t=/^$/;if(ETHWalletProvider.process$1.env.NODE_DEBUG){var d=ETHWalletProvider.process$1.env.NODE_DEBUG;d=d.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),t=new RegExp("^"+d+"$","i")}o.debuglog=function(sr){if(sr=sr.toUpperCase(),!y[sr])if(t.test(sr)){var yr=ETHWalletProvider.process$1.pid;y[sr]=function(){var wr=o.format.apply(o,arguments);console.error("%s %d: %s",sr,yr,wr)}}else y[sr]=function(){};return y[sr]};function E(sr,yr){var wr={seen:[],stylize:D};return arguments.length>=3&&(wr.depth=arguments[2]),arguments.length>=4&&(wr.colors=arguments[3]),ge(yr)?wr.showHidden=yr:yr&&o._extend(wr,yr),Ne(wr.showHidden)&&(wr.showHidden=!1),Ne(wr.depth)&&(wr.depth=2),Ne(wr.colors)&&(wr.colors=!1),Ne(wr.customInspect)&&(wr.customInspect=!0),wr.colors&&(wr.stylize=B),v(wr,sr,wr.depth)}o.inspect=E,E.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},E.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function B(sr,yr){var wr=E.styles[yr];return wr?"\x1B["+E.colors[wr][0]+"m"+sr+"\x1B["+E.colors[wr][1]+"m":sr}function D(sr,yr){return sr}function x(sr){var yr={};return sr.forEach(function(wr,qr){yr[wr]=!0}),yr}function v(sr,yr,wr){if(sr.customInspect&&yr&&Be(yr.inspect)&&yr.inspect!==o.inspect&&!(yr.constructor&&yr.constructor.prototype===yr)){var qr=yr.inspect(wr,sr);return ze(qr)||(qr=v(sr,qr,wr)),qr}var Mr=F(sr,yr);if(Mr)return Mr;var Dr=Object.keys(yr),Qr=x(Dr);if(sr.showHidden&&(Dr=Object.getOwnPropertyNames(yr)),be(yr)&&(Dr.indexOf("message")>=0||Dr.indexOf("description")>=0))return M(yr);if(Dr.length===0){if(Be(yr)){var Xr=yr.name?": "+yr.name:"";return sr.stylize("[Function"+Xr+"]","special")}if(Pe(yr))return sr.stylize(RegExp.prototype.toString.call(yr),"regexp");if(Fe(yr))return sr.stylize(Date.prototype.toString.call(yr),"date");if(be(yr))return M(yr)}var Wr="",Ur=!1,Sr=["{","}"];if(fe(yr)&&(Ur=!0,Sr=["[","]"]),Be(yr)){var Gr=yr.name?": "+yr.name:"";Wr=" [Function"+Gr+"]"}if(Pe(yr)&&(Wr=" "+RegExp.prototype.toString.call(yr)),Fe(yr)&&(Wr=" "+Date.prototype.toUTCString.call(yr)),be(yr)&&(Wr=" "+M(yr)),Dr.length===0&&(!Ur||yr.length==0))return Sr[0]+Wr+Sr[1];if(wr<0)return Pe(yr)?sr.stylize(RegExp.prototype.toString.call(yr),"regexp"):sr.stylize("[Object]","special");sr.seen.push(yr);var Fr;return Ur?Fr=U(sr,yr,wr,Qr,Dr):Fr=Dr.map(function(br){return L(sr,yr,wr,Qr,br,Ur)}),sr.seen.pop(),H(Fr,Wr,Sr)}function F(sr,yr){if(Ne(yr))return sr.stylize("undefined","undefined");if(ze(yr)){var wr="'"+JSON.stringify(yr).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return sr.stylize(wr,"string")}if(Se(yr))return sr.stylize(""+yr,"number");if(ge(yr))return sr.stylize(""+yr,"boolean");if(Ie(yr))return sr.stylize("null","null")}function M(sr){return"["+Error.prototype.toString.call(sr)+"]"}function U(sr,yr,wr,qr,Mr){for(var Dr=[],Qr=0,Xr=yr.length;Qr<Xr;++Qr)Dt(yr,String(Qr))?Dr.push(L(sr,yr,wr,qr,String(Qr),!0)):Dr.push("");return Mr.forEach(function(Wr){Wr.match(/^\d+$/)||Dr.push(L(sr,yr,wr,qr,Wr,!0))}),Dr}function L(sr,yr,wr,qr,Mr,Dr){var Qr,Xr,Wr;if(Wr=Object.getOwnPropertyDescriptor(yr,Mr)||{value:yr[Mr]},Wr.get?Wr.set?Xr=sr.stylize("[Getter/Setter]","special"):Xr=sr.stylize("[Getter]","special"):Wr.set&&(Xr=sr.stylize("[Setter]","special")),Dt(qr,Mr)||(Qr="["+Mr+"]"),Xr||(sr.seen.indexOf(Wr.value)<0?(Ie(wr)?Xr=v(sr,Wr.value,null):Xr=v(sr,Wr.value,wr-1),Xr.indexOf(`
2
2
  `)>-1&&(Dr?Xr=Xr.split(`
3
3
  `).map(function(Ur){return" "+Ur}).join(`
4
4
  `).slice(2):Xr=`