@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.
Files changed (44) hide show
  1. package/CHANGELOG.md +135 -0
  2. package/README.md +38 -38
  3. package/bsv-anchor.min.js +11 -17
  4. package/bsv-didweb.min.js +11 -17
  5. package/bsv-gdaf.min.js +69 -75
  6. package/bsv-ltp.min.js +55 -61
  7. package/bsv-mnemonic.min.js +11 -17
  8. package/bsv-shamir.min.js +11 -17
  9. package/bsv-smartcontract.min.js +1 -1
  10. package/bsv-statuslist.min.js +53 -59
  11. package/bsv-vcjwt.min.js +11 -17
  12. package/bsv.bundle.js +69 -75
  13. package/bsv.min.js +69 -75
  14. package/build/esbuild/crypto-shim.js +35 -0
  15. package/build/esbuild.js +7 -3
  16. package/docs/AUDIT_SCOPE.md +198 -0
  17. package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
  18. package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
  19. package/docs/getting-started/INSTALLATION.md +23 -23
  20. package/docs/getting-started/QUICK_START.md +7 -7
  21. package/docs/migration/FROM_BSV_1_5_6.md +5 -5
  22. package/index.js +10 -2
  23. package/lib/crypto/hash.browser.js +13 -5
  24. package/lib/crypto/hash.js +58 -2
  25. package/lib/crypto/random.js +72 -15
  26. package/lib/didweb/index.js +88 -9
  27. package/lib/encoding/base58.js +67 -3
  28. package/lib/mnemonic/mnemonic.js +19 -5
  29. package/lib/mnemonic/pbkdf2.js +35 -2
  30. package/lib/script/interpreter.js +21 -2
  31. package/lib/transaction/input/multisig.js +1 -1
  32. package/lib/transaction/input/multisigscripthash.js +1 -1
  33. package/lib/transaction/input/publickey.js +1 -1
  34. package/lib/transaction/input/publickeyhash.js +1 -1
  35. package/lib/transaction/signature.js +1 -1
  36. package/lib/util/inherits.js +37 -0
  37. package/package.json +16 -9
  38. package/test/build/bundle_crypto_shim.js +104 -0
  39. package/test/build/bundle_externals.js +6 -1
  40. package/test/crypto/backend_selection.js +126 -0
  41. package/test/crypto/random.js +73 -0
  42. package/test/didweb/relationships.js +144 -0
  43. package/test/transaction/unspentoutput.js +6 -1
  44. package/version.js +1 -1
package/bsv-didweb.min.js CHANGED
@@ -1,18 +1,12 @@
1
- var bsvDIDWeb=(()=>{var qg=Object.create;var ch=Object.defineProperty;var kg=Object.getOwnPropertyDescriptor;var Tg=Object.getOwnPropertyNames;var Ig=Object.getPrototypeOf,Cg=Object.prototype.hasOwnProperty;var Og=(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 Dg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Tg(e))!Cg.call(t,n)&&n!==r&&ch(t,n,{get:()=>e[n],enumerable:!(i=kg(e,n))||i.enumerable});return t};var dh=(t,e,r)=>(r=t!=null?qg(Ig(t)):{},Dg(e||!t||!t.__esModule?ch(r,"default",{value:t,enumerable:!0}):r,t));var mh=B((tE,gh)=>{b();var Ke=gh.exports={},Tt,It;function sf(){throw new Error("setTimeout has not been defined")}function uf(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Tt=setTimeout:Tt=sf}catch{Tt=sf}try{typeof clearTimeout=="function"?It=clearTimeout:It=uf}catch{It=uf}})();function ph(t){if(Tt===setTimeout)return setTimeout(t,0);if((Tt===sf||!Tt)&&setTimeout)return Tt=setTimeout,setTimeout(t,0);try{return Tt(t,0)}catch{try{return Tt.call(null,t,0)}catch{return Tt.call(this,t,0)}}}function Pg(t){if(It===clearTimeout)return clearTimeout(t);if((It===uf||!It)&&clearTimeout)return It=clearTimeout,clearTimeout(t);try{return It(t)}catch{try{return It.call(null,t)}catch{return It.call(this,t)}}}var Kt=[],li=!1,Cr,lo=-1;function Ug(){!li||!Cr||(li=!1,Cr.length?Kt=Cr.concat(Kt):lo=-1,Kt.length&&vh())}function vh(){if(!li){var t=ph(Ug);li=!0;for(var e=Kt.length;e;){for(Cr=Kt,Kt=[];++lo<e;)Cr&&Cr[lo].run();lo=-1,e=Kt.length}Cr=null,li=!1,Pg(t)}}Ke.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];Kt.push(new yh(t,e)),Kt.length===1&&!li&&ph(vh)};function yh(t,e){this.fun=t,this.array=e}yh.prototype.run=function(){this.fun.apply(null,this.array)};Ke.title="browser";Ke.browser=!0;Ke.env={};Ke.argv=[];Ke.version="";Ke.versions={};function Ht(){}Ke.on=Ht;Ke.addListener=Ht;Ke.once=Ht;Ke.off=Ht;Ke.removeListener=Ht;Ke.removeAllListeners=Ht;Ke.emit=Ht;Ke.prependListener=Ht;Ke.prependOnceListener=Ht;Ke.listeners=function(t){return[]};Ke.binding=function(t){throw new Error("process.binding is not supported")};Ke.cwd=function(){return"/"};Ke.chdir=function(t){throw new Error("process.chdir is not supported")};Ke.umask=function(){return 0}});var _h=B(co=>{"use strict";b();co.byteLength=Ng;co.toByteArray=jg;co.fromByteArray=Wg;var Ct=[],ut=[],Lg=typeof Uint8Array<"u"?Uint8Array:Array,hf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Or=0,bh=hf.length;Or<bh;++Or)Ct[Or]=hf[Or],ut[hf.charCodeAt(Or)]=Or;var Or,bh;ut[45]=62;ut[95]=63;function wh(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 Ng(t){var e=wh(t),r=e[0],i=e[1];return(r+i)*3/4-i}function Fg(t,e,r){return(e+r)*3/4-r}function jg(t){var e,r=wh(t),i=r[0],n=r[1],a=new Lg(Fg(t,i,n)),s=0,y=n>0?i-4:i,w;for(w=0;w<y;w+=4)e=ut[t.charCodeAt(w)]<<18|ut[t.charCodeAt(w+1)]<<12|ut[t.charCodeAt(w+2)]<<6|ut[t.charCodeAt(w+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=e&255;return n===2&&(e=ut[t.charCodeAt(w)]<<2|ut[t.charCodeAt(w+1)]>>4,a[s++]=e&255),n===1&&(e=ut[t.charCodeAt(w)]<<10|ut[t.charCodeAt(w+1)]<<4|ut[t.charCodeAt(w+2)]>>2,a[s++]=e>>8&255,a[s++]=e&255),a}function Kg(t){return Ct[t>>18&63]+Ct[t>>12&63]+Ct[t>>6&63]+Ct[t&63]}function Hg(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(Kg(i));return n.join("")}function Wg(t){for(var e,r=t.length,i=r%3,n=[],a=16383,s=0,y=r-i;s<y;s+=a)n.push(Hg(t,s,s+a>y?y:s+a));return i===1?(e=t[r-1],n.push(Ct[e>>2]+Ct[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(Ct[e>>10]+Ct[e>>4&63]+Ct[e<<2&63]+"=")),n.join("")}});var xh=B(lf=>{b();lf.read=function(t,e,r,i,n){var a,s,y=n*8-i-1,w=(1<<y)-1,S=w>>1,A=-7,q=r?n-1:0,T=r?-1:1,O=t[e+q];for(q+=T,a=O&(1<<-A)-1,O>>=-A,A+=y;A>0;a=a*256+t[e+q],q+=T,A-=8);for(s=a&(1<<-A)-1,a>>=-A,A+=i;A>0;s=s*256+t[e+q],q+=T,A-=8);if(a===0)a=1-S;else{if(a===w)return s?NaN:(O?-1:1)*(1/0);s=s+Math.pow(2,i),a=a-S}return(O?-1:1)*s*Math.pow(2,a-i)};lf.write=function(t,e,r,i,n,a){var s,y,w,S=a*8-n-1,A=(1<<S)-1,q=A>>1,T=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=i?0:a-1,P=i?1:-1,W=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(y=isNaN(e)?1:0,s=A):(s=Math.floor(Math.log(e)/Math.LN2),e*(w=Math.pow(2,-s))<1&&(s--,w*=2),s+q>=1?e+=T/w:e+=T*Math.pow(2,1-q),e*w>=2&&(s++,w/=2),s+q>=A?(y=0,s=A):s+q>=1?(y=(e*w-1)*Math.pow(2,n),s=s+q):(y=e*Math.pow(2,q-1)*Math.pow(2,n),s=0));n>=8;t[r+O]=y&255,O+=P,y/=256,n-=8);for(s=s<<n|y,S+=n;S>0;t[r+O]=s&255,O+=P,s/=256,S-=8);t[r+O-P]|=W*128}});var rt=B(vi=>{"use strict";b();var cf=_h(),di=xh(),Mh=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;vi.Buffer=k;vi.SlowBuffer=Yg;vi.INSPECT_MAX_BYTES=50;var po=2147483647;vi.kMaxLength=po;k.TYPED_ARRAY_SUPPORT=Gg();!k.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 Gg(){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(k.prototype,"parent",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}});Object.defineProperty(k.prototype,"offset",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}});function Wt(t){if(t>po)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,k.prototype),e}function k(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 yf(t)}return Ah(t,e,r)}k.poolSize=8192;function Ah(t,e,r){if(typeof t=="string")return Vg(t,e);if(ArrayBuffer.isView(t))return zg(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(Ot(t,ArrayBuffer)||t&&Ot(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ot(t,SharedArrayBuffer)||t&&Ot(t.buffer,SharedArrayBuffer)))return pf(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 k.from(i,e,r);let n=Zg(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return k.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)}k.from=function(t,e,r){return Ah(t,e,r)};Object.setPrototypeOf(k.prototype,Uint8Array.prototype);Object.setPrototypeOf(k,Uint8Array);function Rh(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 $g(t,e,r){return Rh(t),t<=0?Wt(t):e!==void 0?typeof r=="string"?Wt(t).fill(e,r):Wt(t).fill(e):Wt(t)}k.alloc=function(t,e,r){return $g(t,e,r)};function yf(t){return Rh(t),Wt(t<0?0:gf(t)|0)}k.allocUnsafe=function(t){return yf(t)};k.allocUnsafeSlow=function(t){return yf(t)};function Vg(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!k.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=qh(t,e)|0,i=Wt(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function df(t){let e=t.length<0?0:gf(t.length)|0,r=Wt(e);for(let i=0;i<e;i+=1)r[i]=t[i]&255;return r}function zg(t){if(Ot(t,Uint8Array)){let e=new Uint8Array(t);return pf(e.buffer,e.byteOffset,e.byteLength)}return df(t)}function pf(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,k.prototype),i}function Zg(t){if(k.isBuffer(t)){let e=gf(t.length)|0,r=Wt(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||bf(t.length)?Wt(0):df(t);if(t.type==="Buffer"&&Array.isArray(t.data))return df(t.data)}function gf(t){if(t>=po)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+po.toString(16)+" bytes");return t|0}function Yg(t){return+t!=t&&(t=0),k.alloc(+t)}k.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==k.prototype};k.compare=function(e,r){if(Ot(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),Ot(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),!k.isBuffer(e)||!k.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,s=Math.min(i,n);a<s;++a)if(e[a]!==r[a]){i=e[a],n=r[a];break}return i<n?-1:n<i?1:0};k.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}};k.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return k.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;let n=k.allocUnsafe(r),a=0;for(i=0;i<e.length;++i){let s=e[i];if(Ot(s,Uint8Array))a+s.length>n.length?(k.isBuffer(s)||(s=k.from(s)),s.copy(n,a)):Uint8Array.prototype.set.call(n,s,a);else if(k.isBuffer(s))s.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=s.length}return n};function qh(t,e){if(k.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ot(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 vf(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Lh(t).length;default:if(n)return i?-1:vf(t).length;e=(""+e).toLowerCase(),n=!0}}k.byteLength=qh;function Jg(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 fm(this,e,r);case"utf8":case"utf-8":return Th(this,e,r);case"ascii":return om(this,e,r);case"latin1":case"binary":return am(this,e,r);case"base64":return im(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}}k.prototype._isBuffer=!0;function Dr(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}k.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)Dr(this,r,r+1);return this};k.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)Dr(this,r,r+3),Dr(this,r+1,r+2);return this};k.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)Dr(this,r,r+7),Dr(this,r+1,r+6),Dr(this,r+2,r+5),Dr(this,r+3,r+4);return this};k.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Th(this,0,e):Jg.apply(this,arguments)};k.prototype.toLocaleString=k.prototype.toString;k.prototype.equals=function(e){if(!k.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:k.compare(this,e)===0};k.prototype.inspect=function(){let e="",r=vi.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};Mh&&(k.prototype[Mh]=k.prototype.inspect);k.prototype.compare=function(e,r,i,n,a){if(Ot(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.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 s=a-n,y=i-r,w=Math.min(s,y),S=this.slice(n,a),A=e.slice(r,i);for(let q=0;q<w;++q)if(S[q]!==A[q]){s=S[q],y=A[q];break}return s<y?-1:y<s?1:0};function kh(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,bf(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=k.from(e,i)),k.isBuffer(e))return e.length===0?-1:Eh(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):Eh(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Eh(t,e,r,i,n){let a=1,s=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,s/=2,y/=2,r/=2}function w(A,q){return a===1?A[q]:A.readUInt16BE(q*a)}let S;if(n){let A=-1;for(S=r;S<s;S++)if(w(t,S)===w(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>s&&(r=s-y),S=r;S>=0;S--){let A=!0;for(let q=0;q<y;q++)if(w(t,S+q)!==w(e,q)){A=!1;break}if(A)return S}return-1}k.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};k.prototype.indexOf=function(e,r,i){return kh(this,e,r,i,!0)};k.prototype.lastIndexOf=function(e,r,i){return kh(this,e,r,i,!1)};function Xg(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 s;for(s=0;s<i;++s){let y=parseInt(e.substr(s*2,2),16);if(bf(y))return s;t[r+s]=y}return s}function Qg(t,e,r,i){return vo(vf(e,t.length-r),t,r,i)}function em(t,e,r,i){return vo(cm(e),t,r,i)}function tm(t,e,r,i){return vo(Lh(e),t,r,i)}function rm(t,e,r,i){return vo(dm(e,t.length-r),t,r,i)}k.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 s=!1;for(;;)switch(n){case"hex":return Xg(this,e,r,i);case"utf8":case"utf-8":return Qg(this,e,r,i);case"ascii":case"latin1":case"binary":return em(this,e,r,i);case"base64":return tm(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rm(this,e,r,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}};k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function im(t,e,r){return e===0&&r===t.length?cf.fromByteArray(t):cf.fromByteArray(t.slice(e,r))}function Th(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let a=t[n],s=null,y=a>239?4:a>223?3:a>191?2:1;if(n+y<=r){let w,S,A,q;switch(y){case 1:a<128&&(s=a);break;case 2:w=t[n+1],(w&192)===128&&(q=(a&31)<<6|w&63,q>127&&(s=q));break;case 3:w=t[n+1],S=t[n+2],(w&192)===128&&(S&192)===128&&(q=(a&15)<<12|(w&63)<<6|S&63,q>2047&&(q<55296||q>57343)&&(s=q));break;case 4:w=t[n+1],S=t[n+2],A=t[n+3],(w&192)===128&&(S&192)===128&&(A&192)===128&&(q=(a&15)<<18|(w&63)<<12|(S&63)<<6|A&63,q>65535&&q<1114112&&(s=q))}}s===null?(s=65533,y=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|s&1023),i.push(s),n+=y}return nm(i)}var Sh=4096;function nm(t){let e=t.length;if(e<=Sh)return String.fromCharCode.apply(String,t);let r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=Sh));return r}function om(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 am(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 fm(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+=pm[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}k.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,k.prototype),n};function Ve(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")}k.prototype.readUintLE=k.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ve(e,r,this.length);let n=this[e],a=1,s=0;for(;++s<r&&(a*=256);)n+=this[e+s]*a;return n};k.prototype.readUintBE=k.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ve(e,r,this.length);let n=this[e+--r],a=1;for(;r>0&&(a*=256);)n+=this[e+--r]*a;return n};k.prototype.readUint8=k.prototype.readUInt8=function(e,r){return e=e>>>0,r||Ve(e,1,this.length),this[e]};k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Ve(e,2,this.length),this[e]|this[e+1]<<8};k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Ve(e,2,this.length),this[e]<<8|this[e+1]};k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Ve(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};k.prototype.readUint32BE=k.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Ve(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};k.prototype.readBigUInt64LE=or(function(e){e=e>>>0,pi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&pn(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))});k.prototype.readBigUInt64BE=or(function(e){e=e>>>0,pi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&pn(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)});k.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ve(e,r,this.length);let n=this[e],a=1,s=0;for(;++s<r&&(a*=256);)n+=this[e+s]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*r)),n};k.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ve(e,r,this.length);let n=r,a=1,s=this[e+--n];for(;n>0&&(a*=256);)s+=this[e+--n]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};k.prototype.readInt8=function(e,r){return e=e>>>0,r||Ve(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};k.prototype.readInt16LE=function(e,r){e=e>>>0,r||Ve(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};k.prototype.readInt16BE=function(e,r){e=e>>>0,r||Ve(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};k.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Ve(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};k.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Ve(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};k.prototype.readBigInt64LE=or(function(e){e=e>>>0,pi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&pn(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)});k.prototype.readBigInt64BE=or(function(e){e=e>>>0,pi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&pn(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)});k.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Ve(e,4,this.length),di.read(this,e,!0,23,4)};k.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Ve(e,4,this.length),di.read(this,e,!1,23,4)};k.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Ve(e,8,this.length),di.read(this,e,!0,52,8)};k.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Ve(e,8,this.length),di.read(this,e,!1,52,8)};function nt(t,e,r,i,n,a){if(!k.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")}k.prototype.writeUintLE=k.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;nt(this,e,r,i,y,0)}let a=1,s=0;for(this[r]=e&255;++s<i&&(a*=256);)this[r+s]=e/a&255;return r+i};k.prototype.writeUintBE=k.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;nt(this,e,r,i,y,0)}let a=i-1,s=1;for(this[r+a]=e&255;--a>=0&&(s*=256);)this[r+a]=e/s&255;return r+i};k.prototype.writeUint8=k.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||nt(this,e,r,1,255,0),this[r]=e&255,r+1};k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||nt(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||nt(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||nt(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};k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||nt(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 Ih(t,e,r,i,n){Uh(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 s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,r}function Ch(t,e,r,i,n){Uh(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 s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s=s>>8,t[r+2]=s,s=s>>8,t[r+1]=s,s=s>>8,t[r]=s,r+8}k.prototype.writeBigUInt64LE=or(function(e,r=0){return Ih(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});k.prototype.writeBigUInt64BE=or(function(e,r=0){return Ch(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});k.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let w=Math.pow(2,8*i-1);nt(this,e,r,i,w-1,-w)}let a=0,s=1,y=0;for(this[r]=e&255;++a<i&&(s*=256);)e<0&&y===0&&this[r+a-1]!==0&&(y=1),this[r+a]=(e/s>>0)-y&255;return r+i};k.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let w=Math.pow(2,8*i-1);nt(this,e,r,i,w-1,-w)}let a=i-1,s=1,y=0;for(this[r+a]=e&255;--a>=0&&(s*=256);)e<0&&y===0&&this[r+a+1]!==0&&(y=1),this[r+a]=(e/s>>0)-y&255;return r+i};k.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||nt(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};k.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||nt(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};k.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||nt(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};k.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||nt(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};k.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||nt(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};k.prototype.writeBigInt64LE=or(function(e,r=0){return Ih(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});k.prototype.writeBigInt64BE=or(function(e,r=0){return Ch(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Oh(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 Dh(t,e,r,i,n){return e=+e,r=r>>>0,n||Oh(t,e,r,4,34028234663852886e22,-34028234663852886e22),di.write(t,e,r,i,23,4),r+4}k.prototype.writeFloatLE=function(e,r,i){return Dh(this,e,r,!0,i)};k.prototype.writeFloatBE=function(e,r,i){return Dh(this,e,r,!1,i)};function Ph(t,e,r,i,n){return e=+e,r=r>>>0,n||Oh(t,e,r,8,17976931348623157e292,-17976931348623157e292),di.write(t,e,r,i,52,8),r+8}k.prototype.writeDoubleLE=function(e,r,i){return Ph(this,e,r,!0,i)};k.prototype.writeDoubleBE=function(e,r,i){return Ph(this,e,r,!1,i)};k.prototype.copy=function(e,r,i,n){if(!k.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};k.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"&&!k.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){let s=e.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(e=s)}}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 s=k.isBuffer(e)?e:k.from(e,n),y=s.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]=s[a%y]}return this};var ci={};function mf(t,e,r){ci[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}`}}}mf("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);mf("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);mf("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=Bh(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=Bh(n)),n+="n"),i+=` It must be ${e}. Received ${n}`,i},RangeError);function Bh(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 um(t,e,r){pi(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&pn(e,t.length-(r+1))}function Uh(t,e,r,i,n,a){if(t>r||t<e){let s=typeof e=="bigint"?"n":"",y;throw a>3?e===0||e===BigInt(0)?y=`>= 0${s} and < 2${s} ** ${(a+1)*8}${s}`:y=`>= -(2${s} ** ${(a+1)*8-1}${s}) and < 2 ** ${(a+1)*8-1}${s}`:y=`>= ${e}${s} and <= ${r}${s}`,new ci.ERR_OUT_OF_RANGE("value",y,t)}um(i,n,a)}function pi(t,e){if(typeof t!="number")throw new ci.ERR_INVALID_ARG_TYPE(e,"number",t)}function pn(t,e,r){throw Math.floor(t)!==t?(pi(t,r),new ci.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new ci.ERR_BUFFER_OUT_OF_BOUNDS:new ci.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var hm=/[^+/0-9A-Za-z-_]/g;function lm(t){if(t=t.split("=")[0],t=t.trim().replace(hm,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function vf(t,e){e=e||1/0;let r,i=t.length,n=null,a=[];for(let s=0;s<i;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(s+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 cm(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function dm(t,e){let r,i,n,a=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function Lh(t){return cf.toByteArray(lm(t))}function vo(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 Ot(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function bf(t){return t!==t}var pm=(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 or(t){return typeof BigInt>"u"?vm:t}function vm(){throw new Error("BigInt not supported")}});var M,R,b=Og(()=>{M=dh(mh()),R=dh(rt())});var Me=B((wf,Fh)=>{b();var yo=rt(),Dt=yo.Buffer;function Nh(t,e){for(var r in t)e[r]=t[r]}Dt.from&&Dt.alloc&&Dt.allocUnsafe&&Dt.allocUnsafeSlow?Fh.exports=yo:(Nh(yo,wf),wf.Buffer=Pr);function Pr(t,e,r){return Dt(t,e,r)}Pr.prototype=Object.create(Dt.prototype);Nh(Dt,Pr);Pr.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Dt(t,e,r)};Pr.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Dt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Pr.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Dt(t)};Pr.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return yo.SlowBuffer(t)}});var Ur=B((cE,xf)=>{"use strict";b();var _f=65536,ym=4294967295;function gm(){throw new Error(`Secure random number generation is not supported by this browser.
2
- Use Chrome, Firefox or Internet Explorer 11`)}var mm=Me().Buffer,go=globalThis.crypto||globalThis.msCrypto;go&&go.getRandomValues?xf.exports=bm:xf.exports=gm;function bm(t,e){if(t>ym)throw new RangeError("requested too many random bytes");var r=mm.allocUnsafe(t);if(t>0)if(t>_f)for(var i=0;i<t;i+=_f)go.getRandomValues(r.slice(i,i+_f));else go.getRandomValues(r);return typeof e=="function"?M.default.nextTick(function(){e(null,r)}):r}});var H=B((pE,Mf)=>{b();typeof Object.create=="function"?Mf.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Mf.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 gi=B((yE,Ef)=>{"use strict";b();var yi=typeof Reflect=="object"?Reflect:null,jh=yi&&typeof yi.apply=="function"?yi.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},mo;yi&&typeof yi.ownKeys=="function"?mo=yi.ownKeys:Object.getOwnPropertySymbols?mo=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:mo=function(e){return Object.getOwnPropertyNames(e)};function wm(t){console&&console.warn&&console.warn(t)}var Hh=Number.isNaN||function(e){return e!==e};function Ce(){Ce.init.call(this)}Ef.exports=Ce;Ef.exports.once=Em;Ce.EventEmitter=Ce;Ce.prototype._events=void 0;Ce.prototype._eventsCount=0;Ce.prototype._maxListeners=void 0;var Kh=10;function bo(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Ce,"defaultMaxListeners",{enumerable:!0,get:function(){return Kh},set:function(t){if(typeof t!="number"||t<0||Hh(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Kh=t}});Ce.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};Ce.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Hh(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 Wh(t){return t._maxListeners===void 0?Ce.defaultMaxListeners:t._maxListeners}Ce.prototype.getMaxListeners=function(){return Wh(this)};Ce.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 s;if(r.length>0&&(s=r[0]),s instanceof Error)throw s;var y=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw y.context=s,y}var w=a[e];if(w===void 0)return!1;if(typeof w=="function")jh(w,this,r);else for(var S=w.length,A=Zh(w,S),i=0;i<S;++i)jh(A[i],this,r);return!0};function Gh(t,e,r,i){var n,a,s;if(bo(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),s=a[e]),s===void 0)s=a[e]=r,++t._eventsCount;else if(typeof s=="function"?s=a[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),n=Wh(t),n>0&&s.length>n&&!s.warned){s.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=t,y.type=e,y.count=s.length,wm(y)}return t}Ce.prototype.addListener=function(e,r){return Gh(this,e,r,!1)};Ce.prototype.on=Ce.prototype.addListener;Ce.prototype.prependListener=function(e,r){return Gh(this,e,r,!0)};function _m(){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 $h(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=_m.bind(i);return n.listener=r,i.wrapFn=n,n}Ce.prototype.once=function(e,r){return bo(r),this.on(e,$h(this,e,r)),this};Ce.prototype.prependOnceListener=function(e,r){return bo(r),this.prependListener(e,$h(this,e,r)),this};Ce.prototype.removeListener=function(e,r){var i,n,a,s,y;if(bo(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,s=i.length-1;s>=0;s--)if(i[s]===r||i[s].listener===r){y=i[s].listener,a=s;break}if(a<0)return this;a===0?i.shift():xm(i,a),i.length===1&&(n[e]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",e,y||r)}return this};Ce.prototype.off=Ce.prototype.removeListener;Ce.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),s;for(n=0;n<a.length;++n)s=a[n],s!=="removeListener"&&this.removeAllListeners(s);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 Vh(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?Mm(n):Zh(n,n.length)}Ce.prototype.listeners=function(e){return Vh(this,e,!0)};Ce.prototype.rawListeners=function(e){return Vh(this,e,!1)};Ce.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):zh.call(t,e)};Ce.prototype.listenerCount=zh;function zh(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}Ce.prototype.eventNames=function(){return this._eventsCount>0?mo(this._events):[]};function Zh(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function xm(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Mm(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function Em(t,e){return new Promise(function(r,i){function n(s){t.removeListener(e,a),i(s)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",n),r([].slice.call(arguments))}Yh(t,e,a,{once:!0}),e!=="error"&&Sm(t,n,{once:!0})})}function Sm(t,e,r){typeof t.on=="function"&&Yh(t,"error",e,r)}function Yh(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 Sf=B((mE,Jh)=>{b();Jh.exports=gi().EventEmitter});var Bf=B((wE,Xh)=>{"use strict";b();Xh.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 s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[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 vn=B((xE,Qh)=>{"use strict";b();var Bm=Bf();Qh.exports=function(){return Bm()&&!!Symbol.toStringTag}});var Af=B((EE,el)=>{"use strict";b();el.exports=Object});var rl=B((BE,tl)=>{"use strict";b();tl.exports=Error});var nl=B((RE,il)=>{"use strict";b();il.exports=EvalError});var al=B((kE,ol)=>{"use strict";b();ol.exports=RangeError});var sl=B((IE,fl)=>{"use strict";b();fl.exports=ReferenceError});var Rf=B((OE,ul)=>{"use strict";b();ul.exports=SyntaxError});var Lr=B((PE,hl)=>{"use strict";b();hl.exports=TypeError});var cl=B((LE,ll)=>{"use strict";b();ll.exports=URIError});var pl=B((FE,dl)=>{"use strict";b();dl.exports=Math.abs});var yl=B((KE,vl)=>{"use strict";b();vl.exports=Math.floor});var ml=B((WE,gl)=>{"use strict";b();gl.exports=Math.max});var wl=B(($E,bl)=>{"use strict";b();bl.exports=Math.min});var xl=B((zE,_l)=>{"use strict";b();_l.exports=Math.pow});var El=B((YE,Ml)=>{"use strict";b();Ml.exports=Math.round});var Bl=B((XE,Sl)=>{"use strict";b();Sl.exports=Number.isNaN||function(e){return e!==e}});var Rl=B((eS,Al)=>{"use strict";b();var Am=Bl();Al.exports=function(e){return Am(e)||e===0?e:e<0?-1:1}});var kl=B((rS,ql)=>{"use strict";b();ql.exports=Object.getOwnPropertyDescriptor});var Nr=B((nS,Tl)=>{"use strict";b();var wo=kl();if(wo)try{wo([],"length")}catch{wo=null}Tl.exports=wo});var yn=B((aS,Il)=>{"use strict";b();var _o=Object.defineProperty||!1;if(_o)try{_o({},"a",{value:1})}catch{_o=!1}Il.exports=_o});var Dl=B((sS,Ol)=>{"use strict";b();var Cl=typeof Symbol<"u"&&Symbol,Rm=Bf();Ol.exports=function(){return typeof Cl!="function"||typeof Symbol!="function"||typeof Cl("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Rm()}});var qf=B((hS,Pl)=>{"use strict";b();Pl.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var kf=B((cS,Ul)=>{"use strict";b();var qm=Af();Ul.exports=qm.getPrototypeOf||null});var Fl=B((pS,Nl)=>{"use strict";b();var km="Function.prototype.bind called on incompatible ",Tm=Object.prototype.toString,Im=Math.max,Cm="[object Function]",Ll=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},Om=function(e,r){for(var i=[],n=r||0,a=0;n<e.length;n+=1,a+=1)i[a]=e[n];return i},Dm=function(t,e){for(var r="",i=0;i<t.length;i+=1)r+=t[i],i+1<t.length&&(r+=e);return r};Nl.exports=function(e){var r=this;if(typeof r!="function"||Tm.apply(r)!==Cm)throw new TypeError(km+r);for(var i=Om(arguments,1),n,a=function(){if(this instanceof n){var A=r.apply(this,Ll(i,arguments));return Object(A)===A?A:this}return r.apply(e,Ll(i,arguments))},s=Im(0,r.length-i.length),y=[],w=0;w<s;w++)y[w]="$"+w;if(n=Function("binder","return function ("+Dm(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 mi=B((yS,jl)=>{"use strict";b();var Pm=Fl();jl.exports=Function.prototype.bind||Pm});var xo=B((mS,Kl)=>{"use strict";b();Kl.exports=Function.prototype.call});var Mo=B((wS,Hl)=>{"use strict";b();Hl.exports=Function.prototype.apply});var Gl=B((xS,Wl)=>{"use strict";b();Wl.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Tf=B((ES,$l)=>{"use strict";b();var Um=mi(),Lm=Mo(),Nm=xo(),Fm=Gl();$l.exports=Fm||Um.call(Nm,Lm)});var Eo=B((BS,Vl)=>{"use strict";b();var jm=mi(),Km=Lr(),Hm=xo(),Wm=Tf();Vl.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new Km("a function is required");return Wm(jm,Hm,e)}});var Ql=B((RS,Xl)=>{"use strict";b();var Gm=Eo(),zl=Nr(),Yl;try{Yl=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var If=!!Yl&&zl&&zl(Object.prototype,"__proto__"),Jl=Object,Zl=Jl.getPrototypeOf;Xl.exports=If&&typeof If.get=="function"?Gm([If.get]):typeof Zl=="function"?function(e){return Zl(e==null?e:Jl(e))}:!1});var So=B((kS,i0)=>{"use strict";b();var e0=qf(),t0=kf(),r0=Ql();i0.exports=e0?function(e){return e0(e)}:t0?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return t0(e)}:r0?function(e){return r0(e)}:null});var Cf=B((IS,n0)=>{"use strict";b();var $m=Function.prototype.call,Vm=Object.prototype.hasOwnProperty,zm=mi();n0.exports=zm.call($m,Vm)});var Pf=B((OS,h0)=>{"use strict";b();var Ae,Zm=Af(),Ym=rl(),Jm=nl(),Xm=al(),Qm=sl(),xi=Rf(),_i=Lr(),eb=cl(),tb=pl(),rb=yl(),ib=ml(),nb=wl(),ob=xl(),ab=El(),fb=Rl(),s0=Function,Of=function(t){try{return s0('"use strict"; return ('+t+").constructor;")()}catch{}},gn=Nr(),sb=yn(),Df=function(){throw new _i},ub=gn?(function(){try{return arguments.callee,Df}catch{try{return gn(arguments,"callee").get}catch{return Df}}})():Df,bi=Dl()(),ze=So(),hb=kf(),lb=qf(),u0=Mo(),mn=xo(),wi={},cb=typeof Uint8Array>"u"||!ze?Ae:ze(Uint8Array),Fr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ae:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ae:ArrayBuffer,"%ArrayIteratorPrototype%":bi&&ze?ze([][Symbol.iterator]()):Ae,"%AsyncFromSyncIteratorPrototype%":Ae,"%AsyncFunction%":wi,"%AsyncGenerator%":wi,"%AsyncGeneratorFunction%":wi,"%AsyncIteratorPrototype%":wi,"%Atomics%":typeof Atomics>"u"?Ae:Atomics,"%BigInt%":typeof BigInt>"u"?Ae:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ae:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ae:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ae:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ym,"%eval%":eval,"%EvalError%":Jm,"%Float16Array%":typeof Float16Array>"u"?Ae:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ae:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ae:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ae:FinalizationRegistry,"%Function%":s0,"%GeneratorFunction%":wi,"%Int8Array%":typeof Int8Array>"u"?Ae:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ae:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ae:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":bi&&ze?ze(ze([][Symbol.iterator]())):Ae,"%JSON%":typeof JSON=="object"?JSON:Ae,"%Map%":typeof Map>"u"?Ae:Map,"%MapIteratorPrototype%":typeof Map>"u"||!bi||!ze?Ae:ze(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Zm,"%Object.getOwnPropertyDescriptor%":gn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ae:Promise,"%Proxy%":typeof Proxy>"u"?Ae:Proxy,"%RangeError%":Xm,"%ReferenceError%":Qm,"%Reflect%":typeof Reflect>"u"?Ae:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ae:Set,"%SetIteratorPrototype%":typeof Set>"u"||!bi||!ze?Ae:ze(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ae:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":bi&&ze?ze(""[Symbol.iterator]()):Ae,"%Symbol%":bi?Symbol:Ae,"%SyntaxError%":xi,"%ThrowTypeError%":ub,"%TypedArray%":cb,"%TypeError%":_i,"%Uint8Array%":typeof Uint8Array>"u"?Ae:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ae:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ae:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ae:Uint32Array,"%URIError%":eb,"%WeakMap%":typeof WeakMap>"u"?Ae:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ae:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ae:WeakSet,"%Function.prototype.call%":mn,"%Function.prototype.apply%":u0,"%Object.defineProperty%":sb,"%Object.getPrototypeOf%":hb,"%Math.abs%":tb,"%Math.floor%":rb,"%Math.max%":ib,"%Math.min%":nb,"%Math.pow%":ob,"%Math.round%":ab,"%Math.sign%":fb,"%Reflect.getPrototypeOf%":lb};if(ze)try{null.error}catch(t){o0=ze(ze(t)),Fr["%Error.prototype%"]=o0}var o0,db=function t(e){var r;if(e==="%AsyncFunction%")r=Of("async function () {}");else if(e==="%GeneratorFunction%")r=Of("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Of("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&ze&&(r=ze(n.prototype))}return Fr[e]=r,r},a0={__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"]},bn=mi(),Bo=Cf(),pb=bn.call(mn,Array.prototype.concat),vb=bn.call(u0,Array.prototype.splice),f0=bn.call(mn,String.prototype.replace),Ao=bn.call(mn,String.prototype.slice),yb=bn.call(mn,RegExp.prototype.exec),gb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mb=/\\(\\)?/g,bb=function(e){var r=Ao(e,0,1),i=Ao(e,-1);if(r==="%"&&i!=="%")throw new xi("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new xi("invalid intrinsic syntax, expected opening `%`");var n=[];return f0(e,gb,function(a,s,y,w){n[n.length]=y?f0(w,mb,"$1"):s||a}),n},wb=function(e,r){var i=e,n;if(Bo(a0,i)&&(n=a0[i],i="%"+n[0]+"%"),Bo(Fr,i)){var a=Fr[i];if(a===wi&&(a=db(i)),typeof a>"u"&&!r)throw new _i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new xi("intrinsic "+e+" does not exist!")};h0.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new _i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new _i('"allowMissing" argument must be a boolean');if(yb(/^%?[^%]*%?$/,e)===null)throw new xi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=bb(e),n=i.length>0?i[0]:"",a=wb("%"+n+"%",r),s=a.name,y=a.value,w=!1,S=a.alias;S&&(n=S[0],vb(i,pb([0,1],S)));for(var A=1,q=!0;A<i.length;A+=1){var T=i[A],O=Ao(T,0,1),P=Ao(T,-1);if((O==='"'||O==="'"||O==="`"||P==='"'||P==="'"||P==="`")&&O!==P)throw new xi("property names with quotes must have matching quotes");if((T==="constructor"||!q)&&(w=!0),n+="."+T,s="%"+n+"%",Bo(Fr,s))y=Fr[s];else if(y!=null){if(!(T in y)){if(!r)throw new _i("base intrinsic for "+e+" exists, but the property is not available.");return}if(gn&&A+1>=i.length){var W=gn(y,T);q=!!W,q&&"get"in W&&!("originalValue"in W.get)?y=W.get:y=y[T]}else q=Bo(y,T),y=y[T];q&&!w&&(Fr[s]=y)}}return y}});var jr=B((PS,d0)=>{"use strict";b();var l0=Pf(),c0=Eo(),_b=c0([l0("%String.prototype.indexOf%")]);d0.exports=function(e,r){var i=l0(e,!!r);return typeof i=="function"&&_b(e,".prototype.")>-1?c0([i]):i}});var y0=B((LS,v0)=>{"use strict";b();var xb=vn()(),Mb=jr(),Uf=Mb("Object.prototype.toString"),Ro=function(e){return xb&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Uf(e)==="[object Arguments]"},p0=function(e){return Ro(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&Uf(e)!=="[object Array]"&&"callee"in e&&Uf(e.callee)==="[object Function]"},Eb=(function(){return Ro(arguments)})();Ro.isLegacyArguments=p0;v0.exports=Eb?Ro:p0});var x0=B((FS,_0)=>{"use strict";b();var g0=jr(),Sb=vn()(),Bb=Cf(),Ab=Nr(),Ff;Sb?(m0=g0("RegExp.prototype.exec"),Lf={},qo=function(){throw Lf},Nf={toString:qo,valueOf:qo},typeof Symbol.toPrimitive=="symbol"&&(Nf[Symbol.toPrimitive]=qo),Ff=function(e){if(!e||typeof e!="object")return!1;var r=Ab(e,"lastIndex"),i=r&&Bb(r,"value");if(!i)return!1;try{m0(e,Nf)}catch(n){return n===Lf}}):(b0=g0("Object.prototype.toString"),w0="[object RegExp]",Ff=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:b0(e)===w0});var m0,Lf,qo,Nf,b0,w0;_0.exports=Ff});var E0=B((KS,M0)=>{"use strict";b();var Rb=jr(),qb=x0(),kb=Rb("RegExp.prototype.exec"),Tb=Lr();M0.exports=function(e){if(!qb(e))throw new Tb("`regex` must be a RegExp");return function(i){return kb(e,i)!==null}}});var B0=B((WS,S0)=>{"use strict";b();var Ib=function*(){}.constructor;S0.exports=()=>Ib});var k0=B(($S,q0)=>{"use strict";b();var R0=jr(),Cb=E0(),Ob=Cb(/^\s*(?:function)?\*/),Db=vn()(),A0=So(),Pb=R0("Object.prototype.toString"),Ub=R0("Function.prototype.toString"),Lb=B0();q0.exports=function(e){if(typeof e!="function")return!1;if(Ob(Ub(e)))return!0;if(!Db){var r=Pb(e);return r==="[object GeneratorFunction]"}if(!A0)return!1;var i=Lb();return i&&A0(e)===i.prototype}});var O0=B((zS,C0)=>{"use strict";b();var I0=Function.prototype.toString,Mi=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Kf,ko;if(typeof Mi=="function"&&typeof Object.defineProperty=="function")try{Kf=Object.defineProperty({},"length",{get:function(){throw ko}}),ko={},Mi(function(){throw 42},null,Kf)}catch(t){t!==ko&&(Mi=null)}else Mi=null;var Nb=/^\s*class\b/,Hf=function(e){try{var r=I0.call(e);return Nb.test(r)}catch{return!1}},jf=function(e){try{return Hf(e)?!1:(I0.call(e),!0)}catch{return!1}},To=Object.prototype.toString,Fb="[object Object]",jb="[object Function]",Kb="[object GeneratorFunction]",Hb="[object HTMLAllCollection]",Wb="[object HTML document.all class]",Gb="[object HTMLCollection]",$b=typeof Symbol=="function"&&!!Symbol.toStringTag,Vb=!(0 in[,]),Wf=function(){return!1};typeof document=="object"&&(T0=document.all,To.call(T0)===To.call(document.all)&&(Wf=function(e){if((Vb||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=To.call(e);return(r===Hb||r===Wb||r===Gb||r===Fb)&&e("")==null}catch{}return!1}));var T0;C0.exports=Mi?function(e){if(Wf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Mi(e,null,Kf)}catch(r){if(r!==ko)return!1}return!Hf(e)&&jf(e)}:function(e){if(Wf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if($b)return jf(e);if(Hf(e))return!1;var r=To.call(e);return r!==jb&&r!==Kb&&!/^\[object HTML/.test(r)?!1:jf(e)}});var U0=B((YS,P0)=>{"use strict";b();var zb=O0(),Zb=Object.prototype.toString,D0=Object.prototype.hasOwnProperty,Yb=function(e,r,i){for(var n=0,a=e.length;n<a;n++)D0.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))},Jb=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)},Xb=function(e,r,i){for(var n in e)D0.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))};function Qb(t){return Zb.call(t)==="[object Array]"}P0.exports=function(e,r,i){if(!zb(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),Qb(e)?Yb(e,r,n):typeof e=="string"?Jb(e,r,n):Xb(e,r,n)}});var N0=B((XS,L0)=>{"use strict";b();L0.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var j0=B((e5,F0)=>{"use strict";b();var Gf=N0(),ew=globalThis;F0.exports=function(){for(var e=[],r=0;r<Gf.length;r++)typeof ew[Gf[r]]=="function"&&(e[e.length]=Gf[r]);return e}});var G0=B((r5,W0)=>{"use strict";b();var K0=yn(),tw=Rf(),Ei=Lr(),H0=Nr();W0.exports=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Ei("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ei("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ei("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ei("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ei("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ei("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,w=!!H0&&H0(e,r);if(K0)K0(e,r,{configurable:s===null&&w?w.configurable:!s,enumerable:n===null&&w?w.enumerable:!n,value:i,writable:a===null&&w?w.writable:!a});else if(y||!n&&!a&&!s)e[r]=i;else throw new tw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var z0=B((n5,V0)=>{"use strict";b();var $f=yn(),$0=function(){return!!$f};$0.hasArrayLengthDefineBug=function(){if(!$f)return null;try{return $f([],"length",{value:1}).length!==1}catch{return!0}};V0.exports=$0});var Q0=B((a5,X0)=>{"use strict";b();var rw=Pf(),Z0=G0(),iw=z0()(),Y0=Nr(),J0=Lr(),nw=rw("%Math.floor%");X0.exports=function(e,r){if(typeof e!="function")throw new J0("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||nw(r)!==r)throw new J0("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in e&&Y0){var s=Y0(e,"length");s&&!s.configurable&&(n=!1),s&&!s.writable&&(a=!1)}return(n||a||!i)&&(iw?Z0(e,"length",r,!0,!0):Z0(e,"length",r)),e}});var tc=B((s5,ec)=>{"use strict";b();var ow=mi(),aw=Mo(),fw=Tf();ec.exports=function(){return fw(ow,aw,arguments)}});var nc=B((h5,Io)=>{"use strict";b();var sw=Q0(),rc=yn(),uw=Eo(),ic=tc();Io.exports=function(e){var r=uw(arguments),i=1+e.length-(arguments.length-1);return sw(r,i>0?i:0,!0)};rc?rc(Io.exports,"apply",{value:ic}):Io.exports.apply=ic});var Yf=B((c5,sc)=>{"use strict";b();var Do=U0(),hw=j0(),oc=nc(),zf=jr(),Oo=Nr(),Co=So(),lw=zf("Object.prototype.toString"),fc=vn()(),ac=globalThis,Vf=hw(),Zf=zf("String.prototype.slice"),cw=zf("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},Po={__proto__:null};fc&&Oo&&Co?Do(Vf,function(t){var e=new ac[t];if(Symbol.toStringTag in e&&Co){var r=Co(e),i=Oo(r,Symbol.toStringTag);if(!i&&r){var n=Co(r);i=Oo(n,Symbol.toStringTag)}if(i&&i.get){var a=oc(i.get);Po["$"+t]=a}}}):Do(Vf,function(t){var e=new ac[t],r=e.slice||e.set;if(r){var i=oc(r);Po["$"+t]=i}});var dw=function(e){var r=!1;return Do(Po,function(i,n){if(!r)try{"$"+i(e)===n&&(r=Zf(n,1))}catch{}}),r},pw=function(e){var r=!1;return Do(Po,function(i,n){if(!r)try{i(e),r=Zf(n,1)}catch{}}),r};sc.exports=function(e){if(!e||typeof e!="object")return!1;if(!fc){var r=Zf(lw(e),8,-1);return cw(Vf,r)>-1?r:r!=="Object"?!1:pw(e)}return Oo?dw(e):null}});var Jf=B((p5,uc)=>{"use strict";b();var vw=Yf();uc.exports=function(e){return!!vw(e)}});var Mc=B(Re=>{"use strict";b();var yw=y0(),gw=k0(),wt=Yf(),hc=Jf();function Si(t){return t.call.bind(t)}var lc=typeof BigInt<"u",cc=typeof Symbol<"u",ht=Si(Object.prototype.toString),mw=Si(Number.prototype.valueOf),bw=Si(String.prototype.valueOf),ww=Si(Boolean.prototype.valueOf);lc&&(dc=Si(BigInt.prototype.valueOf));var dc;cc&&(pc=Si(Symbol.prototype.valueOf));var pc;function _n(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}Re.isArgumentsObject=yw;Re.isGeneratorFunction=gw;Re.isTypedArray=hc;function _w(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}Re.isPromise=_w;function xw(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):hc(t)||yc(t)}Re.isArrayBufferView=xw;function Mw(t){return wt(t)==="Uint8Array"}Re.isUint8Array=Mw;function Ew(t){return wt(t)==="Uint8ClampedArray"}Re.isUint8ClampedArray=Ew;function Sw(t){return wt(t)==="Uint16Array"}Re.isUint16Array=Sw;function Bw(t){return wt(t)==="Uint32Array"}Re.isUint32Array=Bw;function Aw(t){return wt(t)==="Int8Array"}Re.isInt8Array=Aw;function Rw(t){return wt(t)==="Int16Array"}Re.isInt16Array=Rw;function qw(t){return wt(t)==="Int32Array"}Re.isInt32Array=qw;function kw(t){return wt(t)==="Float32Array"}Re.isFloat32Array=kw;function Tw(t){return wt(t)==="Float64Array"}Re.isFloat64Array=Tw;function Iw(t){return wt(t)==="BigInt64Array"}Re.isBigInt64Array=Iw;function Cw(t){return wt(t)==="BigUint64Array"}Re.isBigUint64Array=Cw;function Uo(t){return ht(t)==="[object Map]"}Uo.working=typeof Map<"u"&&Uo(new Map);function Ow(t){return typeof Map>"u"?!1:Uo.working?Uo(t):t instanceof Map}Re.isMap=Ow;function Lo(t){return ht(t)==="[object Set]"}Lo.working=typeof Set<"u"&&Lo(new Set);function Dw(t){return typeof Set>"u"?!1:Lo.working?Lo(t):t instanceof Set}Re.isSet=Dw;function No(t){return ht(t)==="[object WeakMap]"}No.working=typeof WeakMap<"u"&&No(new WeakMap);function Pw(t){return typeof WeakMap>"u"?!1:No.working?No(t):t instanceof WeakMap}Re.isWeakMap=Pw;function Qf(t){return ht(t)==="[object WeakSet]"}Qf.working=typeof WeakSet<"u"&&Qf(new WeakSet);function Uw(t){return Qf(t)}Re.isWeakSet=Uw;function Fo(t){return ht(t)==="[object ArrayBuffer]"}Fo.working=typeof ArrayBuffer<"u"&&Fo(new ArrayBuffer);function vc(t){return typeof ArrayBuffer>"u"?!1:Fo.working?Fo(t):t instanceof ArrayBuffer}Re.isArrayBuffer=vc;function jo(t){return ht(t)==="[object DataView]"}jo.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&jo(new DataView(new ArrayBuffer(1),0,1));function yc(t){return typeof DataView>"u"?!1:jo.working?jo(t):t instanceof DataView}Re.isDataView=yc;var Xf=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function wn(t){return ht(t)==="[object SharedArrayBuffer]"}function gc(t){return typeof Xf>"u"?!1:(typeof wn.working>"u"&&(wn.working=wn(new Xf)),wn.working?wn(t):t instanceof Xf)}Re.isSharedArrayBuffer=gc;function Lw(t){return ht(t)==="[object AsyncFunction]"}Re.isAsyncFunction=Lw;function Nw(t){return ht(t)==="[object Map Iterator]"}Re.isMapIterator=Nw;function Fw(t){return ht(t)==="[object Set Iterator]"}Re.isSetIterator=Fw;function jw(t){return ht(t)==="[object Generator]"}Re.isGeneratorObject=jw;function Kw(t){return ht(t)==="[object WebAssembly.Module]"}Re.isWebAssemblyCompiledModule=Kw;function mc(t){return _n(t,mw)}Re.isNumberObject=mc;function bc(t){return _n(t,bw)}Re.isStringObject=bc;function wc(t){return _n(t,ww)}Re.isBooleanObject=wc;function _c(t){return lc&&_n(t,dc)}Re.isBigIntObject=_c;function xc(t){return cc&&_n(t,pc)}Re.isSymbolObject=xc;function Hw(t){return mc(t)||bc(t)||wc(t)||_c(t)||xc(t)}Re.isBoxedPrimitive=Hw;function Ww(t){return typeof Uint8Array<"u"&&(vc(t)||gc(t))}Re.isAnyArrayBuffer=Ww;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Re,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Sc=B((m5,Ec)=>{b();Ec.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var En=B(qe=>{b();var Bc=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},Gw=/%[sdj%]/g;qe.format=function(t){if(!zo(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(ar(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,n=i.length,a=String(t).replace(Gw,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}}),s=i[r];r<n;s=i[++r])Vo(s)||!Bi(s)?a+=" "+s:a+=" "+ar(s);return a};qe.deprecate=function(t,e){if(typeof M.default<"u"&&M.default.noDeprecation===!0)return t;if(typeof M.default>"u")return function(){return qe.deprecate(t,e).apply(this,arguments)};var r=!1;function i(){if(!r){if(M.default.throwDeprecation)throw new Error(e);M.default.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return i};var Ko={},Ac=/^$/;M.default.env.NODE_DEBUG&&(Ho=M.default.env.NODE_DEBUG,Ho=Ho.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Ac=new RegExp("^"+Ho+"$","i"));var Ho;qe.debuglog=function(t){if(t=t.toUpperCase(),!Ko[t])if(Ac.test(t)){var e=M.default.pid;Ko[t]=function(){var r=qe.format.apply(qe,arguments);console.error("%s %d: %s",t,e,r)}}else Ko[t]=function(){};return Ko[t]};function ar(t,e){var r={seen:[],stylize:Vw};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),is(e)?r.showHidden=e:e&&qe._extend(r,e),Hr(r.showHidden)&&(r.showHidden=!1),Hr(r.depth)&&(r.depth=2),Hr(r.colors)&&(r.colors=!1),Hr(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=$w),Go(r,t,r.depth)}qe.inspect=ar;ar.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]};ar.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function $w(t,e){var r=ar.styles[e];return r?"\x1B["+ar.colors[r][0]+"m"+t+"\x1B["+ar.colors[r][1]+"m":t}function Vw(t,e){return t}function zw(t){var e={};return t.forEach(function(r,i){e[r]=!0}),e}function Go(t,e,r){if(t.customInspect&&e&&Wo(e.inspect)&&e.inspect!==qe.inspect&&!(e.constructor&&e.constructor.prototype===e)){var i=e.inspect(r,t);return zo(i)||(i=Go(t,i,r)),i}var n=Zw(t,e);if(n)return n;var a=Object.keys(e),s=zw(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),Mn(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return es(e);if(a.length===0){if(Wo(e)){var y=e.name?": "+e.name:"";return t.stylize("[Function"+y+"]","special")}if(xn(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if($o(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Mn(e))return es(e)}var w="",S=!1,A=["{","}"];if(Rc(e)&&(S=!0,A=["[","]"]),Wo(e)){var q=e.name?": "+e.name:"";w=" [Function"+q+"]"}if(xn(e)&&(w=" "+RegExp.prototype.toString.call(e)),$o(e)&&(w=" "+Date.prototype.toUTCString.call(e)),Mn(e)&&(w=" "+es(e)),a.length===0&&(!S||e.length==0))return A[0]+w+A[1];if(r<0)return xn(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var T;return S?T=Yw(t,e,r,s,a):T=a.map(function(O){return rs(t,e,r,s,O,S)}),t.seen.pop(),Jw(T,w,A)}function Zw(t,e){if(Hr(e))return t.stylize("undefined","undefined");if(zo(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(qc(e))return t.stylize(""+e,"number");if(is(e))return t.stylize(""+e,"boolean");if(Vo(e))return t.stylize("null","null")}function es(t){return"["+Error.prototype.toString.call(t)+"]"}function Yw(t,e,r,i,n){for(var a=[],s=0,y=e.length;s<y;++s)kc(e,String(s))?a.push(rs(t,e,r,i,String(s),!0)):a.push("");return n.forEach(function(w){w.match(/^\d+$/)||a.push(rs(t,e,r,i,w,!0))}),a}function rs(t,e,r,i,n,a){var s,y,w;if(w=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]},w.get?w.set?y=t.stylize("[Getter/Setter]","special"):y=t.stylize("[Getter]","special"):w.set&&(y=t.stylize("[Setter]","special")),kc(i,n)||(s="["+n+"]"),y||(t.seen.indexOf(w.value)<0?(Vo(r)?y=Go(t,w.value,null):y=Go(t,w.value,r-1),y.indexOf(`
3
- `)>-1&&(a?y=y.split(`
4
- `).map(function(S){return" "+S}).join(`
5
- `).slice(2):y=`
6
- `+y.split(`
7
- `).map(function(S){return" "+S}).join(`
8
- `))):y=t.stylize("[Circular]","special")),Hr(s)){if(a&&n.match(/^\d+$/))return y;s=JSON.stringify(""+n),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+y}function Jw(t,e,r){var i=0,n=t.reduce(function(a,s){return i++,s.indexOf(`
9
- `)>=0&&i++,a+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(e===""?"":e+`
10
- `)+" "+t.join(`,
11
- `)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}qe.types=Mc();function Rc(t){return Array.isArray(t)}qe.isArray=Rc;function is(t){return typeof t=="boolean"}qe.isBoolean=is;function Vo(t){return t===null}qe.isNull=Vo;function Xw(t){return t==null}qe.isNullOrUndefined=Xw;function qc(t){return typeof t=="number"}qe.isNumber=qc;function zo(t){return typeof t=="string"}qe.isString=zo;function Qw(t){return typeof t=="symbol"}qe.isSymbol=Qw;function Hr(t){return t===void 0}qe.isUndefined=Hr;function xn(t){return Bi(t)&&ns(t)==="[object RegExp]"}qe.isRegExp=xn;qe.types.isRegExp=xn;function Bi(t){return typeof t=="object"&&t!==null}qe.isObject=Bi;function $o(t){return Bi(t)&&ns(t)==="[object Date]"}qe.isDate=$o;qe.types.isDate=$o;function Mn(t){return Bi(t)&&(ns(t)==="[object Error]"||t instanceof Error)}qe.isError=Mn;qe.types.isNativeError=Mn;function Wo(t){return typeof t=="function"}qe.isFunction=Wo;function e2(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}qe.isPrimitive=e2;qe.isBuffer=Sc();function ns(t){return Object.prototype.toString.call(t)}function ts(t){return t<10?"0"+t.toString(10):t.toString(10)}var t2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function r2(){var t=new Date,e=[ts(t.getHours()),ts(t.getMinutes()),ts(t.getSeconds())].join(":");return[t.getDate(),t2[t.getMonth()],e].join(" ")}qe.log=function(){console.log("%s - %s",r2(),qe.format.apply(qe,arguments))};qe.inherits=H();qe._extend=function(t,e){if(!e||!Bi(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};function kc(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Kr=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;qe.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(Kr&&e[Kr]){var r=e[Kr];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,Kr,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(w,S){i=w,n=S}),s=[],y=0;y<arguments.length;y++)s.push(arguments[y]);s.push(function(w,S){w?n(w):i(S)});try{e.apply(this,s)}catch(w){n(w)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Kr&&Object.defineProperty(r,Kr,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,Bc(e))};qe.promisify.custom=Kr;function i2(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function n2(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,s=function(){return n.apply(a,arguments)};t.apply(this,r).then(function(y){M.default.nextTick(s.bind(null,null,y))},function(y){M.default.nextTick(i2.bind(null,y,s))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,Bc(t)),e}qe.callbackify=n2});var Pc=B((x5,Dc)=>{"use strict";b();function Tc(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 Ic(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tc(Object(r),!0).forEach(function(i){o2(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function o2(t,e,r){return e=Oc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a2(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cc(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,Oc(i.key),i)}}function f2(t,e,r){return e&&Cc(t.prototype,e),r&&Cc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Oc(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 u2=rt(),Zo=u2.Buffer,h2=En(),os=h2.inspect,l2=os&&os.custom||"inspect";function c2(t,e,r){Zo.prototype.copy.call(t,e,r)}Dc.exports=(function(){function t(){a2(this,t),this.head=null,this.tail=null,this.length=0}return f2(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 Zo.alloc(0);for(var i=Zo.allocUnsafe(r>>>0),n=this.head,a=0;n;)c2(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 s=i.data,y=r>s.length?s.length:r;if(y===s.length?a+=s:a+=s.slice(0,r),r-=y,r===0){y===s.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(y));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=Zo.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var s=n.data,y=r>s.length?s.length:r;if(s.copy(i,i.length-r,0,y),r-=y,r===0){y===s.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(y));break}++a}return this.length-=a,i}},{key:l2,value:function(r,i){return os(this,Ic(Ic({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var fs=B((E5,Lc)=>{"use strict";b();function d2(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,M.default.nextTick(as,this,t)):M.default.nextTick(as,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?M.default.nextTick(Yo,r):(r._writableState.errorEmitted=!0,M.default.nextTick(Uc,r,a)):M.default.nextTick(Uc,r,a):e?(M.default.nextTick(Yo,r),e(a)):M.default.nextTick(Yo,r)}),this)}function Uc(t,e){as(t,e),Yo(t)}function Yo(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function p2(){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 as(t,e){t.emit("error",e)}function v2(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Lc.exports={destroy:d2,undestroy:p2,errorOrDestroy:v2}});var Wr=B((B5,jc)=>{"use strict";b();function y2(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Fc={};function lt(t,e,r){r||(r=Error);function i(a,s,y){return typeof e=="string"?e:e(a,s,y)}var n=(function(a){y2(s,a);function s(y,w,S){return a.call(this,i(y,w,S))||this}return s})(r);n.prototype.name=r.name,n.prototype.code=t,Fc[t]=n}function Nc(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 g2(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function m2(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function b2(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}lt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);lt("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&g2(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var n;if(m2(t," argument"))n="The ".concat(t," ").concat(i," ").concat(Nc(e,"type"));else{var a=b2(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(Nc(e,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);lt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");lt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});lt("ERR_STREAM_PREMATURE_CLOSE","Premature close");lt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});lt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");lt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");lt("ERR_STREAM_WRITE_AFTER_END","write after end");lt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);lt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);lt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");jc.exports.codes=Fc});var ss=B((R5,Kc)=>{"use strict";b();var w2=Wr().codes.ERR_INVALID_OPT_VALUE;function _2(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function x2(t,e,r,i){var n=_2(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new w2(a,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Kc.exports={getHighWaterMark:x2}});var hs=B((k5,Hc)=>{b();Hc.exports=M2;function M2(t,e){if(us("noDeprecation"))return t;var r=!1;function i(){if(!r){if(us("throwDeprecation"))throw new Error(e);us("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function us(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var ds=B((I5,Zc)=>{"use strict";b();Zc.exports=Ne;function Gc(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Y2(e,t)}}var Ai;Ne.WritableState=Bn;var E2={deprecate:hs()},$c=Sf(),Xo=rt().Buffer,S2=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B2(t){return Xo.from(t)}function A2(t){return Xo.isBuffer(t)||t instanceof S2}var cs=fs(),R2=ss(),q2=R2.getHighWaterMark,fr=Wr().codes,k2=fr.ERR_INVALID_ARG_TYPE,T2=fr.ERR_METHOD_NOT_IMPLEMENTED,I2=fr.ERR_MULTIPLE_CALLBACK,C2=fr.ERR_STREAM_CANNOT_PIPE,O2=fr.ERR_STREAM_DESTROYED,D2=fr.ERR_STREAM_NULL_VALUES,P2=fr.ERR_STREAM_WRITE_AFTER_END,U2=fr.ERR_UNKNOWN_ENCODING,Ri=cs.errorOrDestroy;H()(Ne,$c);function L2(){}function Bn(t,e,r){Ai=Ai||Gr(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ai),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=q2(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){G2(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 Gc(this)}Bn.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Bn.prototype,"buffer",{get:E2.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Jo;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Jo=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ne,Symbol.hasInstance,{value:function(e){return Jo.call(this,e)?!0:this!==Ne?!1:e&&e._writableState instanceof Bn}})):Jo=function(e){return e instanceof this};function Ne(t){Ai=Ai||Gr();var e=this instanceof Ai;if(!e&&!Jo.call(Ne,this))return new Ne(t);this._writableState=new Bn(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)),$c.call(this)}Ne.prototype.pipe=function(){Ri(this,new C2)};function N2(t,e){var r=new P2;Ri(t,r),M.default.nextTick(e,r)}function F2(t,e,r,i){var n;return r===null?n=new D2:typeof r!="string"&&!e.objectMode&&(n=new k2("chunk",["string","Buffer"],r)),n?(Ri(t,n),M.default.nextTick(i,n),!1):!0}Ne.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&A2(t);return a&&!Xo.isBuffer(t)&&(t=B2(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=L2),i.ending?N2(this,r):(a||F2(this,i,t,r))&&(i.pendingcb++,n=K2(this,i,a,t,e,r)),n};Ne.prototype.cork=function(){this._writableState.corked++};Ne.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Vc(this,t))};Ne.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 U2(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ne.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function j2(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Xo.from(e,r)),e}Object.defineProperty(Ne.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K2(t,e,r,i,n,a){if(!r){var s=j2(e,i,n);i!==s&&(r=!0,n="buffer",i=s)}var y=e.objectMode?1:i.length;e.length+=y;var w=e.length<e.highWaterMark;if(w||(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 ls(t,e,!1,y,i,n,a);return w}function ls(t,e,r,i,n,a,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new O2("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function H2(t,e,r,i,n){--e.pendingcb,r?(M.default.nextTick(n,i),M.default.nextTick(Sn,t,e),t._writableState.errorEmitted=!0,Ri(t,i)):(n(i),t._writableState.errorEmitted=!0,Ri(t,i),Sn(t,e))}function W2(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function G2(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new I2;if(W2(r),e)H2(t,r,i,e,n);else{var a=zc(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Vc(t,r),i?M.default.nextTick(Wc,t,r,a,n):Wc(t,r,a,n)}}function Wc(t,e,r,i){r||$2(t,e),e.pendingcb--,i(),Sn(t,e)}function $2(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Vc(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 s=0,y=!0;r;)n[s]=r,r.isBuf||(y=!1),r=r.next,s+=1;n.allBuffers=y,ls(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 Gc(e),e.bufferedRequestCount=0}else{for(;r;){var w=r.chunk,S=r.encoding,A=r.callback,q=e.objectMode?1:w.length;if(ls(t,e,!1,q,w,S,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ne.prototype._write=function(t,e,r){r(new T2("_write()"))};Ne.prototype._writev=null;Ne.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||Z2(this,i,r),this};Object.defineProperty(Ne.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function zc(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function V2(t,e){t._final(function(r){e.pendingcb--,r&&Ri(t,r),e.prefinished=!0,t.emit("prefinish"),Sn(t,e)})}function z2(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,M.default.nextTick(V2,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Sn(t,e){var r=zc(e);if(r&&(z2(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 Z2(t,e,r){e.ending=!0,Sn(t,e),r&&(e.finished?M.default.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Y2(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(Ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Ne.prototype.destroy=cs.destroy;Ne.prototype._undestroy=cs.undestroy;Ne.prototype._destroy=function(t,e){e(t)}});var Gr=B((O5,Jc)=>{"use strict";b();var J2=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Jc.exports=Pt;var Yc=ys(),vs=ds();H()(Pt,Yc);for(ps=J2(vs.prototype),Qo=0;Qo<ps.length;Qo++)ea=ps[Qo],Pt.prototype[ea]||(Pt.prototype[ea]=vs.prototype[ea]);var ps,ea,Qo;function Pt(t){if(!(this instanceof Pt))return new Pt(t);Yc.call(this,t),vs.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",X2)))}Object.defineProperty(Pt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Pt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Pt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function X2(){this._writableState.ended||M.default.nextTick(Q2,this)}function Q2(t){t.end()}Object.defineProperty(Pt.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 ed=B((gs,Qc)=>{b();var ta=rt(),Gt=ta.Buffer;function Xc(t,e){for(var r in t)e[r]=t[r]}Gt.from&&Gt.alloc&&Gt.allocUnsafe&&Gt.allocUnsafeSlow?Qc.exports=ta:(Xc(ta,gs),gs.Buffer=qi);function qi(t,e,r){return Gt(t,e,r)}Xc(Gt,qi);qi.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Gt(t,e,r)};qi.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Gt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};qi.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Gt(t)};qi.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ta.SlowBuffer(t)}});var ki=B(rd=>{"use strict";b();var bs=ed().Buffer,td=bs.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 e_(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 t_(t){var e=e_(t);if(typeof e!="string"&&(bs.isEncoding===td||!td(t)))throw new Error("Unknown encoding: "+t);return e||t}rd.StringDecoder=An;function An(t){this.encoding=t_(t);var e;switch(this.encoding){case"utf16le":this.text=f_,this.end=s_,e=4;break;case"utf8":this.fillLast=n_,e=4;break;case"base64":this.text=u_,this.end=h_,e=3;break;default:this.write=l_,this.end=c_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=bs.allocUnsafe(e)}An.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||""};An.prototype.end=a_;An.prototype.text=o_;An.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 ms(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function r_(t,e,r){var i=e.length-1;if(i<r)return 0;var n=ms(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=ms(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=ms(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function i_(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 n_(t){var e=this.lastTotal-this.lastNeed,r=i_(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 o_(t,e){var r=r_(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 a_(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function f_(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 u_(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 h_(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l_(t){return t.toString(this.encoding)}function c_(t){return t&&t.length?this.write(t):""}});var ra=B((N5,od)=>{"use strict";b();var id=Wr().codes.ERR_STREAM_PREMATURE_CLOSE;function d_(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 p_(){}function v_(t){return t.setHeader&&typeof t.abort=="function"}function nd(t,e,r){if(typeof e=="function")return nd(t,null,e);e||(e={}),r=d_(r||p_);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||y()},s=t._writableState&&t._writableState.finished,y=function(){n=!1,s=!0,i||r.call(t)},w=t._readableState&&t._readableState.endEmitted,S=function(){i=!1,w=!0,n||r.call(t)},A=function(P){r.call(t,P)},q=function(){var P;if(i&&!w)return(!t._readableState||!t._readableState.ended)&&(P=new id),r.call(t,P);if(n&&!s)return(!t._writableState||!t._writableState.ended)&&(P=new id),r.call(t,P)},T=function(){t.req.on("finish",y)};return v_(t)?(t.on("complete",y),t.on("abort",q),t.req?T():t.on("request",T)):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",T),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)}}od.exports=nd});var fd=B((j5,ad)=>{"use strict";b();var ia;function sr(t,e,r){return e=y_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y_(t){var e=g_(t,"string");return typeof e=="symbol"?e:String(e)}function g_(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 m_=ra(),ur=Symbol("lastResolve"),$r=Symbol("lastReject"),Rn=Symbol("error"),na=Symbol("ended"),Vr=Symbol("lastPromise"),ws=Symbol("handlePromise"),zr=Symbol("stream");function hr(t,e){return{value:t,done:e}}function b_(t){var e=t[ur];if(e!==null){var r=t[zr].read();r!==null&&(t[Vr]=null,t[ur]=null,t[$r]=null,e(hr(r,!1)))}}function w_(t){M.default.nextTick(b_,t)}function __(t,e){return function(r,i){t.then(function(){if(e[na]){r(hr(void 0,!0));return}e[ws](r,i)},i)}}var x_=Object.getPrototypeOf(function(){}),M_=Object.setPrototypeOf((ia={get stream(){return this[zr]},next:function(){var e=this,r=this[Rn];if(r!==null)return Promise.reject(r);if(this[na])return Promise.resolve(hr(void 0,!0));if(this[zr].destroyed)return new Promise(function(s,y){M.default.nextTick(function(){e[Rn]?y(e[Rn]):s(hr(void 0,!0))})});var i=this[Vr],n;if(i)n=new Promise(__(i,this));else{var a=this[zr].read();if(a!==null)return Promise.resolve(hr(a,!1));n=new Promise(this[ws])}return this[Vr]=n,n}},sr(ia,Symbol.asyncIterator,function(){return this}),sr(ia,"return",function(){var e=this;return new Promise(function(r,i){e[zr].destroy(null,function(n){if(n){i(n);return}r(hr(void 0,!0))})})}),ia),x_),E_=function(e){var r,i=Object.create(M_,(r={},sr(r,zr,{value:e,writable:!0}),sr(r,ur,{value:null,writable:!0}),sr(r,$r,{value:null,writable:!0}),sr(r,Rn,{value:null,writable:!0}),sr(r,na,{value:e._readableState.endEmitted,writable:!0}),sr(r,ws,{value:function(a,s){var y=i[zr].read();y?(i[Vr]=null,i[ur]=null,i[$r]=null,a(hr(y,!1))):(i[ur]=a,i[$r]=s)},writable:!0}),r));return i[Vr]=null,m_(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[$r];a!==null&&(i[Vr]=null,i[ur]=null,i[$r]=null,a(n)),i[Rn]=n;return}var s=i[ur];s!==null&&(i[Vr]=null,i[ur]=null,i[$r]=null,s(hr(void 0,!0))),i[na]=!0}),e.on("readable",w_.bind(null,i)),i};ad.exports=E_});var ud=B((H5,sd)=>{b();sd.exports=function(){throw new Error("Readable.from is not available in the browser")}});var ys=B(($5,bd)=>{"use strict";b();bd.exports=Te;var Ti;Te.ReadableState=dd;var G5=gi().EventEmitter,cd=function(e,r){return e.listeners(r).length},kn=Sf(),oa=rt().Buffer,S_=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B_(t){return oa.from(t)}function A_(t){return oa.isBuffer(t)||t instanceof S_}var _s=En(),Be;_s&&_s.debuglog?Be=_s.debuglog("stream"):Be=function(){};var R_=Pc(),Rs=fs(),q_=ss(),k_=q_.getHighWaterMark,aa=Wr().codes,T_=aa.ERR_INVALID_ARG_TYPE,I_=aa.ERR_STREAM_PUSH_AFTER_EOF,C_=aa.ERR_METHOD_NOT_IMPLEMENTED,O_=aa.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ii,xs,Ms;H()(Te,kn);var qn=Rs.errorOrDestroy,Es=["error","close","destroy","pause","resume"];function D_(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 dd(t,e,r){Ti=Ti||Gr(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ti),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=k_(this,t,"readableHighWaterMark",r),this.buffer=new R_,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&&(Ii||(Ii=ki().StringDecoder),this.decoder=new Ii(t.encoding),this.encoding=t.encoding)}function Te(t){if(Ti=Ti||Gr(),!(this instanceof Te))return new Te(t);var e=this instanceof Ti;this._readableState=new dd(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),kn.call(this)}Object.defineProperty(Te.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Te.prototype.destroy=Rs.destroy;Te.prototype._undestroy=Rs.undestroy;Te.prototype._destroy=function(t,e){e(t)};Te.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=oa.from(t,e),e=""),i=!0),pd(this,t,e,!1,i)};Te.prototype.unshift=function(t){return pd(this,t,null,!0,!1)};function pd(t,e,r,i,n){Be("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,L_(t,a);else{var s;if(n||(s=P_(a,e)),s)qn(t,s);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==oa.prototype&&(e=B_(e)),i)a.endEmitted?qn(t,new O_):Ss(t,a,e,!0);else if(a.ended)qn(t,new I_);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?Ss(t,a,e,!1):As(t,a)):Ss(t,a,e,!1)}else i||(a.reading=!1,As(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function Ss(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&&fa(t)),As(t,e)}function P_(t,e){var r;return!A_(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new T_("chunk",["string","Buffer","Uint8Array"],e)),r}Te.prototype.isPaused=function(){return this._readableState.flowing===!1};Te.prototype.setEncoding=function(t){Ii||(Ii=ki().StringDecoder);var e=new Ii(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 hd=1073741824;function U_(t){return t>=hd?t=hd:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function ld(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=U_(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Te.prototype.read=function(t){Be("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 Be("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Bs(this):fa(this),null;if(t=ld(t,e),t===0&&e.ended)return e.length===0&&Bs(this),null;var i=e.needReadable;Be("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Be("length less than watermark",i)),e.ended||e.reading?(i=!1,Be("reading or ended",i)):i&&(Be("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=ld(r,e)));var n;return t>0?n=gd(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&&Bs(this)),n!==null&&this.emit("data",n),n};function L_(t,e){if(Be("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?fa(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,vd(t)))}}function fa(t){var e=t._readableState;Be("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Be("emitReadable",e.flowing),e.emittedReadable=!0,M.default.nextTick(vd,t))}function vd(t){var e=t._readableState;Be("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,qs(t)}function As(t,e){e.readingMore||(e.readingMore=!0,M.default.nextTick(N_,t,e))}function N_(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Be("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Te.prototype._read=function(t){qn(this,new C_("_read()"))};Te.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,Be("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==M.default.stdout&&t!==M.default.stderr,a=n?y:W;i.endEmitted?M.default.nextTick(a):r.once("end",a),t.on("unpipe",s);function s(ke,j){Be("onunpipe"),ke===r&&j&&j.hasUnpiped===!1&&(j.hasUnpiped=!0,A())}function y(){Be("onend"),t.end()}var w=F_(r);t.on("drain",w);var S=!1;function A(){Be("cleanup"),t.removeListener("close",O),t.removeListener("finish",P),t.removeListener("drain",w),t.removeListener("error",T),t.removeListener("unpipe",s),r.removeListener("end",y),r.removeListener("end",W),r.removeListener("data",q),S=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&w()}r.on("data",q);function q(ke){Be("ondata");var j=t.write(ke);Be("dest.write",j),j===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&md(i.pipes,t)!==-1)&&!S&&(Be("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function T(ke){Be("onerror",ke),W(),t.removeListener("error",T),cd(t,"error")===0&&qn(t,ke)}D_(t,"error",T);function O(){t.removeListener("finish",P),W()}t.once("close",O);function P(){Be("onfinish"),t.removeListener("close",O),W()}t.once("finish",P);function W(){Be("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Be("pipe resume"),r.resume()),t};function F_(t){return function(){var r=t._readableState;Be("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&cd(t,"data")&&(r.flowing=!0,qs(t))}}Te.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 s=md(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Te.prototype.on=function(t,e){var r=kn.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,Be("on readable",i.length,i.reading),i.length?fa(this):i.reading||M.default.nextTick(j_,this)),r};Te.prototype.addListener=Te.prototype.on;Te.prototype.removeListener=function(t,e){var r=kn.prototype.removeListener.call(this,t,e);return t==="readable"&&M.default.nextTick(yd,this),r};Te.prototype.removeAllListeners=function(t){var e=kn.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&M.default.nextTick(yd,this),e};function yd(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 j_(t){Be("readable nexttick read 0"),t.read(0)}Te.prototype.resume=function(){var t=this._readableState;return t.flowing||(Be("resume"),t.flowing=!t.readableListening,K_(this,t)),t.paused=!1,this};function K_(t,e){e.resumeScheduled||(e.resumeScheduled=!0,M.default.nextTick(H_,t,e))}function H_(t,e){Be("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),qs(t),e.flowing&&!e.reading&&t.read(0)}Te.prototype.pause=function(){return Be("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Be("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function qs(t){var e=t._readableState;for(Be("flow",e.flowing);e.flowing&&t.read()!==null;);}Te.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Be("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(Be("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var y=e.push(s);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<Es.length;a++)t.on(Es[a],this.emit.bind(this,Es[a]));return this._read=function(s){Be("wrapped _read",s),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(Te.prototype[Symbol.asyncIterator]=function(){return xs===void 0&&(xs=fd()),xs(this)});Object.defineProperty(Te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Te._fromList=gd;Object.defineProperty(Te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function gd(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 Bs(t){var e=t._readableState;Be("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,M.default.nextTick(W_,e,t))}function W_(t,e){if(Be("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"&&(Te.from=function(t,e){return Ms===void 0&&(Ms=ud()),Ms(Te,t,e)});function md(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ks=B((z5,_d)=>{"use strict";b();_d.exports=$t;var sa=Wr().codes,G_=sa.ERR_METHOD_NOT_IMPLEMENTED,$_=sa.ERR_MULTIPLE_CALLBACK,V_=sa.ERR_TRANSFORM_ALREADY_TRANSFORMING,z_=sa.ERR_TRANSFORM_WITH_LENGTH_0,ua=Gr();H()($t,ua);function Z_(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new $_);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 $t(t){if(!(this instanceof $t))return new $t(t);ua.call(this,t),this._transformState={afterTransform:Z_.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",Y_)}function Y_(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){wd(t,e,r)}):wd(this,null,null)}$t.prototype.push=function(t,e){return this._transformState.needTransform=!1,ua.prototype.push.call(this,t,e)};$t.prototype._transform=function(t,e,r){r(new G_("_transform()"))};$t.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)}};$t.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};$t.prototype._destroy=function(t,e){ua.prototype._destroy.call(this,t,function(r){e(r)})};function wd(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new z_;if(t._transformState.transforming)throw new V_;return t.push(null)}});var Ed=B((Y5,Md)=>{"use strict";b();Md.exports=Tn;var xd=ks();H()(Tn,xd);function Tn(t){if(!(this instanceof Tn))return new Tn(t);xd.call(this,t)}Tn.prototype._transform=function(t,e,r){r(null,t)}});var qd=B((X5,Rd)=>{"use strict";b();var Ts;function J_(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Ad=Wr().codes,X_=Ad.ERR_MISSING_ARGS,Q_=Ad.ERR_STREAM_DESTROYED;function Sd(t){if(t)throw t}function e6(t){return t.setHeader&&typeof t.abort=="function"}function t6(t,e,r,i){i=J_(i);var n=!1;t.on("close",function(){n=!0}),Ts===void 0&&(Ts=ra()),Ts(t,{readable:e,writable:r},function(s){if(s)return i(s);n=!0,i()});var a=!1;return function(s){if(!n&&!a){if(a=!0,e6(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(s||new Q_("pipe"))}}}function Bd(t){t()}function r6(t,e){return t.pipe(e)}function i6(t){return!t.length||typeof t[t.length-1]!="function"?Sd:t.pop()}function n6(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=i6(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new X_("streams");var n,a=e.map(function(s,y){var w=y<e.length-1,S=y>0;return t6(s,w,S,function(A){n||(n=A),A&&a.forEach(Bd),!w&&(a.forEach(Bd),i(n))})});return e.reduce(r6)}Rd.exports=n6});var Cs=B((eB,kd)=>{b();kd.exports=ct;var Is=gi().EventEmitter,o6=H();o6(ct,Is);ct.Readable=ys();ct.Writable=ds();ct.Duplex=Gr();ct.Transform=ks();ct.PassThrough=Ed();ct.finished=ra();ct.pipeline=qd();ct.Stream=ct;function ct(){Is.call(this)}ct.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",s),r.on("close",y));var a=!1;function s(){a||(a=!0,t.end())}function y(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function w(A){if(S(),Is.listenerCount(this,"error")===0)throw A}r.on("error",w),t.on("error",w);function S(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",s),r.removeListener("close",y),r.removeListener("error",w),t.removeListener("error",w),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 Cd=B((rB,Id)=>{"use strict";b();var Ut=Me().Buffer,Td=Cs().Transform,a6=H();function lr(t){Td.call(this),this._block=Ut.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}a6(lr,Td);lr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};lr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};var f6=typeof Uint8Array<"u",s6=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(Ut.prototype instanceof Uint8Array||Ut.TYPED_ARRAY_SUPPORT);function u6(t,e){if(t instanceof Ut)return t;if(typeof t=="string")return Ut.from(t,e);if(s6&&ArrayBuffer.isView(t)){if(t.byteLength===0)return Ut.alloc(0);var r=Ut.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(f6&&t instanceof Uint8Array||Ut.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Ut.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}lr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=u6(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,s=t.length*8;s>0;++a)this._length[a]+=s,s=this._length[a]/4294967296|0,s>0&&(this._length[a]-=4294967296*s);return this};lr.prototype._update=function(){throw new Error("_update is not implemented")};lr.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};lr.prototype._digest=function(){throw new Error("_digest is not implemented")};Id.exports=lr});var ca=B((nB,Dd)=>{"use strict";b();var h6=H(),Od=Cd(),l6=Me().Buffer,c6=new Array(16);function ha(){Od.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}h6(ha,Od);ha.prototype._update=function(){for(var t=c6,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=Je(r,i,n,a,t[0],3614090360,7),a=Je(a,r,i,n,t[1],3905402710,12),n=Je(n,a,r,i,t[2],606105819,17),i=Je(i,n,a,r,t[3],3250441966,22),r=Je(r,i,n,a,t[4],4118548399,7),a=Je(a,r,i,n,t[5],1200080426,12),n=Je(n,a,r,i,t[6],2821735955,17),i=Je(i,n,a,r,t[7],4249261313,22),r=Je(r,i,n,a,t[8],1770035416,7),a=Je(a,r,i,n,t[9],2336552879,12),n=Je(n,a,r,i,t[10],4294925233,17),i=Je(i,n,a,r,t[11],2304563134,22),r=Je(r,i,n,a,t[12],1804603682,7),a=Je(a,r,i,n,t[13],4254626195,12),n=Je(n,a,r,i,t[14],2792965006,17),i=Je(i,n,a,r,t[15],1236535329,22),r=Xe(r,i,n,a,t[1],4129170786,5),a=Xe(a,r,i,n,t[6],3225465664,9),n=Xe(n,a,r,i,t[11],643717713,14),i=Xe(i,n,a,r,t[0],3921069994,20),r=Xe(r,i,n,a,t[5],3593408605,5),a=Xe(a,r,i,n,t[10],38016083,9),n=Xe(n,a,r,i,t[15],3634488961,14),i=Xe(i,n,a,r,t[4],3889429448,20),r=Xe(r,i,n,a,t[9],568446438,5),a=Xe(a,r,i,n,t[14],3275163606,9),n=Xe(n,a,r,i,t[3],4107603335,14),i=Xe(i,n,a,r,t[8],1163531501,20),r=Xe(r,i,n,a,t[13],2850285829,5),a=Xe(a,r,i,n,t[2],4243563512,9),n=Xe(n,a,r,i,t[7],1735328473,14),i=Xe(i,n,a,r,t[12],2368359562,20),r=Qe(r,i,n,a,t[5],4294588738,4),a=Qe(a,r,i,n,t[8],2272392833,11),n=Qe(n,a,r,i,t[11],1839030562,16),i=Qe(i,n,a,r,t[14],4259657740,23),r=Qe(r,i,n,a,t[1],2763975236,4),a=Qe(a,r,i,n,t[4],1272893353,11),n=Qe(n,a,r,i,t[7],4139469664,16),i=Qe(i,n,a,r,t[10],3200236656,23),r=Qe(r,i,n,a,t[13],681279174,4),a=Qe(a,r,i,n,t[0],3936430074,11),n=Qe(n,a,r,i,t[3],3572445317,16),i=Qe(i,n,a,r,t[6],76029189,23),r=Qe(r,i,n,a,t[9],3654602809,4),a=Qe(a,r,i,n,t[12],3873151461,11),n=Qe(n,a,r,i,t[15],530742520,16),i=Qe(i,n,a,r,t[2],3299628645,23),r=et(r,i,n,a,t[0],4096336452,6),a=et(a,r,i,n,t[7],1126891415,10),n=et(n,a,r,i,t[14],2878612391,15),i=et(i,n,a,r,t[5],4237533241,21),r=et(r,i,n,a,t[12],1700485571,6),a=et(a,r,i,n,t[3],2399980690,10),n=et(n,a,r,i,t[10],4293915773,15),i=et(i,n,a,r,t[1],2240044497,21),r=et(r,i,n,a,t[8],1873313359,6),a=et(a,r,i,n,t[15],4264355552,10),n=et(n,a,r,i,t[6],2734768916,15),i=et(i,n,a,r,t[13],1309151649,21),r=et(r,i,n,a,t[4],4149444226,6),a=et(a,r,i,n,t[11],3174756917,10),n=et(n,a,r,i,t[2],718787259,15),i=et(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};ha.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=l6.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 la(t,e){return t<<e|t>>>32-e}function Je(t,e,r,i,n,a,s){return la(t+(e&r|~e&i)+n+a|0,s)+e|0}function Xe(t,e,r,i,n,a,s){return la(t+(e&i|r&~i)+n+a|0,s)+e|0}function Qe(t,e,r,i,n,a,s){return la(t+(e^r^i)+n+a|0,s)+e|0}function et(t,e,r,i,n,a,s){return la(t+(r^(e|~i))+n+a|0,s)+e|0}Dd.exports=ha});var Ud=B((aB,Pd)=>{b();var d6={}.toString;Pd.exports=Array.isArray||function(t){return d6.call(t)=="[object Array]"}});var Nd=B((sB,Ld)=>{"use strict";b();var p6=Lr(),v6=jr(),y6=v6("TypedArray.prototype.buffer",!0),g6=Jf();Ld.exports=y6||function(e){if(!g6(e))throw new p6("Not a Typed Array");return e.buffer}});var In=B((hB,jd)=>{"use strict";b();var _t=Me().Buffer,m6=Ud(),b6=Nd(),w6=ArrayBuffer.isView||function(e){try{return b6(e),!0}catch{return!1}},_6=typeof Uint8Array<"u",Fd=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",x6=Fd&&(_t.prototype instanceof Uint8Array||_t.TYPED_ARRAY_SUPPORT);jd.exports=function(e,r){if(_t.isBuffer(e))return e.constructor&&!("isBuffer"in e)?_t.from(e):e;if(typeof e=="string")return _t.from(e,r);if(Fd&&w6(e)){if(e.byteLength===0)return _t.alloc(0);if(x6){var i=_t.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=_t.from(n);if(a.length===e.byteLength)return a}if(_6&&e instanceof Uint8Array)return _t.from(e);var s=m6(e);if(s)for(var y=0;y<e.length;y+=1){var w=e[y];if(typeof w!="number"||w<0||w>255||~~w!==w)throw new RangeError("Array items must be numbers in the range 0-255.")}if(s||_t.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return _t.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Gd=B((cB,Wd)=>{"use strict";b();var M6=Me().Buffer,E6=In(),Hd=typeof Uint8Array<"u",S6=Hd&&typeof ArrayBuffer<"u",Kd=S6&&ArrayBuffer.isView;Wd.exports=function(t,e){if(typeof t=="string"||M6.isBuffer(t)||Hd&&t instanceof Uint8Array||Kd&&Kd(t))return E6(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Cn=B((pB,Os)=>{"use strict";b();typeof M.default>"u"||!M.default.version||M.default.version.indexOf("v0.")===0||M.default.version.indexOf("v1.")===0&&M.default.version.indexOf("v1.8.")!==0?Os.exports={nextTick:B6}:Os.exports=M.default;function B6(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,s;switch(n){case 0:case 1:return M.default.nextTick(t);case 2:return M.default.nextTick(function(){t.call(null,e)});case 3:return M.default.nextTick(function(){t.call(null,e,r)});case 4:return M.default.nextTick(function(){t.call(null,e,r,i)});default:for(a=new Array(n-1),s=0;s<a.length;)a[s++]=arguments[s];return M.default.nextTick(function(){t.apply(null,a)})}}});var Vd=B((yB,$d)=>{b();var A6={}.toString;$d.exports=Array.isArray||function(t){return A6.call(t)=="[object Array]"}});var Ds=B((mB,zd)=>{b();zd.exports=gi().EventEmitter});var pa=B((Ps,Yd)=>{b();var da=rt(),Vt=da.Buffer;function Zd(t,e){for(var r in t)e[r]=t[r]}Vt.from&&Vt.alloc&&Vt.allocUnsafe&&Vt.allocUnsafeSlow?Yd.exports=da:(Zd(da,Ps),Ps.Buffer=Ci);function Ci(t,e,r){return Vt(t,e,r)}Zd(Vt,Ci);Ci.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Vt(t,e,r)};Ci.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Vt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Ci.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Vt(t)};Ci.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return da.SlowBuffer(t)}});var Oi=B(tt=>{b();function R6(t){return Array.isArray?Array.isArray(t):va(t)==="[object Array]"}tt.isArray=R6;function q6(t){return typeof t=="boolean"}tt.isBoolean=q6;function k6(t){return t===null}tt.isNull=k6;function T6(t){return t==null}tt.isNullOrUndefined=T6;function I6(t){return typeof t=="number"}tt.isNumber=I6;function C6(t){return typeof t=="string"}tt.isString=C6;function O6(t){return typeof t=="symbol"}tt.isSymbol=O6;function D6(t){return t===void 0}tt.isUndefined=D6;function P6(t){return va(t)==="[object RegExp]"}tt.isRegExp=P6;function U6(t){return typeof t=="object"&&t!==null}tt.isObject=U6;function L6(t){return va(t)==="[object Date]"}tt.isDate=L6;function N6(t){return va(t)==="[object Error]"||t instanceof Error}tt.isError=N6;function F6(t){return typeof t=="function"}tt.isFunction=F6;function j6(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}tt.isPrimitive=j6;tt.isBuffer=rt().Buffer.isBuffer;function va(t){return Object.prototype.toString.call(t)}});var Xd=B((MB,Us)=>{"use strict";b();function K6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Jd=pa().Buffer,On=En();function H6(t,e,r){t.copy(e,r)}Us.exports=(function(){function t(){K6(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 Jd.alloc(0);for(var i=Jd.allocUnsafe(r>>>0),n=this.head,a=0;n;)H6(n.data,i,a),a+=n.data.length,n=n.next;return i},t})();On&&On.inspect&&On.inspect.custom&&(Us.exports.prototype[On.inspect.custom]=function(){var t=On.inspect({length:this.length});return this.constructor.name+" "+t})});var Ls=B((SB,Qd)=>{"use strict";b();var ya=Cn();function W6(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,ya.nextTick(ga,this,t)):ya.nextTick(ga,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,ya.nextTick(ga,r,a)):ya.nextTick(ga,r,a):e&&e(a)}),this)}function G6(){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 ga(t,e){t.emit("error",e)}Qd.exports={destroy:W6,undestroy:G6}});var Fs=B((AB,fp)=>{"use strict";b();var Zr=Cn();fp.exports=He;function tp(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ux(e,t)}}var $6=!M.default.browser&&["v0.10","v0.9."].indexOf(M.default.version.slice(0,5))>-1?setImmediate:Zr.nextTick,Di;He.WritableState=Pn;var rp=Object.create(Oi());rp.inherits=H();var V6={deprecate:hs()},ip=Ds(),ba=pa().Buffer,z6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Z6(t){return ba.from(t)}function Y6(t){return ba.isBuffer(t)||t instanceof z6}var np=Ls();rp.inherits(He,ip);function J6(){}function Pn(t,e){Di=Di||Yr(),t=t||{};var r=e instanceof Di;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 s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(y){nx(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 tp(this)}Pn.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Pn.prototype,"buffer",{get:V6.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ma;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ma=Function.prototype[Symbol.hasInstance],Object.defineProperty(He,Symbol.hasInstance,{value:function(t){return ma.call(this,t)?!0:this!==He?!1:t&&t._writableState instanceof Pn}})):ma=function(t){return t instanceof this};function He(t){if(Di=Di||Yr(),!ma.call(He,this)&&!(this instanceof Di))return new He(t);this._writableState=new Pn(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)),ip.call(this)}He.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function X6(t,e){var r=new Error("write after end");t.emit("error",r),Zr.nextTick(e,r)}function Q6(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),Zr.nextTick(i,a),n=!1),n}He.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&Y6(t);return a&&!ba.isBuffer(t)&&(t=Z6(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=J6),i.ended?X6(this,r):(a||Q6(this,i,t,r))&&(i.pendingcb++,n=tx(this,i,a,t,e,r)),n};He.prototype.cork=function(){var t=this._writableState;t.corked++};He.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&op(this,t))};He.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 ex(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ba.from(e,r)),e}Object.defineProperty(He.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function tx(t,e,r,i,n,a){if(!r){var s=ex(e,i,n);i!==s&&(r=!0,n="buffer",i=s)}var y=e.objectMode?1:i.length;e.length+=y;var w=e.length<e.highWaterMark;if(w||(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 Ns(t,e,!1,y,i,n,a);return w}function Ns(t,e,r,i,n,a,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function rx(t,e,r,i,n){--e.pendingcb,r?(Zr.nextTick(n,i),Zr.nextTick(Dn,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Dn(t,e))}function ix(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function nx(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(ix(r),e)rx(t,r,i,e,n);else{var a=ap(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&op(t,r),i?$6(ep,t,r,a,n):ep(t,r,a,n)}}function ep(t,e,r,i){r||ox(t,e),e.pendingcb--,i(),Dn(t,e)}function ox(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function op(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 s=0,y=!0;r;)n[s]=r,r.isBuf||(y=!1),r=r.next,s+=1;n.allBuffers=y,Ns(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 tp(e),e.bufferedRequestCount=0}else{for(;r;){var w=r.chunk,S=r.encoding,A=r.callback,q=e.objectMode?1:w.length;if(Ns(t,e,!1,q,w,S,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}He.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};He.prototype._writev=null;He.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||sx(this,i,r)};function ap(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function ax(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Dn(t,e)})}function fx(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Zr.nextTick(ax,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Dn(t,e){var r=ap(e);return r&&(fx(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function sx(t,e,r){e.ending=!0,Dn(t,e),r&&(e.finished?Zr.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ux(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(He.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});He.prototype.destroy=np.destroy;He.prototype._undestroy=np.undestroy;He.prototype._destroy=function(t,e){this.end(),e(t)}});var Yr=B((qB,lp)=>{"use strict";b();var sp=Cn(),hx=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};lp.exports=zt;var up=Object.create(Oi());up.inherits=H();var hp=Hs(),Ks=Fs();up.inherits(zt,hp);for(js=hx(Ks.prototype),wa=0;wa<js.length;wa++)_a=js[wa],zt.prototype[_a]||(zt.prototype[_a]=Ks.prototype[_a]);var js,_a,wa;function zt(t){if(!(this instanceof zt))return new zt(t);hp.call(this,t),Ks.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",lx)}Object.defineProperty(zt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function lx(){this.allowHalfOpen||this._writableState.ended||sp.nextTick(cx,this)}function cx(t){t.end()}Object.defineProperty(zt.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)}});zt.prototype._destroy=function(t,e){this.push(null),this.end(),sp.nextTick(e,t)}});var Hs=B((IB,Mp)=>{"use strict";b();var Ui=Cn();Mp.exports=Pe;var dx=Vd(),Un;Pe.ReadableState=mp;var TB=gi().EventEmitter,vp=function(t,e){return t.listeners(e).length},zs=Ds(),Ln=pa().Buffer,px=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function vx(t){return Ln.from(t)}function yx(t){return Ln.isBuffer(t)||t instanceof px}var yp=Object.create(Oi());yp.inherits=H();var Ws=En(),Ie=void 0;Ws&&Ws.debuglog?Ie=Ws.debuglog("stream"):Ie=function(){};var gx=Xd(),gp=Ls(),Pi;yp.inherits(Pe,zs);var Gs=["error","close","destroy","pause","resume"];function mx(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):dx(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function mp(t,e){Un=Un||Yr(),t=t||{};var r=e instanceof Un;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 gx,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&&(Pi||(Pi=ki().StringDecoder),this.decoder=new Pi(t.encoding),this.encoding=t.encoding)}function Pe(t){if(Un=Un||Yr(),!(this instanceof Pe))return new Pe(t);this._readableState=new mp(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),zs.call(this)}Object.defineProperty(Pe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Pe.prototype.destroy=gp.destroy;Pe.prototype._undestroy=gp.undestroy;Pe.prototype._destroy=function(t,e){this.push(null),e(t)};Pe.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=Ln.from(t,e),e=""),i=!0),bp(this,t,e,!1,i)};Pe.prototype.unshift=function(t){return bp(this,t,null,!0,!1)};function bp(t,e,r,i,n){var a=t._readableState;if(e===null)a.reading=!1,xx(t,a);else{var s;n||(s=bx(a,e)),s?t.emit("error",s):a.objectMode||e&&e.length>0?(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==Ln.prototype&&(e=vx(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):$s(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?$s(t,a,e,!1):wp(t,a)):$s(t,a,e,!1))):i||(a.reading=!1)}return wx(a)}function $s(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&&xa(t)),wp(t,e)}function bx(t,e){var r;return!yx(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function wx(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}Pe.prototype.isPaused=function(){return this._readableState.flowing===!1};Pe.prototype.setEncoding=function(t){return Pi||(Pi=ki().StringDecoder),this._readableState.decoder=new Pi(t),this._readableState.encoding=t,this};var cp=8388608;function _x(t){return t>=cp?t=cp:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function dp(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=_x(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Pe.prototype.read=function(t){Ie("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 Ie("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Vs(this):xa(this),null;if(t=dp(t,e),t===0&&e.ended)return e.length===0&&Vs(this),null;var i=e.needReadable;Ie("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ie("length less than watermark",i)),e.ended||e.reading?(i=!1,Ie("reading or ended",i)):i&&(Ie("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=dp(r,e)));var n;return t>0?n=_p(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&&Vs(this)),n!==null&&this.emit("data",n),n};function xx(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,xa(t)}}function xa(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ie("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Ui.nextTick(pp,t):pp(t))}function pp(t){Ie("emit readable"),t.emit("readable"),Zs(t)}function wp(t,e){e.readingMore||(e.readingMore=!0,Ui.nextTick(Mx,t,e))}function Mx(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ie("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}Pe.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};Pe.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,Ie("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==M.default.stdout&&t!==M.default.stderr,a=n?y:ke;i.endEmitted?Ui.nextTick(a):r.once("end",a),t.on("unpipe",s);function s(j,Se){Ie("onunpipe"),j===r&&Se&&Se.hasUnpiped===!1&&(Se.hasUnpiped=!0,A())}function y(){Ie("onend"),t.end()}var w=Ex(r);t.on("drain",w);var S=!1;function A(){Ie("cleanup"),t.removeListener("close",P),t.removeListener("finish",W),t.removeListener("drain",w),t.removeListener("error",O),t.removeListener("unpipe",s),r.removeListener("end",y),r.removeListener("end",ke),r.removeListener("data",T),S=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&w()}var q=!1;r.on("data",T);function T(j){Ie("ondata"),q=!1;var Se=t.write(j);Se===!1&&!q&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&xp(i.pipes,t)!==-1)&&!S&&(Ie("false write response, pause",i.awaitDrain),i.awaitDrain++,q=!0),r.pause())}function O(j){Ie("onerror",j),ke(),t.removeListener("error",O),vp(t,"error")===0&&t.emit("error",j)}mx(t,"error",O);function P(){t.removeListener("finish",W),ke()}t.once("close",P);function W(){Ie("onfinish"),t.removeListener("close",P),ke()}t.once("finish",W);function ke(){Ie("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ie("pipe resume"),r.resume()),t};function Ex(t){return function(){var e=t._readableState;Ie("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&vp(t,"data")&&(e.flowing=!0,Zs(t))}}Pe.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 s=xp(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Pe.prototype.on=function(t,e){var r=zs.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&&xa(this):Ui.nextTick(Sx,this))}return r};Pe.prototype.addListener=Pe.prototype.on;function Sx(t){Ie("readable nexttick read 0"),t.read(0)}Pe.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ie("resume"),t.flowing=!0,Bx(this,t)),this};function Bx(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Ui.nextTick(Ax,t,e))}function Ax(t,e){e.reading||(Ie("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Zs(t),e.flowing&&!e.reading&&t.read(0)}Pe.prototype.pause=function(){return Ie("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ie("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Zs(t){var e=t._readableState;for(Ie("flow",e.flowing);e.flowing&&t.read()!==null;);}Pe.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ie("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(Ie("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var y=e.push(s);y||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(s){return function(){return t[s].apply(t,arguments)}})(n));for(var a=0;a<Gs.length;a++)t.on(Gs[a],this.emit.bind(this,Gs[a]));return this._read=function(s){Ie("wrapped _read",s),i&&(i=!1,t.resume())},this};Object.defineProperty(Pe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Pe._fromList=_p;function _p(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=Rx(t,e.buffer,e.decoder),r}function Rx(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?qx(t,e):kx(t,e),i}function qx(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,s=t>a.length?a.length:t;if(s===a.length?n+=a:n+=a.slice(0,t),t-=s,t===0){s===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(s));break}++i}return e.length-=i,n}function kx(t,e){var r=Ln.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,s=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,s),t-=s,t===0){s===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(s));break}++n}return e.length-=n,r}function Vs(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Ui.nextTick(Tx,e,t))}function Tx(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function xp(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Ys=B((OB,Bp)=>{"use strict";b();Bp.exports=Zt;var Ma=Yr(),Sp=Object.create(Oi());Sp.inherits=H();Sp.inherits(Zt,Ma);function Ix(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 Zt(t){if(!(this instanceof Zt))return new Zt(t);Ma.call(this,t),this._transformState={afterTransform:Ix.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",Cx)}function Cx(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Ep(t,e,r)}):Ep(this,null,null)}Zt.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ma.prototype.push.call(this,t,e)};Zt.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};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.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Zt.prototype._destroy=function(t,e){var r=this;Ma.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function Ep(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 kp=B((PB,qp)=>{"use strict";b();qp.exports=Nn;var Ap=Ys(),Rp=Object.create(Oi());Rp.inherits=H();Rp.inherits(Nn,Ap);function Nn(t){if(!(this instanceof Nn))return new Nn(t);Ap.call(this,t)}Nn.prototype._transform=function(t,e,r){r(null,t)}});var Ip=B((Lt,Tp)=>{b();Lt=Tp.exports=Hs();Lt.Stream=Lt;Lt.Readable=Lt;Lt.Writable=Fs();Lt.Duplex=Yr();Lt.Transform=Ys();Lt.PassThrough=kp()});var Dp=B((NB,Op)=>{"use strict";b();var Ox=Me().Buffer,Dx=Gd(),Cp=Ip().Transform,Px=H();function cr(t){Cp.call(this),this._block=Ox.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Px(cr,Cp);cr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};cr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};cr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=Dx(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 s=0,y=r.length*8;y>0;++s)this._length[s]+=y,y=this._length[s]/4294967296|0,y>0&&(this._length[s]-=4294967296*y);return this};cr.prototype._update=function(){throw new Error("_update is not implemented")};cr.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};cr.prototype._digest=function(){throw new Error("_digest is not implemented")};Op.exports=cr});var Sa=B((jB,Kp)=>{"use strict";b();var Js=rt().Buffer,Ux=H(),jp=Dp(),Lx=new Array(16),Fn=[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],jn=[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],Kn=[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],Hn=[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],Wn=[0,1518500249,1859775393,2400959708,2840853838],Gn=[1352829926,1548603684,1836072691,2053994217,0];function Jr(t,e){return t<<e|t>>>32-e}function Pp(t,e,r,i,n,a,s,y){return Jr(t+(e^r^i)+a+s|0,y)+n|0}function Up(t,e,r,i,n,a,s,y){return Jr(t+(e&r|~e&i)+a+s|0,y)+n|0}function Lp(t,e,r,i,n,a,s,y){return Jr(t+((e|~r)^i)+a+s|0,y)+n|0}function Np(t,e,r,i,n,a,s,y){return Jr(t+(e&i|r&~i)+a+s|0,y)+n|0}function Fp(t,e,r,i,n,a,s,y){return Jr(t+(e^(r|~i))+a+s|0,y)+n|0}function Ea(){jp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}Ux(Ea,jp);Ea.prototype._update=function(){for(var t=Lx,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,s=this._e|0,y=this._a|0,w=this._b|0,S=this._c|0,A=this._d|0,q=this._e|0,T=0;T<80;T+=1){var O,P;T<16?(O=Pp(r,i,n,a,s,t[Fn[T]],Wn[0],Kn[T]),P=Fp(y,w,S,A,q,t[jn[T]],Gn[0],Hn[T])):T<32?(O=Up(r,i,n,a,s,t[Fn[T]],Wn[1],Kn[T]),P=Np(y,w,S,A,q,t[jn[T]],Gn[1],Hn[T])):T<48?(O=Lp(r,i,n,a,s,t[Fn[T]],Wn[2],Kn[T]),P=Lp(y,w,S,A,q,t[jn[T]],Gn[2],Hn[T])):T<64?(O=Np(r,i,n,a,s,t[Fn[T]],Wn[3],Kn[T]),P=Up(y,w,S,A,q,t[jn[T]],Gn[3],Hn[T])):(O=Fp(r,i,n,a,s,t[Fn[T]],Wn[4],Kn[T]),P=Pp(y,w,S,A,q,t[jn[T]],Gn[4],Hn[T])),r=s,s=a,a=Jr(n,10),n=i,i=O,y=q,q=A,A=Jr(S,10),S=w,w=P}var W=this._b+n+A|0;this._b=this._c+a+q|0,this._c=this._d+s+y|0,this._d=this._e+r+w|0,this._e=this._a+i+S|0,this._a=W};Ea.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=Js.alloc?Js.alloc(20):new Js(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};Kp.exports=Ea});var Xr=B((HB,Hp)=>{"use strict";b();var Nx=Me().Buffer,Fx=In();function Ba(t,e){this._block=Nx.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Ba.prototype.update=function(t,e){t=Fx(t,e||"utf8");for(var r=this._block,i=this._blockSize,n=t.length,a=this._len,s=0;s<n;){for(var y=a%i,w=Math.min(n-s,i-y),S=0;S<w;S++)r[y+S]=t[s+S];a+=w,s+=w,a%i===0&&this._update(r)}return this._len+=n,this};Ba.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};Ba.prototype._update=function(){throw new Error("_update must be implemented by subclass")};Hp.exports=Ba});var $p=B((GB,Gp)=>{"use strict";b();var jx=H(),Wp=Xr(),Kx=Me().Buffer,Hx=[1518500249,1859775393,-1894007588,-899497514],Wx=new Array(80);function $n(){this.init(),this._w=Wx,Wp.call(this,64,56)}jx($n,Wp);$n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Gx(t){return t<<5|t>>>27}function $x(t){return t<<30|t>>>2}function Vx(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}$n.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,s=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 w=0;w<80;++w){var S=~~(w/20),A=Gx(r)+Vx(S,i,n,a)+s+e[w]+Hx[S]|0;s=a,a=n,n=$x(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=s+this._e|0};$n.prototype._hash=function(){var t=Kx.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};Gp.exports=$n});var Zp=B((VB,zp)=>{"use strict";b();var zx=H(),Vp=Xr(),Zx=Me().Buffer,Yx=[1518500249,1859775393,-1894007588,-899497514],Jx=new Array(80);function Vn(){this.init(),this._w=Jx,Vp.call(this,64,56)}zx(Vn,Vp);Vn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Xx(t){return t<<1|t>>>31}function Qx(t){return t<<5|t>>>27}function e3(t){return t<<30|t>>>2}function t3(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Vn.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,s=this._e|0,y=0;y<16;++y)e[y]=t.readInt32BE(y*4);for(;y<80;++y)e[y]=Xx(e[y-3]^e[y-8]^e[y-14]^e[y-16]);for(var w=0;w<80;++w){var S=~~(w/20),A=Qx(r)+t3(S,i,n,a)+s+e[w]+Yx[S]|0;s=a,a=n,n=e3(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=s+this._e|0};Vn.prototype._hash=function(){var t=Zx.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};zp.exports=Vn});var Xs=B((ZB,Jp)=>{"use strict";b();var r3=H(),Yp=Xr(),i3=Me().Buffer,n3=[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],o3=new Array(64);function zn(){this.init(),this._w=o3,Yp.call(this,64,56)}r3(zn,Yp);zn.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 a3(t,e,r){return r^t&(e^r)}function f3(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 u3(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function h3(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function l3(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}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,s=this._e|0,y=this._f|0,w=this._g|0,S=this._h|0,A=0;A<16;++A)e[A]=t.readInt32BE(A*4);for(;A<64;++A)e[A]=l3(e[A-2])+e[A-7]+h3(e[A-15])+e[A-16]|0;for(var q=0;q<64;++q){var T=S+u3(s)+a3(s,y,w)+n3[q]+e[q]|0,O=s3(r)+f3(r,i,n)|0;S=w,w=y,y=s,s=a+T|0,a=n,n=i,i=r,r=T+O|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=s+this._e|0,this._f=y+this._f|0,this._g=w+this._g|0,this._h=S+this._h|0};zn.prototype._hash=function(){var t=i3.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};Jp.exports=zn});var Qp=B((JB,Xp)=>{"use strict";b();var c3=H(),d3=Xs(),p3=Xr(),v3=Me().Buffer,y3=new Array(64);function Aa(){this.init(),this._w=y3,p3.call(this,64,56)}c3(Aa,d3);Aa.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};Aa.prototype._hash=function(){var t=v3.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};Xp.exports=Aa});var Qs=B((QB,av)=>{"use strict";b();var g3=H(),ov=Xr(),m3=Me().Buffer,ev=[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],b3=new Array(160);function Zn(){this.init(),this._w=b3,ov.call(this,128,112)}g3(Zn,ov);Zn.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 tv(t,e,r){return r^t&(e^r)}function rv(t,e,r){return t&e|r&(t|e)}function iv(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function nv(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function w3(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function _3(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function x3(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function M3(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Ze(t,e){return t>>>0<e>>>0?1:0}Zn.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,s=this._eh|0,y=this._fh|0,w=this._gh|0,S=this._hh|0,A=this._al|0,q=this._bl|0,T=this._cl|0,O=this._dl|0,P=this._el|0,W=this._fl|0,ke=this._gl|0,j=this._hl|0,Se=0;Se<32;Se+=2)e[Se]=t.readInt32BE(Se*4),e[Se+1]=t.readInt32BE(Se*4+4);for(;Se<160;Se+=2){var Fe=e[Se-30],je=e[Se-30+1],nr=w3(Fe,je),$e=_3(je,Fe);Fe=e[Se-4],je=e[Se-4+1];var kt=x3(Fe,je),De=M3(je,Fe),st=e[Se-14],E=e[Se-14+1],h=e[Se-32],g=e[Se-32+1],c=$e+E|0,o=nr+st+Ze(c,$e)|0;c=c+De|0,o=o+kt+Ze(c,De)|0,c=c+g|0,o=o+h+Ze(c,g)|0,e[Se]=o,e[Se+1]=c}for(var u=0;u<160;u+=2){o=e[u],c=e[u+1];var d=rv(r,i,n),v=rv(A,q,T),p=iv(r,A),f=iv(A,r),m=nv(s,P),_=nv(P,s),l=ev[u],x=ev[u+1],I=tv(s,y,w),D=tv(P,W,ke),C=j+_|0,L=S+m+Ze(C,j)|0;C=C+D|0,L=L+I+Ze(C,D)|0,C=C+x|0,L=L+l+Ze(C,x)|0,C=C+c|0,L=L+o+Ze(C,c)|0;var U=f+v|0,N=p+d+Ze(U,f)|0;S=w,j=ke,w=y,ke=W,y=s,W=P,P=O+C|0,s=a+L+Ze(P,O)|0,a=n,O=T,n=i,T=q,i=r,q=A,A=C+U|0,r=L+N+Ze(A,C)|0}this._al=this._al+A|0,this._bl=this._bl+q|0,this._cl=this._cl+T|0,this._dl=this._dl+O|0,this._el=this._el+P|0,this._fl=this._fl+W|0,this._gl=this._gl+ke|0,this._hl=this._hl+j|0,this._ah=this._ah+r+Ze(this._al,A)|0,this._bh=this._bh+i+Ze(this._bl,q)|0,this._ch=this._ch+n+Ze(this._cl,T)|0,this._dh=this._dh+a+Ze(this._dl,O)|0,this._eh=this._eh+s+Ze(this._el,P)|0,this._fh=this._fh+y+Ze(this._fl,W)|0,this._gh=this._gh+w+Ze(this._gl,ke)|0,this._hh=this._hh+S+Ze(this._hl,j)|0};Zn.prototype._hash=function(){var t=m3.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};av.exports=Zn});var sv=B((tA,fv)=>{"use strict";b();var E3=H(),S3=Qs(),B3=Xr(),A3=Me().Buffer,R3=new Array(160);function Ra(){this.init(),this._w=R3,B3.call(this,128,112)}E3(Ra,S3);Ra.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};Ra.prototype._hash=function(){var t=A3.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};fv.exports=Ra});var qa=B((iA,Yt)=>{"use strict";b();Yt.exports=function(e){var r=e.toLowerCase(),i=Yt.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};Yt.exports.sha=$p();Yt.exports.sha1=Zp();Yt.exports.sha224=Qp();Yt.exports.sha256=Xs();Yt.exports.sha384=sv();Yt.exports.sha512=Qs()});var Jt=B((oA,hv)=>{"use strict";b();var q3=Me().Buffer,uv=Cs().Transform,k3=ki().StringDecoder,T3=H(),I3=In();function xt(t){uv.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}T3(xt,uv);xt.prototype.update=function(t,e,r){var i=I3(t,e),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};xt.prototype.setAutoPadding=function(){};xt.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};xt.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};xt.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};xt.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)}};xt.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};xt.prototype._finalOrDigest=function(t){var e=this.__final()||q3.alloc(0);return t&&(e=this._toString(e,t,!0)),e};xt.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new k3(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};hv.exports=xt});var Yn=B((fA,cv)=>{"use strict";b();var C3=H(),O3=ca(),D3=Sa(),P3=qa(),lv=Jt();function ka(t){lv.call(this,"digest"),this._hash=t}C3(ka,lv);ka.prototype._update=function(t){this._hash.update(t)};ka.prototype._final=function(){return this._hash.digest()};cv.exports=function(e){return e=e.toLowerCase(),e==="md5"?new O3:e==="rmd160"||e==="ripemd160"?new D3:new ka(P3(e))}});var vv=B((uA,pv)=>{"use strict";b();var U3=H(),Qr=Me().Buffer,dv=Jt(),L3=Qr.alloc(128),Li=64;function Ta(t,e){dv.call(this,"digest"),typeof e=="string"&&(e=Qr.from(e)),this._alg=t,this._key=e,e.length>Li?e=t(e):e.length<Li&&(e=Qr.concat([e,L3],Li));for(var r=this._ipad=Qr.allocUnsafe(Li),i=this._opad=Qr.allocUnsafe(Li),n=0;n<Li;n++)r[n]=e[n]^54,i[n]=e[n]^92;this._hash=[r]}U3(Ta,dv);Ta.prototype._update=function(t){this._hash.push(t)};Ta.prototype._final=function(){var t=this._alg(Qr.concat(this._hash));return this._alg(Qr.concat([this._opad,t]))};pv.exports=Ta});var eu=B((lA,yv)=>{b();var N3=ca();yv.exports=function(t){return new N3().update(t).digest()}});var bv=B((dA,mv)=>{"use strict";b();var F3=H(),j3=vv(),gv=Jt(),Jn=Me().Buffer,K3=eu(),tu=Sa(),ru=qa(),H3=Jn.alloc(128);function Xn(t,e){gv.call(this,"digest"),typeof e=="string"&&(e=Jn.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 tu:ru(t);e=i.update(e).digest()}else e.length<r&&(e=Jn.concat([e,H3],r));for(var n=this._ipad=Jn.allocUnsafe(r),a=this._opad=Jn.allocUnsafe(r),s=0;s<r;s++)n[s]=e[s]^54,a[s]=e[s]^92;this._hash=t==="rmd160"?new tu:ru(t),this._hash.update(n)}F3(Xn,gv);Xn.prototype._update=function(t){this._hash.update(t)};Xn.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new tu:ru(this._alg);return e.update(this._opad).update(t).digest()};mv.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new Xn("rmd160",r):e==="md5"?new j3(K3,r):new Xn(e,r)}});var Ia=B((vA,wv)=>{"use strict";b();wv.exports={}});var iu=B((gA,_v)=>{"use strict";b();var W3=isFinite,G3=Math.pow(2,30)-1;_v.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0||!W3(t))throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>G3||e!==e)throw new TypeError("Bad key length")}});var nu=B((bA,Mv)=>{"use strict";b();var Ca;globalThis.process&&globalThis.process.browser?Ca="utf-8":globalThis.process&&globalThis.process.version?(xv=parseInt(M.default.version.split(".")[0].slice(1),10),Ca=xv>=6?"utf-8":"binary"):Ca="utf-8";var xv;Mv.exports=Ca});var ou=B((_A,Bv)=>{"use strict";b();var $3=Me().Buffer,V3=In(),Sv=typeof Uint8Array<"u",z3=Sv&&typeof ArrayBuffer<"u",Ev=z3&&ArrayBuffer.isView;Bv.exports=function(t,e,r){if(typeof t=="string"||$3.isBuffer(t)||Sv&&t instanceof Uint8Array||Ev&&Ev(t))return V3(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var au=B((MA,kv)=>{"use strict";b();var Z3=eu(),Y3=Sa(),J3=qa(),ei=Me().Buffer,X3=iu(),Av=nu(),Rv=ou(),Q3=ei.alloc(128),Oa={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},e8={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function t8(t){return new Y3().update(t).digest()}function r8(t){function e(r){return J3(t).update(r).digest()}return t==="rmd160"||t==="ripemd160"?t8:t==="md5"?Z3:e}function qv(t,e,r){var i=r8(t),n=t==="sha512"||t==="sha384"?128:64;e.length>n?e=i(e):e.length<n&&(e=ei.concat([e,Q3],n));for(var a=ei.allocUnsafe(n+Oa[t]),s=ei.allocUnsafe(n+Oa[t]),y=0;y<n;y++)a[y]=e[y]^54,s[y]=e[y]^92;var w=ei.allocUnsafe(n+r+4);a.copy(w,0,0,n),this.ipad1=w,this.ipad2=a,this.opad=s,this.alg=t,this.blocksize=n,this.hash=i,this.size=Oa[t]}qv.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 i8(t,e,r,i,n){X3(r,i),t=Rv(t,Av,"Password"),e=Rv(e,Av,"Salt");var a=(n||"sha1").toLowerCase(),s=e8[a]||a,y=Oa[s];if(typeof y!="number"||!y)throw new TypeError("Digest algorithm not supported: "+n);var w=new qv(s,t,e.length),S=ei.allocUnsafe(i),A=ei.allocUnsafe(e.length+4);e.copy(A,0,0,e.length);for(var q=0,T=y,O=Math.ceil(i/T),P=1;P<=O;P++){A.writeUInt32BE(P,e.length);for(var W=w.run(A,w.ipad1),ke=W,j=1;j<r;j++){ke=w.run(ke,w.ipad2);for(var Se=0;Se<T;Se++)W[Se]^=ke[Se]}W.copy(S,q),q+=T}return S}kv.exports=i8});var Uv=B((SA,Pv)=>{"use strict";b();var Ov=Me().Buffer,n8=iu(),Tv=nu(),Iv=au(),Cv=ou(),Da,Qn=globalThis.crypto&&globalThis.crypto.subtle,o8={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"},fu=[],ti;function su(){return ti||(globalThis.process&&globalThis.process.nextTick?ti=globalThis.process.nextTick:globalThis.queueMicrotask?ti=globalThis.queueMicrotask:globalThis.setImmediate?ti=globalThis.setImmediate:ti=globalThis.setTimeout,ti)}function Dv(t,e,r,i,n){return Qn.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(a){return Qn.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},a,i<<3)}).then(function(a){return Ov.from(a)})}function a8(t){if(globalThis.process&&!globalThis.process.browser||!Qn||!Qn.importKey||!Qn.deriveBits)return Promise.resolve(!1);if(fu[t]!==void 0)return fu[t];Da=Da||Ov.alloc(8);var e=Dv(Da,Da,10,128,t).then(function(){return!0},function(){return!1});return fu[t]=e,e}function f8(t,e){t.then(function(r){su()(function(){e(null,r)})},function(r){su()(function(){e(r)})})}Pv.exports=function(t,e,r,i,n,a){if(typeof n=="function"&&(a=n,n=void 0),n8(r,i),t=Cv(t,Tv,"Password"),e=Cv(e,Tv,"Salt"),typeof a!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var s=o8[n.toLowerCase()];if(!s||typeof globalThis.Promise!="function"){su()(function(){var y;try{y=Iv(t,e,r,i,n)}catch(w){a(w);return}a(null,y)});return}f8(a8(s).then(function(y){return y?Dv(t,e,r,i,s):Iv(t,e,r,i,n)}),a)}});var hu=B(uu=>{"use strict";b();uu.pbkdf2=Uv();uu.pbkdf2Sync=au()});var lu=B(dt=>{"use strict";b();dt.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};dt.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};dt.ip=function(e,r,i,n){for(var a=0,s=0,y=6;y>=0;y-=2){for(var w=0;w<=24;w+=8)a<<=1,a|=r>>>w+y&1;for(var w=0;w<=24;w+=8)a<<=1,a|=e>>>w+y&1}for(var y=6;y>=0;y-=2){for(var w=1;w<=25;w+=8)s<<=1,s|=r>>>w+y&1;for(var w=1;w<=25;w+=8)s<<=1,s|=e>>>w+y&1}i[n+0]=a>>>0,i[n+1]=s>>>0};dt.rip=function(e,r,i,n){for(var a=0,s=0,y=0;y<4;y++)for(var w=24;w>=0;w-=8)a<<=1,a|=r>>>w+y&1,a<<=1,a|=e>>>w+y&1;for(var y=4;y<8;y++)for(var w=24;w>=0;w-=8)s<<=1,s|=r>>>w+y&1,s<<=1,s|=e>>>w+y&1;i[n+0]=a>>>0,i[n+1]=s>>>0};dt.pc1=function(e,r,i,n){for(var a=0,s=0,y=7;y>=5;y--){for(var w=0;w<=24;w+=8)a<<=1,a|=r>>w+y&1;for(var w=0;w<=24;w+=8)a<<=1,a|=e>>w+y&1}for(var w=0;w<=24;w+=8)a<<=1,a|=r>>w+y&1;for(var y=1;y<=3;y++){for(var w=0;w<=24;w+=8)s<<=1,s|=r>>w+y&1;for(var w=0;w<=24;w+=8)s<<=1,s|=e>>w+y&1}for(var w=0;w<=24;w+=8)s<<=1,s|=e>>w+y&1;i[n+0]=a>>>0,i[n+1]=s>>>0};dt.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var Pa=[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];dt.pc2=function(e,r,i,n){for(var a=0,s=0,y=Pa.length>>>1,w=0;w<y;w++)a<<=1,a|=e>>>Pa[w]&1;for(var w=y;w<Pa.length;w++)s<<=1,s|=r>>>Pa[w]&1;i[n+0]=a>>>0,i[n+1]=s>>>0};dt.expand=function(e,r,i){var n=0,a=0;n=(e&1)<<5|e>>>27;for(var s=23;s>=15;s-=4)n<<=6,n|=e>>>s&63;for(var s=11;s>=3;s-=4)a|=e>>>s&63,a<<=6;a|=(e&31)<<1|e>>>31,r[i+0]=n>>>0,r[i+1]=a>>>0};var Lv=[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];dt.substitute=function(e,r){for(var i=0,n=0;n<4;n++){var a=e>>>18-n*6&63,s=Lv[n*64+a];i<<=4,i|=s}for(var n=0;n<4;n++){var a=r>>>18-n*6&63,s=Lv[256+n*64+a];i<<=4,i|=s}return i>>>0};var Nv=[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];dt.permute=function(e){for(var r=0,i=0;i<Nv.length;i++)r<<=1,r|=e>>>Nv[i]&1;return r>>>0};dt.padSplit=function(e,r,i){for(var n=e.toString(2);n.length<r;)n="0"+n;for(var a=[],s=0;s<r;s+=i)a.push(n.slice(s,s+i));return a.join(" ")}});var Ni=B((TA,jv)=>{b();jv.exports=Fv;function Fv(t,e){if(!t)throw new Error(e||"Assertion failed")}Fv.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)}});var Ua=B((CA,Kv)=>{"use strict";b();var s8=Ni();function pt(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}Kv.exports=pt;pt.prototype._init=function(){};pt.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};pt.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};pt.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};pt.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 s=e.length-(e.length-r)%this.blockSize;r<s;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};pt.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};pt.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};pt.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};pt.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};pt.prototype._unpad=function(e){return e};pt.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 cu=B((DA,Gv)=>{"use strict";b();var Hv=Ni(),u8=H(),Ge=lu(),Wv=Ua();function h8(){this.tmp=new Array(2),this.keys=null}function Nt(t){Wv.call(this,t);var e=new h8;this._desState=e,this.deriveKeys(e,t.key)}u8(Nt,Wv);Gv.exports=Nt;Nt.create=function(e){return new Nt(e)};var l8=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Nt.prototype.deriveKeys=function(e,r){e.keys=new Array(32),Hv.equal(r.length,this.blockSize,"Invalid key length");var i=Ge.readUInt32BE(r,0),n=Ge.readUInt32BE(r,4);Ge.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 s=l8[a>>>1];i=Ge.r28shl(i,s),n=Ge.r28shl(n,s),Ge.pc2(i,n,e.keys,a)}};Nt.prototype._update=function(e,r,i,n){var a=this._desState,s=Ge.readUInt32BE(e,r),y=Ge.readUInt32BE(e,r+4);Ge.ip(s,y,a.tmp,0),s=a.tmp[0],y=a.tmp[1],this.type==="encrypt"?this._encrypt(a,s,y,a.tmp,0):this._decrypt(a,s,y,a.tmp,0),s=a.tmp[0],y=a.tmp[1],Ge.writeUInt32BE(i,s,n),Ge.writeUInt32BE(i,y,n+4)};Nt.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};Nt.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++)Hv.equal(e[i],r);return e.slice(0,e.length-r)};Nt.prototype._encrypt=function(e,r,i,n,a){for(var s=r,y=i,w=0;w<e.keys.length;w+=2){var S=e.keys[w],A=e.keys[w+1];Ge.expand(y,e.tmp,0),S^=e.tmp[0],A^=e.tmp[1];var q=Ge.substitute(S,A),T=Ge.permute(q),O=y;y=(s^T)>>>0,s=O}Ge.rip(y,s,n,a)};Nt.prototype._decrypt=function(e,r,i,n,a){for(var s=i,y=r,w=e.keys.length-2;w>=0;w-=2){var S=e.keys[w],A=e.keys[w+1];Ge.expand(s,e.tmp,0),S^=e.tmp[0],A^=e.tmp[1];var q=Ge.substitute(S,A),T=Ge.permute(q),O=s;s=(y^T)>>>0,y=O}Ge.rip(s,y,n,a)}});var Vv=B($v=>{"use strict";b();var c8=Ni(),d8=H(),La={};function p8(t){c8.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 v8(t){function e(a){t.call(this,a),this._cbcInit()}d8(e,t);for(var r=Object.keys(La),i=0;i<r.length;i++){var n=r[i];e.prototype[n]=La[n]}return e.create=function(s){return new e(s)},e}$v.instantiate=v8;La._cbcInit=function(){var e=new p8(this.options.iv);this._cbcState=e};La._update=function(e,r,i,n){var a=this._cbcState,s=this.constructor.super_.prototype,y=a.iv;if(this.type==="encrypt"){for(var w=0;w<this.blockSize;w++)y[w]^=e[r+w];s._update.call(this,y,0,i,n);for(var w=0;w<this.blockSize;w++)y[w]=i[n+w]}else{s._update.call(this,e,r,i,n);for(var w=0;w<this.blockSize;w++)i[n+w]^=y[w];for(var w=0;w<this.blockSize;w++)y[w]=e[r+w]}}});var Yv=B((NA,Zv)=>{"use strict";b();var y8=Ni(),g8=H(),zv=Ua(),dr=cu();function m8(t,e){y8.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=[dr.create({type:"encrypt",key:r}),dr.create({type:"decrypt",key:i}),dr.create({type:"encrypt",key:n})]:this.ciphers=[dr.create({type:"decrypt",key:n}),dr.create({type:"encrypt",key:i}),dr.create({type:"decrypt",key:r})]}function ri(t){zv.call(this,t);var e=new m8(this.type,this.options.key);this._edeState=e}g8(ri,zv);Zv.exports=ri;ri.create=function(e){return new ri(e)};ri.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)};ri.prototype._pad=dr.prototype._pad;ri.prototype._unpad=dr.prototype._unpad});var Jv=B(Fi=>{"use strict";b();Fi.utils=lu();Fi.Cipher=Ua();Fi.DES=cu();Fi.CBC=Vv();Fi.EDE=Yv()});var ey=B((HA,Qv)=>{b();var Xv=Jt(),Xt=Jv(),b8=H(),ii=Me().Buffer,eo={"des-ede3-cbc":Xt.CBC.instantiate(Xt.EDE),"des-ede3":Xt.EDE,"des-ede-cbc":Xt.CBC.instantiate(Xt.EDE),"des-ede":Xt.EDE,"des-cbc":Xt.CBC.instantiate(Xt.DES),"des-ecb":Xt.DES};eo.des=eo["des-cbc"];eo.des3=eo["des-ede3-cbc"];Qv.exports=Na;b8(Na,Xv);function Na(t){Xv.call(this);var e=t.mode.toLowerCase(),r=eo[e],i;t.decrypt?i="decrypt":i="encrypt";var n=t.key;ii.isBuffer(n)||(n=ii.from(n)),(e==="des-ede"||e==="des-ede-cbc")&&(n=ii.concat([n,n.slice(0,8)]));var a=t.iv;ii.isBuffer(a)||(a=ii.from(a)),this._des=r.create({key:n,iv:a,type:i})}Na.prototype._update=function(t){return ii.from(this._des.update(t))};Na.prototype._final=function(){return ii.from(this._des.final())}});var ty=B(du=>{b();du.encrypt=function(t,e){return t._cipher.encryptBlock(e)};du.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var ji=B((VA,ry)=>{b();ry.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 ny=B(pu=>{b();var iy=ji();pu.encrypt=function(t,e){var r=iy(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};pu.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return iy(i,r)}});var fy=B(ay=>{b();var to=Me().Buffer,w8=ji();function oy(t,e,r){var i=e.length,n=w8(e,t._cache);return t._cache=t._cache.slice(i),t._prev=to.concat([t._prev,r?e:n]),n}ay.encrypt=function(t,e,r){for(var i=to.allocUnsafe(0),n;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=to.allocUnsafe(0)),t._cache.length<=e.length)n=t._cache.length,i=to.concat([i,oy(t,e.slice(0,n),r)]),e=e.slice(n);else{i=to.concat([i,oy(t,e,r)]);break}return i}});var uy=B(sy=>{b();var vu=Me().Buffer;function _8(t,e,r){var i=t._cipher.encryptBlock(t._prev),n=i[0]^e;return t._prev=vu.concat([t._prev.slice(1),vu.from([r?e:n])]),n}sy.encrypt=function(t,e,r){for(var i=e.length,n=vu.allocUnsafe(i),a=-1;++a<i;)n[a]=_8(t,e[a],r);return n}});var ly=B(hy=>{b();var Fa=Me().Buffer;function x8(t,e,r){for(var i,n=-1,a=8,s=0,y,w;++n<a;)i=t._cipher.encryptBlock(t._prev),y=e&1<<7-n?128:0,w=i[0]^y,s+=(w&128)>>n%8,t._prev=M8(t._prev,r?y:w);return s}function M8(t,e){var r=t.length,i=-1,n=Fa.allocUnsafe(t.length);for(t=Fa.concat([t,Fa.from([e])]);++i<r;)n[i]=t[i]<<1|t[i+1]>>7;return n}hy.encrypt=function(t,e,r){for(var i=e.length,n=Fa.allocUnsafe(i),a=-1;++a<i;)n[a]=x8(t,e[a],r);return n}});var dy=B(cy=>{b();var E8=ji();function S8(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}cy.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=R.Buffer.concat([t._cache,S8(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),E8(e,r)}});var yu=B((o7,py)=>{b();function B8(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}}py.exports=B8});var mu=B(yy=>{b();var A8=ji(),vy=Me().Buffer,R8=yu();function q8(t){var e=t._cipher.encryptBlockRaw(t._prev);return R8(t._prev),e}var gu=16;yy.encrypt=function(t,e){var r=Math.ceil(e.length/gu),i=t._cache.length;t._cache=vy.concat([t._cache,vy.allocUnsafe(r*gu)]);for(var n=0;n<r;n++){var a=q8(t),s=i+n*gu;t._cache.writeUInt32BE(a[0],s+0),t._cache.writeUInt32BE(a[1],s+4),t._cache.writeUInt32BE(a[2],s+8),t._cache.writeUInt32BE(a[3],s+12)}var y=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),A8(e,y)}});var bu=B((u7,k8)=>{k8.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 Ka=B((h7,gy)=>{b();var T8={ECB:ty(),CBC:ny(),CFB:fy(),CFB8:uy(),CFB1:ly(),OFB:dy(),CTR:mu(),GCM:mu()},ja=bu();for(wu in ja)ja[wu].module=T8[ja[wu].mode];var wu;gy.exports=ja});var ro=B((c7,by)=>{b();var Ha=Me().Buffer;function xu(t){Ha.isBuffer(t)||(t=Ha.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 _u(t){for(var e=0;e<t.length;t++)t[e]=0}function my(t,e,r,i,n){for(var a=r[0],s=r[1],y=r[2],w=r[3],S=t[0]^e[0],A=t[1]^e[1],q=t[2]^e[2],T=t[3]^e[3],O,P,W,ke,j=4,Se=1;Se<n;Se++)O=a[S>>>24]^s[A>>>16&255]^y[q>>>8&255]^w[T&255]^e[j++],P=a[A>>>24]^s[q>>>16&255]^y[T>>>8&255]^w[S&255]^e[j++],W=a[q>>>24]^s[T>>>16&255]^y[S>>>8&255]^w[A&255]^e[j++],ke=a[T>>>24]^s[S>>>16&255]^y[A>>>8&255]^w[q&255]^e[j++],S=O,A=P,q=W,T=ke;return O=(i[S>>>24]<<24|i[A>>>16&255]<<16|i[q>>>8&255]<<8|i[T&255])^e[j++],P=(i[A>>>24]<<24|i[q>>>16&255]<<16|i[T>>>8&255]<<8|i[S&255])^e[j++],W=(i[q>>>24]<<24|i[T>>>16&255]<<16|i[S>>>8&255]<<8|i[A&255])^e[j++],ke=(i[T>>>24]<<24|i[S>>>16&255]<<16|i[A>>>8&255]<<8|i[q&255])^e[j++],O=O>>>0,P=P>>>0,W=W>>>0,ke=ke>>>0,[O,P,W,ke]}var I8=[0,1,2,4,8,16,32,64,128,27,54],We=(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=[[],[],[],[]],s=0,y=0,w=0;w<256;++w){var S=y^y<<1^y<<2^y<<3^y<<4;S=S>>>8^S&255^99,r[s]=S,i[S]=s;var A=t[s],q=t[A],T=t[q],O=t[S]*257^S*16843008;n[0][s]=O<<24|O>>>8,n[1][s]=O<<16|O>>>16,n[2][s]=O<<8|O>>>24,n[3][s]=O,O=T*16843009^q*65537^A*257^s*16843008,a[0][S]=O<<24|O>>>8,a[1][S]=O<<16|O>>>16,a[2][S]=O<<8|O>>>24,a[3][S]=O,s===0?s=y=1:(s=A^t[t[t[T^A]]],y^=t[t[y]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}})();function vt(t){this._key=xu(t),this._reset()}vt.blockSize=16;vt.keySize=256/8;vt.prototype.blockSize=vt.blockSize;vt.prototype.keySize=vt.keySize;vt.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 s=n[a-1];a%e===0?(s=s<<8|s>>>24,s=We.SBOX[s>>>24]<<24|We.SBOX[s>>>16&255]<<16|We.SBOX[s>>>8&255]<<8|We.SBOX[s&255],s^=I8[a/e|0]<<24):e>6&&a%e===4&&(s=We.SBOX[s>>>24]<<24|We.SBOX[s>>>16&255]<<16|We.SBOX[s>>>8&255]<<8|We.SBOX[s&255]),n[a]=n[a-e]^s}for(var y=[],w=0;w<i;w++){var S=i-w,A=n[S-(w%4?0:4)];w<4||S<=4?y[w]=A:y[w]=We.INV_SUB_MIX[0][We.SBOX[A>>>24]]^We.INV_SUB_MIX[1][We.SBOX[A>>>16&255]]^We.INV_SUB_MIX[2][We.SBOX[A>>>8&255]]^We.INV_SUB_MIX[3][We.SBOX[A&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=y};vt.prototype.encryptBlockRaw=function(t){return t=xu(t),my(t,this._keySchedule,We.SUB_MIX,We.SBOX,this._nRounds)};vt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Ha.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};vt.prototype.decryptBlock=function(t){t=xu(t);var e=t[1];t[1]=t[3],t[3]=e;var r=my(t,this._invKeySchedule,We.INV_SUB_MIX,We.INV_SBOX,this._nRounds),i=Ha.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};vt.prototype.scrub=function(){_u(this._keySchedule),_u(this._invKeySchedule),_u(this._key)};by.exports.AES=vt});var xy=B((p7,_y)=>{b();var Ki=Me().Buffer,C8=Ki.alloc(16,0);function O8(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function wy(t){var e=Ki.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 io(t){this.h=t,this.state=Ki.alloc(16,0),this.cache=Ki.allocUnsafe(0)}io.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};io.prototype._multiply=function(){for(var t=O8(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=wy(e)};io.prototype.update=function(t){this.cache=Ki.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)};io.prototype.final=function(t,e){return this.cache.length&&this.ghash(Ki.concat([this.cache,C8],16)),this.ghash(wy([0,t,0,e])),this.state};_y.exports=io});var Mu=B((y7,Sy)=>{b();var D8=ro(),ot=Me().Buffer,My=Jt(),P8=H(),Ey=xy(),U8=ji(),L8=yu();function N8(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 F8(t,e,r){if(e.length===12)return t._finID=ot.concat([e,ot.from([0,0,0,1])]),ot.concat([e,ot.from([0,0,0,2])]);var i=new Ey(r),n=e.length,a=n%16;i.update(e),a&&(a=16-a,i.update(ot.alloc(a,0))),i.update(ot.alloc(8,0));var s=n*8,y=ot.alloc(8);y.writeUIntBE(s,0,8),i.update(y),t._finID=i.state;var w=ot.from(t._finID);return L8(w),w}function ni(t,e,r,i){My.call(this);var n=ot.alloc(4,0);this._cipher=new D8.AES(e);var a=this._cipher.encryptBlock(n);this._ghash=new Ey(a),r=F8(this,r,a),this._prev=ot.from(r),this._cache=ot.allocUnsafe(0),this._secCache=ot.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}P8(ni,My);ni.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=ot.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};ni.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=U8(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&N8(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};ni.prototype.getAuthTag=function(){if(this._decrypt||!ot.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};ni.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};ni.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};Sy.exports=ni});var Su=B((m7,Ay)=>{b();var j8=ro(),Eu=Me().Buffer,By=Jt(),K8=H();function Wa(t,e,r,i){By.call(this),this._cipher=new j8.AES(e),this._prev=Eu.from(r),this._cache=Eu.allocUnsafe(0),this._secCache=Eu.allocUnsafe(0),this._decrypt=i,this._mode=t}K8(Wa,By);Wa.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};Wa.prototype._final=function(){this._cipher.scrub()};Ay.exports=Wa});var no=B((w7,Ry)=>{b();var oi=Me().Buffer,H8=ca();function W8(t,e,r,i){if(oi.isBuffer(t)||(t=oi.from(t,"binary")),e&&(oi.isBuffer(e)||(e=oi.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,a=oi.alloc(n),s=oi.alloc(i||0),y=oi.alloc(0);n>0||i>0;){var w=new H8;w.update(y),w.update(t),e&&w.update(e),y=w.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=s.length-i,T=Math.min(i,y.length-S);y.copy(s,q,S,S+T),i-=T}}return y.fill(0),{key:a,iv:s}}Ry.exports=W8});var Iy=B(Bu=>{b();var qy=Ka(),G8=Mu(),Qt=Me().Buffer,$8=Su(),ky=Jt(),V8=ro(),z8=no(),Z8=H();function oo(t,e,r){ky.call(this),this._cache=new Ga,this._cipher=new V8.AES(e),this._prev=Qt.from(r),this._mode=t,this._autopadding=!0}Z8(oo,ky);oo.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 Qt.concat(i)};var Y8=Qt.alloc(16,16);oo.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(Y8))throw this._cipher.scrub(),new Error("data not multiple of block length")};oo.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Ga(){this.cache=Qt.allocUnsafe(0)}Ga.prototype.add=function(t){this.cache=Qt.concat([this.cache,t])};Ga.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};Ga.prototype.flush=function(){for(var t=16-this.cache.length,e=Qt.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return Qt.concat([this.cache,e])};function Ty(t,e,r){var i=qy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=Qt.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=Qt.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new $8(i.module,e,r):i.type==="auth"?new G8(i.module,e,r):new oo(i.module,e,r)}function J8(t,e){var r=qy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=z8(e,!1,r.key,r.iv);return Ty(t,i.key,i.iv)}Bu.createCipheriv=Ty;Bu.createCipher=J8});var Py=B(Au=>{b();var X8=Mu(),Hi=Me().Buffer,Cy=Ka(),Q8=Su(),Oy=Jt(),eM=ro(),tM=no(),rM=H();function ao(t,e,r){Oy.call(this),this._cache=new $a,this._last=void 0,this._cipher=new eM.AES(e),this._prev=Hi.from(r),this._mode=t,this._autopadding=!0}rM(ao,Oy);ao.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 Hi.concat(i)};ao.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return iM(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};ao.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function $a(){this.cache=Hi.allocUnsafe(0)}$a.prototype.add=function(t){this.cache=Hi.concat([this.cache,t])};$a.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};$a.prototype.flush=function(){if(this.cache.length)return this.cache};function iM(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 Dy(t,e,r){var i=Cy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Hi.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=Hi.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new Q8(i.module,e,r,!0):i.type==="auth"?new X8(i.module,e,r,!0):new ao(i.module,e,r)}function nM(t,e){var r=Cy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=tM(e,!1,r.key,r.iv);return Dy(t,i.key,i.iv)}Au.createDecipher=nM;Au.createDecipheriv=Dy});var Va=B(Mt=>{b();var Uy=Iy(),Ly=Py(),oM=bu();function aM(){return Object.keys(oM)}Mt.createCipher=Mt.Cipher=Uy.createCipher;Mt.createCipheriv=Mt.Cipheriv=Uy.createCipheriv;Mt.createDecipher=Mt.Decipher=Ly.createDecipher;Mt.createDecipheriv=Mt.Decipheriv=Ly.createDecipheriv;Mt.listCiphers=Mt.getCiphers=aM});var Ny=B(er=>{b();er["des-ecb"]={key:8,iv:0};er["des-cbc"]=er.des={key:8,iv:8};er["des-ede3-cbc"]=er.des3={key:24,iv:8};er["des-ede3"]={key:24,iv:0};er["des-ede-cbc"]={key:16,iv:8};er["des-ede"]={key:16,iv:0}});var Wy=B(Et=>{b();var Fy=ey(),Ru=Va(),pr=Ka(),tr=Ny(),jy=no();function fM(t,e){t=t.toLowerCase();var r,i;if(pr[t])r=pr[t].key,i=pr[t].iv;else if(tr[t])r=tr[t].key*8,i=tr[t].iv;else throw new TypeError("invalid suite type");var n=jy(e,!1,r,i);return Ky(t,n.key,n.iv)}function sM(t,e){t=t.toLowerCase();var r,i;if(pr[t])r=pr[t].key,i=pr[t].iv;else if(tr[t])r=tr[t].key*8,i=tr[t].iv;else throw new TypeError("invalid suite type");var n=jy(e,!1,r,i);return Hy(t,n.key,n.iv)}function Ky(t,e,r){if(t=t.toLowerCase(),pr[t])return Ru.createCipheriv(t,e,r);if(tr[t])return new Fy({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function Hy(t,e,r){if(t=t.toLowerCase(),pr[t])return Ru.createDecipheriv(t,e,r);if(tr[t])return new Fy({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function uM(){return Object.keys(tr).concat(Ru.getCiphers())}Et.createCipher=Et.Cipher=fM;Et.createCipheriv=Et.Cipheriv=Ky;Et.createDecipher=Et.Decipher=sM;Et.createDecipheriv=Et.Decipheriv=Hy;Et.listCiphers=Et.getCiphers=uM});var vr=B((Gy,qu)=>{b();(function(t,e){"use strict";function r(E,h){if(!E)throw new Error(h||"Assertion failed")}function i(E,h){E.super_=h;var g=function(){};g.prototype=h.prototype,E.prototype=new g,E.prototype.constructor=E}function n(E,h,g){if(n.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((h==="le"||h==="be")&&(g=h,h=10),this._init(E||0,h||10,g||"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=rt().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,g){return h.cmp(g)>0?h:g},n.min=function(h,g){return h.cmp(g)<0?h:g},n.prototype._init=function(h,g,c){if(typeof h=="number")return this._initNumber(h,g,c);if(typeof h=="object")return this._initArray(h,g,c);g==="hex"&&(g=16),r(g===(g|0)&&g>=2&&g<=36),h=h.toString().replace(/\s+/g,"");var o=0;h[0]==="-"&&(o++,this.negative=1),o<h.length&&(g===16?this._parseHex(h,o,c):(this._parseBase(h,g,o),c==="le"&&this._initArray(this.toArray(),g,c)))},n.prototype._initNumber=function(h,g,c){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),c==="le"&&this._initArray(this.toArray(),g,c)},n.prototype._initArray=function(h,g,c){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,v=0;if(c==="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<<v&67108863,this.words[u+1]=d>>>26-v&67108863,v+=24,v>=26&&(v-=26,u++);else if(c==="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<<v&67108863,this.words[u+1]=d>>>26-v&67108863,v+=24,v>=26&&(v-=26,u++);return this.strip()};function s(E,h){var g=E.charCodeAt(h);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function y(E,h,g){var c=s(E,g);return g-1>=h&&(c|=s(E,g-1)<<4),c}n.prototype._parseHex=function(h,g,c){this.length=Math.ceil((h.length-g)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var u=0,d=0,v;if(c==="be")for(o=h.length-1;o>=g;o-=2)v=y(h,g,o)<<u,this.words[d]|=v&67108863,u>=18?(u-=18,d+=1,this.words[d]|=v>>>26):u+=8;else{var p=h.length-g;for(o=p%2===0?g+1:g;o<h.length;o+=2)v=y(h,g,o)<<u,this.words[d]|=v&67108863,u>=18?(u-=18,d+=1,this.words[d]|=v>>>26):u+=8}this.strip()};function w(E,h,g,c){for(var o=0,u=Math.min(E.length,g),d=h;d<u;d++){var v=E.charCodeAt(d)-48;o*=c,v>=49?o+=v-49+10:v>=17?o+=v-17+10:o+=v}return o}n.prototype._parseBase=function(h,g,c){this.words=[0],this.length=1;for(var o=0,u=1;u<=67108863;u*=g)o++;o--,u=u/g|0;for(var d=h.length-c,v=d%o,p=Math.min(d,d-v)+c,f=0,m=c;m<p;m+=o)f=w(h,m,m+o,g),this.imuln(u),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(v!==0){var _=1;for(f=w(h,m,h.length,g),m=0;m<v;m++)_*=g;this.imuln(_),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this.strip()},n.prototype.copy=function(h){h.words=new Array(this.length);for(var g=0;g<this.length;g++)h.words[g]=this.words[g];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,g){h=h||10,g=g|0||1;var c;if(h===16||h==="hex"){c="";for(var o=0,u=0,d=0;d<this.length;d++){var v=this.words[d],p=((v<<o|u)&16777215).toString(16);u=v>>>24-o&16777215,o+=2,o>=26&&(o-=26,d--),u!==0||d!==this.length-1?c=S[6-p.length]+p+c:c=p+c}for(u!==0&&(c=u.toString(16)+c);c.length%g!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}if(h===(h|0)&&h>=2&&h<=36){var f=A[h],m=q[h];c="";var _=this.clone();for(_.negative=0;!_.isZero();){var l=_.modn(m).toString(h);_=_.idivn(m),_.isZero()?c=l+c:c=S[f-l.length]+l+c}for(this.isZero()&&(c="0"+c);c.length%g!==0;)c="0"+c;return this.negative!==0&&(c="-"+c),c}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,g){return r(typeof a<"u"),this.toArrayLike(a,h,g)},n.prototype.toArray=function(h,g){return this.toArrayLike(Array,h,g)},n.prototype.toArrayLike=function(h,g,c){var o=this.byteLength(),u=c||Math.max(1,o);r(o<=u,"byte array longer than desired length"),r(u>0,"Requested array length <= 0"),this.strip();var d=g==="le",v=new h(u),p,f,m=this.clone();if(d){for(f=0;!m.isZero();f++)p=m.andln(255),m.iushrn(8),v[f]=p;for(;f<u;f++)v[f]=0}else{for(f=0;f<u-o;f++)v[f]=0;for(f=0;!m.isZero();f++)p=m.andln(255),m.iushrn(8),v[u-f-1]=p}return v},Math.clz32?n.prototype._countBits=function(h){return 32-Math.clz32(h)}:n.prototype._countBits=function(h){var g=h,c=0;return g>=4096&&(c+=13,g>>>=13),g>=64&&(c+=7,g>>>=7),g>=8&&(c+=4,g>>>=4),g>=2&&(c+=2,g>>>=2),c+g},n.prototype._zeroBits=function(h){if(h===0)return 26;var g=h,c=0;return(g&8191)===0&&(c+=13,g>>>=13),(g&127)===0&&(c+=7,g>>>=7),(g&15)===0&&(c+=4,g>>>=4),(g&3)===0&&(c+=2,g>>>=2),(g&1)===0&&c++,c},n.prototype.bitLength=function(){var h=this.words[this.length-1],g=this._countBits(h);return(this.length-1)*26+g};function T(E){for(var h=new Array(E.bitLength()),g=0;g<h.length;g++){var c=g/26|0,o=g%26;h[g]=(E.words[c]&1<<o)>>>o}return h}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,g=0;g<this.length;g++){var c=this._zeroBits(this.words[g]);if(h+=c,c!==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 g=0;g<h.length;g++)this.words[g]=this.words[g]|h.words[g];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 g;this.length>h.length?g=h:g=this;for(var c=0;c<g.length;c++)this.words[c]=this.words[c]&h.words[c];return this.length=g.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 g,c;this.length>h.length?(g=this,c=h):(g=h,c=this);for(var o=0;o<c.length;o++)this.words[o]=g.words[o]^c.words[o];if(this!==g)for(;o<g.length;o++)this.words[o]=g.words[o];return this.length=g.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 g=Math.ceil(h/26)|0,c=h%26;this._expand(g),c>0&&g--;for(var o=0;o<g;o++)this.words[o]=~this.words[o]&67108863;for(c>0&&(this.words[o]=~this.words[o]&67108863>>26-c,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,g){r(typeof h=="number"&&h>=0);var c=h/26|0,o=h%26;return this._expand(c+1),g?this.words[c]=this.words[c]|1<<o:this.words[c]=this.words[c]&~(1<<o),this.strip()},n.prototype.iadd=function(h){var g;if(this.negative!==0&&h.negative===0)return this.negative=0,g=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,g=this.isub(h),h.negative=1,g._normSign();var c,o;this.length>h.length?(c=this,o=h):(c=h,o=this);for(var u=0,d=0;d<o.length;d++)g=(c.words[d]|0)+(o.words[d]|0)+u,this.words[d]=g&67108863,u=g>>>26;for(;u!==0&&d<c.length;d++)g=(c.words[d]|0)+u,this.words[d]=g&67108863,u=g>>>26;if(this.length=c.length,u!==0)this.words[this.length]=u,this.length++;else if(c!==this)for(;d<c.length;d++)this.words[d]=c.words[d];return this},n.prototype.add=function(h){var g;return h.negative!==0&&this.negative===0?(h.negative=0,g=this.sub(h),h.negative^=1,g):h.negative===0&&this.negative!==0?(this.negative=0,g=h.sub(this),this.negative=1,g):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 g=this.iadd(h);return h.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var c=this.cmp(h);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var o,u;c>0?(o=this,u=h):(o=h,u=this);for(var d=0,v=0;v<u.length;v++)g=(o.words[v]|0)-(u.words[v]|0)+d,d=g>>26,this.words[v]=g&67108863;for(;d!==0&&v<o.length;v++)g=(o.words[v]|0)+d,d=g>>26,this.words[v]=g&67108863;if(d===0&&v<o.length&&o!==this)for(;v<o.length;v++)this.words[v]=o.words[v];return this.length=Math.max(this.length,v),o!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(h){return this.clone().isub(h)};function O(E,h,g){g.negative=h.negative^E.negative;var c=E.length+h.length|0;g.length=c,c=c-1|0;var o=E.words[0]|0,u=h.words[0]|0,d=o*u,v=d&67108863,p=d/67108864|0;g.words[0]=v;for(var f=1;f<c;f++){for(var m=p>>>26,_=p&67108863,l=Math.min(f,h.length-1),x=Math.max(0,f-E.length+1);x<=l;x++){var I=f-x|0;o=E.words[I]|0,u=h.words[x]|0,d=o*u+_,m+=d/67108864|0,_=d&67108863}g.words[f]=_|0,p=m|0}return p!==0?g.words[f]=p|0:g.length--,g.strip()}var P=function(h,g,c){var o=h.words,u=g.words,d=c.words,v=0,p,f,m,_=o[0]|0,l=_&8191,x=_>>>13,I=o[1]|0,D=I&8191,C=I>>>13,L=o[2]|0,U=L&8191,N=L>>>13,bt=o[3]|0,F=bt&8191,K=bt>>>13,Ji=o[4]|0,G=Ji&8191,$=Ji>>>13,Xi=o[5]|0,V=Xi&8191,z=Xi>>>13,Qi=o[6]|0,Z=Qi&8191,Y=Qi>>>13,en=o[7]|0,J=en&8191,X=en>>>13,tn=o[8]|0,Q=tn&8191,ee=tn>>>13,rn=o[9]|0,te=rn&8191,re=rn>>>13,nn=u[0]|0,ie=nn&8191,ne=nn>>>13,on=u[1]|0,oe=on&8191,ae=on>>>13,an=u[2]|0,fe=an&8191,se=an>>>13,fn=u[3]|0,ue=fn&8191,he=fn>>>13,sn=u[4]|0,le=sn&8191,ce=sn>>>13,un=u[5]|0,de=un&8191,pe=un>>>13,hn=u[6]|0,ve=hn&8191,ye=hn>>>13,ln=u[7]|0,ge=ln&8191,me=ln>>>13,cn=u[8]|0,be=cn&8191,we=cn>>>13,dn=u[9]|0,_e=dn&8191,xe=dn>>>13;c.negative=h.negative^g.negative,c.length=19,p=Math.imul(l,ie),f=Math.imul(l,ne),f=f+Math.imul(x,ie)|0,m=Math.imul(x,ne);var hi=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(hi>>>26)|0,hi&=67108863,p=Math.imul(D,ie),f=Math.imul(D,ne),f=f+Math.imul(C,ie)|0,m=Math.imul(C,ne),p=p+Math.imul(l,oe)|0,f=f+Math.imul(l,ae)|0,f=f+Math.imul(x,oe)|0,m=m+Math.imul(x,ae)|0;var Ue=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,p=Math.imul(U,ie),f=Math.imul(U,ne),f=f+Math.imul(N,ie)|0,m=Math.imul(N,ne),p=p+Math.imul(D,oe)|0,f=f+Math.imul(D,ae)|0,f=f+Math.imul(C,oe)|0,m=m+Math.imul(C,ae)|0,p=p+Math.imul(l,fe)|0,f=f+Math.imul(l,se)|0,f=f+Math.imul(x,fe)|0,m=m+Math.imul(x,se)|0;var Le=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,p=Math.imul(F,ie),f=Math.imul(F,ne),f=f+Math.imul(K,ie)|0,m=Math.imul(K,ne),p=p+Math.imul(U,oe)|0,f=f+Math.imul(U,ae)|0,f=f+Math.imul(N,oe)|0,m=m+Math.imul(N,ae)|0,p=p+Math.imul(D,fe)|0,f=f+Math.imul(D,se)|0,f=f+Math.imul(C,fe)|0,m=m+Math.imul(C,se)|0,p=p+Math.imul(l,ue)|0,f=f+Math.imul(l,he)|0,f=f+Math.imul(x,ue)|0,m=m+Math.imul(x,he)|0;var gr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(gr>>>26)|0,gr&=67108863,p=Math.imul(G,ie),f=Math.imul(G,ne),f=f+Math.imul($,ie)|0,m=Math.imul($,ne),p=p+Math.imul(F,oe)|0,f=f+Math.imul(F,ae)|0,f=f+Math.imul(K,oe)|0,m=m+Math.imul(K,ae)|0,p=p+Math.imul(U,fe)|0,f=f+Math.imul(U,se)|0,f=f+Math.imul(N,fe)|0,m=m+Math.imul(N,se)|0,p=p+Math.imul(D,ue)|0,f=f+Math.imul(D,he)|0,f=f+Math.imul(C,ue)|0,m=m+Math.imul(C,he)|0,p=p+Math.imul(l,le)|0,f=f+Math.imul(l,ce)|0,f=f+Math.imul(x,le)|0,m=m+Math.imul(x,ce)|0;var mr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(mr>>>26)|0,mr&=67108863,p=Math.imul(V,ie),f=Math.imul(V,ne),f=f+Math.imul(z,ie)|0,m=Math.imul(z,ne),p=p+Math.imul(G,oe)|0,f=f+Math.imul(G,ae)|0,f=f+Math.imul($,oe)|0,m=m+Math.imul($,ae)|0,p=p+Math.imul(F,fe)|0,f=f+Math.imul(F,se)|0,f=f+Math.imul(K,fe)|0,m=m+Math.imul(K,se)|0,p=p+Math.imul(U,ue)|0,f=f+Math.imul(U,he)|0,f=f+Math.imul(N,ue)|0,m=m+Math.imul(N,he)|0,p=p+Math.imul(D,le)|0,f=f+Math.imul(D,ce)|0,f=f+Math.imul(C,le)|0,m=m+Math.imul(C,ce)|0,p=p+Math.imul(l,de)|0,f=f+Math.imul(l,pe)|0,f=f+Math.imul(x,de)|0,m=m+Math.imul(x,pe)|0;var br=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(br>>>26)|0,br&=67108863,p=Math.imul(Z,ie),f=Math.imul(Z,ne),f=f+Math.imul(Y,ie)|0,m=Math.imul(Y,ne),p=p+Math.imul(V,oe)|0,f=f+Math.imul(V,ae)|0,f=f+Math.imul(z,oe)|0,m=m+Math.imul(z,ae)|0,p=p+Math.imul(G,fe)|0,f=f+Math.imul(G,se)|0,f=f+Math.imul($,fe)|0,m=m+Math.imul($,se)|0,p=p+Math.imul(F,ue)|0,f=f+Math.imul(F,he)|0,f=f+Math.imul(K,ue)|0,m=m+Math.imul(K,he)|0,p=p+Math.imul(U,le)|0,f=f+Math.imul(U,ce)|0,f=f+Math.imul(N,le)|0,m=m+Math.imul(N,ce)|0,p=p+Math.imul(D,de)|0,f=f+Math.imul(D,pe)|0,f=f+Math.imul(C,de)|0,m=m+Math.imul(C,pe)|0,p=p+Math.imul(l,ve)|0,f=f+Math.imul(l,ye)|0,f=f+Math.imul(x,ve)|0,m=m+Math.imul(x,ye)|0;var wr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(wr>>>26)|0,wr&=67108863,p=Math.imul(J,ie),f=Math.imul(J,ne),f=f+Math.imul(X,ie)|0,m=Math.imul(X,ne),p=p+Math.imul(Z,oe)|0,f=f+Math.imul(Z,ae)|0,f=f+Math.imul(Y,oe)|0,m=m+Math.imul(Y,ae)|0,p=p+Math.imul(V,fe)|0,f=f+Math.imul(V,se)|0,f=f+Math.imul(z,fe)|0,m=m+Math.imul(z,se)|0,p=p+Math.imul(G,ue)|0,f=f+Math.imul(G,he)|0,f=f+Math.imul($,ue)|0,m=m+Math.imul($,he)|0,p=p+Math.imul(F,le)|0,f=f+Math.imul(F,ce)|0,f=f+Math.imul(K,le)|0,m=m+Math.imul(K,ce)|0,p=p+Math.imul(U,de)|0,f=f+Math.imul(U,pe)|0,f=f+Math.imul(N,de)|0,m=m+Math.imul(N,pe)|0,p=p+Math.imul(D,ve)|0,f=f+Math.imul(D,ye)|0,f=f+Math.imul(C,ve)|0,m=m+Math.imul(C,ye)|0,p=p+Math.imul(l,ge)|0,f=f+Math.imul(l,me)|0,f=f+Math.imul(x,ge)|0,m=m+Math.imul(x,me)|0;var _r=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(_r>>>26)|0,_r&=67108863,p=Math.imul(Q,ie),f=Math.imul(Q,ne),f=f+Math.imul(ee,ie)|0,m=Math.imul(ee,ne),p=p+Math.imul(J,oe)|0,f=f+Math.imul(J,ae)|0,f=f+Math.imul(X,oe)|0,m=m+Math.imul(X,ae)|0,p=p+Math.imul(Z,fe)|0,f=f+Math.imul(Z,se)|0,f=f+Math.imul(Y,fe)|0,m=m+Math.imul(Y,se)|0,p=p+Math.imul(V,ue)|0,f=f+Math.imul(V,he)|0,f=f+Math.imul(z,ue)|0,m=m+Math.imul(z,he)|0,p=p+Math.imul(G,le)|0,f=f+Math.imul(G,ce)|0,f=f+Math.imul($,le)|0,m=m+Math.imul($,ce)|0,p=p+Math.imul(F,de)|0,f=f+Math.imul(F,pe)|0,f=f+Math.imul(K,de)|0,m=m+Math.imul(K,pe)|0,p=p+Math.imul(U,ve)|0,f=f+Math.imul(U,ye)|0,f=f+Math.imul(N,ve)|0,m=m+Math.imul(N,ye)|0,p=p+Math.imul(D,ge)|0,f=f+Math.imul(D,me)|0,f=f+Math.imul(C,ge)|0,m=m+Math.imul(C,me)|0,p=p+Math.imul(l,be)|0,f=f+Math.imul(l,we)|0,f=f+Math.imul(x,be)|0,m=m+Math.imul(x,we)|0;var xr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(xr>>>26)|0,xr&=67108863,p=Math.imul(te,ie),f=Math.imul(te,ne),f=f+Math.imul(re,ie)|0,m=Math.imul(re,ne),p=p+Math.imul(Q,oe)|0,f=f+Math.imul(Q,ae)|0,f=f+Math.imul(ee,oe)|0,m=m+Math.imul(ee,ae)|0,p=p+Math.imul(J,fe)|0,f=f+Math.imul(J,se)|0,f=f+Math.imul(X,fe)|0,m=m+Math.imul(X,se)|0,p=p+Math.imul(Z,ue)|0,f=f+Math.imul(Z,he)|0,f=f+Math.imul(Y,ue)|0,m=m+Math.imul(Y,he)|0,p=p+Math.imul(V,le)|0,f=f+Math.imul(V,ce)|0,f=f+Math.imul(z,le)|0,m=m+Math.imul(z,ce)|0,p=p+Math.imul(G,de)|0,f=f+Math.imul(G,pe)|0,f=f+Math.imul($,de)|0,m=m+Math.imul($,pe)|0,p=p+Math.imul(F,ve)|0,f=f+Math.imul(F,ye)|0,f=f+Math.imul(K,ve)|0,m=m+Math.imul(K,ye)|0,p=p+Math.imul(U,ge)|0,f=f+Math.imul(U,me)|0,f=f+Math.imul(N,ge)|0,m=m+Math.imul(N,me)|0,p=p+Math.imul(D,be)|0,f=f+Math.imul(D,we)|0,f=f+Math.imul(C,be)|0,m=m+Math.imul(C,we)|0,p=p+Math.imul(l,_e)|0,f=f+Math.imul(l,xe)|0,f=f+Math.imul(x,_e)|0,m=m+Math.imul(x,xe)|0;var Mr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,p=Math.imul(te,oe),f=Math.imul(te,ae),f=f+Math.imul(re,oe)|0,m=Math.imul(re,ae),p=p+Math.imul(Q,fe)|0,f=f+Math.imul(Q,se)|0,f=f+Math.imul(ee,fe)|0,m=m+Math.imul(ee,se)|0,p=p+Math.imul(J,ue)|0,f=f+Math.imul(J,he)|0,f=f+Math.imul(X,ue)|0,m=m+Math.imul(X,he)|0,p=p+Math.imul(Z,le)|0,f=f+Math.imul(Z,ce)|0,f=f+Math.imul(Y,le)|0,m=m+Math.imul(Y,ce)|0,p=p+Math.imul(V,de)|0,f=f+Math.imul(V,pe)|0,f=f+Math.imul(z,de)|0,m=m+Math.imul(z,pe)|0,p=p+Math.imul(G,ve)|0,f=f+Math.imul(G,ye)|0,f=f+Math.imul($,ve)|0,m=m+Math.imul($,ye)|0,p=p+Math.imul(F,ge)|0,f=f+Math.imul(F,me)|0,f=f+Math.imul(K,ge)|0,m=m+Math.imul(K,me)|0,p=p+Math.imul(U,be)|0,f=f+Math.imul(U,we)|0,f=f+Math.imul(N,be)|0,m=m+Math.imul(N,we)|0,p=p+Math.imul(D,_e)|0,f=f+Math.imul(D,xe)|0,f=f+Math.imul(C,_e)|0,m=m+Math.imul(C,xe)|0;var Er=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Er>>>26)|0,Er&=67108863,p=Math.imul(te,fe),f=Math.imul(te,se),f=f+Math.imul(re,fe)|0,m=Math.imul(re,se),p=p+Math.imul(Q,ue)|0,f=f+Math.imul(Q,he)|0,f=f+Math.imul(ee,ue)|0,m=m+Math.imul(ee,he)|0,p=p+Math.imul(J,le)|0,f=f+Math.imul(J,ce)|0,f=f+Math.imul(X,le)|0,m=m+Math.imul(X,ce)|0,p=p+Math.imul(Z,de)|0,f=f+Math.imul(Z,pe)|0,f=f+Math.imul(Y,de)|0,m=m+Math.imul(Y,pe)|0,p=p+Math.imul(V,ve)|0,f=f+Math.imul(V,ye)|0,f=f+Math.imul(z,ve)|0,m=m+Math.imul(z,ye)|0,p=p+Math.imul(G,ge)|0,f=f+Math.imul(G,me)|0,f=f+Math.imul($,ge)|0,m=m+Math.imul($,me)|0,p=p+Math.imul(F,be)|0,f=f+Math.imul(F,we)|0,f=f+Math.imul(K,be)|0,m=m+Math.imul(K,we)|0,p=p+Math.imul(U,_e)|0,f=f+Math.imul(U,xe)|0,f=f+Math.imul(N,_e)|0,m=m+Math.imul(N,xe)|0;var Sr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,p=Math.imul(te,ue),f=Math.imul(te,he),f=f+Math.imul(re,ue)|0,m=Math.imul(re,he),p=p+Math.imul(Q,le)|0,f=f+Math.imul(Q,ce)|0,f=f+Math.imul(ee,le)|0,m=m+Math.imul(ee,ce)|0,p=p+Math.imul(J,de)|0,f=f+Math.imul(J,pe)|0,f=f+Math.imul(X,de)|0,m=m+Math.imul(X,pe)|0,p=p+Math.imul(Z,ve)|0,f=f+Math.imul(Z,ye)|0,f=f+Math.imul(Y,ve)|0,m=m+Math.imul(Y,ye)|0,p=p+Math.imul(V,ge)|0,f=f+Math.imul(V,me)|0,f=f+Math.imul(z,ge)|0,m=m+Math.imul(z,me)|0,p=p+Math.imul(G,be)|0,f=f+Math.imul(G,we)|0,f=f+Math.imul($,be)|0,m=m+Math.imul($,we)|0,p=p+Math.imul(F,_e)|0,f=f+Math.imul(F,xe)|0,f=f+Math.imul(K,_e)|0,m=m+Math.imul(K,xe)|0;var Br=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Br>>>26)|0,Br&=67108863,p=Math.imul(te,le),f=Math.imul(te,ce),f=f+Math.imul(re,le)|0,m=Math.imul(re,ce),p=p+Math.imul(Q,de)|0,f=f+Math.imul(Q,pe)|0,f=f+Math.imul(ee,de)|0,m=m+Math.imul(ee,pe)|0,p=p+Math.imul(J,ve)|0,f=f+Math.imul(J,ye)|0,f=f+Math.imul(X,ve)|0,m=m+Math.imul(X,ye)|0,p=p+Math.imul(Z,ge)|0,f=f+Math.imul(Z,me)|0,f=f+Math.imul(Y,ge)|0,m=m+Math.imul(Y,me)|0,p=p+Math.imul(V,be)|0,f=f+Math.imul(V,we)|0,f=f+Math.imul(z,be)|0,m=m+Math.imul(z,we)|0,p=p+Math.imul(G,_e)|0,f=f+Math.imul(G,xe)|0,f=f+Math.imul($,_e)|0,m=m+Math.imul($,xe)|0;var Ar=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,p=Math.imul(te,de),f=Math.imul(te,pe),f=f+Math.imul(re,de)|0,m=Math.imul(re,pe),p=p+Math.imul(Q,ve)|0,f=f+Math.imul(Q,ye)|0,f=f+Math.imul(ee,ve)|0,m=m+Math.imul(ee,ye)|0,p=p+Math.imul(J,ge)|0,f=f+Math.imul(J,me)|0,f=f+Math.imul(X,ge)|0,m=m+Math.imul(X,me)|0,p=p+Math.imul(Z,be)|0,f=f+Math.imul(Z,we)|0,f=f+Math.imul(Y,be)|0,m=m+Math.imul(Y,we)|0,p=p+Math.imul(V,_e)|0,f=f+Math.imul(V,xe)|0,f=f+Math.imul(z,_e)|0,m=m+Math.imul(z,xe)|0;var Rr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,p=Math.imul(te,ve),f=Math.imul(te,ye),f=f+Math.imul(re,ve)|0,m=Math.imul(re,ye),p=p+Math.imul(Q,ge)|0,f=f+Math.imul(Q,me)|0,f=f+Math.imul(ee,ge)|0,m=m+Math.imul(ee,me)|0,p=p+Math.imul(J,be)|0,f=f+Math.imul(J,we)|0,f=f+Math.imul(X,be)|0,m=m+Math.imul(X,we)|0,p=p+Math.imul(Z,_e)|0,f=f+Math.imul(Z,xe)|0,f=f+Math.imul(Y,_e)|0,m=m+Math.imul(Y,xe)|0;var qr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(qr>>>26)|0,qr&=67108863,p=Math.imul(te,ge),f=Math.imul(te,me),f=f+Math.imul(re,ge)|0,m=Math.imul(re,me),p=p+Math.imul(Q,be)|0,f=f+Math.imul(Q,we)|0,f=f+Math.imul(ee,be)|0,m=m+Math.imul(ee,we)|0,p=p+Math.imul(J,_e)|0,f=f+Math.imul(J,xe)|0,f=f+Math.imul(X,_e)|0,m=m+Math.imul(X,xe)|0;var kr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(kr>>>26)|0,kr&=67108863,p=Math.imul(te,be),f=Math.imul(te,we),f=f+Math.imul(re,be)|0,m=Math.imul(re,we),p=p+Math.imul(Q,_e)|0,f=f+Math.imul(Q,xe)|0,f=f+Math.imul(ee,_e)|0,m=m+Math.imul(ee,xe)|0;var Tr=(v+p|0)+((f&8191)<<13)|0;v=(m+(f>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,p=Math.imul(te,_e),f=Math.imul(te,xe),f=f+Math.imul(re,_e)|0,m=Math.imul(re,xe);var Ir=(v+p|0)+((f&8191)<<13)|0;return v=(m+(f>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,d[0]=hi,d[1]=Ue,d[2]=Le,d[3]=gr,d[4]=mr,d[5]=br,d[6]=wr,d[7]=_r,d[8]=xr,d[9]=Mr,d[10]=Er,d[11]=Sr,d[12]=Br,d[13]=Ar,d[14]=Rr,d[15]=qr,d[16]=kr,d[17]=Tr,d[18]=Ir,v!==0&&(d[19]=v,c.length++),c};Math.imul||(P=O);function W(E,h,g){g.negative=h.negative^E.negative,g.length=E.length+h.length;for(var c=0,o=0,u=0;u<g.length-1;u++){var d=o;o=0;for(var v=c&67108863,p=Math.min(u,h.length-1),f=Math.max(0,u-E.length+1);f<=p;f++){var m=u-f,_=E.words[m]|0,l=h.words[f]|0,x=_*l,I=x&67108863;d=d+(x/67108864|0)|0,I=I+v|0,v=I&67108863,d=d+(I>>>26)|0,o+=d>>>26,d&=67108863}g.words[u]=v,c=d,d=o}return c!==0?g.words[u]=c:g.length--,g.strip()}function ke(E,h,g){var c=new j;return c.mulp(E,h,g)}n.prototype.mulTo=function(h,g){var c,o=this.length+h.length;return this.length===10&&h.length===10?c=P(this,h,g):o<63?c=O(this,h,g):o<1024?c=W(this,h,g):c=ke(this,h,g),c};function j(E,h){this.x=E,this.y=h}j.prototype.makeRBT=function(h){for(var g=new Array(h),c=n.prototype._countBits(h)-1,o=0;o<h;o++)g[o]=this.revBin(o,c,h);return g},j.prototype.revBin=function(h,g,c){if(h===0||h===c-1)return h;for(var o=0,u=0;u<g;u++)o|=(h&1)<<g-u-1,h>>=1;return o},j.prototype.permute=function(h,g,c,o,u,d){for(var v=0;v<d;v++)o[v]=g[h[v]],u[v]=c[h[v]]},j.prototype.transform=function(h,g,c,o,u,d){this.permute(d,h,g,c,o,u);for(var v=1;v<u;v<<=1)for(var p=v<<1,f=Math.cos(2*Math.PI/p),m=Math.sin(2*Math.PI/p),_=0;_<u;_+=p)for(var l=f,x=m,I=0;I<v;I++){var D=c[_+I],C=o[_+I],L=c[_+I+v],U=o[_+I+v],N=l*L-x*U;U=l*U+x*L,L=N,c[_+I]=D+L,o[_+I]=C+U,c[_+I+v]=D-L,o[_+I+v]=C-U,I!==p&&(N=f*l-m*x,x=f*x+m*l,l=N)}},j.prototype.guessLen13b=function(h,g){var c=Math.max(g,h)|1,o=c&1,u=0;for(c=c/2|0;c;c=c>>>1)u++;return 1<<u+1+o},j.prototype.conjugate=function(h,g,c){if(!(c<=1))for(var o=0;o<c/2;o++){var u=h[o];h[o]=h[c-o-1],h[c-o-1]=u,u=g[o],g[o]=-g[c-o-1],g[c-o-1]=-u}},j.prototype.normalize13b=function(h,g){for(var c=0,o=0;o<g/2;o++){var u=Math.round(h[2*o+1]/g)*8192+Math.round(h[2*o]/g)+c;h[o]=u&67108863,u<67108864?c=0:c=u/67108864|0}return h},j.prototype.convert13b=function(h,g,c,o){for(var u=0,d=0;d<g;d++)u=u+(h[d]|0),c[2*d]=u&8191,u=u>>>13,c[2*d+1]=u&8191,u=u>>>13;for(d=2*g;d<o;++d)c[d]=0;r(u===0),r((u&-8192)===0)},j.prototype.stub=function(h){for(var g=new Array(h),c=0;c<h;c++)g[c]=0;return g},j.prototype.mulp=function(h,g,c){var o=2*this.guessLen13b(h.length,g.length),u=this.makeRBT(o),d=this.stub(o),v=new Array(o),p=new Array(o),f=new Array(o),m=new Array(o),_=new Array(o),l=new Array(o),x=c.words;x.length=o,this.convert13b(h.words,h.length,v,o),this.convert13b(g.words,g.length,m,o),this.transform(v,d,p,f,o,u),this.transform(m,d,_,l,o,u);for(var I=0;I<o;I++){var D=p[I]*_[I]-f[I]*l[I];f[I]=p[I]*l[I]+f[I]*_[I],p[I]=D}return this.conjugate(p,f,o),this.transform(p,f,x,d,o,u),this.conjugate(x,d,o),this.normalize13b(x,o),c.negative=h.negative^g.negative,c.length=h.length+g.length,c.strip()},n.prototype.mul=function(h){var g=new n(null);return g.words=new Array(this.length+h.length),this.mulTo(h,g)},n.prototype.mulf=function(h){var g=new n(null);return g.words=new Array(this.length+h.length),ke(this,h,g)},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 g=0,c=0;c<this.length;c++){var o=(this.words[c]|0)*h,u=(o&67108863)+(g&67108863);g>>=26,g+=o/67108864|0,g+=u>>>26,this.words[c]=u&67108863}return g!==0&&(this.words[c]=g,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 g=T(h);if(g.length===0)return new n(1);for(var c=this,o=0;o<g.length&&g[o]===0;o++,c=c.sqr());if(++o<g.length)for(var u=c.sqr();o<g.length;o++,u=u.sqr())g[o]!==0&&(c=c.mul(u));return c},n.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var g=h%26,c=(h-g)/26,o=67108863>>>26-g<<26-g,u;if(g!==0){var d=0;for(u=0;u<this.length;u++){var v=this.words[u]&o,p=(this.words[u]|0)-v<<g;this.words[u]=p|d,d=v>>>26-g}d&&(this.words[u]=d,this.length++)}if(c!==0){for(u=this.length-1;u>=0;u--)this.words[u+c]=this.words[u];for(u=0;u<c;u++)this.words[u]=0;this.length+=c}return this.strip()},n.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},n.prototype.iushrn=function(h,g,c){r(typeof h=="number"&&h>=0);var o;g?o=(g-g%26)/26:o=0;var u=h%26,d=Math.min((h-u)/26,this.length),v=67108863^67108863>>>u<<u,p=c;if(o-=d,o=Math.max(0,o),p){for(var f=0;f<d;f++)p.words[f]=this.words[f];p.length=d}if(d!==0)if(this.length>d)for(this.length-=d,f=0;f<this.length;f++)this.words[f]=this.words[f+d];else this.words[0]=0,this.length=1;var m=0;for(f=this.length-1;f>=0&&(m!==0||f>=o);f--){var _=this.words[f]|0;this.words[f]=m<<26-u|_>>>u,m=_&v}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,g,c){return r(this.negative===0),this.iushrn(h,g,c)},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 g=h%26,c=(h-g)/26,o=1<<g;if(this.length<=c)return!1;var u=this.words[c];return!!(u&o)},n.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var g=h%26,c=(h-g)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=c)return this;if(g!==0&&c++,this.length=Math.min(c,this.length),g!==0){var o=67108863^67108863>>>g<<g;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 g=0;g<this.length&&this.words[g]>=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+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 g=0;g<this.length&&this.words[g]<0;g++)this.words[g]+=67108864,this.words[g+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,g,c){var o=h.length+c,u;this._expand(o);var d,v=0;for(u=0;u<h.length;u++){d=(this.words[u+c]|0)+v;var p=(h.words[u]|0)*g;d-=p&67108863,v=(d>>26)-(p/67108864|0),this.words[u+c]=d&67108863}for(;u<this.length-c;u++)d=(this.words[u+c]|0)+v,v=d>>26,this.words[u+c]=d&67108863;if(v===0)return this.strip();for(r(v===-1),v=0,u=0;u<this.length;u++)d=-(this.words[u]|0)+v,v=d>>26,this.words[u]=d&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(h,g){var c=this.length-h.length,o=this.clone(),u=h,d=u.words[u.length-1]|0,v=this._countBits(d);c=26-v,c!==0&&(u=u.ushln(c),o.iushln(c),d=u.words[u.length-1]|0);var p=o.length-u.length,f;if(g!=="mod"){f=new n(null),f.length=p+1,f.words=new Array(f.length);for(var m=0;m<f.length;m++)f.words[m]=0}var _=o.clone()._ishlnsubmul(u,1,p);_.negative===0&&(o=_,f&&(f.words[p]=1));for(var l=p-1;l>=0;l--){var x=(o.words[u.length+l]|0)*67108864+(o.words[u.length+l-1]|0);for(x=Math.min(x/d|0,67108863),o._ishlnsubmul(u,x,l);o.negative!==0;)x--,o.negative=0,o._ishlnsubmul(u,1,l),o.isZero()||(o.negative^=1);f&&(f.words[l]=x)}return f&&f.strip(),o.strip(),g!=="div"&&c!==0&&o.iushrn(c),{div:f||null,mod:o}},n.prototype.divmod=function(h,g,c){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,g),g!=="mod"&&(o=d.div.neg()),g!=="div"&&(u=d.mod.neg(),c&&u.negative!==0&&u.iadd(h)),{div:o,mod:u}):this.negative===0&&h.negative!==0?(d=this.divmod(h.neg(),g),g!=="mod"&&(o=d.div.neg()),{div:o,mod:d.mod}):(this.negative&h.negative)!==0?(d=this.neg().divmod(h.neg(),g),g!=="div"&&(u=d.mod.neg(),c&&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?g==="div"?{div:this.divn(h.words[0]),mod:null}:g==="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,g)},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 g=this.divmod(h);if(g.mod.isZero())return g.div;var c=g.mod.abs(),o=h.abs().iushrn(1),u=h.words[0]&1,d=c.cmp(o);if(d<0||u===1&&d===0)return g.div;var v=new n(1);return v.negative=this.negative^h.negative,g.div.iadd(v)},n.prototype.modn=function(h){r(h<=67108863);for(var g=(1<<26)%h,c=0,o=this.length-1;o>=0;o--)c=(g*c+(this.words[o]|0))%h;return c},n.prototype.idivn=function(h){r(h<=67108863);for(var g=0,c=this.length-1;c>=0;c--){var o=(this.words[c]|0)+g*67108864;this.words[c]=o/h|0,g=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 g=this,c=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var o=new n(1),u=new n(0),d=new n(0),v=new n(1),p=0;g.isEven()&&c.isEven();)g.iushrn(1),c.iushrn(1),++p;for(var f=c.clone(),m=g.clone();!g.isZero();){for(var _=0,l=1;(g.words[0]&l)===0&&_<26;++_,l<<=1);if(_>0)for(g.iushrn(_);_-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(f),u.isub(m)),o.iushrn(1),u.iushrn(1);for(var x=0,I=1;(c.words[0]&I)===0&&x<26;++x,I<<=1);if(x>0)for(c.iushrn(x);x-- >0;)(d.isOdd()||v.isOdd())&&(d.iadd(f),v.isub(m)),d.iushrn(1),v.iushrn(1);g.cmp(c)>=0?(g.isub(c),o.isub(d),u.isub(v)):(c.isub(g),d.isub(o),v.isub(u))}return{a:d,b:v,gcd:c.iushln(p)}},n.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var g=this,c=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var o=new n(1),u=new n(0),d=c.clone();g.cmpn(1)>0&&c.cmpn(1)>0;){for(var v=0,p=1;(g.words[0]&p)===0&&v<26;++v,p<<=1);if(v>0)for(g.iushrn(v);v-- >0;)o.isOdd()&&o.iadd(d),o.iushrn(1);for(var f=0,m=1;(c.words[0]&m)===0&&f<26;++f,m<<=1);if(f>0)for(c.iushrn(f);f-- >0;)u.isOdd()&&u.iadd(d),u.iushrn(1);g.cmp(c)>=0?(g.isub(c),o.isub(u)):(c.isub(g),u.isub(o))}var _;return g.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 g=this.clone(),c=h.clone();g.negative=0,c.negative=0;for(var o=0;g.isEven()&&c.isEven();o++)g.iushrn(1),c.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;c.isEven();)c.iushrn(1);var u=g.cmp(c);if(u<0){var d=g;g=c,c=d}else if(u===0||c.cmpn(1)===0)break;g.isub(c)}while(!0);return c.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 g=h%26,c=(h-g)/26,o=1<<g;if(this.length<=c)return this._expand(c+1),this.words[c]|=o,this;for(var u=o,d=c;u!==0&&d<this.length;d++){var v=this.words[d]|0;v+=u,u=v>>>26,v&=67108863,this.words[d]=v}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 g=h<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this.strip();var c;if(this.length>1)c=1;else{g&&(h=-h),r(h<=67108863,"Number is too big");var o=this.words[0]|0;c=o===h?0:o<h?-1:1}return this.negative!==0?-c|0:c},n.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var g=this.ucmp(h);return this.negative!==0?-g|0:g},n.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var g=0,c=this.length-1;c>=0;c--){var o=this.words[c]|0,u=h.words[c]|0;if(o!==u){o<u?g=-1:o>u&&(g=1);break}}return g},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 De(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 Se={k256:null,p224:null,p192:null,p25519:null};function Fe(E,h){this.name=E,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()}Fe.prototype._tmp=function(){var h=new n(null);return h.words=new Array(Math.ceil(this.n/13)),h},Fe.prototype.ireduce=function(h){var g=h,c;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),c=g.bitLength();while(c>this.n);var o=c<this.n?-1:g.ucmp(this.p);return o===0?(g.words[0]=0,g.length=1):o>0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},Fe.prototype.split=function(h,g){h.iushrn(this.n,0,g)},Fe.prototype.imulK=function(h){return h.imul(this.k)};function je(){Fe.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(je,Fe),je.prototype.split=function(h,g){for(var c=4194303,o=Math.min(h.length,9),u=0;u<o;u++)g.words[u]=h.words[u];if(g.length=o,h.length<=9){h.words[0]=0,h.length=1;return}var d=h.words[9];for(g.words[g.length++]=d&c,u=10;u<h.length;u++){var v=h.words[u]|0;h.words[u-10]=(v&c)<<4|d>>>22,d=v}d>>>=22,h.words[u-10]=d,d===0&&h.length>10?h.length-=10:h.length-=9},je.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var g=0,c=0;c<h.length;c++){var o=h.words[c]|0;g+=o*977,h.words[c]=g&67108863,g=o*64+(g/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function nr(){Fe.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(nr,Fe);function $e(){Fe.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i($e,Fe);function kt(){Fe.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(kt,Fe),kt.prototype.imulK=function(h){for(var g=0,c=0;c<h.length;c++){var o=(h.words[c]|0)*19+g,u=o&67108863;o>>>=26,h.words[c]=u,g=o}return g!==0&&(h.words[h.length++]=g),h},n._prime=function(h){if(Se[h])return Se[h];var g;if(h==="k256")g=new je;else if(h==="p224")g=new nr;else if(h==="p192")g=new $e;else if(h==="p25519")g=new kt;else throw new Error("Unknown prime "+h);return Se[h]=g,g};function De(E){if(typeof E=="string"){var h=n._prime(E);this.m=h.p,this.prime=h}else r(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}De.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},De.prototype._verify2=function(h,g){r((h.negative|g.negative)===0,"red works only with positives"),r(h.red&&h.red===g.red,"red works only with red numbers")},De.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},De.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},De.prototype.add=function(h,g){this._verify2(h,g);var c=h.add(g);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},De.prototype.iadd=function(h,g){this._verify2(h,g);var c=h.iadd(g);return c.cmp(this.m)>=0&&c.isub(this.m),c},De.prototype.sub=function(h,g){this._verify2(h,g);var c=h.sub(g);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},De.prototype.isub=function(h,g){this._verify2(h,g);var c=h.isub(g);return c.cmpn(0)<0&&c.iadd(this.m),c},De.prototype.shl=function(h,g){return this._verify1(h),this.imod(h.ushln(g))},De.prototype.imul=function(h,g){return this._verify2(h,g),this.imod(h.imul(g))},De.prototype.mul=function(h,g){return this._verify2(h,g),this.imod(h.mul(g))},De.prototype.isqr=function(h){return this.imul(h,h.clone())},De.prototype.sqr=function(h){return this.mul(h,h)},De.prototype.sqrt=function(h){if(h.isZero())return h.clone();var g=this.m.andln(3);if(r(g%2===1),g===3){var c=this.m.add(new n(1)).iushrn(2);return this.pow(h,c)}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),v=d.redNeg(),p=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);this.pow(f,p).cmp(v)!==0;)f.redIAdd(v);for(var m=this.pow(f,o),_=this.pow(h,o.addn(1).iushrn(1)),l=this.pow(h,o),x=u;l.cmp(d)!==0;){for(var I=l,D=0;I.cmp(d)!==0;D++)I=I.redSqr();r(D<x);var C=this.pow(m,new n(1).iushln(x-D-1));_=_.redMul(C),m=C.redSqr(),l=l.redMul(m),x=D}return _},De.prototype.invm=function(h){var g=h._invmp(this.m);return g.negative!==0?(g.negative=0,this.imod(g).redNeg()):this.imod(g)},De.prototype.pow=function(h,g){if(g.isZero())return new n(1).toRed(this);if(g.cmpn(1)===0)return h.clone();var c=4,o=new Array(1<<c);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],v=0,p=0,f=g.bitLength()%26;for(f===0&&(f=26),u=g.length-1;u>=0;u--){for(var m=g.words[u],_=f-1;_>=0;_--){var l=m>>_&1;if(d!==o[0]&&(d=this.sqr(d)),l===0&&v===0){p=0;continue}v<<=1,v|=l,p++,!(p!==c&&(u!==0||_!==0))&&(d=this.mul(d,o[v]),p=0,v=0)}f=26}return d},De.prototype.convertTo=function(h){var g=h.umod(this.m);return g===h?g.clone():g},De.prototype.convertFrom=function(h){var g=h.clone();return g.red=null,g},n.mont=function(h){return new st(h)};function st(E){De.call(this,E),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(st,De),st.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},st.prototype.convertFrom=function(h){var g=this.imod(h.mul(this.rinv));return g.red=null,g},st.prototype.imul=function(h,g){if(h.isZero()||g.isZero())return h.words[0]=0,h.length=1,h;var c=h.imul(g),o=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=c.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)},st.prototype.mul=function(h,g){if(h.isZero()||g.isZero())return new n(0)._forceRed(this);var c=h.mul(g),o=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=c.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)},st.prototype.invm=function(h){var g=this.imod(h._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(typeof qu>"u"||qu,Gy)});var $y=B((C7,Iu)=>{b();var ku;Iu.exports=function(e){return ku||(ku=new yr(null)),ku.generate(e)};function yr(t){this.rand=t}Iu.exports.Rand=yr;yr.prototype.generate=function(e){return this._rand(e)};yr.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?yr.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?yr.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(yr.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Tu=Cu(),typeof Tu.randomBytes!="function")throw new Error("Not supported");yr.prototype._rand=function(e){return Tu.randomBytes(e)}}catch{}var Tu});var Ou=B((D7,Vy)=>{b();var ai=vr(),hM=$y();function fi(t){this.rand=t||new hM.Rand}Vy.exports=fi;fi.create=function(e){return new fi(e)};fi.prototype._randbelow=function(e){var r=e.bitLength(),i=Math.ceil(r/8);do var n=new ai(this.rand.generate(i));while(n.cmp(e)>=0);return n};fi.prototype._randrange=function(e,r){var i=r.sub(e);return e.add(this._randbelow(i))};fi.prototype.test=function(e,r,i){var n=e.bitLength(),a=ai.mont(e),s=new ai(1).toRed(a);r||(r=Math.max(1,n/48|0));for(var y=e.subn(1),w=0;!y.testn(w);w++);for(var S=e.shrn(w),A=y.toRed(a),q=!0;r>0;r--){var T=this._randrange(new ai(2),y);i&&i(T);var O=T.toRed(a).redPow(S);if(!(O.cmp(s)===0||O.cmp(A)===0)){for(var P=1;P<w;P++){if(O=O.redSqr(),O.cmp(s)===0)return!1;if(O.cmp(A)===0)break}if(P===w)return!1}}return q};fi.prototype.getDivisor=function(e,r){var i=e.bitLength(),n=ai.mont(e),a=new ai(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var s=e.subn(1),y=0;!s.testn(y);y++);for(var w=e.shrn(y),S=s.toRed(n);r>0;r--){var A=this._randrange(new ai(2),s),q=e.gcd(A);if(q.cmpn(1)!==0)return q;var T=A.toRed(n).redPow(w);if(!(T.cmp(a)===0||T.cmp(S)===0)){for(var O=1;O<y;O++){if(T=T.redSqr(),T.cmp(a)===0)return T.fromRed().subn(1).gcd(e);if(T.cmp(S)===0)break}if(O===y)return T=T.redSqr(),T.fromRed().subn(1).gcd(e)}}return!1}});var Fu=B((j7,Yy)=>{b();var lM=Ur();Yy.exports=Nu;Nu.simpleSieve=Uu;Nu.fermatTest=Lu;var Ye=vr(),cM=new Ye(24),dM=Ou(),zy=new dM,pM=new Ye(1),Pu=new Ye(2),vM=new Ye(5),U7=new Ye(16),L7=new Ye(8),yM=new Ye(10),gM=new Ye(3),N7=new Ye(7),mM=new Ye(11),Zy=new Ye(4),F7=new Ye(12),Du=null;function bM(){if(Du!==null)return Du;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 Du=e,e}function Uu(t){for(var e=bM(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return!0}function Lu(t){var e=Ye.mont(t);return Pu.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Nu(t,e){if(t<16)return e===2||e===5?new Ye([140,123]):new Ye([140,39]);e=new Ye(e);for(var r,i;;){for(r=new Ye(lM(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(pM),r.testn(1)||r.iadd(Pu),e.cmp(Pu)){if(!e.cmp(vM))for(;r.mod(yM).cmp(gM);)r.iadd(Zy)}else for(;r.mod(cM).cmp(mM);)r.iadd(Zy);if(i=r.shrn(1),Uu(i)&&Uu(r)&&Lu(i)&&Lu(r)&&zy.test(i)&&zy.test(r))return r}}});var Jy=B((H7,wM)=>{wM.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 t1=B((W7,e1)=>{b();var yt=vr(),_M=Ou(),Xy=new _M,xM=new yt(24),MM=new yt(11),EM=new yt(10),SM=new yt(3),BM=new yt(7),Qy=Fu(),AM=Ur();e1.exports=rr;function RM(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this._pub=new yt(t),this}function qM(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this._priv=new yt(t),this}var za={};function kM(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in za)return za[i];var n=0;if(t.isEven()||!Qy.simpleSieve||!Qy.fermatTest(t)||!Xy.test(t))return n+=1,r==="02"||r==="05"?n+=8:n+=4,za[i]=n,n;Xy.test(t.shrn(1))||(n+=2);var a;switch(r){case"02":t.mod(xM).cmp(MM)&&(n+=8);break;case"05":a=t.mod(EM),a.cmp(SM)&&a.cmp(BM)&&(n+=8);break;default:n+=4}return za[i]=n,n}function rr(t,e,r){this.setGenerator(e),this.__prime=new yt(t),this._prime=yt.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=RM,this.setPrivateKey=qM):this._primeCode=8}Object.defineProperty(rr.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=kM(this.__prime,this.__gen)),this._primeCode}});rr.prototype.generateKeys=function(){return this._priv||(this._priv=new yt(AM(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};rr.prototype.computeSecret=function(t){t=new yt(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};rr.prototype.getPublicKey=function(e){return Za(this._pub,e)};rr.prototype.getPrivateKey=function(e){return Za(this._priv,e)};rr.prototype.getPrime=function(t){return Za(this.__prime,t)};rr.prototype.getGenerator=function(t){return Za(this._gen,t)};rr.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 yt(t),this};function Za(t,e){var r=new R.Buffer(t.toArray());return e?r.toString(e):r}});var n1=B(Wi=>{b();var TM=Fu(),r1=Jy(),ju=t1();function IM(t){var e=new R.Buffer(r1[t].prime,"hex"),r=new R.Buffer(r1[t].gen,"hex");return new ju(e,r)}var CM={binary:!0,hex:!0,base64:!0};function i1(t,e,r,i){return R.Buffer.isBuffer(e)||CM[e]===void 0?i1(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 ju(TM(t,r),r,!0):(R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),new ju(t,r,!0)))}Wi.DiffieHellmanGroup=Wi.createDiffieHellmanGroup=Wi.getDiffieHellman=IM;Wi.createDiffieHellman=Wi.DiffieHellman=i1});var o1=B((exports,module)=>{b();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),s=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),s};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 s1=B(f1=>{b();var a1=$i(),OM=H(),DM=f1;DM.define=function(e,r){return new Gi(e,r)};function Gi(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}Gi.prototype._createNamed=function(e){var r;try{r=o1().runInThisContext("(function "+this.name+`(entity) {
12
- this._initNamed(entity);
13
- })`)}catch{r=function(n){this._initNamed(n)}}return OM(r,e),r.prototype._initNamed=function(n){e.call(this,n)},new r(this)};Gi.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(a1.decoders[e])),this.decoders[e]};Gi.prototype.decode=function(e,r,i){return this._getDecoder(r).decode(e,i)};Gi.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(a1.encoders[e])),this.encoders[e]};Gi.prototype.encode=function(e,r,i){return this._getEncoder(r).encode(e,i)}});var h1=B(u1=>{b();var PM=H();function gt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}u1.Reporter=gt;gt.prototype.isError=function(e){return e instanceof Vi};gt.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};gt.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};gt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};gt.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};gt.prototype.leaveKey=function(e,r,i){var n=this._reporterState;this.exitKey(e),n.obj!==null&&(n.obj[r]=i)};gt.prototype.path=function(){return this._reporterState.path.join("/")};gt.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};gt.prototype.leaveObject=function(e){var r=this._reporterState,i=r.obj;return r.obj=e,i};gt.prototype.error=function(e){var r,i=this._reporterState,n=e instanceof Vi;if(n?r=e:r=new Vi(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};gt.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function Vi(t,e){this.path=t,this.rethrow(e)}PM(Vi,Error);Vi.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Vi),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var Hu=B(Ku=>{b();var UM=H(),Ja=zi().Reporter,fo=rt().Buffer;function Ft(t,e){if(Ja.call(this,e),!fo.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}UM(Ft,Ja);Ku.DecoderBuffer=Ft;Ft.prototype.save=function(){return{offset:this.offset,reporter:Ja.prototype.save.call(this)}};Ft.prototype.restore=function(e){var r=new Ft(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Ja.prototype.restore.call(this,e.reporter),r};Ft.prototype.isEmpty=function(){return this.offset===this.length};Ft.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Ft.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new Ft(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};Ft.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Ya(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof Ya||(r=new Ya(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=fo.byteLength(t);else if(fo.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}Ku.EncoderBuffer=Ya;Ya.prototype.join=function(e,r){return e||(e=new fo(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):fo.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var d1=B((t9,c1)=>{b();var LM=zi().Reporter,NM=zi().EncoderBuffer,FM=zi().DecoderBuffer,it=Ni(),l1=["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"],jM=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l1),KM=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Oe(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())}c1.exports=Oe;var HM=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Oe.prototype.clone=function(){var e=this._baseState,r={};HM.forEach(function(n){r[n]=e[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};Oe.prototype._wrap=function(){var e=this._baseState;jM.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return e.children.push(n),n[r].apply(n,arguments)}},this)};Oe.prototype._init=function(e){var r=this._baseState;it(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),it.equal(r.children.length,1,"Root node can have only one child")};Oe.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&&(it(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),e.length!==0&&(it(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(s){s==(s|0)&&(s|=0);var y=n[s];a[y]=s}),a}))};KM.forEach(function(t){Oe.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});l1.forEach(function(t){Oe.prototype[t]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return it(r.tag===null),r.tag=t,this._useArgs(i),this}});Oe.prototype.use=function(e){it(e);var r=this._baseState;return it(r.use===null),r.use=e,this};Oe.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};Oe.prototype.def=function(e){var r=this._baseState;return it(r.default===null),r.default=e,r.optional=!0,this};Oe.prototype.explicit=function(e){var r=this._baseState;return it(r.explicit===null&&r.implicit===null),r.explicit=e,this};Oe.prototype.implicit=function(e){var r=this._baseState;return it(r.explicit===null&&r.implicit===null),r.implicit=e,this};Oe.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};Oe.prototype.key=function(e){var r=this._baseState;return it(r.key===null),r.key=e,this};Oe.prototype.any=function(){var e=this._baseState;return e.any=!0,this};Oe.prototype.choice=function(e){var r=this._baseState;return it(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};Oe.prototype.contains=function(e){var r=this._baseState;return it(r.use===null),r.contains=e,this};Oe.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,s=null;if(i.key!==null&&(s=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 w=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(w)}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 w=e.save();var T=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(T))return T;i.any?n=e.raw(w):e=T}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(W){W._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var O=new FM(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(O,r)}}return i.obj&&a&&(n=e.leaveObject(S)),i.key!==null&&(n!==null||a===!0)?e.leaveKey(s,i.key,n):s!==null&&e.exitKey(s),n};Oe.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)};Oe.prototype._getUse=function(e,r){var i=this._baseState;return i.useDecoder=this._use(e,r),it(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};Oe.prototype._decodeChoice=function(e,r){var i=this._baseState,n=null,a=!1;return Object.keys(i.choice).some(function(s){var y=e.save(),w=i.choice[s];try{var S=w._decode(e,r);if(e.isError(S))return!1;n={type:s,value:S},a=!0}catch{return e.restore(y),!1}return!0},this),a?n:e.error("Choice not matched")};Oe.prototype._createEncoderBuffer=function(e){return new NM(e,this.reporter)};Oe.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}};Oe.prototype._encodeValue=function(e,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,r||new LM);var w=null;if(this.reporter=r,n.optional&&e===void 0)if(n.default!==null)e=n.default;else return;var a=null,s=!1;if(n.any)w=this._createEncoderBuffer(e);else if(n.choice)w=this._encodeChoice(e,r);else if(n.contains)a=this._getUse(n.contains,i)._encode(e,r),s=!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 T=r.enterKey(q._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var O=q._encode(e[q._baseState.key],r,e);return r.leaveKey(T),O},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 T=this._baseState;return this._getUse(T.args[0],e)._encode(q,r)},y))}else n.use!==null?w=this._getUse(n.use,i)._encode(e,r):(a=this._encodePrimitive(n.tag,e),s=!0);var w;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&&(w=this._encodeComposite(S,s,A,a))}return n.explicit!==null&&(w=this._encodeComposite(n.explicit,!1,"context",w)),w};Oe.prototype._encodeChoice=function(e,r){var i=this._baseState,n=i.choice[e.type];return n||it(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,r)};Oe.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)};Oe.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};Oe.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var zi=B(p1=>{b();var Xa=p1;Xa.Reporter=h1().Reporter;Xa.DecoderBuffer=Hu().DecoderBuffer;Xa.EncoderBuffer=Hu().EncoderBuffer;Xa.Node=d1()});var y1=B(si=>{b();var v1=Wu();si.tagClass={0:"universal",1:"application",2:"context",3:"private"};si.tagClassByName=v1._reverse(si.tagClass);si.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"};si.tagByName=v1._reverse(si.tag)});var Wu=B(m1=>{b();var g1=m1;g1._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};g1.der=y1()});var Vu=B((u9,x1)=>{b();var WM=H(),Gu=$i(),Qa=Gu.base,GM=Gu.bignum,b1=Gu.constants.der;function w1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new ft,this.tree._init(t.body)}x1.exports=w1;w1.prototype.decode=function(e,r){return e instanceof Qa.DecoderBuffer||(e=new Qa.DecoderBuffer(e,r)),this.tree._decode(e,r)};function ft(t){Qa.Node.call(this,"der",t)}WM(ft,Qa.Node);ft.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;var n=e.save(),a=$u(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)};ft.prototype._decodeTag=function(e,r,i){var n=$u(e,'Failed to decode tag of "'+r+'"');if(e.isError(n))return n;var a=_1(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 s=e.save(),y=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(y)?y:(a=e.offset-s.offset,e.restore(s),e.skip(a,'Failed to match body of: "'+r+'"'))};ft.prototype._skipUntilEnd=function(e,r){for(;;){var i=$u(e,r);if(e.isError(i))return i;var n=_1(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}};ft.prototype._decodeList=function(e,r,i,n){for(var a=[];!e.isEmpty();){var s=this._peekTag(e,"end");if(e.isError(s))return s;var y=i.decode(e,"der",n);if(e.isError(y)&&s)break;a.push(y)}return a};ft.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="",s=0;s<n.length/2;s++)a+=String.fromCharCode(n.readUInt16BE(s*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 w=e.raw().toString("ascii");return this._isPrintstr(w)?w: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")}};ft.prototype._decodeObjid=function(e,r,i){for(var n,a=[],s=0;!e.isEmpty();){var y=e.readUInt8();s<<=7,s|=y&127,(y&128)===0&&(a.push(s),s=0)}y&128&&a.push(s);var w=a[0]/40|0,S=a[0]%40;if(i?n=a:n=[w,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};ft.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,s=i.slice(6,8)|0,y=i.slice(8,10)|0,w=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,s=i.slice(4,6)|0,y=i.slice(6,8)|0,w=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,s,y,w,S,0)};ft.prototype._decodeNull=function(e){return null};ft.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};ft.prototype._decodeInt=function(e,r){var i=e.raw(),n=new GM(i);return r&&(n=r[n.toString(10)]||n),n};ft.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function $u(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=b1.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 s=b1.tag[r];return{cls:i,primitive:n,tag:r,tagStr:s}}function _1(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 s=t.readUInt8(r);if(t.isError(s))return s;i|=s}return i}});var E1=B((l9,M1)=>{b();var $M=H(),VM=rt().Buffer,zu=Vu();function Zu(t){zu.call(this,t),this.enc="pem"}$M(Zu,zu);M1.exports=Zu;Zu.prototype.decode=function(e,r){for(var i=e.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,y=-1,w=0;w<i.length;w++){var S=i[w].match(a);if(S!==null&&S[2]===n)if(s===-1){if(S[1]!=="BEGIN")break;s=w}else{if(S[1]!=="END")break;y=w;break}}if(s===-1||y===-1)throw new Error("PEM section not found for: "+n);var A=i.slice(s+1,y).join("");A.replace(/[^a-z0-9\+\/=]+/gi,"");var q=new VM(A,"base64");return zu.prototype.decode.call(this,q,r)}});var A1=B(B1=>{b();var S1=B1;S1.der=Vu();S1.pem=E1()});var Ju=B((v9,T1)=>{b();var zM=H(),ir=rt().Buffer,R1=$i(),q1=R1.base,Yu=R1.constants.der;function k1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new St,this.tree._init(t.body)}T1.exports=k1;k1.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function St(t){q1.Node.call(this,"der",t)}zM(St,q1.Node);St.prototype._encodeComposite=function(e,r,i,n){var a=ZM(e,r,i,this.reporter);if(n.length<128){var w=new ir(2);return w[0]=a,w[1]=n.length,this._createEncoderBuffer([w,n])}for(var s=1,y=n.length;y>=256;y>>=8)s++;var w=new ir(2+s);w[0]=a,w[1]=128|s;for(var y=1+s,S=n.length;S>0;y--,S>>=8)w[y]=S&255;return this._createEncoderBuffer([w,n])};St.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var i=new ir(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")};St.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 s=e[n];for(a++;s>=128;s>>=7)a++}for(var y=new ir(a),w=y.length-1,n=e.length-1;n>=0;n--){var s=e[n];for(y[w--]=s&127;(s>>=7)>0;)y[w--]=128|s&127}return this._createEncoderBuffer(y)};function mt(t){return t<10?"0"+t:t}St.prototype._encodeTime=function(e,r){var i,n=new Date(e);return r==="gentime"?i=[mt(n.getFullYear()),mt(n.getUTCMonth()+1),mt(n.getUTCDate()),mt(n.getUTCHours()),mt(n.getUTCMinutes()),mt(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[mt(n.getFullYear()%100),mt(n.getUTCMonth()+1),mt(n.getUTCDate()),mt(n.getUTCHours()),mt(n.getUTCMinutes()),mt(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};St.prototype._encodeNull=function(){return this._createEncoderBuffer("")};St.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"&&!ir.isBuffer(e)){var i=e.toArray();!e.sign&&i[0]&128&&i.unshift(0),e=new ir(i)}if(ir.isBuffer(e)){var n=e.length;e.length===0&&n++;var s=new ir(n);return e.copy(s),e.length===0&&(s[0]=0),this._createEncoderBuffer(s)}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 s=new Array(n),a=s.length-1;a>=0;a--)s[a]=e&255,e>>=8;return s[0]&128&&s.unshift(0),this._createEncoderBuffer(new ir(s))};St.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};St.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};St.prototype._skipDefault=function(e,r,i){var n=this._baseState,a;if(n.default===null)return!1;var s=e.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),s.length!==n.defaultBuffer.length)return!1;for(a=0;a<s.length;a++)if(s[a]!==n.defaultBuffer[a])return!1;return!0};function ZM(t,e,r,i){var n;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),Yu.tagByName.hasOwnProperty(t))n=Yu.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|=Yu.tagClassByName[r||"universal"]<<6,n)}});var C1=B((g9,I1)=>{b();var YM=H(),Xu=Ju();function Qu(t){Xu.call(this,t),this.enc="pem"}YM(Qu,Xu);I1.exports=Qu;Qu.prototype.encode=function(e,r){for(var i=Xu.prototype.encode.call(this,e),n=i.toString("base64"),a=["-----BEGIN "+r.label+"-----"],s=0;s<n.length;s+=64)a.push(n.slice(s,s+64));return a.push("-----END "+r.label+"-----"),a.join(`
14
- `)}});var P1=B(D1=>{b();var O1=D1;O1.der=Ju();O1.pem=C1()});var $i=B(U1=>{b();var Zi=U1;Zi.bignum=vr();Zi.define=s1().define;Zi.base=zi();Zi.constants=Wu();Zi.decoders=A1();Zi.encoders=P1()});var j1=B((M9,F1)=>{"use strict";b();var Bt=$i(),L1=Bt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),JM=Bt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),eh=Bt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),XM=Bt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(eh),this.key("subjectPublicKey").bitstr())}),QM=Bt.define("RelativeDistinguishedName",function(){this.setof(JM)}),e4=Bt.define("RDNSequence",function(){this.seqof(QM)}),N1=Bt.define("Name",function(){this.choice({rdnSequence:this.use(e4)})}),t4=Bt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(L1),this.key("notAfter").use(L1))}),r4=Bt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),i4=Bt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(eh),this.key("issuer").use(N1),this.key("validity").use(t4),this.key("subject").use(N1),this.key("subjectPublicKeyInfo").use(XM),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(r4).optional())}),n4=Bt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(i4),this.key("signatureAlgorithm").use(eh),this.key("signatureValue").bitstr())});F1.exports=n4});var H1=B(Rt=>{"use strict";b();var At=$i();Rt.certificate=j1();var o4=At.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())});Rt.RSAPrivateKey=o4;var a4=At.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Rt.RSAPublicKey=a4;var K1=At.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())}),f4=At.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(K1),this.key("subjectPublicKey").bitstr())});Rt.PublicKey=f4;var s4=At.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(K1),this.key("subjectPrivateKey").octstr())});Rt.PrivateKey=s4;var u4=At.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())});Rt.EncryptedPrivateKey=u4;var h4=At.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())});Rt.DSAPrivateKey=h4;Rt.DSAparam=At.define("DSAparam",function(){this.int()});var l4=At.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),c4=At.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l4),this.key("publicKey").optional().explicit(1).bitstr())});Rt.ECPrivateKey=c4;Rt.signature=At.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var W1=B((A9,d4)=>{d4.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 $1=B((R9,G1)=>{"use strict";b();var p4=/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,v4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,y4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,g4=no(),m4=Va(),ef=Me().Buffer;G1.exports=function(t,e){var r=t.toString(),i=r.match(p4),n;if(i){var s="aes"+i[1],y=ef.from(i[2],"hex"),w=ef.from(i[3].replace(/[\r\n]/g,""),"base64"),S=g4(e,y.slice(0,8),parseInt(i[1],10)).key,A=[],q=m4.createDecipheriv(s,S,y);A.push(q.update(w)),A.push(q.final()),n=ef.concat(A)}else{var a=r.match(y4);n=ef.from(a[2].replace(/[\r\n]/g,""),"base64")}var T=r.match(v4)[1];return{tag:T,data:n}}});var rh=B((k9,z1)=>{"use strict";b();var at=H1(),b4=W1(),w4=$1(),_4=Va(),x4=hu().pbkdf2Sync,th=Me().Buffer;function M4(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=b4[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,s=t.subjectPrivateKey,y=parseInt(n.split("-")[1],10)/8,w=x4(e,r,i,y,"sha1"),S=_4.createDecipheriv(n,w,a),A=[];return A.push(S.update(s)),A.push(S.final()),th.concat(A)}function V1(t){var e;typeof t=="object"&&!th.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=th.from(t));var r=w4(t,e),i=r.tag,n=r.data,a,s;switch(i){case"CERTIFICATE":s=at.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(s||(s=at.PublicKey.decode(n,"der")),a=s.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return at.RSAPublicKey.decode(s.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return s.subjectPrivateKey=s.subjectPublicKey,{type:"ec",data:s};case"1.2.840.10040.4.1":return s.algorithm.params.pub_key=at.DSAparam.decode(s.subjectPublicKey.data,"der"),{type:"dsa",data:s.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":n=at.EncryptedPrivateKey.decode(n,"der"),n=M4(n,e);case"PRIVATE KEY":switch(s=at.PrivateKey.decode(n,"der"),a=s.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return at.RSAPrivateKey.decode(s.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:s.algorithm.curve,privateKey:at.ECPrivateKey.decode(s.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return s.algorithm.params.priv_key=at.DSAparam.decode(s.subjectPrivateKey,"der"),{type:"dsa",params:s.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return at.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return at.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:at.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=at.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}V1.signature=at.signature;z1.exports=V1});var nh=B((I9,Z1)=>{b();var E4=Yn(),ih=Me().Buffer;Z1.exports=function(t,e){for(var r=ih.alloc(0),i=0,n;r.length<e;)n=S4(i++),r=ih.concat([r,E4("sha1").update(t).update(n).digest()]);return r.slice(0,e)};function S4(t){var e=ih.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var oh=B((O9,Y1)=>{b();Y1.exports=function(e,r){for(var i=e.length,n=-1;++n<i;)e[n]^=r[n];return e}});var ah=B((P9,X1)=>{b();var J1=vr(),B4=Me().Buffer;function A4(t,e){return B4.from(t.toRed(J1.mont(e.modulus)).redPow(new J1(e.publicExponent)).fromRed().toArray())}X1.exports=A4});var eg=B((Q1,fh)=>{b();(function(t,e){"use strict";function r(c,o){if(!c)throw new Error(o||"Assertion failed")}function i(c,o){c.super_=o;var u=function(){};u.prototype=o.prototype,c.prototype=new u,c.prototype.constructor=c}function n(c,o,u){if(n.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((o==="le"||o==="be")&&(u=o,o=10),this._init(c||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=rt().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 v=0;o[0]==="-"&&(v++,this.negative=1),v<o.length&&(u===16?this._parseHex(o,v,d):(this._parseBase(o,u,v),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 v=0;v<this.length;v++)this.words[v]=0;var p,f,m=0;if(d==="be")for(v=o.length-1,p=0;v>=0;v-=3)f=o[v]|o[v-1]<<8|o[v-2]<<16,this.words[p]|=f<<m&67108863,this.words[p+1]=f>>>26-m&67108863,m+=24,m>=26&&(m-=26,p++);else if(d==="le")for(v=0,p=0;v<o.length;v+=3)f=o[v]|o[v+1]<<8|o[v+2]<<16,this.words[p]|=f<<m&67108863,this.words[p+1]=f>>>26-m&67108863,m+=24,m>=26&&(m-=26,p++);return this._strip()};function s(c,o){var u=c.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 "+c)}function y(c,o,u){var d=s(c,u);return u-1>=o&&(d|=s(c,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 v=0;v<this.length;v++)this.words[v]=0;var p=0,f=0,m;if(d==="be")for(v=o.length-1;v>=u;v-=2)m=y(o,u,v)<<p,this.words[f]|=m&67108863,p>=18?(p-=18,f+=1,this.words[f]|=m>>>26):p+=8;else{var _=o.length-u;for(v=_%2===0?u+1:u;v<o.length;v+=2)m=y(o,u,v)<<p,this.words[f]|=m&67108863,p>=18?(p-=18,f+=1,this.words[f]|=m>>>26):p+=8}this._strip()};function w(c,o,u,d){for(var v=0,p=0,f=Math.min(c.length,u),m=o;m<f;m++){var _=c.charCodeAt(m)-48;v*=d,_>=49?p=_-49+10:_>=17?p=_-17+10:p=_,r(_>=0&&p<d,"Invalid character"),v+=p}return v}n.prototype._parseBase=function(o,u,d){this.words=[0],this.length=1;for(var v=0,p=1;p<=67108863;p*=u)v++;v--,p=p/u|0;for(var f=o.length-d,m=f%v,_=Math.min(f,f-m)+d,l=0,x=d;x<_;x+=v)l=w(o,x,x+v,u),this.imuln(p),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(m!==0){var I=1;for(l=w(o,x,o.length,u),x=0;x<m;x++)I*=u;this.imuln(I),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}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(c,o){c.words=o.words,c.length=o.length,c.negative=o.negative,c.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"],T=[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],O=[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 v=0,p=0,f=0;f<this.length;f++){var m=this.words[f],_=((m<<v|p)&16777215).toString(16);p=m>>>24-v&16777215,v+=2,v>=26&&(v-=26,f--),p!==0||f!==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 l=T[o],x=O[o];d="";var I=this.clone();for(I.negative=0;!I.isZero();){var D=I.modrn(x).toString(o);I=I.idivn(x),I.isZero()?d=D+d:d=q[l-D.length]+D+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 P=function(o,u){return o.allocUnsafe?o.allocUnsafe(u):new o(u)};n.prototype.toArrayLike=function(o,u,d){this._strip();var v=this.byteLength(),p=d||Math.max(1,v);r(v<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0");var f=P(o,p),m=u==="le"?"LE":"BE";return this["_toArrayLike"+m](f,v),f},n.prototype._toArrayLikeLE=function(o,u){for(var d=0,v=0,p=0,f=0;p<this.length;p++){var m=this.words[p]<<f|v;o[d++]=m&255,d<o.length&&(o[d++]=m>>8&255),d<o.length&&(o[d++]=m>>16&255),f===6?(d<o.length&&(o[d++]=m>>24&255),v=0,f=0):(v=m>>>24,f+=2)}if(d<o.length)for(o[d++]=v;d<o.length;)o[d++]=0},n.prototype._toArrayLikeBE=function(o,u){for(var d=o.length-1,v=0,p=0,f=0;p<this.length;p++){var m=this.words[p]<<f|v;o[d--]=m&255,d>=0&&(o[d--]=m>>8&255),d>=0&&(o[d--]=m>>16&255),f===6?(d>=0&&(o[d--]=m>>24&255),v=0,f=0):(v=m>>>24,f+=2)}if(d>=0)for(o[d--]=v;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 W(c){for(var o=new Array(c.bitLength()),u=0;u<o.length;u++){var d=u/26|0,v=u%26;o[u]=c.words[d]>>>v&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 v=0;v<d.length;v++)this.words[v]=u.words[v]^d.words[v];if(this!==u)for(;v<u.length;v++)this.words[v]=u.words[v];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 v=0;v<u;v++)this.words[v]=~this.words[v]&67108863;return d>0&&(this.words[v]=~this.words[v]&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,v=o%26;return this._expand(d+1),u?this.words[d]=this.words[d]|1<<v:this.words[d]=this.words[d]&~(1<<v),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,v;this.length>o.length?(d=this,v=o):(d=o,v=this);for(var p=0,f=0;f<v.length;f++)u=(d.words[f]|0)+(v.words[f]|0)+p,this.words[f]=u&67108863,p=u>>>26;for(;p!==0&&f<d.length;f++)u=(d.words[f]|0)+p,this.words[f]=u&67108863,p=u>>>26;if(this.length=d.length,p!==0)this.words[this.length]=p,this.length++;else if(d!==this)for(;f<d.length;f++)this.words[f]=d.words[f];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 v,p;d>0?(v=this,p=o):(v=o,p=this);for(var f=0,m=0;m<p.length;m++)u=(v.words[m]|0)-(p.words[m]|0)+f,f=u>>26,this.words[m]=u&67108863;for(;f!==0&&m<v.length;m++)u=(v.words[m]|0)+f,f=u>>26,this.words[m]=u&67108863;if(f===0&&m<v.length&&v!==this)for(;m<v.length;m++)this.words[m]=v.words[m];return this.length=Math.max(this.length,m),v!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(o){return this.clone().isub(o)};function ke(c,o,u){u.negative=o.negative^c.negative;var d=c.length+o.length|0;u.length=d,d=d-1|0;var v=c.words[0]|0,p=o.words[0]|0,f=v*p,m=f&67108863,_=f/67108864|0;u.words[0]=m;for(var l=1;l<d;l++){for(var x=_>>>26,I=_&67108863,D=Math.min(l,o.length-1),C=Math.max(0,l-c.length+1);C<=D;C++){var L=l-C|0;v=c.words[L]|0,p=o.words[C]|0,f=v*p+I,x+=f/67108864|0,I=f&67108863}u.words[l]=I|0,_=x|0}return _!==0?u.words[l]=_|0:u.length--,u._strip()}var j=function(o,u,d){var v=o.words,p=u.words,f=d.words,m=0,_,l,x,I=v[0]|0,D=I&8191,C=I>>>13,L=v[1]|0,U=L&8191,N=L>>>13,bt=v[2]|0,F=bt&8191,K=bt>>>13,Ji=v[3]|0,G=Ji&8191,$=Ji>>>13,Xi=v[4]|0,V=Xi&8191,z=Xi>>>13,Qi=v[5]|0,Z=Qi&8191,Y=Qi>>>13,en=v[6]|0,J=en&8191,X=en>>>13,tn=v[7]|0,Q=tn&8191,ee=tn>>>13,rn=v[8]|0,te=rn&8191,re=rn>>>13,nn=v[9]|0,ie=nn&8191,ne=nn>>>13,on=p[0]|0,oe=on&8191,ae=on>>>13,an=p[1]|0,fe=an&8191,se=an>>>13,fn=p[2]|0,ue=fn&8191,he=fn>>>13,sn=p[3]|0,le=sn&8191,ce=sn>>>13,un=p[4]|0,de=un&8191,pe=un>>>13,hn=p[5]|0,ve=hn&8191,ye=hn>>>13,ln=p[6]|0,ge=ln&8191,me=ln>>>13,cn=p[7]|0,be=cn&8191,we=cn>>>13,dn=p[8]|0,_e=dn&8191,xe=dn>>>13,hi=p[9]|0,Ue=hi&8191,Le=hi>>>13;d.negative=o.negative^u.negative,d.length=19,_=Math.imul(D,oe),l=Math.imul(D,ae),l=l+Math.imul(C,oe)|0,x=Math.imul(C,ae);var gr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(gr>>>26)|0,gr&=67108863,_=Math.imul(U,oe),l=Math.imul(U,ae),l=l+Math.imul(N,oe)|0,x=Math.imul(N,ae),_=_+Math.imul(D,fe)|0,l=l+Math.imul(D,se)|0,l=l+Math.imul(C,fe)|0,x=x+Math.imul(C,se)|0;var mr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(mr>>>26)|0,mr&=67108863,_=Math.imul(F,oe),l=Math.imul(F,ae),l=l+Math.imul(K,oe)|0,x=Math.imul(K,ae),_=_+Math.imul(U,fe)|0,l=l+Math.imul(U,se)|0,l=l+Math.imul(N,fe)|0,x=x+Math.imul(N,se)|0,_=_+Math.imul(D,ue)|0,l=l+Math.imul(D,he)|0,l=l+Math.imul(C,ue)|0,x=x+Math.imul(C,he)|0;var br=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(br>>>26)|0,br&=67108863,_=Math.imul(G,oe),l=Math.imul(G,ae),l=l+Math.imul($,oe)|0,x=Math.imul($,ae),_=_+Math.imul(F,fe)|0,l=l+Math.imul(F,se)|0,l=l+Math.imul(K,fe)|0,x=x+Math.imul(K,se)|0,_=_+Math.imul(U,ue)|0,l=l+Math.imul(U,he)|0,l=l+Math.imul(N,ue)|0,x=x+Math.imul(N,he)|0,_=_+Math.imul(D,le)|0,l=l+Math.imul(D,ce)|0,l=l+Math.imul(C,le)|0,x=x+Math.imul(C,ce)|0;var wr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(wr>>>26)|0,wr&=67108863,_=Math.imul(V,oe),l=Math.imul(V,ae),l=l+Math.imul(z,oe)|0,x=Math.imul(z,ae),_=_+Math.imul(G,fe)|0,l=l+Math.imul(G,se)|0,l=l+Math.imul($,fe)|0,x=x+Math.imul($,se)|0,_=_+Math.imul(F,ue)|0,l=l+Math.imul(F,he)|0,l=l+Math.imul(K,ue)|0,x=x+Math.imul(K,he)|0,_=_+Math.imul(U,le)|0,l=l+Math.imul(U,ce)|0,l=l+Math.imul(N,le)|0,x=x+Math.imul(N,ce)|0,_=_+Math.imul(D,de)|0,l=l+Math.imul(D,pe)|0,l=l+Math.imul(C,de)|0,x=x+Math.imul(C,pe)|0;var _r=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(_r>>>26)|0,_r&=67108863,_=Math.imul(Z,oe),l=Math.imul(Z,ae),l=l+Math.imul(Y,oe)|0,x=Math.imul(Y,ae),_=_+Math.imul(V,fe)|0,l=l+Math.imul(V,se)|0,l=l+Math.imul(z,fe)|0,x=x+Math.imul(z,se)|0,_=_+Math.imul(G,ue)|0,l=l+Math.imul(G,he)|0,l=l+Math.imul($,ue)|0,x=x+Math.imul($,he)|0,_=_+Math.imul(F,le)|0,l=l+Math.imul(F,ce)|0,l=l+Math.imul(K,le)|0,x=x+Math.imul(K,ce)|0,_=_+Math.imul(U,de)|0,l=l+Math.imul(U,pe)|0,l=l+Math.imul(N,de)|0,x=x+Math.imul(N,pe)|0,_=_+Math.imul(D,ve)|0,l=l+Math.imul(D,ye)|0,l=l+Math.imul(C,ve)|0,x=x+Math.imul(C,ye)|0;var xr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(xr>>>26)|0,xr&=67108863,_=Math.imul(J,oe),l=Math.imul(J,ae),l=l+Math.imul(X,oe)|0,x=Math.imul(X,ae),_=_+Math.imul(Z,fe)|0,l=l+Math.imul(Z,se)|0,l=l+Math.imul(Y,fe)|0,x=x+Math.imul(Y,se)|0,_=_+Math.imul(V,ue)|0,l=l+Math.imul(V,he)|0,l=l+Math.imul(z,ue)|0,x=x+Math.imul(z,he)|0,_=_+Math.imul(G,le)|0,l=l+Math.imul(G,ce)|0,l=l+Math.imul($,le)|0,x=x+Math.imul($,ce)|0,_=_+Math.imul(F,de)|0,l=l+Math.imul(F,pe)|0,l=l+Math.imul(K,de)|0,x=x+Math.imul(K,pe)|0,_=_+Math.imul(U,ve)|0,l=l+Math.imul(U,ye)|0,l=l+Math.imul(N,ve)|0,x=x+Math.imul(N,ye)|0,_=_+Math.imul(D,ge)|0,l=l+Math.imul(D,me)|0,l=l+Math.imul(C,ge)|0,x=x+Math.imul(C,me)|0;var Mr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,_=Math.imul(Q,oe),l=Math.imul(Q,ae),l=l+Math.imul(ee,oe)|0,x=Math.imul(ee,ae),_=_+Math.imul(J,fe)|0,l=l+Math.imul(J,se)|0,l=l+Math.imul(X,fe)|0,x=x+Math.imul(X,se)|0,_=_+Math.imul(Z,ue)|0,l=l+Math.imul(Z,he)|0,l=l+Math.imul(Y,ue)|0,x=x+Math.imul(Y,he)|0,_=_+Math.imul(V,le)|0,l=l+Math.imul(V,ce)|0,l=l+Math.imul(z,le)|0,x=x+Math.imul(z,ce)|0,_=_+Math.imul(G,de)|0,l=l+Math.imul(G,pe)|0,l=l+Math.imul($,de)|0,x=x+Math.imul($,pe)|0,_=_+Math.imul(F,ve)|0,l=l+Math.imul(F,ye)|0,l=l+Math.imul(K,ve)|0,x=x+Math.imul(K,ye)|0,_=_+Math.imul(U,ge)|0,l=l+Math.imul(U,me)|0,l=l+Math.imul(N,ge)|0,x=x+Math.imul(N,me)|0,_=_+Math.imul(D,be)|0,l=l+Math.imul(D,we)|0,l=l+Math.imul(C,be)|0,x=x+Math.imul(C,we)|0;var Er=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Er>>>26)|0,Er&=67108863,_=Math.imul(te,oe),l=Math.imul(te,ae),l=l+Math.imul(re,oe)|0,x=Math.imul(re,ae),_=_+Math.imul(Q,fe)|0,l=l+Math.imul(Q,se)|0,l=l+Math.imul(ee,fe)|0,x=x+Math.imul(ee,se)|0,_=_+Math.imul(J,ue)|0,l=l+Math.imul(J,he)|0,l=l+Math.imul(X,ue)|0,x=x+Math.imul(X,he)|0,_=_+Math.imul(Z,le)|0,l=l+Math.imul(Z,ce)|0,l=l+Math.imul(Y,le)|0,x=x+Math.imul(Y,ce)|0,_=_+Math.imul(V,de)|0,l=l+Math.imul(V,pe)|0,l=l+Math.imul(z,de)|0,x=x+Math.imul(z,pe)|0,_=_+Math.imul(G,ve)|0,l=l+Math.imul(G,ye)|0,l=l+Math.imul($,ve)|0,x=x+Math.imul($,ye)|0,_=_+Math.imul(F,ge)|0,l=l+Math.imul(F,me)|0,l=l+Math.imul(K,ge)|0,x=x+Math.imul(K,me)|0,_=_+Math.imul(U,be)|0,l=l+Math.imul(U,we)|0,l=l+Math.imul(N,be)|0,x=x+Math.imul(N,we)|0,_=_+Math.imul(D,_e)|0,l=l+Math.imul(D,xe)|0,l=l+Math.imul(C,_e)|0,x=x+Math.imul(C,xe)|0;var Sr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,_=Math.imul(ie,oe),l=Math.imul(ie,ae),l=l+Math.imul(ne,oe)|0,x=Math.imul(ne,ae),_=_+Math.imul(te,fe)|0,l=l+Math.imul(te,se)|0,l=l+Math.imul(re,fe)|0,x=x+Math.imul(re,se)|0,_=_+Math.imul(Q,ue)|0,l=l+Math.imul(Q,he)|0,l=l+Math.imul(ee,ue)|0,x=x+Math.imul(ee,he)|0,_=_+Math.imul(J,le)|0,l=l+Math.imul(J,ce)|0,l=l+Math.imul(X,le)|0,x=x+Math.imul(X,ce)|0,_=_+Math.imul(Z,de)|0,l=l+Math.imul(Z,pe)|0,l=l+Math.imul(Y,de)|0,x=x+Math.imul(Y,pe)|0,_=_+Math.imul(V,ve)|0,l=l+Math.imul(V,ye)|0,l=l+Math.imul(z,ve)|0,x=x+Math.imul(z,ye)|0,_=_+Math.imul(G,ge)|0,l=l+Math.imul(G,me)|0,l=l+Math.imul($,ge)|0,x=x+Math.imul($,me)|0,_=_+Math.imul(F,be)|0,l=l+Math.imul(F,we)|0,l=l+Math.imul(K,be)|0,x=x+Math.imul(K,we)|0,_=_+Math.imul(U,_e)|0,l=l+Math.imul(U,xe)|0,l=l+Math.imul(N,_e)|0,x=x+Math.imul(N,xe)|0,_=_+Math.imul(D,Ue)|0,l=l+Math.imul(D,Le)|0,l=l+Math.imul(C,Ue)|0,x=x+Math.imul(C,Le)|0;var Br=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Br>>>26)|0,Br&=67108863,_=Math.imul(ie,fe),l=Math.imul(ie,se),l=l+Math.imul(ne,fe)|0,x=Math.imul(ne,se),_=_+Math.imul(te,ue)|0,l=l+Math.imul(te,he)|0,l=l+Math.imul(re,ue)|0,x=x+Math.imul(re,he)|0,_=_+Math.imul(Q,le)|0,l=l+Math.imul(Q,ce)|0,l=l+Math.imul(ee,le)|0,x=x+Math.imul(ee,ce)|0,_=_+Math.imul(J,de)|0,l=l+Math.imul(J,pe)|0,l=l+Math.imul(X,de)|0,x=x+Math.imul(X,pe)|0,_=_+Math.imul(Z,ve)|0,l=l+Math.imul(Z,ye)|0,l=l+Math.imul(Y,ve)|0,x=x+Math.imul(Y,ye)|0,_=_+Math.imul(V,ge)|0,l=l+Math.imul(V,me)|0,l=l+Math.imul(z,ge)|0,x=x+Math.imul(z,me)|0,_=_+Math.imul(G,be)|0,l=l+Math.imul(G,we)|0,l=l+Math.imul($,be)|0,x=x+Math.imul($,we)|0,_=_+Math.imul(F,_e)|0,l=l+Math.imul(F,xe)|0,l=l+Math.imul(K,_e)|0,x=x+Math.imul(K,xe)|0,_=_+Math.imul(U,Ue)|0,l=l+Math.imul(U,Le)|0,l=l+Math.imul(N,Ue)|0,x=x+Math.imul(N,Le)|0;var Ar=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,_=Math.imul(ie,ue),l=Math.imul(ie,he),l=l+Math.imul(ne,ue)|0,x=Math.imul(ne,he),_=_+Math.imul(te,le)|0,l=l+Math.imul(te,ce)|0,l=l+Math.imul(re,le)|0,x=x+Math.imul(re,ce)|0,_=_+Math.imul(Q,de)|0,l=l+Math.imul(Q,pe)|0,l=l+Math.imul(ee,de)|0,x=x+Math.imul(ee,pe)|0,_=_+Math.imul(J,ve)|0,l=l+Math.imul(J,ye)|0,l=l+Math.imul(X,ve)|0,x=x+Math.imul(X,ye)|0,_=_+Math.imul(Z,ge)|0,l=l+Math.imul(Z,me)|0,l=l+Math.imul(Y,ge)|0,x=x+Math.imul(Y,me)|0,_=_+Math.imul(V,be)|0,l=l+Math.imul(V,we)|0,l=l+Math.imul(z,be)|0,x=x+Math.imul(z,we)|0,_=_+Math.imul(G,_e)|0,l=l+Math.imul(G,xe)|0,l=l+Math.imul($,_e)|0,x=x+Math.imul($,xe)|0,_=_+Math.imul(F,Ue)|0,l=l+Math.imul(F,Le)|0,l=l+Math.imul(K,Ue)|0,x=x+Math.imul(K,Le)|0;var Rr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,_=Math.imul(ie,le),l=Math.imul(ie,ce),l=l+Math.imul(ne,le)|0,x=Math.imul(ne,ce),_=_+Math.imul(te,de)|0,l=l+Math.imul(te,pe)|0,l=l+Math.imul(re,de)|0,x=x+Math.imul(re,pe)|0,_=_+Math.imul(Q,ve)|0,l=l+Math.imul(Q,ye)|0,l=l+Math.imul(ee,ve)|0,x=x+Math.imul(ee,ye)|0,_=_+Math.imul(J,ge)|0,l=l+Math.imul(J,me)|0,l=l+Math.imul(X,ge)|0,x=x+Math.imul(X,me)|0,_=_+Math.imul(Z,be)|0,l=l+Math.imul(Z,we)|0,l=l+Math.imul(Y,be)|0,x=x+Math.imul(Y,we)|0,_=_+Math.imul(V,_e)|0,l=l+Math.imul(V,xe)|0,l=l+Math.imul(z,_e)|0,x=x+Math.imul(z,xe)|0,_=_+Math.imul(G,Ue)|0,l=l+Math.imul(G,Le)|0,l=l+Math.imul($,Ue)|0,x=x+Math.imul($,Le)|0;var qr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(qr>>>26)|0,qr&=67108863,_=Math.imul(ie,de),l=Math.imul(ie,pe),l=l+Math.imul(ne,de)|0,x=Math.imul(ne,pe),_=_+Math.imul(te,ve)|0,l=l+Math.imul(te,ye)|0,l=l+Math.imul(re,ve)|0,x=x+Math.imul(re,ye)|0,_=_+Math.imul(Q,ge)|0,l=l+Math.imul(Q,me)|0,l=l+Math.imul(ee,ge)|0,x=x+Math.imul(ee,me)|0,_=_+Math.imul(J,be)|0,l=l+Math.imul(J,we)|0,l=l+Math.imul(X,be)|0,x=x+Math.imul(X,we)|0,_=_+Math.imul(Z,_e)|0,l=l+Math.imul(Z,xe)|0,l=l+Math.imul(Y,_e)|0,x=x+Math.imul(Y,xe)|0,_=_+Math.imul(V,Ue)|0,l=l+Math.imul(V,Le)|0,l=l+Math.imul(z,Ue)|0,x=x+Math.imul(z,Le)|0;var kr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(kr>>>26)|0,kr&=67108863,_=Math.imul(ie,ve),l=Math.imul(ie,ye),l=l+Math.imul(ne,ve)|0,x=Math.imul(ne,ye),_=_+Math.imul(te,ge)|0,l=l+Math.imul(te,me)|0,l=l+Math.imul(re,ge)|0,x=x+Math.imul(re,me)|0,_=_+Math.imul(Q,be)|0,l=l+Math.imul(Q,we)|0,l=l+Math.imul(ee,be)|0,x=x+Math.imul(ee,we)|0,_=_+Math.imul(J,_e)|0,l=l+Math.imul(J,xe)|0,l=l+Math.imul(X,_e)|0,x=x+Math.imul(X,xe)|0,_=_+Math.imul(Z,Ue)|0,l=l+Math.imul(Z,Le)|0,l=l+Math.imul(Y,Ue)|0,x=x+Math.imul(Y,Le)|0;var Tr=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,_=Math.imul(ie,ge),l=Math.imul(ie,me),l=l+Math.imul(ne,ge)|0,x=Math.imul(ne,me),_=_+Math.imul(te,be)|0,l=l+Math.imul(te,we)|0,l=l+Math.imul(re,be)|0,x=x+Math.imul(re,we)|0,_=_+Math.imul(Q,_e)|0,l=l+Math.imul(Q,xe)|0,l=l+Math.imul(ee,_e)|0,x=x+Math.imul(ee,xe)|0,_=_+Math.imul(J,Ue)|0,l=l+Math.imul(J,Le)|0,l=l+Math.imul(X,Ue)|0,x=x+Math.imul(X,Le)|0;var Ir=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,_=Math.imul(ie,be),l=Math.imul(ie,we),l=l+Math.imul(ne,be)|0,x=Math.imul(ne,we),_=_+Math.imul(te,_e)|0,l=l+Math.imul(te,xe)|0,l=l+Math.imul(re,_e)|0,x=x+Math.imul(re,xe)|0,_=_+Math.imul(Q,Ue)|0,l=l+Math.imul(Q,Le)|0,l=l+Math.imul(ee,Ue)|0,x=x+Math.imul(ee,Le)|0;var of=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(of>>>26)|0,of&=67108863,_=Math.imul(ie,_e),l=Math.imul(ie,xe),l=l+Math.imul(ne,_e)|0,x=Math.imul(ne,xe),_=_+Math.imul(te,Ue)|0,l=l+Math.imul(te,Le)|0,l=l+Math.imul(re,Ue)|0,x=x+Math.imul(re,Le)|0;var af=(m+_|0)+((l&8191)<<13)|0;m=(x+(l>>>13)|0)+(af>>>26)|0,af&=67108863,_=Math.imul(ie,Ue),l=Math.imul(ie,Le),l=l+Math.imul(ne,Ue)|0,x=Math.imul(ne,Le);var ff=(m+_|0)+((l&8191)<<13)|0;return m=(x+(l>>>13)|0)+(ff>>>26)|0,ff&=67108863,f[0]=gr,f[1]=mr,f[2]=br,f[3]=wr,f[4]=_r,f[5]=xr,f[6]=Mr,f[7]=Er,f[8]=Sr,f[9]=Br,f[10]=Ar,f[11]=Rr,f[12]=qr,f[13]=kr,f[14]=Tr,f[15]=Ir,f[16]=of,f[17]=af,f[18]=ff,m!==0&&(f[19]=m,d.length++),d};Math.imul||(j=ke);function Se(c,o,u){u.negative=o.negative^c.negative,u.length=c.length+o.length;for(var d=0,v=0,p=0;p<u.length-1;p++){var f=v;v=0;for(var m=d&67108863,_=Math.min(p,o.length-1),l=Math.max(0,p-c.length+1);l<=_;l++){var x=p-l,I=c.words[x]|0,D=o.words[l]|0,C=I*D,L=C&67108863;f=f+(C/67108864|0)|0,L=L+m|0,m=L&67108863,f=f+(L>>>26)|0,v+=f>>>26,f&=67108863}u.words[p]=m,d=f,f=v}return d!==0?u.words[p]=d:u.length--,u._strip()}function Fe(c,o,u){return Se(c,o,u)}n.prototype.mulTo=function(o,u){var d,v=this.length+o.length;return this.length===10&&o.length===10?d=j(this,o,u):v<63?d=ke(this,o,u):v<1024?d=Se(this,o,u):d=Fe(this,o,u),d};function je(c,o){this.x=c,this.y=o}je.prototype.makeRBT=function(o){for(var u=new Array(o),d=n.prototype._countBits(o)-1,v=0;v<o;v++)u[v]=this.revBin(v,d,o);return u},je.prototype.revBin=function(o,u,d){if(o===0||o===d-1)return o;for(var v=0,p=0;p<u;p++)v|=(o&1)<<u-p-1,o>>=1;return v},je.prototype.permute=function(o,u,d,v,p,f){for(var m=0;m<f;m++)v[m]=u[o[m]],p[m]=d[o[m]]},je.prototype.transform=function(o,u,d,v,p,f){this.permute(f,o,u,d,v,p);for(var m=1;m<p;m<<=1)for(var _=m<<1,l=Math.cos(2*Math.PI/_),x=Math.sin(2*Math.PI/_),I=0;I<p;I+=_)for(var D=l,C=x,L=0;L<m;L++){var U=d[I+L],N=v[I+L],bt=d[I+L+m],F=v[I+L+m],K=D*bt-C*F;F=D*F+C*bt,bt=K,d[I+L]=U+bt,v[I+L]=N+F,d[I+L+m]=U-bt,v[I+L+m]=N-F,L!==_&&(K=l*D-x*C,C=l*C+x*D,D=K)}},je.prototype.guessLen13b=function(o,u){var d=Math.max(u,o)|1,v=d&1,p=0;for(d=d/2|0;d;d=d>>>1)p++;return 1<<p+1+v},je.prototype.conjugate=function(o,u,d){if(!(d<=1))for(var v=0;v<d/2;v++){var p=o[v];o[v]=o[d-v-1],o[d-v-1]=p,p=u[v],u[v]=-u[d-v-1],u[d-v-1]=-p}},je.prototype.normalize13b=function(o,u){for(var d=0,v=0;v<u/2;v++){var p=Math.round(o[2*v+1]/u)*8192+Math.round(o[2*v]/u)+d;o[v]=p&67108863,p<67108864?d=0:d=p/67108864|0}return o},je.prototype.convert13b=function(o,u,d,v){for(var p=0,f=0;f<u;f++)p=p+(o[f]|0),d[2*f]=p&8191,p=p>>>13,d[2*f+1]=p&8191,p=p>>>13;for(f=2*u;f<v;++f)d[f]=0;r(p===0),r((p&-8192)===0)},je.prototype.stub=function(o){for(var u=new Array(o),d=0;d<o;d++)u[d]=0;return u},je.prototype.mulp=function(o,u,d){var v=2*this.guessLen13b(o.length,u.length),p=this.makeRBT(v),f=this.stub(v),m=new Array(v),_=new Array(v),l=new Array(v),x=new Array(v),I=new Array(v),D=new Array(v),C=d.words;C.length=v,this.convert13b(o.words,o.length,m,v),this.convert13b(u.words,u.length,x,v),this.transform(m,f,_,l,v,p),this.transform(x,f,I,D,v,p);for(var L=0;L<v;L++){var U=_[L]*I[L]-l[L]*D[L];l[L]=_[L]*D[L]+l[L]*I[L],_[L]=U}return this.conjugate(_,l,v),this.transform(_,l,C,f,v,p),this.conjugate(C,f,v),this.normalize13b(C,v),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),Fe(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,v=0;v<this.length;v++){var p=(this.words[v]|0)*o,f=(p&67108863)+(d&67108863);d>>=26,d+=p/67108864|0,d+=f>>>26,this.words[v]=f&67108863}return d!==0&&(this.words[v]=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=W(o);if(u.length===0)return new n(1);for(var d=this,v=0;v<u.length&&u[v]===0;v++,d=d.sqr());if(++v<u.length)for(var p=d.sqr();v<u.length;v++,p=p.sqr())u[v]!==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,v=67108863>>>26-u<<26-u,p;if(u!==0){var f=0;for(p=0;p<this.length;p++){var m=this.words[p]&v,_=(this.words[p]|0)-m<<u;this.words[p]=_|f,f=m>>>26-u}f&&(this.words[p]=f,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 v;u?v=(u-u%26)/26:v=0;var p=o%26,f=Math.min((o-p)/26,this.length),m=67108863^67108863>>>p<<p,_=d;if(v-=f,v=Math.max(0,v),_){for(var l=0;l<f;l++)_.words[l]=this.words[l];_.length=f}if(f!==0)if(this.length>f)for(this.length-=f,l=0;l<this.length;l++)this.words[l]=this.words[l+f];else this.words[0]=0,this.length=1;var x=0;for(l=this.length-1;l>=0&&(x!==0||l>=v);l--){var I=this.words[l]|0;this.words[l]=x<<26-p|I>>>p,x=I&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,v=1<<u;if(this.length<=d)return!1;var p=this.words[d];return!!(p&v)},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 v=67108863^67108863>>>u<<u;this.words[this.length-1]&=v}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 v=o.length+d,p;this._expand(v);var f,m=0;for(p=0;p<o.length;p++){f=(this.words[p+d]|0)+m;var _=(o.words[p]|0)*u;f-=_&67108863,m=(f>>26)-(_/67108864|0),this.words[p+d]=f&67108863}for(;p<this.length-d;p++)f=(this.words[p+d]|0)+m,m=f>>26,this.words[p+d]=f&67108863;if(m===0)return this._strip();for(r(m===-1),m=0,p=0;p<this.length;p++)f=-(this.words[p]|0)+m,m=f>>26,this.words[p]=f&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(o,u){var d=this.length-o.length,v=this.clone(),p=o,f=p.words[p.length-1]|0,m=this._countBits(f);d=26-m,d!==0&&(p=p.ushln(d),v.iushln(d),f=p.words[p.length-1]|0);var _=v.length-p.length,l;if(u!=="mod"){l=new n(null),l.length=_+1,l.words=new Array(l.length);for(var x=0;x<l.length;x++)l.words[x]=0}var I=v.clone()._ishlnsubmul(p,1,_);I.negative===0&&(v=I,l&&(l.words[_]=1));for(var D=_-1;D>=0;D--){var C=(v.words[p.length+D]|0)*67108864+(v.words[p.length+D-1]|0);for(C=Math.min(C/f|0,67108863),v._ishlnsubmul(p,C,D);v.negative!==0;)C--,v.negative=0,v._ishlnsubmul(p,1,D),v.isZero()||(v.negative^=1);l&&(l.words[D]=C)}return l&&l._strip(),v._strip(),u!=="div"&&d!==0&&v.iushrn(d),{div:l||null,mod:v}},n.prototype.divmod=function(o,u,d){if(r(!o.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var v,p,f;return this.negative!==0&&o.negative===0?(f=this.neg().divmod(o,u),u!=="mod"&&(v=f.div.neg()),u!=="div"&&(p=f.mod.neg(),d&&p.negative!==0&&p.iadd(o)),{div:v,mod:p}):this.negative===0&&o.negative!==0?(f=this.divmod(o.neg(),u),u!=="mod"&&(v=f.div.neg()),{div:v,mod:f.mod}):(this.negative&o.negative)!==0?(f=this.neg().divmod(o.neg(),u),u!=="div"&&(p=f.mod.neg(),d&&p.negative!==0&&p.isub(o)),{div:f.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,v=o.ushrn(1),p=o.andln(1),f=d.cmp(v);return f<0||p===1&&f===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,v=0,p=this.length-1;p>=0;p--)v=(d*v+(this.words[p]|0))%o;return u?-v:v},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,v=this.length-1;v>=0;v--){var p=(this.words[v]|0)+d*67108864;this.words[v]=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 v=new n(1),p=new n(0),f=new n(0),m=new n(1),_=0;u.isEven()&&d.isEven();)u.iushrn(1),d.iushrn(1),++_;for(var l=d.clone(),x=u.clone();!u.isZero();){for(var I=0,D=1;(u.words[0]&D)===0&&I<26;++I,D<<=1);if(I>0)for(u.iushrn(I);I-- >0;)(v.isOdd()||p.isOdd())&&(v.iadd(l),p.isub(x)),v.iushrn(1),p.iushrn(1);for(var C=0,L=1;(d.words[0]&L)===0&&C<26;++C,L<<=1);if(C>0)for(d.iushrn(C);C-- >0;)(f.isOdd()||m.isOdd())&&(f.iadd(l),m.isub(x)),f.iushrn(1),m.iushrn(1);u.cmp(d)>=0?(u.isub(d),v.isub(f),p.isub(m)):(d.isub(u),f.isub(v),m.isub(p))}return{a:f,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 v=new n(1),p=new n(0),f=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;)v.isOdd()&&v.iadd(f),v.iushrn(1);for(var l=0,x=1;(d.words[0]&x)===0&&l<26;++l,x<<=1);if(l>0)for(d.iushrn(l);l-- >0;)p.isOdd()&&p.iadd(f),p.iushrn(1);u.cmp(d)>=0?(u.isub(d),v.isub(p)):(d.isub(u),p.isub(v))}var I;return u.cmpn(1)===0?I=v:I=p,I.cmpn(0)<0&&I.iadd(o),I},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 v=0;u.isEven()&&d.isEven();v++)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 f=u;u=d,d=f}else if(p===0||d.cmpn(1)===0)break;u.isub(d)}while(!0);return d.iushln(v)},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,v=1<<u;if(this.length<=d)return this._expand(d+1),this.words[d]|=v,this;for(var p=v,f=d;p!==0&&f<this.length;f++){var m=this.words[f]|0;m+=p,p=m>>>26,m&=67108863,this.words[f]=m}return p!==0&&(this.words[f]=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 v=this.words[0]|0;d=v===o?0:v<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 v=this.words[d]|0,p=o.words[d]|0;if(v!==p){v<p?u=-1:v>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 nr={k256:null,p224:null,p192:null,p25519:null};function $e(c,o){this.name=c,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()}$e.prototype._tmp=function(){var o=new n(null);return o.words=new Array(Math.ceil(this.n/13)),o},$e.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 v=d<this.n?-1:u.ucmp(this.p);return v===0?(u.words[0]=0,u.length=1):v>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},$e.prototype.split=function(o,u){o.iushrn(this.n,0,u)},$e.prototype.imulK=function(o){return o.imul(this.k)};function kt(){$e.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(kt,$e),kt.prototype.split=function(o,u){for(var d=4194303,v=Math.min(o.length,9),p=0;p<v;p++)u.words[p]=o.words[p];if(u.length=v,o.length<=9){o.words[0]=0,o.length=1;return}var f=o.words[9];for(u.words[u.length++]=f&d,p=10;p<o.length;p++){var m=o.words[p]|0;o.words[p-10]=(m&d)<<4|f>>>22,f=m}f>>>=22,o.words[p-10]=f,f===0&&o.length>10?o.length-=10:o.length-=9},kt.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 v=o.words[d]|0;u+=v*977,o.words[d]=u&67108863,u=v*64+(u/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function De(){$e.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(De,$e);function st(){$e.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(st,$e);function E(){$e.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(E,$e),E.prototype.imulK=function(o){for(var u=0,d=0;d<o.length;d++){var v=(o.words[d]|0)*19+u,p=v&67108863;v>>>=26,o.words[d]=p,u=v}return u!==0&&(o.words[o.length++]=u),o},n._prime=function(o){if(nr[o])return nr[o];var u;if(o==="k256")u=new kt;else if(o==="p224")u=new De;else if(o==="p192")u=new st;else if(o==="p25519")u=new E;else throw new Error("Unknown prime "+o);return nr[o]=u,u};function h(c){if(typeof c=="string"){var o=n._prime(c);this.m=o.p,this.prime=o}else r(c.gtn(1),"modulus must be greater than 1"),this.m=c,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 v=this.m.subn(1),p=0;!v.isZero()&&v.andln(1)===0;)p++,v.iushrn(1);r(!v.isZero());var f=new n(1).toRed(this),m=f.redNeg(),_=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new n(2*l*l).toRed(this);this.pow(l,_).cmp(m)!==0;)l.redIAdd(m);for(var x=this.pow(l,v),I=this.pow(o,v.addn(1).iushrn(1)),D=this.pow(o,v),C=p;D.cmp(f)!==0;){for(var L=D,U=0;L.cmp(f)!==0;U++)L=L.redSqr();r(U<C);var N=this.pow(x,new n(1).iushln(C-U-1));I=I.redMul(N),x=N.redSqr(),D=D.redMul(x),C=U}return I},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,v=new Array(1<<d);v[0]=new n(1).toRed(this),v[1]=o;for(var p=2;p<v.length;p++)v[p]=this.mul(v[p-1],o);var f=v[0],m=0,_=0,l=u.bitLength()%26;for(l===0&&(l=26),p=u.length-1;p>=0;p--){for(var x=u.words[p],I=l-1;I>=0;I--){var D=x>>I&1;if(f!==v[0]&&(f=this.sqr(f)),D===0&&m===0){_=0;continue}m<<=1,m|=D,_++,!(_!==d&&(p!==0||I!==0))&&(f=this.mul(f,v[m]),_=0,m=0)}l=26}return f},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 g(o)};function g(c){h.call(this,c),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(g,h),g.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},g.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},g.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(u),v=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(v).iushrn(this.shift),f=p;return p.cmp(this.m)>=0?f=p.isub(this.m):p.cmpn(0)<0&&(f=p.iadd(this.m)),f._forceRed(this)},g.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new n(0)._forceRed(this);var d=o.mul(u),v=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(v).iushrn(this.shift),f=p;return p.cmp(this.m)>=0?f=p.isub(this.m):p.cmpn(0)<0&&(f=p.iadd(this.m)),f._forceRed(this)},g.prototype.invm=function(o){var u=this.imod(o._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(typeof fh>"u"||fh,Q1)});var sh=B((N9,ig)=>{"use strict";b();var Yi=eg(),R4=Ur(),q4=Me().Buffer;function tg(t){var e=t.modulus.byteLength(),r;do r=new Yi(R4(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function k4(t){var e=tg(t),r=e.toRed(Yi.mont(t.modulus)).redPow(new Yi(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function rg(t,e){var r=k4(e),i=e.modulus.byteLength(),n=new Yi(t).mul(r.blinder).umod(e.modulus),a=n.toRed(Yi.mont(e.prime1)),s=n.toRed(Yi.mont(e.prime2)),y=e.coefficient,w=e.prime1,S=e.prime2,A=a.redPow(e.exponent1).fromRed(),q=s.redPow(e.exponent2).fromRed(),T=A.isub(q).imul(y).umod(w).imul(S);return q.iadd(T).imul(r.unblinder).umod(e.modulus).toArrayLike(q4,"be",i)}rg.getr=tg;ig.exports=rg});var fg=B((j9,ag)=>{b();var T4=rh(),uh=Ur(),I4=Yn(),ng=nh(),og=oh(),hh=vr(),C4=ah(),O4=sh(),qt=Me().Buffer;ag.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=T4(e),s;if(n===4)s=D4(a,r);else if(n===1)s=P4(a,r,i);else if(n===3){if(s=new hh(r),s.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?O4(s,a):C4(s,a)};function D4(t,e){var r=t.modulus.byteLength(),i=e.length,n=I4("sha1").update(qt.alloc(0)).digest(),a=n.length,s=2*a;if(i>r-s-2)throw new Error("message too long");var y=qt.alloc(r-i-s-2),w=r-a-1,S=uh(a),A=og(qt.concat([n,y,qt.alloc(1,1),e],w),ng(S,w)),q=og(S,ng(A,a));return new hh(qt.concat([qt.alloc(1),q,A],r))}function P4(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=qt.alloc(n-i-3,255):a=U4(n-i-3),new hh(qt.concat([qt.from([0,r?1:2]),a,qt.alloc(1),e],n))}function U4(t){for(var e=qt.allocUnsafe(t),r=0,i=uh(t*2),n=0,a;r<t;)n===i.length&&(i=uh(t*2),n=0),a=i[n++],a&&(e[r++]=a);return e}});var cg=B((H9,lg)=>{b();var L4=rh(),sg=nh(),ug=oh(),hg=vr(),N4=sh(),F4=Yn(),j4=ah(),so=Me().Buffer;lg.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=L4(e),s=a.modulus.byteLength();if(r.length>s||new hg(r).cmp(a.modulus)>=0)throw new Error("decryption error");var y;i?y=j4(new hg(r),a):y=N4(r,a);var w=so.alloc(s-y.length);if(y=so.concat([w,y],s),n===4)return K4(a,y);if(n===1)return H4(a,y,i);if(n===3)return y;throw new Error("unknown padding")};function K4(t,e){var r=t.modulus.byteLength(),i=F4("sha1").update(so.alloc(0)).digest(),n=i.length;if(e[0]!==0)throw new Error("decryption error");var a=e.slice(1,n+1),s=e.slice(n+1),y=ug(a,sg(s,n)),w=ug(s,sg(y,r-n-1));if(W4(i,w.slice(0,n)))throw new Error("decryption error");for(var S=n;w[S]===0;)S++;if(w[S++]!==1)throw new Error("decryption error");return w.slice(S)}function H4(t,e,r){for(var i=e.slice(0,2),n=2,a=0;e[n++]!==0;)if(n>=e.length){a++;break}var s=e.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&a++,s.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}function W4(t,e){t=so.from(t),e=so.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 dg=B(ui=>{b();ui.publicEncrypt=fg();ui.privateDecrypt=cg();ui.privateEncrypt=function(e,r){return ui.publicEncrypt(e,r,!0)};ui.publicDecrypt=function(e,r){return ui.privateDecrypt(e,r,!0)}});var Mg=B(uo=>{"use strict";b();function pg(){throw new Error(`secure random number generation not supported by this browser
15
- use chrome, FireFox or Internet Explorer 11`)}var yg=Me(),vg=Ur(),gg=yg.Buffer,mg=yg.kMaxLength,lh=globalThis.crypto||globalThis.msCrypto,bg=Math.pow(2,32)-1;function wg(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>bg||t<0)throw new TypeError("offset must be a uint32");if(t>mg||t>e)throw new RangeError("offset out of range")}function _g(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>bg||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>mg)throw new RangeError("buffer too small")}lh&&lh.getRandomValues||!M.default.browser?(uo.randomFill=G4,uo.randomFillSync=$4):(uo.randomFill=pg,uo.randomFillSync=pg);function G4(t,e,r,i){if(!gg.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 wg(e,t.length),_g(r,e,t.length),xg(t,e,r,i)}function xg(t,e,r,i){if(M.default.browser){var n=t.buffer,a=new Uint8Array(n,e,r);if(lh.getRandomValues(a),i){M.default.nextTick(function(){i(null,t)});return}return t}if(i){vg(r,function(y,w){if(y)return i(y);w.copy(t,e),i(null,t)});return}var s=vg(r);return s.copy(t,e),t}function $4(t,e,r){if(typeof e>"u"&&(e=0),!gg.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return wg(e,t.length),r===void 0&&(r=t.length-e),_g(r,e,t.length),xg(t,e,r)}});var Cu=B(Ee=>{"use strict";b();Ee.randomBytes=Ee.rng=Ee.pseudoRandomBytes=Ee.prng=Ur();Ee.createHash=Ee.Hash=Yn();Ee.createHmac=Ee.Hmac=bv();var V4=Ia(),z4=Object.keys(V4),Z4=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(z4);Ee.getHashes=function(){return Z4};var Eg=hu();Ee.pbkdf2=Eg.pbkdf2;Ee.pbkdf2Sync=Eg.pbkdf2Sync;var jt=Wy();Ee.Cipher=jt.Cipher;Ee.createCipher=jt.createCipher;Ee.Cipheriv=jt.Cipheriv;Ee.createCipheriv=jt.createCipheriv;Ee.Decipher=jt.Decipher;Ee.createDecipher=jt.createDecipher;Ee.Decipheriv=jt.Decipheriv;Ee.createDecipheriv=jt.createDecipheriv;Ee.getCiphers=jt.getCiphers;Ee.listCiphers=jt.listCiphers;var ho=n1();Ee.DiffieHellmanGroup=ho.DiffieHellmanGroup;Ee.createDiffieHellmanGroup=ho.createDiffieHellmanGroup;Ee.getDiffieHellman=ho.getDiffieHellman;Ee.createDiffieHellman=ho.createDiffieHellman;Ee.DiffieHellman=ho.DiffieHellman;var tf=Ia();Ee.createSign=tf.createSign;Ee.Sign=tf.Sign;Ee.createVerify=tf.createVerify;Ee.Verify=tf.Verify;Ee.createECDH=Ia();var rf=dg();Ee.publicEncrypt=rf.publicEncrypt;Ee.privateEncrypt=rf.privateEncrypt;Ee.publicDecrypt=rf.publicDecrypt;Ee.privateDecrypt=rf.privateDecrypt;var Sg=Mg();Ee.randomFill=Sg.randomFill;Ee.randomFillSync=Sg.randomFillSync;Ee.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
16
- we accept pull requests
17
- https://github.com/browserify/crypto-browserify`)};Ee.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 Ag=B((J9,Bg)=>{"use strict";b();var nf=Cu();async function Y4(t){t=t||{};var e=t.alg||"ES256",r=t.kid||"key-"+Date.now();if(e!=="ES256"&&e!=="ES256K")throw new Error("Invalid algorithm. Must be ES256 or ES256K");var i;e==="ES256"?i=nf.generateKeyPairSync("ec",{namedCurve:"P-256",publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}}):i=nf.generateKeyPairSync("ec",{namedCurve:"secp256k1",publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});var n=nf.createPublicKey(i.publicKey).export({format:"jwk"}),a=nf.createPrivateKey(i.privateKey).export({format:"jwk"});return n.kid=r,n.alg=e,n.use="sig",n.kty="EC",a.kid=r,a.alg=e,a.use="sig",a.kty="EC",{privateJwk:a,publicJwk:n,kid:r,alg:e}}function J4(t){if(!t.domain)throw new Error("domain is required");var e=t.domain,r="did:web:"+e.replace(/:/g,"%3A"),i=[],n=[];if(t.p256){var a={id:r+"#"+t.p256.kid,type:"JsonWebKey2020",controller:r,publicKeyJwk:t.p256.jwk};i.push(a),n.push(t.p256.jwk)}if(t.k1){var s={id:r+"#"+t.k1.kid,type:"JsonWebKey2020",controller:r,publicKeyJwk:t.k1.jwk};i.push(s),n.push(t.k1.jwk)}if(i.length===0)throw new Error("At least one key (p256 or k1) must be provided");var y={"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/jws-2020/v1"],id:r,verificationMethod:i,authentication:i.map(function(S){return S.id}),assertionMethod:i.map(function(S){return S.id})};t.controllerName&&(y.controller=t.controllerName);var w={keys:n};return{did:r,didDocument:y,jwks:w}}function X4(t){if(!t.domain||!t.newKey)throw new Error("domain and newKey are required");var e=t.domain,r="did:web:"+e.replace(/:/g,"%3A"),i=t.keepOldForDays||30,n={id:r+"#"+t.newKey.kid,type:"JsonWebKey2020",controller:r,publicKeyJwk:t.newKey.jwk},a={"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/jws-2020/v1"],id:r,verificationMethod:[n],authentication:[n.id],assertionMethod:[n.id],rotationInfo:{rotatedAt:new Date().toISOString(),gracePeriodDays:i}},s={keys:[t.newKey.jwk]};return{didDocument:a,jwks:s}}Bg.exports={generateIssuerKeys:Y4,buildDidWebDocuments:J4,rotateIssuerKey:X4}});var Q4=B((Q9,Rg)=>{b();Rg.exports=Ag()});return Q4();})();
1
+ var bsvDIDWeb=(()=>{var dh=Object.create;var Uo=Object.defineProperty;var ph=Object.getOwnPropertyDescriptor;var yh=Object.getOwnPropertyNames;var bh=Object.getPrototypeOf,gh=Object.prototype.hasOwnProperty;var wh=(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 vh=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of yh(r))!gh.call(e,i)&&i!==t&&Uo(e,i,{get:()=>r[i],enumerable:!(n=ph(r,i))||n.enumerable});return e};var Do=(e,r,t)=>(t=e!=null?dh(bh(e)):{},vh(r||!e||!e.__esModule?Uo(t,"default",{value:e,enumerable:!0}):t,e));var Ho=p((Fv,$o)=>{u();var M=$o.exports={},re,te;function Mn(){throw new Error("setTimeout has not been defined")}function Pn(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?re=setTimeout:re=Mn}catch{re=Mn}try{typeof clearTimeout=="function"?te=clearTimeout:te=Pn}catch{te=Pn}})();function jo(e){if(re===setTimeout)return setTimeout(e,0);if((re===Mn||!re)&&setTimeout)return re=setTimeout,setTimeout(e,0);try{return re(e,0)}catch{try{return re.call(null,e,0)}catch{return re.call(this,e,0)}}}function _h(e){if(te===clearTimeout)return clearTimeout(e);if((te===Pn||!te)&&clearTimeout)return te=clearTimeout,clearTimeout(e);try{return te(e)}catch{try{return te.call(null,e)}catch{return te.call(this,e)}}}var le=[],Je=!1,Oe,lt=-1;function mh(){!Je||!Oe||(Je=!1,Oe.length?le=Oe.concat(le):lt=-1,le.length&&No())}function No(){if(!Je){var e=jo(mh);Je=!0;for(var r=le.length;r;){for(Oe=le,le=[];++lt<r;)Oe&&Oe[lt].run();lt=-1,r=le.length}Oe=null,Je=!1,_h(e)}}M.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];le.push(new Wo(e,r)),le.length===1&&!Je&&jo(No)};function Wo(e,r){this.fun=e,this.array=r}Wo.prototype.run=function(){this.fun.apply(null,this.array)};M.title="browser";M.browser=!0;M.env={};M.argv=[];M.version="";M.versions={};function ce(){}M.on=ce;M.addListener=ce;M.once=ce;M.off=ce;M.removeListener=ce;M.removeAllListeners=ce;M.emit=ce;M.prependListener=ce;M.prependOnceListener=ce;M.listeners=function(e){return[]};M.binding=function(e){throw new Error("process.binding is not supported")};M.cwd=function(){return"/"};M.chdir=function(e){throw new Error("process.chdir is not supported")};M.umask=function(){return 0}});var Ko=p(ct=>{"use strict";u();ct.byteLength=Eh;ct.toByteArray=Ah;ct.fromByteArray=Th;var ne=[],K=[],xh=typeof Uint8Array<"u"?Uint8Array:Array,Fn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ie=0,Go=Fn.length;Ie<Go;++Ie)ne[Ie]=Fn[Ie],K[Fn.charCodeAt(Ie)]=Ie;var Ie,Go;K[45]=62;K[95]=63;function Vo(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 Eh(e){var r=Vo(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Sh(e,r,t){return(r+t)*3/4-t}function Ah(e){var r,t=Vo(e),n=t[0],i=t[1],o=new xh(Sh(e,n,i)),a=0,f=i>0?n-4:n,s;for(s=0;s<f;s+=4)r=K[e.charCodeAt(s)]<<18|K[e.charCodeAt(s+1)]<<12|K[e.charCodeAt(s+2)]<<6|K[e.charCodeAt(s+3)],o[a++]=r>>16&255,o[a++]=r>>8&255,o[a++]=r&255;return i===2&&(r=K[e.charCodeAt(s)]<<2|K[e.charCodeAt(s+1)]>>4,o[a++]=r&255),i===1&&(r=K[e.charCodeAt(s)]<<10|K[e.charCodeAt(s+1)]<<4|K[e.charCodeAt(s+2)]>>2,o[a++]=r>>8&255,o[a++]=r&255),o}function Bh(e){return ne[e>>18&63]+ne[e>>12&63]+ne[e>>6&63]+ne[e&63]}function Rh(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(Bh(n));return i.join("")}function Th(e){for(var r,t=e.length,n=t%3,i=[],o=16383,a=0,f=t-n;a<f;a+=o)i.push(Rh(e,a,a+o>f?f:a+o));return n===1?(r=e[t-1],i.push(ne[r>>2]+ne[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(ne[r>>10]+ne[r>>4&63]+ne[r<<2&63]+"=")),i.join("")}});var zo=p(Cn=>{u();Cn.read=function(e,r,t,n,i){var o,a,f=i*8-n-1,s=(1<<f)-1,d=s>>1,h=-7,b=t?i-1:0,g=t?-1:1,w=e[r+b];for(b+=g,o=w&(1<<-h)-1,w>>=-h,h+=f;h>0;o=o*256+e[r+b],b+=g,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=a*256+e[r+b],b+=g,h-=8);if(o===0)o=1-d;else{if(o===s)return a?NaN:(w?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-d}return(w?-1:1)*a*Math.pow(2,o-n)};Cn.write=function(e,r,t,n,i,o){var a,f,s,d=o*8-i-1,h=(1<<d)-1,b=h>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:o-1,v=n?1:-1,O=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=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-a))<1&&(a--,s*=2),a+b>=1?r+=g/s:r+=g*Math.pow(2,1-b),r*s>=2&&(a++,s/=2),a+b>=h?(f=0,a=h):a+b>=1?(f=(r*s-1)*Math.pow(2,i),a=a+b):(f=r*Math.pow(2,b-1)*Math.pow(2,i),a=0));i>=8;e[t+w]=f&255,w+=v,f/=256,i-=8);for(a=a<<i|f,d+=i;d>0;e[t+w]=a&255,w+=v,a/=256,d-=8);e[t+w-v]|=O*128}});var oe=p(er=>{"use strict";u();var kn=Ko(),Ze=zo(),Yo=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;er.Buffer=c;er.SlowBuffer=Fh;er.INSPECT_MAX_BYTES=50;var ht=2147483647;er.kMaxLength=ht;c.TYPED_ARRAY_SUPPORT=Oh();!c.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 Oh(){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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}});Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function he(e){if(e>ht)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,c.prototype),r}function c(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 jn(e)}return Qo(e,r,t)}c.poolSize=8192;function Qo(e,r,t){if(typeof e=="string")return qh(e,r);if(ArrayBuffer.isView(e))return Mh(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(ie(e,ArrayBuffer)||e&&ie(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ie(e,SharedArrayBuffer)||e&&ie(e.buffer,SharedArrayBuffer)))return Un(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 c.from(n,r,t);let i=Ph(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return c.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)}c.from=function(e,r,t){return Qo(e,r,t)};Object.setPrototypeOf(c.prototype,Uint8Array.prototype);Object.setPrototypeOf(c,Uint8Array);function ea(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 Ih(e,r,t){return ea(e),e<=0?he(e):r!==void 0?typeof t=="string"?he(e).fill(r,t):he(e).fill(r):he(e)}c.alloc=function(e,r,t){return Ih(e,r,t)};function jn(e){return ea(e),he(e<0?0:Nn(e)|0)}c.allocUnsafe=function(e){return jn(e)};c.allocUnsafeSlow=function(e){return jn(e)};function qh(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=ra(e,r)|0,n=he(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function Ln(e){let r=e.length<0?0:Nn(e.length)|0,t=he(r);for(let n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Mh(e){if(ie(e,Uint8Array)){let r=new Uint8Array(e);return Un(r.buffer,r.byteOffset,r.byteLength)}return Ln(e)}function Un(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,c.prototype),n}function Ph(e){if(c.isBuffer(e)){let r=Nn(e.length)|0,t=he(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||$n(e.length)?he(0):Ln(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ln(e.data)}function Nn(e){if(e>=ht)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ht.toString(16)+" bytes");return e|0}function Fh(e){return+e!=e&&(e=0),c.alloc(+e)}c.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==c.prototype};c.compare=function(r,t){if(ie(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),ie(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(r)||!c.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};c.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}};c.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return c.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;let i=c.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){let a=r[n];if(ie(a,Uint8Array))o+a.length>i.length?(c.isBuffer(a)||(a=c.from(a)),a.copy(i,o)):Uint8Array.prototype.set.call(i,a,o);else if(c.isBuffer(a))a.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length}return i};function ra(e,r){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ie(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 Dn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return la(e).length;default:if(i)return n?-1:Dn(e).length;r=(""+r).toLowerCase(),i=!0}}c.byteLength=ra;function Ch(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 Gh(this,r,t);case"utf8":case"utf-8":return na(this,r,t);case"ascii":return $h(this,r,t);case"latin1":case"binary":return Hh(this,r,t);case"base64":return Nh(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vh(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}c.prototype._isBuffer=!0;function qe(e,r,t){let n=e[r];e[r]=e[t],e[t]=n}c.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)qe(this,t,t+1);return this};c.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)qe(this,t,t+3),qe(this,t+1,t+2);return this};c.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)qe(this,t,t+7),qe(this,t+1,t+6),qe(this,t+2,t+5),qe(this,t+3,t+4);return this};c.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?na(this,0,r):Ch.apply(this,arguments)};c.prototype.toLocaleString=c.prototype.toString;c.prototype.equals=function(r){if(!c.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:c.compare(this,r)===0};c.prototype.inspect=function(){let r="",t=er.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};Yo&&(c.prototype[Yo]=c.prototype.inspect);c.prototype.compare=function(r,t,n,i,o){if(ie(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),!c.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),d=this.slice(i,o),h=r.slice(t,n);for(let b=0;b<s;++b)if(d[b]!==h[b]){a=d[b],f=h[b];break}return a<f?-1:f<a?1:0};function ta(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,$n(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=c.from(r,n)),c.isBuffer(r))return r.length===0?-1:Jo(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):Jo(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Jo(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(h,b){return o===1?h[b]:h.readUInt16BE(b*o)}let d;if(i){let h=-1;for(d=t;d<a;d++)if(s(e,d)===s(r,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===f)return h*o}else h!==-1&&(d-=d-h),h=-1}else for(t+f>a&&(t=a-f),d=t;d>=0;d--){let h=!0;for(let b=0;b<f;b++)if(s(e,d+b)!==s(r,b)){h=!1;break}if(h)return d}return-1}c.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};c.prototype.indexOf=function(r,t,n){return ta(this,r,t,n,!0)};c.prototype.lastIndexOf=function(r,t,n){return ta(this,r,t,n,!1)};function kh(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($n(f))return a;e[t+a]=f}return a}function Lh(e,r,t,n){return dt(Dn(r,e.length-t),e,t,n)}function Uh(e,r,t,n){return dt(Jh(r),e,t,n)}function Dh(e,r,t,n){return dt(la(r),e,t,n)}function jh(e,r,t,n){return dt(Xh(r,e.length-t),e,t,n)}c.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 kh(this,r,t,n);case"utf8":case"utf-8":return Lh(this,r,t,n);case"ascii":case"latin1":case"binary":return Uh(this,r,t,n);case"base64":return Dh(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jh(this,r,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Nh(e,r,t){return r===0&&t===e.length?kn.fromByteArray(e):kn.fromByteArray(e.slice(r,t))}function na(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,d,h,b;switch(f){case 1:o<128&&(a=o);break;case 2:s=e[i+1],(s&192)===128&&(b=(o&31)<<6|s&63,b>127&&(a=b));break;case 3:s=e[i+1],d=e[i+2],(s&192)===128&&(d&192)===128&&(b=(o&15)<<12|(s&63)<<6|d&63,b>2047&&(b<55296||b>57343)&&(a=b));break;case 4:s=e[i+1],d=e[i+2],h=e[i+3],(s&192)===128&&(d&192)===128&&(h&192)===128&&(b=(o&15)<<18|(s&63)<<12|(d&63)<<6|h&63,b>65535&&b<1114112&&(a=b))}}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 Wh(n)}var Xo=4096;function Wh(e){let r=e.length;if(r<=Xo)return String.fromCharCode.apply(String,e);let t="",n=0;for(;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=Xo));return t}function $h(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 Hh(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 Gh(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+=Zh[e[o]];return i}function Vh(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}c.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,c.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")}c.prototype.readUintLE=c.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};c.prototype.readUintBE=c.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};c.prototype.readUint8=c.prototype.readUInt8=function(r,t){return r=r>>>0,t||k(r,1,this.length),this[r]};c.prototype.readUint16LE=c.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||k(r,2,this.length),this[r]|this[r+1]<<8};c.prototype.readUint16BE=c.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||k(r,2,this.length),this[r]<<8|this[r+1]};c.prototype.readUint32LE=c.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};c.prototype.readUint32BE=c.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])};c.prototype.readBigUInt64LE=_e(function(r){r=r>>>0,Qe(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Br(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))});c.prototype.readBigUInt64BE=_e(function(r){r=r>>>0,Qe(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Br(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)});c.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};c.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};c.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]};c.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};c.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};c.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};c.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]};c.prototype.readBigInt64LE=_e(function(r){r=r>>>0,Qe(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Br(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)});c.prototype.readBigInt64BE=_e(function(r){r=r>>>0,Qe(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&Br(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)});c.prototype.readFloatLE=function(r,t){return r=r>>>0,t||k(r,4,this.length),Ze.read(this,r,!0,23,4)};c.prototype.readFloatBE=function(r,t){return r=r>>>0,t||k(r,4,this.length),Ze.read(this,r,!1,23,4)};c.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||k(r,8,this.length),Ze.read(this,r,!0,52,8)};c.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||k(r,8,this.length),Ze.read(this,r,!1,52,8)};function G(e,r,t,n,i,o){if(!c.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")}c.prototype.writeUintLE=c.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;G(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};c.prototype.writeUintBE=c.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;G(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};c.prototype.writeUint8=c.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||G(this,r,t,1,255,0),this[t]=r&255,t+1};c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||G(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||G(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||G(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};c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||G(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 ia(e,r,t,n,i){sa(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 oa(e,r,t,n,i){sa(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}c.prototype.writeBigUInt64LE=_e(function(r,t=0){return ia(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});c.prototype.writeBigUInt64BE=_e(function(r,t=0){return oa(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});c.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let s=Math.pow(2,8*n-1);G(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};c.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let s=Math.pow(2,8*n-1);G(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};c.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||G(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};c.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||G(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};c.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||G(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};c.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||G(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};c.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||G(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};c.prototype.writeBigInt64LE=_e(function(r,t=0){return ia(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});c.prototype.writeBigInt64BE=_e(function(r,t=0){return oa(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function aa(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 fa(e,r,t,n,i){return r=+r,t=t>>>0,i||aa(e,r,t,4,34028234663852886e22,-34028234663852886e22),Ze.write(e,r,t,n,23,4),t+4}c.prototype.writeFloatLE=function(r,t,n){return fa(this,r,t,!0,n)};c.prototype.writeFloatBE=function(r,t,n){return fa(this,r,t,!1,n)};function ua(e,r,t,n,i){return r=+r,t=t>>>0,i||aa(e,r,t,8,17976931348623157e292,-17976931348623157e292),Ze.write(e,r,t,n,52,8),t+8}c.prototype.writeDoubleLE=function(r,t,n){return ua(this,r,t,!0,n)};c.prototype.writeDoubleBE=function(r,t,n){return ua(this,r,t,!1,n)};c.prototype.copy=function(r,t,n,i){if(!c.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};c.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"&&!c.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=c.isBuffer(r)?r:c.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 Xe={};function Wn(e,r,t){Xe[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}`}}}Wn("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Wn("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError);Wn("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=Zo(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=Zo(i)),i+="n"),n+=` It must be ${r}. Received ${i}`,n},RangeError);function Zo(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 Kh(e,r,t){Qe(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&Br(r,e.length-(t+1))}function sa(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 Xe.ERR_OUT_OF_RANGE("value",f,e)}Kh(n,i,o)}function Qe(e,r){if(typeof e!="number")throw new Xe.ERR_INVALID_ARG_TYPE(r,"number",e)}function Br(e,r,t){throw Math.floor(e)!==e?(Qe(e,t),new Xe.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new Xe.ERR_BUFFER_OUT_OF_BOUNDS:new Xe.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var zh=/[^+/0-9A-Za-z-_]/g;function Yh(e){if(e=e.split("=")[0],e=e.trim().replace(zh,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Dn(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 Jh(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Xh(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 la(e){return kn.toByteArray(Yh(e))}function dt(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 ie(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function $n(e){return e!==e}var Zh=(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 _e(e){return typeof BigInt>"u"?Qh:e}function Qh(){throw new Error("BigInt not supported")}});var l,y,u=wh(()=>{l=Do(Ho()),y=Do(oe())});var R=p((Hv,Hn)=>{u();typeof Object.create=="function"?Hn.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Hn.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 D=p((Gn,ha)=>{u();var pt=oe(),ae=pt.Buffer;function ca(e,r){for(var t in e)r[t]=e[t]}ae.from&&ae.alloc&&ae.allocUnsafe&&ae.allocUnsafeSlow?ha.exports=pt:(ca(pt,Gn),Gn.Buffer=Me);function Me(e,r,t){return ae(e,r,t)}Me.prototype=Object.create(ae.prototype);ca(ae,Me);Me.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ae(e,r,t)};Me.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=ae(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};Me.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ae(e)};Me.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return pt.SlowBuffer(e)}});var tr=p((Kv,Vn)=>{"use strict";u();var rr=typeof Reflect=="object"?Reflect:null,da=rr&&typeof rr.apply=="function"?rr.apply:function(r,t,n){return Function.prototype.apply.call(r,t,n)},yt;rr&&typeof rr.ownKeys=="function"?yt=rr.ownKeys:Object.getOwnPropertySymbols?yt=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:yt=function(r){return Object.getOwnPropertyNames(r)};function ed(e){console&&console.warn&&console.warn(e)}var ya=Number.isNaN||function(r){return r!==r};function B(){B.init.call(this)}Vn.exports=B;Vn.exports.once=id;B.EventEmitter=B;B.prototype._events=void 0;B.prototype._eventsCount=0;B.prototype._maxListeners=void 0;var pa=10;function bt(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(B,"defaultMaxListeners",{enumerable:!0,get:function(){return pa},set:function(e){if(typeof e!="number"||e<0||ya(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");pa=e}});B.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};B.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||ya(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 ba(e){return e._maxListeners===void 0?B.defaultMaxListeners:e._maxListeners}B.prototype.getMaxListeners=function(){return ba(this)};B.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")da(s,this,t);else for(var d=s.length,h=ma(s,d),n=0;n<d;++n)da(h[n],this,t);return!0};function ga(e,r,t,n){var i,o,a;if(bt(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=ba(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,ed(f)}return e}B.prototype.addListener=function(r,t){return ga(this,r,t,!1)};B.prototype.on=B.prototype.addListener;B.prototype.prependListener=function(r,t){return ga(this,r,t,!0)};function rd(){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 wa(e,r,t){var n={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},i=rd.bind(n);return i.listener=t,n.wrapFn=i,i}B.prototype.once=function(r,t){return bt(t),this.on(r,wa(this,r,t)),this};B.prototype.prependOnceListener=function(r,t){return bt(t),this.prependListener(r,wa(this,r,t)),this};B.prototype.removeListener=function(r,t){var n,i,o,a,f;if(bt(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():td(n,o),n.length===1&&(i[r]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",r,f||t)}return this};B.prototype.off=B.prototype.removeListener;B.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 va(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?nd(i):ma(i,i.length)}B.prototype.listeners=function(r){return va(this,r,!0)};B.prototype.rawListeners=function(r){return va(this,r,!1)};B.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):_a.call(e,r)};B.prototype.listenerCount=_a;function _a(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}B.prototype.eventNames=function(){return this._eventsCount>0?yt(this._events):[]};function ma(e,r){for(var t=new Array(r),n=0;n<r;++n)t[n]=e[n];return t}function td(e,r){for(;r+1<e.length;r++)e[r]=e[r+1];e.pop()}function nd(e){for(var r=new Array(e.length),t=0;t<r.length;++t)r[t]=e[t].listener||e[t];return r}function id(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))}xa(e,r,o,{once:!0}),r!=="error"&&od(e,i,{once:!0})})}function od(e,r,t){typeof e.on=="function"&&xa(e,"error",r,t)}function xa(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 Kn=p((Yv,Ea)=>{u();Ea.exports=tr().EventEmitter});var zn=p((Xv,Sa)=>{"use strict";u();Sa.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 Rr=p((Qv,Aa)=>{"use strict";u();var ad=zn();Aa.exports=function(){return ad()&&!!Symbol.toStringTag}});var Yn=p((r_,Ba)=>{"use strict";u();Ba.exports=Object});var Ta=p((n_,Ra)=>{"use strict";u();Ra.exports=Error});var Ia=p((o_,Oa)=>{"use strict";u();Oa.exports=EvalError});var Ma=p((f_,qa)=>{"use strict";u();qa.exports=RangeError});var Fa=p((s_,Pa)=>{"use strict";u();Pa.exports=ReferenceError});var Jn=p((c_,Ca)=>{"use strict";u();Ca.exports=SyntaxError});var Pe=p((d_,ka)=>{"use strict";u();ka.exports=TypeError});var Ua=p((y_,La)=>{"use strict";u();La.exports=URIError});var ja=p((g_,Da)=>{"use strict";u();Da.exports=Math.abs});var Wa=p((v_,Na)=>{"use strict";u();Na.exports=Math.floor});var Ha=p((m_,$a)=>{"use strict";u();$a.exports=Math.max});var Va=p((E_,Ga)=>{"use strict";u();Ga.exports=Math.min});var za=p((A_,Ka)=>{"use strict";u();Ka.exports=Math.pow});var Ja=p((R_,Ya)=>{"use strict";u();Ya.exports=Math.round});var Za=p((O_,Xa)=>{"use strict";u();Xa.exports=Number.isNaN||function(r){return r!==r}});var ef=p((q_,Qa)=>{"use strict";u();var fd=Za();Qa.exports=function(r){return fd(r)||r===0?r:r<0?-1:1}});var tf=p((P_,rf)=>{"use strict";u();rf.exports=Object.getOwnPropertyDescriptor});var Fe=p((C_,nf)=>{"use strict";u();var gt=tf();if(gt)try{gt([],"length")}catch{gt=null}nf.exports=gt});var Tr=p((L_,of)=>{"use strict";u();var wt=Object.defineProperty||!1;if(wt)try{wt({},"a",{value:1})}catch{wt=!1}of.exports=wt});var uf=p((D_,ff)=>{"use strict";u();var af=typeof Symbol<"u"&&Symbol,ud=zn();ff.exports=function(){return typeof af!="function"||typeof Symbol!="function"||typeof af("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ud()}});var Xn=p((N_,sf)=>{"use strict";u();sf.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Zn=p(($_,lf)=>{"use strict";u();var sd=Yn();lf.exports=sd.getPrototypeOf||null});var df=p((G_,hf)=>{"use strict";u();var ld="Function.prototype.bind called on incompatible ",cd=Object.prototype.toString,hd=Math.max,dd="[object Function]",cf=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},pd=function(r,t){for(var n=[],i=t||0,o=0;i<r.length;i+=1,o+=1)n[o]=r[i];return n},yd=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t};hf.exports=function(r){var t=this;if(typeof t!="function"||cd.apply(t)!==dd)throw new TypeError(ld+t);for(var n=pd(arguments,1),i,o=function(){if(this instanceof i){var h=t.apply(this,cf(n,arguments));return Object(h)===h?h:this}return t.apply(r,cf(n,arguments))},a=hd(0,t.length-n.length),f=[],s=0;s<a;s++)f[s]="$"+s;if(i=Function("binder","return function ("+yd(f,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var d=function(){};d.prototype=t.prototype,i.prototype=new d,d.prototype=null}return i}});var nr=p((K_,pf)=>{"use strict";u();var bd=df();pf.exports=Function.prototype.bind||bd});var vt=p((Y_,yf)=>{"use strict";u();yf.exports=Function.prototype.call});var _t=p((X_,bf)=>{"use strict";u();bf.exports=Function.prototype.apply});var wf=p((Q_,gf)=>{"use strict";u();gf.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Qn=p((r1,vf)=>{"use strict";u();var gd=nr(),wd=_t(),vd=vt(),_d=wf();vf.exports=_d||gd.call(vd,wd)});var mt=p((n1,_f)=>{"use strict";u();var md=nr(),xd=Pe(),Ed=vt(),Sd=Qn();_f.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new xd("a function is required");return Sd(md,Ed,r)}});var Bf=p((o1,Af)=>{"use strict";u();var Ad=mt(),mf=Fe(),Ef;try{Ef=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var ei=!!Ef&&mf&&mf(Object.prototype,"__proto__"),Sf=Object,xf=Sf.getPrototypeOf;Af.exports=ei&&typeof ei.get=="function"?Ad([ei.get]):typeof xf=="function"?function(r){return xf(r==null?r:Sf(r))}:!1});var xt=p((f1,If)=>{"use strict";u();var Rf=Xn(),Tf=Zn(),Of=Bf();If.exports=Rf?function(r){return Rf(r)}:Tf?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return Tf(r)}:Of?function(r){return Of(r)}:null});var ri=p((s1,qf)=>{"use strict";u();var Bd=Function.prototype.call,Rd=Object.prototype.hasOwnProperty,Td=nr();qf.exports=Td.call(Bd,Rd)});var ii=p((c1,Lf)=>{"use strict";u();var m,Od=Yn(),Id=Ta(),qd=Ia(),Md=Ma(),Pd=Fa(),fr=Jn(),ar=Pe(),Fd=Ua(),Cd=ja(),kd=Wa(),Ld=Ha(),Ud=Va(),Dd=za(),jd=Ja(),Nd=ef(),Cf=Function,ti=function(e){try{return Cf('"use strict"; return ('+e+").constructor;")()}catch{}},Or=Fe(),Wd=Tr(),ni=function(){throw new ar},$d=Or?(function(){try{return arguments.callee,ni}catch{try{return Or(arguments,"callee").get}catch{return ni}}})():ni,ir=uf()(),L=xt(),Hd=Zn(),Gd=Xn(),kf=_t(),Ir=vt(),or={},Vd=typeof Uint8Array>"u"||!L?m:L(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?m:ArrayBuffer,"%ArrayIteratorPrototype%":ir&&L?L([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":or,"%AsyncGenerator%":or,"%AsyncGeneratorFunction%":or,"%AsyncIteratorPrototype%":or,"%Atomics%":typeof Atomics>"u"?m:Atomics,"%BigInt%":typeof BigInt>"u"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Id,"%eval%":eval,"%EvalError%":qd,"%Float16Array%":typeof Float16Array>"u"?m:Float16Array,"%Float32Array%":typeof Float32Array>"u"?m:Float32Array,"%Float64Array%":typeof Float64Array>"u"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?m:FinalizationRegistry,"%Function%":Cf,"%GeneratorFunction%":or,"%Int8Array%":typeof Int8Array>"u"?m:Int8Array,"%Int16Array%":typeof Int16Array>"u"?m:Int16Array,"%Int32Array%":typeof Int32Array>"u"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ir&&L?L(L([][Symbol.iterator]())):m,"%JSON%":typeof JSON=="object"?JSON:m,"%Map%":typeof Map>"u"?m:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ir||!L?m:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Od,"%Object.getOwnPropertyDescriptor%":Or,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?m:Promise,"%Proxy%":typeof Proxy>"u"?m:Proxy,"%RangeError%":Md,"%ReferenceError%":Pd,"%Reflect%":typeof Reflect>"u"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?m:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ir||!L?m:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ir&&L?L(""[Symbol.iterator]()):m,"%Symbol%":ir?Symbol:m,"%SyntaxError%":fr,"%ThrowTypeError%":$d,"%TypedArray%":Vd,"%TypeError%":ar,"%Uint8Array%":typeof Uint8Array>"u"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?m:Uint32Array,"%URIError%":Fd,"%WeakMap%":typeof WeakMap>"u"?m:WeakMap,"%WeakRef%":typeof WeakRef>"u"?m:WeakRef,"%WeakSet%":typeof WeakSet>"u"?m:WeakSet,"%Function.prototype.call%":Ir,"%Function.prototype.apply%":kf,"%Object.defineProperty%":Wd,"%Object.getPrototypeOf%":Hd,"%Math.abs%":Cd,"%Math.floor%":kd,"%Math.max%":Ld,"%Math.min%":Ud,"%Math.pow%":Dd,"%Math.round%":jd,"%Math.sign%":Nd,"%Reflect.getPrototypeOf%":Gd};if(L)try{null.error}catch(e){Mf=L(L(e)),Ce["%Error.prototype%"]=Mf}var Mf,Kd=function e(r){var t;if(r==="%AsyncFunction%")t=ti("async function () {}");else if(r==="%GeneratorFunction%")t=ti("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=ti("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&L&&(t=L(i.prototype))}return Ce[r]=t,t},Pf={__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"]},qr=nr(),Et=ri(),zd=qr.call(Ir,Array.prototype.concat),Yd=qr.call(kf,Array.prototype.splice),Ff=qr.call(Ir,String.prototype.replace),St=qr.call(Ir,String.prototype.slice),Jd=qr.call(Ir,RegExp.prototype.exec),Xd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Zd=/\\(\\)?/g,Qd=function(r){var t=St(r,0,1),n=St(r,-1);if(t==="%"&&n!=="%")throw new fr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new fr("invalid intrinsic syntax, expected opening `%`");var i=[];return Ff(r,Xd,function(o,a,f,s){i[i.length]=f?Ff(s,Zd,"$1"):a||o}),i},ep=function(r,t){var n=r,i;if(Et(Pf,n)&&(i=Pf[n],n="%"+i[0]+"%"),Et(Ce,n)){var o=Ce[n];if(o===or&&(o=Kd(n)),typeof o>"u"&&!t)throw new ar("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new fr("intrinsic "+r+" does not exist!")};Lf.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new ar("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ar('"allowMissing" argument must be a boolean');if(Jd(/^%?[^%]*%?$/,r)===null)throw new fr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Qd(r),i=n.length>0?n[0]:"",o=ep("%"+i+"%",t),a=o.name,f=o.value,s=!1,d=o.alias;d&&(i=d[0],Yd(n,zd([0,1],d)));for(var h=1,b=!0;h<n.length;h+=1){var g=n[h],w=St(g,0,1),v=St(g,-1);if((w==='"'||w==="'"||w==="`"||v==='"'||v==="'"||v==="`")&&w!==v)throw new fr("property names with quotes must have matching quotes");if((g==="constructor"||!b)&&(s=!0),i+="."+g,a="%"+i+"%",Et(Ce,a))f=Ce[a];else if(f!=null){if(!(g in f)){if(!t)throw new ar("base intrinsic for "+r+" exists, but the property is not available.");return}if(Or&&h+1>=n.length){var O=Or(f,g);b=!!O,b&&"get"in O&&!("originalValue"in O.get)?f=O.get:f=f[g]}else b=Et(f,g),f=f[g];b&&!s&&(Ce[a]=f)}}return f}});var ke=p((d1,jf)=>{"use strict";u();var Uf=ii(),Df=mt(),rp=Df([Uf("%String.prototype.indexOf%")]);jf.exports=function(r,t){var n=Uf(r,!!t);return typeof n=="function"&&rp(r,".prototype.")>-1?Df([n]):n}});var $f=p((y1,Wf)=>{"use strict";u();var tp=Rr()(),np=ke(),oi=np("Object.prototype.toString"),At=function(r){return tp&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:oi(r)==="[object Arguments]"},Nf=function(r){return At(r)?!0:r!==null&&typeof r=="object"&&"length"in r&&typeof r.length=="number"&&r.length>=0&&oi(r)!=="[object Array]"&&"callee"in r&&oi(r.callee)==="[object Function]"},ip=(function(){return At(arguments)})();At.isLegacyArguments=Nf;Wf.exports=ip?At:Nf});var Yf=p((g1,zf)=>{"use strict";u();var Hf=ke(),op=Rr()(),ap=ri(),fp=Fe(),ui;op?(Gf=Hf("RegExp.prototype.exec"),ai={},Bt=function(){throw ai},fi={toString:Bt,valueOf:Bt},typeof Symbol.toPrimitive=="symbol"&&(fi[Symbol.toPrimitive]=Bt),ui=function(r){if(!r||typeof r!="object")return!1;var t=fp(r,"lastIndex"),n=t&&ap(t,"value");if(!n)return!1;try{Gf(r,fi)}catch(i){return i===ai}}):(Vf=Hf("Object.prototype.toString"),Kf="[object RegExp]",ui=function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:Vf(r)===Kf});var Gf,ai,Bt,fi,Vf,Kf;zf.exports=ui});var Xf=p((v1,Jf)=>{"use strict";u();var up=ke(),sp=Yf(),lp=up("RegExp.prototype.exec"),cp=Pe();Jf.exports=function(r){if(!sp(r))throw new cp("`regex` must be a RegExp");return function(n){return lp(r,n)!==null}}});var Qf=p((m1,Zf)=>{"use strict";u();var hp=function*(){}.constructor;Zf.exports=()=>hp});var nu=p((E1,tu)=>{"use strict";u();var ru=ke(),dp=Xf(),pp=dp(/^\s*(?:function)?\*/),yp=Rr()(),eu=xt(),bp=ru("Object.prototype.toString"),gp=ru("Function.prototype.toString"),wp=Qf();tu.exports=function(r){if(typeof r!="function")return!1;if(pp(gp(r)))return!0;if(!yp){var t=bp(r);return t==="[object GeneratorFunction]"}if(!eu)return!1;var n=wp();return n&&eu(r)===n.prototype}});var fu=p((A1,au)=>{"use strict";u();var ou=Function.prototype.toString,ur=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,li,Rt;if(typeof ur=="function"&&typeof Object.defineProperty=="function")try{li=Object.defineProperty({},"length",{get:function(){throw Rt}}),Rt={},ur(function(){throw 42},null,li)}catch(e){e!==Rt&&(ur=null)}else ur=null;var vp=/^\s*class\b/,ci=function(r){try{var t=ou.call(r);return vp.test(t)}catch{return!1}},si=function(r){try{return ci(r)?!1:(ou.call(r),!0)}catch{return!1}},Tt=Object.prototype.toString,_p="[object Object]",mp="[object Function]",xp="[object GeneratorFunction]",Ep="[object HTMLAllCollection]",Sp="[object HTML document.all class]",Ap="[object HTMLCollection]",Bp=typeof Symbol=="function"&&!!Symbol.toStringTag,Rp=!(0 in[,]),hi=function(){return!1};typeof document=="object"&&(iu=document.all,Tt.call(iu)===Tt.call(document.all)&&(hi=function(r){if((Rp||!r)&&(typeof r>"u"||typeof r=="object"))try{var t=Tt.call(r);return(t===Ep||t===Sp||t===Ap||t===_p)&&r("")==null}catch{}return!1}));var iu;au.exports=ur?function(r){if(hi(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{ur(r,null,li)}catch(t){if(t!==Rt)return!1}return!ci(r)&&si(r)}:function(r){if(hi(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(Bp)return si(r);if(ci(r))return!1;var t=Tt.call(r);return t!==mp&&t!==xp&&!/^\[object HTML/.test(t)?!1:si(r)}});var lu=p((R1,su)=>{"use strict";u();var Tp=fu(),Op=Object.prototype.toString,uu=Object.prototype.hasOwnProperty,Ip=function(r,t,n){for(var i=0,o=r.length;i<o;i++)uu.call(r,i)&&(n==null?t(r[i],i,r):t.call(n,r[i],i,r))},qp=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)},Mp=function(r,t,n){for(var i in r)uu.call(r,i)&&(n==null?t(r[i],i,r):t.call(n,r[i],i,r))};function Pp(e){return Op.call(e)==="[object Array]"}su.exports=function(r,t,n){if(!Tp(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),Pp(r)?Ip(r,t,i):typeof r=="string"?qp(r,t,i):Mp(r,t,i)}});var hu=p((O1,cu)=>{"use strict";u();cu.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var pu=p((q1,du)=>{"use strict";u();var di=hu(),Fp=globalThis;du.exports=function(){for(var r=[],t=0;t<di.length;t++)typeof Fp[di[t]]=="function"&&(r[r.length]=di[t]);return r}});var wu=p((P1,gu)=>{"use strict";u();var yu=Tr(),Cp=Jn(),sr=Pe(),bu=Fe();gu.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new sr("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new sr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new sr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new sr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new sr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new sr("`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=!!bu&&bu(r,t);if(yu)yu(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 Cp("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var mu=p((C1,_u)=>{"use strict";u();var pi=Tr(),vu=function(){return!!pi};vu.hasArrayLengthDefineBug=function(){if(!pi)return null;try{return pi([],"length",{value:1}).length!==1}catch{return!0}};_u.exports=vu});var Bu=p((L1,Au)=>{"use strict";u();var kp=ii(),xu=wu(),Lp=mu()(),Eu=Fe(),Su=Pe(),Up=kp("%Math.floor%");Au.exports=function(r,t){if(typeof r!="function")throw new Su("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Up(t)!==t)throw new Su("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in r&&Eu){var a=Eu(r,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(Lp?xu(r,"length",t,!0,!0):xu(r,"length",t)),r}});var Tu=p((D1,Ru)=>{"use strict";u();var Dp=nr(),jp=_t(),Np=Qn();Ru.exports=function(){return Np(Dp,jp,arguments)}});var qu=p((N1,Ot)=>{"use strict";u();var Wp=Bu(),Ou=Tr(),$p=mt(),Iu=Tu();Ot.exports=function(r){var t=$p(arguments),n=1+r.length-(arguments.length-1);return Wp(t,n>0?n:0,!0)};Ou?Ou(Ot.exports,"apply",{value:Iu}):Ot.exports.apply=Iu});var wi=p(($1,Cu)=>{"use strict";u();var Mt=lu(),Hp=pu(),Mu=qu(),bi=ke(),qt=Fe(),It=xt(),Gp=bi("Object.prototype.toString"),Fu=Rr()(),Pu=globalThis,yi=Hp(),gi=bi("String.prototype.slice"),Vp=bi("Array.prototype.indexOf",!0)||function(r,t){for(var n=0;n<r.length;n+=1)if(r[n]===t)return n;return-1},Pt={__proto__:null};Fu&&qt&&It?Mt(yi,function(e){var r=new Pu[e];if(Symbol.toStringTag in r&&It){var t=It(r),n=qt(t,Symbol.toStringTag);if(!n&&t){var i=It(t);n=qt(i,Symbol.toStringTag)}if(n&&n.get){var o=Mu(n.get);Pt["$"+e]=o}}}):Mt(yi,function(e){var r=new Pu[e],t=r.slice||r.set;if(t){var n=Mu(t);Pt["$"+e]=n}});var Kp=function(r){var t=!1;return Mt(Pt,function(n,i){if(!t)try{"$"+n(r)===i&&(t=gi(i,1))}catch{}}),t},zp=function(r){var t=!1;return Mt(Pt,function(n,i){if(!t)try{n(r),t=gi(i,1)}catch{}}),t};Cu.exports=function(r){if(!r||typeof r!="object")return!1;if(!Fu){var t=gi(Gp(r),8,-1);return Vp(yi,t)>-1?t:t!=="Object"?!1:zp(r)}return qt?Kp(r):null}});var vi=p((G1,ku)=>{"use strict";u();var Yp=wi();ku.exports=function(r){return!!Yp(r)}});var Ju=p(x=>{"use strict";u();var Jp=$f(),Xp=nu(),Z=wi(),Lu=vi();function lr(e){return e.call.bind(e)}var Uu=typeof BigInt<"u",Du=typeof Symbol<"u",z=lr(Object.prototype.toString),Zp=lr(Number.prototype.valueOf),Qp=lr(String.prototype.valueOf),e0=lr(Boolean.prototype.valueOf);Uu&&(ju=lr(BigInt.prototype.valueOf));var ju;Du&&(Nu=lr(Symbol.prototype.valueOf));var Nu;function Pr(e,r){if(typeof e!="object")return!1;try{return r(e),!0}catch{return!1}}x.isArgumentsObject=Jp;x.isGeneratorFunction=Xp;x.isTypedArray=Lu;function r0(e){return typeof Promise<"u"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}x.isPromise=r0;function t0(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(e):Lu(e)||$u(e)}x.isArrayBufferView=t0;function n0(e){return Z(e)==="Uint8Array"}x.isUint8Array=n0;function i0(e){return Z(e)==="Uint8ClampedArray"}x.isUint8ClampedArray=i0;function o0(e){return Z(e)==="Uint16Array"}x.isUint16Array=o0;function a0(e){return Z(e)==="Uint32Array"}x.isUint32Array=a0;function f0(e){return Z(e)==="Int8Array"}x.isInt8Array=f0;function u0(e){return Z(e)==="Int16Array"}x.isInt16Array=u0;function s0(e){return Z(e)==="Int32Array"}x.isInt32Array=s0;function l0(e){return Z(e)==="Float32Array"}x.isFloat32Array=l0;function c0(e){return Z(e)==="Float64Array"}x.isFloat64Array=c0;function h0(e){return Z(e)==="BigInt64Array"}x.isBigInt64Array=h0;function d0(e){return Z(e)==="BigUint64Array"}x.isBigUint64Array=d0;function Ft(e){return z(e)==="[object Map]"}Ft.working=typeof Map<"u"&&Ft(new Map);function p0(e){return typeof Map>"u"?!1:Ft.working?Ft(e):e instanceof Map}x.isMap=p0;function Ct(e){return z(e)==="[object Set]"}Ct.working=typeof Set<"u"&&Ct(new Set);function y0(e){return typeof Set>"u"?!1:Ct.working?Ct(e):e instanceof Set}x.isSet=y0;function kt(e){return z(e)==="[object WeakMap]"}kt.working=typeof WeakMap<"u"&&kt(new WeakMap);function b0(e){return typeof WeakMap>"u"?!1:kt.working?kt(e):e instanceof WeakMap}x.isWeakMap=b0;function mi(e){return z(e)==="[object WeakSet]"}mi.working=typeof WeakSet<"u"&&mi(new WeakSet);function g0(e){return mi(e)}x.isWeakSet=g0;function Lt(e){return z(e)==="[object ArrayBuffer]"}Lt.working=typeof ArrayBuffer<"u"&&Lt(new ArrayBuffer);function Wu(e){return typeof ArrayBuffer>"u"?!1:Lt.working?Lt(e):e instanceof ArrayBuffer}x.isArrayBuffer=Wu;function Ut(e){return z(e)==="[object DataView]"}Ut.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Ut(new DataView(new ArrayBuffer(1),0,1));function $u(e){return typeof DataView>"u"?!1:Ut.working?Ut(e):e instanceof DataView}x.isDataView=$u;var _i=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Mr(e){return z(e)==="[object SharedArrayBuffer]"}function Hu(e){return typeof _i>"u"?!1:(typeof Mr.working>"u"&&(Mr.working=Mr(new _i)),Mr.working?Mr(e):e instanceof _i)}x.isSharedArrayBuffer=Hu;function w0(e){return z(e)==="[object AsyncFunction]"}x.isAsyncFunction=w0;function v0(e){return z(e)==="[object Map Iterator]"}x.isMapIterator=v0;function _0(e){return z(e)==="[object Set Iterator]"}x.isSetIterator=_0;function m0(e){return z(e)==="[object Generator]"}x.isGeneratorObject=m0;function x0(e){return z(e)==="[object WebAssembly.Module]"}x.isWebAssemblyCompiledModule=x0;function Gu(e){return Pr(e,Zp)}x.isNumberObject=Gu;function Vu(e){return Pr(e,Qp)}x.isStringObject=Vu;function Ku(e){return Pr(e,e0)}x.isBooleanObject=Ku;function zu(e){return Uu&&Pr(e,ju)}x.isBigIntObject=zu;function Yu(e){return Du&&Pr(e,Nu)}x.isSymbolObject=Yu;function E0(e){return Gu(e)||Vu(e)||Ku(e)||zu(e)||Yu(e)}x.isBoxedPrimitive=E0;function S0(e){return typeof Uint8Array<"u"&&(Wu(e)||Hu(e))}x.isAnyArrayBuffer=S0;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(x,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var Zu=p((Y1,Xu)=>{u();Xu.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}});var kr=p(E=>{u();var Qu=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},A0=/%[sdj%]/g;E.format=function(e){if(!Gt(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(me(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(e).replace(A0,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])Ht(a)||!cr(a)?o+=" "+a:o+=" "+me(a);return o};E.deprecate=function(e,r){if(typeof l.default<"u"&&l.default.noDeprecation===!0)return e;if(typeof l.default>"u")return function(){return E.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 Dt={},es=/^$/;l.default.env.NODE_DEBUG&&(jt=l.default.env.NODE_DEBUG,jt=jt.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),es=new RegExp("^"+jt+"$","i"));var jt;E.debuglog=function(e){if(e=e.toUpperCase(),!Dt[e])if(es.test(e)){var r=l.default.pid;Dt[e]=function(){var t=E.format.apply(E,arguments);console.error("%s %d: %s",e,r,t)}}else Dt[e]=function(){};return Dt[e]};function me(e,r){var t={seen:[],stylize:R0};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Ai(r)?t.showHidden=r:r&&E._extend(t,r),Ue(t.showHidden)&&(t.showHidden=!1),Ue(t.depth)&&(t.depth=2),Ue(t.colors)&&(t.colors=!1),Ue(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=B0),Wt(t,e,t.depth)}E.inspect=me;me.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]};me.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function B0(e,r){var t=me.styles[r];return t?"\x1B["+me.colors[t][0]+"m"+e+"\x1B["+me.colors[t][1]+"m":e}function R0(e,r){return e}function T0(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function Wt(e,r,t){if(e.customInspect&&r&&Nt(r.inspect)&&r.inspect!==E.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return Gt(n)||(n=Wt(e,n,t)),n}var i=O0(e,r);if(i)return i;var o=Object.keys(r),a=T0(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),Cr(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return xi(r);if(o.length===0){if(Nt(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(Fr(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if($t(r))return e.stylize(Date.prototype.toString.call(r),"date");if(Cr(r))return xi(r)}var s="",d=!1,h=["{","}"];if(rs(r)&&(d=!0,h=["[","]"]),Nt(r)){var b=r.name?": "+r.name:"";s=" [Function"+b+"]"}if(Fr(r)&&(s=" "+RegExp.prototype.toString.call(r)),$t(r)&&(s=" "+Date.prototype.toUTCString.call(r)),Cr(r)&&(s=" "+xi(r)),o.length===0&&(!d||r.length==0))return h[0]+s+h[1];if(t<0)return Fr(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var g;return d?g=I0(e,r,t,a,o):g=o.map(function(w){return Si(e,r,t,a,w,d)}),e.seen.pop(),q0(g,s,h)}function O0(e,r){if(Ue(r))return e.stylize("undefined","undefined");if(Gt(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(ts(r))return e.stylize(""+r,"number");if(Ai(r))return e.stylize(""+r,"boolean");if(Ht(r))return e.stylize("null","null")}function xi(e){return"["+Error.prototype.toString.call(e)+"]"}function I0(e,r,t,n,i){for(var o=[],a=0,f=r.length;a<f;++a)ns(r,String(a))?o.push(Si(e,r,t,n,String(a),!0)):o.push("");return i.forEach(function(s){s.match(/^\d+$/)||o.push(Si(e,r,t,n,s,!0))}),o}function Si(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")),ns(n,i)||(a="["+i+"]"),f||(e.seen.indexOf(s.value)<0?(Ht(t)?f=Wt(e,s.value,null):f=Wt(e,s.value,t-1),f.indexOf(`
2
+ `)>-1&&(o?f=f.split(`
3
+ `).map(function(d){return" "+d}).join(`
4
+ `).slice(2):f=`
5
+ `+f.split(`
6
+ `).map(function(d){return" "+d}).join(`
7
+ `))):f=e.stylize("[Circular]","special")),Ue(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 q0(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]}E.types=Ju();function rs(e){return Array.isArray(e)}E.isArray=rs;function Ai(e){return typeof e=="boolean"}E.isBoolean=Ai;function Ht(e){return e===null}E.isNull=Ht;function M0(e){return e==null}E.isNullOrUndefined=M0;function ts(e){return typeof e=="number"}E.isNumber=ts;function Gt(e){return typeof e=="string"}E.isString=Gt;function P0(e){return typeof e=="symbol"}E.isSymbol=P0;function Ue(e){return e===void 0}E.isUndefined=Ue;function Fr(e){return cr(e)&&Bi(e)==="[object RegExp]"}E.isRegExp=Fr;E.types.isRegExp=Fr;function cr(e){return typeof e=="object"&&e!==null}E.isObject=cr;function $t(e){return cr(e)&&Bi(e)==="[object Date]"}E.isDate=$t;E.types.isDate=$t;function Cr(e){return cr(e)&&(Bi(e)==="[object Error]"||e instanceof Error)}E.isError=Cr;E.types.isNativeError=Cr;function Nt(e){return typeof e=="function"}E.isFunction=Nt;function F0(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}E.isPrimitive=F0;E.isBuffer=Zu();function Bi(e){return Object.prototype.toString.call(e)}function Ei(e){return e<10?"0"+e.toString(10):e.toString(10)}var C0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k0(){var e=new Date,r=[Ei(e.getHours()),Ei(e.getMinutes()),Ei(e.getSeconds())].join(":");return[e.getDate(),C0[e.getMonth()],r].join(" ")}E.log=function(){console.log("%s - %s",k0(),E.format.apply(E,arguments))};E.inherits=R();E._extend=function(e,r){if(!r||!cr(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};function ns(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var Le=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;E.promisify=function(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');if(Le&&r[Le]){var t=r[Le];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,Le,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var n,i,o=new Promise(function(s,d){n=s,i=d}),a=[],f=0;f<arguments.length;f++)a.push(arguments[f]);a.push(function(s,d){s?i(s):n(d)});try{r.apply(this,a)}catch(s){i(s)}return o}return Object.setPrototypeOf(t,Object.getPrototypeOf(r)),Le&&Object.defineProperty(t,Le,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,Qu(r))};E.promisify.custom=Le;function L0(e,r){if(!e){var t=new Error("Promise was rejected with a falsy value");t.reason=e,e=t}return r(e)}function U0(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(L0.bind(null,f,a))})}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,Qu(e)),r}E.callbackify=U0});var ss=p((Q1,us)=>{"use strict";u();function is(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 os(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?is(Object(t),!0).forEach(function(n){D0(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):is(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function D0(e,r,t){return r=fs(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function j0(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function as(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,fs(n.key),n)}}function N0(e,r,t){return r&&as(e.prototype,r),t&&as(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fs(e){var r=W0(e,"string");return typeof r=="symbol"?r:String(r)}function W0(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 $0=oe(),Vt=$0.Buffer,H0=kr(),Ri=H0.inspect,G0=Ri&&Ri.custom||"inspect";function V0(e,r,t){Vt.prototype.copy.call(e,r,t)}us.exports=(function(){function e(){j0(this,e),this.head=null,this.tail=null,this.length=0}return N0(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 Vt.alloc(0);for(var n=Vt.allocUnsafe(t>>>0),i=this.head,o=0;i;)V0(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=Vt.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:G0,value:function(t,n){return Ri(this,os(os({},n),{},{depth:0,customInspect:!1}))}}]),e})()});var Oi=p((rm,cs)=>{"use strict";u();function K0(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(Ti,this,e)):l.default.nextTick(Ti,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(Kt,t):(t._writableState.errorEmitted=!0,l.default.nextTick(ls,t,o)):l.default.nextTick(ls,t,o):r?(l.default.nextTick(Kt,t),r(o)):l.default.nextTick(Kt,t)}),this)}function ls(e,r){Ti(e,r),Kt(e)}function Kt(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function z0(){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 Ti(e,r){e.emit("error",r)}function Y0(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}cs.exports={destroy:K0,undestroy:z0,errorOrDestroy:Y0}});var De=p((nm,ps)=>{"use strict";u();function J0(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}var ds={};function Y(e,r,t){t||(t=Error);function n(o,a,f){return typeof r=="string"?r:r(o,a,f)}var i=(function(o){J0(a,o);function a(f,s,d){return o.call(this,n(f,s,d))||this}return a})(t);i.prototype.name=t.name,i.prototype.code=e,ds[e]=i}function hs(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 X0(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function Z0(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function Q0(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}Y("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);Y("ERR_INVALID_ARG_TYPE",function(e,r,t){var n;typeof r=="string"&&X0(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";var i;if(Z0(e," argument"))i="The ".concat(e," ").concat(n," ").concat(hs(r,"type"));else{var o=Q0(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(hs(r,"type"))}return i+=". Received type ".concat(typeof t),i},TypeError);Y("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Y("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Y("ERR_STREAM_PREMATURE_CLOSE","Premature close");Y("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Y("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Y("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Y("ERR_STREAM_WRITE_AFTER_END","write after end");Y("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Y("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Y("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ps.exports.codes=ds});var Ii=p((om,ys)=>{"use strict";u();var ey=De().codes.ERR_INVALID_OPT_VALUE;function ry(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function ty(e,r,t,n){var i=ry(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?t:"highWaterMark";throw new ey(o,i)}return Math.floor(i)}return e.objectMode?16:16*1024}ys.exports={getHighWaterMark:ty}});var Mi=p((fm,bs)=>{u();bs.exports=ny;function ny(e,r){if(qi("noDeprecation"))return e;var t=!1;function n(){if(!t){if(qi("throwDeprecation"))throw new Error(r);qi("traceDeprecation")?console.trace(r):console.warn(r),t=!0}return e.apply(this,arguments)}return n}function qi(e){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}});var Ci=p((sm,xs)=>{"use strict";u();xs.exports=q;function ws(e){var r=this;this.next=null,this.entry=null,this.finish=function(){Iy(r,e)}}var hr;q.WritableState=Ur;var iy={deprecate:Mi()},vs=Kn(),Yt=oe().Buffer,oy=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ay(e){return Yt.from(e)}function fy(e){return Yt.isBuffer(e)||e instanceof oy}var Fi=Oi(),uy=Ii(),sy=uy.getHighWaterMark,xe=De().codes,ly=xe.ERR_INVALID_ARG_TYPE,cy=xe.ERR_METHOD_NOT_IMPLEMENTED,hy=xe.ERR_MULTIPLE_CALLBACK,dy=xe.ERR_STREAM_CANNOT_PIPE,py=xe.ERR_STREAM_DESTROYED,yy=xe.ERR_STREAM_NULL_VALUES,by=xe.ERR_STREAM_WRITE_AFTER_END,gy=xe.ERR_UNKNOWN_ENCODING,dr=Fi.errorOrDestroy;R()(q,vs);function wy(){}function Ur(e,r,t){hr=hr||je(),e=e||{},typeof t!="boolean"&&(t=r instanceof hr),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){Ay(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 ws(this)}Ur.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(Ur.prototype,"buffer",{get:iy.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var zt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(zt=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:function(r){return zt.call(this,r)?!0:this!==q?!1:r&&r._writableState instanceof Ur}})):zt=function(r){return r instanceof this};function q(e){hr=hr||je();var r=this instanceof hr;if(!r&&!zt.call(q,this))return new q(e);this._writableState=new Ur(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)),vs.call(this)}q.prototype.pipe=function(){dr(this,new dy)};function vy(e,r){var t=new by;dr(e,t),l.default.nextTick(r,t)}function _y(e,r,t,n){var i;return t===null?i=new yy:typeof t!="string"&&!r.objectMode&&(i=new ly("chunk",["string","Buffer"],t)),i?(dr(e,i),l.default.nextTick(n,i),!1):!0}q.prototype.write=function(e,r,t){var n=this._writableState,i=!1,o=!n.objectMode&&fy(e);return o&&!Yt.isBuffer(e)&&(e=ay(e)),typeof r=="function"&&(t=r,r=null),o?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=wy),n.ending?vy(this,t):(o||_y(this,n,e,t))&&(n.pendingcb++,i=xy(this,n,o,e,r,t)),i};q.prototype.cork=function(){this._writableState.corked++};q.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&_s(this,e))};q.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 gy(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function my(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=Yt.from(r,t)),r}Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function xy(e,r,t,n,i,o){if(!t){var a=my(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 d=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:o,next:null},d?d.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else Pi(e,r,!1,f,n,i,o);return s}function Pi(e,r,t,n,i,o,a){r.writelen=n,r.writecb=a,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new py("write")):t?e._writev(i,r.onwrite):e._write(i,o,r.onwrite),r.sync=!1}function Ey(e,r,t,n,i){--r.pendingcb,t?(l.default.nextTick(i,n),l.default.nextTick(Lr,e,r),e._writableState.errorEmitted=!0,dr(e,n)):(i(n),e._writableState.errorEmitted=!0,dr(e,n),Lr(e,r))}function Sy(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Ay(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new hy;if(Sy(t),r)Ey(e,t,n,r,i);else{var o=ms(t)||e.destroyed;!o&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&_s(e,t),n?l.default.nextTick(gs,e,t,o,i):gs(e,t,o,i)}}function gs(e,r,t,n){t||By(e,r),r.pendingcb--,n(),Lr(e,r)}function By(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function _s(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,Pi(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 ws(r),r.bufferedRequestCount=0}else{for(;t;){var s=t.chunk,d=t.encoding,h=t.callback,b=r.objectMode?1:s.length;if(Pi(e,r,!1,b,s,d,h),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}q.prototype._write=function(e,r,t){t(new cy("_write()"))};q.prototype._writev=null;q.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||Oy(this,n,t),this};Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ms(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Ry(e,r){e._final(function(t){r.pendingcb--,t&&dr(e,t),r.prefinished=!0,e.emit("prefinish"),Lr(e,r)})}function Ty(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,l.default.nextTick(Ry,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function Lr(e,r){var t=ms(r);if(t&&(Ty(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 Oy(e,r,t){r.ending=!0,Lr(e,r),t&&(r.finished?l.default.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function Iy(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(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){this._writableState&&(this._writableState.destroyed=r)}});q.prototype.destroy=Fi.destroy;q.prototype._undestroy=Fi.undestroy;q.prototype._destroy=function(e,r){r(e)}});var je=p((cm,Ss)=>{"use strict";u();var qy=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};Ss.exports=fe;var Es=Ui(),Li=Ci();R()(fe,Es);for(ki=qy(Li.prototype),Jt=0;Jt<ki.length;Jt++)Xt=ki[Jt],fe.prototype[Xt]||(fe.prototype[Xt]=Li.prototype[Xt]);var ki,Xt,Jt;function fe(e){if(!(this instanceof fe))return new fe(e);Es.call(this,e),Li.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",My)))}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(fe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(fe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function My(){this._writableState.ended||l.default.nextTick(Py,this)}function Py(e){e.end()}Object.defineProperty(fe.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 Rs=p((Di,Bs)=>{u();var Zt=oe(),de=Zt.Buffer;function As(e,r){for(var t in e)r[t]=e[t]}de.from&&de.alloc&&de.allocUnsafe&&de.allocUnsafeSlow?Bs.exports=Zt:(As(Zt,Di),Di.Buffer=pr);function pr(e,r,t){return de(e,r,t)}As(de,pr);pr.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return de(e,r,t)};pr.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=de(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};pr.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return de(e)};pr.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Zt.SlowBuffer(e)}});var yr=p(Os=>{"use strict";u();var Ni=Rs().Buffer,Ts=Ni.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 Fy(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 Cy(e){var r=Fy(e);if(typeof r!="string"&&(Ni.isEncoding===Ts||!Ts(e)))throw new Error("Unknown encoding: "+e);return r||e}Os.StringDecoder=Dr;function Dr(e){this.encoding=Cy(e);var r;switch(this.encoding){case"utf16le":this.text=Ny,this.end=Wy,r=4;break;case"utf8":this.fillLast=Uy,r=4;break;case"base64":this.text=$y,this.end=Hy,r=3;break;default:this.write=Gy,this.end=Vy;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ni.allocUnsafe(r)}Dr.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||""};Dr.prototype.end=jy;Dr.prototype.text=Dy;Dr.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 ji(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function ky(e,r,t){var n=r.length-1;if(n<t)return 0;var i=ji(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=ji(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=ji(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function Ly(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 Uy(e){var r=this.lastTotal-this.lastNeed,t=Ly(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 Dy(e,r){var t=ky(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 jy(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function Ny(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 Wy(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 $y(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 Hy(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function Gy(e){return e.toString(this.encoding)}function Vy(e){return e&&e.length?this.write(e):""}});var Qt=p((bm,Ms)=>{"use strict";u();var Is=De().codes.ERR_STREAM_PREMATURE_CLOSE;function Ky(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 zy(){}function Yy(e){return e.setHeader&&typeof e.abort=="function"}function qs(e,r,t){if(typeof r=="function")return qs(e,null,r);r||(r={}),t=Ky(t||zy);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,d=function(){n=!1,s=!0,i||t.call(e)},h=function(v){t.call(e,v)},b=function(){var v;if(n&&!s)return(!e._readableState||!e._readableState.ended)&&(v=new Is),t.call(e,v);if(i&&!a)return(!e._writableState||!e._writableState.ended)&&(v=new Is),t.call(e,v)},g=function(){e.req.on("finish",f)};return Yy(e)?(e.on("complete",f),e.on("abort",b),e.req?g():e.on("request",g)):i&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",d),e.on("finish",f),r.error!==!1&&e.on("error",h),e.on("close",b),function(){e.removeListener("complete",f),e.removeListener("abort",b),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",f),e.removeListener("end",d),e.removeListener("error",h),e.removeListener("close",b)}}Ms.exports=qs});var Fs=p((wm,Ps)=>{"use strict";u();var en;function Ee(e,r,t){return r=Jy(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Jy(e){var r=Xy(e,"string");return typeof r=="symbol"?r:String(r)}function Xy(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 Zy=Qt(),Se=Symbol("lastResolve"),Ne=Symbol("lastReject"),jr=Symbol("error"),rn=Symbol("ended"),We=Symbol("lastPromise"),Wi=Symbol("handlePromise"),$e=Symbol("stream");function Ae(e,r){return{value:e,done:r}}function Qy(e){var r=e[Se];if(r!==null){var t=e[$e].read();t!==null&&(e[We]=null,e[Se]=null,e[Ne]=null,r(Ae(t,!1)))}}function eb(e){l.default.nextTick(Qy,e)}function rb(e,r){return function(t,n){e.then(function(){if(r[rn]){t(Ae(void 0,!0));return}r[Wi](t,n)},n)}}var tb=Object.getPrototypeOf(function(){}),nb=Object.setPrototypeOf((en={get stream(){return this[$e]},next:function(){var r=this,t=this[jr];if(t!==null)return Promise.reject(t);if(this[rn])return Promise.resolve(Ae(void 0,!0));if(this[$e].destroyed)return new Promise(function(a,f){l.default.nextTick(function(){r[jr]?f(r[jr]):a(Ae(void 0,!0))})});var n=this[We],i;if(n)i=new Promise(rb(n,this));else{var o=this[$e].read();if(o!==null)return Promise.resolve(Ae(o,!1));i=new Promise(this[Wi])}return this[We]=i,i}},Ee(en,Symbol.asyncIterator,function(){return this}),Ee(en,"return",function(){var r=this;return new Promise(function(t,n){r[$e].destroy(null,function(i){if(i){n(i);return}t(Ae(void 0,!0))})})}),en),tb),ib=function(r){var t,n=Object.create(nb,(t={},Ee(t,$e,{value:r,writable:!0}),Ee(t,Se,{value:null,writable:!0}),Ee(t,Ne,{value:null,writable:!0}),Ee(t,jr,{value:null,writable:!0}),Ee(t,rn,{value:r._readableState.endEmitted,writable:!0}),Ee(t,Wi,{value:function(o,a){var f=n[$e].read();f?(n[We]=null,n[Se]=null,n[Ne]=null,o(Ae(f,!1))):(n[Se]=o,n[Ne]=a)},writable:!0}),t));return n[We]=null,Zy(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[Ne];o!==null&&(n[We]=null,n[Se]=null,n[Ne]=null,o(i)),n[jr]=i;return}var a=n[Se];a!==null&&(n[We]=null,n[Se]=null,n[Ne]=null,a(Ae(void 0,!0))),n[rn]=!0}),r.on("readable",eb.bind(null,n)),n};Ps.exports=ib});var ks=p((_m,Cs)=>{u();Cs.exports=function(){throw new Error("Readable.from is not available in the browser")}});var Ui=p((Em,Vs)=>{"use strict";u();Vs.exports=S;var br;S.ReadableState=js;var xm=tr().EventEmitter,Ds=function(r,t){return r.listeners(t).length},Wr=Kn(),tn=oe().Buffer,ob=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ab(e){return tn.from(e)}function fb(e){return tn.isBuffer(e)||e instanceof ob}var $i=kr(),_;$i&&$i.debuglog?_=$i.debuglog("stream"):_=function(){};var ub=ss(),Ji=Oi(),sb=Ii(),lb=sb.getHighWaterMark,nn=De().codes,cb=nn.ERR_INVALID_ARG_TYPE,hb=nn.ERR_STREAM_PUSH_AFTER_EOF,db=nn.ERR_METHOD_NOT_IMPLEMENTED,pb=nn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,gr,Hi,Gi;R()(S,Wr);var Nr=Ji.errorOrDestroy,Vi=["error","close","destroy","pause","resume"];function yb(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 js(e,r,t){br=br||je(),e=e||{},typeof t!="boolean"&&(t=r instanceof br),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=lb(this,e,"readableHighWaterMark",t),this.buffer=new ub,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&&(gr||(gr=yr().StringDecoder),this.decoder=new gr(e.encoding),this.encoding=e.encoding)}function S(e){if(br=br||je(),!(this instanceof S))return new S(e);var r=this instanceof br;this._readableState=new js(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Wr.call(this)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){this._readableState&&(this._readableState.destroyed=r)}});S.prototype.destroy=Ji.destroy;S.prototype._undestroy=Ji.undestroy;S.prototype._destroy=function(e,r){r(e)};S.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=tn.from(e,r),r=""),n=!0),Ns(this,e,r,!1,n)};S.prototype.unshift=function(e){return Ns(this,e,null,!0,!1)};function Ns(e,r,t,n,i){_("readableAddChunk",r);var o=e._readableState;if(r===null)o.reading=!1,wb(e,o);else{var a;if(i||(a=bb(o,r)),a)Nr(e,a);else if(o.objectMode||r&&r.length>0)if(typeof r!="string"&&!o.objectMode&&Object.getPrototypeOf(r)!==tn.prototype&&(r=ab(r)),n)o.endEmitted?Nr(e,new pb):Ki(e,o,r,!0);else if(o.ended)Nr(e,new hb);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!t?(r=o.decoder.write(r),o.objectMode||r.length!==0?Ki(e,o,r,!1):Yi(e,o)):Ki(e,o,r,!1)}else n||(o.reading=!1,Yi(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Ki(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&&on(e)),Yi(e,r)}function bb(e,r){var t;return!fb(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new cb("chunk",["string","Buffer","Uint8Array"],r)),t}S.prototype.isPaused=function(){return this._readableState.flowing===!1};S.prototype.setEncoding=function(e){gr||(gr=yr().StringDecoder);var r=new gr(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 Ls=1073741824;function gb(e){return e>=Ls?e=Ls:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Us(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=gb(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}S.prototype.read=function(e){_("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 _("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?zi(this):on(this),null;if(e=Us(e,r),e===0&&r.ended)return r.length===0&&zi(this),null;var n=r.needReadable;_("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,_("length less than watermark",n)),r.ended||r.reading?(n=!1,_("reading or ended",n)):n&&(_("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=Us(t,r)));var i;return e>0?i=Hs(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&&zi(this)),i!==null&&this.emit("data",i),i};function wb(e,r){if(_("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?on(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,Ws(e)))}}function on(e){var r=e._readableState;_("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(_("emitReadable",r.flowing),r.emittedReadable=!0,l.default.nextTick(Ws,e))}function Ws(e){var r=e._readableState;_("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,Xi(e)}function Yi(e,r){r.readingMore||(r.readingMore=!0,l.default.nextTick(vb,e,r))}function vb(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(_("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}S.prototype._read=function(e){Nr(this,new db("_read()"))};S.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,_("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:O;n.endEmitted?l.default.nextTick(o):t.once("end",o),e.on("unpipe",a);function a(C,F){_("onunpipe"),C===t&&F&&F.hasUnpiped===!1&&(F.hasUnpiped=!0,h())}function f(){_("onend"),e.end()}var s=_b(t);e.on("drain",s);var d=!1;function h(){_("cleanup"),e.removeListener("close",w),e.removeListener("finish",v),e.removeListener("drain",s),e.removeListener("error",g),e.removeListener("unpipe",a),t.removeListener("end",f),t.removeListener("end",O),t.removeListener("data",b),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&s()}t.on("data",b);function b(C){_("ondata");var F=e.write(C);_("dest.write",F),F===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&Gs(n.pipes,e)!==-1)&&!d&&(_("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function g(C){_("onerror",C),O(),e.removeListener("error",g),Ds(e,"error")===0&&Nr(e,C)}yb(e,"error",g);function w(){e.removeListener("finish",v),O()}e.once("close",w);function v(){_("onfinish"),e.removeListener("close",w),O()}e.once("finish",v);function O(){_("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(_("pipe resume"),t.resume()),e};function _b(e){return function(){var t=e._readableState;_("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Ds(e,"data")&&(t.flowing=!0,Xi(e))}}S.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=Gs(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)};S.prototype.on=function(e,r){var t=Wr.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,_("on readable",n.length,n.reading),n.length?on(this):n.reading||l.default.nextTick(mb,this)),t};S.prototype.addListener=S.prototype.on;S.prototype.removeListener=function(e,r){var t=Wr.prototype.removeListener.call(this,e,r);return e==="readable"&&l.default.nextTick($s,this),t};S.prototype.removeAllListeners=function(e){var r=Wr.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&l.default.nextTick($s,this),r};function $s(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 mb(e){_("readable nexttick read 0"),e.read(0)}S.prototype.resume=function(){var e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,xb(this,e)),e.paused=!1,this};function xb(e,r){r.resumeScheduled||(r.resumeScheduled=!0,l.default.nextTick(Eb,e,r))}function Eb(e,r){_("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),Xi(e),r.flowing&&!r.reading&&e.read(0)}S.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Xi(e){var r=e._readableState;for(_("flow",r.flowing);r.flowing&&e.read()!==null;);}S.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(_("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(_("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<Vi.length;o++)e.on(Vi[o],this.emit.bind(this,Vi[o]));return this._read=function(a){_("wrapped _read",a),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(S.prototype[Symbol.asyncIterator]=function(){return Hi===void 0&&(Hi=Fs()),Hi(this)});Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});S._fromList=Hs;Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Hs(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 zi(e){var r=e._readableState;_("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,l.default.nextTick(Sb,r,e))}function Sb(e,r){if(_("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"&&(S.from=function(e,r){return Gi===void 0&&(Gi=ks()),Gi(S,e,r)});function Gs(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var Zi=p((Am,zs)=>{"use strict";u();zs.exports=pe;var an=De().codes,Ab=an.ERR_METHOD_NOT_IMPLEMENTED,Bb=an.ERR_MULTIPLE_CALLBACK,Rb=an.ERR_TRANSFORM_ALREADY_TRANSFORMING,Tb=an.ERR_TRANSFORM_WITH_LENGTH_0,fn=je();R()(pe,fn);function Ob(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new Bb);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 pe(e){if(!(this instanceof pe))return new pe(e);fn.call(this,e),this._transformState={afterTransform:Ob.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",Ib)}function Ib(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){Ks(e,r,t)}):Ks(this,null,null)}pe.prototype.push=function(e,r){return this._transformState.needTransform=!1,fn.prototype.push.call(this,e,r)};pe.prototype._transform=function(e,r,t){t(new Ab("_transform()"))};pe.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)}};pe.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};pe.prototype._destroy=function(e,r){fn.prototype._destroy.call(this,e,function(t){r(t)})};function Ks(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new Tb;if(e._transformState.transforming)throw new Rb;return e.push(null)}});var Xs=p((Rm,Js)=>{"use strict";u();Js.exports=$r;var Ys=Zi();R()($r,Ys);function $r(e){if(!(this instanceof $r))return new $r(e);Ys.call(this,e)}$r.prototype._transform=function(e,r,t){t(null,e)}});var tl=p((Om,rl)=>{"use strict";u();var Qi;function qb(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var el=De().codes,Mb=el.ERR_MISSING_ARGS,Pb=el.ERR_STREAM_DESTROYED;function Zs(e){if(e)throw e}function Fb(e){return e.setHeader&&typeof e.abort=="function"}function Cb(e,r,t,n){n=qb(n);var i=!1;e.on("close",function(){i=!0}),Qi===void 0&&(Qi=Qt()),Qi(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,Fb(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new Pb("pipe"))}}}function Qs(e){e()}function kb(e,r){return e.pipe(r)}function Lb(e){return!e.length||typeof e[e.length-1]!="function"?Zs:e.pop()}function Ub(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=Lb(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new Mb("streams");var i,o=r.map(function(a,f){var s=f<r.length-1,d=f>0;return Cb(a,s,d,function(h){i||(i=h),h&&o.forEach(Qs),!s&&(o.forEach(Qs),n(i))})});return r.reduce(kb)}rl.exports=Ub});var ro=p((qm,nl)=>{u();nl.exports=J;var eo=tr().EventEmitter,Db=R();Db(J,eo);J.Readable=Ui();J.Writable=Ci();J.Duplex=je();J.Transform=Zi();J.PassThrough=Xs();J.finished=Qt();J.pipeline=tl();J.Stream=J;function J(){eo.call(this)}J.prototype.pipe=function(e,r){var t=this;function n(h){e.writable&&e.write(h)===!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(h){if(d(),eo.listenerCount(this,"error")===0)throw h}t.on("error",s),e.on("error",s);function d(){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",d),t.removeListener("close",d),e.removeListener("close",d)}return t.on("end",d),t.on("close",d),e.on("close",d),e.emit("pipe",t),e}});var al=p((Pm,ol)=>{"use strict";u();var ue=D().Buffer,il=ro().Transform,jb=R();function Be(e){il.call(this),this._block=ue.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}jb(Be,il);Be.prototype._transform=function(e,r,t){var n=null;try{this.update(e,r)}catch(i){n=i}t(n)};Be.prototype._flush=function(e){var r=null;try{this.push(this.digest())}catch(t){r=t}e(r)};var Nb=typeof Uint8Array<"u",Wb=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(ue.prototype instanceof Uint8Array||ue.TYPED_ARRAY_SUPPORT);function $b(e,r){if(e instanceof ue)return e;if(typeof e=="string")return ue.from(e,r);if(Wb&&ArrayBuffer.isView(e)){if(e.byteLength===0)return ue.alloc(0);var t=ue.from(e.buffer,e.byteOffset,e.byteLength);if(t.byteLength===e.byteLength)return t}if(Nb&&e instanceof Uint8Array||ue.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return ue.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}Be.prototype.update=function(e,r){if(this._finalized)throw new Error("Digest already called");e=$b(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};Be.prototype._update=function(){throw new Error("_update is not implemented")};Be.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};Be.prototype._digest=function(){throw new Error("_digest is not implemented")};ol.exports=Be});var to=p((Cm,ul)=>{"use strict";u();var Hb=R(),fl=al(),Gb=D().Buffer,Vb=new Array(16);function un(){fl.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}Hb(un,fl);un.prototype._update=function(){for(var e=Vb,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=j(t,n,i,o,e[0],3614090360,7),o=j(o,t,n,i,e[1],3905402710,12),i=j(i,o,t,n,e[2],606105819,17),n=j(n,i,o,t,e[3],3250441966,22),t=j(t,n,i,o,e[4],4118548399,7),o=j(o,t,n,i,e[5],1200080426,12),i=j(i,o,t,n,e[6],2821735955,17),n=j(n,i,o,t,e[7],4249261313,22),t=j(t,n,i,o,e[8],1770035416,7),o=j(o,t,n,i,e[9],2336552879,12),i=j(i,o,t,n,e[10],4294925233,17),n=j(n,i,o,t,e[11],2304563134,22),t=j(t,n,i,o,e[12],1804603682,7),o=j(o,t,n,i,e[13],4254626195,12),i=j(i,o,t,n,e[14],2792965006,17),n=j(n,i,o,t,e[15],1236535329,22),t=N(t,n,i,o,e[1],4129170786,5),o=N(o,t,n,i,e[6],3225465664,9),i=N(i,o,t,n,e[11],643717713,14),n=N(n,i,o,t,e[0],3921069994,20),t=N(t,n,i,o,e[5],3593408605,5),o=N(o,t,n,i,e[10],38016083,9),i=N(i,o,t,n,e[15],3634488961,14),n=N(n,i,o,t,e[4],3889429448,20),t=N(t,n,i,o,e[9],568446438,5),o=N(o,t,n,i,e[14],3275163606,9),i=N(i,o,t,n,e[3],4107603335,14),n=N(n,i,o,t,e[8],1163531501,20),t=N(t,n,i,o,e[13],2850285829,5),o=N(o,t,n,i,e[2],4243563512,9),i=N(i,o,t,n,e[7],1735328473,14),n=N(n,i,o,t,e[12],2368359562,20),t=W(t,n,i,o,e[5],4294588738,4),o=W(o,t,n,i,e[8],2272392833,11),i=W(i,o,t,n,e[11],1839030562,16),n=W(n,i,o,t,e[14],4259657740,23),t=W(t,n,i,o,e[1],2763975236,4),o=W(o,t,n,i,e[4],1272893353,11),i=W(i,o,t,n,e[7],4139469664,16),n=W(n,i,o,t,e[10],3200236656,23),t=W(t,n,i,o,e[13],681279174,4),o=W(o,t,n,i,e[0],3936430074,11),i=W(i,o,t,n,e[3],3572445317,16),n=W(n,i,o,t,e[6],76029189,23),t=W(t,n,i,o,e[9],3654602809,4),o=W(o,t,n,i,e[12],3873151461,11),i=W(i,o,t,n,e[15],530742520,16),n=W(n,i,o,t,e[2],3299628645,23),t=$(t,n,i,o,e[0],4096336452,6),o=$(o,t,n,i,e[7],1126891415,10),i=$(i,o,t,n,e[14],2878612391,15),n=$(n,i,o,t,e[5],4237533241,21),t=$(t,n,i,o,e[12],1700485571,6),o=$(o,t,n,i,e[3],2399980690,10),i=$(i,o,t,n,e[10],4293915773,15),n=$(n,i,o,t,e[1],2240044497,21),t=$(t,n,i,o,e[8],1873313359,6),o=$(o,t,n,i,e[15],4264355552,10),i=$(i,o,t,n,e[6],2734768916,15),n=$(n,i,o,t,e[13],1309151649,21),t=$(t,n,i,o,e[4],4149444226,6),o=$(o,t,n,i,e[11],3174756917,10),i=$(i,o,t,n,e[2],718787259,15),n=$(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};un.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=Gb.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 sn(e,r){return e<<r|e>>>32-r}function j(e,r,t,n,i,o,a){return sn(e+(r&t|~r&n)+i+o|0,a)+r|0}function N(e,r,t,n,i,o,a){return sn(e+(r&n|t&~n)+i+o|0,a)+r|0}function W(e,r,t,n,i,o,a){return sn(e+(r^t^n)+i+o|0,a)+r|0}function $(e,r,t,n,i,o,a){return sn(e+(t^(r|~n))+i+o|0,a)+r|0}ul.exports=un});var ll=p((Lm,sl)=>{u();var Kb={}.toString;sl.exports=Array.isArray||function(e){return Kb.call(e)=="[object Array]"}});var hl=p((Dm,cl)=>{"use strict";u();var zb=Pe(),Yb=ke(),Jb=Yb("TypedArray.prototype.buffer",!0),Xb=vi();cl.exports=Jb||function(r){if(!Xb(r))throw new zb("Not a Typed Array");return r.buffer}});var ln=p((Nm,pl)=>{"use strict";u();var Q=D().Buffer,Zb=ll(),Qb=hl(),eg=ArrayBuffer.isView||function(r){try{return Qb(r),!0}catch{return!1}},rg=typeof Uint8Array<"u",dl=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",tg=dl&&(Q.prototype instanceof Uint8Array||Q.TYPED_ARRAY_SUPPORT);pl.exports=function(r,t){if(Q.isBuffer(r))return r.constructor&&!("isBuffer"in r)?Q.from(r):r;if(typeof r=="string")return Q.from(r,t);if(dl&&eg(r)){if(r.byteLength===0)return Q.alloc(0);if(tg){var n=Q.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=Q.from(i);if(o.length===r.byteLength)return o}if(rg&&r instanceof Uint8Array)return Q.from(r);var a=Zb(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||Q.isBuffer(r)&&r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r))return Q.from(r);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var wl=p(($m,gl)=>{"use strict";u();var ng=D().Buffer,ig=ln(),bl=typeof Uint8Array<"u",og=bl&&typeof ArrayBuffer<"u",yl=og&&ArrayBuffer.isView;gl.exports=function(e,r){if(typeof e=="string"||ng.isBuffer(e)||bl&&e instanceof Uint8Array||yl&&yl(e))return ig(e,r);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Hr=p((Gm,no)=>{"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?no.exports={nextTick:ag}:no.exports=l.default;function ag(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 _l=p((Km,vl)=>{u();var fg={}.toString;vl.exports=Array.isArray||function(e){return fg.call(e)=="[object Array]"}});var io=p((Ym,ml)=>{u();ml.exports=tr().EventEmitter});var hn=p((oo,El)=>{u();var cn=oe(),ye=cn.Buffer;function xl(e,r){for(var t in e)r[t]=e[t]}ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?El.exports=cn:(xl(cn,oo),oo.Buffer=wr);function wr(e,r,t){return ye(e,r,t)}xl(ye,wr);wr.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ye(e,r,t)};wr.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=ye(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};wr.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ye(e)};wr.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return cn.SlowBuffer(e)}});var vr=p(H=>{u();function ug(e){return Array.isArray?Array.isArray(e):dn(e)==="[object Array]"}H.isArray=ug;function sg(e){return typeof e=="boolean"}H.isBoolean=sg;function lg(e){return e===null}H.isNull=lg;function cg(e){return e==null}H.isNullOrUndefined=cg;function hg(e){return typeof e=="number"}H.isNumber=hg;function dg(e){return typeof e=="string"}H.isString=dg;function pg(e){return typeof e=="symbol"}H.isSymbol=pg;function yg(e){return e===void 0}H.isUndefined=yg;function bg(e){return dn(e)==="[object RegExp]"}H.isRegExp=bg;function gg(e){return typeof e=="object"&&e!==null}H.isObject=gg;function wg(e){return dn(e)==="[object Date]"}H.isDate=wg;function vg(e){return dn(e)==="[object Error]"||e instanceof Error}H.isError=vg;function _g(e){return typeof e=="function"}H.isFunction=_g;function mg(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}H.isPrimitive=mg;H.isBuffer=oe().Buffer.isBuffer;function dn(e){return Object.prototype.toString.call(e)}});var Al=p((ex,ao)=>{"use strict";u();function xg(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var Sl=hn().Buffer,Gr=kr();function Eg(e,r,t){e.copy(r,t)}ao.exports=(function(){function e(){xg(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 Sl.alloc(0);for(var n=Sl.allocUnsafe(t>>>0),i=this.head,o=0;i;)Eg(i.data,n,o),o+=i.data.length,i=i.next;return n},e})();Gr&&Gr.inspect&&Gr.inspect.custom&&(ao.exports.prototype[Gr.inspect.custom]=function(){var e=Gr.inspect({length:this.length});return this.constructor.name+" "+e})});var fo=p((tx,Bl)=>{"use strict";u();var pn=Hr();function Sg(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,pn.nextTick(yn,this,e)):pn.nextTick(yn,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,pn.nextTick(yn,t,o)):pn.nextTick(yn,t,o):r&&r(o)}),this)}function Ag(){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 yn(e,r){e.emit("error",r)}Bl.exports={destroy:Sg,undestroy:Ag}});var so=p((ix,Fl)=>{"use strict";u();var He=Hr();Fl.exports=P;function Tl(e){var r=this;this.next=null,this.entry=null,this.finish=function(){$g(r,e)}}var Bg=!l.default.browser&&["v0.10","v0.9."].indexOf(l.default.version.slice(0,5))>-1?setImmediate:He.nextTick,_r;P.WritableState=Kr;var Ol=Object.create(vr());Ol.inherits=R();var Rg={deprecate:Mi()},Il=io(),gn=hn().Buffer,Tg=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Og(e){return gn.from(e)}function Ig(e){return gn.isBuffer(e)||e instanceof Tg}var ql=fo();Ol.inherits(P,Il);function qg(){}function Kr(e,r){_r=_r||Ge(),e=e||{};var t=r instanceof _r;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){Ug(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 Tl(this)}Kr.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(Kr.prototype,"buffer",{get:Rg.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var bn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(bn=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(e){return bn.call(this,e)?!0:this!==P?!1:e&&e._writableState instanceof Kr}})):bn=function(e){return e instanceof this};function P(e){if(_r=_r||Ge(),!bn.call(P,this)&&!(this instanceof _r))return new P(e);this._writableState=new Kr(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)),Il.call(this)}P.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Mg(e,r){var t=new Error("write after end");e.emit("error",t),He.nextTick(r,t)}function Pg(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),He.nextTick(n,o),i=!1),i}P.prototype.write=function(e,r,t){var n=this._writableState,i=!1,o=!n.objectMode&&Ig(e);return o&&!gn.isBuffer(e)&&(e=Og(e)),typeof r=="function"&&(t=r,r=null),o?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=qg),n.ended?Mg(this,t):(o||Pg(this,n,e,t))&&(n.pendingcb++,i=Cg(this,n,o,e,r,t)),i};P.prototype.cork=function(){var e=this._writableState;e.corked++};P.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Ml(this,e))};P.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 Fg(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=gn.from(r,t)),r}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Cg(e,r,t,n,i,o){if(!t){var a=Fg(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 d=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:o,next:null},d?d.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else uo(e,r,!1,f,n,i,o);return s}function uo(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 kg(e,r,t,n,i){--r.pendingcb,t?(He.nextTick(i,n),He.nextTick(Vr,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),Vr(e,r))}function Lg(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Ug(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(Lg(t),r)kg(e,t,n,r,i);else{var o=Pl(t);!o&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Ml(e,t),n?Bg(Rl,e,t,o,i):Rl(e,t,o,i)}}function Rl(e,r,t,n){t||Dg(e,r),r.pendingcb--,n(),Vr(e,r)}function Dg(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function Ml(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,uo(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 Tl(r),r.bufferedRequestCount=0}else{for(;t;){var s=t.chunk,d=t.encoding,h=t.callback,b=r.objectMode?1:s.length;if(uo(e,r,!1,b,s,d,h),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}P.prototype._write=function(e,r,t){t(new Error("_write() is not implemented"))};P.prototype._writev=null;P.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||Wg(this,n,t)};function Pl(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function jg(e,r){e._final(function(t){r.pendingcb--,t&&e.emit("error",t),r.prefinished=!0,e.emit("prefinish"),Vr(e,r)})}function Ng(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"?(r.pendingcb++,r.finalCalled=!0,He.nextTick(jg,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function Vr(e,r){var t=Pl(r);return t&&(Ng(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"))),t}function Wg(e,r,t){r.ending=!0,Vr(e,r),t&&(r.finished?He.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function $g(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(P.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});P.prototype.destroy=ql.destroy;P.prototype._undestroy=ql.undestroy;P.prototype._destroy=function(e,r){this.end(),r(e)}});var Ge=p((ax,Ul)=>{"use strict";u();var Cl=Hr(),Hg=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};Ul.exports=be;var kl=Object.create(vr());kl.inherits=R();var Ll=ho(),co=so();kl.inherits(be,Ll);for(lo=Hg(co.prototype),wn=0;wn<lo.length;wn++)vn=lo[wn],be.prototype[vn]||(be.prototype[vn]=co.prototype[vn]);var lo,vn,wn;function be(e){if(!(this instanceof be))return new be(e);Ll.call(this,e),co.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",Gg)}Object.defineProperty(be.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Gg(){this.allowHalfOpen||this._writableState.ended||Cl.nextTick(Vg,this)}function Vg(e){e.end()}Object.defineProperty(be.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)}});be.prototype._destroy=function(e,r){this.push(null),this.end(),Cl.nextTick(r,e)}});var ho=p((sx,Jl)=>{"use strict";u();var xr=Hr();Jl.exports=T;var Kg=_l(),zr;T.ReadableState=Gl;var ux=tr().EventEmitter,Wl=function(e,r){return e.listeners(r).length},wo=io(),Yr=hn().Buffer,zg=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Yg(e){return Yr.from(e)}function Jg(e){return Yr.isBuffer(e)||e instanceof zg}var $l=Object.create(vr());$l.inherits=R();var po=kr(),A=void 0;po&&po.debuglog?A=po.debuglog("stream"):A=function(){};var Xg=Al(),Hl=fo(),mr;$l.inherits(T,wo);var yo=["error","close","destroy","pause","resume"];function Zg(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Kg(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function Gl(e,r){zr=zr||Ge(),e=e||{};var t=r instanceof zr;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 Xg,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&&(mr||(mr=yr().StringDecoder),this.decoder=new mr(e.encoding),this.encoding=e.encoding)}function T(e){if(zr=zr||Ge(),!(this instanceof T))return new T(e);this._readableState=new Gl(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wo.call(this)}Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});T.prototype.destroy=Hl.destroy;T.prototype._undestroy=Hl.undestroy;T.prototype._destroy=function(e,r){this.push(null),r(e)};T.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=Yr.from(e,r),r=""),n=!0),Vl(this,e,r,!1,n)};T.prototype.unshift=function(e){return Vl(this,e,null,!0,!1)};function Vl(e,r,t,n,i){var o=e._readableState;if(r===null)o.reading=!1,tw(e,o);else{var a;i||(a=Qg(o,r)),a?e.emit("error",a):o.objectMode||r&&r.length>0?(typeof r!="string"&&!o.objectMode&&Object.getPrototypeOf(r)!==Yr.prototype&&(r=Yg(r)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):bo(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?bo(e,o,r,!1):Kl(e,o)):bo(e,o,r,!1))):n||(o.reading=!1)}return ew(o)}function bo(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&&_n(e)),Kl(e,r)}function Qg(e,r){var t;return!Jg(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new TypeError("Invalid non-string/buffer chunk")),t}function ew(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}T.prototype.isPaused=function(){return this._readableState.flowing===!1};T.prototype.setEncoding=function(e){return mr||(mr=yr().StringDecoder),this._readableState.decoder=new mr(e),this._readableState.encoding=e,this};var Dl=8388608;function rw(e){return e>=Dl?e=Dl:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function jl(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=rw(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}T.prototype.read=function(e){A("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 A("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?go(this):_n(this),null;if(e=jl(e,r),e===0&&r.ended)return r.length===0&&go(this),null;var n=r.needReadable;A("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,A("length less than watermark",n)),r.ended||r.reading?(n=!1,A("reading or ended",n)):n&&(A("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=jl(t,r)));var i;return e>0?i=zl(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&&go(this)),i!==null&&this.emit("data",i),i};function tw(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,_n(e)}}function _n(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(A("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?xr.nextTick(Nl,e):Nl(e))}function Nl(e){A("emit readable"),e.emit("readable"),vo(e)}function Kl(e,r){r.readingMore||(r.readingMore=!0,xr.nextTick(nw,e,r))}function nw(e,r){for(var t=r.length;!r.reading&&!r.flowing&&!r.ended&&r.length<r.highWaterMark&&(A("maybeReadMore read 0"),e.read(0),t!==r.length);)t=r.length;r.readingMore=!1}T.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};T.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,A("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:C;n.endEmitted?xr.nextTick(o):t.once("end",o),e.on("unpipe",a);function a(F,I){A("onunpipe"),F===t&&I&&I.hasUnpiped===!1&&(I.hasUnpiped=!0,h())}function f(){A("onend"),e.end()}var s=iw(t);e.on("drain",s);var d=!1;function h(){A("cleanup"),e.removeListener("close",v),e.removeListener("finish",O),e.removeListener("drain",s),e.removeListener("error",w),e.removeListener("unpipe",a),t.removeListener("end",f),t.removeListener("end",C),t.removeListener("data",g),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&s()}var b=!1;t.on("data",g);function g(F){A("ondata"),b=!1;var I=e.write(F);I===!1&&!b&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&Yl(n.pipes,e)!==-1)&&!d&&(A("false write response, pause",n.awaitDrain),n.awaitDrain++,b=!0),t.pause())}function w(F){A("onerror",F),C(),e.removeListener("error",w),Wl(e,"error")===0&&e.emit("error",F)}Zg(e,"error",w);function v(){e.removeListener("finish",O),C()}e.once("close",v);function O(){A("onfinish"),e.removeListener("close",v),C()}e.once("finish",O);function C(){A("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(A("pipe resume"),t.resume()),e};function iw(e){return function(){var r=e._readableState;A("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Wl(e,"data")&&(r.flowing=!0,vo(e))}}T.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=Yl(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)};T.prototype.on=function(e,r){var t=wo.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&&_n(this):xr.nextTick(ow,this))}return t};T.prototype.addListener=T.prototype.on;function ow(e){A("readable nexttick read 0"),e.read(0)}T.prototype.resume=function(){var e=this._readableState;return e.flowing||(A("resume"),e.flowing=!0,aw(this,e)),this};function aw(e,r){r.resumeScheduled||(r.resumeScheduled=!0,xr.nextTick(fw,e,r))}function fw(e,r){r.reading||(A("resume read 0"),e.read(0)),r.resumeScheduled=!1,r.awaitDrain=0,e.emit("resume"),vo(e),r.flowing&&!r.reading&&e.read(0)}T.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function vo(e){var r=e._readableState;for(A("flow",r.flowing);r.flowing&&e.read()!==null;);}T.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(A("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(A("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<yo.length;o++)e.on(yo[o],this.emit.bind(this,yo[o]));return this._read=function(a){A("wrapped _read",a),n&&(n=!1,e.resume())},this};Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});T._fromList=zl;function zl(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=uw(e,r.buffer,r.decoder),t}function uw(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):lw(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 lw(e,r){var t=Yr.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 go(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,xr.nextTick(cw,r,e))}function cw(e,r){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"))}function Yl(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var _o=p((cx,Ql)=>{"use strict";u();Ql.exports=ge;var mn=Ge(),Zl=Object.create(vr());Zl.inherits=R();Zl.inherits(ge,mn);function hw(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 ge(e){if(!(this instanceof ge))return new ge(e);mn.call(this,e),this._transformState={afterTransform:hw.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",dw)}function dw(){var e=this;typeof this._flush=="function"?this._flush(function(r,t){Xl(e,r,t)}):Xl(this,null,null)}ge.prototype.push=function(e,r){return this._transformState.needTransform=!1,mn.prototype.push.call(this,e,r)};ge.prototype._transform=function(e,r,t){throw new Error("_transform() is not implemented")};ge.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)}};ge.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};ge.prototype._destroy=function(e,r){var t=this;mn.prototype._destroy.call(this,e,function(n){r(n),t.emit("close")})};function Xl(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 nc=p((dx,tc)=>{"use strict";u();tc.exports=Jr;var ec=_o(),rc=Object.create(vr());rc.inherits=R();rc.inherits(Jr,ec);function Jr(e){if(!(this instanceof Jr))return new Jr(e);ec.call(this,e)}Jr.prototype._transform=function(e,r,t){t(null,e)}});var oc=p((se,ic)=>{u();se=ic.exports=ho();se.Stream=se;se.Readable=se;se.Writable=so();se.Duplex=Ge();se.Transform=_o();se.PassThrough=nc()});var uc=p((bx,fc)=>{"use strict";u();var pw=D().Buffer,yw=wl(),ac=oc().Transform,bw=R();function Re(e){ac.call(this),this._block=pw.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}bw(Re,ac);Re.prototype._transform=function(e,r,t){var n=null;try{this.update(e,r)}catch(i){n=i}t(n)};Re.prototype._flush=function(e){var r=null;try{this.push(this.digest())}catch(t){r=t}e(r)};Re.prototype.update=function(e,r){if(this._finalized)throw new Error("Digest already called");for(var t=yw(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};Re.prototype._update=function(){throw new Error("_update is not implemented")};Re.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};Re.prototype._digest=function(){throw new Error("_digest is not implemented")};fc.exports=Re});var xo=p((wx,yc)=>{"use strict";u();var mo=oe().Buffer,gw=R(),pc=uc(),ww=new Array(16),Xr=[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],Zr=[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],Qr=[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],et=[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],rt=[0,1518500249,1859775393,2400959708,2840853838],tt=[1352829926,1548603684,1836072691,2053994217,0];function Ve(e,r){return e<<r|e>>>32-r}function sc(e,r,t,n,i,o,a,f){return Ve(e+(r^t^n)+o+a|0,f)+i|0}function lc(e,r,t,n,i,o,a,f){return Ve(e+(r&t|~r&n)+o+a|0,f)+i|0}function cc(e,r,t,n,i,o,a,f){return Ve(e+((r|~t)^n)+o+a|0,f)+i|0}function hc(e,r,t,n,i,o,a,f){return Ve(e+(r&n|t&~n)+o+a|0,f)+i|0}function dc(e,r,t,n,i,o,a,f){return Ve(e+(r^(t|~n))+o+a|0,f)+i|0}function xn(){pc.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}gw(xn,pc);xn.prototype._update=function(){for(var e=ww,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,d=this._c|0,h=this._d|0,b=this._e|0,g=0;g<80;g+=1){var w,v;g<16?(w=sc(t,n,i,o,a,e[Xr[g]],rt[0],Qr[g]),v=dc(f,s,d,h,b,e[Zr[g]],tt[0],et[g])):g<32?(w=lc(t,n,i,o,a,e[Xr[g]],rt[1],Qr[g]),v=hc(f,s,d,h,b,e[Zr[g]],tt[1],et[g])):g<48?(w=cc(t,n,i,o,a,e[Xr[g]],rt[2],Qr[g]),v=cc(f,s,d,h,b,e[Zr[g]],tt[2],et[g])):g<64?(w=hc(t,n,i,o,a,e[Xr[g]],rt[3],Qr[g]),v=lc(f,s,d,h,b,e[Zr[g]],tt[3],et[g])):(w=dc(t,n,i,o,a,e[Xr[g]],rt[4],Qr[g]),v=sc(f,s,d,h,b,e[Zr[g]],tt[4],et[g])),t=a,a=o,o=Ve(i,10),i=n,n=w,f=b,b=h,h=Ve(d,10),d=s,s=v}var O=this._b+i+h|0;this._b=this._c+o+b|0,this._c=this._d+a+f|0,this._d=this._e+t+s|0,this._e=this._a+n+d|0,this._a=O};xn.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=mo.alloc?mo.alloc(20):new mo(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};yc.exports=xn});var Ke=p((_x,bc)=>{"use strict";u();var vw=D().Buffer,_w=ln();function En(e,r){this._block=vw.alloc(e),this._finalSize=r,this._blockSize=e,this._len=0}En.prototype.update=function(e,r){e=_w(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),d=0;d<s;d++)t[f+d]=e[a+d];o+=s,a+=s,o%n===0&&this._update(t)}return this._len+=i,this};En.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};En.prototype._update=function(){throw new Error("_update must be implemented by subclass")};bc.exports=En});var vc=p((xx,wc)=>{"use strict";u();var mw=R(),gc=Ke(),xw=D().Buffer,Ew=[1518500249,1859775393,-1894007588,-899497514],Sw=new Array(80);function nt(){this.init(),this._w=Sw,gc.call(this,64,56)}mw(nt,gc);nt.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Aw(e){return e<<5|e>>>27}function Bw(e){return e<<30|e>>>2}function Rw(e,r,t,n){return e===0?r&t|~r&n:e===2?r&t|r&n|t&n:r^t^n}nt.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 d=~~(s/20),h=Aw(t)+Rw(d,n,i,o)+a+r[s]+Ew[d]|0;a=o,o=i,i=Bw(n),n=t,t=h}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};nt.prototype._hash=function(){var e=xw.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};wc.exports=nt});var xc=p((Sx,mc)=>{"use strict";u();var Tw=R(),_c=Ke(),Ow=D().Buffer,Iw=[1518500249,1859775393,-1894007588,-899497514],qw=new Array(80);function it(){this.init(),this._w=qw,_c.call(this,64,56)}Tw(it,_c);it.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Mw(e){return e<<1|e>>>31}function Pw(e){return e<<5|e>>>27}function Fw(e){return e<<30|e>>>2}function Cw(e,r,t,n){return e===0?r&t|~r&n:e===2?r&t|r&n|t&n:r^t^n}it.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]=Mw(r[f-3]^r[f-8]^r[f-14]^r[f-16]);for(var s=0;s<80;++s){var d=~~(s/20),h=Pw(t)+Cw(d,n,i,o)+a+r[s]+Iw[d]|0;a=o,o=i,i=Fw(n),n=t,t=h}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};it.prototype._hash=function(){var e=Ow.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};mc.exports=it});var Eo=p((Bx,Sc)=>{"use strict";u();var kw=R(),Ec=Ke(),Lw=D().Buffer,Uw=[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],Dw=new Array(64);function ot(){this.init(),this._w=Dw,Ec.call(this,64,56)}kw(ot,Ec);ot.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 jw(e,r,t){return t^e&(r^t)}function Nw(e,r,t){return e&r|t&(e|r)}function Ww(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function $w(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function Hw(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function Gw(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}ot.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,d=this._h|0,h=0;h<16;++h)r[h]=e.readInt32BE(h*4);for(;h<64;++h)r[h]=Gw(r[h-2])+r[h-7]+Hw(r[h-15])+r[h-16]|0;for(var b=0;b<64;++b){var g=d+$w(a)+jw(a,f,s)+Uw[b]+r[b]|0,w=Ww(t)+Nw(t,n,i)|0;d=s,s=f,f=a,a=o+g|0,o=i,i=n,n=t,t=g+w|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=d+this._h|0};ot.prototype._hash=function(){var e=Lw.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};Sc.exports=ot});var Bc=p((Tx,Ac)=>{"use strict";u();var Vw=R(),Kw=Eo(),zw=Ke(),Yw=D().Buffer,Jw=new Array(64);function Sn(){this.init(),this._w=Jw,zw.call(this,64,56)}Vw(Sn,Kw);Sn.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};Sn.prototype._hash=function(){var e=Yw.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};Ac.exports=Sn});var So=p((Ix,Pc)=>{"use strict";u();var Xw=R(),Mc=Ke(),Zw=D().Buffer,Rc=[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],Qw=new Array(160);function at(){this.init(),this._w=Qw,Mc.call(this,128,112)}Xw(at,Mc);at.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 Tc(e,r,t){return t^e&(r^t)}function Oc(e,r,t){return e&r|t&(e|r)}function Ic(e,r){return(e>>>28|r<<4)^(r>>>2|e<<30)^(r>>>7|e<<25)}function qc(e,r){return(e>>>14|r<<18)^(e>>>18|r<<14)^(r>>>9|e<<23)}function ev(e,r){return(e>>>1|r<<31)^(e>>>8|r<<24)^e>>>7}function rv(e,r){return(e>>>1|r<<31)^(e>>>8|r<<24)^(e>>>7|r<<25)}function tv(e,r){return(e>>>19|r<<13)^(r>>>29|e<<3)^e>>>6}function nv(e,r){return(e>>>19|r<<13)^(r>>>29|e<<3)^(e>>>6|r<<26)}function U(e,r){return e>>>0<r>>>0?1:0}at.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,d=this._hh|0,h=this._al|0,b=this._bl|0,g=this._cl|0,w=this._dl|0,v=this._el|0,O=this._fl|0,C=this._gl|0,F=this._hl|0,I=0;I<32;I+=2)r[I]=e.readInt32BE(I*4),r[I+1]=e.readInt32BE(I*4+4);for(;I<160;I+=2){var Sr=r[I-30],Ar=r[I-30+1],eh=ev(Sr,Ar),qo=rv(Ar,Sr);Sr=r[I-4],Ar=r[I-4+1];var rh=tv(Sr,Ar),Mo=nv(Ar,Sr),th=r[I-14],nh=r[I-14+1],ih=r[I-32],Po=r[I-32+1],X=qo+nh|0,Te=eh+th+U(X,qo)|0;X=X+Mo|0,Te=Te+rh+U(X,Mo)|0,X=X+Po|0,Te=Te+ih+U(X,Po)|0,r[I]=Te,r[I+1]=X}for(var Ye=0;Ye<160;Ye+=2){Te=r[Ye],X=r[Ye+1];var oh=Oc(t,n,i),ah=Oc(h,b,g),fh=Ic(t,h),Fo=Ic(h,t),uh=qc(a,v),sh=qc(v,a),lh=Rc[Ye],Co=Rc[Ye+1],ch=Tc(a,f,s),ko=Tc(v,O,C),V=F+sh|0,ve=d+uh+U(V,F)|0;V=V+ko|0,ve=ve+ch+U(V,ko)|0,V=V+Co|0,ve=ve+lh+U(V,Co)|0,V=V+X|0,ve=ve+Te+U(V,X)|0;var Lo=Fo+ah|0,hh=fh+oh+U(Lo,Fo)|0;d=s,F=C,s=f,C=O,f=a,O=v,v=w+V|0,a=o+ve+U(v,w)|0,o=i,w=g,i=n,g=b,n=t,b=h,h=V+Lo|0,t=ve+hh+U(h,V)|0}this._al=this._al+h|0,this._bl=this._bl+b|0,this._cl=this._cl+g|0,this._dl=this._dl+w|0,this._el=this._el+v|0,this._fl=this._fl+O|0,this._gl=this._gl+C|0,this._hl=this._hl+F|0,this._ah=this._ah+t+U(this._al,h)|0,this._bh=this._bh+n+U(this._bl,b)|0,this._ch=this._ch+i+U(this._cl,g)|0,this._dh=this._dh+o+U(this._dl,w)|0,this._eh=this._eh+a+U(this._el,v)|0,this._fh=this._fh+f+U(this._fl,O)|0,this._gh=this._gh+s+U(this._gl,C)|0,this._hh=this._hh+d+U(this._hl,F)|0};at.prototype._hash=function(){var e=Zw.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};Pc.exports=at});var Cc=p((Mx,Fc)=>{"use strict";u();var iv=R(),ov=So(),av=Ke(),fv=D().Buffer,uv=new Array(160);function An(){this.init(),this._w=uv,av.call(this,128,112)}iv(An,ov);An.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};An.prototype._hash=function(){var e=fv.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};Fc.exports=An});var Ao=p((Fx,we)=>{"use strict";u();we.exports=function(r){var t=r.toLowerCase(),n=we.exports[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};we.exports.sha=vc();we.exports.sha1=xc();we.exports.sha224=Bc();we.exports.sha256=Eo();we.exports.sha384=Cc();we.exports.sha512=So()});var Bn=p((kx,Lc)=>{"use strict";u();var sv=D().Buffer,kc=ro().Transform,lv=yr().StringDecoder,cv=R(),hv=ln();function ee(e){kc.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}cv(ee,kc);ee.prototype.update=function(e,r,t){var n=hv(e,r),i=this._update(n);return this.hashMode?this:(t&&(i=this._toString(i,t)),i)};ee.prototype.setAutoPadding=function(){};ee.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};ee.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};ee.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};ee.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)}};ee.prototype._flush=function(e){var r;try{this.push(this.__final())}catch(t){r=t}e(r)};ee.prototype._finalOrDigest=function(e){var r=this.__final()||sv.alloc(0);return e&&(r=this._toString(r,e,!0)),r};ee.prototype._toString=function(e,r,t){if(this._decoder||(this._decoder=new lv(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};Lc.exports=ee});var jc=p((Ux,Dc)=>{"use strict";u();var dv=R(),pv=to(),yv=xo(),bv=Ao(),Uc=Bn();function Rn(e){Uc.call(this,"digest"),this._hash=e}dv(Rn,Uc);Rn.prototype._update=function(e){this._hash.update(e)};Rn.prototype._final=function(){return this._hash.digest()};Dc.exports=function(r){return r=r.toLowerCase(),r==="md5"?new pv:r==="rmd160"||r==="ripemd160"?new yv:new Rn(bv(r))}});var $c=p((jx,Wc)=>{"use strict";u();var gv=R(),ze=D().Buffer,Nc=Bn(),wv=ze.alloc(128),Er=64;function Tn(e,r){Nc.call(this,"digest"),typeof r=="string"&&(r=ze.from(r)),this._alg=e,this._key=r,r.length>Er?r=e(r):r.length<Er&&(r=ze.concat([r,wv],Er));for(var t=this._ipad=ze.allocUnsafe(Er),n=this._opad=ze.allocUnsafe(Er),i=0;i<Er;i++)t[i]=r[i]^54,n[i]=r[i]^92;this._hash=[t]}gv(Tn,Nc);Tn.prototype._update=function(e){this._hash.push(e)};Tn.prototype._final=function(){var e=this._alg(ze.concat(this._hash));return this._alg(ze.concat([this._opad,e]))};Wc.exports=Tn});var Gc=p((Wx,Hc)=>{u();var vv=to();Hc.exports=function(e){return new vv().update(e).digest()}});var zc=p((Hx,Kc)=>{"use strict";u();var _v=R(),mv=$c(),Vc=Bn(),ft=D().Buffer,xv=Gc(),Bo=xo(),Ro=Ao(),Ev=ft.alloc(128);function ut(e,r){Vc.call(this,"digest"),typeof r=="string"&&(r=ft.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 Bo:Ro(e);r=n.update(r).digest()}else r.length<t&&(r=ft.concat([r,Ev],t));for(var i=this._ipad=ft.allocUnsafe(t),o=this._opad=ft.allocUnsafe(t),a=0;a<t;a++)i[a]=r[a]^54,o[a]=r[a]^92;this._hash=e==="rmd160"?new Bo:Ro(e),this._hash.update(i)}_v(ut,Vc);ut.prototype._update=function(e){this._hash.update(e)};ut.prototype._final=function(){var e=this._hash.digest(),r=this._alg==="rmd160"?new Bo:Ro(this._alg);return r.update(this._opad).update(e).digest()};Kc.exports=function(r,t){return r=r.toLowerCase(),r==="rmd160"||r==="ripemd160"?new ut("rmd160",t):r==="md5"?new mv(xv,t):new ut(r,t)}});var Yc=p((Vx,Oo)=>{"use strict";u();var To=65536,Sv=4294967295;function Av(){throw new Error(`Secure random number generation is not supported by this browser.
11
+ Use Chrome, Firefox or Internet Explorer 11`)}var Bv=D().Buffer,On=globalThis.crypto||globalThis.msCrypto;On&&On.getRandomValues?Oo.exports=Rv:Oo.exports=Av;function Rv(e,r){if(e>Sv)throw new RangeError("requested too many random bytes");var t=Bv.allocUnsafe(e);if(e>0)if(e>To)for(var n=0;n<e;n+=To)On.getRandomValues(t.slice(n,n+To));else On.getRandomValues(t);return typeof r=="function"?l.default.nextTick(function(){r(null,t)}):t}});var Jc=p(In=>{"use strict";u();In.createHash=jc();In.createHmac=zc();In.randomBytes=Yc()});var Zc=p((Jx,Xc)=>{"use strict";u();var qn=Jc();async function Tv(e){e=e||{};var r=e.alg||"ES256",t=e.kid||"key-"+Date.now();if(r!=="ES256"&&r!=="ES256K")throw new Error("Invalid algorithm. Must be ES256 or ES256K");var n;r==="ES256"?n=qn.generateKeyPairSync("ec",{namedCurve:"P-256",publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}}):n=qn.generateKeyPairSync("ec",{namedCurve:"secp256k1",publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});var i=qn.createPublicKey(n.publicKey).export({format:"jwk"}),o=qn.createPrivateKey(n.privateKey).export({format:"jwk"});return i.kid=t,i.alg=r,i.use="sig",i.kty="EC",o.kid=t,o.alg=r,o.use="sig",o.kty="EC",{privateJwk:o,publicJwk:i,kid:t,alg:r}}var st=["authentication","assertionMethod","keyAgreement","capabilityInvocation","capabilityDelegation"],Ov=["authentication","assertionMethod"];function Io(e){var r=e.relationships||Ov;if(!Array.isArray(r)||r.length===0)throw new Error("relationships must be a non-empty array of DID Core verification relationships");return r.forEach(function(t){if(st.indexOf(t)===-1)throw new Error("unknown verification relationship: "+t+" (expected one of "+st.join(", ")+")")}),r}function Iv(e){if(!e.domain)throw new Error("domain is required");var r=e.domain,t="did:web:"+r.replace(/:/g,"%3A"),n=[],i=[],o=[];if(e.p256){var a={id:t+"#"+e.p256.kid,type:"JsonWebKey2020",controller:t,publicKeyJwk:e.p256.jwk};n.push(a),i.push(Io(e.p256)),o.push(e.p256.jwk)}if(e.k1){var f={id:t+"#"+e.k1.kid,type:"JsonWebKey2020",controller:t,publicKeyJwk:e.k1.jwk};n.push(f),i.push(Io(e.k1)),o.push(e.k1.jwk)}if(n.length===0)throw new Error("At least one key (p256 or k1) must be provided");var s={"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/jws-2020/v1"],id:t,verificationMethod:n};st.forEach(function(h){var b=n.filter(function(g,w){return i[w].indexOf(h)!==-1}).map(function(g){return g.id});b.length&&(s[h]=b)}),e.controllerName&&(s.controller=e.controllerName);var d={keys:o};return{did:t,didDocument:s,jwks:d}}function qv(e){if(!e.domain||!e.newKey)throw new Error("domain and newKey are required");var r=e.domain,t="did:web:"+r.replace(/:/g,"%3A"),n=e.keepOldForDays||30,i={id:t+"#"+e.newKey.kid,type:"JsonWebKey2020",controller:t,publicKeyJwk:e.newKey.jwk},o=Io(e.newKey),a=e.currentDocument||null,f={"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/jws-2020/v1"],id:t,verificationMethod:[i]};if(st.forEach(function(h){o.indexOf(h)!==-1?f[h]=[i.id]:a&&Array.isArray(a[h])&&a[h].length&&(f[h]=a[h].slice())}),a&&Array.isArray(a.verificationMethod)){var s={};st.forEach(function(h){(f[h]||[]).forEach(function(b){s[b]=!0})}),a.verificationMethod.forEach(function(h){s[h.id]&&h.id!==i.id&&f.verificationMethod.push(h)})}f.rotationInfo={rotatedAt:new Date().toISOString(),gracePeriodDays:n};var d={keys:[e.newKey.jwk]};return{didDocument:f,jwks:d}}Xc.exports={generateIssuerKeys:Tv,buildDidWebDocuments:Iv,rotateIssuerKey:qv}});var Mv=p((Zx,Qc)=>{u();Qc.exports=Zc()});return Mv();})();
18
12
  if(typeof module!=="undefined"&&module.exports){module.exports=bsvDIDWeb}else if(typeof define==="function"&&define.amd){define([],function(){return bsvDIDWeb})}