@smartledger/bsv 7.11.0 → 7.13.0
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/CHANGELOG.md +135 -0
- package/README.md +38 -38
- package/bsv-anchor.min.js +11 -17
- package/bsv-didweb.min.js +11 -17
- package/bsv-gdaf.min.js +69 -75
- package/bsv-ltp.min.js +55 -61
- package/bsv-mnemonic.min.js +11 -17
- package/bsv-shamir.min.js +11 -17
- package/bsv-smartcontract.min.js +1 -1
- package/bsv-statuslist.min.js +53 -59
- package/bsv-vcjwt.min.js +11 -17
- package/bsv.bundle.js +69 -75
- package/bsv.min.js +69 -75
- package/build/esbuild/crypto-shim.js +35 -0
- package/build/esbuild.js +7 -3
- package/docs/AUDIT_SCOPE.md +198 -0
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/index.js +10 -2
- package/lib/crypto/hash.browser.js +13 -5
- package/lib/crypto/hash.js +58 -2
- package/lib/crypto/random.js +72 -15
- package/lib/didweb/index.js +88 -9
- package/lib/encoding/base58.js +67 -3
- package/lib/mnemonic/mnemonic.js +19 -5
- package/lib/mnemonic/pbkdf2.js +35 -2
- package/lib/script/interpreter.js +21 -2
- package/lib/transaction/input/multisig.js +1 -1
- package/lib/transaction/input/multisigscripthash.js +1 -1
- package/lib/transaction/input/publickey.js +1 -1
- package/lib/transaction/input/publickeyhash.js +1 -1
- package/lib/transaction/signature.js +1 -1
- package/lib/util/inherits.js +37 -0
- package/package.json +16 -9
- package/test/build/bundle_crypto_shim.js +104 -0
- package/test/build/bundle_externals.js +6 -1
- package/test/crypto/backend_selection.js +126 -0
- package/test/crypto/random.js +73 -0
- package/test/didweb/relationships.js +144 -0
- package/test/transaction/unspentoutput.js +6 -1
- package/version.js +1 -1
package/bsv-shamir.min.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
var bsvShamir=(()=>{var Vg=Object.create;var mh=Object.defineProperty;var $g=Object.getOwnPropertyDescriptor;var zg=Object.getOwnPropertyNames;var Zg=Object.getPrototypeOf,Yg=Object.prototype.hasOwnProperty;var Xg=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var B=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Jg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zg(e))!Yg.call(t,n)&&n!==r&&mh(t,n,{get:()=>e[n],enumerable:!(i=$g(e,n))||i.enumerable});return t};var bh=(t,e,r)=>(r=t!=null?Vg(Zg(t)):{},Jg(e||!t||!t.__esModule?mh(r,"default",{value:t,enumerable:!0}):r,t));var Eh=B((vE,Mh)=>{w();var Ve=Mh.exports={},Ot,Pt;function cf(){throw new Error("setTimeout has not been defined")}function df(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ot=setTimeout:Ot=cf}catch{Ot=cf}try{typeof clearTimeout=="function"?Pt=clearTimeout:Pt=df}catch{Pt=df}})();function wh(t){if(Ot===setTimeout)return setTimeout(t,0);if((Ot===cf||!Ot)&&setTimeout)return Ot=setTimeout,setTimeout(t,0);try{return Ot(t,0)}catch{try{return Ot.call(null,t,0)}catch{return Ot.call(this,t,0)}}}function Qg(t){if(Pt===clearTimeout)return clearTimeout(t);if((Pt===df||!Pt)&&clearTimeout)return Pt=clearTimeout,clearTimeout(t);try{return Pt(t)}catch{try{return Pt.call(null,t)}catch{return Pt.call(this,t)}}}var Gt=[],pi=!1,Dr,vo=-1;function em(){!pi||!Dr||(pi=!1,Dr.length?Gt=Dr.concat(Gt):vo=-1,Gt.length&&_h())}function _h(){if(!pi){var t=wh(em);pi=!0;for(var e=Gt.length;e;){for(Dr=Gt,Gt=[];++vo<e;)Dr&&Dr[vo].run();vo=-1,e=Gt.length}Dr=null,pi=!1,Qg(t)}}Ve.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Gt.push(new xh(t,e)),Gt.length===1&&!pi&&wh(_h)};function xh(t,e){this.fun=t,this.array=e}xh.prototype.run=function(){this.fun.apply(null,this.array)};Ve.title="browser";Ve.browser=!0;Ve.env={};Ve.argv=[];Ve.version="";Ve.versions={};function Vt(){}Ve.on=Vt;Ve.addListener=Vt;Ve.once=Vt;Ve.off=Vt;Ve.removeListener=Vt;Ve.removeAllListeners=Vt;Ve.emit=Vt;Ve.prependListener=Vt;Ve.prependOnceListener=Vt;Ve.listeners=function(t){return[]};Ve.binding=function(t){throw new Error("process.binding is not supported")};Ve.cwd=function(){return"/"};Ve.chdir=function(t){throw new Error("process.chdir is not supported")};Ve.umask=function(){return 0}});var Ah=B(yo=>{"use strict";w();yo.byteLength=rm;yo.toByteArray=nm;yo.fromByteArray=fm;var Dt=[],dt=[],tm=typeof Uint8Array<"u"?Uint8Array:Array,pf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ur=0,Sh=pf.length;Ur<Sh;++Ur)Dt[Ur]=pf[Ur],dt[pf.charCodeAt(Ur)]=Ur;var Ur,Sh;dt[45]=62;dt[95]=63;function Bh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function rm(t){var e=Bh(t),r=e[0],i=e[1];return(r+i)*3/4-i}function im(t,e,r){return(e+r)*3/4-r}function nm(t){var e,r=Bh(t),i=r[0],n=r[1],a=new tm(im(t,i,n)),f=0,y=n>0?i-4:i,b;for(b=0;b<y;b+=4)e=dt[t.charCodeAt(b)]<<18|dt[t.charCodeAt(b+1)]<<12|dt[t.charCodeAt(b+2)]<<6|dt[t.charCodeAt(b+3)],a[f++]=e>>16&255,a[f++]=e>>8&255,a[f++]=e&255;return n===2&&(e=dt[t.charCodeAt(b)]<<2|dt[t.charCodeAt(b+1)]>>4,a[f++]=e&255),n===1&&(e=dt[t.charCodeAt(b)]<<10|dt[t.charCodeAt(b+1)]<<4|dt[t.charCodeAt(b+2)]>>2,a[f++]=e>>8&255,a[f++]=e&255),a}function om(t){return Dt[t>>18&63]+Dt[t>>12&63]+Dt[t>>6&63]+Dt[t&63]}function am(t,e,r){for(var i,n=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),n.push(om(i));return n.join("")}function fm(t){for(var e,r=t.length,i=r%3,n=[],a=16383,f=0,y=r-i;f<y;f+=a)n.push(am(t,f,f+a>y?y:f+a));return i===1?(e=t[r-1],n.push(Dt[e>>2]+Dt[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(Dt[e>>10]+Dt[e>>4&63]+Dt[e<<2&63]+"=")),n.join("")}});var Rh=B(vf=>{w();vf.read=function(t,e,r,i,n){var a,f,y=n*8-i-1,b=(1<<y)-1,S=b>>1,A=-7,q=r?n-1:0,k=r?-1:1,P=t[e+q];for(q+=k,a=P&(1<<-A)-1,P>>=-A,A+=y;A>0;a=a*256+t[e+q],q+=k,A-=8);for(f=a&(1<<-A)-1,a>>=-A,A+=i;A>0;f=f*256+t[e+q],q+=k,A-=8);if(a===0)a=1-S;else{if(a===b)return f?NaN:(P?-1:1)*(1/0);f=f+Math.pow(2,i),a=a-S}return(P?-1:1)*f*Math.pow(2,a-i)};vf.write=function(t,e,r,i,n,a){var f,y,b,S=a*8-n-1,A=(1<<S)-1,q=A>>1,k=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=i?0:a-1,H=i?1:-1,Z=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(y=isNaN(e)?1:0,f=A):(f=Math.floor(Math.log(e)/Math.LN2),e*(b=Math.pow(2,-f))<1&&(f--,b*=2),f+q>=1?e+=k/b:e+=k*Math.pow(2,1-q),e*b>=2&&(f++,b/=2),f+q>=A?(y=0,f=A):f+q>=1?(y=(e*b-1)*Math.pow(2,n),f=f+q):(y=e*Math.pow(2,q-1)*Math.pow(2,n),f=0));n>=8;t[r+P]=y&255,P+=H,y/=256,n-=8);for(f=f<<n|y,S+=n;S>0;t[r+P]=f&255,P+=H,f/=256,S-=8);t[r+P-H]|=Z*128}});var ft=B(mi=>{"use strict";w();var yf=Ah(),yi=Rh(),qh=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;mi.Buffer=I;mi.SlowBuffer=dm;mi.INSPECT_MAX_BYTES=50;var go=2147483647;mi.kMaxLength=go;I.TYPED_ARRAY_SUPPORT=sm();!I.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 sm(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(I.prototype,"parent",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.buffer}});Object.defineProperty(I.prototype,"offset",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.byteOffset}});function $t(t){if(t>go)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,I.prototype),e}function I(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return wf(t)}return Ch(t,e,r)}I.poolSize=8192;function Ch(t,e,r){if(typeof t=="string")return hm(t,e);if(ArrayBuffer.isView(t))return lm(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Ut(t,ArrayBuffer)||t&&Ut(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ut(t,SharedArrayBuffer)||t&&Ut(t.buffer,SharedArrayBuffer)))return mf(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return I.from(i,e,r);let n=cm(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return I.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}I.from=function(t,e,r){return Ch(t,e,r)};Object.setPrototypeOf(I.prototype,Uint8Array.prototype);Object.setPrototypeOf(I,Uint8Array);function Oh(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function um(t,e,r){return Oh(t),t<=0?$t(t):e!==void 0?typeof r=="string"?$t(t).fill(e,r):$t(t).fill(e):$t(t)}I.alloc=function(t,e,r){return um(t,e,r)};function wf(t){return Oh(t),$t(t<0?0:_f(t)|0)}I.allocUnsafe=function(t){return wf(t)};I.allocUnsafeSlow=function(t){return wf(t)};function hm(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!I.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Ph(t,e)|0,i=$t(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function gf(t){let e=t.length<0?0:_f(t.length)|0,r=$t(e);for(let i=0;i<e;i+=1)r[i]=t[i]&255;return r}function lm(t){if(Ut(t,Uint8Array)){let e=new Uint8Array(t);return mf(e.buffer,e.byteOffset,e.byteLength)}return gf(t)}function mf(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&r===void 0?i=new Uint8Array(t):r===void 0?i=new Uint8Array(t,e):i=new Uint8Array(t,e,r),Object.setPrototypeOf(i,I.prototype),i}function cm(t){if(I.isBuffer(t)){let e=_f(t.length)|0,r=$t(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||Mf(t.length)?$t(0):gf(t);if(t.type==="Buffer"&&Array.isArray(t.data))return gf(t.data)}function _f(t){if(t>=go)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+go.toString(16)+" bytes");return t|0}function dm(t){return+t!=t&&(t=0),I.alloc(+t)}I.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==I.prototype};I.compare=function(e,r){if(Ut(e,Uint8Array)&&(e=I.from(e,e.offset,e.byteLength)),Ut(r,Uint8Array)&&(r=I.from(r,r.offset,r.byteLength)),!I.isBuffer(e)||!I.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let i=e.length,n=r.length;for(let a=0,f=Math.min(i,n);a<f;++a)if(e[a]!==r[a]){i=e[a],n=r[a];break}return i<n?-1:n<i?1:0};I.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};I.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return I.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;let n=I.allocUnsafe(r),a=0;for(i=0;i<e.length;++i){let f=e[i];if(Ut(f,Uint8Array))a+f.length>n.length?(I.isBuffer(f)||(f=I.from(f)),f.copy(n,a)):Uint8Array.prototype.set.call(n,f,a);else if(I.isBuffer(f))f.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=f.length}return n};function Ph(t,e){if(I.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ut(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return bf(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Wh(t).length;default:if(n)return i?-1:bf(t).length;e=(""+e).toLowerCase(),n=!0}}I.byteLength=Ph;function pm(t,e,r){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return Em(this,e,r);case"utf8":case"utf-8":return Uh(this,e,r);case"ascii":return xm(this,e,r);case"latin1":case"binary":return Mm(this,e,r);case"base64":return wm(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sm(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}I.prototype._isBuffer=!0;function Nr(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}I.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)Nr(this,r,r+1);return this};I.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)Nr(this,r,r+3),Nr(this,r+1,r+2);return this};I.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)Nr(this,r,r+7),Nr(this,r+1,r+6),Nr(this,r+2,r+5),Nr(this,r+3,r+4);return this};I.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Uh(this,0,e):pm.apply(this,arguments)};I.prototype.toLocaleString=I.prototype.toString;I.prototype.equals=function(e){if(!I.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:I.compare(this,e)===0};I.prototype.inspect=function(){let e="",r=mi.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};qh&&(I.prototype[qh]=I.prototype.inspect);I.prototype.compare=function(e,r,i,n,a){if(Ut(e,Uint8Array)&&(e=I.from(e,e.offset,e.byteLength)),!I.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),r<0||i>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===e)return 0;let f=a-n,y=i-r,b=Math.min(f,y),S=this.slice(n,a),A=e.slice(r,i);for(let q=0;q<b;++q)if(S[q]!==A[q]){f=S[q],y=A[q];break}return f<y?-1:y<f?1:0};function Dh(t,e,r,i,n){if(t.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Mf(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=I.from(e,i)),I.isBuffer(e))return e.length===0?-1:Th(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Th(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Th(t,e,r,i,n){let a=1,f=t.length,y=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,f/=2,y/=2,r/=2}function b(A,q){return a===1?A[q]:A.readUInt16BE(q*a)}let S;if(n){let A=-1;for(S=r;S<f;S++)if(b(t,S)===b(e,A===-1?0:S-A)){if(A===-1&&(A=S),S-A+1===y)return A*a}else A!==-1&&(S-=S-A),A=-1}else for(r+y>f&&(r=f-y),S=r;S>=0;S--){let A=!0;for(let q=0;q<y;q++)if(b(t,S+q)!==b(e,q)){A=!1;break}if(A)return S}return-1}I.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};I.prototype.indexOf=function(e,r,i){return Dh(this,e,r,i,!0)};I.prototype.lastIndexOf=function(e,r,i){return Dh(this,e,r,i,!1)};function vm(t,e,r,i){r=Number(r)||0;let n=t.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let a=e.length;i>a/2&&(i=a/2);let f;for(f=0;f<i;++f){let y=parseInt(e.substr(f*2,2),16);if(Mf(y))return f;t[r+f]=y}return f}function ym(t,e,r,i){return mo(bf(e,t.length-r),t,r,i)}function gm(t,e,r,i){return mo(qm(e),t,r,i)}function mm(t,e,r,i){return mo(Wh(e),t,r,i)}function bm(t,e,r,i){return mo(Tm(e,t.length-r),t,r,i)}I.prototype.write=function(e,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((i===void 0||i>a)&&(i=a),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return vm(this,e,r,i);case"utf8":case"utf-8":return ym(this,e,r,i);case"ascii":case"latin1":case"binary":return gm(this,e,r,i);case"base64":return mm(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bm(this,e,r,i);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}};I.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wm(t,e,r){return e===0&&r===t.length?yf.fromByteArray(t):yf.fromByteArray(t.slice(e,r))}function Uh(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let a=t[n],f=null,y=a>239?4:a>223?3:a>191?2:1;if(n+y<=r){let b,S,A,q;switch(y){case 1:a<128&&(f=a);break;case 2:b=t[n+1],(b&192)===128&&(q=(a&31)<<6|b&63,q>127&&(f=q));break;case 3:b=t[n+1],S=t[n+2],(b&192)===128&&(S&192)===128&&(q=(a&15)<<12|(b&63)<<6|S&63,q>2047&&(q<55296||q>57343)&&(f=q));break;case 4:b=t[n+1],S=t[n+2],A=t[n+3],(b&192)===128&&(S&192)===128&&(A&192)===128&&(q=(a&15)<<18|(b&63)<<12|(S&63)<<6|A&63,q>65535&&q<1114112&&(f=q))}}f===null?(f=65533,y=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|f&1023),i.push(f),n+=y}return _m(i)}var Ih=4096;function _m(t){let e=t.length;if(e<=Ih)return String.fromCharCode.apply(String,t);let r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=Ih));return r}function xm(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]&127);return i}function Mm(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function Em(t,e,r){let i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);let n="";for(let a=e;a<r;++a)n+=Im[t[a]];return n}function Sm(t,e,r){let i=t.slice(e,r),n="";for(let a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+i[a+1]*256);return n}I.prototype.slice=function(e,r){let i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);let n=this.subarray(e,r);return Object.setPrototypeOf(n,I.prototype),n};function Xe(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}I.prototype.readUintLE=I.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return n};I.prototype.readUintBE=I.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=this[e+--r],a=1;for(;r>0&&(a*=256);)n+=this[e+--r]*a;return n};I.prototype.readUint8=I.prototype.readUInt8=function(e,r){return e=e>>>0,r||Xe(e,1,this.length),this[e]};I.prototype.readUint16LE=I.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Xe(e,2,this.length),this[e]|this[e+1]<<8};I.prototype.readUint16BE=I.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Xe(e,2,this.length),this[e]<<8|this[e+1]};I.prototype.readUint32LE=I.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};I.prototype.readUint32BE=I.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};I.prototype.readBigUInt64LE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))});I.prototype.readBigUInt64BE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],a=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(a)});I.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*r)),n};I.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=r,a=1,f=this[e+--n];for(;n>0&&(a*=256);)f+=this[e+--n]*a;return a*=128,f>=a&&(f-=Math.pow(2,8*r)),f};I.prototype.readInt8=function(e,r){return e=e>>>0,r||Xe(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};I.prototype.readInt16LE=function(e,r){e=e>>>0,r||Xe(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};I.prototype.readInt16BE=function(e,r){e=e>>>0,r||Xe(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};I.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};I.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};I.prototype.readBigInt64LE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});I.prototype.readBigInt64BE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)});I.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),yi.read(this,e,!0,23,4)};I.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),yi.read(this,e,!1,23,4)};I.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Xe(e,8,this.length),yi.read(this,e,!0,52,8)};I.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Xe(e,8,this.length),yi.read(this,e,!1,52,8)};function ut(t,e,r,i,n,a){if(!I.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<a)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}I.prototype.writeUintLE=I.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let y=Math.pow(2,8*i)-1;ut(this,e,r,i,y,0)}let a=1,f=0;for(this[r]=e&255;++f<i&&(a*=256);)this[r+f]=e/a&255;return r+i};I.prototype.writeUintBE=I.prototype.writeUIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let y=Math.pow(2,8*i)-1;ut(this,e,r,i,y,0)}let a=i-1,f=1;for(this[r+a]=e&255;--a>=0&&(f*=256);)this[r+a]=e/f&255;return r+i};I.prototype.writeUint8=I.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,1,255,0),this[r]=e&255,r+1};I.prototype.writeUint16LE=I.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};I.prototype.writeUint16BE=I.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};I.prototype.writeUint32LE=I.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};I.prototype.writeUint32BE=I.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Nh(t,e,r,i,n){Kh(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,r}function Lh(t,e,r,i,n){Kh(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a=a>>8,t[r+6]=a,a=a>>8,t[r+5]=a,a=a>>8,t[r+4]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f=f>>8,t[r+2]=f,f=f>>8,t[r+1]=f,f=f>>8,t[r]=f,r+8}I.prototype.writeBigUInt64LE=fr(function(e,r=0){return Nh(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeBigUInt64BE=fr(function(e,r=0){return Lh(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let b=Math.pow(2,8*i-1);ut(this,e,r,i,b-1,-b)}let a=0,f=1,y=0;for(this[r]=e&255;++a<i&&(f*=256);)e<0&&y===0&&this[r+a-1]!==0&&(y=1),this[r+a]=(e/f>>0)-y&255;return r+i};I.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let b=Math.pow(2,8*i-1);ut(this,e,r,i,b-1,-b)}let a=i-1,f=1,y=0;for(this[r+a]=e&255;--a>=0&&(f*=256);)e<0&&y===0&&this[r+a+1]!==0&&(y=1),this[r+a]=(e/f>>0)-y&255;return r+i};I.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};I.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};I.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};I.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};I.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};I.prototype.writeBigInt64LE=fr(function(e,r=0){return Nh(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});I.prototype.writeBigInt64BE=fr(function(e,r=0){return Lh(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Fh(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function jh(t,e,r,i,n){return e=+e,r=r>>>0,n||Fh(t,e,r,4,34028234663852886e22,-34028234663852886e22),yi.write(t,e,r,i,23,4),r+4}I.prototype.writeFloatLE=function(e,r,i){return jh(this,e,r,!0,i)};I.prototype.writeFloatBE=function(e,r,i){return jh(this,e,r,!1,i)};function Hh(t,e,r,i,n){return e=+e,r=r>>>0,n||Fh(t,e,r,8,17976931348623157e292,-17976931348623157e292),yi.write(t,e,r,i,52,8),r+8}I.prototype.writeDoubleLE=function(e,r,i){return Hh(this,e,r,!0,i)};I.prototype.writeDoubleBE=function(e,r,i){return Hh(this,e,r,!1,i)};I.prototype.copy=function(e,r,i,n){if(!I.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);let a=n-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),r),a};I.prototype.fill=function(e,r,i,n){if(typeof e=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!I.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){let f=e.charCodeAt(0);(n==="utf8"&&f<128||n==="latin1")&&(e=f)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let a;if(typeof e=="number")for(a=r;a<i;++a)this[a]=e;else{let f=I.isBuffer(e)?e:I.from(e,n),y=f.length;if(y===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<i-r;++a)this[a+r]=f[a%y]}return this};var vi={};function xf(t,e,r){vi[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}xf("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);xf("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);xf("ERR_OUT_OF_RANGE",function(t,e,r){let i=`The value of "${t}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=kh(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=kh(n)),n+="n"),i+=` It must be ${e}. Received ${n}`,i},RangeError);function kh(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Bm(t,e,r){gi(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&gn(e,t.length-(r+1))}function Kh(t,e,r,i,n,a){if(t>r||t<e){let f=typeof e=="bigint"?"n":"",y;throw a>3?e===0||e===BigInt(0)?y=`>= 0${f} and < 2${f} ** ${(a+1)*8}${f}`:y=`>= -(2${f} ** ${(a+1)*8-1}${f}) and < 2 ** ${(a+1)*8-1}${f}`:y=`>= ${e}${f} and <= ${r}${f}`,new vi.ERR_OUT_OF_RANGE("value",y,t)}Bm(i,n,a)}function gi(t,e){if(typeof t!="number")throw new vi.ERR_INVALID_ARG_TYPE(e,"number",t)}function gn(t,e,r){throw Math.floor(t)!==t?(gi(t,r),new vi.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new vi.ERR_BUFFER_OUT_OF_BOUNDS:new vi.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var Am=/[^+/0-9A-Za-z-_]/g;function Rm(t){if(t=t.split("=")[0],t=t.trim().replace(Am,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function bf(t,e){e=e||1/0;let r,i=t.length,n=null,a=[];for(let f=0;f<i;++f){if(r=t.charCodeAt(f),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(f+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function qm(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Tm(t,e){let r,i,n,a=[];for(let f=0;f<t.length&&!((e-=2)<0);++f)r=t.charCodeAt(f),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function Wh(t){return yf.toByteArray(Rm(t))}function mo(t,e,r,i){let n;for(n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Ut(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Mf(t){return t!==t}var Im=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e})();function fr(t){return typeof BigInt>"u"?km:t}function km(){throw new Error("BigInt not supported")}});var E,R,w=Xg(()=>{E=bh(Eh()),R=bh(ft())});var Vh=B((SE,Gh)=>{w();Gh.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.BN});var zh=B((AE,$h)=>{w();$h.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Random});var Yh=B((qE,Zh)=>{w();Zh.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Hash});var Te=B((Ef,Jh)=>{w();var bo=ft(),Nt=bo.Buffer;function Xh(t,e){for(var r in t)e[r]=t[r]}Nt.from&&Nt.alloc&&Nt.allocUnsafe&&Nt.allocUnsafeSlow?Jh.exports=bo:(Xh(bo,Ef),Ef.Buffer=Lr);function Lr(t,e,r){return Nt(t,e,r)}Lr.prototype=Object.create(Nt.prototype);Xh(Nt,Lr);Lr.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Nt(t,e,r)};Lr.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Nt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Lr.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Nt(t)};Lr.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return bo.SlowBuffer(t)}});var Fr=B((kE,Bf)=>{"use strict";w();var Sf=65536,Cm=4294967295;function Om(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
-
Use Chrome, Firefox or Internet Explorer 11`)}var Pm=Te().Buffer,wo=globalThis.crypto||globalThis.msCrypto;wo&&wo.getRandomValues?Bf.exports=Dm:Bf.exports=Om;function Dm(t,e){if(t>Cm)throw new RangeError("requested too many random bytes");var r=Pm.allocUnsafe(t);if(t>0)if(t>Sf)for(var i=0;i<t;i+=Sf)wo.getRandomValues(r.slice(i,i+Sf));else wo.getRandomValues(r);return typeof e=="function"?E.default.nextTick(function(){e(null,r)}):r}});var X=B((OE,Af)=>{w();typeof Object.create=="function"?Af.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Af.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var wi=B((DE,Rf)=>{"use strict";w();var bi=typeof Reflect=="object"?Reflect:null,Qh=bi&&typeof bi.apply=="function"?bi.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},_o;bi&&typeof bi.ownKeys=="function"?_o=bi.ownKeys:Object.getOwnPropertySymbols?_o=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:_o=function(e){return Object.getOwnPropertyNames(e)};function Um(t){console&&console.warn&&console.warn(t)}var tl=Number.isNaN||function(e){return e!==e};function Le(){Le.init.call(this)}Rf.exports=Le;Rf.exports.once=jm;Le.EventEmitter=Le;Le.prototype._events=void 0;Le.prototype._eventsCount=0;Le.prototype._maxListeners=void 0;var el=10;function xo(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Le,"defaultMaxListeners",{enumerable:!0,get:function(){return el},set:function(t){if(typeof t!="number"||t<0||tl(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");el=t}});Le.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};Le.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||tl(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function rl(t){return t._maxListeners===void 0?Le.defaultMaxListeners:t._maxListeners}Le.prototype.getMaxListeners=function(){return rl(this)};Le.prototype.emit=function(e){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=e==="error",a=this._events;if(a!==void 0)n=n&&a.error===void 0;else if(!n)return!1;if(n){var f;if(r.length>0&&(f=r[0]),f instanceof Error)throw f;var y=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw y.context=f,y}var b=a[e];if(b===void 0)return!1;if(typeof b=="function")Qh(b,this,r);else for(var S=b.length,A=fl(b,S),i=0;i<S;++i)Qh(A[i],this,r);return!0};function il(t,e,r,i){var n,a,f;if(xo(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),f=a[e]),f===void 0)f=a[e]=r,++t._eventsCount;else if(typeof f=="function"?f=a[e]=i?[r,f]:[f,r]:i?f.unshift(r):f.push(r),n=rl(t),n>0&&f.length>n&&!f.warned){f.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=t,y.type=e,y.count=f.length,Um(y)}return t}Le.prototype.addListener=function(e,r){return il(this,e,r,!1)};Le.prototype.on=Le.prototype.addListener;Le.prototype.prependListener=function(e,r){return il(this,e,r,!0)};function Nm(){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 nl(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=Nm.bind(i);return n.listener=r,i.wrapFn=n,n}Le.prototype.once=function(e,r){return xo(r),this.on(e,nl(this,e,r)),this};Le.prototype.prependOnceListener=function(e,r){return xo(r),this.prependListener(e,nl(this,e,r)),this};Le.prototype.removeListener=function(e,r){var i,n,a,f,y;if(xo(r),n=this._events,n===void 0)return this;if(i=n[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(a=-1,f=i.length-1;f>=0;f--)if(i[f]===r||i[f].listener===r){y=i[f].listener,a=f;break}if(a<0)return this;a===0?i.shift():Lm(i,a),i.length===1&&(n[e]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",e,y||r)}return this};Le.prototype.off=Le.prototype.removeListener;Le.prototype.removeAllListeners=function(e){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var a=Object.keys(i),f;for(n=0;n<a.length;++n)f=a[n],f!=="removeListener"&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(e,r[n]);return this};function ol(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?Fm(n):fl(n,n.length)}Le.prototype.listeners=function(e){return ol(this,e,!0)};Le.prototype.rawListeners=function(e){return ol(this,e,!1)};Le.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):al.call(t,e)};Le.prototype.listenerCount=al;function al(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Le.prototype.eventNames=function(){return this._eventsCount>0?_o(this._events):[]};function fl(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function Lm(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Fm(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function jm(t,e){return new Promise(function(r,i){function n(f){t.removeListener(e,a),i(f)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",n),r([].slice.call(arguments))}sl(t,e,a,{once:!0}),e!=="error"&&Hm(t,n,{once:!0})})}function Hm(t,e,r){typeof t.on=="function"&&sl(t,"error",e,r)}function sl(t,e,r,i){if(typeof t.on=="function")i.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function n(a){i.once&&t.removeEventListener(e,n),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var qf=B((NE,ul)=>{w();ul.exports=wi().EventEmitter});var Tf=B((FE,hl)=>{"use strict";w();hl.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[r]=n;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var y=Object.getOwnPropertyDescriptor(e,r);if(y.value!==n||y.enumerable!==!0)return!1}return!0}});var mn=B((HE,ll)=>{"use strict";w();var Km=Tf();ll.exports=function(){return Km()&&!!Symbol.toStringTag}});var If=B((WE,cl)=>{"use strict";w();cl.exports=Object});var pl=B((VE,dl)=>{"use strict";w();dl.exports=Error});var yl=B((zE,vl)=>{"use strict";w();vl.exports=EvalError});var ml=B((YE,gl)=>{"use strict";w();gl.exports=RangeError});var wl=B((JE,bl)=>{"use strict";w();bl.exports=ReferenceError});var kf=B((eS,_l)=>{"use strict";w();_l.exports=SyntaxError});var jr=B((rS,xl)=>{"use strict";w();xl.exports=TypeError});var El=B((nS,Ml)=>{"use strict";w();Ml.exports=URIError});var Bl=B((aS,Sl)=>{"use strict";w();Sl.exports=Math.abs});var Rl=B((sS,Al)=>{"use strict";w();Al.exports=Math.floor});var Tl=B((hS,ql)=>{"use strict";w();ql.exports=Math.max});var kl=B((cS,Il)=>{"use strict";w();Il.exports=Math.min});var Ol=B((pS,Cl)=>{"use strict";w();Cl.exports=Math.pow});var Dl=B((yS,Pl)=>{"use strict";w();Pl.exports=Math.round});var Nl=B((mS,Ul)=>{"use strict";w();Ul.exports=Number.isNaN||function(e){return e!==e}});var Fl=B((wS,Ll)=>{"use strict";w();var Wm=Nl();Ll.exports=function(e){return Wm(e)||e===0?e:e<0?-1:1}});var Hl=B((xS,jl)=>{"use strict";w();jl.exports=Object.getOwnPropertyDescriptor});var Hr=B((ES,Kl)=>{"use strict";w();var Mo=Hl();if(Mo)try{Mo([],"length")}catch{Mo=null}Kl.exports=Mo});var bn=B((BS,Wl)=>{"use strict";w();var Eo=Object.defineProperty||!1;if(Eo)try{Eo({},"a",{value:1})}catch{Eo=!1}Wl.exports=Eo});var $l=B((RS,Vl)=>{"use strict";w();var Gl=typeof Symbol<"u"&&Symbol,Gm=Tf();Vl.exports=function(){return typeof Gl!="function"||typeof Symbol!="function"||typeof Gl("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Gm()}});var Cf=B((TS,zl)=>{"use strict";w();zl.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Of=B((kS,Zl)=>{"use strict";w();var Vm=If();Zl.exports=Vm.getPrototypeOf||null});var Jl=B((OS,Xl)=>{"use strict";w();var $m="Function.prototype.bind called on incompatible ",zm=Object.prototype.toString,Zm=Math.max,Ym="[object Function]",Yl=function(e,r){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var a=0;a<r.length;a+=1)i[a+e.length]=r[a];return i},Xm=function(e,r){for(var i=[],n=r||0,a=0;n<e.length;n+=1,a+=1)i[a]=e[n];return i},Jm=function(t,e){for(var r="",i=0;i<t.length;i+=1)r+=t[i],i+1<t.length&&(r+=e);return r};Xl.exports=function(e){var r=this;if(typeof r!="function"||zm.apply(r)!==Ym)throw new TypeError($m+r);for(var i=Xm(arguments,1),n,a=function(){if(this instanceof n){var A=r.apply(this,Yl(i,arguments));return Object(A)===A?A:this}return r.apply(e,Yl(i,arguments))},f=Zm(0,r.length-i.length),y=[],b=0;b<f;b++)y[b]="$"+b;if(n=Function("binder","return function ("+Jm(y,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var S=function(){};S.prototype=r.prototype,n.prototype=new S,S.prototype=null}return n}});var _i=B((DS,Ql)=>{"use strict";w();var Qm=Jl();Ql.exports=Function.prototype.bind||Qm});var So=B((NS,e0)=>{"use strict";w();e0.exports=Function.prototype.call});var Bo=B((FS,t0)=>{"use strict";w();t0.exports=Function.prototype.apply});var i0=B((HS,r0)=>{"use strict";w();r0.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Pf=B((WS,n0)=>{"use strict";w();var eb=_i(),tb=Bo(),rb=So(),ib=i0();n0.exports=ib||eb.call(rb,tb)});var Ao=B((VS,o0)=>{"use strict";w();var nb=_i(),ob=jr(),ab=So(),fb=Pf();o0.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new ob("a function is required");return fb(nb,ab,e)}});var l0=B((zS,h0)=>{"use strict";w();var sb=Ao(),a0=Hr(),s0;try{s0=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Df=!!s0&&a0&&a0(Object.prototype,"__proto__"),u0=Object,f0=u0.getPrototypeOf;h0.exports=Df&&typeof Df.get=="function"?sb([Df.get]):typeof f0=="function"?function(e){return f0(e==null?e:u0(e))}:!1});var Ro=B((YS,v0)=>{"use strict";w();var c0=Cf(),d0=Of(),p0=l0();v0.exports=c0?function(e){return c0(e)}:d0?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return d0(e)}:p0?function(e){return p0(e)}:null});var Uf=B((JS,y0)=>{"use strict";w();var ub=Function.prototype.call,hb=Object.prototype.hasOwnProperty,lb=_i();y0.exports=lb.call(ub,hb)});var Ff=B((e5,x0)=>{"use strict";w();var Oe,cb=If(),db=pl(),pb=yl(),vb=ml(),yb=wl(),Si=kf(),Ei=jr(),gb=El(),mb=Bl(),bb=Rl(),wb=Tl(),_b=kl(),xb=Ol(),Mb=Dl(),Eb=Fl(),w0=Function,Nf=function(t){try{return w0('"use strict"; return ('+t+").constructor;")()}catch{}},wn=Hr(),Sb=bn(),Lf=function(){throw new Ei},Bb=wn?(function(){try{return arguments.callee,Lf}catch{try{return wn(arguments,"callee").get}catch{return Lf}}})():Lf,xi=$l()(),Je=Ro(),Ab=Of(),Rb=Cf(),_0=Bo(),_n=So(),Mi={},qb=typeof Uint8Array>"u"||!Je?Oe:Je(Uint8Array),Kr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Oe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Oe:ArrayBuffer,"%ArrayIteratorPrototype%":xi&&Je?Je([][Symbol.iterator]()):Oe,"%AsyncFromSyncIteratorPrototype%":Oe,"%AsyncFunction%":Mi,"%AsyncGenerator%":Mi,"%AsyncGeneratorFunction%":Mi,"%AsyncIteratorPrototype%":Mi,"%Atomics%":typeof Atomics>"u"?Oe:Atomics,"%BigInt%":typeof BigInt>"u"?Oe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Oe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Oe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Oe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":db,"%eval%":eval,"%EvalError%":pb,"%Float16Array%":typeof Float16Array>"u"?Oe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Oe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Oe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Oe:FinalizationRegistry,"%Function%":w0,"%GeneratorFunction%":Mi,"%Int8Array%":typeof Int8Array>"u"?Oe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Oe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Oe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":xi&&Je?Je(Je([][Symbol.iterator]())):Oe,"%JSON%":typeof JSON=="object"?JSON:Oe,"%Map%":typeof Map>"u"?Oe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!xi||!Je?Oe:Je(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":cb,"%Object.getOwnPropertyDescriptor%":wn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Oe:Promise,"%Proxy%":typeof Proxy>"u"?Oe:Proxy,"%RangeError%":vb,"%ReferenceError%":yb,"%Reflect%":typeof Reflect>"u"?Oe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Oe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!xi||!Je?Oe:Je(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Oe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":xi&&Je?Je(""[Symbol.iterator]()):Oe,"%Symbol%":xi?Symbol:Oe,"%SyntaxError%":Si,"%ThrowTypeError%":Bb,"%TypedArray%":qb,"%TypeError%":Ei,"%Uint8Array%":typeof Uint8Array>"u"?Oe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Oe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Oe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Oe:Uint32Array,"%URIError%":gb,"%WeakMap%":typeof WeakMap>"u"?Oe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Oe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Oe:WeakSet,"%Function.prototype.call%":_n,"%Function.prototype.apply%":_0,"%Object.defineProperty%":Sb,"%Object.getPrototypeOf%":Ab,"%Math.abs%":mb,"%Math.floor%":bb,"%Math.max%":wb,"%Math.min%":_b,"%Math.pow%":xb,"%Math.round%":Mb,"%Math.sign%":Eb,"%Reflect.getPrototypeOf%":Rb};if(Je)try{null.error}catch(t){g0=Je(Je(t)),Kr["%Error.prototype%"]=g0}var g0,Tb=function t(e){var r;if(e==="%AsyncFunction%")r=Nf("async function () {}");else if(e==="%GeneratorFunction%")r=Nf("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Nf("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&Je&&(r=Je(n.prototype))}return Kr[e]=r,r},m0={__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"]},xn=_i(),qo=Uf(),Ib=xn.call(_n,Array.prototype.concat),kb=xn.call(_0,Array.prototype.splice),b0=xn.call(_n,String.prototype.replace),To=xn.call(_n,String.prototype.slice),Cb=xn.call(_n,RegExp.prototype.exec),Ob=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pb=/\\(\\)?/g,Db=function(e){var r=To(e,0,1),i=To(e,-1);if(r==="%"&&i!=="%")throw new Si("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Si("invalid intrinsic syntax, expected opening `%`");var n=[];return b0(e,Ob,function(a,f,y,b){n[n.length]=y?b0(b,Pb,"$1"):f||a}),n},Ub=function(e,r){var i=e,n;if(qo(m0,i)&&(n=m0[i],i="%"+n[0]+"%"),qo(Kr,i)){var a=Kr[i];if(a===Mi&&(a=Tb(i)),typeof a>"u"&&!r)throw new Ei("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new Si("intrinsic "+e+" does not exist!")};x0.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ei("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ei('"allowMissing" argument must be a boolean');if(Cb(/^%?[^%]*%?$/,e)===null)throw new Si("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Db(e),n=i.length>0?i[0]:"",a=Ub("%"+n+"%",r),f=a.name,y=a.value,b=!1,S=a.alias;S&&(n=S[0],kb(i,Ib([0,1],S)));for(var A=1,q=!0;A<i.length;A+=1){var k=i[A],P=To(k,0,1),H=To(k,-1);if((P==='"'||P==="'"||P==="`"||H==='"'||H==="'"||H==="`")&&P!==H)throw new Si("property names with quotes must have matching quotes");if((k==="constructor"||!q)&&(b=!0),n+="."+k,f="%"+n+"%",qo(Kr,f))y=Kr[f];else if(y!=null){if(!(k in y)){if(!r)throw new Ei("base intrinsic for "+e+" exists, but the property is not available.");return}if(wn&&A+1>=i.length){var Z=wn(y,k);q=!!Z,q&&"get"in Z&&!("originalValue"in Z.get)?y=Z.get:y=y[k]}else q=qo(y,k),y=y[k];q&&!b&&(Kr[f]=y)}}return y}});var Wr=B((r5,S0)=>{"use strict";w();var M0=Ff(),E0=Ao(),Nb=E0([M0("%String.prototype.indexOf%")]);S0.exports=function(e,r){var i=M0(e,!!r);return typeof i=="function"&&Nb(e,".prototype.")>-1?E0([i]):i}});var R0=B((n5,A0)=>{"use strict";w();var Lb=mn()(),Fb=Wr(),jf=Fb("Object.prototype.toString"),Io=function(e){return Lb&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:jf(e)==="[object Arguments]"},B0=function(e){return Io(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&jf(e)!=="[object Array]"&&"callee"in e&&jf(e.callee)==="[object Function]"},jb=(function(){return Io(arguments)})();Io.isLegacyArguments=B0;A0.exports=jb?Io:B0});var O0=B((a5,C0)=>{"use strict";w();var q0=Wr(),Hb=mn()(),Kb=Uf(),Wb=Hr(),Wf;Hb?(T0=q0("RegExp.prototype.exec"),Hf={},ko=function(){throw Hf},Kf={toString:ko,valueOf:ko},typeof Symbol.toPrimitive=="symbol"&&(Kf[Symbol.toPrimitive]=ko),Wf=function(e){if(!e||typeof e!="object")return!1;var r=Wb(e,"lastIndex"),i=r&&Kb(r,"value");if(!i)return!1;try{T0(e,Kf)}catch(n){return n===Hf}}):(I0=q0("Object.prototype.toString"),k0="[object RegExp]",Wf=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:I0(e)===k0});var T0,Hf,ko,Kf,I0,k0;C0.exports=Wf});var D0=B((s5,P0)=>{"use strict";w();var Gb=Wr(),Vb=O0(),$b=Gb("RegExp.prototype.exec"),zb=jr();P0.exports=function(e){if(!Vb(e))throw new zb("`regex` must be a RegExp");return function(i){return $b(e,i)!==null}}});var N0=B((h5,U0)=>{"use strict";w();var Zb=function*(){}.constructor;U0.exports=()=>Zb});var H0=B((c5,j0)=>{"use strict";w();var F0=Wr(),Yb=D0(),Xb=Yb(/^\s*(?:function)?\*/),Jb=mn()(),L0=Ro(),Qb=F0("Object.prototype.toString"),ew=F0("Function.prototype.toString"),tw=N0();j0.exports=function(e){if(typeof e!="function")return!1;if(Xb(ew(e)))return!0;if(!Jb){var r=Qb(e);return r==="[object GeneratorFunction]"}if(!L0)return!1;var i=tw();return i&&L0(e)===i.prototype}});var V0=B((p5,G0)=>{"use strict";w();var W0=Function.prototype.toString,Bi=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Vf,Co;if(typeof Bi=="function"&&typeof Object.defineProperty=="function")try{Vf=Object.defineProperty({},"length",{get:function(){throw Co}}),Co={},Bi(function(){throw 42},null,Vf)}catch(t){t!==Co&&(Bi=null)}else Bi=null;var rw=/^\s*class\b/,$f=function(e){try{var r=W0.call(e);return rw.test(r)}catch{return!1}},Gf=function(e){try{return $f(e)?!1:(W0.call(e),!0)}catch{return!1}},Oo=Object.prototype.toString,iw="[object Object]",nw="[object Function]",ow="[object GeneratorFunction]",aw="[object HTMLAllCollection]",fw="[object HTML document.all class]",sw="[object HTMLCollection]",uw=typeof Symbol=="function"&&!!Symbol.toStringTag,hw=!(0 in[,]),zf=function(){return!1};typeof document=="object"&&(K0=document.all,Oo.call(K0)===Oo.call(document.all)&&(zf=function(e){if((hw||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=Oo.call(e);return(r===aw||r===fw||r===sw||r===iw)&&e("")==null}catch{}return!1}));var K0;G0.exports=Bi?function(e){if(zf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Bi(e,null,Vf)}catch(r){if(r!==Co)return!1}return!$f(e)&&Gf(e)}:function(e){if(zf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(uw)return Gf(e);if($f(e))return!1;var r=Oo.call(e);return r!==nw&&r!==ow&&!/^\[object HTML/.test(r)?!1:Gf(e)}});var Z0=B((y5,z0)=>{"use strict";w();var lw=V0(),cw=Object.prototype.toString,$0=Object.prototype.hasOwnProperty,dw=function(e,r,i){for(var n=0,a=e.length;n<a;n++)$0.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))},pw=function(e,r,i){for(var n=0,a=e.length;n<a;n++)i==null?r(e.charAt(n),n,e):r.call(i,e.charAt(n),n,e)},vw=function(e,r,i){for(var n in e)$0.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))};function yw(t){return cw.call(t)==="[object Array]"}z0.exports=function(e,r,i){if(!lw(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),yw(e)?dw(e,r,n):typeof e=="string"?pw(e,r,n):vw(e,r,n)}});var X0=B((m5,Y0)=>{"use strict";w();Y0.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var Q0=B((w5,J0)=>{"use strict";w();var Zf=X0(),gw=globalThis;J0.exports=function(){for(var e=[],r=0;r<Zf.length;r++)typeof gw[Zf[r]]=="function"&&(e[e.length]=Zf[r]);return e}});var ic=B((x5,rc)=>{"use strict";w();var ec=bn(),mw=kf(),Ai=jr(),tc=Hr();rc.exports=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Ai("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ai("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ai("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ai("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ai("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ai("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,b=!!tc&&tc(e,r);if(ec)ec(e,r,{configurable:f===null&&b?b.configurable:!f,enumerable:n===null&&b?b.enumerable:!n,value:i,writable:a===null&&b?b.writable:!a});else if(y||!n&&!a&&!f)e[r]=i;else throw new mw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var ac=B((E5,oc)=>{"use strict";w();var Yf=bn(),nc=function(){return!!Yf};nc.hasArrayLengthDefineBug=function(){if(!Yf)return null;try{return Yf([],"length",{value:1}).length!==1}catch{return!0}};oc.exports=nc});var lc=B((B5,hc)=>{"use strict";w();var bw=Ff(),fc=ic(),ww=ac()(),sc=Hr(),uc=jr(),_w=bw("%Math.floor%");hc.exports=function(e,r){if(typeof e!="function")throw new uc("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||_w(r)!==r)throw new uc("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in e&&sc){var f=sc(e,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(a=!1)}return(n||a||!i)&&(ww?fc(e,"length",r,!0,!0):fc(e,"length",r)),e}});var dc=B((R5,cc)=>{"use strict";w();var xw=_i(),Mw=Bo(),Ew=Pf();cc.exports=function(){return Ew(xw,Mw,arguments)}});var yc=B((T5,Po)=>{"use strict";w();var Sw=lc(),pc=bn(),Bw=Ao(),vc=dc();Po.exports=function(e){var r=Bw(arguments),i=1+e.length-(arguments.length-1);return Sw(r,i>0?i:0,!0)};pc?pc(Po.exports,"apply",{value:vc}):Po.exports.apply=vc});var es=B((k5,wc)=>{"use strict";w();var No=Z0(),Aw=Q0(),gc=yc(),Jf=Wr(),Uo=Hr(),Do=Ro(),Rw=Jf("Object.prototype.toString"),bc=mn()(),mc=globalThis,Xf=Aw(),Qf=Jf("String.prototype.slice"),qw=Jf("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},Lo={__proto__:null};bc&&Uo&&Do?No(Xf,function(t){var e=new mc[t];if(Symbol.toStringTag in e&&Do){var r=Do(e),i=Uo(r,Symbol.toStringTag);if(!i&&r){var n=Do(r);i=Uo(n,Symbol.toStringTag)}if(i&&i.get){var a=gc(i.get);Lo["$"+t]=a}}}):No(Xf,function(t){var e=new mc[t],r=e.slice||e.set;if(r){var i=gc(r);Lo["$"+t]=i}});var Tw=function(e){var r=!1;return No(Lo,function(i,n){if(!r)try{"$"+i(e)===n&&(r=Qf(n,1))}catch{}}),r},Iw=function(e){var r=!1;return No(Lo,function(i,n){if(!r)try{i(e),r=Qf(n,1)}catch{}}),r};wc.exports=function(e){if(!e||typeof e!="object")return!1;if(!bc){var r=Qf(Rw(e),8,-1);return qw(Xf,r)>-1?r:r!=="Object"?!1:Iw(e)}return Uo?Tw(e):null}});var ts=B((O5,_c)=>{"use strict";w();var kw=es();_c.exports=function(e){return!!kw(e)}});var Pc=B(Pe=>{"use strict";w();var Cw=R0(),Ow=H0(),Et=es(),xc=ts();function Ri(t){return t.call.bind(t)}var Mc=typeof BigInt<"u",Ec=typeof Symbol<"u",pt=Ri(Object.prototype.toString),Pw=Ri(Number.prototype.valueOf),Dw=Ri(String.prototype.valueOf),Uw=Ri(Boolean.prototype.valueOf);Mc&&(Sc=Ri(BigInt.prototype.valueOf));var Sc;Ec&&(Bc=Ri(Symbol.prototype.valueOf));var Bc;function En(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}Pe.isArgumentsObject=Cw;Pe.isGeneratorFunction=Ow;Pe.isTypedArray=xc;function Nw(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}Pe.isPromise=Nw;function Lw(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):xc(t)||Rc(t)}Pe.isArrayBufferView=Lw;function Fw(t){return Et(t)==="Uint8Array"}Pe.isUint8Array=Fw;function jw(t){return Et(t)==="Uint8ClampedArray"}Pe.isUint8ClampedArray=jw;function Hw(t){return Et(t)==="Uint16Array"}Pe.isUint16Array=Hw;function Kw(t){return Et(t)==="Uint32Array"}Pe.isUint32Array=Kw;function Ww(t){return Et(t)==="Int8Array"}Pe.isInt8Array=Ww;function Gw(t){return Et(t)==="Int16Array"}Pe.isInt16Array=Gw;function Vw(t){return Et(t)==="Int32Array"}Pe.isInt32Array=Vw;function $w(t){return Et(t)==="Float32Array"}Pe.isFloat32Array=$w;function zw(t){return Et(t)==="Float64Array"}Pe.isFloat64Array=zw;function Zw(t){return Et(t)==="BigInt64Array"}Pe.isBigInt64Array=Zw;function Yw(t){return Et(t)==="BigUint64Array"}Pe.isBigUint64Array=Yw;function Fo(t){return pt(t)==="[object Map]"}Fo.working=typeof Map<"u"&&Fo(new Map);function Xw(t){return typeof Map>"u"?!1:Fo.working?Fo(t):t instanceof Map}Pe.isMap=Xw;function jo(t){return pt(t)==="[object Set]"}jo.working=typeof Set<"u"&&jo(new Set);function Jw(t){return typeof Set>"u"?!1:jo.working?jo(t):t instanceof Set}Pe.isSet=Jw;function Ho(t){return pt(t)==="[object WeakMap]"}Ho.working=typeof WeakMap<"u"&&Ho(new WeakMap);function Qw(t){return typeof WeakMap>"u"?!1:Ho.working?Ho(t):t instanceof WeakMap}Pe.isWeakMap=Qw;function is(t){return pt(t)==="[object WeakSet]"}is.working=typeof WeakSet<"u"&&is(new WeakSet);function e2(t){return is(t)}Pe.isWeakSet=e2;function Ko(t){return pt(t)==="[object ArrayBuffer]"}Ko.working=typeof ArrayBuffer<"u"&&Ko(new ArrayBuffer);function Ac(t){return typeof ArrayBuffer>"u"?!1:Ko.working?Ko(t):t instanceof ArrayBuffer}Pe.isArrayBuffer=Ac;function Wo(t){return pt(t)==="[object DataView]"}Wo.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Wo(new DataView(new ArrayBuffer(1),0,1));function Rc(t){return typeof DataView>"u"?!1:Wo.working?Wo(t):t instanceof DataView}Pe.isDataView=Rc;var rs=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Mn(t){return pt(t)==="[object SharedArrayBuffer]"}function qc(t){return typeof rs>"u"?!1:(typeof Mn.working>"u"&&(Mn.working=Mn(new rs)),Mn.working?Mn(t):t instanceof rs)}Pe.isSharedArrayBuffer=qc;function t2(t){return pt(t)==="[object AsyncFunction]"}Pe.isAsyncFunction=t2;function r2(t){return pt(t)==="[object Map Iterator]"}Pe.isMapIterator=r2;function i2(t){return pt(t)==="[object Set Iterator]"}Pe.isSetIterator=i2;function n2(t){return pt(t)==="[object Generator]"}Pe.isGeneratorObject=n2;function o2(t){return pt(t)==="[object WebAssembly.Module]"}Pe.isWebAssemblyCompiledModule=o2;function Tc(t){return En(t,Pw)}Pe.isNumberObject=Tc;function Ic(t){return En(t,Dw)}Pe.isStringObject=Ic;function kc(t){return En(t,Uw)}Pe.isBooleanObject=kc;function Cc(t){return Mc&&En(t,Sc)}Pe.isBigIntObject=Cc;function Oc(t){return Ec&&En(t,Bc)}Pe.isSymbolObject=Oc;function a2(t){return Tc(t)||Ic(t)||kc(t)||Cc(t)||Oc(t)}Pe.isBoxedPrimitive=a2;function f2(t){return typeof Uint8Array<"u"&&(Ac(t)||qc(t))}Pe.isAnyArrayBuffer=f2;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Pe,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Uc=B((N5,Dc)=>{w();Dc.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var An=B(De=>{w();var Nc=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(e,r[n]);return i},s2=/%[sdj%]/g;De.format=function(t){if(!Xo(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(sr(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,n=i.length,a=String(t).replace(s2,function(y){if(y==="%%")return"%";if(r>=n)return y;switch(y){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch{return"[Circular]"}default:return y}}),f=i[r];r<n;f=i[++r])Yo(f)||!qi(f)?a+=" "+f:a+=" "+sr(f);return a};De.deprecate=function(t,e){if(typeof E.default<"u"&&E.default.noDeprecation===!0)return t;if(typeof E.default>"u")return function(){return De.deprecate(t,e).apply(this,arguments)};var r=!1;function i(){if(!r){if(E.default.throwDeprecation)throw new Error(e);E.default.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return i};var Go={},Lc=/^$/;E.default.env.NODE_DEBUG&&(Vo=E.default.env.NODE_DEBUG,Vo=Vo.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Lc=new RegExp("^"+Vo+"$","i"));var Vo;De.debuglog=function(t){if(t=t.toUpperCase(),!Go[t])if(Lc.test(t)){var e=E.default.pid;Go[t]=function(){var r=De.format.apply(De,arguments);console.error("%s %d: %s",t,e,r)}}else Go[t]=function(){};return Go[t]};function sr(t,e){var r={seen:[],stylize:h2};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),fs(e)?r.showHidden=e:e&&De._extend(r,e),Vr(r.showHidden)&&(r.showHidden=!1),Vr(r.depth)&&(r.depth=2),Vr(r.colors)&&(r.colors=!1),Vr(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u2),zo(r,t,r.depth)}De.inspect=sr;sr.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]};sr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u2(t,e){var r=sr.styles[e];return r?"\x1B["+sr.colors[r][0]+"m"+t+"\x1B["+sr.colors[r][1]+"m":t}function h2(t,e){return t}function l2(t){var e={};return t.forEach(function(r,i){e[r]=!0}),e}function zo(t,e,r){if(t.customInspect&&e&&$o(e.inspect)&&e.inspect!==De.inspect&&!(e.constructor&&e.constructor.prototype===e)){var i=e.inspect(r,t);return Xo(i)||(i=zo(t,i,r)),i}var n=c2(t,e);if(n)return n;var a=Object.keys(e),f=l2(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),Bn(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return ns(e);if(a.length===0){if($o(e)){var y=e.name?": "+e.name:"";return t.stylize("[Function"+y+"]","special")}if(Sn(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Zo(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Bn(e))return ns(e)}var b="",S=!1,A=["{","}"];if(Fc(e)&&(S=!0,A=["[","]"]),$o(e)){var q=e.name?": "+e.name:"";b=" [Function"+q+"]"}if(Sn(e)&&(b=" "+RegExp.prototype.toString.call(e)),Zo(e)&&(b=" "+Date.prototype.toUTCString.call(e)),Bn(e)&&(b=" "+ns(e)),a.length===0&&(!S||e.length==0))return A[0]+b+A[1];if(r<0)return Sn(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var k;return S?k=d2(t,e,r,f,a):k=a.map(function(P){return as(t,e,r,f,P,S)}),t.seen.pop(),p2(k,b,A)}function c2(t,e){if(Vr(e))return t.stylize("undefined","undefined");if(Xo(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(jc(e))return t.stylize(""+e,"number");if(fs(e))return t.stylize(""+e,"boolean");if(Yo(e))return t.stylize("null","null")}function ns(t){return"["+Error.prototype.toString.call(t)+"]"}function d2(t,e,r,i,n){for(var a=[],f=0,y=e.length;f<y;++f)Hc(e,String(f))?a.push(as(t,e,r,i,String(f),!0)):a.push("");return n.forEach(function(b){b.match(/^\d+$/)||a.push(as(t,e,r,i,b,!0))}),a}function as(t,e,r,i,n,a){var f,y,b;if(b=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]},b.get?b.set?y=t.stylize("[Getter/Setter]","special"):y=t.stylize("[Getter]","special"):b.set&&(y=t.stylize("[Setter]","special")),Hc(i,n)||(f="["+n+"]"),y||(t.seen.indexOf(b.value)<0?(Yo(r)?y=zo(t,b.value,null):y=zo(t,b.value,r-1),y.indexOf(`
|
|
3
|
-
`)
|
|
4
|
-
`).
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`).
|
|
8
|
-
`)
|
|
9
|
-
`)
|
|
10
|
-
`)+" "+t.join(`,
|
|
11
|
-
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}De.types=Pc();function Fc(t){return Array.isArray(t)}De.isArray=Fc;function fs(t){return typeof t=="boolean"}De.isBoolean=fs;function Yo(t){return t===null}De.isNull=Yo;function v2(t){return t==null}De.isNullOrUndefined=v2;function jc(t){return typeof t=="number"}De.isNumber=jc;function Xo(t){return typeof t=="string"}De.isString=Xo;function y2(t){return typeof t=="symbol"}De.isSymbol=y2;function Vr(t){return t===void 0}De.isUndefined=Vr;function Sn(t){return qi(t)&&ss(t)==="[object RegExp]"}De.isRegExp=Sn;De.types.isRegExp=Sn;function qi(t){return typeof t=="object"&&t!==null}De.isObject=qi;function Zo(t){return qi(t)&&ss(t)==="[object Date]"}De.isDate=Zo;De.types.isDate=Zo;function Bn(t){return qi(t)&&(ss(t)==="[object Error]"||t instanceof Error)}De.isError=Bn;De.types.isNativeError=Bn;function $o(t){return typeof t=="function"}De.isFunction=$o;function g2(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}De.isPrimitive=g2;De.isBuffer=Uc();function ss(t){return Object.prototype.toString.call(t)}function os(t){return t<10?"0"+t.toString(10):t.toString(10)}var m2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function b2(){var t=new Date,e=[os(t.getHours()),os(t.getMinutes()),os(t.getSeconds())].join(":");return[t.getDate(),m2[t.getMonth()],e].join(" ")}De.log=function(){console.log("%s - %s",b2(),De.format.apply(De,arguments))};De.inherits=X();De._extend=function(t,e){if(!e||!qi(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};function Hc(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Gr=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;De.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(Gr&&e[Gr]){var r=e[Gr];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,Gr,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(b,S){i=b,n=S}),f=[],y=0;y<arguments.length;y++)f.push(arguments[y]);f.push(function(b,S){b?n(b):i(S)});try{e.apply(this,f)}catch(b){n(b)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Gr&&Object.defineProperty(r,Gr,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,Nc(e))};De.promisify.custom=Gr;function w2(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function _2(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var a=this,f=function(){return n.apply(a,arguments)};t.apply(this,r).then(function(y){E.default.nextTick(f.bind(null,null,y))},function(y){E.default.nextTick(w2.bind(null,y,f))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,Nc(t)),e}De.callbackify=_2});var zc=B((H5,$c)=>{"use strict";w();function Kc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Wc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kc(Object(r),!0).forEach(function(i){x2(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function x2(t,e,r){return e=Vc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M2(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Vc(i.key),i)}}function E2(t,e,r){return e&&Gc(t.prototype,e),r&&Gc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vc(t){var e=S2(t,"string");return typeof e=="symbol"?e:String(e)}function S2(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var B2=ft(),Jo=B2.Buffer,A2=An(),us=A2.inspect,R2=us&&us.custom||"inspect";function q2(t,e,r){Jo.prototype.copy.call(t,e,r)}$c.exports=(function(){function t(){M2(this,t),this.head=null,this.tail=null,this.length=0}return E2(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Jo.alloc(0);for(var i=Jo.allocUnsafe(r>>>0),n=this.head,a=0;n;)q2(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,a=i.data;for(r-=a.length;i=i.next;){var f=i.data,y=r>f.length?f.length:r;if(y===f.length?a+=f:a+=f.slice(0,r),r-=y,r===0){y===f.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(y));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=Jo.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var f=n.data,y=r>f.length?f.length:r;if(f.copy(i,i.length-r,0,y),r-=y,r===0){y===f.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=f.slice(y));break}++a}return this.length-=a,i}},{key:R2,value:function(r,i){return us(this,Wc(Wc({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var ls=B((W5,Yc)=>{"use strict";w();function T2(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,E.default.nextTick(hs,this,t)):E.default.nextTick(hs,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted?E.default.nextTick(Qo,r):(r._writableState.errorEmitted=!0,E.default.nextTick(Zc,r,a)):E.default.nextTick(Zc,r,a):e?(E.default.nextTick(Qo,r),e(a)):E.default.nextTick(Qo,r)}),this)}function Zc(t,e){hs(t,e),Qo(t)}function Qo(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function I2(){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 hs(t,e){t.emit("error",e)}function k2(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Yc.exports={destroy:T2,undestroy:I2,errorOrDestroy:k2}});var $r=B((V5,Qc)=>{"use strict";w();function C2(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Jc={};function vt(t,e,r){r||(r=Error);function i(a,f,y){return typeof e=="string"?e:e(a,f,y)}var n=(function(a){C2(f,a);function f(y,b,S){return a.call(this,i(y,b,S))||this}return f})(r);n.prototype.name=r.name,n.prototype.code=t,Jc[t]=n}function Xc(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(i){return String(i)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function O2(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function P2(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function D2(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}vt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);vt("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&O2(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var n;if(P2(t," argument"))n="The ".concat(t," ").concat(i," ").concat(Xc(e,"type"));else{var a=D2(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(Xc(e,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);vt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");vt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});vt("ERR_STREAM_PREMATURE_CLOSE","Premature close");vt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});vt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");vt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");vt("ERR_STREAM_WRITE_AFTER_END","write after end");vt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);vt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);vt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Qc.exports.codes=Jc});var cs=B((z5,ed)=>{"use strict";w();var U2=$r().codes.ERR_INVALID_OPT_VALUE;function N2(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function L2(t,e,r,i){var n=N2(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new U2(a,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ed.exports={getHighWaterMark:L2}});var ps=B((Y5,td)=>{w();td.exports=F2;function F2(t,e){if(ds("noDeprecation"))return t;var r=!1;function i(){if(!r){if(ds("throwDeprecation"))throw new Error(e);ds("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function ds(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var gs=B((J5,fd)=>{"use strict";w();fd.exports=Ge;function id(t){var e=this;this.next=null,this.entry=null,this.finish=function(){d_(e,t)}}var Ti;Ge.WritableState=qn;var j2={deprecate:ps()},nd=qf(),ta=ft().Buffer,H2=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function K2(t){return ta.from(t)}function W2(t){return ta.isBuffer(t)||t instanceof H2}var ys=ls(),G2=cs(),V2=G2.getHighWaterMark,ur=$r().codes,$2=ur.ERR_INVALID_ARG_TYPE,z2=ur.ERR_METHOD_NOT_IMPLEMENTED,Z2=ur.ERR_MULTIPLE_CALLBACK,Y2=ur.ERR_STREAM_CANNOT_PIPE,X2=ur.ERR_STREAM_DESTROYED,J2=ur.ERR_STREAM_NULL_VALUES,Q2=ur.ERR_STREAM_WRITE_AFTER_END,e_=ur.ERR_UNKNOWN_ENCODING,Ii=ys.errorOrDestroy;X()(Ge,nd);function t_(){}function qn(t,e,r){Ti=Ti||zr(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ti),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=V2(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){s_(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new id(this)}qn.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(qn.prototype,"buffer",{get:j2.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ea;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ea=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ge,Symbol.hasInstance,{value:function(e){return ea.call(this,e)?!0:this!==Ge?!1:e&&e._writableState instanceof qn}})):ea=function(e){return e instanceof this};function Ge(t){Ti=Ti||zr();var e=this instanceof Ti;if(!e&&!ea.call(Ge,this))return new Ge(t);this._writableState=new qn(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),nd.call(this)}Ge.prototype.pipe=function(){Ii(this,new Y2)};function r_(t,e){var r=new Q2;Ii(t,r),E.default.nextTick(e,r)}function i_(t,e,r,i){var n;return r===null?n=new J2:typeof r!="string"&&!e.objectMode&&(n=new $2("chunk",["string","Buffer"],r)),n?(Ii(t,n),E.default.nextTick(i,n),!1):!0}Ge.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&W2(t);return a&&!ta.isBuffer(t)&&(t=K2(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=t_),i.ending?r_(this,r):(a||i_(this,i,t,r))&&(i.pendingcb++,n=o_(this,i,a,t,e,r)),n};Ge.prototype.cork=function(){this._writableState.corked++};Ge.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&od(this,t))};Ge.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new e_(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ge.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function n_(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ta.from(e,r)),e}Object.defineProperty(Ge.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o_(t,e,r,i,n,a){if(!r){var f=n_(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var y=e.objectMode?1:i.length;e.length+=y;var b=e.length<e.highWaterMark;if(b||(e.needDrain=!0),e.writing||e.corked){var S=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},S?S.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else vs(t,e,!1,y,i,n,a);return b}function vs(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new X2("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function a_(t,e,r,i,n){--e.pendingcb,r?(E.default.nextTick(n,i),E.default.nextTick(Rn,t,e),t._writableState.errorEmitted=!0,Ii(t,i)):(n(i),t._writableState.errorEmitted=!0,Ii(t,i),Rn(t,e))}function f_(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function s_(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Z2;if(f_(r),e)a_(t,r,i,e,n);else{var a=ad(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&od(t,r),i?E.default.nextTick(rd,t,r,a,n):rd(t,r,a,n)}}function rd(t,e,r,i){r||u_(t,e),e.pendingcb--,i(),Rn(t,e)}function u_(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function od(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,y=!0;r;)n[f]=r,r.isBuf||(y=!1),r=r.next,f+=1;n.allBuffers=y,vs(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new id(e),e.bufferedRequestCount=0}else{for(;r;){var b=r.chunk,S=r.encoding,A=r.callback,q=e.objectMode?1:b.length;if(vs(t,e,!1,q,b,S,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ge.prototype._write=function(t,e,r){r(new z2("_write()"))};Ge.prototype._writev=null;Ge.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||c_(this,i,r),this};Object.defineProperty(Ge.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ad(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function h_(t,e){t._final(function(r){e.pendingcb--,r&&Ii(t,r),e.prefinished=!0,t.emit("prefinish"),Rn(t,e)})}function l_(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,E.default.nextTick(h_,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Rn(t,e){var r=ad(e);if(r&&(l_(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function c_(t,e,r){e.ending=!0,Rn(t,e),r&&(e.finished?E.default.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function d_(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ge.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Ge.prototype.destroy=ys.destroy;Ge.prototype._undestroy=ys.undestroy;Ge.prototype._destroy=function(t,e){e(t)}});var zr=B((eB,ud)=>{"use strict";w();var p_=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ud.exports=Lt;var sd=ws(),bs=gs();X()(Lt,sd);for(ms=p_(bs.prototype),ra=0;ra<ms.length;ra++)ia=ms[ra],Lt.prototype[ia]||(Lt.prototype[ia]=bs.prototype[ia]);var ms,ia,ra;function Lt(t){if(!(this instanceof Lt))return new Lt(t);sd.call(this,t),bs.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v_)))}Object.defineProperty(Lt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Lt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Lt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v_(){this._writableState.ended||E.default.nextTick(y_,this)}function y_(t){t.end()}Object.defineProperty(Lt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var cd=B((_s,ld)=>{w();var na=ft(),zt=na.Buffer;function hd(t,e){for(var r in t)e[r]=t[r]}zt.from&&zt.alloc&&zt.allocUnsafe&&zt.allocUnsafeSlow?ld.exports=na:(hd(na,_s),_s.Buffer=ki);function ki(t,e,r){return zt(t,e,r)}hd(zt,ki);ki.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return zt(t,e,r)};ki.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=zt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};ki.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return zt(t)};ki.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return na.SlowBuffer(t)}});var Ci=B(pd=>{"use strict";w();var Ms=cd().Buffer,dd=Ms.isEncoding||function(t){switch(t=""+t,t&&t.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 g_(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function m_(t){var e=g_(t);if(typeof e!="string"&&(Ms.isEncoding===dd||!dd(t)))throw new Error("Unknown encoding: "+t);return e||t}pd.StringDecoder=Tn;function Tn(t){this.encoding=m_(t);var e;switch(this.encoding){case"utf16le":this.text=E_,this.end=S_,e=4;break;case"utf8":this.fillLast=__,e=4;break;case"base64":this.text=B_,this.end=A_,e=3;break;default:this.write=R_,this.end=q_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ms.allocUnsafe(e)}Tn.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Tn.prototype.end=M_;Tn.prototype.text=x_;Tn.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function xs(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function b_(t,e,r){var i=e.length-1;if(i<r)return 0;var n=xs(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=xs(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=xs(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function w_(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function __(t){var e=this.lastTotal-this.lastNeed,r=w_(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function x_(t,e){var r=b_(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function M_(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function E_(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function S_(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function B_(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function A_(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function R_(t){return t.toString(this.encoding)}function q_(t){return t&&t.length?this.write(t):""}});var oa=B((oB,gd)=>{"use strict";w();var vd=$r().codes.ERR_STREAM_PREMATURE_CLOSE;function T_(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function I_(){}function k_(t){return t.setHeader&&typeof t.abort=="function"}function yd(t,e,r){if(typeof e=="function")return yd(t,null,e);e||(e={}),r=T_(r||I_);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||y()},f=t._writableState&&t._writableState.finished,y=function(){n=!1,f=!0,i||r.call(t)},b=t._readableState&&t._readableState.endEmitted,S=function(){i=!1,b=!0,n||r.call(t)},A=function(H){r.call(t,H)},q=function(){var H;if(i&&!b)return(!t._readableState||!t._readableState.ended)&&(H=new vd),r.call(t,H);if(n&&!f)return(!t._writableState||!t._writableState.ended)&&(H=new vd),r.call(t,H)},k=function(){t.req.on("finish",y)};return k_(t)?(t.on("complete",y),t.on("abort",q),t.req?k():t.on("request",k)):n&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",S),t.on("finish",y),e.error!==!1&&t.on("error",A),t.on("close",q),function(){t.removeListener("complete",y),t.removeListener("abort",q),t.removeListener("request",k),t.req&&t.req.removeListener("finish",y),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",y),t.removeListener("end",S),t.removeListener("error",A),t.removeListener("close",q)}}gd.exports=yd});var bd=B((fB,md)=>{"use strict";w();var aa;function hr(t,e,r){return e=C_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C_(t){var e=O_(t,"string");return typeof e=="symbol"?e:String(e)}function O_(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var P_=oa(),lr=Symbol("lastResolve"),Zr=Symbol("lastReject"),In=Symbol("error"),fa=Symbol("ended"),Yr=Symbol("lastPromise"),Es=Symbol("handlePromise"),Xr=Symbol("stream");function cr(t,e){return{value:t,done:e}}function D_(t){var e=t[lr];if(e!==null){var r=t[Xr].read();r!==null&&(t[Yr]=null,t[lr]=null,t[Zr]=null,e(cr(r,!1)))}}function U_(t){E.default.nextTick(D_,t)}function N_(t,e){return function(r,i){t.then(function(){if(e[fa]){r(cr(void 0,!0));return}e[Es](r,i)},i)}}var L_=Object.getPrototypeOf(function(){}),F_=Object.setPrototypeOf((aa={get stream(){return this[Xr]},next:function(){var e=this,r=this[In];if(r!==null)return Promise.reject(r);if(this[fa])return Promise.resolve(cr(void 0,!0));if(this[Xr].destroyed)return new Promise(function(f,y){E.default.nextTick(function(){e[In]?y(e[In]):f(cr(void 0,!0))})});var i=this[Yr],n;if(i)n=new Promise(N_(i,this));else{var a=this[Xr].read();if(a!==null)return Promise.resolve(cr(a,!1));n=new Promise(this[Es])}return this[Yr]=n,n}},hr(aa,Symbol.asyncIterator,function(){return this}),hr(aa,"return",function(){var e=this;return new Promise(function(r,i){e[Xr].destroy(null,function(n){if(n){i(n);return}r(cr(void 0,!0))})})}),aa),L_),j_=function(e){var r,i=Object.create(F_,(r={},hr(r,Xr,{value:e,writable:!0}),hr(r,lr,{value:null,writable:!0}),hr(r,Zr,{value:null,writable:!0}),hr(r,In,{value:null,writable:!0}),hr(r,fa,{value:e._readableState.endEmitted,writable:!0}),hr(r,Es,{value:function(a,f){var y=i[Xr].read();y?(i[Yr]=null,i[lr]=null,i[Zr]=null,a(cr(y,!1))):(i[lr]=a,i[Zr]=f)},writable:!0}),r));return i[Yr]=null,P_(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[Zr];a!==null&&(i[Yr]=null,i[lr]=null,i[Zr]=null,a(n)),i[In]=n;return}var f=i[lr];f!==null&&(i[Yr]=null,i[lr]=null,i[Zr]=null,f(cr(void 0,!0))),i[fa]=!0}),e.on("readable",U_.bind(null,i)),i};md.exports=j_});var _d=B((uB,wd)=>{w();wd.exports=function(){throw new Error("Readable.from is not available in the browser")}});var ws=B((cB,Id)=>{"use strict";w();Id.exports=Ue;var Oi;Ue.ReadableState=Sd;var lB=wi().EventEmitter,Ed=function(e,r){return e.listeners(r).length},Cn=qf(),sa=ft().Buffer,H_=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function K_(t){return sa.from(t)}function W_(t){return sa.isBuffer(t)||t instanceof H_}var Ss=An(),Ce;Ss&&Ss.debuglog?Ce=Ss.debuglog("stream"):Ce=function(){};var G_=zc(),ks=ls(),V_=cs(),$_=V_.getHighWaterMark,ua=$r().codes,z_=ua.ERR_INVALID_ARG_TYPE,Z_=ua.ERR_STREAM_PUSH_AFTER_EOF,Y_=ua.ERR_METHOD_NOT_IMPLEMENTED,X_=ua.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Pi,Bs,As;X()(Ue,Cn);var kn=ks.errorOrDestroy,Rs=["error","close","destroy","pause","resume"];function J_(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Sd(t,e,r){Oi=Oi||zr(),t=t||{},typeof r!="boolean"&&(r=e instanceof Oi),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=$_(this,t,"readableHighWaterMark",r),this.buffer=new G_,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=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Pi||(Pi=Ci().StringDecoder),this.decoder=new Pi(t.encoding),this.encoding=t.encoding)}function Ue(t){if(Oi=Oi||zr(),!(this instanceof Ue))return new Ue(t);var e=this instanceof Oi;this._readableState=new Sd(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Cn.call(this)}Object.defineProperty(Ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ue.prototype.destroy=ks.destroy;Ue.prototype._undestroy=ks.undestroy;Ue.prototype._destroy=function(t,e){e(t)};Ue.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=sa.from(t,e),e=""),i=!0),Bd(this,t,e,!1,i)};Ue.prototype.unshift=function(t){return Bd(this,t,null,!0,!1)};function Bd(t,e,r,i,n){Ce("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,tx(t,a);else{var f;if(n||(f=Q_(a,e)),f)kn(t,f);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==sa.prototype&&(e=K_(e)),i)a.endEmitted?kn(t,new X_):qs(t,a,e,!0);else if(a.ended)kn(t,new Z_);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?qs(t,a,e,!1):Is(t,a)):qs(t,a,e,!1)}else i||(a.reading=!1,Is(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function qs(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&ha(t)),Is(t,e)}function Q_(t,e){var r;return!W_(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new z_("chunk",["string","Buffer","Uint8Array"],e)),r}Ue.prototype.isPaused=function(){return this._readableState.flowing===!1};Ue.prototype.setEncoding=function(t){Pi||(Pi=Ci().StringDecoder);var e=new Pi(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var xd=1073741824;function ex(t){return t>=xd?t=xd:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Md(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=ex(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ue.prototype.read=function(t){Ce("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ce("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Ts(this):ha(this),null;if(t=Md(t,e),t===0&&e.ended)return e.length===0&&Ts(this),null;var i=e.needReadable;Ce("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ce("length less than watermark",i)),e.ended||e.reading?(i=!1,Ce("reading or ended",i)):i&&(Ce("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Md(r,e)));var n;return t>0?n=qd(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Ts(this)),n!==null&&this.emit("data",n),n};function tx(t,e){if(Ce("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?ha(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ad(t)))}}function ha(t){var e=t._readableState;Ce("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ce("emitReadable",e.flowing),e.emittedReadable=!0,E.default.nextTick(Ad,t))}function Ad(t){var e=t._readableState;Ce("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Cs(t)}function Is(t,e){e.readingMore||(e.readingMore=!0,E.default.nextTick(rx,t,e))}function rx(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ce("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Ue.prototype._read=function(t){kn(this,new Y_("_read()"))};Ue.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ce("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==E.default.stdout&&t!==E.default.stderr,a=n?y:Z;i.endEmitted?E.default.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(ke,V){Ce("onunpipe"),ke===r&&V&&V.hasUnpiped===!1&&(V.hasUnpiped=!0,A())}function y(){Ce("onend"),t.end()}var b=ix(r);t.on("drain",b);var S=!1;function A(){Ce("cleanup"),t.removeListener("close",P),t.removeListener("finish",H),t.removeListener("drain",b),t.removeListener("error",k),t.removeListener("unpipe",f),r.removeListener("end",y),r.removeListener("end",Z),r.removeListener("data",q),S=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&b()}r.on("data",q);function q(ke){Ce("ondata");var V=t.write(ke);Ce("dest.write",V),V===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Td(i.pipes,t)!==-1)&&!S&&(Ce("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function k(ke){Ce("onerror",ke),Z(),t.removeListener("error",k),Ed(t,"error")===0&&kn(t,ke)}J_(t,"error",k);function P(){t.removeListener("finish",H),Z()}t.once("close",P);function H(){Ce("onfinish"),t.removeListener("close",P),Z()}t.once("finish",H);function Z(){Ce("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ce("pipe resume"),r.resume()),t};function ix(t){return function(){var r=t._readableState;Ce("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ed(t,"data")&&(r.flowing=!0,Cs(t))}}Ue.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Td(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Ue.prototype.on=function(t,e){var r=Cn.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ce("on readable",i.length,i.reading),i.length?ha(this):i.reading||E.default.nextTick(nx,this)),r};Ue.prototype.addListener=Ue.prototype.on;Ue.prototype.removeListener=function(t,e){var r=Cn.prototype.removeListener.call(this,t,e);return t==="readable"&&E.default.nextTick(Rd,this),r};Ue.prototype.removeAllListeners=function(t){var e=Cn.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&E.default.nextTick(Rd,this),e};function Rd(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function nx(t){Ce("readable nexttick read 0"),t.read(0)}Ue.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ce("resume"),t.flowing=!t.readableListening,ox(this,t)),t.paused=!1,this};function ox(t,e){e.resumeScheduled||(e.resumeScheduled=!0,E.default.nextTick(ax,t,e))}function ax(t,e){Ce("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Cs(t),e.flowing&&!e.reading&&t.read(0)}Ue.prototype.pause=function(){return Ce("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Cs(t){var e=t._readableState;for(Ce("flow",e.flowing);e.flowing&&t.read()!==null;);}Ue.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ce("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ce("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var y=e.push(f);y||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(y){return function(){return t[y].apply(t,arguments)}})(n));for(var a=0;a<Rs.length;a++)t.on(Rs[a],this.emit.bind(this,Rs[a]));return this._read=function(f){Ce("wrapped _read",f),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(Ue.prototype[Symbol.asyncIterator]=function(){return Bs===void 0&&(Bs=bd()),Bs(this)});Object.defineProperty(Ue.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ue.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ue.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Ue._fromList=qd;Object.defineProperty(Ue.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function qd(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Ts(t){var e=t._readableState;Ce("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,E.default.nextTick(fx,e,t))}function fx(t,e){if(Ce("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Ue.from=function(t,e){return As===void 0&&(As=_d()),As(Ue,t,e)});function Td(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Os=B((pB,Cd)=>{"use strict";w();Cd.exports=Zt;var la=$r().codes,sx=la.ERR_METHOD_NOT_IMPLEMENTED,ux=la.ERR_MULTIPLE_CALLBACK,hx=la.ERR_TRANSFORM_ALREADY_TRANSFORMING,lx=la.ERR_TRANSFORM_WITH_LENGTH_0,ca=zr();X()(Zt,ca);function cx(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new ux);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Zt(t){if(!(this instanceof Zt))return new Zt(t);ca.call(this,t),this._transformState={afterTransform:cx.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",dx)}function dx(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){kd(t,e,r)}):kd(this,null,null)}Zt.prototype.push=function(t,e){return this._transformState.needTransform=!1,ca.prototype.push.call(this,t,e)};Zt.prototype._transform=function(t,e,r){r(new sx("_transform()"))};Zt.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Zt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Zt.prototype._destroy=function(t,e){ca.prototype._destroy.call(this,t,function(r){e(r)})};function kd(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new lx;if(t._transformState.transforming)throw new hx;return t.push(null)}});var Dd=B((yB,Pd)=>{"use strict";w();Pd.exports=On;var Od=Os();X()(On,Od);function On(t){if(!(this instanceof On))return new On(t);Od.call(this,t)}On.prototype._transform=function(t,e,r){r(null,t)}});var jd=B((mB,Fd)=>{"use strict";w();var Ps;function px(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Ld=$r().codes,vx=Ld.ERR_MISSING_ARGS,yx=Ld.ERR_STREAM_DESTROYED;function Ud(t){if(t)throw t}function gx(t){return t.setHeader&&typeof t.abort=="function"}function mx(t,e,r,i){i=px(i);var n=!1;t.on("close",function(){n=!0}),Ps===void 0&&(Ps=oa()),Ps(t,{readable:e,writable:r},function(f){if(f)return i(f);n=!0,i()});var a=!1;return function(f){if(!n&&!a){if(a=!0,gx(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(f||new yx("pipe"))}}}function Nd(t){t()}function bx(t,e){return t.pipe(e)}function wx(t){return!t.length||typeof t[t.length-1]!="function"?Ud:t.pop()}function _x(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=wx(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new vx("streams");var n,a=e.map(function(f,y){var b=y<e.length-1,S=y>0;return mx(f,b,S,function(A){n||(n=A),A&&a.forEach(Nd),!b&&(a.forEach(Nd),i(n))})});return e.reduce(bx)}Fd.exports=_x});var Us=B((wB,Hd)=>{w();Hd.exports=yt;var Ds=wi().EventEmitter,xx=X();xx(yt,Ds);yt.Readable=ws();yt.Writable=gs();yt.Duplex=zr();yt.Transform=Os();yt.PassThrough=Dd();yt.finished=oa();yt.pipeline=jd();yt.Stream=yt;function yt(){Ds.call(this)}yt.prototype.pipe=function(t,e){var r=this;function i(A){t.writable&&t.write(A)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}t.on("drain",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",f),r.on("close",y));var a=!1;function f(){a||(a=!0,t.end())}function y(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function b(A){if(S(),Ds.listenerCount(this,"error")===0)throw A}r.on("error",b),t.on("error",b);function S(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",f),r.removeListener("close",y),r.removeListener("error",b),t.removeListener("error",b),r.removeListener("end",S),r.removeListener("close",S),t.removeListener("close",S)}return r.on("end",S),r.on("close",S),t.on("close",S),t.emit("pipe",r),t}});var Gd=B((xB,Wd)=>{"use strict";w();var Ft=Te().Buffer,Kd=Us().Transform,Mx=X();function dr(t){Kd.call(this),this._block=Ft.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Mx(dr,Kd);dr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};dr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};var Ex=typeof Uint8Array<"u",Sx=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(Ft.prototype instanceof Uint8Array||Ft.TYPED_ARRAY_SUPPORT);function Bx(t,e){if(t instanceof Ft)return t;if(typeof t=="string")return Ft.from(t,e);if(Sx&&ArrayBuffer.isView(t)){if(t.byteLength===0)return Ft.alloc(0);var r=Ft.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(Ex&&t instanceof Uint8Array||Ft.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Ft.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}dr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=Bx(t,e);for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,f=t.length*8;f>0;++a)this._length[a]+=f,f=this._length[a]/4294967296|0,f>0&&(this._length[a]-=4294967296*f);return this};dr.prototype._update=function(){throw new Error("_update is not implemented")};dr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};dr.prototype._digest=function(){throw new Error("_digest is not implemented")};Wd.exports=dr});var va=B((EB,$d)=>{"use strict";w();var Ax=X(),Vd=Gd(),Rx=Te().Buffer,qx=new Array(16);function da(){Vd.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}Ax(da,Vd);da.prototype._update=function(){for(var t=qx,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,i=this._b,n=this._c,a=this._d;r=tt(r,i,n,a,t[0],3614090360,7),a=tt(a,r,i,n,t[1],3905402710,12),n=tt(n,a,r,i,t[2],606105819,17),i=tt(i,n,a,r,t[3],3250441966,22),r=tt(r,i,n,a,t[4],4118548399,7),a=tt(a,r,i,n,t[5],1200080426,12),n=tt(n,a,r,i,t[6],2821735955,17),i=tt(i,n,a,r,t[7],4249261313,22),r=tt(r,i,n,a,t[8],1770035416,7),a=tt(a,r,i,n,t[9],2336552879,12),n=tt(n,a,r,i,t[10],4294925233,17),i=tt(i,n,a,r,t[11],2304563134,22),r=tt(r,i,n,a,t[12],1804603682,7),a=tt(a,r,i,n,t[13],4254626195,12),n=tt(n,a,r,i,t[14],2792965006,17),i=tt(i,n,a,r,t[15],1236535329,22),r=rt(r,i,n,a,t[1],4129170786,5),a=rt(a,r,i,n,t[6],3225465664,9),n=rt(n,a,r,i,t[11],643717713,14),i=rt(i,n,a,r,t[0],3921069994,20),r=rt(r,i,n,a,t[5],3593408605,5),a=rt(a,r,i,n,t[10],38016083,9),n=rt(n,a,r,i,t[15],3634488961,14),i=rt(i,n,a,r,t[4],3889429448,20),r=rt(r,i,n,a,t[9],568446438,5),a=rt(a,r,i,n,t[14],3275163606,9),n=rt(n,a,r,i,t[3],4107603335,14),i=rt(i,n,a,r,t[8],1163531501,20),r=rt(r,i,n,a,t[13],2850285829,5),a=rt(a,r,i,n,t[2],4243563512,9),n=rt(n,a,r,i,t[7],1735328473,14),i=rt(i,n,a,r,t[12],2368359562,20),r=it(r,i,n,a,t[5],4294588738,4),a=it(a,r,i,n,t[8],2272392833,11),n=it(n,a,r,i,t[11],1839030562,16),i=it(i,n,a,r,t[14],4259657740,23),r=it(r,i,n,a,t[1],2763975236,4),a=it(a,r,i,n,t[4],1272893353,11),n=it(n,a,r,i,t[7],4139469664,16),i=it(i,n,a,r,t[10],3200236656,23),r=it(r,i,n,a,t[13],681279174,4),a=it(a,r,i,n,t[0],3936430074,11),n=it(n,a,r,i,t[3],3572445317,16),i=it(i,n,a,r,t[6],76029189,23),r=it(r,i,n,a,t[9],3654602809,4),a=it(a,r,i,n,t[12],3873151461,11),n=it(n,a,r,i,t[15],530742520,16),i=it(i,n,a,r,t[2],3299628645,23),r=nt(r,i,n,a,t[0],4096336452,6),a=nt(a,r,i,n,t[7],1126891415,10),n=nt(n,a,r,i,t[14],2878612391,15),i=nt(i,n,a,r,t[5],4237533241,21),r=nt(r,i,n,a,t[12],1700485571,6),a=nt(a,r,i,n,t[3],2399980690,10),n=nt(n,a,r,i,t[10],4293915773,15),i=nt(i,n,a,r,t[1],2240044497,21),r=nt(r,i,n,a,t[8],1873313359,6),a=nt(a,r,i,n,t[15],4264355552,10),n=nt(n,a,r,i,t[6],2734768916,15),i=nt(i,n,a,r,t[13],1309151649,21),r=nt(r,i,n,a,t[4],4149444226,6),a=nt(a,r,i,n,t[11],3174756917,10),n=nt(n,a,r,i,t[2],718787259,15),i=nt(i,n,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0};da.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 t=Rx.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function pa(t,e){return t<<e|t>>>32-e}function tt(t,e,r,i,n,a,f){return pa(t+(e&r|~e&i)+n+a|0,f)+e|0}function rt(t,e,r,i,n,a,f){return pa(t+(e&i|r&~i)+n+a|0,f)+e|0}function it(t,e,r,i,n,a,f){return pa(t+(e^r^i)+n+a|0,f)+e|0}function nt(t,e,r,i,n,a,f){return pa(t+(r^(e|~i))+n+a|0,f)+e|0}$d.exports=da});var Zd=B((BB,zd)=>{w();var Tx={}.toString;zd.exports=Array.isArray||function(t){return Tx.call(t)=="[object Array]"}});var Xd=B((RB,Yd)=>{"use strict";w();var Ix=jr(),kx=Wr(),Cx=kx("TypedArray.prototype.buffer",!0),Ox=ts();Yd.exports=Cx||function(e){if(!Ox(e))throw new Ix("Not a Typed Array");return e.buffer}});var Pn=B((TB,Qd)=>{"use strict";w();var St=Te().Buffer,Px=Zd(),Dx=Xd(),Ux=ArrayBuffer.isView||function(e){try{return Dx(e),!0}catch{return!1}},Nx=typeof Uint8Array<"u",Jd=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",Lx=Jd&&(St.prototype instanceof Uint8Array||St.TYPED_ARRAY_SUPPORT);Qd.exports=function(e,r){if(St.isBuffer(e))return e.constructor&&!("isBuffer"in e)?St.from(e):e;if(typeof e=="string")return St.from(e,r);if(Jd&&Ux(e)){if(e.byteLength===0)return St.alloc(0);if(Lx){var i=St.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var n=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=St.from(n);if(a.length===e.byteLength)return a}if(Nx&&e instanceof Uint8Array)return St.from(e);var f=Px(e);if(f)for(var y=0;y<e.length;y+=1){var b=e[y];if(typeof b!="number"||b<0||b>255||~~b!==b)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||St.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return St.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var ip=B((kB,rp)=>{"use strict";w();var Fx=Te().Buffer,jx=Pn(),tp=typeof Uint8Array<"u",Hx=tp&&typeof ArrayBuffer<"u",ep=Hx&&ArrayBuffer.isView;rp.exports=function(t,e){if(typeof t=="string"||Fx.isBuffer(t)||tp&&t instanceof Uint8Array||ep&&ep(t))return jx(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Dn=B((OB,Ns)=>{"use strict";w();typeof E.default>"u"||!E.default.version||E.default.version.indexOf("v0.")===0||E.default.version.indexOf("v1.")===0&&E.default.version.indexOf("v1.8.")!==0?Ns.exports={nextTick:Kx}:Ns.exports=E.default;function Kx(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,f;switch(n){case 0:case 1:return E.default.nextTick(t);case 2:return E.default.nextTick(function(){t.call(null,e)});case 3:return E.default.nextTick(function(){t.call(null,e,r)});case 4:return E.default.nextTick(function(){t.call(null,e,r,i)});default:for(a=new Array(n-1),f=0;f<a.length;)a[f++]=arguments[f];return E.default.nextTick(function(){t.apply(null,a)})}}});var op=B((DB,np)=>{w();var Wx={}.toString;np.exports=Array.isArray||function(t){return Wx.call(t)=="[object Array]"}});var Ls=B((NB,ap)=>{w();ap.exports=wi().EventEmitter});var ga=B((Fs,sp)=>{w();var ya=ft(),Yt=ya.Buffer;function fp(t,e){for(var r in t)e[r]=t[r]}Yt.from&&Yt.alloc&&Yt.allocUnsafe&&Yt.allocUnsafeSlow?sp.exports=ya:(fp(ya,Fs),Fs.Buffer=Di);function Di(t,e,r){return Yt(t,e,r)}fp(Yt,Di);Di.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Yt(t,e,r)};Di.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Yt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Di.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Yt(t)};Di.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ya.SlowBuffer(t)}});var Ui=B(ot=>{w();function Gx(t){return Array.isArray?Array.isArray(t):ma(t)==="[object Array]"}ot.isArray=Gx;function Vx(t){return typeof t=="boolean"}ot.isBoolean=Vx;function $x(t){return t===null}ot.isNull=$x;function zx(t){return t==null}ot.isNullOrUndefined=zx;function Zx(t){return typeof t=="number"}ot.isNumber=Zx;function Yx(t){return typeof t=="string"}ot.isString=Yx;function Xx(t){return typeof t=="symbol"}ot.isSymbol=Xx;function Jx(t){return t===void 0}ot.isUndefined=Jx;function Qx(t){return ma(t)==="[object RegExp]"}ot.isRegExp=Qx;function e6(t){return typeof t=="object"&&t!==null}ot.isObject=e6;function t6(t){return ma(t)==="[object Date]"}ot.isDate=t6;function r6(t){return ma(t)==="[object Error]"||t instanceof Error}ot.isError=r6;function i6(t){return typeof t=="function"}ot.isFunction=i6;function n6(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ot.isPrimitive=n6;ot.isBuffer=ft().Buffer.isBuffer;function ma(t){return Object.prototype.toString.call(t)}});var hp=B((KB,js)=>{"use strict";w();function o6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var up=ga().Buffer,Un=An();function a6(t,e,r){t.copy(e,r)}js.exports=(function(){function t(){o6(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return up.alloc(0);for(var i=up.allocUnsafe(r>>>0),n=this.head,a=0;n;)a6(n.data,i,a),a+=n.data.length,n=n.next;return i},t})();Un&&Un.inspect&&Un.inspect.custom&&(js.exports.prototype[Un.inspect.custom]=function(){var t=Un.inspect({length:this.length});return this.constructor.name+" "+t})});var Hs=B((GB,lp)=>{"use strict";w();var ba=Dn();function f6(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ba.nextTick(wa,this,t)):ba.nextTick(wa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,ba.nextTick(wa,r,a)):ba.nextTick(wa,r,a):e&&e(a)}),this)}function s6(){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 wa(t,e){t.emit("error",e)}lp.exports={destroy:f6,undestroy:s6}});var Ws=B(($B,bp)=>{"use strict";w();var Jr=Dn();bp.exports=$e;function dp(t){var e=this;this.next=null,this.entry=null,this.finish=function(){B6(e,t)}}var u6=!E.default.browser&&["v0.10","v0.9."].indexOf(E.default.version.slice(0,5))>-1?setImmediate:Jr.nextTick,Ni;$e.WritableState=Ln;var pp=Object.create(Ui());pp.inherits=X();var h6={deprecate:ps()},vp=Ls(),xa=ga().Buffer,l6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c6(t){return xa.from(t)}function d6(t){return xa.isBuffer(t)||t instanceof l6}var yp=Hs();pp.inherits($e,vp);function p6(){}function Ln(t,e){Ni=Ni||Qr(),t=t||{};var r=e instanceof Ni;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=t.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(y){_6(e,y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new dp(this)}Ln.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ln.prototype,"buffer",{get:h6.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var _a;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_a=Function.prototype[Symbol.hasInstance],Object.defineProperty($e,Symbol.hasInstance,{value:function(t){return _a.call(this,t)?!0:this!==$e?!1:t&&t._writableState instanceof Ln}})):_a=function(t){return t instanceof this};function $e(t){if(Ni=Ni||Qr(),!_a.call($e,this)&&!(this instanceof Ni))return new $e(t);this._writableState=new Ln(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),vp.call(this)}$e.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function v6(t,e){var r=new Error("write after end");t.emit("error",r),Jr.nextTick(e,r)}function y6(t,e,r,i){var n=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),Jr.nextTick(i,a),n=!1),n}$e.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&d6(t);return a&&!xa.isBuffer(t)&&(t=c6(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=p6),i.ended?v6(this,r):(a||y6(this,i,t,r))&&(i.pendingcb++,n=m6(this,i,a,t,e,r)),n};$e.prototype.cork=function(){var t=this._writableState;t.corked++};$e.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&gp(this,t))};$e.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function g6(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=xa.from(e,r)),e}Object.defineProperty($e.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m6(t,e,r,i,n,a){if(!r){var f=g6(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var y=e.objectMode?1:i.length;e.length+=y;var b=e.length<e.highWaterMark;if(b||(e.needDrain=!0),e.writing||e.corked){var S=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},S?S.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Ks(t,e,!1,y,i,n,a);return b}function Ks(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function b6(t,e,r,i,n){--e.pendingcb,r?(Jr.nextTick(n,i),Jr.nextTick(Nn,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Nn(t,e))}function w6(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function _6(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(w6(r),e)b6(t,r,i,e,n);else{var a=mp(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&gp(t,r),i?u6(cp,t,r,a,n):cp(t,r,a,n)}}function cp(t,e,r,i){r||x6(t,e),e.pendingcb--,i(),Nn(t,e)}function x6(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function gp(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,y=!0;r;)n[f]=r,r.isBuf||(y=!1),r=r.next,f+=1;n.allBuffers=y,Ks(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new dp(e),e.bufferedRequestCount=0}else{for(;r;){var b=r.chunk,S=r.encoding,A=r.callback,q=e.objectMode?1:b.length;if(Ks(t,e,!1,q,b,S,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}$e.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};$e.prototype._writev=null;$e.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||S6(this,i,r)};function mp(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function M6(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Nn(t,e)})}function E6(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Jr.nextTick(M6,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Nn(t,e){var r=mp(e);return r&&(E6(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function S6(t,e,r){e.ending=!0,Nn(t,e),r&&(e.finished?Jr.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function B6(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty($e.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});$e.prototype.destroy=yp.destroy;$e.prototype._undestroy=yp.undestroy;$e.prototype._destroy=function(t,e){this.end(),e(t)}});var Qr=B((ZB,Mp)=>{"use strict";w();var wp=Dn(),A6=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Mp.exports=Xt;var _p=Object.create(Ui());_p.inherits=X();var xp=$s(),Vs=Ws();_p.inherits(Xt,xp);for(Gs=A6(Vs.prototype),Ma=0;Ma<Gs.length;Ma++)Ea=Gs[Ma],Xt.prototype[Ea]||(Xt.prototype[Ea]=Vs.prototype[Ea]);var Gs,Ea,Ma;function Xt(t){if(!(this instanceof Xt))return new Xt(t);xp.call(this,t),Vs.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",R6)}Object.defineProperty(Xt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R6(){this.allowHalfOpen||this._writableState.ended||wp.nextTick(q6,this)}function q6(t){t.end()}Object.defineProperty(Xt.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Xt.prototype._destroy=function(t,e){this.push(null),this.end(),wp.nextTick(e,t)}});var $s=B((JB,Pp)=>{"use strict";w();var Fi=Dn();Pp.exports=je;var T6=op(),Fn;je.ReadableState=Tp;var XB=wi().EventEmitter,Ap=function(t,e){return t.listeners(e).length},Js=Ls(),jn=ga().Buffer,I6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function k6(t){return jn.from(t)}function C6(t){return jn.isBuffer(t)||t instanceof I6}var Rp=Object.create(Ui());Rp.inherits=X();var zs=An(),Ne=void 0;zs&&zs.debuglog?Ne=zs.debuglog("stream"):Ne=function(){};var O6=hp(),qp=Hs(),Li;Rp.inherits(je,Js);var Zs=["error","close","destroy","pause","resume"];function P6(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):T6(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Tp(t,e){Fn=Fn||Qr(),t=t||{};var r=e instanceof Fn;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new O6,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Li||(Li=Ci().StringDecoder),this.decoder=new Li(t.encoding),this.encoding=t.encoding)}function je(t){if(Fn=Fn||Qr(),!(this instanceof je))return new je(t);this._readableState=new Tp(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Js.call(this)}Object.defineProperty(je.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});je.prototype.destroy=qp.destroy;je.prototype._undestroy=qp.undestroy;je.prototype._destroy=function(t,e){this.push(null),e(t)};je.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=jn.from(t,e),e=""),i=!0),Ip(this,t,e,!1,i)};je.prototype.unshift=function(t){return Ip(this,t,null,!0,!1)};function Ip(t,e,r,i,n){var a=t._readableState;if(e===null)a.reading=!1,L6(t,a);else{var f;n||(f=D6(a,e)),f?t.emit("error",f):a.objectMode||e&&e.length>0?(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==jn.prototype&&(e=k6(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Ys(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?Ys(t,a,e,!1):kp(t,a)):Ys(t,a,e,!1))):i||(a.reading=!1)}return U6(a)}function Ys(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Sa(t)),kp(t,e)}function D6(t,e){var r;return!C6(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function U6(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}je.prototype.isPaused=function(){return this._readableState.flowing===!1};je.prototype.setEncoding=function(t){return Li||(Li=Ci().StringDecoder),this._readableState.decoder=new Li(t),this._readableState.encoding=t,this};var Ep=8388608;function N6(t){return t>=Ep?t=Ep:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Sp(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=N6(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}je.prototype.read=function(t){Ne("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ne("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Xs(this):Sa(this),null;if(t=Sp(t,e),t===0&&e.ended)return e.length===0&&Xs(this),null;var i=e.needReadable;Ne("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ne("length less than watermark",i)),e.ended||e.reading?(i=!1,Ne("reading or ended",i)):i&&(Ne("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Sp(r,e)));var n;return t>0?n=Cp(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Xs(this)),n!==null&&this.emit("data",n),n};function L6(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Sa(t)}}function Sa(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ne("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Fi.nextTick(Bp,t):Bp(t))}function Bp(t){Ne("emit readable"),t.emit("readable"),Qs(t)}function kp(t,e){e.readingMore||(e.readingMore=!0,Fi.nextTick(F6,t,e))}function F6(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ne("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}je.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};je.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ne("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==E.default.stdout&&t!==E.default.stderr,a=n?y:ke;i.endEmitted?Fi.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(V,Y){Ne("onunpipe"),V===r&&Y&&Y.hasUnpiped===!1&&(Y.hasUnpiped=!0,A())}function y(){Ne("onend"),t.end()}var b=j6(r);t.on("drain",b);var S=!1;function A(){Ne("cleanup"),t.removeListener("close",H),t.removeListener("finish",Z),t.removeListener("drain",b),t.removeListener("error",P),t.removeListener("unpipe",f),r.removeListener("end",y),r.removeListener("end",ke),r.removeListener("data",k),S=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&b()}var q=!1;r.on("data",k);function k(V){Ne("ondata"),q=!1;var Y=t.write(V);Y===!1&&!q&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Op(i.pipes,t)!==-1)&&!S&&(Ne("false write response, pause",i.awaitDrain),i.awaitDrain++,q=!0),r.pause())}function P(V){Ne("onerror",V),ke(),t.removeListener("error",P),Ap(t,"error")===0&&t.emit("error",V)}P6(t,"error",P);function H(){t.removeListener("finish",Z),ke()}t.once("close",H);function Z(){Ne("onfinish"),t.removeListener("close",H),ke()}t.once("finish",Z);function ke(){Ne("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ne("pipe resume"),r.resume()),t};function j6(t){return function(){var e=t._readableState;Ne("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&Ap(t,"data")&&(e.flowing=!0,Qs(t))}}je.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Op(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};je.prototype.on=function(t,e){var r=Js.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Sa(this):Fi.nextTick(H6,this))}return r};je.prototype.addListener=je.prototype.on;function H6(t){Ne("readable nexttick read 0"),t.read(0)}je.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ne("resume"),t.flowing=!0,K6(this,t)),this};function K6(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Fi.nextTick(W6,t,e))}function W6(t,e){e.reading||(Ne("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Qs(t),e.flowing&&!e.reading&&t.read(0)}je.prototype.pause=function(){return Ne("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ne("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Qs(t){var e=t._readableState;for(Ne("flow",e.flowing);e.flowing&&t.read()!==null;);}je.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ne("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ne("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var y=e.push(f);y||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(f){return function(){return t[f].apply(t,arguments)}})(n));for(var a=0;a<Zs.length;a++)t.on(Zs[a],this.emit.bind(this,Zs[a]));return this._read=function(f){Ne("wrapped _read",f),i&&(i=!1,t.resume())},this};Object.defineProperty(je.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});je._fromList=Cp;function Cp(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=G6(t,e.buffer,e.decoder),r}function G6(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?V6(t,e):$6(t,e),i}function V6(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,f=t>a.length?a.length:t;if(f===a.length?n+=a:n+=a.slice(0,t),t-=f,t===0){f===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(f));break}++i}return e.length-=i,n}function $6(t,e){var r=jn.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,f=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,f),t-=f,t===0){f===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(f));break}++n}return e.length-=n,r}function Xs(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Fi.nextTick(z6,e,t))}function z6(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Op(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var eu=B((eA,Np)=>{"use strict";w();Np.exports=Jt;var Ba=Qr(),Up=Object.create(Ui());Up.inherits=X();Up.inherits(Jt,Ba);function Z6(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Jt(t){if(!(this instanceof Jt))return new Jt(t);Ba.call(this,t),this._transformState={afterTransform:Z6.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Y6)}function Y6(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Dp(t,e,r)}):Dp(this,null,null)}Jt.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ba.prototype.push.call(this,t,e)};Jt.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Jt.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Jt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Jt.prototype._destroy=function(t,e){var r=this;Ba.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function Dp(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Hp=B((rA,jp)=>{"use strict";w();jp.exports=Hn;var Lp=eu(),Fp=Object.create(Ui());Fp.inherits=X();Fp.inherits(Hn,Lp);function Hn(t){if(!(this instanceof Hn))return new Hn(t);Lp.call(this,t)}Hn.prototype._transform=function(t,e,r){r(null,t)}});var Wp=B((jt,Kp)=>{w();jt=Kp.exports=$s();jt.Stream=jt;jt.Readable=jt;jt.Writable=Ws();jt.Duplex=Qr();jt.Transform=eu();jt.PassThrough=Hp()});var $p=B((oA,Vp)=>{"use strict";w();var X6=Te().Buffer,J6=ip(),Gp=Wp().Transform,Q6=X();function pr(t){Gp.call(this),this._block=X6.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Q6(pr,Gp);pr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};pr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};pr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=J6(t,e),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)i[a]=r[n],a+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var f=0,y=r.length*8;y>0;++f)this._length[f]+=y,y=this._length[f]/4294967296|0,y>0&&(this._length[f]-=4294967296*y);return this};pr.prototype._update=function(){throw new Error("_update is not implemented")};pr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};pr.prototype._digest=function(){throw new Error("_digest is not implemented")};Vp.exports=pr});var Ra=B((fA,ev)=>{"use strict";w();var tu=ft().Buffer,e3=X(),Qp=$p(),t3=new Array(16),Kn=[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],Wn=[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],Gn=[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],Vn=[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],$n=[0,1518500249,1859775393,2400959708,2840853838],zn=[1352829926,1548603684,1836072691,2053994217,0];function ei(t,e){return t<<e|t>>>32-e}function zp(t,e,r,i,n,a,f,y){return ei(t+(e^r^i)+a+f|0,y)+n|0}function Zp(t,e,r,i,n,a,f,y){return ei(t+(e&r|~e&i)+a+f|0,y)+n|0}function Yp(t,e,r,i,n,a,f,y){return ei(t+((e|~r)^i)+a+f|0,y)+n|0}function Xp(t,e,r,i,n,a,f,y){return ei(t+(e&i|r&~i)+a+f|0,y)+n|0}function Jp(t,e,r,i,n,a,f,y){return ei(t+(e^(r|~i))+a+f|0,y)+n|0}function Aa(){Qp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}e3(Aa,Qp);Aa.prototype._update=function(){for(var t=t3,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=this._a|0,b=this._b|0,S=this._c|0,A=this._d|0,q=this._e|0,k=0;k<80;k+=1){var P,H;k<16?(P=zp(r,i,n,a,f,t[Kn[k]],$n[0],Gn[k]),H=Jp(y,b,S,A,q,t[Wn[k]],zn[0],Vn[k])):k<32?(P=Zp(r,i,n,a,f,t[Kn[k]],$n[1],Gn[k]),H=Xp(y,b,S,A,q,t[Wn[k]],zn[1],Vn[k])):k<48?(P=Yp(r,i,n,a,f,t[Kn[k]],$n[2],Gn[k]),H=Yp(y,b,S,A,q,t[Wn[k]],zn[2],Vn[k])):k<64?(P=Xp(r,i,n,a,f,t[Kn[k]],$n[3],Gn[k]),H=Zp(y,b,S,A,q,t[Wn[k]],zn[3],Vn[k])):(P=Jp(r,i,n,a,f,t[Kn[k]],$n[4],Gn[k]),H=zp(y,b,S,A,q,t[Wn[k]],zn[4],Vn[k])),r=f,f=a,a=ei(n,10),n=i,i=P,y=q,q=A,A=ei(S,10),S=b,b=H}var Z=this._b+n+A|0;this._b=this._c+a+q|0,this._c=this._d+f+y|0,this._d=this._e+r+b|0,this._e=this._a+i+S|0,this._a=Z};Aa.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,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 t=tu.alloc?tu.alloc(20):new tu(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};ev.exports=Aa});var ti=B((uA,tv)=>{"use strict";w();var r3=Te().Buffer,i3=Pn();function qa(t,e){this._block=r3.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}qa.prototype.update=function(t,e){t=i3(t,e||"utf8");for(var r=this._block,i=this._blockSize,n=t.length,a=this._len,f=0;f<n;){for(var y=a%i,b=Math.min(n-f,i-y),S=0;S<b;S++)r[y+S]=t[f+S];a+=b,f+=b,a%i===0&&this._update(r)}return this._len+=n,this};qa.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};qa.prototype._update=function(){throw new Error("_update must be implemented by subclass")};tv.exports=qa});var nv=B((lA,iv)=>{"use strict";w();var n3=X(),rv=ti(),o3=Te().Buffer,a3=[1518500249,1859775393,-1894007588,-899497514],f3=new Array(80);function Zn(){this.init(),this._w=f3,rv.call(this,64,56)}n3(Zn,rv);Zn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function s3(t){return t<<5|t>>>27}function u3(t){return t<<30|t>>>2}function h3(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Zn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=0;y<16;++y)e[y]=t.readInt32BE(y*4);for(;y<80;++y)e[y]=e[y-3]^e[y-8]^e[y-14]^e[y-16];for(var b=0;b<80;++b){var S=~~(b/20),A=s3(r)+h3(S,i,n,a)+f+e[b]+a3[S]|0;f=a,a=n,n=u3(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Zn.prototype._hash=function(){var t=o3.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};iv.exports=Zn});var fv=B((dA,av)=>{"use strict";w();var l3=X(),ov=ti(),c3=Te().Buffer,d3=[1518500249,1859775393,-1894007588,-899497514],p3=new Array(80);function Yn(){this.init(),this._w=p3,ov.call(this,64,56)}l3(Yn,ov);Yn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function v3(t){return t<<1|t>>>31}function y3(t){return t<<5|t>>>27}function g3(t){return t<<30|t>>>2}function m3(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Yn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=0;y<16;++y)e[y]=t.readInt32BE(y*4);for(;y<80;++y)e[y]=v3(e[y-3]^e[y-8]^e[y-14]^e[y-16]);for(var b=0;b<80;++b){var S=~~(b/20),A=y3(r)+m3(S,i,n,a)+f+e[b]+d3[S]|0;f=a,a=n,n=g3(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Yn.prototype._hash=function(){var t=c3.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};av.exports=Yn});var ru=B((vA,uv)=>{"use strict";w();var b3=X(),sv=ti(),w3=Te().Buffer,_3=[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],x3=new Array(64);function Xn(){this.init(),this._w=x3,sv.call(this,64,56)}b3(Xn,sv);Xn.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 M3(t,e,r){return r^t&(e^r)}function E3(t,e,r){return t&e|r&(t|e)}function S3(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function B3(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function A3(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function R3(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Xn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=this._f|0,b=this._g|0,S=this._h|0,A=0;A<16;++A)e[A]=t.readInt32BE(A*4);for(;A<64;++A)e[A]=R3(e[A-2])+e[A-7]+A3(e[A-15])+e[A-16]|0;for(var q=0;q<64;++q){var k=S+B3(f)+M3(f,y,b)+_3[q]+e[q]|0,P=S3(r)+E3(r,i,n)|0;S=b,b=y,y=f,f=a+k|0,a=n,n=i,i=r,r=k+P|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0,this._f=y+this._f|0,this._g=b+this._g|0,this._h=S+this._h|0};Xn.prototype._hash=function(){var t=w3.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};uv.exports=Xn});var lv=B((gA,hv)=>{"use strict";w();var q3=X(),T3=ru(),I3=ti(),k3=Te().Buffer,C3=new Array(64);function Ta(){this.init(),this._w=C3,I3.call(this,64,56)}q3(Ta,T3);Ta.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};Ta.prototype._hash=function(){var t=k3.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};hv.exports=Ta});var iu=B((bA,mv)=>{"use strict";w();var O3=X(),gv=ti(),P3=Te().Buffer,cv=[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],D3=new Array(160);function Jn(){this.init(),this._w=D3,gv.call(this,128,112)}O3(Jn,gv);Jn.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 dv(t,e,r){return r^t&(e^r)}function pv(t,e,r){return t&e|r&(t|e)}function vv(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function yv(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function U3(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function N3(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function L3(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function F3(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Qe(t,e){return t>>>0<e>>>0?1:0}Jn.prototype._update=function(t){for(var e=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,a=this._dh|0,f=this._eh|0,y=this._fh|0,b=this._gh|0,S=this._hh|0,A=this._al|0,q=this._bl|0,k=this._cl|0,P=this._dl|0,H=this._el|0,Z=this._fl|0,ke=this._gl|0,V=this._hl|0,Y=0;Y<32;Y+=2)e[Y]=t.readInt32BE(Y*4),e[Y+1]=t.readInt32BE(Y*4+4);for(;Y<160;Y+=2){var He=e[Y-30],T=e[Y-30+1],C=U3(He,T),U=N3(T,He);He=e[Y-4],T=e[Y-4+1];var L=L3(He,T),F=F3(T,He),j=e[Y-14],M=e[Y-14+1],h=e[Y-32],v=e[Y-32+1],l=U+M|0,o=C+j+Qe(l,U)|0;l=l+F|0,o=o+L+Qe(l,F)|0,l=l+v|0,o=o+h+Qe(l,v)|0,e[Y]=o,e[Y+1]=l}for(var u=0;u<160;u+=2){o=e[u],l=e[u+1];var d=pv(r,i,n),g=pv(A,q,k),p=vv(r,A),s=vv(A,r),m=yv(f,H),_=yv(H,f),c=cv[u],x=cv[u+1],O=dv(f,y,b),N=dv(H,Z,ke),D=V+_|0,W=S+m+Qe(D,V)|0;D=D+N|0,W=W+O+Qe(D,N)|0,D=D+x|0,W=W+c+Qe(D,x)|0,D=D+l|0,W=W+o+Qe(D,l)|0;var K=s+g|0,G=p+d+Qe(K,s)|0;S=b,V=ke,b=y,ke=Z,y=f,Z=H,H=P+D|0,f=a+W+Qe(H,P)|0,a=n,P=k,n=i,k=q,i=r,q=A,A=D+K|0,r=W+G+Qe(A,D)|0}this._al=this._al+A|0,this._bl=this._bl+q|0,this._cl=this._cl+k|0,this._dl=this._dl+P|0,this._el=this._el+H|0,this._fl=this._fl+Z|0,this._gl=this._gl+ke|0,this._hl=this._hl+V|0,this._ah=this._ah+r+Qe(this._al,A)|0,this._bh=this._bh+i+Qe(this._bl,q)|0,this._ch=this._ch+n+Qe(this._cl,k)|0,this._dh=this._dh+a+Qe(this._dl,P)|0,this._eh=this._eh+f+Qe(this._el,H)|0,this._fh=this._fh+y+Qe(this._fl,Z)|0,this._gh=this._gh+b+Qe(this._gl,ke)|0,this._hh=this._hh+S+Qe(this._hl,V)|0};Jn.prototype._hash=function(){var t=P3.allocUnsafe(64);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};mv.exports=Jn});var wv=B((_A,bv)=>{"use strict";w();var j3=X(),H3=iu(),K3=ti(),W3=Te().Buffer,G3=new Array(160);function Ia(){this.init(),this._w=G3,K3.call(this,128,112)}j3(Ia,H3);Ia.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};Ia.prototype._hash=function(){var t=W3.allocUnsafe(48);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};bv.exports=Ia});var ka=B((MA,Qt)=>{"use strict";w();Qt.exports=function(e){var r=e.toLowerCase(),i=Qt.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};Qt.exports.sha=nv();Qt.exports.sha1=fv();Qt.exports.sha224=lv();Qt.exports.sha256=ru();Qt.exports.sha384=wv();Qt.exports.sha512=iu()});var er=B((SA,xv)=>{"use strict";w();var V3=Te().Buffer,_v=Us().Transform,$3=Ci().StringDecoder,z3=X(),Z3=Pn();function Bt(t){_v.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}z3(Bt,_v);Bt.prototype.update=function(t,e,r){var i=Z3(t,e),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};Bt.prototype.setAutoPadding=function(){};Bt.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Bt.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Bt.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Bt.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(n){i=n}finally{r(i)}};Bt.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Bt.prototype._finalOrDigest=function(t){var e=this.__final()||V3.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Bt.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new $3(e),this._encoding=e),this._encoding!==e)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i};xv.exports=Bt});var Qn=B((AA,Ev)=>{"use strict";w();var Y3=X(),X3=va(),J3=Ra(),Q3=ka(),Mv=er();function Ca(t){Mv.call(this,"digest"),this._hash=t}Y3(Ca,Mv);Ca.prototype._update=function(t){this._hash.update(t)};Ca.prototype._final=function(){return this._hash.digest()};Ev.exports=function(e){return e=e.toLowerCase(),e==="md5"?new X3:e==="rmd160"||e==="ripemd160"?new J3:new Ca(Q3(e))}});var Av=B((qA,Bv)=>{"use strict";w();var e8=X(),ri=Te().Buffer,Sv=er(),t8=ri.alloc(128),ji=64;function Oa(t,e){Sv.call(this,"digest"),typeof e=="string"&&(e=ri.from(e)),this._alg=t,this._key=e,e.length>ji?e=t(e):e.length<ji&&(e=ri.concat([e,t8],ji));for(var r=this._ipad=ri.allocUnsafe(ji),i=this._opad=ri.allocUnsafe(ji),n=0;n<ji;n++)r[n]=e[n]^54,i[n]=e[n]^92;this._hash=[r]}e8(Oa,Sv);Oa.prototype._update=function(t){this._hash.push(t)};Oa.prototype._final=function(){var t=this._alg(ri.concat(this._hash));return this._alg(ri.concat([this._opad,t]))};Bv.exports=Oa});var nu=B((IA,Rv)=>{w();var r8=va();Rv.exports=function(t){return new r8().update(t).digest()}});var Iv=B((CA,Tv)=>{"use strict";w();var i8=X(),n8=Av(),qv=er(),eo=Te().Buffer,o8=nu(),ou=Ra(),au=ka(),a8=eo.alloc(128);function to(t,e){qv.call(this,"digest"),typeof e=="string"&&(e=eo.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var i=t==="rmd160"?new ou:au(t);e=i.update(e).digest()}else e.length<r&&(e=eo.concat([e,a8],r));for(var n=this._ipad=eo.allocUnsafe(r),a=this._opad=eo.allocUnsafe(r),f=0;f<r;f++)n[f]=e[f]^54,a[f]=e[f]^92;this._hash=t==="rmd160"?new ou:au(t),this._hash.update(n)}i8(to,qv);to.prototype._update=function(t){this._hash.update(t)};to.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new ou:au(this._alg);return e.update(this._opad).update(t).digest()};Tv.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new to("rmd160",r):e==="md5"?new n8(o8,r):new to(e,r)}});var Pa=B((PA,kv)=>{"use strict";w();kv.exports={}});var fu=B((UA,Cv)=>{"use strict";w();var f8=isFinite,s8=Math.pow(2,30)-1;Cv.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0||!f8(t))throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>s8||e!==e)throw new TypeError("Bad key length")}});var su=B((LA,Pv)=>{"use strict";w();var Da;globalThis.process&&globalThis.process.browser?Da="utf-8":globalThis.process&&globalThis.process.version?(Ov=parseInt(E.default.version.split(".")[0].slice(1),10),Da=Ov>=6?"utf-8":"binary"):Da="utf-8";var Ov;Pv.exports=Da});var uu=B((jA,Nv)=>{"use strict";w();var u8=Te().Buffer,h8=Pn(),Uv=typeof Uint8Array<"u",l8=Uv&&typeof ArrayBuffer<"u",Dv=l8&&ArrayBuffer.isView;Nv.exports=function(t,e,r){if(typeof t=="string"||u8.isBuffer(t)||Uv&&t instanceof Uint8Array||Dv&&Dv(t))return h8(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var hu=B((KA,Hv)=>{"use strict";w();var c8=nu(),d8=Ra(),p8=ka(),ii=Te().Buffer,v8=fu(),Lv=su(),Fv=uu(),y8=ii.alloc(128),Ua={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},g8={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function m8(t){return new d8().update(t).digest()}function b8(t){function e(r){return p8(t).update(r).digest()}return t==="rmd160"||t==="ripemd160"?m8:t==="md5"?c8:e}function jv(t,e,r){var i=b8(t),n=t==="sha512"||t==="sha384"?128:64;e.length>n?e=i(e):e.length<n&&(e=ii.concat([e,y8],n));for(var a=ii.allocUnsafe(n+Ua[t]),f=ii.allocUnsafe(n+Ua[t]),y=0;y<n;y++)a[y]=e[y]^54,f[y]=e[y]^92;var b=ii.allocUnsafe(n+r+4);a.copy(b,0,0,n),this.ipad1=b,this.ipad2=a,this.opad=f,this.alg=t,this.blocksize=n,this.hash=i,this.size=Ua[t]}jv.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function w8(t,e,r,i,n){v8(r,i),t=Fv(t,Lv,"Password"),e=Fv(e,Lv,"Salt");var a=(n||"sha1").toLowerCase(),f=g8[a]||a,y=Ua[f];if(typeof y!="number"||!y)throw new TypeError("Digest algorithm not supported: "+n);var b=new jv(f,t,e.length),S=ii.allocUnsafe(i),A=ii.allocUnsafe(e.length+4);e.copy(A,0,0,e.length);for(var q=0,k=y,P=Math.ceil(i/k),H=1;H<=P;H++){A.writeUInt32BE(H,e.length);for(var Z=b.run(A,b.ipad1),ke=Z,V=1;V<r;V++){ke=b.run(ke,b.ipad2);for(var Y=0;Y<k;Y++)Z[Y]^=ke[Y]}Z.copy(S,q),q+=k}return S}Hv.exports=w8});var Zv=B((GA,zv)=>{"use strict";w();var Vv=Te().Buffer,_8=fu(),Kv=su(),Wv=hu(),Gv=uu(),Na,ro=globalThis.crypto&&globalThis.crypto.subtle,x8={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},lu=[],ni;function cu(){return ni||(globalThis.process&&globalThis.process.nextTick?ni=globalThis.process.nextTick:globalThis.queueMicrotask?ni=globalThis.queueMicrotask:globalThis.setImmediate?ni=globalThis.setImmediate:ni=globalThis.setTimeout,ni)}function $v(t,e,r,i,n){return ro.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(a){return ro.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},a,i<<3)}).then(function(a){return Vv.from(a)})}function M8(t){if(globalThis.process&&!globalThis.process.browser||!ro||!ro.importKey||!ro.deriveBits)return Promise.resolve(!1);if(lu[t]!==void 0)return lu[t];Na=Na||Vv.alloc(8);var e=$v(Na,Na,10,128,t).then(function(){return!0},function(){return!1});return lu[t]=e,e}function E8(t,e){t.then(function(r){cu()(function(){e(null,r)})},function(r){cu()(function(){e(r)})})}zv.exports=function(t,e,r,i,n,a){if(typeof n=="function"&&(a=n,n=void 0),_8(r,i),t=Gv(t,Kv,"Password"),e=Gv(e,Kv,"Salt"),typeof a!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var f=x8[n.toLowerCase()];if(!f||typeof globalThis.Promise!="function"){cu()(function(){var y;try{y=Wv(t,e,r,i,n)}catch(b){a(b);return}a(null,y)});return}E8(M8(f).then(function(y){return y?$v(t,e,r,i,f):Wv(t,e,r,i,n)}),a)}});var pu=B(du=>{"use strict";w();du.pbkdf2=Zv();du.pbkdf2Sync=hu()});var vu=B(gt=>{"use strict";w();gt.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};gt.writeUInt32BE=function(e,r,i){e[0+i]=r>>>24,e[1+i]=r>>>16&255,e[2+i]=r>>>8&255,e[3+i]=r&255};gt.ip=function(e,r,i,n){for(var a=0,f=0,y=6;y>=0;y-=2){for(var b=0;b<=24;b+=8)a<<=1,a|=r>>>b+y&1;for(var b=0;b<=24;b+=8)a<<=1,a|=e>>>b+y&1}for(var y=6;y>=0;y-=2){for(var b=1;b<=25;b+=8)f<<=1,f|=r>>>b+y&1;for(var b=1;b<=25;b+=8)f<<=1,f|=e>>>b+y&1}i[n+0]=a>>>0,i[n+1]=f>>>0};gt.rip=function(e,r,i,n){for(var a=0,f=0,y=0;y<4;y++)for(var b=24;b>=0;b-=8)a<<=1,a|=r>>>b+y&1,a<<=1,a|=e>>>b+y&1;for(var y=4;y<8;y++)for(var b=24;b>=0;b-=8)f<<=1,f|=r>>>b+y&1,f<<=1,f|=e>>>b+y&1;i[n+0]=a>>>0,i[n+1]=f>>>0};gt.pc1=function(e,r,i,n){for(var a=0,f=0,y=7;y>=5;y--){for(var b=0;b<=24;b+=8)a<<=1,a|=r>>b+y&1;for(var b=0;b<=24;b+=8)a<<=1,a|=e>>b+y&1}for(var b=0;b<=24;b+=8)a<<=1,a|=r>>b+y&1;for(var y=1;y<=3;y++){for(var b=0;b<=24;b+=8)f<<=1,f|=r>>b+y&1;for(var b=0;b<=24;b+=8)f<<=1,f|=e>>b+y&1}for(var b=0;b<=24;b+=8)f<<=1,f|=e>>b+y&1;i[n+0]=a>>>0,i[n+1]=f>>>0};gt.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var La=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];gt.pc2=function(e,r,i,n){for(var a=0,f=0,y=La.length>>>1,b=0;b<y;b++)a<<=1,a|=e>>>La[b]&1;for(var b=y;b<La.length;b++)f<<=1,f|=r>>>La[b]&1;i[n+0]=a>>>0,i[n+1]=f>>>0};gt.expand=function(e,r,i){var n=0,a=0;n=(e&1)<<5|e>>>27;for(var f=23;f>=15;f-=4)n<<=6,n|=e>>>f&63;for(var f=11;f>=3;f-=4)a|=e>>>f&63,a<<=6;a|=(e&31)<<1|e>>>31,r[i+0]=n>>>0,r[i+1]=a>>>0};var Yv=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];gt.substitute=function(e,r){for(var i=0,n=0;n<4;n++){var a=e>>>18-n*6&63,f=Yv[n*64+a];i<<=4,i|=f}for(var n=0;n<4;n++){var a=r>>>18-n*6&63,f=Yv[256+n*64+a];i<<=4,i|=f}return i>>>0};var Xv=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];gt.permute=function(e){for(var r=0,i=0;i<Xv.length;i++)r<<=1,r|=e>>>Xv[i]&1;return r>>>0};gt.padSplit=function(e,r,i){for(var n=e.toString(2);n.length<r;)n="0"+n;for(var a=[],f=0;f<r;f+=i)a.push(n.slice(f,f+i));return a.join(" ")}});var Hi=B((XA,Qv)=>{w();Qv.exports=Jv;function Jv(t,e){if(!t)throw new Error(e||"Assertion failed")}Jv.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)}});var Fa=B((QA,ey)=>{"use strict";w();var S8=Hi();function mt(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}ey.exports=mt;mt.prototype._init=function(){};mt.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};mt.prototype._buffer=function(e,r){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=e[r+n];return this.bufferOff+=i,i};mt.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};mt.prototype._updateEncrypt=function(e){var r=0,i=0,n=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(a,i)));for(var f=e.length-(e.length-r)%this.blockSize;r<f;r+=this.blockSize)this._update(e,r,a,i),i+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return a};mt.prototype._updateDecrypt=function(e){for(var r=0,i=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(e,r),i+=this._flushBuffer(a,i);return r+=this._buffer(e,r),a};mt.prototype.final=function(e){var r;e&&(r=this.update(e));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};mt.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};mt.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};mt.prototype._unpad=function(e){return e};mt.prototype._finalDecrypt=function(){S8.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}});var yu=B((t7,iy)=>{"use strict";w();var ty=Hi(),B8=X(),Ye=vu(),ry=Fa();function A8(){this.tmp=new Array(2),this.keys=null}function Ht(t){ry.call(this,t);var e=new A8;this._desState=e,this.deriveKeys(e,t.key)}B8(Ht,ry);iy.exports=Ht;Ht.create=function(e){return new Ht(e)};var R8=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Ht.prototype.deriveKeys=function(e,r){e.keys=new Array(32),ty.equal(r.length,this.blockSize,"Invalid key length");var i=Ye.readUInt32BE(r,0),n=Ye.readUInt32BE(r,4);Ye.pc1(i,n,e.tmp,0),i=e.tmp[0],n=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var f=R8[a>>>1];i=Ye.r28shl(i,f),n=Ye.r28shl(n,f),Ye.pc2(i,n,e.keys,a)}};Ht.prototype._update=function(e,r,i,n){var a=this._desState,f=Ye.readUInt32BE(e,r),y=Ye.readUInt32BE(e,r+4);Ye.ip(f,y,a.tmp,0),f=a.tmp[0],y=a.tmp[1],this.type==="encrypt"?this._encrypt(a,f,y,a.tmp,0):this._decrypt(a,f,y,a.tmp,0),f=a.tmp[0],y=a.tmp[1],Ye.writeUInt32BE(i,f,n),Ye.writeUInt32BE(i,y,n+4)};Ht.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var i=e.length-r,n=r;n<e.length;n++)e[n]=i;return!0};Ht.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],i=e.length-r;i<e.length;i++)ty.equal(e[i],r);return e.slice(0,e.length-r)};Ht.prototype._encrypt=function(e,r,i,n,a){for(var f=r,y=i,b=0;b<e.keys.length;b+=2){var S=e.keys[b],A=e.keys[b+1];Ye.expand(y,e.tmp,0),S^=e.tmp[0],A^=e.tmp[1];var q=Ye.substitute(S,A),k=Ye.permute(q),P=y;y=(f^k)>>>0,f=P}Ye.rip(y,f,n,a)};Ht.prototype._decrypt=function(e,r,i,n,a){for(var f=i,y=r,b=e.keys.length-2;b>=0;b-=2){var S=e.keys[b],A=e.keys[b+1];Ye.expand(f,e.tmp,0),S^=e.tmp[0],A^=e.tmp[1];var q=Ye.substitute(S,A),k=Ye.permute(q),P=f;f=(y^k)>>>0,y=P}Ye.rip(f,y,n,a)}});var oy=B(ny=>{"use strict";w();var q8=Hi(),T8=X(),ja={};function I8(t){q8.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function k8(t){function e(a){t.call(this,a),this._cbcInit()}T8(e,t);for(var r=Object.keys(ja),i=0;i<r.length;i++){var n=r[i];e.prototype[n]=ja[n]}return e.create=function(f){return new e(f)},e}ny.instantiate=k8;ja._cbcInit=function(){var e=new I8(this.options.iv);this._cbcState=e};ja._update=function(e,r,i,n){var a=this._cbcState,f=this.constructor.super_.prototype,y=a.iv;if(this.type==="encrypt"){for(var b=0;b<this.blockSize;b++)y[b]^=e[r+b];f._update.call(this,y,0,i,n);for(var b=0;b<this.blockSize;b++)y[b]=i[n+b]}else{f._update.call(this,e,r,i,n);for(var b=0;b<this.blockSize;b++)i[n+b]^=y[b];for(var b=0;b<this.blockSize;b++)y[b]=e[r+b]}}});var sy=B((o7,fy)=>{"use strict";w();var C8=Hi(),O8=X(),ay=Fa(),vr=yu();function P8(t,e){C8.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),n=e.slice(16,24);t==="encrypt"?this.ciphers=[vr.create({type:"encrypt",key:r}),vr.create({type:"decrypt",key:i}),vr.create({type:"encrypt",key:n})]:this.ciphers=[vr.create({type:"decrypt",key:n}),vr.create({type:"encrypt",key:i}),vr.create({type:"decrypt",key:r})]}function oi(t){ay.call(this,t);var e=new P8(this.type,this.options.key);this._edeState=e}O8(oi,ay);fy.exports=oi;oi.create=function(e){return new oi(e)};oi.prototype._update=function(e,r,i,n){var a=this._edeState;a.ciphers[0]._update(e,r,i,n),a.ciphers[1]._update(i,n,i,n),a.ciphers[2]._update(i,n,i,n)};oi.prototype._pad=vr.prototype._pad;oi.prototype._unpad=vr.prototype._unpad});var uy=B(Ki=>{"use strict";w();Ki.utils=vu();Ki.Cipher=Fa();Ki.DES=yu();Ki.CBC=oy();Ki.EDE=sy()});var cy=B((u7,ly)=>{w();var hy=er(),tr=uy(),D8=X(),ai=Te().Buffer,io={"des-ede3-cbc":tr.CBC.instantiate(tr.EDE),"des-ede3":tr.EDE,"des-ede-cbc":tr.CBC.instantiate(tr.EDE),"des-ede":tr.EDE,"des-cbc":tr.CBC.instantiate(tr.DES),"des-ecb":tr.DES};io.des=io["des-cbc"];io.des3=io["des-ede3-cbc"];ly.exports=Ha;D8(Ha,hy);function Ha(t){hy.call(this);var e=t.mode.toLowerCase(),r=io[e],i;t.decrypt?i="decrypt":i="encrypt";var n=t.key;ai.isBuffer(n)||(n=ai.from(n)),(e==="des-ede"||e==="des-ede-cbc")&&(n=ai.concat([n,n.slice(0,8)]));var a=t.iv;ai.isBuffer(a)||(a=ai.from(a)),this._des=r.create({key:n,iv:a,type:i})}Ha.prototype._update=function(t){return ai.from(this._des.update(t))};Ha.prototype._final=function(){return ai.from(this._des.final())}});var dy=B(gu=>{w();gu.encrypt=function(t,e){return t._cipher.encryptBlock(e)};gu.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var Wi=B((d7,py)=>{w();py.exports=function(e,r){for(var i=Math.min(e.length,r.length),n=new R.Buffer(i),a=0;a<i;++a)n[a]=e[a]^r[a];return n}});var yy=B(mu=>{w();var vy=Wi();mu.encrypt=function(t,e){var r=vy(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};mu.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return vy(i,r)}});var by=B(my=>{w();var no=Te().Buffer,U8=Wi();function gy(t,e,r){var i=e.length,n=U8(e,t._cache);return t._cache=t._cache.slice(i),t._prev=no.concat([t._prev,r?e:n]),n}my.encrypt=function(t,e,r){for(var i=no.allocUnsafe(0),n;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=no.allocUnsafe(0)),t._cache.length<=e.length)n=t._cache.length,i=no.concat([i,gy(t,e.slice(0,n),r)]),e=e.slice(n);else{i=no.concat([i,gy(t,e,r)]);break}return i}});var _y=B(wy=>{w();var bu=Te().Buffer;function N8(t,e,r){var i=t._cipher.encryptBlock(t._prev),n=i[0]^e;return t._prev=bu.concat([t._prev.slice(1),bu.from([r?e:n])]),n}wy.encrypt=function(t,e,r){for(var i=e.length,n=bu.allocUnsafe(i),a=-1;++a<i;)n[a]=N8(t,e[a],r);return n}});var My=B(xy=>{w();var Ka=Te().Buffer;function L8(t,e,r){for(var i,n=-1,a=8,f=0,y,b;++n<a;)i=t._cipher.encryptBlock(t._prev),y=e&1<<7-n?128:0,b=i[0]^y,f+=(b&128)>>n%8,t._prev=F8(t._prev,r?y:b);return f}function F8(t,e){var r=t.length,i=-1,n=Ka.allocUnsafe(t.length);for(t=Ka.concat([t,Ka.from([e])]);++i<r;)n[i]=t[i]<<1|t[i+1]>>7;return n}xy.encrypt=function(t,e,r){for(var i=e.length,n=Ka.allocUnsafe(i),a=-1;++a<i;)n[a]=L8(t,e[a],r);return n}});var Sy=B(Ey=>{w();var j8=Wi();function H8(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}Ey.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=R.Buffer.concat([t._cache,H8(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),j8(e,r)}});var wu=B((S7,By)=>{w();function K8(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}By.exports=K8});var xu=B(Ry=>{w();var W8=Wi(),Ay=Te().Buffer,G8=wu();function V8(t){var e=t._cipher.encryptBlockRaw(t._prev);return G8(t._prev),e}var _u=16;Ry.encrypt=function(t,e){var r=Math.ceil(e.length/_u),i=t._cache.length;t._cache=Ay.concat([t._cache,Ay.allocUnsafe(r*_u)]);for(var n=0;n<r;n++){var a=V8(t),f=i+n*_u;t._cache.writeUInt32BE(a[0],f+0),t._cache.writeUInt32BE(a[1],f+4),t._cache.writeUInt32BE(a[2],f+8),t._cache.writeUInt32BE(a[3],f+12)}var y=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),W8(e,y)}});var Mu=B((q7,$8)=>{$8.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}});var Ga=B((T7,qy)=>{w();var z8={ECB:dy(),CBC:yy(),CFB:by(),CFB8:_y(),CFB1:My(),OFB:Sy(),CTR:xu(),GCM:xu()},Wa=Mu();for(Eu in Wa)Wa[Eu].module=z8[Wa[Eu].mode];var Eu;qy.exports=Wa});var oo=B((k7,Iy)=>{w();var Va=Te().Buffer;function Bu(t){Va.isBuffer(t)||(t=Va.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(i*4);return r}function Su(t){for(var e=0;e<t.length;t++)t[e]=0}function Ty(t,e,r,i,n){for(var a=r[0],f=r[1],y=r[2],b=r[3],S=t[0]^e[0],A=t[1]^e[1],q=t[2]^e[2],k=t[3]^e[3],P,H,Z,ke,V=4,Y=1;Y<n;Y++)P=a[S>>>24]^f[A>>>16&255]^y[q>>>8&255]^b[k&255]^e[V++],H=a[A>>>24]^f[q>>>16&255]^y[k>>>8&255]^b[S&255]^e[V++],Z=a[q>>>24]^f[k>>>16&255]^y[S>>>8&255]^b[A&255]^e[V++],ke=a[k>>>24]^f[S>>>16&255]^y[A>>>8&255]^b[q&255]^e[V++],S=P,A=H,q=Z,k=ke;return P=(i[S>>>24]<<24|i[A>>>16&255]<<16|i[q>>>8&255]<<8|i[k&255])^e[V++],H=(i[A>>>24]<<24|i[q>>>16&255]<<16|i[k>>>8&255]<<8|i[S&255])^e[V++],Z=(i[q>>>24]<<24|i[k>>>16&255]<<16|i[S>>>8&255]<<8|i[A&255])^e[V++],ke=(i[k>>>24]<<24|i[S>>>16&255]<<16|i[A>>>8&255]<<8|i[q&255])^e[V++],P=P>>>0,H=H>>>0,Z=Z>>>0,ke=ke>>>0,[P,H,Z,ke]}var Z8=[0,1,2,4,8,16,32,64,128,27,54],ze=(function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],f=0,y=0,b=0;b<256;++b){var S=y^y<<1^y<<2^y<<3^y<<4;S=S>>>8^S&255^99,r[f]=S,i[S]=f;var A=t[f],q=t[A],k=t[q],P=t[S]*257^S*16843008;n[0][f]=P<<24|P>>>8,n[1][f]=P<<16|P>>>16,n[2][f]=P<<8|P>>>24,n[3][f]=P,P=k*16843009^q*65537^A*257^f*16843008,a[0][S]=P<<24|P>>>8,a[1][S]=P<<16|P>>>16,a[2][S]=P<<8|P>>>24,a[3][S]=P,f===0?f=y=1:(f=A^t[t[t[k^A]]],y^=t[t[y]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}})();function bt(t){this._key=Bu(t),this._reset()}bt.blockSize=16;bt.keySize=256/8;bt.prototype.blockSize=bt.blockSize;bt.prototype.keySize=bt.keySize;bt.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=(r+1)*4,n=[],a=0;a<e;a++)n[a]=t[a];for(a=e;a<i;a++){var f=n[a-1];a%e===0?(f=f<<8|f>>>24,f=ze.SBOX[f>>>24]<<24|ze.SBOX[f>>>16&255]<<16|ze.SBOX[f>>>8&255]<<8|ze.SBOX[f&255],f^=Z8[a/e|0]<<24):e>6&&a%e===4&&(f=ze.SBOX[f>>>24]<<24|ze.SBOX[f>>>16&255]<<16|ze.SBOX[f>>>8&255]<<8|ze.SBOX[f&255]),n[a]=n[a-e]^f}for(var y=[],b=0;b<i;b++){var S=i-b,A=n[S-(b%4?0:4)];b<4||S<=4?y[b]=A:y[b]=ze.INV_SUB_MIX[0][ze.SBOX[A>>>24]]^ze.INV_SUB_MIX[1][ze.SBOX[A>>>16&255]]^ze.INV_SUB_MIX[2][ze.SBOX[A>>>8&255]]^ze.INV_SUB_MIX[3][ze.SBOX[A&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=y};bt.prototype.encryptBlockRaw=function(t){return t=Bu(t),Ty(t,this._keySchedule,ze.SUB_MIX,ze.SBOX,this._nRounds)};bt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Va.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};bt.prototype.decryptBlock=function(t){t=Bu(t);var e=t[1];t[1]=t[3],t[3]=e;var r=Ty(t,this._invKeySchedule,ze.INV_SUB_MIX,ze.INV_SBOX,this._nRounds),i=Va.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};bt.prototype.scrub=function(){Su(this._keySchedule),Su(this._invKeySchedule),Su(this._key)};Iy.exports.AES=bt});var Oy=B((O7,Cy)=>{w();var Gi=Te().Buffer,Y8=Gi.alloc(16,0);function X8(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function ky(t){var e=Gi.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function ao(t){this.h=t,this.state=Gi.alloc(16,0),this.cache=Gi.allocUnsafe(0)}ao.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};ao.prototype._multiply=function(){for(var t=X8(this.h),e=[0,0,0,0],r,i,n,a=-1;++a<128;){for(i=(this.state[~~(a/8)]&1<<7-a%8)!==0,i&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),n=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,n&&(t[0]=t[0]^225<<24)}this.state=ky(e)};ao.prototype.update=function(t){this.cache=Gi.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};ao.prototype.final=function(t,e){return this.cache.length&&this.ghash(Gi.concat([this.cache,Y8],16)),this.ghash(ky([0,t,0,e])),this.state};Cy.exports=ao});var Au=B((D7,Uy)=>{w();var J8=oo(),ht=Te().Buffer,Py=er(),Q8=X(),Dy=Oy(),eM=Wi(),tM=wu();function rM(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}function iM(t,e,r){if(e.length===12)return t._finID=ht.concat([e,ht.from([0,0,0,1])]),ht.concat([e,ht.from([0,0,0,2])]);var i=new Dy(r),n=e.length,a=n%16;i.update(e),a&&(a=16-a,i.update(ht.alloc(a,0))),i.update(ht.alloc(8,0));var f=n*8,y=ht.alloc(8);y.writeUIntBE(f,0,8),i.update(y),t._finID=i.state;var b=ht.from(t._finID);return tM(b),b}function fi(t,e,r,i){Py.call(this);var n=ht.alloc(4,0);this._cipher=new J8.AES(e);var a=this._cipher.encryptBlock(n);this._ghash=new Dy(a),r=iM(this,r,a),this._prev=ht.from(r),this._cache=ht.allocUnsafe(0),this._secCache=ht.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Q8(fi,Py);fi.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=ht.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r};fi.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=eM(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&rM(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};fi.prototype.getAuthTag=function(){if(this._decrypt||!ht.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};fi.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};fi.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};Uy.exports=fi});var qu=B((N7,Ly)=>{w();var nM=oo(),Ru=Te().Buffer,Ny=er(),oM=X();function $a(t,e,r,i){Ny.call(this),this._cipher=new nM.AES(e),this._prev=Ru.from(r),this._cache=Ru.allocUnsafe(0),this._secCache=Ru.allocUnsafe(0),this._decrypt=i,this._mode=t}oM($a,Ny);$a.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};$a.prototype._final=function(){this._cipher.scrub()};Ly.exports=$a});var fo=B((F7,Fy)=>{w();var si=Te().Buffer,aM=va();function fM(t,e,r,i){if(si.isBuffer(t)||(t=si.from(t,"binary")),e&&(si.isBuffer(e)||(e=si.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,a=si.alloc(n),f=si.alloc(i||0),y=si.alloc(0);n>0||i>0;){var b=new aM;b.update(y),b.update(t),e&&b.update(e),y=b.digest();var S=0;if(n>0){var A=a.length-n;S=Math.min(n,y.length),y.copy(a,A,0,S),n-=S}if(S<y.length&&i>0){var q=f.length-i,k=Math.min(i,y.length-S);y.copy(f,q,S,S+k),i-=k}}return y.fill(0),{key:a,iv:f}}Fy.exports=fM});var Wy=B(Tu=>{w();var jy=Ga(),sM=Au(),rr=Te().Buffer,uM=qu(),Hy=er(),hM=oo(),lM=fo(),cM=X();function so(t,e,r){Hy.call(this),this._cache=new za,this._cipher=new hM.AES(e),this._prev=rr.from(r),this._mode=t,this._autopadding=!0}cM(so,Hy);so.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return rr.concat(i)};var dM=rr.alloc(16,16);so.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(dM))throw this._cipher.scrub(),new Error("data not multiple of block length")};so.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function za(){this.cache=rr.allocUnsafe(0)}za.prototype.add=function(t){this.cache=rr.concat([this.cache,t])};za.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};za.prototype.flush=function(){for(var t=16-this.cache.length,e=rr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return rr.concat([this.cache,e])};function Ky(t,e,r){var i=jy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=rr.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=rr.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new uM(i.module,e,r):i.type==="auth"?new sM(i.module,e,r):new so(i.module,e,r)}function pM(t,e){var r=jy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=lM(e,!1,r.key,r.iv);return Ky(t,i.key,i.iv)}Tu.createCipheriv=Ky;Tu.createCipher=pM});var zy=B(Iu=>{w();var vM=Au(),Vi=Te().Buffer,Gy=Ga(),yM=qu(),Vy=er(),gM=oo(),mM=fo(),bM=X();function uo(t,e,r){Vy.call(this),this._cache=new Za,this._last=void 0,this._cipher=new gM.AES(e),this._prev=Vi.from(r),this._mode=t,this._autopadding=!0}bM(uo,Vy);uo.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return Vi.concat(i)};uo.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return wM(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};uo.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Za(){this.cache=Vi.allocUnsafe(0)}Za.prototype.add=function(t){this.cache=Vi.concat([this.cache,t])};Za.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};Za.prototype.flush=function(){if(this.cache.length)return this.cache};function wM(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(e!==16)return t.slice(0,16-e)}function $y(t,e,r){var i=Gy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Vi.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=Vi.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new yM(i.module,e,r,!0):i.type==="auth"?new vM(i.module,e,r,!0):new uo(i.module,e,r)}function _M(t,e){var r=Gy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=mM(e,!1,r.key,r.iv);return $y(t,i.key,i.iv)}Iu.createDecipher=_M;Iu.createDecipheriv=$y});var Ya=B(At=>{w();var Zy=Wy(),Yy=zy(),xM=Mu();function MM(){return Object.keys(xM)}At.createCipher=At.Cipher=Zy.createCipher;At.createCipheriv=At.Cipheriv=Zy.createCipheriv;At.createDecipher=At.Decipher=Yy.createDecipher;At.createDecipheriv=At.Decipheriv=Yy.createDecipheriv;At.listCiphers=At.getCiphers=MM});var Xy=B(ir=>{w();ir["des-ecb"]={key:8,iv:0};ir["des-cbc"]=ir.des={key:8,iv:8};ir["des-ede3-cbc"]=ir.des3={key:24,iv:8};ir["des-ede3"]={key:24,iv:0};ir["des-ede-cbc"]={key:16,iv:8};ir["des-ede"]={key:16,iv:0}});var r1=B(Rt=>{w();var Jy=cy(),ku=Ya(),yr=Ga(),nr=Xy(),Qy=fo();function EM(t,e){t=t.toLowerCase();var r,i;if(yr[t])r=yr[t].key,i=yr[t].iv;else if(nr[t])r=nr[t].key*8,i=nr[t].iv;else throw new TypeError("invalid suite type");var n=Qy(e,!1,r,i);return e1(t,n.key,n.iv)}function SM(t,e){t=t.toLowerCase();var r,i;if(yr[t])r=yr[t].key,i=yr[t].iv;else if(nr[t])r=nr[t].key*8,i=nr[t].iv;else throw new TypeError("invalid suite type");var n=Qy(e,!1,r,i);return t1(t,n.key,n.iv)}function e1(t,e,r){if(t=t.toLowerCase(),yr[t])return ku.createCipheriv(t,e,r);if(nr[t])return new Jy({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function t1(t,e,r){if(t=t.toLowerCase(),yr[t])return ku.createDecipheriv(t,e,r);if(nr[t])return new Jy({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function BM(){return Object.keys(nr).concat(ku.getCiphers())}Rt.createCipher=Rt.Cipher=EM;Rt.createCipheriv=Rt.Cipheriv=e1;Rt.createDecipher=Rt.Decipher=SM;Rt.createDecipheriv=Rt.Decipheriv=t1;Rt.listCiphers=Rt.getCiphers=BM});var gr=B((i1,Cu)=>{w();(function(t,e){"use strict";function r(M,h){if(!M)throw new Error(h||"Assertion failed")}function i(M,h){M.super_=h;var v=function(){};v.prototype=h.prototype,M.prototype=new v,M.prototype.constructor=M}function n(M,h,v){if(n.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((h==="le"||h==="be")&&(v=h,h=10),this._init(M||0,h||10,v||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(h){return h instanceof n?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===n.wordSize&&Array.isArray(h.words)},n.max=function(h,v){return h.cmp(v)>0?h:v},n.min=function(h,v){return h.cmp(v)<0?h:v},n.prototype._init=function(h,v,l){if(typeof h=="number")return this._initNumber(h,v,l);if(typeof h=="object")return this._initArray(h,v,l);v==="hex"&&(v=16),r(v===(v|0)&&v>=2&&v<=36),h=h.toString().replace(/\s+/g,"");var o=0;h[0]==="-"&&(o++,this.negative=1),o<h.length&&(v===16?this._parseHex(h,o,l):(this._parseBase(h,v,o),l==="le"&&this._initArray(this.toArray(),v,l)))},n.prototype._initNumber=function(h,v,l){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(r(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),v,l)},n.prototype._initArray=function(h,v,l){if(r(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var u,d,g=0;if(l==="be")for(o=h.length-1,u=0;o>=0;o-=3)d=h[o]|h[o-1]<<8|h[o-2]<<16,this.words[u]|=d<<g&67108863,this.words[u+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,u++);else if(l==="le")for(o=0,u=0;o<h.length;o+=3)d=h[o]|h[o+1]<<8|h[o+2]<<16,this.words[u]|=d<<g&67108863,this.words[u+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,u++);return this.strip()};function f(M,h){var v=M.charCodeAt(h);return v>=65&&v<=70?v-55:v>=97&&v<=102?v-87:v-48&15}function y(M,h,v){var l=f(M,v);return v-1>=h&&(l|=f(M,v-1)<<4),l}n.prototype._parseHex=function(h,v,l){this.length=Math.ceil((h.length-v)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var u=0,d=0,g;if(l==="be")for(o=h.length-1;o>=v;o-=2)g=y(h,v,o)<<u,this.words[d]|=g&67108863,u>=18?(u-=18,d+=1,this.words[d]|=g>>>26):u+=8;else{var p=h.length-v;for(o=p%2===0?v+1:v;o<h.length;o+=2)g=y(h,v,o)<<u,this.words[d]|=g&67108863,u>=18?(u-=18,d+=1,this.words[d]|=g>>>26):u+=8}this.strip()};function b(M,h,v,l){for(var o=0,u=Math.min(M.length,v),d=h;d<u;d++){var g=M.charCodeAt(d)-48;o*=l,g>=49?o+=g-49+10:g>=17?o+=g-17+10:o+=g}return o}n.prototype._parseBase=function(h,v,l){this.words=[0],this.length=1;for(var o=0,u=1;u<=67108863;u*=v)o++;o--,u=u/v|0;for(var d=h.length-l,g=d%o,p=Math.min(d,d-g)+l,s=0,m=l;m<p;m+=o)s=b(h,m,m+o,v),this.imuln(u),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(g!==0){var _=1;for(s=b(h,m,h.length,v),m=0;m<g;m++)_*=v;this.imuln(_),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}this.strip()},n.prototype.copy=function(h){h.words=new Array(this.length);for(var v=0;v<this.length;v++)h.words[v]=this.words[v];h.length=this.length,h.negative=this.negative,h.red=this.red},n.prototype.clone=function(){var h=new n(null);return this.copy(h),h},n.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var S=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(h,v){h=h||10,v=v|0||1;var l;if(h===16||h==="hex"){l="";for(var o=0,u=0,d=0;d<this.length;d++){var g=this.words[d],p=((g<<o|u)&16777215).toString(16);u=g>>>24-o&16777215,o+=2,o>=26&&(o-=26,d--),u!==0||d!==this.length-1?l=S[6-p.length]+p+l:l=p+l}for(u!==0&&(l=u.toString(16)+l);l.length%v!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(h===(h|0)&&h>=2&&h<=36){var s=A[h],m=q[h];l="";var _=this.clone();for(_.negative=0;!_.isZero();){var c=_.modn(m).toString(h);_=_.idivn(m),_.isZero()?l=c+l:l=S[s-c.length]+c+l}for(this.isZero()&&(l="0"+l);l.length%v!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(h,v){return r(typeof a<"u"),this.toArrayLike(a,h,v)},n.prototype.toArray=function(h,v){return this.toArrayLike(Array,h,v)},n.prototype.toArrayLike=function(h,v,l){var o=this.byteLength(),u=l||Math.max(1,o);r(o<=u,"byte array longer than desired length"),r(u>0,"Requested array length <= 0"),this.strip();var d=v==="le",g=new h(u),p,s,m=this.clone();if(d){for(s=0;!m.isZero();s++)p=m.andln(255),m.iushrn(8),g[s]=p;for(;s<u;s++)g[s]=0}else{for(s=0;s<u-o;s++)g[s]=0;for(s=0;!m.isZero();s++)p=m.andln(255),m.iushrn(8),g[u-s-1]=p}return g},Math.clz32?n.prototype._countBits=function(h){return 32-Math.clz32(h)}:n.prototype._countBits=function(h){var v=h,l=0;return v>=4096&&(l+=13,v>>>=13),v>=64&&(l+=7,v>>>=7),v>=8&&(l+=4,v>>>=4),v>=2&&(l+=2,v>>>=2),l+v},n.prototype._zeroBits=function(h){if(h===0)return 26;var v=h,l=0;return(v&8191)===0&&(l+=13,v>>>=13),(v&127)===0&&(l+=7,v>>>=7),(v&15)===0&&(l+=4,v>>>=4),(v&3)===0&&(l+=2,v>>>=2),(v&1)===0&&l++,l},n.prototype.bitLength=function(){var h=this.words[this.length-1],v=this._countBits(h);return(this.length-1)*26+v};function k(M){for(var h=new Array(M.bitLength()),v=0;v<h.length;v++){var l=v/26|0,o=v%26;h[v]=(M.words[l]&1<<o)>>>o}return h}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,v=0;v<this.length;v++){var l=this._zeroBits(this.words[v]);if(h+=l,l!==26)break}return h},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},n.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var v=0;v<h.length;v++)this.words[v]=this.words[v]|h.words[v];return this.strip()},n.prototype.ior=function(h){return r((this.negative|h.negative)===0),this.iuor(h)},n.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},n.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},n.prototype.iuand=function(h){var v;this.length>h.length?v=h:v=this;for(var l=0;l<v.length;l++)this.words[l]=this.words[l]&h.words[l];return this.length=v.length,this.strip()},n.prototype.iand=function(h){return r((this.negative|h.negative)===0),this.iuand(h)},n.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},n.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},n.prototype.iuxor=function(h){var v,l;this.length>h.length?(v=this,l=h):(v=h,l=this);for(var o=0;o<l.length;o++)this.words[o]=v.words[o]^l.words[o];if(this!==v)for(;o<v.length;o++)this.words[o]=v.words[o];return this.length=v.length,this.strip()},n.prototype.ixor=function(h){return r((this.negative|h.negative)===0),this.iuxor(h)},n.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},n.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},n.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var v=Math.ceil(h/26)|0,l=h%26;this._expand(v),l>0&&v--;for(var o=0;o<v;o++)this.words[o]=~this.words[o]&67108863;for(l>0&&(this.words[o]=~this.words[o]&67108863>>26-l,o++);o<this.length;o++)this.words[o]=0;return this.strip()},n.prototype.notn=function(h){return this.clone().inotn(h)},n.prototype.setn=function(h,v){r(typeof h=="number"&&h>=0);var l=h/26|0,o=h%26;return this._expand(l+1),v?this.words[l]=this.words[l]|1<<o:this.words[l]=this.words[l]&~(1<<o),this.strip()},n.prototype.iadd=function(h){var v;if(this.negative!==0&&h.negative===0)return this.negative=0,v=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,v=this.isub(h),h.negative=1,v._normSign();var l,o;this.length>h.length?(l=this,o=h):(l=h,o=this);for(var u=0,d=0;d<o.length;d++)v=(l.words[d]|0)+(o.words[d]|0)+u,this.words[d]=v&67108863,u=v>>>26;for(;u!==0&&d<l.length;d++)v=(l.words[d]|0)+u,this.words[d]=v&67108863,u=v>>>26;if(this.length=l.length,u!==0)this.words[this.length]=u,this.length++;else if(l!==this)for(;d<l.length;d++)this.words[d]=l.words[d];return this},n.prototype.add=function(h){var v;return h.negative!==0&&this.negative===0?(h.negative=0,v=this.sub(h),h.negative^=1,v):h.negative===0&&this.negative!==0?(this.negative=0,v=h.sub(this),this.negative=1,v):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},n.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var v=this.iadd(h);return h.negative=1,v._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var l=this.cmp(h);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var o,u;l>0?(o=this,u=h):(o=h,u=this);for(var d=0,g=0;g<u.length;g++)v=(o.words[g]|0)-(u.words[g]|0)+d,d=v>>26,this.words[g]=v&67108863;for(;d!==0&&g<o.length;g++)v=(o.words[g]|0)+d,d=v>>26,this.words[g]=v&67108863;if(d===0&&g<o.length&&o!==this)for(;g<o.length;g++)this.words[g]=o.words[g];return this.length=Math.max(this.length,g),o!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(h){return this.clone().isub(h)};function P(M,h,v){v.negative=h.negative^M.negative;var l=M.length+h.length|0;v.length=l,l=l-1|0;var o=M.words[0]|0,u=h.words[0]|0,d=o*u,g=d&67108863,p=d/67108864|0;v.words[0]=g;for(var s=1;s<l;s++){for(var m=p>>>26,_=p&67108863,c=Math.min(s,h.length-1),x=Math.max(0,s-M.length+1);x<=c;x++){var O=s-x|0;o=M.words[O]|0,u=h.words[x]|0,d=o*u+_,m+=d/67108864|0,_=d&67108863}v.words[s]=_|0,p=m|0}return p!==0?v.words[s]=p|0:v.length--,v.strip()}var H=function(h,v,l){var o=h.words,u=v.words,d=l.words,g=0,p,s,m,_=o[0]|0,c=_&8191,x=_>>>13,O=o[1]|0,N=O&8191,D=O>>>13,W=o[2]|0,K=W&8191,G=W>>>13,Mt=o[3]|0,$=Mt&8191,z=Mt>>>13,en=o[4]|0,J=en&8191,Q=en>>>13,tn=o[5]|0,ee=tn&8191,te=tn>>>13,rn=o[6]|0,re=rn&8191,ie=rn>>>13,nn=o[7]|0,ne=nn&8191,oe=nn>>>13,on=o[8]|0,ae=on&8191,fe=on>>>13,an=o[9]|0,se=an&8191,ue=an>>>13,fn=u[0]|0,he=fn&8191,le=fn>>>13,sn=u[1]|0,ce=sn&8191,de=sn>>>13,un=u[2]|0,pe=un&8191,ve=un>>>13,hn=u[3]|0,ye=hn&8191,ge=hn>>>13,ln=u[4]|0,me=ln&8191,be=ln>>>13,cn=u[5]|0,we=cn&8191,_e=cn>>>13,dn=u[6]|0,xe=dn&8191,Me=dn>>>13,pn=u[7]|0,Ee=pn&8191,Se=pn>>>13,vn=u[8]|0,Be=vn&8191,Ae=vn>>>13,yn=u[9]|0,Re=yn&8191,qe=yn>>>13;l.negative=h.negative^v.negative,l.length=19,p=Math.imul(c,he),s=Math.imul(c,le),s=s+Math.imul(x,he)|0,m=Math.imul(x,le);var di=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(di>>>26)|0,di&=67108863,p=Math.imul(N,he),s=Math.imul(N,le),s=s+Math.imul(D,he)|0,m=Math.imul(D,le),p=p+Math.imul(c,ce)|0,s=s+Math.imul(c,de)|0,s=s+Math.imul(x,ce)|0,m=m+Math.imul(x,de)|0;var Ke=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,p=Math.imul(K,he),s=Math.imul(K,le),s=s+Math.imul(G,he)|0,m=Math.imul(G,le),p=p+Math.imul(N,ce)|0,s=s+Math.imul(N,de)|0,s=s+Math.imul(D,ce)|0,m=m+Math.imul(D,de)|0,p=p+Math.imul(c,pe)|0,s=s+Math.imul(c,ve)|0,s=s+Math.imul(x,pe)|0,m=m+Math.imul(x,ve)|0;var We=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(We>>>26)|0,We&=67108863,p=Math.imul($,he),s=Math.imul($,le),s=s+Math.imul(z,he)|0,m=Math.imul(z,le),p=p+Math.imul(K,ce)|0,s=s+Math.imul(K,de)|0,s=s+Math.imul(G,ce)|0,m=m+Math.imul(G,de)|0,p=p+Math.imul(N,pe)|0,s=s+Math.imul(N,ve)|0,s=s+Math.imul(D,pe)|0,m=m+Math.imul(D,ve)|0,p=p+Math.imul(c,ye)|0,s=s+Math.imul(c,ge)|0,s=s+Math.imul(x,ye)|0,m=m+Math.imul(x,ge)|0;var wr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(wr>>>26)|0,wr&=67108863,p=Math.imul(J,he),s=Math.imul(J,le),s=s+Math.imul(Q,he)|0,m=Math.imul(Q,le),p=p+Math.imul($,ce)|0,s=s+Math.imul($,de)|0,s=s+Math.imul(z,ce)|0,m=m+Math.imul(z,de)|0,p=p+Math.imul(K,pe)|0,s=s+Math.imul(K,ve)|0,s=s+Math.imul(G,pe)|0,m=m+Math.imul(G,ve)|0,p=p+Math.imul(N,ye)|0,s=s+Math.imul(N,ge)|0,s=s+Math.imul(D,ye)|0,m=m+Math.imul(D,ge)|0,p=p+Math.imul(c,me)|0,s=s+Math.imul(c,be)|0,s=s+Math.imul(x,me)|0,m=m+Math.imul(x,be)|0;var _r=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(_r>>>26)|0,_r&=67108863,p=Math.imul(ee,he),s=Math.imul(ee,le),s=s+Math.imul(te,he)|0,m=Math.imul(te,le),p=p+Math.imul(J,ce)|0,s=s+Math.imul(J,de)|0,s=s+Math.imul(Q,ce)|0,m=m+Math.imul(Q,de)|0,p=p+Math.imul($,pe)|0,s=s+Math.imul($,ve)|0,s=s+Math.imul(z,pe)|0,m=m+Math.imul(z,ve)|0,p=p+Math.imul(K,ye)|0,s=s+Math.imul(K,ge)|0,s=s+Math.imul(G,ye)|0,m=m+Math.imul(G,ge)|0,p=p+Math.imul(N,me)|0,s=s+Math.imul(N,be)|0,s=s+Math.imul(D,me)|0,m=m+Math.imul(D,be)|0,p=p+Math.imul(c,we)|0,s=s+Math.imul(c,_e)|0,s=s+Math.imul(x,we)|0,m=m+Math.imul(x,_e)|0;var xr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(xr>>>26)|0,xr&=67108863,p=Math.imul(re,he),s=Math.imul(re,le),s=s+Math.imul(ie,he)|0,m=Math.imul(ie,le),p=p+Math.imul(ee,ce)|0,s=s+Math.imul(ee,de)|0,s=s+Math.imul(te,ce)|0,m=m+Math.imul(te,de)|0,p=p+Math.imul(J,pe)|0,s=s+Math.imul(J,ve)|0,s=s+Math.imul(Q,pe)|0,m=m+Math.imul(Q,ve)|0,p=p+Math.imul($,ye)|0,s=s+Math.imul($,ge)|0,s=s+Math.imul(z,ye)|0,m=m+Math.imul(z,ge)|0,p=p+Math.imul(K,me)|0,s=s+Math.imul(K,be)|0,s=s+Math.imul(G,me)|0,m=m+Math.imul(G,be)|0,p=p+Math.imul(N,we)|0,s=s+Math.imul(N,_e)|0,s=s+Math.imul(D,we)|0,m=m+Math.imul(D,_e)|0,p=p+Math.imul(c,xe)|0,s=s+Math.imul(c,Me)|0,s=s+Math.imul(x,xe)|0,m=m+Math.imul(x,Me)|0;var Mr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,p=Math.imul(ne,he),s=Math.imul(ne,le),s=s+Math.imul(oe,he)|0,m=Math.imul(oe,le),p=p+Math.imul(re,ce)|0,s=s+Math.imul(re,de)|0,s=s+Math.imul(ie,ce)|0,m=m+Math.imul(ie,de)|0,p=p+Math.imul(ee,pe)|0,s=s+Math.imul(ee,ve)|0,s=s+Math.imul(te,pe)|0,m=m+Math.imul(te,ve)|0,p=p+Math.imul(J,ye)|0,s=s+Math.imul(J,ge)|0,s=s+Math.imul(Q,ye)|0,m=m+Math.imul(Q,ge)|0,p=p+Math.imul($,me)|0,s=s+Math.imul($,be)|0,s=s+Math.imul(z,me)|0,m=m+Math.imul(z,be)|0,p=p+Math.imul(K,we)|0,s=s+Math.imul(K,_e)|0,s=s+Math.imul(G,we)|0,m=m+Math.imul(G,_e)|0,p=p+Math.imul(N,xe)|0,s=s+Math.imul(N,Me)|0,s=s+Math.imul(D,xe)|0,m=m+Math.imul(D,Me)|0,p=p+Math.imul(c,Ee)|0,s=s+Math.imul(c,Se)|0,s=s+Math.imul(x,Ee)|0,m=m+Math.imul(x,Se)|0;var Er=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Er>>>26)|0,Er&=67108863,p=Math.imul(ae,he),s=Math.imul(ae,le),s=s+Math.imul(fe,he)|0,m=Math.imul(fe,le),p=p+Math.imul(ne,ce)|0,s=s+Math.imul(ne,de)|0,s=s+Math.imul(oe,ce)|0,m=m+Math.imul(oe,de)|0,p=p+Math.imul(re,pe)|0,s=s+Math.imul(re,ve)|0,s=s+Math.imul(ie,pe)|0,m=m+Math.imul(ie,ve)|0,p=p+Math.imul(ee,ye)|0,s=s+Math.imul(ee,ge)|0,s=s+Math.imul(te,ye)|0,m=m+Math.imul(te,ge)|0,p=p+Math.imul(J,me)|0,s=s+Math.imul(J,be)|0,s=s+Math.imul(Q,me)|0,m=m+Math.imul(Q,be)|0,p=p+Math.imul($,we)|0,s=s+Math.imul($,_e)|0,s=s+Math.imul(z,we)|0,m=m+Math.imul(z,_e)|0,p=p+Math.imul(K,xe)|0,s=s+Math.imul(K,Me)|0,s=s+Math.imul(G,xe)|0,m=m+Math.imul(G,Me)|0,p=p+Math.imul(N,Ee)|0,s=s+Math.imul(N,Se)|0,s=s+Math.imul(D,Ee)|0,m=m+Math.imul(D,Se)|0,p=p+Math.imul(c,Be)|0,s=s+Math.imul(c,Ae)|0,s=s+Math.imul(x,Be)|0,m=m+Math.imul(x,Ae)|0;var Sr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,p=Math.imul(se,he),s=Math.imul(se,le),s=s+Math.imul(ue,he)|0,m=Math.imul(ue,le),p=p+Math.imul(ae,ce)|0,s=s+Math.imul(ae,de)|0,s=s+Math.imul(fe,ce)|0,m=m+Math.imul(fe,de)|0,p=p+Math.imul(ne,pe)|0,s=s+Math.imul(ne,ve)|0,s=s+Math.imul(oe,pe)|0,m=m+Math.imul(oe,ve)|0,p=p+Math.imul(re,ye)|0,s=s+Math.imul(re,ge)|0,s=s+Math.imul(ie,ye)|0,m=m+Math.imul(ie,ge)|0,p=p+Math.imul(ee,me)|0,s=s+Math.imul(ee,be)|0,s=s+Math.imul(te,me)|0,m=m+Math.imul(te,be)|0,p=p+Math.imul(J,we)|0,s=s+Math.imul(J,_e)|0,s=s+Math.imul(Q,we)|0,m=m+Math.imul(Q,_e)|0,p=p+Math.imul($,xe)|0,s=s+Math.imul($,Me)|0,s=s+Math.imul(z,xe)|0,m=m+Math.imul(z,Me)|0,p=p+Math.imul(K,Ee)|0,s=s+Math.imul(K,Se)|0,s=s+Math.imul(G,Ee)|0,m=m+Math.imul(G,Se)|0,p=p+Math.imul(N,Be)|0,s=s+Math.imul(N,Ae)|0,s=s+Math.imul(D,Be)|0,m=m+Math.imul(D,Ae)|0,p=p+Math.imul(c,Re)|0,s=s+Math.imul(c,qe)|0,s=s+Math.imul(x,Re)|0,m=m+Math.imul(x,qe)|0;var Br=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Br>>>26)|0,Br&=67108863,p=Math.imul(se,ce),s=Math.imul(se,de),s=s+Math.imul(ue,ce)|0,m=Math.imul(ue,de),p=p+Math.imul(ae,pe)|0,s=s+Math.imul(ae,ve)|0,s=s+Math.imul(fe,pe)|0,m=m+Math.imul(fe,ve)|0,p=p+Math.imul(ne,ye)|0,s=s+Math.imul(ne,ge)|0,s=s+Math.imul(oe,ye)|0,m=m+Math.imul(oe,ge)|0,p=p+Math.imul(re,me)|0,s=s+Math.imul(re,be)|0,s=s+Math.imul(ie,me)|0,m=m+Math.imul(ie,be)|0,p=p+Math.imul(ee,we)|0,s=s+Math.imul(ee,_e)|0,s=s+Math.imul(te,we)|0,m=m+Math.imul(te,_e)|0,p=p+Math.imul(J,xe)|0,s=s+Math.imul(J,Me)|0,s=s+Math.imul(Q,xe)|0,m=m+Math.imul(Q,Me)|0,p=p+Math.imul($,Ee)|0,s=s+Math.imul($,Se)|0,s=s+Math.imul(z,Ee)|0,m=m+Math.imul(z,Se)|0,p=p+Math.imul(K,Be)|0,s=s+Math.imul(K,Ae)|0,s=s+Math.imul(G,Be)|0,m=m+Math.imul(G,Ae)|0,p=p+Math.imul(N,Re)|0,s=s+Math.imul(N,qe)|0,s=s+Math.imul(D,Re)|0,m=m+Math.imul(D,qe)|0;var Ar=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,p=Math.imul(se,pe),s=Math.imul(se,ve),s=s+Math.imul(ue,pe)|0,m=Math.imul(ue,ve),p=p+Math.imul(ae,ye)|0,s=s+Math.imul(ae,ge)|0,s=s+Math.imul(fe,ye)|0,m=m+Math.imul(fe,ge)|0,p=p+Math.imul(ne,me)|0,s=s+Math.imul(ne,be)|0,s=s+Math.imul(oe,me)|0,m=m+Math.imul(oe,be)|0,p=p+Math.imul(re,we)|0,s=s+Math.imul(re,_e)|0,s=s+Math.imul(ie,we)|0,m=m+Math.imul(ie,_e)|0,p=p+Math.imul(ee,xe)|0,s=s+Math.imul(ee,Me)|0,s=s+Math.imul(te,xe)|0,m=m+Math.imul(te,Me)|0,p=p+Math.imul(J,Ee)|0,s=s+Math.imul(J,Se)|0,s=s+Math.imul(Q,Ee)|0,m=m+Math.imul(Q,Se)|0,p=p+Math.imul($,Be)|0,s=s+Math.imul($,Ae)|0,s=s+Math.imul(z,Be)|0,m=m+Math.imul(z,Ae)|0,p=p+Math.imul(K,Re)|0,s=s+Math.imul(K,qe)|0,s=s+Math.imul(G,Re)|0,m=m+Math.imul(G,qe)|0;var Rr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,p=Math.imul(se,ye),s=Math.imul(se,ge),s=s+Math.imul(ue,ye)|0,m=Math.imul(ue,ge),p=p+Math.imul(ae,me)|0,s=s+Math.imul(ae,be)|0,s=s+Math.imul(fe,me)|0,m=m+Math.imul(fe,be)|0,p=p+Math.imul(ne,we)|0,s=s+Math.imul(ne,_e)|0,s=s+Math.imul(oe,we)|0,m=m+Math.imul(oe,_e)|0,p=p+Math.imul(re,xe)|0,s=s+Math.imul(re,Me)|0,s=s+Math.imul(ie,xe)|0,m=m+Math.imul(ie,Me)|0,p=p+Math.imul(ee,Ee)|0,s=s+Math.imul(ee,Se)|0,s=s+Math.imul(te,Ee)|0,m=m+Math.imul(te,Se)|0,p=p+Math.imul(J,Be)|0,s=s+Math.imul(J,Ae)|0,s=s+Math.imul(Q,Be)|0,m=m+Math.imul(Q,Ae)|0,p=p+Math.imul($,Re)|0,s=s+Math.imul($,qe)|0,s=s+Math.imul(z,Re)|0,m=m+Math.imul(z,qe)|0;var qr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(qr>>>26)|0,qr&=67108863,p=Math.imul(se,me),s=Math.imul(se,be),s=s+Math.imul(ue,me)|0,m=Math.imul(ue,be),p=p+Math.imul(ae,we)|0,s=s+Math.imul(ae,_e)|0,s=s+Math.imul(fe,we)|0,m=m+Math.imul(fe,_e)|0,p=p+Math.imul(ne,xe)|0,s=s+Math.imul(ne,Me)|0,s=s+Math.imul(oe,xe)|0,m=m+Math.imul(oe,Me)|0,p=p+Math.imul(re,Ee)|0,s=s+Math.imul(re,Se)|0,s=s+Math.imul(ie,Ee)|0,m=m+Math.imul(ie,Se)|0,p=p+Math.imul(ee,Be)|0,s=s+Math.imul(ee,Ae)|0,s=s+Math.imul(te,Be)|0,m=m+Math.imul(te,Ae)|0,p=p+Math.imul(J,Re)|0,s=s+Math.imul(J,qe)|0,s=s+Math.imul(Q,Re)|0,m=m+Math.imul(Q,qe)|0;var Tr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,p=Math.imul(se,we),s=Math.imul(se,_e),s=s+Math.imul(ue,we)|0,m=Math.imul(ue,_e),p=p+Math.imul(ae,xe)|0,s=s+Math.imul(ae,Me)|0,s=s+Math.imul(fe,xe)|0,m=m+Math.imul(fe,Me)|0,p=p+Math.imul(ne,Ee)|0,s=s+Math.imul(ne,Se)|0,s=s+Math.imul(oe,Ee)|0,m=m+Math.imul(oe,Se)|0,p=p+Math.imul(re,Be)|0,s=s+Math.imul(re,Ae)|0,s=s+Math.imul(ie,Be)|0,m=m+Math.imul(ie,Ae)|0,p=p+Math.imul(ee,Re)|0,s=s+Math.imul(ee,qe)|0,s=s+Math.imul(te,Re)|0,m=m+Math.imul(te,qe)|0;var Ir=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,p=Math.imul(se,xe),s=Math.imul(se,Me),s=s+Math.imul(ue,xe)|0,m=Math.imul(ue,Me),p=p+Math.imul(ae,Ee)|0,s=s+Math.imul(ae,Se)|0,s=s+Math.imul(fe,Ee)|0,m=m+Math.imul(fe,Se)|0,p=p+Math.imul(ne,Be)|0,s=s+Math.imul(ne,Ae)|0,s=s+Math.imul(oe,Be)|0,m=m+Math.imul(oe,Ae)|0,p=p+Math.imul(re,Re)|0,s=s+Math.imul(re,qe)|0,s=s+Math.imul(ie,Re)|0,m=m+Math.imul(ie,qe)|0;var kr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(kr>>>26)|0,kr&=67108863,p=Math.imul(se,Ee),s=Math.imul(se,Se),s=s+Math.imul(ue,Ee)|0,m=Math.imul(ue,Se),p=p+Math.imul(ae,Be)|0,s=s+Math.imul(ae,Ae)|0,s=s+Math.imul(fe,Be)|0,m=m+Math.imul(fe,Ae)|0,p=p+Math.imul(ne,Re)|0,s=s+Math.imul(ne,qe)|0,s=s+Math.imul(oe,Re)|0,m=m+Math.imul(oe,qe)|0;var Cr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,p=Math.imul(se,Be),s=Math.imul(se,Ae),s=s+Math.imul(ue,Be)|0,m=Math.imul(ue,Ae),p=p+Math.imul(ae,Re)|0,s=s+Math.imul(ae,qe)|0,s=s+Math.imul(fe,Re)|0,m=m+Math.imul(fe,qe)|0;var Or=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Or>>>26)|0,Or&=67108863,p=Math.imul(se,Re),s=Math.imul(se,qe),s=s+Math.imul(ue,Re)|0,m=Math.imul(ue,qe);var Pr=(g+p|0)+((s&8191)<<13)|0;return g=(m+(s>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,d[0]=di,d[1]=Ke,d[2]=We,d[3]=wr,d[4]=_r,d[5]=xr,d[6]=Mr,d[7]=Er,d[8]=Sr,d[9]=Br,d[10]=Ar,d[11]=Rr,d[12]=qr,d[13]=Tr,d[14]=Ir,d[15]=kr,d[16]=Cr,d[17]=Or,d[18]=Pr,g!==0&&(d[19]=g,l.length++),l};Math.imul||(H=P);function Z(M,h,v){v.negative=h.negative^M.negative,v.length=M.length+h.length;for(var l=0,o=0,u=0;u<v.length-1;u++){var d=o;o=0;for(var g=l&67108863,p=Math.min(u,h.length-1),s=Math.max(0,u-M.length+1);s<=p;s++){var m=u-s,_=M.words[m]|0,c=h.words[s]|0,x=_*c,O=x&67108863;d=d+(x/67108864|0)|0,O=O+g|0,g=O&67108863,d=d+(O>>>26)|0,o+=d>>>26,d&=67108863}v.words[u]=g,l=d,d=o}return l!==0?v.words[u]=l:v.length--,v.strip()}function ke(M,h,v){var l=new V;return l.mulp(M,h,v)}n.prototype.mulTo=function(h,v){var l,o=this.length+h.length;return this.length===10&&h.length===10?l=H(this,h,v):o<63?l=P(this,h,v):o<1024?l=Z(this,h,v):l=ke(this,h,v),l};function V(M,h){this.x=M,this.y=h}V.prototype.makeRBT=function(h){for(var v=new Array(h),l=n.prototype._countBits(h)-1,o=0;o<h;o++)v[o]=this.revBin(o,l,h);return v},V.prototype.revBin=function(h,v,l){if(h===0||h===l-1)return h;for(var o=0,u=0;u<v;u++)o|=(h&1)<<v-u-1,h>>=1;return o},V.prototype.permute=function(h,v,l,o,u,d){for(var g=0;g<d;g++)o[g]=v[h[g]],u[g]=l[h[g]]},V.prototype.transform=function(h,v,l,o,u,d){this.permute(d,h,v,l,o,u);for(var g=1;g<u;g<<=1)for(var p=g<<1,s=Math.cos(2*Math.PI/p),m=Math.sin(2*Math.PI/p),_=0;_<u;_+=p)for(var c=s,x=m,O=0;O<g;O++){var N=l[_+O],D=o[_+O],W=l[_+O+g],K=o[_+O+g],G=c*W-x*K;K=c*K+x*W,W=G,l[_+O]=N+W,o[_+O]=D+K,l[_+O+g]=N-W,o[_+O+g]=D-K,O!==p&&(G=s*c-m*x,x=s*x+m*c,c=G)}},V.prototype.guessLen13b=function(h,v){var l=Math.max(v,h)|1,o=l&1,u=0;for(l=l/2|0;l;l=l>>>1)u++;return 1<<u+1+o},V.prototype.conjugate=function(h,v,l){if(!(l<=1))for(var o=0;o<l/2;o++){var u=h[o];h[o]=h[l-o-1],h[l-o-1]=u,u=v[o],v[o]=-v[l-o-1],v[l-o-1]=-u}},V.prototype.normalize13b=function(h,v){for(var l=0,o=0;o<v/2;o++){var u=Math.round(h[2*o+1]/v)*8192+Math.round(h[2*o]/v)+l;h[o]=u&67108863,u<67108864?l=0:l=u/67108864|0}return h},V.prototype.convert13b=function(h,v,l,o){for(var u=0,d=0;d<v;d++)u=u+(h[d]|0),l[2*d]=u&8191,u=u>>>13,l[2*d+1]=u&8191,u=u>>>13;for(d=2*v;d<o;++d)l[d]=0;r(u===0),r((u&-8192)===0)},V.prototype.stub=function(h){for(var v=new Array(h),l=0;l<h;l++)v[l]=0;return v},V.prototype.mulp=function(h,v,l){var o=2*this.guessLen13b(h.length,v.length),u=this.makeRBT(o),d=this.stub(o),g=new Array(o),p=new Array(o),s=new Array(o),m=new Array(o),_=new Array(o),c=new Array(o),x=l.words;x.length=o,this.convert13b(h.words,h.length,g,o),this.convert13b(v.words,v.length,m,o),this.transform(g,d,p,s,o,u),this.transform(m,d,_,c,o,u);for(var O=0;O<o;O++){var N=p[O]*_[O]-s[O]*c[O];s[O]=p[O]*c[O]+s[O]*_[O],p[O]=N}return this.conjugate(p,s,o),this.transform(p,s,x,d,o,u),this.conjugate(x,d,o),this.normalize13b(x,o),l.negative=h.negative^v.negative,l.length=h.length+v.length,l.strip()},n.prototype.mul=function(h){var v=new n(null);return v.words=new Array(this.length+h.length),this.mulTo(h,v)},n.prototype.mulf=function(h){var v=new n(null);return v.words=new Array(this.length+h.length),ke(this,h,v)},n.prototype.imul=function(h){return this.clone().mulTo(h,this)},n.prototype.imuln=function(h){r(typeof h=="number"),r(h<67108864);for(var v=0,l=0;l<this.length;l++){var o=(this.words[l]|0)*h,u=(o&67108863)+(v&67108863);v>>=26,v+=o/67108864|0,v+=u>>>26,this.words[l]=u&67108863}return v!==0&&(this.words[l]=v,this.length++),h===0&&(this.length=1,this._normSign()),this},n.prototype.muln=function(h){return this.clone().imuln(h)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(h){var v=k(h);if(v.length===0)return new n(1);for(var l=this,o=0;o<v.length&&v[o]===0;o++,l=l.sqr());if(++o<v.length)for(var u=l.sqr();o<v.length;o++,u=u.sqr())v[o]!==0&&(l=l.mul(u));return l},n.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var v=h%26,l=(h-v)/26,o=67108863>>>26-v<<26-v,u;if(v!==0){var d=0;for(u=0;u<this.length;u++){var g=this.words[u]&o,p=(this.words[u]|0)-g<<v;this.words[u]=p|d,d=g>>>26-v}d&&(this.words[u]=d,this.length++)}if(l!==0){for(u=this.length-1;u>=0;u--)this.words[u+l]=this.words[u];for(u=0;u<l;u++)this.words[u]=0;this.length+=l}return this.strip()},n.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},n.prototype.iushrn=function(h,v,l){r(typeof h=="number"&&h>=0);var o;v?o=(v-v%26)/26:o=0;var u=h%26,d=Math.min((h-u)/26,this.length),g=67108863^67108863>>>u<<u,p=l;if(o-=d,o=Math.max(0,o),p){for(var s=0;s<d;s++)p.words[s]=this.words[s];p.length=d}if(d!==0)if(this.length>d)for(this.length-=d,s=0;s<this.length;s++)this.words[s]=this.words[s+d];else this.words[0]=0,this.length=1;var m=0;for(s=this.length-1;s>=0&&(m!==0||s>=o);s--){var _=this.words[s]|0;this.words[s]=m<<26-u|_>>>u,m=_&g}return p&&m!==0&&(p.words[p.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(h,v,l){return r(this.negative===0),this.iushrn(h,v,l)},n.prototype.shln=function(h){return this.clone().ishln(h)},n.prototype.ushln=function(h){return this.clone().iushln(h)},n.prototype.shrn=function(h){return this.clone().ishrn(h)},n.prototype.ushrn=function(h){return this.clone().iushrn(h)},n.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var v=h%26,l=(h-v)/26,o=1<<v;if(this.length<=l)return!1;var u=this.words[l];return!!(u&o)},n.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var v=h%26,l=(h-v)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(v!==0&&l++,this.length=Math.min(l,this.length),v!==0){var o=67108863^67108863>>>v<<v;this.words[this.length-1]&=o}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(h){return this.clone().imaskn(h)},n.prototype.iaddn=function(h){return r(typeof h=="number"),r(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},n.prototype._iaddn=function(h){this.words[0]+=h;for(var v=0;v<this.length&&this.words[v]>=67108864;v++)this.words[v]-=67108864,v===this.length-1?this.words[v+1]=1:this.words[v+1]++;return this.length=Math.max(this.length,v+1),this},n.prototype.isubn=function(h){if(r(typeof h=="number"),r(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var v=0;v<this.length&&this.words[v]<0;v++)this.words[v]+=67108864,this.words[v+1]-=1;return this.strip()},n.prototype.addn=function(h){return this.clone().iaddn(h)},n.prototype.subn=function(h){return this.clone().isubn(h)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(h,v,l){var o=h.length+l,u;this._expand(o);var d,g=0;for(u=0;u<h.length;u++){d=(this.words[u+l]|0)+g;var p=(h.words[u]|0)*v;d-=p&67108863,g=(d>>26)-(p/67108864|0),this.words[u+l]=d&67108863}for(;u<this.length-l;u++)d=(this.words[u+l]|0)+g,g=d>>26,this.words[u+l]=d&67108863;if(g===0)return this.strip();for(r(g===-1),g=0,u=0;u<this.length;u++)d=-(this.words[u]|0)+g,g=d>>26,this.words[u]=d&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(h,v){var l=this.length-h.length,o=this.clone(),u=h,d=u.words[u.length-1]|0,g=this._countBits(d);l=26-g,l!==0&&(u=u.ushln(l),o.iushln(l),d=u.words[u.length-1]|0);var p=o.length-u.length,s;if(v!=="mod"){s=new n(null),s.length=p+1,s.words=new Array(s.length);for(var m=0;m<s.length;m++)s.words[m]=0}var _=o.clone()._ishlnsubmul(u,1,p);_.negative===0&&(o=_,s&&(s.words[p]=1));for(var c=p-1;c>=0;c--){var x=(o.words[u.length+c]|0)*67108864+(o.words[u.length+c-1]|0);for(x=Math.min(x/d|0,67108863),o._ishlnsubmul(u,x,c);o.negative!==0;)x--,o.negative=0,o._ishlnsubmul(u,1,c),o.isZero()||(o.negative^=1);s&&(s.words[c]=x)}return s&&s.strip(),o.strip(),v!=="div"&&l!==0&&o.iushrn(l),{div:s||null,mod:o}},n.prototype.divmod=function(h,v,l){if(r(!h.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var o,u,d;return this.negative!==0&&h.negative===0?(d=this.neg().divmod(h,v),v!=="mod"&&(o=d.div.neg()),v!=="div"&&(u=d.mod.neg(),l&&u.negative!==0&&u.iadd(h)),{div:o,mod:u}):this.negative===0&&h.negative!==0?(d=this.divmod(h.neg(),v),v!=="mod"&&(o=d.div.neg()),{div:o,mod:d.mod}):(this.negative&h.negative)!==0?(d=this.neg().divmod(h.neg(),v),v!=="div"&&(u=d.mod.neg(),l&&u.negative!==0&&u.isub(h)),{div:d.div,mod:u}):h.length>this.length||this.cmp(h)<0?{div:new n(0),mod:this}:h.length===1?v==="div"?{div:this.divn(h.words[0]),mod:null}:v==="mod"?{div:null,mod:new n(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new n(this.modn(h.words[0]))}:this._wordDiv(h,v)},n.prototype.div=function(h){return this.divmod(h,"div",!1).div},n.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},n.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},n.prototype.divRound=function(h){var v=this.divmod(h);if(v.mod.isZero())return v.div;var l=v.mod.abs(),o=h.abs().iushrn(1),u=h.words[0]&1,d=l.cmp(o);if(d<0||u===1&&d===0)return v.div;var g=new n(1);return g.negative=this.negative^h.negative,v.div.iadd(g)},n.prototype.modn=function(h){r(h<=67108863);for(var v=(1<<26)%h,l=0,o=this.length-1;o>=0;o--)l=(v*l+(this.words[o]|0))%h;return l},n.prototype.idivn=function(h){r(h<=67108863);for(var v=0,l=this.length-1;l>=0;l--){var o=(this.words[l]|0)+v*67108864;this.words[l]=o/h|0,v=o%h}return this.strip()},n.prototype.divn=function(h){return this.clone().idivn(h)},n.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var v=this,l=h.clone();v.negative!==0?v=v.umod(h):v=v.clone();for(var o=new n(1),u=new n(0),d=new n(0),g=new n(1),p=0;v.isEven()&&l.isEven();)v.iushrn(1),l.iushrn(1),++p;for(var s=l.clone(),m=v.clone();!v.isZero();){for(var _=0,c=1;(v.words[0]&c)===0&&_<26;++_,c<<=1);if(_>0)for(v.iushrn(_);_-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(s),u.isub(m)),o.iushrn(1),u.iushrn(1);for(var x=0,O=1;(l.words[0]&O)===0&&x<26;++x,O<<=1);if(x>0)for(l.iushrn(x);x-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(s),g.isub(m)),d.iushrn(1),g.iushrn(1);v.cmp(l)>=0?(v.isub(l),o.isub(d),u.isub(g)):(l.isub(v),d.isub(o),g.isub(u))}return{a:d,b:g,gcd:l.iushln(p)}},n.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var v=this,l=h.clone();v.negative!==0?v=v.umod(h):v=v.clone();for(var o=new n(1),u=new n(0),d=l.clone();v.cmpn(1)>0&&l.cmpn(1)>0;){for(var g=0,p=1;(v.words[0]&p)===0&&g<26;++g,p<<=1);if(g>0)for(v.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(d),o.iushrn(1);for(var s=0,m=1;(l.words[0]&m)===0&&s<26;++s,m<<=1);if(s>0)for(l.iushrn(s);s-- >0;)u.isOdd()&&u.iadd(d),u.iushrn(1);v.cmp(l)>=0?(v.isub(l),o.isub(u)):(l.isub(v),u.isub(o))}var _;return v.cmpn(1)===0?_=o:_=u,_.cmpn(0)<0&&_.iadd(h),_},n.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var v=this.clone(),l=h.clone();v.negative=0,l.negative=0;for(var o=0;v.isEven()&&l.isEven();o++)v.iushrn(1),l.iushrn(1);do{for(;v.isEven();)v.iushrn(1);for(;l.isEven();)l.iushrn(1);var u=v.cmp(l);if(u<0){var d=v;v=l,l=d}else if(u===0||l.cmpn(1)===0)break;v.isub(l)}while(!0);return l.iushln(o)},n.prototype.invm=function(h){return this.egcd(h).a.umod(h)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(h){return this.words[0]&h},n.prototype.bincn=function(h){r(typeof h=="number");var v=h%26,l=(h-v)/26,o=1<<v;if(this.length<=l)return this._expand(l+1),this.words[l]|=o,this;for(var u=o,d=l;u!==0&&d<this.length;d++){var g=this.words[d]|0;g+=u,u=g>>>26,g&=67108863,this.words[d]=g}return u!==0&&(this.words[d]=u,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(h){var v=h<0;if(this.negative!==0&&!v)return-1;if(this.negative===0&&v)return 1;this.strip();var l;if(this.length>1)l=1;else{v&&(h=-h),r(h<=67108863,"Number is too big");var o=this.words[0]|0;l=o===h?0:o<h?-1:1}return this.negative!==0?-l|0:l},n.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var v=this.ucmp(h);return this.negative!==0?-v|0:v},n.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var v=0,l=this.length-1;l>=0;l--){var o=this.words[l]|0,u=h.words[l]|0;if(o!==u){o<u?v=-1:o>u&&(v=1);break}}return v},n.prototype.gtn=function(h){return this.cmpn(h)===1},n.prototype.gt=function(h){return this.cmp(h)===1},n.prototype.gten=function(h){return this.cmpn(h)>=0},n.prototype.gte=function(h){return this.cmp(h)>=0},n.prototype.ltn=function(h){return this.cmpn(h)===-1},n.prototype.lt=function(h){return this.cmp(h)===-1},n.prototype.lten=function(h){return this.cmpn(h)<=0},n.prototype.lte=function(h){return this.cmp(h)<=0},n.prototype.eqn=function(h){return this.cmpn(h)===0},n.prototype.eq=function(h){return this.cmp(h)===0},n.red=function(h){return new F(h)},n.prototype.toRed=function(h){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(h){return this.red=h,this},n.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},n.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},n.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},n.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},n.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},n.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},n.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},n.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var Y={k256:null,p224:null,p192:null,p25519:null};function He(M,h){this.name=M,this.p=new n(h,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}He.prototype._tmp=function(){var h=new n(null);return h.words=new Array(Math.ceil(this.n/13)),h},He.prototype.ireduce=function(h){var v=h,l;do this.split(v,this.tmp),v=this.imulK(v),v=v.iadd(this.tmp),l=v.bitLength();while(l>this.n);var o=l<this.n?-1:v.ucmp(this.p);return o===0?(v.words[0]=0,v.length=1):o>0?v.isub(this.p):v.strip!==void 0?v.strip():v._strip(),v},He.prototype.split=function(h,v){h.iushrn(this.n,0,v)},He.prototype.imulK=function(h){return h.imul(this.k)};function T(){He.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(T,He),T.prototype.split=function(h,v){for(var l=4194303,o=Math.min(h.length,9),u=0;u<o;u++)v.words[u]=h.words[u];if(v.length=o,h.length<=9){h.words[0]=0,h.length=1;return}var d=h.words[9];for(v.words[v.length++]=d&l,u=10;u<h.length;u++){var g=h.words[u]|0;h.words[u-10]=(g&l)<<4|d>>>22,d=g}d>>>=22,h.words[u-10]=d,d===0&&h.length>10?h.length-=10:h.length-=9},T.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var v=0,l=0;l<h.length;l++){var o=h.words[l]|0;v+=o*977,h.words[l]=v&67108863,v=o*64+(v/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function C(){He.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(C,He);function U(){He.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(U,He);function L(){He.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(L,He),L.prototype.imulK=function(h){for(var v=0,l=0;l<h.length;l++){var o=(h.words[l]|0)*19+v,u=o&67108863;o>>>=26,h.words[l]=u,v=o}return v!==0&&(h.words[h.length++]=v),h},n._prime=function(h){if(Y[h])return Y[h];var v;if(h==="k256")v=new T;else if(h==="p224")v=new C;else if(h==="p192")v=new U;else if(h==="p25519")v=new L;else throw new Error("Unknown prime "+h);return Y[h]=v,v};function F(M){if(typeof M=="string"){var h=n._prime(M);this.m=h.p,this.prime=h}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}F.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},F.prototype._verify2=function(h,v){r((h.negative|v.negative)===0,"red works only with positives"),r(h.red&&h.red===v.red,"red works only with red numbers")},F.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},F.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},F.prototype.add=function(h,v){this._verify2(h,v);var l=h.add(v);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},F.prototype.iadd=function(h,v){this._verify2(h,v);var l=h.iadd(v);return l.cmp(this.m)>=0&&l.isub(this.m),l},F.prototype.sub=function(h,v){this._verify2(h,v);var l=h.sub(v);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},F.prototype.isub=function(h,v){this._verify2(h,v);var l=h.isub(v);return l.cmpn(0)<0&&l.iadd(this.m),l},F.prototype.shl=function(h,v){return this._verify1(h),this.imod(h.ushln(v))},F.prototype.imul=function(h,v){return this._verify2(h,v),this.imod(h.imul(v))},F.prototype.mul=function(h,v){return this._verify2(h,v),this.imod(h.mul(v))},F.prototype.isqr=function(h){return this.imul(h,h.clone())},F.prototype.sqr=function(h){return this.mul(h,h)},F.prototype.sqrt=function(h){if(h.isZero())return h.clone();var v=this.m.andln(3);if(r(v%2===1),v===3){var l=this.m.add(new n(1)).iushrn(2);return this.pow(h,l)}for(var o=this.m.subn(1),u=0;!o.isZero()&&o.andln(1)===0;)u++,o.iushrn(1);r(!o.isZero());var d=new n(1).toRed(this),g=d.redNeg(),p=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new n(2*s*s).toRed(this);this.pow(s,p).cmp(g)!==0;)s.redIAdd(g);for(var m=this.pow(s,o),_=this.pow(h,o.addn(1).iushrn(1)),c=this.pow(h,o),x=u;c.cmp(d)!==0;){for(var O=c,N=0;O.cmp(d)!==0;N++)O=O.redSqr();r(N<x);var D=this.pow(m,new n(1).iushln(x-N-1));_=_.redMul(D),m=D.redSqr(),c=c.redMul(m),x=N}return _},F.prototype.invm=function(h){var v=h._invmp(this.m);return v.negative!==0?(v.negative=0,this.imod(v).redNeg()):this.imod(v)},F.prototype.pow=function(h,v){if(v.isZero())return new n(1).toRed(this);if(v.cmpn(1)===0)return h.clone();var l=4,o=new Array(1<<l);o[0]=new n(1).toRed(this),o[1]=h;for(var u=2;u<o.length;u++)o[u]=this.mul(o[u-1],h);var d=o[0],g=0,p=0,s=v.bitLength()%26;for(s===0&&(s=26),u=v.length-1;u>=0;u--){for(var m=v.words[u],_=s-1;_>=0;_--){var c=m>>_&1;if(d!==o[0]&&(d=this.sqr(d)),c===0&&g===0){p=0;continue}g<<=1,g|=c,p++,!(p!==l&&(u!==0||_!==0))&&(d=this.mul(d,o[g]),p=0,g=0)}s=26}return d},F.prototype.convertTo=function(h){var v=h.umod(this.m);return v===h?v.clone():v},F.prototype.convertFrom=function(h){var v=h.clone();return v.red=null,v},n.mont=function(h){return new j(h)};function j(M){F.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(j,F),j.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},j.prototype.convertFrom=function(h){var v=this.imod(h.mul(this.rinv));return v.red=null,v},j.prototype.imul=function(h,v){if(h.isZero()||v.isZero())return h.words[0]=0,h.length=1,h;var l=h.imul(v),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=l.isub(o).iushrn(this.shift),d=u;return u.cmp(this.m)>=0?d=u.isub(this.m):u.cmpn(0)<0&&(d=u.iadd(this.m)),d._forceRed(this)},j.prototype.mul=function(h,v){if(h.isZero()||v.isZero())return new n(0)._forceRed(this);var l=h.mul(v),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=l.isub(o).iushrn(this.shift),d=u;return u.cmp(this.m)>=0?d=u.isub(this.m):u.cmpn(0)<0&&(d=u.iadd(this.m)),d._forceRed(this)},j.prototype.invm=function(h){var v=this.imod(h._invmp(this.m).mul(this.r2));return v._forceRed(this)}})(typeof Cu>"u"||Cu,i1)});var n1=B((Q7,Du)=>{w();var Ou;Du.exports=function(e){return Ou||(Ou=new mr(null)),Ou.generate(e)};function mr(t){this.rand=t}Du.exports.Rand=mr;mr.prototype.generate=function(e){return this._rand(e)};mr.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?mr.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?mr.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(mr.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Pu=Uu(),typeof Pu.randomBytes!="function")throw new Error("Not supported");mr.prototype._rand=function(e){return Pu.randomBytes(e)}}catch{}var Pu});var Nu=B((t9,o1)=>{w();var ui=gr(),AM=n1();function hi(t){this.rand=t||new AM.Rand}o1.exports=hi;hi.create=function(e){return new hi(e)};hi.prototype._randbelow=function(e){var r=e.bitLength(),i=Math.ceil(r/8);do var n=new ui(this.rand.generate(i));while(n.cmp(e)>=0);return n};hi.prototype._randrange=function(e,r){var i=r.sub(e);return e.add(this._randbelow(i))};hi.prototype.test=function(e,r,i){var n=e.bitLength(),a=ui.mont(e),f=new ui(1).toRed(a);r||(r=Math.max(1,n/48|0));for(var y=e.subn(1),b=0;!y.testn(b);b++);for(var S=e.shrn(b),A=y.toRed(a),q=!0;r>0;r--){var k=this._randrange(new ui(2),y);i&&i(k);var P=k.toRed(a).redPow(S);if(!(P.cmp(f)===0||P.cmp(A)===0)){for(var H=1;H<b;H++){if(P=P.redSqr(),P.cmp(f)===0)return!1;if(P.cmp(A)===0)break}if(H===b)return!1}}return q};hi.prototype.getDivisor=function(e,r){var i=e.bitLength(),n=ui.mont(e),a=new ui(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var f=e.subn(1),y=0;!f.testn(y);y++);for(var b=e.shrn(y),S=f.toRed(n);r>0;r--){var A=this._randrange(new ui(2),f),q=e.gcd(A);if(q.cmpn(1)!==0)return q;var k=A.toRed(n).redPow(b);if(!(k.cmp(a)===0||k.cmp(S)===0)){for(var P=1;P<y;P++){if(k=k.redSqr(),k.cmp(a)===0)return k.fromRed().subn(1).gcd(e);if(k.cmp(S)===0)break}if(P===y)return k=k.redSqr(),k.fromRed().subn(1).gcd(e)}}return!1}});var Wu=B((f9,s1)=>{w();var RM=Fr();s1.exports=Ku;Ku.simpleSieve=ju;Ku.fermatTest=Hu;var et=gr(),qM=new et(24),TM=Nu(),a1=new TM,IM=new et(1),Fu=new et(2),kM=new et(5),i9=new et(16),n9=new et(8),CM=new et(10),OM=new et(3),o9=new et(7),PM=new et(11),f1=new et(4),a9=new et(12),Lu=null;function DM(){if(Lu!==null)return Lu;var t=1048576,e=[];e[0]=2;for(var r=1,i=3;i<t;i+=2){for(var n=Math.ceil(Math.sqrt(i)),a=0;a<r&&e[a]<=n&&i%e[a]!==0;a++);r!==a&&e[a]<=n||(e[r++]=i)}return Lu=e,e}function ju(t){for(var e=DM(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return!0}function Hu(t){var e=et.mont(t);return Fu.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Ku(t,e){if(t<16)return e===2||e===5?new et([140,123]):new et([140,39]);e=new et(e);for(var r,i;;){for(r=new et(RM(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(IM),r.testn(1)||r.iadd(Fu),e.cmp(Fu)){if(!e.cmp(kM))for(;r.mod(CM).cmp(OM);)r.iadd(f1)}else for(;r.mod(qM).cmp(PM);)r.iadd(f1);if(i=r.shrn(1),ju(i)&&ju(r)&&Hu(i)&&Hu(r)&&a1.test(i)&&a1.test(r))return r}}});var u1=B((u9,UM)=>{UM.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}});var d1=B((h9,c1)=>{w();var wt=gr(),NM=Nu(),h1=new NM,LM=new wt(24),FM=new wt(11),jM=new wt(10),HM=new wt(3),KM=new wt(7),l1=Wu(),WM=Fr();c1.exports=or;function GM(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this._pub=new wt(t),this}function VM(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this._priv=new wt(t),this}var Xa={};function $M(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in Xa)return Xa[i];var n=0;if(t.isEven()||!l1.simpleSieve||!l1.fermatTest(t)||!h1.test(t))return n+=1,r==="02"||r==="05"?n+=8:n+=4,Xa[i]=n,n;h1.test(t.shrn(1))||(n+=2);var a;switch(r){case"02":t.mod(LM).cmp(FM)&&(n+=8);break;case"05":a=t.mod(jM),a.cmp(HM)&&a.cmp(KM)&&(n+=8);break;default:n+=4}return Xa[i]=n,n}function or(t,e,r){this.setGenerator(e),this.__prime=new wt(t),this._prime=wt.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=GM,this.setPrivateKey=VM):this._primeCode=8}Object.defineProperty(or.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=$M(this.__prime,this.__gen)),this._primeCode}});or.prototype.generateKeys=function(){return this._priv||(this._priv=new wt(WM(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};or.prototype.computeSecret=function(t){t=new wt(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new R.Buffer(e.toArray()),i=this.getPrime();if(r.length<i.length){var n=new R.Buffer(i.length-r.length);n.fill(0),r=R.Buffer.concat([n,r])}return r};or.prototype.getPublicKey=function(e){return Ja(this._pub,e)};or.prototype.getPrivateKey=function(e){return Ja(this._priv,e)};or.prototype.getPrime=function(t){return Ja(this.__prime,t)};or.prototype.getGenerator=function(t){return Ja(this._gen,t)};or.prototype.setGenerator=function(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this.__gen=t,this._gen=new wt(t),this};function Ja(t,e){var r=new R.Buffer(t.toArray());return e?r.toString(e):r}});var y1=B($i=>{w();var zM=Wu(),p1=u1(),Gu=d1();function ZM(t){var e=new R.Buffer(p1[t].prime,"hex"),r=new R.Buffer(p1[t].gen,"hex");return new Gu(e,r)}var YM={binary:!0,hex:!0,base64:!0};function v1(t,e,r,i){return R.Buffer.isBuffer(e)||YM[e]===void 0?v1(t,"binary",e,r):(e=e||"binary",i=i||"binary",r=r||new R.Buffer([2]),R.Buffer.isBuffer(r)||(r=new R.Buffer(r,i)),typeof t=="number"?new Gu(zM(t,r),r,!0):(R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),new Gu(t,r,!0)))}$i.DiffieHellmanGroup=$i.createDiffieHellmanGroup=$i.getDiffieHellman=ZM;$i.createDiffieHellman=$i.DiffieHellman=v1});var g1=B((exports,module)=>{w();var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(e,r,i){e[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(t),function(y){r[y]=t[y]}),forEach(globals,function(y){t[y]&&(r[y]=t[y])});var a=Object_keys(r),f=i.call(r,this.code);return forEach(Object_keys(r),function(y){(y in t||indexOf(a,y)===-1)&&(t[y]=r[y])}),forEach(globals,function(y){y in t||defineProp(t,y,r[y])}),document.body.removeChild(e),f};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),function(i){t[i]=e[i]}),r};forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(t){return t instanceof Context};exports.createScript=function(t){return exports.Script(t)};exports.createContext=Script.createContext=function(t){var e=new Context;return typeof t=="object"&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}});var w1=B(b1=>{w();var m1=Zi(),XM=X(),JM=b1;JM.define=function(e,r){return new zi(e,r)};function zi(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}zi.prototype._createNamed=function(e){var r;try{r=g1().runInThisContext("(function "+this.name+`(entity) {
|
|
12
|
-
this._initNamed(entity);
|
|
13
|
-
})`)}catch{r=function(n){this._initNamed(n)}}return XM(r,e),r.prototype._initNamed=function(n){e.call(this,n)},new r(this)};zi.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(m1.decoders[e])),this.decoders[e]};zi.prototype.decode=function(e,r,i){return this._getDecoder(r).decode(e,i)};zi.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(m1.encoders[e])),this.encoders[e]};zi.prototype.encode=function(e,r,i){return this._getEncoder(r).encode(e,i)}});var x1=B(_1=>{w();var QM=X();function _t(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}_1.Reporter=_t;_t.prototype.isError=function(e){return e instanceof Yi};_t.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};_t.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};_t.prototype.enterKey=function(e){return this._reporterState.path.push(e)};_t.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};_t.prototype.leaveKey=function(e,r,i){var n=this._reporterState;this.exitKey(e),n.obj!==null&&(n.obj[r]=i)};_t.prototype.path=function(){return this._reporterState.path.join("/")};_t.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};_t.prototype.leaveObject=function(e){var r=this._reporterState,i=r.obj;return r.obj=e,i};_t.prototype.error=function(e){var r,i=this._reporterState,n=e instanceof Yi;if(n?r=e:r=new Yi(i.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};_t.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function Yi(t,e){this.path=t,this.rethrow(e)}QM(Yi,Error);Yi.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Yi),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var $u=B(Vu=>{w();var e4=X(),ef=Xi().Reporter,ho=ft().Buffer;function Kt(t,e){if(ef.call(this,e),!ho.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}e4(Kt,ef);Vu.DecoderBuffer=Kt;Kt.prototype.save=function(){return{offset:this.offset,reporter:ef.prototype.save.call(this)}};Kt.prototype.restore=function(e){var r=new Kt(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,ef.prototype.restore.call(this,e.reporter),r};Kt.prototype.isEmpty=function(){return this.offset===this.length};Kt.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Kt.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new Kt(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};Kt.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Qa(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof Qa||(r=new Qa(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=ho.byteLength(t);else if(ho.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}Vu.EncoderBuffer=Qa;Qa.prototype.join=function(e,r){return e||(e=new ho(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):ho.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var S1=B((_9,E1)=>{w();var t4=Xi().Reporter,r4=Xi().EncoderBuffer,i4=Xi().DecoderBuffer,st=Hi(),M1=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],n4=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(M1),o4=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Fe(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}E1.exports=Fe;var a4=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Fe.prototype.clone=function(){var e=this._baseState,r={};a4.forEach(function(n){r[n]=e[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};Fe.prototype._wrap=function(){var e=this._baseState;n4.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return e.children.push(n),n[r].apply(n,arguments)}},this)};Fe.prototype._init=function(e){var r=this._baseState;st(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),st.equal(r.children.length,1,"Root node can have only one child")};Fe.prototype._useArgs=function(e){var r=this._baseState,i=e.filter(function(n){return n instanceof this.constructor},this);e=e.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(st(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),e.length!==0&&(st(r.args===null),r.args=e,r.reverseArgs=e.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var a={};return Object.keys(n).forEach(function(f){f==(f|0)&&(f|=0);var y=n[f];a[y]=f}),a}))};o4.forEach(function(t){Fe.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});M1.forEach(function(t){Fe.prototype[t]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return st(r.tag===null),r.tag=t,this._useArgs(i),this}});Fe.prototype.use=function(e){st(e);var r=this._baseState;return st(r.use===null),r.use=e,this};Fe.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};Fe.prototype.def=function(e){var r=this._baseState;return st(r.default===null),r.default=e,r.optional=!0,this};Fe.prototype.explicit=function(e){var r=this._baseState;return st(r.explicit===null&&r.implicit===null),r.explicit=e,this};Fe.prototype.implicit=function(e){var r=this._baseState;return st(r.explicit===null&&r.implicit===null),r.implicit=e,this};Fe.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};Fe.prototype.key=function(e){var r=this._baseState;return st(r.key===null),r.key=e,this};Fe.prototype.any=function(){var e=this._baseState;return e.any=!0,this};Fe.prototype.choice=function(e){var r=this._baseState;return st(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};Fe.prototype.contains=function(e){var r=this._baseState;return st(r.use===null),r.contains=e,this};Fe.prototype._decode=function(e,r){var i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));var n=i.default,a=!0,f=null;if(i.key!==null&&(f=e.enterKey(i.key)),i.optional){var y=null;if(i.explicit!==null?y=i.explicit:i.implicit!==null?y=i.implicit:i.tag!==null&&(y=i.tag),y===null&&!i.any){var b=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(b)}else if(a=this._peekTag(e,y,i.any),e.isError(a))return a}var S;if(i.obj&&a&&(S=e.enterObject()),a){if(i.explicit!==null){var A=this._decodeTag(e,i.explicit);if(e.isError(A))return A;e=A}var q=e.offset;if(i.use===null&&i.choice===null){if(i.any)var b=e.save();var k=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(k))return k;i.any?n=e.raw(b):e=k}if(r&&r.track&&i.tag!==null&&r.track(e.path(),q,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,e,r):n=this._decodeChoice(e,r),e.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(Z){Z._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var P=new i4(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(P,r)}}return i.obj&&a&&(n=e.leaveObject(S)),i.key!==null&&(n!==null||a===!0)?e.leaveKey(f,i.key,n):f!==null&&e.exitKey(f),n};Fe.prototype._decodeGeneric=function(e,r,i){var n=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,n.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};Fe.prototype._getUse=function(e,r){var i=this._baseState;return i.useDecoder=this._use(e,r),st(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};Fe.prototype._decodeChoice=function(e,r){var i=this._baseState,n=null,a=!1;return Object.keys(i.choice).some(function(f){var y=e.save(),b=i.choice[f];try{var S=b._decode(e,r);if(e.isError(S))return!1;n={type:f,value:S},a=!0}catch{return e.restore(y),!1}return!0},this),a?n:e.error("Choice not matched")};Fe.prototype._createEncoderBuffer=function(e){return new r4(e,this.reporter)};Fe.prototype._encode=function(e,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===e)){var a=this._encodeValue(e,r,i);if(a!==void 0&&!this._skipDefault(a,r,i))return a}};Fe.prototype._encodeValue=function(e,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,r||new t4);var b=null;if(this.reporter=r,n.optional&&e===void 0)if(n.default!==null)e=n.default;else return;var a=null,f=!1;if(n.any)b=this._createEncoderBuffer(e);else if(n.choice)b=this._encodeChoice(e,r);else if(n.contains)a=this._getUse(n.contains,i)._encode(e,r),f=!0;else if(n.children)a=n.children.map(function(q){if(q._baseState.tag==="null_")return q._encode(null,r,e);if(q._baseState.key===null)return r.error("Child should have a key");var k=r.enterKey(q._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var P=q._encode(e[q._baseState.key],r,e);return r.leaveKey(k),P},this).filter(function(q){return q}),a=this._createEncoderBuffer(a);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var y=this.clone();y._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(q){var k=this._baseState;return this._getUse(k.args[0],e)._encode(q,r)},y))}else n.use!==null?b=this._getUse(n.use,i)._encode(e,r):(a=this._encodePrimitive(n.tag,e),f=!0);var b;if(!n.any&&n.choice===null){var S=n.implicit!==null?n.implicit:n.tag,A=n.implicit===null?"universal":"context";S===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(b=this._encodeComposite(S,f,A,a))}return n.explicit!==null&&(b=this._encodeComposite(n.explicit,!1,"context",b)),b};Fe.prototype._encodeChoice=function(e,r){var i=this._baseState,n=i.choice[e.type];return n||st(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,r)};Fe.prototype._encodePrimitive=function(e,r){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};Fe.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};Fe.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var Xi=B(B1=>{w();var tf=B1;tf.Reporter=x1().Reporter;tf.DecoderBuffer=$u().DecoderBuffer;tf.EncoderBuffer=$u().EncoderBuffer;tf.Node=S1()});var R1=B(li=>{w();var A1=zu();li.tagClass={0:"universal",1:"application",2:"context",3:"private"};li.tagClassByName=A1._reverse(li.tagClass);li.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};li.tagByName=A1._reverse(li.tag)});var zu=B(T1=>{w();var q1=T1;q1._reverse=function(e){var r={};return Object.keys(e).forEach(function(i){(i|0)==i&&(i=i|0);var n=e[i];r[n]=i}),r};q1.der=R1()});var Xu=B((q9,O1)=>{w();var f4=X(),Zu=Zi(),rf=Zu.base,s4=Zu.bignum,I1=Zu.constants.der;function k1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new ct,this.tree._init(t.body)}O1.exports=k1;k1.prototype.decode=function(e,r){return e instanceof rf.DecoderBuffer||(e=new rf.DecoderBuffer(e,r)),this.tree._decode(e,r)};function ct(t){rf.Node.call(this,"der",t)}f4(ct,rf.Node);ct.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;var n=e.save(),a=Yu(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(n),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||i)};ct.prototype._decodeTag=function(e,r,i){var n=Yu(e,'Failed to decode tag of "'+r+'"');if(e.isError(n))return n;var a=C1(e,n.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(n.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');var f=e.save(),y=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(y)?y:(a=e.offset-f.offset,e.restore(f),e.skip(a,'Failed to match body of: "'+r+'"'))};ct.prototype._skipUntilEnd=function(e,r){for(;;){var i=Yu(e,r);if(e.isError(i))return i;var n=C1(e,i.primitive,r);if(e.isError(n))return n;var a;if(i.primitive||n!==null?a=e.skip(n):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(i.tagStr==="end")break}};ct.prototype._decodeList=function(e,r,i,n){for(var a=[];!e.isEmpty();){var f=this._peekTag(e,"end");if(e.isError(f))return f;var y=i.decode(e,"der",n);if(e.isError(y)&&f)break;a.push(y)}return a};ct.prototype._decodeStr=function(e,r){if(r==="bitstr"){var i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){var n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",f=0;f<n.length/2;f++)a+=String.fromCharCode(n.readUInt16BE(f*2));return a}else if(r==="numstr"){var y=e.raw().toString("ascii");return this._isNumstr(y)?y:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){var b=e.raw().toString("ascii");return this._isPrintstr(b)?b:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};ct.prototype._decodeObjid=function(e,r,i){for(var n,a=[],f=0;!e.isEmpty();){var y=e.readUInt8();f<<=7,f|=y&127,(y&128)===0&&(a.push(f),f=0)}y&128&&a.push(f);var b=a[0]/40|0,S=a[0]%40;if(i?n=a:n=[b,S].concat(a.slice(1)),r){var A=r[n.join(" ")];A===void 0&&(A=r[n.join(".")]),A!==void 0&&(n=A)}return n};ct.prototype._decodeTime=function(e,r){var i=e.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,a=i.slice(4,6)|0,f=i.slice(6,8)|0,y=i.slice(8,10)|0,b=i.slice(10,12)|0,S=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,a=i.slice(2,4)|0,f=i.slice(4,6)|0,y=i.slice(6,8)|0,b=i.slice(8,10)|0,S=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,a-1,f,y,b,S,0)};ct.prototype._decodeNull=function(e){return null};ct.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};ct.prototype._decodeInt=function(e,r){var i=e.raw(),n=new s4(i);return r&&(n=r[n.toString(10)]||n),n};ct.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Yu(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=I1.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127}}else r&=31;var f=I1.tag[r];return{cls:i,primitive:n,tag:r,tagStr:f}}function C1(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return t.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var f=t.readUInt8(r);if(t.isError(f))return f;i|=f}return i}});var D1=B((I9,P1)=>{w();var u4=X(),h4=ft().Buffer,Ju=Xu();function Qu(t){Ju.call(this,t),this.enc="pem"}u4(Qu,Ju);P1.exports=Qu;Qu.prototype.decode=function(e,r){for(var i=e.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,f=-1,y=-1,b=0;b<i.length;b++){var S=i[b].match(a);if(S!==null&&S[2]===n)if(f===-1){if(S[1]!=="BEGIN")break;f=b}else{if(S[1]!=="END")break;y=b;break}}if(f===-1||y===-1)throw new Error("PEM section not found for: "+n);var A=i.slice(f+1,y).join("");A.replace(/[^a-z0-9\+\/=]+/gi,"");var q=new h4(A,"base64");return Ju.prototype.decode.call(this,q,r)}});var L1=B(N1=>{w();var U1=N1;U1.der=Xu();U1.pem=D1()});var th=B((P9,K1)=>{w();var l4=X(),ar=ft().Buffer,F1=Zi(),j1=F1.base,eh=F1.constants.der;function H1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new qt,this.tree._init(t.body)}K1.exports=H1;H1.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function qt(t){j1.Node.call(this,"der",t)}l4(qt,j1.Node);qt.prototype._encodeComposite=function(e,r,i,n){var a=c4(e,r,i,this.reporter);if(n.length<128){var b=new ar(2);return b[0]=a,b[1]=n.length,this._createEncoderBuffer([b,n])}for(var f=1,y=n.length;y>=256;y>>=8)f++;var b=new ar(2+f);b[0]=a,b[1]=128|f;for(var y=1+f,S=n.length;S>0;y--,S>>=8)b[y]=S&255;return this._createEncoderBuffer([b,n])};qt.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var i=new ar(e.length*2),n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};qt.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(var n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}for(var a=0,n=0;n<e.length;n++){var f=e[n];for(a++;f>=128;f>>=7)a++}for(var y=new ar(a),b=y.length-1,n=e.length-1;n>=0;n--){var f=e[n];for(y[b--]=f&127;(f>>=7)>0;)y[b--]=128|f&127}return this._createEncoderBuffer(y)};function xt(t){return t<10?"0"+t:t}qt.prototype._encodeTime=function(e,r){var i,n=new Date(e);return r==="gentime"?i=[xt(n.getFullYear()),xt(n.getUTCMonth()+1),xt(n.getUTCDate()),xt(n.getUTCHours()),xt(n.getUTCMinutes()),xt(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[xt(n.getFullYear()%100),xt(n.getUTCMonth()+1),xt(n.getUTCDate()),xt(n.getUTCHours()),xt(n.getUTCMinutes()),xt(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};qt.prototype._encodeNull=function(){return this._createEncoderBuffer("")};qt.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!ar.isBuffer(e)){var i=e.toArray();!e.sign&&i[0]&128&&i.unshift(0),e=new ar(i)}if(ar.isBuffer(e)){var n=e.length;e.length===0&&n++;var f=new ar(n);return e.copy(f),e.length===0&&(f[0]=0),this._createEncoderBuffer(f)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,a=e;a>=256;a>>=8)n++;for(var f=new Array(n),a=f.length-1;a>=0;a--)f[a]=e&255,e>>=8;return f[0]&128&&f.unshift(0),this._createEncoderBuffer(new ar(f))};qt.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};qt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};qt.prototype._skipDefault=function(e,r,i){var n=this._baseState,a;if(n.default===null)return!1;var f=e.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),f.length!==n.defaultBuffer.length)return!1;for(a=0;a<f.length;a++)if(f[a]!==n.defaultBuffer[a])return!1;return!0};function c4(t,e,r,i){var n;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),eh.tagByName.hasOwnProperty(t))n=eh.tagByName[t];else if(typeof t=="number"&&(t|0)===t)n=t;else return i.error("Unknown tag: "+t);return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=eh.tagClassByName[r||"universal"]<<6,n)}});var G1=B((U9,W1)=>{w();var d4=X(),rh=th();function ih(t){rh.call(this,t),this.enc="pem"}d4(ih,rh);W1.exports=ih;ih.prototype.encode=function(e,r){for(var i=rh.prototype.encode.call(this,e),n=i.toString("base64"),a=["-----BEGIN "+r.label+"-----"],f=0;f<n.length;f+=64)a.push(n.slice(f,f+64));return a.push("-----END "+r.label+"-----"),a.join(`
|
|
14
|
-
`)}});var z1=B($1=>{w();var V1=$1;V1.der=th();V1.pem=G1()});var Zi=B(Z1=>{w();var Ji=Z1;Ji.bignum=gr();Ji.define=w1().define;Ji.base=Xi();Ji.constants=zu();Ji.decoders=L1();Ji.encoders=z1()});var Q1=B((K9,J1)=>{"use strict";w();var Tt=Zi(),Y1=Tt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),p4=Tt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),nh=Tt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),v4=Tt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(nh),this.key("subjectPublicKey").bitstr())}),y4=Tt.define("RelativeDistinguishedName",function(){this.setof(p4)}),g4=Tt.define("RDNSequence",function(){this.seqof(y4)}),X1=Tt.define("Name",function(){this.choice({rdnSequence:this.use(g4)})}),m4=Tt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(Y1),this.key("notAfter").use(Y1))}),b4=Tt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),w4=Tt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(nh),this.key("issuer").use(X1),this.key("validity").use(m4),this.key("subject").use(X1),this.key("subjectPublicKeyInfo").use(v4),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(b4).optional())}),_4=Tt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(w4),this.key("signatureAlgorithm").use(nh),this.key("signatureValue").bitstr())});J1.exports=_4});var tg=B(kt=>{"use strict";w();var It=Zi();kt.certificate=Q1();var x4=It.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});kt.RSAPrivateKey=x4;var M4=It.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});kt.RSAPublicKey=M4;var eg=It.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),E4=It.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(eg),this.key("subjectPublicKey").bitstr())});kt.PublicKey=E4;var S4=It.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(eg),this.key("subjectPrivateKey").octstr())});kt.PrivateKey=S4;var B4=It.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});kt.EncryptedPrivateKey=B4;var A4=It.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});kt.DSAPrivateKey=A4;kt.DSAparam=It.define("DSAparam",function(){this.int()});var R4=It.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),q4=It.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(R4),this.key("publicKey").optional().explicit(1).bitstr())});kt.ECPrivateKey=q4;kt.signature=It.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var rg=B(($9,T4)=>{T4.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}});var ng=B((z9,ig)=>{"use strict";w();var I4=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,k4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,C4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,O4=fo(),P4=Ya(),nf=Te().Buffer;ig.exports=function(t,e){var r=t.toString(),i=r.match(I4),n;if(i){var f="aes"+i[1],y=nf.from(i[2],"hex"),b=nf.from(i[3].replace(/[\r\n]/g,""),"base64"),S=O4(e,y.slice(0,8),parseInt(i[1],10)).key,A=[],q=P4.createDecipheriv(f,S,y);A.push(q.update(b)),A.push(q.final()),n=nf.concat(A)}else{var a=r.match(C4);n=nf.from(a[2].replace(/[\r\n]/g,""),"base64")}var k=r.match(k4)[1];return{tag:k,data:n}}});var ah=B((Y9,ag)=>{"use strict";w();var lt=tg(),D4=rg(),U4=ng(),N4=Ya(),L4=pu().pbkdf2Sync,oh=Te().Buffer;function F4(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=D4[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,y=parseInt(n.split("-")[1],10)/8,b=L4(e,r,i,y,"sha1"),S=N4.createDecipheriv(n,b,a),A=[];return A.push(S.update(f)),A.push(S.final()),oh.concat(A)}function og(t){var e;typeof t=="object"&&!oh.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=oh.from(t));var r=U4(t,e),i=r.tag,n=r.data,a,f;switch(i){case"CERTIFICATE":f=lt.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=lt.PublicKey.decode(n,"der")),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return lt.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=lt.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":n=lt.EncryptedPrivateKey.decode(n,"der"),n=F4(n,e);case"PRIVATE KEY":switch(f=lt.PrivateKey.decode(n,"der"),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return lt.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:lt.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=lt.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return lt.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return lt.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:lt.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=lt.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}og.signature=lt.signature;ag.exports=og});var sh=B((J9,fg)=>{w();var j4=Qn(),fh=Te().Buffer;fg.exports=function(t,e){for(var r=fh.alloc(0),i=0,n;r.length<e;)n=H4(i++),r=fh.concat([r,j4("sha1").update(t).update(n).digest()]);return r.slice(0,e)};function H4(t){var e=fh.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var uh=B((eR,sg)=>{w();sg.exports=function(e,r){for(var i=e.length,n=-1;++n<i;)e[n]^=r[n];return e}});var hh=B((rR,hg)=>{w();var ug=gr(),K4=Te().Buffer;function W4(t,e){return K4.from(t.toRed(ug.mont(e.modulus)).redPow(new ug(e.publicExponent)).fromRed().toArray())}hg.exports=W4});var cg=B((lg,lh)=>{w();(function(t,e){"use strict";function r(l,o){if(!l)throw new Error(o||"Assertion failed")}function i(l,o){l.super_=o;var u=function(){};u.prototype=o.prototype,l.prototype=new u,l.prototype.constructor=l}function n(l,o,u){if(n.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((o==="le"||o==="be")&&(u=o,o=10),this._init(l||0,o||10,u||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(o){return o instanceof n?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===n.wordSize&&Array.isArray(o.words)},n.max=function(o,u){return o.cmp(u)>0?o:u},n.min=function(o,u){return o.cmp(u)<0?o:u},n.prototype._init=function(o,u,d){if(typeof o=="number")return this._initNumber(o,u,d);if(typeof o=="object")return this._initArray(o,u,d);u==="hex"&&(u=16),r(u===(u|0)&&u>=2&&u<=36),o=o.toString().replace(/\s+/g,"");var g=0;o[0]==="-"&&(g++,this.negative=1),g<o.length&&(u===16?this._parseHex(o,g,d):(this._parseBase(o,u,g),d==="le"&&this._initArray(this.toArray(),u,d)))},n.prototype._initNumber=function(o,u,d){o<0&&(this.negative=1,o=-o),o<67108864?(this.words=[o&67108863],this.length=1):o<4503599627370496?(this.words=[o&67108863,o/67108864&67108863],this.length=2):(r(o<9007199254740992),this.words=[o&67108863,o/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),u,d)},n.prototype._initArray=function(o,u,d){if(r(typeof o.length=="number"),o.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(o.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p,s,m=0;if(d==="be")for(g=o.length-1,p=0;g>=0;g-=3)s=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[p]|=s<<m&67108863,this.words[p+1]=s>>>26-m&67108863,m+=24,m>=26&&(m-=26,p++);else if(d==="le")for(g=0,p=0;g<o.length;g+=3)s=o[g]|o[g+1]<<8|o[g+2]<<16,this.words[p]|=s<<m&67108863,this.words[p+1]=s>>>26-m&67108863,m+=24,m>=26&&(m-=26,p++);return this._strip()};function f(l,o){var u=l.charCodeAt(o);if(u>=48&&u<=57)return u-48;if(u>=65&&u<=70)return u-55;if(u>=97&&u<=102)return u-87;r(!1,"Invalid character in "+l)}function y(l,o,u){var d=f(l,u);return u-1>=o&&(d|=f(l,u-1)<<4),d}n.prototype._parseHex=function(o,u,d){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p=0,s=0,m;if(d==="be")for(g=o.length-1;g>=u;g-=2)m=y(o,u,g)<<p,this.words[s]|=m&67108863,p>=18?(p-=18,s+=1,this.words[s]|=m>>>26):p+=8;else{var _=o.length-u;for(g=_%2===0?u+1:u;g<o.length;g+=2)m=y(o,u,g)<<p,this.words[s]|=m&67108863,p>=18?(p-=18,s+=1,this.words[s]|=m>>>26):p+=8}this._strip()};function b(l,o,u,d){for(var g=0,p=0,s=Math.min(l.length,u),m=o;m<s;m++){var _=l.charCodeAt(m)-48;g*=d,_>=49?p=_-49+10:_>=17?p=_-17+10:p=_,r(_>=0&&p<d,"Invalid character"),g+=p}return g}n.prototype._parseBase=function(o,u,d){this.words=[0],this.length=1;for(var g=0,p=1;p<=67108863;p*=u)g++;g--,p=p/u|0;for(var s=o.length-d,m=s%g,_=Math.min(s,s-m)+d,c=0,x=d;x<_;x+=g)c=b(o,x,x+g,u),this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(m!==0){var O=1;for(c=b(o,x,o.length,u),x=0;x<m;x++)O*=u;this.imuln(O),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},n.prototype.copy=function(o){o.words=new Array(this.length);for(var u=0;u<this.length;u++)o.words[u]=this.words[u];o.length=this.length,o.negative=this.negative,o.red=this.red};function S(l,o){l.words=o.words,l.length=o.length,l.negative=o.negative,l.red=o.red}if(n.prototype._move=function(o){S(o,this)},n.prototype.clone=function(){var o=new n(null);return this.copy(o),o},n.prototype._expand=function(o){for(;this.length<o;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{n.prototype.inspect=A}else n.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var q=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],k=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(o,u){o=o||10,u=u|0||1;var d;if(o===16||o==="hex"){d="";for(var g=0,p=0,s=0;s<this.length;s++){var m=this.words[s],_=((m<<g|p)&16777215).toString(16);p=m>>>24-g&16777215,g+=2,g>=26&&(g-=26,s--),p!==0||s!==this.length-1?d=q[6-_.length]+_+d:d=_+d}for(p!==0&&(d=p.toString(16)+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(o===(o|0)&&o>=2&&o<=36){var c=k[o],x=P[o];d="";var O=this.clone();for(O.negative=0;!O.isZero();){var N=O.modrn(x).toString(o);O=O.idivn(x),O.isZero()?d=N+d:d=q[c-N.length]+N+d}for(this.isZero()&&(d="0"+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var o=this.words[0];return this.length===2?o+=this.words[1]*67108864:this.length===3&&this.words[2]===1?o+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-o:o},n.prototype.toJSON=function(){return this.toString(16,2)},a&&(n.prototype.toBuffer=function(o,u){return this.toArrayLike(a,o,u)}),n.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)};var H=function(o,u){return o.allocUnsafe?o.allocUnsafe(u):new o(u)};n.prototype.toArrayLike=function(o,u,d){this._strip();var g=this.byteLength(),p=d||Math.max(1,g);r(g<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0");var s=H(o,p),m=u==="le"?"LE":"BE";return this["_toArrayLike"+m](s,g),s},n.prototype._toArrayLikeLE=function(o,u){for(var d=0,g=0,p=0,s=0;p<this.length;p++){var m=this.words[p]<<s|g;o[d++]=m&255,d<o.length&&(o[d++]=m>>8&255),d<o.length&&(o[d++]=m>>16&255),s===6?(d<o.length&&(o[d++]=m>>24&255),g=0,s=0):(g=m>>>24,s+=2)}if(d<o.length)for(o[d++]=g;d<o.length;)o[d++]=0},n.prototype._toArrayLikeBE=function(o,u){for(var d=o.length-1,g=0,p=0,s=0;p<this.length;p++){var m=this.words[p]<<s|g;o[d--]=m&255,d>=0&&(o[d--]=m>>8&255),d>=0&&(o[d--]=m>>16&255),s===6?(d>=0&&(o[d--]=m>>24&255),g=0,s=0):(g=m>>>24,s+=2)}if(d>=0)for(o[d--]=g;d>=0;)o[d--]=0},Math.clz32?n.prototype._countBits=function(o){return 32-Math.clz32(o)}:n.prototype._countBits=function(o){var u=o,d=0;return u>=4096&&(d+=13,u>>>=13),u>=64&&(d+=7,u>>>=7),u>=8&&(d+=4,u>>>=4),u>=2&&(d+=2,u>>>=2),d+u},n.prototype._zeroBits=function(o){if(o===0)return 26;var u=o,d=0;return(u&8191)===0&&(d+=13,u>>>=13),(u&127)===0&&(d+=7,u>>>=7),(u&15)===0&&(d+=4,u>>>=4),(u&3)===0&&(d+=2,u>>>=2),(u&1)===0&&d++,d},n.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return(this.length-1)*26+u};function Z(l){for(var o=new Array(l.bitLength()),u=0;u<o.length;u++){var d=u/26|0,g=u%26;o[u]=l.words[d]>>>g&1}return o}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;u<this.length;u++){var d=this._zeroBits(this.words[u]);if(o+=d,d!==26)break}return o},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(o){return this.negative!==0?this.abs().inotn(o).iaddn(1):this.clone()},n.prototype.fromTwos=function(o){return this.testn(o-1)?this.notn(o).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(o){for(;this.length<o.length;)this.words[this.length++]=0;for(var u=0;u<o.length;u++)this.words[u]=this.words[u]|o.words[u];return this._strip()},n.prototype.ior=function(o){return r((this.negative|o.negative)===0),this.iuor(o)},n.prototype.or=function(o){return this.length>o.length?this.clone().ior(o):o.clone().ior(this)},n.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},n.prototype.iuand=function(o){var u;this.length>o.length?u=o:u=this;for(var d=0;d<u.length;d++)this.words[d]=this.words[d]&o.words[d];return this.length=u.length,this._strip()},n.prototype.iand=function(o){return r((this.negative|o.negative)===0),this.iuand(o)},n.prototype.and=function(o){return this.length>o.length?this.clone().iand(o):o.clone().iand(this)},n.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},n.prototype.iuxor=function(o){var u,d;this.length>o.length?(u=this,d=o):(u=o,d=this);for(var g=0;g<d.length;g++)this.words[g]=u.words[g]^d.words[g];if(this!==u)for(;g<u.length;g++)this.words[g]=u.words[g];return this.length=u.length,this._strip()},n.prototype.ixor=function(o){return r((this.negative|o.negative)===0),this.iuxor(o)},n.prototype.xor=function(o){return this.length>o.length?this.clone().ixor(o):o.clone().ixor(this)},n.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},n.prototype.inotn=function(o){r(typeof o=="number"&&o>=0);var u=Math.ceil(o/26)|0,d=o%26;this._expand(u),d>0&&u--;for(var g=0;g<u;g++)this.words[g]=~this.words[g]&67108863;return d>0&&(this.words[g]=~this.words[g]&67108863>>26-d),this._strip()},n.prototype.notn=function(o){return this.clone().inotn(o)},n.prototype.setn=function(o,u){r(typeof o=="number"&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),u?this.words[d]=this.words[d]|1<<g:this.words[d]=this.words[d]&~(1<<g),this._strip()},n.prototype.iadd=function(o){var u;if(this.negative!==0&&o.negative===0)return this.negative=0,u=this.isub(o),this.negative^=1,this._normSign();if(this.negative===0&&o.negative!==0)return o.negative=0,u=this.isub(o),o.negative=1,u._normSign();var d,g;this.length>o.length?(d=this,g=o):(d=o,g=this);for(var p=0,s=0;s<g.length;s++)u=(d.words[s]|0)+(g.words[s]|0)+p,this.words[s]=u&67108863,p=u>>>26;for(;p!==0&&s<d.length;s++)u=(d.words[s]|0)+p,this.words[s]=u&67108863,p=u>>>26;if(this.length=d.length,p!==0)this.words[this.length]=p,this.length++;else if(d!==this)for(;s<d.length;s++)this.words[s]=d.words[s];return this},n.prototype.add=function(o){var u;return o.negative!==0&&this.negative===0?(o.negative=0,u=this.sub(o),o.negative^=1,u):o.negative===0&&this.negative!==0?(this.negative=0,u=o.sub(this),this.negative=1,u):this.length>o.length?this.clone().iadd(o):o.clone().iadd(this)},n.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var d=this.cmp(o);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,p;d>0?(g=this,p=o):(g=o,p=this);for(var s=0,m=0;m<p.length;m++)u=(g.words[m]|0)-(p.words[m]|0)+s,s=u>>26,this.words[m]=u&67108863;for(;s!==0&&m<g.length;m++)u=(g.words[m]|0)+s,s=u>>26,this.words[m]=u&67108863;if(s===0&&m<g.length&&g!==this)for(;m<g.length;m++)this.words[m]=g.words[m];return this.length=Math.max(this.length,m),g!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(o){return this.clone().isub(o)};function ke(l,o,u){u.negative=o.negative^l.negative;var d=l.length+o.length|0;u.length=d,d=d-1|0;var g=l.words[0]|0,p=o.words[0]|0,s=g*p,m=s&67108863,_=s/67108864|0;u.words[0]=m;for(var c=1;c<d;c++){for(var x=_>>>26,O=_&67108863,N=Math.min(c,o.length-1),D=Math.max(0,c-l.length+1);D<=N;D++){var W=c-D|0;g=l.words[W]|0,p=o.words[D]|0,s=g*p+O,x+=s/67108864|0,O=s&67108863}u.words[c]=O|0,_=x|0}return _!==0?u.words[c]=_|0:u.length--,u._strip()}var V=function(o,u,d){var g=o.words,p=u.words,s=d.words,m=0,_,c,x,O=g[0]|0,N=O&8191,D=O>>>13,W=g[1]|0,K=W&8191,G=W>>>13,Mt=g[2]|0,$=Mt&8191,z=Mt>>>13,en=g[3]|0,J=en&8191,Q=en>>>13,tn=g[4]|0,ee=tn&8191,te=tn>>>13,rn=g[5]|0,re=rn&8191,ie=rn>>>13,nn=g[6]|0,ne=nn&8191,oe=nn>>>13,on=g[7]|0,ae=on&8191,fe=on>>>13,an=g[8]|0,se=an&8191,ue=an>>>13,fn=g[9]|0,he=fn&8191,le=fn>>>13,sn=p[0]|0,ce=sn&8191,de=sn>>>13,un=p[1]|0,pe=un&8191,ve=un>>>13,hn=p[2]|0,ye=hn&8191,ge=hn>>>13,ln=p[3]|0,me=ln&8191,be=ln>>>13,cn=p[4]|0,we=cn&8191,_e=cn>>>13,dn=p[5]|0,xe=dn&8191,Me=dn>>>13,pn=p[6]|0,Ee=pn&8191,Se=pn>>>13,vn=p[7]|0,Be=vn&8191,Ae=vn>>>13,yn=p[8]|0,Re=yn&8191,qe=yn>>>13,di=p[9]|0,Ke=di&8191,We=di>>>13;d.negative=o.negative^u.negative,d.length=19,_=Math.imul(N,ce),c=Math.imul(N,de),c=c+Math.imul(D,ce)|0,x=Math.imul(D,de);var wr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(wr>>>26)|0,wr&=67108863,_=Math.imul(K,ce),c=Math.imul(K,de),c=c+Math.imul(G,ce)|0,x=Math.imul(G,de),_=_+Math.imul(N,pe)|0,c=c+Math.imul(N,ve)|0,c=c+Math.imul(D,pe)|0,x=x+Math.imul(D,ve)|0;var _r=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(_r>>>26)|0,_r&=67108863,_=Math.imul($,ce),c=Math.imul($,de),c=c+Math.imul(z,ce)|0,x=Math.imul(z,de),_=_+Math.imul(K,pe)|0,c=c+Math.imul(K,ve)|0,c=c+Math.imul(G,pe)|0,x=x+Math.imul(G,ve)|0,_=_+Math.imul(N,ye)|0,c=c+Math.imul(N,ge)|0,c=c+Math.imul(D,ye)|0,x=x+Math.imul(D,ge)|0;var xr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(xr>>>26)|0,xr&=67108863,_=Math.imul(J,ce),c=Math.imul(J,de),c=c+Math.imul(Q,ce)|0,x=Math.imul(Q,de),_=_+Math.imul($,pe)|0,c=c+Math.imul($,ve)|0,c=c+Math.imul(z,pe)|0,x=x+Math.imul(z,ve)|0,_=_+Math.imul(K,ye)|0,c=c+Math.imul(K,ge)|0,c=c+Math.imul(G,ye)|0,x=x+Math.imul(G,ge)|0,_=_+Math.imul(N,me)|0,c=c+Math.imul(N,be)|0,c=c+Math.imul(D,me)|0,x=x+Math.imul(D,be)|0;var Mr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,_=Math.imul(ee,ce),c=Math.imul(ee,de),c=c+Math.imul(te,ce)|0,x=Math.imul(te,de),_=_+Math.imul(J,pe)|0,c=c+Math.imul(J,ve)|0,c=c+Math.imul(Q,pe)|0,x=x+Math.imul(Q,ve)|0,_=_+Math.imul($,ye)|0,c=c+Math.imul($,ge)|0,c=c+Math.imul(z,ye)|0,x=x+Math.imul(z,ge)|0,_=_+Math.imul(K,me)|0,c=c+Math.imul(K,be)|0,c=c+Math.imul(G,me)|0,x=x+Math.imul(G,be)|0,_=_+Math.imul(N,we)|0,c=c+Math.imul(N,_e)|0,c=c+Math.imul(D,we)|0,x=x+Math.imul(D,_e)|0;var Er=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Er>>>26)|0,Er&=67108863,_=Math.imul(re,ce),c=Math.imul(re,de),c=c+Math.imul(ie,ce)|0,x=Math.imul(ie,de),_=_+Math.imul(ee,pe)|0,c=c+Math.imul(ee,ve)|0,c=c+Math.imul(te,pe)|0,x=x+Math.imul(te,ve)|0,_=_+Math.imul(J,ye)|0,c=c+Math.imul(J,ge)|0,c=c+Math.imul(Q,ye)|0,x=x+Math.imul(Q,ge)|0,_=_+Math.imul($,me)|0,c=c+Math.imul($,be)|0,c=c+Math.imul(z,me)|0,x=x+Math.imul(z,be)|0,_=_+Math.imul(K,we)|0,c=c+Math.imul(K,_e)|0,c=c+Math.imul(G,we)|0,x=x+Math.imul(G,_e)|0,_=_+Math.imul(N,xe)|0,c=c+Math.imul(N,Me)|0,c=c+Math.imul(D,xe)|0,x=x+Math.imul(D,Me)|0;var Sr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,_=Math.imul(ne,ce),c=Math.imul(ne,de),c=c+Math.imul(oe,ce)|0,x=Math.imul(oe,de),_=_+Math.imul(re,pe)|0,c=c+Math.imul(re,ve)|0,c=c+Math.imul(ie,pe)|0,x=x+Math.imul(ie,ve)|0,_=_+Math.imul(ee,ye)|0,c=c+Math.imul(ee,ge)|0,c=c+Math.imul(te,ye)|0,x=x+Math.imul(te,ge)|0,_=_+Math.imul(J,me)|0,c=c+Math.imul(J,be)|0,c=c+Math.imul(Q,me)|0,x=x+Math.imul(Q,be)|0,_=_+Math.imul($,we)|0,c=c+Math.imul($,_e)|0,c=c+Math.imul(z,we)|0,x=x+Math.imul(z,_e)|0,_=_+Math.imul(K,xe)|0,c=c+Math.imul(K,Me)|0,c=c+Math.imul(G,xe)|0,x=x+Math.imul(G,Me)|0,_=_+Math.imul(N,Ee)|0,c=c+Math.imul(N,Se)|0,c=c+Math.imul(D,Ee)|0,x=x+Math.imul(D,Se)|0;var Br=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Br>>>26)|0,Br&=67108863,_=Math.imul(ae,ce),c=Math.imul(ae,de),c=c+Math.imul(fe,ce)|0,x=Math.imul(fe,de),_=_+Math.imul(ne,pe)|0,c=c+Math.imul(ne,ve)|0,c=c+Math.imul(oe,pe)|0,x=x+Math.imul(oe,ve)|0,_=_+Math.imul(re,ye)|0,c=c+Math.imul(re,ge)|0,c=c+Math.imul(ie,ye)|0,x=x+Math.imul(ie,ge)|0,_=_+Math.imul(ee,me)|0,c=c+Math.imul(ee,be)|0,c=c+Math.imul(te,me)|0,x=x+Math.imul(te,be)|0,_=_+Math.imul(J,we)|0,c=c+Math.imul(J,_e)|0,c=c+Math.imul(Q,we)|0,x=x+Math.imul(Q,_e)|0,_=_+Math.imul($,xe)|0,c=c+Math.imul($,Me)|0,c=c+Math.imul(z,xe)|0,x=x+Math.imul(z,Me)|0,_=_+Math.imul(K,Ee)|0,c=c+Math.imul(K,Se)|0,c=c+Math.imul(G,Ee)|0,x=x+Math.imul(G,Se)|0,_=_+Math.imul(N,Be)|0,c=c+Math.imul(N,Ae)|0,c=c+Math.imul(D,Be)|0,x=x+Math.imul(D,Ae)|0;var Ar=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,_=Math.imul(se,ce),c=Math.imul(se,de),c=c+Math.imul(ue,ce)|0,x=Math.imul(ue,de),_=_+Math.imul(ae,pe)|0,c=c+Math.imul(ae,ve)|0,c=c+Math.imul(fe,pe)|0,x=x+Math.imul(fe,ve)|0,_=_+Math.imul(ne,ye)|0,c=c+Math.imul(ne,ge)|0,c=c+Math.imul(oe,ye)|0,x=x+Math.imul(oe,ge)|0,_=_+Math.imul(re,me)|0,c=c+Math.imul(re,be)|0,c=c+Math.imul(ie,me)|0,x=x+Math.imul(ie,be)|0,_=_+Math.imul(ee,we)|0,c=c+Math.imul(ee,_e)|0,c=c+Math.imul(te,we)|0,x=x+Math.imul(te,_e)|0,_=_+Math.imul(J,xe)|0,c=c+Math.imul(J,Me)|0,c=c+Math.imul(Q,xe)|0,x=x+Math.imul(Q,Me)|0,_=_+Math.imul($,Ee)|0,c=c+Math.imul($,Se)|0,c=c+Math.imul(z,Ee)|0,x=x+Math.imul(z,Se)|0,_=_+Math.imul(K,Be)|0,c=c+Math.imul(K,Ae)|0,c=c+Math.imul(G,Be)|0,x=x+Math.imul(G,Ae)|0,_=_+Math.imul(N,Re)|0,c=c+Math.imul(N,qe)|0,c=c+Math.imul(D,Re)|0,x=x+Math.imul(D,qe)|0;var Rr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,_=Math.imul(he,ce),c=Math.imul(he,de),c=c+Math.imul(le,ce)|0,x=Math.imul(le,de),_=_+Math.imul(se,pe)|0,c=c+Math.imul(se,ve)|0,c=c+Math.imul(ue,pe)|0,x=x+Math.imul(ue,ve)|0,_=_+Math.imul(ae,ye)|0,c=c+Math.imul(ae,ge)|0,c=c+Math.imul(fe,ye)|0,x=x+Math.imul(fe,ge)|0,_=_+Math.imul(ne,me)|0,c=c+Math.imul(ne,be)|0,c=c+Math.imul(oe,me)|0,x=x+Math.imul(oe,be)|0,_=_+Math.imul(re,we)|0,c=c+Math.imul(re,_e)|0,c=c+Math.imul(ie,we)|0,x=x+Math.imul(ie,_e)|0,_=_+Math.imul(ee,xe)|0,c=c+Math.imul(ee,Me)|0,c=c+Math.imul(te,xe)|0,x=x+Math.imul(te,Me)|0,_=_+Math.imul(J,Ee)|0,c=c+Math.imul(J,Se)|0,c=c+Math.imul(Q,Ee)|0,x=x+Math.imul(Q,Se)|0,_=_+Math.imul($,Be)|0,c=c+Math.imul($,Ae)|0,c=c+Math.imul(z,Be)|0,x=x+Math.imul(z,Ae)|0,_=_+Math.imul(K,Re)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(G,Re)|0,x=x+Math.imul(G,qe)|0,_=_+Math.imul(N,Ke)|0,c=c+Math.imul(N,We)|0,c=c+Math.imul(D,Ke)|0,x=x+Math.imul(D,We)|0;var qr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(qr>>>26)|0,qr&=67108863,_=Math.imul(he,pe),c=Math.imul(he,ve),c=c+Math.imul(le,pe)|0,x=Math.imul(le,ve),_=_+Math.imul(se,ye)|0,c=c+Math.imul(se,ge)|0,c=c+Math.imul(ue,ye)|0,x=x+Math.imul(ue,ge)|0,_=_+Math.imul(ae,me)|0,c=c+Math.imul(ae,be)|0,c=c+Math.imul(fe,me)|0,x=x+Math.imul(fe,be)|0,_=_+Math.imul(ne,we)|0,c=c+Math.imul(ne,_e)|0,c=c+Math.imul(oe,we)|0,x=x+Math.imul(oe,_e)|0,_=_+Math.imul(re,xe)|0,c=c+Math.imul(re,Me)|0,c=c+Math.imul(ie,xe)|0,x=x+Math.imul(ie,Me)|0,_=_+Math.imul(ee,Ee)|0,c=c+Math.imul(ee,Se)|0,c=c+Math.imul(te,Ee)|0,x=x+Math.imul(te,Se)|0,_=_+Math.imul(J,Be)|0,c=c+Math.imul(J,Ae)|0,c=c+Math.imul(Q,Be)|0,x=x+Math.imul(Q,Ae)|0,_=_+Math.imul($,Re)|0,c=c+Math.imul($,qe)|0,c=c+Math.imul(z,Re)|0,x=x+Math.imul(z,qe)|0,_=_+Math.imul(K,Ke)|0,c=c+Math.imul(K,We)|0,c=c+Math.imul(G,Ke)|0,x=x+Math.imul(G,We)|0;var Tr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,_=Math.imul(he,ye),c=Math.imul(he,ge),c=c+Math.imul(le,ye)|0,x=Math.imul(le,ge),_=_+Math.imul(se,me)|0,c=c+Math.imul(se,be)|0,c=c+Math.imul(ue,me)|0,x=x+Math.imul(ue,be)|0,_=_+Math.imul(ae,we)|0,c=c+Math.imul(ae,_e)|0,c=c+Math.imul(fe,we)|0,x=x+Math.imul(fe,_e)|0,_=_+Math.imul(ne,xe)|0,c=c+Math.imul(ne,Me)|0,c=c+Math.imul(oe,xe)|0,x=x+Math.imul(oe,Me)|0,_=_+Math.imul(re,Ee)|0,c=c+Math.imul(re,Se)|0,c=c+Math.imul(ie,Ee)|0,x=x+Math.imul(ie,Se)|0,_=_+Math.imul(ee,Be)|0,c=c+Math.imul(ee,Ae)|0,c=c+Math.imul(te,Be)|0,x=x+Math.imul(te,Ae)|0,_=_+Math.imul(J,Re)|0,c=c+Math.imul(J,qe)|0,c=c+Math.imul(Q,Re)|0,x=x+Math.imul(Q,qe)|0,_=_+Math.imul($,Ke)|0,c=c+Math.imul($,We)|0,c=c+Math.imul(z,Ke)|0,x=x+Math.imul(z,We)|0;var Ir=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,_=Math.imul(he,me),c=Math.imul(he,be),c=c+Math.imul(le,me)|0,x=Math.imul(le,be),_=_+Math.imul(se,we)|0,c=c+Math.imul(se,_e)|0,c=c+Math.imul(ue,we)|0,x=x+Math.imul(ue,_e)|0,_=_+Math.imul(ae,xe)|0,c=c+Math.imul(ae,Me)|0,c=c+Math.imul(fe,xe)|0,x=x+Math.imul(fe,Me)|0,_=_+Math.imul(ne,Ee)|0,c=c+Math.imul(ne,Se)|0,c=c+Math.imul(oe,Ee)|0,x=x+Math.imul(oe,Se)|0,_=_+Math.imul(re,Be)|0,c=c+Math.imul(re,Ae)|0,c=c+Math.imul(ie,Be)|0,x=x+Math.imul(ie,Ae)|0,_=_+Math.imul(ee,Re)|0,c=c+Math.imul(ee,qe)|0,c=c+Math.imul(te,Re)|0,x=x+Math.imul(te,qe)|0,_=_+Math.imul(J,Ke)|0,c=c+Math.imul(J,We)|0,c=c+Math.imul(Q,Ke)|0,x=x+Math.imul(Q,We)|0;var kr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(kr>>>26)|0,kr&=67108863,_=Math.imul(he,we),c=Math.imul(he,_e),c=c+Math.imul(le,we)|0,x=Math.imul(le,_e),_=_+Math.imul(se,xe)|0,c=c+Math.imul(se,Me)|0,c=c+Math.imul(ue,xe)|0,x=x+Math.imul(ue,Me)|0,_=_+Math.imul(ae,Ee)|0,c=c+Math.imul(ae,Se)|0,c=c+Math.imul(fe,Ee)|0,x=x+Math.imul(fe,Se)|0,_=_+Math.imul(ne,Be)|0,c=c+Math.imul(ne,Ae)|0,c=c+Math.imul(oe,Be)|0,x=x+Math.imul(oe,Ae)|0,_=_+Math.imul(re,Re)|0,c=c+Math.imul(re,qe)|0,c=c+Math.imul(ie,Re)|0,x=x+Math.imul(ie,qe)|0,_=_+Math.imul(ee,Ke)|0,c=c+Math.imul(ee,We)|0,c=c+Math.imul(te,Ke)|0,x=x+Math.imul(te,We)|0;var Cr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,_=Math.imul(he,xe),c=Math.imul(he,Me),c=c+Math.imul(le,xe)|0,x=Math.imul(le,Me),_=_+Math.imul(se,Ee)|0,c=c+Math.imul(se,Se)|0,c=c+Math.imul(ue,Ee)|0,x=x+Math.imul(ue,Se)|0,_=_+Math.imul(ae,Be)|0,c=c+Math.imul(ae,Ae)|0,c=c+Math.imul(fe,Be)|0,x=x+Math.imul(fe,Ae)|0,_=_+Math.imul(ne,Re)|0,c=c+Math.imul(ne,qe)|0,c=c+Math.imul(oe,Re)|0,x=x+Math.imul(oe,qe)|0,_=_+Math.imul(re,Ke)|0,c=c+Math.imul(re,We)|0,c=c+Math.imul(ie,Ke)|0,x=x+Math.imul(ie,We)|0;var Or=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Or>>>26)|0,Or&=67108863,_=Math.imul(he,Ee),c=Math.imul(he,Se),c=c+Math.imul(le,Ee)|0,x=Math.imul(le,Se),_=_+Math.imul(se,Be)|0,c=c+Math.imul(se,Ae)|0,c=c+Math.imul(ue,Be)|0,x=x+Math.imul(ue,Ae)|0,_=_+Math.imul(ae,Re)|0,c=c+Math.imul(ae,qe)|0,c=c+Math.imul(fe,Re)|0,x=x+Math.imul(fe,qe)|0,_=_+Math.imul(ne,Ke)|0,c=c+Math.imul(ne,We)|0,c=c+Math.imul(oe,Ke)|0,x=x+Math.imul(oe,We)|0;var Pr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,_=Math.imul(he,Be),c=Math.imul(he,Ae),c=c+Math.imul(le,Be)|0,x=Math.imul(le,Ae),_=_+Math.imul(se,Re)|0,c=c+Math.imul(se,qe)|0,c=c+Math.imul(ue,Re)|0,x=x+Math.imul(ue,qe)|0,_=_+Math.imul(ae,Ke)|0,c=c+Math.imul(ae,We)|0,c=c+Math.imul(fe,Ke)|0,x=x+Math.imul(fe,We)|0;var uf=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(uf>>>26)|0,uf&=67108863,_=Math.imul(he,Re),c=Math.imul(he,qe),c=c+Math.imul(le,Re)|0,x=Math.imul(le,qe),_=_+Math.imul(se,Ke)|0,c=c+Math.imul(se,We)|0,c=c+Math.imul(ue,Ke)|0,x=x+Math.imul(ue,We)|0;var hf=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(hf>>>26)|0,hf&=67108863,_=Math.imul(he,Ke),c=Math.imul(he,We),c=c+Math.imul(le,Ke)|0,x=Math.imul(le,We);var lf=(m+_|0)+((c&8191)<<13)|0;return m=(x+(c>>>13)|0)+(lf>>>26)|0,lf&=67108863,s[0]=wr,s[1]=_r,s[2]=xr,s[3]=Mr,s[4]=Er,s[5]=Sr,s[6]=Br,s[7]=Ar,s[8]=Rr,s[9]=qr,s[10]=Tr,s[11]=Ir,s[12]=kr,s[13]=Cr,s[14]=Or,s[15]=Pr,s[16]=uf,s[17]=hf,s[18]=lf,m!==0&&(s[19]=m,d.length++),d};Math.imul||(V=ke);function Y(l,o,u){u.negative=o.negative^l.negative,u.length=l.length+o.length;for(var d=0,g=0,p=0;p<u.length-1;p++){var s=g;g=0;for(var m=d&67108863,_=Math.min(p,o.length-1),c=Math.max(0,p-l.length+1);c<=_;c++){var x=p-c,O=l.words[x]|0,N=o.words[c]|0,D=O*N,W=D&67108863;s=s+(D/67108864|0)|0,W=W+m|0,m=W&67108863,s=s+(W>>>26)|0,g+=s>>>26,s&=67108863}u.words[p]=m,d=s,s=g}return d!==0?u.words[p]=d:u.length--,u._strip()}function He(l,o,u){return Y(l,o,u)}n.prototype.mulTo=function(o,u){var d,g=this.length+o.length;return this.length===10&&o.length===10?d=V(this,o,u):g<63?d=ke(this,o,u):g<1024?d=Y(this,o,u):d=He(this,o,u),d};function T(l,o){this.x=l,this.y=o}T.prototype.makeRBT=function(o){for(var u=new Array(o),d=n.prototype._countBits(o)-1,g=0;g<o;g++)u[g]=this.revBin(g,d,o);return u},T.prototype.revBin=function(o,u,d){if(o===0||o===d-1)return o;for(var g=0,p=0;p<u;p++)g|=(o&1)<<u-p-1,o>>=1;return g},T.prototype.permute=function(o,u,d,g,p,s){for(var m=0;m<s;m++)g[m]=u[o[m]],p[m]=d[o[m]]},T.prototype.transform=function(o,u,d,g,p,s){this.permute(s,o,u,d,g,p);for(var m=1;m<p;m<<=1)for(var _=m<<1,c=Math.cos(2*Math.PI/_),x=Math.sin(2*Math.PI/_),O=0;O<p;O+=_)for(var N=c,D=x,W=0;W<m;W++){var K=d[O+W],G=g[O+W],Mt=d[O+W+m],$=g[O+W+m],z=N*Mt-D*$;$=N*$+D*Mt,Mt=z,d[O+W]=K+Mt,g[O+W]=G+$,d[O+W+m]=K-Mt,g[O+W+m]=G-$,W!==_&&(z=c*N-x*D,D=c*D+x*N,N=z)}},T.prototype.guessLen13b=function(o,u){var d=Math.max(u,o)|1,g=d&1,p=0;for(d=d/2|0;d;d=d>>>1)p++;return 1<<p+1+g},T.prototype.conjugate=function(o,u,d){if(!(d<=1))for(var g=0;g<d/2;g++){var p=o[g];o[g]=o[d-g-1],o[d-g-1]=p,p=u[g],u[g]=-u[d-g-1],u[d-g-1]=-p}},T.prototype.normalize13b=function(o,u){for(var d=0,g=0;g<u/2;g++){var p=Math.round(o[2*g+1]/u)*8192+Math.round(o[2*g]/u)+d;o[g]=p&67108863,p<67108864?d=0:d=p/67108864|0}return o},T.prototype.convert13b=function(o,u,d,g){for(var p=0,s=0;s<u;s++)p=p+(o[s]|0),d[2*s]=p&8191,p=p>>>13,d[2*s+1]=p&8191,p=p>>>13;for(s=2*u;s<g;++s)d[s]=0;r(p===0),r((p&-8192)===0)},T.prototype.stub=function(o){for(var u=new Array(o),d=0;d<o;d++)u[d]=0;return u},T.prototype.mulp=function(o,u,d){var g=2*this.guessLen13b(o.length,u.length),p=this.makeRBT(g),s=this.stub(g),m=new Array(g),_=new Array(g),c=new Array(g),x=new Array(g),O=new Array(g),N=new Array(g),D=d.words;D.length=g,this.convert13b(o.words,o.length,m,g),this.convert13b(u.words,u.length,x,g),this.transform(m,s,_,c,g,p),this.transform(x,s,O,N,g,p);for(var W=0;W<g;W++){var K=_[W]*O[W]-c[W]*N[W];c[W]=_[W]*N[W]+c[W]*O[W],_[W]=K}return this.conjugate(_,c,g),this.transform(_,c,D,s,g,p),this.conjugate(D,s,g),this.normalize13b(D,g),d.negative=o.negative^u.negative,d.length=o.length+u.length,d._strip()},n.prototype.mul=function(o){var u=new n(null);return u.words=new Array(this.length+o.length),this.mulTo(o,u)},n.prototype.mulf=function(o){var u=new n(null);return u.words=new Array(this.length+o.length),He(this,o,u)},n.prototype.imul=function(o){return this.clone().mulTo(o,this)},n.prototype.imuln=function(o){var u=o<0;u&&(o=-o),r(typeof o=="number"),r(o<67108864);for(var d=0,g=0;g<this.length;g++){var p=(this.words[g]|0)*o,s=(p&67108863)+(d&67108863);d>>=26,d+=p/67108864|0,d+=s>>>26,this.words[g]=s&67108863}return d!==0&&(this.words[g]=d,this.length++),this.length=o===0?1:this.length,u?this.ineg():this},n.prototype.muln=function(o){return this.clone().imuln(o)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(o){var u=Z(o);if(u.length===0)return new n(1);for(var d=this,g=0;g<u.length&&u[g]===0;g++,d=d.sqr());if(++g<u.length)for(var p=d.sqr();g<u.length;g++,p=p.sqr())u[g]!==0&&(d=d.mul(p));return d},n.prototype.iushln=function(o){r(typeof o=="number"&&o>=0);var u=o%26,d=(o-u)/26,g=67108863>>>26-u<<26-u,p;if(u!==0){var s=0;for(p=0;p<this.length;p++){var m=this.words[p]&g,_=(this.words[p]|0)-m<<u;this.words[p]=_|s,s=m>>>26-u}s&&(this.words[p]=s,this.length++)}if(d!==0){for(p=this.length-1;p>=0;p--)this.words[p+d]=this.words[p];for(p=0;p<d;p++)this.words[p]=0;this.length+=d}return this._strip()},n.prototype.ishln=function(o){return r(this.negative===0),this.iushln(o)},n.prototype.iushrn=function(o,u,d){r(typeof o=="number"&&o>=0);var g;u?g=(u-u%26)/26:g=0;var p=o%26,s=Math.min((o-p)/26,this.length),m=67108863^67108863>>>p<<p,_=d;if(g-=s,g=Math.max(0,g),_){for(var c=0;c<s;c++)_.words[c]=this.words[c];_.length=s}if(s!==0)if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var x=0;for(c=this.length-1;c>=0&&(x!==0||c>=g);c--){var O=this.words[c]|0;this.words[c]=x<<26-p|O>>>p,x=O&m}return _&&x!==0&&(_.words[_.length++]=x),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(o,u,d){return r(this.negative===0),this.iushrn(o,u,d)},n.prototype.shln=function(o){return this.clone().ishln(o)},n.prototype.ushln=function(o){return this.clone().iushln(o)},n.prototype.shrn=function(o){return this.clone().ishrn(o)},n.prototype.ushrn=function(o){return this.clone().iushrn(o)},n.prototype.testn=function(o){r(typeof o=="number"&&o>=0);var u=o%26,d=(o-u)/26,g=1<<u;if(this.length<=d)return!1;var p=this.words[d];return!!(p&g)},n.prototype.imaskn=function(o){r(typeof o=="number"&&o>=0);var u=o%26,d=(o-u)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(u!==0&&d++,this.length=Math.min(d,this.length),u!==0){var g=67108863^67108863>>>u<<u;this.words[this.length-1]&=g}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(o){return this.clone().imaskn(o)},n.prototype.iaddn=function(o){return r(typeof o=="number"),r(o<67108864),o<0?this.isubn(-o):this.negative!==0?this.length===1&&(this.words[0]|0)<=o?(this.words[0]=o-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(o),this.negative=1,this):this._iaddn(o)},n.prototype._iaddn=function(o){this.words[0]+=o;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},n.prototype.isubn=function(o){if(r(typeof o=="number"),r(o<67108864),o<0)return this.iaddn(-o);if(this.negative!==0)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this._strip()},n.prototype.addn=function(o){return this.clone().iaddn(o)},n.prototype.subn=function(o){return this.clone().isubn(o)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(o,u,d){var g=o.length+d,p;this._expand(g);var s,m=0;for(p=0;p<o.length;p++){s=(this.words[p+d]|0)+m;var _=(o.words[p]|0)*u;s-=_&67108863,m=(s>>26)-(_/67108864|0),this.words[p+d]=s&67108863}for(;p<this.length-d;p++)s=(this.words[p+d]|0)+m,m=s>>26,this.words[p+d]=s&67108863;if(m===0)return this._strip();for(r(m===-1),m=0,p=0;p<this.length;p++)s=-(this.words[p]|0)+m,m=s>>26,this.words[p]=s&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(o,u){var d=this.length-o.length,g=this.clone(),p=o,s=p.words[p.length-1]|0,m=this._countBits(s);d=26-m,d!==0&&(p=p.ushln(d),g.iushln(d),s=p.words[p.length-1]|0);var _=g.length-p.length,c;if(u!=="mod"){c=new n(null),c.length=_+1,c.words=new Array(c.length);for(var x=0;x<c.length;x++)c.words[x]=0}var O=g.clone()._ishlnsubmul(p,1,_);O.negative===0&&(g=O,c&&(c.words[_]=1));for(var N=_-1;N>=0;N--){var D=(g.words[p.length+N]|0)*67108864+(g.words[p.length+N-1]|0);for(D=Math.min(D/s|0,67108863),g._ishlnsubmul(p,D,N);g.negative!==0;)D--,g.negative=0,g._ishlnsubmul(p,1,N),g.isZero()||(g.negative^=1);c&&(c.words[N]=D)}return c&&c._strip(),g._strip(),u!=="div"&&d!==0&&g.iushrn(d),{div:c||null,mod:g}},n.prototype.divmod=function(o,u,d){if(r(!o.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,p,s;return this.negative!==0&&o.negative===0?(s=this.neg().divmod(o,u),u!=="mod"&&(g=s.div.neg()),u!=="div"&&(p=s.mod.neg(),d&&p.negative!==0&&p.iadd(o)),{div:g,mod:p}):this.negative===0&&o.negative!==0?(s=this.divmod(o.neg(),u),u!=="mod"&&(g=s.div.neg()),{div:g,mod:s.mod}):(this.negative&o.negative)!==0?(s=this.neg().divmod(o.neg(),u),u!=="div"&&(p=s.mod.neg(),d&&p.negative!==0&&p.isub(o)),{div:s.div,mod:p}):o.length>this.length||this.cmp(o)<0?{div:new n(0),mod:this}:o.length===1?u==="div"?{div:this.divn(o.words[0]),mod:null}:u==="mod"?{div:null,mod:new n(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new n(this.modrn(o.words[0]))}:this._wordDiv(o,u)},n.prototype.div=function(o){return this.divmod(o,"div",!1).div},n.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},n.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},n.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var d=u.div.negative!==0?u.mod.isub(o):u.mod,g=o.ushrn(1),p=o.andln(1),s=d.cmp(g);return s<0||p===1&&s===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},n.prototype.modrn=function(o){var u=o<0;u&&(o=-o),r(o<=67108863);for(var d=(1<<26)%o,g=0,p=this.length-1;p>=0;p--)g=(d*g+(this.words[p]|0))%o;return u?-g:g},n.prototype.modn=function(o){return this.modrn(o)},n.prototype.idivn=function(o){var u=o<0;u&&(o=-o),r(o<=67108863);for(var d=0,g=this.length-1;g>=0;g--){var p=(this.words[g]|0)+d*67108864;this.words[g]=p/o|0,d=p%o}return this._strip(),u?this.ineg():this},n.prototype.divn=function(o){return this.clone().idivn(o)},n.prototype.egcd=function(o){r(o.negative===0),r(!o.isZero());var u=this,d=o.clone();u.negative!==0?u=u.umod(o):u=u.clone();for(var g=new n(1),p=new n(0),s=new n(0),m=new n(1),_=0;u.isEven()&&d.isEven();)u.iushrn(1),d.iushrn(1),++_;for(var c=d.clone(),x=u.clone();!u.isZero();){for(var O=0,N=1;(u.words[0]&N)===0&&O<26;++O,N<<=1);if(O>0)for(u.iushrn(O);O-- >0;)(g.isOdd()||p.isOdd())&&(g.iadd(c),p.isub(x)),g.iushrn(1),p.iushrn(1);for(var D=0,W=1;(d.words[0]&W)===0&&D<26;++D,W<<=1);if(D>0)for(d.iushrn(D);D-- >0;)(s.isOdd()||m.isOdd())&&(s.iadd(c),m.isub(x)),s.iushrn(1),m.iushrn(1);u.cmp(d)>=0?(u.isub(d),g.isub(s),p.isub(m)):(d.isub(u),s.isub(g),m.isub(p))}return{a:s,b:m,gcd:d.iushln(_)}},n.prototype._invmp=function(o){r(o.negative===0),r(!o.isZero());var u=this,d=o.clone();u.negative!==0?u=u.umod(o):u=u.clone();for(var g=new n(1),p=new n(0),s=d.clone();u.cmpn(1)>0&&d.cmpn(1)>0;){for(var m=0,_=1;(u.words[0]&_)===0&&m<26;++m,_<<=1);if(m>0)for(u.iushrn(m);m-- >0;)g.isOdd()&&g.iadd(s),g.iushrn(1);for(var c=0,x=1;(d.words[0]&x)===0&&c<26;++c,x<<=1);if(c>0)for(d.iushrn(c);c-- >0;)p.isOdd()&&p.iadd(s),p.iushrn(1);u.cmp(d)>=0?(u.isub(d),g.isub(p)):(d.isub(u),p.isub(g))}var O;return u.cmpn(1)===0?O=g:O=p,O.cmpn(0)<0&&O.iadd(o),O},n.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),d=o.clone();u.negative=0,d.negative=0;for(var g=0;u.isEven()&&d.isEven();g++)u.iushrn(1),d.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;d.isEven();)d.iushrn(1);var p=u.cmp(d);if(p<0){var s=u;u=d,d=s}else if(p===0||d.cmpn(1)===0)break;u.isub(d)}while(!0);return d.iushln(g)},n.prototype.invm=function(o){return this.egcd(o).a.umod(o)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(o){return this.words[0]&o},n.prototype.bincn=function(o){r(typeof o=="number");var u=o%26,d=(o-u)/26,g=1<<u;if(this.length<=d)return this._expand(d+1),this.words[d]|=g,this;for(var p=g,s=d;p!==0&&s<this.length;s++){var m=this.words[s]|0;m+=p,p=m>>>26,m&=67108863,this.words[s]=m}return p!==0&&(this.words[s]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(o){var u=o<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this._strip();var d;if(this.length>1)d=1;else{u&&(o=-o),r(o<=67108863,"Number is too big");var g=this.words[0]|0;d=g===o?0:g<o?-1:1}return this.negative!==0?-d|0:d},n.prototype.cmp=function(o){if(this.negative!==0&&o.negative===0)return-1;if(this.negative===0&&o.negative!==0)return 1;var u=this.ucmp(o);return this.negative!==0?-u|0:u},n.prototype.ucmp=function(o){if(this.length>o.length)return 1;if(this.length<o.length)return-1;for(var u=0,d=this.length-1;d>=0;d--){var g=this.words[d]|0,p=o.words[d]|0;if(g!==p){g<p?u=-1:g>p&&(u=1);break}}return u},n.prototype.gtn=function(o){return this.cmpn(o)===1},n.prototype.gt=function(o){return this.cmp(o)===1},n.prototype.gten=function(o){return this.cmpn(o)>=0},n.prototype.gte=function(o){return this.cmp(o)>=0},n.prototype.ltn=function(o){return this.cmpn(o)===-1},n.prototype.lt=function(o){return this.cmp(o)===-1},n.prototype.lten=function(o){return this.cmpn(o)<=0},n.prototype.lte=function(o){return this.cmp(o)<=0},n.prototype.eqn=function(o){return this.cmpn(o)===0},n.prototype.eq=function(o){return this.cmp(o)===0},n.red=function(o){return new h(o)},n.prototype.toRed=function(o){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),o.convertTo(this)._forceRed(o)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(o){return this.red=o,this},n.prototype.forceRed=function(o){return r(!this.red,"Already a number in reduction context"),this._forceRed(o)},n.prototype.redAdd=function(o){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},n.prototype.redIAdd=function(o){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},n.prototype.redSub=function(o){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},n.prototype.redISub=function(o){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},n.prototype.redShl=function(o){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},n.prototype.redMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},n.prototype.redIMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(o){return r(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var C={k256:null,p224:null,p192:null,p25519:null};function U(l,o){this.name=l,this.p=new n(o,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}U.prototype._tmp=function(){var o=new n(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var u=o,d;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),d=u.bitLength();while(d>this.n);var g=d<this.n?-1:u.ucmp(this.p);return g===0?(u.words[0]=0,u.length=1):g>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},U.prototype.split=function(o,u){o.iushrn(this.n,0,u)},U.prototype.imulK=function(o){return o.imul(this.k)};function L(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(L,U),L.prototype.split=function(o,u){for(var d=4194303,g=Math.min(o.length,9),p=0;p<g;p++)u.words[p]=o.words[p];if(u.length=g,o.length<=9){o.words[0]=0,o.length=1;return}var s=o.words[9];for(u.words[u.length++]=s&d,p=10;p<o.length;p++){var m=o.words[p]|0;o.words[p-10]=(m&d)<<4|s>>>22,s=m}s>>>=22,o.words[p-10]=s,s===0&&o.length>10?o.length-=10:o.length-=9},L.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,d=0;d<o.length;d++){var g=o.words[d]|0;u+=g*977,o.words[d]=u&67108863,u=g*64+(u/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function F(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,U);function j(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(j,U);function M(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(M,U),M.prototype.imulK=function(o){for(var u=0,d=0;d<o.length;d++){var g=(o.words[d]|0)*19+u,p=g&67108863;g>>>=26,o.words[d]=p,u=g}return u!==0&&(o.words[o.length++]=u),o},n._prime=function(o){if(C[o])return C[o];var u;if(o==="k256")u=new L;else if(o==="p224")u=new F;else if(o==="p192")u=new j;else if(o==="p25519")u=new M;else throw new Error("Unknown prime "+o);return C[o]=u,u};function h(l){if(typeof l=="string"){var o=n._prime(l);this.m=o.p,this.prime=o}else r(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}h.prototype._verify1=function(o){r(o.negative===0,"red works only with positives"),r(o.red,"red works only with red numbers")},h.prototype._verify2=function(o,u){r((o.negative|u.negative)===0,"red works only with positives"),r(o.red&&o.red===u.red,"red works only with red numbers")},h.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(S(o,o.umod(this.m)._forceRed(this)),o)},h.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},h.prototype.add=function(o,u){this._verify2(o,u);var d=o.add(u);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},h.prototype.iadd=function(o,u){this._verify2(o,u);var d=o.iadd(u);return d.cmp(this.m)>=0&&d.isub(this.m),d},h.prototype.sub=function(o,u){this._verify2(o,u);var d=o.sub(u);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},h.prototype.isub=function(o,u){this._verify2(o,u);var d=o.isub(u);return d.cmpn(0)<0&&d.iadd(this.m),d},h.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},h.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},h.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},h.prototype.isqr=function(o){return this.imul(o,o.clone())},h.prototype.sqr=function(o){return this.mul(o,o)},h.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(r(u%2===1),u===3){var d=this.m.add(new n(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),p=0;!g.isZero()&&g.andln(1)===0;)p++,g.iushrn(1);r(!g.isZero());var s=new n(1).toRed(this),m=s.redNeg(),_=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new n(2*c*c).toRed(this);this.pow(c,_).cmp(m)!==0;)c.redIAdd(m);for(var x=this.pow(c,g),O=this.pow(o,g.addn(1).iushrn(1)),N=this.pow(o,g),D=p;N.cmp(s)!==0;){for(var W=N,K=0;W.cmp(s)!==0;K++)W=W.redSqr();r(K<D);var G=this.pow(x,new n(1).iushln(D-K-1));O=O.redMul(G),x=G.redSqr(),N=N.redMul(x),D=K}return O},h.prototype.invm=function(o){var u=o._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},h.prototype.pow=function(o,u){if(u.isZero())return new n(1).toRed(this);if(u.cmpn(1)===0)return o.clone();var d=4,g=new Array(1<<d);g[0]=new n(1).toRed(this),g[1]=o;for(var p=2;p<g.length;p++)g[p]=this.mul(g[p-1],o);var s=g[0],m=0,_=0,c=u.bitLength()%26;for(c===0&&(c=26),p=u.length-1;p>=0;p--){for(var x=u.words[p],O=c-1;O>=0;O--){var N=x>>O&1;if(s!==g[0]&&(s=this.sqr(s)),N===0&&m===0){_=0;continue}m<<=1,m|=N,_++,!(_!==d&&(p!==0||O!==0))&&(s=this.mul(s,g[m]),_=0,m=0)}c=26}return s},h.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},h.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},n.mont=function(o){return new v(o)};function v(l){h.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(v,h),v.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},v.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},v.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(u),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),s=p;return p.cmp(this.m)>=0?s=p.isub(this.m):p.cmpn(0)<0&&(s=p.iadd(this.m)),s._forceRed(this)},v.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new n(0)._forceRed(this);var d=o.mul(u),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),s=p;return p.cmp(this.m)>=0?s=p.isub(this.m):p.cmpn(0)<0&&(s=p.iadd(this.m)),s._forceRed(this)},v.prototype.invm=function(o){var u=this.imod(o._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(typeof lh>"u"||lh,lg)});var ch=B((oR,vg)=>{"use strict";w();var Qi=cg(),G4=Fr(),V4=Te().Buffer;function dg(t){var e=t.modulus.byteLength(),r;do r=new Qi(G4(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function $4(t){var e=dg(t),r=e.toRed(Qi.mont(t.modulus)).redPow(new Qi(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function pg(t,e){var r=$4(e),i=e.modulus.byteLength(),n=new Qi(t).mul(r.blinder).umod(e.modulus),a=n.toRed(Qi.mont(e.prime1)),f=n.toRed(Qi.mont(e.prime2)),y=e.coefficient,b=e.prime1,S=e.prime2,A=a.redPow(e.exponent1).fromRed(),q=f.redPow(e.exponent2).fromRed(),k=A.isub(q).imul(y).umod(b).imul(S);return q.iadd(k).imul(r.unblinder).umod(e.modulus).toArrayLike(V4,"be",i)}pg.getr=dg;vg.exports=pg});var bg=B((fR,mg)=>{w();var z4=ah(),dh=Fr(),Z4=Qn(),yg=sh(),gg=uh(),ph=gr(),Y4=hh(),X4=ch(),Ct=Te().Buffer;mg.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=z4(e),f;if(n===4)f=J4(a,r);else if(n===1)f=Q4(a,r,i);else if(n===3){if(f=new ph(r),f.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?X4(f,a):Y4(f,a)};function J4(t,e){var r=t.modulus.byteLength(),i=e.length,n=Z4("sha1").update(Ct.alloc(0)).digest(),a=n.length,f=2*a;if(i>r-f-2)throw new Error("message too long");var y=Ct.alloc(r-i-f-2),b=r-a-1,S=dh(a),A=gg(Ct.concat([n,y,Ct.alloc(1,1),e],b),yg(S,b)),q=gg(S,yg(A,a));return new ph(Ct.concat([Ct.alloc(1),q,A],r))}function Q4(t,e,r){var i=e.length,n=t.modulus.byteLength();if(i>n-11)throw new Error("message too long");var a;return r?a=Ct.alloc(n-i-3,255):a=eE(n-i-3),new ph(Ct.concat([Ct.from([0,r?1:2]),a,Ct.alloc(1),e],n))}function eE(t){for(var e=Ct.allocUnsafe(t),r=0,i=dh(t*2),n=0,a;r<t;)n===i.length&&(i=dh(t*2),n=0),a=i[n++],a&&(e[r++]=a);return e}});var Eg=B((uR,Mg)=>{w();var tE=ah(),wg=sh(),_g=uh(),xg=gr(),rE=ch(),iE=Qn(),nE=hh(),lo=Te().Buffer;Mg.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=tE(e),f=a.modulus.byteLength();if(r.length>f||new xg(r).cmp(a.modulus)>=0)throw new Error("decryption error");var y;i?y=nE(new xg(r),a):y=rE(r,a);var b=lo.alloc(f-y.length);if(y=lo.concat([b,y],f),n===4)return oE(a,y);if(n===1)return aE(a,y,i);if(n===3)return y;throw new Error("unknown padding")};function oE(t,e){var r=t.modulus.byteLength(),i=iE("sha1").update(lo.alloc(0)).digest(),n=i.length;if(e[0]!==0)throw new Error("decryption error");var a=e.slice(1,n+1),f=e.slice(n+1),y=_g(a,wg(f,n)),b=_g(f,wg(y,r-n-1));if(fE(i,b.slice(0,n)))throw new Error("decryption error");for(var S=n;b[S]===0;)S++;if(b[S++]!==1)throw new Error("decryption error");return b.slice(S)}function aE(t,e,r){for(var i=e.slice(0,2),n=2,a=0;e[n++]!==0;)if(n>=e.length){a++;break}var f=e.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&a++,f.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}function fE(t,e){t=lo.from(t),e=lo.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var n=-1;++n<i;)r+=t[n]^e[n];return r}});var Sg=B(ci=>{w();ci.publicEncrypt=bg();ci.privateDecrypt=Eg();ci.privateEncrypt=function(e,r){return ci.publicEncrypt(e,r,!0)};ci.publicDecrypt=function(e,r){return ci.privateDecrypt(e,r,!0)}});var Pg=B(co=>{"use strict";w();function Bg(){throw new Error(`secure random number generation not supported by this browser
|
|
15
|
-
use chrome, FireFox or Internet Explorer 11`)}var Rg=Te(),Ag=Fr(),qg=Rg.Buffer,Tg=Rg.kMaxLength,vh=globalThis.crypto||globalThis.msCrypto,Ig=Math.pow(2,32)-1;function kg(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>Ig||t<0)throw new TypeError("offset must be a uint32");if(t>Tg||t>e)throw new RangeError("offset out of range")}function Cg(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>Ig||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Tg)throw new RangeError("buffer too small")}vh&&vh.getRandomValues||!E.default.browser?(co.randomFill=sE,co.randomFillSync=uE):(co.randomFill=Bg,co.randomFillSync=Bg);function sE(t,e,r,i){if(!qg.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")i=e,e=0,r=t.length;else if(typeof r=="function")i=r,r=t.length-e;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return kg(e,t.length),Cg(r,e,t.length),Og(t,e,r,i)}function Og(t,e,r,i){if(E.default.browser){var n=t.buffer,a=new Uint8Array(n,e,r);if(vh.getRandomValues(a),i){E.default.nextTick(function(){i(null,t)});return}return t}if(i){Ag(r,function(y,b){if(y)return i(y);b.copy(t,e),i(null,t)});return}var f=Ag(r);return f.copy(t,e),t}function uE(t,e,r){if(typeof e>"u"&&(e=0),!qg.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return kg(e,t.length),r===void 0&&(r=t.length-e),Cg(r,e,t.length),Og(t,e,r)}});var Uu=B(Ie=>{"use strict";w();Ie.randomBytes=Ie.rng=Ie.pseudoRandomBytes=Ie.prng=Fr();Ie.createHash=Ie.Hash=Qn();Ie.createHmac=Ie.Hmac=Iv();var hE=Pa(),lE=Object.keys(hE),cE=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(lE);Ie.getHashes=function(){return cE};var Dg=pu();Ie.pbkdf2=Dg.pbkdf2;Ie.pbkdf2Sync=Dg.pbkdf2Sync;var Wt=r1();Ie.Cipher=Wt.Cipher;Ie.createCipher=Wt.createCipher;Ie.Cipheriv=Wt.Cipheriv;Ie.createCipheriv=Wt.createCipheriv;Ie.Decipher=Wt.Decipher;Ie.createDecipher=Wt.createDecipher;Ie.Decipheriv=Wt.Decipheriv;Ie.createDecipheriv=Wt.createDecipheriv;Ie.getCiphers=Wt.getCiphers;Ie.listCiphers=Wt.listCiphers;var po=y1();Ie.DiffieHellmanGroup=po.DiffieHellmanGroup;Ie.createDiffieHellmanGroup=po.createDiffieHellmanGroup;Ie.getDiffieHellman=po.getDiffieHellman;Ie.createDiffieHellman=po.createDiffieHellman;Ie.DiffieHellman=po.DiffieHellman;var of=Pa();Ie.createSign=of.createSign;Ie.Sign=of.Sign;Ie.createVerify=of.createVerify;Ie.Verify=of.Verify;Ie.createECDH=Pa();var af=Sg();Ie.publicEncrypt=af.publicEncrypt;Ie.privateEncrypt=af.privateEncrypt;Ie.publicDecrypt=af.publicDecrypt;Ie.privateDecrypt=af.privateDecrypt;var Ug=Pg();Ie.randomFill=Ug.randomFill;Ie.randomFillSync=Ug.randomFillSync;Ie.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
|
|
16
|
-
we accept pull requests
|
|
17
|
-
https://github.com/browserify/crypto-browserify`)};Ie.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}});var Lg=B((yh,Ng)=>{w();(function(t,e){"use strict";typeof define=="function"&&define.amd?define([],function(){return t.secrets=e()}):typeof yh=="object"?Ng.exports=e(Uu()):t.secrets=e(t.crypto)})(yh,function(t){"use strict";var e,r,i,n,a;function f(){e={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},i=new Array(1024).join("0"),n=!0,a=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function y(){return!!(r&&r.rng&&typeof r.rng=="function")}function b(T,C){var U;if(C===0||C===1)return T;if(C&&C>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return C=C||r.bits,T&&(U=T.length%C),U?(i+T).slice(-(C-U+T.length)):T}function S(T){var C="",U,L;for(L=T.length-1;L>=0;L--){if(U=parseInt(T[L],16),isNaN(U))throw new Error("Invalid hex character.");C=b(U.toString(2),4)+C}return C}function A(T){var C="",U,L;for(T=b(T,4),L=T.length;L>=4;L-=4){if(U=parseInt(T.slice(L-4,L),2),isNaN(U))throw new Error("Invalid binary character.");C=U.toString(16)+C}return C}function q(){return!!(t&&typeof t=="object"&&(typeof t.getRandomValues=="function"||typeof t.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function k(){return typeof t=="object"&&typeof t.randomBytes=="function"}function P(T){function C(j,M,h,v){var l=0,o,u="",d;for(M&&(o=M.length-1);l<o||u.length<j;)d=Math.abs(parseInt(M[l],h)),u=u+b(d.toString(2),v),l++;return u=u.substr(-j),(u.match(/0/g)||[]).length===u.length?null:u}function U(j){var M,h,v,l,o=null;for(v=16,l=4,h=Math.ceil(j/8);o===null;)M=t.randomBytes(h),o=C(j,M.toString("hex"),v,l);return o}function L(j){var M,h,v,l=null;for(h=10,v=32,M=Math.ceil(j/32);l===null;)l=C(j,t.getRandomValues(new Uint32Array(M)),h,v);return l}function F(j){var M,h,v,l,o,u=null;l=10,o=32,h=Math.ceil(j/32),v=123456789,M=new Uint32Array(h);for(var d=0;d<M.length;d++)M[d]=v;for(;u===null;)u=C(j,M,l,o);return u}if(T&&T==="testRandom")return r.typeCSPRNG=T,F;if(T&&T==="nodeCryptoRandomBytes")return r.typeCSPRNG=T,U;if(T&&T==="browserCryptoGetRandomValues")return r.typeCSPRNG=T,L;if(k())return r.typeCSPRNG="nodeCryptoRandomBytes",U;if(q())return r.typeCSPRNG="browserCryptoGetRandomValues",L}function H(T,C){var U=[],L;for(C&&(T=b(T,C)),L=T.length;L>r.bits;L-=r.bits)U.push(parseInt(T.slice(L-r.bits,L),2));return U.push(parseInt(T.slice(0,L),2)),U}function Z(T,C){var U=r.logs[T],L=0,F;for(F=C.length-1;F>=0;F--)L!==0?L=r.exps[(U+r.logs[L])%r.maxShares]^C[F]:L=C[F];return L}function ke(T,C,U){var L=0,F,j,M,h;for(M=0,F=C.length;M<F;M++)if(U[M]){for(j=r.logs[U[M]],h=0;h<F;h++)if(M!==h){if(T===C[h]){j=-1;break}j=(j+r.logs[T^C[h]]-r.logs[C[M]^C[h]]+r.maxShares)%r.maxShares}L=j===-1?L:L^r.exps[j]}return L}function V(T,C,U){var L=[],F=[T],j,M;for(j=1;j<U;j++)F[j]=parseInt(r.rng(r.bits),2);for(j=1,M=C+1;j<M;j++)L[j-1]={x:j,y:Z(j,F)};return L}function Y(T,C,U){var L,F,j,M,h;if(C=parseInt(C,r.radix),T=parseInt(T,10)||r.bits,L=T.toString(36).toUpperCase(),j=Math.pow(2,T)-1,M=j.toString(r.radix).length,F=b(C.toString(r.radix),M),typeof C!="number"||C%1!==0||C<1||C>j)throw new Error("Share id must be an integer between 1 and "+j+", inclusive.");return h=L+F+U,h}var He={init:function(T,C){var U=[],L=[],F=1,j,M;if(f(),T&&(typeof T!="number"||T%1!==0||T<e.minBits||T>e.maxBits))throw new Error("Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(C&&a.indexOf(C)===-1)throw new Error("Invalid RNG type argument : '"+C+"'");for(r.radix=e.radix,r.bits=T||e.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,j=e.primitivePolynomials[r.bits],M=0;M<r.size;M++)L[M]=F,U[F]=M,F=F<<1,F>=r.size&&(F=F^j,F=F&r.maxShares);if(r.logs=U,r.exps=L,C&&this.setRNG(C),y()||this.setRNG(),!y()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(T,C){var U,L,F,j,M="",h,v,l,o=[],u=[];for(C=C||0,U=0,F=T.length;U<F;U++){if(v=this.extractShareComponents(T[U]),h===void 0)h=v.bits;else if(v.bits!==h)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==h&&this.init(h),o.indexOf(v.id)===-1)for(o.push(v.id),l=H(S(v.data)),L=0,j=l.length;L<j;L++)u[L]=u[L]||[],u[L][o.length-1]=l[L]}for(U=0,F=u.length;U<F;U++)M=b(ke(C,o,u[U]).toString(2))+M;return A(C>=1?M:M.slice(M.indexOf("1")+1))},getConfig:function(){var T={};return T.radix=r.radix,T.bits=r.bits,T.maxShares=r.maxShares,T.hasCSPRNG=y(),T.typeCSPRNG=r.typeCSPRNG,T},extractShareComponents:function(T){var C,U,L,F,j={},M,h;if(C=parseInt(T.substr(0,1),36),C&&(typeof C!="number"||C%1!==0||C<e.minBits||C>e.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(F=Math.pow(2,C)-1,L=(Math.pow(2,C)-1).toString(r.radix).length,M="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+L+"})([a-fA-F0-9]+)$",h=new RegExp(M).exec(T),h&&(U=parseInt(h[2],r.radix)),typeof U!="number"||U%1!==0||U<1||U>F)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(h&&h[3])return j.bits=C,j.id=U,j.data=h[3],j;throw new Error("The share data provided is invalid : "+T)},setRNG:function(T){var C="Random number generator is invalid ",U=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(T&&typeof T=="string"&&a.indexOf(T)===-1)throw new Error("Invalid RNG type argument : '"+T+"'");if(T||(T=P()),T&&typeof T=="string"&&(T=P(T)),n){if(T&&typeof T!="function")throw new Error(C+"(Not a function)."+U);if(T&&typeof T(r.bits)!="string")throw new Error(C+"(Output is not a string)."+U);if(T&&!parseInt(T(r.bits),2))throw new Error(C+"(Binary string output not parseable to an Integer)."+U);if(T&&T(r.bits).length>r.bits)throw new Error(C+"(Output length is greater than config.bits)."+U);if(T&&T(r.bits).length<r.bits)throw new Error(C+"(Output length is less than config.bits)."+U)}return r.rng=T,!0},str2hex:function(T,C){var U,L,F="",j,M,h,v;if(typeof T!="string")throw new Error("Input must be a character string.");if(C||(C=e.bytesPerChar),typeof C!="number"||C<1||C>e.maxBytesPerChar||C%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(U=2*C,L=Math.pow(16,U)-1,h=0,v=T.length;h<v;h++){if(M=T[h].charCodeAt(),isNaN(M))throw new Error("Invalid character: "+T[h]);if(M>L)throw j=Math.ceil(Math.log(M+1)/Math.log(256)),new Error("Invalid character code ("+M+"). Maximum allowable is 256^bytes-1 ("+L+"). To convert this character, use at least "+j+" bytes.");F=b(M.toString(16),U)+F}return F},hex2str:function(T,C){var U,L="",F,j;if(typeof T!="string")throw new Error("Input must be a hexadecimal string.");if(C=C||e.bytesPerChar,typeof C!="number"||C%1!==0||C<1||C>e.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(U=2*C,T=b(T,U),F=0,j=T.length;F<j;F+=U)L=String.fromCharCode(parseInt(T.slice(F,F+U),16))+L;return L},random:function(T){if(typeof T!="number"||T%1!==0||T<2||T>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return A(r.rng(T))},share:function(T,C,U,L){var F,j,M=new Array(C),h=new Array(C),v,l,o;if(L=L||128,typeof T!="string")throw new Error("Secret must be a string.");if(typeof C!="number"||C%1!==0||C<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(C>r.maxShares)throw F=Math.ceil(Math.log(C+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+C+" shares, use at least "+F+" bits.");if(typeof U!="number"||U%1!==0||U<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(U>r.maxShares)throw F=Math.ceil(Math.log(U+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+U+", use at least "+F+" bits.");if(U>C)throw new Error("Threshold number of shares was "+U+" but must be less than or equal to the "+C+" shares specified as the total to generate.");if(typeof L!="number"||L%1!==0||L<0||L>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(T="1"+S(T),T=H(T,L),v=0,o=T.length;v<o;v++)for(j=V(T[v],C,U),l=0;l<C;l++)M[l]=M[l]||j[l].x.toString(r.radix),h[l]=b(j[l].y.toString(2))+(h[l]||"");for(v=0;v<C;v++)M[v]=Y(r.bits,M[v],A(h[v]));return M},newShare:function(T,C){var U,L;if(T&&typeof T=="string"&&(T=parseInt(T,r.radix)),L=T.toString(r.radix),T&&L&&C&&C[0])return U=this.extractShareComponents(C[0]),Y(U.bits,L,this.combine(C,T));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:f,_padLeft:b,_hex2bin:S,_bin2hex:A,_hasCryptoGetRandomValues:q,_hasCryptoRandomBytes:k,_getRNG:P,_isSetRNG:y,_splitNumStringToIntArray:H,_horner:Z,_lagrange:ke,_getShares:V,_constructPublicShareString:Y};return He.init(),He})});var Wg=B((mR,Kg)=>{"use strict";w();var at=Vh(),Fg=zh(),jg=Yh(),ff=null;function gh(){if(ff)return ff;var t=Lg();return t.setRNG(function(e){for(var r=64,i=0;i<r;i++){for(var n=Fg.getRandomBuffer(Math.ceil(e/8)),a="",f=0;f<n.length;f++)a+=("00000000"+n[f].toString(2)).slice(-8);if(a=a.slice(0,e),/1/.test(a))return a}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),ff=t,ff}var sf="ff",Hg=2;function Ze(t){return this instanceof Ze?(this.options=t||{},this):new Ze(t)}Ze.split=function(t,e,r,i){if(i=i||{},t==null)throw new Error("Secret is required");if(e<2)throw new Error("Threshold must be at least 2");if(r<e)throw new Error("Number of shares must be at least threshold");if(e>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var n=R.Buffer.isBuffer(t)?t:R.Buffer.from(t,"utf8"),a=sf+n.toString("hex"),f=gh().share(a,r,e),y=Fg.getRandomBuffer(8).toString("hex"),b=i.checksum===!0,S=b?jg.sha256(n).slice(0,4).toString("hex"):null,A=[],q=0;q<f.length;q++)A.push({v:Hg,id:q+1,threshold:e,shares:r,length:n.length,splitId:y,share:f[q],checksum:S});return A};Ze.combine=function(t){if(!t||t.length===0)throw new Error("Shares array is required");if(t[0]&&Array.isArray(t[0].bytes)&&t[0].share===void 0)return Ze._combineLegacy(t);var e=t[0].threshold,r=t[0].splitId;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var i=[],n=0;n<t.length;n++){var a=t[n];if(!a||typeof a.share!="string")throw new Error("Invalid share at index "+n);if(r!==void 0&&a.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(a.threshold!==e)throw new Error("Shares have inconsistent threshold");i.push(a.share)}var f=gh().combine(i);if(f.slice(0,sf.length)!==sf)throw new Error("Reconstruction failed: invalid or insufficient shares");var y=R.Buffer.from(f.slice(sf.length),"hex"),b=t[0].checksum;if(b){var S=jg.sha256(y).slice(0,4).toString("hex");if(S!==b)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return y};Ze.verifyShare=function(t){try{return!t||typeof t!="object"?!1:Array.isArray(t.bytes)&&t.share===void 0?Ze._verifyLegacyShare(t):t.v!==Hg||typeof t.share!="string"||!/^[0-9a-fA-F]+$/.test(t.share)||typeof t.threshold!="number"||typeof t.shares!="number"||t.threshold<2||t.shares<t.threshold||t.shares>255||t.id<1||t.id>t.shares||t.checksum!==null&&t.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(t.checksum)?!1:(gh().extractShareComponents(t.share),!0)}catch{return!1}};Ze.generateTestVectors=function(){var t="Hello, Bitcoin SV!",e=3,r=5,i=Ze.split(t,e,r),n=Ze.combine(i.slice(0,e));return{secret:t,threshold:e,totalShares:r,shares:i,reconstructed:n.toString("utf8"),valid:n.toString("utf8")===t}};var br=new at(2147483647);Ze._combineLegacy=function(t){var e=t[0].threshold,r=t[0].shares,i=t[0].length;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var n=0;n<t.length;n++){if(t[n].threshold!==e||t[n].shares!==r)throw new Error("Shares have inconsistent parameters");if(t[n].length!==i)throw new Error("Shares have different secret lengths")}for(var a=[],f=0;f<i;f++){for(var y=[],b=0;b<Math.min(t.length,e);b++)y.push(t[b].bytes[f]);a.push(Ze._combineByteLegacy(y))}return R.Buffer.from(a)};Ze._combineByteLegacy=function(t){for(var e=new at(0),r=0;r<t.length;r++){for(var i=new at(t[r].x),n=new at(t[r].y,16),a=new at(1),f=new at(1),y=0;y<t.length;y++)if(r!==y){var b=new at(t[y].x),S=new at(0).sub(b);S.lt(new at(0))&&(S=S.add(br)),a=a.mul(S).mod(br);var A=i.sub(b);A.lt(new at(0))&&(A=A.add(br)),f=f.mul(A).mod(br)}var q=Ze._modInverseLegacy(f,br),k=a.mul(q).mod(br);e=e.add(n.mul(k)).mod(br)}return e.mod(br).mod(new at(256)).toNumber()};Ze._modInverseLegacy=function(t,e){t.lt(new at(0))&&(t=t.mod(e).add(e));var r=Ze._extendedGCDLegacy(t,e);if(!r.gcd.eq(new at(1)))throw new Error("Modular inverse does not exist");return r.x.mod(e).add(e).mod(e)};Ze._extendedGCDLegacy=function(t,e){if(t.eq(new at(0)))return{gcd:e,x:new at(0),y:new at(1)};var r=Ze._extendedGCDLegacy(e.mod(t),t);return{gcd:r.gcd,x:r.y.sub(e.div(t).mul(r.x)),y:r.x}};Ze._verifyLegacyShare=function(t){if(!t.id||!t.threshold||!t.shares||!t.bytes||typeof t.length!="number"||t.threshold<2||t.shares<t.threshold||!Array.isArray(t.bytes)||t.bytes.length!==t.length)return!1;for(var e=0;e<t.bytes.length;e++){var r=t.bytes[e];if(!r||!r.x||!r.y||r.x<1||r.x>t.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};Kg.exports=Ze});var dE=B((wR,Gg)=>{w();Gg.exports=Wg()});return dE();})();
|
|
1
|
+
var bsvShamir=(()=>{var Th=Object.create;var Yo=Object.defineProperty;var Ih=Object.getOwnPropertyDescriptor;var Oh=Object.getOwnPropertyNames;var qh=Object.getPrototypeOf,Mh=Object.prototype.hasOwnProperty;var Ph=(e,r,t)=>()=>{if(t)throw t[0];try{return e&&(r=e(e=0)),r}catch(n){throw t=[n],n}};var p=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var Ch=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Oh(r))!Mh.call(e,i)&&i!==t&&Yo(e,i,{get:()=>r[i],enumerable:!(n=Ih(r,i))||n.enumerable});return e};var Ko=(e,r,t)=>(t=e!=null?Th(qh(e)):{},Ch(r||!e||!e.__esModule?Yo(t,"default",{value:e,enumerable:!0}):t,e));var ea=p(($v,Qo)=>{u();var V=Qo.exports={},pe,ye;function Hn(){throw new Error("setTimeout has not been defined")}function $n(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?pe=setTimeout:pe=Hn}catch{pe=Hn}try{typeof clearTimeout=="function"?ye=clearTimeout:ye=$n}catch{ye=$n}})();function Jo(e){if(pe===setTimeout)return setTimeout(e,0);if((pe===Hn||!pe)&&setTimeout)return pe=setTimeout,setTimeout(e,0);try{return pe(e,0)}catch{try{return pe.call(null,e,0)}catch{return pe.call(this,e,0)}}}function Fh(e){if(ye===clearTimeout)return clearTimeout(e);if((ye===$n||!ye)&&clearTimeout)return ye=clearTimeout,clearTimeout(e);try{return ye(e)}catch{try{return ye.call(null,e)}catch{return ye.call(this,e)}}}var Ee=[],lr=!1,He,mt=-1;function Lh(){!lr||!He||(lr=!1,He.length?Ee=He.concat(Ee):mt=-1,Ee.length&&Xo())}function Xo(){if(!lr){var e=Jo(Lh);lr=!0;for(var r=Ee.length;r;){for(He=Ee,Ee=[];++mt<r;)He&&He[mt].run();mt=-1,r=Ee.length}He=null,lr=!1,Fh(e)}}V.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];Ee.push(new Zo(e,r)),Ee.length===1&&!lr&&Jo(Xo)};function Zo(e,r){this.fun=e,this.array=r}Zo.prototype.run=function(){this.fun.apply(null,this.array)};V.title="browser";V.browser=!0;V.env={};V.argv=[];V.version="";V.versions={};function Se(){}V.on=Se;V.addListener=Se;V.once=Se;V.off=Se;V.removeListener=Se;V.removeAllListeners=Se;V.emit=Se;V.prependListener=Se;V.prependOnceListener=Se;V.listeners=function(e){return[]};V.binding=function(e){throw new Error("process.binding is not supported")};V.cwd=function(){return"/"};V.chdir=function(e){throw new Error("process.chdir is not supported")};V.umask=function(){return 0}});var na=p(xt=>{"use strict";u();xt.byteLength=Dh;xt.toByteArray=Nh;xt.fromByteArray=Gh;var ge=[],fe=[],Uh=typeof Uint8Array<"u"?Uint8Array:Array,Vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for($e=0,ra=Vn.length;$e<ra;++$e)ge[$e]=Vn[$e],fe[Vn.charCodeAt($e)]=$e;var $e,ra;fe[45]=62;fe[95]=63;function ta(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Dh(e){var r=ta(e),t=r[0],n=r[1];return(t+n)*3/4-n}function jh(e,r,t){return(r+t)*3/4-t}function Nh(e){var r,t=ta(e),n=t[0],i=t[1],o=new Uh(jh(e,n,i)),a=0,f=i>0?n-4:n,s;for(s=0;s<f;s+=4)r=fe[e.charCodeAt(s)]<<18|fe[e.charCodeAt(s+1)]<<12|fe[e.charCodeAt(s+2)]<<6|fe[e.charCodeAt(s+3)],o[a++]=r>>16&255,o[a++]=r>>8&255,o[a++]=r&255;return i===2&&(r=fe[e.charCodeAt(s)]<<2|fe[e.charCodeAt(s+1)]>>4,o[a++]=r&255),i===1&&(r=fe[e.charCodeAt(s)]<<10|fe[e.charCodeAt(s+1)]<<4|fe[e.charCodeAt(s+2)]>>2,o[a++]=r>>8&255,o[a++]=r&255),o}function kh(e){return ge[e>>18&63]+ge[e>>12&63]+ge[e>>6&63]+ge[e&63]}function Wh(e,r,t){for(var n,i=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(kh(n));return i.join("")}function Gh(e){for(var r,t=e.length,n=t%3,i=[],o=16383,a=0,f=t-n;a<f;a+=o)i.push(Wh(e,a,a+o>f?f:a+o));return n===1?(r=e[t-1],i.push(ge[r>>2]+ge[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(ge[r>>10]+ge[r>>4&63]+ge[r<<2&63]+"=")),i.join("")}});var ia=p(zn=>{u();zn.read=function(e,r,t,n,i){var o,a,f=i*8-n-1,s=(1<<f)-1,c=s>>1,y=-7,w=t?i-1:0,m=t?-1:1,A=e[r+w];for(w+=m,o=A&(1<<-y)-1,A>>=-y,y+=f;y>0;o=o*256+e[r+w],w+=m,y-=8);for(a=o&(1<<-y)-1,o>>=-y,y+=n;y>0;a=a*256+e[r+w],w+=m,y-=8);if(o===0)o=1-c;else{if(o===s)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-c}return(A?-1:1)*a*Math.pow(2,o-n)};zn.write=function(e,r,t,n,i,o){var a,f,s,c=o*8-i-1,y=(1<<c)-1,w=y>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:o-1,R=n?1:-1,D=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,a=y):(a=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-a))<1&&(a--,s*=2),a+w>=1?r+=m/s:r+=m*Math.pow(2,1-w),r*s>=2&&(a++,s/=2),a+w>=y?(f=0,a=y):a+w>=1?(f=(r*s-1)*Math.pow(2,i),a=a+w):(f=r*Math.pow(2,w-1)*Math.pow(2,i),a=0));i>=8;e[t+A]=f&255,A+=R,f/=256,i-=8);for(a=a<<i|f,c+=i;c>0;e[t+A]=a&255,A+=R,a/=256,c-=8);e[t+A-R]|=D*128}});var we=p(pr=>{"use strict";u();var Yn=na(),hr=ia(),oa=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pr.Buffer=h;pr.SlowBuffer=Kh;pr.INSPECT_MAX_BYTES=50;var Et=2147483647;pr.kMaxLength=Et;h.TYPED_ARRAY_SUPPORT=Hh();!h.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 Hh(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}});Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function Ae(e){if(e>Et)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,h.prototype),r}function h(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Zn(e)}return sa(e,r,t)}h.poolSize=8192;function sa(e,r,t){if(typeof e=="string")return Vh(e,r);if(ArrayBuffer.isView(e))return zh(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(be(e,ArrayBuffer)||e&&be(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(be(e,SharedArrayBuffer)||e&&be(e.buffer,SharedArrayBuffer)))return Jn(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return h.from(n,r,t);let i=Yh(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return h.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}h.from=function(e,r,t){return sa(e,r,t)};Object.setPrototypeOf(h.prototype,Uint8Array.prototype);Object.setPrototypeOf(h,Uint8Array);function la(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function $h(e,r,t){return la(e),e<=0?Ae(e):r!==void 0?typeof t=="string"?Ae(e).fill(r,t):Ae(e).fill(r):Ae(e)}h.alloc=function(e,r,t){return $h(e,r,t)};function Zn(e){return la(e),Ae(e<0?0:Qn(e)|0)}h.allocUnsafe=function(e){return Zn(e)};h.allocUnsafeSlow=function(e){return Zn(e)};function Vh(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=ca(e,r)|0,n=Ae(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function Kn(e){let r=e.length<0?0:Qn(e.length)|0,t=Ae(r);for(let n=0;n<r;n+=1)t[n]=e[n]&255;return t}function zh(e){if(be(e,Uint8Array)){let r=new Uint8Array(e);return Jn(r.buffer,r.byteOffset,r.byteLength)}return Kn(e)}function Jn(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,h.prototype),n}function Yh(e){if(h.isBuffer(e)){let r=Qn(e.length)|0,t=Ae(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||ri(e.length)?Ae(0):Kn(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Kn(e.data)}function Qn(e){if(e>=Et)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Et.toString(16)+" bytes");return e|0}function Kh(e){return+e!=e&&(e=0),h.alloc(+e)}h.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==h.prototype};h.compare=function(r,t){if(be(r,Uint8Array)&&(r=h.from(r,r.offset,r.byteLength)),be(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(r)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let n=r.length,i=t.length;for(let o=0,a=Math.min(n,i);o<a;++o)if(r[o]!==t[o]){n=r[o],i=t[o];break}return n<i?-1:i<n?1:0};h.isEncoding=function(r){switch(String(r).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}};h.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return h.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;let i=h.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){let a=r[n];if(be(a,Uint8Array))o+a.length>i.length?(h.isBuffer(a)||(a=h.from(a)),a.copy(i,o)):Uint8Array.prototype.set.call(i,a,o);else if(h.isBuffer(a))a.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length}return i};function ca(e,r){if(h.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||be(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Xn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return _a(e).length;default:if(i)return n?-1:Xn(e).length;r=(""+r).toLowerCase(),i=!0}}h.byteLength=ca;function Jh(e,r,t){let n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return ad(this,r,t);case"utf8":case"utf-8":return da(this,r,t);case"ascii":return id(this,r,t);case"latin1":case"binary":return od(this,r,t);case"base64":return td(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fd(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}h.prototype._isBuffer=!0;function Ve(e,r,t){let n=e[r];e[r]=e[t],e[t]=n}h.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)Ve(this,t,t+1);return this};h.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)Ve(this,t,t+3),Ve(this,t+1,t+2);return this};h.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)Ve(this,t,t+7),Ve(this,t+1,t+6),Ve(this,t+2,t+5),Ve(this,t+3,t+4);return this};h.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?da(this,0,r):Jh.apply(this,arguments)};h.prototype.toLocaleString=h.prototype.toString;h.prototype.equals=function(r){if(!h.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:h.compare(this,r)===0};h.prototype.inspect=function(){let r="",t=pr.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};oa&&(h.prototype[oa]=h.prototype.inspect);h.prototype.compare=function(r,t,n,i,o){if(be(r,Uint8Array)&&(r=h.from(r,r.offset,r.byteLength)),!h.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;let a=o-i,f=n-t,s=Math.min(a,f),c=this.slice(i,o),y=r.slice(t,n);for(let w=0;w<s;++w)if(c[w]!==y[w]){a=c[w],f=y[w];break}return a<f?-1:f<a?1:0};function ha(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ri(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=h.from(r,n)),h.isBuffer(r))return r.length===0?-1:aa(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):aa(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function aa(e,r,t,n,i){let o=1,a=e.length,f=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,a/=2,f/=2,t/=2}function s(y,w){return o===1?y[w]:y.readUInt16BE(w*o)}let c;if(i){let y=-1;for(c=t;c<a;c++)if(s(e,c)===s(r,y===-1?0:c-y)){if(y===-1&&(y=c),c-y+1===f)return y*o}else y!==-1&&(c-=c-y),y=-1}else for(t+f>a&&(t=a-f),c=t;c>=0;c--){let y=!0;for(let w=0;w<f;w++)if(s(e,c+w)!==s(r,w)){y=!1;break}if(y)return c}return-1}h.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};h.prototype.indexOf=function(r,t,n){return ha(this,r,t,n,!0)};h.prototype.lastIndexOf=function(r,t,n){return ha(this,r,t,n,!1)};function Xh(e,r,t,n){t=Number(t)||0;let i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let o=r.length;n>o/2&&(n=o/2);let a;for(a=0;a<n;++a){let f=parseInt(r.substr(a*2,2),16);if(ri(f))return a;e[t+a]=f}return a}function Zh(e,r,t,n){return St(Xn(r,e.length-t),e,t,n)}function Qh(e,r,t,n){return St(cd(r),e,t,n)}function ed(e,r,t,n){return St(_a(r),e,t,n)}function rd(e,r,t,n){return St(hd(r,e.length-t),e,t,n)}h.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return Xh(this,r,t,n);case"utf8":case"utf-8":return Zh(this,r,t,n);case"ascii":case"latin1":case"binary":return Qh(this,r,t,n);case"base64":return ed(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rd(this,r,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function td(e,r,t){return r===0&&t===e.length?Yn.fromByteArray(e):Yn.fromByteArray(e.slice(r,t))}function da(e,r,t){t=Math.min(e.length,t);let n=[],i=r;for(;i<t;){let o=e[i],a=null,f=o>239?4:o>223?3:o>191?2:1;if(i+f<=t){let s,c,y,w;switch(f){case 1:o<128&&(a=o);break;case 2:s=e[i+1],(s&192)===128&&(w=(o&31)<<6|s&63,w>127&&(a=w));break;case 3:s=e[i+1],c=e[i+2],(s&192)===128&&(c&192)===128&&(w=(o&15)<<12|(s&63)<<6|c&63,w>2047&&(w<55296||w>57343)&&(a=w));break;case 4:s=e[i+1],c=e[i+2],y=e[i+3],(s&192)===128&&(c&192)===128&&(y&192)===128&&(w=(o&15)<<18|(s&63)<<12|(c&63)<<6|y&63,w>65535&&w<1114112&&(a=w))}}a===null?(a=65533,f=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=f}return nd(n)}var fa=4096;function nd(e){let r=e.length;if(r<=fa)return String.fromCharCode.apply(String,e);let t="",n=0;for(;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=fa));return t}function id(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function od(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function ad(e,r,t){let n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);let i="";for(let o=r;o<t;++o)i+=dd[e[o]];return i}function fd(e,r,t){let n=e.slice(r,t),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}h.prototype.slice=function(r,t){let n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);let i=this.subarray(r,t);return Object.setPrototypeOf(i,h.prototype),i};function K(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||K(r,t,this.length);let i=this[r],o=1,a=0;for(;++a<t&&(o*=256);)i+=this[r+a]*o;return i};h.prototype.readUintBE=h.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||K(r,t,this.length);let i=this[r+--t],o=1;for(;t>0&&(o*=256);)i+=this[r+--t]*o;return i};h.prototype.readUint8=h.prototype.readUInt8=function(r,t){return r=r>>>0,t||K(r,1,this.length),this[r]};h.prototype.readUint16LE=h.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||K(r,2,this.length),this[r]|this[r+1]<<8};h.prototype.readUint16BE=h.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||K(r,2,this.length),this[r]<<8|this[r+1]};h.prototype.readUint32LE=h.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||K(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};h.prototype.readUint32BE=h.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};h.prototype.readBigUInt64LE=Fe(function(r){r=r>>>0,dr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Dr(r,this.length-8);let i=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,o=this[++r]+this[++r]*2**8+this[++r]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<<BigInt(32))});h.prototype.readBigUInt64BE=Fe(function(r){r=r>>>0,dr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Dr(r,this.length-8);let i=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],o=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});h.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||K(r,t,this.length);let i=this[r],o=1,a=0;for(;++a<t&&(o*=256);)i+=this[r+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};h.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||K(r,t,this.length);let i=t,o=1,a=this[r+--i];for(;i>0&&(o*=256);)a+=this[r+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a};h.prototype.readInt8=function(r,t){return r=r>>>0,t||K(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};h.prototype.readInt16LE=function(r,t){r=r>>>0,t||K(r,2,this.length);let n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};h.prototype.readInt16BE=function(r,t){r=r>>>0,t||K(r,2,this.length);let n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};h.prototype.readInt32LE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};h.prototype.readInt32BE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};h.prototype.readBigInt64LE=Fe(function(r){r=r>>>0,dr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Dr(r,this.length-8);let i=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)});h.prototype.readBigInt64BE=Fe(function(r){r=r>>>0,dr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Dr(r,this.length-8);let i=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(i)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n)});h.prototype.readFloatLE=function(r,t){return r=r>>>0,t||K(r,4,this.length),hr.read(this,r,!0,23,4)};h.prototype.readFloatBE=function(r,t){return r=r>>>0,t||K(r,4,this.length),hr.read(this,r,!1,23,4)};h.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||K(r,8,this.length),hr.read(this,r,!0,52,8)};h.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||K(r,8,this.length),hr.read(this,r,!1,52,8)};function oe(e,r,t,n,i,o){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let f=Math.pow(2,8*n)-1;oe(this,r,t,n,f,0)}let o=1,a=0;for(this[t]=r&255;++a<n&&(o*=256);)this[t+a]=r/o&255;return t+n};h.prototype.writeUintBE=h.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let f=Math.pow(2,8*n)-1;oe(this,r,t,n,f,0)}let o=n-1,a=1;for(this[t+o]=r&255;--o>=0&&(a*=256);)this[t+o]=r/a&255;return t+n};h.prototype.writeUint8=h.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,1,255,0),this[t]=r&255,t+1};h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function pa(e,r,t,n,i){va(r,n,i,e,t,7);let o=Number(r&BigInt(4294967295));e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o;let a=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,t}function ya(e,r,t,n,i){va(r,n,i,e,t,7);let o=Number(r&BigInt(4294967295));e[t+7]=o,o=o>>8,e[t+6]=o,o=o>>8,e[t+5]=o,o=o>>8,e[t+4]=o;let a=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=a,a=a>>8,e[t+2]=a,a=a>>8,e[t+1]=a,a=a>>8,e[t]=a,t+8}h.prototype.writeBigUInt64LE=Fe(function(r,t=0){return pa(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});h.prototype.writeBigUInt64BE=Fe(function(r,t=0){return ya(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});h.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let s=Math.pow(2,8*n-1);oe(this,r,t,n,s-1,-s)}let o=0,a=1,f=0;for(this[t]=r&255;++o<n&&(a*=256);)r<0&&f===0&&this[t+o-1]!==0&&(f=1),this[t+o]=(r/a>>0)-f&255;return t+n};h.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let s=Math.pow(2,8*n-1);oe(this,r,t,n,s-1,-s)}let o=n-1,a=1,f=0;for(this[t+o]=r&255;--o>=0&&(a*=256);)r<0&&f===0&&this[t+o+1]!==0&&(f=1),this[t+o]=(r/a>>0)-f&255;return t+n};h.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};h.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};h.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};h.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};h.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||oe(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};h.prototype.writeBigInt64LE=Fe(function(r,t=0){return pa(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});h.prototype.writeBigInt64BE=Fe(function(r,t=0){return ya(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ga(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ba(e,r,t,n,i){return r=+r,t=t>>>0,i||ga(e,r,t,4,34028234663852886e22,-34028234663852886e22),hr.write(e,r,t,n,23,4),t+4}h.prototype.writeFloatLE=function(r,t,n){return ba(this,r,t,!0,n)};h.prototype.writeFloatBE=function(r,t,n){return ba(this,r,t,!1,n)};function wa(e,r,t,n,i){return r=+r,t=t>>>0,i||ga(e,r,t,8,17976931348623157e292,-17976931348623157e292),hr.write(e,r,t,n,52,8),t+8}h.prototype.writeDoubleLE=function(r,t,n){return wa(this,r,t,!0,n)};h.prototype.writeDoubleBE=function(r,t,n){return wa(this,r,t,!1,n)};h.prototype.copy=function(r,t,n,i){if(!h.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);let o=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),o};h.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){let a=r.charCodeAt(0);(i==="utf8"&&a<128||i==="latin1")&&(r=a)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);let o;if(typeof r=="number")for(o=t;o<n;++o)this[o]=r;else{let a=h.isBuffer(r)?r:h.from(r,i),f=a.length;if(f===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%f]}return this};var cr={};function ei(e,r,t){cr[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}ei("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);ei("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError);ei("ERR_OUT_OF_RANGE",function(e,r,t){let n=`The value of "${e}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=ua(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=ua(i)),i+="n"),n+=` It must be ${r}. Received ${i}`,n},RangeError);function ua(e){let r="",t=e.length,n=e[0]==="-"?1:0;for(;t>=n+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function ud(e,r,t){dr(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&Dr(r,e.length-(t+1))}function va(e,r,t,n,i,o){if(e>t||e<r){let a=typeof r=="bigint"?"n":"",f;throw o>3?r===0||r===BigInt(0)?f=`>= 0${a} and < 2${a} ** ${(o+1)*8}${a}`:f=`>= -(2${a} ** ${(o+1)*8-1}${a}) and < 2 ** ${(o+1)*8-1}${a}`:f=`>= ${r}${a} and <= ${t}${a}`,new cr.ERR_OUT_OF_RANGE("value",f,e)}ud(n,i,o)}function dr(e,r){if(typeof e!="number")throw new cr.ERR_INVALID_ARG_TYPE(r,"number",e)}function Dr(e,r,t){throw Math.floor(e)!==e?(dr(e,t),new cr.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new cr.ERR_BUFFER_OUT_OF_BOUNDS:new cr.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var sd=/[^+/0-9A-Za-z-_]/g;function ld(e){if(e=e.split("=")[0],e=e.trim().replace(sd,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Xn(e,r){r=r||1/0;let t,n=e.length,i=null,o=[];for(let a=0;a<n;++a){if(t=e.charCodeAt(a),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function cd(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function hd(e,r){let t,n,i,o=[];for(let a=0;a<e.length&&!((r-=2)<0);++a)t=e.charCodeAt(a),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function _a(e){return Yn.toByteArray(ld(e))}function St(e,r,t,n){let i;for(i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function be(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function ri(e){return e!==e}var dd=(function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)r[n+i]=e[t]+e[i]}return r})();function Fe(e){return typeof BigInt>"u"?pd:e}function pd(){throw new Error("BigInt not supported")}});var l,b,u=Ph(()=>{l=Ko(ea()),b=Ko(we())});var xa=p((r_,ma)=>{u();ma.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.BN});var Sa=p((n_,Ea)=>{u();Ea.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Random});var Ba=p((o_,Aa)=>{u();Aa.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Hash});var j=p((f_,ti)=>{u();typeof Object.create=="function"?ti.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:ti.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var Z=p((ni,Ta)=>{u();var At=we(),ve=At.Buffer;function Ra(e,r){for(var t in e)r[t]=e[t]}ve.from&&ve.alloc&&ve.allocUnsafe&&ve.allocUnsafeSlow?Ta.exports=At:(Ra(At,ni),ni.Buffer=ze);function ze(e,r,t){return ve(e,r,t)}ze.prototype=Object.create(ve.prototype);Ra(ve,ze);ze.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ve(e,r,t)};ze.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=ve(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};ze.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ve(e)};ze.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return At.SlowBuffer(e)}});var gr=p((l_,ii)=>{"use strict";u();var yr=typeof Reflect=="object"?Reflect:null,Ia=yr&&typeof yr.apply=="function"?yr.apply:function(r,t,n){return Function.prototype.apply.call(r,t,n)},Bt;yr&&typeof yr.ownKeys=="function"?Bt=yr.ownKeys:Object.getOwnPropertySymbols?Bt=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Bt=function(r){return Object.getOwnPropertyNames(r)};function yd(e){console&&console.warn&&console.warn(e)}var qa=Number.isNaN||function(r){return r!==r};function U(){U.init.call(this)}ii.exports=U;ii.exports.once=vd;U.EventEmitter=U;U.prototype._events=void 0;U.prototype._eventsCount=0;U.prototype._maxListeners=void 0;var Oa=10;function Rt(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(U,"defaultMaxListeners",{enumerable:!0,get:function(){return Oa},set:function(e){if(typeof e!="number"||e<0||qa(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Oa=e}});U.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};U.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||qa(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Ma(e){return e._maxListeners===void 0?U.defaultMaxListeners:e._maxListeners}U.prototype.getMaxListeners=function(){return Ma(this)};U.prototype.emit=function(r){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=r==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var f=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw f.context=a,f}var s=o[r];if(s===void 0)return!1;if(typeof s=="function")Ia(s,this,t);else for(var c=s.length,y=Ua(s,c),n=0;n<c;++n)Ia(y[n],this,t);return!0};function Pa(e,r,t,n){var i,o,a;if(Rt(t),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",r,t.listener?t.listener:t),o=e._events),a=o[r]),a===void 0)a=o[r]=t,++e._eventsCount;else if(typeof a=="function"?a=o[r]=n?[t,a]:[a,t]:n?a.unshift(t):a.push(t),i=Ma(e),i>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=r,f.count=a.length,yd(f)}return e}U.prototype.addListener=function(r,t){return Pa(this,r,t,!1)};U.prototype.on=U.prototype.addListener;U.prototype.prependListener=function(r,t){return Pa(this,r,t,!0)};function gd(){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 Ca(e,r,t){var n={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},i=gd.bind(n);return i.listener=t,n.wrapFn=i,i}U.prototype.once=function(r,t){return Rt(t),this.on(r,Ca(this,r,t)),this};U.prototype.prependOnceListener=function(r,t){return Rt(t),this.prependListener(r,Ca(this,r,t)),this};U.prototype.removeListener=function(r,t){var n,i,o,a,f;if(Rt(t),i=this._events,i===void 0)return this;if(n=i[r],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[r],i.removeListener&&this.emit("removeListener",r,n.listener||t));else if(typeof n!="function"){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){f=n[a].listener,o=a;break}if(o<0)return this;o===0?n.shift():bd(n,o),n.length===1&&(i[r]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",r,f||t)}return this};U.prototype.off=U.prototype.removeListener;U.prototype.removeAllListeners=function(r){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var o=Object.keys(n),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[r],typeof t=="function")this.removeListener(r,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(r,t[i]);return this};function Fa(e,r,t){var n=e._events;if(n===void 0)return[];var i=n[r];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?wd(i):Ua(i,i.length)}U.prototype.listeners=function(r){return Fa(this,r,!0)};U.prototype.rawListeners=function(r){return Fa(this,r,!1)};U.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):La.call(e,r)};U.prototype.listenerCount=La;function La(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}U.prototype.eventNames=function(){return this._eventsCount>0?Bt(this._events):[]};function Ua(e,r){for(var t=new Array(r),n=0;n<r;++n)t[n]=e[n];return t}function bd(e,r){for(;r+1<e.length;r++)e[r]=e[r+1];e.pop()}function wd(e){for(var r=new Array(e.length),t=0;t<r.length;++t)r[t]=e[t].listener||e[t];return r}function vd(e,r){return new Promise(function(t,n){function i(a){e.removeListener(r,o),n(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),t([].slice.call(arguments))}Da(e,r,o,{once:!0}),r!=="error"&&_d(e,i,{once:!0})})}function _d(e,r,t){typeof e.on=="function"&&Da(e,"error",r,t)}function Da(e,r,t,n){if(typeof e.on=="function")n.once?e.once(r,t):e.on(r,t);else if(typeof e.addEventListener=="function")e.addEventListener(r,function i(o){n.once&&e.removeEventListener(r,i),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var oi=p((h_,ja)=>{u();ja.exports=gr().EventEmitter});var ai=p((p_,Na)=>{"use strict";u();Na.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;r[t]=i;for(var o in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var a=Object.getOwnPropertySymbols(r);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,t);if(f.value!==i||f.enumerable!==!0)return!1}return!0}});var jr=p((g_,ka)=>{"use strict";u();var md=ai();ka.exports=function(){return md()&&!!Symbol.toStringTag}});var fi=p((w_,Wa)=>{"use strict";u();Wa.exports=Object});var Ha=p((__,Ga)=>{"use strict";u();Ga.exports=Error});var Va=p((x_,$a)=>{"use strict";u();$a.exports=EvalError});var Ya=p((S_,za)=>{"use strict";u();za.exports=RangeError});var Ja=p((B_,Ka)=>{"use strict";u();Ka.exports=ReferenceError});var ui=p((T_,Xa)=>{"use strict";u();Xa.exports=SyntaxError});var Ye=p((O_,Za)=>{"use strict";u();Za.exports=TypeError});var ef=p((M_,Qa)=>{"use strict";u();Qa.exports=URIError});var tf=p((C_,rf)=>{"use strict";u();rf.exports=Math.abs});var of=p((L_,nf)=>{"use strict";u();nf.exports=Math.floor});var ff=p((D_,af)=>{"use strict";u();af.exports=Math.max});var sf=p((N_,uf)=>{"use strict";u();uf.exports=Math.min});var cf=p((W_,lf)=>{"use strict";u();lf.exports=Math.pow});var df=p((H_,hf)=>{"use strict";u();hf.exports=Math.round});var yf=p((V_,pf)=>{"use strict";u();pf.exports=Number.isNaN||function(r){return r!==r}});var bf=p((Y_,gf)=>{"use strict";u();var xd=yf();gf.exports=function(r){return xd(r)||r===0?r:r<0?-1:1}});var vf=p((J_,wf)=>{"use strict";u();wf.exports=Object.getOwnPropertyDescriptor});var Ke=p((Z_,_f)=>{"use strict";u();var Tt=vf();if(Tt)try{Tt([],"length")}catch{Tt=null}_f.exports=Tt});var Nr=p((e1,mf)=>{"use strict";u();var It=Object.defineProperty||!1;if(It)try{It({},"a",{value:1})}catch{It=!1}mf.exports=It});var Sf=p((t1,Ef)=>{"use strict";u();var xf=typeof Symbol<"u"&&Symbol,Ed=ai();Ef.exports=function(){return typeof xf!="function"||typeof Symbol!="function"||typeof xf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ed()}});var si=p((i1,Af)=>{"use strict";u();Af.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var li=p((a1,Bf)=>{"use strict";u();var Sd=fi();Bf.exports=Sd.getPrototypeOf||null});var If=p((u1,Tf)=>{"use strict";u();var Ad="Function.prototype.bind called on incompatible ",Bd=Object.prototype.toString,Rd=Math.max,Td="[object Function]",Rf=function(r,t){for(var n=[],i=0;i<r.length;i+=1)n[i]=r[i];for(var o=0;o<t.length;o+=1)n[o+r.length]=t[o];return n},Id=function(r,t){for(var n=[],i=t||0,o=0;i<r.length;i+=1,o+=1)n[o]=r[i];return n},Od=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t};Tf.exports=function(r){var t=this;if(typeof t!="function"||Bd.apply(t)!==Td)throw new TypeError(Ad+t);for(var n=Id(arguments,1),i,o=function(){if(this instanceof i){var y=t.apply(this,Rf(n,arguments));return Object(y)===y?y:this}return t.apply(r,Rf(n,arguments))},a=Rd(0,t.length-n.length),f=[],s=0;s<a;s++)f[s]="$"+s;if(i=Function("binder","return function ("+Od(f,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i}});var br=p((l1,Of)=>{"use strict";u();var qd=If();Of.exports=Function.prototype.bind||qd});var Ot=p((h1,qf)=>{"use strict";u();qf.exports=Function.prototype.call});var qt=p((p1,Mf)=>{"use strict";u();Mf.exports=Function.prototype.apply});var Cf=p((g1,Pf)=>{"use strict";u();Pf.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ci=p((w1,Ff)=>{"use strict";u();var Md=br(),Pd=qt(),Cd=Ot(),Fd=Cf();Ff.exports=Fd||Md.call(Cd,Pd)});var Mt=p((_1,Lf)=>{"use strict";u();var Ld=br(),Ud=Ye(),Dd=Ot(),jd=ci();Lf.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new Ud("a function is required");return jd(Ld,Dd,r)}});var Wf=p((x1,kf)=>{"use strict";u();var Nd=Mt(),Uf=Ke(),jf;try{jf=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var hi=!!jf&&Uf&&Uf(Object.prototype,"__proto__"),Nf=Object,Df=Nf.getPrototypeOf;kf.exports=hi&&typeof hi.get=="function"?Nd([hi.get]):typeof Df=="function"?function(r){return Df(r==null?r:Nf(r))}:!1});var Pt=p((S1,Vf)=>{"use strict";u();var Gf=si(),Hf=li(),$f=Wf();Vf.exports=Gf?function(r){return Gf(r)}:Hf?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return Hf(r)}:$f?function(r){return $f(r)}:null});var di=p((B1,zf)=>{"use strict";u();var kd=Function.prototype.call,Wd=Object.prototype.hasOwnProperty,Gd=br();zf.exports=Gd.call(kd,Wd)});var gi=p((T1,Qf)=>{"use strict";u();var O,Hd=fi(),$d=Ha(),Vd=Va(),zd=Ya(),Yd=Ja(),mr=ui(),_r=Ye(),Kd=ef(),Jd=tf(),Xd=of(),Zd=ff(),Qd=sf(),ep=cf(),rp=df(),tp=bf(),Xf=Function,pi=function(e){try{return Xf('"use strict"; return ('+e+").constructor;")()}catch{}},kr=Ke(),np=Nr(),yi=function(){throw new _r},ip=kr?(function(){try{return arguments.callee,yi}catch{try{return kr(arguments,"callee").get}catch{return yi}}})():yi,wr=Sf()(),J=Pt(),op=li(),ap=si(),Zf=qt(),Wr=Ot(),vr={},fp=typeof Uint8Array>"u"||!J?O:J(Uint8Array),Je={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?O:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?O:ArrayBuffer,"%ArrayIteratorPrototype%":wr&&J?J([][Symbol.iterator]()):O,"%AsyncFromSyncIteratorPrototype%":O,"%AsyncFunction%":vr,"%AsyncGenerator%":vr,"%AsyncGeneratorFunction%":vr,"%AsyncIteratorPrototype%":vr,"%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%":$d,"%eval%":eval,"%EvalError%":Vd,"%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%":Xf,"%GeneratorFunction%":vr,"%Int8Array%":typeof Int8Array>"u"?O:Int8Array,"%Int16Array%":typeof Int16Array>"u"?O:Int16Array,"%Int32Array%":typeof Int32Array>"u"?O:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":wr&&J?J(J([][Symbol.iterator]())):O,"%JSON%":typeof JSON=="object"?JSON:O,"%Map%":typeof Map>"u"?O:Map,"%MapIteratorPrototype%":typeof Map>"u"||!wr||!J?O:J(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Hd,"%Object.getOwnPropertyDescriptor%":kr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?O:Promise,"%Proxy%":typeof Proxy>"u"?O:Proxy,"%RangeError%":zd,"%ReferenceError%":Yd,"%Reflect%":typeof Reflect>"u"?O:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?O:Set,"%SetIteratorPrototype%":typeof Set>"u"||!wr||!J?O:J(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?O:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":wr&&J?J(""[Symbol.iterator]()):O,"%Symbol%":wr?Symbol:O,"%SyntaxError%":mr,"%ThrowTypeError%":ip,"%TypedArray%":fp,"%TypeError%":_r,"%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%":Kd,"%WeakMap%":typeof WeakMap>"u"?O:WeakMap,"%WeakRef%":typeof WeakRef>"u"?O:WeakRef,"%WeakSet%":typeof WeakSet>"u"?O:WeakSet,"%Function.prototype.call%":Wr,"%Function.prototype.apply%":Zf,"%Object.defineProperty%":np,"%Object.getPrototypeOf%":op,"%Math.abs%":Jd,"%Math.floor%":Xd,"%Math.max%":Zd,"%Math.min%":Qd,"%Math.pow%":ep,"%Math.round%":rp,"%Math.sign%":tp,"%Reflect.getPrototypeOf%":ap};if(J)try{null.error}catch(e){Yf=J(J(e)),Je["%Error.prototype%"]=Yf}var Yf,up=function e(r){var t;if(r==="%AsyncFunction%")t=pi("async function () {}");else if(r==="%GeneratorFunction%")t=pi("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=pi("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&J&&(t=J(i.prototype))}return Je[r]=t,t},Kf={__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"]},Gr=br(),Ct=di(),sp=Gr.call(Wr,Array.prototype.concat),lp=Gr.call(Zf,Array.prototype.splice),Jf=Gr.call(Wr,String.prototype.replace),Ft=Gr.call(Wr,String.prototype.slice),cp=Gr.call(Wr,RegExp.prototype.exec),hp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,dp=/\\(\\)?/g,pp=function(r){var t=Ft(r,0,1),n=Ft(r,-1);if(t==="%"&&n!=="%")throw new mr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new mr("invalid intrinsic syntax, expected opening `%`");var i=[];return Jf(r,hp,function(o,a,f,s){i[i.length]=f?Jf(s,dp,"$1"):a||o}),i},yp=function(r,t){var n=r,i;if(Ct(Kf,n)&&(i=Kf[n],n="%"+i[0]+"%"),Ct(Je,n)){var o=Je[n];if(o===vr&&(o=up(n)),typeof o>"u"&&!t)throw new _r("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new mr("intrinsic "+r+" does not exist!")};Qf.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new _r("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new _r('"allowMissing" argument must be a boolean');if(cp(/^%?[^%]*%?$/,r)===null)throw new mr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=pp(r),i=n.length>0?n[0]:"",o=yp("%"+i+"%",t),a=o.name,f=o.value,s=!1,c=o.alias;c&&(i=c[0],lp(n,sp([0,1],c)));for(var y=1,w=!0;y<n.length;y+=1){var m=n[y],A=Ft(m,0,1),R=Ft(m,-1);if((A==='"'||A==="'"||A==="`"||R==='"'||R==="'"||R==="`")&&A!==R)throw new mr("property names with quotes must have matching quotes");if((m==="constructor"||!w)&&(s=!0),i+="."+m,a="%"+i+"%",Ct(Je,a))f=Je[a];else if(f!=null){if(!(m in f)){if(!t)throw new _r("base intrinsic for "+r+" exists, but the property is not available.");return}if(kr&&y+1>=n.length){var D=kr(f,m);w=!!D,w&&"get"in D&&!("originalValue"in D.get)?f=D.get:f=f[m]}else w=Ct(f,m),f=f[m];w&&!s&&(Je[a]=f)}}return f}});var Xe=p((O1,tu)=>{"use strict";u();var eu=gi(),ru=Mt(),gp=ru([eu("%String.prototype.indexOf%")]);tu.exports=function(r,t){var n=eu(r,!!t);return typeof n=="function"&&gp(r,".prototype.")>-1?ru([n]):n}});var ou=p((M1,iu)=>{"use strict";u();var bp=jr()(),wp=Xe(),bi=wp("Object.prototype.toString"),Lt=function(r){return bp&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:bi(r)==="[object Arguments]"},nu=function(r){return Lt(r)?!0:r!==null&&typeof r=="object"&&"length"in r&&typeof r.length=="number"&&r.length>=0&&bi(r)!=="[object Array]"&&"callee"in r&&bi(r.callee)==="[object Function]"},vp=(function(){return Lt(arguments)})();Lt.isLegacyArguments=nu;iu.exports=vp?Lt:nu});var cu=p((C1,lu)=>{"use strict";u();var au=Xe(),_p=jr()(),mp=di(),xp=Ke(),_i;_p?(fu=au("RegExp.prototype.exec"),wi={},Ut=function(){throw wi},vi={toString:Ut,valueOf:Ut},typeof Symbol.toPrimitive=="symbol"&&(vi[Symbol.toPrimitive]=Ut),_i=function(r){if(!r||typeof r!="object")return!1;var t=xp(r,"lastIndex"),n=t&&mp(t,"value");if(!n)return!1;try{fu(r,vi)}catch(i){return i===wi}}):(uu=au("Object.prototype.toString"),su="[object RegExp]",_i=function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:uu(r)===su});var fu,wi,Ut,vi,uu,su;lu.exports=_i});var du=p((L1,hu)=>{"use strict";u();var Ep=Xe(),Sp=cu(),Ap=Ep("RegExp.prototype.exec"),Bp=Ye();hu.exports=function(r){if(!Sp(r))throw new Bp("`regex` must be a RegExp");return function(n){return Ap(r,n)!==null}}});var yu=p((D1,pu)=>{"use strict";u();var Rp=function*(){}.constructor;pu.exports=()=>Rp});var vu=p((N1,wu)=>{"use strict";u();var bu=Xe(),Tp=du(),Ip=Tp(/^\s*(?:function)?\*/),Op=jr()(),gu=Pt(),qp=bu("Object.prototype.toString"),Mp=bu("Function.prototype.toString"),Pp=yu();wu.exports=function(r){if(typeof r!="function")return!1;if(Ip(Mp(r)))return!0;if(!Op){var t=qp(r);return t==="[object GeneratorFunction]"}if(!gu)return!1;var n=Pp();return n&&gu(r)===n.prototype}});var Eu=p((W1,xu)=>{"use strict";u();var mu=Function.prototype.toString,xr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,xi,Dt;if(typeof xr=="function"&&typeof Object.defineProperty=="function")try{xi=Object.defineProperty({},"length",{get:function(){throw Dt}}),Dt={},xr(function(){throw 42},null,xi)}catch(e){e!==Dt&&(xr=null)}else xr=null;var Cp=/^\s*class\b/,Ei=function(r){try{var t=mu.call(r);return Cp.test(t)}catch{return!1}},mi=function(r){try{return Ei(r)?!1:(mu.call(r),!0)}catch{return!1}},jt=Object.prototype.toString,Fp="[object Object]",Lp="[object Function]",Up="[object GeneratorFunction]",Dp="[object HTMLAllCollection]",jp="[object HTML document.all class]",Np="[object HTMLCollection]",kp=typeof Symbol=="function"&&!!Symbol.toStringTag,Wp=!(0 in[,]),Si=function(){return!1};typeof document=="object"&&(_u=document.all,jt.call(_u)===jt.call(document.all)&&(Si=function(r){if((Wp||!r)&&(typeof r>"u"||typeof r=="object"))try{var t=jt.call(r);return(t===Dp||t===jp||t===Np||t===Fp)&&r("")==null}catch{}return!1}));var _u;xu.exports=xr?function(r){if(Si(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{xr(r,null,xi)}catch(t){if(t!==Dt)return!1}return!Ei(r)&&mi(r)}:function(r){if(Si(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(kp)return mi(r);if(Ei(r))return!1;var t=jt.call(r);return t!==Lp&&t!==Up&&!/^\[object HTML/.test(t)?!1:mi(r)}});var Bu=p((H1,Au)=>{"use strict";u();var Gp=Eu(),Hp=Object.prototype.toString,Su=Object.prototype.hasOwnProperty,$p=function(r,t,n){for(var i=0,o=r.length;i<o;i++)Su.call(r,i)&&(n==null?t(r[i],i,r):t.call(n,r[i],i,r))},Vp=function(r,t,n){for(var i=0,o=r.length;i<o;i++)n==null?t(r.charAt(i),i,r):t.call(n,r.charAt(i),i,r)},zp=function(r,t,n){for(var i in r)Su.call(r,i)&&(n==null?t(r[i],i,r):t.call(n,r[i],i,r))};function Yp(e){return Hp.call(e)==="[object Array]"}Au.exports=function(r,t,n){if(!Gp(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),Yp(r)?$p(r,t,i):typeof r=="string"?Vp(r,t,i):zp(r,t,i)}});var Tu=p((V1,Ru)=>{"use strict";u();Ru.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var Ou=p((Y1,Iu)=>{"use strict";u();var Ai=Tu(),Kp=globalThis;Iu.exports=function(){for(var r=[],t=0;t<Ai.length;t++)typeof Kp[Ai[t]]=="function"&&(r[r.length]=Ai[t]);return r}});var Cu=p((J1,Pu)=>{"use strict";u();var qu=Nr(),Jp=ui(),Er=Ye(),Mu=Ke();Pu.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new Er("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Er("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Er("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Er("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Er("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Er("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,s=!!Mu&&Mu(r,t);if(qu)qu(r,t,{configurable:a===null&&s?s.configurable:!a,enumerable:i===null&&s?s.enumerable:!i,value:n,writable:o===null&&s?s.writable:!o});else if(f||!i&&!o&&!a)r[t]=n;else throw new Jp("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Uu=p((Z1,Lu)=>{"use strict";u();var Bi=Nr(),Fu=function(){return!!Bi};Fu.hasArrayLengthDefineBug=function(){if(!Bi)return null;try{return Bi([],"length",{value:1}).length!==1}catch{return!0}};Lu.exports=Fu});var Wu=p((em,ku)=>{"use strict";u();var Xp=gi(),Du=Cu(),Zp=Uu()(),ju=Ke(),Nu=Ye(),Qp=Xp("%Math.floor%");ku.exports=function(r,t){if(typeof r!="function")throw new Nu("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Qp(t)!==t)throw new Nu("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in r&&ju){var a=ju(r,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(Zp?Du(r,"length",t,!0,!0):Du(r,"length",t)),r}});var Hu=p((tm,Gu)=>{"use strict";u();var e0=br(),r0=qt(),t0=ci();Gu.exports=function(){return t0(e0,r0,arguments)}});var zu=p((im,Nt)=>{"use strict";u();var n0=Wu(),$u=Nr(),i0=Mt(),Vu=Hu();Nt.exports=function(r){var t=i0(arguments),n=1+r.length-(arguments.length-1);return n0(t,n>0?n:0,!0)};$u?$u(Nt.exports,"apply",{value:Vu}):Nt.exports.apply=Vu});var Oi=p((am,Xu)=>{"use strict";u();var Gt=Bu(),o0=Ou(),Yu=zu(),Ti=Xe(),Wt=Ke(),kt=Pt(),a0=Ti("Object.prototype.toString"),Ju=jr()(),Ku=globalThis,Ri=o0(),Ii=Ti("String.prototype.slice"),f0=Ti("Array.prototype.indexOf",!0)||function(r,t){for(var n=0;n<r.length;n+=1)if(r[n]===t)return n;return-1},Ht={__proto__:null};Ju&&Wt&&kt?Gt(Ri,function(e){var r=new Ku[e];if(Symbol.toStringTag in r&&kt){var t=kt(r),n=Wt(t,Symbol.toStringTag);if(!n&&t){var i=kt(t);n=Wt(i,Symbol.toStringTag)}if(n&&n.get){var o=Yu(n.get);Ht["$"+e]=o}}}):Gt(Ri,function(e){var r=new Ku[e],t=r.slice||r.set;if(t){var n=Yu(t);Ht["$"+e]=n}});var u0=function(r){var t=!1;return Gt(Ht,function(n,i){if(!t)try{"$"+n(r)===i&&(t=Ii(i,1))}catch{}}),t},s0=function(r){var t=!1;return Gt(Ht,function(n,i){if(!t)try{n(r),t=Ii(i,1)}catch{}}),t};Xu.exports=function(r){if(!r||typeof r!="object")return!1;if(!Ju){var t=Ii(a0(r),8,-1);return f0(Ri,t)>-1?t:t!=="Object"?!1:s0(r)}return Wt?u0(r):null}});var qi=p((um,Zu)=>{"use strict";u();var l0=Oi();Zu.exports=function(r){return!!l0(r)}});var hs=p(q=>{"use strict";u();var c0=ou(),h0=vu(),ce=Oi(),Qu=qi();function Sr(e){return e.call.bind(e)}var es=typeof BigInt<"u",rs=typeof Symbol<"u",ue=Sr(Object.prototype.toString),d0=Sr(Number.prototype.valueOf),p0=Sr(String.prototype.valueOf),y0=Sr(Boolean.prototype.valueOf);es&&(ts=Sr(BigInt.prototype.valueOf));var ts;rs&&(ns=Sr(Symbol.prototype.valueOf));var ns;function $r(e,r){if(typeof e!="object")return!1;try{return r(e),!0}catch{return!1}}q.isArgumentsObject=c0;q.isGeneratorFunction=h0;q.isTypedArray=Qu;function g0(e){return typeof Promise<"u"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}q.isPromise=g0;function b0(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(e):Qu(e)||os(e)}q.isArrayBufferView=b0;function w0(e){return ce(e)==="Uint8Array"}q.isUint8Array=w0;function v0(e){return ce(e)==="Uint8ClampedArray"}q.isUint8ClampedArray=v0;function _0(e){return ce(e)==="Uint16Array"}q.isUint16Array=_0;function m0(e){return ce(e)==="Uint32Array"}q.isUint32Array=m0;function x0(e){return ce(e)==="Int8Array"}q.isInt8Array=x0;function E0(e){return ce(e)==="Int16Array"}q.isInt16Array=E0;function S0(e){return ce(e)==="Int32Array"}q.isInt32Array=S0;function A0(e){return ce(e)==="Float32Array"}q.isFloat32Array=A0;function B0(e){return ce(e)==="Float64Array"}q.isFloat64Array=B0;function R0(e){return ce(e)==="BigInt64Array"}q.isBigInt64Array=R0;function T0(e){return ce(e)==="BigUint64Array"}q.isBigUint64Array=T0;function $t(e){return ue(e)==="[object Map]"}$t.working=typeof Map<"u"&&$t(new Map);function I0(e){return typeof Map>"u"?!1:$t.working?$t(e):e instanceof Map}q.isMap=I0;function Vt(e){return ue(e)==="[object Set]"}Vt.working=typeof Set<"u"&&Vt(new Set);function O0(e){return typeof Set>"u"?!1:Vt.working?Vt(e):e instanceof Set}q.isSet=O0;function zt(e){return ue(e)==="[object WeakMap]"}zt.working=typeof WeakMap<"u"&&zt(new WeakMap);function q0(e){return typeof WeakMap>"u"?!1:zt.working?zt(e):e instanceof WeakMap}q.isWeakMap=q0;function Pi(e){return ue(e)==="[object WeakSet]"}Pi.working=typeof WeakSet<"u"&&Pi(new WeakSet);function M0(e){return Pi(e)}q.isWeakSet=M0;function Yt(e){return ue(e)==="[object ArrayBuffer]"}Yt.working=typeof ArrayBuffer<"u"&&Yt(new ArrayBuffer);function is(e){return typeof ArrayBuffer>"u"?!1:Yt.working?Yt(e):e instanceof ArrayBuffer}q.isArrayBuffer=is;function Kt(e){return ue(e)==="[object DataView]"}Kt.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Kt(new DataView(new ArrayBuffer(1),0,1));function os(e){return typeof DataView>"u"?!1:Kt.working?Kt(e):e instanceof DataView}q.isDataView=os;var Mi=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Hr(e){return ue(e)==="[object SharedArrayBuffer]"}function as(e){return typeof Mi>"u"?!1:(typeof Hr.working>"u"&&(Hr.working=Hr(new Mi)),Hr.working?Hr(e):e instanceof Mi)}q.isSharedArrayBuffer=as;function P0(e){return ue(e)==="[object AsyncFunction]"}q.isAsyncFunction=P0;function C0(e){return ue(e)==="[object Map Iterator]"}q.isMapIterator=C0;function F0(e){return ue(e)==="[object Set Iterator]"}q.isSetIterator=F0;function L0(e){return ue(e)==="[object Generator]"}q.isGeneratorObject=L0;function U0(e){return ue(e)==="[object WebAssembly.Module]"}q.isWebAssemblyCompiledModule=U0;function fs(e){return $r(e,d0)}q.isNumberObject=fs;function us(e){return $r(e,p0)}q.isStringObject=us;function ss(e){return $r(e,y0)}q.isBooleanObject=ss;function ls(e){return es&&$r(e,ts)}q.isBigIntObject=ls;function cs(e){return rs&&$r(e,ns)}q.isSymbolObject=cs;function D0(e){return fs(e)||us(e)||ss(e)||ls(e)||cs(e)}q.isBoxedPrimitive=D0;function j0(e){return typeof Uint8Array<"u"&&(is(e)||as(e))}q.isAnyArrayBuffer=j0;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(q,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var ps=p((hm,ds)=>{u();ds.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}});var Yr=p(M=>{u();var ys=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),n={},i=0;i<t.length;i++)n[t[i]]=Object.getOwnPropertyDescriptor(r,t[i]);return n},N0=/%[sdj%]/g;M.format=function(e){if(!tn(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(Le(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(e).replace(N0,function(f){if(f==="%%")return"%";if(t>=i)return f;switch(f){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return f}}),a=n[t];t<i;a=n[++t])rn(a)||!Ar(a)?o+=" "+a:o+=" "+Le(a);return o};M.deprecate=function(e,r){if(typeof l.default<"u"&&l.default.noDeprecation===!0)return e;if(typeof l.default>"u")return function(){return M.deprecate(e,r).apply(this,arguments)};var t=!1;function n(){if(!t){if(l.default.throwDeprecation)throw new Error(r);l.default.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}return n};var Jt={},gs=/^$/;l.default.env.NODE_DEBUG&&(Xt=l.default.env.NODE_DEBUG,Xt=Xt.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),gs=new RegExp("^"+Xt+"$","i"));var Xt;M.debuglog=function(e){if(e=e.toUpperCase(),!Jt[e])if(gs.test(e)){var r=l.default.pid;Jt[e]=function(){var t=M.format.apply(M,arguments);console.error("%s %d: %s",e,r,t)}}else Jt[e]=function(){};return Jt[e]};function Le(e,r){var t={seen:[],stylize:W0};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Ui(r)?t.showHidden=r:r&&M._extend(t,r),Qe(t.showHidden)&&(t.showHidden=!1),Qe(t.depth)&&(t.depth=2),Qe(t.colors)&&(t.colors=!1),Qe(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=k0),Qt(t,e,t.depth)}M.inspect=Le;Le.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]};Le.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function k0(e,r){var t=Le.styles[r];return t?"\x1B["+Le.colors[t][0]+"m"+e+"\x1B["+Le.colors[t][1]+"m":e}function W0(e,r){return e}function G0(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function Qt(e,r,t){if(e.customInspect&&r&&Zt(r.inspect)&&r.inspect!==M.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return tn(n)||(n=Qt(e,n,t)),n}var i=H0(e,r);if(i)return i;var o=Object.keys(r),a=G0(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),zr(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Ci(r);if(o.length===0){if(Zt(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(Vr(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(en(r))return e.stylize(Date.prototype.toString.call(r),"date");if(zr(r))return Ci(r)}var s="",c=!1,y=["{","}"];if(bs(r)&&(c=!0,y=["[","]"]),Zt(r)){var w=r.name?": "+r.name:"";s=" [Function"+w+"]"}if(Vr(r)&&(s=" "+RegExp.prototype.toString.call(r)),en(r)&&(s=" "+Date.prototype.toUTCString.call(r)),zr(r)&&(s=" "+Ci(r)),o.length===0&&(!c||r.length==0))return y[0]+s+y[1];if(t<0)return Vr(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var m;return c?m=$0(e,r,t,a,o):m=o.map(function(A){return Li(e,r,t,a,A,c)}),e.seen.pop(),V0(m,s,y)}function H0(e,r){if(Qe(r))return e.stylize("undefined","undefined");if(tn(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(ws(r))return e.stylize(""+r,"number");if(Ui(r))return e.stylize(""+r,"boolean");if(rn(r))return e.stylize("null","null")}function Ci(e){return"["+Error.prototype.toString.call(e)+"]"}function $0(e,r,t,n,i){for(var o=[],a=0,f=r.length;a<f;++a)vs(r,String(a))?o.push(Li(e,r,t,n,String(a),!0)):o.push("");return i.forEach(function(s){s.match(/^\d+$/)||o.push(Li(e,r,t,n,s,!0))}),o}function Li(e,r,t,n,i,o){var a,f,s;if(s=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]},s.get?s.set?f=e.stylize("[Getter/Setter]","special"):f=e.stylize("[Getter]","special"):s.set&&(f=e.stylize("[Setter]","special")),vs(n,i)||(a="["+i+"]"),f||(e.seen.indexOf(s.value)<0?(rn(t)?f=Qt(e,s.value,null):f=Qt(e,s.value,t-1),f.indexOf(`
|
|
2
|
+
`)>-1&&(o?f=f.split(`
|
|
3
|
+
`).map(function(c){return" "+c}).join(`
|
|
4
|
+
`).slice(2):f=`
|
|
5
|
+
`+f.split(`
|
|
6
|
+
`).map(function(c){return" "+c}).join(`
|
|
7
|
+
`))):f=e.stylize("[Circular]","special")),Qe(a)){if(o&&i.match(/^\d+$/))return f;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+f}function V0(e,r,t){var n=0,i=e.reduce(function(o,a){return n++,a.indexOf(`
|
|
8
|
+
`)>=0&&n++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?t[0]+(r===""?"":r+`
|
|
9
|
+
`)+" "+e.join(`,
|
|
10
|
+
`)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}M.types=hs();function bs(e){return Array.isArray(e)}M.isArray=bs;function Ui(e){return typeof e=="boolean"}M.isBoolean=Ui;function rn(e){return e===null}M.isNull=rn;function z0(e){return e==null}M.isNullOrUndefined=z0;function ws(e){return typeof e=="number"}M.isNumber=ws;function tn(e){return typeof e=="string"}M.isString=tn;function Y0(e){return typeof e=="symbol"}M.isSymbol=Y0;function Qe(e){return e===void 0}M.isUndefined=Qe;function Vr(e){return Ar(e)&&Di(e)==="[object RegExp]"}M.isRegExp=Vr;M.types.isRegExp=Vr;function Ar(e){return typeof e=="object"&&e!==null}M.isObject=Ar;function en(e){return Ar(e)&&Di(e)==="[object Date]"}M.isDate=en;M.types.isDate=en;function zr(e){return Ar(e)&&(Di(e)==="[object Error]"||e instanceof Error)}M.isError=zr;M.types.isNativeError=zr;function Zt(e){return typeof e=="function"}M.isFunction=Zt;function K0(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}M.isPrimitive=K0;M.isBuffer=ps();function Di(e){return Object.prototype.toString.call(e)}function Fi(e){return e<10?"0"+e.toString(10):e.toString(10)}var J0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X0(){var e=new Date,r=[Fi(e.getHours()),Fi(e.getMinutes()),Fi(e.getSeconds())].join(":");return[e.getDate(),J0[e.getMonth()],r].join(" ")}M.log=function(){console.log("%s - %s",X0(),M.format.apply(M,arguments))};M.inherits=j();M._extend=function(e,r){if(!r||!Ar(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};function vs(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var Ze=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;M.promisify=function(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');if(Ze&&r[Ze]){var t=r[Ze];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,Ze,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var n,i,o=new Promise(function(s,c){n=s,i=c}),a=[],f=0;f<arguments.length;f++)a.push(arguments[f]);a.push(function(s,c){s?i(s):n(c)});try{r.apply(this,a)}catch(s){i(s)}return o}return Object.setPrototypeOf(t,Object.getPrototypeOf(r)),Ze&&Object.defineProperty(t,Ze,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,ys(r))};M.promisify.custom=Ze;function Z0(e,r){if(!e){var t=new Error("Promise was rejected with a falsy value");t.reason=e,e=t}return r(e)}function Q0(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function r(){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);var i=t.pop();if(typeof i!="function")throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,t).then(function(f){l.default.nextTick(a.bind(null,null,f))},function(f){l.default.nextTick(Z0.bind(null,f,a))})}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,ys(e)),r}M.callbackify=Q0});var As=p((gm,Ss)=>{"use strict";u();function _s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function ms(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?_s(Object(t),!0).forEach(function(n){ey(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ey(e,r,t){return r=Es(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ry(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function xs(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Es(n.key),n)}}function ty(e,r,t){return r&&xs(e.prototype,r),t&&xs(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Es(e){var r=ny(e,"string");return typeof r=="symbol"?r:String(r)}function ny(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var iy=we(),nn=iy.Buffer,oy=Yr(),ji=oy.inspect,ay=ji&&ji.custom||"inspect";function fy(e,r,t){nn.prototype.copy.call(e,r,t)}Ss.exports=(function(){function e(){ry(this,e),this.head=null,this.tail=null,this.length=0}return ty(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return nn.alloc(0);for(var n=nn.allocUnsafe(t>>>0),i=this.head,o=0;i;)fy(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,o=n.data;for(t-=o.length;n=n.next;){var a=n.data,f=t>a.length?a.length:t;if(f===a.length?o+=a:o+=a.slice(0,t),t-=f,t===0){f===a.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(f));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(t){var n=nn.allocUnsafe(t),i=this.head,o=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var a=i.data,f=t>a.length?a.length:t;if(a.copy(n,n.length-t,0,f),t-=f,t===0){f===a.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(f));break}++o}return this.length-=o,n}},{key:ay,value:function(t,n){return ji(this,ms(ms({},n),{},{depth:0,customInspect:!1}))}}]),e})()});var ki=p((wm,Rs)=>{"use strict";u();function uy(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,l.default.nextTick(Ni,this,e)):l.default.nextTick(Ni,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!r&&o?t._writableState?t._writableState.errorEmitted?l.default.nextTick(on,t):(t._writableState.errorEmitted=!0,l.default.nextTick(Bs,t,o)):l.default.nextTick(Bs,t,o):r?(l.default.nextTick(on,t),r(o)):l.default.nextTick(on,t)}),this)}function Bs(e,r){Ni(e,r),on(e)}function on(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function sy(){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 Ni(e,r){e.emit("error",r)}function ly(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}Rs.exports={destroy:uy,undestroy:sy,errorOrDestroy:ly}});var er=p((_m,Os)=>{"use strict";u();function cy(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}var Is={};function se(e,r,t){t||(t=Error);function n(o,a,f){return typeof r=="string"?r:r(o,a,f)}var i=(function(o){cy(a,o);function a(f,s,c){return o.call(this,n(f,s,c))||this}return a})(t);i.prototype.name=t.name,i.prototype.code=e,Is[e]=i}function Ts(e,r){if(Array.isArray(e)){var t=e.length;return e=e.map(function(n){return String(n)}),t>2?"one of ".concat(r," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:t===2?"one of ".concat(r," ").concat(e[0]," or ").concat(e[1]):"of ".concat(r," ").concat(e[0])}else return"of ".concat(r," ").concat(String(e))}function hy(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function dy(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function py(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}se("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);se("ERR_INVALID_ARG_TYPE",function(e,r,t){var n;typeof r=="string"&&hy(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";var i;if(dy(e," argument"))i="The ".concat(e," ").concat(n," ").concat(Ts(r,"type"));else{var o=py(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(Ts(r,"type"))}return i+=". Received type ".concat(typeof t),i},TypeError);se("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");se("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});se("ERR_STREAM_PREMATURE_CLOSE","Premature close");se("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});se("ERR_MULTIPLE_CALLBACK","Callback called multiple times");se("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");se("ERR_STREAM_WRITE_AFTER_END","write after end");se("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);se("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);se("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Os.exports.codes=Is});var Wi=p((xm,qs)=>{"use strict";u();var yy=er().codes.ERR_INVALID_OPT_VALUE;function gy(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function by(e,r,t,n){var i=gy(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?t:"highWaterMark";throw new yy(o,i)}return Math.floor(i)}return e.objectMode?16:16*1024}qs.exports={getHighWaterMark:by}});var Hi=p((Sm,Ms)=>{u();Ms.exports=wy;function wy(e,r){if(Gi("noDeprecation"))return e;var t=!1;function n(){if(!t){if(Gi("throwDeprecation"))throw new Error(r);Gi("traceDeprecation")?console.trace(r):console.warn(r),t=!0}return e.apply(this,arguments)}return n}function Gi(e){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}});var zi=p((Bm,Ds)=>{"use strict";u();Ds.exports=H;function Cs(e){var r=this;this.next=null,this.entry=null,this.finish=function(){$y(r,e)}}var Br;H.WritableState=Jr;var vy={deprecate:Hi()},Fs=oi(),fn=we().Buffer,_y=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function my(e){return fn.from(e)}function xy(e){return fn.isBuffer(e)||e instanceof _y}var Vi=ki(),Ey=Wi(),Sy=Ey.getHighWaterMark,Ue=er().codes,Ay=Ue.ERR_INVALID_ARG_TYPE,By=Ue.ERR_METHOD_NOT_IMPLEMENTED,Ry=Ue.ERR_MULTIPLE_CALLBACK,Ty=Ue.ERR_STREAM_CANNOT_PIPE,Iy=Ue.ERR_STREAM_DESTROYED,Oy=Ue.ERR_STREAM_NULL_VALUES,qy=Ue.ERR_STREAM_WRITE_AFTER_END,My=Ue.ERR_UNKNOWN_ENCODING,Rr=Vi.errorOrDestroy;j()(H,Fs);function Py(){}function Jr(e,r,t){Br=Br||rr(),e=e||{},typeof t!="boolean"&&(t=r instanceof Br),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=Sy(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Ny(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cs(this)}Jr.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(Jr.prototype,"buffer",{get:vy.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var an;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(an=Function.prototype[Symbol.hasInstance],Object.defineProperty(H,Symbol.hasInstance,{value:function(r){return an.call(this,r)?!0:this!==H?!1:r&&r._writableState instanceof Jr}})):an=function(r){return r instanceof this};function H(e){Br=Br||rr();var r=this instanceof Br;if(!r&&!an.call(H,this))return new H(e);this._writableState=new Jr(e,this,r),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Fs.call(this)}H.prototype.pipe=function(){Rr(this,new Ty)};function Cy(e,r){var t=new qy;Rr(e,t),l.default.nextTick(r,t)}function Fy(e,r,t,n){var i;return t===null?i=new Oy:typeof t!="string"&&!r.objectMode&&(i=new Ay("chunk",["string","Buffer"],t)),i?(Rr(e,i),l.default.nextTick(n,i),!1):!0}H.prototype.write=function(e,r,t){var n=this._writableState,i=!1,o=!n.objectMode&&xy(e);return o&&!fn.isBuffer(e)&&(e=my(e)),typeof r=="function"&&(t=r,r=null),o?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=Py),n.ending?Cy(this,t):(o||Fy(this,n,e,t))&&(n.pendingcb++,i=Uy(this,n,o,e,r,t)),i};H.prototype.cork=function(){this._writableState.corked++};H.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Ls(this,e))};H.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new My(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(H.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Ly(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=fn.from(r,t)),r}Object.defineProperty(H.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Uy(e,r,t,n,i,o){if(!t){var a=Ly(r,n,i);n!==a&&(t=!0,i="buffer",n=a)}var f=r.objectMode?1:n.length;r.length+=f;var s=r.length<r.highWaterMark;if(s||(r.needDrain=!0),r.writing||r.corked){var c=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:o,next:null},c?c.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else $i(e,r,!1,f,n,i,o);return s}function $i(e,r,t,n,i,o,a){r.writelen=n,r.writecb=a,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new Iy("write")):t?e._writev(i,r.onwrite):e._write(i,o,r.onwrite),r.sync=!1}function Dy(e,r,t,n,i){--r.pendingcb,t?(l.default.nextTick(i,n),l.default.nextTick(Kr,e,r),e._writableState.errorEmitted=!0,Rr(e,n)):(i(n),e._writableState.errorEmitted=!0,Rr(e,n),Kr(e,r))}function jy(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Ny(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new Ry;if(jy(t),r)Dy(e,t,n,r,i);else{var o=Us(t)||e.destroyed;!o&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Ls(e,t),n?l.default.nextTick(Ps,e,t,o,i):Ps(e,t,o,i)}}function Ps(e,r,t,n){t||ky(e,r),r.pendingcb--,n(),Kr(e,r)}function ky(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function Ls(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),o=r.corkedRequestsFree;o.entry=t;for(var a=0,f=!0;t;)i[a]=t,t.isBuf||(f=!1),t=t.next,a+=1;i.allBuffers=f,$i(e,r,!0,r.length,i,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new Cs(r),r.bufferedRequestCount=0}else{for(;t;){var s=t.chunk,c=t.encoding,y=t.callback,w=r.objectMode?1:s.length;if($i(e,r,!1,w,s,c,y),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}H.prototype._write=function(e,r,t){t(new By("_write()"))};H.prototype._writev=null;H.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||Hy(this,n,t),this};Object.defineProperty(H.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Us(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Wy(e,r){e._final(function(t){r.pendingcb--,t&&Rr(e,t),r.prefinished=!0,e.emit("prefinish"),Kr(e,r)})}function Gy(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,l.default.nextTick(Wy,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function Kr(e,r){var t=Us(r);if(t&&(Gy(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function Hy(e,r,t){r.ending=!0,Kr(e,r),t&&(r.finished?l.default.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function $y(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(H.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){this._writableState&&(this._writableState.destroyed=r)}});H.prototype.destroy=Vi.destroy;H.prototype._undestroy=Vi.undestroy;H.prototype._destroy=function(e,r){r(e)}});var rr=p((Tm,Ns)=>{"use strict";u();var Vy=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};Ns.exports=_e;var js=Ji(),Ki=zi();j()(_e,js);for(Yi=Vy(Ki.prototype),un=0;un<Yi.length;un++)sn=Yi[un],_e.prototype[sn]||(_e.prototype[sn]=Ki.prototype[sn]);var Yi,sn,un;function _e(e){if(!(this instanceof _e))return new _e(e);js.call(this,e),Ki.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",zy)))}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 zy(){this._writableState.ended||l.default.nextTick(Yy,this)}function Yy(e){e.end()}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(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var Gs=p((Xi,Ws)=>{u();var ln=we(),Be=ln.Buffer;function ks(e,r){for(var t in e)r[t]=e[t]}Be.from&&Be.alloc&&Be.allocUnsafe&&Be.allocUnsafeSlow?Ws.exports=ln:(ks(ln,Xi),Xi.Buffer=Tr);function Tr(e,r,t){return Be(e,r,t)}ks(Be,Tr);Tr.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Be(e,r,t)};Tr.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Be(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};Tr.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Be(e)};Tr.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ln.SlowBuffer(e)}});var Ir=p($s=>{"use strict";u();var Qi=Gs().Buffer,Hs=Qi.isEncoding||function(e){switch(e=""+e,e&&e.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 Ky(e){if(!e)return"utf8";for(var r;;)switch(e){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 e;default:if(r)return;e=(""+e).toLowerCase(),r=!0}}function Jy(e){var r=Ky(e);if(typeof r!="string"&&(Qi.isEncoding===Hs||!Hs(e)))throw new Error("Unknown encoding: "+e);return r||e}$s.StringDecoder=Xr;function Xr(e){this.encoding=Jy(e);var r;switch(this.encoding){case"utf16le":this.text=tg,this.end=ng,r=4;break;case"utf8":this.fillLast=Qy,r=4;break;case"base64":this.text=ig,this.end=og,r=3;break;default:this.write=ag,this.end=fg;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Qi.allocUnsafe(r)}Xr.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};Xr.prototype.end=rg;Xr.prototype.text=eg;Xr.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Zi(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Xy(e,r,t){var n=r.length-1;if(n<t)return 0;var i=Zi(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=Zi(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=Zi(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function Zy(e,r,t){if((r[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Qy(e){var r=this.lastTotal-this.lastNeed,t=Zy(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function eg(e,r){var t=Xy(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function rg(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function tg(e,r){if((e.length-r)%2===0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function ng(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function ig(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function og(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function ag(e){return e.toString(this.encoding)}function fg(e){return e&&e.length?this.write(e):""}});var cn=p((Pm,Ys)=>{"use strict";u();var Vs=er().codes.ERR_STREAM_PREMATURE_CLOSE;function ug(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function sg(){}function lg(e){return e.setHeader&&typeof e.abort=="function"}function zs(e,r,t){if(typeof r=="function")return zs(e,null,r);r||(r={}),t=ug(t||sg);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,o=function(){e.writable||f()},a=e._writableState&&e._writableState.finished,f=function(){i=!1,a=!0,n||t.call(e)},s=e._readableState&&e._readableState.endEmitted,c=function(){n=!1,s=!0,i||t.call(e)},y=function(R){t.call(e,R)},w=function(){var R;if(n&&!s)return(!e._readableState||!e._readableState.ended)&&(R=new Vs),t.call(e,R);if(i&&!a)return(!e._writableState||!e._writableState.ended)&&(R=new Vs),t.call(e,R)},m=function(){e.req.on("finish",f)};return lg(e)?(e.on("complete",f),e.on("abort",w),e.req?m():e.on("request",m)):i&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",c),e.on("finish",f),r.error!==!1&&e.on("error",y),e.on("close",w),function(){e.removeListener("complete",f),e.removeListener("abort",w),e.removeListener("request",m),e.req&&e.req.removeListener("finish",f),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",f),e.removeListener("end",c),e.removeListener("error",y),e.removeListener("close",w)}}Ys.exports=zs});var Js=p((Fm,Ks)=>{"use strict";u();var hn;function De(e,r,t){return r=cg(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function cg(e){var r=hg(e,"string");return typeof r=="symbol"?r:String(r)}function hg(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var dg=cn(),je=Symbol("lastResolve"),tr=Symbol("lastReject"),Zr=Symbol("error"),dn=Symbol("ended"),nr=Symbol("lastPromise"),eo=Symbol("handlePromise"),ir=Symbol("stream");function Ne(e,r){return{value:e,done:r}}function pg(e){var r=e[je];if(r!==null){var t=e[ir].read();t!==null&&(e[nr]=null,e[je]=null,e[tr]=null,r(Ne(t,!1)))}}function yg(e){l.default.nextTick(pg,e)}function gg(e,r){return function(t,n){e.then(function(){if(r[dn]){t(Ne(void 0,!0));return}r[eo](t,n)},n)}}var bg=Object.getPrototypeOf(function(){}),wg=Object.setPrototypeOf((hn={get stream(){return this[ir]},next:function(){var r=this,t=this[Zr];if(t!==null)return Promise.reject(t);if(this[dn])return Promise.resolve(Ne(void 0,!0));if(this[ir].destroyed)return new Promise(function(a,f){l.default.nextTick(function(){r[Zr]?f(r[Zr]):a(Ne(void 0,!0))})});var n=this[nr],i;if(n)i=new Promise(gg(n,this));else{var o=this[ir].read();if(o!==null)return Promise.resolve(Ne(o,!1));i=new Promise(this[eo])}return this[nr]=i,i}},De(hn,Symbol.asyncIterator,function(){return this}),De(hn,"return",function(){var r=this;return new Promise(function(t,n){r[ir].destroy(null,function(i){if(i){n(i);return}t(Ne(void 0,!0))})})}),hn),bg),vg=function(r){var t,n=Object.create(wg,(t={},De(t,ir,{value:r,writable:!0}),De(t,je,{value:null,writable:!0}),De(t,tr,{value:null,writable:!0}),De(t,Zr,{value:null,writable:!0}),De(t,dn,{value:r._readableState.endEmitted,writable:!0}),De(t,eo,{value:function(o,a){var f=n[ir].read();f?(n[nr]=null,n[je]=null,n[tr]=null,o(Ne(f,!1))):(n[je]=o,n[tr]=a)},writable:!0}),t));return n[nr]=null,dg(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[tr];o!==null&&(n[nr]=null,n[je]=null,n[tr]=null,o(i)),n[Zr]=i;return}var a=n[je];a!==null&&(n[nr]=null,n[je]=null,n[tr]=null,a(Ne(void 0,!0))),n[dn]=!0}),r.on("readable",yg.bind(null,n)),n};Ks.exports=vg});var Zs=p((Um,Xs)=>{u();Xs.exports=function(){throw new Error("Readable.from is not available in the browser")}});var Ji=p((Nm,ul)=>{"use strict";u();ul.exports=C;var Or;C.ReadableState=tl;var jm=gr().EventEmitter,rl=function(r,t){return r.listeners(t).length},et=oi(),pn=we().Buffer,_g=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function mg(e){return pn.from(e)}function xg(e){return pn.isBuffer(e)||e instanceof _g}var ro=Yr(),I;ro&&ro.debuglog?I=ro.debuglog("stream"):I=function(){};var Eg=As(),uo=ki(),Sg=Wi(),Ag=Sg.getHighWaterMark,yn=er().codes,Bg=yn.ERR_INVALID_ARG_TYPE,Rg=yn.ERR_STREAM_PUSH_AFTER_EOF,Tg=yn.ERR_METHOD_NOT_IMPLEMENTED,Ig=yn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,qr,to,no;j()(C,et);var Qr=uo.errorOrDestroy,io=["error","close","destroy","pause","resume"];function Og(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function tl(e,r,t){Or=Or||rr(),e=e||{},typeof t!="boolean"&&(t=r instanceof Or),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Ag(this,e,"readableHighWaterMark",t),this.buffer=new Eg,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(qr||(qr=Ir().StringDecoder),this.decoder=new qr(e.encoding),this.encoding=e.encoding)}function C(e){if(Or=Or||rr(),!(this instanceof C))return new C(e);var r=this instanceof Or;this._readableState=new tl(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),et.call(this)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){this._readableState&&(this._readableState.destroyed=r)}});C.prototype.destroy=uo.destroy;C.prototype._undestroy=uo.undestroy;C.prototype._destroy=function(e,r){r(e)};C.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=pn.from(e,r),r=""),n=!0),nl(this,e,r,!1,n)};C.prototype.unshift=function(e){return nl(this,e,null,!0,!1)};function nl(e,r,t,n,i){I("readableAddChunk",r);var o=e._readableState;if(r===null)o.reading=!1,Pg(e,o);else{var a;if(i||(a=qg(o,r)),a)Qr(e,a);else if(o.objectMode||r&&r.length>0)if(typeof r!="string"&&!o.objectMode&&Object.getPrototypeOf(r)!==pn.prototype&&(r=mg(r)),n)o.endEmitted?Qr(e,new Ig):oo(e,o,r,!0);else if(o.ended)Qr(e,new Rg);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!t?(r=o.decoder.write(r),o.objectMode||r.length!==0?oo(e,o,r,!1):fo(e,o)):oo(e,o,r,!1)}else n||(o.reading=!1,fo(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function oo(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&gn(e)),fo(e,r)}function qg(e,r){var t;return!xg(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new Bg("chunk",["string","Buffer","Uint8Array"],r)),t}C.prototype.isPaused=function(){return this._readableState.flowing===!1};C.prototype.setEncoding=function(e){qr||(qr=Ir().StringDecoder);var r=new qr(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Qs=1073741824;function Mg(e){return e>=Qs?e=Qs:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function el(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=Mg(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}C.prototype.read=function(e){I("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return I("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?ao(this):gn(this),null;if(e=el(e,r),e===0&&r.ended)return r.length===0&&ao(this),null;var n=r.needReadable;I("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,I("length less than watermark",n)),r.ended||r.reading?(n=!1,I("reading or ended",n)):n&&(I("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=el(t,r)));var i;return e>0?i=al(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&ao(this)),i!==null&&this.emit("data",i),i};function Pg(e,r){if(I("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?gn(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,il(e)))}}function gn(e){var r=e._readableState;I("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(I("emitReadable",r.flowing),r.emittedReadable=!0,l.default.nextTick(il,e))}function il(e){var r=e._readableState;I("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,so(e)}function fo(e,r){r.readingMore||(r.readingMore=!0,l.default.nextTick(Cg,e,r))}function Cg(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(I("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}C.prototype._read=function(e){Qr(this,new Tg("_read()"))};C.prototype.pipe=function(e,r){var t=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,I("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==l.default.stdout&&e!==l.default.stderr,o=i?f:D;n.endEmitted?l.default.nextTick(o):t.once("end",o),e.on("unpipe",a);function a($,G){I("onunpipe"),$===t&&G&&G.hasUnpiped===!1&&(G.hasUnpiped=!0,y())}function f(){I("onend"),e.end()}var s=Fg(t);e.on("drain",s);var c=!1;function y(){I("cleanup"),e.removeListener("close",A),e.removeListener("finish",R),e.removeListener("drain",s),e.removeListener("error",m),e.removeListener("unpipe",a),t.removeListener("end",f),t.removeListener("end",D),t.removeListener("data",w),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&s()}t.on("data",w);function w($){I("ondata");var G=e.write($);I("dest.write",G),G===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&fl(n.pipes,e)!==-1)&&!c&&(I("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function m($){I("onerror",$),D(),e.removeListener("error",m),rl(e,"error")===0&&Qr(e,$)}Og(e,"error",m);function A(){e.removeListener("finish",R),D()}e.once("close",A);function R(){I("onfinish"),e.removeListener("close",A),D()}e.once("finish",R);function D(){I("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(I("pipe resume"),t.resume()),e};function Fg(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&rl(e,"data")&&(t.flowing=!0,so(e))}}C.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=fl(r.pipes,e);return a===-1?this:(r.pipes.splice(a,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};C.prototype.on=function(e,r){var t=et.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,I("on readable",n.length,n.reading),n.length?gn(this):n.reading||l.default.nextTick(Lg,this)),t};C.prototype.addListener=C.prototype.on;C.prototype.removeListener=function(e,r){var t=et.prototype.removeListener.call(this,e,r);return e==="readable"&&l.default.nextTick(ol,this),t};C.prototype.removeAllListeners=function(e){var r=et.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&l.default.nextTick(ol,this),r};function ol(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Lg(e){I("readable nexttick read 0"),e.read(0)}C.prototype.resume=function(){var e=this._readableState;return e.flowing||(I("resume"),e.flowing=!e.readableListening,Ug(this,e)),e.paused=!1,this};function Ug(e,r){r.resumeScheduled||(r.resumeScheduled=!0,l.default.nextTick(Dg,e,r))}function Dg(e,r){I("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),so(e),r.flowing&&!r.reading&&e.read(0)}C.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function so(e){var r=e._readableState;for(I("flow",r.flowing);r.flowing&&e.read()!==null;);}C.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(I("wrapped end"),t.decoder&&!t.ended){var a=t.decoder.end();a&&a.length&&r.push(a)}r.push(null)}),e.on("data",function(a){if(I("wrapped data"),t.decoder&&(a=t.decoder.write(a)),!(t.objectMode&&a==null)&&!(!t.objectMode&&(!a||!a.length))){var f=r.push(a);f||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=(function(f){return function(){return e[f].apply(e,arguments)}})(i));for(var o=0;o<io.length;o++)e.on(io[o],this.emit.bind(this,io[o]));return this._read=function(a){I("wrapped _read",a),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(C.prototype[Symbol.asyncIterator]=function(){return to===void 0&&(to=Js()),to(this)});Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});C._fromList=al;Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function al(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function ao(e){var r=e._readableState;I("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,l.default.nextTick(jg,r,e))}function jg(e,r){if(I("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(C.from=function(e,r){return no===void 0&&(no=Zs()),no(C,e,r)});function fl(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var lo=p((Wm,ll)=>{"use strict";u();ll.exports=Re;var bn=er().codes,Ng=bn.ERR_METHOD_NOT_IMPLEMENTED,kg=bn.ERR_MULTIPLE_CALLBACK,Wg=bn.ERR_TRANSFORM_ALREADY_TRANSFORMING,Gg=bn.ERR_TRANSFORM_WITH_LENGTH_0,wn=rr();j()(Re,wn);function Hg(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new kg);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Re(e){if(!(this instanceof Re))return new Re(e);wn.call(this,e),this._transformState={afterTransform:Hg.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",$g)}function $g(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){sl(e,r,t)}):sl(this,null,null)}Re.prototype.push=function(e,r){return this._transformState.needTransform=!1,wn.prototype.push.call(this,e,r)};Re.prototype._transform=function(e,r,t){t(new Ng("_transform()"))};Re.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Re.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Re.prototype._destroy=function(e,r){wn.prototype._destroy.call(this,e,function(t){r(t)})};function sl(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new Gg;if(e._transformState.transforming)throw new Wg;return e.push(null)}});var dl=p((Hm,hl)=>{"use strict";u();hl.exports=rt;var cl=lo();j()(rt,cl);function rt(e){if(!(this instanceof rt))return new rt(e);cl.call(this,e)}rt.prototype._transform=function(e,r,t){t(null,e)}});var wl=p((Vm,bl)=>{"use strict";u();var co;function Vg(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var gl=er().codes,zg=gl.ERR_MISSING_ARGS,Yg=gl.ERR_STREAM_DESTROYED;function pl(e){if(e)throw e}function Kg(e){return e.setHeader&&typeof e.abort=="function"}function Jg(e,r,t,n){n=Vg(n);var i=!1;e.on("close",function(){i=!0}),co===void 0&&(co=cn()),co(e,{readable:r,writable:t},function(a){if(a)return n(a);i=!0,n()});var o=!1;return function(a){if(!i&&!o){if(o=!0,Kg(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new Yg("pipe"))}}}function yl(e){e()}function Xg(e,r){return e.pipe(r)}function Zg(e){return!e.length||typeof e[e.length-1]!="function"?pl:e.pop()}function Qg(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=Zg(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new zg("streams");var i,o=r.map(function(a,f){var s=f<r.length-1,c=f>0;return Jg(a,s,c,function(y){i||(i=y),y&&o.forEach(yl),!s&&(o.forEach(yl),n(i))})});return r.reduce(Xg)}bl.exports=Qg});var po=p((Ym,vl)=>{u();vl.exports=le;var ho=gr().EventEmitter,eb=j();eb(le,ho);le.Readable=Ji();le.Writable=zi();le.Duplex=rr();le.Transform=lo();le.PassThrough=dl();le.finished=cn();le.pipeline=wl();le.Stream=le;function le(){ho.call(this)}le.prototype.pipe=function(e,r){var t=this;function n(y){e.writable&&e.write(y)===!1&&t.pause&&t.pause()}t.on("data",n);function i(){t.readable&&t.resume&&t.resume()}e.on("drain",i),!e._isStdio&&(!r||r.end!==!1)&&(t.on("end",a),t.on("close",f));var o=!1;function a(){o||(o=!0,e.end())}function f(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function s(y){if(c(),ho.listenerCount(this,"error")===0)throw y}t.on("error",s),e.on("error",s);function c(){t.removeListener("data",n),e.removeListener("drain",i),t.removeListener("end",a),t.removeListener("close",f),t.removeListener("error",s),e.removeListener("error",s),t.removeListener("end",c),t.removeListener("close",c),e.removeListener("close",c)}return t.on("end",c),t.on("close",c),e.on("close",c),e.emit("pipe",t),e}});var xl=p((Jm,ml)=>{"use strict";u();var me=Z().Buffer,_l=po().Transform,rb=j();function ke(e){_l.call(this),this._block=me.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}rb(ke,_l);ke.prototype._transform=function(e,r,t){var n=null;try{this.update(e,r)}catch(i){n=i}t(n)};ke.prototype._flush=function(e){var r=null;try{this.push(this.digest())}catch(t){r=t}e(r)};var tb=typeof Uint8Array<"u",nb=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(me.prototype instanceof Uint8Array||me.TYPED_ARRAY_SUPPORT);function ib(e,r){if(e instanceof me)return e;if(typeof e=="string")return me.from(e,r);if(nb&&ArrayBuffer.isView(e)){if(e.byteLength===0)return me.alloc(0);var t=me.from(e.buffer,e.byteOffset,e.byteLength);if(t.byteLength===e.byteLength)return t}if(tb&&e instanceof Uint8Array||me.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return me.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}ke.prototype.update=function(e,r){if(this._finalized)throw new Error("Digest already called");e=ib(e,r);for(var t=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)t[i++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)t[this._blockOffset++]=e[n++];for(var o=0,a=e.length*8;a>0;++o)this._length[o]+=a,a=this._length[o]/4294967296|0,a>0&&(this._length[o]-=4294967296*a);return this};ke.prototype._update=function(){throw new Error("_update is not implemented")};ke.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var r=this._digest();e!==void 0&&(r=r.toString(e)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return r};ke.prototype._digest=function(){throw new Error("_digest is not implemented")};ml.exports=ke});var yo=p((Zm,Sl)=>{"use strict";u();var ob=j(),El=xl(),ab=Z().Buffer,fb=new Array(16);function vn(){El.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}ob(vn,El);vn.prototype._update=function(){for(var e=fb,r=0;r<16;++r)e[r]=this._block.readInt32LE(r*4);var t=this._a,n=this._b,i=this._c,o=this._d;t=Q(t,n,i,o,e[0],3614090360,7),o=Q(o,t,n,i,e[1],3905402710,12),i=Q(i,o,t,n,e[2],606105819,17),n=Q(n,i,o,t,e[3],3250441966,22),t=Q(t,n,i,o,e[4],4118548399,7),o=Q(o,t,n,i,e[5],1200080426,12),i=Q(i,o,t,n,e[6],2821735955,17),n=Q(n,i,o,t,e[7],4249261313,22),t=Q(t,n,i,o,e[8],1770035416,7),o=Q(o,t,n,i,e[9],2336552879,12),i=Q(i,o,t,n,e[10],4294925233,17),n=Q(n,i,o,t,e[11],2304563134,22),t=Q(t,n,i,o,e[12],1804603682,7),o=Q(o,t,n,i,e[13],4254626195,12),i=Q(i,o,t,n,e[14],2792965006,17),n=Q(n,i,o,t,e[15],1236535329,22),t=ee(t,n,i,o,e[1],4129170786,5),o=ee(o,t,n,i,e[6],3225465664,9),i=ee(i,o,t,n,e[11],643717713,14),n=ee(n,i,o,t,e[0],3921069994,20),t=ee(t,n,i,o,e[5],3593408605,5),o=ee(o,t,n,i,e[10],38016083,9),i=ee(i,o,t,n,e[15],3634488961,14),n=ee(n,i,o,t,e[4],3889429448,20),t=ee(t,n,i,o,e[9],568446438,5),o=ee(o,t,n,i,e[14],3275163606,9),i=ee(i,o,t,n,e[3],4107603335,14),n=ee(n,i,o,t,e[8],1163531501,20),t=ee(t,n,i,o,e[13],2850285829,5),o=ee(o,t,n,i,e[2],4243563512,9),i=ee(i,o,t,n,e[7],1735328473,14),n=ee(n,i,o,t,e[12],2368359562,20),t=re(t,n,i,o,e[5],4294588738,4),o=re(o,t,n,i,e[8],2272392833,11),i=re(i,o,t,n,e[11],1839030562,16),n=re(n,i,o,t,e[14],4259657740,23),t=re(t,n,i,o,e[1],2763975236,4),o=re(o,t,n,i,e[4],1272893353,11),i=re(i,o,t,n,e[7],4139469664,16),n=re(n,i,o,t,e[10],3200236656,23),t=re(t,n,i,o,e[13],681279174,4),o=re(o,t,n,i,e[0],3936430074,11),i=re(i,o,t,n,e[3],3572445317,16),n=re(n,i,o,t,e[6],76029189,23),t=re(t,n,i,o,e[9],3654602809,4),o=re(o,t,n,i,e[12],3873151461,11),i=re(i,o,t,n,e[15],530742520,16),n=re(n,i,o,t,e[2],3299628645,23),t=te(t,n,i,o,e[0],4096336452,6),o=te(o,t,n,i,e[7],1126891415,10),i=te(i,o,t,n,e[14],2878612391,15),n=te(n,i,o,t,e[5],4237533241,21),t=te(t,n,i,o,e[12],1700485571,6),o=te(o,t,n,i,e[3],2399980690,10),i=te(i,o,t,n,e[10],4293915773,15),n=te(n,i,o,t,e[1],2240044497,21),t=te(t,n,i,o,e[8],1873313359,6),o=te(o,t,n,i,e[15],4264355552,10),i=te(i,o,t,n,e[6],2734768916,15),n=te(n,i,o,t,e[13],1309151649,21),t=te(t,n,i,o,e[4],4149444226,6),o=te(o,t,n,i,e[11],3174756917,10),i=te(i,o,t,n,e[2],718787259,15),n=te(n,i,o,t,e[9],3951481745,21),this._a=this._a+t|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0};vn.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 e=ab.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function _n(e,r){return e<<r|e>>>32-r}function Q(e,r,t,n,i,o,a){return _n(e+(r&t|~r&n)+i+o|0,a)+r|0}function ee(e,r,t,n,i,o,a){return _n(e+(r&n|t&~n)+i+o|0,a)+r|0}function re(e,r,t,n,i,o,a){return _n(e+(r^t^n)+i+o|0,a)+r|0}function te(e,r,t,n,i,o,a){return _n(e+(t^(r|~n))+i+o|0,a)+r|0}Sl.exports=vn});var Bl=p((ex,Al)=>{u();var ub={}.toString;Al.exports=Array.isArray||function(e){return ub.call(e)=="[object Array]"}});var Tl=p((tx,Rl)=>{"use strict";u();var sb=Ye(),lb=Xe(),cb=lb("TypedArray.prototype.buffer",!0),hb=qi();Rl.exports=cb||function(r){if(!hb(r))throw new sb("Not a Typed Array");return r.buffer}});var mn=p((ix,Ol)=>{"use strict";u();var he=Z().Buffer,db=Bl(),pb=Tl(),yb=ArrayBuffer.isView||function(r){try{return pb(r),!0}catch{return!1}},gb=typeof Uint8Array<"u",Il=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",bb=Il&&(he.prototype instanceof Uint8Array||he.TYPED_ARRAY_SUPPORT);Ol.exports=function(r,t){if(he.isBuffer(r))return r.constructor&&!("isBuffer"in r)?he.from(r):r;if(typeof r=="string")return he.from(r,t);if(Il&&yb(r)){if(r.byteLength===0)return he.alloc(0);if(bb){var n=he.from(r.buffer,r.byteOffset,r.byteLength);if(n.byteLength===r.byteLength)return n}var i=r instanceof Uint8Array?r:new Uint8Array(r.buffer,r.byteOffset,r.byteLength),o=he.from(i);if(o.length===r.byteLength)return o}if(gb&&r instanceof Uint8Array)return he.from(r);var a=db(r);if(a)for(var f=0;f<r.length;f+=1){var s=r[f];if(typeof s!="number"||s<0||s>255||~~s!==s)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||he.isBuffer(r)&&r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r))return he.from(r);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Cl=p((ax,Pl)=>{"use strict";u();var wb=Z().Buffer,vb=mn(),Ml=typeof Uint8Array<"u",_b=Ml&&typeof ArrayBuffer<"u",ql=_b&&ArrayBuffer.isView;Pl.exports=function(e,r){if(typeof e=="string"||wb.isBuffer(e)||Ml&&e instanceof Uint8Array||ql&&ql(e))return vb(e,r);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var tt=p((ux,go)=>{"use strict";u();typeof l.default>"u"||!l.default.version||l.default.version.indexOf("v0.")===0||l.default.version.indexOf("v1.")===0&&l.default.version.indexOf("v1.8.")!==0?go.exports={nextTick:mb}:go.exports=l.default;function mb(e,r,t,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,o,a;switch(i){case 0:case 1:return l.default.nextTick(e);case 2:return l.default.nextTick(function(){e.call(null,r)});case 3:return l.default.nextTick(function(){e.call(null,r,t)});case 4:return l.default.nextTick(function(){e.call(null,r,t,n)});default:for(o=new Array(i-1),a=0;a<o.length;)o[a++]=arguments[a];return l.default.nextTick(function(){e.apply(null,o)})}}});var Ll=p((lx,Fl)=>{u();var xb={}.toString;Fl.exports=Array.isArray||function(e){return xb.call(e)=="[object Array]"}});var bo=p((hx,Ul)=>{u();Ul.exports=gr().EventEmitter});var En=p((wo,jl)=>{u();var xn=we(),Te=xn.Buffer;function Dl(e,r){for(var t in e)r[t]=e[t]}Te.from&&Te.alloc&&Te.allocUnsafe&&Te.allocUnsafeSlow?jl.exports=xn:(Dl(xn,wo),wo.Buffer=Mr);function Mr(e,r,t){return Te(e,r,t)}Dl(Te,Mr);Mr.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Te(e,r,t)};Mr.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Te(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};Mr.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Te(e)};Mr.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return xn.SlowBuffer(e)}});var Pr=p(ne=>{u();function Eb(e){return Array.isArray?Array.isArray(e):Sn(e)==="[object Array]"}ne.isArray=Eb;function Sb(e){return typeof e=="boolean"}ne.isBoolean=Sb;function Ab(e){return e===null}ne.isNull=Ab;function Bb(e){return e==null}ne.isNullOrUndefined=Bb;function Rb(e){return typeof e=="number"}ne.isNumber=Rb;function Tb(e){return typeof e=="string"}ne.isString=Tb;function Ib(e){return typeof e=="symbol"}ne.isSymbol=Ib;function Ob(e){return e===void 0}ne.isUndefined=Ob;function qb(e){return Sn(e)==="[object RegExp]"}ne.isRegExp=qb;function Mb(e){return typeof e=="object"&&e!==null}ne.isObject=Mb;function Pb(e){return Sn(e)==="[object Date]"}ne.isDate=Pb;function Cb(e){return Sn(e)==="[object Error]"||e instanceof Error}ne.isError=Cb;function Fb(e){return typeof e=="function"}ne.isFunction=Fb;function Lb(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}ne.isPrimitive=Lb;ne.isBuffer=we().Buffer.isBuffer;function Sn(e){return Object.prototype.toString.call(e)}});var kl=p((bx,vo)=>{"use strict";u();function Ub(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var Nl=En().Buffer,nt=Yr();function Db(e,r,t){e.copy(r,t)}vo.exports=(function(){function e(){Ub(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i},e.prototype.concat=function(t){if(this.length===0)return Nl.alloc(0);for(var n=Nl.allocUnsafe(t>>>0),i=this.head,o=0;i;)Db(i.data,n,o),o+=i.data.length,i=i.next;return n},e})();nt&&nt.inspect&&nt.inspect.custom&&(vo.exports.prototype[nt.inspect.custom]=function(){var e=nt.inspect({length:this.length});return this.constructor.name+" "+e})});var _o=p((vx,Wl)=>{"use strict";u();var An=tt();function jb(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,An.nextTick(Bn,this,e)):An.nextTick(Bn,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!r&&o?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,An.nextTick(Bn,t,o)):An.nextTick(Bn,t,o):r&&r(o)}),this)}function Nb(){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 Bn(e,r){e.emit("error",r)}Wl.exports={destroy:jb,undestroy:Nb}});var xo=p((mx,Jl)=>{"use strict";u();var or=tt();Jl.exports=z;function Hl(e){var r=this;this.next=null,this.entry=null,this.finish=function(){iw(r,e)}}var kb=!l.default.browser&&["v0.10","v0.9."].indexOf(l.default.version.slice(0,5))>-1?setImmediate:or.nextTick,Cr;z.WritableState=ot;var $l=Object.create(Pr());$l.inherits=j();var Wb={deprecate:Hi()},Vl=bo(),Tn=En().Buffer,Gb=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Hb(e){return Tn.from(e)}function $b(e){return Tn.isBuffer(e)||e instanceof Gb}var zl=_o();$l.inherits(z,Vl);function Vb(){}function ot(e,r){Cr=Cr||ar(),e=e||{};var t=r instanceof Cr;this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=e.writableHighWaterMark,o=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:t&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(f){Qb(r,f)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Hl(this)}ot.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(ot.prototype,"buffer",{get:Wb.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Rn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Rn=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(e){return Rn.call(this,e)?!0:this!==z?!1:e&&e._writableState instanceof ot}})):Rn=function(e){return e instanceof this};function z(e){if(Cr=Cr||ar(),!Rn.call(z,this)&&!(this instanceof Cr))return new z(e);this._writableState=new ot(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Vl.call(this)}z.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function zb(e,r){var t=new Error("write after end");e.emit("error",t),or.nextTick(r,t)}function Yb(e,r,t,n){var i=!0,o=!1;return t===null?o=new TypeError("May not write null values to stream"):typeof t!="string"&&t!==void 0&&!r.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),or.nextTick(n,o),i=!1),i}z.prototype.write=function(e,r,t){var n=this._writableState,i=!1,o=!n.objectMode&&$b(e);return o&&!Tn.isBuffer(e)&&(e=Hb(e)),typeof r=="function"&&(t=r,r=null),o?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=Vb),n.ended?zb(this,t):(o||Yb(this,n,e,t))&&(n.pendingcb++,i=Jb(this,n,o,e,r,t)),i};z.prototype.cork=function(){var e=this._writableState;e.corked++};z.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Yl(this,e))};z.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+r);return this._writableState.defaultEncoding=r,this};function Kb(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=Tn.from(r,t)),r}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Jb(e,r,t,n,i,o){if(!t){var a=Kb(r,n,i);n!==a&&(t=!0,i="buffer",n=a)}var f=r.objectMode?1:n.length;r.length+=f;var s=r.length<r.highWaterMark;if(s||(r.needDrain=!0),r.writing||r.corked){var c=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:o,next:null},c?c.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else mo(e,r,!1,f,n,i,o);return s}function mo(e,r,t,n,i,o,a){r.writelen=n,r.writecb=a,r.writing=!0,r.sync=!0,t?e._writev(i,r.onwrite):e._write(i,o,r.onwrite),r.sync=!1}function Xb(e,r,t,n,i){--r.pendingcb,t?(or.nextTick(i,n),or.nextTick(it,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),it(e,r))}function Zb(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Qb(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(Zb(t),r)Xb(e,t,n,r,i);else{var o=Kl(t);!o&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Yl(e,t),n?kb(Gl,e,t,o,i):Gl(e,t,o,i)}}function Gl(e,r,t,n){t||ew(e,r),r.pendingcb--,n(),it(e,r)}function ew(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function Yl(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),o=r.corkedRequestsFree;o.entry=t;for(var a=0,f=!0;t;)i[a]=t,t.isBuf||(f=!1),t=t.next,a+=1;i.allBuffers=f,mo(e,r,!0,r.length,i,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new Hl(r),r.bufferedRequestCount=0}else{for(;t;){var s=t.chunk,c=t.encoding,y=t.callback,w=r.objectMode?1:s.length;if(mo(e,r,!1,w,s,c,y),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}z.prototype._write=function(e,r,t){t(new Error("_write() is not implemented"))};z.prototype._writev=null;z.prototype.end=function(e,r,t){var n=this._writableState;typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||nw(this,n,t)};function Kl(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function rw(e,r){e._final(function(t){r.pendingcb--,t&&e.emit("error",t),r.prefinished=!0,e.emit("prefinish"),it(e,r)})}function tw(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"?(r.pendingcb++,r.finalCalled=!0,or.nextTick(rw,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function it(e,r){var t=Kl(r);return t&&(tw(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"))),t}function nw(e,r,t){r.ending=!0,it(e,r),t&&(r.finished?or.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function iw(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(z.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});z.prototype.destroy=zl.destroy;z.prototype._undestroy=zl.undestroy;z.prototype._destroy=function(e,r){this.end(),r(e)}});var ar=p((Ex,ec)=>{"use strict";u();var Xl=tt(),ow=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};ec.exports=Ie;var Zl=Object.create(Pr());Zl.inherits=j();var Ql=Ao(),So=xo();Zl.inherits(Ie,Ql);for(Eo=ow(So.prototype),In=0;In<Eo.length;In++)On=Eo[In],Ie.prototype[On]||(Ie.prototype[On]=So.prototype[On]);var Eo,On,In;function Ie(e){if(!(this instanceof Ie))return new Ie(e);Ql.call(this,e),So.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",aw)}Object.defineProperty(Ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function aw(){this.allowHalfOpen||this._writableState.ended||Xl.nextTick(fw,this)}function fw(e){e.end()}Object.defineProperty(Ie.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});Ie.prototype._destroy=function(e,r){this.push(null),this.end(),Xl.nextTick(r,e)}});var Ao=p((Bx,hc)=>{"use strict";u();var Lr=tt();hc.exports=W;var uw=Ll(),at;W.ReadableState=fc;var Ax=gr().EventEmitter,ic=function(e,r){return e.listeners(r).length},Oo=bo(),ft=En().Buffer,sw=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function lw(e){return ft.from(e)}function cw(e){return ft.isBuffer(e)||e instanceof sw}var oc=Object.create(Pr());oc.inherits=j();var Bo=Yr(),F=void 0;Bo&&Bo.debuglog?F=Bo.debuglog("stream"):F=function(){};var hw=kl(),ac=_o(),Fr;oc.inherits(W,Oo);var Ro=["error","close","destroy","pause","resume"];function dw(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):uw(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function fc(e,r){at=at||ar(),e=e||{};var t=r instanceof at;this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,o=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:t&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new hw,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Fr||(Fr=Ir().StringDecoder),this.decoder=new Fr(e.encoding),this.encoding=e.encoding)}function W(e){if(at=at||ar(),!(this instanceof W))return new W(e);this._readableState=new fc(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Oo.call(this)}Object.defineProperty(W.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=ac.destroy;W.prototype._undestroy=ac.undestroy;W.prototype._destroy=function(e,r){this.push(null),r(e)};W.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=ft.from(e,r),r=""),n=!0),uc(this,e,r,!1,n)};W.prototype.unshift=function(e){return uc(this,e,null,!0,!1)};function uc(e,r,t,n,i){var o=e._readableState;if(r===null)o.reading=!1,bw(e,o);else{var a;i||(a=pw(o,r)),a?e.emit("error",a):o.objectMode||r&&r.length>0?(typeof r!="string"&&!o.objectMode&&Object.getPrototypeOf(r)!==ft.prototype&&(r=lw(r)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):To(e,o,r,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!t?(r=o.decoder.write(r),o.objectMode||r.length!==0?To(e,o,r,!1):sc(e,o)):To(e,o,r,!1))):n||(o.reading=!1)}return yw(o)}function To(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(e.emit("data",t),e.read(0)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&qn(e)),sc(e,r)}function pw(e,r){var t;return!cw(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new TypeError("Invalid non-string/buffer chunk")),t}function yw(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(e){return Fr||(Fr=Ir().StringDecoder),this._readableState.decoder=new Fr(e),this._readableState.encoding=e,this};var rc=8388608;function gw(e){return e>=rc?e=rc:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function tc(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=gw(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}W.prototype.read=function(e){F("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&(r.length>=r.highWaterMark||r.ended))return F("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?Io(this):qn(this),null;if(e=tc(e,r),e===0&&r.ended)return r.length===0&&Io(this),null;var n=r.needReadable;F("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,F("length less than watermark",n)),r.ended||r.reading?(n=!1,F("reading or ended",n)):n&&(F("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=tc(t,r)));var i;return e>0?i=lc(e,r):i=null,i===null?(r.needReadable=!0,e=0):r.length-=e,r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&Io(this)),i!==null&&this.emit("data",i),i};function bw(e,r){if(!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,qn(e)}}function qn(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(F("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?Lr.nextTick(nc,e):nc(e))}function nc(e){F("emit readable"),e.emit("readable"),qo(e)}function sc(e,r){r.readingMore||(r.readingMore=!0,Lr.nextTick(ww,e,r))}function ww(e,r){for(var t=r.length;!r.reading&&!r.flowing&&!r.ended&&r.length<r.highWaterMark&&(F("maybeReadMore read 0"),e.read(0),t!==r.length);)t=r.length;r.readingMore=!1}W.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};W.prototype.pipe=function(e,r){var t=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,F("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==l.default.stdout&&e!==l.default.stderr,o=i?f:$;n.endEmitted?Lr.nextTick(o):t.once("end",o),e.on("unpipe",a);function a(G,L){F("onunpipe"),G===t&&L&&L.hasUnpiped===!1&&(L.hasUnpiped=!0,y())}function f(){F("onend"),e.end()}var s=vw(t);e.on("drain",s);var c=!1;function y(){F("cleanup"),e.removeListener("close",R),e.removeListener("finish",D),e.removeListener("drain",s),e.removeListener("error",A),e.removeListener("unpipe",a),t.removeListener("end",f),t.removeListener("end",$),t.removeListener("data",m),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&s()}var w=!1;t.on("data",m);function m(G){F("ondata"),w=!1;var L=e.write(G);L===!1&&!w&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&cc(n.pipes,e)!==-1)&&!c&&(F("false write response, pause",n.awaitDrain),n.awaitDrain++,w=!0),t.pause())}function A(G){F("onerror",G),$(),e.removeListener("error",A),ic(e,"error")===0&&e.emit("error",G)}dw(e,"error",A);function R(){e.removeListener("finish",D),$()}e.once("close",R);function D(){F("onfinish"),e.removeListener("close",R),$()}e.once("finish",D);function $(){F("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(F("pipe resume"),t.resume()),e};function vw(e){return function(){var r=e._readableState;F("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&ic(e,"data")&&(r.flowing=!0,qo(e))}}W.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=cc(r.pipes,e);return a===-1?this:(r.pipes.splice(a,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};W.prototype.on=function(e,r){var t=Oo.prototype.on.call(this,e,r);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&qn(this):Lr.nextTick(_w,this))}return t};W.prototype.addListener=W.prototype.on;function _w(e){F("readable nexttick read 0"),e.read(0)}W.prototype.resume=function(){var e=this._readableState;return e.flowing||(F("resume"),e.flowing=!0,mw(this,e)),this};function mw(e,r){r.resumeScheduled||(r.resumeScheduled=!0,Lr.nextTick(xw,e,r))}function xw(e,r){r.reading||(F("resume read 0"),e.read(0)),r.resumeScheduled=!1,r.awaitDrain=0,e.emit("resume"),qo(e),r.flowing&&!r.reading&&e.read(0)}W.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function qo(e){var r=e._readableState;for(F("flow",r.flowing);r.flowing&&e.read()!==null;);}W.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(F("wrapped end"),t.decoder&&!t.ended){var a=t.decoder.end();a&&a.length&&r.push(a)}r.push(null)}),e.on("data",function(a){if(F("wrapped data"),t.decoder&&(a=t.decoder.write(a)),!(t.objectMode&&a==null)&&!(!t.objectMode&&(!a||!a.length))){var f=r.push(a);f||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=(function(a){return function(){return e[a].apply(e,arguments)}})(i));for(var o=0;o<Ro.length;o++)e.on(Ro[o],this.emit.bind(this,Ro[o]));return this._read=function(a){F("wrapped _read",a),n&&(n=!1,e.resume())},this};Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});W._fromList=lc;function lc(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.head.data:t=r.buffer.concat(r.length),r.buffer.clear()):t=Ew(e,r.buffer,r.decoder),t}function Ew(e,r,t){var n;return e<r.head.data.length?(n=r.head.data.slice(0,e),r.head.data=r.head.data.slice(e)):e===r.head.data.length?n=r.shift():n=t?Sw(e,r):Aw(e,r),n}function Sw(e,r){var t=r.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var o=t.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),e-=a,e===0){a===o.length?(++n,t.next?r.head=t.next:r.head=r.tail=null):(r.head=t,t.data=o.slice(a));break}++n}return r.length-=n,i}function Aw(e,r){var t=ft.allocUnsafe(e),n=r.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),e-=a,e===0){a===o.length?(++i,n.next?r.head=n.next:r.head=r.tail=null):(r.head=n,n.data=o.slice(a));break}++i}return r.length-=i,t}function Io(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,Lr.nextTick(Bw,r,e))}function Bw(e,r){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"))}function cc(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var Mo=p((Tx,yc)=>{"use strict";u();yc.exports=Oe;var Mn=ar(),pc=Object.create(Pr());pc.inherits=j();pc.inherits(Oe,Mn);function Rw(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Oe(e){if(!(this instanceof Oe))return new Oe(e);Mn.call(this,e),this._transformState={afterTransform:Rw.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Tw)}function Tw(){var e=this;typeof this._flush=="function"?this._flush(function(r,t){dc(e,r,t)}):dc(this,null,null)}Oe.prototype.push=function(e,r){return this._transformState.needTransform=!1,Mn.prototype.push.call(this,e,r)};Oe.prototype._transform=function(e,r,t){throw new Error("_transform() is not implemented")};Oe.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Oe.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Oe.prototype._destroy=function(e,r){var t=this;Mn.prototype._destroy.call(this,e,function(n){r(n),t.emit("close")})};function dc(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var vc=p((Ox,wc)=>{"use strict";u();wc.exports=ut;var gc=Mo(),bc=Object.create(Pr());bc.inherits=j();bc.inherits(ut,gc);function ut(e){if(!(this instanceof ut))return new ut(e);gc.call(this,e)}ut.prototype._transform=function(e,r,t){t(null,e)}});var mc=p((xe,_c)=>{u();xe=_c.exports=Ao();xe.Stream=xe;xe.Readable=xe;xe.Writable=xo();xe.Duplex=ar();xe.Transform=Mo();xe.PassThrough=vc()});var Sc=p((Px,Ec)=>{"use strict";u();var Iw=Z().Buffer,Ow=Cl(),xc=mc().Transform,qw=j();function We(e){xc.call(this),this._block=Iw.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}qw(We,xc);We.prototype._transform=function(e,r,t){var n=null;try{this.update(e,r)}catch(i){n=i}t(n)};We.prototype._flush=function(e){var r=null;try{this.push(this.digest())}catch(t){r=t}e(r)};We.prototype.update=function(e,r){if(this._finalized)throw new Error("Digest already called");for(var t=Ow(e,r),n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o]=t[i],o+=1,i+=1;this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset]=t[i],this._blockOffset+=1,i+=1;for(var a=0,f=t.length*8;f>0;++a)this._length[a]+=f,f=this._length[a]/4294967296|0,f>0&&(this._length[a]-=4294967296*f);return this};We.prototype._update=function(){throw new Error("_update is not implemented")};We.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var r=this._digest();e!==void 0&&(r=r.toString(e)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return r};We.prototype._digest=function(){throw new Error("_digest is not implemented")};Ec.exports=We});var Co=p((Fx,qc)=>{"use strict";u();var Po=we().Buffer,Mw=j(),Oc=Sc(),Pw=new Array(16),st=[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],lt=[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],ct=[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],ht=[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],dt=[0,1518500249,1859775393,2400959708,2840853838],pt=[1352829926,1548603684,1836072691,2053994217,0];function fr(e,r){return e<<r|e>>>32-r}function Ac(e,r,t,n,i,o,a,f){return fr(e+(r^t^n)+o+a|0,f)+i|0}function Bc(e,r,t,n,i,o,a,f){return fr(e+(r&t|~r&n)+o+a|0,f)+i|0}function Rc(e,r,t,n,i,o,a,f){return fr(e+((r|~t)^n)+o+a|0,f)+i|0}function Tc(e,r,t,n,i,o,a,f){return fr(e+(r&n|t&~n)+o+a|0,f)+i|0}function Ic(e,r,t,n,i,o,a,f){return fr(e+(r^(t|~n))+o+a|0,f)+i|0}function Pn(){Oc.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}Mw(Pn,Oc);Pn.prototype._update=function(){for(var e=Pw,r=0;r<16;++r)e[r]=this._block.readInt32LE(r*4);for(var t=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,f=this._a|0,s=this._b|0,c=this._c|0,y=this._d|0,w=this._e|0,m=0;m<80;m+=1){var A,R;m<16?(A=Ac(t,n,i,o,a,e[st[m]],dt[0],ct[m]),R=Ic(f,s,c,y,w,e[lt[m]],pt[0],ht[m])):m<32?(A=Bc(t,n,i,o,a,e[st[m]],dt[1],ct[m]),R=Tc(f,s,c,y,w,e[lt[m]],pt[1],ht[m])):m<48?(A=Rc(t,n,i,o,a,e[st[m]],dt[2],ct[m]),R=Rc(f,s,c,y,w,e[lt[m]],pt[2],ht[m])):m<64?(A=Tc(t,n,i,o,a,e[st[m]],dt[3],ct[m]),R=Bc(f,s,c,y,w,e[lt[m]],pt[3],ht[m])):(A=Ic(t,n,i,o,a,e[st[m]],dt[4],ct[m]),R=Ac(f,s,c,y,w,e[lt[m]],pt[4],ht[m])),t=a,a=o,o=fr(i,10),i=n,n=A,f=w,w=y,y=fr(c,10),c=s,s=R}var D=this._b+i+y|0;this._b=this._c+o+w|0,this._c=this._d+a+f|0,this._d=this._e+t+s|0,this._e=this._a+n+c|0,this._a=D};Pn.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,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 e=Po.alloc?Po.alloc(20):new Po(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};qc.exports=Pn});var ur=p((Ux,Mc)=>{"use strict";u();var Cw=Z().Buffer,Fw=mn();function Cn(e,r){this._block=Cw.alloc(e),this._finalSize=r,this._blockSize=e,this._len=0}Cn.prototype.update=function(e,r){e=Fw(e,r||"utf8");for(var t=this._block,n=this._blockSize,i=e.length,o=this._len,a=0;a<i;){for(var f=o%n,s=Math.min(i-a,n-f),c=0;c<s;c++)t[f+c]=e[a+c];o+=s,a+=s,o%n===0&&this._update(t)}return this._len+=i,this};Cn.prototype.digest=function(e){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=this._len*8;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var n=(t&4294967295)>>>0,i=(t-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o};Cn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};Mc.exports=Cn});var Fc=p((jx,Cc)=>{"use strict";u();var Lw=j(),Pc=ur(),Uw=Z().Buffer,Dw=[1518500249,1859775393,-1894007588,-899497514],jw=new Array(80);function yt(){this.init(),this._w=jw,Pc.call(this,64,56)}Lw(yt,Pc);yt.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Nw(e){return e<<5|e>>>27}function kw(e){return e<<30|e>>>2}function Ww(e,r,t,n){return e===0?r&t|~r&n:e===2?r&t|r&n|t&n:r^t^n}yt.prototype._update=function(e){for(var r=this._w,t=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,f=0;f<16;++f)r[f]=e.readInt32BE(f*4);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var s=0;s<80;++s){var c=~~(s/20),y=Nw(t)+Ww(c,n,i,o)+a+r[s]+Dw[c]|0;a=o,o=i,i=kw(n),n=t,t=y}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};yt.prototype._hash=function(){var e=Uw.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};Cc.exports=yt});var Dc=p((kx,Uc)=>{"use strict";u();var Gw=j(),Lc=ur(),Hw=Z().Buffer,$w=[1518500249,1859775393,-1894007588,-899497514],Vw=new Array(80);function gt(){this.init(),this._w=Vw,Lc.call(this,64,56)}Gw(gt,Lc);gt.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function zw(e){return e<<1|e>>>31}function Yw(e){return e<<5|e>>>27}function Kw(e){return e<<30|e>>>2}function Jw(e,r,t,n){return e===0?r&t|~r&n:e===2?r&t|r&n|t&n:r^t^n}gt.prototype._update=function(e){for(var r=this._w,t=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,f=0;f<16;++f)r[f]=e.readInt32BE(f*4);for(;f<80;++f)r[f]=zw(r[f-3]^r[f-8]^r[f-14]^r[f-16]);for(var s=0;s<80;++s){var c=~~(s/20),y=Yw(t)+Jw(c,n,i,o)+a+r[s]+$w[c]|0;a=o,o=i,i=Kw(n),n=t,t=y}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};gt.prototype._hash=function(){var e=Hw.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};Uc.exports=gt});var Fo=p((Gx,Nc)=>{"use strict";u();var Xw=j(),jc=ur(),Zw=Z().Buffer,Qw=[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],ev=new Array(64);function bt(){this.init(),this._w=ev,jc.call(this,64,56)}Xw(bt,jc);bt.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 rv(e,r,t){return t^e&(r^t)}function tv(e,r,t){return e&r|t&(e|r)}function nv(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function iv(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function ov(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function av(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}bt.prototype._update=function(e){for(var r=this._w,t=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,a=this._e|0,f=this._f|0,s=this._g|0,c=this._h|0,y=0;y<16;++y)r[y]=e.readInt32BE(y*4);for(;y<64;++y)r[y]=av(r[y-2])+r[y-7]+ov(r[y-15])+r[y-16]|0;for(var w=0;w<64;++w){var m=c+iv(a)+rv(a,f,s)+Qw[w]+r[w]|0,A=nv(t)+tv(t,n,i)|0;c=s,s=f,f=a,a=o+m|0,o=i,i=n,n=t,t=m+A|0}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=f+this._f|0,this._g=s+this._g|0,this._h=c+this._h|0};bt.prototype._hash=function(){var e=Zw.allocUnsafe(32);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.writeInt32BE(this._h,28),e};Nc.exports=bt});var Wc=p(($x,kc)=>{"use strict";u();var fv=j(),uv=Fo(),sv=ur(),lv=Z().Buffer,cv=new Array(64);function Fn(){this.init(),this._w=cv,sv.call(this,64,56)}fv(Fn,uv);Fn.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};Fn.prototype._hash=function(){var e=lv.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};kc.exports=Fn});var Lo=p((zx,Kc)=>{"use strict";u();var hv=j(),Yc=ur(),dv=Z().Buffer,Gc=[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],pv=new Array(160);function wt(){this.init(),this._w=pv,Yc.call(this,128,112)}hv(wt,Yc);wt.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 Hc(e,r,t){return t^e&(r^t)}function $c(e,r,t){return e&r|t&(e|r)}function Vc(e,r){return(e>>>28|r<<4)^(r>>>2|e<<30)^(r>>>7|e<<25)}function zc(e,r){return(e>>>14|r<<18)^(e>>>18|r<<14)^(r>>>9|e<<23)}function yv(e,r){return(e>>>1|r<<31)^(e>>>8|r<<24)^e>>>7}function gv(e,r){return(e>>>1|r<<31)^(e>>>8|r<<24)^(e>>>7|r<<25)}function bv(e,r){return(e>>>19|r<<13)^(r>>>29|e<<3)^e>>>6}function wv(e,r){return(e>>>19|r<<13)^(r>>>29|e<<3)^(e>>>6|r<<26)}function X(e,r){return e>>>0<r>>>0?1:0}wt.prototype._update=function(e){for(var r=this._w,t=this._ah|0,n=this._bh|0,i=this._ch|0,o=this._dh|0,a=this._eh|0,f=this._fh|0,s=this._gh|0,c=this._hh|0,y=this._al|0,w=this._bl|0,m=this._cl|0,A=this._dl|0,R=this._el|0,D=this._fl|0,$=this._gl|0,G=this._hl|0,L=0;L<32;L+=2)r[L]=e.readInt32BE(L*4),r[L+1]=e.readInt32BE(L*4+4);for(;L<160;L+=2){var Me=r[L-30],d=r[L-30+1],g=yv(Me,d),v=gv(d,Me);Me=r[L-4],d=r[L-4+1];var _=bv(Me,d),S=wv(d,Me),E=r[L-14],x=r[L-14+1],B=r[L-32],P=r[L-32+1],T=v+x|0,N=g+E+X(T,v)|0;T=T+S|0,N=N+_+X(T,S)|0,T=T+P|0,N=N+B+X(T,P)|0,r[L]=N,r[L+1]=T}for(var k=0;k<160;k+=2){N=r[k],T=r[k+1];var Pe=$c(t,n,i),mh=$c(y,w,m),xh=Vc(t,y),Ho=Vc(y,t),Eh=zc(a,R),Sh=zc(R,a),Ah=Gc[k],$o=Gc[k+1],Bh=Hc(a,f,s),Vo=Hc(R,D,$),ae=G+Sh|0,Ce=c+Eh+X(ae,G)|0;ae=ae+Vo|0,Ce=Ce+Bh+X(ae,Vo)|0,ae=ae+$o|0,Ce=Ce+Ah+X(ae,$o)|0,ae=ae+T|0,Ce=Ce+N+X(ae,T)|0;var zo=Ho+mh|0,Rh=xh+Pe+X(zo,Ho)|0;c=s,G=$,s=f,$=D,f=a,D=R,R=A+ae|0,a=o+Ce+X(R,A)|0,o=i,A=m,i=n,m=w,n=t,w=y,y=ae+zo|0,t=Ce+Rh+X(y,ae)|0}this._al=this._al+y|0,this._bl=this._bl+w|0,this._cl=this._cl+m|0,this._dl=this._dl+A|0,this._el=this._el+R|0,this._fl=this._fl+D|0,this._gl=this._gl+$|0,this._hl=this._hl+G|0,this._ah=this._ah+t+X(this._al,y)|0,this._bh=this._bh+n+X(this._bl,w)|0,this._ch=this._ch+i+X(this._cl,m)|0,this._dh=this._dh+o+X(this._dl,A)|0,this._eh=this._eh+a+X(this._el,R)|0,this._fh=this._fh+f+X(this._fl,D)|0,this._gh=this._gh+s+X(this._gl,$)|0,this._hh=this._hh+c+X(this._hl,G)|0};wt.prototype._hash=function(){var e=dv.allocUnsafe(64);function r(t,n,i){e.writeInt32BE(t,i),e.writeInt32BE(n,i+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),r(this._gh,this._gl,48),r(this._hh,this._hl,56),e};Kc.exports=wt});var Xc=p((Kx,Jc)=>{"use strict";u();var vv=j(),_v=Lo(),mv=ur(),xv=Z().Buffer,Ev=new Array(160);function Ln(){this.init(),this._w=Ev,mv.call(this,128,112)}vv(Ln,_v);Ln.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};Ln.prototype._hash=function(){var e=xv.allocUnsafe(48);function r(t,n,i){e.writeInt32BE(t,i),e.writeInt32BE(n,i+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),e};Jc.exports=Ln});var Uo=p((Xx,qe)=>{"use strict";u();qe.exports=function(r){var t=r.toLowerCase(),n=qe.exports[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};qe.exports.sha=Fc();qe.exports.sha1=Dc();qe.exports.sha224=Wc();qe.exports.sha256=Fo();qe.exports.sha384=Xc();qe.exports.sha512=Lo()});var Un=p((Qx,Qc)=>{"use strict";u();var Sv=Z().Buffer,Zc=po().Transform,Av=Ir().StringDecoder,Bv=j(),Rv=mn();function de(e){Zc.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Bv(de,Zc);de.prototype.update=function(e,r,t){var n=Rv(e,r),i=this._update(n);return this.hashMode?this:(t&&(i=this._toString(i,t)),i)};de.prototype.setAutoPadding=function(){};de.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};de.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};de.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};de.prototype._transform=function(e,r,t){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){n=i}finally{t(n)}};de.prototype._flush=function(e){var r;try{this.push(this.__final())}catch(t){r=t}e(r)};de.prototype._finalOrDigest=function(e){var r=this.__final()||Sv.alloc(0);return e&&(r=this._toString(r,e,!0)),r};de.prototype._toString=function(e,r,t){if(this._decoder||(this._decoder=new Av(r),this._encoding=r),this._encoding!==r)throw new Error("can\u2019t switch encodings");var n=this._decoder.write(e);return t&&(n+=this._decoder.end()),n};Qc.exports=de});var th=p((rE,rh)=>{"use strict";u();var Tv=j(),Iv=yo(),Ov=Co(),qv=Uo(),eh=Un();function Dn(e){eh.call(this,"digest"),this._hash=e}Tv(Dn,eh);Dn.prototype._update=function(e){this._hash.update(e)};Dn.prototype._final=function(){return this._hash.digest()};rh.exports=function(r){return r=r.toLowerCase(),r==="md5"?new Iv:r==="rmd160"||r==="ripemd160"?new Ov:new Dn(qv(r))}});var oh=p((nE,ih)=>{"use strict";u();var Mv=j(),sr=Z().Buffer,nh=Un(),Pv=sr.alloc(128),Ur=64;function jn(e,r){nh.call(this,"digest"),typeof r=="string"&&(r=sr.from(r)),this._alg=e,this._key=r,r.length>Ur?r=e(r):r.length<Ur&&(r=sr.concat([r,Pv],Ur));for(var t=this._ipad=sr.allocUnsafe(Ur),n=this._opad=sr.allocUnsafe(Ur),i=0;i<Ur;i++)t[i]=r[i]^54,n[i]=r[i]^92;this._hash=[t]}Mv(jn,nh);jn.prototype._update=function(e){this._hash.push(e)};jn.prototype._final=function(){var e=this._alg(sr.concat(this._hash));return this._alg(sr.concat([this._opad,e]))};ih.exports=jn});var fh=p((oE,ah)=>{u();var Cv=yo();ah.exports=function(e){return new Cv().update(e).digest()}});var lh=p((fE,sh)=>{"use strict";u();var Fv=j(),Lv=oh(),uh=Un(),vt=Z().Buffer,Uv=fh(),Do=Co(),jo=Uo(),Dv=vt.alloc(128);function _t(e,r){uh.call(this,"digest"),typeof r=="string"&&(r=vt.from(r));var t=e==="sha512"||e==="sha384"?128:64;if(this._alg=e,this._key=r,r.length>t){var n=e==="rmd160"?new Do:jo(e);r=n.update(r).digest()}else r.length<t&&(r=vt.concat([r,Dv],t));for(var i=this._ipad=vt.allocUnsafe(t),o=this._opad=vt.allocUnsafe(t),a=0;a<t;a++)i[a]=r[a]^54,o[a]=r[a]^92;this._hash=e==="rmd160"?new Do:jo(e),this._hash.update(i)}Fv(_t,uh);_t.prototype._update=function(e){this._hash.update(e)};_t.prototype._final=function(){var e=this._hash.digest(),r=this._alg==="rmd160"?new Do:jo(this._alg);return r.update(this._opad).update(e).digest()};sh.exports=function(r,t){return r=r.toLowerCase(),r==="rmd160"||r==="ripemd160"?new _t("rmd160",t):r==="md5"?new Lv(Uv,t):new _t(r,t)}});var ch=p((sE,ko)=>{"use strict";u();var No=65536,jv=4294967295;function Nv(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
11
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var kv=Z().Buffer,Nn=globalThis.crypto||globalThis.msCrypto;Nn&&Nn.getRandomValues?ko.exports=Wv:ko.exports=Nv;function Wv(e,r){if(e>jv)throw new RangeError("requested too many random bytes");var t=kv.allocUnsafe(e);if(e>0)if(e>No)for(var n=0;n<e;n+=No)Nn.getRandomValues(t.slice(n,n+No));else Nn.getRandomValues(t);return typeof r=="function"?l.default.nextTick(function(){r(null,t)}):t}});var hh=p(kn=>{"use strict";u();kn.createHash=th();kn.createHmac=lh();kn.randomBytes=ch()});var ph=p((Wo,dh)=>{u();(function(e,r){"use strict";typeof define=="function"&&define.amd?define([],function(){return e.secrets=r()}):typeof Wo=="object"?dh.exports=r(hh()):e.secrets=r(e.crypto)})(Wo,function(e){"use strict";var r,t,n,i,o;function a(){r={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},t={},n=new Array(1024).join("0"),i=!0,o=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function f(){return!!(t&&t.rng&&typeof t.rng=="function")}function s(d,g){var v;if(g===0||g===1)return d;if(g&&g>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return g=g||t.bits,d&&(v=d.length%g),v?(n+d).slice(-(g-v+d.length)):d}function c(d){var g="",v,_;for(_=d.length-1;_>=0;_--){if(v=parseInt(d[_],16),isNaN(v))throw new Error("Invalid hex character.");g=s(v.toString(2),4)+g}return g}function y(d){var g="",v,_;for(d=s(d,4),_=d.length;_>=4;_-=4){if(v=parseInt(d.slice(_-4,_),2),isNaN(v))throw new Error("Invalid binary character.");g=v.toString(16)+g}return g}function w(){return!!(e&&typeof e=="object"&&(typeof e.getRandomValues=="function"||typeof e.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function m(){return typeof e=="object"&&typeof e.randomBytes=="function"}function A(d){function g(E,x,B,P){var T=0,N,k="",Pe;for(x&&(N=x.length-1);T<N||k.length<E;)Pe=Math.abs(parseInt(x[T],B)),k=k+s(Pe.toString(2),P),T++;return k=k.substr(-E),(k.match(/0/g)||[]).length===k.length?null:k}function v(E){var x,B,P,T,N=null;for(P=16,T=4,B=Math.ceil(E/8);N===null;)x=e.randomBytes(B),N=g(E,x.toString("hex"),P,T);return N}function _(E){var x,B,P,T=null;for(B=10,P=32,x=Math.ceil(E/32);T===null;)T=g(E,e.getRandomValues(new Uint32Array(x)),B,P);return T}function S(E){var x,B,P,T,N,k=null;T=10,N=32,B=Math.ceil(E/32),P=123456789,x=new Uint32Array(B);for(var Pe=0;Pe<x.length;Pe++)x[Pe]=P;for(;k===null;)k=g(E,x,T,N);return k}if(d&&d==="testRandom")return t.typeCSPRNG=d,S;if(d&&d==="nodeCryptoRandomBytes")return t.typeCSPRNG=d,v;if(d&&d==="browserCryptoGetRandomValues")return t.typeCSPRNG=d,_;if(m())return t.typeCSPRNG="nodeCryptoRandomBytes",v;if(w())return t.typeCSPRNG="browserCryptoGetRandomValues",_}function R(d,g){var v=[],_;for(g&&(d=s(d,g)),_=d.length;_>t.bits;_-=t.bits)v.push(parseInt(d.slice(_-t.bits,_),2));return v.push(parseInt(d.slice(0,_),2)),v}function D(d,g){var v=t.logs[d],_=0,S;for(S=g.length-1;S>=0;S--)_!==0?_=t.exps[(v+t.logs[_])%t.maxShares]^g[S]:_=g[S];return _}function $(d,g,v){var _=0,S,E,x,B;for(x=0,S=g.length;x<S;x++)if(v[x]){for(E=t.logs[v[x]],B=0;B<S;B++)if(x!==B){if(d===g[B]){E=-1;break}E=(E+t.logs[d^g[B]]-t.logs[g[x]^g[B]]+t.maxShares)%t.maxShares}_=E===-1?_:_^t.exps[E]}return _}function G(d,g,v){var _=[],S=[d],E,x;for(E=1;E<v;E++)S[E]=parseInt(t.rng(t.bits),2);for(E=1,x=g+1;E<x;E++)_[E-1]={x:E,y:D(E,S)};return _}function L(d,g,v){var _,S,E,x,B;if(g=parseInt(g,t.radix),d=parseInt(d,10)||t.bits,_=d.toString(36).toUpperCase(),E=Math.pow(2,d)-1,x=E.toString(t.radix).length,S=s(g.toString(t.radix),x),typeof g!="number"||g%1!==0||g<1||g>E)throw new Error("Share id must be an integer between 1 and "+E+", inclusive.");return B=_+S+v,B}var Me={init:function(d,g){var v=[],_=[],S=1,E,x;if(a(),d&&(typeof d!="number"||d%1!==0||d<r.minBits||d>r.maxBits))throw new Error("Number of bits must be an integer between "+r.minBits+" and "+r.maxBits+", inclusive.");if(g&&o.indexOf(g)===-1)throw new Error("Invalid RNG type argument : '"+g+"'");for(t.radix=r.radix,t.bits=d||r.bits,t.size=Math.pow(2,t.bits),t.maxShares=t.size-1,E=r.primitivePolynomials[t.bits],x=0;x<t.size;x++)_[x]=S,v[S]=x,S=S<<1,S>=t.size&&(S=S^E,S=S&t.maxShares);if(t.logs=v,t.exps=_,g&&this.setRNG(g),f()||this.setRNG(),!f()||!t.bits||!t.size||!t.maxShares||!t.logs||!t.exps||t.logs.length!==t.size||t.exps.length!==t.size)throw new Error("Initialization failed.")},combine:function(d,g){var v,_,S,E,x="",B,P,T,N=[],k=[];for(g=g||0,v=0,S=d.length;v<S;v++){if(P=this.extractShareComponents(d[v]),B===void 0)B=P.bits;else if(P.bits!==B)throw new Error("Mismatched shares: Different bit settings.");if(t.bits!==B&&this.init(B),N.indexOf(P.id)===-1)for(N.push(P.id),T=R(c(P.data)),_=0,E=T.length;_<E;_++)k[_]=k[_]||[],k[_][N.length-1]=T[_]}for(v=0,S=k.length;v<S;v++)x=s($(g,N,k[v]).toString(2))+x;return y(g>=1?x:x.slice(x.indexOf("1")+1))},getConfig:function(){var d={};return d.radix=t.radix,d.bits=t.bits,d.maxShares=t.maxShares,d.hasCSPRNG=f(),d.typeCSPRNG=t.typeCSPRNG,d},extractShareComponents:function(d){var g,v,_,S,E={},x,B;if(g=parseInt(d.substr(0,1),36),g&&(typeof g!="number"||g%1!==0||g<r.minBits||g>r.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+r.minBits+" and "+r.maxBits+", inclusive.");if(S=Math.pow(2,g)-1,_=(Math.pow(2,g)-1).toString(t.radix).length,x="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+_+"})([a-fA-F0-9]+)$",B=new RegExp(x).exec(d),B&&(v=parseInt(B[2],t.radix)),typeof v!="number"||v%1!==0||v<1||v>S)throw new Error("Invalid share : Share id must be an integer between 1 and "+t.maxShares+", inclusive.");if(B&&B[3])return E.bits=g,E.id=v,E.data=B[3],E;throw new Error("The share data provided is invalid : "+d)},setRNG:function(d){var g="Random number generator is invalid ",v=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(d&&typeof d=="string"&&o.indexOf(d)===-1)throw new Error("Invalid RNG type argument : '"+d+"'");if(d||(d=A()),d&&typeof d=="string"&&(d=A(d)),i){if(d&&typeof d!="function")throw new Error(g+"(Not a function)."+v);if(d&&typeof d(t.bits)!="string")throw new Error(g+"(Output is not a string)."+v);if(d&&!parseInt(d(t.bits),2))throw new Error(g+"(Binary string output not parseable to an Integer)."+v);if(d&&d(t.bits).length>t.bits)throw new Error(g+"(Output length is greater than config.bits)."+v);if(d&&d(t.bits).length<t.bits)throw new Error(g+"(Output length is less than config.bits)."+v)}return t.rng=d,!0},str2hex:function(d,g){var v,_,S="",E,x,B,P;if(typeof d!="string")throw new Error("Input must be a character string.");if(g||(g=r.bytesPerChar),typeof g!="number"||g<1||g>r.maxBytesPerChar||g%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+r.maxBytesPerChar+", inclusive.");for(v=2*g,_=Math.pow(16,v)-1,B=0,P=d.length;B<P;B++){if(x=d[B].charCodeAt(),isNaN(x))throw new Error("Invalid character: "+d[B]);if(x>_)throw E=Math.ceil(Math.log(x+1)/Math.log(256)),new Error("Invalid character code ("+x+"). Maximum allowable is 256^bytes-1 ("+_+"). To convert this character, use at least "+E+" bytes.");S=s(x.toString(16),v)+S}return S},hex2str:function(d,g){var v,_="",S,E;if(typeof d!="string")throw new Error("Input must be a hexadecimal string.");if(g=g||r.bytesPerChar,typeof g!="number"||g%1!==0||g<1||g>r.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+r.maxBytesPerChar+", inclusive.");for(v=2*g,d=s(d,v),S=0,E=d.length;S<E;S+=v)_=String.fromCharCode(parseInt(d.slice(S,S+v),16))+_;return _},random:function(d){if(typeof d!="number"||d%1!==0||d<2||d>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return y(t.rng(d))},share:function(d,g,v,_){var S,E,x=new Array(g),B=new Array(g),P,T,N;if(_=_||128,typeof d!="string")throw new Error("Secret must be a string.");if(typeof g!="number"||g%1!==0||g<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+t.maxShares+"), inclusive.");if(g>t.maxShares)throw S=Math.ceil(Math.log(g+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+t.maxShares+"), inclusive. To create "+g+" shares, use at least "+S+" bits.");if(typeof v!="number"||v%1!==0||v<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+t.maxShares+"), inclusive.");if(v>t.maxShares)throw S=Math.ceil(Math.log(v+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+t.maxShares+"), inclusive. To use a threshold of "+v+", use at least "+S+" bits.");if(v>g)throw new Error("Threshold number of shares was "+v+" but must be less than or equal to the "+g+" shares specified as the total to generate.");if(typeof _!="number"||_%1!==0||_<0||_>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(d="1"+c(d),d=R(d,_),P=0,N=d.length;P<N;P++)for(E=G(d[P],g,v),T=0;T<g;T++)x[T]=x[T]||E[T].x.toString(t.radix),B[T]=s(E[T].y.toString(2))+(B[T]||"");for(P=0;P<g;P++)x[P]=L(t.bits,x[P],y(B[P]));return x},newShare:function(d,g){var v,_;if(d&&typeof d=="string"&&(d=parseInt(d,t.radix)),_=d.toString(t.radix),d&&_&&g&&g[0])return v=this.extractShareComponents(g[0]),L(v.bits,_,this.combine(g,d));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:a,_padLeft:s,_hex2bin:c,_bin2hex:y,_hasCryptoGetRandomValues:w,_hasCryptoRandomBytes:m,_getRNG:A,_isSetRNG:f,_splitNumStringToIntArray:R,_horner:D,_lagrange:$,_getShares:G,_constructPublicShareString:L};return Me.init(),Me})});var vh=p((pE,wh)=>{"use strict";u();var ie=xa(),yh=Sa(),gh=Ba(),Wn=null;function Go(){if(Wn)return Wn;var e=ph();return e.setRNG(function(r){for(var t=64,n=0;n<t;n++){for(var i=yh.getRandomBuffer(Math.ceil(r/8)),o="",a=0;a<i.length;a++)o+=("00000000"+i[a].toString(2)).slice(-8);if(o=o.slice(0,r),/1/.test(o))return o}throw new Error("shamir: CSPRNG returned all-zero draws "+t+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),Wn=e,Wn}var Gn="ff",bh=2;function Y(e){return this instanceof Y?(this.options=e||{},this):new Y(e)}Y.split=function(e,r,t,n){if(n=n||{},e==null)throw new Error("Secret is required");if(r<2)throw new Error("Threshold must be at least 2");if(t<r)throw new Error("Number of shares must be at least threshold");if(r>255||t>255)throw new Error("Threshold and shares must be <= 255");for(var i=b.Buffer.isBuffer(e)?e:b.Buffer.from(e,"utf8"),o=Gn+i.toString("hex"),a=Go().share(o,t,r),f=yh.getRandomBuffer(8).toString("hex"),s=n.checksum===!0,c=s?gh.sha256(i).slice(0,4).toString("hex"):null,y=[],w=0;w<a.length;w++)y.push({v:bh,id:w+1,threshold:r,shares:t,length:i.length,splitId:f,share:a[w],checksum:c});return y};Y.combine=function(e){if(!e||e.length===0)throw new Error("Shares array is required");if(e[0]&&Array.isArray(e[0].bytes)&&e[0].share===void 0)return Y._combineLegacy(e);var r=e[0].threshold,t=e[0].splitId;if(e.length<r)throw new Error("Insufficient shares: need "+r+", got "+e.length);for(var n=[],i=0;i<e.length;i++){var o=e[i];if(!o||typeof o.share!="string")throw new Error("Invalid share at index "+i);if(t!==void 0&&o.splitId!==t)throw new Error("Shares are from different splits (splitId mismatch)");if(o.threshold!==r)throw new Error("Shares have inconsistent threshold");n.push(o.share)}var a=Go().combine(n);if(a.slice(0,Gn.length)!==Gn)throw new Error("Reconstruction failed: invalid or insufficient shares");var f=b.Buffer.from(a.slice(Gn.length),"hex"),s=e[0].checksum;if(s){var c=gh.sha256(f).slice(0,4).toString("hex");if(c!==s)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return f};Y.verifyShare=function(e){try{return!e||typeof e!="object"?!1:Array.isArray(e.bytes)&&e.share===void 0?Y._verifyLegacyShare(e):e.v!==bh||typeof e.share!="string"||!/^[0-9a-fA-F]+$/.test(e.share)||typeof e.threshold!="number"||typeof e.shares!="number"||e.threshold<2||e.shares<e.threshold||e.shares>255||e.id<1||e.id>e.shares||e.checksum!==null&&e.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(e.checksum)?!1:(Go().extractShareComponents(e.share),!0)}catch{return!1}};Y.generateTestVectors=function(){var e="Hello, Bitcoin SV!",r=3,t=5,n=Y.split(e,r,t),i=Y.combine(n.slice(0,r));return{secret:e,threshold:r,totalShares:t,shares:n,reconstructed:i.toString("utf8"),valid:i.toString("utf8")===e}};var Ge=new ie(2147483647);Y._combineLegacy=function(e){var r=e[0].threshold,t=e[0].shares,n=e[0].length;if(e.length<r)throw new Error("Insufficient shares: need "+r+", got "+e.length);for(var i=0;i<e.length;i++){if(e[i].threshold!==r||e[i].shares!==t)throw new Error("Shares have inconsistent parameters");if(e[i].length!==n)throw new Error("Shares have different secret lengths")}for(var o=[],a=0;a<n;a++){for(var f=[],s=0;s<Math.min(e.length,r);s++)f.push(e[s].bytes[a]);o.push(Y._combineByteLegacy(f))}return b.Buffer.from(o)};Y._combineByteLegacy=function(e){for(var r=new ie(0),t=0;t<e.length;t++){for(var n=new ie(e[t].x),i=new ie(e[t].y,16),o=new ie(1),a=new ie(1),f=0;f<e.length;f++)if(t!==f){var s=new ie(e[f].x),c=new ie(0).sub(s);c.lt(new ie(0))&&(c=c.add(Ge)),o=o.mul(c).mod(Ge);var y=n.sub(s);y.lt(new ie(0))&&(y=y.add(Ge)),a=a.mul(y).mod(Ge)}var w=Y._modInverseLegacy(a,Ge),m=o.mul(w).mod(Ge);r=r.add(i.mul(m)).mod(Ge)}return r.mod(Ge).mod(new ie(256)).toNumber()};Y._modInverseLegacy=function(e,r){e.lt(new ie(0))&&(e=e.mod(r).add(r));var t=Y._extendedGCDLegacy(e,r);if(!t.gcd.eq(new ie(1)))throw new Error("Modular inverse does not exist");return t.x.mod(r).add(r).mod(r)};Y._extendedGCDLegacy=function(e,r){if(e.eq(new ie(0)))return{gcd:r,x:new ie(0),y:new ie(1)};var t=Y._extendedGCDLegacy(r.mod(e),e);return{gcd:t.gcd,x:t.y.sub(r.div(e).mul(t.x)),y:t.x}};Y._verifyLegacyShare=function(e){if(!e.id||!e.threshold||!e.shares||!e.bytes||typeof e.length!="number"||e.threshold<2||e.shares<e.threshold||!Array.isArray(e.bytes)||e.bytes.length!==e.length)return!1;for(var r=0;r<e.bytes.length;r++){var t=e.bytes[r];if(!t||!t.x||!t.y||t.x<1||t.x>e.shares||!/^[0-9a-fA-F]+$/.test(t.y))return!1}return!0};wh.exports=Y});var Gv=p((gE,_h)=>{u();_h.exports=vh()});return Gv();})();
|
|
18
12
|
if(typeof module!=="undefined"&&module.exports){module.exports=bsvShamir}else if(typeof define==="function"&&define.amd){define([],function(){return bsvShamir})}
|