@smartledger/bsv 7.8.1 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -6
- package/README.md +38 -38
- package/bsv-covenant.min.js +1 -1
- package/bsv-ecies.min.js +1 -1
- package/bsv-gdaf.min.js +54 -54
- package/bsv-ltp.min.js +58 -85
- package/bsv-message.min.js +2 -2
- package/bsv-mnemonic.min.js +12 -14
- package/bsv-script-helper.min.js +1 -1
- package/bsv-shamir.min.js +14 -16
- package/bsv-smartcontract.min.js +23 -25
- package/bsv.bundle.js +54 -54
- package/bsv.min.js +54 -54
- package/build/esbuild.js +84 -4
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/index.js +9 -1
- package/lib/covenant/helpers.js +146 -0
- package/lib/covenant/index.js +21 -0
- package/lib/covenant/pushtx.js +243 -0
- package/lib/covenant-interface.js +408 -397
- package/lib/custom-script-helper.js +44 -38
- package/lib/ecies/bitcore-ecies.js +3 -4
- package/lib/ecies/electrum-ecies.js +4 -6
- package/lib/ecies/errors.js +1 -1
- package/lib/gdaf/attestation-signer.js +7 -7
- package/lib/gdaf/attestation-verifier.js +5 -6
- package/lib/gdaf/did-resolver.js +10 -9
- package/lib/gdaf/smartledger-anchor.js +13 -12
- package/lib/gdaf/zk-prover.js +8 -8
- package/lib/ltp/anchor.js +2 -3
- package/lib/ltp/claim.js +2 -3
- package/lib/ltp/index.js +2 -3
- package/lib/ltp/obligation.js +9 -9
- package/lib/ltp/proof.js +7 -7
- package/lib/ltp/registry.js +4 -5
- package/lib/ltp/right.js +11 -11
- package/lib/message/index.js +5 -4
- package/lib/message/message.js +11 -11
- package/lib/mnemonic/errors.js +1 -1
- package/lib/mnemonic/index.js +5 -4
- package/lib/mnemonic/mnemonic.js +22 -10
- package/lib/ordinals/bsv20.js +4 -4
- package/lib/ordinals/inscription.js +8 -12
- package/lib/ordinals/ordlock.js +26 -21
- package/lib/script/interpreter.js +96 -31
- package/lib/smart_contract/authorizers.js +8 -6
- package/lib/smart_contract/builder.js +32 -26
- package/lib/smart_contract/covenant.js +32 -25
- package/lib/smart_contract/covenant_helpers.js +8 -128
- package/lib/smart_contract/debugger.js +9 -6
- package/lib/smart_contract/dsl.js +5 -6
- package/lib/smart_contract/index.js +11 -8
- package/lib/smart_contract/locks.js +3 -4
- package/lib/smart_contract/opcode_list.js +2 -3
- package/lib/smart_contract/pels.js +4 -5
- package/lib/smart_contract/preimage.js +11 -7
- package/lib/smart_contract/pushtx.js +8 -263
- package/lib/smart_contract/script_interpreter.js +112 -105
- package/lib/smart_contract/script_tester.js +24 -18
- package/lib/smart_contract/script_utils.js +15 -14
- package/lib/smart_contract/sighash.js +23 -15
- package/lib/smart_contract/stack_examiner.js +70 -63
- package/lib/smart_contract/token.js +6 -6
- package/lib/smart_contract/utxo_generator.js +21 -15
- package/lib/smartutxo.js +27 -21
- package/lib/spv/headerchain.js +3 -3
- package/lib/spv/merkleproof.js +3 -3
- package/package.json +4 -2
- package/test/script/chronicle.js +53 -10
- package/test/script/interpreter.js +9 -6
- package/test/script/string_ops.js +26 -10
- package/version.js +1 -1
package/bsv-shamir.min.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
var bsvShamir=(()=>{var Db=Object.create;var ml=Object.defineProperty;var Ub=Object.getOwnPropertyDescriptor;var Nb=Object.getOwnPropertyNames;var Lb=Object.getPrototypeOf,Fb=Object.prototype.hasOwnProperty;var jb=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var R=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Hb=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nb(e))!Fb.call(t,i)&&i!==r&&ml(t,i,{get:()=>e[i],enumerable:!(n=Ub(e,i))||n.enumerable});return t};var bl=(t,e,r)=>(r=t!=null?Db(Lb(t)):{},Hb(e||!t||!t.__esModule?ml(r,"default",{value:t,enumerable:!0}):r,t));var El=R((CB,Ml)=>{w();var Ze=Ml.exports={},zt,Gt;function es(){throw new Error("setTimeout has not been defined")}function ts(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?zt=setTimeout:zt=es}catch{zt=es}try{typeof clearTimeout=="function"?Gt=clearTimeout:Gt=ts}catch{Gt=ts}})();function wl(t){if(zt===setTimeout)return setTimeout(t,0);if((zt===es||!zt)&&setTimeout)return zt=setTimeout,setTimeout(t,0);try{return zt(t,0)}catch{try{return zt.call(null,t,0)}catch{return zt.call(this,t,0)}}}function Kb(t){if(Gt===clearTimeout)return clearTimeout(t);if((Gt===ts||!Gt)&&clearTimeout)return Gt=clearTimeout,clearTimeout(t);try{return Gt(t)}catch{try{return Gt.call(null,t)}catch{return Gt.call(this,t)}}}var sr=[],Ni=!1,ai,Za=-1;function Wb(){!Ni||!ai||(Ni=!1,ai.length?sr=ai.concat(sr):Za=-1,sr.length&&_l())}function _l(){if(!Ni){var t=wl(Wb);Ni=!0;for(var e=sr.length;e;){for(ai=sr,sr=[];++Za<e;)ai&&ai[Za].run();Za=-1,e=sr.length}ai=null,Ni=!1,Kb(t)}}Ze.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];sr.push(new xl(t,e)),sr.length===1&&!Ni&&wl(_l)};function xl(t,e){this.fun=t,this.array=e}xl.prototype.run=function(){this.fun.apply(null,this.array)};Ze.title="browser";Ze.browser=!0;Ze.env={};Ze.argv=[];Ze.version="";Ze.versions={};function ur(){}Ze.on=ur;Ze.addListener=ur;Ze.once=ur;Ze.off=ur;Ze.removeListener=ur;Ze.removeAllListeners=ur;Ze.emit=ur;Ze.prependListener=ur;Ze.prependOnceListener=ur;Ze.listeners=function(t){return[]};Ze.binding=function(t){throw new Error("process.binding is not supported")};Ze.cwd=function(){return"/"};Ze.chdir=function(t){throw new Error("process.chdir is not supported")};Ze.umask=function(){return 0}});var Al=R(Ya=>{"use strict";w();Ya.byteLength=Gb;Ya.toByteArray=$b;Ya.fromByteArray=Xb;var Vt=[],wt=[],zb=typeof Uint8Array<"u"?Uint8Array:Array,rs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(oi=0,Sl=rs.length;oi<Sl;++oi)Vt[oi]=rs[oi],wt[rs.charCodeAt(oi)]=oi;var oi,Sl;wt[45]=62;wt[95]=63;function Bl(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 n=r===e?0:4-r%4;return[r,n]}function Gb(t){var e=Bl(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Vb(t,e,r){return(e+r)*3/4-r}function $b(t){var e,r=Bl(t),n=r[0],i=r[1],a=new zb(Vb(t,n,i)),f=0,v=i>0?n-4:n,m;for(m=0;m<v;m+=4)e=wt[t.charCodeAt(m)]<<18|wt[t.charCodeAt(m+1)]<<12|wt[t.charCodeAt(m+2)]<<6|wt[t.charCodeAt(m+3)],a[f++]=e>>16&255,a[f++]=e>>8&255,a[f++]=e&255;return i===2&&(e=wt[t.charCodeAt(m)]<<2|wt[t.charCodeAt(m+1)]>>4,a[f++]=e&255),i===1&&(e=wt[t.charCodeAt(m)]<<10|wt[t.charCodeAt(m+1)]<<4|wt[t.charCodeAt(m+2)]>>2,a[f++]=e>>8&255,a[f++]=e&255),a}function Zb(t){return Vt[t>>18&63]+Vt[t>>12&63]+Vt[t>>6&63]+Vt[t&63]}function Yb(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),i.push(Zb(n));return i.join("")}function Xb(t){for(var e,r=t.length,n=r%3,i=[],a=16383,f=0,v=r-n;f<v;f+=a)i.push(Yb(t,f,f+a>v?v:f+a));return n===1?(e=t[r-1],i.push(Vt[e>>2]+Vt[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Vt[e>>10]+Vt[e>>4&63]+Vt[e<<2&63]+"=")),i.join("")}});var Rl=R(is=>{w();is.read=function(t,e,r,n,i){var a,f,v=i*8-n-1,m=(1<<v)-1,E=m>>1,A=-7,q=r?i-1:0,I=r?-1:1,C=t[e+q];for(q+=I,a=C&(1<<-A)-1,C>>=-A,A+=v;A>0;a=a*256+t[e+q],q+=I,A-=8);for(f=a&(1<<-A)-1,a>>=-A,A+=n;A>0;f=f*256+t[e+q],q+=I,A-=8);if(a===0)a=1-E;else{if(a===m)return f?NaN:(C?-1:1)*(1/0);f=f+Math.pow(2,n),a=a-E}return(C?-1:1)*f*Math.pow(2,a-n)};is.write=function(t,e,r,n,i,a){var f,v,m,E=a*8-i-1,A=(1<<E)-1,q=A>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:a-1,j=n?1:-1,V=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(v=isNaN(e)?1:0,f=A):(f=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-f))<1&&(f--,m*=2),f+q>=1?e+=I/m:e+=I*Math.pow(2,1-q),e*m>=2&&(f++,m/=2),f+q>=A?(v=0,f=A):f+q>=1?(v=(e*m-1)*Math.pow(2,i),f=f+q):(v=e*Math.pow(2,q-1)*Math.pow(2,i),f=0));i>=8;t[r+C]=v&255,C+=j,v/=256,i-=8);for(f=f<<i|v,E+=i;E>0;t[r+C]=f&255,C+=j,f/=256,E-=8);t[r+C-j]|=V*128}});var ft=R(Hi=>{"use strict";w();var ns=Al(),Fi=Rl(),ql=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Hi.Buffer=T;Hi.SlowBuffer=i2;Hi.INSPECT_MAX_BYTES=50;var Xa=2147483647;Hi.kMaxLength=Xa;T.TYPED_ARRAY_SUPPORT=Jb();!T.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 Jb(){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(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function hr(t){if(t>Xa)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,T.prototype),e}function T(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 ss(t)}return Cl(t,e,r)}T.poolSize=8192;function Cl(t,e,r){if(typeof t=="string")return e2(t,e);if(ArrayBuffer.isView(t))return t2(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($t(t,ArrayBuffer)||t&&$t(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($t(t,SharedArrayBuffer)||t&&$t(t.buffer,SharedArrayBuffer)))return os(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return T.from(n,e,r);let i=r2(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return T.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)}T.from=function(t,e,r){return Cl(t,e,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Ol(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 Qb(t,e,r){return Ol(t),t<=0?hr(t):e!==void 0?typeof r=="string"?hr(t).fill(e,r):hr(t).fill(e):hr(t)}T.alloc=function(t,e,r){return Qb(t,e,r)};function ss(t){return Ol(t),hr(t<0?0:us(t)|0)}T.allocUnsafe=function(t){return ss(t)};T.allocUnsafeSlow=function(t){return ss(t)};function e2(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!T.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Pl(t,e)|0,n=hr(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function as(t){let e=t.length<0?0:us(t.length)|0,r=hr(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function t2(t){if($t(t,Uint8Array)){let e=new Uint8Array(t);return os(e.buffer,e.byteOffset,e.byteLength)}return as(t)}function os(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 n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,T.prototype),n}function r2(t){if(T.isBuffer(t)){let e=us(t.length)|0,r=hr(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||ls(t.length)?hr(0):as(t);if(t.type==="Buffer"&&Array.isArray(t.data))return as(t.data)}function us(t){if(t>=Xa)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Xa.toString(16)+" bytes");return t|0}function i2(t){return+t!=t&&(t=0),T.alloc(+t)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,r){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),$t(r,Uint8Array)&&(r=T.from(r,r.offset,r.byteLength)),!T.isBuffer(e)||!T.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let a=0,f=Math.min(n,i);a<f;++a)if(e[a]!==r[a]){n=e[a],i=r[a];break}return n<i?-1:i<n?1:0};T.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}};T.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return T.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=T.allocUnsafe(r),a=0;for(n=0;n<e.length;++n){let f=e[n];if($t(f,Uint8Array))a+f.length>i.length?(T.isBuffer(f)||(f=T.from(f)),f.copy(i,a)):Uint8Array.prototype.set.call(i,f,a);else if(T.isBuffer(f))f.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=f.length}return i};function Pl(t,e){if(T.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$t(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,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return fs(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Wl(t).length;default:if(i)return n?-1:fs(t).length;e=(""+e).toLowerCase(),i=!0}}T.byteLength=Pl;function n2(t,e,r){let n=!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 p2(this,e,r);case"utf8":case"utf-8":return Ul(this,e,r);case"ascii":return c2(this,e,r);case"latin1":case"binary":return d2(this,e,r);case"base64":return h2(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v2(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function fi(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}T.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)fi(this,r,r+1);return this};T.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)fi(this,r,r+3),fi(this,r+1,r+2);return this};T.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)fi(this,r,r+7),fi(this,r+1,r+6),fi(this,r+2,r+5),fi(this,r+3,r+4);return this};T.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Ul(this,0,e):n2.apply(this,arguments)};T.prototype.toLocaleString=T.prototype.toString;T.prototype.equals=function(e){if(!T.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:T.compare(this,e)===0};T.prototype.inspect=function(){let e="",r=Hi.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};ql&&(T.prototype[ql]=T.prototype.inspect);T.prototype.compare=function(e,r,n,i,a){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.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),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;let f=a-i,v=n-r,m=Math.min(f,v),E=this.slice(i,a),A=e.slice(r,n);for(let q=0;q<m;++q)if(E[q]!==A[q]){f=E[q],v=A[q];break}return f<v?-1:v<f?1:0};function Dl(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ls(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=T.from(e,n)),T.isBuffer(e))return e.length===0?-1:Il(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Il(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Il(t,e,r,n,i){let a=1,f=t.length,v=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,f/=2,v/=2,r/=2}function m(A,q){return a===1?A[q]:A.readUInt16BE(q*a)}let E;if(i){let A=-1;for(E=r;E<f;E++)if(m(t,E)===m(e,A===-1?0:E-A)){if(A===-1&&(A=E),E-A+1===v)return A*a}else A!==-1&&(E-=E-A),A=-1}else for(r+v>f&&(r=f-v),E=r;E>=0;E--){let A=!0;for(let q=0;q<v;q++)if(m(t,E+q)!==m(e,q)){A=!1;break}if(A)return E}return-1}T.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};T.prototype.indexOf=function(e,r,n){return Dl(this,e,r,n,!0)};T.prototype.lastIndexOf=function(e,r,n){return Dl(this,e,r,n,!1)};function a2(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let a=e.length;n>a/2&&(n=a/2);let f;for(f=0;f<n;++f){let v=parseInt(e.substr(f*2,2),16);if(ls(v))return f;t[r+f]=v}return f}function o2(t,e,r,n){return Ja(fs(e,t.length-r),t,r,n)}function f2(t,e,r,n){return Ja(b2(e),t,r,n)}function s2(t,e,r,n){return Ja(Wl(e),t,r,n)}function u2(t,e,r,n){return Ja(w2(e,t.length-r),t,r,n)}T.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>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 a=this.length-r;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return a2(this,e,r,n);case"utf8":case"utf-8":return o2(this,e,r,n);case"ascii":case"latin1":case"binary":return f2(this,e,r,n);case"base64":return s2(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u2(this,e,r,n);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function h2(t,e,r){return e===0&&r===t.length?ns.fromByteArray(t):ns.fromByteArray(t.slice(e,r))}function Ul(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let a=t[i],f=null,v=a>239?4:a>223?3:a>191?2:1;if(i+v<=r){let m,E,A,q;switch(v){case 1:a<128&&(f=a);break;case 2:m=t[i+1],(m&192)===128&&(q=(a&31)<<6|m&63,q>127&&(f=q));break;case 3:m=t[i+1],E=t[i+2],(m&192)===128&&(E&192)===128&&(q=(a&15)<<12|(m&63)<<6|E&63,q>2047&&(q<55296||q>57343)&&(f=q));break;case 4:m=t[i+1],E=t[i+2],A=t[i+3],(m&192)===128&&(E&192)===128&&(A&192)===128&&(q=(a&15)<<18|(m&63)<<12|(E&63)<<6|A&63,q>65535&&q<1114112&&(f=q))}}f===null?(f=65533,v=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|f&1023),n.push(f),i+=v}return l2(n)}var kl=4096;function l2(t){let e=t.length;if(e<=kl)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=kl));return r}function c2(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function d2(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function p2(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let a=e;a<r;++a)i+=_2[t[a]];return i}function v2(t,e,r){let n=t.slice(e,r),i="";for(let a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}T.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,T.prototype),i};function rt(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")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=this[e],a=1,f=0;for(;++f<r&&(a*=256);)i+=this[e+f]*a;return i};T.prototype.readUintBE=T.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=this[e+--r],a=1;for(;r>0&&(a*=256);)i+=this[e+--r]*a;return i};T.prototype.readUint8=T.prototype.readUInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))});T.prototype.readBigUInt64BE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=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+n;return(BigInt(i)<<BigInt(32))+BigInt(a)});T.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=this[e],a=1,f=0;for(;++f<r&&(a*=256);)i+=this[e+f]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};T.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=r,a=1,f=this[e+--i];for(;i>0&&(a*=256);)f+=this[e+--i]*a;return a*=128,f>=a&&(f-=Math.pow(2,8*r)),f};T.prototype.readInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};T.prototype.readInt16BE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};T.prototype.readInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});T.prototype.readBigInt64BE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});T.prototype.readFloatLE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Fi.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Fi.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Fi.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Fi.read(this,e,!1,52,8)};function vt(t,e,r,n,i,a){if(!T.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let v=Math.pow(2,8*n)-1;vt(this,e,r,n,v,0)}let a=1,f=0;for(this[r]=e&255;++f<n&&(a*=256);)this[r+f]=e/a&255;return r+n};T.prototype.writeUintBE=T.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let v=Math.pow(2,8*n)-1;vt(this,e,r,n,v,0)}let a=n-1,f=1;for(this[r+a]=e&255;--a>=0&&(f*=256);)this[r+a]=e/f&255;return r+n};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,1,255,0),this[r]=e&255,r+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(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};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(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 Nl(t,e,r,n,i){Kl(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,r}function Ll(t,e,r,n,i){Kl(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a=a>>8,t[r+6]=a,a=a>>8,t[r+5]=a,a=a>>8,t[r+4]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f=f>>8,t[r+2]=f,f=f>>8,t[r+1]=f,f=f>>8,t[r]=f,r+8}T.prototype.writeBigUInt64LE=Ir(function(e,r=0){return Nl(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ir(function(e,r=0){return Ll(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let m=Math.pow(2,8*n-1);vt(this,e,r,n,m-1,-m)}let a=0,f=1,v=0;for(this[r]=e&255;++a<n&&(f*=256);)e<0&&v===0&&this[r+a-1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+n};T.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let m=Math.pow(2,8*n-1);vt(this,e,r,n,m-1,-m)}let a=n-1,f=1,v=0;for(this[r+a]=e&255;--a>=0&&(f*=256);)e<0&&v===0&&this[r+a+1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+n};T.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};T.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(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};T.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(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};T.prototype.writeBigInt64LE=Ir(function(e,r=0){return Nl(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ir(function(e,r=0){return Ll(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Fl(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function jl(t,e,r,n,i){return e=+e,r=r>>>0,i||Fl(t,e,r,4,34028234663852886e22,-34028234663852886e22),Fi.write(t,e,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,r,n){return jl(this,e,r,!0,n)};T.prototype.writeFloatBE=function(e,r,n){return jl(this,e,r,!1,n)};function Hl(t,e,r,n,i){return e=+e,r=r>>>0,i||Fl(t,e,r,8,17976931348623157e292,-17976931348623157e292),Fi.write(t,e,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,r,n){return Hl(this,e,r,!0,n)};T.prototype.writeDoubleBE=function(e,r,n){return Hl(this,e,r,!1,n)};T.prototype.copy=function(e,r,n,i){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<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),e.length-r<i-n&&(i=e.length-r+n);let a=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),a};T.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=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"&&!T.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let f=e.charCodeAt(0);(i==="utf8"&&f<128||i==="latin1")&&(e=f)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{let f=T.isBuffer(e)?e:T.from(e,i),v=f.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=f[a%v]}return this};var Li={};function hs(t,e,r){Li[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(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}hs("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);hs("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);hs("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Tl(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Tl(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Tl(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function y2(t,e,r){ji(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&$n(e,t.length-(r+1))}function Kl(t,e,r,n,i,a){if(t>r||t<e){let f=typeof e=="bigint"?"n":"",v;throw a>3?e===0||e===BigInt(0)?v=`>= 0${f} and < 2${f} ** ${(a+1)*8}${f}`:v=`>= -(2${f} ** ${(a+1)*8-1}${f}) and < 2 ** ${(a+1)*8-1}${f}`:v=`>= ${e}${f} and <= ${r}${f}`,new Li.ERR_OUT_OF_RANGE("value",v,t)}y2(n,i,a)}function ji(t,e){if(typeof t!="number")throw new Li.ERR_INVALID_ARG_TYPE(e,"number",t)}function $n(t,e,r){throw Math.floor(t)!==t?(ji(t,r),new Li.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new Li.ERR_BUFFER_OUT_OF_BOUNDS:new Li.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var g2=/[^+/0-9A-Za-z-_]/g;function m2(t){if(t=t.split("=")[0],t=t.trim().replace(g2,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function fs(t,e){e=e||1/0;let r,n=t.length,i=null,a=[];for(let f=0;f<n;++f){if(r=t.charCodeAt(f),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(f+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=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 b2(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function w2(t,e){let r,n,i,a=[];for(let f=0;f<t.length&&!((e-=2)<0);++f)r=t.charCodeAt(f),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function Wl(t){return ns.toByteArray(m2(t))}function Ja(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $t(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function ls(t){return t!==t}var _2=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e})();function Ir(t){return typeof BigInt>"u"?x2:t}function x2(){throw new Error("BigInt not supported")}});var S,B,w=jb(()=>{S=bl(El()),B=bl(ft())});var lr=R((zl,cs)=>{w();(function(t,e){"use strict";function r(M,h){if(!M)throw new Error(h||"Assertion failed")}function n(M,h){M.super_=h;var y=function(){};y.prototype=h.prototype,M.prototype=new y,M.prototype.constructor=M}function i(M,h,y){if(i.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((h==="le"||h==="be")&&(y=h,h=10),this._init(M||0,h||10,y||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}i.isBN=function(h){return h instanceof i?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===i.wordSize&&Array.isArray(h.words)},i.max=function(h,y){return h.cmp(y)>0?h:y},i.min=function(h,y){return h.cmp(y)<0?h:y},i.prototype._init=function(h,y,l){if(typeof h=="number")return this._initNumber(h,y,l);if(typeof h=="object")return this._initArray(h,y,l);y==="hex"&&(y=16),r(y===(y|0)&&y>=2&&y<=36),h=h.toString().replace(/\s+/g,"");var o=0;h[0]==="-"&&(o++,this.negative=1),o<h.length&&(y===16?this._parseHex(h,o,l):(this._parseBase(h,y,o),l==="le"&&this._initArray(this.toArray(),y,l)))},i.prototype._initNumber=function(h,y,l){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(r(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),y,l)},i.prototype._initArray=function(h,y,l){if(r(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s,d,g=0;if(l==="be")for(o=h.length-1,s=0;o>=0;o-=3)d=h[o]|h[o-1]<<8|h[o-2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);else if(l==="le")for(o=0,s=0;o<h.length;o+=3)d=h[o]|h[o+1]<<8|h[o+2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);return this.strip()};function f(M,h){var y=M.charCodeAt(h);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function v(M,h,y){var l=f(M,y);return y-1>=h&&(l|=f(M,y-1)<<4),l}i.prototype._parseHex=function(h,y,l){this.length=Math.ceil((h.length-y)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s=0,d=0,g;if(l==="be")for(o=h.length-1;o>=y;o-=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8;else{var p=h.length-y;for(o=p%2===0?y+1:y;o<h.length;o+=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8}this.strip()};function m(M,h,y,l){for(var o=0,s=Math.min(M.length,y),d=h;d<s;d++){var g=M.charCodeAt(d)-48;o*=l,g>=49?o+=g-49+10:g>=17?o+=g-17+10:o+=g}return o}i.prototype._parseBase=function(h,y,l){this.words=[0],this.length=1;for(var o=0,s=1;s<=67108863;s*=y)o++;o--,s=s/y|0;for(var d=h.length-l,g=d%o,p=Math.min(d,d-g)+l,u=0,b=l;b<p;b+=o)u=m(h,b,b+o,y),this.imuln(s),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(g!==0){var _=1;for(u=m(h,b,h.length,y),b=0;b<g;b++)_*=y;this.imuln(_),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(h){h.words=new Array(this.length);for(var y=0;y<this.length;y++)h.words[y]=this.words[y];h.length=this.length,h.negative=this.negative,h.red=this.red},i.prototype.clone=function(){var h=new i(null);return this.copy(h),h},i.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","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];i.prototype.toString=function(h,y){h=h||10,y=y|0||1;var l;if(h===16||h==="hex"){l="";for(var o=0,s=0,d=0;d<this.length;d++){var g=this.words[d],p=((g<<o|s)&16777215).toString(16);s=g>>>24-o&16777215,o+=2,o>=26&&(o-=26,d--),s!==0||d!==this.length-1?l=E[6-p.length]+p+l:l=p+l}for(s!==0&&(l=s.toString(16)+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(h===(h|0)&&h>=2&&h<=36){var u=A[h],b=q[h];l="";var _=this.clone();for(_.negative=0;!_.isZero();){var c=_.modn(b).toString(h);_=_.idivn(b),_.isZero()?l=c+l:l=E[u-c.length]+c+l}for(this.isZero()&&(l="0"+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}r(!1,"Base should be between 2 and 36")},i.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},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(h,y){return r(typeof a<"u"),this.toArrayLike(a,h,y)},i.prototype.toArray=function(h,y){return this.toArrayLike(Array,h,y)},i.prototype.toArrayLike=function(h,y,l){var o=this.byteLength(),s=l||Math.max(1,o);r(o<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var d=y==="le",g=new h(s),p,u,b=this.clone();if(d){for(u=0;!b.isZero();u++)p=b.andln(255),b.iushrn(8),g[u]=p;for(;u<s;u++)g[u]=0}else{for(u=0;u<s-o;u++)g[u]=0;for(u=0;!b.isZero();u++)p=b.andln(255),b.iushrn(8),g[s-u-1]=p}return g},Math.clz32?i.prototype._countBits=function(h){return 32-Math.clz32(h)}:i.prototype._countBits=function(h){var y=h,l=0;return y>=4096&&(l+=13,y>>>=13),y>=64&&(l+=7,y>>>=7),y>=8&&(l+=4,y>>>=4),y>=2&&(l+=2,y>>>=2),l+y},i.prototype._zeroBits=function(h){if(h===0)return 26;var y=h,l=0;return(y&8191)===0&&(l+=13,y>>>=13),(y&127)===0&&(l+=7,y>>>=7),(y&15)===0&&(l+=4,y>>>=4),(y&3)===0&&(l+=2,y>>>=2),(y&1)===0&&l++,l},i.prototype.bitLength=function(){var h=this.words[this.length-1],y=this._countBits(h);return(this.length-1)*26+y};function I(M){for(var h=new Array(M.bitLength()),y=0;y<h.length;y++){var l=y/26|0,o=y%26;h[y]=(M.words[l]&1<<o)>>>o}return h}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,y=0;y<this.length;y++){var l=this._zeroBits(this.words[y]);if(h+=l,l!==26)break}return h},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},i.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var y=0;y<h.length;y++)this.words[y]=this.words[y]|h.words[y];return this.strip()},i.prototype.ior=function(h){return r((this.negative|h.negative)===0),this.iuor(h)},i.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},i.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},i.prototype.iuand=function(h){var y;this.length>h.length?y=h:y=this;for(var l=0;l<y.length;l++)this.words[l]=this.words[l]&h.words[l];return this.length=y.length,this.strip()},i.prototype.iand=function(h){return r((this.negative|h.negative)===0),this.iuand(h)},i.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},i.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},i.prototype.iuxor=function(h){var y,l;this.length>h.length?(y=this,l=h):(y=h,l=this);for(var o=0;o<l.length;o++)this.words[o]=y.words[o]^l.words[o];if(this!==y)for(;o<y.length;o++)this.words[o]=y.words[o];return this.length=y.length,this.strip()},i.prototype.ixor=function(h){return r((this.negative|h.negative)===0),this.iuxor(h)},i.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},i.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},i.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var y=Math.ceil(h/26)|0,l=h%26;this._expand(y),l>0&&y--;for(var o=0;o<y;o++)this.words[o]=~this.words[o]&67108863;for(l>0&&(this.words[o]=~this.words[o]&67108863>>26-l,o++);o<this.length;o++)this.words[o]=0;return this.strip()},i.prototype.notn=function(h){return this.clone().inotn(h)},i.prototype.setn=function(h,y){r(typeof h=="number"&&h>=0);var l=h/26|0,o=h%26;return this._expand(l+1),y?this.words[l]=this.words[l]|1<<o:this.words[l]=this.words[l]&~(1<<o),this.strip()},i.prototype.iadd=function(h){var y;if(this.negative!==0&&h.negative===0)return this.negative=0,y=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,y=this.isub(h),h.negative=1,y._normSign();var l,o;this.length>h.length?(l=this,o=h):(l=h,o=this);for(var s=0,d=0;d<o.length;d++)y=(l.words[d]|0)+(o.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;for(;s!==0&&d<l.length;d++)y=(l.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;if(this.length=l.length,s!==0)this.words[this.length]=s,this.length++;else if(l!==this)for(;d<l.length;d++)this.words[d]=l.words[d];return this},i.prototype.add=function(h){var y;return h.negative!==0&&this.negative===0?(h.negative=0,y=this.sub(h),h.negative^=1,y):h.negative===0&&this.negative!==0?(this.negative=0,y=h.sub(this),this.negative=1,y):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},i.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var y=this.iadd(h);return h.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var l=this.cmp(h);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var o,s;l>0?(o=this,s=h):(o=h,s=this);for(var d=0,g=0;g<s.length;g++)y=(o.words[g]|0)-(s.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;for(;d!==0&&g<o.length;g++)y=(o.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;if(d===0&&g<o.length&&o!==this)for(;g<o.length;g++)this.words[g]=o.words[g];return this.length=Math.max(this.length,g),o!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(h){return this.clone().isub(h)};function C(M,h,y){y.negative=h.negative^M.negative;var l=M.length+h.length|0;y.length=l,l=l-1|0;var o=M.words[0]|0,s=h.words[0]|0,d=o*s,g=d&67108863,p=d/67108864|0;y.words[0]=g;for(var u=1;u<l;u++){for(var b=p>>>26,_=p&67108863,c=Math.min(u,h.length-1),x=Math.max(0,u-M.length+1);x<=c;x++){var P=u-x|0;o=M.words[P]|0,s=h.words[x]|0,d=o*s+_,b+=d/67108864|0,_=d&67108863}y.words[u]=_|0,p=b|0}return p!==0?y.words[u]=p|0:y.length--,y.strip()}var j=function(h,y,l){var o=h.words,s=y.words,d=l.words,g=0,p,u,b,_=o[0]|0,c=_&8191,x=_>>>13,P=o[1]|0,N=P&8191,U=P>>>13,W=o[2]|0,K=W&8191,G=W>>>13,It=o[3]|0,Z=It&8191,Y=It>>>13,Tn=o[4]|0,Q=Tn&8191,ee=Tn>>>13,Cn=o[5]|0,te=Cn&8191,re=Cn>>>13,On=o[6]|0,ie=On&8191,ne=On>>>13,Pn=o[7]|0,ae=Pn&8191,oe=Pn>>>13,Dn=o[8]|0,fe=Dn&8191,se=Dn>>>13,Un=o[9]|0,ue=Un&8191,he=Un>>>13,Nn=s[0]|0,le=Nn&8191,ce=Nn>>>13,Ln=s[1]|0,de=Ln&8191,pe=Ln>>>13,Fn=s[2]|0,ve=Fn&8191,ye=Fn>>>13,jn=s[3]|0,ge=jn&8191,me=jn>>>13,Hn=s[4]|0,be=Hn&8191,we=Hn>>>13,Kn=s[5]|0,_e=Kn&8191,xe=Kn>>>13,Wn=s[6]|0,Me=Wn&8191,Ee=Wn>>>13,zn=s[7]|0,Se=zn&8191,Be=zn>>>13,Gn=s[8]|0,Ae=Gn&8191,Re=Gn>>>13,Vn=s[9]|0,qe=Vn&8191,Ie=Vn>>>13;l.negative=h.negative^y.negative,l.length=19,p=Math.imul(c,le),u=Math.imul(c,ce),u=u+Math.imul(x,le)|0,b=Math.imul(x,ce);var Ui=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Ui>>>26)|0,Ui&=67108863,p=Math.imul(N,le),u=Math.imul(N,ce),u=u+Math.imul(U,le)|0,b=Math.imul(U,ce),p=p+Math.imul(c,de)|0,u=u+Math.imul(c,pe)|0,u=u+Math.imul(x,de)|0,b=b+Math.imul(x,pe)|0;var Ge=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(K,le),u=Math.imul(K,ce),u=u+Math.imul(G,le)|0,b=Math.imul(G,ce),p=p+Math.imul(N,de)|0,u=u+Math.imul(N,pe)|0,u=u+Math.imul(U,de)|0,b=b+Math.imul(U,pe)|0,p=p+Math.imul(c,ve)|0,u=u+Math.imul(c,ye)|0,u=u+Math.imul(x,ve)|0,b=b+Math.imul(x,ye)|0;var Ve=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(Z,le),u=Math.imul(Z,ce),u=u+Math.imul(Y,le)|0,b=Math.imul(Y,ce),p=p+Math.imul(K,de)|0,u=u+Math.imul(K,pe)|0,u=u+Math.imul(G,de)|0,b=b+Math.imul(G,pe)|0,p=p+Math.imul(N,ve)|0,u=u+Math.imul(N,ye)|0,u=u+Math.imul(U,ve)|0,b=b+Math.imul(U,ye)|0,p=p+Math.imul(c,ge)|0,u=u+Math.imul(c,me)|0,u=u+Math.imul(x,ge)|0,b=b+Math.imul(x,me)|0;var Kr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,p=Math.imul(Q,le),u=Math.imul(Q,ce),u=u+Math.imul(ee,le)|0,b=Math.imul(ee,ce),p=p+Math.imul(Z,de)|0,u=u+Math.imul(Z,pe)|0,u=u+Math.imul(Y,de)|0,b=b+Math.imul(Y,pe)|0,p=p+Math.imul(K,ve)|0,u=u+Math.imul(K,ye)|0,u=u+Math.imul(G,ve)|0,b=b+Math.imul(G,ye)|0,p=p+Math.imul(N,ge)|0,u=u+Math.imul(N,me)|0,u=u+Math.imul(U,ge)|0,b=b+Math.imul(U,me)|0,p=p+Math.imul(c,be)|0,u=u+Math.imul(c,we)|0,u=u+Math.imul(x,be)|0,b=b+Math.imul(x,we)|0;var Wr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,p=Math.imul(te,le),u=Math.imul(te,ce),u=u+Math.imul(re,le)|0,b=Math.imul(re,ce),p=p+Math.imul(Q,de)|0,u=u+Math.imul(Q,pe)|0,u=u+Math.imul(ee,de)|0,b=b+Math.imul(ee,pe)|0,p=p+Math.imul(Z,ve)|0,u=u+Math.imul(Z,ye)|0,u=u+Math.imul(Y,ve)|0,b=b+Math.imul(Y,ye)|0,p=p+Math.imul(K,ge)|0,u=u+Math.imul(K,me)|0,u=u+Math.imul(G,ge)|0,b=b+Math.imul(G,me)|0,p=p+Math.imul(N,be)|0,u=u+Math.imul(N,we)|0,u=u+Math.imul(U,be)|0,b=b+Math.imul(U,we)|0,p=p+Math.imul(c,_e)|0,u=u+Math.imul(c,xe)|0,u=u+Math.imul(x,_e)|0,b=b+Math.imul(x,xe)|0;var zr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(zr>>>26)|0,zr&=67108863,p=Math.imul(ie,le),u=Math.imul(ie,ce),u=u+Math.imul(ne,le)|0,b=Math.imul(ne,ce),p=p+Math.imul(te,de)|0,u=u+Math.imul(te,pe)|0,u=u+Math.imul(re,de)|0,b=b+Math.imul(re,pe)|0,p=p+Math.imul(Q,ve)|0,u=u+Math.imul(Q,ye)|0,u=u+Math.imul(ee,ve)|0,b=b+Math.imul(ee,ye)|0,p=p+Math.imul(Z,ge)|0,u=u+Math.imul(Z,me)|0,u=u+Math.imul(Y,ge)|0,b=b+Math.imul(Y,me)|0,p=p+Math.imul(K,be)|0,u=u+Math.imul(K,we)|0,u=u+Math.imul(G,be)|0,b=b+Math.imul(G,we)|0,p=p+Math.imul(N,_e)|0,u=u+Math.imul(N,xe)|0,u=u+Math.imul(U,_e)|0,b=b+Math.imul(U,xe)|0,p=p+Math.imul(c,Me)|0,u=u+Math.imul(c,Ee)|0,u=u+Math.imul(x,Me)|0,b=b+Math.imul(x,Ee)|0;var Gr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,p=Math.imul(ae,le),u=Math.imul(ae,ce),u=u+Math.imul(oe,le)|0,b=Math.imul(oe,ce),p=p+Math.imul(ie,de)|0,u=u+Math.imul(ie,pe)|0,u=u+Math.imul(ne,de)|0,b=b+Math.imul(ne,pe)|0,p=p+Math.imul(te,ve)|0,u=u+Math.imul(te,ye)|0,u=u+Math.imul(re,ve)|0,b=b+Math.imul(re,ye)|0,p=p+Math.imul(Q,ge)|0,u=u+Math.imul(Q,me)|0,u=u+Math.imul(ee,ge)|0,b=b+Math.imul(ee,me)|0,p=p+Math.imul(Z,be)|0,u=u+Math.imul(Z,we)|0,u=u+Math.imul(Y,be)|0,b=b+Math.imul(Y,we)|0,p=p+Math.imul(K,_e)|0,u=u+Math.imul(K,xe)|0,u=u+Math.imul(G,_e)|0,b=b+Math.imul(G,xe)|0,p=p+Math.imul(N,Me)|0,u=u+Math.imul(N,Ee)|0,u=u+Math.imul(U,Me)|0,b=b+Math.imul(U,Ee)|0,p=p+Math.imul(c,Se)|0,u=u+Math.imul(c,Be)|0,u=u+Math.imul(x,Se)|0,b=b+Math.imul(x,Be)|0;var Vr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,p=Math.imul(fe,le),u=Math.imul(fe,ce),u=u+Math.imul(se,le)|0,b=Math.imul(se,ce),p=p+Math.imul(ae,de)|0,u=u+Math.imul(ae,pe)|0,u=u+Math.imul(oe,de)|0,b=b+Math.imul(oe,pe)|0,p=p+Math.imul(ie,ve)|0,u=u+Math.imul(ie,ye)|0,u=u+Math.imul(ne,ve)|0,b=b+Math.imul(ne,ye)|0,p=p+Math.imul(te,ge)|0,u=u+Math.imul(te,me)|0,u=u+Math.imul(re,ge)|0,b=b+Math.imul(re,me)|0,p=p+Math.imul(Q,be)|0,u=u+Math.imul(Q,we)|0,u=u+Math.imul(ee,be)|0,b=b+Math.imul(ee,we)|0,p=p+Math.imul(Z,_e)|0,u=u+Math.imul(Z,xe)|0,u=u+Math.imul(Y,_e)|0,b=b+Math.imul(Y,xe)|0,p=p+Math.imul(K,Me)|0,u=u+Math.imul(K,Ee)|0,u=u+Math.imul(G,Me)|0,b=b+Math.imul(G,Ee)|0,p=p+Math.imul(N,Se)|0,u=u+Math.imul(N,Be)|0,u=u+Math.imul(U,Se)|0,b=b+Math.imul(U,Be)|0,p=p+Math.imul(c,Ae)|0,u=u+Math.imul(c,Re)|0,u=u+Math.imul(x,Ae)|0,b=b+Math.imul(x,Re)|0;var $r=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+($r>>>26)|0,$r&=67108863,p=Math.imul(ue,le),u=Math.imul(ue,ce),u=u+Math.imul(he,le)|0,b=Math.imul(he,ce),p=p+Math.imul(fe,de)|0,u=u+Math.imul(fe,pe)|0,u=u+Math.imul(se,de)|0,b=b+Math.imul(se,pe)|0,p=p+Math.imul(ae,ve)|0,u=u+Math.imul(ae,ye)|0,u=u+Math.imul(oe,ve)|0,b=b+Math.imul(oe,ye)|0,p=p+Math.imul(ie,ge)|0,u=u+Math.imul(ie,me)|0,u=u+Math.imul(ne,ge)|0,b=b+Math.imul(ne,me)|0,p=p+Math.imul(te,be)|0,u=u+Math.imul(te,we)|0,u=u+Math.imul(re,be)|0,b=b+Math.imul(re,we)|0,p=p+Math.imul(Q,_e)|0,u=u+Math.imul(Q,xe)|0,u=u+Math.imul(ee,_e)|0,b=b+Math.imul(ee,xe)|0,p=p+Math.imul(Z,Me)|0,u=u+Math.imul(Z,Ee)|0,u=u+Math.imul(Y,Me)|0,b=b+Math.imul(Y,Ee)|0,p=p+Math.imul(K,Se)|0,u=u+Math.imul(K,Be)|0,u=u+Math.imul(G,Se)|0,b=b+Math.imul(G,Be)|0,p=p+Math.imul(N,Ae)|0,u=u+Math.imul(N,Re)|0,u=u+Math.imul(U,Ae)|0,b=b+Math.imul(U,Re)|0,p=p+Math.imul(c,qe)|0,u=u+Math.imul(c,Ie)|0,u=u+Math.imul(x,qe)|0,b=b+Math.imul(x,Ie)|0;var Zr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,p=Math.imul(ue,de),u=Math.imul(ue,pe),u=u+Math.imul(he,de)|0,b=Math.imul(he,pe),p=p+Math.imul(fe,ve)|0,u=u+Math.imul(fe,ye)|0,u=u+Math.imul(se,ve)|0,b=b+Math.imul(se,ye)|0,p=p+Math.imul(ae,ge)|0,u=u+Math.imul(ae,me)|0,u=u+Math.imul(oe,ge)|0,b=b+Math.imul(oe,me)|0,p=p+Math.imul(ie,be)|0,u=u+Math.imul(ie,we)|0,u=u+Math.imul(ne,be)|0,b=b+Math.imul(ne,we)|0,p=p+Math.imul(te,_e)|0,u=u+Math.imul(te,xe)|0,u=u+Math.imul(re,_e)|0,b=b+Math.imul(re,xe)|0,p=p+Math.imul(Q,Me)|0,u=u+Math.imul(Q,Ee)|0,u=u+Math.imul(ee,Me)|0,b=b+Math.imul(ee,Ee)|0,p=p+Math.imul(Z,Se)|0,u=u+Math.imul(Z,Be)|0,u=u+Math.imul(Y,Se)|0,b=b+Math.imul(Y,Be)|0,p=p+Math.imul(K,Ae)|0,u=u+Math.imul(K,Re)|0,u=u+Math.imul(G,Ae)|0,b=b+Math.imul(G,Re)|0,p=p+Math.imul(N,qe)|0,u=u+Math.imul(N,Ie)|0,u=u+Math.imul(U,qe)|0,b=b+Math.imul(U,Ie)|0;var Yr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,p=Math.imul(ue,ve),u=Math.imul(ue,ye),u=u+Math.imul(he,ve)|0,b=Math.imul(he,ye),p=p+Math.imul(fe,ge)|0,u=u+Math.imul(fe,me)|0,u=u+Math.imul(se,ge)|0,b=b+Math.imul(se,me)|0,p=p+Math.imul(ae,be)|0,u=u+Math.imul(ae,we)|0,u=u+Math.imul(oe,be)|0,b=b+Math.imul(oe,we)|0,p=p+Math.imul(ie,_e)|0,u=u+Math.imul(ie,xe)|0,u=u+Math.imul(ne,_e)|0,b=b+Math.imul(ne,xe)|0,p=p+Math.imul(te,Me)|0,u=u+Math.imul(te,Ee)|0,u=u+Math.imul(re,Me)|0,b=b+Math.imul(re,Ee)|0,p=p+Math.imul(Q,Se)|0,u=u+Math.imul(Q,Be)|0,u=u+Math.imul(ee,Se)|0,b=b+Math.imul(ee,Be)|0,p=p+Math.imul(Z,Ae)|0,u=u+Math.imul(Z,Re)|0,u=u+Math.imul(Y,Ae)|0,b=b+Math.imul(Y,Re)|0,p=p+Math.imul(K,qe)|0,u=u+Math.imul(K,Ie)|0,u=u+Math.imul(G,qe)|0,b=b+Math.imul(G,Ie)|0;var Xr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,p=Math.imul(ue,ge),u=Math.imul(ue,me),u=u+Math.imul(he,ge)|0,b=Math.imul(he,me),p=p+Math.imul(fe,be)|0,u=u+Math.imul(fe,we)|0,u=u+Math.imul(se,be)|0,b=b+Math.imul(se,we)|0,p=p+Math.imul(ae,_e)|0,u=u+Math.imul(ae,xe)|0,u=u+Math.imul(oe,_e)|0,b=b+Math.imul(oe,xe)|0,p=p+Math.imul(ie,Me)|0,u=u+Math.imul(ie,Ee)|0,u=u+Math.imul(ne,Me)|0,b=b+Math.imul(ne,Ee)|0,p=p+Math.imul(te,Se)|0,u=u+Math.imul(te,Be)|0,u=u+Math.imul(re,Se)|0,b=b+Math.imul(re,Be)|0,p=p+Math.imul(Q,Ae)|0,u=u+Math.imul(Q,Re)|0,u=u+Math.imul(ee,Ae)|0,b=b+Math.imul(ee,Re)|0,p=p+Math.imul(Z,qe)|0,u=u+Math.imul(Z,Ie)|0,u=u+Math.imul(Y,qe)|0,b=b+Math.imul(Y,Ie)|0;var Jr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,p=Math.imul(ue,be),u=Math.imul(ue,we),u=u+Math.imul(he,be)|0,b=Math.imul(he,we),p=p+Math.imul(fe,_e)|0,u=u+Math.imul(fe,xe)|0,u=u+Math.imul(se,_e)|0,b=b+Math.imul(se,xe)|0,p=p+Math.imul(ae,Me)|0,u=u+Math.imul(ae,Ee)|0,u=u+Math.imul(oe,Me)|0,b=b+Math.imul(oe,Ee)|0,p=p+Math.imul(ie,Se)|0,u=u+Math.imul(ie,Be)|0,u=u+Math.imul(ne,Se)|0,b=b+Math.imul(ne,Be)|0,p=p+Math.imul(te,Ae)|0,u=u+Math.imul(te,Re)|0,u=u+Math.imul(re,Ae)|0,b=b+Math.imul(re,Re)|0,p=p+Math.imul(Q,qe)|0,u=u+Math.imul(Q,Ie)|0,u=u+Math.imul(ee,qe)|0,b=b+Math.imul(ee,Ie)|0;var Qr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,p=Math.imul(ue,_e),u=Math.imul(ue,xe),u=u+Math.imul(he,_e)|0,b=Math.imul(he,xe),p=p+Math.imul(fe,Me)|0,u=u+Math.imul(fe,Ee)|0,u=u+Math.imul(se,Me)|0,b=b+Math.imul(se,Ee)|0,p=p+Math.imul(ae,Se)|0,u=u+Math.imul(ae,Be)|0,u=u+Math.imul(oe,Se)|0,b=b+Math.imul(oe,Be)|0,p=p+Math.imul(ie,Ae)|0,u=u+Math.imul(ie,Re)|0,u=u+Math.imul(ne,Ae)|0,b=b+Math.imul(ne,Re)|0,p=p+Math.imul(te,qe)|0,u=u+Math.imul(te,Ie)|0,u=u+Math.imul(re,qe)|0,b=b+Math.imul(re,Ie)|0;var ei=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ei>>>26)|0,ei&=67108863,p=Math.imul(ue,Me),u=Math.imul(ue,Ee),u=u+Math.imul(he,Me)|0,b=Math.imul(he,Ee),p=p+Math.imul(fe,Se)|0,u=u+Math.imul(fe,Be)|0,u=u+Math.imul(se,Se)|0,b=b+Math.imul(se,Be)|0,p=p+Math.imul(ae,Ae)|0,u=u+Math.imul(ae,Re)|0,u=u+Math.imul(oe,Ae)|0,b=b+Math.imul(oe,Re)|0,p=p+Math.imul(ie,qe)|0,u=u+Math.imul(ie,Ie)|0,u=u+Math.imul(ne,qe)|0,b=b+Math.imul(ne,Ie)|0;var ti=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ti>>>26)|0,ti&=67108863,p=Math.imul(ue,Se),u=Math.imul(ue,Be),u=u+Math.imul(he,Se)|0,b=Math.imul(he,Be),p=p+Math.imul(fe,Ae)|0,u=u+Math.imul(fe,Re)|0,u=u+Math.imul(se,Ae)|0,b=b+Math.imul(se,Re)|0,p=p+Math.imul(ae,qe)|0,u=u+Math.imul(ae,Ie)|0,u=u+Math.imul(oe,qe)|0,b=b+Math.imul(oe,Ie)|0;var ri=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ri>>>26)|0,ri&=67108863,p=Math.imul(ue,Ae),u=Math.imul(ue,Re),u=u+Math.imul(he,Ae)|0,b=Math.imul(he,Re),p=p+Math.imul(fe,qe)|0,u=u+Math.imul(fe,Ie)|0,u=u+Math.imul(se,qe)|0,b=b+Math.imul(se,Ie)|0;var ii=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ii>>>26)|0,ii&=67108863,p=Math.imul(ue,qe),u=Math.imul(ue,Ie),u=u+Math.imul(he,qe)|0,b=Math.imul(he,Ie);var ni=(g+p|0)+((u&8191)<<13)|0;return g=(b+(u>>>13)|0)+(ni>>>26)|0,ni&=67108863,d[0]=Ui,d[1]=Ge,d[2]=Ve,d[3]=Kr,d[4]=Wr,d[5]=zr,d[6]=Gr,d[7]=Vr,d[8]=$r,d[9]=Zr,d[10]=Yr,d[11]=Xr,d[12]=Jr,d[13]=Qr,d[14]=ei,d[15]=ti,d[16]=ri,d[17]=ii,d[18]=ni,g!==0&&(d[19]=g,l.length++),l};Math.imul||(j=C);function V(M,h,y){y.negative=h.negative^M.negative,y.length=M.length+h.length;for(var l=0,o=0,s=0;s<y.length-1;s++){var d=o;o=0;for(var g=l&67108863,p=Math.min(s,h.length-1),u=Math.max(0,s-M.length+1);u<=p;u++){var b=s-u,_=M.words[b]|0,c=h.words[u]|0,x=_*c,P=x&67108863;d=d+(x/67108864|0)|0,P=P+g|0,g=P&67108863,d=d+(P>>>26)|0,o+=d>>>26,d&=67108863}y.words[s]=g,l=d,d=o}return l!==0?y.words[s]=l:y.length--,y.strip()}function X(M,h,y){var l=new z;return l.mulp(M,h,y)}i.prototype.mulTo=function(h,y){var l,o=this.length+h.length;return this.length===10&&h.length===10?l=j(this,h,y):o<63?l=C(this,h,y):o<1024?l=V(this,h,y):l=X(this,h,y),l};function z(M,h){this.x=M,this.y=h}z.prototype.makeRBT=function(h){for(var y=new Array(h),l=i.prototype._countBits(h)-1,o=0;o<h;o++)y[o]=this.revBin(o,l,h);return y},z.prototype.revBin=function(h,y,l){if(h===0||h===l-1)return h;for(var o=0,s=0;s<y;s++)o|=(h&1)<<y-s-1,h>>=1;return o},z.prototype.permute=function(h,y,l,o,s,d){for(var g=0;g<d;g++)o[g]=y[h[g]],s[g]=l[h[g]]},z.prototype.transform=function(h,y,l,o,s,d){this.permute(d,h,y,l,o,s);for(var g=1;g<s;g<<=1)for(var p=g<<1,u=Math.cos(2*Math.PI/p),b=Math.sin(2*Math.PI/p),_=0;_<s;_+=p)for(var c=u,x=b,P=0;P<g;P++){var N=l[_+P],U=o[_+P],W=l[_+P+g],K=o[_+P+g],G=c*W-x*K;K=c*K+x*W,W=G,l[_+P]=N+W,o[_+P]=U+K,l[_+P+g]=N-W,o[_+P+g]=U-K,P!==p&&(G=u*c-b*x,x=u*x+b*c,c=G)}},z.prototype.guessLen13b=function(h,y){var l=Math.max(y,h)|1,o=l&1,s=0;for(l=l/2|0;l;l=l>>>1)s++;return 1<<s+1+o},z.prototype.conjugate=function(h,y,l){if(!(l<=1))for(var o=0;o<l/2;o++){var s=h[o];h[o]=h[l-o-1],h[l-o-1]=s,s=y[o],y[o]=-y[l-o-1],y[l-o-1]=-s}},z.prototype.normalize13b=function(h,y){for(var l=0,o=0;o<y/2;o++){var s=Math.round(h[2*o+1]/y)*8192+Math.round(h[2*o]/y)+l;h[o]=s&67108863,s<67108864?l=0:l=s/67108864|0}return h},z.prototype.convert13b=function(h,y,l,o){for(var s=0,d=0;d<y;d++)s=s+(h[d]|0),l[2*d]=s&8191,s=s>>>13,l[2*d+1]=s&8191,s=s>>>13;for(d=2*y;d<o;++d)l[d]=0;r(s===0),r((s&-8192)===0)},z.prototype.stub=function(h){for(var y=new Array(h),l=0;l<h;l++)y[l]=0;return y},z.prototype.mulp=function(h,y,l){var o=2*this.guessLen13b(h.length,y.length),s=this.makeRBT(o),d=this.stub(o),g=new Array(o),p=new Array(o),u=new Array(o),b=new Array(o),_=new Array(o),c=new Array(o),x=l.words;x.length=o,this.convert13b(h.words,h.length,g,o),this.convert13b(y.words,y.length,b,o),this.transform(g,d,p,u,o,s),this.transform(b,d,_,c,o,s);for(var P=0;P<o;P++){var N=p[P]*_[P]-u[P]*c[P];u[P]=p[P]*c[P]+u[P]*_[P],p[P]=N}return this.conjugate(p,u,o),this.transform(p,u,x,d,o,s),this.conjugate(x,d,o),this.normalize13b(x,o),l.negative=h.negative^y.negative,l.length=h.length+y.length,l.strip()},i.prototype.mul=function(h){var y=new i(null);return y.words=new Array(this.length+h.length),this.mulTo(h,y)},i.prototype.mulf=function(h){var y=new i(null);return y.words=new Array(this.length+h.length),X(this,h,y)},i.prototype.imul=function(h){return this.clone().mulTo(h,this)},i.prototype.imuln=function(h){r(typeof h=="number"),r(h<67108864);for(var y=0,l=0;l<this.length;l++){var o=(this.words[l]|0)*h,s=(o&67108863)+(y&67108863);y>>=26,y+=o/67108864|0,y+=s>>>26,this.words[l]=s&67108863}return y!==0&&(this.words[l]=y,this.length++),h===0&&(this.length=1,this._normSign()),this},i.prototype.muln=function(h){return this.clone().imuln(h)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(h){var y=I(h);if(y.length===0)return new i(1);for(var l=this,o=0;o<y.length&&y[o]===0;o++,l=l.sqr());if(++o<y.length)for(var s=l.sqr();o<y.length;o++,s=s.sqr())y[o]!==0&&(l=l.mul(s));return l},i.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=67108863>>>26-y<<26-y,s;if(y!==0){var d=0;for(s=0;s<this.length;s++){var g=this.words[s]&o,p=(this.words[s]|0)-g<<y;this.words[s]=p|d,d=g>>>26-y}d&&(this.words[s]=d,this.length++)}if(l!==0){for(s=this.length-1;s>=0;s--)this.words[s+l]=this.words[s];for(s=0;s<l;s++)this.words[s]=0;this.length+=l}return this.strip()},i.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},i.prototype.iushrn=function(h,y,l){r(typeof h=="number"&&h>=0);var o;y?o=(y-y%26)/26:o=0;var s=h%26,d=Math.min((h-s)/26,this.length),g=67108863^67108863>>>s<<s,p=l;if(o-=d,o=Math.max(0,o),p){for(var u=0;u<d;u++)p.words[u]=this.words[u];p.length=d}if(d!==0)if(this.length>d)for(this.length-=d,u=0;u<this.length;u++)this.words[u]=this.words[u+d];else this.words[0]=0,this.length=1;var b=0;for(u=this.length-1;u>=0&&(b!==0||u>=o);u--){var _=this.words[u]|0;this.words[u]=b<<26-s|_>>>s,b=_&g}return p&&b!==0&&(p.words[p.length++]=b),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(h,y,l){return r(this.negative===0),this.iushrn(h,y,l)},i.prototype.shln=function(h){return this.clone().ishln(h)},i.prototype.ushln=function(h){return this.clone().iushln(h)},i.prototype.shrn=function(h){return this.clone().ishrn(h)},i.prototype.ushrn=function(h){return this.clone().iushrn(h)},i.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return!1;var s=this.words[l];return!!(s&o)},i.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(y!==0&&l++,this.length=Math.min(l,this.length),y!==0){var o=67108863^67108863>>>y<<y;this.words[this.length-1]&=o}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.maskn=function(h){return this.clone().imaskn(h)},i.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)},i.prototype._iaddn=function(h){this.words[0]+=h;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.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 y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this.strip()},i.prototype.addn=function(h){return this.clone().iaddn(h)},i.prototype.subn=function(h){return this.clone().isubn(h)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(h,y,l){var o=h.length+l,s;this._expand(o);var d,g=0;for(s=0;s<h.length;s++){d=(this.words[s+l]|0)+g;var p=(h.words[s]|0)*y;d-=p&67108863,g=(d>>26)-(p/67108864|0),this.words[s+l]=d&67108863}for(;s<this.length-l;s++)d=(this.words[s+l]|0)+g,g=d>>26,this.words[s+l]=d&67108863;if(g===0)return this.strip();for(r(g===-1),g=0,s=0;s<this.length;s++)d=-(this.words[s]|0)+g,g=d>>26,this.words[s]=d&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(h,y){var l=this.length-h.length,o=this.clone(),s=h,d=s.words[s.length-1]|0,g=this._countBits(d);l=26-g,l!==0&&(s=s.ushln(l),o.iushln(l),d=s.words[s.length-1]|0);var p=o.length-s.length,u;if(y!=="mod"){u=new i(null),u.length=p+1,u.words=new Array(u.length);for(var b=0;b<u.length;b++)u.words[b]=0}var _=o.clone()._ishlnsubmul(s,1,p);_.negative===0&&(o=_,u&&(u.words[p]=1));for(var c=p-1;c>=0;c--){var x=(o.words[s.length+c]|0)*67108864+(o.words[s.length+c-1]|0);for(x=Math.min(x/d|0,67108863),o._ishlnsubmul(s,x,c);o.negative!==0;)x--,o.negative=0,o._ishlnsubmul(s,1,c),o.isZero()||(o.negative^=1);u&&(u.words[c]=x)}return u&&u.strip(),o.strip(),y!=="div"&&l!==0&&o.iushrn(l),{div:u||null,mod:o}},i.prototype.divmod=function(h,y,l){if(r(!h.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var o,s,d;return this.negative!==0&&h.negative===0?(d=this.neg().divmod(h,y),y!=="mod"&&(o=d.div.neg()),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.iadd(h)),{div:o,mod:s}):this.negative===0&&h.negative!==0?(d=this.divmod(h.neg(),y),y!=="mod"&&(o=d.div.neg()),{div:o,mod:d.mod}):(this.negative&h.negative)!==0?(d=this.neg().divmod(h.neg(),y),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.isub(h)),{div:d.div,mod:s}):h.length>this.length||this.cmp(h)<0?{div:new i(0),mod:this}:h.length===1?y==="div"?{div:this.divn(h.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new i(this.modn(h.words[0]))}:this._wordDiv(h,y)},i.prototype.div=function(h){return this.divmod(h,"div",!1).div},i.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},i.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},i.prototype.divRound=function(h){var y=this.divmod(h);if(y.mod.isZero())return y.div;var l=y.mod.abs(),o=h.abs().iushrn(1),s=h.words[0]&1,d=l.cmp(o);if(d<0||s===1&&d===0)return y.div;var g=new i(1);return g.negative=this.negative^h.negative,y.div.iadd(g)},i.prototype.modn=function(h){r(h<=67108863);for(var y=(1<<26)%h,l=0,o=this.length-1;o>=0;o--)l=(y*l+(this.words[o]|0))%h;return l},i.prototype.idivn=function(h){r(h<=67108863);for(var y=0,l=this.length-1;l>=0;l--){var o=(this.words[l]|0)+y*67108864;this.words[l]=o/h|0,y=o%h}return this.strip()},i.prototype.divn=function(h){return this.clone().idivn(h)},i.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new i(1),s=new i(0),d=new i(0),g=new i(1),p=0;y.isEven()&&l.isEven();)y.iushrn(1),l.iushrn(1),++p;for(var u=l.clone(),b=y.clone();!y.isZero();){for(var _=0,c=1;(y.words[0]&c)===0&&_<26;++_,c<<=1);if(_>0)for(y.iushrn(_);_-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(u),s.isub(b)),o.iushrn(1),s.iushrn(1);for(var x=0,P=1;(l.words[0]&P)===0&&x<26;++x,P<<=1);if(x>0)for(l.iushrn(x);x-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(u),g.isub(b)),d.iushrn(1),g.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(d),s.isub(g)):(l.isub(y),d.isub(o),g.isub(s))}return{a:d,b:g,gcd:l.iushln(p)}},i.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new i(1),s=new i(0),d=l.clone();y.cmpn(1)>0&&l.cmpn(1)>0;){for(var g=0,p=1;(y.words[0]&p)===0&&g<26;++g,p<<=1);if(g>0)for(y.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(d),o.iushrn(1);for(var u=0,b=1;(l.words[0]&b)===0&&u<26;++u,b<<=1);if(u>0)for(l.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(d),s.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(s)):(l.isub(y),s.isub(o))}var _;return y.cmpn(1)===0?_=o:_=s,_.cmpn(0)<0&&_.iadd(h),_},i.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var y=this.clone(),l=h.clone();y.negative=0,l.negative=0;for(var o=0;y.isEven()&&l.isEven();o++)y.iushrn(1),l.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;l.isEven();)l.iushrn(1);var s=y.cmp(l);if(s<0){var d=y;y=l,l=d}else if(s===0||l.cmpn(1)===0)break;y.isub(l)}while(!0);return l.iushln(o)},i.prototype.invm=function(h){return this.egcd(h).a.umod(h)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(h){return this.words[0]&h},i.prototype.bincn=function(h){r(typeof h=="number");var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return this._expand(l+1),this.words[l]|=o,this;for(var s=o,d=l;s!==0&&d<this.length;d++){var g=this.words[d]|0;g+=s,s=g>>>26,g&=67108863,this.words[d]=g}return s!==0&&(this.words[d]=s,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(h){var y=h<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var l;if(this.length>1)l=1;else{y&&(h=-h),r(h<=67108863,"Number is too big");var o=this.words[0]|0;l=o===h?0:o<h?-1:1}return this.negative!==0?-l|0:l},i.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var y=this.ucmp(h);return this.negative!==0?-y|0:y},i.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var y=0,l=this.length-1;l>=0;l--){var o=this.words[l]|0,s=h.words[l]|0;if(o!==s){o<s?y=-1:o>s&&(y=1);break}}return y},i.prototype.gtn=function(h){return this.cmpn(h)===1},i.prototype.gt=function(h){return this.cmp(h)===1},i.prototype.gten=function(h){return this.cmpn(h)>=0},i.prototype.gte=function(h){return this.cmp(h)>=0},i.prototype.ltn=function(h){return this.cmpn(h)===-1},i.prototype.lt=function(h){return this.cmp(h)===-1},i.prototype.lten=function(h){return this.cmpn(h)<=0},i.prototype.lte=function(h){return this.cmp(h)<=0},i.prototype.eqn=function(h){return this.cmpn(h)===0},i.prototype.eq=function(h){return this.cmp(h)===0},i.red=function(h){return new F(h)},i.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)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(h){return this.red=h,this},i.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},i.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},i.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},i.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},i.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},i.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},i.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},i.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var $={k256:null,p224:null,p192:null,p25519:null};function Fe(M,h){this.name=M,this.p=new i(h,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Fe.prototype._tmp=function(){var h=new i(null);return h.words=new Array(Math.ceil(this.n/13)),h},Fe.prototype.ireduce=function(h){var y=h,l;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),l=y.bitLength();while(l>this.n);var o=l<this.n?-1:y.ucmp(this.p);return o===0?(y.words[0]=0,y.length=1):o>0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},Fe.prototype.split=function(h,y){h.iushrn(this.n,0,y)},Fe.prototype.imulK=function(h){return h.imul(this.k)};function k(){Fe.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(k,Fe),k.prototype.split=function(h,y){for(var l=4194303,o=Math.min(h.length,9),s=0;s<o;s++)y.words[s]=h.words[s];if(y.length=o,h.length<=9){h.words[0]=0,h.length=1;return}var d=h.words[9];for(y.words[y.length++]=d&l,s=10;s<h.length;s++){var g=h.words[s]|0;h.words[s-10]=(g&l)<<4|d>>>22,d=g}d>>>=22,h.words[s-10]=d,d===0&&h.length>10?h.length-=10:h.length-=9},k.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var y=0,l=0;l<h.length;l++){var o=h.words[l]|0;y+=o*977,h.words[l]=y&67108863,y=o*64+(y/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function O(){Fe.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(O,Fe);function D(){Fe.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(D,Fe);function L(){Fe.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(L,Fe),L.prototype.imulK=function(h){for(var y=0,l=0;l<h.length;l++){var o=(h.words[l]|0)*19+y,s=o&67108863;o>>>=26,h.words[l]=s,y=o}return y!==0&&(h.words[h.length++]=y),h},i._prime=function(h){if($[h])return $[h];var y;if(h==="k256")y=new k;else if(h==="p224")y=new O;else if(h==="p192")y=new D;else if(h==="p25519")y=new L;else throw new Error("Unknown prime "+h);return $[h]=y,y};function F(M){if(typeof M=="string"){var h=i._prime(M);this.m=h.p,this.prime=h}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}F.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},F.prototype._verify2=function(h,y){r((h.negative|y.negative)===0,"red works only with positives"),r(h.red&&h.red===y.red,"red works only with red numbers")},F.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},F.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},F.prototype.add=function(h,y){this._verify2(h,y);var l=h.add(y);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},F.prototype.iadd=function(h,y){this._verify2(h,y);var l=h.iadd(y);return l.cmp(this.m)>=0&&l.isub(this.m),l},F.prototype.sub=function(h,y){this._verify2(h,y);var l=h.sub(y);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},F.prototype.isub=function(h,y){this._verify2(h,y);var l=h.isub(y);return l.cmpn(0)<0&&l.iadd(this.m),l},F.prototype.shl=function(h,y){return this._verify1(h),this.imod(h.ushln(y))},F.prototype.imul=function(h,y){return this._verify2(h,y),this.imod(h.imul(y))},F.prototype.mul=function(h,y){return this._verify2(h,y),this.imod(h.mul(y))},F.prototype.isqr=function(h){return this.imul(h,h.clone())},F.prototype.sqr=function(h){return this.mul(h,h)},F.prototype.sqrt=function(h){if(h.isZero())return h.clone();var y=this.m.andln(3);if(r(y%2===1),y===3){var l=this.m.add(new i(1)).iushrn(2);return this.pow(h,l)}for(var o=this.m.subn(1),s=0;!o.isZero()&&o.andln(1)===0;)s++,o.iushrn(1);r(!o.isZero());var d=new i(1).toRed(this),g=d.redNeg(),p=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,p).cmp(g)!==0;)u.redIAdd(g);for(var b=this.pow(u,o),_=this.pow(h,o.addn(1).iushrn(1)),c=this.pow(h,o),x=s;c.cmp(d)!==0;){for(var P=c,N=0;P.cmp(d)!==0;N++)P=P.redSqr();r(N<x);var U=this.pow(b,new i(1).iushln(x-N-1));_=_.redMul(U),b=U.redSqr(),c=c.redMul(b),x=N}return _},F.prototype.invm=function(h){var y=h._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},F.prototype.pow=function(h,y){if(y.isZero())return new i(1).toRed(this);if(y.cmpn(1)===0)return h.clone();var l=4,o=new Array(1<<l);o[0]=new i(1).toRed(this),o[1]=h;for(var s=2;s<o.length;s++)o[s]=this.mul(o[s-1],h);var d=o[0],g=0,p=0,u=y.bitLength()%26;for(u===0&&(u=26),s=y.length-1;s>=0;s--){for(var b=y.words[s],_=u-1;_>=0;_--){var c=b>>_&1;if(d!==o[0]&&(d=this.sqr(d)),c===0&&g===0){p=0;continue}g<<=1,g|=c,p++,!(p!==l&&(s!==0||_!==0))&&(d=this.mul(d,o[g]),p=0,g=0)}u=26}return d},F.prototype.convertTo=function(h){var y=h.umod(this.m);return y===h?y.clone():y},F.prototype.convertFrom=function(h){var y=h.clone();return y.red=null,y},i.mont=function(h){return new H(h)};function H(M){F.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}n(H,F),H.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},H.prototype.convertFrom=function(h){var y=this.imod(h.mul(this.rinv));return y.red=null,y},H.prototype.imul=function(h,y){if(h.isZero()||y.isZero())return h.words[0]=0,h.length=1,h;var l=h.imul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.mul=function(h,y){if(h.isZero()||y.isZero())return new i(0)._forceRed(this);var l=h.mul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.invm=function(h){var y=this.imod(h._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof cs>"u"||cs,zl)});var ke=R((ds,Vl)=>{w();var Qa=ft(),Zt=Qa.Buffer;function Gl(t,e){for(var r in t)e[r]=t[r]}Zt.from&&Zt.alloc&&Zt.allocUnsafe&&Zt.allocUnsafeSlow?Vl.exports=Qa:(Gl(Qa,ds),ds.Buffer=si);function si(t,e,r){return Zt(t,e,r)}si.prototype=Object.create(Zt.prototype);Gl(Zt,si);si.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Zt(t,e,r)};si.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Zt(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};si.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Zt(t)};si.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qa.SlowBuffer(t)}});var ui=R((zB,vs)=>{"use strict";w();var ps=65536,M2=4294967295;function E2(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
-
Use Chrome, Firefox or Internet Explorer 11`)}var S2=ke().Buffer,eo=globalThis.crypto||globalThis.msCrypto;eo&&eo.getRandomValues?vs.exports=B2:vs.exports=E2;function B2(t,e){if(t>M2)throw new RangeError("requested too many random bytes");var r=S2.allocUnsafe(t);if(t>0)if(t>ps)for(var n=0;n<t;n+=ps)eo.getRandomValues(r.slice(n,n+ps));else eo.getRandomValues(r);return typeof e=="function"?S.default.nextTick(function(){e(null,r)}):r}});var J=R((VB,ys)=>{w();typeof Object.create=="function"?ys.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ys.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Wi=R((ZB,gs)=>{"use strict";w();var Ki=typeof Reflect=="object"?Reflect:null,$l=Ki&&typeof Ki.apply=="function"?Ki.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},to;Ki&&typeof Ki.ownKeys=="function"?to=Ki.ownKeys:Object.getOwnPropertySymbols?to=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:to=function(e){return Object.getOwnPropertyNames(e)};function A2(t){console&&console.warn&&console.warn(t)}var Yl=Number.isNaN||function(e){return e!==e};function je(){je.init.call(this)}gs.exports=je;gs.exports.once=k2;je.EventEmitter=je;je.prototype._events=void 0;je.prototype._eventsCount=0;je.prototype._maxListeners=void 0;var Zl=10;function ro(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(je,"defaultMaxListeners",{enumerable:!0,get:function(){return Zl},set:function(t){if(typeof t!="number"||t<0||Yl(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Zl=t}});je.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};je.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Yl(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 Xl(t){return t._maxListeners===void 0?je.defaultMaxListeners:t._maxListeners}je.prototype.getMaxListeners=function(){return Xl(this)};je.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var f;if(r.length>0&&(f=r[0]),f instanceof Error)throw f;var v=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw v.context=f,v}var m=a[e];if(m===void 0)return!1;if(typeof m=="function")$l(m,this,r);else for(var E=m.length,A=r0(m,E),n=0;n<E;++n)$l(A[n],this,r);return!0};function Jl(t,e,r,n){var i,a,f;if(ro(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),f=a[e]),f===void 0)f=a[e]=r,++t._eventsCount;else if(typeof f=="function"?f=a[e]=n?[r,f]:[f,r]:n?f.unshift(r):f.push(r),i=Xl(t),i>0&&f.length>i&&!f.warned){f.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");v.name="MaxListenersExceededWarning",v.emitter=t,v.type=e,v.count=f.length,A2(v)}return t}je.prototype.addListener=function(e,r){return Jl(this,e,r,!1)};je.prototype.on=je.prototype.addListener;je.prototype.prependListener=function(e,r){return Jl(this,e,r,!0)};function R2(){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 Ql(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=R2.bind(n);return i.listener=r,n.wrapFn=i,i}je.prototype.once=function(e,r){return ro(r),this.on(e,Ql(this,e,r)),this};je.prototype.prependOnceListener=function(e,r){return ro(r),this.prependListener(e,Ql(this,e,r)),this};je.prototype.removeListener=function(e,r){var n,i,a,f,v;if(ro(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(a=-1,f=n.length-1;f>=0;f--)if(n[f]===r||n[f].listener===r){v=n[f].listener,a=f;break}if(a<0)return this;a===0?n.shift():q2(n,a),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,v||r)}return this};je.prototype.off=je.prototype.removeListener;je.prototype.removeAllListeners=function(e){var r,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[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var a=Object.keys(n),f;for(i=0;i<a.length;++i)f=a[i],f!=="removeListener"&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function e0(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?I2(i):r0(i,i.length)}je.prototype.listeners=function(e){return e0(this,e,!0)};je.prototype.rawListeners=function(e){return e0(this,e,!1)};je.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):t0.call(t,e)};je.prototype.listenerCount=t0;function t0(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}je.prototype.eventNames=function(){return this._eventsCount>0?to(this._events):[]};function r0(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function q2(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function I2(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function k2(t,e){return new Promise(function(r,n){function i(f){t.removeListener(e,a),n(f)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}i0(t,e,a,{once:!0}),e!=="error"&&T2(t,i,{once:!0})})}function T2(t,e,r){typeof t.on=="function"&&i0(t,"error",e,r)}function i0(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(a){n.once&&t.removeEventListener(e,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var ms=R((XB,n0)=>{w();n0.exports=Wi().EventEmitter});var bs=R((QB,a0)=>{"use strict";w();a0.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(e,r);if(v.value!==i||v.enumerable!==!0)return!1}return!0}});var Zn=R((t7,o0)=>{"use strict";w();var C2=bs();o0.exports=function(){return C2()&&!!Symbol.toStringTag}});var ws=R((i7,f0)=>{"use strict";w();f0.exports=Object});var u0=R((a7,s0)=>{"use strict";w();s0.exports=Error});var l0=R((f7,h0)=>{"use strict";w();h0.exports=EvalError});var d0=R((u7,c0)=>{"use strict";w();c0.exports=RangeError});var v0=R((l7,p0)=>{"use strict";w();p0.exports=ReferenceError});var _s=R((d7,y0)=>{"use strict";w();y0.exports=SyntaxError});var hi=R((v7,g0)=>{"use strict";w();g0.exports=TypeError});var b0=R((g7,m0)=>{"use strict";w();m0.exports=URIError});var _0=R((b7,w0)=>{"use strict";w();w0.exports=Math.abs});var M0=R((_7,x0)=>{"use strict";w();x0.exports=Math.floor});var S0=R((M7,E0)=>{"use strict";w();E0.exports=Math.max});var A0=R((S7,B0)=>{"use strict";w();B0.exports=Math.min});var q0=R((A7,R0)=>{"use strict";w();R0.exports=Math.pow});var k0=R((q7,I0)=>{"use strict";w();I0.exports=Math.round});var C0=R((k7,T0)=>{"use strict";w();T0.exports=Number.isNaN||function(e){return e!==e}});var P0=R((C7,O0)=>{"use strict";w();var O2=C0();O0.exports=function(e){return O2(e)||e===0?e:e<0?-1:1}});var U0=R((P7,D0)=>{"use strict";w();D0.exports=Object.getOwnPropertyDescriptor});var li=R((U7,N0)=>{"use strict";w();var io=U0();if(io)try{io([],"length")}catch{io=null}N0.exports=io});var Yn=R((L7,L0)=>{"use strict";w();var no=Object.defineProperty||!1;if(no)try{no({},"a",{value:1})}catch{no=!1}L0.exports=no});var H0=R((j7,j0)=>{"use strict";w();var F0=typeof Symbol<"u"&&Symbol,P2=bs();j0.exports=function(){return typeof F0!="function"||typeof Symbol!="function"||typeof F0("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:P2()}});var xs=R((K7,K0)=>{"use strict";w();K0.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Ms=R((z7,W0)=>{"use strict";w();var D2=ws();W0.exports=D2.getPrototypeOf||null});var V0=R((V7,G0)=>{"use strict";w();var U2="Function.prototype.bind called on incompatible ",N2=Object.prototype.toString,L2=Math.max,F2="[object Function]",z0=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var a=0;a<r.length;a+=1)n[a+e.length]=r[a];return n},j2=function(e,r){for(var n=[],i=r||0,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n},H2=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};G0.exports=function(e){var r=this;if(typeof r!="function"||N2.apply(r)!==F2)throw new TypeError(U2+r);for(var n=j2(arguments,1),i,a=function(){if(this instanceof i){var A=r.apply(this,z0(n,arguments));return Object(A)===A?A:this}return r.apply(e,z0(n,arguments))},f=L2(0,r.length-n.length),v=[],m=0;m<f;m++)v[m]="$"+m;if(i=Function("binder","return function ("+H2(v,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var E=function(){};E.prototype=r.prototype,i.prototype=new E,E.prototype=null}return i}});var zi=R((Z7,$0)=>{"use strict";w();var K2=V0();$0.exports=Function.prototype.bind||K2});var ao=R((X7,Z0)=>{"use strict";w();Z0.exports=Function.prototype.call});var oo=R((Q7,Y0)=>{"use strict";w();Y0.exports=Function.prototype.apply});var J0=R((tA,X0)=>{"use strict";w();X0.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Es=R((iA,Q0)=>{"use strict";w();var W2=zi(),z2=oo(),G2=ao(),V2=J0();Q0.exports=V2||W2.call(G2,z2)});var fo=R((aA,ec)=>{"use strict";w();var $2=zi(),Z2=hi(),Y2=ao(),X2=Es();ec.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new Z2("a function is required");return X2($2,Y2,e)}});var oc=R((fA,ac)=>{"use strict";w();var J2=fo(),tc=li(),ic;try{ic=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Ss=!!ic&&tc&&tc(Object.prototype,"__proto__"),nc=Object,rc=nc.getPrototypeOf;ac.exports=Ss&&typeof Ss.get=="function"?J2([Ss.get]):typeof rc=="function"?function(e){return rc(e==null?e:nc(e))}:!1});var so=R((uA,hc)=>{"use strict";w();var fc=xs(),sc=Ms(),uc=oc();hc.exports=fc?function(e){return fc(e)}:sc?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return sc(e)}:uc?function(e){return uc(e)}:null});var Bs=R((lA,lc)=>{"use strict";w();var Q2=Function.prototype.call,ew=Object.prototype.hasOwnProperty,tw=zi();lc.exports=tw.call(Q2,ew)});var qs=R((dA,gc)=>{"use strict";w();var Oe,rw=ws(),iw=u0(),nw=l0(),aw=d0(),ow=v0(),Zi=_s(),$i=hi(),fw=b0(),sw=_0(),uw=M0(),hw=S0(),lw=A0(),cw=q0(),dw=k0(),pw=P0(),vc=Function,As=function(t){try{return vc('"use strict"; return ('+t+").constructor;")()}catch{}},Xn=li(),vw=Yn(),Rs=function(){throw new $i},yw=Xn?(function(){try{return arguments.callee,Rs}catch{try{return Xn(arguments,"callee").get}catch{return Rs}}})():Rs,Gi=H0()(),it=so(),gw=Ms(),mw=xs(),yc=oo(),Jn=ao(),Vi={},bw=typeof Uint8Array>"u"||!it?Oe:it(Uint8Array),ci={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Oe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Oe:ArrayBuffer,"%ArrayIteratorPrototype%":Gi&&it?it([][Symbol.iterator]()):Oe,"%AsyncFromSyncIteratorPrototype%":Oe,"%AsyncFunction%":Vi,"%AsyncGenerator%":Vi,"%AsyncGeneratorFunction%":Vi,"%AsyncIteratorPrototype%":Vi,"%Atomics%":typeof Atomics>"u"?Oe:Atomics,"%BigInt%":typeof BigInt>"u"?Oe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Oe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Oe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Oe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":iw,"%eval%":eval,"%EvalError%":nw,"%Float16Array%":typeof Float16Array>"u"?Oe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Oe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Oe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Oe:FinalizationRegistry,"%Function%":vc,"%GeneratorFunction%":Vi,"%Int8Array%":typeof Int8Array>"u"?Oe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Oe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Oe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Gi&&it?it(it([][Symbol.iterator]())):Oe,"%JSON%":typeof JSON=="object"?JSON:Oe,"%Map%":typeof Map>"u"?Oe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Gi||!it?Oe:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":rw,"%Object.getOwnPropertyDescriptor%":Xn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Oe:Promise,"%Proxy%":typeof Proxy>"u"?Oe:Proxy,"%RangeError%":aw,"%ReferenceError%":ow,"%Reflect%":typeof Reflect>"u"?Oe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Oe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Gi||!it?Oe:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Oe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Gi&&it?it(""[Symbol.iterator]()):Oe,"%Symbol%":Gi?Symbol:Oe,"%SyntaxError%":Zi,"%ThrowTypeError%":yw,"%TypedArray%":bw,"%TypeError%":$i,"%Uint8Array%":typeof Uint8Array>"u"?Oe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Oe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Oe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Oe:Uint32Array,"%URIError%":fw,"%WeakMap%":typeof WeakMap>"u"?Oe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Oe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Oe:WeakSet,"%Function.prototype.call%":Jn,"%Function.prototype.apply%":yc,"%Object.defineProperty%":vw,"%Object.getPrototypeOf%":gw,"%Math.abs%":sw,"%Math.floor%":uw,"%Math.max%":hw,"%Math.min%":lw,"%Math.pow%":cw,"%Math.round%":dw,"%Math.sign%":pw,"%Reflect.getPrototypeOf%":mw};if(it)try{null.error}catch(t){cc=it(it(t)),ci["%Error.prototype%"]=cc}var cc,ww=function t(e){var r;if(e==="%AsyncFunction%")r=As("async function () {}");else if(e==="%GeneratorFunction%")r=As("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=As("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&it&&(r=it(i.prototype))}return ci[e]=r,r},dc={__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"]},Qn=zi(),uo=Bs(),_w=Qn.call(Jn,Array.prototype.concat),xw=Qn.call(yc,Array.prototype.splice),pc=Qn.call(Jn,String.prototype.replace),ho=Qn.call(Jn,String.prototype.slice),Mw=Qn.call(Jn,RegExp.prototype.exec),Ew=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Sw=/\\(\\)?/g,Bw=function(e){var r=ho(e,0,1),n=ho(e,-1);if(r==="%"&&n!=="%")throw new Zi("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Zi("invalid intrinsic syntax, expected opening `%`");var i=[];return pc(e,Ew,function(a,f,v,m){i[i.length]=v?pc(m,Sw,"$1"):f||a}),i},Aw=function(e,r){var n=e,i;if(uo(dc,n)&&(i=dc[n],n="%"+i[0]+"%"),uo(ci,n)){var a=ci[n];if(a===Vi&&(a=ww(n)),typeof a>"u"&&!r)throw new $i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Zi("intrinsic "+e+" does not exist!")};gc.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(Mw(/^%?[^%]*%?$/,e)===null)throw new Zi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Bw(e),i=n.length>0?n[0]:"",a=Aw("%"+i+"%",r),f=a.name,v=a.value,m=!1,E=a.alias;E&&(i=E[0],xw(n,_w([0,1],E)));for(var A=1,q=!0;A<n.length;A+=1){var I=n[A],C=ho(I,0,1),j=ho(I,-1);if((C==='"'||C==="'"||C==="`"||j==='"'||j==="'"||j==="`")&&C!==j)throw new Zi("property names with quotes must have matching quotes");if((I==="constructor"||!q)&&(m=!0),i+="."+I,f="%"+i+"%",uo(ci,f))v=ci[f];else if(v!=null){if(!(I in v)){if(!r)throw new $i("base intrinsic for "+e+" exists, but the property is not available.");return}if(Xn&&A+1>=n.length){var V=Xn(v,I);q=!!V,q&&"get"in V&&!("originalValue"in V.get)?v=V.get:v=v[I]}else q=uo(v,I),v=v[I];q&&!m&&(ci[f]=v)}}return v}});var di=R((vA,wc)=>{"use strict";w();var mc=qs(),bc=fo(),Rw=bc([mc("%String.prototype.indexOf%")]);wc.exports=function(e,r){var n=mc(e,!!r);return typeof n=="function"&&Rw(e,".prototype.")>-1?bc([n]):n}});var Mc=R((gA,xc)=>{"use strict";w();var qw=Zn()(),Iw=di(),Is=Iw("Object.prototype.toString"),lo=function(e){return qw&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Is(e)==="[object Arguments]"},_c=function(e){return lo(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&Is(e)!=="[object Array]"&&"callee"in e&&Is(e.callee)==="[object Function]"},kw=(function(){return lo(arguments)})();lo.isLegacyArguments=_c;xc.exports=kw?lo:_c});var qc=R((bA,Rc)=>{"use strict";w();var Ec=di(),Tw=Zn()(),Cw=Bs(),Ow=li(),Cs;Tw?(Sc=Ec("RegExp.prototype.exec"),ks={},co=function(){throw ks},Ts={toString:co,valueOf:co},typeof Symbol.toPrimitive=="symbol"&&(Ts[Symbol.toPrimitive]=co),Cs=function(e){if(!e||typeof e!="object")return!1;var r=Ow(e,"lastIndex"),n=r&&Cw(r,"value");if(!n)return!1;try{Sc(e,Ts)}catch(i){return i===ks}}):(Bc=Ec("Object.prototype.toString"),Ac="[object RegExp]",Cs=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Bc(e)===Ac});var Sc,ks,co,Ts,Bc,Ac;Rc.exports=Cs});var kc=R((_A,Ic)=>{"use strict";w();var Pw=di(),Dw=qc(),Uw=Pw("RegExp.prototype.exec"),Nw=hi();Ic.exports=function(e){if(!Dw(e))throw new Nw("`regex` must be a RegExp");return function(n){return Uw(e,n)!==null}}});var Cc=R((MA,Tc)=>{"use strict";w();var Lw=function*(){}.constructor;Tc.exports=()=>Lw});var Uc=R((SA,Dc)=>{"use strict";w();var Pc=di(),Fw=kc(),jw=Fw(/^\s*(?:function)?\*/),Hw=Zn()(),Oc=so(),Kw=Pc("Object.prototype.toString"),Ww=Pc("Function.prototype.toString"),zw=Cc();Dc.exports=function(e){if(typeof e!="function")return!1;if(jw(Ww(e)))return!0;if(!Hw){var r=Kw(e);return r==="[object GeneratorFunction]"}if(!Oc)return!1;var n=zw();return n&&Oc(e)===n.prototype}});var jc=R((AA,Fc)=>{"use strict";w();var Lc=Function.prototype.toString,Yi=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ps,po;if(typeof Yi=="function"&&typeof Object.defineProperty=="function")try{Ps=Object.defineProperty({},"length",{get:function(){throw po}}),po={},Yi(function(){throw 42},null,Ps)}catch(t){t!==po&&(Yi=null)}else Yi=null;var Gw=/^\s*class\b/,Ds=function(e){try{var r=Lc.call(e);return Gw.test(r)}catch{return!1}},Os=function(e){try{return Ds(e)?!1:(Lc.call(e),!0)}catch{return!1}},vo=Object.prototype.toString,Vw="[object Object]",$w="[object Function]",Zw="[object GeneratorFunction]",Yw="[object HTMLAllCollection]",Xw="[object HTML document.all class]",Jw="[object HTMLCollection]",Qw=typeof Symbol=="function"&&!!Symbol.toStringTag,e_=!(0 in[,]),Us=function(){return!1};typeof document=="object"&&(Nc=document.all,vo.call(Nc)===vo.call(document.all)&&(Us=function(e){if((e_||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=vo.call(e);return(r===Yw||r===Xw||r===Jw||r===Vw)&&e("")==null}catch{}return!1}));var Nc;Fc.exports=Yi?function(e){if(Us(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Yi(e,null,Ps)}catch(r){if(r!==po)return!1}return!Ds(e)&&Os(e)}:function(e){if(Us(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Qw)return Os(e);if(Ds(e))return!1;var r=vo.call(e);return r!==$w&&r!==Zw&&!/^\[object HTML/.test(r)?!1:Os(e)}});var Wc=R((qA,Kc)=>{"use strict";w();var t_=jc(),r_=Object.prototype.toString,Hc=Object.prototype.hasOwnProperty,i_=function(e,r,n){for(var i=0,a=e.length;i<a;i++)Hc.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},n_=function(e,r,n){for(var i=0,a=e.length;i<a;i++)n==null?r(e.charAt(i),i,e):r.call(n,e.charAt(i),i,e)},a_=function(e,r,n){for(var i in e)Hc.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))};function o_(t){return r_.call(t)==="[object Array]"}Kc.exports=function(e,r,n){if(!t_(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),o_(e)?i_(e,r,i):typeof e=="string"?n_(e,r,i):a_(e,r,i)}});var Gc=R((kA,zc)=>{"use strict";w();zc.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var $c=R((CA,Vc)=>{"use strict";w();var Ns=Gc(),f_=globalThis;Vc.exports=function(){for(var e=[],r=0;r<Ns.length;r++)typeof f_[Ns[r]]=="function"&&(e[e.length]=Ns[r]);return e}});var Jc=R((PA,Xc)=>{"use strict";w();var Zc=Yn(),s_=_s(),Xi=hi(),Yc=li();Xc.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Xi("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Xi("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xi("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xi("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xi("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xi("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,m=!!Yc&&Yc(e,r);if(Zc)Zc(e,r,{configurable:f===null&&m?m.configurable:!f,enumerable:i===null&&m?m.enumerable:!i,value:n,writable:a===null&&m?m.writable:!a});else if(v||!i&&!a&&!f)e[r]=n;else throw new s_("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var td=R((UA,ed)=>{"use strict";w();var Ls=Yn(),Qc=function(){return!!Ls};Qc.hasArrayLengthDefineBug=function(){if(!Ls)return null;try{return Ls([],"length",{value:1}).length!==1}catch{return!0}};ed.exports=Qc});var od=R((LA,ad)=>{"use strict";w();var u_=qs(),rd=Jc(),h_=td()(),id=li(),nd=hi(),l_=u_("%Math.floor%");ad.exports=function(e,r){if(typeof e!="function")throw new nd("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||l_(r)!==r)throw new nd("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in e&&id){var f=id(e,"length");f&&!f.configurable&&(i=!1),f&&!f.writable&&(a=!1)}return(i||a||!n)&&(h_?rd(e,"length",r,!0,!0):rd(e,"length",r)),e}});var sd=R((jA,fd)=>{"use strict";w();var c_=zi(),d_=oo(),p_=Es();fd.exports=function(){return p_(c_,d_,arguments)}});var ld=R((KA,yo)=>{"use strict";w();var v_=od(),ud=Yn(),y_=fo(),hd=sd();yo.exports=function(e){var r=y_(arguments),n=1+e.length-(arguments.length-1);return v_(r,n>0?n:0,!0)};ud?ud(yo.exports,"apply",{value:hd}):yo.exports.apply=hd});var Ks=R((zA,vd)=>{"use strict";w();var bo=Wc(),g_=$c(),cd=ld(),js=di(),mo=li(),go=so(),m_=js("Object.prototype.toString"),pd=Zn()(),dd=globalThis,Fs=g_(),Hs=js("String.prototype.slice"),b_=js("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},wo={__proto__:null};pd&&mo&&go?bo(Fs,function(t){var e=new dd[t];if(Symbol.toStringTag in e&&go){var r=go(e),n=mo(r,Symbol.toStringTag);if(!n&&r){var i=go(r);n=mo(i,Symbol.toStringTag)}if(n&&n.get){var a=cd(n.get);wo["$"+t]=a}}}):bo(Fs,function(t){var e=new dd[t],r=e.slice||e.set;if(r){var n=cd(r);wo["$"+t]=n}});var w_=function(e){var r=!1;return bo(wo,function(n,i){if(!r)try{"$"+n(e)===i&&(r=Hs(i,1))}catch{}}),r},__=function(e){var r=!1;return bo(wo,function(n,i){if(!r)try{n(e),r=Hs(i,1)}catch{}}),r};vd.exports=function(e){if(!e||typeof e!="object")return!1;if(!pd){var r=Hs(m_(e),8,-1);return b_(Fs,r)>-1?r:r!=="Object"?!1:__(e)}return mo?w_(e):null}});var Ws=R((VA,yd)=>{"use strict";w();var x_=Ks();yd.exports=function(e){return!!x_(e)}});var Id=R(Pe=>{"use strict";w();var M_=Mc(),E_=Uc(),kt=Ks(),gd=Ws();function Ji(t){return t.call.bind(t)}var md=typeof BigInt<"u",bd=typeof Symbol<"u",_t=Ji(Object.prototype.toString),S_=Ji(Number.prototype.valueOf),B_=Ji(String.prototype.valueOf),A_=Ji(Boolean.prototype.valueOf);md&&(wd=Ji(BigInt.prototype.valueOf));var wd;bd&&(_d=Ji(Symbol.prototype.valueOf));var _d;function ta(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}Pe.isArgumentsObject=M_;Pe.isGeneratorFunction=E_;Pe.isTypedArray=gd;function R_(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}Pe.isPromise=R_;function q_(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):gd(t)||Md(t)}Pe.isArrayBufferView=q_;function I_(t){return kt(t)==="Uint8Array"}Pe.isUint8Array=I_;function k_(t){return kt(t)==="Uint8ClampedArray"}Pe.isUint8ClampedArray=k_;function T_(t){return kt(t)==="Uint16Array"}Pe.isUint16Array=T_;function C_(t){return kt(t)==="Uint32Array"}Pe.isUint32Array=C_;function O_(t){return kt(t)==="Int8Array"}Pe.isInt8Array=O_;function P_(t){return kt(t)==="Int16Array"}Pe.isInt16Array=P_;function D_(t){return kt(t)==="Int32Array"}Pe.isInt32Array=D_;function U_(t){return kt(t)==="Float32Array"}Pe.isFloat32Array=U_;function N_(t){return kt(t)==="Float64Array"}Pe.isFloat64Array=N_;function L_(t){return kt(t)==="BigInt64Array"}Pe.isBigInt64Array=L_;function F_(t){return kt(t)==="BigUint64Array"}Pe.isBigUint64Array=F_;function _o(t){return _t(t)==="[object Map]"}_o.working=typeof Map<"u"&&_o(new Map);function j_(t){return typeof Map>"u"?!1:_o.working?_o(t):t instanceof Map}Pe.isMap=j_;function xo(t){return _t(t)==="[object Set]"}xo.working=typeof Set<"u"&&xo(new Set);function H_(t){return typeof Set>"u"?!1:xo.working?xo(t):t instanceof Set}Pe.isSet=H_;function Mo(t){return _t(t)==="[object WeakMap]"}Mo.working=typeof WeakMap<"u"&&Mo(new WeakMap);function K_(t){return typeof WeakMap>"u"?!1:Mo.working?Mo(t):t instanceof WeakMap}Pe.isWeakMap=K_;function Gs(t){return _t(t)==="[object WeakSet]"}Gs.working=typeof WeakSet<"u"&&Gs(new WeakSet);function W_(t){return Gs(t)}Pe.isWeakSet=W_;function Eo(t){return _t(t)==="[object ArrayBuffer]"}Eo.working=typeof ArrayBuffer<"u"&&Eo(new ArrayBuffer);function xd(t){return typeof ArrayBuffer>"u"?!1:Eo.working?Eo(t):t instanceof ArrayBuffer}Pe.isArrayBuffer=xd;function So(t){return _t(t)==="[object DataView]"}So.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&So(new DataView(new ArrayBuffer(1),0,1));function Md(t){return typeof DataView>"u"?!1:So.working?So(t):t instanceof DataView}Pe.isDataView=Md;var zs=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ea(t){return _t(t)==="[object SharedArrayBuffer]"}function Ed(t){return typeof zs>"u"?!1:(typeof ea.working>"u"&&(ea.working=ea(new zs)),ea.working?ea(t):t instanceof zs)}Pe.isSharedArrayBuffer=Ed;function z_(t){return _t(t)==="[object AsyncFunction]"}Pe.isAsyncFunction=z_;function G_(t){return _t(t)==="[object Map Iterator]"}Pe.isMapIterator=G_;function V_(t){return _t(t)==="[object Set Iterator]"}Pe.isSetIterator=V_;function $_(t){return _t(t)==="[object Generator]"}Pe.isGeneratorObject=$_;function Z_(t){return _t(t)==="[object WebAssembly.Module]"}Pe.isWebAssemblyCompiledModule=Z_;function Sd(t){return ta(t,S_)}Pe.isNumberObject=Sd;function Bd(t){return ta(t,B_)}Pe.isStringObject=Bd;function Ad(t){return ta(t,A_)}Pe.isBooleanObject=Ad;function Rd(t){return md&&ta(t,wd)}Pe.isBigIntObject=Rd;function qd(t){return bd&&ta(t,_d)}Pe.isSymbolObject=qd;function Y_(t){return Sd(t)||Bd(t)||Ad(t)||Rd(t)||qd(t)}Pe.isBoxedPrimitive=Y_;function X_(t){return typeof Uint8Array<"u"&&(xd(t)||Ed(t))}Pe.isAnyArrayBuffer=X_;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Pe,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Td=R((XA,kd)=>{w();kd.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var na=R(De=>{w();var Cd=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(e,r[i]);return n},J_=/%[sdj%]/g;De.format=function(t){if(!To(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(kr(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(t).replace(J_,function(v){if(v==="%%")return"%";if(r>=i)return v;switch(v){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return v}}),f=n[r];r<i;f=n[++r])ko(f)||!Qi(f)?a+=" "+f:a+=" "+kr(f);return a};De.deprecate=function(t,e){if(typeof S.default<"u"&&S.default.noDeprecation===!0)return t;if(typeof S.default>"u")return function(){return De.deprecate(t,e).apply(this,arguments)};var r=!1;function n(){if(!r){if(S.default.throwDeprecation)throw new Error(e);S.default.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n};var Bo={},Od=/^$/;S.default.env.NODE_DEBUG&&(Ao=S.default.env.NODE_DEBUG,Ao=Ao.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Od=new RegExp("^"+Ao+"$","i"));var Ao;De.debuglog=function(t){if(t=t.toUpperCase(),!Bo[t])if(Od.test(t)){var e=S.default.pid;Bo[t]=function(){var r=De.format.apply(De,arguments);console.error("%s %d: %s",t,e,r)}}else Bo[t]=function(){};return Bo[t]};function kr(t,e){var r={seen:[],stylize:ex};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ys(e)?r.showHidden=e:e&&De._extend(r,e),vi(r.showHidden)&&(r.showHidden=!1),vi(r.depth)&&(r.depth=2),vi(r.colors)&&(r.colors=!1),vi(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Q_),qo(r,t,r.depth)}De.inspect=kr;kr.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]};kr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Q_(t,e){var r=kr.styles[e];return r?"\x1B["+kr.colors[r][0]+"m"+t+"\x1B["+kr.colors[r][1]+"m":t}function ex(t,e){return t}function tx(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function qo(t,e,r){if(t.customInspect&&e&&Ro(e.inspect)&&e.inspect!==De.inspect&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return To(n)||(n=qo(t,n,r)),n}var i=rx(t,e);if(i)return i;var a=Object.keys(e),f=tx(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),ia(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Vs(e);if(a.length===0){if(Ro(e)){var v=e.name?": "+e.name:"";return t.stylize("[Function"+v+"]","special")}if(ra(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Io(e))return t.stylize(Date.prototype.toString.call(e),"date");if(ia(e))return Vs(e)}var m="",E=!1,A=["{","}"];if(Pd(e)&&(E=!0,A=["[","]"]),Ro(e)){var q=e.name?": "+e.name:"";m=" [Function"+q+"]"}if(ra(e)&&(m=" "+RegExp.prototype.toString.call(e)),Io(e)&&(m=" "+Date.prototype.toUTCString.call(e)),ia(e)&&(m=" "+Vs(e)),a.length===0&&(!E||e.length==0))return A[0]+m+A[1];if(r<0)return ra(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var I;return E?I=ix(t,e,r,f,a):I=a.map(function(C){return Zs(t,e,r,f,C,E)}),t.seen.pop(),nx(I,m,A)}function rx(t,e){if(vi(e))return t.stylize("undefined","undefined");if(To(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Dd(e))return t.stylize(""+e,"number");if(Ys(e))return t.stylize(""+e,"boolean");if(ko(e))return t.stylize("null","null")}function Vs(t){return"["+Error.prototype.toString.call(t)+"]"}function ix(t,e,r,n,i){for(var a=[],f=0,v=e.length;f<v;++f)Ud(e,String(f))?a.push(Zs(t,e,r,n,String(f),!0)):a.push("");return i.forEach(function(m){m.match(/^\d+$/)||a.push(Zs(t,e,r,n,m,!0))}),a}function Zs(t,e,r,n,i,a){var f,v,m;if(m=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},m.get?m.set?v=t.stylize("[Getter/Setter]","special"):v=t.stylize("[Getter]","special"):m.set&&(v=t.stylize("[Setter]","special")),Ud(n,i)||(f="["+i+"]"),v||(t.seen.indexOf(m.value)<0?(ko(r)?v=qo(t,m.value,null):v=qo(t,m.value,r-1),v.indexOf(`
|
|
3
|
-
`)>-1&&(a?
|
|
4
|
-
`).map(function(
|
|
5
|
-
`).slice(2):
|
|
6
|
-
`+
|
|
7
|
-
`).map(function(
|
|
8
|
-
`))):
|
|
9
|
-
`)>=0&&
|
|
1
|
+
var bsvShamir=(()=>{var Vg=Object.create;var mh=Object.defineProperty;var $g=Object.getOwnPropertyDescriptor;var zg=Object.getOwnPropertyNames;var Zg=Object.getPrototypeOf,Yg=Object.prototype.hasOwnProperty;var Xg=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var B=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Jg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zg(e))!Yg.call(t,n)&&n!==r&&mh(t,n,{get:()=>e[n],enumerable:!(i=$g(e,n))||i.enumerable});return t};var bh=(t,e,r)=>(r=t!=null?Vg(Zg(t)):{},Jg(e||!t||!t.__esModule?mh(r,"default",{value:t,enumerable:!0}):r,t));var Eh=B((vE,Mh)=>{w();var Ve=Mh.exports={},Ot,Pt;function cf(){throw new Error("setTimeout has not been defined")}function df(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ot=setTimeout:Ot=cf}catch{Ot=cf}try{typeof clearTimeout=="function"?Pt=clearTimeout:Pt=df}catch{Pt=df}})();function wh(t){if(Ot===setTimeout)return setTimeout(t,0);if((Ot===cf||!Ot)&&setTimeout)return Ot=setTimeout,setTimeout(t,0);try{return Ot(t,0)}catch{try{return Ot.call(null,t,0)}catch{return Ot.call(this,t,0)}}}function Qg(t){if(Pt===clearTimeout)return clearTimeout(t);if((Pt===df||!Pt)&&clearTimeout)return Pt=clearTimeout,clearTimeout(t);try{return Pt(t)}catch{try{return Pt.call(null,t)}catch{return Pt.call(this,t)}}}var Gt=[],pi=!1,Dr,vo=-1;function em(){!pi||!Dr||(pi=!1,Dr.length?Gt=Dr.concat(Gt):vo=-1,Gt.length&&_h())}function _h(){if(!pi){var t=wh(em);pi=!0;for(var e=Gt.length;e;){for(Dr=Gt,Gt=[];++vo<e;)Dr&&Dr[vo].run();vo=-1,e=Gt.length}Dr=null,pi=!1,Qg(t)}}Ve.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Gt.push(new xh(t,e)),Gt.length===1&&!pi&&wh(_h)};function xh(t,e){this.fun=t,this.array=e}xh.prototype.run=function(){this.fun.apply(null,this.array)};Ve.title="browser";Ve.browser=!0;Ve.env={};Ve.argv=[];Ve.version="";Ve.versions={};function Vt(){}Ve.on=Vt;Ve.addListener=Vt;Ve.once=Vt;Ve.off=Vt;Ve.removeListener=Vt;Ve.removeAllListeners=Vt;Ve.emit=Vt;Ve.prependListener=Vt;Ve.prependOnceListener=Vt;Ve.listeners=function(t){return[]};Ve.binding=function(t){throw new Error("process.binding is not supported")};Ve.cwd=function(){return"/"};Ve.chdir=function(t){throw new Error("process.chdir is not supported")};Ve.umask=function(){return 0}});var Ah=B(yo=>{"use strict";w();yo.byteLength=rm;yo.toByteArray=nm;yo.fromByteArray=fm;var Dt=[],dt=[],tm=typeof Uint8Array<"u"?Uint8Array:Array,pf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ur=0,Sh=pf.length;Ur<Sh;++Ur)Dt[Ur]=pf[Ur],dt[pf.charCodeAt(Ur)]=Ur;var Ur,Sh;dt[45]=62;dt[95]=63;function Bh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function rm(t){var e=Bh(t),r=e[0],i=e[1];return(r+i)*3/4-i}function im(t,e,r){return(e+r)*3/4-r}function nm(t){var e,r=Bh(t),i=r[0],n=r[1],a=new tm(im(t,i,n)),f=0,y=n>0?i-4:i,b;for(b=0;b<y;b+=4)e=dt[t.charCodeAt(b)]<<18|dt[t.charCodeAt(b+1)]<<12|dt[t.charCodeAt(b+2)]<<6|dt[t.charCodeAt(b+3)],a[f++]=e>>16&255,a[f++]=e>>8&255,a[f++]=e&255;return n===2&&(e=dt[t.charCodeAt(b)]<<2|dt[t.charCodeAt(b+1)]>>4,a[f++]=e&255),n===1&&(e=dt[t.charCodeAt(b)]<<10|dt[t.charCodeAt(b+1)]<<4|dt[t.charCodeAt(b+2)]>>2,a[f++]=e>>8&255,a[f++]=e&255),a}function om(t){return Dt[t>>18&63]+Dt[t>>12&63]+Dt[t>>6&63]+Dt[t&63]}function am(t,e,r){for(var i,n=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),n.push(om(i));return n.join("")}function fm(t){for(var e,r=t.length,i=r%3,n=[],a=16383,f=0,y=r-i;f<y;f+=a)n.push(am(t,f,f+a>y?y:f+a));return i===1?(e=t[r-1],n.push(Dt[e>>2]+Dt[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(Dt[e>>10]+Dt[e>>4&63]+Dt[e<<2&63]+"=")),n.join("")}});var Rh=B(vf=>{w();vf.read=function(t,e,r,i,n){var a,f,y=n*8-i-1,b=(1<<y)-1,S=b>>1,A=-7,q=r?n-1:0,k=r?-1:1,P=t[e+q];for(q+=k,a=P&(1<<-A)-1,P>>=-A,A+=y;A>0;a=a*256+t[e+q],q+=k,A-=8);for(f=a&(1<<-A)-1,a>>=-A,A+=i;A>0;f=f*256+t[e+q],q+=k,A-=8);if(a===0)a=1-S;else{if(a===b)return f?NaN:(P?-1:1)*(1/0);f=f+Math.pow(2,i),a=a-S}return(P?-1:1)*f*Math.pow(2,a-i)};vf.write=function(t,e,r,i,n,a){var f,y,b,S=a*8-n-1,A=(1<<S)-1,q=A>>1,k=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=i?0:a-1,H=i?1:-1,Z=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(y=isNaN(e)?1:0,f=A):(f=Math.floor(Math.log(e)/Math.LN2),e*(b=Math.pow(2,-f))<1&&(f--,b*=2),f+q>=1?e+=k/b:e+=k*Math.pow(2,1-q),e*b>=2&&(f++,b/=2),f+q>=A?(y=0,f=A):f+q>=1?(y=(e*b-1)*Math.pow(2,n),f=f+q):(y=e*Math.pow(2,q-1)*Math.pow(2,n),f=0));n>=8;t[r+P]=y&255,P+=H,y/=256,n-=8);for(f=f<<n|y,S+=n;S>0;t[r+P]=f&255,P+=H,f/=256,S-=8);t[r+P-H]|=Z*128}});var ft=B(mi=>{"use strict";w();var yf=Ah(),yi=Rh(),qh=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;mi.Buffer=I;mi.SlowBuffer=dm;mi.INSPECT_MAX_BYTES=50;var go=2147483647;mi.kMaxLength=go;I.TYPED_ARRAY_SUPPORT=sm();!I.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function sm(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(I.prototype,"parent",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.buffer}});Object.defineProperty(I.prototype,"offset",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.byteOffset}});function $t(t){if(t>go)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,I.prototype),e}function I(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return wf(t)}return Ch(t,e,r)}I.poolSize=8192;function Ch(t,e,r){if(typeof t=="string")return hm(t,e);if(ArrayBuffer.isView(t))return lm(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Ut(t,ArrayBuffer)||t&&Ut(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ut(t,SharedArrayBuffer)||t&&Ut(t.buffer,SharedArrayBuffer)))return mf(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return I.from(i,e,r);let n=cm(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return I.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}I.from=function(t,e,r){return Ch(t,e,r)};Object.setPrototypeOf(I.prototype,Uint8Array.prototype);Object.setPrototypeOf(I,Uint8Array);function Oh(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function um(t,e,r){return Oh(t),t<=0?$t(t):e!==void 0?typeof r=="string"?$t(t).fill(e,r):$t(t).fill(e):$t(t)}I.alloc=function(t,e,r){return um(t,e,r)};function wf(t){return Oh(t),$t(t<0?0:_f(t)|0)}I.allocUnsafe=function(t){return wf(t)};I.allocUnsafeSlow=function(t){return wf(t)};function hm(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!I.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Ph(t,e)|0,i=$t(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function gf(t){let e=t.length<0?0:_f(t.length)|0,r=$t(e);for(let i=0;i<e;i+=1)r[i]=t[i]&255;return r}function lm(t){if(Ut(t,Uint8Array)){let e=new Uint8Array(t);return mf(e.buffer,e.byteOffset,e.byteLength)}return gf(t)}function mf(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&r===void 0?i=new Uint8Array(t):r===void 0?i=new Uint8Array(t,e):i=new Uint8Array(t,e,r),Object.setPrototypeOf(i,I.prototype),i}function cm(t){if(I.isBuffer(t)){let e=_f(t.length)|0,r=$t(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||Mf(t.length)?$t(0):gf(t);if(t.type==="Buffer"&&Array.isArray(t.data))return gf(t.data)}function _f(t){if(t>=go)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+go.toString(16)+" bytes");return t|0}function dm(t){return+t!=t&&(t=0),I.alloc(+t)}I.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==I.prototype};I.compare=function(e,r){if(Ut(e,Uint8Array)&&(e=I.from(e,e.offset,e.byteLength)),Ut(r,Uint8Array)&&(r=I.from(r,r.offset,r.byteLength)),!I.isBuffer(e)||!I.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let i=e.length,n=r.length;for(let a=0,f=Math.min(i,n);a<f;++a)if(e[a]!==r[a]){i=e[a],n=r[a];break}return i<n?-1:n<i?1:0};I.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};I.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return I.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;let n=I.allocUnsafe(r),a=0;for(i=0;i<e.length;++i){let f=e[i];if(Ut(f,Uint8Array))a+f.length>n.length?(I.isBuffer(f)||(f=I.from(f)),f.copy(n,a)):Uint8Array.prototype.set.call(n,f,a);else if(I.isBuffer(f))f.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=f.length}return n};function Ph(t,e){if(I.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ut(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return bf(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Wh(t).length;default:if(n)return i?-1:bf(t).length;e=(""+e).toLowerCase(),n=!0}}I.byteLength=Ph;function pm(t,e,r){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return Em(this,e,r);case"utf8":case"utf-8":return Uh(this,e,r);case"ascii":return xm(this,e,r);case"latin1":case"binary":return Mm(this,e,r);case"base64":return wm(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sm(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}I.prototype._isBuffer=!0;function Nr(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}I.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)Nr(this,r,r+1);return this};I.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)Nr(this,r,r+3),Nr(this,r+1,r+2);return this};I.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)Nr(this,r,r+7),Nr(this,r+1,r+6),Nr(this,r+2,r+5),Nr(this,r+3,r+4);return this};I.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Uh(this,0,e):pm.apply(this,arguments)};I.prototype.toLocaleString=I.prototype.toString;I.prototype.equals=function(e){if(!I.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:I.compare(this,e)===0};I.prototype.inspect=function(){let e="",r=mi.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};qh&&(I.prototype[qh]=I.prototype.inspect);I.prototype.compare=function(e,r,i,n,a){if(Ut(e,Uint8Array)&&(e=I.from(e,e.offset,e.byteLength)),!I.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),r<0||i>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===e)return 0;let f=a-n,y=i-r,b=Math.min(f,y),S=this.slice(n,a),A=e.slice(r,i);for(let q=0;q<b;++q)if(S[q]!==A[q]){f=S[q],y=A[q];break}return f<y?-1:y<f?1:0};function Dh(t,e,r,i,n){if(t.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Mf(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=I.from(e,i)),I.isBuffer(e))return e.length===0?-1:Th(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Th(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Th(t,e,r,i,n){let a=1,f=t.length,y=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,f/=2,y/=2,r/=2}function b(A,q){return a===1?A[q]:A.readUInt16BE(q*a)}let S;if(n){let A=-1;for(S=r;S<f;S++)if(b(t,S)===b(e,A===-1?0:S-A)){if(A===-1&&(A=S),S-A+1===y)return A*a}else A!==-1&&(S-=S-A),A=-1}else for(r+y>f&&(r=f-y),S=r;S>=0;S--){let A=!0;for(let q=0;q<y;q++)if(b(t,S+q)!==b(e,q)){A=!1;break}if(A)return S}return-1}I.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};I.prototype.indexOf=function(e,r,i){return Dh(this,e,r,i,!0)};I.prototype.lastIndexOf=function(e,r,i){return Dh(this,e,r,i,!1)};function vm(t,e,r,i){r=Number(r)||0;let n=t.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let a=e.length;i>a/2&&(i=a/2);let f;for(f=0;f<i;++f){let y=parseInt(e.substr(f*2,2),16);if(Mf(y))return f;t[r+f]=y}return f}function ym(t,e,r,i){return mo(bf(e,t.length-r),t,r,i)}function gm(t,e,r,i){return mo(qm(e),t,r,i)}function mm(t,e,r,i){return mo(Wh(e),t,r,i)}function bm(t,e,r,i){return mo(Tm(e,t.length-r),t,r,i)}I.prototype.write=function(e,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((i===void 0||i>a)&&(i=a),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return vm(this,e,r,i);case"utf8":case"utf-8":return ym(this,e,r,i);case"ascii":case"latin1":case"binary":return gm(this,e,r,i);case"base64":return mm(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bm(this,e,r,i);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}};I.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wm(t,e,r){return e===0&&r===t.length?yf.fromByteArray(t):yf.fromByteArray(t.slice(e,r))}function Uh(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let a=t[n],f=null,y=a>239?4:a>223?3:a>191?2:1;if(n+y<=r){let b,S,A,q;switch(y){case 1:a<128&&(f=a);break;case 2:b=t[n+1],(b&192)===128&&(q=(a&31)<<6|b&63,q>127&&(f=q));break;case 3:b=t[n+1],S=t[n+2],(b&192)===128&&(S&192)===128&&(q=(a&15)<<12|(b&63)<<6|S&63,q>2047&&(q<55296||q>57343)&&(f=q));break;case 4:b=t[n+1],S=t[n+2],A=t[n+3],(b&192)===128&&(S&192)===128&&(A&192)===128&&(q=(a&15)<<18|(b&63)<<12|(S&63)<<6|A&63,q>65535&&q<1114112&&(f=q))}}f===null?(f=65533,y=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|f&1023),i.push(f),n+=y}return _m(i)}var Ih=4096;function _m(t){let e=t.length;if(e<=Ih)return String.fromCharCode.apply(String,t);let r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=Ih));return r}function xm(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]&127);return i}function Mm(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function Em(t,e,r){let i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);let n="";for(let a=e;a<r;++a)n+=Im[t[a]];return n}function Sm(t,e,r){let i=t.slice(e,r),n="";for(let a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+i[a+1]*256);return n}I.prototype.slice=function(e,r){let i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);let n=this.subarray(e,r);return Object.setPrototypeOf(n,I.prototype),n};function Xe(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}I.prototype.readUintLE=I.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return n};I.prototype.readUintBE=I.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=this[e+--r],a=1;for(;r>0&&(a*=256);)n+=this[e+--r]*a;return n};I.prototype.readUint8=I.prototype.readUInt8=function(e,r){return e=e>>>0,r||Xe(e,1,this.length),this[e]};I.prototype.readUint16LE=I.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Xe(e,2,this.length),this[e]|this[e+1]<<8};I.prototype.readUint16BE=I.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Xe(e,2,this.length),this[e]<<8|this[e+1]};I.prototype.readUint32LE=I.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};I.prototype.readUint32BE=I.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};I.prototype.readBigUInt64LE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))});I.prototype.readBigUInt64BE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],a=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(a)});I.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*r)),n};I.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Xe(e,r,this.length);let n=r,a=1,f=this[e+--n];for(;n>0&&(a*=256);)f+=this[e+--n]*a;return a*=128,f>=a&&(f-=Math.pow(2,8*r)),f};I.prototype.readInt8=function(e,r){return e=e>>>0,r||Xe(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};I.prototype.readInt16LE=function(e,r){e=e>>>0,r||Xe(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};I.prototype.readInt16BE=function(e,r){e=e>>>0,r||Xe(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};I.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};I.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};I.prototype.readBigInt64LE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});I.prototype.readBigInt64BE=fr(function(e){e=e>>>0,gi(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&gn(e,this.length-8);let n=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)});I.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),yi.read(this,e,!0,23,4)};I.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Xe(e,4,this.length),yi.read(this,e,!1,23,4)};I.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Xe(e,8,this.length),yi.read(this,e,!0,52,8)};I.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Xe(e,8,this.length),yi.read(this,e,!1,52,8)};function ut(t,e,r,i,n,a){if(!I.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<a)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}I.prototype.writeUintLE=I.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let y=Math.pow(2,8*i)-1;ut(this,e,r,i,y,0)}let a=1,f=0;for(this[r]=e&255;++f<i&&(a*=256);)this[r+f]=e/a&255;return r+i};I.prototype.writeUintBE=I.prototype.writeUIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let y=Math.pow(2,8*i)-1;ut(this,e,r,i,y,0)}let a=i-1,f=1;for(this[r+a]=e&255;--a>=0&&(f*=256);)this[r+a]=e/f&255;return r+i};I.prototype.writeUint8=I.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,1,255,0),this[r]=e&255,r+1};I.prototype.writeUint16LE=I.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};I.prototype.writeUint16BE=I.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};I.prototype.writeUint32LE=I.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};I.prototype.writeUint32BE=I.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Nh(t,e,r,i,n){Kh(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,r}function Lh(t,e,r,i,n){Kh(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a=a>>8,t[r+6]=a,a=a>>8,t[r+5]=a,a=a>>8,t[r+4]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f=f>>8,t[r+2]=f,f=f>>8,t[r+1]=f,f=f>>8,t[r]=f,r+8}I.prototype.writeBigUInt64LE=fr(function(e,r=0){return Nh(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeBigUInt64BE=fr(function(e,r=0){return Lh(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let b=Math.pow(2,8*i-1);ut(this,e,r,i,b-1,-b)}let a=0,f=1,y=0;for(this[r]=e&255;++a<i&&(f*=256);)e<0&&y===0&&this[r+a-1]!==0&&(y=1),this[r+a]=(e/f>>0)-y&255;return r+i};I.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let b=Math.pow(2,8*i-1);ut(this,e,r,i,b-1,-b)}let a=i-1,f=1,y=0;for(this[r+a]=e&255;--a>=0&&(f*=256);)e<0&&y===0&&this[r+a+1]!==0&&(y=1),this[r+a]=(e/f>>0)-y&255;return r+i};I.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};I.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};I.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};I.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};I.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||ut(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};I.prototype.writeBigInt64LE=fr(function(e,r=0){return Nh(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});I.prototype.writeBigInt64BE=fr(function(e,r=0){return Lh(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Fh(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function jh(t,e,r,i,n){return e=+e,r=r>>>0,n||Fh(t,e,r,4,34028234663852886e22,-34028234663852886e22),yi.write(t,e,r,i,23,4),r+4}I.prototype.writeFloatLE=function(e,r,i){return jh(this,e,r,!0,i)};I.prototype.writeFloatBE=function(e,r,i){return jh(this,e,r,!1,i)};function Hh(t,e,r,i,n){return e=+e,r=r>>>0,n||Fh(t,e,r,8,17976931348623157e292,-17976931348623157e292),yi.write(t,e,r,i,52,8),r+8}I.prototype.writeDoubleLE=function(e,r,i){return Hh(this,e,r,!0,i)};I.prototype.writeDoubleBE=function(e,r,i){return Hh(this,e,r,!1,i)};I.prototype.copy=function(e,r,i,n){if(!I.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);let a=n-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),r),a};I.prototype.fill=function(e,r,i,n){if(typeof e=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!I.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){let f=e.charCodeAt(0);(n==="utf8"&&f<128||n==="latin1")&&(e=f)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let a;if(typeof e=="number")for(a=r;a<i;++a)this[a]=e;else{let f=I.isBuffer(e)?e:I.from(e,n),y=f.length;if(y===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<i-r;++a)this[a+r]=f[a%y]}return this};var vi={};function xf(t,e,r){vi[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}xf("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);xf("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);xf("ERR_OUT_OF_RANGE",function(t,e,r){let i=`The value of "${t}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=kh(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=kh(n)),n+="n"),i+=` It must be ${e}. Received ${n}`,i},RangeError);function kh(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Bm(t,e,r){gi(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&gn(e,t.length-(r+1))}function Kh(t,e,r,i,n,a){if(t>r||t<e){let f=typeof e=="bigint"?"n":"",y;throw a>3?e===0||e===BigInt(0)?y=`>= 0${f} and < 2${f} ** ${(a+1)*8}${f}`:y=`>= -(2${f} ** ${(a+1)*8-1}${f}) and < 2 ** ${(a+1)*8-1}${f}`:y=`>= ${e}${f} and <= ${r}${f}`,new vi.ERR_OUT_OF_RANGE("value",y,t)}Bm(i,n,a)}function gi(t,e){if(typeof t!="number")throw new vi.ERR_INVALID_ARG_TYPE(e,"number",t)}function gn(t,e,r){throw Math.floor(t)!==t?(gi(t,r),new vi.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new vi.ERR_BUFFER_OUT_OF_BOUNDS:new vi.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var Am=/[^+/0-9A-Za-z-_]/g;function Rm(t){if(t=t.split("=")[0],t=t.trim().replace(Am,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function bf(t,e){e=e||1/0;let r,i=t.length,n=null,a=[];for(let f=0;f<i;++f){if(r=t.charCodeAt(f),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(f+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function qm(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Tm(t,e){let r,i,n,a=[];for(let f=0;f<t.length&&!((e-=2)<0);++f)r=t.charCodeAt(f),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function Wh(t){return yf.toByteArray(Rm(t))}function mo(t,e,r,i){let n;for(n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Ut(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Mf(t){return t!==t}var Im=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e})();function fr(t){return typeof BigInt>"u"?km:t}function km(){throw new Error("BigInt not supported")}});var E,R,w=Xg(()=>{E=bh(Eh()),R=bh(ft())});var Vh=B((SE,Gh)=>{w();Gh.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.BN});var zh=B((AE,$h)=>{w();$h.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Random});var Yh=B((qE,Zh)=>{w();Zh.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Hash});var Te=B((Ef,Jh)=>{w();var bo=ft(),Nt=bo.Buffer;function Xh(t,e){for(var r in t)e[r]=t[r]}Nt.from&&Nt.alloc&&Nt.allocUnsafe&&Nt.allocUnsafeSlow?Jh.exports=bo:(Xh(bo,Ef),Ef.Buffer=Lr);function Lr(t,e,r){return Nt(t,e,r)}Lr.prototype=Object.create(Nt.prototype);Xh(Nt,Lr);Lr.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Nt(t,e,r)};Lr.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Nt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Lr.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Nt(t)};Lr.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return bo.SlowBuffer(t)}});var Fr=B((kE,Bf)=>{"use strict";w();var Sf=65536,Cm=4294967295;function Om(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var Pm=Te().Buffer,wo=globalThis.crypto||globalThis.msCrypto;wo&&wo.getRandomValues?Bf.exports=Dm:Bf.exports=Om;function Dm(t,e){if(t>Cm)throw new RangeError("requested too many random bytes");var r=Pm.allocUnsafe(t);if(t>0)if(t>Sf)for(var i=0;i<t;i+=Sf)wo.getRandomValues(r.slice(i,i+Sf));else wo.getRandomValues(r);return typeof e=="function"?E.default.nextTick(function(){e(null,r)}):r}});var X=B((OE,Af)=>{w();typeof Object.create=="function"?Af.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Af.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var wi=B((DE,Rf)=>{"use strict";w();var bi=typeof Reflect=="object"?Reflect:null,Qh=bi&&typeof bi.apply=="function"?bi.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},_o;bi&&typeof bi.ownKeys=="function"?_o=bi.ownKeys:Object.getOwnPropertySymbols?_o=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:_o=function(e){return Object.getOwnPropertyNames(e)};function Um(t){console&&console.warn&&console.warn(t)}var tl=Number.isNaN||function(e){return e!==e};function Le(){Le.init.call(this)}Rf.exports=Le;Rf.exports.once=jm;Le.EventEmitter=Le;Le.prototype._events=void 0;Le.prototype._eventsCount=0;Le.prototype._maxListeners=void 0;var el=10;function xo(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Le,"defaultMaxListeners",{enumerable:!0,get:function(){return el},set:function(t){if(typeof t!="number"||t<0||tl(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");el=t}});Le.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Le.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||tl(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function rl(t){return t._maxListeners===void 0?Le.defaultMaxListeners:t._maxListeners}Le.prototype.getMaxListeners=function(){return rl(this)};Le.prototype.emit=function(e){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=e==="error",a=this._events;if(a!==void 0)n=n&&a.error===void 0;else if(!n)return!1;if(n){var f;if(r.length>0&&(f=r[0]),f instanceof Error)throw f;var y=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw y.context=f,y}var b=a[e];if(b===void 0)return!1;if(typeof b=="function")Qh(b,this,r);else for(var S=b.length,A=fl(b,S),i=0;i<S;++i)Qh(A[i],this,r);return!0};function il(t,e,r,i){var n,a,f;if(xo(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),f=a[e]),f===void 0)f=a[e]=r,++t._eventsCount;else if(typeof f=="function"?f=a[e]=i?[r,f]:[f,r]:i?f.unshift(r):f.push(r),n=rl(t),n>0&&f.length>n&&!f.warned){f.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=t,y.type=e,y.count=f.length,Um(y)}return t}Le.prototype.addListener=function(e,r){return il(this,e,r,!1)};Le.prototype.on=Le.prototype.addListener;Le.prototype.prependListener=function(e,r){return il(this,e,r,!0)};function Nm(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function nl(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=Nm.bind(i);return n.listener=r,i.wrapFn=n,n}Le.prototype.once=function(e,r){return xo(r),this.on(e,nl(this,e,r)),this};Le.prototype.prependOnceListener=function(e,r){return xo(r),this.prependListener(e,nl(this,e,r)),this};Le.prototype.removeListener=function(e,r){var i,n,a,f,y;if(xo(r),n=this._events,n===void 0)return this;if(i=n[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(a=-1,f=i.length-1;f>=0;f--)if(i[f]===r||i[f].listener===r){y=i[f].listener,a=f;break}if(a<0)return this;a===0?i.shift():Lm(i,a),i.length===1&&(n[e]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",e,y||r)}return this};Le.prototype.off=Le.prototype.removeListener;Le.prototype.removeAllListeners=function(e){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var a=Object.keys(i),f;for(n=0;n<a.length;++n)f=a[n],f!=="removeListener"&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(e,r[n]);return this};function ol(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?Fm(n):fl(n,n.length)}Le.prototype.listeners=function(e){return ol(this,e,!0)};Le.prototype.rawListeners=function(e){return ol(this,e,!1)};Le.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):al.call(t,e)};Le.prototype.listenerCount=al;function al(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Le.prototype.eventNames=function(){return this._eventsCount>0?_o(this._events):[]};function fl(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function Lm(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Fm(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function jm(t,e){return new Promise(function(r,i){function n(f){t.removeListener(e,a),i(f)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",n),r([].slice.call(arguments))}sl(t,e,a,{once:!0}),e!=="error"&&Hm(t,n,{once:!0})})}function Hm(t,e,r){typeof t.on=="function"&&sl(t,"error",e,r)}function sl(t,e,r,i){if(typeof t.on=="function")i.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function n(a){i.once&&t.removeEventListener(e,n),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var qf=B((NE,ul)=>{w();ul.exports=wi().EventEmitter});var Tf=B((FE,hl)=>{"use strict";w();hl.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[r]=n;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var y=Object.getOwnPropertyDescriptor(e,r);if(y.value!==n||y.enumerable!==!0)return!1}return!0}});var mn=B((HE,ll)=>{"use strict";w();var Km=Tf();ll.exports=function(){return Km()&&!!Symbol.toStringTag}});var If=B((WE,cl)=>{"use strict";w();cl.exports=Object});var pl=B((VE,dl)=>{"use strict";w();dl.exports=Error});var yl=B((zE,vl)=>{"use strict";w();vl.exports=EvalError});var ml=B((YE,gl)=>{"use strict";w();gl.exports=RangeError});var wl=B((JE,bl)=>{"use strict";w();bl.exports=ReferenceError});var kf=B((eS,_l)=>{"use strict";w();_l.exports=SyntaxError});var jr=B((rS,xl)=>{"use strict";w();xl.exports=TypeError});var El=B((nS,Ml)=>{"use strict";w();Ml.exports=URIError});var Bl=B((aS,Sl)=>{"use strict";w();Sl.exports=Math.abs});var Rl=B((sS,Al)=>{"use strict";w();Al.exports=Math.floor});var Tl=B((hS,ql)=>{"use strict";w();ql.exports=Math.max});var kl=B((cS,Il)=>{"use strict";w();Il.exports=Math.min});var Ol=B((pS,Cl)=>{"use strict";w();Cl.exports=Math.pow});var Dl=B((yS,Pl)=>{"use strict";w();Pl.exports=Math.round});var Nl=B((mS,Ul)=>{"use strict";w();Ul.exports=Number.isNaN||function(e){return e!==e}});var Fl=B((wS,Ll)=>{"use strict";w();var Wm=Nl();Ll.exports=function(e){return Wm(e)||e===0?e:e<0?-1:1}});var Hl=B((xS,jl)=>{"use strict";w();jl.exports=Object.getOwnPropertyDescriptor});var Hr=B((ES,Kl)=>{"use strict";w();var Mo=Hl();if(Mo)try{Mo([],"length")}catch{Mo=null}Kl.exports=Mo});var bn=B((BS,Wl)=>{"use strict";w();var Eo=Object.defineProperty||!1;if(Eo)try{Eo({},"a",{value:1})}catch{Eo=!1}Wl.exports=Eo});var $l=B((RS,Vl)=>{"use strict";w();var Gl=typeof Symbol<"u"&&Symbol,Gm=Tf();Vl.exports=function(){return typeof Gl!="function"||typeof Symbol!="function"||typeof Gl("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Gm()}});var Cf=B((TS,zl)=>{"use strict";w();zl.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Of=B((kS,Zl)=>{"use strict";w();var Vm=If();Zl.exports=Vm.getPrototypeOf||null});var Jl=B((OS,Xl)=>{"use strict";w();var $m="Function.prototype.bind called on incompatible ",zm=Object.prototype.toString,Zm=Math.max,Ym="[object Function]",Yl=function(e,r){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var a=0;a<r.length;a+=1)i[a+e.length]=r[a];return i},Xm=function(e,r){for(var i=[],n=r||0,a=0;n<e.length;n+=1,a+=1)i[a]=e[n];return i},Jm=function(t,e){for(var r="",i=0;i<t.length;i+=1)r+=t[i],i+1<t.length&&(r+=e);return r};Xl.exports=function(e){var r=this;if(typeof r!="function"||zm.apply(r)!==Ym)throw new TypeError($m+r);for(var i=Xm(arguments,1),n,a=function(){if(this instanceof n){var A=r.apply(this,Yl(i,arguments));return Object(A)===A?A:this}return r.apply(e,Yl(i,arguments))},f=Zm(0,r.length-i.length),y=[],b=0;b<f;b++)y[b]="$"+b;if(n=Function("binder","return function ("+Jm(y,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var S=function(){};S.prototype=r.prototype,n.prototype=new S,S.prototype=null}return n}});var _i=B((DS,Ql)=>{"use strict";w();var Qm=Jl();Ql.exports=Function.prototype.bind||Qm});var So=B((NS,e0)=>{"use strict";w();e0.exports=Function.prototype.call});var Bo=B((FS,t0)=>{"use strict";w();t0.exports=Function.prototype.apply});var i0=B((HS,r0)=>{"use strict";w();r0.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Pf=B((WS,n0)=>{"use strict";w();var eb=_i(),tb=Bo(),rb=So(),ib=i0();n0.exports=ib||eb.call(rb,tb)});var Ao=B((VS,o0)=>{"use strict";w();var nb=_i(),ob=jr(),ab=So(),fb=Pf();o0.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new ob("a function is required");return fb(nb,ab,e)}});var l0=B((zS,h0)=>{"use strict";w();var sb=Ao(),a0=Hr(),s0;try{s0=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Df=!!s0&&a0&&a0(Object.prototype,"__proto__"),u0=Object,f0=u0.getPrototypeOf;h0.exports=Df&&typeof Df.get=="function"?sb([Df.get]):typeof f0=="function"?function(e){return f0(e==null?e:u0(e))}:!1});var Ro=B((YS,v0)=>{"use strict";w();var c0=Cf(),d0=Of(),p0=l0();v0.exports=c0?function(e){return c0(e)}:d0?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return d0(e)}:p0?function(e){return p0(e)}:null});var Uf=B((JS,y0)=>{"use strict";w();var ub=Function.prototype.call,hb=Object.prototype.hasOwnProperty,lb=_i();y0.exports=lb.call(ub,hb)});var Ff=B((e5,x0)=>{"use strict";w();var Oe,cb=If(),db=pl(),pb=yl(),vb=ml(),yb=wl(),Si=kf(),Ei=jr(),gb=El(),mb=Bl(),bb=Rl(),wb=Tl(),_b=kl(),xb=Ol(),Mb=Dl(),Eb=Fl(),w0=Function,Nf=function(t){try{return w0('"use strict"; return ('+t+").constructor;")()}catch{}},wn=Hr(),Sb=bn(),Lf=function(){throw new Ei},Bb=wn?(function(){try{return arguments.callee,Lf}catch{try{return wn(arguments,"callee").get}catch{return Lf}}})():Lf,xi=$l()(),Je=Ro(),Ab=Of(),Rb=Cf(),_0=Bo(),_n=So(),Mi={},qb=typeof Uint8Array>"u"||!Je?Oe:Je(Uint8Array),Kr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Oe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Oe:ArrayBuffer,"%ArrayIteratorPrototype%":xi&&Je?Je([][Symbol.iterator]()):Oe,"%AsyncFromSyncIteratorPrototype%":Oe,"%AsyncFunction%":Mi,"%AsyncGenerator%":Mi,"%AsyncGeneratorFunction%":Mi,"%AsyncIteratorPrototype%":Mi,"%Atomics%":typeof Atomics>"u"?Oe:Atomics,"%BigInt%":typeof BigInt>"u"?Oe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Oe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Oe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Oe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":db,"%eval%":eval,"%EvalError%":pb,"%Float16Array%":typeof Float16Array>"u"?Oe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Oe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Oe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Oe:FinalizationRegistry,"%Function%":w0,"%GeneratorFunction%":Mi,"%Int8Array%":typeof Int8Array>"u"?Oe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Oe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Oe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":xi&&Je?Je(Je([][Symbol.iterator]())):Oe,"%JSON%":typeof JSON=="object"?JSON:Oe,"%Map%":typeof Map>"u"?Oe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!xi||!Je?Oe:Je(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":cb,"%Object.getOwnPropertyDescriptor%":wn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Oe:Promise,"%Proxy%":typeof Proxy>"u"?Oe:Proxy,"%RangeError%":vb,"%ReferenceError%":yb,"%Reflect%":typeof Reflect>"u"?Oe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Oe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!xi||!Je?Oe:Je(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Oe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":xi&&Je?Je(""[Symbol.iterator]()):Oe,"%Symbol%":xi?Symbol:Oe,"%SyntaxError%":Si,"%ThrowTypeError%":Bb,"%TypedArray%":qb,"%TypeError%":Ei,"%Uint8Array%":typeof Uint8Array>"u"?Oe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Oe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Oe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Oe:Uint32Array,"%URIError%":gb,"%WeakMap%":typeof WeakMap>"u"?Oe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Oe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Oe:WeakSet,"%Function.prototype.call%":_n,"%Function.prototype.apply%":_0,"%Object.defineProperty%":Sb,"%Object.getPrototypeOf%":Ab,"%Math.abs%":mb,"%Math.floor%":bb,"%Math.max%":wb,"%Math.min%":_b,"%Math.pow%":xb,"%Math.round%":Mb,"%Math.sign%":Eb,"%Reflect.getPrototypeOf%":Rb};if(Je)try{null.error}catch(t){g0=Je(Je(t)),Kr["%Error.prototype%"]=g0}var g0,Tb=function t(e){var r;if(e==="%AsyncFunction%")r=Nf("async function () {}");else if(e==="%GeneratorFunction%")r=Nf("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Nf("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&Je&&(r=Je(n.prototype))}return Kr[e]=r,r},m0={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xn=_i(),qo=Uf(),Ib=xn.call(_n,Array.prototype.concat),kb=xn.call(_0,Array.prototype.splice),b0=xn.call(_n,String.prototype.replace),To=xn.call(_n,String.prototype.slice),Cb=xn.call(_n,RegExp.prototype.exec),Ob=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pb=/\\(\\)?/g,Db=function(e){var r=To(e,0,1),i=To(e,-1);if(r==="%"&&i!=="%")throw new Si("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Si("invalid intrinsic syntax, expected opening `%`");var n=[];return b0(e,Ob,function(a,f,y,b){n[n.length]=y?b0(b,Pb,"$1"):f||a}),n},Ub=function(e,r){var i=e,n;if(qo(m0,i)&&(n=m0[i],i="%"+n[0]+"%"),qo(Kr,i)){var a=Kr[i];if(a===Mi&&(a=Tb(i)),typeof a>"u"&&!r)throw new Ei("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new Si("intrinsic "+e+" does not exist!")};x0.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ei("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ei('"allowMissing" argument must be a boolean');if(Cb(/^%?[^%]*%?$/,e)===null)throw new Si("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Db(e),n=i.length>0?i[0]:"",a=Ub("%"+n+"%",r),f=a.name,y=a.value,b=!1,S=a.alias;S&&(n=S[0],kb(i,Ib([0,1],S)));for(var A=1,q=!0;A<i.length;A+=1){var k=i[A],P=To(k,0,1),H=To(k,-1);if((P==='"'||P==="'"||P==="`"||H==='"'||H==="'"||H==="`")&&P!==H)throw new Si("property names with quotes must have matching quotes");if((k==="constructor"||!q)&&(b=!0),n+="."+k,f="%"+n+"%",qo(Kr,f))y=Kr[f];else if(y!=null){if(!(k in y)){if(!r)throw new Ei("base intrinsic for "+e+" exists, but the property is not available.");return}if(wn&&A+1>=i.length){var Z=wn(y,k);q=!!Z,q&&"get"in Z&&!("originalValue"in Z.get)?y=Z.get:y=y[k]}else q=qo(y,k),y=y[k];q&&!b&&(Kr[f]=y)}}return y}});var Wr=B((r5,S0)=>{"use strict";w();var M0=Ff(),E0=Ao(),Nb=E0([M0("%String.prototype.indexOf%")]);S0.exports=function(e,r){var i=M0(e,!!r);return typeof i=="function"&&Nb(e,".prototype.")>-1?E0([i]):i}});var R0=B((n5,A0)=>{"use strict";w();var Lb=mn()(),Fb=Wr(),jf=Fb("Object.prototype.toString"),Io=function(e){return Lb&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:jf(e)==="[object Arguments]"},B0=function(e){return Io(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&jf(e)!=="[object Array]"&&"callee"in e&&jf(e.callee)==="[object Function]"},jb=(function(){return Io(arguments)})();Io.isLegacyArguments=B0;A0.exports=jb?Io:B0});var O0=B((a5,C0)=>{"use strict";w();var q0=Wr(),Hb=mn()(),Kb=Uf(),Wb=Hr(),Wf;Hb?(T0=q0("RegExp.prototype.exec"),Hf={},ko=function(){throw Hf},Kf={toString:ko,valueOf:ko},typeof Symbol.toPrimitive=="symbol"&&(Kf[Symbol.toPrimitive]=ko),Wf=function(e){if(!e||typeof e!="object")return!1;var r=Wb(e,"lastIndex"),i=r&&Kb(r,"value");if(!i)return!1;try{T0(e,Kf)}catch(n){return n===Hf}}):(I0=q0("Object.prototype.toString"),k0="[object RegExp]",Wf=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:I0(e)===k0});var T0,Hf,ko,Kf,I0,k0;C0.exports=Wf});var D0=B((s5,P0)=>{"use strict";w();var Gb=Wr(),Vb=O0(),$b=Gb("RegExp.prototype.exec"),zb=jr();P0.exports=function(e){if(!Vb(e))throw new zb("`regex` must be a RegExp");return function(i){return $b(e,i)!==null}}});var N0=B((h5,U0)=>{"use strict";w();var Zb=function*(){}.constructor;U0.exports=()=>Zb});var H0=B((c5,j0)=>{"use strict";w();var F0=Wr(),Yb=D0(),Xb=Yb(/^\s*(?:function)?\*/),Jb=mn()(),L0=Ro(),Qb=F0("Object.prototype.toString"),ew=F0("Function.prototype.toString"),tw=N0();j0.exports=function(e){if(typeof e!="function")return!1;if(Xb(ew(e)))return!0;if(!Jb){var r=Qb(e);return r==="[object GeneratorFunction]"}if(!L0)return!1;var i=tw();return i&&L0(e)===i.prototype}});var V0=B((p5,G0)=>{"use strict";w();var W0=Function.prototype.toString,Bi=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Vf,Co;if(typeof Bi=="function"&&typeof Object.defineProperty=="function")try{Vf=Object.defineProperty({},"length",{get:function(){throw Co}}),Co={},Bi(function(){throw 42},null,Vf)}catch(t){t!==Co&&(Bi=null)}else Bi=null;var rw=/^\s*class\b/,$f=function(e){try{var r=W0.call(e);return rw.test(r)}catch{return!1}},Gf=function(e){try{return $f(e)?!1:(W0.call(e),!0)}catch{return!1}},Oo=Object.prototype.toString,iw="[object Object]",nw="[object Function]",ow="[object GeneratorFunction]",aw="[object HTMLAllCollection]",fw="[object HTML document.all class]",sw="[object HTMLCollection]",uw=typeof Symbol=="function"&&!!Symbol.toStringTag,hw=!(0 in[,]),zf=function(){return!1};typeof document=="object"&&(K0=document.all,Oo.call(K0)===Oo.call(document.all)&&(zf=function(e){if((hw||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=Oo.call(e);return(r===aw||r===fw||r===sw||r===iw)&&e("")==null}catch{}return!1}));var K0;G0.exports=Bi?function(e){if(zf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Bi(e,null,Vf)}catch(r){if(r!==Co)return!1}return!$f(e)&&Gf(e)}:function(e){if(zf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(uw)return Gf(e);if($f(e))return!1;var r=Oo.call(e);return r!==nw&&r!==ow&&!/^\[object HTML/.test(r)?!1:Gf(e)}});var Z0=B((y5,z0)=>{"use strict";w();var lw=V0(),cw=Object.prototype.toString,$0=Object.prototype.hasOwnProperty,dw=function(e,r,i){for(var n=0,a=e.length;n<a;n++)$0.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))},pw=function(e,r,i){for(var n=0,a=e.length;n<a;n++)i==null?r(e.charAt(n),n,e):r.call(i,e.charAt(n),n,e)},vw=function(e,r,i){for(var n in e)$0.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))};function yw(t){return cw.call(t)==="[object Array]"}z0.exports=function(e,r,i){if(!lw(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),yw(e)?dw(e,r,n):typeof e=="string"?pw(e,r,n):vw(e,r,n)}});var X0=B((m5,Y0)=>{"use strict";w();Y0.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var Q0=B((w5,J0)=>{"use strict";w();var Zf=X0(),gw=globalThis;J0.exports=function(){for(var e=[],r=0;r<Zf.length;r++)typeof gw[Zf[r]]=="function"&&(e[e.length]=Zf[r]);return e}});var ic=B((x5,rc)=>{"use strict";w();var ec=bn(),mw=kf(),Ai=jr(),tc=Hr();rc.exports=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Ai("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ai("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ai("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ai("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ai("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ai("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,b=!!tc&&tc(e,r);if(ec)ec(e,r,{configurable:f===null&&b?b.configurable:!f,enumerable:n===null&&b?b.enumerable:!n,value:i,writable:a===null&&b?b.writable:!a});else if(y||!n&&!a&&!f)e[r]=i;else throw new mw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var ac=B((E5,oc)=>{"use strict";w();var Yf=bn(),nc=function(){return!!Yf};nc.hasArrayLengthDefineBug=function(){if(!Yf)return null;try{return Yf([],"length",{value:1}).length!==1}catch{return!0}};oc.exports=nc});var lc=B((B5,hc)=>{"use strict";w();var bw=Ff(),fc=ic(),ww=ac()(),sc=Hr(),uc=jr(),_w=bw("%Math.floor%");hc.exports=function(e,r){if(typeof e!="function")throw new uc("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||_w(r)!==r)throw new uc("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in e&&sc){var f=sc(e,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(a=!1)}return(n||a||!i)&&(ww?fc(e,"length",r,!0,!0):fc(e,"length",r)),e}});var dc=B((R5,cc)=>{"use strict";w();var xw=_i(),Mw=Bo(),Ew=Pf();cc.exports=function(){return Ew(xw,Mw,arguments)}});var yc=B((T5,Po)=>{"use strict";w();var Sw=lc(),pc=bn(),Bw=Ao(),vc=dc();Po.exports=function(e){var r=Bw(arguments),i=1+e.length-(arguments.length-1);return Sw(r,i>0?i:0,!0)};pc?pc(Po.exports,"apply",{value:vc}):Po.exports.apply=vc});var es=B((k5,wc)=>{"use strict";w();var No=Z0(),Aw=Q0(),gc=yc(),Jf=Wr(),Uo=Hr(),Do=Ro(),Rw=Jf("Object.prototype.toString"),bc=mn()(),mc=globalThis,Xf=Aw(),Qf=Jf("String.prototype.slice"),qw=Jf("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},Lo={__proto__:null};bc&&Uo&&Do?No(Xf,function(t){var e=new mc[t];if(Symbol.toStringTag in e&&Do){var r=Do(e),i=Uo(r,Symbol.toStringTag);if(!i&&r){var n=Do(r);i=Uo(n,Symbol.toStringTag)}if(i&&i.get){var a=gc(i.get);Lo["$"+t]=a}}}):No(Xf,function(t){var e=new mc[t],r=e.slice||e.set;if(r){var i=gc(r);Lo["$"+t]=i}});var Tw=function(e){var r=!1;return No(Lo,function(i,n){if(!r)try{"$"+i(e)===n&&(r=Qf(n,1))}catch{}}),r},Iw=function(e){var r=!1;return No(Lo,function(i,n){if(!r)try{i(e),r=Qf(n,1)}catch{}}),r};wc.exports=function(e){if(!e||typeof e!="object")return!1;if(!bc){var r=Qf(Rw(e),8,-1);return qw(Xf,r)>-1?r:r!=="Object"?!1:Iw(e)}return Uo?Tw(e):null}});var ts=B((O5,_c)=>{"use strict";w();var kw=es();_c.exports=function(e){return!!kw(e)}});var Pc=B(Pe=>{"use strict";w();var Cw=R0(),Ow=H0(),Et=es(),xc=ts();function Ri(t){return t.call.bind(t)}var Mc=typeof BigInt<"u",Ec=typeof Symbol<"u",pt=Ri(Object.prototype.toString),Pw=Ri(Number.prototype.valueOf),Dw=Ri(String.prototype.valueOf),Uw=Ri(Boolean.prototype.valueOf);Mc&&(Sc=Ri(BigInt.prototype.valueOf));var Sc;Ec&&(Bc=Ri(Symbol.prototype.valueOf));var Bc;function En(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}Pe.isArgumentsObject=Cw;Pe.isGeneratorFunction=Ow;Pe.isTypedArray=xc;function Nw(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}Pe.isPromise=Nw;function Lw(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):xc(t)||Rc(t)}Pe.isArrayBufferView=Lw;function Fw(t){return Et(t)==="Uint8Array"}Pe.isUint8Array=Fw;function jw(t){return Et(t)==="Uint8ClampedArray"}Pe.isUint8ClampedArray=jw;function Hw(t){return Et(t)==="Uint16Array"}Pe.isUint16Array=Hw;function Kw(t){return Et(t)==="Uint32Array"}Pe.isUint32Array=Kw;function Ww(t){return Et(t)==="Int8Array"}Pe.isInt8Array=Ww;function Gw(t){return Et(t)==="Int16Array"}Pe.isInt16Array=Gw;function Vw(t){return Et(t)==="Int32Array"}Pe.isInt32Array=Vw;function $w(t){return Et(t)==="Float32Array"}Pe.isFloat32Array=$w;function zw(t){return Et(t)==="Float64Array"}Pe.isFloat64Array=zw;function Zw(t){return Et(t)==="BigInt64Array"}Pe.isBigInt64Array=Zw;function Yw(t){return Et(t)==="BigUint64Array"}Pe.isBigUint64Array=Yw;function Fo(t){return pt(t)==="[object Map]"}Fo.working=typeof Map<"u"&&Fo(new Map);function Xw(t){return typeof Map>"u"?!1:Fo.working?Fo(t):t instanceof Map}Pe.isMap=Xw;function jo(t){return pt(t)==="[object Set]"}jo.working=typeof Set<"u"&&jo(new Set);function Jw(t){return typeof Set>"u"?!1:jo.working?jo(t):t instanceof Set}Pe.isSet=Jw;function Ho(t){return pt(t)==="[object WeakMap]"}Ho.working=typeof WeakMap<"u"&&Ho(new WeakMap);function Qw(t){return typeof WeakMap>"u"?!1:Ho.working?Ho(t):t instanceof WeakMap}Pe.isWeakMap=Qw;function is(t){return pt(t)==="[object WeakSet]"}is.working=typeof WeakSet<"u"&&is(new WeakSet);function e2(t){return is(t)}Pe.isWeakSet=e2;function Ko(t){return pt(t)==="[object ArrayBuffer]"}Ko.working=typeof ArrayBuffer<"u"&&Ko(new ArrayBuffer);function Ac(t){return typeof ArrayBuffer>"u"?!1:Ko.working?Ko(t):t instanceof ArrayBuffer}Pe.isArrayBuffer=Ac;function Wo(t){return pt(t)==="[object DataView]"}Wo.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Wo(new DataView(new ArrayBuffer(1),0,1));function Rc(t){return typeof DataView>"u"?!1:Wo.working?Wo(t):t instanceof DataView}Pe.isDataView=Rc;var rs=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Mn(t){return pt(t)==="[object SharedArrayBuffer]"}function qc(t){return typeof rs>"u"?!1:(typeof Mn.working>"u"&&(Mn.working=Mn(new rs)),Mn.working?Mn(t):t instanceof rs)}Pe.isSharedArrayBuffer=qc;function t2(t){return pt(t)==="[object AsyncFunction]"}Pe.isAsyncFunction=t2;function r2(t){return pt(t)==="[object Map Iterator]"}Pe.isMapIterator=r2;function i2(t){return pt(t)==="[object Set Iterator]"}Pe.isSetIterator=i2;function n2(t){return pt(t)==="[object Generator]"}Pe.isGeneratorObject=n2;function o2(t){return pt(t)==="[object WebAssembly.Module]"}Pe.isWebAssemblyCompiledModule=o2;function Tc(t){return En(t,Pw)}Pe.isNumberObject=Tc;function Ic(t){return En(t,Dw)}Pe.isStringObject=Ic;function kc(t){return En(t,Uw)}Pe.isBooleanObject=kc;function Cc(t){return Mc&&En(t,Sc)}Pe.isBigIntObject=Cc;function Oc(t){return Ec&&En(t,Bc)}Pe.isSymbolObject=Oc;function a2(t){return Tc(t)||Ic(t)||kc(t)||Cc(t)||Oc(t)}Pe.isBoxedPrimitive=a2;function f2(t){return typeof Uint8Array<"u"&&(Ac(t)||qc(t))}Pe.isAnyArrayBuffer=f2;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Pe,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Uc=B((N5,Dc)=>{w();Dc.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var An=B(De=>{w();var Nc=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(e,r[n]);return i},s2=/%[sdj%]/g;De.format=function(t){if(!Xo(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(sr(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,n=i.length,a=String(t).replace(s2,function(y){if(y==="%%")return"%";if(r>=n)return y;switch(y){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch{return"[Circular]"}default:return y}}),f=i[r];r<n;f=i[++r])Yo(f)||!qi(f)?a+=" "+f:a+=" "+sr(f);return a};De.deprecate=function(t,e){if(typeof E.default<"u"&&E.default.noDeprecation===!0)return t;if(typeof E.default>"u")return function(){return De.deprecate(t,e).apply(this,arguments)};var r=!1;function i(){if(!r){if(E.default.throwDeprecation)throw new Error(e);E.default.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return i};var Go={},Lc=/^$/;E.default.env.NODE_DEBUG&&(Vo=E.default.env.NODE_DEBUG,Vo=Vo.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Lc=new RegExp("^"+Vo+"$","i"));var Vo;De.debuglog=function(t){if(t=t.toUpperCase(),!Go[t])if(Lc.test(t)){var e=E.default.pid;Go[t]=function(){var r=De.format.apply(De,arguments);console.error("%s %d: %s",t,e,r)}}else Go[t]=function(){};return Go[t]};function sr(t,e){var r={seen:[],stylize:h2};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),fs(e)?r.showHidden=e:e&&De._extend(r,e),Vr(r.showHidden)&&(r.showHidden=!1),Vr(r.depth)&&(r.depth=2),Vr(r.colors)&&(r.colors=!1),Vr(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u2),zo(r,t,r.depth)}De.inspect=sr;sr.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};sr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u2(t,e){var r=sr.styles[e];return r?"\x1B["+sr.colors[r][0]+"m"+t+"\x1B["+sr.colors[r][1]+"m":t}function h2(t,e){return t}function l2(t){var e={};return t.forEach(function(r,i){e[r]=!0}),e}function zo(t,e,r){if(t.customInspect&&e&&$o(e.inspect)&&e.inspect!==De.inspect&&!(e.constructor&&e.constructor.prototype===e)){var i=e.inspect(r,t);return Xo(i)||(i=zo(t,i,r)),i}var n=c2(t,e);if(n)return n;var a=Object.keys(e),f=l2(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),Bn(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return ns(e);if(a.length===0){if($o(e)){var y=e.name?": "+e.name:"";return t.stylize("[Function"+y+"]","special")}if(Sn(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Zo(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Bn(e))return ns(e)}var b="",S=!1,A=["{","}"];if(Fc(e)&&(S=!0,A=["[","]"]),$o(e)){var q=e.name?": "+e.name:"";b=" [Function"+q+"]"}if(Sn(e)&&(b=" "+RegExp.prototype.toString.call(e)),Zo(e)&&(b=" "+Date.prototype.toUTCString.call(e)),Bn(e)&&(b=" "+ns(e)),a.length===0&&(!S||e.length==0))return A[0]+b+A[1];if(r<0)return Sn(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var k;return S?k=d2(t,e,r,f,a):k=a.map(function(P){return as(t,e,r,f,P,S)}),t.seen.pop(),p2(k,b,A)}function c2(t,e){if(Vr(e))return t.stylize("undefined","undefined");if(Xo(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(jc(e))return t.stylize(""+e,"number");if(fs(e))return t.stylize(""+e,"boolean");if(Yo(e))return t.stylize("null","null")}function ns(t){return"["+Error.prototype.toString.call(t)+"]"}function d2(t,e,r,i,n){for(var a=[],f=0,y=e.length;f<y;++f)Hc(e,String(f))?a.push(as(t,e,r,i,String(f),!0)):a.push("");return n.forEach(function(b){b.match(/^\d+$/)||a.push(as(t,e,r,i,b,!0))}),a}function as(t,e,r,i,n,a){var f,y,b;if(b=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]},b.get?b.set?y=t.stylize("[Getter/Setter]","special"):y=t.stylize("[Getter]","special"):b.set&&(y=t.stylize("[Setter]","special")),Hc(i,n)||(f="["+n+"]"),y||(t.seen.indexOf(b.value)<0?(Yo(r)?y=zo(t,b.value,null):y=zo(t,b.value,r-1),y.indexOf(`
|
|
3
|
+
`)>-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")),Vr(f)){if(a&&n.match(/^\d+$/))return y;f=JSON.stringify(""+n),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.slice(1,-1),f=t.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=t.stylize(f,"string"))}return f+": "+y}function p2(t,e,r){var i=0,n=t.reduce(function(a,f){return i++,f.indexOf(`
|
|
9
|
+
`)>=0&&i++,a+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(e===""?"":e+`
|
|
10
10
|
`)+" "+t.join(`,
|
|
11
|
-
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}De.types=Id();function Pd(t){return Array.isArray(t)}De.isArray=Pd;function Ys(t){return typeof t=="boolean"}De.isBoolean=Ys;function ko(t){return t===null}De.isNull=ko;function ax(t){return t==null}De.isNullOrUndefined=ax;function Dd(t){return typeof t=="number"}De.isNumber=Dd;function To(t){return typeof t=="string"}De.isString=To;function ox(t){return typeof t=="symbol"}De.isSymbol=ox;function vi(t){return t===void 0}De.isUndefined=vi;function ra(t){return Qi(t)&&Xs(t)==="[object RegExp]"}De.isRegExp=ra;De.types.isRegExp=ra;function Qi(t){return typeof t=="object"&&t!==null}De.isObject=Qi;function Io(t){return Qi(t)&&Xs(t)==="[object Date]"}De.isDate=Io;De.types.isDate=Io;function ia(t){return Qi(t)&&(Xs(t)==="[object Error]"||t instanceof Error)}De.isError=ia;De.types.isNativeError=ia;function Ro(t){return typeof t=="function"}De.isFunction=Ro;function fx(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}De.isPrimitive=fx;De.isBuffer=Td();function Xs(t){return Object.prototype.toString.call(t)}function $s(t){return t<10?"0"+t.toString(10):t.toString(10)}var sx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ux(){var t=new Date,e=[$s(t.getHours()),$s(t.getMinutes()),$s(t.getSeconds())].join(":");return[t.getDate(),sx[t.getMonth()],e].join(" ")}De.log=function(){console.log("%s - %s",ux(),De.format.apply(De,arguments))};De.inherits=J();De._extend=function(t,e){if(!e||!Qi(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};function Ud(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var pi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;De.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(pi&&e[pi]){var r=e[pi];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,pi,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(m,E){n=m,i=E}),f=[],v=0;v<arguments.length;v++)f.push(arguments[v]);f.push(function(m,E){m?i(m):n(E)});try{e.apply(this,f)}catch(m){i(m)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),pi&&Object.defineProperty(r,pi,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,Cd(e))};De.promisify.custom=pi;function hx(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function lx(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!="function")throw new TypeError("The last argument must be of type Function");var a=this,f=function(){return i.apply(a,arguments)};t.apply(this,r).then(function(v){S.default.nextTick(f.bind(null,null,v))},function(v){S.default.nextTick(hx.bind(null,v,f))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,Cd(t)),e}De.callbackify=lx});var Kd=R((t9,Hd)=>{"use strict";w();function Nd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ld(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nd(Object(r),!0).forEach(function(n){cx(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function cx(t,e,r){return e=jd(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jd(n.key),n)}}function px(t,e,r){return e&&Fd(t.prototype,e),r&&Fd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function jd(t){var e=vx(t,"string");return typeof e=="symbol"?e:String(e)}function vx(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yx=ft(),Co=yx.Buffer,gx=na(),Js=gx.inspect,mx=Js&&Js.custom||"inspect";function bx(t,e,r){Co.prototype.copy.call(t,e,r)}Hd.exports=(function(){function t(){dx(this,t),this.head=null,this.tail=null,this.length=0}return px(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++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 n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return Co.alloc(0);for(var n=Co.allocUnsafe(r>>>0),i=this.head,a=0;i;)bx(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var f=n.data,v=r>f.length?f.length:r;if(v===f.length?a+=f:a+=f.slice(0,r),r-=v,r===0){v===f.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=f.slice(v));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=Co.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var f=i.data,v=r>f.length?f.length:r;if(f.copy(n,n.length-r,0,v),r-=v,r===0){v===f.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(v));break}++a}return this.length-=a,n}},{key:mx,value:function(r,n){return Js(this,Ld(Ld({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var eu=R((i9,zd)=>{"use strict";w();function wx(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,S.default.nextTick(Qs,this,t)):S.default.nextTick(Qs,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?S.default.nextTick(Oo,r):(r._writableState.errorEmitted=!0,S.default.nextTick(Wd,r,a)):S.default.nextTick(Wd,r,a):e?(S.default.nextTick(Oo,r),e(a)):S.default.nextTick(Oo,r)}),this)}function Wd(t,e){Qs(t,e),Oo(t)}function Oo(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function _x(){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 Qs(t,e){t.emit("error",e)}function xx(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}zd.exports={destroy:wx,undestroy:_x,errorOrDestroy:xx}});var yi=R((a9,$d)=>{"use strict";w();function Mx(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Vd={};function xt(t,e,r){r||(r=Error);function n(a,f,v){return typeof e=="string"?e:e(a,f,v)}var i=(function(a){Mx(f,a);function f(v,m,E){return a.call(this,n(v,m,E))||this}return f})(r);i.prototype.name=r.name,i.prototype.code=t,Vd[t]=i}function Gd(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),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 Ex(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Sx(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Bx(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}xt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);xt("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&Ex(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(Sx(t," argument"))i="The ".concat(t," ").concat(n," ").concat(Gd(e,"type"));else{var a=Bx(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(a," ").concat(n," ").concat(Gd(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);xt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");xt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});xt("ERR_STREAM_PREMATURE_CLOSE","Premature close");xt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});xt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");xt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");xt("ERR_STREAM_WRITE_AFTER_END","write after end");xt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);xt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);xt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");$d.exports.codes=Vd});var tu=R((f9,Zd)=>{"use strict";w();var Ax=yi().codes.ERR_INVALID_OPT_VALUE;function Rx(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function qx(t,e,r,n){var i=Rx(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new Ax(a,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Zd.exports={getHighWaterMark:qx}});var iu=R((u9,Yd)=>{w();Yd.exports=Ix;function Ix(t,e){if(ru("noDeprecation"))return t;var r=!1;function n(){if(!r){if(ru("throwDeprecation"))throw new Error(e);ru("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function ru(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var ou=R((l9,rp)=>{"use strict";w();rp.exports=$e;function Jd(t){var e=this;this.next=null,this.entry=null,this.finish=function(){i6(e,t)}}var en;$e.WritableState=oa;var kx={deprecate:iu()},Qd=ms(),Do=ft().Buffer,Tx=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Cx(t){return Do.from(t)}function Ox(t){return Do.isBuffer(t)||t instanceof Tx}var au=eu(),Px=tu(),Dx=Px.getHighWaterMark,Tr=yi().codes,Ux=Tr.ERR_INVALID_ARG_TYPE,Nx=Tr.ERR_METHOD_NOT_IMPLEMENTED,Lx=Tr.ERR_MULTIPLE_CALLBACK,Fx=Tr.ERR_STREAM_CANNOT_PIPE,jx=Tr.ERR_STREAM_DESTROYED,Hx=Tr.ERR_STREAM_NULL_VALUES,Kx=Tr.ERR_STREAM_WRITE_AFTER_END,Wx=Tr.ERR_UNKNOWN_ENCODING,tn=au.errorOrDestroy;J()($e,Qd);function zx(){}function oa(t,e,r){en=en||gi(),t=t||{},typeof r!="boolean"&&(r=e instanceof en),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Dx(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Jx(e,i)},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 Jd(this)}oa.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(oa.prototype,"buffer",{get:kx.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Po;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Po=Function.prototype[Symbol.hasInstance],Object.defineProperty($e,Symbol.hasInstance,{value:function(e){return Po.call(this,e)?!0:this!==$e?!1:e&&e._writableState instanceof oa}})):Po=function(e){return e instanceof this};function $e(t){en=en||gi();var e=this instanceof en;if(!e&&!Po.call($e,this))return new $e(t);this._writableState=new oa(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)),Qd.call(this)}$e.prototype.pipe=function(){tn(this,new Fx)};function Gx(t,e){var r=new Kx;tn(t,r),S.default.nextTick(e,r)}function Vx(t,e,r,n){var i;return r===null?i=new Hx:typeof r!="string"&&!e.objectMode&&(i=new Ux("chunk",["string","Buffer"],r)),i?(tn(t,i),S.default.nextTick(n,i),!1):!0}$e.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&Ox(t);return a&&!Do.isBuffer(t)&&(t=Cx(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=zx),n.ending?Gx(this,r):(a||Vx(this,n,t,r))&&(n.pendingcb++,i=Zx(this,n,a,t,e,r)),i};$e.prototype.cork=function(){this._writableState.corked++};$e.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&ep(this,t))};$e.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Wx(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty($e.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function $x(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Do.from(e,r)),e}Object.defineProperty($e.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Zx(t,e,r,n,i,a){if(!r){var f=$x(e,n,i);n!==f&&(r=!0,i="buffer",n=f)}var v=e.objectMode?1:n.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else nu(t,e,!1,v,n,i,a);return m}function nu(t,e,r,n,i,a,f){e.writelen=n,e.writecb=f,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new jx("write")):r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function Yx(t,e,r,n,i){--e.pendingcb,r?(S.default.nextTick(i,n),S.default.nextTick(aa,t,e),t._writableState.errorEmitted=!0,tn(t,n)):(i(n),t._writableState.errorEmitted=!0,tn(t,n),aa(t,e))}function Xx(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function Jx(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new Lx;if(Xx(r),e)Yx(t,r,n,e,i);else{var a=tp(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&ep(t,r),n?S.default.nextTick(Xd,t,r,a,i):Xd(t,r,a,i)}}function Xd(t,e,r,n){r||Qx(t,e),e.pendingcb--,n(),aa(t,e)}function Qx(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function ep(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)i[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;i.allBuffers=v,nu(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new Jd(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(nu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}$e.prototype._write=function(t,e,r){r(new Nx("_write()"))};$e.prototype._writev=null;$e.prototype.end=function(t,e,r){var n=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),n.corked&&(n.corked=1,this.uncork()),n.ending||r6(this,n,r),this};Object.defineProperty($e.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tp(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function e6(t,e){t._final(function(r){e.pendingcb--,r&&tn(t,r),e.prefinished=!0,t.emit("prefinish"),aa(t,e)})}function t6(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,S.default.nextTick(e6,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function aa(t,e){var r=tp(e);if(r&&(t6(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function r6(t,e,r){e.ending=!0,aa(t,e),r&&(e.finished?S.default.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function i6(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty($e.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});$e.prototype.destroy=au.destroy;$e.prototype._undestroy=au.undestroy;$e.prototype._destroy=function(t,e){e(t)}});var gi=R((d9,np)=>{"use strict";w();var n6=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};np.exports=Yt;var ip=uu(),su=ou();J()(Yt,ip);for(fu=n6(su.prototype),Uo=0;Uo<fu.length;Uo++)No=fu[Uo],Yt.prototype[No]||(Yt.prototype[No]=su.prototype[No]);var fu,No,Uo;function Yt(t){if(!(this instanceof Yt))return new Yt(t);ip.call(this,t),su.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",a6)))}Object.defineProperty(Yt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Yt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Yt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a6(){this._writableState.ended||S.default.nextTick(o6,this)}function o6(t){t.end()}Object.defineProperty(Yt.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 fp=R((hu,op)=>{w();var Lo=ft(),cr=Lo.Buffer;function ap(t,e){for(var r in t)e[r]=t[r]}cr.from&&cr.alloc&&cr.allocUnsafe&&cr.allocUnsafeSlow?op.exports=Lo:(ap(Lo,hu),hu.Buffer=rn);function rn(t,e,r){return cr(t,e,r)}ap(cr,rn);rn.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return cr(t,e,r)};rn.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=cr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};rn.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return cr(t)};rn.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Lo.SlowBuffer(t)}});var nn=R(up=>{"use strict";w();var cu=fp().Buffer,sp=cu.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 f6(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 s6(t){var e=f6(t);if(typeof e!="string"&&(cu.isEncoding===sp||!sp(t)))throw new Error("Unknown encoding: "+t);return e||t}up.StringDecoder=fa;function fa(t){this.encoding=s6(t);var e;switch(this.encoding){case"utf16le":this.text=p6,this.end=v6,e=4;break;case"utf8":this.fillLast=l6,e=4;break;case"base64":this.text=y6,this.end=g6,e=3;break;default:this.write=m6,this.end=b6;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=cu.allocUnsafe(e)}fa.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||""};fa.prototype.end=d6;fa.prototype.text=c6;fa.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 lu(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function u6(t,e,r){var n=e.length-1;if(n<r)return 0;var i=lu(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=lu(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=lu(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function h6(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 l6(t){var e=this.lastTotal-this.lastNeed,r=h6(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 c6(t,e){var r=u6(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function d6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function p6(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=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 v6(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 y6(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 g6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function m6(t){return t.toString(this.encoding)}function b6(t){return t&&t.length?this.write(t):""}});var Fo=R((m9,cp)=>{"use strict";w();var hp=yi().codes.ERR_STREAM_PREMATURE_CLOSE;function w6(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function _6(){}function x6(t){return t.setHeader&&typeof t.abort=="function"}function lp(t,e,r){if(typeof e=="function")return lp(t,null,e);e||(e={}),r=w6(r||_6);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||v()},f=t._writableState&&t._writableState.finished,v=function(){i=!1,f=!0,n||r.call(t)},m=t._readableState&&t._readableState.endEmitted,E=function(){n=!1,m=!0,i||r.call(t)},A=function(j){r.call(t,j)},q=function(){var j;if(n&&!m)return(!t._readableState||!t._readableState.ended)&&(j=new hp),r.call(t,j);if(i&&!f)return(!t._writableState||!t._writableState.ended)&&(j=new hp),r.call(t,j)},I=function(){t.req.on("finish",v)};return x6(t)?(t.on("complete",v),t.on("abort",q),t.req?I():t.on("request",I)):i&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",E),t.on("finish",v),e.error!==!1&&t.on("error",A),t.on("close",q),function(){t.removeListener("complete",v),t.removeListener("abort",q),t.removeListener("request",I),t.req&&t.req.removeListener("finish",v),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",v),t.removeListener("end",E),t.removeListener("error",A),t.removeListener("close",q)}}cp.exports=lp});var pp=R((w9,dp)=>{"use strict";w();var jo;function Cr(t,e,r){return e=M6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M6(t){var e=E6(t,"string");return typeof e=="symbol"?e:String(e)}function E6(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var S6=Fo(),Or=Symbol("lastResolve"),mi=Symbol("lastReject"),sa=Symbol("error"),Ho=Symbol("ended"),bi=Symbol("lastPromise"),du=Symbol("handlePromise"),wi=Symbol("stream");function Pr(t,e){return{value:t,done:e}}function B6(t){var e=t[Or];if(e!==null){var r=t[wi].read();r!==null&&(t[bi]=null,t[Or]=null,t[mi]=null,e(Pr(r,!1)))}}function A6(t){S.default.nextTick(B6,t)}function R6(t,e){return function(r,n){t.then(function(){if(e[Ho]){r(Pr(void 0,!0));return}e[du](r,n)},n)}}var q6=Object.getPrototypeOf(function(){}),I6=Object.setPrototypeOf((jo={get stream(){return this[wi]},next:function(){var e=this,r=this[sa];if(r!==null)return Promise.reject(r);if(this[Ho])return Promise.resolve(Pr(void 0,!0));if(this[wi].destroyed)return new Promise(function(f,v){S.default.nextTick(function(){e[sa]?v(e[sa]):f(Pr(void 0,!0))})});var n=this[bi],i;if(n)i=new Promise(R6(n,this));else{var a=this[wi].read();if(a!==null)return Promise.resolve(Pr(a,!1));i=new Promise(this[du])}return this[bi]=i,i}},Cr(jo,Symbol.asyncIterator,function(){return this}),Cr(jo,"return",function(){var e=this;return new Promise(function(r,n){e[wi].destroy(null,function(i){if(i){n(i);return}r(Pr(void 0,!0))})})}),jo),q6),k6=function(e){var r,n=Object.create(I6,(r={},Cr(r,wi,{value:e,writable:!0}),Cr(r,Or,{value:null,writable:!0}),Cr(r,mi,{value:null,writable:!0}),Cr(r,sa,{value:null,writable:!0}),Cr(r,Ho,{value:e._readableState.endEmitted,writable:!0}),Cr(r,du,{value:function(a,f){var v=n[wi].read();v?(n[bi]=null,n[Or]=null,n[mi]=null,a(Pr(v,!1))):(n[Or]=a,n[mi]=f)},writable:!0}),r));return n[bi]=null,S6(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[mi];a!==null&&(n[bi]=null,n[Or]=null,n[mi]=null,a(i)),n[sa]=i;return}var f=n[Or];f!==null&&(n[bi]=null,n[Or]=null,n[mi]=null,f(Pr(void 0,!0))),n[Ho]=!0}),e.on("readable",A6.bind(null,n)),n};dp.exports=k6});var yp=R((x9,vp)=>{w();vp.exports=function(){throw new Error("Readable.from is not available in the browser")}});var uu=R((S9,Bp)=>{"use strict";w();Bp.exports=Ue;var an;Ue.ReadableState=wp;var E9=Wi().EventEmitter,bp=function(e,r){return e.listeners(r).length},ha=ms(),Ko=ft().Buffer,T6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function C6(t){return Ko.from(t)}function O6(t){return Ko.isBuffer(t)||t instanceof T6}var pu=na(),Ce;pu&&pu.debuglog?Ce=pu.debuglog("stream"):Ce=function(){};var P6=Kd(),_u=eu(),D6=tu(),U6=D6.getHighWaterMark,Wo=yi().codes,N6=Wo.ERR_INVALID_ARG_TYPE,L6=Wo.ERR_STREAM_PUSH_AFTER_EOF,F6=Wo.ERR_METHOD_NOT_IMPLEMENTED,j6=Wo.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,on,vu,yu;J()(Ue,ha);var ua=_u.errorOrDestroy,gu=["error","close","destroy","pause","resume"];function H6(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 wp(t,e,r){an=an||gi(),t=t||{},typeof r!="boolean"&&(r=e instanceof an),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=U6(this,t,"readableHighWaterMark",r),this.buffer=new P6,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&&(on||(on=nn().StringDecoder),this.decoder=new on(t.encoding),this.encoding=t.encoding)}function Ue(t){if(an=an||gi(),!(this instanceof Ue))return new Ue(t);var e=this instanceof an;this._readableState=new wp(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ha.call(this)}Object.defineProperty(Ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ue.prototype.destroy=_u.destroy;Ue.prototype._undestroy=_u.undestroy;Ue.prototype._destroy=function(t,e){e(t)};Ue.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ko.from(t,e),e=""),n=!0),_p(this,t,e,!1,n)};Ue.prototype.unshift=function(t){return _p(this,t,null,!0,!1)};function _p(t,e,r,n,i){Ce("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,z6(t,a);else{var f;if(i||(f=K6(a,e)),f)ua(t,f);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==Ko.prototype&&(e=C6(e)),n)a.endEmitted?ua(t,new j6):mu(t,a,e,!0);else if(a.ended)ua(t,new L6);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?mu(t,a,e,!1):wu(t,a)):mu(t,a,e,!1)}else n||(a.reading=!1,wu(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function mu(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&zo(t)),wu(t,e)}function K6(t,e){var r;return!O6(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new N6("chunk",["string","Buffer","Uint8Array"],e)),r}Ue.prototype.isPaused=function(){return this._readableState.flowing===!1};Ue.prototype.setEncoding=function(t){on||(on=nn().StringDecoder);var e=new on(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var gp=1073741824;function W6(t){return t>=gp?t=gp:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function mp(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=W6(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ue.prototype.read=function(t){Ce("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ce("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?bu(this):zo(this),null;if(t=mp(t,e),t===0&&e.ended)return e.length===0&&bu(this),null;var n=e.needReadable;Ce("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Ce("length less than watermark",n)),e.ended||e.reading?(n=!1,Ce("reading or ended",n)):n&&(Ce("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=mp(r,e)));var i;return t>0?i=Ep(t,e):i=null,i===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&&bu(this)),i!==null&&this.emit("data",i),i};function z6(t,e){if(Ce("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?zo(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,xp(t)))}}function zo(t){var e=t._readableState;Ce("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ce("emitReadable",e.flowing),e.emittedReadable=!0,S.default.nextTick(xp,t))}function xp(t){var e=t._readableState;Ce("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,xu(t)}function wu(t,e){e.readingMore||(e.readingMore=!0,S.default.nextTick(G6,t,e))}function G6(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ce("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Ue.prototype._read=function(t){ua(this,new F6("_read()"))};Ue.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,Ce("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=i?v:V;n.endEmitted?S.default.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(X,z){Ce("onunpipe"),X===r&&z&&z.hasUnpiped===!1&&(z.hasUnpiped=!0,A())}function v(){Ce("onend"),t.end()}var m=V6(r);t.on("drain",m);var E=!1;function A(){Ce("cleanup"),t.removeListener("close",C),t.removeListener("finish",j),t.removeListener("drain",m),t.removeListener("error",I),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",V),r.removeListener("data",q),E=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}r.on("data",q);function q(X){Ce("ondata");var z=t.write(X);Ce("dest.write",z),z===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Sp(n.pipes,t)!==-1)&&!E&&(Ce("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function I(X){Ce("onerror",X),V(),t.removeListener("error",I),bp(t,"error")===0&&ua(t,X)}H6(t,"error",I);function C(){t.removeListener("finish",j),V()}t.once("close",C);function j(){Ce("onfinish"),t.removeListener("close",C),V()}t.once("finish",j);function V(){Ce("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(Ce("pipe resume"),r.resume()),t};function V6(t){return function(){var r=t._readableState;Ce("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bp(t,"data")&&(r.flowing=!0,xu(t))}}Ue.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Sp(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Ue.prototype.on=function(t,e){var r=ha.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Ce("on readable",n.length,n.reading),n.length?zo(this):n.reading||S.default.nextTick($6,this)),r};Ue.prototype.addListener=Ue.prototype.on;Ue.prototype.removeListener=function(t,e){var r=ha.prototype.removeListener.call(this,t,e);return t==="readable"&&S.default.nextTick(Mp,this),r};Ue.prototype.removeAllListeners=function(t){var e=ha.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&S.default.nextTick(Mp,this),e};function Mp(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 $6(t){Ce("readable nexttick read 0"),t.read(0)}Ue.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ce("resume"),t.flowing=!t.readableListening,Z6(this,t)),t.paused=!1,this};function Z6(t,e){e.resumeScheduled||(e.resumeScheduled=!0,S.default.nextTick(Y6,t,e))}function Y6(t,e){Ce("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),xu(t),e.flowing&&!e.reading&&t.read(0)}Ue.prototype.pause=function(){return Ce("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function xu(t){var e=t._readableState;for(Ce("flow",e.flowing);e.flowing&&t.read()!==null;);}Ue.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(Ce("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ce("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(v){return function(){return t[v].apply(t,arguments)}})(i));for(var a=0;a<gu.length;a++)t.on(gu[a],this.emit.bind(this,gu[a]));return this._read=function(f){Ce("wrapped _read",f),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(Ue.prototype[Symbol.asyncIterator]=function(){return vu===void 0&&(vu=pp()),vu(this)});Object.defineProperty(Ue.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ue.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ue.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Ue._fromList=Ep;Object.defineProperty(Ue.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ep(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 bu(t){var e=t._readableState;Ce("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,S.default.nextTick(X6,e,t))}function X6(t,e){if(Ce("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Ue.from=function(t,e){return yu===void 0&&(yu=yp()),yu(Ue,t,e)});function Sp(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Mu=R((A9,Rp)=>{"use strict";w();Rp.exports=dr;var Go=yi().codes,J6=Go.ERR_METHOD_NOT_IMPLEMENTED,Q6=Go.ERR_MULTIPLE_CALLBACK,e3=Go.ERR_TRANSFORM_ALREADY_TRANSFORMING,t3=Go.ERR_TRANSFORM_WITH_LENGTH_0,Vo=gi();J()(dr,Vo);function r3(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Q6);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function dr(t){if(!(this instanceof dr))return new dr(t);Vo.call(this,t),this._transformState={afterTransform:r3.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",i3)}function i3(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Ap(t,e,r)}):Ap(this,null,null)}dr.prototype.push=function(t,e){return this._transformState.needTransform=!1,Vo.prototype.push.call(this,t,e)};dr.prototype._transform=function(t,e,r){r(new J6("_transform()"))};dr.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};dr.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};dr.prototype._destroy=function(t,e){Vo.prototype._destroy.call(this,t,function(r){e(r)})};function Ap(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new t3;if(t._transformState.transforming)throw new e3;return t.push(null)}});var kp=R((q9,Ip)=>{"use strict";w();Ip.exports=la;var qp=Mu();J()(la,qp);function la(t){if(!(this instanceof la))return new la(t);qp.call(this,t)}la.prototype._transform=function(t,e,r){r(null,t)}});var Dp=R((k9,Pp)=>{"use strict";w();var Eu;function n3(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Op=yi().codes,a3=Op.ERR_MISSING_ARGS,o3=Op.ERR_STREAM_DESTROYED;function Tp(t){if(t)throw t}function f3(t){return t.setHeader&&typeof t.abort=="function"}function s3(t,e,r,n){n=n3(n);var i=!1;t.on("close",function(){i=!0}),Eu===void 0&&(Eu=Fo()),Eu(t,{readable:e,writable:r},function(f){if(f)return n(f);i=!0,n()});var a=!1;return function(f){if(!i&&!a){if(a=!0,f3(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(f||new o3("pipe"))}}}function Cp(t){t()}function u3(t,e){return t.pipe(e)}function h3(t){return!t.length||typeof t[t.length-1]!="function"?Tp:t.pop()}function l3(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=h3(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a3("streams");var i,a=e.map(function(f,v){var m=v<e.length-1,E=v>0;return s3(f,m,E,function(A){i||(i=A),A&&a.forEach(Cp),!m&&(a.forEach(Cp),n(i))})});return e.reduce(u3)}Pp.exports=l3});var Bu=R((C9,Up)=>{w();Up.exports=Mt;var Su=Wi().EventEmitter,c3=J();c3(Mt,Su);Mt.Readable=uu();Mt.Writable=ou();Mt.Duplex=gi();Mt.Transform=Mu();Mt.PassThrough=kp();Mt.finished=Fo();Mt.pipeline=Dp();Mt.Stream=Mt;function Mt(){Su.call(this)}Mt.prototype.pipe=function(t,e){var r=this;function n(A){t.writable&&t.write(A)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",f),r.on("close",v));var a=!1;function f(){a||(a=!0,t.end())}function v(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function m(A){if(E(),Su.listenerCount(this,"error")===0)throw A}r.on("error",m),t.on("error",m);function E(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",f),r.removeListener("close",v),r.removeListener("error",m),t.removeListener("error",m),r.removeListener("end",E),r.removeListener("close",E),t.removeListener("close",E)}return r.on("end",E),r.on("close",E),t.on("close",E),t.emit("pipe",r),t}});var Fp=R((P9,Lp)=>{"use strict";w();var Xt=ke().Buffer,Np=Bu().Transform,d3=J();function Dr(t){Np.call(this),this._block=Xt.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}d3(Dr,Np);Dr.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)};Dr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};var p3=typeof Uint8Array<"u",v3=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(Xt.prototype instanceof Uint8Array||Xt.TYPED_ARRAY_SUPPORT);function y3(t,e){if(t instanceof Xt)return t;if(typeof t=="string")return Xt.from(t,e);if(v3&&ArrayBuffer.isView(t)){if(t.byteLength===0)return Xt.alloc(0);var r=Xt.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(p3&&t instanceof Uint8Array||Xt.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Xt.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}Dr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=y3(t,e);for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)r[this._blockOffset++]=t[n++];for(var a=0,f=t.length*8;f>0;++a)this._length[a]+=f,f=this._length[a]/4294967296|0,f>0&&(this._length[a]-=4294967296*f);return this};Dr.prototype._update=function(){throw new Error("_update is not implemented")};Dr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Dr.prototype._digest=function(){throw new Error("_digest is not implemented")};Lp.exports=Dr});var Yo=R((U9,Hp)=>{"use strict";w();var g3=J(),jp=Fp(),m3=ke().Buffer,b3=new Array(16);function $o(){jp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}g3($o,jp);$o.prototype._update=function(){for(var t=b3,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,n=this._b,i=this._c,a=this._d;r=st(r,n,i,a,t[0],3614090360,7),a=st(a,r,n,i,t[1],3905402710,12),i=st(i,a,r,n,t[2],606105819,17),n=st(n,i,a,r,t[3],3250441966,22),r=st(r,n,i,a,t[4],4118548399,7),a=st(a,r,n,i,t[5],1200080426,12),i=st(i,a,r,n,t[6],2821735955,17),n=st(n,i,a,r,t[7],4249261313,22),r=st(r,n,i,a,t[8],1770035416,7),a=st(a,r,n,i,t[9],2336552879,12),i=st(i,a,r,n,t[10],4294925233,17),n=st(n,i,a,r,t[11],2304563134,22),r=st(r,n,i,a,t[12],1804603682,7),a=st(a,r,n,i,t[13],4254626195,12),i=st(i,a,r,n,t[14],2792965006,17),n=st(n,i,a,r,t[15],1236535329,22),r=ut(r,n,i,a,t[1],4129170786,5),a=ut(a,r,n,i,t[6],3225465664,9),i=ut(i,a,r,n,t[11],643717713,14),n=ut(n,i,a,r,t[0],3921069994,20),r=ut(r,n,i,a,t[5],3593408605,5),a=ut(a,r,n,i,t[10],38016083,9),i=ut(i,a,r,n,t[15],3634488961,14),n=ut(n,i,a,r,t[4],3889429448,20),r=ut(r,n,i,a,t[9],568446438,5),a=ut(a,r,n,i,t[14],3275163606,9),i=ut(i,a,r,n,t[3],4107603335,14),n=ut(n,i,a,r,t[8],1163531501,20),r=ut(r,n,i,a,t[13],2850285829,5),a=ut(a,r,n,i,t[2],4243563512,9),i=ut(i,a,r,n,t[7],1735328473,14),n=ut(n,i,a,r,t[12],2368359562,20),r=ht(r,n,i,a,t[5],4294588738,4),a=ht(a,r,n,i,t[8],2272392833,11),i=ht(i,a,r,n,t[11],1839030562,16),n=ht(n,i,a,r,t[14],4259657740,23),r=ht(r,n,i,a,t[1],2763975236,4),a=ht(a,r,n,i,t[4],1272893353,11),i=ht(i,a,r,n,t[7],4139469664,16),n=ht(n,i,a,r,t[10],3200236656,23),r=ht(r,n,i,a,t[13],681279174,4),a=ht(a,r,n,i,t[0],3936430074,11),i=ht(i,a,r,n,t[3],3572445317,16),n=ht(n,i,a,r,t[6],76029189,23),r=ht(r,n,i,a,t[9],3654602809,4),a=ht(a,r,n,i,t[12],3873151461,11),i=ht(i,a,r,n,t[15],530742520,16),n=ht(n,i,a,r,t[2],3299628645,23),r=lt(r,n,i,a,t[0],4096336452,6),a=lt(a,r,n,i,t[7],1126891415,10),i=lt(i,a,r,n,t[14],2878612391,15),n=lt(n,i,a,r,t[5],4237533241,21),r=lt(r,n,i,a,t[12],1700485571,6),a=lt(a,r,n,i,t[3],2399980690,10),i=lt(i,a,r,n,t[10],4293915773,15),n=lt(n,i,a,r,t[1],2240044497,21),r=lt(r,n,i,a,t[8],1873313359,6),a=lt(a,r,n,i,t[15],4264355552,10),i=lt(i,a,r,n,t[6],2734768916,15),n=lt(n,i,a,r,t[13],1309151649,21),r=lt(r,n,i,a,t[4],4149444226,6),a=lt(a,r,n,i,t[11],3174756917,10),i=lt(i,a,r,n,t[2],718787259,15),n=lt(n,i,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0};$o.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=m3.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 Zo(t,e){return t<<e|t>>>32-e}function st(t,e,r,n,i,a,f){return Zo(t+(e&r|~e&n)+i+a|0,f)+e|0}function ut(t,e,r,n,i,a,f){return Zo(t+(e&n|r&~n)+i+a|0,f)+e|0}function ht(t,e,r,n,i,a,f){return Zo(t+(e^r^n)+i+a|0,f)+e|0}function lt(t,e,r,n,i,a,f){return Zo(t+(r^(e|~n))+i+a|0,f)+e|0}Hp.exports=$o});var Wp=R((L9,Kp)=>{w();var w3={}.toString;Kp.exports=Array.isArray||function(t){return w3.call(t)=="[object Array]"}});var Gp=R((j9,zp)=>{"use strict";w();var _3=hi(),x3=di(),M3=x3("TypedArray.prototype.buffer",!0),E3=Ws();zp.exports=M3||function(e){if(!E3(e))throw new _3("Not a Typed Array");return e.buffer}});var ca=R((K9,$p)=>{"use strict";w();var Tt=ke().Buffer,S3=Wp(),B3=Gp(),A3=ArrayBuffer.isView||function(e){try{return B3(e),!0}catch{return!1}},R3=typeof Uint8Array<"u",Vp=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",q3=Vp&&(Tt.prototype instanceof Uint8Array||Tt.TYPED_ARRAY_SUPPORT);$p.exports=function(e,r){if(Tt.isBuffer(e))return e.constructor&&!("isBuffer"in e)?Tt.from(e):e;if(typeof e=="string")return Tt.from(e,r);if(Vp&&A3(e)){if(e.byteLength===0)return Tt.alloc(0);if(q3){var n=Tt.from(e.buffer,e.byteOffset,e.byteLength);if(n.byteLength===e.byteLength)return n}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=Tt.from(i);if(a.length===e.byteLength)return a}if(R3&&e instanceof Uint8Array)return Tt.from(e);var f=S3(e);if(f)for(var v=0;v<e.length;v+=1){var m=e[v];if(typeof m!="number"||m<0||m>255||~~m!==m)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||Tt.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return Tt.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Jp=R((z9,Xp)=>{"use strict";w();var I3=ke().Buffer,k3=ca(),Yp=typeof Uint8Array<"u",T3=Yp&&typeof ArrayBuffer<"u",Zp=T3&&ArrayBuffer.isView;Xp.exports=function(t,e){if(typeof t=="string"||I3.isBuffer(t)||Yp&&t instanceof Uint8Array||Zp&&Zp(t))return k3(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var da=R((V9,Au)=>{"use strict";w();typeof S.default>"u"||!S.default.version||S.default.version.indexOf("v0.")===0||S.default.version.indexOf("v1.")===0&&S.default.version.indexOf("v1.8.")!==0?Au.exports={nextTick:C3}:Au.exports=S.default;function C3(t,e,r,n){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,a,f;switch(i){case 0:case 1:return S.default.nextTick(t);case 2:return S.default.nextTick(function(){t.call(null,e)});case 3:return S.default.nextTick(function(){t.call(null,e,r)});case 4:return S.default.nextTick(function(){t.call(null,e,r,n)});default:for(a=new Array(i-1),f=0;f<a.length;)a[f++]=arguments[f];return S.default.nextTick(function(){t.apply(null,a)})}}});var ev=R((Z9,Qp)=>{w();var O3={}.toString;Qp.exports=Array.isArray||function(t){return O3.call(t)=="[object Array]"}});var Ru=R((X9,tv)=>{w();tv.exports=Wi().EventEmitter});var Jo=R((qu,iv)=>{w();var Xo=ft(),pr=Xo.Buffer;function rv(t,e){for(var r in t)e[r]=t[r]}pr.from&&pr.alloc&&pr.allocUnsafe&&pr.allocUnsafeSlow?iv.exports=Xo:(rv(Xo,qu),qu.Buffer=fn);function fn(t,e,r){return pr(t,e,r)}rv(pr,fn);fn.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return pr(t,e,r)};fn.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=pr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};fn.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return pr(t)};fn.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Xo.SlowBuffer(t)}});var sn=R(ct=>{w();function P3(t){return Array.isArray?Array.isArray(t):Qo(t)==="[object Array]"}ct.isArray=P3;function D3(t){return typeof t=="boolean"}ct.isBoolean=D3;function U3(t){return t===null}ct.isNull=U3;function N3(t){return t==null}ct.isNullOrUndefined=N3;function L3(t){return typeof t=="number"}ct.isNumber=L3;function F3(t){return typeof t=="string"}ct.isString=F3;function j3(t){return typeof t=="symbol"}ct.isSymbol=j3;function H3(t){return t===void 0}ct.isUndefined=H3;function K3(t){return Qo(t)==="[object RegExp]"}ct.isRegExp=K3;function W3(t){return typeof t=="object"&&t!==null}ct.isObject=W3;function z3(t){return Qo(t)==="[object Date]"}ct.isDate=z3;function G3(t){return Qo(t)==="[object Error]"||t instanceof Error}ct.isError=G3;function V3(t){return typeof t=="function"}ct.isFunction=V3;function $3(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ct.isPrimitive=$3;ct.isBuffer=ft().Buffer.isBuffer;function Qo(t){return Object.prototype.toString.call(t)}});var av=R((rR,Iu)=>{"use strict";w();function Z3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var nv=Jo().Buffer,pa=na();function Y3(t,e,r){t.copy(e,r)}Iu.exports=(function(){function t(){Z3(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},t.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++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 n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i},t.prototype.concat=function(r){if(this.length===0)return nv.alloc(0);for(var n=nv.allocUnsafe(r>>>0),i=this.head,a=0;i;)Y3(i.data,n,a),a+=i.data.length,i=i.next;return n},t})();pa&&pa.inspect&&pa.inspect.custom&&(Iu.exports.prototype[pa.inspect.custom]=function(){var t=pa.inspect({length:this.length});return this.constructor.name+" "+t})});var ku=R((nR,ov)=>{"use strict";w();var ef=da();function X3(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ef.nextTick(tf,this,t)):ef.nextTick(tf,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,ef.nextTick(tf,r,a)):ef.nextTick(tf,r,a):e&&e(a)}),this)}function J3(){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 tf(t,e){t.emit("error",e)}ov.exports={destroy:X3,undestroy:J3}});var Cu=R((oR,pv)=>{"use strict";w();var _i=da();pv.exports=Ye;function sv(t){var e=this;this.next=null,this.entry=null,this.finish=function(){y4(e,t)}}var Q3=!S.default.browser&&["v0.10","v0.9."].indexOf(S.default.version.slice(0,5))>-1?setImmediate:_i.nextTick,un;Ye.WritableState=ya;var uv=Object.create(sn());uv.inherits=J();var e4={deprecate:iu()},hv=Ru(),nf=Jo().Buffer,t4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function r4(t){return nf.from(t)}function i4(t){return nf.isBuffer(t)||t instanceof t4}var lv=ku();uv.inherits(Ye,hv);function n4(){}function ya(t,e){un=un||xi(),t=t||{};var r=e instanceof un;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=t.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=t.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(v){l4(e,v)},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 sv(this)}ya.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ya.prototype,"buffer",{get:e4.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var rf;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(rf=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ye,Symbol.hasInstance,{value:function(t){return rf.call(this,t)?!0:this!==Ye?!1:t&&t._writableState instanceof ya}})):rf=function(t){return t instanceof this};function Ye(t){if(un=un||xi(),!rf.call(Ye,this)&&!(this instanceof un))return new Ye(t);this._writableState=new ya(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)),hv.call(this)}Ye.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function a4(t,e){var r=new Error("write after end");t.emit("error",r),_i.nextTick(e,r)}function o4(t,e,r,n){var i=!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),_i.nextTick(n,a),i=!1),i}Ye.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&i4(t);return a&&!nf.isBuffer(t)&&(t=r4(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=n4),n.ended?a4(this,r):(a||o4(this,n,t,r))&&(n.pendingcb++,i=s4(this,n,a,t,e,r)),i};Ye.prototype.cork=function(){var t=this._writableState;t.corked++};Ye.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&cv(this,t))};Ye.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 f4(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=nf.from(e,r)),e}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function s4(t,e,r,n,i,a){if(!r){var f=f4(e,n,i);n!==f&&(r=!0,i="buffer",n=f)}var v=e.objectMode?1:n.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Tu(t,e,!1,v,n,i,a);return m}function Tu(t,e,r,n,i,a,f){e.writelen=n,e.writecb=f,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function u4(t,e,r,n,i){--e.pendingcb,r?(_i.nextTick(i,n),_i.nextTick(va,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),va(t,e))}function h4(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function l4(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(h4(r),e)u4(t,r,n,e,i);else{var a=dv(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&cv(t,r),n?Q3(fv,t,r,a,i):fv(t,r,a,i)}}function fv(t,e,r,n){r||c4(t,e),e.pendingcb--,n(),va(t,e)}function c4(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function cv(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)i[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;i.allBuffers=v,Tu(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new sv(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(Tu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ye.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Ye.prototype._writev=null;Ye.prototype.end=function(t,e,r){var n=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||v4(this,n,r)};function dv(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function d4(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),va(t,e)})}function p4(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,_i.nextTick(d4,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function va(t,e){var r=dv(e);return r&&(p4(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function v4(t,e,r){e.ending=!0,va(t,e),r&&(e.finished?_i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function y4(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ye.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Ye.prototype.destroy=lv.destroy;Ye.prototype._undestroy=lv.undestroy;Ye.prototype._destroy=function(t,e){this.end(),e(t)}});var xi=R((sR,mv)=>{"use strict";w();var vv=da(),g4=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};mv.exports=vr;var yv=Object.create(sn());yv.inherits=J();var gv=Du(),Pu=Cu();yv.inherits(vr,gv);for(Ou=g4(Pu.prototype),af=0;af<Ou.length;af++)of=Ou[af],vr.prototype[of]||(vr.prototype[of]=Pu.prototype[of]);var Ou,of,af;function vr(t){if(!(this instanceof vr))return new vr(t);gv.call(this,t),Pu.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",m4)}Object.defineProperty(vr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m4(){this.allowHalfOpen||this._writableState.ended||vv.nextTick(b4,this)}function b4(t){t.end()}Object.defineProperty(vr.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)}});vr.prototype._destroy=function(t,e){this.push(null),this.end(),vv.nextTick(e,t)}});var Du=R((lR,Iv)=>{"use strict";w();var ln=da();Iv.exports=ze;var w4=ev(),ga;ze.ReadableState=Sv;var hR=Wi().EventEmitter,xv=function(t,e){return t.listeners(e).length},ju=Ru(),ma=Jo().Buffer,_4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function x4(t){return ma.from(t)}function M4(t){return ma.isBuffer(t)||t instanceof _4}var Mv=Object.create(sn());Mv.inherits=J();var Uu=na(),Le=void 0;Uu&&Uu.debuglog?Le=Uu.debuglog("stream"):Le=function(){};var E4=av(),Ev=ku(),hn;Mv.inherits(ze,ju);var Nu=["error","close","destroy","pause","resume"];function S4(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):w4(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Sv(t,e){ga=ga||xi(),t=t||{};var r=e instanceof ga;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=t.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E4,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&&(hn||(hn=nn().StringDecoder),this.decoder=new hn(t.encoding),this.encoding=t.encoding)}function ze(t){if(ga=ga||xi(),!(this instanceof ze))return new ze(t);this._readableState=new Sv(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ju.call(this)}Object.defineProperty(ze.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ze.prototype.destroy=Ev.destroy;ze.prototype._undestroy=Ev.undestroy;ze.prototype._destroy=function(t,e){this.push(null),e(t)};ze.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=ma.from(t,e),e=""),n=!0),Bv(this,t,e,!1,n)};ze.prototype.unshift=function(t){return Bv(this,t,null,!0,!1)};function Bv(t,e,r,n,i){var a=t._readableState;if(e===null)a.reading=!1,q4(t,a);else{var f;i||(f=B4(a,e)),f?t.emit("error",f):a.objectMode||e&&e.length>0?(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==ma.prototype&&(e=x4(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Lu(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?Lu(t,a,e,!1):Av(t,a)):Lu(t,a,e,!1))):n||(a.reading=!1)}return A4(a)}function Lu(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&ff(t)),Av(t,e)}function B4(t,e){var r;return!M4(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function A4(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ze.prototype.isPaused=function(){return this._readableState.flowing===!1};ze.prototype.setEncoding=function(t){return hn||(hn=nn().StringDecoder),this._readableState.decoder=new hn(t),this._readableState.encoding=t,this};var bv=8388608;function R4(t){return t>=bv?t=bv:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function wv(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=R4(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ze.prototype.read=function(t){Le("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 Le("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Fu(this):ff(this),null;if(t=wv(t,e),t===0&&e.ended)return e.length===0&&Fu(this),null;var n=e.needReadable;Le("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Le("length less than watermark",n)),e.ended||e.reading?(n=!1,Le("reading or ended",n)):n&&(Le("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=wv(r,e)));var i;return t>0?i=Rv(t,e):i=null,i===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Fu(this)),i!==null&&this.emit("data",i),i};function q4(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,ff(t)}}function ff(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Le("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?ln.nextTick(_v,t):_v(t))}function _v(t){Le("emit readable"),t.emit("readable"),Hu(t)}function Av(t,e){e.readingMore||(e.readingMore=!0,ln.nextTick(I4,t,e))}function I4(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Le("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ze.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ze.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,Le("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=i?v:X;n.endEmitted?ln.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(z,$){Le("onunpipe"),z===r&&$&&$.hasUnpiped===!1&&($.hasUnpiped=!0,A())}function v(){Le("onend"),t.end()}var m=k4(r);t.on("drain",m);var E=!1;function A(){Le("cleanup"),t.removeListener("close",j),t.removeListener("finish",V),t.removeListener("drain",m),t.removeListener("error",C),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",X),r.removeListener("data",I),E=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}var q=!1;r.on("data",I);function I(z){Le("ondata"),q=!1;var $=t.write(z);$===!1&&!q&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&qv(n.pipes,t)!==-1)&&!E&&(Le("false write response, pause",n.awaitDrain),n.awaitDrain++,q=!0),r.pause())}function C(z){Le("onerror",z),X(),t.removeListener("error",C),xv(t,"error")===0&&t.emit("error",z)}S4(t,"error",C);function j(){t.removeListener("finish",V),X()}t.once("close",j);function V(){Le("onfinish"),t.removeListener("close",j),X()}t.once("finish",V);function X(){Le("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(Le("pipe resume"),r.resume()),t};function k4(t){return function(){var e=t._readableState;Le("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&xv(t,"data")&&(e.flowing=!0,Hu(t))}}ze.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 n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=qv(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ze.prototype.on=function(t,e){var r=ju.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&ff(this):ln.nextTick(T4,this))}return r};ze.prototype.addListener=ze.prototype.on;function T4(t){Le("readable nexttick read 0"),t.read(0)}ze.prototype.resume=function(){var t=this._readableState;return t.flowing||(Le("resume"),t.flowing=!0,C4(this,t)),this};function C4(t,e){e.resumeScheduled||(e.resumeScheduled=!0,ln.nextTick(O4,t,e))}function O4(t,e){e.reading||(Le("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Hu(t),e.flowing&&!e.reading&&t.read(0)}ze.prototype.pause=function(){return Le("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Le("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Hu(t){var e=t._readableState;for(Le("flow",e.flowing);e.flowing&&t.read()!==null;);}ze.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(Le("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Le("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(f){return function(){return t[f].apply(t,arguments)}})(i));for(var a=0;a<Nu.length;a++)t.on(Nu[a],this.emit.bind(this,Nu[a]));return this._read=function(f){Le("wrapped _read",f),n&&(n=!1,t.resume())},this};Object.defineProperty(ze.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ze._fromList=Rv;function Rv(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=P4(t,e.buffer,e.decoder),r}function P4(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?n=e.shift():n=r?D4(t,e):U4(t,e),n}function D4(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var a=r.data,f=t>a.length?a.length:t;if(f===a.length?i+=a:i+=a.slice(0,t),t-=f,t===0){f===a.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(f));break}++n}return e.length-=n,i}function U4(t,e){var r=ma.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var a=n.data,f=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,f),t-=f,t===0){f===a.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(f));break}++i}return e.length-=i,r}function Fu(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,ln.nextTick(N4,e,t))}function N4(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function qv(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Ku=R((dR,Cv)=>{"use strict";w();Cv.exports=yr;var sf=xi(),Tv=Object.create(sn());Tv.inherits=J();Tv.inherits(yr,sf);function L4(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function yr(t){if(!(this instanceof yr))return new yr(t);sf.call(this,t),this._transformState={afterTransform:L4.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",F4)}function F4(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){kv(t,e,r)}):kv(this,null,null)}yr.prototype.push=function(t,e){return this._transformState.needTransform=!1,sf.prototype.push.call(this,t,e)};yr.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};yr.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};yr.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};yr.prototype._destroy=function(t,e){var r=this;sf.prototype._destroy.call(this,t,function(n){e(n),r.emit("close")})};function kv(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 Uv=R((vR,Dv)=>{"use strict";w();Dv.exports=ba;var Ov=Ku(),Pv=Object.create(sn());Pv.inherits=J();Pv.inherits(ba,Ov);function ba(t){if(!(this instanceof ba))return new ba(t);Ov.call(this,t)}ba.prototype._transform=function(t,e,r){r(null,t)}});var Lv=R((Jt,Nv)=>{w();Jt=Nv.exports=Du();Jt.Stream=Jt;Jt.Readable=Jt;Jt.Writable=Cu();Jt.Duplex=xi();Jt.Transform=Ku();Jt.PassThrough=Uv()});var Hv=R((mR,jv)=>{"use strict";w();var j4=ke().Buffer,H4=Jp(),Fv=Lv().Transform,K4=J();function Ur(t){Fv.call(this),this._block=j4.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}K4(Ur,Fv);Ur.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)};Ur.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Ur.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=H4(t,e),n=this._block,i=0;this._blockOffset+r.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a]=r[i],a+=1,i+=1;this._update(),this._blockOffset=0}for(;i<r.length;)n[this._blockOffset]=r[i],this._blockOffset+=1,i+=1;for(var f=0,v=r.length*8;v>0;++f)this._length[f]+=v,v=this._length[f]/4294967296|0,v>0&&(this._length[f]-=4294967296*v);return this};Ur.prototype._update=function(){throw new Error("_update is not implemented")};Ur.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};Ur.prototype._digest=function(){throw new Error("_digest is not implemented")};jv.exports=Ur});var hf=R((wR,Zv)=>{"use strict";w();var Wu=ft().Buffer,W4=J(),$v=Hv(),z4=new Array(16),wa=[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],_a=[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],xa=[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],Ma=[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],Ea=[0,1518500249,1859775393,2400959708,2840853838],Sa=[1352829926,1548603684,1836072691,2053994217,0];function Mi(t,e){return t<<e|t>>>32-e}function Kv(t,e,r,n,i,a,f,v){return Mi(t+(e^r^n)+a+f|0,v)+i|0}function Wv(t,e,r,n,i,a,f,v){return Mi(t+(e&r|~e&n)+a+f|0,v)+i|0}function zv(t,e,r,n,i,a,f,v){return Mi(t+((e|~r)^n)+a+f|0,v)+i|0}function Gv(t,e,r,n,i,a,f,v){return Mi(t+(e&n|r&~n)+a+f|0,v)+i|0}function Vv(t,e,r,n,i,a,f,v){return Mi(t+(e^(r|~n))+a+f|0,v)+i|0}function uf(){$v.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}W4(uf,$v);uf.prototype._update=function(){for(var t=z4,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=this._a|0,m=this._b|0,E=this._c|0,A=this._d|0,q=this._e|0,I=0;I<80;I+=1){var C,j;I<16?(C=Kv(r,n,i,a,f,t[wa[I]],Ea[0],xa[I]),j=Vv(v,m,E,A,q,t[_a[I]],Sa[0],Ma[I])):I<32?(C=Wv(r,n,i,a,f,t[wa[I]],Ea[1],xa[I]),j=Gv(v,m,E,A,q,t[_a[I]],Sa[1],Ma[I])):I<48?(C=zv(r,n,i,a,f,t[wa[I]],Ea[2],xa[I]),j=zv(v,m,E,A,q,t[_a[I]],Sa[2],Ma[I])):I<64?(C=Gv(r,n,i,a,f,t[wa[I]],Ea[3],xa[I]),j=Wv(v,m,E,A,q,t[_a[I]],Sa[3],Ma[I])):(C=Vv(r,n,i,a,f,t[wa[I]],Ea[4],xa[I]),j=Kv(v,m,E,A,q,t[_a[I]],Sa[4],Ma[I])),r=f,f=a,a=Mi(i,10),i=n,n=C,v=q,q=A,A=Mi(E,10),E=m,m=j}var V=this._b+i+A|0;this._b=this._c+a+q|0,this._c=this._d+f+v|0,this._d=this._e+r+m|0,this._e=this._a+n+E|0,this._a=V};uf.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=Wu.alloc?Wu.alloc(20):new Wu(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};Zv.exports=uf});var Ei=R((xR,Yv)=>{"use strict";w();var G4=ke().Buffer,V4=ca();function lf(t,e){this._block=G4.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}lf.prototype.update=function(t,e){t=V4(t,e||"utf8");for(var r=this._block,n=this._blockSize,i=t.length,a=this._len,f=0;f<i;){for(var v=a%n,m=Math.min(i-f,n-v),E=0;E<m;E++)r[v+E]=t[f+E];a+=m,f+=m,a%n===0&&this._update(r)}return this._len+=i,this};lf.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 n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};lf.prototype._update=function(){throw new Error("_update must be implemented by subclass")};Yv.exports=lf});var Qv=R((ER,Jv)=>{"use strict";w();var $4=J(),Xv=Ei(),Z4=ke().Buffer,Y4=[1518500249,1859775393,-1894007588,-899497514],X4=new Array(80);function Ba(){this.init(),this._w=X4,Xv.call(this,64,56)}$4(Ba,Xv);Ba.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function J4(t){return t<<5|t>>>27}function Q4(t){return t<<30|t>>>2}function e8(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ba.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=e[v-3]^e[v-8]^e[v-14]^e[v-16];for(var m=0;m<80;++m){var E=~~(m/20),A=J4(r)+e8(E,n,i,a)+f+e[m]+Y4[E]|0;f=a,a=i,i=Q4(n),n=r,r=A}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Ba.prototype._hash=function(){var t=Z4.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};Jv.exports=Ba});var r1=R((BR,t1)=>{"use strict";w();var t8=J(),e1=Ei(),r8=ke().Buffer,i8=[1518500249,1859775393,-1894007588,-899497514],n8=new Array(80);function Aa(){this.init(),this._w=n8,e1.call(this,64,56)}t8(Aa,e1);Aa.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a8(t){return t<<1|t>>>31}function o8(t){return t<<5|t>>>27}function f8(t){return t<<30|t>>>2}function s8(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Aa.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=a8(e[v-3]^e[v-8]^e[v-14]^e[v-16]);for(var m=0;m<80;++m){var E=~~(m/20),A=o8(r)+s8(E,n,i,a)+f+e[m]+i8[E]|0;f=a,a=i,i=f8(n),n=r,r=A}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Aa.prototype._hash=function(){var t=r8.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};t1.exports=Aa});var zu=R((RR,n1)=>{"use strict";w();var u8=J(),i1=Ei(),h8=ke().Buffer,l8=[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],c8=new Array(64);function Ra(){this.init(),this._w=c8,i1.call(this,64,56)}u8(Ra,i1);Ra.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 d8(t,e,r){return r^t&(e^r)}function p8(t,e,r){return t&e|r&(t|e)}function v8(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function y8(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function g8(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function m8(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Ra.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=this._f|0,m=this._g|0,E=this._h|0,A=0;A<16;++A)e[A]=t.readInt32BE(A*4);for(;A<64;++A)e[A]=m8(e[A-2])+e[A-7]+g8(e[A-15])+e[A-16]|0;for(var q=0;q<64;++q){var I=E+y8(f)+d8(f,v,m)+l8[q]+e[q]|0,C=v8(r)+p8(r,n,i)|0;E=m,m=v,v=f,f=a+I|0,a=i,i=n,n=r,r=I+C|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0,this._f=v+this._f|0,this._g=m+this._g|0,this._h=E+this._h|0};Ra.prototype._hash=function(){var t=h8.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};n1.exports=Ra});var o1=R((IR,a1)=>{"use strict";w();var b8=J(),w8=zu(),_8=Ei(),x8=ke().Buffer,M8=new Array(64);function cf(){this.init(),this._w=M8,_8.call(this,64,56)}b8(cf,w8);cf.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};cf.prototype._hash=function(){var t=x8.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};a1.exports=cf});var Gu=R((TR,d1)=>{"use strict";w();var E8=J(),c1=Ei(),S8=ke().Buffer,f1=[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],B8=new Array(160);function qa(){this.init(),this._w=B8,c1.call(this,128,112)}E8(qa,c1);qa.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 s1(t,e,r){return r^t&(e^r)}function u1(t,e,r){return t&e|r&(t|e)}function h1(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l1(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function A8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function R8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function q8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function I8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function nt(t,e){return t>>>0<e>>>0?1:0}qa.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,a=this._dh|0,f=this._eh|0,v=this._fh|0,m=this._gh|0,E=this._hh|0,A=this._al|0,q=this._bl|0,I=this._cl|0,C=this._dl|0,j=this._el|0,V=this._fl|0,X=this._gl|0,z=this._hl|0,$=0;$<32;$+=2)e[$]=t.readInt32BE($*4),e[$+1]=t.readInt32BE($*4+4);for(;$<160;$+=2){var Fe=e[$-30],k=e[$-30+1],O=A8(Fe,k),D=R8(k,Fe);Fe=e[$-4],k=e[$-4+1];var L=q8(Fe,k),F=I8(k,Fe),H=e[$-14],M=e[$-14+1],h=e[$-32],y=e[$-32+1],l=D+M|0,o=O+H+nt(l,D)|0;l=l+F|0,o=o+L+nt(l,F)|0,l=l+y|0,o=o+h+nt(l,y)|0,e[$]=o,e[$+1]=l}for(var s=0;s<160;s+=2){o=e[s],l=e[s+1];var d=u1(r,n,i),g=u1(A,q,I),p=h1(r,A),u=h1(A,r),b=l1(f,j),_=l1(j,f),c=f1[s],x=f1[s+1],P=s1(f,v,m),N=s1(j,V,X),U=z+_|0,W=E+b+nt(U,z)|0;U=U+N|0,W=W+P+nt(U,N)|0,U=U+x|0,W=W+c+nt(U,x)|0,U=U+l|0,W=W+o+nt(U,l)|0;var K=u+g|0,G=p+d+nt(K,u)|0;E=m,z=X,m=v,X=V,v=f,V=j,j=C+U|0,f=a+W+nt(j,C)|0,a=i,C=I,i=n,I=q,n=r,q=A,A=U+K|0,r=W+G+nt(A,U)|0}this._al=this._al+A|0,this._bl=this._bl+q|0,this._cl=this._cl+I|0,this._dl=this._dl+C|0,this._el=this._el+j|0,this._fl=this._fl+V|0,this._gl=this._gl+X|0,this._hl=this._hl+z|0,this._ah=this._ah+r+nt(this._al,A)|0,this._bh=this._bh+n+nt(this._bl,q)|0,this._ch=this._ch+i+nt(this._cl,I)|0,this._dh=this._dh+a+nt(this._dl,C)|0,this._eh=this._eh+f+nt(this._el,j)|0,this._fh=this._fh+v+nt(this._fl,V)|0,this._gh=this._gh+m+nt(this._gl,X)|0,this._hh=this._hh+E+nt(this._hl,z)|0};qa.prototype._hash=function(){var t=S8.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+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};d1.exports=qa});var v1=R((OR,p1)=>{"use strict";w();var k8=J(),T8=Gu(),C8=Ei(),O8=ke().Buffer,P8=new Array(160);function df(){this.init(),this._w=P8,C8.call(this,128,112)}k8(df,T8);df.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};df.prototype._hash=function(){var t=O8.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+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};p1.exports=df});var pf=R((DR,gr)=>{"use strict";w();gr.exports=function(e){var r=e.toLowerCase(),n=gr.exports[r];if(!n)throw new Error(r+" is not supported (we accept pull requests)");return new n};gr.exports.sha=Qv();gr.exports.sha1=r1();gr.exports.sha224=o1();gr.exports.sha256=zu();gr.exports.sha384=v1();gr.exports.sha512=Gu()});var mr=R((NR,g1)=>{"use strict";w();var D8=ke().Buffer,y1=Bu().Transform,U8=nn().StringDecoder,N8=J(),L8=ca();function Ct(t){y1.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}N8(Ct,y1);Ct.prototype.update=function(t,e,r){var n=L8(t,e),i=this._update(n);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)};Ct.prototype.setAutoPadding=function(){};Ct.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Ct.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Ct.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Ct.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){n=i}finally{r(n)}};Ct.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Ct.prototype._finalOrDigest=function(t){var e=this.__final()||D8.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Ct.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new U8(e),this._encoding=e),this._encoding!==e)throw new Error("can\u2019t switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};g1.exports=Ct});var Ia=R((FR,b1)=>{"use strict";w();var F8=J(),j8=Yo(),H8=hf(),K8=pf(),m1=mr();function vf(t){m1.call(this,"digest"),this._hash=t}F8(vf,m1);vf.prototype._update=function(t){this._hash.update(t)};vf.prototype._final=function(){return this._hash.digest()};b1.exports=function(e){return e=e.toLowerCase(),e==="md5"?new j8:e==="rmd160"||e==="ripemd160"?new H8:new vf(K8(e))}});var x1=R((HR,_1)=>{"use strict";w();var W8=J(),Si=ke().Buffer,w1=mr(),z8=Si.alloc(128),cn=64;function yf(t,e){w1.call(this,"digest"),typeof e=="string"&&(e=Si.from(e)),this._alg=t,this._key=e,e.length>cn?e=t(e):e.length<cn&&(e=Si.concat([e,z8],cn));for(var r=this._ipad=Si.allocUnsafe(cn),n=this._opad=Si.allocUnsafe(cn),i=0;i<cn;i++)r[i]=e[i]^54,n[i]=e[i]^92;this._hash=[r]}W8(yf,w1);yf.prototype._update=function(t){this._hash.push(t)};yf.prototype._final=function(){var t=this._alg(Si.concat(this._hash));return this._alg(Si.concat([this._opad,t]))};_1.exports=yf});var Vu=R((WR,M1)=>{w();var G8=Yo();M1.exports=function(t){return new G8().update(t).digest()}});var B1=R((GR,S1)=>{"use strict";w();var V8=J(),$8=x1(),E1=mr(),ka=ke().Buffer,Z8=Vu(),$u=hf(),Zu=pf(),Y8=ka.alloc(128);function Ta(t,e){E1.call(this,"digest"),typeof e=="string"&&(e=ka.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var n=t==="rmd160"?new $u:Zu(t);e=n.update(e).digest()}else e.length<r&&(e=ka.concat([e,Y8],r));for(var i=this._ipad=ka.allocUnsafe(r),a=this._opad=ka.allocUnsafe(r),f=0;f<r;f++)i[f]=e[f]^54,a[f]=e[f]^92;this._hash=t==="rmd160"?new $u:Zu(t),this._hash.update(i)}V8(Ta,E1);Ta.prototype._update=function(t){this._hash.update(t)};Ta.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new $u:Zu(this._alg);return e.update(this._opad).update(t).digest()};S1.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new Ta("rmd160",r):e==="md5"?new $8(Z8,r):new Ta(e,r)}});var gf=R(($R,A1)=>{"use strict";w();A1.exports={}});var Yu=R((YR,R1)=>{"use strict";w();var X8=isFinite,J8=Math.pow(2,30)-1;R1.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0||!X8(t))throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>J8||e!==e)throw new TypeError("Bad key length")}});var Xu=R((JR,I1)=>{"use strict";w();var mf;globalThis.process&&globalThis.process.browser?mf="utf-8":globalThis.process&&globalThis.process.version?(q1=parseInt(S.default.version.split(".")[0].slice(1),10),mf=q1>=6?"utf-8":"binary"):mf="utf-8";var q1;I1.exports=mf});var Ju=R((eq,C1)=>{"use strict";w();var Q8=ke().Buffer,e5=ca(),T1=typeof Uint8Array<"u",t5=T1&&typeof ArrayBuffer<"u",k1=t5&&ArrayBuffer.isView;C1.exports=function(t,e,r){if(typeof t=="string"||Q8.isBuffer(t)||T1&&t instanceof Uint8Array||k1&&k1(t))return e5(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var Qu=R((rq,U1)=>{"use strict";w();var r5=Vu(),i5=hf(),n5=pf(),Bi=ke().Buffer,a5=Yu(),O1=Xu(),P1=Ju(),o5=Bi.alloc(128),bf={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},f5={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function s5(t){return new i5().update(t).digest()}function u5(t){function e(r){return n5(t).update(r).digest()}return t==="rmd160"||t==="ripemd160"?s5:t==="md5"?r5:e}function D1(t,e,r){var n=u5(t),i=t==="sha512"||t==="sha384"?128:64;e.length>i?e=n(e):e.length<i&&(e=Bi.concat([e,o5],i));for(var a=Bi.allocUnsafe(i+bf[t]),f=Bi.allocUnsafe(i+bf[t]),v=0;v<i;v++)a[v]=e[v]^54,f[v]=e[v]^92;var m=Bi.allocUnsafe(i+r+4);a.copy(m,0,0,i),this.ipad1=m,this.ipad2=a,this.opad=f,this.alg=t,this.blocksize=i,this.hash=n,this.size=bf[t]}D1.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 h5(t,e,r,n,i){a5(r,n),t=P1(t,O1,"Password"),e=P1(e,O1,"Salt");var a=(i||"sha1").toLowerCase(),f=f5[a]||a,v=bf[f];if(typeof v!="number"||!v)throw new TypeError("Digest algorithm not supported: "+i);var m=new D1(f,t,e.length),E=Bi.allocUnsafe(n),A=Bi.allocUnsafe(e.length+4);e.copy(A,0,0,e.length);for(var q=0,I=v,C=Math.ceil(n/I),j=1;j<=C;j++){A.writeUInt32BE(j,e.length);for(var V=m.run(A,m.ipad1),X=V,z=1;z<r;z++){X=m.run(X,m.ipad2);for(var $=0;$<I;$++)V[$]^=X[$]}V.copy(E,q),q+=I}return E}U1.exports=h5});var W1=R((nq,K1)=>{"use strict";w();var j1=ke().Buffer,l5=Yu(),N1=Xu(),L1=Qu(),F1=Ju(),wf,Ca=globalThis.crypto&&globalThis.crypto.subtle,c5={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"},eh=[],Ai;function th(){return Ai||(globalThis.process&&globalThis.process.nextTick?Ai=globalThis.process.nextTick:globalThis.queueMicrotask?Ai=globalThis.queueMicrotask:globalThis.setImmediate?Ai=globalThis.setImmediate:Ai=globalThis.setTimeout,Ai)}function H1(t,e,r,n,i){return Ca.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(a){return Ca.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},a,n<<3)}).then(function(a){return j1.from(a)})}function d5(t){if(globalThis.process&&!globalThis.process.browser||!Ca||!Ca.importKey||!Ca.deriveBits)return Promise.resolve(!1);if(eh[t]!==void 0)return eh[t];wf=wf||j1.alloc(8);var e=H1(wf,wf,10,128,t).then(function(){return!0},function(){return!1});return eh[t]=e,e}function p5(t,e){t.then(function(r){th()(function(){e(null,r)})},function(r){th()(function(){e(r)})})}K1.exports=function(t,e,r,n,i,a){if(typeof i=="function"&&(a=i,i=void 0),l5(r,n),t=F1(t,N1,"Password"),e=F1(e,N1,"Salt"),typeof a!="function")throw new Error("No callback provided to pbkdf2");i=i||"sha1";var f=c5[i.toLowerCase()];if(!f||typeof globalThis.Promise!="function"){th()(function(){var v;try{v=L1(t,e,r,n,i)}catch(m){a(m);return}a(null,v)});return}p5(d5(f).then(function(v){return v?H1(t,e,r,n,f):L1(t,e,r,n,i)}),a)}});var ih=R(rh=>{"use strict";w();rh.pbkdf2=W1();rh.pbkdf2Sync=Qu()});var nh=R(Et=>{"use strict";w();Et.readUInt32BE=function(e,r){var n=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return n>>>0};Et.writeUInt32BE=function(e,r,n){e[0+n]=r>>>24,e[1+n]=r>>>16&255,e[2+n]=r>>>8&255,e[3+n]=r&255};Et.ip=function(e,r,n,i){for(var a=0,f=0,v=6;v>=0;v-=2){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>>m+v&1}for(var v=6;v>=0;v-=2){for(var m=1;m<=25;m+=8)f<<=1,f|=r>>>m+v&1;for(var m=1;m<=25;m+=8)f<<=1,f|=e>>>m+v&1}n[i+0]=a>>>0,n[i+1]=f>>>0};Et.rip=function(e,r,n,i){for(var a=0,f=0,v=0;v<4;v++)for(var m=24;m>=0;m-=8)a<<=1,a|=r>>>m+v&1,a<<=1,a|=e>>>m+v&1;for(var v=4;v<8;v++)for(var m=24;m>=0;m-=8)f<<=1,f|=r>>>m+v&1,f<<=1,f|=e>>>m+v&1;n[i+0]=a>>>0,n[i+1]=f>>>0};Et.pc1=function(e,r,n,i){for(var a=0,f=0,v=7;v>=5;v--){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>m+v&1}for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var v=1;v<=3;v++){for(var m=0;m<=24;m+=8)f<<=1,f|=r>>m+v&1;for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1}for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1;n[i+0]=a>>>0,n[i+1]=f>>>0};Et.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var _f=[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];Et.pc2=function(e,r,n,i){for(var a=0,f=0,v=_f.length>>>1,m=0;m<v;m++)a<<=1,a|=e>>>_f[m]&1;for(var m=v;m<_f.length;m++)f<<=1,f|=r>>>_f[m]&1;n[i+0]=a>>>0,n[i+1]=f>>>0};Et.expand=function(e,r,n){var i=0,a=0;i=(e&1)<<5|e>>>27;for(var f=23;f>=15;f-=4)i<<=6,i|=e>>>f&63;for(var f=11;f>=3;f-=4)a|=e>>>f&63,a<<=6;a|=(e&31)<<1|e>>>31,r[n+0]=i>>>0,r[n+1]=a>>>0};var z1=[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];Et.substitute=function(e,r){for(var n=0,i=0;i<4;i++){var a=e>>>18-i*6&63,f=z1[i*64+a];n<<=4,n|=f}for(var i=0;i<4;i++){var a=r>>>18-i*6&63,f=z1[256+i*64+a];n<<=4,n|=f}return n>>>0};var G1=[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];Et.permute=function(e){for(var r=0,n=0;n<G1.length;n++)r<<=1,r|=e>>>G1[n]&1;return r>>>0};Et.padSplit=function(e,r,n){for(var i=e.toString(2);i.length<r;)i="0"+i;for(var a=[],f=0;f<r;f+=n)a.push(i.slice(f,f+n));return a.join(" ")}});var Ot=R((hq,$1)=>{w();$1.exports=V1;function V1(t,e){if(!t)throw new Error(e||"Assertion failed")}V1.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)}});var xf=R((cq,Z1)=>{"use strict";w();var v5=Ot();function St(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}Z1.exports=St;St.prototype._init=function(){};St.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};St.prototype._buffer=function(e,r){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-r),i=0;i<n;i++)this.buffer[this.bufferOff+i]=e[r+i];return this.bufferOff+=n,n};St.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};St.prototype._updateEncrypt=function(e){var r=0,n=0,i=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(i*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(a,n)));for(var f=e.length-(e.length-r)%this.blockSize;r<f;r+=this.blockSize)this._update(e,r,a,n),n+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return a};St.prototype._updateDecrypt=function(e){for(var r=0,n=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(i*this.blockSize);i>0;i--)r+=this._buffer(e,r),n+=this._flushBuffer(a,n);return r+=this._buffer(e,r),a};St.prototype.final=function(e){var r;e&&(r=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),r?r.concat(n):n};St.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};St.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};St.prototype._unpad=function(e){return e};St.prototype._finalDecrypt=function(){v5.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 ah=R((pq,J1)=>{"use strict";w();var Y1=Ot(),y5=J(),tt=nh(),X1=xf();function g5(){this.tmp=new Array(2),this.keys=null}function Qt(t){X1.call(this,t);var e=new g5;this._desState=e,this.deriveKeys(e,t.key)}y5(Qt,X1);J1.exports=Qt;Qt.create=function(e){return new Qt(e)};var m5=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Qt.prototype.deriveKeys=function(e,r){e.keys=new Array(32),Y1.equal(r.length,this.blockSize,"Invalid key length");var n=tt.readUInt32BE(r,0),i=tt.readUInt32BE(r,4);tt.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var f=m5[a>>>1];n=tt.r28shl(n,f),i=tt.r28shl(i,f),tt.pc2(n,i,e.keys,a)}};Qt.prototype._update=function(e,r,n,i){var a=this._desState,f=tt.readUInt32BE(e,r),v=tt.readUInt32BE(e,r+4);tt.ip(f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],this.type==="encrypt"?this._encrypt(a,f,v,a.tmp,0):this._decrypt(a,f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],tt.writeUInt32BE(n,f,i),tt.writeUInt32BE(n,v,i+4)};Qt.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var n=e.length-r,i=r;i<e.length;i++)e[i]=n;return!0};Qt.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],n=e.length-r;n<e.length;n++)Y1.equal(e[n],r);return e.slice(0,e.length-r)};Qt.prototype._encrypt=function(e,r,n,i,a){for(var f=r,v=n,m=0;m<e.keys.length;m+=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(v,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=v;v=(f^I)>>>0,f=C}tt.rip(v,f,i,a)};Qt.prototype._decrypt=function(e,r,n,i,a){for(var f=n,v=r,m=e.keys.length-2;m>=0;m-=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(f,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=f;f=(v^I)>>>0,v=C}tt.rip(f,v,i,a)}});var ey=R(Q1=>{"use strict";w();var b5=Ot(),w5=J(),Mf={};function _5(t){b5.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 x5(t){function e(a){t.call(this,a),this._cbcInit()}w5(e,t);for(var r=Object.keys(Mf),n=0;n<r.length;n++){var i=r[n];e.prototype[i]=Mf[i]}return e.create=function(f){return new e(f)},e}Q1.instantiate=x5;Mf._cbcInit=function(){var e=new _5(this.options.iv);this._cbcState=e};Mf._update=function(e,r,n,i){var a=this._cbcState,f=this.constructor.super_.prototype,v=a.iv;if(this.type==="encrypt"){for(var m=0;m<this.blockSize;m++)v[m]^=e[r+m];f._update.call(this,v,0,n,i);for(var m=0;m<this.blockSize;m++)v[m]=n[i+m]}else{f._update.call(this,e,r,n,i);for(var m=0;m<this.blockSize;m++)n[i+m]^=v[m];for(var m=0;m<this.blockSize;m++)v[m]=e[r+m]}}});var iy=R((mq,ry)=>{"use strict";w();var M5=Ot(),E5=J(),ty=xf(),Nr=ah();function S5(t,e){M5.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),i=e.slice(16,24);t==="encrypt"?this.ciphers=[Nr.create({type:"encrypt",key:r}),Nr.create({type:"decrypt",key:n}),Nr.create({type:"encrypt",key:i})]:this.ciphers=[Nr.create({type:"decrypt",key:i}),Nr.create({type:"encrypt",key:n}),Nr.create({type:"decrypt",key:r})]}function Ri(t){ty.call(this,t);var e=new S5(this.type,this.options.key);this._edeState=e}E5(Ri,ty);ry.exports=Ri;Ri.create=function(e){return new Ri(e)};Ri.prototype._update=function(e,r,n,i){var a=this._edeState;a.ciphers[0]._update(e,r,n,i),a.ciphers[1]._update(n,i,n,i),a.ciphers[2]._update(n,i,n,i)};Ri.prototype._pad=Nr.prototype._pad;Ri.prototype._unpad=Nr.prototype._unpad});var ny=R(dn=>{"use strict";w();dn.utils=nh();dn.Cipher=xf();dn.DES=ah();dn.CBC=ey();dn.EDE=iy()});var fy=R((xq,oy)=>{w();var ay=mr(),br=ny(),B5=J(),qi=ke().Buffer,Oa={"des-ede3-cbc":br.CBC.instantiate(br.EDE),"des-ede3":br.EDE,"des-ede-cbc":br.CBC.instantiate(br.EDE),"des-ede":br.EDE,"des-cbc":br.CBC.instantiate(br.DES),"des-ecb":br.DES};Oa.des=Oa["des-cbc"];Oa.des3=Oa["des-ede3-cbc"];oy.exports=Ef;B5(Ef,ay);function Ef(t){ay.call(this);var e=t.mode.toLowerCase(),r=Oa[e],n;t.decrypt?n="decrypt":n="encrypt";var i=t.key;qi.isBuffer(i)||(i=qi.from(i)),(e==="des-ede"||e==="des-ede-cbc")&&(i=qi.concat([i,i.slice(0,8)]));var a=t.iv;qi.isBuffer(a)||(a=qi.from(a)),this._des=r.create({key:i,iv:a,type:n})}Ef.prototype._update=function(t){return qi.from(this._des.update(t))};Ef.prototype._final=function(){return qi.from(this._des.final())}});var sy=R(oh=>{w();oh.encrypt=function(t,e){return t._cipher.encryptBlock(e)};oh.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var pn=R((Bq,uy)=>{w();uy.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new B.Buffer(n),a=0;a<n;++a)i[a]=e[a]^r[a];return i}});var ly=R(fh=>{w();var hy=pn();fh.encrypt=function(t,e){var r=hy(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};fh.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return hy(n,r)}});var py=R(dy=>{w();var Pa=ke().Buffer,A5=pn();function cy(t,e,r){var n=e.length,i=A5(e,t._cache);return t._cache=t._cache.slice(n),t._prev=Pa.concat([t._prev,r?e:i]),i}dy.encrypt=function(t,e,r){for(var n=Pa.allocUnsafe(0),i;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=Pa.allocUnsafe(0)),t._cache.length<=e.length)i=t._cache.length,n=Pa.concat([n,cy(t,e.slice(0,i),r)]),e=e.slice(i);else{n=Pa.concat([n,cy(t,e,r)]);break}return n}});var yy=R(vy=>{w();var sh=ke().Buffer;function R5(t,e,r){var n=t._cipher.encryptBlock(t._prev),i=n[0]^e;return t._prev=sh.concat([t._prev.slice(1),sh.from([r?e:i])]),i}vy.encrypt=function(t,e,r){for(var n=e.length,i=sh.allocUnsafe(n),a=-1;++a<n;)i[a]=R5(t,e[a],r);return i}});var my=R(gy=>{w();var Sf=ke().Buffer;function q5(t,e,r){for(var n,i=-1,a=8,f=0,v,m;++i<a;)n=t._cipher.encryptBlock(t._prev),v=e&1<<7-i?128:0,m=n[0]^v,f+=(m&128)>>i%8,t._prev=I5(t._prev,r?v:m);return f}function I5(t,e){var r=t.length,n=-1,i=Sf.allocUnsafe(t.length);for(t=Sf.concat([t,Sf.from([e])]);++n<r;)i[n]=t[n]<<1|t[n+1]>>7;return i}gy.encrypt=function(t,e,r){for(var n=e.length,i=Sf.allocUnsafe(n),a=-1;++a<n;)i[a]=q5(t,e[a],r);return i}});var wy=R(by=>{w();var k5=pn();function T5(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}by.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=B.Buffer.concat([t._cache,T5(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),k5(e,r)}});var uh=R((Nq,_y)=>{w();function C5(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}}_y.exports=C5});var lh=R(My=>{w();var O5=pn(),xy=ke().Buffer,P5=uh();function D5(t){var e=t._cipher.encryptBlockRaw(t._prev);return P5(t._prev),e}var hh=16;My.encrypt=function(t,e){var r=Math.ceil(e.length/hh),n=t._cache.length;t._cache=xy.concat([t._cache,xy.allocUnsafe(r*hh)]);for(var i=0;i<r;i++){var a=D5(t),f=n+i*hh;t._cache.writeUInt32BE(a[0],f+0),t._cache.writeUInt32BE(a[1],f+4),t._cache.writeUInt32BE(a[2],f+8),t._cache.writeUInt32BE(a[3],f+12)}var v=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),O5(e,v)}});var ch=R((Hq,U5)=>{U5.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 Af=R((Kq,Ey)=>{w();var N5={ECB:sy(),CBC:ly(),CFB:py(),CFB8:yy(),CFB1:my(),OFB:wy(),CTR:lh(),GCM:lh()},Bf=ch();for(dh in Bf)Bf[dh].module=N5[Bf[dh].mode];var dh;Ey.exports=Bf});var Da=R((zq,By)=>{w();var Rf=ke().Buffer;function vh(t){Rf.isBuffer(t)||(t=Rf.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(n*4);return r}function ph(t){for(var e=0;e<t.length;t++)t[e]=0}function Sy(t,e,r,n,i){for(var a=r[0],f=r[1],v=r[2],m=r[3],E=t[0]^e[0],A=t[1]^e[1],q=t[2]^e[2],I=t[3]^e[3],C,j,V,X,z=4,$=1;$<i;$++)C=a[E>>>24]^f[A>>>16&255]^v[q>>>8&255]^m[I&255]^e[z++],j=a[A>>>24]^f[q>>>16&255]^v[I>>>8&255]^m[E&255]^e[z++],V=a[q>>>24]^f[I>>>16&255]^v[E>>>8&255]^m[A&255]^e[z++],X=a[I>>>24]^f[E>>>16&255]^v[A>>>8&255]^m[q&255]^e[z++],E=C,A=j,q=V,I=X;return C=(n[E>>>24]<<24|n[A>>>16&255]<<16|n[q>>>8&255]<<8|n[I&255])^e[z++],j=(n[A>>>24]<<24|n[q>>>16&255]<<16|n[I>>>8&255]<<8|n[E&255])^e[z++],V=(n[q>>>24]<<24|n[I>>>16&255]<<16|n[E>>>8&255]<<8|n[A&255])^e[z++],X=(n[I>>>24]<<24|n[E>>>16&255]<<16|n[A>>>8&255]<<8|n[q&255])^e[z++],C=C>>>0,j=j>>>0,V=V>>>0,X=X>>>0,[C,j,V,X]}var L5=[0,1,2,4,8,16,32,64,128,27,54],Xe=(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=[],n=[],i=[[],[],[],[]],a=[[],[],[],[]],f=0,v=0,m=0;m<256;++m){var E=v^v<<1^v<<2^v<<3^v<<4;E=E>>>8^E&255^99,r[f]=E,n[E]=f;var A=t[f],q=t[A],I=t[q],C=t[E]*257^E*16843008;i[0][f]=C<<24|C>>>8,i[1][f]=C<<16|C>>>16,i[2][f]=C<<8|C>>>24,i[3][f]=C,C=I*16843009^q*65537^A*257^f*16843008,a[0][E]=C<<24|C>>>8,a[1][E]=C<<16|C>>>16,a[2][E]=C<<8|C>>>24,a[3][E]=C,f===0?f=v=1:(f=A^t[t[t[I^A]]],v^=t[t[v]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:a}})();function Bt(t){this._key=vh(t),this._reset()}Bt.blockSize=16;Bt.keySize=256/8;Bt.prototype.blockSize=Bt.blockSize;Bt.prototype.keySize=Bt.keySize;Bt.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=(r+1)*4,i=[],a=0;a<e;a++)i[a]=t[a];for(a=e;a<n;a++){var f=i[a-1];a%e===0?(f=f<<8|f>>>24,f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255],f^=L5[a/e|0]<<24):e>6&&a%e===4&&(f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255]),i[a]=i[a-e]^f}for(var v=[],m=0;m<n;m++){var E=n-m,A=i[E-(m%4?0:4)];m<4||E<=4?v[m]=A:v[m]=Xe.INV_SUB_MIX[0][Xe.SBOX[A>>>24]]^Xe.INV_SUB_MIX[1][Xe.SBOX[A>>>16&255]]^Xe.INV_SUB_MIX[2][Xe.SBOX[A>>>8&255]]^Xe.INV_SUB_MIX[3][Xe.SBOX[A&255]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=v};Bt.prototype.encryptBlockRaw=function(t){return t=vh(t),Sy(t,this._keySchedule,Xe.SUB_MIX,Xe.SBOX,this._nRounds)};Bt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Rf.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Bt.prototype.decryptBlock=function(t){t=vh(t);var e=t[1];t[1]=t[3],t[3]=e;var r=Sy(t,this._invKeySchedule,Xe.INV_SUB_MIX,Xe.INV_SBOX,this._nRounds),n=Rf.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n};Bt.prototype.scrub=function(){ph(this._keySchedule),ph(this._invKeySchedule),ph(this._key)};By.exports.AES=Bt});var qy=R((Vq,Ry)=>{w();var vn=ke().Buffer,F5=vn.alloc(16,0);function j5(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function Ay(t){var e=vn.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 Ua(t){this.h=t,this.state=vn.alloc(16,0),this.cache=vn.allocUnsafe(0)}Ua.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};Ua.prototype._multiply=function(){for(var t=j5(this.h),e=[0,0,0,0],r,n,i,a=-1;++a<128;){for(n=(this.state[~~(a/8)]&1<<7-a%8)!==0,n&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),i=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,i&&(t[0]=t[0]^225<<24)}this.state=Ay(e)};Ua.prototype.update=function(t){this.cache=vn.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)};Ua.prototype.final=function(t,e){return this.cache.length&&this.ghash(vn.concat([this.cache,F5],16)),this.ghash(Ay([0,t,0,e])),this.state};Ry.exports=Ua});var yh=R((Zq,Ty)=>{w();var H5=Da(),yt=ke().Buffer,Iy=mr(),K5=J(),ky=qy(),W5=pn(),z5=uh();function G5(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}function V5(t,e,r){if(e.length===12)return t._finID=yt.concat([e,yt.from([0,0,0,1])]),yt.concat([e,yt.from([0,0,0,2])]);var n=new ky(r),i=e.length,a=i%16;n.update(e),a&&(a=16-a,n.update(yt.alloc(a,0))),n.update(yt.alloc(8,0));var f=i*8,v=yt.alloc(8);v.writeUIntBE(f,0,8),n.update(v),t._finID=n.state;var m=yt.from(t._finID);return z5(m),m}function Ii(t,e,r,n){Iy.call(this);var i=yt.alloc(4,0);this._cipher=new H5.AES(e);var a=this._cipher.encryptBlock(i);this._ghash=new ky(a),r=V5(this,r,a),this._prev=yt.from(r),this._cache=yt.allocUnsafe(0),this._secCache=yt.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}K5(Ii,Iy);Ii.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=yt.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};Ii.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=W5(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&G5(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};Ii.prototype.getAuthTag=function(){if(this._decrypt||!yt.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Ii.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};Ii.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};Ty.exports=Ii});var mh=R((Xq,Oy)=>{w();var $5=Da(),gh=ke().Buffer,Cy=mr(),Z5=J();function qf(t,e,r,n){Cy.call(this),this._cipher=new $5.AES(e),this._prev=gh.from(r),this._cache=gh.allocUnsafe(0),this._secCache=gh.allocUnsafe(0),this._decrypt=n,this._mode=t}Z5(qf,Cy);qf.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};qf.prototype._final=function(){this._cipher.scrub()};Oy.exports=qf});var Na=R((Qq,Py)=>{w();var ki=ke().Buffer,Y5=Yo();function X5(t,e,r,n){if(ki.isBuffer(t)||(t=ki.from(t,"binary")),e&&(ki.isBuffer(e)||(e=ki.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,a=ki.alloc(i),f=ki.alloc(n||0),v=ki.alloc(0);i>0||n>0;){var m=new Y5;m.update(v),m.update(t),e&&m.update(e),v=m.digest();var E=0;if(i>0){var A=a.length-i;E=Math.min(i,v.length),v.copy(a,A,0,E),i-=E}if(E<v.length&&n>0){var q=f.length-n,I=Math.min(n,v.length-E);v.copy(f,q,E,E+I),n-=I}}return v.fill(0),{key:a,iv:f}}Py.exports=X5});var Ly=R(bh=>{w();var Dy=Af(),J5=yh(),wr=ke().Buffer,Q5=mh(),Uy=mr(),eM=Da(),tM=Na(),rM=J();function La(t,e,r){Uy.call(this),this._cache=new If,this._cipher=new eM.AES(e),this._prev=wr.from(r),this._mode=t,this._autopadding=!0}rM(La,Uy);La.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return wr.concat(n)};var iM=wr.alloc(16,16);La.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(iM))throw this._cipher.scrub(),new Error("data not multiple of block length")};La.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function If(){this.cache=wr.allocUnsafe(0)}If.prototype.add=function(t){this.cache=wr.concat([this.cache,t])};If.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};If.prototype.flush=function(){for(var t=16-this.cache.length,e=wr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return wr.concat([this.cache,e])};function Ny(t,e,r){var n=Dy[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=wr.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=wr.from(r)),n.mode!=="GCM"&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return n.type==="stream"?new Q5(n.module,e,r):n.type==="auth"?new J5(n.module,e,r):new La(n.module,e,r)}function nM(t,e){var r=Dy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=tM(e,!1,r.key,r.iv);return Ny(t,n.key,n.iv)}bh.createCipheriv=Ny;bh.createCipher=nM});var Ky=R(wh=>{w();var aM=yh(),yn=ke().Buffer,Fy=Af(),oM=mh(),jy=mr(),fM=Da(),sM=Na(),uM=J();function Fa(t,e,r){jy.call(this),this._cache=new kf,this._last=void 0,this._cipher=new fM.AES(e),this._prev=yn.from(r),this._mode=t,this._autopadding=!0}uM(Fa,jy);Fa.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return yn.concat(n)};Fa.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return hM(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};Fa.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function kf(){this.cache=yn.allocUnsafe(0)}kf.prototype.add=function(t){this.cache=yn.concat([this.cache,t])};kf.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};kf.prototype.flush=function(){if(this.cache.length)return this.cache};function hM(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 Hy(t,e,r){var n=Fy[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=yn.from(r)),n.mode!=="GCM"&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=yn.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);return n.type==="stream"?new oM(n.module,e,r,!0):n.type==="auth"?new aM(n.module,e,r,!0):new Fa(n.module,e,r)}function lM(t,e){var r=Fy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=sM(e,!1,r.key,r.iv);return Hy(t,n.key,n.iv)}wh.createDecipher=lM;wh.createDecipheriv=Hy});var Tf=R(Pt=>{w();var Wy=Ly(),zy=Ky(),cM=ch();function dM(){return Object.keys(cM)}Pt.createCipher=Pt.Cipher=Wy.createCipher;Pt.createCipheriv=Pt.Cipheriv=Wy.createCipheriv;Pt.createDecipher=Pt.Decipher=zy.createDecipher;Pt.createDecipheriv=Pt.Decipheriv=zy.createDecipheriv;Pt.listCiphers=Pt.getCiphers=dM});var Gy=R(_r=>{w();_r["des-ecb"]={key:8,iv:0};_r["des-cbc"]=_r.des={key:8,iv:8};_r["des-ede3-cbc"]=_r.des3={key:24,iv:8};_r["des-ede3"]={key:24,iv:0};_r["des-ede-cbc"]={key:16,iv:8};_r["des-ede"]={key:16,iv:0}});var Xy=R(Dt=>{w();var Vy=fy(),_h=Tf(),Lr=Af(),xr=Gy(),$y=Na();function pM(t,e){t=t.toLowerCase();var r,n;if(Lr[t])r=Lr[t].key,n=Lr[t].iv;else if(xr[t])r=xr[t].key*8,n=xr[t].iv;else throw new TypeError("invalid suite type");var i=$y(e,!1,r,n);return Zy(t,i.key,i.iv)}function vM(t,e){t=t.toLowerCase();var r,n;if(Lr[t])r=Lr[t].key,n=Lr[t].iv;else if(xr[t])r=xr[t].key*8,n=xr[t].iv;else throw new TypeError("invalid suite type");var i=$y(e,!1,r,n);return Yy(t,i.key,i.iv)}function Zy(t,e,r){if(t=t.toLowerCase(),Lr[t])return _h.createCipheriv(t,e,r);if(xr[t])return new Vy({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function Yy(t,e,r){if(t=t.toLowerCase(),Lr[t])return _h.createDecipheriv(t,e,r);if(xr[t])return new Vy({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function yM(){return Object.keys(xr).concat(_h.getCiphers())}Dt.createCipher=Dt.Cipher=pM;Dt.createCipheriv=Dt.Cipheriv=Zy;Dt.createDecipher=Dt.Decipher=vM;Dt.createDecipheriv=Dt.Decipheriv=Yy;Dt.listCiphers=Dt.getCiphers=yM});var Jy=R((lI,Eh)=>{w();var xh;Eh.exports=function(e){return xh||(xh=new Fr(null)),xh.generate(e)};function Fr(t){this.rand=t}Eh.exports.Rand=Fr;Fr.prototype.generate=function(e){return this._rand(e)};Fr.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Fr.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Mh=ja(),typeof Mh.randomBytes!="function")throw new Error("Not supported");Fr.prototype._rand=function(e){return Mh.randomBytes(e)}}catch{}var Mh});var Sh=R((dI,Qy)=>{w();var Ti=lr(),gM=Jy();function Ci(t){this.rand=t||new gM.Rand}Qy.exports=Ci;Ci.create=function(e){return new Ci(e)};Ci.prototype._randbelow=function(e){var r=e.bitLength(),n=Math.ceil(r/8);do var i=new Ti(this.rand.generate(n));while(i.cmp(e)>=0);return i};Ci.prototype._randrange=function(e,r){var n=r.sub(e);return e.add(this._randbelow(n))};Ci.prototype.test=function(e,r,n){var i=e.bitLength(),a=Ti.mont(e),f=new Ti(1).toRed(a);r||(r=Math.max(1,i/48|0));for(var v=e.subn(1),m=0;!v.testn(m);m++);for(var E=e.shrn(m),A=v.toRed(a),q=!0;r>0;r--){var I=this._randrange(new Ti(2),v);n&&n(I);var C=I.toRed(a).redPow(E);if(!(C.cmp(f)===0||C.cmp(A)===0)){for(var j=1;j<m;j++){if(C=C.redSqr(),C.cmp(f)===0)return!1;if(C.cmp(A)===0)break}if(j===m)return!1}}return q};Ci.prototype.getDivisor=function(e,r){var n=e.bitLength(),i=Ti.mont(e),a=new Ti(1).toRed(i);r||(r=Math.max(1,n/48|0));for(var f=e.subn(1),v=0;!f.testn(v);v++);for(var m=e.shrn(v),E=f.toRed(i);r>0;r--){var A=this._randrange(new Ti(2),f),q=e.gcd(A);if(q.cmpn(1)!==0)return q;var I=A.toRed(i).redPow(m);if(!(I.cmp(a)===0||I.cmp(E)===0)){for(var C=1;C<v;C++){if(I=I.redSqr(),I.cmp(a)===0)return I.fromRed().subn(1).gcd(e);if(I.cmp(E)===0)break}if(C===v)return I=I.redSqr(),I.fromRed().subn(1).gcd(e)}}return!1}});var kh=R((bI,rg)=>{w();var mM=ui();rg.exports=Ih;Ih.simpleSieve=Rh;Ih.fermatTest=qh;var at=lr(),bM=new at(24),wM=Sh(),eg=new wM,_M=new at(1),Ah=new at(2),xM=new at(5),vI=new at(16),yI=new at(8),MM=new at(10),EM=new at(3),gI=new at(7),SM=new at(11),tg=new at(4),mI=new at(12),Bh=null;function BM(){if(Bh!==null)return Bh;var t=1048576,e=[];e[0]=2;for(var r=1,n=3;n<t;n+=2){for(var i=Math.ceil(Math.sqrt(n)),a=0;a<r&&e[a]<=i&&n%e[a]!==0;a++);r!==a&&e[a]<=i||(e[r++]=n)}return Bh=e,e}function Rh(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 qh(t){var e=at.mont(t);return Ah.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Ih(t,e){if(t<16)return e===2||e===5?new at([140,123]):new at([140,39]);e=new at(e);for(var r,n;;){for(r=new at(mM(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(_M),r.testn(1)||r.iadd(Ah),e.cmp(Ah)){if(!e.cmp(xM))for(;r.mod(MM).cmp(EM);)r.iadd(tg)}else for(;r.mod(bM).cmp(SM);)r.iadd(tg);if(n=r.shrn(1),Rh(n)&&Rh(r)&&qh(n)&&qh(r)&&eg.test(n)&&eg.test(r))return r}}});var ig=R((_I,AM)=>{AM.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 fg=R((xI,og)=>{w();var At=lr(),RM=Sh(),ng=new RM,qM=new At(24),IM=new At(11),kM=new At(10),TM=new At(3),CM=new At(7),ag=kh(),OM=ui();og.exports=Mr;function PM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._pub=new At(t),this}function DM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._priv=new At(t),this}var Cf={};function UM(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in Cf)return Cf[n];var i=0;if(t.isEven()||!ag.simpleSieve||!ag.fermatTest(t)||!ng.test(t))return i+=1,r==="02"||r==="05"?i+=8:i+=4,Cf[n]=i,i;ng.test(t.shrn(1))||(i+=2);var a;switch(r){case"02":t.mod(qM).cmp(IM)&&(i+=8);break;case"05":a=t.mod(kM),a.cmp(TM)&&a.cmp(CM)&&(i+=8);break;default:i+=4}return Cf[n]=i,i}function Mr(t,e,r){this.setGenerator(e),this.__prime=new At(t),this._prime=At.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=PM,this.setPrivateKey=DM):this._primeCode=8}Object.defineProperty(Mr.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=UM(this.__prime,this.__gen)),this._primeCode}});Mr.prototype.generateKeys=function(){return this._priv||(this._priv=new At(OM(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};Mr.prototype.computeSecret=function(t){t=new At(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new B.Buffer(e.toArray()),n=this.getPrime();if(r.length<n.length){var i=new B.Buffer(n.length-r.length);i.fill(0),r=B.Buffer.concat([i,r])}return r};Mr.prototype.getPublicKey=function(e){return Of(this._pub,e)};Mr.prototype.getPrivateKey=function(e){return Of(this._priv,e)};Mr.prototype.getPrime=function(t){return Of(this.__prime,t)};Mr.prototype.getGenerator=function(t){return Of(this._gen,t)};Mr.prototype.setGenerator=function(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this.__gen=t,this._gen=new At(t),this};function Of(t,e){var r=new B.Buffer(t.toArray());return e?r.toString(e):r}});var hg=R(gn=>{w();var NM=kh(),sg=ig(),Th=fg();function LM(t){var e=new B.Buffer(sg[t].prime,"hex"),r=new B.Buffer(sg[t].gen,"hex");return new Th(e,r)}var FM={binary:!0,hex:!0,base64:!0};function ug(t,e,r,n){return B.Buffer.isBuffer(e)||FM[e]===void 0?ug(t,"binary",e,r):(e=e||"binary",n=n||"binary",r=r||new B.Buffer([2]),B.Buffer.isBuffer(r)||(r=new B.Buffer(r,n)),typeof t=="number"?new Th(NM(t,r),r,!0):(B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),new Th(t,r,!0)))}gn.DiffieHellmanGroup=gn.createDiffieHellmanGroup=gn.getDiffieHellman=LM;gn.createDiffieHellman=gn.DiffieHellman=ug});var lg=R((exports,module)=>{w();var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(e,r,n){e[r]=n}}})(),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,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),function(v){r[v]=t[v]}),forEach(globals,function(v){t[v]&&(r[v]=t[v])});var a=Object_keys(r),f=n.call(r,this.code);return forEach(Object_keys(r),function(v){(v in t||indexOf(a,v)===-1)&&(t[v]=r[v])}),forEach(globals,function(v){v in t||defineProp(t,v,r[v])}),document.body.removeChild(e),f};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),function(n){t[n]=e[n]}),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 pg=R(dg=>{w();var cg=bn(),jM=J(),HM=dg;HM.define=function(e,r){return new mn(e,r)};function mn(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}mn.prototype._createNamed=function(e){var r;try{r=lg().runInThisContext("(function "+this.name+`(entity) {
|
|
11
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}De.types=Pc();function Fc(t){return Array.isArray(t)}De.isArray=Fc;function fs(t){return typeof t=="boolean"}De.isBoolean=fs;function Yo(t){return t===null}De.isNull=Yo;function v2(t){return t==null}De.isNullOrUndefined=v2;function jc(t){return typeof t=="number"}De.isNumber=jc;function Xo(t){return typeof t=="string"}De.isString=Xo;function y2(t){return typeof t=="symbol"}De.isSymbol=y2;function Vr(t){return t===void 0}De.isUndefined=Vr;function Sn(t){return qi(t)&&ss(t)==="[object RegExp]"}De.isRegExp=Sn;De.types.isRegExp=Sn;function qi(t){return typeof t=="object"&&t!==null}De.isObject=qi;function Zo(t){return qi(t)&&ss(t)==="[object Date]"}De.isDate=Zo;De.types.isDate=Zo;function Bn(t){return qi(t)&&(ss(t)==="[object Error]"||t instanceof Error)}De.isError=Bn;De.types.isNativeError=Bn;function $o(t){return typeof t=="function"}De.isFunction=$o;function g2(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}De.isPrimitive=g2;De.isBuffer=Uc();function ss(t){return Object.prototype.toString.call(t)}function os(t){return t<10?"0"+t.toString(10):t.toString(10)}var m2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function b2(){var t=new Date,e=[os(t.getHours()),os(t.getMinutes()),os(t.getSeconds())].join(":");return[t.getDate(),m2[t.getMonth()],e].join(" ")}De.log=function(){console.log("%s - %s",b2(),De.format.apply(De,arguments))};De.inherits=X();De._extend=function(t,e){if(!e||!qi(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};function Hc(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Gr=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;De.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(Gr&&e[Gr]){var r=e[Gr];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,Gr,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(b,S){i=b,n=S}),f=[],y=0;y<arguments.length;y++)f.push(arguments[y]);f.push(function(b,S){b?n(b):i(S)});try{e.apply(this,f)}catch(b){n(b)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Gr&&Object.defineProperty(r,Gr,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,Nc(e))};De.promisify.custom=Gr;function w2(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function _2(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var a=this,f=function(){return n.apply(a,arguments)};t.apply(this,r).then(function(y){E.default.nextTick(f.bind(null,null,y))},function(y){E.default.nextTick(w2.bind(null,y,f))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,Nc(t)),e}De.callbackify=_2});var zc=B((H5,$c)=>{"use strict";w();function Kc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Wc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kc(Object(r),!0).forEach(function(i){x2(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function x2(t,e,r){return e=Vc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M2(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Vc(i.key),i)}}function E2(t,e,r){return e&&Gc(t.prototype,e),r&&Gc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vc(t){var e=S2(t,"string");return typeof e=="symbol"?e:String(e)}function S2(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var B2=ft(),Jo=B2.Buffer,A2=An(),us=A2.inspect,R2=us&&us.custom||"inspect";function q2(t,e,r){Jo.prototype.copy.call(t,e,r)}$c.exports=(function(){function t(){M2(this,t),this.head=null,this.tail=null,this.length=0}return E2(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Jo.alloc(0);for(var i=Jo.allocUnsafe(r>>>0),n=this.head,a=0;n;)q2(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,a=i.data;for(r-=a.length;i=i.next;){var f=i.data,y=r>f.length?f.length:r;if(y===f.length?a+=f:a+=f.slice(0,r),r-=y,r===0){y===f.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(y));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=Jo.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var f=n.data,y=r>f.length?f.length:r;if(f.copy(i,i.length-r,0,y),r-=y,r===0){y===f.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=f.slice(y));break}++a}return this.length-=a,i}},{key:R2,value:function(r,i){return us(this,Wc(Wc({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var ls=B((W5,Yc)=>{"use strict";w();function T2(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,E.default.nextTick(hs,this,t)):E.default.nextTick(hs,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted?E.default.nextTick(Qo,r):(r._writableState.errorEmitted=!0,E.default.nextTick(Zc,r,a)):E.default.nextTick(Zc,r,a):e?(E.default.nextTick(Qo,r),e(a)):E.default.nextTick(Qo,r)}),this)}function Zc(t,e){hs(t,e),Qo(t)}function Qo(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function I2(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function hs(t,e){t.emit("error",e)}function k2(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Yc.exports={destroy:T2,undestroy:I2,errorOrDestroy:k2}});var $r=B((V5,Qc)=>{"use strict";w();function C2(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Jc={};function vt(t,e,r){r||(r=Error);function i(a,f,y){return typeof e=="string"?e:e(a,f,y)}var n=(function(a){C2(f,a);function f(y,b,S){return a.call(this,i(y,b,S))||this}return f})(r);n.prototype.name=r.name,n.prototype.code=t,Jc[t]=n}function Xc(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(i){return String(i)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function O2(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function P2(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function D2(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}vt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);vt("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&O2(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var n;if(P2(t," argument"))n="The ".concat(t," ").concat(i," ").concat(Xc(e,"type"));else{var a=D2(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(Xc(e,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);vt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");vt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});vt("ERR_STREAM_PREMATURE_CLOSE","Premature close");vt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});vt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");vt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");vt("ERR_STREAM_WRITE_AFTER_END","write after end");vt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);vt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);vt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Qc.exports.codes=Jc});var cs=B((z5,ed)=>{"use strict";w();var U2=$r().codes.ERR_INVALID_OPT_VALUE;function N2(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function L2(t,e,r,i){var n=N2(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new U2(a,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ed.exports={getHighWaterMark:L2}});var ps=B((Y5,td)=>{w();td.exports=F2;function F2(t,e){if(ds("noDeprecation"))return t;var r=!1;function i(){if(!r){if(ds("throwDeprecation"))throw new Error(e);ds("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function ds(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var gs=B((J5,fd)=>{"use strict";w();fd.exports=Ge;function id(t){var e=this;this.next=null,this.entry=null,this.finish=function(){d_(e,t)}}var Ti;Ge.WritableState=qn;var j2={deprecate:ps()},nd=qf(),ta=ft().Buffer,H2=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function K2(t){return ta.from(t)}function W2(t){return ta.isBuffer(t)||t instanceof H2}var ys=ls(),G2=cs(),V2=G2.getHighWaterMark,ur=$r().codes,$2=ur.ERR_INVALID_ARG_TYPE,z2=ur.ERR_METHOD_NOT_IMPLEMENTED,Z2=ur.ERR_MULTIPLE_CALLBACK,Y2=ur.ERR_STREAM_CANNOT_PIPE,X2=ur.ERR_STREAM_DESTROYED,J2=ur.ERR_STREAM_NULL_VALUES,Q2=ur.ERR_STREAM_WRITE_AFTER_END,e_=ur.ERR_UNKNOWN_ENCODING,Ii=ys.errorOrDestroy;X()(Ge,nd);function t_(){}function qn(t,e,r){Ti=Ti||zr(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ti),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=V2(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){s_(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new id(this)}qn.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(qn.prototype,"buffer",{get:j2.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ea;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ea=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ge,Symbol.hasInstance,{value:function(e){return ea.call(this,e)?!0:this!==Ge?!1:e&&e._writableState instanceof qn}})):ea=function(e){return e instanceof this};function Ge(t){Ti=Ti||zr();var e=this instanceof Ti;if(!e&&!ea.call(Ge,this))return new Ge(t);this._writableState=new qn(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),nd.call(this)}Ge.prototype.pipe=function(){Ii(this,new Y2)};function r_(t,e){var r=new Q2;Ii(t,r),E.default.nextTick(e,r)}function i_(t,e,r,i){var n;return r===null?n=new J2:typeof r!="string"&&!e.objectMode&&(n=new $2("chunk",["string","Buffer"],r)),n?(Ii(t,n),E.default.nextTick(i,n),!1):!0}Ge.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&W2(t);return a&&!ta.isBuffer(t)&&(t=K2(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=t_),i.ending?r_(this,r):(a||i_(this,i,t,r))&&(i.pendingcb++,n=o_(this,i,a,t,e,r)),n};Ge.prototype.cork=function(){this._writableState.corked++};Ge.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&od(this,t))};Ge.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new e_(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ge.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function n_(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ta.from(e,r)),e}Object.defineProperty(Ge.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o_(t,e,r,i,n,a){if(!r){var f=n_(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var y=e.objectMode?1:i.length;e.length+=y;var b=e.length<e.highWaterMark;if(b||(e.needDrain=!0),e.writing||e.corked){var S=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},S?S.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else vs(t,e,!1,y,i,n,a);return b}function vs(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new X2("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function a_(t,e,r,i,n){--e.pendingcb,r?(E.default.nextTick(n,i),E.default.nextTick(Rn,t,e),t._writableState.errorEmitted=!0,Ii(t,i)):(n(i),t._writableState.errorEmitted=!0,Ii(t,i),Rn(t,e))}function f_(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function s_(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Z2;if(f_(r),e)a_(t,r,i,e,n);else{var a=ad(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&od(t,r),i?E.default.nextTick(rd,t,r,a,n):rd(t,r,a,n)}}function rd(t,e,r,i){r||u_(t,e),e.pendingcb--,i(),Rn(t,e)}function u_(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function od(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,y=!0;r;)n[f]=r,r.isBuf||(y=!1),r=r.next,f+=1;n.allBuffers=y,vs(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new id(e),e.bufferedRequestCount=0}else{for(;r;){var b=r.chunk,S=r.encoding,A=r.callback,q=e.objectMode?1:b.length;if(vs(t,e,!1,q,b,S,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ge.prototype._write=function(t,e,r){r(new z2("_write()"))};Ge.prototype._writev=null;Ge.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||c_(this,i,r),this};Object.defineProperty(Ge.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ad(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function h_(t,e){t._final(function(r){e.pendingcb--,r&&Ii(t,r),e.prefinished=!0,t.emit("prefinish"),Rn(t,e)})}function l_(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,E.default.nextTick(h_,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Rn(t,e){var r=ad(e);if(r&&(l_(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function c_(t,e,r){e.ending=!0,Rn(t,e),r&&(e.finished?E.default.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function d_(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ge.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Ge.prototype.destroy=ys.destroy;Ge.prototype._undestroy=ys.undestroy;Ge.prototype._destroy=function(t,e){e(t)}});var zr=B((eB,ud)=>{"use strict";w();var p_=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ud.exports=Lt;var sd=ws(),bs=gs();X()(Lt,sd);for(ms=p_(bs.prototype),ra=0;ra<ms.length;ra++)ia=ms[ra],Lt.prototype[ia]||(Lt.prototype[ia]=bs.prototype[ia]);var ms,ia,ra;function Lt(t){if(!(this instanceof Lt))return new Lt(t);sd.call(this,t),bs.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v_)))}Object.defineProperty(Lt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Lt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Lt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v_(){this._writableState.ended||E.default.nextTick(y_,this)}function y_(t){t.end()}Object.defineProperty(Lt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var cd=B((_s,ld)=>{w();var na=ft(),zt=na.Buffer;function hd(t,e){for(var r in t)e[r]=t[r]}zt.from&&zt.alloc&&zt.allocUnsafe&&zt.allocUnsafeSlow?ld.exports=na:(hd(na,_s),_s.Buffer=ki);function ki(t,e,r){return zt(t,e,r)}hd(zt,ki);ki.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return zt(t,e,r)};ki.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=zt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};ki.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return zt(t)};ki.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return na.SlowBuffer(t)}});var Ci=B(pd=>{"use strict";w();var Ms=cd().Buffer,dd=Ms.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g_(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function m_(t){var e=g_(t);if(typeof e!="string"&&(Ms.isEncoding===dd||!dd(t)))throw new Error("Unknown encoding: "+t);return e||t}pd.StringDecoder=Tn;function Tn(t){this.encoding=m_(t);var e;switch(this.encoding){case"utf16le":this.text=E_,this.end=S_,e=4;break;case"utf8":this.fillLast=__,e=4;break;case"base64":this.text=B_,this.end=A_,e=3;break;default:this.write=R_,this.end=q_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ms.allocUnsafe(e)}Tn.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Tn.prototype.end=M_;Tn.prototype.text=x_;Tn.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function xs(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function b_(t,e,r){var i=e.length-1;if(i<r)return 0;var n=xs(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=xs(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=xs(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function w_(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function __(t){var e=this.lastTotal-this.lastNeed,r=w_(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function x_(t,e){var r=b_(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function M_(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function E_(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function S_(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function B_(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function A_(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function R_(t){return t.toString(this.encoding)}function q_(t){return t&&t.length?this.write(t):""}});var oa=B((oB,gd)=>{"use strict";w();var vd=$r().codes.ERR_STREAM_PREMATURE_CLOSE;function T_(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function I_(){}function k_(t){return t.setHeader&&typeof t.abort=="function"}function yd(t,e,r){if(typeof e=="function")return yd(t,null,e);e||(e={}),r=T_(r||I_);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||y()},f=t._writableState&&t._writableState.finished,y=function(){n=!1,f=!0,i||r.call(t)},b=t._readableState&&t._readableState.endEmitted,S=function(){i=!1,b=!0,n||r.call(t)},A=function(H){r.call(t,H)},q=function(){var H;if(i&&!b)return(!t._readableState||!t._readableState.ended)&&(H=new vd),r.call(t,H);if(n&&!f)return(!t._writableState||!t._writableState.ended)&&(H=new vd),r.call(t,H)},k=function(){t.req.on("finish",y)};return k_(t)?(t.on("complete",y),t.on("abort",q),t.req?k():t.on("request",k)):n&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",S),t.on("finish",y),e.error!==!1&&t.on("error",A),t.on("close",q),function(){t.removeListener("complete",y),t.removeListener("abort",q),t.removeListener("request",k),t.req&&t.req.removeListener("finish",y),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",y),t.removeListener("end",S),t.removeListener("error",A),t.removeListener("close",q)}}gd.exports=yd});var bd=B((fB,md)=>{"use strict";w();var aa;function hr(t,e,r){return e=C_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C_(t){var e=O_(t,"string");return typeof e=="symbol"?e:String(e)}function O_(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var P_=oa(),lr=Symbol("lastResolve"),Zr=Symbol("lastReject"),In=Symbol("error"),fa=Symbol("ended"),Yr=Symbol("lastPromise"),Es=Symbol("handlePromise"),Xr=Symbol("stream");function cr(t,e){return{value:t,done:e}}function D_(t){var e=t[lr];if(e!==null){var r=t[Xr].read();r!==null&&(t[Yr]=null,t[lr]=null,t[Zr]=null,e(cr(r,!1)))}}function U_(t){E.default.nextTick(D_,t)}function N_(t,e){return function(r,i){t.then(function(){if(e[fa]){r(cr(void 0,!0));return}e[Es](r,i)},i)}}var L_=Object.getPrototypeOf(function(){}),F_=Object.setPrototypeOf((aa={get stream(){return this[Xr]},next:function(){var e=this,r=this[In];if(r!==null)return Promise.reject(r);if(this[fa])return Promise.resolve(cr(void 0,!0));if(this[Xr].destroyed)return new Promise(function(f,y){E.default.nextTick(function(){e[In]?y(e[In]):f(cr(void 0,!0))})});var i=this[Yr],n;if(i)n=new Promise(N_(i,this));else{var a=this[Xr].read();if(a!==null)return Promise.resolve(cr(a,!1));n=new Promise(this[Es])}return this[Yr]=n,n}},hr(aa,Symbol.asyncIterator,function(){return this}),hr(aa,"return",function(){var e=this;return new Promise(function(r,i){e[Xr].destroy(null,function(n){if(n){i(n);return}r(cr(void 0,!0))})})}),aa),L_),j_=function(e){var r,i=Object.create(F_,(r={},hr(r,Xr,{value:e,writable:!0}),hr(r,lr,{value:null,writable:!0}),hr(r,Zr,{value:null,writable:!0}),hr(r,In,{value:null,writable:!0}),hr(r,fa,{value:e._readableState.endEmitted,writable:!0}),hr(r,Es,{value:function(a,f){var y=i[Xr].read();y?(i[Yr]=null,i[lr]=null,i[Zr]=null,a(cr(y,!1))):(i[lr]=a,i[Zr]=f)},writable:!0}),r));return i[Yr]=null,P_(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[Zr];a!==null&&(i[Yr]=null,i[lr]=null,i[Zr]=null,a(n)),i[In]=n;return}var f=i[lr];f!==null&&(i[Yr]=null,i[lr]=null,i[Zr]=null,f(cr(void 0,!0))),i[fa]=!0}),e.on("readable",U_.bind(null,i)),i};md.exports=j_});var _d=B((uB,wd)=>{w();wd.exports=function(){throw new Error("Readable.from is not available in the browser")}});var ws=B((cB,Id)=>{"use strict";w();Id.exports=Ue;var Oi;Ue.ReadableState=Sd;var lB=wi().EventEmitter,Ed=function(e,r){return e.listeners(r).length},Cn=qf(),sa=ft().Buffer,H_=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function K_(t){return sa.from(t)}function W_(t){return sa.isBuffer(t)||t instanceof H_}var Ss=An(),Ce;Ss&&Ss.debuglog?Ce=Ss.debuglog("stream"):Ce=function(){};var G_=zc(),ks=ls(),V_=cs(),$_=V_.getHighWaterMark,ua=$r().codes,z_=ua.ERR_INVALID_ARG_TYPE,Z_=ua.ERR_STREAM_PUSH_AFTER_EOF,Y_=ua.ERR_METHOD_NOT_IMPLEMENTED,X_=ua.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Pi,Bs,As;X()(Ue,Cn);var kn=ks.errorOrDestroy,Rs=["error","close","destroy","pause","resume"];function J_(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Sd(t,e,r){Oi=Oi||zr(),t=t||{},typeof r!="boolean"&&(r=e instanceof Oi),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=$_(this,t,"readableHighWaterMark",r),this.buffer=new G_,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Pi||(Pi=Ci().StringDecoder),this.decoder=new Pi(t.encoding),this.encoding=t.encoding)}function Ue(t){if(Oi=Oi||zr(),!(this instanceof Ue))return new Ue(t);var e=this instanceof Oi;this._readableState=new Sd(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Cn.call(this)}Object.defineProperty(Ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ue.prototype.destroy=ks.destroy;Ue.prototype._undestroy=ks.undestroy;Ue.prototype._destroy=function(t,e){e(t)};Ue.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=sa.from(t,e),e=""),i=!0),Bd(this,t,e,!1,i)};Ue.prototype.unshift=function(t){return Bd(this,t,null,!0,!1)};function Bd(t,e,r,i,n){Ce("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,tx(t,a);else{var f;if(n||(f=Q_(a,e)),f)kn(t,f);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==sa.prototype&&(e=K_(e)),i)a.endEmitted?kn(t,new X_):qs(t,a,e,!0);else if(a.ended)kn(t,new Z_);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?qs(t,a,e,!1):Is(t,a)):qs(t,a,e,!1)}else i||(a.reading=!1,Is(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function qs(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&ha(t)),Is(t,e)}function Q_(t,e){var r;return!W_(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new z_("chunk",["string","Buffer","Uint8Array"],e)),r}Ue.prototype.isPaused=function(){return this._readableState.flowing===!1};Ue.prototype.setEncoding=function(t){Pi||(Pi=Ci().StringDecoder);var e=new Pi(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var xd=1073741824;function ex(t){return t>=xd?t=xd:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Md(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=ex(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ue.prototype.read=function(t){Ce("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ce("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Ts(this):ha(this),null;if(t=Md(t,e),t===0&&e.ended)return e.length===0&&Ts(this),null;var i=e.needReadable;Ce("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ce("length less than watermark",i)),e.ended||e.reading?(i=!1,Ce("reading or ended",i)):i&&(Ce("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Md(r,e)));var n;return t>0?n=qd(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Ts(this)),n!==null&&this.emit("data",n),n};function tx(t,e){if(Ce("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?ha(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ad(t)))}}function ha(t){var e=t._readableState;Ce("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ce("emitReadable",e.flowing),e.emittedReadable=!0,E.default.nextTick(Ad,t))}function Ad(t){var e=t._readableState;Ce("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Cs(t)}function Is(t,e){e.readingMore||(e.readingMore=!0,E.default.nextTick(rx,t,e))}function rx(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ce("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Ue.prototype._read=function(t){kn(this,new Y_("_read()"))};Ue.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ce("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==E.default.stdout&&t!==E.default.stderr,a=n?y:Z;i.endEmitted?E.default.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(ke,V){Ce("onunpipe"),ke===r&&V&&V.hasUnpiped===!1&&(V.hasUnpiped=!0,A())}function y(){Ce("onend"),t.end()}var b=ix(r);t.on("drain",b);var S=!1;function A(){Ce("cleanup"),t.removeListener("close",P),t.removeListener("finish",H),t.removeListener("drain",b),t.removeListener("error",k),t.removeListener("unpipe",f),r.removeListener("end",y),r.removeListener("end",Z),r.removeListener("data",q),S=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&b()}r.on("data",q);function q(ke){Ce("ondata");var V=t.write(ke);Ce("dest.write",V),V===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Td(i.pipes,t)!==-1)&&!S&&(Ce("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function k(ke){Ce("onerror",ke),Z(),t.removeListener("error",k),Ed(t,"error")===0&&kn(t,ke)}J_(t,"error",k);function P(){t.removeListener("finish",H),Z()}t.once("close",P);function H(){Ce("onfinish"),t.removeListener("close",P),Z()}t.once("finish",H);function Z(){Ce("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ce("pipe resume"),r.resume()),t};function ix(t){return function(){var r=t._readableState;Ce("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ed(t,"data")&&(r.flowing=!0,Cs(t))}}Ue.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Td(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Ue.prototype.on=function(t,e){var r=Cn.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ce("on readable",i.length,i.reading),i.length?ha(this):i.reading||E.default.nextTick(nx,this)),r};Ue.prototype.addListener=Ue.prototype.on;Ue.prototype.removeListener=function(t,e){var r=Cn.prototype.removeListener.call(this,t,e);return t==="readable"&&E.default.nextTick(Rd,this),r};Ue.prototype.removeAllListeners=function(t){var e=Cn.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&E.default.nextTick(Rd,this),e};function Rd(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function nx(t){Ce("readable nexttick read 0"),t.read(0)}Ue.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ce("resume"),t.flowing=!t.readableListening,ox(this,t)),t.paused=!1,this};function ox(t,e){e.resumeScheduled||(e.resumeScheduled=!0,E.default.nextTick(ax,t,e))}function ax(t,e){Ce("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Cs(t),e.flowing&&!e.reading&&t.read(0)}Ue.prototype.pause=function(){return Ce("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Cs(t){var e=t._readableState;for(Ce("flow",e.flowing);e.flowing&&t.read()!==null;);}Ue.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ce("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ce("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var y=e.push(f);y||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(y){return function(){return t[y].apply(t,arguments)}})(n));for(var a=0;a<Rs.length;a++)t.on(Rs[a],this.emit.bind(this,Rs[a]));return this._read=function(f){Ce("wrapped _read",f),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(Ue.prototype[Symbol.asyncIterator]=function(){return Bs===void 0&&(Bs=bd()),Bs(this)});Object.defineProperty(Ue.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ue.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ue.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Ue._fromList=qd;Object.defineProperty(Ue.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function qd(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Ts(t){var e=t._readableState;Ce("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,E.default.nextTick(fx,e,t))}function fx(t,e){if(Ce("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Ue.from=function(t,e){return As===void 0&&(As=_d()),As(Ue,t,e)});function Td(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Os=B((pB,Cd)=>{"use strict";w();Cd.exports=Zt;var la=$r().codes,sx=la.ERR_METHOD_NOT_IMPLEMENTED,ux=la.ERR_MULTIPLE_CALLBACK,hx=la.ERR_TRANSFORM_ALREADY_TRANSFORMING,lx=la.ERR_TRANSFORM_WITH_LENGTH_0,ca=zr();X()(Zt,ca);function cx(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new ux);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Zt(t){if(!(this instanceof Zt))return new Zt(t);ca.call(this,t),this._transformState={afterTransform:cx.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",dx)}function dx(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){kd(t,e,r)}):kd(this,null,null)}Zt.prototype.push=function(t,e){return this._transformState.needTransform=!1,ca.prototype.push.call(this,t,e)};Zt.prototype._transform=function(t,e,r){r(new sx("_transform()"))};Zt.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Zt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Zt.prototype._destroy=function(t,e){ca.prototype._destroy.call(this,t,function(r){e(r)})};function kd(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new lx;if(t._transformState.transforming)throw new hx;return t.push(null)}});var Dd=B((yB,Pd)=>{"use strict";w();Pd.exports=On;var Od=Os();X()(On,Od);function On(t){if(!(this instanceof On))return new On(t);Od.call(this,t)}On.prototype._transform=function(t,e,r){r(null,t)}});var jd=B((mB,Fd)=>{"use strict";w();var Ps;function px(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Ld=$r().codes,vx=Ld.ERR_MISSING_ARGS,yx=Ld.ERR_STREAM_DESTROYED;function Ud(t){if(t)throw t}function gx(t){return t.setHeader&&typeof t.abort=="function"}function mx(t,e,r,i){i=px(i);var n=!1;t.on("close",function(){n=!0}),Ps===void 0&&(Ps=oa()),Ps(t,{readable:e,writable:r},function(f){if(f)return i(f);n=!0,i()});var a=!1;return function(f){if(!n&&!a){if(a=!0,gx(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(f||new yx("pipe"))}}}function Nd(t){t()}function bx(t,e){return t.pipe(e)}function wx(t){return!t.length||typeof t[t.length-1]!="function"?Ud:t.pop()}function _x(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=wx(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new vx("streams");var n,a=e.map(function(f,y){var b=y<e.length-1,S=y>0;return mx(f,b,S,function(A){n||(n=A),A&&a.forEach(Nd),!b&&(a.forEach(Nd),i(n))})});return e.reduce(bx)}Fd.exports=_x});var Us=B((wB,Hd)=>{w();Hd.exports=yt;var Ds=wi().EventEmitter,xx=X();xx(yt,Ds);yt.Readable=ws();yt.Writable=gs();yt.Duplex=zr();yt.Transform=Os();yt.PassThrough=Dd();yt.finished=oa();yt.pipeline=jd();yt.Stream=yt;function yt(){Ds.call(this)}yt.prototype.pipe=function(t,e){var r=this;function i(A){t.writable&&t.write(A)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}t.on("drain",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",f),r.on("close",y));var a=!1;function f(){a||(a=!0,t.end())}function y(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function b(A){if(S(),Ds.listenerCount(this,"error")===0)throw A}r.on("error",b),t.on("error",b);function S(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",f),r.removeListener("close",y),r.removeListener("error",b),t.removeListener("error",b),r.removeListener("end",S),r.removeListener("close",S),t.removeListener("close",S)}return r.on("end",S),r.on("close",S),t.on("close",S),t.emit("pipe",r),t}});var Gd=B((xB,Wd)=>{"use strict";w();var Ft=Te().Buffer,Kd=Us().Transform,Mx=X();function dr(t){Kd.call(this),this._block=Ft.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Mx(dr,Kd);dr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};dr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};var Ex=typeof Uint8Array<"u",Sx=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(Ft.prototype instanceof Uint8Array||Ft.TYPED_ARRAY_SUPPORT);function Bx(t,e){if(t instanceof Ft)return t;if(typeof t=="string")return Ft.from(t,e);if(Sx&&ArrayBuffer.isView(t)){if(t.byteLength===0)return Ft.alloc(0);var r=Ft.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(Ex&&t instanceof Uint8Array||Ft.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Ft.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}dr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=Bx(t,e);for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,f=t.length*8;f>0;++a)this._length[a]+=f,f=this._length[a]/4294967296|0,f>0&&(this._length[a]-=4294967296*f);return this};dr.prototype._update=function(){throw new Error("_update is not implemented")};dr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};dr.prototype._digest=function(){throw new Error("_digest is not implemented")};Wd.exports=dr});var va=B((EB,$d)=>{"use strict";w();var Ax=X(),Vd=Gd(),Rx=Te().Buffer,qx=new Array(16);function da(){Vd.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}Ax(da,Vd);da.prototype._update=function(){for(var t=qx,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,i=this._b,n=this._c,a=this._d;r=tt(r,i,n,a,t[0],3614090360,7),a=tt(a,r,i,n,t[1],3905402710,12),n=tt(n,a,r,i,t[2],606105819,17),i=tt(i,n,a,r,t[3],3250441966,22),r=tt(r,i,n,a,t[4],4118548399,7),a=tt(a,r,i,n,t[5],1200080426,12),n=tt(n,a,r,i,t[6],2821735955,17),i=tt(i,n,a,r,t[7],4249261313,22),r=tt(r,i,n,a,t[8],1770035416,7),a=tt(a,r,i,n,t[9],2336552879,12),n=tt(n,a,r,i,t[10],4294925233,17),i=tt(i,n,a,r,t[11],2304563134,22),r=tt(r,i,n,a,t[12],1804603682,7),a=tt(a,r,i,n,t[13],4254626195,12),n=tt(n,a,r,i,t[14],2792965006,17),i=tt(i,n,a,r,t[15],1236535329,22),r=rt(r,i,n,a,t[1],4129170786,5),a=rt(a,r,i,n,t[6],3225465664,9),n=rt(n,a,r,i,t[11],643717713,14),i=rt(i,n,a,r,t[0],3921069994,20),r=rt(r,i,n,a,t[5],3593408605,5),a=rt(a,r,i,n,t[10],38016083,9),n=rt(n,a,r,i,t[15],3634488961,14),i=rt(i,n,a,r,t[4],3889429448,20),r=rt(r,i,n,a,t[9],568446438,5),a=rt(a,r,i,n,t[14],3275163606,9),n=rt(n,a,r,i,t[3],4107603335,14),i=rt(i,n,a,r,t[8],1163531501,20),r=rt(r,i,n,a,t[13],2850285829,5),a=rt(a,r,i,n,t[2],4243563512,9),n=rt(n,a,r,i,t[7],1735328473,14),i=rt(i,n,a,r,t[12],2368359562,20),r=it(r,i,n,a,t[5],4294588738,4),a=it(a,r,i,n,t[8],2272392833,11),n=it(n,a,r,i,t[11],1839030562,16),i=it(i,n,a,r,t[14],4259657740,23),r=it(r,i,n,a,t[1],2763975236,4),a=it(a,r,i,n,t[4],1272893353,11),n=it(n,a,r,i,t[7],4139469664,16),i=it(i,n,a,r,t[10],3200236656,23),r=it(r,i,n,a,t[13],681279174,4),a=it(a,r,i,n,t[0],3936430074,11),n=it(n,a,r,i,t[3],3572445317,16),i=it(i,n,a,r,t[6],76029189,23),r=it(r,i,n,a,t[9],3654602809,4),a=it(a,r,i,n,t[12],3873151461,11),n=it(n,a,r,i,t[15],530742520,16),i=it(i,n,a,r,t[2],3299628645,23),r=nt(r,i,n,a,t[0],4096336452,6),a=nt(a,r,i,n,t[7],1126891415,10),n=nt(n,a,r,i,t[14],2878612391,15),i=nt(i,n,a,r,t[5],4237533241,21),r=nt(r,i,n,a,t[12],1700485571,6),a=nt(a,r,i,n,t[3],2399980690,10),n=nt(n,a,r,i,t[10],4293915773,15),i=nt(i,n,a,r,t[1],2240044497,21),r=nt(r,i,n,a,t[8],1873313359,6),a=nt(a,r,i,n,t[15],4264355552,10),n=nt(n,a,r,i,t[6],2734768916,15),i=nt(i,n,a,r,t[13],1309151649,21),r=nt(r,i,n,a,t[4],4149444226,6),a=nt(a,r,i,n,t[11],3174756917,10),n=nt(n,a,r,i,t[2],718787259,15),i=nt(i,n,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0};da.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Rx.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function pa(t,e){return t<<e|t>>>32-e}function tt(t,e,r,i,n,a,f){return pa(t+(e&r|~e&i)+n+a|0,f)+e|0}function rt(t,e,r,i,n,a,f){return pa(t+(e&i|r&~i)+n+a|0,f)+e|0}function it(t,e,r,i,n,a,f){return pa(t+(e^r^i)+n+a|0,f)+e|0}function nt(t,e,r,i,n,a,f){return pa(t+(r^(e|~i))+n+a|0,f)+e|0}$d.exports=da});var Zd=B((BB,zd)=>{w();var Tx={}.toString;zd.exports=Array.isArray||function(t){return Tx.call(t)=="[object Array]"}});var Xd=B((RB,Yd)=>{"use strict";w();var Ix=jr(),kx=Wr(),Cx=kx("TypedArray.prototype.buffer",!0),Ox=ts();Yd.exports=Cx||function(e){if(!Ox(e))throw new Ix("Not a Typed Array");return e.buffer}});var Pn=B((TB,Qd)=>{"use strict";w();var St=Te().Buffer,Px=Zd(),Dx=Xd(),Ux=ArrayBuffer.isView||function(e){try{return Dx(e),!0}catch{return!1}},Nx=typeof Uint8Array<"u",Jd=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",Lx=Jd&&(St.prototype instanceof Uint8Array||St.TYPED_ARRAY_SUPPORT);Qd.exports=function(e,r){if(St.isBuffer(e))return e.constructor&&!("isBuffer"in e)?St.from(e):e;if(typeof e=="string")return St.from(e,r);if(Jd&&Ux(e)){if(e.byteLength===0)return St.alloc(0);if(Lx){var i=St.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var n=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=St.from(n);if(a.length===e.byteLength)return a}if(Nx&&e instanceof Uint8Array)return St.from(e);var f=Px(e);if(f)for(var y=0;y<e.length;y+=1){var b=e[y];if(typeof b!="number"||b<0||b>255||~~b!==b)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||St.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return St.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var ip=B((kB,rp)=>{"use strict";w();var Fx=Te().Buffer,jx=Pn(),tp=typeof Uint8Array<"u",Hx=tp&&typeof ArrayBuffer<"u",ep=Hx&&ArrayBuffer.isView;rp.exports=function(t,e){if(typeof t=="string"||Fx.isBuffer(t)||tp&&t instanceof Uint8Array||ep&&ep(t))return jx(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Dn=B((OB,Ns)=>{"use strict";w();typeof E.default>"u"||!E.default.version||E.default.version.indexOf("v0.")===0||E.default.version.indexOf("v1.")===0&&E.default.version.indexOf("v1.8.")!==0?Ns.exports={nextTick:Kx}:Ns.exports=E.default;function Kx(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,f;switch(n){case 0:case 1:return E.default.nextTick(t);case 2:return E.default.nextTick(function(){t.call(null,e)});case 3:return E.default.nextTick(function(){t.call(null,e,r)});case 4:return E.default.nextTick(function(){t.call(null,e,r,i)});default:for(a=new Array(n-1),f=0;f<a.length;)a[f++]=arguments[f];return E.default.nextTick(function(){t.apply(null,a)})}}});var op=B((DB,np)=>{w();var Wx={}.toString;np.exports=Array.isArray||function(t){return Wx.call(t)=="[object Array]"}});var Ls=B((NB,ap)=>{w();ap.exports=wi().EventEmitter});var ga=B((Fs,sp)=>{w();var ya=ft(),Yt=ya.Buffer;function fp(t,e){for(var r in t)e[r]=t[r]}Yt.from&&Yt.alloc&&Yt.allocUnsafe&&Yt.allocUnsafeSlow?sp.exports=ya:(fp(ya,Fs),Fs.Buffer=Di);function Di(t,e,r){return Yt(t,e,r)}fp(Yt,Di);Di.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Yt(t,e,r)};Di.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Yt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Di.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Yt(t)};Di.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ya.SlowBuffer(t)}});var Ui=B(ot=>{w();function Gx(t){return Array.isArray?Array.isArray(t):ma(t)==="[object Array]"}ot.isArray=Gx;function Vx(t){return typeof t=="boolean"}ot.isBoolean=Vx;function $x(t){return t===null}ot.isNull=$x;function zx(t){return t==null}ot.isNullOrUndefined=zx;function Zx(t){return typeof t=="number"}ot.isNumber=Zx;function Yx(t){return typeof t=="string"}ot.isString=Yx;function Xx(t){return typeof t=="symbol"}ot.isSymbol=Xx;function Jx(t){return t===void 0}ot.isUndefined=Jx;function Qx(t){return ma(t)==="[object RegExp]"}ot.isRegExp=Qx;function e6(t){return typeof t=="object"&&t!==null}ot.isObject=e6;function t6(t){return ma(t)==="[object Date]"}ot.isDate=t6;function r6(t){return ma(t)==="[object Error]"||t instanceof Error}ot.isError=r6;function i6(t){return typeof t=="function"}ot.isFunction=i6;function n6(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ot.isPrimitive=n6;ot.isBuffer=ft().Buffer.isBuffer;function ma(t){return Object.prototype.toString.call(t)}});var hp=B((KB,js)=>{"use strict";w();function o6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var up=ga().Buffer,Un=An();function a6(t,e,r){t.copy(e,r)}js.exports=(function(){function t(){o6(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return up.alloc(0);for(var i=up.allocUnsafe(r>>>0),n=this.head,a=0;n;)a6(n.data,i,a),a+=n.data.length,n=n.next;return i},t})();Un&&Un.inspect&&Un.inspect.custom&&(js.exports.prototype[Un.inspect.custom]=function(){var t=Un.inspect({length:this.length});return this.constructor.name+" "+t})});var Hs=B((GB,lp)=>{"use strict";w();var ba=Dn();function f6(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ba.nextTick(wa,this,t)):ba.nextTick(wa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,ba.nextTick(wa,r,a)):ba.nextTick(wa,r,a):e&&e(a)}),this)}function s6(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function wa(t,e){t.emit("error",e)}lp.exports={destroy:f6,undestroy:s6}});var Ws=B(($B,bp)=>{"use strict";w();var Jr=Dn();bp.exports=$e;function dp(t){var e=this;this.next=null,this.entry=null,this.finish=function(){B6(e,t)}}var u6=!E.default.browser&&["v0.10","v0.9."].indexOf(E.default.version.slice(0,5))>-1?setImmediate:Jr.nextTick,Ni;$e.WritableState=Ln;var pp=Object.create(Ui());pp.inherits=X();var h6={deprecate:ps()},vp=Ls(),xa=ga().Buffer,l6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c6(t){return xa.from(t)}function d6(t){return xa.isBuffer(t)||t instanceof l6}var yp=Hs();pp.inherits($e,vp);function p6(){}function Ln(t,e){Ni=Ni||Qr(),t=t||{};var r=e instanceof Ni;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=t.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(y){_6(e,y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new dp(this)}Ln.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ln.prototype,"buffer",{get:h6.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var _a;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_a=Function.prototype[Symbol.hasInstance],Object.defineProperty($e,Symbol.hasInstance,{value:function(t){return _a.call(this,t)?!0:this!==$e?!1:t&&t._writableState instanceof Ln}})):_a=function(t){return t instanceof this};function $e(t){if(Ni=Ni||Qr(),!_a.call($e,this)&&!(this instanceof Ni))return new $e(t);this._writableState=new Ln(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),vp.call(this)}$e.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function v6(t,e){var r=new Error("write after end");t.emit("error",r),Jr.nextTick(e,r)}function y6(t,e,r,i){var n=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),Jr.nextTick(i,a),n=!1),n}$e.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&d6(t);return a&&!xa.isBuffer(t)&&(t=c6(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=p6),i.ended?v6(this,r):(a||y6(this,i,t,r))&&(i.pendingcb++,n=m6(this,i,a,t,e,r)),n};$e.prototype.cork=function(){var t=this._writableState;t.corked++};$e.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&gp(this,t))};$e.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function g6(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=xa.from(e,r)),e}Object.defineProperty($e.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m6(t,e,r,i,n,a){if(!r){var f=g6(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var y=e.objectMode?1:i.length;e.length+=y;var b=e.length<e.highWaterMark;if(b||(e.needDrain=!0),e.writing||e.corked){var S=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},S?S.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Ks(t,e,!1,y,i,n,a);return b}function Ks(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function b6(t,e,r,i,n){--e.pendingcb,r?(Jr.nextTick(n,i),Jr.nextTick(Nn,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Nn(t,e))}function w6(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function _6(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(w6(r),e)b6(t,r,i,e,n);else{var a=mp(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&gp(t,r),i?u6(cp,t,r,a,n):cp(t,r,a,n)}}function cp(t,e,r,i){r||x6(t,e),e.pendingcb--,i(),Nn(t,e)}function x6(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function gp(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,y=!0;r;)n[f]=r,r.isBuf||(y=!1),r=r.next,f+=1;n.allBuffers=y,Ks(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new dp(e),e.bufferedRequestCount=0}else{for(;r;){var b=r.chunk,S=r.encoding,A=r.callback,q=e.objectMode?1:b.length;if(Ks(t,e,!1,q,b,S,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}$e.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};$e.prototype._writev=null;$e.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||S6(this,i,r)};function mp(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function M6(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Nn(t,e)})}function E6(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Jr.nextTick(M6,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Nn(t,e){var r=mp(e);return r&&(E6(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function S6(t,e,r){e.ending=!0,Nn(t,e),r&&(e.finished?Jr.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function B6(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty($e.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});$e.prototype.destroy=yp.destroy;$e.prototype._undestroy=yp.undestroy;$e.prototype._destroy=function(t,e){this.end(),e(t)}});var Qr=B((ZB,Mp)=>{"use strict";w();var wp=Dn(),A6=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Mp.exports=Xt;var _p=Object.create(Ui());_p.inherits=X();var xp=$s(),Vs=Ws();_p.inherits(Xt,xp);for(Gs=A6(Vs.prototype),Ma=0;Ma<Gs.length;Ma++)Ea=Gs[Ma],Xt.prototype[Ea]||(Xt.prototype[Ea]=Vs.prototype[Ea]);var Gs,Ea,Ma;function Xt(t){if(!(this instanceof Xt))return new Xt(t);xp.call(this,t),Vs.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",R6)}Object.defineProperty(Xt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R6(){this.allowHalfOpen||this._writableState.ended||wp.nextTick(q6,this)}function q6(t){t.end()}Object.defineProperty(Xt.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Xt.prototype._destroy=function(t,e){this.push(null),this.end(),wp.nextTick(e,t)}});var $s=B((JB,Pp)=>{"use strict";w();var Fi=Dn();Pp.exports=je;var T6=op(),Fn;je.ReadableState=Tp;var XB=wi().EventEmitter,Ap=function(t,e){return t.listeners(e).length},Js=Ls(),jn=ga().Buffer,I6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function k6(t){return jn.from(t)}function C6(t){return jn.isBuffer(t)||t instanceof I6}var Rp=Object.create(Ui());Rp.inherits=X();var zs=An(),Ne=void 0;zs&&zs.debuglog?Ne=zs.debuglog("stream"):Ne=function(){};var O6=hp(),qp=Hs(),Li;Rp.inherits(je,Js);var Zs=["error","close","destroy","pause","resume"];function P6(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):T6(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Tp(t,e){Fn=Fn||Qr(),t=t||{};var r=e instanceof Fn;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new O6,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Li||(Li=Ci().StringDecoder),this.decoder=new Li(t.encoding),this.encoding=t.encoding)}function je(t){if(Fn=Fn||Qr(),!(this instanceof je))return new je(t);this._readableState=new Tp(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Js.call(this)}Object.defineProperty(je.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});je.prototype.destroy=qp.destroy;je.prototype._undestroy=qp.undestroy;je.prototype._destroy=function(t,e){this.push(null),e(t)};je.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=jn.from(t,e),e=""),i=!0),Ip(this,t,e,!1,i)};je.prototype.unshift=function(t){return Ip(this,t,null,!0,!1)};function Ip(t,e,r,i,n){var a=t._readableState;if(e===null)a.reading=!1,L6(t,a);else{var f;n||(f=D6(a,e)),f?t.emit("error",f):a.objectMode||e&&e.length>0?(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==jn.prototype&&(e=k6(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Ys(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?Ys(t,a,e,!1):kp(t,a)):Ys(t,a,e,!1))):i||(a.reading=!1)}return U6(a)}function Ys(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Sa(t)),kp(t,e)}function D6(t,e){var r;return!C6(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function U6(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}je.prototype.isPaused=function(){return this._readableState.flowing===!1};je.prototype.setEncoding=function(t){return Li||(Li=Ci().StringDecoder),this._readableState.decoder=new Li(t),this._readableState.encoding=t,this};var Ep=8388608;function N6(t){return t>=Ep?t=Ep:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Sp(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=N6(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}je.prototype.read=function(t){Ne("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ne("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Xs(this):Sa(this),null;if(t=Sp(t,e),t===0&&e.ended)return e.length===0&&Xs(this),null;var i=e.needReadable;Ne("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ne("length less than watermark",i)),e.ended||e.reading?(i=!1,Ne("reading or ended",i)):i&&(Ne("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Sp(r,e)));var n;return t>0?n=Cp(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Xs(this)),n!==null&&this.emit("data",n),n};function L6(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Sa(t)}}function Sa(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ne("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Fi.nextTick(Bp,t):Bp(t))}function Bp(t){Ne("emit readable"),t.emit("readable"),Qs(t)}function kp(t,e){e.readingMore||(e.readingMore=!0,Fi.nextTick(F6,t,e))}function F6(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ne("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}je.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};je.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ne("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==E.default.stdout&&t!==E.default.stderr,a=n?y:ke;i.endEmitted?Fi.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(V,Y){Ne("onunpipe"),V===r&&Y&&Y.hasUnpiped===!1&&(Y.hasUnpiped=!0,A())}function y(){Ne("onend"),t.end()}var b=j6(r);t.on("drain",b);var S=!1;function A(){Ne("cleanup"),t.removeListener("close",H),t.removeListener("finish",Z),t.removeListener("drain",b),t.removeListener("error",P),t.removeListener("unpipe",f),r.removeListener("end",y),r.removeListener("end",ke),r.removeListener("data",k),S=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&b()}var q=!1;r.on("data",k);function k(V){Ne("ondata"),q=!1;var Y=t.write(V);Y===!1&&!q&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Op(i.pipes,t)!==-1)&&!S&&(Ne("false write response, pause",i.awaitDrain),i.awaitDrain++,q=!0),r.pause())}function P(V){Ne("onerror",V),ke(),t.removeListener("error",P),Ap(t,"error")===0&&t.emit("error",V)}P6(t,"error",P);function H(){t.removeListener("finish",Z),ke()}t.once("close",H);function Z(){Ne("onfinish"),t.removeListener("close",H),ke()}t.once("finish",Z);function ke(){Ne("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ne("pipe resume"),r.resume()),t};function j6(t){return function(){var e=t._readableState;Ne("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&Ap(t,"data")&&(e.flowing=!0,Qs(t))}}je.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Op(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};je.prototype.on=function(t,e){var r=Js.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Sa(this):Fi.nextTick(H6,this))}return r};je.prototype.addListener=je.prototype.on;function H6(t){Ne("readable nexttick read 0"),t.read(0)}je.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ne("resume"),t.flowing=!0,K6(this,t)),this};function K6(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Fi.nextTick(W6,t,e))}function W6(t,e){e.reading||(Ne("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Qs(t),e.flowing&&!e.reading&&t.read(0)}je.prototype.pause=function(){return Ne("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ne("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Qs(t){var e=t._readableState;for(Ne("flow",e.flowing);e.flowing&&t.read()!==null;);}je.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ne("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ne("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var y=e.push(f);y||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(f){return function(){return t[f].apply(t,arguments)}})(n));for(var a=0;a<Zs.length;a++)t.on(Zs[a],this.emit.bind(this,Zs[a]));return this._read=function(f){Ne("wrapped _read",f),i&&(i=!1,t.resume())},this};Object.defineProperty(je.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});je._fromList=Cp;function Cp(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=G6(t,e.buffer,e.decoder),r}function G6(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?V6(t,e):$6(t,e),i}function V6(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,f=t>a.length?a.length:t;if(f===a.length?n+=a:n+=a.slice(0,t),t-=f,t===0){f===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(f));break}++i}return e.length-=i,n}function $6(t,e){var r=jn.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,f=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,f),t-=f,t===0){f===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(f));break}++n}return e.length-=n,r}function Xs(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Fi.nextTick(z6,e,t))}function z6(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Op(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var eu=B((eA,Np)=>{"use strict";w();Np.exports=Jt;var Ba=Qr(),Up=Object.create(Ui());Up.inherits=X();Up.inherits(Jt,Ba);function Z6(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Jt(t){if(!(this instanceof Jt))return new Jt(t);Ba.call(this,t),this._transformState={afterTransform:Z6.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Y6)}function Y6(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Dp(t,e,r)}):Dp(this,null,null)}Jt.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ba.prototype.push.call(this,t,e)};Jt.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Jt.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Jt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Jt.prototype._destroy=function(t,e){var r=this;Ba.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function Dp(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Hp=B((rA,jp)=>{"use strict";w();jp.exports=Hn;var Lp=eu(),Fp=Object.create(Ui());Fp.inherits=X();Fp.inherits(Hn,Lp);function Hn(t){if(!(this instanceof Hn))return new Hn(t);Lp.call(this,t)}Hn.prototype._transform=function(t,e,r){r(null,t)}});var Wp=B((jt,Kp)=>{w();jt=Kp.exports=$s();jt.Stream=jt;jt.Readable=jt;jt.Writable=Ws();jt.Duplex=Qr();jt.Transform=eu();jt.PassThrough=Hp()});var $p=B((oA,Vp)=>{"use strict";w();var X6=Te().Buffer,J6=ip(),Gp=Wp().Transform,Q6=X();function pr(t){Gp.call(this),this._block=X6.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Q6(pr,Gp);pr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};pr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};pr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=J6(t,e),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)i[a]=r[n],a+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var f=0,y=r.length*8;y>0;++f)this._length[f]+=y,y=this._length[f]/4294967296|0,y>0&&(this._length[f]-=4294967296*y);return this};pr.prototype._update=function(){throw new Error("_update is not implemented")};pr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};pr.prototype._digest=function(){throw new Error("_digest is not implemented")};Vp.exports=pr});var Ra=B((fA,ev)=>{"use strict";w();var tu=ft().Buffer,e3=X(),Qp=$p(),t3=new Array(16),Kn=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Wn=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Gn=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Vn=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],$n=[0,1518500249,1859775393,2400959708,2840853838],zn=[1352829926,1548603684,1836072691,2053994217,0];function ei(t,e){return t<<e|t>>>32-e}function zp(t,e,r,i,n,a,f,y){return ei(t+(e^r^i)+a+f|0,y)+n|0}function Zp(t,e,r,i,n,a,f,y){return ei(t+(e&r|~e&i)+a+f|0,y)+n|0}function Yp(t,e,r,i,n,a,f,y){return ei(t+((e|~r)^i)+a+f|0,y)+n|0}function Xp(t,e,r,i,n,a,f,y){return ei(t+(e&i|r&~i)+a+f|0,y)+n|0}function Jp(t,e,r,i,n,a,f,y){return ei(t+(e^(r|~i))+a+f|0,y)+n|0}function Aa(){Qp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}e3(Aa,Qp);Aa.prototype._update=function(){for(var t=t3,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=this._a|0,b=this._b|0,S=this._c|0,A=this._d|0,q=this._e|0,k=0;k<80;k+=1){var P,H;k<16?(P=zp(r,i,n,a,f,t[Kn[k]],$n[0],Gn[k]),H=Jp(y,b,S,A,q,t[Wn[k]],zn[0],Vn[k])):k<32?(P=Zp(r,i,n,a,f,t[Kn[k]],$n[1],Gn[k]),H=Xp(y,b,S,A,q,t[Wn[k]],zn[1],Vn[k])):k<48?(P=Yp(r,i,n,a,f,t[Kn[k]],$n[2],Gn[k]),H=Yp(y,b,S,A,q,t[Wn[k]],zn[2],Vn[k])):k<64?(P=Xp(r,i,n,a,f,t[Kn[k]],$n[3],Gn[k]),H=Zp(y,b,S,A,q,t[Wn[k]],zn[3],Vn[k])):(P=Jp(r,i,n,a,f,t[Kn[k]],$n[4],Gn[k]),H=zp(y,b,S,A,q,t[Wn[k]],zn[4],Vn[k])),r=f,f=a,a=ei(n,10),n=i,i=P,y=q,q=A,A=ei(S,10),S=b,b=H}var Z=this._b+n+A|0;this._b=this._c+a+q|0,this._c=this._d+f+y|0,this._d=this._e+r+b|0,this._e=this._a+i+S|0,this._a=Z};Aa.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=tu.alloc?tu.alloc(20):new tu(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};ev.exports=Aa});var ti=B((uA,tv)=>{"use strict";w();var r3=Te().Buffer,i3=Pn();function qa(t,e){this._block=r3.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}qa.prototype.update=function(t,e){t=i3(t,e||"utf8");for(var r=this._block,i=this._blockSize,n=t.length,a=this._len,f=0;f<n;){for(var y=a%i,b=Math.min(n-f,i-y),S=0;S<b;S++)r[y+S]=t[f+S];a+=b,f+=b,a%i===0&&this._update(r)}return this._len+=n,this};qa.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};qa.prototype._update=function(){throw new Error("_update must be implemented by subclass")};tv.exports=qa});var nv=B((lA,iv)=>{"use strict";w();var n3=X(),rv=ti(),o3=Te().Buffer,a3=[1518500249,1859775393,-1894007588,-899497514],f3=new Array(80);function Zn(){this.init(),this._w=f3,rv.call(this,64,56)}n3(Zn,rv);Zn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function s3(t){return t<<5|t>>>27}function u3(t){return t<<30|t>>>2}function h3(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Zn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=0;y<16;++y)e[y]=t.readInt32BE(y*4);for(;y<80;++y)e[y]=e[y-3]^e[y-8]^e[y-14]^e[y-16];for(var b=0;b<80;++b){var S=~~(b/20),A=s3(r)+h3(S,i,n,a)+f+e[b]+a3[S]|0;f=a,a=n,n=u3(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Zn.prototype._hash=function(){var t=o3.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};iv.exports=Zn});var fv=B((dA,av)=>{"use strict";w();var l3=X(),ov=ti(),c3=Te().Buffer,d3=[1518500249,1859775393,-1894007588,-899497514],p3=new Array(80);function Yn(){this.init(),this._w=p3,ov.call(this,64,56)}l3(Yn,ov);Yn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function v3(t){return t<<1|t>>>31}function y3(t){return t<<5|t>>>27}function g3(t){return t<<30|t>>>2}function m3(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Yn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=0;y<16;++y)e[y]=t.readInt32BE(y*4);for(;y<80;++y)e[y]=v3(e[y-3]^e[y-8]^e[y-14]^e[y-16]);for(var b=0;b<80;++b){var S=~~(b/20),A=y3(r)+m3(S,i,n,a)+f+e[b]+d3[S]|0;f=a,a=n,n=g3(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Yn.prototype._hash=function(){var t=c3.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};av.exports=Yn});var ru=B((vA,uv)=>{"use strict";w();var b3=X(),sv=ti(),w3=Te().Buffer,_3=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],x3=new Array(64);function Xn(){this.init(),this._w=x3,sv.call(this,64,56)}b3(Xn,sv);Xn.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function M3(t,e,r){return r^t&(e^r)}function E3(t,e,r){return t&e|r&(t|e)}function S3(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function B3(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function A3(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function R3(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Xn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,y=this._f|0,b=this._g|0,S=this._h|0,A=0;A<16;++A)e[A]=t.readInt32BE(A*4);for(;A<64;++A)e[A]=R3(e[A-2])+e[A-7]+A3(e[A-15])+e[A-16]|0;for(var q=0;q<64;++q){var k=S+B3(f)+M3(f,y,b)+_3[q]+e[q]|0,P=S3(r)+E3(r,i,n)|0;S=b,b=y,y=f,f=a+k|0,a=n,n=i,i=r,r=k+P|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0,this._f=y+this._f|0,this._g=b+this._g|0,this._h=S+this._h|0};Xn.prototype._hash=function(){var t=w3.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};uv.exports=Xn});var lv=B((gA,hv)=>{"use strict";w();var q3=X(),T3=ru(),I3=ti(),k3=Te().Buffer,C3=new Array(64);function Ta(){this.init(),this._w=C3,I3.call(this,64,56)}q3(Ta,T3);Ta.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Ta.prototype._hash=function(){var t=k3.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};hv.exports=Ta});var iu=B((bA,mv)=>{"use strict";w();var O3=X(),gv=ti(),P3=Te().Buffer,cv=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],D3=new Array(160);function Jn(){this.init(),this._w=D3,gv.call(this,128,112)}O3(Jn,gv);Jn.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function dv(t,e,r){return r^t&(e^r)}function pv(t,e,r){return t&e|r&(t|e)}function vv(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function yv(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function U3(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function N3(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function L3(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function F3(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Qe(t,e){return t>>>0<e>>>0?1:0}Jn.prototype._update=function(t){for(var e=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,a=this._dh|0,f=this._eh|0,y=this._fh|0,b=this._gh|0,S=this._hh|0,A=this._al|0,q=this._bl|0,k=this._cl|0,P=this._dl|0,H=this._el|0,Z=this._fl|0,ke=this._gl|0,V=this._hl|0,Y=0;Y<32;Y+=2)e[Y]=t.readInt32BE(Y*4),e[Y+1]=t.readInt32BE(Y*4+4);for(;Y<160;Y+=2){var He=e[Y-30],T=e[Y-30+1],C=U3(He,T),U=N3(T,He);He=e[Y-4],T=e[Y-4+1];var L=L3(He,T),F=F3(T,He),j=e[Y-14],M=e[Y-14+1],h=e[Y-32],v=e[Y-32+1],l=U+M|0,o=C+j+Qe(l,U)|0;l=l+F|0,o=o+L+Qe(l,F)|0,l=l+v|0,o=o+h+Qe(l,v)|0,e[Y]=o,e[Y+1]=l}for(var u=0;u<160;u+=2){o=e[u],l=e[u+1];var d=pv(r,i,n),g=pv(A,q,k),p=vv(r,A),s=vv(A,r),m=yv(f,H),_=yv(H,f),c=cv[u],x=cv[u+1],O=dv(f,y,b),N=dv(H,Z,ke),D=V+_|0,W=S+m+Qe(D,V)|0;D=D+N|0,W=W+O+Qe(D,N)|0,D=D+x|0,W=W+c+Qe(D,x)|0,D=D+l|0,W=W+o+Qe(D,l)|0;var K=s+g|0,G=p+d+Qe(K,s)|0;S=b,V=ke,b=y,ke=Z,y=f,Z=H,H=P+D|0,f=a+W+Qe(H,P)|0,a=n,P=k,n=i,k=q,i=r,q=A,A=D+K|0,r=W+G+Qe(A,D)|0}this._al=this._al+A|0,this._bl=this._bl+q|0,this._cl=this._cl+k|0,this._dl=this._dl+P|0,this._el=this._el+H|0,this._fl=this._fl+Z|0,this._gl=this._gl+ke|0,this._hl=this._hl+V|0,this._ah=this._ah+r+Qe(this._al,A)|0,this._bh=this._bh+i+Qe(this._bl,q)|0,this._ch=this._ch+n+Qe(this._cl,k)|0,this._dh=this._dh+a+Qe(this._dl,P)|0,this._eh=this._eh+f+Qe(this._el,H)|0,this._fh=this._fh+y+Qe(this._fl,Z)|0,this._gh=this._gh+b+Qe(this._gl,ke)|0,this._hh=this._hh+S+Qe(this._hl,V)|0};Jn.prototype._hash=function(){var t=P3.allocUnsafe(64);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};mv.exports=Jn});var wv=B((_A,bv)=>{"use strict";w();var j3=X(),H3=iu(),K3=ti(),W3=Te().Buffer,G3=new Array(160);function Ia(){this.init(),this._w=G3,K3.call(this,128,112)}j3(Ia,H3);Ia.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Ia.prototype._hash=function(){var t=W3.allocUnsafe(48);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};bv.exports=Ia});var ka=B((MA,Qt)=>{"use strict";w();Qt.exports=function(e){var r=e.toLowerCase(),i=Qt.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};Qt.exports.sha=nv();Qt.exports.sha1=fv();Qt.exports.sha224=lv();Qt.exports.sha256=ru();Qt.exports.sha384=wv();Qt.exports.sha512=iu()});var er=B((SA,xv)=>{"use strict";w();var V3=Te().Buffer,_v=Us().Transform,$3=Ci().StringDecoder,z3=X(),Z3=Pn();function Bt(t){_v.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}z3(Bt,_v);Bt.prototype.update=function(t,e,r){var i=Z3(t,e),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};Bt.prototype.setAutoPadding=function(){};Bt.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Bt.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Bt.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Bt.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(n){i=n}finally{r(i)}};Bt.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Bt.prototype._finalOrDigest=function(t){var e=this.__final()||V3.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Bt.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new $3(e),this._encoding=e),this._encoding!==e)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i};xv.exports=Bt});var Qn=B((AA,Ev)=>{"use strict";w();var Y3=X(),X3=va(),J3=Ra(),Q3=ka(),Mv=er();function Ca(t){Mv.call(this,"digest"),this._hash=t}Y3(Ca,Mv);Ca.prototype._update=function(t){this._hash.update(t)};Ca.prototype._final=function(){return this._hash.digest()};Ev.exports=function(e){return e=e.toLowerCase(),e==="md5"?new X3:e==="rmd160"||e==="ripemd160"?new J3:new Ca(Q3(e))}});var Av=B((qA,Bv)=>{"use strict";w();var e8=X(),ri=Te().Buffer,Sv=er(),t8=ri.alloc(128),ji=64;function Oa(t,e){Sv.call(this,"digest"),typeof e=="string"&&(e=ri.from(e)),this._alg=t,this._key=e,e.length>ji?e=t(e):e.length<ji&&(e=ri.concat([e,t8],ji));for(var r=this._ipad=ri.allocUnsafe(ji),i=this._opad=ri.allocUnsafe(ji),n=0;n<ji;n++)r[n]=e[n]^54,i[n]=e[n]^92;this._hash=[r]}e8(Oa,Sv);Oa.prototype._update=function(t){this._hash.push(t)};Oa.prototype._final=function(){var t=this._alg(ri.concat(this._hash));return this._alg(ri.concat([this._opad,t]))};Bv.exports=Oa});var nu=B((IA,Rv)=>{w();var r8=va();Rv.exports=function(t){return new r8().update(t).digest()}});var Iv=B((CA,Tv)=>{"use strict";w();var i8=X(),n8=Av(),qv=er(),eo=Te().Buffer,o8=nu(),ou=Ra(),au=ka(),a8=eo.alloc(128);function to(t,e){qv.call(this,"digest"),typeof e=="string"&&(e=eo.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var i=t==="rmd160"?new ou:au(t);e=i.update(e).digest()}else e.length<r&&(e=eo.concat([e,a8],r));for(var n=this._ipad=eo.allocUnsafe(r),a=this._opad=eo.allocUnsafe(r),f=0;f<r;f++)n[f]=e[f]^54,a[f]=e[f]^92;this._hash=t==="rmd160"?new ou:au(t),this._hash.update(n)}i8(to,qv);to.prototype._update=function(t){this._hash.update(t)};to.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new ou:au(this._alg);return e.update(this._opad).update(t).digest()};Tv.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new to("rmd160",r):e==="md5"?new n8(o8,r):new to(e,r)}});var Pa=B((PA,kv)=>{"use strict";w();kv.exports={}});var fu=B((UA,Cv)=>{"use strict";w();var f8=isFinite,s8=Math.pow(2,30)-1;Cv.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0||!f8(t))throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>s8||e!==e)throw new TypeError("Bad key length")}});var su=B((LA,Pv)=>{"use strict";w();var Da;globalThis.process&&globalThis.process.browser?Da="utf-8":globalThis.process&&globalThis.process.version?(Ov=parseInt(E.default.version.split(".")[0].slice(1),10),Da=Ov>=6?"utf-8":"binary"):Da="utf-8";var Ov;Pv.exports=Da});var uu=B((jA,Nv)=>{"use strict";w();var u8=Te().Buffer,h8=Pn(),Uv=typeof Uint8Array<"u",l8=Uv&&typeof ArrayBuffer<"u",Dv=l8&&ArrayBuffer.isView;Nv.exports=function(t,e,r){if(typeof t=="string"||u8.isBuffer(t)||Uv&&t instanceof Uint8Array||Dv&&Dv(t))return h8(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var hu=B((KA,Hv)=>{"use strict";w();var c8=nu(),d8=Ra(),p8=ka(),ii=Te().Buffer,v8=fu(),Lv=su(),Fv=uu(),y8=ii.alloc(128),Ua={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},g8={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function m8(t){return new d8().update(t).digest()}function b8(t){function e(r){return p8(t).update(r).digest()}return t==="rmd160"||t==="ripemd160"?m8:t==="md5"?c8:e}function jv(t,e,r){var i=b8(t),n=t==="sha512"||t==="sha384"?128:64;e.length>n?e=i(e):e.length<n&&(e=ii.concat([e,y8],n));for(var a=ii.allocUnsafe(n+Ua[t]),f=ii.allocUnsafe(n+Ua[t]),y=0;y<n;y++)a[y]=e[y]^54,f[y]=e[y]^92;var b=ii.allocUnsafe(n+r+4);a.copy(b,0,0,n),this.ipad1=b,this.ipad2=a,this.opad=f,this.alg=t,this.blocksize=n,this.hash=i,this.size=Ua[t]}jv.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function w8(t,e,r,i,n){v8(r,i),t=Fv(t,Lv,"Password"),e=Fv(e,Lv,"Salt");var a=(n||"sha1").toLowerCase(),f=g8[a]||a,y=Ua[f];if(typeof y!="number"||!y)throw new TypeError("Digest algorithm not supported: "+n);var b=new jv(f,t,e.length),S=ii.allocUnsafe(i),A=ii.allocUnsafe(e.length+4);e.copy(A,0,0,e.length);for(var q=0,k=y,P=Math.ceil(i/k),H=1;H<=P;H++){A.writeUInt32BE(H,e.length);for(var Z=b.run(A,b.ipad1),ke=Z,V=1;V<r;V++){ke=b.run(ke,b.ipad2);for(var Y=0;Y<k;Y++)Z[Y]^=ke[Y]}Z.copy(S,q),q+=k}return S}Hv.exports=w8});var Zv=B((GA,zv)=>{"use strict";w();var Vv=Te().Buffer,_8=fu(),Kv=su(),Wv=hu(),Gv=uu(),Na,ro=globalThis.crypto&&globalThis.crypto.subtle,x8={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},lu=[],ni;function cu(){return ni||(globalThis.process&&globalThis.process.nextTick?ni=globalThis.process.nextTick:globalThis.queueMicrotask?ni=globalThis.queueMicrotask:globalThis.setImmediate?ni=globalThis.setImmediate:ni=globalThis.setTimeout,ni)}function $v(t,e,r,i,n){return ro.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(a){return ro.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},a,i<<3)}).then(function(a){return Vv.from(a)})}function M8(t){if(globalThis.process&&!globalThis.process.browser||!ro||!ro.importKey||!ro.deriveBits)return Promise.resolve(!1);if(lu[t]!==void 0)return lu[t];Na=Na||Vv.alloc(8);var e=$v(Na,Na,10,128,t).then(function(){return!0},function(){return!1});return lu[t]=e,e}function E8(t,e){t.then(function(r){cu()(function(){e(null,r)})},function(r){cu()(function(){e(r)})})}zv.exports=function(t,e,r,i,n,a){if(typeof n=="function"&&(a=n,n=void 0),_8(r,i),t=Gv(t,Kv,"Password"),e=Gv(e,Kv,"Salt"),typeof a!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var f=x8[n.toLowerCase()];if(!f||typeof globalThis.Promise!="function"){cu()(function(){var y;try{y=Wv(t,e,r,i,n)}catch(b){a(b);return}a(null,y)});return}E8(M8(f).then(function(y){return y?$v(t,e,r,i,f):Wv(t,e,r,i,n)}),a)}});var pu=B(du=>{"use strict";w();du.pbkdf2=Zv();du.pbkdf2Sync=hu()});var vu=B(gt=>{"use strict";w();gt.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};gt.writeUInt32BE=function(e,r,i){e[0+i]=r>>>24,e[1+i]=r>>>16&255,e[2+i]=r>>>8&255,e[3+i]=r&255};gt.ip=function(e,r,i,n){for(var a=0,f=0,y=6;y>=0;y-=2){for(var b=0;b<=24;b+=8)a<<=1,a|=r>>>b+y&1;for(var b=0;b<=24;b+=8)a<<=1,a|=e>>>b+y&1}for(var y=6;y>=0;y-=2){for(var b=1;b<=25;b+=8)f<<=1,f|=r>>>b+y&1;for(var b=1;b<=25;b+=8)f<<=1,f|=e>>>b+y&1}i[n+0]=a>>>0,i[n+1]=f>>>0};gt.rip=function(e,r,i,n){for(var a=0,f=0,y=0;y<4;y++)for(var b=24;b>=0;b-=8)a<<=1,a|=r>>>b+y&1,a<<=1,a|=e>>>b+y&1;for(var y=4;y<8;y++)for(var b=24;b>=0;b-=8)f<<=1,f|=r>>>b+y&1,f<<=1,f|=e>>>b+y&1;i[n+0]=a>>>0,i[n+1]=f>>>0};gt.pc1=function(e,r,i,n){for(var a=0,f=0,y=7;y>=5;y--){for(var b=0;b<=24;b+=8)a<<=1,a|=r>>b+y&1;for(var b=0;b<=24;b+=8)a<<=1,a|=e>>b+y&1}for(var b=0;b<=24;b+=8)a<<=1,a|=r>>b+y&1;for(var y=1;y<=3;y++){for(var b=0;b<=24;b+=8)f<<=1,f|=r>>b+y&1;for(var b=0;b<=24;b+=8)f<<=1,f|=e>>b+y&1}for(var b=0;b<=24;b+=8)f<<=1,f|=e>>b+y&1;i[n+0]=a>>>0,i[n+1]=f>>>0};gt.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var La=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];gt.pc2=function(e,r,i,n){for(var a=0,f=0,y=La.length>>>1,b=0;b<y;b++)a<<=1,a|=e>>>La[b]&1;for(var b=y;b<La.length;b++)f<<=1,f|=r>>>La[b]&1;i[n+0]=a>>>0,i[n+1]=f>>>0};gt.expand=function(e,r,i){var n=0,a=0;n=(e&1)<<5|e>>>27;for(var f=23;f>=15;f-=4)n<<=6,n|=e>>>f&63;for(var f=11;f>=3;f-=4)a|=e>>>f&63,a<<=6;a|=(e&31)<<1|e>>>31,r[i+0]=n>>>0,r[i+1]=a>>>0};var Yv=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];gt.substitute=function(e,r){for(var i=0,n=0;n<4;n++){var a=e>>>18-n*6&63,f=Yv[n*64+a];i<<=4,i|=f}for(var n=0;n<4;n++){var a=r>>>18-n*6&63,f=Yv[256+n*64+a];i<<=4,i|=f}return i>>>0};var Xv=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];gt.permute=function(e){for(var r=0,i=0;i<Xv.length;i++)r<<=1,r|=e>>>Xv[i]&1;return r>>>0};gt.padSplit=function(e,r,i){for(var n=e.toString(2);n.length<r;)n="0"+n;for(var a=[],f=0;f<r;f+=i)a.push(n.slice(f,f+i));return a.join(" ")}});var Hi=B((XA,Qv)=>{w();Qv.exports=Jv;function Jv(t,e){if(!t)throw new Error(e||"Assertion failed")}Jv.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)}});var Fa=B((QA,ey)=>{"use strict";w();var S8=Hi();function mt(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}ey.exports=mt;mt.prototype._init=function(){};mt.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};mt.prototype._buffer=function(e,r){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=e[r+n];return this.bufferOff+=i,i};mt.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};mt.prototype._updateEncrypt=function(e){var r=0,i=0,n=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(a,i)));for(var f=e.length-(e.length-r)%this.blockSize;r<f;r+=this.blockSize)this._update(e,r,a,i),i+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return a};mt.prototype._updateDecrypt=function(e){for(var r=0,i=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(e,r),i+=this._flushBuffer(a,i);return r+=this._buffer(e,r),a};mt.prototype.final=function(e){var r;e&&(r=this.update(e));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};mt.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};mt.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};mt.prototype._unpad=function(e){return e};mt.prototype._finalDecrypt=function(){S8.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}});var yu=B((t7,iy)=>{"use strict";w();var ty=Hi(),B8=X(),Ye=vu(),ry=Fa();function A8(){this.tmp=new Array(2),this.keys=null}function Ht(t){ry.call(this,t);var e=new A8;this._desState=e,this.deriveKeys(e,t.key)}B8(Ht,ry);iy.exports=Ht;Ht.create=function(e){return new Ht(e)};var R8=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Ht.prototype.deriveKeys=function(e,r){e.keys=new Array(32),ty.equal(r.length,this.blockSize,"Invalid key length");var i=Ye.readUInt32BE(r,0),n=Ye.readUInt32BE(r,4);Ye.pc1(i,n,e.tmp,0),i=e.tmp[0],n=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var f=R8[a>>>1];i=Ye.r28shl(i,f),n=Ye.r28shl(n,f),Ye.pc2(i,n,e.keys,a)}};Ht.prototype._update=function(e,r,i,n){var a=this._desState,f=Ye.readUInt32BE(e,r),y=Ye.readUInt32BE(e,r+4);Ye.ip(f,y,a.tmp,0),f=a.tmp[0],y=a.tmp[1],this.type==="encrypt"?this._encrypt(a,f,y,a.tmp,0):this._decrypt(a,f,y,a.tmp,0),f=a.tmp[0],y=a.tmp[1],Ye.writeUInt32BE(i,f,n),Ye.writeUInt32BE(i,y,n+4)};Ht.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var i=e.length-r,n=r;n<e.length;n++)e[n]=i;return!0};Ht.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],i=e.length-r;i<e.length;i++)ty.equal(e[i],r);return e.slice(0,e.length-r)};Ht.prototype._encrypt=function(e,r,i,n,a){for(var f=r,y=i,b=0;b<e.keys.length;b+=2){var S=e.keys[b],A=e.keys[b+1];Ye.expand(y,e.tmp,0),S^=e.tmp[0],A^=e.tmp[1];var q=Ye.substitute(S,A),k=Ye.permute(q),P=y;y=(f^k)>>>0,f=P}Ye.rip(y,f,n,a)};Ht.prototype._decrypt=function(e,r,i,n,a){for(var f=i,y=r,b=e.keys.length-2;b>=0;b-=2){var S=e.keys[b],A=e.keys[b+1];Ye.expand(f,e.tmp,0),S^=e.tmp[0],A^=e.tmp[1];var q=Ye.substitute(S,A),k=Ye.permute(q),P=f;f=(y^k)>>>0,y=P}Ye.rip(f,y,n,a)}});var oy=B(ny=>{"use strict";w();var q8=Hi(),T8=X(),ja={};function I8(t){q8.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function k8(t){function e(a){t.call(this,a),this._cbcInit()}T8(e,t);for(var r=Object.keys(ja),i=0;i<r.length;i++){var n=r[i];e.prototype[n]=ja[n]}return e.create=function(f){return new e(f)},e}ny.instantiate=k8;ja._cbcInit=function(){var e=new I8(this.options.iv);this._cbcState=e};ja._update=function(e,r,i,n){var a=this._cbcState,f=this.constructor.super_.prototype,y=a.iv;if(this.type==="encrypt"){for(var b=0;b<this.blockSize;b++)y[b]^=e[r+b];f._update.call(this,y,0,i,n);for(var b=0;b<this.blockSize;b++)y[b]=i[n+b]}else{f._update.call(this,e,r,i,n);for(var b=0;b<this.blockSize;b++)i[n+b]^=y[b];for(var b=0;b<this.blockSize;b++)y[b]=e[r+b]}}});var sy=B((o7,fy)=>{"use strict";w();var C8=Hi(),O8=X(),ay=Fa(),vr=yu();function P8(t,e){C8.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),n=e.slice(16,24);t==="encrypt"?this.ciphers=[vr.create({type:"encrypt",key:r}),vr.create({type:"decrypt",key:i}),vr.create({type:"encrypt",key:n})]:this.ciphers=[vr.create({type:"decrypt",key:n}),vr.create({type:"encrypt",key:i}),vr.create({type:"decrypt",key:r})]}function oi(t){ay.call(this,t);var e=new P8(this.type,this.options.key);this._edeState=e}O8(oi,ay);fy.exports=oi;oi.create=function(e){return new oi(e)};oi.prototype._update=function(e,r,i,n){var a=this._edeState;a.ciphers[0]._update(e,r,i,n),a.ciphers[1]._update(i,n,i,n),a.ciphers[2]._update(i,n,i,n)};oi.prototype._pad=vr.prototype._pad;oi.prototype._unpad=vr.prototype._unpad});var uy=B(Ki=>{"use strict";w();Ki.utils=vu();Ki.Cipher=Fa();Ki.DES=yu();Ki.CBC=oy();Ki.EDE=sy()});var cy=B((u7,ly)=>{w();var hy=er(),tr=uy(),D8=X(),ai=Te().Buffer,io={"des-ede3-cbc":tr.CBC.instantiate(tr.EDE),"des-ede3":tr.EDE,"des-ede-cbc":tr.CBC.instantiate(tr.EDE),"des-ede":tr.EDE,"des-cbc":tr.CBC.instantiate(tr.DES),"des-ecb":tr.DES};io.des=io["des-cbc"];io.des3=io["des-ede3-cbc"];ly.exports=Ha;D8(Ha,hy);function Ha(t){hy.call(this);var e=t.mode.toLowerCase(),r=io[e],i;t.decrypt?i="decrypt":i="encrypt";var n=t.key;ai.isBuffer(n)||(n=ai.from(n)),(e==="des-ede"||e==="des-ede-cbc")&&(n=ai.concat([n,n.slice(0,8)]));var a=t.iv;ai.isBuffer(a)||(a=ai.from(a)),this._des=r.create({key:n,iv:a,type:i})}Ha.prototype._update=function(t){return ai.from(this._des.update(t))};Ha.prototype._final=function(){return ai.from(this._des.final())}});var dy=B(gu=>{w();gu.encrypt=function(t,e){return t._cipher.encryptBlock(e)};gu.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var Wi=B((d7,py)=>{w();py.exports=function(e,r){for(var i=Math.min(e.length,r.length),n=new R.Buffer(i),a=0;a<i;++a)n[a]=e[a]^r[a];return n}});var yy=B(mu=>{w();var vy=Wi();mu.encrypt=function(t,e){var r=vy(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};mu.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return vy(i,r)}});var by=B(my=>{w();var no=Te().Buffer,U8=Wi();function gy(t,e,r){var i=e.length,n=U8(e,t._cache);return t._cache=t._cache.slice(i),t._prev=no.concat([t._prev,r?e:n]),n}my.encrypt=function(t,e,r){for(var i=no.allocUnsafe(0),n;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=no.allocUnsafe(0)),t._cache.length<=e.length)n=t._cache.length,i=no.concat([i,gy(t,e.slice(0,n),r)]),e=e.slice(n);else{i=no.concat([i,gy(t,e,r)]);break}return i}});var _y=B(wy=>{w();var bu=Te().Buffer;function N8(t,e,r){var i=t._cipher.encryptBlock(t._prev),n=i[0]^e;return t._prev=bu.concat([t._prev.slice(1),bu.from([r?e:n])]),n}wy.encrypt=function(t,e,r){for(var i=e.length,n=bu.allocUnsafe(i),a=-1;++a<i;)n[a]=N8(t,e[a],r);return n}});var My=B(xy=>{w();var Ka=Te().Buffer;function L8(t,e,r){for(var i,n=-1,a=8,f=0,y,b;++n<a;)i=t._cipher.encryptBlock(t._prev),y=e&1<<7-n?128:0,b=i[0]^y,f+=(b&128)>>n%8,t._prev=F8(t._prev,r?y:b);return f}function F8(t,e){var r=t.length,i=-1,n=Ka.allocUnsafe(t.length);for(t=Ka.concat([t,Ka.from([e])]);++i<r;)n[i]=t[i]<<1|t[i+1]>>7;return n}xy.encrypt=function(t,e,r){for(var i=e.length,n=Ka.allocUnsafe(i),a=-1;++a<i;)n[a]=L8(t,e[a],r);return n}});var Sy=B(Ey=>{w();var j8=Wi();function H8(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}Ey.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=R.Buffer.concat([t._cache,H8(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),j8(e,r)}});var wu=B((S7,By)=>{w();function K8(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}By.exports=K8});var xu=B(Ry=>{w();var W8=Wi(),Ay=Te().Buffer,G8=wu();function V8(t){var e=t._cipher.encryptBlockRaw(t._prev);return G8(t._prev),e}var _u=16;Ry.encrypt=function(t,e){var r=Math.ceil(e.length/_u),i=t._cache.length;t._cache=Ay.concat([t._cache,Ay.allocUnsafe(r*_u)]);for(var n=0;n<r;n++){var a=V8(t),f=i+n*_u;t._cache.writeUInt32BE(a[0],f+0),t._cache.writeUInt32BE(a[1],f+4),t._cache.writeUInt32BE(a[2],f+8),t._cache.writeUInt32BE(a[3],f+12)}var y=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),W8(e,y)}});var Mu=B((q7,$8)=>{$8.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}});var Ga=B((T7,qy)=>{w();var z8={ECB:dy(),CBC:yy(),CFB:by(),CFB8:_y(),CFB1:My(),OFB:Sy(),CTR:xu(),GCM:xu()},Wa=Mu();for(Eu in Wa)Wa[Eu].module=z8[Wa[Eu].mode];var Eu;qy.exports=Wa});var oo=B((k7,Iy)=>{w();var Va=Te().Buffer;function Bu(t){Va.isBuffer(t)||(t=Va.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(i*4);return r}function Su(t){for(var e=0;e<t.length;t++)t[e]=0}function Ty(t,e,r,i,n){for(var a=r[0],f=r[1],y=r[2],b=r[3],S=t[0]^e[0],A=t[1]^e[1],q=t[2]^e[2],k=t[3]^e[3],P,H,Z,ke,V=4,Y=1;Y<n;Y++)P=a[S>>>24]^f[A>>>16&255]^y[q>>>8&255]^b[k&255]^e[V++],H=a[A>>>24]^f[q>>>16&255]^y[k>>>8&255]^b[S&255]^e[V++],Z=a[q>>>24]^f[k>>>16&255]^y[S>>>8&255]^b[A&255]^e[V++],ke=a[k>>>24]^f[S>>>16&255]^y[A>>>8&255]^b[q&255]^e[V++],S=P,A=H,q=Z,k=ke;return P=(i[S>>>24]<<24|i[A>>>16&255]<<16|i[q>>>8&255]<<8|i[k&255])^e[V++],H=(i[A>>>24]<<24|i[q>>>16&255]<<16|i[k>>>8&255]<<8|i[S&255])^e[V++],Z=(i[q>>>24]<<24|i[k>>>16&255]<<16|i[S>>>8&255]<<8|i[A&255])^e[V++],ke=(i[k>>>24]<<24|i[S>>>16&255]<<16|i[A>>>8&255]<<8|i[q&255])^e[V++],P=P>>>0,H=H>>>0,Z=Z>>>0,ke=ke>>>0,[P,H,Z,ke]}var Z8=[0,1,2,4,8,16,32,64,128,27,54],ze=(function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],f=0,y=0,b=0;b<256;++b){var S=y^y<<1^y<<2^y<<3^y<<4;S=S>>>8^S&255^99,r[f]=S,i[S]=f;var A=t[f],q=t[A],k=t[q],P=t[S]*257^S*16843008;n[0][f]=P<<24|P>>>8,n[1][f]=P<<16|P>>>16,n[2][f]=P<<8|P>>>24,n[3][f]=P,P=k*16843009^q*65537^A*257^f*16843008,a[0][S]=P<<24|P>>>8,a[1][S]=P<<16|P>>>16,a[2][S]=P<<8|P>>>24,a[3][S]=P,f===0?f=y=1:(f=A^t[t[t[k^A]]],y^=t[t[y]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}})();function bt(t){this._key=Bu(t),this._reset()}bt.blockSize=16;bt.keySize=256/8;bt.prototype.blockSize=bt.blockSize;bt.prototype.keySize=bt.keySize;bt.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=(r+1)*4,n=[],a=0;a<e;a++)n[a]=t[a];for(a=e;a<i;a++){var f=n[a-1];a%e===0?(f=f<<8|f>>>24,f=ze.SBOX[f>>>24]<<24|ze.SBOX[f>>>16&255]<<16|ze.SBOX[f>>>8&255]<<8|ze.SBOX[f&255],f^=Z8[a/e|0]<<24):e>6&&a%e===4&&(f=ze.SBOX[f>>>24]<<24|ze.SBOX[f>>>16&255]<<16|ze.SBOX[f>>>8&255]<<8|ze.SBOX[f&255]),n[a]=n[a-e]^f}for(var y=[],b=0;b<i;b++){var S=i-b,A=n[S-(b%4?0:4)];b<4||S<=4?y[b]=A:y[b]=ze.INV_SUB_MIX[0][ze.SBOX[A>>>24]]^ze.INV_SUB_MIX[1][ze.SBOX[A>>>16&255]]^ze.INV_SUB_MIX[2][ze.SBOX[A>>>8&255]]^ze.INV_SUB_MIX[3][ze.SBOX[A&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=y};bt.prototype.encryptBlockRaw=function(t){return t=Bu(t),Ty(t,this._keySchedule,ze.SUB_MIX,ze.SBOX,this._nRounds)};bt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Va.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};bt.prototype.decryptBlock=function(t){t=Bu(t);var e=t[1];t[1]=t[3],t[3]=e;var r=Ty(t,this._invKeySchedule,ze.INV_SUB_MIX,ze.INV_SBOX,this._nRounds),i=Va.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};bt.prototype.scrub=function(){Su(this._keySchedule),Su(this._invKeySchedule),Su(this._key)};Iy.exports.AES=bt});var Oy=B((O7,Cy)=>{w();var Gi=Te().Buffer,Y8=Gi.alloc(16,0);function X8(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function ky(t){var e=Gi.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function ao(t){this.h=t,this.state=Gi.alloc(16,0),this.cache=Gi.allocUnsafe(0)}ao.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};ao.prototype._multiply=function(){for(var t=X8(this.h),e=[0,0,0,0],r,i,n,a=-1;++a<128;){for(i=(this.state[~~(a/8)]&1<<7-a%8)!==0,i&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),n=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,n&&(t[0]=t[0]^225<<24)}this.state=ky(e)};ao.prototype.update=function(t){this.cache=Gi.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};ao.prototype.final=function(t,e){return this.cache.length&&this.ghash(Gi.concat([this.cache,Y8],16)),this.ghash(ky([0,t,0,e])),this.state};Cy.exports=ao});var Au=B((D7,Uy)=>{w();var J8=oo(),ht=Te().Buffer,Py=er(),Q8=X(),Dy=Oy(),eM=Wi(),tM=wu();function rM(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}function iM(t,e,r){if(e.length===12)return t._finID=ht.concat([e,ht.from([0,0,0,1])]),ht.concat([e,ht.from([0,0,0,2])]);var i=new Dy(r),n=e.length,a=n%16;i.update(e),a&&(a=16-a,i.update(ht.alloc(a,0))),i.update(ht.alloc(8,0));var f=n*8,y=ht.alloc(8);y.writeUIntBE(f,0,8),i.update(y),t._finID=i.state;var b=ht.from(t._finID);return tM(b),b}function fi(t,e,r,i){Py.call(this);var n=ht.alloc(4,0);this._cipher=new J8.AES(e);var a=this._cipher.encryptBlock(n);this._ghash=new Dy(a),r=iM(this,r,a),this._prev=ht.from(r),this._cache=ht.allocUnsafe(0),this._secCache=ht.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Q8(fi,Py);fi.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=ht.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r};fi.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=eM(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&rM(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};fi.prototype.getAuthTag=function(){if(this._decrypt||!ht.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};fi.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};fi.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};Uy.exports=fi});var qu=B((N7,Ly)=>{w();var nM=oo(),Ru=Te().Buffer,Ny=er(),oM=X();function $a(t,e,r,i){Ny.call(this),this._cipher=new nM.AES(e),this._prev=Ru.from(r),this._cache=Ru.allocUnsafe(0),this._secCache=Ru.allocUnsafe(0),this._decrypt=i,this._mode=t}oM($a,Ny);$a.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};$a.prototype._final=function(){this._cipher.scrub()};Ly.exports=$a});var fo=B((F7,Fy)=>{w();var si=Te().Buffer,aM=va();function fM(t,e,r,i){if(si.isBuffer(t)||(t=si.from(t,"binary")),e&&(si.isBuffer(e)||(e=si.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,a=si.alloc(n),f=si.alloc(i||0),y=si.alloc(0);n>0||i>0;){var b=new aM;b.update(y),b.update(t),e&&b.update(e),y=b.digest();var S=0;if(n>0){var A=a.length-n;S=Math.min(n,y.length),y.copy(a,A,0,S),n-=S}if(S<y.length&&i>0){var q=f.length-i,k=Math.min(i,y.length-S);y.copy(f,q,S,S+k),i-=k}}return y.fill(0),{key:a,iv:f}}Fy.exports=fM});var Wy=B(Tu=>{w();var jy=Ga(),sM=Au(),rr=Te().Buffer,uM=qu(),Hy=er(),hM=oo(),lM=fo(),cM=X();function so(t,e,r){Hy.call(this),this._cache=new za,this._cipher=new hM.AES(e),this._prev=rr.from(r),this._mode=t,this._autopadding=!0}cM(so,Hy);so.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return rr.concat(i)};var dM=rr.alloc(16,16);so.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(dM))throw this._cipher.scrub(),new Error("data not multiple of block length")};so.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function za(){this.cache=rr.allocUnsafe(0)}za.prototype.add=function(t){this.cache=rr.concat([this.cache,t])};za.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};za.prototype.flush=function(){for(var t=16-this.cache.length,e=rr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return rr.concat([this.cache,e])};function Ky(t,e,r){var i=jy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=rr.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=rr.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new uM(i.module,e,r):i.type==="auth"?new sM(i.module,e,r):new so(i.module,e,r)}function pM(t,e){var r=jy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=lM(e,!1,r.key,r.iv);return Ky(t,i.key,i.iv)}Tu.createCipheriv=Ky;Tu.createCipher=pM});var zy=B(Iu=>{w();var vM=Au(),Vi=Te().Buffer,Gy=Ga(),yM=qu(),Vy=er(),gM=oo(),mM=fo(),bM=X();function uo(t,e,r){Vy.call(this),this._cache=new Za,this._last=void 0,this._cipher=new gM.AES(e),this._prev=Vi.from(r),this._mode=t,this._autopadding=!0}bM(uo,Vy);uo.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return Vi.concat(i)};uo.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return wM(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};uo.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Za(){this.cache=Vi.allocUnsafe(0)}Za.prototype.add=function(t){this.cache=Vi.concat([this.cache,t])};Za.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};Za.prototype.flush=function(){if(this.cache.length)return this.cache};function wM(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(e!==16)return t.slice(0,16-e)}function $y(t,e,r){var i=Gy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Vi.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=Vi.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new yM(i.module,e,r,!0):i.type==="auth"?new vM(i.module,e,r,!0):new uo(i.module,e,r)}function _M(t,e){var r=Gy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=mM(e,!1,r.key,r.iv);return $y(t,i.key,i.iv)}Iu.createDecipher=_M;Iu.createDecipheriv=$y});var Ya=B(At=>{w();var Zy=Wy(),Yy=zy(),xM=Mu();function MM(){return Object.keys(xM)}At.createCipher=At.Cipher=Zy.createCipher;At.createCipheriv=At.Cipheriv=Zy.createCipheriv;At.createDecipher=At.Decipher=Yy.createDecipher;At.createDecipheriv=At.Decipheriv=Yy.createDecipheriv;At.listCiphers=At.getCiphers=MM});var Xy=B(ir=>{w();ir["des-ecb"]={key:8,iv:0};ir["des-cbc"]=ir.des={key:8,iv:8};ir["des-ede3-cbc"]=ir.des3={key:24,iv:8};ir["des-ede3"]={key:24,iv:0};ir["des-ede-cbc"]={key:16,iv:8};ir["des-ede"]={key:16,iv:0}});var r1=B(Rt=>{w();var Jy=cy(),ku=Ya(),yr=Ga(),nr=Xy(),Qy=fo();function EM(t,e){t=t.toLowerCase();var r,i;if(yr[t])r=yr[t].key,i=yr[t].iv;else if(nr[t])r=nr[t].key*8,i=nr[t].iv;else throw new TypeError("invalid suite type");var n=Qy(e,!1,r,i);return e1(t,n.key,n.iv)}function SM(t,e){t=t.toLowerCase();var r,i;if(yr[t])r=yr[t].key,i=yr[t].iv;else if(nr[t])r=nr[t].key*8,i=nr[t].iv;else throw new TypeError("invalid suite type");var n=Qy(e,!1,r,i);return t1(t,n.key,n.iv)}function e1(t,e,r){if(t=t.toLowerCase(),yr[t])return ku.createCipheriv(t,e,r);if(nr[t])return new Jy({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function t1(t,e,r){if(t=t.toLowerCase(),yr[t])return ku.createDecipheriv(t,e,r);if(nr[t])return new Jy({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function BM(){return Object.keys(nr).concat(ku.getCiphers())}Rt.createCipher=Rt.Cipher=EM;Rt.createCipheriv=Rt.Cipheriv=e1;Rt.createDecipher=Rt.Decipher=SM;Rt.createDecipheriv=Rt.Decipheriv=t1;Rt.listCiphers=Rt.getCiphers=BM});var gr=B((i1,Cu)=>{w();(function(t,e){"use strict";function r(M,h){if(!M)throw new Error(h||"Assertion failed")}function i(M,h){M.super_=h;var v=function(){};v.prototype=h.prototype,M.prototype=new v,M.prototype.constructor=M}function n(M,h,v){if(n.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((h==="le"||h==="be")&&(v=h,h=10),this._init(M||0,h||10,v||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(h){return h instanceof n?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===n.wordSize&&Array.isArray(h.words)},n.max=function(h,v){return h.cmp(v)>0?h:v},n.min=function(h,v){return h.cmp(v)<0?h:v},n.prototype._init=function(h,v,l){if(typeof h=="number")return this._initNumber(h,v,l);if(typeof h=="object")return this._initArray(h,v,l);v==="hex"&&(v=16),r(v===(v|0)&&v>=2&&v<=36),h=h.toString().replace(/\s+/g,"");var o=0;h[0]==="-"&&(o++,this.negative=1),o<h.length&&(v===16?this._parseHex(h,o,l):(this._parseBase(h,v,o),l==="le"&&this._initArray(this.toArray(),v,l)))},n.prototype._initNumber=function(h,v,l){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(r(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),v,l)},n.prototype._initArray=function(h,v,l){if(r(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var u,d,g=0;if(l==="be")for(o=h.length-1,u=0;o>=0;o-=3)d=h[o]|h[o-1]<<8|h[o-2]<<16,this.words[u]|=d<<g&67108863,this.words[u+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,u++);else if(l==="le")for(o=0,u=0;o<h.length;o+=3)d=h[o]|h[o+1]<<8|h[o+2]<<16,this.words[u]|=d<<g&67108863,this.words[u+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,u++);return this.strip()};function f(M,h){var v=M.charCodeAt(h);return v>=65&&v<=70?v-55:v>=97&&v<=102?v-87:v-48&15}function y(M,h,v){var l=f(M,v);return v-1>=h&&(l|=f(M,v-1)<<4),l}n.prototype._parseHex=function(h,v,l){this.length=Math.ceil((h.length-v)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var u=0,d=0,g;if(l==="be")for(o=h.length-1;o>=v;o-=2)g=y(h,v,o)<<u,this.words[d]|=g&67108863,u>=18?(u-=18,d+=1,this.words[d]|=g>>>26):u+=8;else{var p=h.length-v;for(o=p%2===0?v+1:v;o<h.length;o+=2)g=y(h,v,o)<<u,this.words[d]|=g&67108863,u>=18?(u-=18,d+=1,this.words[d]|=g>>>26):u+=8}this.strip()};function b(M,h,v,l){for(var o=0,u=Math.min(M.length,v),d=h;d<u;d++){var g=M.charCodeAt(d)-48;o*=l,g>=49?o+=g-49+10:g>=17?o+=g-17+10:o+=g}return o}n.prototype._parseBase=function(h,v,l){this.words=[0],this.length=1;for(var o=0,u=1;u<=67108863;u*=v)o++;o--,u=u/v|0;for(var d=h.length-l,g=d%o,p=Math.min(d,d-g)+l,s=0,m=l;m<p;m+=o)s=b(h,m,m+o,v),this.imuln(u),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(g!==0){var _=1;for(s=b(h,m,h.length,v),m=0;m<g;m++)_*=v;this.imuln(_),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}this.strip()},n.prototype.copy=function(h){h.words=new Array(this.length);for(var v=0;v<this.length;v++)h.words[v]=this.words[v];h.length=this.length,h.negative=this.negative,h.red=this.red},n.prototype.clone=function(){var h=new n(null);return this.copy(h),h},n.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var S=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(h,v){h=h||10,v=v|0||1;var l;if(h===16||h==="hex"){l="";for(var o=0,u=0,d=0;d<this.length;d++){var g=this.words[d],p=((g<<o|u)&16777215).toString(16);u=g>>>24-o&16777215,o+=2,o>=26&&(o-=26,d--),u!==0||d!==this.length-1?l=S[6-p.length]+p+l:l=p+l}for(u!==0&&(l=u.toString(16)+l);l.length%v!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(h===(h|0)&&h>=2&&h<=36){var s=A[h],m=q[h];l="";var _=this.clone();for(_.negative=0;!_.isZero();){var c=_.modn(m).toString(h);_=_.idivn(m),_.isZero()?l=c+l:l=S[s-c.length]+c+l}for(this.isZero()&&(l="0"+l);l.length%v!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(h,v){return r(typeof a<"u"),this.toArrayLike(a,h,v)},n.prototype.toArray=function(h,v){return this.toArrayLike(Array,h,v)},n.prototype.toArrayLike=function(h,v,l){var o=this.byteLength(),u=l||Math.max(1,o);r(o<=u,"byte array longer than desired length"),r(u>0,"Requested array length <= 0"),this.strip();var d=v==="le",g=new h(u),p,s,m=this.clone();if(d){for(s=0;!m.isZero();s++)p=m.andln(255),m.iushrn(8),g[s]=p;for(;s<u;s++)g[s]=0}else{for(s=0;s<u-o;s++)g[s]=0;for(s=0;!m.isZero();s++)p=m.andln(255),m.iushrn(8),g[u-s-1]=p}return g},Math.clz32?n.prototype._countBits=function(h){return 32-Math.clz32(h)}:n.prototype._countBits=function(h){var v=h,l=0;return v>=4096&&(l+=13,v>>>=13),v>=64&&(l+=7,v>>>=7),v>=8&&(l+=4,v>>>=4),v>=2&&(l+=2,v>>>=2),l+v},n.prototype._zeroBits=function(h){if(h===0)return 26;var v=h,l=0;return(v&8191)===0&&(l+=13,v>>>=13),(v&127)===0&&(l+=7,v>>>=7),(v&15)===0&&(l+=4,v>>>=4),(v&3)===0&&(l+=2,v>>>=2),(v&1)===0&&l++,l},n.prototype.bitLength=function(){var h=this.words[this.length-1],v=this._countBits(h);return(this.length-1)*26+v};function k(M){for(var h=new Array(M.bitLength()),v=0;v<h.length;v++){var l=v/26|0,o=v%26;h[v]=(M.words[l]&1<<o)>>>o}return h}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,v=0;v<this.length;v++){var l=this._zeroBits(this.words[v]);if(h+=l,l!==26)break}return h},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},n.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var v=0;v<h.length;v++)this.words[v]=this.words[v]|h.words[v];return this.strip()},n.prototype.ior=function(h){return r((this.negative|h.negative)===0),this.iuor(h)},n.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},n.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},n.prototype.iuand=function(h){var v;this.length>h.length?v=h:v=this;for(var l=0;l<v.length;l++)this.words[l]=this.words[l]&h.words[l];return this.length=v.length,this.strip()},n.prototype.iand=function(h){return r((this.negative|h.negative)===0),this.iuand(h)},n.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},n.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},n.prototype.iuxor=function(h){var v,l;this.length>h.length?(v=this,l=h):(v=h,l=this);for(var o=0;o<l.length;o++)this.words[o]=v.words[o]^l.words[o];if(this!==v)for(;o<v.length;o++)this.words[o]=v.words[o];return this.length=v.length,this.strip()},n.prototype.ixor=function(h){return r((this.negative|h.negative)===0),this.iuxor(h)},n.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},n.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},n.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var v=Math.ceil(h/26)|0,l=h%26;this._expand(v),l>0&&v--;for(var o=0;o<v;o++)this.words[o]=~this.words[o]&67108863;for(l>0&&(this.words[o]=~this.words[o]&67108863>>26-l,o++);o<this.length;o++)this.words[o]=0;return this.strip()},n.prototype.notn=function(h){return this.clone().inotn(h)},n.prototype.setn=function(h,v){r(typeof h=="number"&&h>=0);var l=h/26|0,o=h%26;return this._expand(l+1),v?this.words[l]=this.words[l]|1<<o:this.words[l]=this.words[l]&~(1<<o),this.strip()},n.prototype.iadd=function(h){var v;if(this.negative!==0&&h.negative===0)return this.negative=0,v=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,v=this.isub(h),h.negative=1,v._normSign();var l,o;this.length>h.length?(l=this,o=h):(l=h,o=this);for(var u=0,d=0;d<o.length;d++)v=(l.words[d]|0)+(o.words[d]|0)+u,this.words[d]=v&67108863,u=v>>>26;for(;u!==0&&d<l.length;d++)v=(l.words[d]|0)+u,this.words[d]=v&67108863,u=v>>>26;if(this.length=l.length,u!==0)this.words[this.length]=u,this.length++;else if(l!==this)for(;d<l.length;d++)this.words[d]=l.words[d];return this},n.prototype.add=function(h){var v;return h.negative!==0&&this.negative===0?(h.negative=0,v=this.sub(h),h.negative^=1,v):h.negative===0&&this.negative!==0?(this.negative=0,v=h.sub(this),this.negative=1,v):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},n.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var v=this.iadd(h);return h.negative=1,v._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var l=this.cmp(h);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var o,u;l>0?(o=this,u=h):(o=h,u=this);for(var d=0,g=0;g<u.length;g++)v=(o.words[g]|0)-(u.words[g]|0)+d,d=v>>26,this.words[g]=v&67108863;for(;d!==0&&g<o.length;g++)v=(o.words[g]|0)+d,d=v>>26,this.words[g]=v&67108863;if(d===0&&g<o.length&&o!==this)for(;g<o.length;g++)this.words[g]=o.words[g];return this.length=Math.max(this.length,g),o!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(h){return this.clone().isub(h)};function P(M,h,v){v.negative=h.negative^M.negative;var l=M.length+h.length|0;v.length=l,l=l-1|0;var o=M.words[0]|0,u=h.words[0]|0,d=o*u,g=d&67108863,p=d/67108864|0;v.words[0]=g;for(var s=1;s<l;s++){for(var m=p>>>26,_=p&67108863,c=Math.min(s,h.length-1),x=Math.max(0,s-M.length+1);x<=c;x++){var O=s-x|0;o=M.words[O]|0,u=h.words[x]|0,d=o*u+_,m+=d/67108864|0,_=d&67108863}v.words[s]=_|0,p=m|0}return p!==0?v.words[s]=p|0:v.length--,v.strip()}var H=function(h,v,l){var o=h.words,u=v.words,d=l.words,g=0,p,s,m,_=o[0]|0,c=_&8191,x=_>>>13,O=o[1]|0,N=O&8191,D=O>>>13,W=o[2]|0,K=W&8191,G=W>>>13,Mt=o[3]|0,$=Mt&8191,z=Mt>>>13,en=o[4]|0,J=en&8191,Q=en>>>13,tn=o[5]|0,ee=tn&8191,te=tn>>>13,rn=o[6]|0,re=rn&8191,ie=rn>>>13,nn=o[7]|0,ne=nn&8191,oe=nn>>>13,on=o[8]|0,ae=on&8191,fe=on>>>13,an=o[9]|0,se=an&8191,ue=an>>>13,fn=u[0]|0,he=fn&8191,le=fn>>>13,sn=u[1]|0,ce=sn&8191,de=sn>>>13,un=u[2]|0,pe=un&8191,ve=un>>>13,hn=u[3]|0,ye=hn&8191,ge=hn>>>13,ln=u[4]|0,me=ln&8191,be=ln>>>13,cn=u[5]|0,we=cn&8191,_e=cn>>>13,dn=u[6]|0,xe=dn&8191,Me=dn>>>13,pn=u[7]|0,Ee=pn&8191,Se=pn>>>13,vn=u[8]|0,Be=vn&8191,Ae=vn>>>13,yn=u[9]|0,Re=yn&8191,qe=yn>>>13;l.negative=h.negative^v.negative,l.length=19,p=Math.imul(c,he),s=Math.imul(c,le),s=s+Math.imul(x,he)|0,m=Math.imul(x,le);var di=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(di>>>26)|0,di&=67108863,p=Math.imul(N,he),s=Math.imul(N,le),s=s+Math.imul(D,he)|0,m=Math.imul(D,le),p=p+Math.imul(c,ce)|0,s=s+Math.imul(c,de)|0,s=s+Math.imul(x,ce)|0,m=m+Math.imul(x,de)|0;var Ke=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,p=Math.imul(K,he),s=Math.imul(K,le),s=s+Math.imul(G,he)|0,m=Math.imul(G,le),p=p+Math.imul(N,ce)|0,s=s+Math.imul(N,de)|0,s=s+Math.imul(D,ce)|0,m=m+Math.imul(D,de)|0,p=p+Math.imul(c,pe)|0,s=s+Math.imul(c,ve)|0,s=s+Math.imul(x,pe)|0,m=m+Math.imul(x,ve)|0;var We=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(We>>>26)|0,We&=67108863,p=Math.imul($,he),s=Math.imul($,le),s=s+Math.imul(z,he)|0,m=Math.imul(z,le),p=p+Math.imul(K,ce)|0,s=s+Math.imul(K,de)|0,s=s+Math.imul(G,ce)|0,m=m+Math.imul(G,de)|0,p=p+Math.imul(N,pe)|0,s=s+Math.imul(N,ve)|0,s=s+Math.imul(D,pe)|0,m=m+Math.imul(D,ve)|0,p=p+Math.imul(c,ye)|0,s=s+Math.imul(c,ge)|0,s=s+Math.imul(x,ye)|0,m=m+Math.imul(x,ge)|0;var wr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(wr>>>26)|0,wr&=67108863,p=Math.imul(J,he),s=Math.imul(J,le),s=s+Math.imul(Q,he)|0,m=Math.imul(Q,le),p=p+Math.imul($,ce)|0,s=s+Math.imul($,de)|0,s=s+Math.imul(z,ce)|0,m=m+Math.imul(z,de)|0,p=p+Math.imul(K,pe)|0,s=s+Math.imul(K,ve)|0,s=s+Math.imul(G,pe)|0,m=m+Math.imul(G,ve)|0,p=p+Math.imul(N,ye)|0,s=s+Math.imul(N,ge)|0,s=s+Math.imul(D,ye)|0,m=m+Math.imul(D,ge)|0,p=p+Math.imul(c,me)|0,s=s+Math.imul(c,be)|0,s=s+Math.imul(x,me)|0,m=m+Math.imul(x,be)|0;var _r=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(_r>>>26)|0,_r&=67108863,p=Math.imul(ee,he),s=Math.imul(ee,le),s=s+Math.imul(te,he)|0,m=Math.imul(te,le),p=p+Math.imul(J,ce)|0,s=s+Math.imul(J,de)|0,s=s+Math.imul(Q,ce)|0,m=m+Math.imul(Q,de)|0,p=p+Math.imul($,pe)|0,s=s+Math.imul($,ve)|0,s=s+Math.imul(z,pe)|0,m=m+Math.imul(z,ve)|0,p=p+Math.imul(K,ye)|0,s=s+Math.imul(K,ge)|0,s=s+Math.imul(G,ye)|0,m=m+Math.imul(G,ge)|0,p=p+Math.imul(N,me)|0,s=s+Math.imul(N,be)|0,s=s+Math.imul(D,me)|0,m=m+Math.imul(D,be)|0,p=p+Math.imul(c,we)|0,s=s+Math.imul(c,_e)|0,s=s+Math.imul(x,we)|0,m=m+Math.imul(x,_e)|0;var xr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(xr>>>26)|0,xr&=67108863,p=Math.imul(re,he),s=Math.imul(re,le),s=s+Math.imul(ie,he)|0,m=Math.imul(ie,le),p=p+Math.imul(ee,ce)|0,s=s+Math.imul(ee,de)|0,s=s+Math.imul(te,ce)|0,m=m+Math.imul(te,de)|0,p=p+Math.imul(J,pe)|0,s=s+Math.imul(J,ve)|0,s=s+Math.imul(Q,pe)|0,m=m+Math.imul(Q,ve)|0,p=p+Math.imul($,ye)|0,s=s+Math.imul($,ge)|0,s=s+Math.imul(z,ye)|0,m=m+Math.imul(z,ge)|0,p=p+Math.imul(K,me)|0,s=s+Math.imul(K,be)|0,s=s+Math.imul(G,me)|0,m=m+Math.imul(G,be)|0,p=p+Math.imul(N,we)|0,s=s+Math.imul(N,_e)|0,s=s+Math.imul(D,we)|0,m=m+Math.imul(D,_e)|0,p=p+Math.imul(c,xe)|0,s=s+Math.imul(c,Me)|0,s=s+Math.imul(x,xe)|0,m=m+Math.imul(x,Me)|0;var Mr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,p=Math.imul(ne,he),s=Math.imul(ne,le),s=s+Math.imul(oe,he)|0,m=Math.imul(oe,le),p=p+Math.imul(re,ce)|0,s=s+Math.imul(re,de)|0,s=s+Math.imul(ie,ce)|0,m=m+Math.imul(ie,de)|0,p=p+Math.imul(ee,pe)|0,s=s+Math.imul(ee,ve)|0,s=s+Math.imul(te,pe)|0,m=m+Math.imul(te,ve)|0,p=p+Math.imul(J,ye)|0,s=s+Math.imul(J,ge)|0,s=s+Math.imul(Q,ye)|0,m=m+Math.imul(Q,ge)|0,p=p+Math.imul($,me)|0,s=s+Math.imul($,be)|0,s=s+Math.imul(z,me)|0,m=m+Math.imul(z,be)|0,p=p+Math.imul(K,we)|0,s=s+Math.imul(K,_e)|0,s=s+Math.imul(G,we)|0,m=m+Math.imul(G,_e)|0,p=p+Math.imul(N,xe)|0,s=s+Math.imul(N,Me)|0,s=s+Math.imul(D,xe)|0,m=m+Math.imul(D,Me)|0,p=p+Math.imul(c,Ee)|0,s=s+Math.imul(c,Se)|0,s=s+Math.imul(x,Ee)|0,m=m+Math.imul(x,Se)|0;var Er=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Er>>>26)|0,Er&=67108863,p=Math.imul(ae,he),s=Math.imul(ae,le),s=s+Math.imul(fe,he)|0,m=Math.imul(fe,le),p=p+Math.imul(ne,ce)|0,s=s+Math.imul(ne,de)|0,s=s+Math.imul(oe,ce)|0,m=m+Math.imul(oe,de)|0,p=p+Math.imul(re,pe)|0,s=s+Math.imul(re,ve)|0,s=s+Math.imul(ie,pe)|0,m=m+Math.imul(ie,ve)|0,p=p+Math.imul(ee,ye)|0,s=s+Math.imul(ee,ge)|0,s=s+Math.imul(te,ye)|0,m=m+Math.imul(te,ge)|0,p=p+Math.imul(J,me)|0,s=s+Math.imul(J,be)|0,s=s+Math.imul(Q,me)|0,m=m+Math.imul(Q,be)|0,p=p+Math.imul($,we)|0,s=s+Math.imul($,_e)|0,s=s+Math.imul(z,we)|0,m=m+Math.imul(z,_e)|0,p=p+Math.imul(K,xe)|0,s=s+Math.imul(K,Me)|0,s=s+Math.imul(G,xe)|0,m=m+Math.imul(G,Me)|0,p=p+Math.imul(N,Ee)|0,s=s+Math.imul(N,Se)|0,s=s+Math.imul(D,Ee)|0,m=m+Math.imul(D,Se)|0,p=p+Math.imul(c,Be)|0,s=s+Math.imul(c,Ae)|0,s=s+Math.imul(x,Be)|0,m=m+Math.imul(x,Ae)|0;var Sr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,p=Math.imul(se,he),s=Math.imul(se,le),s=s+Math.imul(ue,he)|0,m=Math.imul(ue,le),p=p+Math.imul(ae,ce)|0,s=s+Math.imul(ae,de)|0,s=s+Math.imul(fe,ce)|0,m=m+Math.imul(fe,de)|0,p=p+Math.imul(ne,pe)|0,s=s+Math.imul(ne,ve)|0,s=s+Math.imul(oe,pe)|0,m=m+Math.imul(oe,ve)|0,p=p+Math.imul(re,ye)|0,s=s+Math.imul(re,ge)|0,s=s+Math.imul(ie,ye)|0,m=m+Math.imul(ie,ge)|0,p=p+Math.imul(ee,me)|0,s=s+Math.imul(ee,be)|0,s=s+Math.imul(te,me)|0,m=m+Math.imul(te,be)|0,p=p+Math.imul(J,we)|0,s=s+Math.imul(J,_e)|0,s=s+Math.imul(Q,we)|0,m=m+Math.imul(Q,_e)|0,p=p+Math.imul($,xe)|0,s=s+Math.imul($,Me)|0,s=s+Math.imul(z,xe)|0,m=m+Math.imul(z,Me)|0,p=p+Math.imul(K,Ee)|0,s=s+Math.imul(K,Se)|0,s=s+Math.imul(G,Ee)|0,m=m+Math.imul(G,Se)|0,p=p+Math.imul(N,Be)|0,s=s+Math.imul(N,Ae)|0,s=s+Math.imul(D,Be)|0,m=m+Math.imul(D,Ae)|0,p=p+Math.imul(c,Re)|0,s=s+Math.imul(c,qe)|0,s=s+Math.imul(x,Re)|0,m=m+Math.imul(x,qe)|0;var Br=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Br>>>26)|0,Br&=67108863,p=Math.imul(se,ce),s=Math.imul(se,de),s=s+Math.imul(ue,ce)|0,m=Math.imul(ue,de),p=p+Math.imul(ae,pe)|0,s=s+Math.imul(ae,ve)|0,s=s+Math.imul(fe,pe)|0,m=m+Math.imul(fe,ve)|0,p=p+Math.imul(ne,ye)|0,s=s+Math.imul(ne,ge)|0,s=s+Math.imul(oe,ye)|0,m=m+Math.imul(oe,ge)|0,p=p+Math.imul(re,me)|0,s=s+Math.imul(re,be)|0,s=s+Math.imul(ie,me)|0,m=m+Math.imul(ie,be)|0,p=p+Math.imul(ee,we)|0,s=s+Math.imul(ee,_e)|0,s=s+Math.imul(te,we)|0,m=m+Math.imul(te,_e)|0,p=p+Math.imul(J,xe)|0,s=s+Math.imul(J,Me)|0,s=s+Math.imul(Q,xe)|0,m=m+Math.imul(Q,Me)|0,p=p+Math.imul($,Ee)|0,s=s+Math.imul($,Se)|0,s=s+Math.imul(z,Ee)|0,m=m+Math.imul(z,Se)|0,p=p+Math.imul(K,Be)|0,s=s+Math.imul(K,Ae)|0,s=s+Math.imul(G,Be)|0,m=m+Math.imul(G,Ae)|0,p=p+Math.imul(N,Re)|0,s=s+Math.imul(N,qe)|0,s=s+Math.imul(D,Re)|0,m=m+Math.imul(D,qe)|0;var Ar=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,p=Math.imul(se,pe),s=Math.imul(se,ve),s=s+Math.imul(ue,pe)|0,m=Math.imul(ue,ve),p=p+Math.imul(ae,ye)|0,s=s+Math.imul(ae,ge)|0,s=s+Math.imul(fe,ye)|0,m=m+Math.imul(fe,ge)|0,p=p+Math.imul(ne,me)|0,s=s+Math.imul(ne,be)|0,s=s+Math.imul(oe,me)|0,m=m+Math.imul(oe,be)|0,p=p+Math.imul(re,we)|0,s=s+Math.imul(re,_e)|0,s=s+Math.imul(ie,we)|0,m=m+Math.imul(ie,_e)|0,p=p+Math.imul(ee,xe)|0,s=s+Math.imul(ee,Me)|0,s=s+Math.imul(te,xe)|0,m=m+Math.imul(te,Me)|0,p=p+Math.imul(J,Ee)|0,s=s+Math.imul(J,Se)|0,s=s+Math.imul(Q,Ee)|0,m=m+Math.imul(Q,Se)|0,p=p+Math.imul($,Be)|0,s=s+Math.imul($,Ae)|0,s=s+Math.imul(z,Be)|0,m=m+Math.imul(z,Ae)|0,p=p+Math.imul(K,Re)|0,s=s+Math.imul(K,qe)|0,s=s+Math.imul(G,Re)|0,m=m+Math.imul(G,qe)|0;var Rr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,p=Math.imul(se,ye),s=Math.imul(se,ge),s=s+Math.imul(ue,ye)|0,m=Math.imul(ue,ge),p=p+Math.imul(ae,me)|0,s=s+Math.imul(ae,be)|0,s=s+Math.imul(fe,me)|0,m=m+Math.imul(fe,be)|0,p=p+Math.imul(ne,we)|0,s=s+Math.imul(ne,_e)|0,s=s+Math.imul(oe,we)|0,m=m+Math.imul(oe,_e)|0,p=p+Math.imul(re,xe)|0,s=s+Math.imul(re,Me)|0,s=s+Math.imul(ie,xe)|0,m=m+Math.imul(ie,Me)|0,p=p+Math.imul(ee,Ee)|0,s=s+Math.imul(ee,Se)|0,s=s+Math.imul(te,Ee)|0,m=m+Math.imul(te,Se)|0,p=p+Math.imul(J,Be)|0,s=s+Math.imul(J,Ae)|0,s=s+Math.imul(Q,Be)|0,m=m+Math.imul(Q,Ae)|0,p=p+Math.imul($,Re)|0,s=s+Math.imul($,qe)|0,s=s+Math.imul(z,Re)|0,m=m+Math.imul(z,qe)|0;var qr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(qr>>>26)|0,qr&=67108863,p=Math.imul(se,me),s=Math.imul(se,be),s=s+Math.imul(ue,me)|0,m=Math.imul(ue,be),p=p+Math.imul(ae,we)|0,s=s+Math.imul(ae,_e)|0,s=s+Math.imul(fe,we)|0,m=m+Math.imul(fe,_e)|0,p=p+Math.imul(ne,xe)|0,s=s+Math.imul(ne,Me)|0,s=s+Math.imul(oe,xe)|0,m=m+Math.imul(oe,Me)|0,p=p+Math.imul(re,Ee)|0,s=s+Math.imul(re,Se)|0,s=s+Math.imul(ie,Ee)|0,m=m+Math.imul(ie,Se)|0,p=p+Math.imul(ee,Be)|0,s=s+Math.imul(ee,Ae)|0,s=s+Math.imul(te,Be)|0,m=m+Math.imul(te,Ae)|0,p=p+Math.imul(J,Re)|0,s=s+Math.imul(J,qe)|0,s=s+Math.imul(Q,Re)|0,m=m+Math.imul(Q,qe)|0;var Tr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,p=Math.imul(se,we),s=Math.imul(se,_e),s=s+Math.imul(ue,we)|0,m=Math.imul(ue,_e),p=p+Math.imul(ae,xe)|0,s=s+Math.imul(ae,Me)|0,s=s+Math.imul(fe,xe)|0,m=m+Math.imul(fe,Me)|0,p=p+Math.imul(ne,Ee)|0,s=s+Math.imul(ne,Se)|0,s=s+Math.imul(oe,Ee)|0,m=m+Math.imul(oe,Se)|0,p=p+Math.imul(re,Be)|0,s=s+Math.imul(re,Ae)|0,s=s+Math.imul(ie,Be)|0,m=m+Math.imul(ie,Ae)|0,p=p+Math.imul(ee,Re)|0,s=s+Math.imul(ee,qe)|0,s=s+Math.imul(te,Re)|0,m=m+Math.imul(te,qe)|0;var Ir=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,p=Math.imul(se,xe),s=Math.imul(se,Me),s=s+Math.imul(ue,xe)|0,m=Math.imul(ue,Me),p=p+Math.imul(ae,Ee)|0,s=s+Math.imul(ae,Se)|0,s=s+Math.imul(fe,Ee)|0,m=m+Math.imul(fe,Se)|0,p=p+Math.imul(ne,Be)|0,s=s+Math.imul(ne,Ae)|0,s=s+Math.imul(oe,Be)|0,m=m+Math.imul(oe,Ae)|0,p=p+Math.imul(re,Re)|0,s=s+Math.imul(re,qe)|0,s=s+Math.imul(ie,Re)|0,m=m+Math.imul(ie,qe)|0;var kr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(kr>>>26)|0,kr&=67108863,p=Math.imul(se,Ee),s=Math.imul(se,Se),s=s+Math.imul(ue,Ee)|0,m=Math.imul(ue,Se),p=p+Math.imul(ae,Be)|0,s=s+Math.imul(ae,Ae)|0,s=s+Math.imul(fe,Be)|0,m=m+Math.imul(fe,Ae)|0,p=p+Math.imul(ne,Re)|0,s=s+Math.imul(ne,qe)|0,s=s+Math.imul(oe,Re)|0,m=m+Math.imul(oe,qe)|0;var Cr=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,p=Math.imul(se,Be),s=Math.imul(se,Ae),s=s+Math.imul(ue,Be)|0,m=Math.imul(ue,Ae),p=p+Math.imul(ae,Re)|0,s=s+Math.imul(ae,qe)|0,s=s+Math.imul(fe,Re)|0,m=m+Math.imul(fe,qe)|0;var Or=(g+p|0)+((s&8191)<<13)|0;g=(m+(s>>>13)|0)+(Or>>>26)|0,Or&=67108863,p=Math.imul(se,Re),s=Math.imul(se,qe),s=s+Math.imul(ue,Re)|0,m=Math.imul(ue,qe);var Pr=(g+p|0)+((s&8191)<<13)|0;return g=(m+(s>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,d[0]=di,d[1]=Ke,d[2]=We,d[3]=wr,d[4]=_r,d[5]=xr,d[6]=Mr,d[7]=Er,d[8]=Sr,d[9]=Br,d[10]=Ar,d[11]=Rr,d[12]=qr,d[13]=Tr,d[14]=Ir,d[15]=kr,d[16]=Cr,d[17]=Or,d[18]=Pr,g!==0&&(d[19]=g,l.length++),l};Math.imul||(H=P);function Z(M,h,v){v.negative=h.negative^M.negative,v.length=M.length+h.length;for(var l=0,o=0,u=0;u<v.length-1;u++){var d=o;o=0;for(var g=l&67108863,p=Math.min(u,h.length-1),s=Math.max(0,u-M.length+1);s<=p;s++){var m=u-s,_=M.words[m]|0,c=h.words[s]|0,x=_*c,O=x&67108863;d=d+(x/67108864|0)|0,O=O+g|0,g=O&67108863,d=d+(O>>>26)|0,o+=d>>>26,d&=67108863}v.words[u]=g,l=d,d=o}return l!==0?v.words[u]=l:v.length--,v.strip()}function ke(M,h,v){var l=new V;return l.mulp(M,h,v)}n.prototype.mulTo=function(h,v){var l,o=this.length+h.length;return this.length===10&&h.length===10?l=H(this,h,v):o<63?l=P(this,h,v):o<1024?l=Z(this,h,v):l=ke(this,h,v),l};function V(M,h){this.x=M,this.y=h}V.prototype.makeRBT=function(h){for(var v=new Array(h),l=n.prototype._countBits(h)-1,o=0;o<h;o++)v[o]=this.revBin(o,l,h);return v},V.prototype.revBin=function(h,v,l){if(h===0||h===l-1)return h;for(var o=0,u=0;u<v;u++)o|=(h&1)<<v-u-1,h>>=1;return o},V.prototype.permute=function(h,v,l,o,u,d){for(var g=0;g<d;g++)o[g]=v[h[g]],u[g]=l[h[g]]},V.prototype.transform=function(h,v,l,o,u,d){this.permute(d,h,v,l,o,u);for(var g=1;g<u;g<<=1)for(var p=g<<1,s=Math.cos(2*Math.PI/p),m=Math.sin(2*Math.PI/p),_=0;_<u;_+=p)for(var c=s,x=m,O=0;O<g;O++){var N=l[_+O],D=o[_+O],W=l[_+O+g],K=o[_+O+g],G=c*W-x*K;K=c*K+x*W,W=G,l[_+O]=N+W,o[_+O]=D+K,l[_+O+g]=N-W,o[_+O+g]=D-K,O!==p&&(G=s*c-m*x,x=s*x+m*c,c=G)}},V.prototype.guessLen13b=function(h,v){var l=Math.max(v,h)|1,o=l&1,u=0;for(l=l/2|0;l;l=l>>>1)u++;return 1<<u+1+o},V.prototype.conjugate=function(h,v,l){if(!(l<=1))for(var o=0;o<l/2;o++){var u=h[o];h[o]=h[l-o-1],h[l-o-1]=u,u=v[o],v[o]=-v[l-o-1],v[l-o-1]=-u}},V.prototype.normalize13b=function(h,v){for(var l=0,o=0;o<v/2;o++){var u=Math.round(h[2*o+1]/v)*8192+Math.round(h[2*o]/v)+l;h[o]=u&67108863,u<67108864?l=0:l=u/67108864|0}return h},V.prototype.convert13b=function(h,v,l,o){for(var u=0,d=0;d<v;d++)u=u+(h[d]|0),l[2*d]=u&8191,u=u>>>13,l[2*d+1]=u&8191,u=u>>>13;for(d=2*v;d<o;++d)l[d]=0;r(u===0),r((u&-8192)===0)},V.prototype.stub=function(h){for(var v=new Array(h),l=0;l<h;l++)v[l]=0;return v},V.prototype.mulp=function(h,v,l){var o=2*this.guessLen13b(h.length,v.length),u=this.makeRBT(o),d=this.stub(o),g=new Array(o),p=new Array(o),s=new Array(o),m=new Array(o),_=new Array(o),c=new Array(o),x=l.words;x.length=o,this.convert13b(h.words,h.length,g,o),this.convert13b(v.words,v.length,m,o),this.transform(g,d,p,s,o,u),this.transform(m,d,_,c,o,u);for(var O=0;O<o;O++){var N=p[O]*_[O]-s[O]*c[O];s[O]=p[O]*c[O]+s[O]*_[O],p[O]=N}return this.conjugate(p,s,o),this.transform(p,s,x,d,o,u),this.conjugate(x,d,o),this.normalize13b(x,o),l.negative=h.negative^v.negative,l.length=h.length+v.length,l.strip()},n.prototype.mul=function(h){var v=new n(null);return v.words=new Array(this.length+h.length),this.mulTo(h,v)},n.prototype.mulf=function(h){var v=new n(null);return v.words=new Array(this.length+h.length),ke(this,h,v)},n.prototype.imul=function(h){return this.clone().mulTo(h,this)},n.prototype.imuln=function(h){r(typeof h=="number"),r(h<67108864);for(var v=0,l=0;l<this.length;l++){var o=(this.words[l]|0)*h,u=(o&67108863)+(v&67108863);v>>=26,v+=o/67108864|0,v+=u>>>26,this.words[l]=u&67108863}return v!==0&&(this.words[l]=v,this.length++),h===0&&(this.length=1,this._normSign()),this},n.prototype.muln=function(h){return this.clone().imuln(h)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(h){var v=k(h);if(v.length===0)return new n(1);for(var l=this,o=0;o<v.length&&v[o]===0;o++,l=l.sqr());if(++o<v.length)for(var u=l.sqr();o<v.length;o++,u=u.sqr())v[o]!==0&&(l=l.mul(u));return l},n.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var v=h%26,l=(h-v)/26,o=67108863>>>26-v<<26-v,u;if(v!==0){var d=0;for(u=0;u<this.length;u++){var g=this.words[u]&o,p=(this.words[u]|0)-g<<v;this.words[u]=p|d,d=g>>>26-v}d&&(this.words[u]=d,this.length++)}if(l!==0){for(u=this.length-1;u>=0;u--)this.words[u+l]=this.words[u];for(u=0;u<l;u++)this.words[u]=0;this.length+=l}return this.strip()},n.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},n.prototype.iushrn=function(h,v,l){r(typeof h=="number"&&h>=0);var o;v?o=(v-v%26)/26:o=0;var u=h%26,d=Math.min((h-u)/26,this.length),g=67108863^67108863>>>u<<u,p=l;if(o-=d,o=Math.max(0,o),p){for(var s=0;s<d;s++)p.words[s]=this.words[s];p.length=d}if(d!==0)if(this.length>d)for(this.length-=d,s=0;s<this.length;s++)this.words[s]=this.words[s+d];else this.words[0]=0,this.length=1;var m=0;for(s=this.length-1;s>=0&&(m!==0||s>=o);s--){var _=this.words[s]|0;this.words[s]=m<<26-u|_>>>u,m=_&g}return p&&m!==0&&(p.words[p.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(h,v,l){return r(this.negative===0),this.iushrn(h,v,l)},n.prototype.shln=function(h){return this.clone().ishln(h)},n.prototype.ushln=function(h){return this.clone().iushln(h)},n.prototype.shrn=function(h){return this.clone().ishrn(h)},n.prototype.ushrn=function(h){return this.clone().iushrn(h)},n.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var v=h%26,l=(h-v)/26,o=1<<v;if(this.length<=l)return!1;var u=this.words[l];return!!(u&o)},n.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var v=h%26,l=(h-v)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(v!==0&&l++,this.length=Math.min(l,this.length),v!==0){var o=67108863^67108863>>>v<<v;this.words[this.length-1]&=o}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(h){return this.clone().imaskn(h)},n.prototype.iaddn=function(h){return r(typeof h=="number"),r(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},n.prototype._iaddn=function(h){this.words[0]+=h;for(var v=0;v<this.length&&this.words[v]>=67108864;v++)this.words[v]-=67108864,v===this.length-1?this.words[v+1]=1:this.words[v+1]++;return this.length=Math.max(this.length,v+1),this},n.prototype.isubn=function(h){if(r(typeof h=="number"),r(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var v=0;v<this.length&&this.words[v]<0;v++)this.words[v]+=67108864,this.words[v+1]-=1;return this.strip()},n.prototype.addn=function(h){return this.clone().iaddn(h)},n.prototype.subn=function(h){return this.clone().isubn(h)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(h,v,l){var o=h.length+l,u;this._expand(o);var d,g=0;for(u=0;u<h.length;u++){d=(this.words[u+l]|0)+g;var p=(h.words[u]|0)*v;d-=p&67108863,g=(d>>26)-(p/67108864|0),this.words[u+l]=d&67108863}for(;u<this.length-l;u++)d=(this.words[u+l]|0)+g,g=d>>26,this.words[u+l]=d&67108863;if(g===0)return this.strip();for(r(g===-1),g=0,u=0;u<this.length;u++)d=-(this.words[u]|0)+g,g=d>>26,this.words[u]=d&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(h,v){var l=this.length-h.length,o=this.clone(),u=h,d=u.words[u.length-1]|0,g=this._countBits(d);l=26-g,l!==0&&(u=u.ushln(l),o.iushln(l),d=u.words[u.length-1]|0);var p=o.length-u.length,s;if(v!=="mod"){s=new n(null),s.length=p+1,s.words=new Array(s.length);for(var m=0;m<s.length;m++)s.words[m]=0}var _=o.clone()._ishlnsubmul(u,1,p);_.negative===0&&(o=_,s&&(s.words[p]=1));for(var c=p-1;c>=0;c--){var x=(o.words[u.length+c]|0)*67108864+(o.words[u.length+c-1]|0);for(x=Math.min(x/d|0,67108863),o._ishlnsubmul(u,x,c);o.negative!==0;)x--,o.negative=0,o._ishlnsubmul(u,1,c),o.isZero()||(o.negative^=1);s&&(s.words[c]=x)}return s&&s.strip(),o.strip(),v!=="div"&&l!==0&&o.iushrn(l),{div:s||null,mod:o}},n.prototype.divmod=function(h,v,l){if(r(!h.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var o,u,d;return this.negative!==0&&h.negative===0?(d=this.neg().divmod(h,v),v!=="mod"&&(o=d.div.neg()),v!=="div"&&(u=d.mod.neg(),l&&u.negative!==0&&u.iadd(h)),{div:o,mod:u}):this.negative===0&&h.negative!==0?(d=this.divmod(h.neg(),v),v!=="mod"&&(o=d.div.neg()),{div:o,mod:d.mod}):(this.negative&h.negative)!==0?(d=this.neg().divmod(h.neg(),v),v!=="div"&&(u=d.mod.neg(),l&&u.negative!==0&&u.isub(h)),{div:d.div,mod:u}):h.length>this.length||this.cmp(h)<0?{div:new n(0),mod:this}:h.length===1?v==="div"?{div:this.divn(h.words[0]),mod:null}:v==="mod"?{div:null,mod:new n(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new n(this.modn(h.words[0]))}:this._wordDiv(h,v)},n.prototype.div=function(h){return this.divmod(h,"div",!1).div},n.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},n.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},n.prototype.divRound=function(h){var v=this.divmod(h);if(v.mod.isZero())return v.div;var l=v.mod.abs(),o=h.abs().iushrn(1),u=h.words[0]&1,d=l.cmp(o);if(d<0||u===1&&d===0)return v.div;var g=new n(1);return g.negative=this.negative^h.negative,v.div.iadd(g)},n.prototype.modn=function(h){r(h<=67108863);for(var v=(1<<26)%h,l=0,o=this.length-1;o>=0;o--)l=(v*l+(this.words[o]|0))%h;return l},n.prototype.idivn=function(h){r(h<=67108863);for(var v=0,l=this.length-1;l>=0;l--){var o=(this.words[l]|0)+v*67108864;this.words[l]=o/h|0,v=o%h}return this.strip()},n.prototype.divn=function(h){return this.clone().idivn(h)},n.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var v=this,l=h.clone();v.negative!==0?v=v.umod(h):v=v.clone();for(var o=new n(1),u=new n(0),d=new n(0),g=new n(1),p=0;v.isEven()&&l.isEven();)v.iushrn(1),l.iushrn(1),++p;for(var s=l.clone(),m=v.clone();!v.isZero();){for(var _=0,c=1;(v.words[0]&c)===0&&_<26;++_,c<<=1);if(_>0)for(v.iushrn(_);_-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(s),u.isub(m)),o.iushrn(1),u.iushrn(1);for(var x=0,O=1;(l.words[0]&O)===0&&x<26;++x,O<<=1);if(x>0)for(l.iushrn(x);x-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(s),g.isub(m)),d.iushrn(1),g.iushrn(1);v.cmp(l)>=0?(v.isub(l),o.isub(d),u.isub(g)):(l.isub(v),d.isub(o),g.isub(u))}return{a:d,b:g,gcd:l.iushln(p)}},n.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var v=this,l=h.clone();v.negative!==0?v=v.umod(h):v=v.clone();for(var o=new n(1),u=new n(0),d=l.clone();v.cmpn(1)>0&&l.cmpn(1)>0;){for(var g=0,p=1;(v.words[0]&p)===0&&g<26;++g,p<<=1);if(g>0)for(v.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(d),o.iushrn(1);for(var s=0,m=1;(l.words[0]&m)===0&&s<26;++s,m<<=1);if(s>0)for(l.iushrn(s);s-- >0;)u.isOdd()&&u.iadd(d),u.iushrn(1);v.cmp(l)>=0?(v.isub(l),o.isub(u)):(l.isub(v),u.isub(o))}var _;return v.cmpn(1)===0?_=o:_=u,_.cmpn(0)<0&&_.iadd(h),_},n.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var v=this.clone(),l=h.clone();v.negative=0,l.negative=0;for(var o=0;v.isEven()&&l.isEven();o++)v.iushrn(1),l.iushrn(1);do{for(;v.isEven();)v.iushrn(1);for(;l.isEven();)l.iushrn(1);var u=v.cmp(l);if(u<0){var d=v;v=l,l=d}else if(u===0||l.cmpn(1)===0)break;v.isub(l)}while(!0);return l.iushln(o)},n.prototype.invm=function(h){return this.egcd(h).a.umod(h)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(h){return this.words[0]&h},n.prototype.bincn=function(h){r(typeof h=="number");var v=h%26,l=(h-v)/26,o=1<<v;if(this.length<=l)return this._expand(l+1),this.words[l]|=o,this;for(var u=o,d=l;u!==0&&d<this.length;d++){var g=this.words[d]|0;g+=u,u=g>>>26,g&=67108863,this.words[d]=g}return u!==0&&(this.words[d]=u,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(h){var v=h<0;if(this.negative!==0&&!v)return-1;if(this.negative===0&&v)return 1;this.strip();var l;if(this.length>1)l=1;else{v&&(h=-h),r(h<=67108863,"Number is too big");var o=this.words[0]|0;l=o===h?0:o<h?-1:1}return this.negative!==0?-l|0:l},n.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var v=this.ucmp(h);return this.negative!==0?-v|0:v},n.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var v=0,l=this.length-1;l>=0;l--){var o=this.words[l]|0,u=h.words[l]|0;if(o!==u){o<u?v=-1:o>u&&(v=1);break}}return v},n.prototype.gtn=function(h){return this.cmpn(h)===1},n.prototype.gt=function(h){return this.cmp(h)===1},n.prototype.gten=function(h){return this.cmpn(h)>=0},n.prototype.gte=function(h){return this.cmp(h)>=0},n.prototype.ltn=function(h){return this.cmpn(h)===-1},n.prototype.lt=function(h){return this.cmp(h)===-1},n.prototype.lten=function(h){return this.cmpn(h)<=0},n.prototype.lte=function(h){return this.cmp(h)<=0},n.prototype.eqn=function(h){return this.cmpn(h)===0},n.prototype.eq=function(h){return this.cmp(h)===0},n.red=function(h){return new F(h)},n.prototype.toRed=function(h){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(h){return this.red=h,this},n.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},n.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},n.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},n.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},n.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},n.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},n.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},n.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var Y={k256:null,p224:null,p192:null,p25519:null};function He(M,h){this.name=M,this.p=new n(h,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}He.prototype._tmp=function(){var h=new n(null);return h.words=new Array(Math.ceil(this.n/13)),h},He.prototype.ireduce=function(h){var v=h,l;do this.split(v,this.tmp),v=this.imulK(v),v=v.iadd(this.tmp),l=v.bitLength();while(l>this.n);var o=l<this.n?-1:v.ucmp(this.p);return o===0?(v.words[0]=0,v.length=1):o>0?v.isub(this.p):v.strip!==void 0?v.strip():v._strip(),v},He.prototype.split=function(h,v){h.iushrn(this.n,0,v)},He.prototype.imulK=function(h){return h.imul(this.k)};function T(){He.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(T,He),T.prototype.split=function(h,v){for(var l=4194303,o=Math.min(h.length,9),u=0;u<o;u++)v.words[u]=h.words[u];if(v.length=o,h.length<=9){h.words[0]=0,h.length=1;return}var d=h.words[9];for(v.words[v.length++]=d&l,u=10;u<h.length;u++){var g=h.words[u]|0;h.words[u-10]=(g&l)<<4|d>>>22,d=g}d>>>=22,h.words[u-10]=d,d===0&&h.length>10?h.length-=10:h.length-=9},T.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var v=0,l=0;l<h.length;l++){var o=h.words[l]|0;v+=o*977,h.words[l]=v&67108863,v=o*64+(v/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function C(){He.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(C,He);function U(){He.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(U,He);function L(){He.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(L,He),L.prototype.imulK=function(h){for(var v=0,l=0;l<h.length;l++){var o=(h.words[l]|0)*19+v,u=o&67108863;o>>>=26,h.words[l]=u,v=o}return v!==0&&(h.words[h.length++]=v),h},n._prime=function(h){if(Y[h])return Y[h];var v;if(h==="k256")v=new T;else if(h==="p224")v=new C;else if(h==="p192")v=new U;else if(h==="p25519")v=new L;else throw new Error("Unknown prime "+h);return Y[h]=v,v};function F(M){if(typeof M=="string"){var h=n._prime(M);this.m=h.p,this.prime=h}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}F.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},F.prototype._verify2=function(h,v){r((h.negative|v.negative)===0,"red works only with positives"),r(h.red&&h.red===v.red,"red works only with red numbers")},F.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},F.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},F.prototype.add=function(h,v){this._verify2(h,v);var l=h.add(v);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},F.prototype.iadd=function(h,v){this._verify2(h,v);var l=h.iadd(v);return l.cmp(this.m)>=0&&l.isub(this.m),l},F.prototype.sub=function(h,v){this._verify2(h,v);var l=h.sub(v);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},F.prototype.isub=function(h,v){this._verify2(h,v);var l=h.isub(v);return l.cmpn(0)<0&&l.iadd(this.m),l},F.prototype.shl=function(h,v){return this._verify1(h),this.imod(h.ushln(v))},F.prototype.imul=function(h,v){return this._verify2(h,v),this.imod(h.imul(v))},F.prototype.mul=function(h,v){return this._verify2(h,v),this.imod(h.mul(v))},F.prototype.isqr=function(h){return this.imul(h,h.clone())},F.prototype.sqr=function(h){return this.mul(h,h)},F.prototype.sqrt=function(h){if(h.isZero())return h.clone();var v=this.m.andln(3);if(r(v%2===1),v===3){var l=this.m.add(new n(1)).iushrn(2);return this.pow(h,l)}for(var o=this.m.subn(1),u=0;!o.isZero()&&o.andln(1)===0;)u++,o.iushrn(1);r(!o.isZero());var d=new n(1).toRed(this),g=d.redNeg(),p=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new n(2*s*s).toRed(this);this.pow(s,p).cmp(g)!==0;)s.redIAdd(g);for(var m=this.pow(s,o),_=this.pow(h,o.addn(1).iushrn(1)),c=this.pow(h,o),x=u;c.cmp(d)!==0;){for(var O=c,N=0;O.cmp(d)!==0;N++)O=O.redSqr();r(N<x);var D=this.pow(m,new n(1).iushln(x-N-1));_=_.redMul(D),m=D.redSqr(),c=c.redMul(m),x=N}return _},F.prototype.invm=function(h){var v=h._invmp(this.m);return v.negative!==0?(v.negative=0,this.imod(v).redNeg()):this.imod(v)},F.prototype.pow=function(h,v){if(v.isZero())return new n(1).toRed(this);if(v.cmpn(1)===0)return h.clone();var l=4,o=new Array(1<<l);o[0]=new n(1).toRed(this),o[1]=h;for(var u=2;u<o.length;u++)o[u]=this.mul(o[u-1],h);var d=o[0],g=0,p=0,s=v.bitLength()%26;for(s===0&&(s=26),u=v.length-1;u>=0;u--){for(var m=v.words[u],_=s-1;_>=0;_--){var c=m>>_&1;if(d!==o[0]&&(d=this.sqr(d)),c===0&&g===0){p=0;continue}g<<=1,g|=c,p++,!(p!==l&&(u!==0||_!==0))&&(d=this.mul(d,o[g]),p=0,g=0)}s=26}return d},F.prototype.convertTo=function(h){var v=h.umod(this.m);return v===h?v.clone():v},F.prototype.convertFrom=function(h){var v=h.clone();return v.red=null,v},n.mont=function(h){return new j(h)};function j(M){F.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(j,F),j.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},j.prototype.convertFrom=function(h){var v=this.imod(h.mul(this.rinv));return v.red=null,v},j.prototype.imul=function(h,v){if(h.isZero()||v.isZero())return h.words[0]=0,h.length=1,h;var l=h.imul(v),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=l.isub(o).iushrn(this.shift),d=u;return u.cmp(this.m)>=0?d=u.isub(this.m):u.cmpn(0)<0&&(d=u.iadd(this.m)),d._forceRed(this)},j.prototype.mul=function(h,v){if(h.isZero()||v.isZero())return new n(0)._forceRed(this);var l=h.mul(v),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=l.isub(o).iushrn(this.shift),d=u;return u.cmp(this.m)>=0?d=u.isub(this.m):u.cmpn(0)<0&&(d=u.iadd(this.m)),d._forceRed(this)},j.prototype.invm=function(h){var v=this.imod(h._invmp(this.m).mul(this.r2));return v._forceRed(this)}})(typeof Cu>"u"||Cu,i1)});var n1=B((Q7,Du)=>{w();var Ou;Du.exports=function(e){return Ou||(Ou=new mr(null)),Ou.generate(e)};function mr(t){this.rand=t}Du.exports.Rand=mr;mr.prototype.generate=function(e){return this._rand(e)};mr.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?mr.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?mr.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(mr.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Pu=Uu(),typeof Pu.randomBytes!="function")throw new Error("Not supported");mr.prototype._rand=function(e){return Pu.randomBytes(e)}}catch{}var Pu});var Nu=B((t9,o1)=>{w();var ui=gr(),AM=n1();function hi(t){this.rand=t||new AM.Rand}o1.exports=hi;hi.create=function(e){return new hi(e)};hi.prototype._randbelow=function(e){var r=e.bitLength(),i=Math.ceil(r/8);do var n=new ui(this.rand.generate(i));while(n.cmp(e)>=0);return n};hi.prototype._randrange=function(e,r){var i=r.sub(e);return e.add(this._randbelow(i))};hi.prototype.test=function(e,r,i){var n=e.bitLength(),a=ui.mont(e),f=new ui(1).toRed(a);r||(r=Math.max(1,n/48|0));for(var y=e.subn(1),b=0;!y.testn(b);b++);for(var S=e.shrn(b),A=y.toRed(a),q=!0;r>0;r--){var k=this._randrange(new ui(2),y);i&&i(k);var P=k.toRed(a).redPow(S);if(!(P.cmp(f)===0||P.cmp(A)===0)){for(var H=1;H<b;H++){if(P=P.redSqr(),P.cmp(f)===0)return!1;if(P.cmp(A)===0)break}if(H===b)return!1}}return q};hi.prototype.getDivisor=function(e,r){var i=e.bitLength(),n=ui.mont(e),a=new ui(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var f=e.subn(1),y=0;!f.testn(y);y++);for(var b=e.shrn(y),S=f.toRed(n);r>0;r--){var A=this._randrange(new ui(2),f),q=e.gcd(A);if(q.cmpn(1)!==0)return q;var k=A.toRed(n).redPow(b);if(!(k.cmp(a)===0||k.cmp(S)===0)){for(var P=1;P<y;P++){if(k=k.redSqr(),k.cmp(a)===0)return k.fromRed().subn(1).gcd(e);if(k.cmp(S)===0)break}if(P===y)return k=k.redSqr(),k.fromRed().subn(1).gcd(e)}}return!1}});var Wu=B((f9,s1)=>{w();var RM=Fr();s1.exports=Ku;Ku.simpleSieve=ju;Ku.fermatTest=Hu;var et=gr(),qM=new et(24),TM=Nu(),a1=new TM,IM=new et(1),Fu=new et(2),kM=new et(5),i9=new et(16),n9=new et(8),CM=new et(10),OM=new et(3),o9=new et(7),PM=new et(11),f1=new et(4),a9=new et(12),Lu=null;function DM(){if(Lu!==null)return Lu;var t=1048576,e=[];e[0]=2;for(var r=1,i=3;i<t;i+=2){for(var n=Math.ceil(Math.sqrt(i)),a=0;a<r&&e[a]<=n&&i%e[a]!==0;a++);r!==a&&e[a]<=n||(e[r++]=i)}return Lu=e,e}function ju(t){for(var e=DM(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return!0}function Hu(t){var e=et.mont(t);return Fu.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Ku(t,e){if(t<16)return e===2||e===5?new et([140,123]):new et([140,39]);e=new et(e);for(var r,i;;){for(r=new et(RM(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(IM),r.testn(1)||r.iadd(Fu),e.cmp(Fu)){if(!e.cmp(kM))for(;r.mod(CM).cmp(OM);)r.iadd(f1)}else for(;r.mod(qM).cmp(PM);)r.iadd(f1);if(i=r.shrn(1),ju(i)&&ju(r)&&Hu(i)&&Hu(r)&&a1.test(i)&&a1.test(r))return r}}});var u1=B((u9,UM)=>{UM.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}});var d1=B((h9,c1)=>{w();var wt=gr(),NM=Nu(),h1=new NM,LM=new wt(24),FM=new wt(11),jM=new wt(10),HM=new wt(3),KM=new wt(7),l1=Wu(),WM=Fr();c1.exports=or;function GM(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this._pub=new wt(t),this}function VM(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this._priv=new wt(t),this}var Xa={};function $M(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in Xa)return Xa[i];var n=0;if(t.isEven()||!l1.simpleSieve||!l1.fermatTest(t)||!h1.test(t))return n+=1,r==="02"||r==="05"?n+=8:n+=4,Xa[i]=n,n;h1.test(t.shrn(1))||(n+=2);var a;switch(r){case"02":t.mod(LM).cmp(FM)&&(n+=8);break;case"05":a=t.mod(jM),a.cmp(HM)&&a.cmp(KM)&&(n+=8);break;default:n+=4}return Xa[i]=n,n}function or(t,e,r){this.setGenerator(e),this.__prime=new wt(t),this._prime=wt.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=GM,this.setPrivateKey=VM):this._primeCode=8}Object.defineProperty(or.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=$M(this.__prime,this.__gen)),this._primeCode}});or.prototype.generateKeys=function(){return this._priv||(this._priv=new wt(WM(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};or.prototype.computeSecret=function(t){t=new wt(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new R.Buffer(e.toArray()),i=this.getPrime();if(r.length<i.length){var n=new R.Buffer(i.length-r.length);n.fill(0),r=R.Buffer.concat([n,r])}return r};or.prototype.getPublicKey=function(e){return Ja(this._pub,e)};or.prototype.getPrivateKey=function(e){return Ja(this._priv,e)};or.prototype.getPrime=function(t){return Ja(this.__prime,t)};or.prototype.getGenerator=function(t){return Ja(this._gen,t)};or.prototype.setGenerator=function(t,e){return e=e||"utf8",R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),this.__gen=t,this._gen=new wt(t),this};function Ja(t,e){var r=new R.Buffer(t.toArray());return e?r.toString(e):r}});var y1=B($i=>{w();var zM=Wu(),p1=u1(),Gu=d1();function ZM(t){var e=new R.Buffer(p1[t].prime,"hex"),r=new R.Buffer(p1[t].gen,"hex");return new Gu(e,r)}var YM={binary:!0,hex:!0,base64:!0};function v1(t,e,r,i){return R.Buffer.isBuffer(e)||YM[e]===void 0?v1(t,"binary",e,r):(e=e||"binary",i=i||"binary",r=r||new R.Buffer([2]),R.Buffer.isBuffer(r)||(r=new R.Buffer(r,i)),typeof t=="number"?new Gu(zM(t,r),r,!0):(R.Buffer.isBuffer(t)||(t=new R.Buffer(t,e)),new Gu(t,r,!0)))}$i.DiffieHellmanGroup=$i.createDiffieHellmanGroup=$i.getDiffieHellman=ZM;$i.createDiffieHellman=$i.DiffieHellman=v1});var g1=B((exports,module)=>{w();var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(e,r,i){e[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(t),function(y){r[y]=t[y]}),forEach(globals,function(y){t[y]&&(r[y]=t[y])});var a=Object_keys(r),f=i.call(r,this.code);return forEach(Object_keys(r),function(y){(y in t||indexOf(a,y)===-1)&&(t[y]=r[y])}),forEach(globals,function(y){y in t||defineProp(t,y,r[y])}),document.body.removeChild(e),f};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),function(i){t[i]=e[i]}),r};forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(t){return t instanceof Context};exports.createScript=function(t){return exports.Script(t)};exports.createContext=Script.createContext=function(t){var e=new Context;return typeof t=="object"&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}});var w1=B(b1=>{w();var m1=Zi(),XM=X(),JM=b1;JM.define=function(e,r){return new zi(e,r)};function zi(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}zi.prototype._createNamed=function(e){var r;try{r=g1().runInThisContext("(function "+this.name+`(entity) {
|
|
12
12
|
this._initNamed(entity);
|
|
13
|
-
})`)}catch{r=function(i){this._initNamed(i)}}return jM(r,e),r.prototype._initNamed=function(i){e.call(this,i)},new r(this)};mn.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(cg.decoders[e])),this.decoders[e]};mn.prototype.decode=function(e,r,n){return this._getDecoder(r).decode(e,n)};mn.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(cg.encoders[e])),this.encoders[e]};mn.prototype.encode=function(e,r,n){return this._getEncoder(r).encode(e,n)}});var yg=R(vg=>{w();var KM=J();function Rt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}vg.Reporter=Rt;Rt.prototype.isError=function(e){return e instanceof wn};Rt.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Rt.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Rt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Rt.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};Rt.prototype.leaveKey=function(e,r,n){var i=this._reporterState;this.exitKey(e),i.obj!==null&&(i.obj[r]=n)};Rt.prototype.path=function(){return this._reporterState.path.join("/")};Rt.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};Rt.prototype.leaveObject=function(e){var r=this._reporterState,n=r.obj;return r.obj=e,n};Rt.prototype.error=function(e){var r,n=this._reporterState,i=e instanceof wn;if(i?r=e:r=new wn(n.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return i||n.errors.push(r),r};Rt.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function wn(t,e){this.path=t,this.rethrow(e)}KM(wn,Error);wn.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,wn),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var Oh=R(Ch=>{w();var WM=J(),Df=_n().Reporter,Ha=ft().Buffer;function er(t,e){if(Df.call(this,e),!Ha.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}WM(er,Df);Ch.DecoderBuffer=er;er.prototype.save=function(){return{offset:this.offset,reporter:Df.prototype.save.call(this)}};er.prototype.restore=function(e){var r=new er(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Df.prototype.restore.call(this,e.reporter),r};er.prototype.isEmpty=function(){return this.offset===this.length};er.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};er.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var n=new er(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n};er.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Pf(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof Pf||(r=new Pf(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=Ha.byteLength(t);else if(Ha.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}Ch.EncoderBuffer=Pf;Pf.prototype.join=function(e,r){return e||(e=new Ha(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,r),r+=n.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):Ha.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var bg=R((CI,mg)=>{w();var zM=_n().Reporter,GM=_n().EncoderBuffer,VM=_n().DecoderBuffer,pt=Ot(),gg=["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"],$M=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(gg),ZM=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function He(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())}mg.exports=He;var YM=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];He.prototype.clone=function(){var e=this._baseState,r={};YM.forEach(function(i){r[i]=e[i]});var n=new this.constructor(r.parent);return n._baseState=r,n};He.prototype._wrap=function(){var e=this._baseState;$M.forEach(function(r){this[r]=function(){var i=new this.constructor(this);return e.children.push(i),i[r].apply(i,arguments)}},this)};He.prototype._init=function(e){var r=this._baseState;pt(r.parent===null),e.call(this),r.children=r.children.filter(function(n){return n._baseState.parent===this},this),pt.equal(r.children.length,1,"Root node can have only one child")};He.prototype._useArgs=function(e){var r=this._baseState,n=e.filter(function(i){return i instanceof this.constructor},this);e=e.filter(function(i){return!(i instanceof this.constructor)},this),n.length!==0&&(pt(r.children===null),r.children=n,n.forEach(function(i){i._baseState.parent=this},this)),e.length!==0&&(pt(r.args===null),r.args=e,r.reverseArgs=e.map(function(i){if(typeof i!="object"||i.constructor!==Object)return i;var a={};return Object.keys(i).forEach(function(f){f==(f|0)&&(f|=0);var v=i[f];a[v]=f}),a}))};ZM.forEach(function(t){He.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});gg.forEach(function(t){He.prototype[t]=function(){var r=this._baseState,n=Array.prototype.slice.call(arguments);return pt(r.tag===null),r.tag=t,this._useArgs(n),this}});He.prototype.use=function(e){pt(e);var r=this._baseState;return pt(r.use===null),r.use=e,this};He.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};He.prototype.def=function(e){var r=this._baseState;return pt(r.default===null),r.default=e,r.optional=!0,this};He.prototype.explicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.explicit=e,this};He.prototype.implicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.implicit=e,this};He.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};He.prototype.key=function(e){var r=this._baseState;return pt(r.key===null),r.key=e,this};He.prototype.any=function(){var e=this._baseState;return e.any=!0,this};He.prototype.choice=function(e){var r=this._baseState;return pt(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(n){return e[n]})),this};He.prototype.contains=function(e){var r=this._baseState;return pt(r.use===null),r.contains=e,this};He.prototype._decode=function(e,r){var n=this._baseState;if(n.parent===null)return e.wrapResult(n.children[0]._decode(e,r));var i=n.default,a=!0,f=null;if(n.key!==null&&(f=e.enterKey(n.key)),n.optional){var v=null;if(n.explicit!==null?v=n.explicit:n.implicit!==null?v=n.implicit:n.tag!==null&&(v=n.tag),v===null&&!n.any){var m=e.save();try{n.choice===null?this._decodeGeneric(n.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(m)}else if(a=this._peekTag(e,v,n.any),e.isError(a))return a}var E;if(n.obj&&a&&(E=e.enterObject()),a){if(n.explicit!==null){var A=this._decodeTag(e,n.explicit);if(e.isError(A))return A;e=A}var q=e.offset;if(n.use===null&&n.choice===null){if(n.any)var m=e.save();var I=this._decodeTag(e,n.implicit!==null?n.implicit:n.tag,n.any);if(e.isError(I))return I;n.any?i=e.raw(m):e=I}if(r&&r.track&&n.tag!==null&&r.track(e.path(),q,e.length,"tagged"),r&&r.track&&n.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),n.any?i=i:n.choice===null?i=this._decodeGeneric(n.tag,e,r):i=this._decodeChoice(e,r),e.isError(i))return i;if(!n.any&&n.choice===null&&n.children!==null&&n.children.forEach(function(V){V._decode(e,r)}),n.contains&&(n.tag==="octstr"||n.tag==="bitstr")){var C=new VM(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(C,r)}}return n.obj&&a&&(i=e.leaveObject(E)),n.key!==null&&(i!==null||a===!0)?e.leaveKey(f,n.key,i):f!==null&&e.exitKey(f),i};He.prototype._decodeGeneric=function(e,r,n){var i=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,i.args[0],n):/str$/.test(e)?this._decodeStr(r,e,n):e==="objid"&&i.args?this._decodeObjid(r,i.args[0],i.args[1],n):e==="objid"?this._decodeObjid(r,null,null,n):e==="gentime"||e==="utctime"?this._decodeTime(r,e,n):e==="null_"?this._decodeNull(r,n):e==="bool"?this._decodeBool(r,n):e==="objDesc"?this._decodeStr(r,e,n):e==="int"||e==="enum"?this._decodeInt(r,i.args&&i.args[0],n):i.use!==null?this._getUse(i.use,r._reporterState.obj)._decode(r,n):r.error("unknown tag: "+e)};He.prototype._getUse=function(e,r){var n=this._baseState;return n.useDecoder=this._use(e,r),pt(n.useDecoder._baseState.parent===null),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder};He.prototype._decodeChoice=function(e,r){var n=this._baseState,i=null,a=!1;return Object.keys(n.choice).some(function(f){var v=e.save(),m=n.choice[f];try{var E=m._decode(e,r);if(e.isError(E))return!1;i={type:f,value:E},a=!0}catch{return e.restore(v),!1}return!0},this),a?i:e.error("Choice not matched")};He.prototype._createEncoderBuffer=function(e){return new GM(e,this.reporter)};He.prototype._encode=function(e,r,n){var i=this._baseState;if(!(i.default!==null&&i.default===e)){var a=this._encodeValue(e,r,n);if(a!==void 0&&!this._skipDefault(a,r,n))return a}};He.prototype._encodeValue=function(e,r,n){var i=this._baseState;if(i.parent===null)return i.children[0]._encode(e,r||new zM);var m=null;if(this.reporter=r,i.optional&&e===void 0)if(i.default!==null)e=i.default;else return;var a=null,f=!1;if(i.any)m=this._createEncoderBuffer(e);else if(i.choice)m=this._encodeChoice(e,r);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,r),f=!0;else if(i.children)a=i.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 I=r.enterKey(q._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var C=q._encode(e[q._baseState.key],r,e);return r.leaveKey(I),C},this).filter(function(q){return q}),a=this._createEncoderBuffer(a);else if(i.tag==="seqof"||i.tag==="setof"){if(!(i.args&&i.args.length===1))return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var v=this.clone();v._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(q){var I=this._baseState;return this._getUse(I.args[0],e)._encode(q,r)},v))}else i.use!==null?m=this._getUse(i.use,n)._encode(e,r):(a=this._encodePrimitive(i.tag,e),f=!0);var m;if(!i.any&&i.choice===null){var E=i.implicit!==null?i.implicit:i.tag,A=i.implicit===null?"universal":"context";E===null?i.use===null&&r.error("Tag could be omitted only for .use()"):i.use===null&&(m=this._encodeComposite(E,f,A,a))}return i.explicit!==null&&(m=this._encodeComposite(i.explicit,!1,"context",m)),m};He.prototype._encodeChoice=function(e,r){var n=this._baseState,i=n.choice[e.type];return i||pt(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,r)};He.prototype._encodePrimitive=function(e,r){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&n.args)return this._encodeObjid(r,n.reverseArgs[0],n.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,n.args&&n.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};He.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};He.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var _n=R(wg=>{w();var Uf=wg;Uf.Reporter=yg().Reporter;Uf.DecoderBuffer=Oh().DecoderBuffer;Uf.EncoderBuffer=Oh().EncoderBuffer;Uf.Node=bg()});var xg=R(Oi=>{w();var _g=Ph();Oi.tagClass={0:"universal",1:"application",2:"context",3:"private"};Oi.tagClassByName=_g._reverse(Oi.tagClass);Oi.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"};Oi.tagByName=_g._reverse(Oi.tag)});var Ph=R(Eg=>{w();var Mg=Eg;Mg._reverse=function(e){var r={};return Object.keys(e).forEach(function(n){(n|0)==n&&(n=n|0);var i=e[n];r[i]=n}),r};Mg.der=xg()});var Nh=R((jI,Rg)=>{w();var XM=J(),Dh=bn(),Nf=Dh.base,JM=Dh.bignum,Sg=Dh.constants.der;function Bg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new bt,this.tree._init(t.body)}Rg.exports=Bg;Bg.prototype.decode=function(e,r){return e instanceof Nf.DecoderBuffer||(e=new Nf.DecoderBuffer(e,r)),this.tree._decode(e,r)};function bt(t){Nf.Node.call(this,"der",t)}XM(bt,Nf.Node);bt.prototype._peekTag=function(e,r,n){if(e.isEmpty())return!1;var i=e.save(),a=Uh(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(i),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||n)};bt.prototype._decodeTag=function(e,r,n){var i=Uh(e,'Failed to decode tag of "'+r+'"');if(e.isError(i))return i;var a=Ag(e,i.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!n&&i.tag!==r&&i.tagStr!==r&&i.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(i.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');var f=e.save(),v=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(v)?v:(a=e.offset-f.offset,e.restore(f),e.skip(a,'Failed to match body of: "'+r+'"'))};bt.prototype._skipUntilEnd=function(e,r){for(;;){var n=Uh(e,r);if(e.isError(n))return n;var i=Ag(e,n.primitive,r);if(e.isError(i))return i;var a;if(n.primitive||i!==null?a=e.skip(i):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(n.tagStr==="end")break}};bt.prototype._decodeList=function(e,r,n,i){for(var a=[];!e.isEmpty();){var f=this._peekTag(e,"end");if(e.isError(f))return f;var v=n.decode(e,"der",i);if(e.isError(v)&&f)break;a.push(v)}return a};bt.prototype._decodeStr=function(e,r){if(r==="bitstr"){var n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}else if(r==="bmpstr"){var i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",f=0;f<i.length/2;f++)a+=String.fromCharCode(i.readUInt16BE(f*2));return a}else if(r==="numstr"){var v=e.raw().toString("ascii");return this._isNumstr(v)?v: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 m=e.raw().toString("ascii");return this._isPrintstr(m)?m: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")}};bt.prototype._decodeObjid=function(e,r,n){for(var i,a=[],f=0;!e.isEmpty();){var v=e.readUInt8();f<<=7,f|=v&127,(v&128)===0&&(a.push(f),f=0)}v&128&&a.push(f);var m=a[0]/40|0,E=a[0]%40;if(n?i=a:i=[m,E].concat(a.slice(1)),r){var A=r[i.join(" ")];A===void 0&&(A=r[i.join(".")]),A!==void 0&&(i=A)}return i};bt.prototype._decodeTime=function(e,r){var n=e.raw().toString();if(r==="gentime")var i=n.slice(0,4)|0,a=n.slice(4,6)|0,f=n.slice(6,8)|0,v=n.slice(8,10)|0,m=n.slice(10,12)|0,E=n.slice(12,14)|0;else if(r==="utctime"){var i=n.slice(0,2)|0,a=n.slice(2,4)|0,f=n.slice(4,6)|0,v=n.slice(6,8)|0,m=n.slice(8,10)|0,E=n.slice(10,12)|0;i<70?i=2e3+i:i=1900+i}else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(i,a-1,f,v,m,E,0)};bt.prototype._decodeNull=function(e){return null};bt.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};bt.prototype._decodeInt=function(e,r){var n=e.raw(),i=new JM(n);return r&&(i=r[i.toString(10)]||i),i};bt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Uh(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=Sg.tagClass[r>>6],i=(r&32)===0;if((r&31)===31){var a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127}}else r&=31;var f=Sg.tag[r];return{cls:n,primitive:i,tag:r,tagStr:f}}function Ag(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&n===128)return null;if((n&128)===0)return n;var i=n&127;if(i>4)return t.error("length octect is too long");n=0;for(var a=0;a<i;a++){n<<=8;var f=t.readUInt8(r);if(t.isError(f))return f;n|=f}return n}});var Ig=R((KI,qg)=>{w();var QM=J(),eE=ft().Buffer,Lh=Nh();function Fh(t){Lh.call(this,t),this.enc="pem"}QM(Fh,Lh);qg.exports=Fh;Fh.prototype.decode=function(e,r){for(var n=e.toString().split(/[\r\n]+/g),i=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,f=-1,v=-1,m=0;m<n.length;m++){var E=n[m].match(a);if(E!==null&&E[2]===i)if(f===-1){if(E[1]!=="BEGIN")break;f=m}else{if(E[1]!=="END")break;v=m;break}}if(f===-1||v===-1)throw new Error("PEM section not found for: "+i);var A=n.slice(f+1,v).join("");A.replace(/[^a-z0-9\+\/=]+/gi,"");var q=new eE(A,"base64");return Lh.prototype.decode.call(this,q,r)}});var Cg=R(Tg=>{w();var kg=Tg;kg.der=Nh();kg.pem=Ig()});var Hh=R((VI,Ug)=>{w();var tE=J(),Er=ft().Buffer,Og=bn(),Pg=Og.base,jh=Og.constants.der;function Dg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ut,this.tree._init(t.body)}Ug.exports=Dg;Dg.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function Ut(t){Pg.Node.call(this,"der",t)}tE(Ut,Pg.Node);Ut.prototype._encodeComposite=function(e,r,n,i){var a=rE(e,r,n,this.reporter);if(i.length<128){var m=new Er(2);return m[0]=a,m[1]=i.length,this._createEncoderBuffer([m,i])}for(var f=1,v=i.length;v>=256;v>>=8)f++;var m=new Er(2+f);m[0]=a,m[1]=128|f;for(var v=1+f,E=i.length;E>0;v--,E>>=8)m[v]=E&255;return this._createEncoderBuffer([m,i])};Ut.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var n=new Er(e.length*2),i=0;i<e.length;i++)n.writeUInt16BE(e.charCodeAt(i),i*2);return this._createEncoderBuffer(n)}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")};Ut.prototype._encodeObjid=function(e,r,n){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 i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(var i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){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,i=0;i<e.length;i++){var f=e[i];for(a++;f>=128;f>>=7)a++}for(var v=new Er(a),m=v.length-1,i=e.length-1;i>=0;i--){var f=e[i];for(v[m--]=f&127;(f>>=7)>0;)v[m--]=128|f&127}return this._createEncoderBuffer(v)};function qt(t){return t<10?"0"+t:t}Ut.prototype._encodeTime=function(e,r){var n,i=new Date(e);return r==="gentime"?n=[qt(i.getFullYear()),qt(i.getUTCMonth()+1),qt(i.getUTCDate()),qt(i.getUTCHours()),qt(i.getUTCMinutes()),qt(i.getUTCSeconds()),"Z"].join(""):r==="utctime"?n=[qt(i.getFullYear()%100),qt(i.getUTCMonth()+1),qt(i.getUTCDate()),qt(i.getUTCHours()),qt(i.getUTCMinutes()),qt(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(n,"octstr")};Ut.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Ut.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"&&!Er.isBuffer(e)){var n=e.toArray();!e.sign&&n[0]&128&&n.unshift(0),e=new Er(n)}if(Er.isBuffer(e)){var i=e.length;e.length===0&&i++;var f=new Er(i);return e.copy(f),e.length===0&&(f[0]=0),this._createEncoderBuffer(f)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var i=1,a=e;a>=256;a>>=8)i++;for(var f=new Array(i),a=f.length-1;a>=0;a--)f[a]=e&255,e>>=8;return f[0]&128&&f.unshift(0),this._createEncoderBuffer(new Er(f))};Ut.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};Ut.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};Ut.prototype._skipDefault=function(e,r,n){var i=this._baseState,a;if(i.default===null)return!1;var f=e.join();if(i.defaultBuffer===void 0&&(i.defaultBuffer=this._encodeValue(i.default,r,n).join()),f.length!==i.defaultBuffer.length)return!1;for(a=0;a<f.length;a++)if(f[a]!==i.defaultBuffer[a])return!1;return!0};function rE(t,e,r,n){var i;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),jh.tagByName.hasOwnProperty(t))i=jh.tagByName[t];else if(typeof t=="number"&&(t|0)===t)i=t;else return n.error("Unknown tag: "+t);return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=jh.tagClassByName[r||"universal"]<<6,i)}});var Lg=R((ZI,Ng)=>{w();var iE=J(),Kh=Hh();function Wh(t){Kh.call(this,t),this.enc="pem"}iE(Wh,Kh);Ng.exports=Wh;Wh.prototype.encode=function(e,r){for(var n=Kh.prototype.encode.call(this,e),i=n.toString("base64"),a=["-----BEGIN "+r.label+"-----"],f=0;f<i.length;f+=64)a.push(i.slice(f,f+64));return a.push("-----END "+r.label+"-----"),a.join(`
|
|
14
|
-
`)}});var Hg=R(jg=>{w();var Fg=jg;Fg.der=Hh();Fg.pem=Lg()});var bn=R(Kg=>{w();var xn=Kg;xn.bignum=lr();xn.define=pg().define;xn.base=_n();xn.constants=Ph();xn.decoders=Cg();xn.encoders=Hg()});var Vg=R((tk,Gg)=>{"use strict";w();var Nt=bn(),Wg=Nt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),nE=Nt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),zh=Nt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),aE=Nt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(zh),this.key("subjectPublicKey").bitstr())}),oE=Nt.define("RelativeDistinguishedName",function(){this.setof(nE)}),fE=Nt.define("RDNSequence",function(){this.seqof(oE)}),zg=Nt.define("Name",function(){this.choice({rdnSequence:this.use(fE)})}),sE=Nt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(Wg),this.key("notAfter").use(Wg))}),uE=Nt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),hE=Nt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(zh),this.key("issuer").use(zg),this.key("validity").use(sE),this.key("subject").use(zg),this.key("subjectPublicKeyInfo").use(aE),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(uE).optional())}),lE=Nt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(hE),this.key("signatureAlgorithm").use(zh),this.key("signatureValue").bitstr())});Gg.exports=lE});var Zg=R(Ft=>{"use strict";w();var Lt=bn();Ft.certificate=Vg();var cE=Lt.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())});Ft.RSAPrivateKey=cE;var dE=Lt.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Ft.RSAPublicKey=dE;var $g=Lt.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())}),pE=Lt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use($g),this.key("subjectPublicKey").bitstr())});Ft.PublicKey=pE;var vE=Lt.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use($g),this.key("subjectPrivateKey").octstr())});Ft.PrivateKey=vE;var yE=Lt.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())});Ft.EncryptedPrivateKey=yE;var gE=Lt.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())});Ft.DSAPrivateKey=gE;Ft.DSAparam=Lt.define("DSAparam",function(){this.int()});var mE=Lt.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),bE=Lt.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(mE),this.key("publicKey").optional().explicit(1).bitstr())});Ft.ECPrivateKey=bE;Ft.signature=Lt.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var Yg=R((ak,wE)=>{wE.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 Jg=R((ok,Xg)=>{"use strict";w();var _E=/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,xE=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,ME=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,EE=Na(),SE=Tf(),Lf=ke().Buffer;Xg.exports=function(t,e){var r=t.toString(),n=r.match(_E),i;if(n){var f="aes"+n[1],v=Lf.from(n[2],"hex"),m=Lf.from(n[3].replace(/[\r\n]/g,""),"base64"),E=EE(e,v.slice(0,8),parseInt(n[1],10)).key,A=[],q=SE.createDecipheriv(f,E,v);A.push(q.update(m)),A.push(q.final()),i=Lf.concat(A)}else{var a=r.match(ME);i=Lf.from(a[2].replace(/[\r\n]/g,""),"base64")}var I=r.match(xE)[1];return{tag:I,data:i}}});var Vh=R((sk,em)=>{"use strict";w();var gt=Zg(),BE=Yg(),AE=Jg(),RE=Tf(),qE=ih().pbkdf2Sync,Gh=ke().Buffer;function IE(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=BE[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,v=parseInt(i.split("-")[1],10)/8,m=qE(e,r,n,v,"sha1"),E=RE.createDecipheriv(i,m,a),A=[];return A.push(E.update(f)),A.push(E.final()),Gh.concat(A)}function Qg(t){var e;typeof t=="object"&&!Gh.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=Gh.from(t));var r=AE(t,e),n=r.tag,i=r.data,a,f;switch(n){case"CERTIFICATE":f=gt.certificate.decode(i,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=gt.PublicKey.decode(i,"der")),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=gt.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":i=gt.EncryptedPrivateKey.decode(i,"der"),i=IE(i,e);case"PRIVATE KEY":switch(f=gt.PrivateKey.decode(i,"der"),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:gt.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=gt.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return gt.RSAPublicKey.decode(i,"der");case"RSA PRIVATE KEY":return gt.RSAPrivateKey.decode(i,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:gt.DSAPrivateKey.decode(i,"der")};case"EC PRIVATE KEY":return i=gt.ECPrivateKey.decode(i,"der"),{curve:i.parameters.value,privateKey:i.privateKey};default:throw new Error("unknown key type "+n)}}Qg.signature=gt.signature;em.exports=Qg});var Zh=R((hk,tm)=>{w();var kE=Ia(),$h=ke().Buffer;tm.exports=function(t,e){for(var r=$h.alloc(0),n=0,i;r.length<e;)i=TE(n++),r=$h.concat([r,kE("sha1").update(t).update(i).digest()]);return r.slice(0,e)};function TE(t){var e=$h.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var Yh=R((ck,rm)=>{w();rm.exports=function(e,r){for(var n=e.length,i=-1;++i<n;)e[i]^=r[i];return e}});var Xh=R((pk,nm)=>{w();var im=lr(),CE=ke().Buffer;function OE(t,e){return CE.from(t.toRed(im.mont(e.modulus)).redPow(new im(e.publicExponent)).fromRed().toArray())}nm.exports=OE});var om=R((am,Jh)=>{w();(function(t,e){"use strict";function r(l,o){if(!l)throw new Error(o||"Assertion failed")}function n(l,o){l.super_=o;var s=function(){};s.prototype=o.prototype,l.prototype=new s,l.prototype.constructor=l}function i(l,o,s){if(i.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((o==="le"||o==="be")&&(s=o,o=10),this._init(l||0,o||10,s||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}i.isBN=function(o){return o instanceof i?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===i.wordSize&&Array.isArray(o.words)},i.max=function(o,s){return o.cmp(s)>0?o:s},i.min=function(o,s){return o.cmp(s)<0?o:s},i.prototype._init=function(o,s,d){if(typeof o=="number")return this._initNumber(o,s,d);if(typeof o=="object")return this._initArray(o,s,d);s==="hex"&&(s=16),r(s===(s|0)&&s>=2&&s<=36),o=o.toString().replace(/\s+/g,"");var g=0;o[0]==="-"&&(g++,this.negative=1),g<o.length&&(s===16?this._parseHex(o,g,d):(this._parseBase(o,s,g),d==="le"&&this._initArray(this.toArray(),s,d)))},i.prototype._initNumber=function(o,s,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(),s,d)},i.prototype._initArray=function(o,s,d){if(r(typeof o.length=="number"),o.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(o.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p,u,b=0;if(d==="be")for(g=o.length-1,p=0;g>=0;g-=3)u=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[p]|=u<<b&67108863,this.words[p+1]=u>>>26-b&67108863,b+=24,b>=26&&(b-=26,p++);else if(d==="le")for(g=0,p=0;g<o.length;g+=3)u=o[g]|o[g+1]<<8|o[g+2]<<16,this.words[p]|=u<<b&67108863,this.words[p+1]=u>>>26-b&67108863,b+=24,b>=26&&(b-=26,p++);return this._strip()};function f(l,o){var s=l.charCodeAt(o);if(s>=48&&s<=57)return s-48;if(s>=65&&s<=70)return s-55;if(s>=97&&s<=102)return s-87;r(!1,"Invalid character in "+l)}function v(l,o,s){var d=f(l,s);return s-1>=o&&(d|=f(l,s-1)<<4),d}i.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p=0,u=0,b;if(d==="be")for(g=o.length-1;g>=s;g-=2)b=v(o,s,g)<<p,this.words[u]|=b&67108863,p>=18?(p-=18,u+=1,this.words[u]|=b>>>26):p+=8;else{var _=o.length-s;for(g=_%2===0?s+1:s;g<o.length;g+=2)b=v(o,s,g)<<p,this.words[u]|=b&67108863,p>=18?(p-=18,u+=1,this.words[u]|=b>>>26):p+=8}this._strip()};function m(l,o,s,d){for(var g=0,p=0,u=Math.min(l.length,s),b=o;b<u;b++){var _=l.charCodeAt(b)-48;g*=d,_>=49?p=_-49+10:_>=17?p=_-17+10:p=_,r(_>=0&&p<d,"Invalid character"),g+=p}return g}i.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var g=0,p=1;p<=67108863;p*=s)g++;g--,p=p/s|0;for(var u=o.length-d,b=u%g,_=Math.min(u,u-b)+d,c=0,x=d;x<_;x+=g)c=m(o,x,x+g,s),this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(b!==0){var P=1;for(c=m(o,x,o.length,s),x=0;x<b;x++)P*=s;this.imuln(P),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},i.prototype.copy=function(o){o.words=new Array(this.length);for(var s=0;s<this.length;s++)o.words[s]=this.words[s];o.length=this.length,o.negative=this.negative,o.red=this.red};function E(l,o){l.words=o.words,l.length=o.length,l.negative=o.negative,l.red=o.red}if(i.prototype._move=function(o){E(o,this)},i.prototype.clone=function(){var o=new i(null);return this.copy(o),o},i.prototype._expand=function(o){for(;this.length<o;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{i.prototype.inspect=A}else i.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"],I=[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],C=[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];i.prototype.toString=function(o,s){o=o||10,s=s|0||1;var d;if(o===16||o==="hex"){d="";for(var g=0,p=0,u=0;u<this.length;u++){var b=this.words[u],_=((b<<g|p)&16777215).toString(16);p=b>>>24-g&16777215,g+=2,g>=26&&(g-=26,u--),p!==0||u!==this.length-1?d=q[6-_.length]+_+d:d=_+d}for(p!==0&&(d=p.toString(16)+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(o===(o|0)&&o>=2&&o<=36){var c=I[o],x=C[o];d="";var P=this.clone();for(P.negative=0;!P.isZero();){var N=P.modrn(x).toString(o);P=P.idivn(x),P.isZero()?d=N+d:d=q[c-N.length]+N+d}for(this.isZero()&&(d="0"+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},i.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},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(o,s){return this.toArrayLike(a,o,s)}),i.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)};var j=function(o,s){return o.allocUnsafe?o.allocUnsafe(s):new o(s)};i.prototype.toArrayLike=function(o,s,d){this._strip();var g=this.byteLength(),p=d||Math.max(1,g);r(g<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0");var u=j(o,p),b=s==="le"?"LE":"BE";return this["_toArrayLike"+b](u,g),u},i.prototype._toArrayLikeLE=function(o,s){for(var d=0,g=0,p=0,u=0;p<this.length;p++){var b=this.words[p]<<u|g;o[d++]=b&255,d<o.length&&(o[d++]=b>>8&255),d<o.length&&(o[d++]=b>>16&255),u===6?(d<o.length&&(o[d++]=b>>24&255),g=0,u=0):(g=b>>>24,u+=2)}if(d<o.length)for(o[d++]=g;d<o.length;)o[d++]=0},i.prototype._toArrayLikeBE=function(o,s){for(var d=o.length-1,g=0,p=0,u=0;p<this.length;p++){var b=this.words[p]<<u|g;o[d--]=b&255,d>=0&&(o[d--]=b>>8&255),d>=0&&(o[d--]=b>>16&255),u===6?(d>=0&&(o[d--]=b>>24&255),g=0,u=0):(g=b>>>24,u+=2)}if(d>=0)for(o[d--]=g;d>=0;)o[d--]=0},Math.clz32?i.prototype._countBits=function(o){return 32-Math.clz32(o)}:i.prototype._countBits=function(o){var s=o,d=0;return s>=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},i.prototype._zeroBits=function(o){if(o===0)return 26;var s=o,d=0;return(s&8191)===0&&(d+=13,s>>>=13),(s&127)===0&&(d+=7,s>>>=7),(s&15)===0&&(d+=4,s>>>=4),(s&3)===0&&(d+=2,s>>>=2),(s&1)===0&&d++,d},i.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return(this.length-1)*26+s};function V(l){for(var o=new Array(l.bitLength()),s=0;s<o.length;s++){var d=s/26|0,g=s%26;o[s]=l.words[d]>>>g&1}return o}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;s<this.length;s++){var d=this._zeroBits(this.words[s]);if(o+=d,d!==26)break}return o},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(o){return this.negative!==0?this.abs().inotn(o).iaddn(1):this.clone()},i.prototype.fromTwos=function(o){return this.testn(o-1)?this.notn(o).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(o){for(;this.length<o.length;)this.words[this.length++]=0;for(var s=0;s<o.length;s++)this.words[s]=this.words[s]|o.words[s];return this._strip()},i.prototype.ior=function(o){return r((this.negative|o.negative)===0),this.iuor(o)},i.prototype.or=function(o){return this.length>o.length?this.clone().ior(o):o.clone().ior(this)},i.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},i.prototype.iuand=function(o){var s;this.length>o.length?s=o:s=this;for(var d=0;d<s.length;d++)this.words[d]=this.words[d]&o.words[d];return this.length=s.length,this._strip()},i.prototype.iand=function(o){return r((this.negative|o.negative)===0),this.iuand(o)},i.prototype.and=function(o){return this.length>o.length?this.clone().iand(o):o.clone().iand(this)},i.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},i.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var g=0;g<d.length;g++)this.words[g]=s.words[g]^d.words[g];if(this!==s)for(;g<s.length;g++)this.words[g]=s.words[g];return this.length=s.length,this._strip()},i.prototype.ixor=function(o){return r((this.negative|o.negative)===0),this.iuxor(o)},i.prototype.xor=function(o){return this.length>o.length?this.clone().ixor(o):o.clone().ixor(this)},i.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},i.prototype.inotn=function(o){r(typeof o=="number"&&o>=0);var s=Math.ceil(o/26)|0,d=o%26;this._expand(s),d>0&&s--;for(var g=0;g<s;g++)this.words[g]=~this.words[g]&67108863;return d>0&&(this.words[g]=~this.words[g]&67108863>>26-d),this._strip()},i.prototype.notn=function(o){return this.clone().inotn(o)},i.prototype.setn=function(o,s){r(typeof o=="number"&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),s?this.words[d]=this.words[d]|1<<g:this.words[d]=this.words[d]&~(1<<g),this._strip()},i.prototype.iadd=function(o){var s;if(this.negative!==0&&o.negative===0)return this.negative=0,s=this.isub(o),this.negative^=1,this._normSign();if(this.negative===0&&o.negative!==0)return o.negative=0,s=this.isub(o),o.negative=1,s._normSign();var d,g;this.length>o.length?(d=this,g=o):(d=o,g=this);for(var p=0,u=0;u<g.length;u++)s=(d.words[u]|0)+(g.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;for(;p!==0&&u<d.length;u++)s=(d.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;if(this.length=d.length,p!==0)this.words[this.length]=p,this.length++;else if(d!==this)for(;u<d.length;u++)this.words[u]=d.words[u];return this},i.prototype.add=function(o){var s;return o.negative!==0&&this.negative===0?(o.negative=0,s=this.sub(o),o.negative^=1,s):o.negative===0&&this.negative!==0?(this.negative=0,s=o.sub(this),this.negative=1,s):this.length>o.length?this.clone().iadd(o):o.clone().iadd(this)},i.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var d=this.cmp(o);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,p;d>0?(g=this,p=o):(g=o,p=this);for(var u=0,b=0;b<p.length;b++)s=(g.words[b]|0)-(p.words[b]|0)+u,u=s>>26,this.words[b]=s&67108863;for(;u!==0&&b<g.length;b++)s=(g.words[b]|0)+u,u=s>>26,this.words[b]=s&67108863;if(u===0&&b<g.length&&g!==this)for(;b<g.length;b++)this.words[b]=g.words[b];return this.length=Math.max(this.length,b),g!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(o){return this.clone().isub(o)};function X(l,o,s){s.negative=o.negative^l.negative;var d=l.length+o.length|0;s.length=d,d=d-1|0;var g=l.words[0]|0,p=o.words[0]|0,u=g*p,b=u&67108863,_=u/67108864|0;s.words[0]=b;for(var c=1;c<d;c++){for(var x=_>>>26,P=_&67108863,N=Math.min(c,o.length-1),U=Math.max(0,c-l.length+1);U<=N;U++){var W=c-U|0;g=l.words[W]|0,p=o.words[U]|0,u=g*p+P,x+=u/67108864|0,P=u&67108863}s.words[c]=P|0,_=x|0}return _!==0?s.words[c]=_|0:s.length--,s._strip()}var z=function(o,s,d){var g=o.words,p=s.words,u=d.words,b=0,_,c,x,P=g[0]|0,N=P&8191,U=P>>>13,W=g[1]|0,K=W&8191,G=W>>>13,It=g[2]|0,Z=It&8191,Y=It>>>13,Tn=g[3]|0,Q=Tn&8191,ee=Tn>>>13,Cn=g[4]|0,te=Cn&8191,re=Cn>>>13,On=g[5]|0,ie=On&8191,ne=On>>>13,Pn=g[6]|0,ae=Pn&8191,oe=Pn>>>13,Dn=g[7]|0,fe=Dn&8191,se=Dn>>>13,Un=g[8]|0,ue=Un&8191,he=Un>>>13,Nn=g[9]|0,le=Nn&8191,ce=Nn>>>13,Ln=p[0]|0,de=Ln&8191,pe=Ln>>>13,Fn=p[1]|0,ve=Fn&8191,ye=Fn>>>13,jn=p[2]|0,ge=jn&8191,me=jn>>>13,Hn=p[3]|0,be=Hn&8191,we=Hn>>>13,Kn=p[4]|0,_e=Kn&8191,xe=Kn>>>13,Wn=p[5]|0,Me=Wn&8191,Ee=Wn>>>13,zn=p[6]|0,Se=zn&8191,Be=zn>>>13,Gn=p[7]|0,Ae=Gn&8191,Re=Gn>>>13,Vn=p[8]|0,qe=Vn&8191,Ie=Vn>>>13,Ui=p[9]|0,Ge=Ui&8191,Ve=Ui>>>13;d.negative=o.negative^s.negative,d.length=19,_=Math.imul(N,de),c=Math.imul(N,pe),c=c+Math.imul(U,de)|0,x=Math.imul(U,pe);var Kr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,_=Math.imul(K,de),c=Math.imul(K,pe),c=c+Math.imul(G,de)|0,x=Math.imul(G,pe),_=_+Math.imul(N,ve)|0,c=c+Math.imul(N,ye)|0,c=c+Math.imul(U,ve)|0,x=x+Math.imul(U,ye)|0;var Wr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,_=Math.imul(Z,de),c=Math.imul(Z,pe),c=c+Math.imul(Y,de)|0,x=Math.imul(Y,pe),_=_+Math.imul(K,ve)|0,c=c+Math.imul(K,ye)|0,c=c+Math.imul(G,ve)|0,x=x+Math.imul(G,ye)|0,_=_+Math.imul(N,ge)|0,c=c+Math.imul(N,me)|0,c=c+Math.imul(U,ge)|0,x=x+Math.imul(U,me)|0;var zr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(zr>>>26)|0,zr&=67108863,_=Math.imul(Q,de),c=Math.imul(Q,pe),c=c+Math.imul(ee,de)|0,x=Math.imul(ee,pe),_=_+Math.imul(Z,ve)|0,c=c+Math.imul(Z,ye)|0,c=c+Math.imul(Y,ve)|0,x=x+Math.imul(Y,ye)|0,_=_+Math.imul(K,ge)|0,c=c+Math.imul(K,me)|0,c=c+Math.imul(G,ge)|0,x=x+Math.imul(G,me)|0,_=_+Math.imul(N,be)|0,c=c+Math.imul(N,we)|0,c=c+Math.imul(U,be)|0,x=x+Math.imul(U,we)|0;var Gr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,_=Math.imul(te,de),c=Math.imul(te,pe),c=c+Math.imul(re,de)|0,x=Math.imul(re,pe),_=_+Math.imul(Q,ve)|0,c=c+Math.imul(Q,ye)|0,c=c+Math.imul(ee,ve)|0,x=x+Math.imul(ee,ye)|0,_=_+Math.imul(Z,ge)|0,c=c+Math.imul(Z,me)|0,c=c+Math.imul(Y,ge)|0,x=x+Math.imul(Y,me)|0,_=_+Math.imul(K,be)|0,c=c+Math.imul(K,we)|0,c=c+Math.imul(G,be)|0,x=x+Math.imul(G,we)|0,_=_+Math.imul(N,_e)|0,c=c+Math.imul(N,xe)|0,c=c+Math.imul(U,_e)|0,x=x+Math.imul(U,xe)|0;var Vr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,_=Math.imul(ie,de),c=Math.imul(ie,pe),c=c+Math.imul(ne,de)|0,x=Math.imul(ne,pe),_=_+Math.imul(te,ve)|0,c=c+Math.imul(te,ye)|0,c=c+Math.imul(re,ve)|0,x=x+Math.imul(re,ye)|0,_=_+Math.imul(Q,ge)|0,c=c+Math.imul(Q,me)|0,c=c+Math.imul(ee,ge)|0,x=x+Math.imul(ee,me)|0,_=_+Math.imul(Z,be)|0,c=c+Math.imul(Z,we)|0,c=c+Math.imul(Y,be)|0,x=x+Math.imul(Y,we)|0,_=_+Math.imul(K,_e)|0,c=c+Math.imul(K,xe)|0,c=c+Math.imul(G,_e)|0,x=x+Math.imul(G,xe)|0,_=_+Math.imul(N,Me)|0,c=c+Math.imul(N,Ee)|0,c=c+Math.imul(U,Me)|0,x=x+Math.imul(U,Ee)|0;var $r=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+($r>>>26)|0,$r&=67108863,_=Math.imul(ae,de),c=Math.imul(ae,pe),c=c+Math.imul(oe,de)|0,x=Math.imul(oe,pe),_=_+Math.imul(ie,ve)|0,c=c+Math.imul(ie,ye)|0,c=c+Math.imul(ne,ve)|0,x=x+Math.imul(ne,ye)|0,_=_+Math.imul(te,ge)|0,c=c+Math.imul(te,me)|0,c=c+Math.imul(re,ge)|0,x=x+Math.imul(re,me)|0,_=_+Math.imul(Q,be)|0,c=c+Math.imul(Q,we)|0,c=c+Math.imul(ee,be)|0,x=x+Math.imul(ee,we)|0,_=_+Math.imul(Z,_e)|0,c=c+Math.imul(Z,xe)|0,c=c+Math.imul(Y,_e)|0,x=x+Math.imul(Y,xe)|0,_=_+Math.imul(K,Me)|0,c=c+Math.imul(K,Ee)|0,c=c+Math.imul(G,Me)|0,x=x+Math.imul(G,Ee)|0,_=_+Math.imul(N,Se)|0,c=c+Math.imul(N,Be)|0,c=c+Math.imul(U,Se)|0,x=x+Math.imul(U,Be)|0;var Zr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,_=Math.imul(fe,de),c=Math.imul(fe,pe),c=c+Math.imul(se,de)|0,x=Math.imul(se,pe),_=_+Math.imul(ae,ve)|0,c=c+Math.imul(ae,ye)|0,c=c+Math.imul(oe,ve)|0,x=x+Math.imul(oe,ye)|0,_=_+Math.imul(ie,ge)|0,c=c+Math.imul(ie,me)|0,c=c+Math.imul(ne,ge)|0,x=x+Math.imul(ne,me)|0,_=_+Math.imul(te,be)|0,c=c+Math.imul(te,we)|0,c=c+Math.imul(re,be)|0,x=x+Math.imul(re,we)|0,_=_+Math.imul(Q,_e)|0,c=c+Math.imul(Q,xe)|0,c=c+Math.imul(ee,_e)|0,x=x+Math.imul(ee,xe)|0,_=_+Math.imul(Z,Me)|0,c=c+Math.imul(Z,Ee)|0,c=c+Math.imul(Y,Me)|0,x=x+Math.imul(Y,Ee)|0,_=_+Math.imul(K,Se)|0,c=c+Math.imul(K,Be)|0,c=c+Math.imul(G,Se)|0,x=x+Math.imul(G,Be)|0,_=_+Math.imul(N,Ae)|0,c=c+Math.imul(N,Re)|0,c=c+Math.imul(U,Ae)|0,x=x+Math.imul(U,Re)|0;var Yr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,_=Math.imul(ue,de),c=Math.imul(ue,pe),c=c+Math.imul(he,de)|0,x=Math.imul(he,pe),_=_+Math.imul(fe,ve)|0,c=c+Math.imul(fe,ye)|0,c=c+Math.imul(se,ve)|0,x=x+Math.imul(se,ye)|0,_=_+Math.imul(ae,ge)|0,c=c+Math.imul(ae,me)|0,c=c+Math.imul(oe,ge)|0,x=x+Math.imul(oe,me)|0,_=_+Math.imul(ie,be)|0,c=c+Math.imul(ie,we)|0,c=c+Math.imul(ne,be)|0,x=x+Math.imul(ne,we)|0,_=_+Math.imul(te,_e)|0,c=c+Math.imul(te,xe)|0,c=c+Math.imul(re,_e)|0,x=x+Math.imul(re,xe)|0,_=_+Math.imul(Q,Me)|0,c=c+Math.imul(Q,Ee)|0,c=c+Math.imul(ee,Me)|0,x=x+Math.imul(ee,Ee)|0,_=_+Math.imul(Z,Se)|0,c=c+Math.imul(Z,Be)|0,c=c+Math.imul(Y,Se)|0,x=x+Math.imul(Y,Be)|0,_=_+Math.imul(K,Ae)|0,c=c+Math.imul(K,Re)|0,c=c+Math.imul(G,Ae)|0,x=x+Math.imul(G,Re)|0,_=_+Math.imul(N,qe)|0,c=c+Math.imul(N,Ie)|0,c=c+Math.imul(U,qe)|0,x=x+Math.imul(U,Ie)|0;var Xr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,_=Math.imul(le,de),c=Math.imul(le,pe),c=c+Math.imul(ce,de)|0,x=Math.imul(ce,pe),_=_+Math.imul(ue,ve)|0,c=c+Math.imul(ue,ye)|0,c=c+Math.imul(he,ve)|0,x=x+Math.imul(he,ye)|0,_=_+Math.imul(fe,ge)|0,c=c+Math.imul(fe,me)|0,c=c+Math.imul(se,ge)|0,x=x+Math.imul(se,me)|0,_=_+Math.imul(ae,be)|0,c=c+Math.imul(ae,we)|0,c=c+Math.imul(oe,be)|0,x=x+Math.imul(oe,we)|0,_=_+Math.imul(ie,_e)|0,c=c+Math.imul(ie,xe)|0,c=c+Math.imul(ne,_e)|0,x=x+Math.imul(ne,xe)|0,_=_+Math.imul(te,Me)|0,c=c+Math.imul(te,Ee)|0,c=c+Math.imul(re,Me)|0,x=x+Math.imul(re,Ee)|0,_=_+Math.imul(Q,Se)|0,c=c+Math.imul(Q,Be)|0,c=c+Math.imul(ee,Se)|0,x=x+Math.imul(ee,Be)|0,_=_+Math.imul(Z,Ae)|0,c=c+Math.imul(Z,Re)|0,c=c+Math.imul(Y,Ae)|0,x=x+Math.imul(Y,Re)|0,_=_+Math.imul(K,qe)|0,c=c+Math.imul(K,Ie)|0,c=c+Math.imul(G,qe)|0,x=x+Math.imul(G,Ie)|0,_=_+Math.imul(N,Ge)|0,c=c+Math.imul(N,Ve)|0,c=c+Math.imul(U,Ge)|0,x=x+Math.imul(U,Ve)|0;var Jr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,_=Math.imul(le,ve),c=Math.imul(le,ye),c=c+Math.imul(ce,ve)|0,x=Math.imul(ce,ye),_=_+Math.imul(ue,ge)|0,c=c+Math.imul(ue,me)|0,c=c+Math.imul(he,ge)|0,x=x+Math.imul(he,me)|0,_=_+Math.imul(fe,be)|0,c=c+Math.imul(fe,we)|0,c=c+Math.imul(se,be)|0,x=x+Math.imul(se,we)|0,_=_+Math.imul(ae,_e)|0,c=c+Math.imul(ae,xe)|0,c=c+Math.imul(oe,_e)|0,x=x+Math.imul(oe,xe)|0,_=_+Math.imul(ie,Me)|0,c=c+Math.imul(ie,Ee)|0,c=c+Math.imul(ne,Me)|0,x=x+Math.imul(ne,Ee)|0,_=_+Math.imul(te,Se)|0,c=c+Math.imul(te,Be)|0,c=c+Math.imul(re,Se)|0,x=x+Math.imul(re,Be)|0,_=_+Math.imul(Q,Ae)|0,c=c+Math.imul(Q,Re)|0,c=c+Math.imul(ee,Ae)|0,x=x+Math.imul(ee,Re)|0,_=_+Math.imul(Z,qe)|0,c=c+Math.imul(Z,Ie)|0,c=c+Math.imul(Y,qe)|0,x=x+Math.imul(Y,Ie)|0,_=_+Math.imul(K,Ge)|0,c=c+Math.imul(K,Ve)|0,c=c+Math.imul(G,Ge)|0,x=x+Math.imul(G,Ve)|0;var Qr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,_=Math.imul(le,ge),c=Math.imul(le,me),c=c+Math.imul(ce,ge)|0,x=Math.imul(ce,me),_=_+Math.imul(ue,be)|0,c=c+Math.imul(ue,we)|0,c=c+Math.imul(he,be)|0,x=x+Math.imul(he,we)|0,_=_+Math.imul(fe,_e)|0,c=c+Math.imul(fe,xe)|0,c=c+Math.imul(se,_e)|0,x=x+Math.imul(se,xe)|0,_=_+Math.imul(ae,Me)|0,c=c+Math.imul(ae,Ee)|0,c=c+Math.imul(oe,Me)|0,x=x+Math.imul(oe,Ee)|0,_=_+Math.imul(ie,Se)|0,c=c+Math.imul(ie,Be)|0,c=c+Math.imul(ne,Se)|0,x=x+Math.imul(ne,Be)|0,_=_+Math.imul(te,Ae)|0,c=c+Math.imul(te,Re)|0,c=c+Math.imul(re,Ae)|0,x=x+Math.imul(re,Re)|0,_=_+Math.imul(Q,qe)|0,c=c+Math.imul(Q,Ie)|0,c=c+Math.imul(ee,qe)|0,x=x+Math.imul(ee,Ie)|0,_=_+Math.imul(Z,Ge)|0,c=c+Math.imul(Z,Ve)|0,c=c+Math.imul(Y,Ge)|0,x=x+Math.imul(Y,Ve)|0;var ei=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ei>>>26)|0,ei&=67108863,_=Math.imul(le,be),c=Math.imul(le,we),c=c+Math.imul(ce,be)|0,x=Math.imul(ce,we),_=_+Math.imul(ue,_e)|0,c=c+Math.imul(ue,xe)|0,c=c+Math.imul(he,_e)|0,x=x+Math.imul(he,xe)|0,_=_+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Ee)|0,c=c+Math.imul(se,Me)|0,x=x+Math.imul(se,Ee)|0,_=_+Math.imul(ae,Se)|0,c=c+Math.imul(ae,Be)|0,c=c+Math.imul(oe,Se)|0,x=x+Math.imul(oe,Be)|0,_=_+Math.imul(ie,Ae)|0,c=c+Math.imul(ie,Re)|0,c=c+Math.imul(ne,Ae)|0,x=x+Math.imul(ne,Re)|0,_=_+Math.imul(te,qe)|0,c=c+Math.imul(te,Ie)|0,c=c+Math.imul(re,qe)|0,x=x+Math.imul(re,Ie)|0,_=_+Math.imul(Q,Ge)|0,c=c+Math.imul(Q,Ve)|0,c=c+Math.imul(ee,Ge)|0,x=x+Math.imul(ee,Ve)|0;var ti=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ti>>>26)|0,ti&=67108863,_=Math.imul(le,_e),c=Math.imul(le,xe),c=c+Math.imul(ce,_e)|0,x=Math.imul(ce,xe),_=_+Math.imul(ue,Me)|0,c=c+Math.imul(ue,Ee)|0,c=c+Math.imul(he,Me)|0,x=x+Math.imul(he,Ee)|0,_=_+Math.imul(fe,Se)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(se,Se)|0,x=x+Math.imul(se,Be)|0,_=_+Math.imul(ae,Ae)|0,c=c+Math.imul(ae,Re)|0,c=c+Math.imul(oe,Ae)|0,x=x+Math.imul(oe,Re)|0,_=_+Math.imul(ie,qe)|0,c=c+Math.imul(ie,Ie)|0,c=c+Math.imul(ne,qe)|0,x=x+Math.imul(ne,Ie)|0,_=_+Math.imul(te,Ge)|0,c=c+Math.imul(te,Ve)|0,c=c+Math.imul(re,Ge)|0,x=x+Math.imul(re,Ve)|0;var ri=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ri>>>26)|0,ri&=67108863,_=Math.imul(le,Me),c=Math.imul(le,Ee),c=c+Math.imul(ce,Me)|0,x=Math.imul(ce,Ee),_=_+Math.imul(ue,Se)|0,c=c+Math.imul(ue,Be)|0,c=c+Math.imul(he,Se)|0,x=x+Math.imul(he,Be)|0,_=_+Math.imul(fe,Ae)|0,c=c+Math.imul(fe,Re)|0,c=c+Math.imul(se,Ae)|0,x=x+Math.imul(se,Re)|0,_=_+Math.imul(ae,qe)|0,c=c+Math.imul(ae,Ie)|0,c=c+Math.imul(oe,qe)|0,x=x+Math.imul(oe,Ie)|0,_=_+Math.imul(ie,Ge)|0,c=c+Math.imul(ie,Ve)|0,c=c+Math.imul(ne,Ge)|0,x=x+Math.imul(ne,Ve)|0;var ii=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ii>>>26)|0,ii&=67108863,_=Math.imul(le,Se),c=Math.imul(le,Be),c=c+Math.imul(ce,Se)|0,x=Math.imul(ce,Be),_=_+Math.imul(ue,Ae)|0,c=c+Math.imul(ue,Re)|0,c=c+Math.imul(he,Ae)|0,x=x+Math.imul(he,Re)|0,_=_+Math.imul(fe,qe)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(se,qe)|0,x=x+Math.imul(se,Ie)|0,_=_+Math.imul(ae,Ge)|0,c=c+Math.imul(ae,Ve)|0,c=c+Math.imul(oe,Ge)|0,x=x+Math.imul(oe,Ve)|0;var ni=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ni>>>26)|0,ni&=67108863,_=Math.imul(le,Ae),c=Math.imul(le,Re),c=c+Math.imul(ce,Ae)|0,x=Math.imul(ce,Re),_=_+Math.imul(ue,qe)|0,c=c+Math.imul(ue,Ie)|0,c=c+Math.imul(he,qe)|0,x=x+Math.imul(he,Ie)|0,_=_+Math.imul(fe,Ge)|0,c=c+Math.imul(fe,Ve)|0,c=c+Math.imul(se,Ge)|0,x=x+Math.imul(se,Ve)|0;var Xf=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Xf>>>26)|0,Xf&=67108863,_=Math.imul(le,qe),c=Math.imul(le,Ie),c=c+Math.imul(ce,qe)|0,x=Math.imul(ce,Ie),_=_+Math.imul(ue,Ge)|0,c=c+Math.imul(ue,Ve)|0,c=c+Math.imul(he,Ge)|0,x=x+Math.imul(he,Ve)|0;var Jf=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Jf>>>26)|0,Jf&=67108863,_=Math.imul(le,Ge),c=Math.imul(le,Ve),c=c+Math.imul(ce,Ge)|0,x=Math.imul(ce,Ve);var Qf=(b+_|0)+((c&8191)<<13)|0;return b=(x+(c>>>13)|0)+(Qf>>>26)|0,Qf&=67108863,u[0]=Kr,u[1]=Wr,u[2]=zr,u[3]=Gr,u[4]=Vr,u[5]=$r,u[6]=Zr,u[7]=Yr,u[8]=Xr,u[9]=Jr,u[10]=Qr,u[11]=ei,u[12]=ti,u[13]=ri,u[14]=ii,u[15]=ni,u[16]=Xf,u[17]=Jf,u[18]=Qf,b!==0&&(u[19]=b,d.length++),d};Math.imul||(z=X);function $(l,o,s){s.negative=o.negative^l.negative,s.length=l.length+o.length;for(var d=0,g=0,p=0;p<s.length-1;p++){var u=g;g=0;for(var b=d&67108863,_=Math.min(p,o.length-1),c=Math.max(0,p-l.length+1);c<=_;c++){var x=p-c,P=l.words[x]|0,N=o.words[c]|0,U=P*N,W=U&67108863;u=u+(U/67108864|0)|0,W=W+b|0,b=W&67108863,u=u+(W>>>26)|0,g+=u>>>26,u&=67108863}s.words[p]=b,d=u,u=g}return d!==0?s.words[p]=d:s.length--,s._strip()}function Fe(l,o,s){return $(l,o,s)}i.prototype.mulTo=function(o,s){var d,g=this.length+o.length;return this.length===10&&o.length===10?d=z(this,o,s):g<63?d=X(this,o,s):g<1024?d=$(this,o,s):d=Fe(this,o,s),d};function k(l,o){this.x=l,this.y=o}k.prototype.makeRBT=function(o){for(var s=new Array(o),d=i.prototype._countBits(o)-1,g=0;g<o;g++)s[g]=this.revBin(g,d,o);return s},k.prototype.revBin=function(o,s,d){if(o===0||o===d-1)return o;for(var g=0,p=0;p<s;p++)g|=(o&1)<<s-p-1,o>>=1;return g},k.prototype.permute=function(o,s,d,g,p,u){for(var b=0;b<u;b++)g[b]=s[o[b]],p[b]=d[o[b]]},k.prototype.transform=function(o,s,d,g,p,u){this.permute(u,o,s,d,g,p);for(var b=1;b<p;b<<=1)for(var _=b<<1,c=Math.cos(2*Math.PI/_),x=Math.sin(2*Math.PI/_),P=0;P<p;P+=_)for(var N=c,U=x,W=0;W<b;W++){var K=d[P+W],G=g[P+W],It=d[P+W+b],Z=g[P+W+b],Y=N*It-U*Z;Z=N*Z+U*It,It=Y,d[P+W]=K+It,g[P+W]=G+Z,d[P+W+b]=K-It,g[P+W+b]=G-Z,W!==_&&(Y=c*N-x*U,U=c*U+x*N,N=Y)}},k.prototype.guessLen13b=function(o,s){var d=Math.max(s,o)|1,g=d&1,p=0;for(d=d/2|0;d;d=d>>>1)p++;return 1<<p+1+g},k.prototype.conjugate=function(o,s,d){if(!(d<=1))for(var g=0;g<d/2;g++){var p=o[g];o[g]=o[d-g-1],o[d-g-1]=p,p=s[g],s[g]=-s[d-g-1],s[d-g-1]=-p}},k.prototype.normalize13b=function(o,s){for(var d=0,g=0;g<s/2;g++){var p=Math.round(o[2*g+1]/s)*8192+Math.round(o[2*g]/s)+d;o[g]=p&67108863,p<67108864?d=0:d=p/67108864|0}return o},k.prototype.convert13b=function(o,s,d,g){for(var p=0,u=0;u<s;u++)p=p+(o[u]|0),d[2*u]=p&8191,p=p>>>13,d[2*u+1]=p&8191,p=p>>>13;for(u=2*s;u<g;++u)d[u]=0;r(p===0),r((p&-8192)===0)},k.prototype.stub=function(o){for(var s=new Array(o),d=0;d<o;d++)s[d]=0;return s},k.prototype.mulp=function(o,s,d){var g=2*this.guessLen13b(o.length,s.length),p=this.makeRBT(g),u=this.stub(g),b=new Array(g),_=new Array(g),c=new Array(g),x=new Array(g),P=new Array(g),N=new Array(g),U=d.words;U.length=g,this.convert13b(o.words,o.length,b,g),this.convert13b(s.words,s.length,x,g),this.transform(b,u,_,c,g,p),this.transform(x,u,P,N,g,p);for(var W=0;W<g;W++){var K=_[W]*P[W]-c[W]*N[W];c[W]=_[W]*N[W]+c[W]*P[W],_[W]=K}return this.conjugate(_,c,g),this.transform(_,c,U,u,g,p),this.conjugate(U,u,g),this.normalize13b(U,g),d.negative=o.negative^s.negative,d.length=o.length+s.length,d._strip()},i.prototype.mul=function(o){var s=new i(null);return s.words=new Array(this.length+o.length),this.mulTo(o,s)},i.prototype.mulf=function(o){var s=new i(null);return s.words=new Array(this.length+o.length),Fe(this,o,s)},i.prototype.imul=function(o){return this.clone().mulTo(o,this)},i.prototype.imuln=function(o){var s=o<0;s&&(o=-o),r(typeof o=="number"),r(o<67108864);for(var d=0,g=0;g<this.length;g++){var p=(this.words[g]|0)*o,u=(p&67108863)+(d&67108863);d>>=26,d+=p/67108864|0,d+=u>>>26,this.words[g]=u&67108863}return d!==0&&(this.words[g]=d,this.length++),this.length=o===0?1:this.length,s?this.ineg():this},i.prototype.muln=function(o){return this.clone().imuln(o)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(o){var s=V(o);if(s.length===0)return new i(1);for(var d=this,g=0;g<s.length&&s[g]===0;g++,d=d.sqr());if(++g<s.length)for(var p=d.sqr();g<s.length;g++,p=p.sqr())s[g]!==0&&(d=d.mul(p));return d},i.prototype.iushln=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=67108863>>>26-s<<26-s,p;if(s!==0){var u=0;for(p=0;p<this.length;p++){var b=this.words[p]&g,_=(this.words[p]|0)-b<<s;this.words[p]=_|u,u=b>>>26-s}u&&(this.words[p]=u,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()},i.prototype.ishln=function(o){return r(this.negative===0),this.iushln(o)},i.prototype.iushrn=function(o,s,d){r(typeof o=="number"&&o>=0);var g;s?g=(s-s%26)/26:g=0;var p=o%26,u=Math.min((o-p)/26,this.length),b=67108863^67108863>>>p<<p,_=d;if(g-=u,g=Math.max(0,g),_){for(var c=0;c<u;c++)_.words[c]=this.words[c];_.length=u}if(u!==0)if(this.length>u)for(this.length-=u,c=0;c<this.length;c++)this.words[c]=this.words[c+u];else this.words[0]=0,this.length=1;var x=0;for(c=this.length-1;c>=0&&(x!==0||c>=g);c--){var P=this.words[c]|0;this.words[c]=x<<26-p|P>>>p,x=P&b}return _&&x!==0&&(_.words[_.length++]=x),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(o,s,d){return r(this.negative===0),this.iushrn(o,s,d)},i.prototype.shln=function(o){return this.clone().ishln(o)},i.prototype.ushln=function(o){return this.clone().iushln(o)},i.prototype.shrn=function(o){return this.clone().ishrn(o)},i.prototype.ushrn=function(o){return this.clone().iushrn(o)},i.prototype.testn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return!1;var p=this.words[d];return!!(p&g)},i.prototype.imaskn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(s!==0&&d++,this.length=Math.min(d,this.length),s!==0){var g=67108863^67108863>>>s<<s;this.words[this.length-1]&=g}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.maskn=function(o){return this.clone().imaskn(o)},i.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)},i.prototype._iaddn=function(o){this.words[0]+=o;for(var s=0;s<this.length&&this.words[s]>=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},i.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 s=0;s<this.length&&this.words[s]<0;s++)this.words[s]+=67108864,this.words[s+1]-=1;return this._strip()},i.prototype.addn=function(o){return this.clone().iaddn(o)},i.prototype.subn=function(o){return this.clone().isubn(o)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(o,s,d){var g=o.length+d,p;this._expand(g);var u,b=0;for(p=0;p<o.length;p++){u=(this.words[p+d]|0)+b;var _=(o.words[p]|0)*s;u-=_&67108863,b=(u>>26)-(_/67108864|0),this.words[p+d]=u&67108863}for(;p<this.length-d;p++)u=(this.words[p+d]|0)+b,b=u>>26,this.words[p+d]=u&67108863;if(b===0)return this._strip();for(r(b===-1),b=0,p=0;p<this.length;p++)u=-(this.words[p]|0)+b,b=u>>26,this.words[p]=u&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(o,s){var d=this.length-o.length,g=this.clone(),p=o,u=p.words[p.length-1]|0,b=this._countBits(u);d=26-b,d!==0&&(p=p.ushln(d),g.iushln(d),u=p.words[p.length-1]|0);var _=g.length-p.length,c;if(s!=="mod"){c=new i(null),c.length=_+1,c.words=new Array(c.length);for(var x=0;x<c.length;x++)c.words[x]=0}var P=g.clone()._ishlnsubmul(p,1,_);P.negative===0&&(g=P,c&&(c.words[_]=1));for(var N=_-1;N>=0;N--){var U=(g.words[p.length+N]|0)*67108864+(g.words[p.length+N-1]|0);for(U=Math.min(U/u|0,67108863),g._ishlnsubmul(p,U,N);g.negative!==0;)U--,g.negative=0,g._ishlnsubmul(p,1,N),g.isZero()||(g.negative^=1);c&&(c.words[N]=U)}return c&&c._strip(),g._strip(),s!=="div"&&d!==0&&g.iushrn(d),{div:c||null,mod:g}},i.prototype.divmod=function(o,s,d){if(r(!o.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var g,p,u;return this.negative!==0&&o.negative===0?(u=this.neg().divmod(o,s),s!=="mod"&&(g=u.div.neg()),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.iadd(o)),{div:g,mod:p}):this.negative===0&&o.negative!==0?(u=this.divmod(o.neg(),s),s!=="mod"&&(g=u.div.neg()),{div:g,mod:u.mod}):(this.negative&o.negative)!==0?(u=this.neg().divmod(o.neg(),s),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.isub(o)),{div:u.div,mod:p}):o.length>this.length||this.cmp(o)<0?{div:new i(0),mod:this}:o.length===1?s==="div"?{div:this.divn(o.words[0]),mod:null}:s==="mod"?{div:null,mod:new i(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new i(this.modrn(o.words[0]))}:this._wordDiv(o,s)},i.prototype.div=function(o){return this.divmod(o,"div",!1).div},i.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},i.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},i.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=s.div.negative!==0?s.mod.isub(o):s.mod,g=o.ushrn(1),p=o.andln(1),u=d.cmp(g);return u<0||p===1&&u===0?s.div:s.div.negative!==0?s.div.isubn(1):s.div.iaddn(1)},i.prototype.modrn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=(1<<26)%o,g=0,p=this.length-1;p>=0;p--)g=(d*g+(this.words[p]|0))%o;return s?-g:g},i.prototype.modn=function(o){return this.modrn(o)},i.prototype.idivn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=0,g=this.length-1;g>=0;g--){var p=(this.words[g]|0)+d*67108864;this.words[g]=p/o|0,d=p%o}return this._strip(),s?this.ineg():this},i.prototype.divn=function(o){return this.clone().idivn(o)},i.prototype.egcd=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new i(1),p=new i(0),u=new i(0),b=new i(1),_=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++_;for(var c=d.clone(),x=s.clone();!s.isZero();){for(var P=0,N=1;(s.words[0]&N)===0&&P<26;++P,N<<=1);if(P>0)for(s.iushrn(P);P-- >0;)(g.isOdd()||p.isOdd())&&(g.iadd(c),p.isub(x)),g.iushrn(1),p.iushrn(1);for(var U=0,W=1;(d.words[0]&W)===0&&U<26;++U,W<<=1);if(U>0)for(d.iushrn(U);U-- >0;)(u.isOdd()||b.isOdd())&&(u.iadd(c),b.isub(x)),u.iushrn(1),b.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(u),p.isub(b)):(d.isub(s),u.isub(g),b.isub(p))}return{a:u,b,gcd:d.iushln(_)}},i.prototype._invmp=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new i(1),p=new i(0),u=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var b=0,_=1;(s.words[0]&_)===0&&b<26;++b,_<<=1);if(b>0)for(s.iushrn(b);b-- >0;)g.isOdd()&&g.iadd(u),g.iushrn(1);for(var c=0,x=1;(d.words[0]&x)===0&&c<26;++c,x<<=1);if(c>0)for(d.iushrn(c);c-- >0;)p.isOdd()&&p.iadd(u),p.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(p)):(d.isub(s),p.isub(g))}var P;return s.cmpn(1)===0?P=g:P=p,P.cmpn(0)<0&&P.iadd(o),P},i.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var g=0;s.isEven()&&d.isEven();g++)s.iushrn(1),d.iushrn(1);do{for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var p=s.cmp(d);if(p<0){var u=s;s=d,d=u}else if(p===0||d.cmpn(1)===0)break;s.isub(d)}while(!0);return d.iushln(g)},i.prototype.invm=function(o){return this.egcd(o).a.umod(o)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(o){return this.words[0]&o},i.prototype.bincn=function(o){r(typeof o=="number");var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return this._expand(d+1),this.words[d]|=g,this;for(var p=g,u=d;p!==0&&u<this.length;u++){var b=this.words[u]|0;b+=p,p=b>>>26,b&=67108863,this.words[u]=b}return p!==0&&(this.words[u]=p,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(o){var s=o<0;if(this.negative!==0&&!s)return-1;if(this.negative===0&&s)return 1;this._strip();var d;if(this.length>1)d=1;else{s&&(o=-o),r(o<=67108863,"Number is too big");var g=this.words[0]|0;d=g===o?0:g<o?-1:1}return this.negative!==0?-d|0:d},i.prototype.cmp=function(o){if(this.negative!==0&&o.negative===0)return-1;if(this.negative===0&&o.negative!==0)return 1;var s=this.ucmp(o);return this.negative!==0?-s|0:s},i.prototype.ucmp=function(o){if(this.length>o.length)return 1;if(this.length<o.length)return-1;for(var s=0,d=this.length-1;d>=0;d--){var g=this.words[d]|0,p=o.words[d]|0;if(g!==p){g<p?s=-1:g>p&&(s=1);break}}return s},i.prototype.gtn=function(o){return this.cmpn(o)===1},i.prototype.gt=function(o){return this.cmp(o)===1},i.prototype.gten=function(o){return this.cmpn(o)>=0},i.prototype.gte=function(o){return this.cmp(o)>=0},i.prototype.ltn=function(o){return this.cmpn(o)===-1},i.prototype.lt=function(o){return this.cmp(o)===-1},i.prototype.lten=function(o){return this.cmpn(o)<=0},i.prototype.lte=function(o){return this.cmp(o)<=0},i.prototype.eqn=function(o){return this.cmpn(o)===0},i.prototype.eq=function(o){return this.cmp(o)===0},i.red=function(o){return new h(o)},i.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)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(o){return this.red=o,this},i.prototype.forceRed=function(o){return r(!this.red,"Already a number in reduction context"),this._forceRed(o)},i.prototype.redAdd=function(o){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},i.prototype.redIAdd=function(o){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},i.prototype.redSub=function(o){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},i.prototype.redISub=function(o){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},i.prototype.redShl=function(o){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},i.prototype.redMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},i.prototype.redIMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(o){return r(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var O={k256:null,p224:null,p192:null,p25519:null};function D(l,o){this.name=l,this.p=new i(o,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var o=new i(null);return o.words=new Array(Math.ceil(this.n/13)),o},D.prototype.ireduce=function(o){var s=o,d;do this.split(s,this.tmp),s=this.imulK(s),s=s.iadd(this.tmp),d=s.bitLength();while(d>this.n);var g=d<this.n?-1:s.ucmp(this.p);return g===0?(s.words[0]=0,s.length=1):g>0?s.isub(this.p):s.strip!==void 0?s.strip():s._strip(),s},D.prototype.split=function(o,s){o.iushrn(this.n,0,s)},D.prototype.imulK=function(o){return o.imul(this.k)};function L(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(L,D),L.prototype.split=function(o,s){for(var d=4194303,g=Math.min(o.length,9),p=0;p<g;p++)s.words[p]=o.words[p];if(s.length=g,o.length<=9){o.words[0]=0,o.length=1;return}var u=o.words[9];for(s.words[s.length++]=u&d,p=10;p<o.length;p++){var b=o.words[p]|0;o.words[p-10]=(b&d)<<4|u>>>22,u=b}u>>>=22,o.words[p-10]=u,u===0&&o.length>10?o.length-=10:o.length-=9},L.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d<o.length;d++){var g=o.words[d]|0;s+=g*977,o.words[d]=s&67108863,s=g*64+(s/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(F,D);function H(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(H,D);function M(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(M,D),M.prototype.imulK=function(o){for(var s=0,d=0;d<o.length;d++){var g=(o.words[d]|0)*19+s,p=g&67108863;g>>>=26,o.words[d]=p,s=g}return s!==0&&(o.words[o.length++]=s),o},i._prime=function(o){if(O[o])return O[o];var s;if(o==="k256")s=new L;else if(o==="p224")s=new F;else if(o==="p192")s=new H;else if(o==="p25519")s=new M;else throw new Error("Unknown prime "+o);return O[o]=s,s};function h(l){if(typeof l=="string"){var o=i._prime(l);this.m=o.p,this.prime=o}else r(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}h.prototype._verify1=function(o){r(o.negative===0,"red works only with positives"),r(o.red,"red works only with red numbers")},h.prototype._verify2=function(o,s){r((o.negative|s.negative)===0,"red works only with positives"),r(o.red&&o.red===s.red,"red works only with red numbers")},h.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(E(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,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},h.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},h.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},h.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},h.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},h.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},h.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},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 s=this.m.andln(3);if(r(s%2===1),s===3){var d=this.m.add(new i(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),p=0;!g.isZero()&&g.andln(1)===0;)p++,g.iushrn(1);r(!g.isZero());var u=new i(1).toRed(this),b=u.redNeg(),_=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);this.pow(c,_).cmp(b)!==0;)c.redIAdd(b);for(var x=this.pow(c,g),P=this.pow(o,g.addn(1).iushrn(1)),N=this.pow(o,g),U=p;N.cmp(u)!==0;){for(var W=N,K=0;W.cmp(u)!==0;K++)W=W.redSqr();r(K<U);var G=this.pow(x,new i(1).iushln(U-K-1));P=P.redMul(G),x=G.redSqr(),N=N.redMul(x),U=K}return P},h.prototype.invm=function(o){var s=o._invmp(this.m);return s.negative!==0?(s.negative=0,this.imod(s).redNeg()):this.imod(s)},h.prototype.pow=function(o,s){if(s.isZero())return new i(1).toRed(this);if(s.cmpn(1)===0)return o.clone();var d=4,g=new Array(1<<d);g[0]=new i(1).toRed(this),g[1]=o;for(var p=2;p<g.length;p++)g[p]=this.mul(g[p-1],o);var u=g[0],b=0,_=0,c=s.bitLength()%26;for(c===0&&(c=26),p=s.length-1;p>=0;p--){for(var x=s.words[p],P=c-1;P>=0;P--){var N=x>>P&1;if(u!==g[0]&&(u=this.sqr(u)),N===0&&b===0){_=0;continue}b<<=1,b|=N,_++,!(_!==d&&(p!==0||P!==0))&&(u=this.mul(u,g[b]),_=0,b=0)}c=26}return u},h.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},h.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},i.mont=function(o){return new y(o)};function y(l){h.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}n(y,h),y.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},y.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},y.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new i(0)._forceRed(this);var d=o.mul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.invm=function(o){var s=this.imod(o._invmp(this.m).mul(this.r2));return s._forceRed(this)}})(typeof Jh>"u"||Jh,am)});var Qh=R((gk,um)=>{"use strict";w();var Mn=om(),PE=ui(),DE=ke().Buffer;function fm(t){var e=t.modulus.byteLength(),r;do r=new Mn(PE(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function UE(t){var e=fm(t),r=e.toRed(Mn.mont(t.modulus)).redPow(new Mn(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function sm(t,e){var r=UE(e),n=e.modulus.byteLength(),i=new Mn(t).mul(r.blinder).umod(e.modulus),a=i.toRed(Mn.mont(e.prime1)),f=i.toRed(Mn.mont(e.prime2)),v=e.coefficient,m=e.prime1,E=e.prime2,A=a.redPow(e.exponent1).fromRed(),q=f.redPow(e.exponent2).fromRed(),I=A.isub(q).imul(v).umod(m).imul(E);return q.iadd(I).imul(r.unblinder).umod(e.modulus).toArrayLike(DE,"be",n)}sm.getr=fm;um.exports=sm});var dm=R((bk,cm)=>{w();var NE=Vh(),el=ui(),LE=Ia(),hm=Zh(),lm=Yh(),tl=lr(),FE=Xh(),jE=Qh(),jt=ke().Buffer;cm.exports=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var a=NE(e),f;if(i===4)f=HE(a,r);else if(i===1)f=KE(a,r,n);else if(i===3){if(f=new tl(r),f.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return n?jE(f,a):FE(f,a)};function HE(t,e){var r=t.modulus.byteLength(),n=e.length,i=LE("sha1").update(jt.alloc(0)).digest(),a=i.length,f=2*a;if(n>r-f-2)throw new Error("message too long");var v=jt.alloc(r-n-f-2),m=r-a-1,E=el(a),A=lm(jt.concat([i,v,jt.alloc(1,1),e],m),hm(E,m)),q=lm(E,hm(A,a));return new tl(jt.concat([jt.alloc(1),q,A],r))}function KE(t,e,r){var n=e.length,i=t.modulus.byteLength();if(n>i-11)throw new Error("message too long");var a;return r?a=jt.alloc(i-n-3,255):a=WE(i-n-3),new tl(jt.concat([jt.from([0,r?1:2]),a,jt.alloc(1),e],i))}function WE(t){for(var e=jt.allocUnsafe(t),r=0,n=el(t*2),i=0,a;r<t;)i===n.length&&(n=el(t*2),i=0),a=n[i++],a&&(e[r++]=a);return e}});var mm=R((_k,gm)=>{w();var zE=Vh(),pm=Zh(),vm=Yh(),ym=lr(),GE=Qh(),VE=Ia(),$E=Xh(),Ka=ke().Buffer;gm.exports=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var a=zE(e),f=a.modulus.byteLength();if(r.length>f||new ym(r).cmp(a.modulus)>=0)throw new Error("decryption error");var v;n?v=$E(new ym(r),a):v=GE(r,a);var m=Ka.alloc(f-v.length);if(v=Ka.concat([m,v],f),i===4)return ZE(a,v);if(i===1)return YE(a,v,n);if(i===3)return v;throw new Error("unknown padding")};function ZE(t,e){var r=t.modulus.byteLength(),n=VE("sha1").update(Ka.alloc(0)).digest(),i=n.length;if(e[0]!==0)throw new Error("decryption error");var a=e.slice(1,i+1),f=e.slice(i+1),v=vm(a,pm(f,i)),m=vm(f,pm(v,r-i-1));if(XE(n,m.slice(0,i)))throw new Error("decryption error");for(var E=i;m[E]===0;)E++;if(m[E++]!==1)throw new Error("decryption error");return m.slice(E)}function YE(t,e,r){for(var n=e.slice(0,2),i=2,a=0;e[i++]!==0;)if(i>=e.length){a++;break}var f=e.slice(2,i-1);if((n.toString("hex")!=="0002"&&!r||n.toString("hex")!=="0001"&&r)&&a++,f.length<8&&a++,a)throw new Error("decryption error");return e.slice(i)}function XE(t,e){t=Ka.from(t),e=Ka.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i<n;)r+=t[i]^e[i];return r}});var bm=R(Pi=>{w();Pi.publicEncrypt=dm();Pi.privateDecrypt=mm();Pi.privateEncrypt=function(e,r){return Pi.publicEncrypt(e,r,!0)};Pi.publicDecrypt=function(e,r){return Pi.privateDecrypt(e,r,!0)}});var qm=R(Wa=>{"use strict";w();function wm(){throw new Error(`secure random number generation not supported by this browser
|
|
15
|
-
use chrome, FireFox or Internet Explorer 11`)}var
|
|
13
|
+
})`)}catch{r=function(n){this._initNamed(n)}}return XM(r,e),r.prototype._initNamed=function(n){e.call(this,n)},new r(this)};zi.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(m1.decoders[e])),this.decoders[e]};zi.prototype.decode=function(e,r,i){return this._getDecoder(r).decode(e,i)};zi.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(m1.encoders[e])),this.encoders[e]};zi.prototype.encode=function(e,r,i){return this._getEncoder(r).encode(e,i)}});var x1=B(_1=>{w();var QM=X();function _t(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}_1.Reporter=_t;_t.prototype.isError=function(e){return e instanceof Yi};_t.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};_t.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};_t.prototype.enterKey=function(e){return this._reporterState.path.push(e)};_t.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};_t.prototype.leaveKey=function(e,r,i){var n=this._reporterState;this.exitKey(e),n.obj!==null&&(n.obj[r]=i)};_t.prototype.path=function(){return this._reporterState.path.join("/")};_t.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};_t.prototype.leaveObject=function(e){var r=this._reporterState,i=r.obj;return r.obj=e,i};_t.prototype.error=function(e){var r,i=this._reporterState,n=e instanceof Yi;if(n?r=e:r=new Yi(i.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};_t.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function Yi(t,e){this.path=t,this.rethrow(e)}QM(Yi,Error);Yi.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Yi),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var $u=B(Vu=>{w();var e4=X(),ef=Xi().Reporter,ho=ft().Buffer;function Kt(t,e){if(ef.call(this,e),!ho.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}e4(Kt,ef);Vu.DecoderBuffer=Kt;Kt.prototype.save=function(){return{offset:this.offset,reporter:ef.prototype.save.call(this)}};Kt.prototype.restore=function(e){var r=new Kt(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,ef.prototype.restore.call(this,e.reporter),r};Kt.prototype.isEmpty=function(){return this.offset===this.length};Kt.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Kt.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new Kt(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};Kt.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Qa(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof Qa||(r=new Qa(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=ho.byteLength(t);else if(ho.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}Vu.EncoderBuffer=Qa;Qa.prototype.join=function(e,r){return e||(e=new ho(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):ho.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var S1=B((_9,E1)=>{w();var t4=Xi().Reporter,r4=Xi().EncoderBuffer,i4=Xi().DecoderBuffer,st=Hi(),M1=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],n4=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(M1),o4=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Fe(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}E1.exports=Fe;var a4=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Fe.prototype.clone=function(){var e=this._baseState,r={};a4.forEach(function(n){r[n]=e[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};Fe.prototype._wrap=function(){var e=this._baseState;n4.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return e.children.push(n),n[r].apply(n,arguments)}},this)};Fe.prototype._init=function(e){var r=this._baseState;st(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),st.equal(r.children.length,1,"Root node can have only one child")};Fe.prototype._useArgs=function(e){var r=this._baseState,i=e.filter(function(n){return n instanceof this.constructor},this);e=e.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(st(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),e.length!==0&&(st(r.args===null),r.args=e,r.reverseArgs=e.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var a={};return Object.keys(n).forEach(function(f){f==(f|0)&&(f|=0);var y=n[f];a[y]=f}),a}))};o4.forEach(function(t){Fe.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});M1.forEach(function(t){Fe.prototype[t]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return st(r.tag===null),r.tag=t,this._useArgs(i),this}});Fe.prototype.use=function(e){st(e);var r=this._baseState;return st(r.use===null),r.use=e,this};Fe.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};Fe.prototype.def=function(e){var r=this._baseState;return st(r.default===null),r.default=e,r.optional=!0,this};Fe.prototype.explicit=function(e){var r=this._baseState;return st(r.explicit===null&&r.implicit===null),r.explicit=e,this};Fe.prototype.implicit=function(e){var r=this._baseState;return st(r.explicit===null&&r.implicit===null),r.implicit=e,this};Fe.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};Fe.prototype.key=function(e){var r=this._baseState;return st(r.key===null),r.key=e,this};Fe.prototype.any=function(){var e=this._baseState;return e.any=!0,this};Fe.prototype.choice=function(e){var r=this._baseState;return st(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};Fe.prototype.contains=function(e){var r=this._baseState;return st(r.use===null),r.contains=e,this};Fe.prototype._decode=function(e,r){var i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));var n=i.default,a=!0,f=null;if(i.key!==null&&(f=e.enterKey(i.key)),i.optional){var y=null;if(i.explicit!==null?y=i.explicit:i.implicit!==null?y=i.implicit:i.tag!==null&&(y=i.tag),y===null&&!i.any){var b=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(b)}else if(a=this._peekTag(e,y,i.any),e.isError(a))return a}var S;if(i.obj&&a&&(S=e.enterObject()),a){if(i.explicit!==null){var A=this._decodeTag(e,i.explicit);if(e.isError(A))return A;e=A}var q=e.offset;if(i.use===null&&i.choice===null){if(i.any)var b=e.save();var k=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(k))return k;i.any?n=e.raw(b):e=k}if(r&&r.track&&i.tag!==null&&r.track(e.path(),q,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,e,r):n=this._decodeChoice(e,r),e.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(Z){Z._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var P=new i4(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(P,r)}}return i.obj&&a&&(n=e.leaveObject(S)),i.key!==null&&(n!==null||a===!0)?e.leaveKey(f,i.key,n):f!==null&&e.exitKey(f),n};Fe.prototype._decodeGeneric=function(e,r,i){var n=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,n.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};Fe.prototype._getUse=function(e,r){var i=this._baseState;return i.useDecoder=this._use(e,r),st(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};Fe.prototype._decodeChoice=function(e,r){var i=this._baseState,n=null,a=!1;return Object.keys(i.choice).some(function(f){var y=e.save(),b=i.choice[f];try{var S=b._decode(e,r);if(e.isError(S))return!1;n={type:f,value:S},a=!0}catch{return e.restore(y),!1}return!0},this),a?n:e.error("Choice not matched")};Fe.prototype._createEncoderBuffer=function(e){return new r4(e,this.reporter)};Fe.prototype._encode=function(e,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===e)){var a=this._encodeValue(e,r,i);if(a!==void 0&&!this._skipDefault(a,r,i))return a}};Fe.prototype._encodeValue=function(e,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,r||new t4);var b=null;if(this.reporter=r,n.optional&&e===void 0)if(n.default!==null)e=n.default;else return;var a=null,f=!1;if(n.any)b=this._createEncoderBuffer(e);else if(n.choice)b=this._encodeChoice(e,r);else if(n.contains)a=this._getUse(n.contains,i)._encode(e,r),f=!0;else if(n.children)a=n.children.map(function(q){if(q._baseState.tag==="null_")return q._encode(null,r,e);if(q._baseState.key===null)return r.error("Child should have a key");var k=r.enterKey(q._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var P=q._encode(e[q._baseState.key],r,e);return r.leaveKey(k),P},this).filter(function(q){return q}),a=this._createEncoderBuffer(a);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var y=this.clone();y._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(q){var k=this._baseState;return this._getUse(k.args[0],e)._encode(q,r)},y))}else n.use!==null?b=this._getUse(n.use,i)._encode(e,r):(a=this._encodePrimitive(n.tag,e),f=!0);var b;if(!n.any&&n.choice===null){var S=n.implicit!==null?n.implicit:n.tag,A=n.implicit===null?"universal":"context";S===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(b=this._encodeComposite(S,f,A,a))}return n.explicit!==null&&(b=this._encodeComposite(n.explicit,!1,"context",b)),b};Fe.prototype._encodeChoice=function(e,r){var i=this._baseState,n=i.choice[e.type];return n||st(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,r)};Fe.prototype._encodePrimitive=function(e,r){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};Fe.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};Fe.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var Xi=B(B1=>{w();var tf=B1;tf.Reporter=x1().Reporter;tf.DecoderBuffer=$u().DecoderBuffer;tf.EncoderBuffer=$u().EncoderBuffer;tf.Node=S1()});var R1=B(li=>{w();var A1=zu();li.tagClass={0:"universal",1:"application",2:"context",3:"private"};li.tagClassByName=A1._reverse(li.tagClass);li.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};li.tagByName=A1._reverse(li.tag)});var zu=B(T1=>{w();var q1=T1;q1._reverse=function(e){var r={};return Object.keys(e).forEach(function(i){(i|0)==i&&(i=i|0);var n=e[i];r[n]=i}),r};q1.der=R1()});var Xu=B((q9,O1)=>{w();var f4=X(),Zu=Zi(),rf=Zu.base,s4=Zu.bignum,I1=Zu.constants.der;function k1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new ct,this.tree._init(t.body)}O1.exports=k1;k1.prototype.decode=function(e,r){return e instanceof rf.DecoderBuffer||(e=new rf.DecoderBuffer(e,r)),this.tree._decode(e,r)};function ct(t){rf.Node.call(this,"der",t)}f4(ct,rf.Node);ct.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;var n=e.save(),a=Yu(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(n),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||i)};ct.prototype._decodeTag=function(e,r,i){var n=Yu(e,'Failed to decode tag of "'+r+'"');if(e.isError(n))return n;var a=C1(e,n.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(n.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');var f=e.save(),y=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(y)?y:(a=e.offset-f.offset,e.restore(f),e.skip(a,'Failed to match body of: "'+r+'"'))};ct.prototype._skipUntilEnd=function(e,r){for(;;){var i=Yu(e,r);if(e.isError(i))return i;var n=C1(e,i.primitive,r);if(e.isError(n))return n;var a;if(i.primitive||n!==null?a=e.skip(n):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(i.tagStr==="end")break}};ct.prototype._decodeList=function(e,r,i,n){for(var a=[];!e.isEmpty();){var f=this._peekTag(e,"end");if(e.isError(f))return f;var y=i.decode(e,"der",n);if(e.isError(y)&&f)break;a.push(y)}return a};ct.prototype._decodeStr=function(e,r){if(r==="bitstr"){var i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){var n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",f=0;f<n.length/2;f++)a+=String.fromCharCode(n.readUInt16BE(f*2));return a}else if(r==="numstr"){var y=e.raw().toString("ascii");return this._isNumstr(y)?y:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){var b=e.raw().toString("ascii");return this._isPrintstr(b)?b:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};ct.prototype._decodeObjid=function(e,r,i){for(var n,a=[],f=0;!e.isEmpty();){var y=e.readUInt8();f<<=7,f|=y&127,(y&128)===0&&(a.push(f),f=0)}y&128&&a.push(f);var b=a[0]/40|0,S=a[0]%40;if(i?n=a:n=[b,S].concat(a.slice(1)),r){var A=r[n.join(" ")];A===void 0&&(A=r[n.join(".")]),A!==void 0&&(n=A)}return n};ct.prototype._decodeTime=function(e,r){var i=e.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,a=i.slice(4,6)|0,f=i.slice(6,8)|0,y=i.slice(8,10)|0,b=i.slice(10,12)|0,S=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,a=i.slice(2,4)|0,f=i.slice(4,6)|0,y=i.slice(6,8)|0,b=i.slice(8,10)|0,S=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,a-1,f,y,b,S,0)};ct.prototype._decodeNull=function(e){return null};ct.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};ct.prototype._decodeInt=function(e,r){var i=e.raw(),n=new s4(i);return r&&(n=r[n.toString(10)]||n),n};ct.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Yu(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=I1.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127}}else r&=31;var f=I1.tag[r];return{cls:i,primitive:n,tag:r,tagStr:f}}function C1(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return t.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var f=t.readUInt8(r);if(t.isError(f))return f;i|=f}return i}});var D1=B((I9,P1)=>{w();var u4=X(),h4=ft().Buffer,Ju=Xu();function Qu(t){Ju.call(this,t),this.enc="pem"}u4(Qu,Ju);P1.exports=Qu;Qu.prototype.decode=function(e,r){for(var i=e.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,f=-1,y=-1,b=0;b<i.length;b++){var S=i[b].match(a);if(S!==null&&S[2]===n)if(f===-1){if(S[1]!=="BEGIN")break;f=b}else{if(S[1]!=="END")break;y=b;break}}if(f===-1||y===-1)throw new Error("PEM section not found for: "+n);var A=i.slice(f+1,y).join("");A.replace(/[^a-z0-9\+\/=]+/gi,"");var q=new h4(A,"base64");return Ju.prototype.decode.call(this,q,r)}});var L1=B(N1=>{w();var U1=N1;U1.der=Xu();U1.pem=D1()});var th=B((P9,K1)=>{w();var l4=X(),ar=ft().Buffer,F1=Zi(),j1=F1.base,eh=F1.constants.der;function H1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new qt,this.tree._init(t.body)}K1.exports=H1;H1.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function qt(t){j1.Node.call(this,"der",t)}l4(qt,j1.Node);qt.prototype._encodeComposite=function(e,r,i,n){var a=c4(e,r,i,this.reporter);if(n.length<128){var b=new ar(2);return b[0]=a,b[1]=n.length,this._createEncoderBuffer([b,n])}for(var f=1,y=n.length;y>=256;y>>=8)f++;var b=new ar(2+f);b[0]=a,b[1]=128|f;for(var y=1+f,S=n.length;S>0;y--,S>>=8)b[y]=S&255;return this._createEncoderBuffer([b,n])};qt.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var i=new ar(e.length*2),n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};qt.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(var n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}for(var a=0,n=0;n<e.length;n++){var f=e[n];for(a++;f>=128;f>>=7)a++}for(var y=new ar(a),b=y.length-1,n=e.length-1;n>=0;n--){var f=e[n];for(y[b--]=f&127;(f>>=7)>0;)y[b--]=128|f&127}return this._createEncoderBuffer(y)};function xt(t){return t<10?"0"+t:t}qt.prototype._encodeTime=function(e,r){var i,n=new Date(e);return r==="gentime"?i=[xt(n.getFullYear()),xt(n.getUTCMonth()+1),xt(n.getUTCDate()),xt(n.getUTCHours()),xt(n.getUTCMinutes()),xt(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[xt(n.getFullYear()%100),xt(n.getUTCMonth()+1),xt(n.getUTCDate()),xt(n.getUTCHours()),xt(n.getUTCMinutes()),xt(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};qt.prototype._encodeNull=function(){return this._createEncoderBuffer("")};qt.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!ar.isBuffer(e)){var i=e.toArray();!e.sign&&i[0]&128&&i.unshift(0),e=new ar(i)}if(ar.isBuffer(e)){var n=e.length;e.length===0&&n++;var f=new ar(n);return e.copy(f),e.length===0&&(f[0]=0),this._createEncoderBuffer(f)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,a=e;a>=256;a>>=8)n++;for(var f=new Array(n),a=f.length-1;a>=0;a--)f[a]=e&255,e>>=8;return f[0]&128&&f.unshift(0),this._createEncoderBuffer(new ar(f))};qt.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};qt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};qt.prototype._skipDefault=function(e,r,i){var n=this._baseState,a;if(n.default===null)return!1;var f=e.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),f.length!==n.defaultBuffer.length)return!1;for(a=0;a<f.length;a++)if(f[a]!==n.defaultBuffer[a])return!1;return!0};function c4(t,e,r,i){var n;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),eh.tagByName.hasOwnProperty(t))n=eh.tagByName[t];else if(typeof t=="number"&&(t|0)===t)n=t;else return i.error("Unknown tag: "+t);return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=eh.tagClassByName[r||"universal"]<<6,n)}});var G1=B((U9,W1)=>{w();var d4=X(),rh=th();function ih(t){rh.call(this,t),this.enc="pem"}d4(ih,rh);W1.exports=ih;ih.prototype.encode=function(e,r){for(var i=rh.prototype.encode.call(this,e),n=i.toString("base64"),a=["-----BEGIN "+r.label+"-----"],f=0;f<n.length;f+=64)a.push(n.slice(f,f+64));return a.push("-----END "+r.label+"-----"),a.join(`
|
|
14
|
+
`)}});var z1=B($1=>{w();var V1=$1;V1.der=th();V1.pem=G1()});var Zi=B(Z1=>{w();var Ji=Z1;Ji.bignum=gr();Ji.define=w1().define;Ji.base=Xi();Ji.constants=zu();Ji.decoders=L1();Ji.encoders=z1()});var Q1=B((K9,J1)=>{"use strict";w();var Tt=Zi(),Y1=Tt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),p4=Tt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),nh=Tt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),v4=Tt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(nh),this.key("subjectPublicKey").bitstr())}),y4=Tt.define("RelativeDistinguishedName",function(){this.setof(p4)}),g4=Tt.define("RDNSequence",function(){this.seqof(y4)}),X1=Tt.define("Name",function(){this.choice({rdnSequence:this.use(g4)})}),m4=Tt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(Y1),this.key("notAfter").use(Y1))}),b4=Tt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),w4=Tt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(nh),this.key("issuer").use(X1),this.key("validity").use(m4),this.key("subject").use(X1),this.key("subjectPublicKeyInfo").use(v4),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(b4).optional())}),_4=Tt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(w4),this.key("signatureAlgorithm").use(nh),this.key("signatureValue").bitstr())});J1.exports=_4});var tg=B(kt=>{"use strict";w();var It=Zi();kt.certificate=Q1();var x4=It.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});kt.RSAPrivateKey=x4;var M4=It.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});kt.RSAPublicKey=M4;var eg=It.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),E4=It.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(eg),this.key("subjectPublicKey").bitstr())});kt.PublicKey=E4;var S4=It.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(eg),this.key("subjectPrivateKey").octstr())});kt.PrivateKey=S4;var B4=It.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});kt.EncryptedPrivateKey=B4;var A4=It.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});kt.DSAPrivateKey=A4;kt.DSAparam=It.define("DSAparam",function(){this.int()});var R4=It.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),q4=It.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(R4),this.key("publicKey").optional().explicit(1).bitstr())});kt.ECPrivateKey=q4;kt.signature=It.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var rg=B(($9,T4)=>{T4.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}});var ng=B((z9,ig)=>{"use strict";w();var I4=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,k4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,C4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,O4=fo(),P4=Ya(),nf=Te().Buffer;ig.exports=function(t,e){var r=t.toString(),i=r.match(I4),n;if(i){var f="aes"+i[1],y=nf.from(i[2],"hex"),b=nf.from(i[3].replace(/[\r\n]/g,""),"base64"),S=O4(e,y.slice(0,8),parseInt(i[1],10)).key,A=[],q=P4.createDecipheriv(f,S,y);A.push(q.update(b)),A.push(q.final()),n=nf.concat(A)}else{var a=r.match(C4);n=nf.from(a[2].replace(/[\r\n]/g,""),"base64")}var k=r.match(k4)[1];return{tag:k,data:n}}});var ah=B((Y9,ag)=>{"use strict";w();var lt=tg(),D4=rg(),U4=ng(),N4=Ya(),L4=pu().pbkdf2Sync,oh=Te().Buffer;function F4(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=D4[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,y=parseInt(n.split("-")[1],10)/8,b=L4(e,r,i,y,"sha1"),S=N4.createDecipheriv(n,b,a),A=[];return A.push(S.update(f)),A.push(S.final()),oh.concat(A)}function og(t){var e;typeof t=="object"&&!oh.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=oh.from(t));var r=U4(t,e),i=r.tag,n=r.data,a,f;switch(i){case"CERTIFICATE":f=lt.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=lt.PublicKey.decode(n,"der")),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return lt.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=lt.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":n=lt.EncryptedPrivateKey.decode(n,"der"),n=F4(n,e);case"PRIVATE KEY":switch(f=lt.PrivateKey.decode(n,"der"),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return lt.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:lt.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=lt.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return lt.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return lt.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:lt.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=lt.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}og.signature=lt.signature;ag.exports=og});var sh=B((J9,fg)=>{w();var j4=Qn(),fh=Te().Buffer;fg.exports=function(t,e){for(var r=fh.alloc(0),i=0,n;r.length<e;)n=H4(i++),r=fh.concat([r,j4("sha1").update(t).update(n).digest()]);return r.slice(0,e)};function H4(t){var e=fh.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var uh=B((eR,sg)=>{w();sg.exports=function(e,r){for(var i=e.length,n=-1;++n<i;)e[n]^=r[n];return e}});var hh=B((rR,hg)=>{w();var ug=gr(),K4=Te().Buffer;function W4(t,e){return K4.from(t.toRed(ug.mont(e.modulus)).redPow(new ug(e.publicExponent)).fromRed().toArray())}hg.exports=W4});var cg=B((lg,lh)=>{w();(function(t,e){"use strict";function r(l,o){if(!l)throw new Error(o||"Assertion failed")}function i(l,o){l.super_=o;var u=function(){};u.prototype=o.prototype,l.prototype=new u,l.prototype.constructor=l}function n(l,o,u){if(n.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((o==="le"||o==="be")&&(u=o,o=10),this._init(l||0,o||10,u||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(o){return o instanceof n?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===n.wordSize&&Array.isArray(o.words)},n.max=function(o,u){return o.cmp(u)>0?o:u},n.min=function(o,u){return o.cmp(u)<0?o:u},n.prototype._init=function(o,u,d){if(typeof o=="number")return this._initNumber(o,u,d);if(typeof o=="object")return this._initArray(o,u,d);u==="hex"&&(u=16),r(u===(u|0)&&u>=2&&u<=36),o=o.toString().replace(/\s+/g,"");var g=0;o[0]==="-"&&(g++,this.negative=1),g<o.length&&(u===16?this._parseHex(o,g,d):(this._parseBase(o,u,g),d==="le"&&this._initArray(this.toArray(),u,d)))},n.prototype._initNumber=function(o,u,d){o<0&&(this.negative=1,o=-o),o<67108864?(this.words=[o&67108863],this.length=1):o<4503599627370496?(this.words=[o&67108863,o/67108864&67108863],this.length=2):(r(o<9007199254740992),this.words=[o&67108863,o/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),u,d)},n.prototype._initArray=function(o,u,d){if(r(typeof o.length=="number"),o.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(o.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p,s,m=0;if(d==="be")for(g=o.length-1,p=0;g>=0;g-=3)s=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[p]|=s<<m&67108863,this.words[p+1]=s>>>26-m&67108863,m+=24,m>=26&&(m-=26,p++);else if(d==="le")for(g=0,p=0;g<o.length;g+=3)s=o[g]|o[g+1]<<8|o[g+2]<<16,this.words[p]|=s<<m&67108863,this.words[p+1]=s>>>26-m&67108863,m+=24,m>=26&&(m-=26,p++);return this._strip()};function f(l,o){var u=l.charCodeAt(o);if(u>=48&&u<=57)return u-48;if(u>=65&&u<=70)return u-55;if(u>=97&&u<=102)return u-87;r(!1,"Invalid character in "+l)}function y(l,o,u){var d=f(l,u);return u-1>=o&&(d|=f(l,u-1)<<4),d}n.prototype._parseHex=function(o,u,d){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p=0,s=0,m;if(d==="be")for(g=o.length-1;g>=u;g-=2)m=y(o,u,g)<<p,this.words[s]|=m&67108863,p>=18?(p-=18,s+=1,this.words[s]|=m>>>26):p+=8;else{var _=o.length-u;for(g=_%2===0?u+1:u;g<o.length;g+=2)m=y(o,u,g)<<p,this.words[s]|=m&67108863,p>=18?(p-=18,s+=1,this.words[s]|=m>>>26):p+=8}this._strip()};function b(l,o,u,d){for(var g=0,p=0,s=Math.min(l.length,u),m=o;m<s;m++){var _=l.charCodeAt(m)-48;g*=d,_>=49?p=_-49+10:_>=17?p=_-17+10:p=_,r(_>=0&&p<d,"Invalid character"),g+=p}return g}n.prototype._parseBase=function(o,u,d){this.words=[0],this.length=1;for(var g=0,p=1;p<=67108863;p*=u)g++;g--,p=p/u|0;for(var s=o.length-d,m=s%g,_=Math.min(s,s-m)+d,c=0,x=d;x<_;x+=g)c=b(o,x,x+g,u),this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(m!==0){var O=1;for(c=b(o,x,o.length,u),x=0;x<m;x++)O*=u;this.imuln(O),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},n.prototype.copy=function(o){o.words=new Array(this.length);for(var u=0;u<this.length;u++)o.words[u]=this.words[u];o.length=this.length,o.negative=this.negative,o.red=this.red};function S(l,o){l.words=o.words,l.length=o.length,l.negative=o.negative,l.red=o.red}if(n.prototype._move=function(o){S(o,this)},n.prototype.clone=function(){var o=new n(null);return this.copy(o),o},n.prototype._expand=function(o){for(;this.length<o;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{n.prototype.inspect=A}else n.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var q=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],k=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(o,u){o=o||10,u=u|0||1;var d;if(o===16||o==="hex"){d="";for(var g=0,p=0,s=0;s<this.length;s++){var m=this.words[s],_=((m<<g|p)&16777215).toString(16);p=m>>>24-g&16777215,g+=2,g>=26&&(g-=26,s--),p!==0||s!==this.length-1?d=q[6-_.length]+_+d:d=_+d}for(p!==0&&(d=p.toString(16)+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(o===(o|0)&&o>=2&&o<=36){var c=k[o],x=P[o];d="";var O=this.clone();for(O.negative=0;!O.isZero();){var N=O.modrn(x).toString(o);O=O.idivn(x),O.isZero()?d=N+d:d=q[c-N.length]+N+d}for(this.isZero()&&(d="0"+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var o=this.words[0];return this.length===2?o+=this.words[1]*67108864:this.length===3&&this.words[2]===1?o+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-o:o},n.prototype.toJSON=function(){return this.toString(16,2)},a&&(n.prototype.toBuffer=function(o,u){return this.toArrayLike(a,o,u)}),n.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)};var H=function(o,u){return o.allocUnsafe?o.allocUnsafe(u):new o(u)};n.prototype.toArrayLike=function(o,u,d){this._strip();var g=this.byteLength(),p=d||Math.max(1,g);r(g<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0");var s=H(o,p),m=u==="le"?"LE":"BE";return this["_toArrayLike"+m](s,g),s},n.prototype._toArrayLikeLE=function(o,u){for(var d=0,g=0,p=0,s=0;p<this.length;p++){var m=this.words[p]<<s|g;o[d++]=m&255,d<o.length&&(o[d++]=m>>8&255),d<o.length&&(o[d++]=m>>16&255),s===6?(d<o.length&&(o[d++]=m>>24&255),g=0,s=0):(g=m>>>24,s+=2)}if(d<o.length)for(o[d++]=g;d<o.length;)o[d++]=0},n.prototype._toArrayLikeBE=function(o,u){for(var d=o.length-1,g=0,p=0,s=0;p<this.length;p++){var m=this.words[p]<<s|g;o[d--]=m&255,d>=0&&(o[d--]=m>>8&255),d>=0&&(o[d--]=m>>16&255),s===6?(d>=0&&(o[d--]=m>>24&255),g=0,s=0):(g=m>>>24,s+=2)}if(d>=0)for(o[d--]=g;d>=0;)o[d--]=0},Math.clz32?n.prototype._countBits=function(o){return 32-Math.clz32(o)}:n.prototype._countBits=function(o){var u=o,d=0;return u>=4096&&(d+=13,u>>>=13),u>=64&&(d+=7,u>>>=7),u>=8&&(d+=4,u>>>=4),u>=2&&(d+=2,u>>>=2),d+u},n.prototype._zeroBits=function(o){if(o===0)return 26;var u=o,d=0;return(u&8191)===0&&(d+=13,u>>>=13),(u&127)===0&&(d+=7,u>>>=7),(u&15)===0&&(d+=4,u>>>=4),(u&3)===0&&(d+=2,u>>>=2),(u&1)===0&&d++,d},n.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return(this.length-1)*26+u};function Z(l){for(var o=new Array(l.bitLength()),u=0;u<o.length;u++){var d=u/26|0,g=u%26;o[u]=l.words[d]>>>g&1}return o}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;u<this.length;u++){var d=this._zeroBits(this.words[u]);if(o+=d,d!==26)break}return o},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(o){return this.negative!==0?this.abs().inotn(o).iaddn(1):this.clone()},n.prototype.fromTwos=function(o){return this.testn(o-1)?this.notn(o).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(o){for(;this.length<o.length;)this.words[this.length++]=0;for(var u=0;u<o.length;u++)this.words[u]=this.words[u]|o.words[u];return this._strip()},n.prototype.ior=function(o){return r((this.negative|o.negative)===0),this.iuor(o)},n.prototype.or=function(o){return this.length>o.length?this.clone().ior(o):o.clone().ior(this)},n.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},n.prototype.iuand=function(o){var u;this.length>o.length?u=o:u=this;for(var d=0;d<u.length;d++)this.words[d]=this.words[d]&o.words[d];return this.length=u.length,this._strip()},n.prototype.iand=function(o){return r((this.negative|o.negative)===0),this.iuand(o)},n.prototype.and=function(o){return this.length>o.length?this.clone().iand(o):o.clone().iand(this)},n.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},n.prototype.iuxor=function(o){var u,d;this.length>o.length?(u=this,d=o):(u=o,d=this);for(var g=0;g<d.length;g++)this.words[g]=u.words[g]^d.words[g];if(this!==u)for(;g<u.length;g++)this.words[g]=u.words[g];return this.length=u.length,this._strip()},n.prototype.ixor=function(o){return r((this.negative|o.negative)===0),this.iuxor(o)},n.prototype.xor=function(o){return this.length>o.length?this.clone().ixor(o):o.clone().ixor(this)},n.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},n.prototype.inotn=function(o){r(typeof o=="number"&&o>=0);var u=Math.ceil(o/26)|0,d=o%26;this._expand(u),d>0&&u--;for(var g=0;g<u;g++)this.words[g]=~this.words[g]&67108863;return d>0&&(this.words[g]=~this.words[g]&67108863>>26-d),this._strip()},n.prototype.notn=function(o){return this.clone().inotn(o)},n.prototype.setn=function(o,u){r(typeof o=="number"&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),u?this.words[d]=this.words[d]|1<<g:this.words[d]=this.words[d]&~(1<<g),this._strip()},n.prototype.iadd=function(o){var u;if(this.negative!==0&&o.negative===0)return this.negative=0,u=this.isub(o),this.negative^=1,this._normSign();if(this.negative===0&&o.negative!==0)return o.negative=0,u=this.isub(o),o.negative=1,u._normSign();var d,g;this.length>o.length?(d=this,g=o):(d=o,g=this);for(var p=0,s=0;s<g.length;s++)u=(d.words[s]|0)+(g.words[s]|0)+p,this.words[s]=u&67108863,p=u>>>26;for(;p!==0&&s<d.length;s++)u=(d.words[s]|0)+p,this.words[s]=u&67108863,p=u>>>26;if(this.length=d.length,p!==0)this.words[this.length]=p,this.length++;else if(d!==this)for(;s<d.length;s++)this.words[s]=d.words[s];return this},n.prototype.add=function(o){var u;return o.negative!==0&&this.negative===0?(o.negative=0,u=this.sub(o),o.negative^=1,u):o.negative===0&&this.negative!==0?(this.negative=0,u=o.sub(this),this.negative=1,u):this.length>o.length?this.clone().iadd(o):o.clone().iadd(this)},n.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var d=this.cmp(o);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,p;d>0?(g=this,p=o):(g=o,p=this);for(var s=0,m=0;m<p.length;m++)u=(g.words[m]|0)-(p.words[m]|0)+s,s=u>>26,this.words[m]=u&67108863;for(;s!==0&&m<g.length;m++)u=(g.words[m]|0)+s,s=u>>26,this.words[m]=u&67108863;if(s===0&&m<g.length&&g!==this)for(;m<g.length;m++)this.words[m]=g.words[m];return this.length=Math.max(this.length,m),g!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(o){return this.clone().isub(o)};function ke(l,o,u){u.negative=o.negative^l.negative;var d=l.length+o.length|0;u.length=d,d=d-1|0;var g=l.words[0]|0,p=o.words[0]|0,s=g*p,m=s&67108863,_=s/67108864|0;u.words[0]=m;for(var c=1;c<d;c++){for(var x=_>>>26,O=_&67108863,N=Math.min(c,o.length-1),D=Math.max(0,c-l.length+1);D<=N;D++){var W=c-D|0;g=l.words[W]|0,p=o.words[D]|0,s=g*p+O,x+=s/67108864|0,O=s&67108863}u.words[c]=O|0,_=x|0}return _!==0?u.words[c]=_|0:u.length--,u._strip()}var V=function(o,u,d){var g=o.words,p=u.words,s=d.words,m=0,_,c,x,O=g[0]|0,N=O&8191,D=O>>>13,W=g[1]|0,K=W&8191,G=W>>>13,Mt=g[2]|0,$=Mt&8191,z=Mt>>>13,en=g[3]|0,J=en&8191,Q=en>>>13,tn=g[4]|0,ee=tn&8191,te=tn>>>13,rn=g[5]|0,re=rn&8191,ie=rn>>>13,nn=g[6]|0,ne=nn&8191,oe=nn>>>13,on=g[7]|0,ae=on&8191,fe=on>>>13,an=g[8]|0,se=an&8191,ue=an>>>13,fn=g[9]|0,he=fn&8191,le=fn>>>13,sn=p[0]|0,ce=sn&8191,de=sn>>>13,un=p[1]|0,pe=un&8191,ve=un>>>13,hn=p[2]|0,ye=hn&8191,ge=hn>>>13,ln=p[3]|0,me=ln&8191,be=ln>>>13,cn=p[4]|0,we=cn&8191,_e=cn>>>13,dn=p[5]|0,xe=dn&8191,Me=dn>>>13,pn=p[6]|0,Ee=pn&8191,Se=pn>>>13,vn=p[7]|0,Be=vn&8191,Ae=vn>>>13,yn=p[8]|0,Re=yn&8191,qe=yn>>>13,di=p[9]|0,Ke=di&8191,We=di>>>13;d.negative=o.negative^u.negative,d.length=19,_=Math.imul(N,ce),c=Math.imul(N,de),c=c+Math.imul(D,ce)|0,x=Math.imul(D,de);var wr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(wr>>>26)|0,wr&=67108863,_=Math.imul(K,ce),c=Math.imul(K,de),c=c+Math.imul(G,ce)|0,x=Math.imul(G,de),_=_+Math.imul(N,pe)|0,c=c+Math.imul(N,ve)|0,c=c+Math.imul(D,pe)|0,x=x+Math.imul(D,ve)|0;var _r=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(_r>>>26)|0,_r&=67108863,_=Math.imul($,ce),c=Math.imul($,de),c=c+Math.imul(z,ce)|0,x=Math.imul(z,de),_=_+Math.imul(K,pe)|0,c=c+Math.imul(K,ve)|0,c=c+Math.imul(G,pe)|0,x=x+Math.imul(G,ve)|0,_=_+Math.imul(N,ye)|0,c=c+Math.imul(N,ge)|0,c=c+Math.imul(D,ye)|0,x=x+Math.imul(D,ge)|0;var xr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(xr>>>26)|0,xr&=67108863,_=Math.imul(J,ce),c=Math.imul(J,de),c=c+Math.imul(Q,ce)|0,x=Math.imul(Q,de),_=_+Math.imul($,pe)|0,c=c+Math.imul($,ve)|0,c=c+Math.imul(z,pe)|0,x=x+Math.imul(z,ve)|0,_=_+Math.imul(K,ye)|0,c=c+Math.imul(K,ge)|0,c=c+Math.imul(G,ye)|0,x=x+Math.imul(G,ge)|0,_=_+Math.imul(N,me)|0,c=c+Math.imul(N,be)|0,c=c+Math.imul(D,me)|0,x=x+Math.imul(D,be)|0;var Mr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,_=Math.imul(ee,ce),c=Math.imul(ee,de),c=c+Math.imul(te,ce)|0,x=Math.imul(te,de),_=_+Math.imul(J,pe)|0,c=c+Math.imul(J,ve)|0,c=c+Math.imul(Q,pe)|0,x=x+Math.imul(Q,ve)|0,_=_+Math.imul($,ye)|0,c=c+Math.imul($,ge)|0,c=c+Math.imul(z,ye)|0,x=x+Math.imul(z,ge)|0,_=_+Math.imul(K,me)|0,c=c+Math.imul(K,be)|0,c=c+Math.imul(G,me)|0,x=x+Math.imul(G,be)|0,_=_+Math.imul(N,we)|0,c=c+Math.imul(N,_e)|0,c=c+Math.imul(D,we)|0,x=x+Math.imul(D,_e)|0;var Er=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Er>>>26)|0,Er&=67108863,_=Math.imul(re,ce),c=Math.imul(re,de),c=c+Math.imul(ie,ce)|0,x=Math.imul(ie,de),_=_+Math.imul(ee,pe)|0,c=c+Math.imul(ee,ve)|0,c=c+Math.imul(te,pe)|0,x=x+Math.imul(te,ve)|0,_=_+Math.imul(J,ye)|0,c=c+Math.imul(J,ge)|0,c=c+Math.imul(Q,ye)|0,x=x+Math.imul(Q,ge)|0,_=_+Math.imul($,me)|0,c=c+Math.imul($,be)|0,c=c+Math.imul(z,me)|0,x=x+Math.imul(z,be)|0,_=_+Math.imul(K,we)|0,c=c+Math.imul(K,_e)|0,c=c+Math.imul(G,we)|0,x=x+Math.imul(G,_e)|0,_=_+Math.imul(N,xe)|0,c=c+Math.imul(N,Me)|0,c=c+Math.imul(D,xe)|0,x=x+Math.imul(D,Me)|0;var Sr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,_=Math.imul(ne,ce),c=Math.imul(ne,de),c=c+Math.imul(oe,ce)|0,x=Math.imul(oe,de),_=_+Math.imul(re,pe)|0,c=c+Math.imul(re,ve)|0,c=c+Math.imul(ie,pe)|0,x=x+Math.imul(ie,ve)|0,_=_+Math.imul(ee,ye)|0,c=c+Math.imul(ee,ge)|0,c=c+Math.imul(te,ye)|0,x=x+Math.imul(te,ge)|0,_=_+Math.imul(J,me)|0,c=c+Math.imul(J,be)|0,c=c+Math.imul(Q,me)|0,x=x+Math.imul(Q,be)|0,_=_+Math.imul($,we)|0,c=c+Math.imul($,_e)|0,c=c+Math.imul(z,we)|0,x=x+Math.imul(z,_e)|0,_=_+Math.imul(K,xe)|0,c=c+Math.imul(K,Me)|0,c=c+Math.imul(G,xe)|0,x=x+Math.imul(G,Me)|0,_=_+Math.imul(N,Ee)|0,c=c+Math.imul(N,Se)|0,c=c+Math.imul(D,Ee)|0,x=x+Math.imul(D,Se)|0;var Br=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Br>>>26)|0,Br&=67108863,_=Math.imul(ae,ce),c=Math.imul(ae,de),c=c+Math.imul(fe,ce)|0,x=Math.imul(fe,de),_=_+Math.imul(ne,pe)|0,c=c+Math.imul(ne,ve)|0,c=c+Math.imul(oe,pe)|0,x=x+Math.imul(oe,ve)|0,_=_+Math.imul(re,ye)|0,c=c+Math.imul(re,ge)|0,c=c+Math.imul(ie,ye)|0,x=x+Math.imul(ie,ge)|0,_=_+Math.imul(ee,me)|0,c=c+Math.imul(ee,be)|0,c=c+Math.imul(te,me)|0,x=x+Math.imul(te,be)|0,_=_+Math.imul(J,we)|0,c=c+Math.imul(J,_e)|0,c=c+Math.imul(Q,we)|0,x=x+Math.imul(Q,_e)|0,_=_+Math.imul($,xe)|0,c=c+Math.imul($,Me)|0,c=c+Math.imul(z,xe)|0,x=x+Math.imul(z,Me)|0,_=_+Math.imul(K,Ee)|0,c=c+Math.imul(K,Se)|0,c=c+Math.imul(G,Ee)|0,x=x+Math.imul(G,Se)|0,_=_+Math.imul(N,Be)|0,c=c+Math.imul(N,Ae)|0,c=c+Math.imul(D,Be)|0,x=x+Math.imul(D,Ae)|0;var Ar=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,_=Math.imul(se,ce),c=Math.imul(se,de),c=c+Math.imul(ue,ce)|0,x=Math.imul(ue,de),_=_+Math.imul(ae,pe)|0,c=c+Math.imul(ae,ve)|0,c=c+Math.imul(fe,pe)|0,x=x+Math.imul(fe,ve)|0,_=_+Math.imul(ne,ye)|0,c=c+Math.imul(ne,ge)|0,c=c+Math.imul(oe,ye)|0,x=x+Math.imul(oe,ge)|0,_=_+Math.imul(re,me)|0,c=c+Math.imul(re,be)|0,c=c+Math.imul(ie,me)|0,x=x+Math.imul(ie,be)|0,_=_+Math.imul(ee,we)|0,c=c+Math.imul(ee,_e)|0,c=c+Math.imul(te,we)|0,x=x+Math.imul(te,_e)|0,_=_+Math.imul(J,xe)|0,c=c+Math.imul(J,Me)|0,c=c+Math.imul(Q,xe)|0,x=x+Math.imul(Q,Me)|0,_=_+Math.imul($,Ee)|0,c=c+Math.imul($,Se)|0,c=c+Math.imul(z,Ee)|0,x=x+Math.imul(z,Se)|0,_=_+Math.imul(K,Be)|0,c=c+Math.imul(K,Ae)|0,c=c+Math.imul(G,Be)|0,x=x+Math.imul(G,Ae)|0,_=_+Math.imul(N,Re)|0,c=c+Math.imul(N,qe)|0,c=c+Math.imul(D,Re)|0,x=x+Math.imul(D,qe)|0;var Rr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,_=Math.imul(he,ce),c=Math.imul(he,de),c=c+Math.imul(le,ce)|0,x=Math.imul(le,de),_=_+Math.imul(se,pe)|0,c=c+Math.imul(se,ve)|0,c=c+Math.imul(ue,pe)|0,x=x+Math.imul(ue,ve)|0,_=_+Math.imul(ae,ye)|0,c=c+Math.imul(ae,ge)|0,c=c+Math.imul(fe,ye)|0,x=x+Math.imul(fe,ge)|0,_=_+Math.imul(ne,me)|0,c=c+Math.imul(ne,be)|0,c=c+Math.imul(oe,me)|0,x=x+Math.imul(oe,be)|0,_=_+Math.imul(re,we)|0,c=c+Math.imul(re,_e)|0,c=c+Math.imul(ie,we)|0,x=x+Math.imul(ie,_e)|0,_=_+Math.imul(ee,xe)|0,c=c+Math.imul(ee,Me)|0,c=c+Math.imul(te,xe)|0,x=x+Math.imul(te,Me)|0,_=_+Math.imul(J,Ee)|0,c=c+Math.imul(J,Se)|0,c=c+Math.imul(Q,Ee)|0,x=x+Math.imul(Q,Se)|0,_=_+Math.imul($,Be)|0,c=c+Math.imul($,Ae)|0,c=c+Math.imul(z,Be)|0,x=x+Math.imul(z,Ae)|0,_=_+Math.imul(K,Re)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(G,Re)|0,x=x+Math.imul(G,qe)|0,_=_+Math.imul(N,Ke)|0,c=c+Math.imul(N,We)|0,c=c+Math.imul(D,Ke)|0,x=x+Math.imul(D,We)|0;var qr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(qr>>>26)|0,qr&=67108863,_=Math.imul(he,pe),c=Math.imul(he,ve),c=c+Math.imul(le,pe)|0,x=Math.imul(le,ve),_=_+Math.imul(se,ye)|0,c=c+Math.imul(se,ge)|0,c=c+Math.imul(ue,ye)|0,x=x+Math.imul(ue,ge)|0,_=_+Math.imul(ae,me)|0,c=c+Math.imul(ae,be)|0,c=c+Math.imul(fe,me)|0,x=x+Math.imul(fe,be)|0,_=_+Math.imul(ne,we)|0,c=c+Math.imul(ne,_e)|0,c=c+Math.imul(oe,we)|0,x=x+Math.imul(oe,_e)|0,_=_+Math.imul(re,xe)|0,c=c+Math.imul(re,Me)|0,c=c+Math.imul(ie,xe)|0,x=x+Math.imul(ie,Me)|0,_=_+Math.imul(ee,Ee)|0,c=c+Math.imul(ee,Se)|0,c=c+Math.imul(te,Ee)|0,x=x+Math.imul(te,Se)|0,_=_+Math.imul(J,Be)|0,c=c+Math.imul(J,Ae)|0,c=c+Math.imul(Q,Be)|0,x=x+Math.imul(Q,Ae)|0,_=_+Math.imul($,Re)|0,c=c+Math.imul($,qe)|0,c=c+Math.imul(z,Re)|0,x=x+Math.imul(z,qe)|0,_=_+Math.imul(K,Ke)|0,c=c+Math.imul(K,We)|0,c=c+Math.imul(G,Ke)|0,x=x+Math.imul(G,We)|0;var Tr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,_=Math.imul(he,ye),c=Math.imul(he,ge),c=c+Math.imul(le,ye)|0,x=Math.imul(le,ge),_=_+Math.imul(se,me)|0,c=c+Math.imul(se,be)|0,c=c+Math.imul(ue,me)|0,x=x+Math.imul(ue,be)|0,_=_+Math.imul(ae,we)|0,c=c+Math.imul(ae,_e)|0,c=c+Math.imul(fe,we)|0,x=x+Math.imul(fe,_e)|0,_=_+Math.imul(ne,xe)|0,c=c+Math.imul(ne,Me)|0,c=c+Math.imul(oe,xe)|0,x=x+Math.imul(oe,Me)|0,_=_+Math.imul(re,Ee)|0,c=c+Math.imul(re,Se)|0,c=c+Math.imul(ie,Ee)|0,x=x+Math.imul(ie,Se)|0,_=_+Math.imul(ee,Be)|0,c=c+Math.imul(ee,Ae)|0,c=c+Math.imul(te,Be)|0,x=x+Math.imul(te,Ae)|0,_=_+Math.imul(J,Re)|0,c=c+Math.imul(J,qe)|0,c=c+Math.imul(Q,Re)|0,x=x+Math.imul(Q,qe)|0,_=_+Math.imul($,Ke)|0,c=c+Math.imul($,We)|0,c=c+Math.imul(z,Ke)|0,x=x+Math.imul(z,We)|0;var Ir=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,_=Math.imul(he,me),c=Math.imul(he,be),c=c+Math.imul(le,me)|0,x=Math.imul(le,be),_=_+Math.imul(se,we)|0,c=c+Math.imul(se,_e)|0,c=c+Math.imul(ue,we)|0,x=x+Math.imul(ue,_e)|0,_=_+Math.imul(ae,xe)|0,c=c+Math.imul(ae,Me)|0,c=c+Math.imul(fe,xe)|0,x=x+Math.imul(fe,Me)|0,_=_+Math.imul(ne,Ee)|0,c=c+Math.imul(ne,Se)|0,c=c+Math.imul(oe,Ee)|0,x=x+Math.imul(oe,Se)|0,_=_+Math.imul(re,Be)|0,c=c+Math.imul(re,Ae)|0,c=c+Math.imul(ie,Be)|0,x=x+Math.imul(ie,Ae)|0,_=_+Math.imul(ee,Re)|0,c=c+Math.imul(ee,qe)|0,c=c+Math.imul(te,Re)|0,x=x+Math.imul(te,qe)|0,_=_+Math.imul(J,Ke)|0,c=c+Math.imul(J,We)|0,c=c+Math.imul(Q,Ke)|0,x=x+Math.imul(Q,We)|0;var kr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(kr>>>26)|0,kr&=67108863,_=Math.imul(he,we),c=Math.imul(he,_e),c=c+Math.imul(le,we)|0,x=Math.imul(le,_e),_=_+Math.imul(se,xe)|0,c=c+Math.imul(se,Me)|0,c=c+Math.imul(ue,xe)|0,x=x+Math.imul(ue,Me)|0,_=_+Math.imul(ae,Ee)|0,c=c+Math.imul(ae,Se)|0,c=c+Math.imul(fe,Ee)|0,x=x+Math.imul(fe,Se)|0,_=_+Math.imul(ne,Be)|0,c=c+Math.imul(ne,Ae)|0,c=c+Math.imul(oe,Be)|0,x=x+Math.imul(oe,Ae)|0,_=_+Math.imul(re,Re)|0,c=c+Math.imul(re,qe)|0,c=c+Math.imul(ie,Re)|0,x=x+Math.imul(ie,qe)|0,_=_+Math.imul(ee,Ke)|0,c=c+Math.imul(ee,We)|0,c=c+Math.imul(te,Ke)|0,x=x+Math.imul(te,We)|0;var Cr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,_=Math.imul(he,xe),c=Math.imul(he,Me),c=c+Math.imul(le,xe)|0,x=Math.imul(le,Me),_=_+Math.imul(se,Ee)|0,c=c+Math.imul(se,Se)|0,c=c+Math.imul(ue,Ee)|0,x=x+Math.imul(ue,Se)|0,_=_+Math.imul(ae,Be)|0,c=c+Math.imul(ae,Ae)|0,c=c+Math.imul(fe,Be)|0,x=x+Math.imul(fe,Ae)|0,_=_+Math.imul(ne,Re)|0,c=c+Math.imul(ne,qe)|0,c=c+Math.imul(oe,Re)|0,x=x+Math.imul(oe,qe)|0,_=_+Math.imul(re,Ke)|0,c=c+Math.imul(re,We)|0,c=c+Math.imul(ie,Ke)|0,x=x+Math.imul(ie,We)|0;var Or=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Or>>>26)|0,Or&=67108863,_=Math.imul(he,Ee),c=Math.imul(he,Se),c=c+Math.imul(le,Ee)|0,x=Math.imul(le,Se),_=_+Math.imul(se,Be)|0,c=c+Math.imul(se,Ae)|0,c=c+Math.imul(ue,Be)|0,x=x+Math.imul(ue,Ae)|0,_=_+Math.imul(ae,Re)|0,c=c+Math.imul(ae,qe)|0,c=c+Math.imul(fe,Re)|0,x=x+Math.imul(fe,qe)|0,_=_+Math.imul(ne,Ke)|0,c=c+Math.imul(ne,We)|0,c=c+Math.imul(oe,Ke)|0,x=x+Math.imul(oe,We)|0;var Pr=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,_=Math.imul(he,Be),c=Math.imul(he,Ae),c=c+Math.imul(le,Be)|0,x=Math.imul(le,Ae),_=_+Math.imul(se,Re)|0,c=c+Math.imul(se,qe)|0,c=c+Math.imul(ue,Re)|0,x=x+Math.imul(ue,qe)|0,_=_+Math.imul(ae,Ke)|0,c=c+Math.imul(ae,We)|0,c=c+Math.imul(fe,Ke)|0,x=x+Math.imul(fe,We)|0;var uf=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(uf>>>26)|0,uf&=67108863,_=Math.imul(he,Re),c=Math.imul(he,qe),c=c+Math.imul(le,Re)|0,x=Math.imul(le,qe),_=_+Math.imul(se,Ke)|0,c=c+Math.imul(se,We)|0,c=c+Math.imul(ue,Ke)|0,x=x+Math.imul(ue,We)|0;var hf=(m+_|0)+((c&8191)<<13)|0;m=(x+(c>>>13)|0)+(hf>>>26)|0,hf&=67108863,_=Math.imul(he,Ke),c=Math.imul(he,We),c=c+Math.imul(le,Ke)|0,x=Math.imul(le,We);var lf=(m+_|0)+((c&8191)<<13)|0;return m=(x+(c>>>13)|0)+(lf>>>26)|0,lf&=67108863,s[0]=wr,s[1]=_r,s[2]=xr,s[3]=Mr,s[4]=Er,s[5]=Sr,s[6]=Br,s[7]=Ar,s[8]=Rr,s[9]=qr,s[10]=Tr,s[11]=Ir,s[12]=kr,s[13]=Cr,s[14]=Or,s[15]=Pr,s[16]=uf,s[17]=hf,s[18]=lf,m!==0&&(s[19]=m,d.length++),d};Math.imul||(V=ke);function Y(l,o,u){u.negative=o.negative^l.negative,u.length=l.length+o.length;for(var d=0,g=0,p=0;p<u.length-1;p++){var s=g;g=0;for(var m=d&67108863,_=Math.min(p,o.length-1),c=Math.max(0,p-l.length+1);c<=_;c++){var x=p-c,O=l.words[x]|0,N=o.words[c]|0,D=O*N,W=D&67108863;s=s+(D/67108864|0)|0,W=W+m|0,m=W&67108863,s=s+(W>>>26)|0,g+=s>>>26,s&=67108863}u.words[p]=m,d=s,s=g}return d!==0?u.words[p]=d:u.length--,u._strip()}function He(l,o,u){return Y(l,o,u)}n.prototype.mulTo=function(o,u){var d,g=this.length+o.length;return this.length===10&&o.length===10?d=V(this,o,u):g<63?d=ke(this,o,u):g<1024?d=Y(this,o,u):d=He(this,o,u),d};function T(l,o){this.x=l,this.y=o}T.prototype.makeRBT=function(o){for(var u=new Array(o),d=n.prototype._countBits(o)-1,g=0;g<o;g++)u[g]=this.revBin(g,d,o);return u},T.prototype.revBin=function(o,u,d){if(o===0||o===d-1)return o;for(var g=0,p=0;p<u;p++)g|=(o&1)<<u-p-1,o>>=1;return g},T.prototype.permute=function(o,u,d,g,p,s){for(var m=0;m<s;m++)g[m]=u[o[m]],p[m]=d[o[m]]},T.prototype.transform=function(o,u,d,g,p,s){this.permute(s,o,u,d,g,p);for(var m=1;m<p;m<<=1)for(var _=m<<1,c=Math.cos(2*Math.PI/_),x=Math.sin(2*Math.PI/_),O=0;O<p;O+=_)for(var N=c,D=x,W=0;W<m;W++){var K=d[O+W],G=g[O+W],Mt=d[O+W+m],$=g[O+W+m],z=N*Mt-D*$;$=N*$+D*Mt,Mt=z,d[O+W]=K+Mt,g[O+W]=G+$,d[O+W+m]=K-Mt,g[O+W+m]=G-$,W!==_&&(z=c*N-x*D,D=c*D+x*N,N=z)}},T.prototype.guessLen13b=function(o,u){var d=Math.max(u,o)|1,g=d&1,p=0;for(d=d/2|0;d;d=d>>>1)p++;return 1<<p+1+g},T.prototype.conjugate=function(o,u,d){if(!(d<=1))for(var g=0;g<d/2;g++){var p=o[g];o[g]=o[d-g-1],o[d-g-1]=p,p=u[g],u[g]=-u[d-g-1],u[d-g-1]=-p}},T.prototype.normalize13b=function(o,u){for(var d=0,g=0;g<u/2;g++){var p=Math.round(o[2*g+1]/u)*8192+Math.round(o[2*g]/u)+d;o[g]=p&67108863,p<67108864?d=0:d=p/67108864|0}return o},T.prototype.convert13b=function(o,u,d,g){for(var p=0,s=0;s<u;s++)p=p+(o[s]|0),d[2*s]=p&8191,p=p>>>13,d[2*s+1]=p&8191,p=p>>>13;for(s=2*u;s<g;++s)d[s]=0;r(p===0),r((p&-8192)===0)},T.prototype.stub=function(o){for(var u=new Array(o),d=0;d<o;d++)u[d]=0;return u},T.prototype.mulp=function(o,u,d){var g=2*this.guessLen13b(o.length,u.length),p=this.makeRBT(g),s=this.stub(g),m=new Array(g),_=new Array(g),c=new Array(g),x=new Array(g),O=new Array(g),N=new Array(g),D=d.words;D.length=g,this.convert13b(o.words,o.length,m,g),this.convert13b(u.words,u.length,x,g),this.transform(m,s,_,c,g,p),this.transform(x,s,O,N,g,p);for(var W=0;W<g;W++){var K=_[W]*O[W]-c[W]*N[W];c[W]=_[W]*N[W]+c[W]*O[W],_[W]=K}return this.conjugate(_,c,g),this.transform(_,c,D,s,g,p),this.conjugate(D,s,g),this.normalize13b(D,g),d.negative=o.negative^u.negative,d.length=o.length+u.length,d._strip()},n.prototype.mul=function(o){var u=new n(null);return u.words=new Array(this.length+o.length),this.mulTo(o,u)},n.prototype.mulf=function(o){var u=new n(null);return u.words=new Array(this.length+o.length),He(this,o,u)},n.prototype.imul=function(o){return this.clone().mulTo(o,this)},n.prototype.imuln=function(o){var u=o<0;u&&(o=-o),r(typeof o=="number"),r(o<67108864);for(var d=0,g=0;g<this.length;g++){var p=(this.words[g]|0)*o,s=(p&67108863)+(d&67108863);d>>=26,d+=p/67108864|0,d+=s>>>26,this.words[g]=s&67108863}return d!==0&&(this.words[g]=d,this.length++),this.length=o===0?1:this.length,u?this.ineg():this},n.prototype.muln=function(o){return this.clone().imuln(o)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(o){var u=Z(o);if(u.length===0)return new n(1);for(var d=this,g=0;g<u.length&&u[g]===0;g++,d=d.sqr());if(++g<u.length)for(var p=d.sqr();g<u.length;g++,p=p.sqr())u[g]!==0&&(d=d.mul(p));return d},n.prototype.iushln=function(o){r(typeof o=="number"&&o>=0);var u=o%26,d=(o-u)/26,g=67108863>>>26-u<<26-u,p;if(u!==0){var s=0;for(p=0;p<this.length;p++){var m=this.words[p]&g,_=(this.words[p]|0)-m<<u;this.words[p]=_|s,s=m>>>26-u}s&&(this.words[p]=s,this.length++)}if(d!==0){for(p=this.length-1;p>=0;p--)this.words[p+d]=this.words[p];for(p=0;p<d;p++)this.words[p]=0;this.length+=d}return this._strip()},n.prototype.ishln=function(o){return r(this.negative===0),this.iushln(o)},n.prototype.iushrn=function(o,u,d){r(typeof o=="number"&&o>=0);var g;u?g=(u-u%26)/26:g=0;var p=o%26,s=Math.min((o-p)/26,this.length),m=67108863^67108863>>>p<<p,_=d;if(g-=s,g=Math.max(0,g),_){for(var c=0;c<s;c++)_.words[c]=this.words[c];_.length=s}if(s!==0)if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var x=0;for(c=this.length-1;c>=0&&(x!==0||c>=g);c--){var O=this.words[c]|0;this.words[c]=x<<26-p|O>>>p,x=O&m}return _&&x!==0&&(_.words[_.length++]=x),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(o,u,d){return r(this.negative===0),this.iushrn(o,u,d)},n.prototype.shln=function(o){return this.clone().ishln(o)},n.prototype.ushln=function(o){return this.clone().iushln(o)},n.prototype.shrn=function(o){return this.clone().ishrn(o)},n.prototype.ushrn=function(o){return this.clone().iushrn(o)},n.prototype.testn=function(o){r(typeof o=="number"&&o>=0);var u=o%26,d=(o-u)/26,g=1<<u;if(this.length<=d)return!1;var p=this.words[d];return!!(p&g)},n.prototype.imaskn=function(o){r(typeof o=="number"&&o>=0);var u=o%26,d=(o-u)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(u!==0&&d++,this.length=Math.min(d,this.length),u!==0){var g=67108863^67108863>>>u<<u;this.words[this.length-1]&=g}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(o){return this.clone().imaskn(o)},n.prototype.iaddn=function(o){return r(typeof o=="number"),r(o<67108864),o<0?this.isubn(-o):this.negative!==0?this.length===1&&(this.words[0]|0)<=o?(this.words[0]=o-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(o),this.negative=1,this):this._iaddn(o)},n.prototype._iaddn=function(o){this.words[0]+=o;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},n.prototype.isubn=function(o){if(r(typeof o=="number"),r(o<67108864),o<0)return this.iaddn(-o);if(this.negative!==0)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this._strip()},n.prototype.addn=function(o){return this.clone().iaddn(o)},n.prototype.subn=function(o){return this.clone().isubn(o)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(o,u,d){var g=o.length+d,p;this._expand(g);var s,m=0;for(p=0;p<o.length;p++){s=(this.words[p+d]|0)+m;var _=(o.words[p]|0)*u;s-=_&67108863,m=(s>>26)-(_/67108864|0),this.words[p+d]=s&67108863}for(;p<this.length-d;p++)s=(this.words[p+d]|0)+m,m=s>>26,this.words[p+d]=s&67108863;if(m===0)return this._strip();for(r(m===-1),m=0,p=0;p<this.length;p++)s=-(this.words[p]|0)+m,m=s>>26,this.words[p]=s&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(o,u){var d=this.length-o.length,g=this.clone(),p=o,s=p.words[p.length-1]|0,m=this._countBits(s);d=26-m,d!==0&&(p=p.ushln(d),g.iushln(d),s=p.words[p.length-1]|0);var _=g.length-p.length,c;if(u!=="mod"){c=new n(null),c.length=_+1,c.words=new Array(c.length);for(var x=0;x<c.length;x++)c.words[x]=0}var O=g.clone()._ishlnsubmul(p,1,_);O.negative===0&&(g=O,c&&(c.words[_]=1));for(var N=_-1;N>=0;N--){var D=(g.words[p.length+N]|0)*67108864+(g.words[p.length+N-1]|0);for(D=Math.min(D/s|0,67108863),g._ishlnsubmul(p,D,N);g.negative!==0;)D--,g.negative=0,g._ishlnsubmul(p,1,N),g.isZero()||(g.negative^=1);c&&(c.words[N]=D)}return c&&c._strip(),g._strip(),u!=="div"&&d!==0&&g.iushrn(d),{div:c||null,mod:g}},n.prototype.divmod=function(o,u,d){if(r(!o.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,p,s;return this.negative!==0&&o.negative===0?(s=this.neg().divmod(o,u),u!=="mod"&&(g=s.div.neg()),u!=="div"&&(p=s.mod.neg(),d&&p.negative!==0&&p.iadd(o)),{div:g,mod:p}):this.negative===0&&o.negative!==0?(s=this.divmod(o.neg(),u),u!=="mod"&&(g=s.div.neg()),{div:g,mod:s.mod}):(this.negative&o.negative)!==0?(s=this.neg().divmod(o.neg(),u),u!=="div"&&(p=s.mod.neg(),d&&p.negative!==0&&p.isub(o)),{div:s.div,mod:p}):o.length>this.length||this.cmp(o)<0?{div:new n(0),mod:this}:o.length===1?u==="div"?{div:this.divn(o.words[0]),mod:null}:u==="mod"?{div:null,mod:new n(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new n(this.modrn(o.words[0]))}:this._wordDiv(o,u)},n.prototype.div=function(o){return this.divmod(o,"div",!1).div},n.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},n.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},n.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var d=u.div.negative!==0?u.mod.isub(o):u.mod,g=o.ushrn(1),p=o.andln(1),s=d.cmp(g);return s<0||p===1&&s===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},n.prototype.modrn=function(o){var u=o<0;u&&(o=-o),r(o<=67108863);for(var d=(1<<26)%o,g=0,p=this.length-1;p>=0;p--)g=(d*g+(this.words[p]|0))%o;return u?-g:g},n.prototype.modn=function(o){return this.modrn(o)},n.prototype.idivn=function(o){var u=o<0;u&&(o=-o),r(o<=67108863);for(var d=0,g=this.length-1;g>=0;g--){var p=(this.words[g]|0)+d*67108864;this.words[g]=p/o|0,d=p%o}return this._strip(),u?this.ineg():this},n.prototype.divn=function(o){return this.clone().idivn(o)},n.prototype.egcd=function(o){r(o.negative===0),r(!o.isZero());var u=this,d=o.clone();u.negative!==0?u=u.umod(o):u=u.clone();for(var g=new n(1),p=new n(0),s=new n(0),m=new n(1),_=0;u.isEven()&&d.isEven();)u.iushrn(1),d.iushrn(1),++_;for(var c=d.clone(),x=u.clone();!u.isZero();){for(var O=0,N=1;(u.words[0]&N)===0&&O<26;++O,N<<=1);if(O>0)for(u.iushrn(O);O-- >0;)(g.isOdd()||p.isOdd())&&(g.iadd(c),p.isub(x)),g.iushrn(1),p.iushrn(1);for(var D=0,W=1;(d.words[0]&W)===0&&D<26;++D,W<<=1);if(D>0)for(d.iushrn(D);D-- >0;)(s.isOdd()||m.isOdd())&&(s.iadd(c),m.isub(x)),s.iushrn(1),m.iushrn(1);u.cmp(d)>=0?(u.isub(d),g.isub(s),p.isub(m)):(d.isub(u),s.isub(g),m.isub(p))}return{a:s,b:m,gcd:d.iushln(_)}},n.prototype._invmp=function(o){r(o.negative===0),r(!o.isZero());var u=this,d=o.clone();u.negative!==0?u=u.umod(o):u=u.clone();for(var g=new n(1),p=new n(0),s=d.clone();u.cmpn(1)>0&&d.cmpn(1)>0;){for(var m=0,_=1;(u.words[0]&_)===0&&m<26;++m,_<<=1);if(m>0)for(u.iushrn(m);m-- >0;)g.isOdd()&&g.iadd(s),g.iushrn(1);for(var c=0,x=1;(d.words[0]&x)===0&&c<26;++c,x<<=1);if(c>0)for(d.iushrn(c);c-- >0;)p.isOdd()&&p.iadd(s),p.iushrn(1);u.cmp(d)>=0?(u.isub(d),g.isub(p)):(d.isub(u),p.isub(g))}var O;return u.cmpn(1)===0?O=g:O=p,O.cmpn(0)<0&&O.iadd(o),O},n.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),d=o.clone();u.negative=0,d.negative=0;for(var g=0;u.isEven()&&d.isEven();g++)u.iushrn(1),d.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;d.isEven();)d.iushrn(1);var p=u.cmp(d);if(p<0){var s=u;u=d,d=s}else if(p===0||d.cmpn(1)===0)break;u.isub(d)}while(!0);return d.iushln(g)},n.prototype.invm=function(o){return this.egcd(o).a.umod(o)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(o){return this.words[0]&o},n.prototype.bincn=function(o){r(typeof o=="number");var u=o%26,d=(o-u)/26,g=1<<u;if(this.length<=d)return this._expand(d+1),this.words[d]|=g,this;for(var p=g,s=d;p!==0&&s<this.length;s++){var m=this.words[s]|0;m+=p,p=m>>>26,m&=67108863,this.words[s]=m}return p!==0&&(this.words[s]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(o){var u=o<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this._strip();var d;if(this.length>1)d=1;else{u&&(o=-o),r(o<=67108863,"Number is too big");var g=this.words[0]|0;d=g===o?0:g<o?-1:1}return this.negative!==0?-d|0:d},n.prototype.cmp=function(o){if(this.negative!==0&&o.negative===0)return-1;if(this.negative===0&&o.negative!==0)return 1;var u=this.ucmp(o);return this.negative!==0?-u|0:u},n.prototype.ucmp=function(o){if(this.length>o.length)return 1;if(this.length<o.length)return-1;for(var u=0,d=this.length-1;d>=0;d--){var g=this.words[d]|0,p=o.words[d]|0;if(g!==p){g<p?u=-1:g>p&&(u=1);break}}return u},n.prototype.gtn=function(o){return this.cmpn(o)===1},n.prototype.gt=function(o){return this.cmp(o)===1},n.prototype.gten=function(o){return this.cmpn(o)>=0},n.prototype.gte=function(o){return this.cmp(o)>=0},n.prototype.ltn=function(o){return this.cmpn(o)===-1},n.prototype.lt=function(o){return this.cmp(o)===-1},n.prototype.lten=function(o){return this.cmpn(o)<=0},n.prototype.lte=function(o){return this.cmp(o)<=0},n.prototype.eqn=function(o){return this.cmpn(o)===0},n.prototype.eq=function(o){return this.cmp(o)===0},n.red=function(o){return new h(o)},n.prototype.toRed=function(o){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),o.convertTo(this)._forceRed(o)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(o){return this.red=o,this},n.prototype.forceRed=function(o){return r(!this.red,"Already a number in reduction context"),this._forceRed(o)},n.prototype.redAdd=function(o){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},n.prototype.redIAdd=function(o){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},n.prototype.redSub=function(o){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},n.prototype.redISub=function(o){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},n.prototype.redShl=function(o){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},n.prototype.redMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},n.prototype.redIMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(o){return r(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var C={k256:null,p224:null,p192:null,p25519:null};function U(l,o){this.name=l,this.p=new n(o,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}U.prototype._tmp=function(){var o=new n(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var u=o,d;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),d=u.bitLength();while(d>this.n);var g=d<this.n?-1:u.ucmp(this.p);return g===0?(u.words[0]=0,u.length=1):g>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},U.prototype.split=function(o,u){o.iushrn(this.n,0,u)},U.prototype.imulK=function(o){return o.imul(this.k)};function L(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(L,U),L.prototype.split=function(o,u){for(var d=4194303,g=Math.min(o.length,9),p=0;p<g;p++)u.words[p]=o.words[p];if(u.length=g,o.length<=9){o.words[0]=0,o.length=1;return}var s=o.words[9];for(u.words[u.length++]=s&d,p=10;p<o.length;p++){var m=o.words[p]|0;o.words[p-10]=(m&d)<<4|s>>>22,s=m}s>>>=22,o.words[p-10]=s,s===0&&o.length>10?o.length-=10:o.length-=9},L.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,d=0;d<o.length;d++){var g=o.words[d]|0;u+=g*977,o.words[d]=u&67108863,u=g*64+(u/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function F(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,U);function j(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(j,U);function M(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(M,U),M.prototype.imulK=function(o){for(var u=0,d=0;d<o.length;d++){var g=(o.words[d]|0)*19+u,p=g&67108863;g>>>=26,o.words[d]=p,u=g}return u!==0&&(o.words[o.length++]=u),o},n._prime=function(o){if(C[o])return C[o];var u;if(o==="k256")u=new L;else if(o==="p224")u=new F;else if(o==="p192")u=new j;else if(o==="p25519")u=new M;else throw new Error("Unknown prime "+o);return C[o]=u,u};function h(l){if(typeof l=="string"){var o=n._prime(l);this.m=o.p,this.prime=o}else r(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}h.prototype._verify1=function(o){r(o.negative===0,"red works only with positives"),r(o.red,"red works only with red numbers")},h.prototype._verify2=function(o,u){r((o.negative|u.negative)===0,"red works only with positives"),r(o.red&&o.red===u.red,"red works only with red numbers")},h.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(S(o,o.umod(this.m)._forceRed(this)),o)},h.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},h.prototype.add=function(o,u){this._verify2(o,u);var d=o.add(u);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},h.prototype.iadd=function(o,u){this._verify2(o,u);var d=o.iadd(u);return d.cmp(this.m)>=0&&d.isub(this.m),d},h.prototype.sub=function(o,u){this._verify2(o,u);var d=o.sub(u);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},h.prototype.isub=function(o,u){this._verify2(o,u);var d=o.isub(u);return d.cmpn(0)<0&&d.iadd(this.m),d},h.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},h.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},h.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},h.prototype.isqr=function(o){return this.imul(o,o.clone())},h.prototype.sqr=function(o){return this.mul(o,o)},h.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(r(u%2===1),u===3){var d=this.m.add(new n(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),p=0;!g.isZero()&&g.andln(1)===0;)p++,g.iushrn(1);r(!g.isZero());var s=new n(1).toRed(this),m=s.redNeg(),_=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new n(2*c*c).toRed(this);this.pow(c,_).cmp(m)!==0;)c.redIAdd(m);for(var x=this.pow(c,g),O=this.pow(o,g.addn(1).iushrn(1)),N=this.pow(o,g),D=p;N.cmp(s)!==0;){for(var W=N,K=0;W.cmp(s)!==0;K++)W=W.redSqr();r(K<D);var G=this.pow(x,new n(1).iushln(D-K-1));O=O.redMul(G),x=G.redSqr(),N=N.redMul(x),D=K}return O},h.prototype.invm=function(o){var u=o._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},h.prototype.pow=function(o,u){if(u.isZero())return new n(1).toRed(this);if(u.cmpn(1)===0)return o.clone();var d=4,g=new Array(1<<d);g[0]=new n(1).toRed(this),g[1]=o;for(var p=2;p<g.length;p++)g[p]=this.mul(g[p-1],o);var s=g[0],m=0,_=0,c=u.bitLength()%26;for(c===0&&(c=26),p=u.length-1;p>=0;p--){for(var x=u.words[p],O=c-1;O>=0;O--){var N=x>>O&1;if(s!==g[0]&&(s=this.sqr(s)),N===0&&m===0){_=0;continue}m<<=1,m|=N,_++,!(_!==d&&(p!==0||O!==0))&&(s=this.mul(s,g[m]),_=0,m=0)}c=26}return s},h.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},h.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},n.mont=function(o){return new v(o)};function v(l){h.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(v,h),v.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},v.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},v.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(u),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),s=p;return p.cmp(this.m)>=0?s=p.isub(this.m):p.cmpn(0)<0&&(s=p.iadd(this.m)),s._forceRed(this)},v.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new n(0)._forceRed(this);var d=o.mul(u),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),s=p;return p.cmp(this.m)>=0?s=p.isub(this.m):p.cmpn(0)<0&&(s=p.iadd(this.m)),s._forceRed(this)},v.prototype.invm=function(o){var u=this.imod(o._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(typeof lh>"u"||lh,lg)});var ch=B((oR,vg)=>{"use strict";w();var Qi=cg(),G4=Fr(),V4=Te().Buffer;function dg(t){var e=t.modulus.byteLength(),r;do r=new Qi(G4(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function $4(t){var e=dg(t),r=e.toRed(Qi.mont(t.modulus)).redPow(new Qi(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function pg(t,e){var r=$4(e),i=e.modulus.byteLength(),n=new Qi(t).mul(r.blinder).umod(e.modulus),a=n.toRed(Qi.mont(e.prime1)),f=n.toRed(Qi.mont(e.prime2)),y=e.coefficient,b=e.prime1,S=e.prime2,A=a.redPow(e.exponent1).fromRed(),q=f.redPow(e.exponent2).fromRed(),k=A.isub(q).imul(y).umod(b).imul(S);return q.iadd(k).imul(r.unblinder).umod(e.modulus).toArrayLike(V4,"be",i)}pg.getr=dg;vg.exports=pg});var bg=B((fR,mg)=>{w();var z4=ah(),dh=Fr(),Z4=Qn(),yg=sh(),gg=uh(),ph=gr(),Y4=hh(),X4=ch(),Ct=Te().Buffer;mg.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=z4(e),f;if(n===4)f=J4(a,r);else if(n===1)f=Q4(a,r,i);else if(n===3){if(f=new ph(r),f.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?X4(f,a):Y4(f,a)};function J4(t,e){var r=t.modulus.byteLength(),i=e.length,n=Z4("sha1").update(Ct.alloc(0)).digest(),a=n.length,f=2*a;if(i>r-f-2)throw new Error("message too long");var y=Ct.alloc(r-i-f-2),b=r-a-1,S=dh(a),A=gg(Ct.concat([n,y,Ct.alloc(1,1),e],b),yg(S,b)),q=gg(S,yg(A,a));return new ph(Ct.concat([Ct.alloc(1),q,A],r))}function Q4(t,e,r){var i=e.length,n=t.modulus.byteLength();if(i>n-11)throw new Error("message too long");var a;return r?a=Ct.alloc(n-i-3,255):a=eE(n-i-3),new ph(Ct.concat([Ct.from([0,r?1:2]),a,Ct.alloc(1),e],n))}function eE(t){for(var e=Ct.allocUnsafe(t),r=0,i=dh(t*2),n=0,a;r<t;)n===i.length&&(i=dh(t*2),n=0),a=i[n++],a&&(e[r++]=a);return e}});var Eg=B((uR,Mg)=>{w();var tE=ah(),wg=sh(),_g=uh(),xg=gr(),rE=ch(),iE=Qn(),nE=hh(),lo=Te().Buffer;Mg.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=tE(e),f=a.modulus.byteLength();if(r.length>f||new xg(r).cmp(a.modulus)>=0)throw new Error("decryption error");var y;i?y=nE(new xg(r),a):y=rE(r,a);var b=lo.alloc(f-y.length);if(y=lo.concat([b,y],f),n===4)return oE(a,y);if(n===1)return aE(a,y,i);if(n===3)return y;throw new Error("unknown padding")};function oE(t,e){var r=t.modulus.byteLength(),i=iE("sha1").update(lo.alloc(0)).digest(),n=i.length;if(e[0]!==0)throw new Error("decryption error");var a=e.slice(1,n+1),f=e.slice(n+1),y=_g(a,wg(f,n)),b=_g(f,wg(y,r-n-1));if(fE(i,b.slice(0,n)))throw new Error("decryption error");for(var S=n;b[S]===0;)S++;if(b[S++]!==1)throw new Error("decryption error");return b.slice(S)}function aE(t,e,r){for(var i=e.slice(0,2),n=2,a=0;e[n++]!==0;)if(n>=e.length){a++;break}var f=e.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&a++,f.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}function fE(t,e){t=lo.from(t),e=lo.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var n=-1;++n<i;)r+=t[n]^e[n];return r}});var Sg=B(ci=>{w();ci.publicEncrypt=bg();ci.privateDecrypt=Eg();ci.privateEncrypt=function(e,r){return ci.publicEncrypt(e,r,!0)};ci.publicDecrypt=function(e,r){return ci.privateDecrypt(e,r,!0)}});var Pg=B(co=>{"use strict";w();function Bg(){throw new Error(`secure random number generation not supported by this browser
|
|
15
|
+
use chrome, FireFox or Internet Explorer 11`)}var Rg=Te(),Ag=Fr(),qg=Rg.Buffer,Tg=Rg.kMaxLength,vh=globalThis.crypto||globalThis.msCrypto,Ig=Math.pow(2,32)-1;function kg(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>Ig||t<0)throw new TypeError("offset must be a uint32");if(t>Tg||t>e)throw new RangeError("offset out of range")}function Cg(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>Ig||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Tg)throw new RangeError("buffer too small")}vh&&vh.getRandomValues||!E.default.browser?(co.randomFill=sE,co.randomFillSync=uE):(co.randomFill=Bg,co.randomFillSync=Bg);function sE(t,e,r,i){if(!qg.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")i=e,e=0,r=t.length;else if(typeof r=="function")i=r,r=t.length-e;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return kg(e,t.length),Cg(r,e,t.length),Og(t,e,r,i)}function Og(t,e,r,i){if(E.default.browser){var n=t.buffer,a=new Uint8Array(n,e,r);if(vh.getRandomValues(a),i){E.default.nextTick(function(){i(null,t)});return}return t}if(i){Ag(r,function(y,b){if(y)return i(y);b.copy(t,e),i(null,t)});return}var f=Ag(r);return f.copy(t,e),t}function uE(t,e,r){if(typeof e>"u"&&(e=0),!qg.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return kg(e,t.length),r===void 0&&(r=t.length-e),Cg(r,e,t.length),Og(t,e,r)}});var Uu=B(Ie=>{"use strict";w();Ie.randomBytes=Ie.rng=Ie.pseudoRandomBytes=Ie.prng=Fr();Ie.createHash=Ie.Hash=Qn();Ie.createHmac=Ie.Hmac=Iv();var hE=Pa(),lE=Object.keys(hE),cE=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(lE);Ie.getHashes=function(){return cE};var Dg=pu();Ie.pbkdf2=Dg.pbkdf2;Ie.pbkdf2Sync=Dg.pbkdf2Sync;var Wt=r1();Ie.Cipher=Wt.Cipher;Ie.createCipher=Wt.createCipher;Ie.Cipheriv=Wt.Cipheriv;Ie.createCipheriv=Wt.createCipheriv;Ie.Decipher=Wt.Decipher;Ie.createDecipher=Wt.createDecipher;Ie.Decipheriv=Wt.Decipheriv;Ie.createDecipheriv=Wt.createDecipheriv;Ie.getCiphers=Wt.getCiphers;Ie.listCiphers=Wt.listCiphers;var po=y1();Ie.DiffieHellmanGroup=po.DiffieHellmanGroup;Ie.createDiffieHellmanGroup=po.createDiffieHellmanGroup;Ie.getDiffieHellman=po.getDiffieHellman;Ie.createDiffieHellman=po.createDiffieHellman;Ie.DiffieHellman=po.DiffieHellman;var of=Pa();Ie.createSign=of.createSign;Ie.Sign=of.Sign;Ie.createVerify=of.createVerify;Ie.Verify=of.Verify;Ie.createECDH=Pa();var af=Sg();Ie.publicEncrypt=af.publicEncrypt;Ie.privateEncrypt=af.privateEncrypt;Ie.publicDecrypt=af.publicDecrypt;Ie.privateDecrypt=af.privateDecrypt;var Ug=Pg();Ie.randomFill=Ug.randomFill;Ie.randomFillSync=Ug.randomFillSync;Ie.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
|
|
16
16
|
we accept pull requests
|
|
17
|
-
https://github.com/browserify/crypto-browserify`)};Te.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 il=R((qk,Tm)=>{"use strict";w();function En(){}En.getRandomBuffer=function(t){return S.default.browser?En.getRandomBufferBrowser(t):En.getRandomBufferNode(t)};En.getRandomBufferNode=function(t){var e=ja();return e.randomBytes(t)};En.getRandomBufferBrowser=function(t){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var e;if(window.crypto&&window.crypto.getRandomValues)e=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)e=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(t);e.getRandomValues(r);var n=B.Buffer.from(r);return n};Tm.exports=En});var Hf=R((kk,Cm)=>{"use strict";w();var iS=il(),We={};We.isArray=t=>Array.isArray(t);We.isNumber=t=>typeof t=="number";We.isObject=t=>t&&typeof t=="object";We.isString=t=>typeof t=="string";We.isUndefined=t=>typeof t>"u";We.isFunction=t=>typeof t=="function";We.isNull=t=>t===null;We.isDate=t=>t instanceof Date;We.extend=(t,e)=>Object.assign(t,e);We.noop=()=>{};We.every=(t,e)=>t.every(e||(r=>r));We.map=(t,e)=>Array.from(t).map(e||(r=>r));We.includes=(t,e)=>t.includes(e);We.each=(t,e)=>t.forEach(e);We.clone=t=>Object.assign({},t);We.pick=(t,e)=>{let r={};return e.forEach(n=>{typeof t[n]<"u"&&(r[n]=t[n])}),r};We.values=t=>Object.values(t);We.filter=(t,e)=>t.filter(e);We.reduce=(t,e,r)=>t.reduce(e,r);We.without=(t,e)=>t.filter(r=>r!==e);We.shuffle=t=>{let e=t.slice(0);for(let r=e.length-1;r>0;r--){let i=iS.getRandomBuffer(4).readUInt32BE(0)/4294967296,a=Math.floor(i*(r+1));[e[r],e[a]]=[e[a],e[r]]}return e};We.difference=(t,e)=>t.filter(r=>!e.includes(r));We.findIndex=(t,e)=>t.findIndex(e);We.some=(t,e)=>t.some(e);We.range=t=>[...Array(t).keys()];Cm.exports=We});var Pm=R((Ck,Om)=>{"use strict";w();var nS="https://docs.moneybutton.com/";Om.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+nS+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var Nm=R((Pk,al)=>{"use strict";w();var nl=Hf();function aS(t,e){return t.replace("{0}",e[0]).replace("{1}",e[1]).replace("{2}",e[2])}var Dm=function(t,e){var r=function(){if(nl.isString(e.message))this.message=aS(e.message,arguments);else if(nl.isFunction(e.message))this.message=e.message.apply(null,arguments);else throw new Error("Invalid error definition for "+e.name);this.stack=this.message+`
|
|
18
|
-
`+new Error().stack};return r.prototype=Object.create(t.prototype),r.prototype.name=t.prototype.name+e.name,t[e.name]=r,e.errors&&Um(r,e.errors),r},Um=function(t,e){nl.each(e,function(r){Dm(t,r)})},oS=function(t,e){return Um(t,e),t},Sn={};Sn.Error=function(){this.message="Internal error",this.stack=this.message+`
|
|
19
|
-
`+new Error().stack};Sn.Error.prototype=Object.create(Error.prototype);Sn.Error.prototype.name="bsv.Error";var fS=Pm();oS(Sn.Error,fS);al.exports=Sn.Error;al.exports.extend=function(t){return Dm(Sn.Error,t)}});var Kf=R((Uk,Lm)=>{"use strict";w();var Ga=Nm(),sS=Hf();Lm.exports={checkState:function(t,e){if(!t)throw new Ga.InvalidState(e)},checkArgument:function(t,e,r,n){if(!t)throw new Ga.InvalidArgument(e,r,n)},checkArgumentType:function(t,e,r){if(r=r||"(unknown name)",sS.isString(e)){if(e==="Buffer"){var n=ft();if(!n.Buffer.isBuffer(t))throw new Ga.InvalidArgumentType(t,e,r)}else if(typeof t!==e)throw new Ga.InvalidArgumentType(t,e,r)}else if(!(t instanceof e))throw new Ga.InvalidArgumentType(t,e.name,r)}}});var Hm=R((Lk,jm)=>{"use strict";w();var Ne=lr(),ol=Kf(),Fm=Hf(),Wf=function(t){for(var e=B.Buffer.alloc(t.length),r=0;r<t.length;r++)e[r]=t[t.length-1-r];return e};Ne.Zero=new Ne(0);Ne.One=new Ne(1);Ne.Minus1=new Ne(-1);Ne.fromNumber=function(t){return ol.checkArgument(Fm.isNumber(t)),new Ne(t)};Ne.fromString=function(t,e){return ol.checkArgument(Fm.isString(t)),new Ne(t,e)};Ne.fromBuffer=function(t,e){typeof e<"u"&&e.endian==="little"&&(t=Wf(t));var r=t.toString("hex"),n=new Ne(r,16);return n};Ne.fromSM=function(t,e){var r;if(t.length===0)return Ne.fromBuffer(B.Buffer.from([0]));var n="big";return e&&(n=e.endian),n==="little"&&(t=Wf(t)),t[0]&128?(t[0]=t[0]&127,r=Ne.fromBuffer(t),r.neg().copy(r)):r=Ne.fromBuffer(t),r};Ne.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Ne.prototype.toBuffer=function(t){var e,r;if(t&&t.size){r=this.toString(16,2);var n=r.length/2;e=B.Buffer.from(r,"hex"),n===t.size||(n>t.size?e=Ne.trim(e,n):n<t.size&&(e=Ne.pad(e,n,t.size)))}else r=this.toString(16,2),e=B.Buffer.from(r,"hex");return typeof t<"u"&&t.endian==="little"&&(e=Wf(e)),e};Ne.prototype.toSMBigEndian=function(){var t;return this.cmp(Ne.Zero)===-1?(t=this.neg().toBuffer(),t[0]&128?t=B.Buffer.concat([B.Buffer.from([128]),t]):t[0]=t[0]|128):(t=this.toBuffer(),t[0]&128&&(t=B.Buffer.concat([B.Buffer.from([0]),t]))),t.length===1&&t[0]===0&&(t=B.Buffer.from([])),t};Ne.prototype.toSM=function(t){var e=t?t.endian:"big",r=this.toSMBigEndian();return e==="little"&&(r=Wf(r)),r};Ne.fromScriptNumBuffer=function(t,e,r){var n=r||4;if(ol.checkArgument(t.length<=n,new Error("script number overflow")),e&&t.length>0&&(t[t.length-1]&127)===0&&(t.length<=1||(t[t.length-2]&128)===0))throw new Error("non-minimally encoded script number");return Ne.fromSM(t,{endian:"little"})};Ne.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Ne.trim=function(t,e){return t.slice(e-t.length,t.length)};Ne.pad=function(t,e,r){for(var n=B.Buffer.alloc(r),i=0;i<t.length;i++)n[n.length-1-i]=t[t.length-1-i];for(i=0;i<r-e;i++)n[i]=0;return n};Ne.prototype.toHex=function(...t){return this.toBuffer(...t).toString("hex")};Ne.fromHex=function(t,...e){return Ne.fromBuffer(B.Buffer.from(t,"hex"),...e)};jm.exports=Ne});var Ht=R(Ke=>{"use strict";w();var uS=Ot(),hS=J();Ke.inherits=hS;function lS(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function cS(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=a&63|128):lS(t,i)?(a=65536+((a&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=a&63|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=a&63|128)}else for(i=0;i<t.length;i++)r[i]=t[i]|0;return r}Ke.toArray=cS;function dS(t){for(var e="",r=0;r<t.length;r++)e+=Wm(t[r].toString(16));return e}Ke.toHex=dS;function Km(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ke.htonl=Km;function pS(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];e==="little"&&(i=Km(i)),r+=zm(i.toString(16))}return r}Ke.toHex32=pS;function Wm(t){return t.length===1?"0"+t:t}Ke.zero2=Wm;function zm(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}Ke.zero8=zm;function vS(t,e,r,n){var i=r-e;uS(i%4===0);for(var a=new Array(i/4),f=0,v=e;f<a.length;f++,v+=4){var m;n==="big"?m=t[v]<<24|t[v+1]<<16|t[v+2]<<8|t[v+3]:m=t[v+3]<<24|t[v+2]<<16|t[v+1]<<8|t[v],a[f]=m>>>0}return a}Ke.join32=vS;function yS(t,e){for(var r=new Array(t.length*4),n=0,i=0;n<t.length;n++,i+=4){var a=t[n];e==="big"?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=a&255):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=a&255)}return r}Ke.split32=yS;function gS(t,e){return t>>>e|t<<32-e}Ke.rotr32=gS;function mS(t,e){return t<<e|t>>>32-e}Ke.rotl32=mS;function bS(t,e){return t+e>>>0}Ke.sum32=bS;function wS(t,e,r){return t+e+r>>>0}Ke.sum32_3=wS;function _S(t,e,r,n){return t+e+r+n>>>0}Ke.sum32_4=_S;function xS(t,e,r,n,i){return t+e+r+n+i>>>0}Ke.sum32_5=xS;function MS(t,e,r,n){var i=t[e],a=t[e+1],f=n+a>>>0,v=(f<n?1:0)+r+i;t[e]=v>>>0,t[e+1]=f}Ke.sum64=MS;function ES(t,e,r,n){var i=e+n>>>0,a=(i<e?1:0)+t+r;return a>>>0}Ke.sum64_hi=ES;function SS(t,e,r,n){var i=e+n;return i>>>0}Ke.sum64_lo=SS;function BS(t,e,r,n,i,a,f,v){var m=0,E=e;E=E+n>>>0,m+=E<e?1:0,E=E+a>>>0,m+=E<a?1:0,E=E+v>>>0,m+=E<v?1:0;var A=t+r+i+f+m;return A>>>0}Ke.sum64_4_hi=BS;function AS(t,e,r,n,i,a,f,v){var m=e+n+a+v;return m>>>0}Ke.sum64_4_lo=AS;function RS(t,e,r,n,i,a,f,v,m,E){var A=0,q=e;q=q+n>>>0,A+=q<e?1:0,q=q+a>>>0,A+=q<a?1:0,q=q+v>>>0,A+=q<v?1:0,q=q+E>>>0,A+=q<E?1:0;var I=t+r+i+f+m+A;return I>>>0}Ke.sum64_5_hi=RS;function qS(t,e,r,n,i,a,f,v,m,E){var A=e+n+a+v+E;return A>>>0}Ke.sum64_5_lo=qS;function IS(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ke.rotr64_hi=IS;function kS(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ke.rotr64_lo=kS;function TS(t,e,r){return t>>>r}Ke.shr64_hi=TS;function CS(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ke.shr64_lo=CS});var Bn=R(Vm=>{"use strict";w();var Gm=Ht(),OS=Ot();function zf(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Vm.BlockHash=zf;zf.prototype.update=function(e,r){if(e=Gm.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Gm.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this};zf.prototype.digest=function(e){return this.update(this._pad()),OS(this.pending===null),this._digest(e)};zf.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,i=new Array(n+this.padLength);i[0]=128;for(var a=1;a<n;a++)i[a]=0;if(e<<=3,this.endian==="big"){for(var f=8;f<this.padLength;f++)i[a++]=0;i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=e>>>24&255,i[a++]=e>>>16&255,i[a++]=e>>>8&255,i[a++]=e&255}else for(i[a++]=e&255,i[a++]=e>>>8&255,i[a++]=e>>>16&255,i[a++]=e>>>24&255,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,f=8;f<this.padLength;f++)i[a++]=0;return i}});var fl=R(Sr=>{"use strict";w();var PS=Ht(),rr=PS.rotr32;function DS(t,e,r,n){if(t===0)return $m(e,r,n);if(t===1||t===3)return Ym(e,r,n);if(t===2)return Zm(e,r,n)}Sr.ft_1=DS;function $m(t,e,r){return t&e^~t&r}Sr.ch32=$m;function Zm(t,e,r){return t&e^t&r^e&r}Sr.maj32=Zm;function Ym(t,e,r){return t^e^r}Sr.p32=Ym;function US(t){return rr(t,2)^rr(t,13)^rr(t,22)}Sr.s0_256=US;function NS(t){return rr(t,6)^rr(t,11)^rr(t,25)}Sr.s1_256=NS;function LS(t){return rr(t,7)^rr(t,18)^t>>>3}Sr.g0_256=LS;function FS(t){return rr(t,17)^rr(t,19)^t>>>10}Sr.g1_256=FS});var Qm=R((Vk,Jm)=>{"use strict";w();var An=Ht(),jS=Bn(),HS=fl(),sl=An.rotl32,Va=An.sum32,KS=An.sum32_5,WS=HS.ft_1,Xm=jS.BlockHash,zS=[1518500249,1859775393,2400959708,3395469782];function ir(){if(!(this instanceof ir))return new ir;Xm.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}An.inherits(ir,Xm);Jm.exports=ir;ir.blockSize=512;ir.outSize=160;ir.hmacStrength=80;ir.padLength=64;ir.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=sl(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4];for(i=0;i<n.length;i++){var A=~~(i/20),q=KS(sl(a,5),WS(A,f,v,m),E,n[i],zS[A]);E=m,m=v,v=sl(f,30),f=a,a=q}this.h[0]=Va(this.h[0],a),this.h[1]=Va(this.h[1],f),this.h[2]=Va(this.h[2],v),this.h[3]=Va(this.h[3],m),this.h[4]=Va(this.h[4],E)};ir.prototype._digest=function(e){return e==="hex"?An.toHex32(this.h,"big"):An.split32(this.h,"big")}});var ul=R((Zk,tb)=>{"use strict";w();var Rn=Ht(),GS=Bn(),qn=fl(),VS=Ot(),Kt=Rn.sum32,$S=Rn.sum32_4,ZS=Rn.sum32_5,YS=qn.ch32,XS=qn.maj32,JS=qn.s0_256,QS=qn.s1_256,eB=qn.g0_256,tB=qn.g1_256,eb=GS.BlockHash,rB=[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];function nr(){if(!(this instanceof nr))return new nr;eb.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=rB,this.W=new Array(64)}Rn.inherits(nr,eb);tb.exports=nr;nr.blockSize=512;nr.outSize=256;nr.hmacStrength=192;nr.padLength=64;nr.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=$S(tB(n[i-2]),n[i-7],eB(n[i-15]),n[i-16]);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4],A=this.h[5],q=this.h[6],I=this.h[7];for(VS(this.k.length===n.length),i=0;i<n.length;i++){var C=ZS(I,QS(E),YS(E,A,q),this.k[i],n[i]),j=Kt(JS(a),XS(a,f,v));I=q,q=A,A=E,E=Kt(m,C),m=v,v=f,f=a,a=Kt(C,j)}this.h[0]=Kt(this.h[0],a),this.h[1]=Kt(this.h[1],f),this.h[2]=Kt(this.h[2],v),this.h[3]=Kt(this.h[3],m),this.h[4]=Kt(this.h[4],E),this.h[5]=Kt(this.h[5],A),this.h[6]=Kt(this.h[6],q),this.h[7]=Kt(this.h[7],I)};nr.prototype._digest=function(e){return e==="hex"?Rn.toHex32(this.h,"big"):Rn.split32(this.h,"big")}});var nb=R((Xk,ib)=>{"use strict";w();var hl=Ht(),rb=ul();function Br(){if(!(this instanceof Br))return new Br;rb.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}hl.inherits(Br,rb);ib.exports=Br;Br.blockSize=512;Br.outSize=224;Br.hmacStrength=192;Br.padLength=64;Br.prototype._digest=function(e){return e==="hex"?hl.toHex32(this.h.slice(0,7),"big"):hl.split32(this.h.slice(0,7),"big")}});var dl=R((Qk,sb)=>{"use strict";w();var mt=Ht(),iB=Bn(),nB=Ot(),ar=mt.rotr64_hi,or=mt.rotr64_lo,ab=mt.shr64_hi,ob=mt.shr64_lo,jr=mt.sum64,ll=mt.sum64_hi,cl=mt.sum64_lo,aB=mt.sum64_4_hi,oB=mt.sum64_4_lo,fB=mt.sum64_5_hi,sB=mt.sum64_5_lo,fb=iB.BlockHash,uB=[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];function Wt(){if(!(this instanceof Wt))return new Wt;fb.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=uB,this.W=new Array(160)}mt.inherits(Wt,fb);sb.exports=Wt;Wt.blockSize=1024;Wt.outSize=512;Wt.hmacStrength=192;Wt.padLength=128;Wt.prototype._prepareBlock=function(e,r){for(var n=this.W,i=0;i<32;i++)n[i]=e[r+i];for(;i<n.length;i+=2){var a=wB(n[i-4],n[i-3]),f=_B(n[i-4],n[i-3]),v=n[i-14],m=n[i-13],E=mB(n[i-30],n[i-29]),A=bB(n[i-30],n[i-29]),q=n[i-32],I=n[i-31];n[i]=aB(a,f,v,m,E,A,q,I),n[i+1]=oB(a,f,v,m,E,A,q,I)}};Wt.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,i=this.h[0],a=this.h[1],f=this.h[2],v=this.h[3],m=this.h[4],E=this.h[5],A=this.h[6],q=this.h[7],I=this.h[8],C=this.h[9],j=this.h[10],V=this.h[11],X=this.h[12],z=this.h[13],$=this.h[14],Fe=this.h[15];nB(this.k.length===n.length);for(var k=0;k<n.length;k+=2){var O=$,D=Fe,L=yB(I,C),F=gB(I,C),H=hB(I,C,j,V,X,z),M=lB(I,C,j,V,X,z),h=this.k[k],y=this.k[k+1],l=n[k],o=n[k+1],s=fB(O,D,L,F,H,M,h,y,l,o),d=sB(O,D,L,F,H,M,h,y,l,o);O=pB(i,a),D=vB(i,a),L=cB(i,a,f,v,m,E),F=dB(i,a,f,v,m,E);var g=ll(O,D,L,F),p=cl(O,D,L,F);$=X,Fe=z,X=j,z=V,j=I,V=C,I=ll(A,q,s,d),C=cl(q,q,s,d),A=m,q=E,m=f,E=v,f=i,v=a,i=ll(s,d,g,p),a=cl(s,d,g,p)}jr(this.h,0,i,a),jr(this.h,2,f,v),jr(this.h,4,m,E),jr(this.h,6,A,q),jr(this.h,8,I,C),jr(this.h,10,j,V),jr(this.h,12,X,z),jr(this.h,14,$,Fe)};Wt.prototype._digest=function(e){return e==="hex"?mt.toHex32(this.h,"big"):mt.split32(this.h,"big")};function hB(t,e,r,n,i){var a=t&r^~t&i;return a<0&&(a+=4294967296),a}function lB(t,e,r,n,i,a){var f=e&n^~e&a;return f<0&&(f+=4294967296),f}function cB(t,e,r,n,i){var a=t&r^t&i^r&i;return a<0&&(a+=4294967296),a}function dB(t,e,r,n,i,a){var f=e&n^e&a^n&a;return f<0&&(f+=4294967296),f}function pB(t,e){var r=ar(t,e,28),n=ar(e,t,2),i=ar(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function vB(t,e){var r=or(t,e,28),n=or(e,t,2),i=or(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function yB(t,e){var r=ar(t,e,14),n=ar(t,e,18),i=ar(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function gB(t,e){var r=or(t,e,14),n=or(t,e,18),i=or(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function mB(t,e){var r=ar(t,e,1),n=ar(t,e,8),i=ab(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function bB(t,e){var r=or(t,e,1),n=or(t,e,8),i=ob(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function wB(t,e){var r=ar(t,e,19),n=ar(e,t,29),i=ab(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}function _B(t,e){var r=or(t,e,19),n=or(e,t,29),i=ob(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}});var lb=R((tT,hb)=>{"use strict";w();var pl=Ht(),ub=dl();function Ar(){if(!(this instanceof Ar))return new Ar;ub.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}pl.inherits(Ar,ub);hb.exports=Ar;Ar.blockSize=1024;Ar.outSize=384;Ar.hmacStrength=192;Ar.padLength=128;Ar.prototype._digest=function(e){return e==="hex"?pl.toHex32(this.h.slice(0,12),"big"):pl.split32(this.h.slice(0,12),"big")}});var cb=R(In=>{"use strict";w();In.sha1=Qm();In.sha224=nb();In.sha256=ul();In.sha384=lb();In.sha512=dl()});var mb=R(gb=>{"use strict";w();var Di=Ht(),xB=Bn(),Gf=Di.rotl32,db=Di.sum32,$a=Di.sum32_3,pb=Di.sum32_4,yb=xB.BlockHash;function fr(){if(!(this instanceof fr))return new fr;yb.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Di.inherits(fr,yb);gb.ripemd160=fr;fr.blockSize=512;fr.outSize=160;fr.hmacStrength=192;fr.padLength=64;fr.prototype._update=function(e,r){for(var n=this.h[0],i=this.h[1],a=this.h[2],f=this.h[3],v=this.h[4],m=n,E=i,A=a,q=f,I=v,C=0;C<80;C++){var j=db(Gf(pb(n,vb(C,i,a,f),e[SB[C]+r],MB(C)),AB[C]),v);n=v,v=f,f=Gf(a,10),a=i,i=j,j=db(Gf(pb(m,vb(79-C,E,A,q),e[BB[C]+r],EB(C)),RB[C]),I),m=I,I=q,q=Gf(A,10),A=E,E=j}j=$a(this.h[1],a,q),this.h[1]=$a(this.h[2],f,I),this.h[2]=$a(this.h[3],v,m),this.h[3]=$a(this.h[4],n,E),this.h[4]=$a(this.h[0],i,A),this.h[0]=j};fr.prototype._digest=function(e){return e==="hex"?Di.toHex32(this.h,"little"):Di.split32(this.h,"little")};function vb(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function MB(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function EB(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var SB=[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],BB=[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],AB=[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],RB=[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]});var wb=R((fT,bb)=>{"use strict";w();var qB=Ht(),IB=Ot();function kn(t,e,r){if(!(this instanceof kn))return new kn(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(qB.toArray(e,r))}bb.exports=kn;kn.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),IB(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};kn.prototype.update=function(e,r){return this.inner.update(e,r),this};kn.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var xb=R(_b=>{w();var ot=_b;ot.utils=Ht();ot.common=Bn();ot.sha=cb();ot.ripemd=mb();ot.hmac=wb();ot.sha1=ot.sha.sha1;ot.sha256=ot.sha.sha256;ot.sha224=ot.sha.sha224;ot.sha384=ot.sha.sha384;ot.sha512=ot.sha.sha512;ot.ripemd160=ot.ripemd.ripemd160});var Eb=R((lT,Mb)=>{"use strict";w();var Vf=xb(),Rr=Kf(),Je=Mb.exports;Je.sha1=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.sha1().update(t).digest("hex"),"hex")};Je.sha1.blocksize=512;Je.sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.sha256().update(t).digest("hex"),"hex")};Je.sha256.blocksize=512;Je.sha256sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.sha256(Je.sha256(t))};Je.ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.ripemd160().update(t).digest("hex"),"hex")};Je.sha256ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.ripemd160(Je.sha256(t))};Je.sha512=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.sha512().update(t).digest("hex"),"hex")};Je.sha512.blocksize=1024;Je.hmac=function(t,e,r){Rr.checkArgument(B.Buffer.isBuffer(e)),Rr.checkArgument(B.Buffer.isBuffer(r)),Rr.checkArgument(t.blocksize);var n=t.blocksize/8;if(r.length>n)r=t(r);else if(r.length<n){var i=B.Buffer.alloc(n);i.fill(0),r.copy(i),r=i}var a=B.Buffer.alloc(n);a.fill(92);var f=B.Buffer.alloc(n);f.fill(54);for(var v=B.Buffer.alloc(n),m=B.Buffer.alloc(n),E=0;E<n;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Je.sha256hmac=function(t,e){return Je.hmac(Je.sha256,t,e)};Je.sha512hmac=function(t,e){return Je.hmac(Je.sha512,t,e)}});var Bb=R((dT,Sb)=>{"use strict";w();var $f=ja(),qr=Kf(),Qe=Sb.exports;Qe.sha1=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("sha1").update(t).digest()};Qe.sha1.blocksize=512;Qe.sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("sha256").update(t).digest()};Qe.sha256.blocksize=512;Qe.sha256sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.sha256(Qe.sha256(t))};Qe.ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("ripemd160").update(t).digest()};Qe.sha256ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.ripemd160(Qe.sha256(t))};Qe.sha512=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("sha512").update(t).digest()};Qe.sha512.blocksize=1024;Qe.hmac=function(t,e,r){qr.checkArgument(B.Buffer.isBuffer(e)),qr.checkArgument(B.Buffer.isBuffer(r)),qr.checkArgument(t.blocksize);var n=t.blocksize/8;if(r.length>n)r=t(r);else if(r.length<n){var i=B.Buffer.alloc(n);i.fill(0),r.copy(i),r=i}var a=B.Buffer.alloc(n);a.fill(92);var f=B.Buffer.alloc(n);f.fill(54);for(var v=B.Buffer.alloc(n),m=B.Buffer.alloc(n),E=0;E<n;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Qe.sha256hmac=function(t,e){return Qe.hmac(Qe.sha256,t,e)};Qe.sha512hmac=function(t,e){return Qe.hmac(Qe.sha512,t,e)}});var Ab=R((vT,vl)=>{w();S.default.browser?vl.exports=Eb():vl.exports=Bb()});var qb=R((yl,Rb)=>{w();(function(t,e){"use strict";typeof define=="function"&&define.amd?define([],function(){return t.secrets=e()}):typeof yl=="object"?Rb.exports=e(ja()):t.secrets=e(t.crypto)})(yl,function(t){"use strict";var e,r,n,i,a;function f(){e={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},n=new Array(1024).join("0"),i=!0,a=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function v(){return!!(r&&r.rng&&typeof r.rng=="function")}function m(k,O){var D;if(O===0||O===1)return k;if(O&&O>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return O=O||r.bits,k&&(D=k.length%O),D?(n+k).slice(-(O-D+k.length)):k}function E(k){var O="",D,L;for(L=k.length-1;L>=0;L--){if(D=parseInt(k[L],16),isNaN(D))throw new Error("Invalid hex character.");O=m(D.toString(2),4)+O}return O}function A(k){var O="",D,L;for(k=m(k,4),L=k.length;L>=4;L-=4){if(D=parseInt(k.slice(L-4,L),2),isNaN(D))throw new Error("Invalid binary character.");O=D.toString(16)+O}return O}function q(){return!!(t&&typeof t=="object"&&(typeof t.getRandomValues=="function"||typeof t.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function I(){return typeof t=="object"&&typeof t.randomBytes=="function"}function C(k){function O(H,M,h,y){var l=0,o,s="",d;for(M&&(o=M.length-1);l<o||s.length<H;)d=Math.abs(parseInt(M[l],h)),s=s+m(d.toString(2),y),l++;return s=s.substr(-H),(s.match(/0/g)||[]).length===s.length?null:s}function D(H){var M,h,y,l,o=null;for(y=16,l=4,h=Math.ceil(H/8);o===null;)M=t.randomBytes(h),o=O(H,M.toString("hex"),y,l);return o}function L(H){var M,h,y,l=null;for(h=10,y=32,M=Math.ceil(H/32);l===null;)l=O(H,t.getRandomValues(new Uint32Array(M)),h,y);return l}function F(H){var M,h,y,l,o,s=null;l=10,o=32,h=Math.ceil(H/32),y=123456789,M=new Uint32Array(h);for(var d=0;d<M.length;d++)M[d]=y;for(;s===null;)s=O(H,M,l,o);return s}if(k&&k==="testRandom")return r.typeCSPRNG=k,F;if(k&&k==="nodeCryptoRandomBytes")return r.typeCSPRNG=k,D;if(k&&k==="browserCryptoGetRandomValues")return r.typeCSPRNG=k,L;if(I())return r.typeCSPRNG="nodeCryptoRandomBytes",D;if(q())return r.typeCSPRNG="browserCryptoGetRandomValues",L}function j(k,O){var D=[],L;for(O&&(k=m(k,O)),L=k.length;L>r.bits;L-=r.bits)D.push(parseInt(k.slice(L-r.bits,L),2));return D.push(parseInt(k.slice(0,L),2)),D}function V(k,O){var D=r.logs[k],L=0,F;for(F=O.length-1;F>=0;F--)L!==0?L=r.exps[(D+r.logs[L])%r.maxShares]^O[F]:L=O[F];return L}function X(k,O,D){var L=0,F,H,M,h;for(M=0,F=O.length;M<F;M++)if(D[M]){for(H=r.logs[D[M]],h=0;h<F;h++)if(M!==h){if(k===O[h]){H=-1;break}H=(H+r.logs[k^O[h]]-r.logs[O[M]^O[h]]+r.maxShares)%r.maxShares}L=H===-1?L:L^r.exps[H]}return L}function z(k,O,D){var L=[],F=[k],H,M;for(H=1;H<D;H++)F[H]=parseInt(r.rng(r.bits),2);for(H=1,M=O+1;H<M;H++)L[H-1]={x:H,y:V(H,F)};return L}function $(k,O,D){var L,F,H,M,h;if(O=parseInt(O,r.radix),k=parseInt(k,10)||r.bits,L=k.toString(36).toUpperCase(),H=Math.pow(2,k)-1,M=H.toString(r.radix).length,F=m(O.toString(r.radix),M),typeof O!="number"||O%1!==0||O<1||O>H)throw new Error("Share id must be an integer between 1 and "+H+", inclusive.");return h=L+F+D,h}var Fe={init:function(k,O){var D=[],L=[],F=1,H,M;if(f(),k&&(typeof k!="number"||k%1!==0||k<e.minBits||k>e.maxBits))throw new Error("Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(O&&a.indexOf(O)===-1)throw new Error("Invalid RNG type argument : '"+O+"'");for(r.radix=e.radix,r.bits=k||e.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,H=e.primitivePolynomials[r.bits],M=0;M<r.size;M++)L[M]=F,D[F]=M,F=F<<1,F>=r.size&&(F=F^H,F=F&r.maxShares);if(r.logs=D,r.exps=L,O&&this.setRNG(O),v()||this.setRNG(),!v()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(k,O){var D,L,F,H,M="",h,y,l,o=[],s=[];for(O=O||0,D=0,F=k.length;D<F;D++){if(y=this.extractShareComponents(k[D]),h===void 0)h=y.bits;else if(y.bits!==h)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==h&&this.init(h),o.indexOf(y.id)===-1)for(o.push(y.id),l=j(E(y.data)),L=0,H=l.length;L<H;L++)s[L]=s[L]||[],s[L][o.length-1]=l[L]}for(D=0,F=s.length;D<F;D++)M=m(X(O,o,s[D]).toString(2))+M;return A(O>=1?M:M.slice(M.indexOf("1")+1))},getConfig:function(){var k={};return k.radix=r.radix,k.bits=r.bits,k.maxShares=r.maxShares,k.hasCSPRNG=v(),k.typeCSPRNG=r.typeCSPRNG,k},extractShareComponents:function(k){var O,D,L,F,H={},M,h;if(O=parseInt(k.substr(0,1),36),O&&(typeof O!="number"||O%1!==0||O<e.minBits||O>e.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(F=Math.pow(2,O)-1,L=(Math.pow(2,O)-1).toString(r.radix).length,M="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+L+"})([a-fA-F0-9]+)$",h=new RegExp(M).exec(k),h&&(D=parseInt(h[2],r.radix)),typeof D!="number"||D%1!==0||D<1||D>F)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(h&&h[3])return H.bits=O,H.id=D,H.data=h[3],H;throw new Error("The share data provided is invalid : "+k)},setRNG:function(k){var O="Random number generator is invalid ",D=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(k&&typeof k=="string"&&a.indexOf(k)===-1)throw new Error("Invalid RNG type argument : '"+k+"'");if(k||(k=C()),k&&typeof k=="string"&&(k=C(k)),i){if(k&&typeof k!="function")throw new Error(O+"(Not a function)."+D);if(k&&typeof k(r.bits)!="string")throw new Error(O+"(Output is not a string)."+D);if(k&&!parseInt(k(r.bits),2))throw new Error(O+"(Binary string output not parseable to an Integer)."+D);if(k&&k(r.bits).length>r.bits)throw new Error(O+"(Output length is greater than config.bits)."+D);if(k&&k(r.bits).length<r.bits)throw new Error(O+"(Output length is less than config.bits)."+D)}return r.rng=k,!0},str2hex:function(k,O){var D,L,F="",H,M,h,y;if(typeof k!="string")throw new Error("Input must be a character string.");if(O||(O=e.bytesPerChar),typeof O!="number"||O<1||O>e.maxBytesPerChar||O%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,L=Math.pow(16,D)-1,h=0,y=k.length;h<y;h++){if(M=k[h].charCodeAt(),isNaN(M))throw new Error("Invalid character: "+k[h]);if(M>L)throw H=Math.ceil(Math.log(M+1)/Math.log(256)),new Error("Invalid character code ("+M+"). Maximum allowable is 256^bytes-1 ("+L+"). To convert this character, use at least "+H+" bytes.");F=m(M.toString(16),D)+F}return F},hex2str:function(k,O){var D,L="",F,H;if(typeof k!="string")throw new Error("Input must be a hexadecimal string.");if(O=O||e.bytesPerChar,typeof O!="number"||O%1!==0||O<1||O>e.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,k=m(k,D),F=0,H=k.length;F<H;F+=D)L=String.fromCharCode(parseInt(k.slice(F,F+D),16))+L;return L},random:function(k){if(typeof k!="number"||k%1!==0||k<2||k>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return A(r.rng(k))},share:function(k,O,D,L){var F,H,M=new Array(O),h=new Array(O),y,l,o;if(L=L||128,typeof k!="string")throw new Error("Secret must be a string.");if(typeof O!="number"||O%1!==0||O<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(O>r.maxShares)throw F=Math.ceil(Math.log(O+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+O+" shares, use at least "+F+" bits.");if(typeof D!="number"||D%1!==0||D<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(D>r.maxShares)throw F=Math.ceil(Math.log(D+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+D+", use at least "+F+" bits.");if(D>O)throw new Error("Threshold number of shares was "+D+" but must be less than or equal to the "+O+" shares specified as the total to generate.");if(typeof L!="number"||L%1!==0||L<0||L>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(k="1"+E(k),k=j(k,L),y=0,o=k.length;y<o;y++)for(H=z(k[y],O,D),l=0;l<O;l++)M[l]=M[l]||H[l].x.toString(r.radix),h[l]=m(H[l].y.toString(2))+(h[l]||"");for(y=0;y<O;y++)M[y]=$(r.bits,M[y],A(h[y]));return M},newShare:function(k,O){var D,L;if(k&&typeof k=="string"&&(k=parseInt(k,r.radix)),L=k.toString(r.radix),k&&L&&O&&O[0])return D=this.extractShareComponents(O[0]),$(D.bits,L,this.combine(O,k));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:f,_padLeft:m,_hex2bin:E,_bin2hex:A,_hasCryptoGetRandomValues:q,_hasCryptoRandomBytes:I,_getRNG:C,_isSetRNG:v,_splitNumStringToIntArray:j,_horner:V,_lagrange:X,_getShares:z,_constructPublicShareString:$};return Fe.init(),Fe})});var Ob=R((mT,Cb)=>{"use strict";w();var dt=Hm(),Ib=il(),kb=Ab(),Zf=null;function gl(){if(Zf)return Zf;var t=qb();return t.setRNG(function(e){for(var r=64,n=0;n<r;n++){for(var i=Ib.getRandomBuffer(Math.ceil(e/8)),a="",f=0;f<i.length;f++)a+=("00000000"+i[f].toString(2)).slice(-8);if(a=a.slice(0,e),/1/.test(a))return a}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),Zf=t,Zf}var Yf="ff",Tb=2;function et(t){return this instanceof et?(this.options=t||{},this):new et(t)}et.split=function(t,e,r,n){if(n=n||{},t==null)throw new Error("Secret is required");if(e<2)throw new Error("Threshold must be at least 2");if(r<e)throw new Error("Number of shares must be at least threshold");if(e>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var i=B.Buffer.isBuffer(t)?t:B.Buffer.from(t,"utf8"),a=Yf+i.toString("hex"),f=gl().share(a,r,e),v=Ib.getRandomBuffer(8).toString("hex"),m=n.checksum===!0,E=m?kb.sha256(i).slice(0,4).toString("hex"):null,A=[],q=0;q<f.length;q++)A.push({v:Tb,id:q+1,threshold:e,shares:r,length:i.length,splitId:v,share:f[q],checksum:E});return A};et.combine=function(t){if(!t||t.length===0)throw new Error("Shares array is required");if(t[0]&&Array.isArray(t[0].bytes)&&t[0].share===void 0)return et._combineLegacy(t);var e=t[0].threshold,r=t[0].splitId;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var n=[],i=0;i<t.length;i++){var a=t[i];if(!a||typeof a.share!="string")throw new Error("Invalid share at index "+i);if(r!==void 0&&a.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(a.threshold!==e)throw new Error("Shares have inconsistent threshold");n.push(a.share)}var f=gl().combine(n);if(f.slice(0,Yf.length)!==Yf)throw new Error("Reconstruction failed: invalid or insufficient shares");var v=B.Buffer.from(f.slice(Yf.length),"hex"),m=t[0].checksum;if(m){var E=kb.sha256(v).slice(0,4).toString("hex");if(E!==m)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return v};et.verifyShare=function(t){try{return!t||typeof t!="object"?!1:Array.isArray(t.bytes)&&t.share===void 0?et._verifyLegacyShare(t):t.v!==Tb||typeof t.share!="string"||!/^[0-9a-fA-F]+$/.test(t.share)||typeof t.threshold!="number"||typeof t.shares!="number"||t.threshold<2||t.shares<t.threshold||t.shares>255||t.id<1||t.id>t.shares||t.checksum!==null&&t.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(t.checksum)?!1:(gl().extractShareComponents(t.share),!0)}catch{return!1}};et.generateTestVectors=function(){var t="Hello, Bitcoin SV!",e=3,r=5,n=et.split(t,e,r),i=et.combine(n.slice(0,e));return{secret:t,threshold:e,totalShares:r,shares:n,reconstructed:i.toString("utf8"),valid:i.toString("utf8")===t}};var Hr=new dt(2147483647);et._combineLegacy=function(t){var e=t[0].threshold,r=t[0].shares,n=t[0].length;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var i=0;i<t.length;i++){if(t[i].threshold!==e||t[i].shares!==r)throw new Error("Shares have inconsistent parameters");if(t[i].length!==n)throw new Error("Shares have different secret lengths")}for(var a=[],f=0;f<n;f++){for(var v=[],m=0;m<Math.min(t.length,e);m++)v.push(t[m].bytes[f]);a.push(et._combineByteLegacy(v))}return B.Buffer.from(a)};et._combineByteLegacy=function(t){for(var e=new dt(0),r=0;r<t.length;r++){for(var n=new dt(t[r].x),i=new dt(t[r].y,16),a=new dt(1),f=new dt(1),v=0;v<t.length;v++)if(r!==v){var m=new dt(t[v].x),E=new dt(0).sub(m);E.lt(new dt(0))&&(E=E.add(Hr)),a=a.mul(E).mod(Hr);var A=n.sub(m);A.lt(new dt(0))&&(A=A.add(Hr)),f=f.mul(A).mod(Hr)}var q=et._modInverseLegacy(f,Hr),I=a.mul(q).mod(Hr);e=e.add(i.mul(I)).mod(Hr)}return e.mod(Hr).mod(new dt(256)).toNumber()};et._modInverseLegacy=function(t,e){t.lt(new dt(0))&&(t=t.mod(e).add(e));var r=et._extendedGCDLegacy(t,e);if(!r.gcd.eq(new dt(1)))throw new Error("Modular inverse does not exist");return r.x.mod(e).add(e).mod(e)};et._extendedGCDLegacy=function(t,e){if(t.eq(new dt(0)))return{gcd:e,x:new dt(0),y:new dt(1)};var r=et._extendedGCDLegacy(e.mod(t),t);return{gcd:r.gcd,x:r.y.sub(e.div(t).mul(r.x)),y:r.x}};et._verifyLegacyShare=function(t){if(!t.id||!t.threshold||!t.shares||!t.bytes||typeof t.length!="number"||t.threshold<2||t.shares<t.threshold||!Array.isArray(t.bytes)||t.bytes.length!==t.length)return!1;for(var e=0;e<t.bytes.length;e++){var r=t.bytes[e];if(!r||!r.x||!r.y||r.x<1||r.x>t.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};Cb.exports=et});var kB=R((wT,Pb)=>{w();Pb.exports=Ob()});return kB();})();
|
|
17
|
+
https://github.com/browserify/crypto-browserify`)};Ie.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}});var Lg=B((yh,Ng)=>{w();(function(t,e){"use strict";typeof define=="function"&&define.amd?define([],function(){return t.secrets=e()}):typeof yh=="object"?Ng.exports=e(Uu()):t.secrets=e(t.crypto)})(yh,function(t){"use strict";var e,r,i,n,a;function f(){e={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},i=new Array(1024).join("0"),n=!0,a=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function y(){return!!(r&&r.rng&&typeof r.rng=="function")}function b(T,C){var U;if(C===0||C===1)return T;if(C&&C>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return C=C||r.bits,T&&(U=T.length%C),U?(i+T).slice(-(C-U+T.length)):T}function S(T){var C="",U,L;for(L=T.length-1;L>=0;L--){if(U=parseInt(T[L],16),isNaN(U))throw new Error("Invalid hex character.");C=b(U.toString(2),4)+C}return C}function A(T){var C="",U,L;for(T=b(T,4),L=T.length;L>=4;L-=4){if(U=parseInt(T.slice(L-4,L),2),isNaN(U))throw new Error("Invalid binary character.");C=U.toString(16)+C}return C}function q(){return!!(t&&typeof t=="object"&&(typeof t.getRandomValues=="function"||typeof t.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function k(){return typeof t=="object"&&typeof t.randomBytes=="function"}function P(T){function C(j,M,h,v){var l=0,o,u="",d;for(M&&(o=M.length-1);l<o||u.length<j;)d=Math.abs(parseInt(M[l],h)),u=u+b(d.toString(2),v),l++;return u=u.substr(-j),(u.match(/0/g)||[]).length===u.length?null:u}function U(j){var M,h,v,l,o=null;for(v=16,l=4,h=Math.ceil(j/8);o===null;)M=t.randomBytes(h),o=C(j,M.toString("hex"),v,l);return o}function L(j){var M,h,v,l=null;for(h=10,v=32,M=Math.ceil(j/32);l===null;)l=C(j,t.getRandomValues(new Uint32Array(M)),h,v);return l}function F(j){var M,h,v,l,o,u=null;l=10,o=32,h=Math.ceil(j/32),v=123456789,M=new Uint32Array(h);for(var d=0;d<M.length;d++)M[d]=v;for(;u===null;)u=C(j,M,l,o);return u}if(T&&T==="testRandom")return r.typeCSPRNG=T,F;if(T&&T==="nodeCryptoRandomBytes")return r.typeCSPRNG=T,U;if(T&&T==="browserCryptoGetRandomValues")return r.typeCSPRNG=T,L;if(k())return r.typeCSPRNG="nodeCryptoRandomBytes",U;if(q())return r.typeCSPRNG="browserCryptoGetRandomValues",L}function H(T,C){var U=[],L;for(C&&(T=b(T,C)),L=T.length;L>r.bits;L-=r.bits)U.push(parseInt(T.slice(L-r.bits,L),2));return U.push(parseInt(T.slice(0,L),2)),U}function Z(T,C){var U=r.logs[T],L=0,F;for(F=C.length-1;F>=0;F--)L!==0?L=r.exps[(U+r.logs[L])%r.maxShares]^C[F]:L=C[F];return L}function ke(T,C,U){var L=0,F,j,M,h;for(M=0,F=C.length;M<F;M++)if(U[M]){for(j=r.logs[U[M]],h=0;h<F;h++)if(M!==h){if(T===C[h]){j=-1;break}j=(j+r.logs[T^C[h]]-r.logs[C[M]^C[h]]+r.maxShares)%r.maxShares}L=j===-1?L:L^r.exps[j]}return L}function V(T,C,U){var L=[],F=[T],j,M;for(j=1;j<U;j++)F[j]=parseInt(r.rng(r.bits),2);for(j=1,M=C+1;j<M;j++)L[j-1]={x:j,y:Z(j,F)};return L}function Y(T,C,U){var L,F,j,M,h;if(C=parseInt(C,r.radix),T=parseInt(T,10)||r.bits,L=T.toString(36).toUpperCase(),j=Math.pow(2,T)-1,M=j.toString(r.radix).length,F=b(C.toString(r.radix),M),typeof C!="number"||C%1!==0||C<1||C>j)throw new Error("Share id must be an integer between 1 and "+j+", inclusive.");return h=L+F+U,h}var He={init:function(T,C){var U=[],L=[],F=1,j,M;if(f(),T&&(typeof T!="number"||T%1!==0||T<e.minBits||T>e.maxBits))throw new Error("Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(C&&a.indexOf(C)===-1)throw new Error("Invalid RNG type argument : '"+C+"'");for(r.radix=e.radix,r.bits=T||e.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,j=e.primitivePolynomials[r.bits],M=0;M<r.size;M++)L[M]=F,U[F]=M,F=F<<1,F>=r.size&&(F=F^j,F=F&r.maxShares);if(r.logs=U,r.exps=L,C&&this.setRNG(C),y()||this.setRNG(),!y()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(T,C){var U,L,F,j,M="",h,v,l,o=[],u=[];for(C=C||0,U=0,F=T.length;U<F;U++){if(v=this.extractShareComponents(T[U]),h===void 0)h=v.bits;else if(v.bits!==h)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==h&&this.init(h),o.indexOf(v.id)===-1)for(o.push(v.id),l=H(S(v.data)),L=0,j=l.length;L<j;L++)u[L]=u[L]||[],u[L][o.length-1]=l[L]}for(U=0,F=u.length;U<F;U++)M=b(ke(C,o,u[U]).toString(2))+M;return A(C>=1?M:M.slice(M.indexOf("1")+1))},getConfig:function(){var T={};return T.radix=r.radix,T.bits=r.bits,T.maxShares=r.maxShares,T.hasCSPRNG=y(),T.typeCSPRNG=r.typeCSPRNG,T},extractShareComponents:function(T){var C,U,L,F,j={},M,h;if(C=parseInt(T.substr(0,1),36),C&&(typeof C!="number"||C%1!==0||C<e.minBits||C>e.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(F=Math.pow(2,C)-1,L=(Math.pow(2,C)-1).toString(r.radix).length,M="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+L+"})([a-fA-F0-9]+)$",h=new RegExp(M).exec(T),h&&(U=parseInt(h[2],r.radix)),typeof U!="number"||U%1!==0||U<1||U>F)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(h&&h[3])return j.bits=C,j.id=U,j.data=h[3],j;throw new Error("The share data provided is invalid : "+T)},setRNG:function(T){var C="Random number generator is invalid ",U=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(T&&typeof T=="string"&&a.indexOf(T)===-1)throw new Error("Invalid RNG type argument : '"+T+"'");if(T||(T=P()),T&&typeof T=="string"&&(T=P(T)),n){if(T&&typeof T!="function")throw new Error(C+"(Not a function)."+U);if(T&&typeof T(r.bits)!="string")throw new Error(C+"(Output is not a string)."+U);if(T&&!parseInt(T(r.bits),2))throw new Error(C+"(Binary string output not parseable to an Integer)."+U);if(T&&T(r.bits).length>r.bits)throw new Error(C+"(Output length is greater than config.bits)."+U);if(T&&T(r.bits).length<r.bits)throw new Error(C+"(Output length is less than config.bits)."+U)}return r.rng=T,!0},str2hex:function(T,C){var U,L,F="",j,M,h,v;if(typeof T!="string")throw new Error("Input must be a character string.");if(C||(C=e.bytesPerChar),typeof C!="number"||C<1||C>e.maxBytesPerChar||C%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(U=2*C,L=Math.pow(16,U)-1,h=0,v=T.length;h<v;h++){if(M=T[h].charCodeAt(),isNaN(M))throw new Error("Invalid character: "+T[h]);if(M>L)throw j=Math.ceil(Math.log(M+1)/Math.log(256)),new Error("Invalid character code ("+M+"). Maximum allowable is 256^bytes-1 ("+L+"). To convert this character, use at least "+j+" bytes.");F=b(M.toString(16),U)+F}return F},hex2str:function(T,C){var U,L="",F,j;if(typeof T!="string")throw new Error("Input must be a hexadecimal string.");if(C=C||e.bytesPerChar,typeof C!="number"||C%1!==0||C<1||C>e.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(U=2*C,T=b(T,U),F=0,j=T.length;F<j;F+=U)L=String.fromCharCode(parseInt(T.slice(F,F+U),16))+L;return L},random:function(T){if(typeof T!="number"||T%1!==0||T<2||T>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return A(r.rng(T))},share:function(T,C,U,L){var F,j,M=new Array(C),h=new Array(C),v,l,o;if(L=L||128,typeof T!="string")throw new Error("Secret must be a string.");if(typeof C!="number"||C%1!==0||C<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(C>r.maxShares)throw F=Math.ceil(Math.log(C+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+C+" shares, use at least "+F+" bits.");if(typeof U!="number"||U%1!==0||U<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(U>r.maxShares)throw F=Math.ceil(Math.log(U+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+U+", use at least "+F+" bits.");if(U>C)throw new Error("Threshold number of shares was "+U+" but must be less than or equal to the "+C+" shares specified as the total to generate.");if(typeof L!="number"||L%1!==0||L<0||L>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(T="1"+S(T),T=H(T,L),v=0,o=T.length;v<o;v++)for(j=V(T[v],C,U),l=0;l<C;l++)M[l]=M[l]||j[l].x.toString(r.radix),h[l]=b(j[l].y.toString(2))+(h[l]||"");for(v=0;v<C;v++)M[v]=Y(r.bits,M[v],A(h[v]));return M},newShare:function(T,C){var U,L;if(T&&typeof T=="string"&&(T=parseInt(T,r.radix)),L=T.toString(r.radix),T&&L&&C&&C[0])return U=this.extractShareComponents(C[0]),Y(U.bits,L,this.combine(C,T));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:f,_padLeft:b,_hex2bin:S,_bin2hex:A,_hasCryptoGetRandomValues:q,_hasCryptoRandomBytes:k,_getRNG:P,_isSetRNG:y,_splitNumStringToIntArray:H,_horner:Z,_lagrange:ke,_getShares:V,_constructPublicShareString:Y};return He.init(),He})});var Wg=B((mR,Kg)=>{"use strict";w();var at=Vh(),Fg=zh(),jg=Yh(),ff=null;function gh(){if(ff)return ff;var t=Lg();return t.setRNG(function(e){for(var r=64,i=0;i<r;i++){for(var n=Fg.getRandomBuffer(Math.ceil(e/8)),a="",f=0;f<n.length;f++)a+=("00000000"+n[f].toString(2)).slice(-8);if(a=a.slice(0,e),/1/.test(a))return a}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),ff=t,ff}var sf="ff",Hg=2;function Ze(t){return this instanceof Ze?(this.options=t||{},this):new Ze(t)}Ze.split=function(t,e,r,i){if(i=i||{},t==null)throw new Error("Secret is required");if(e<2)throw new Error("Threshold must be at least 2");if(r<e)throw new Error("Number of shares must be at least threshold");if(e>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var n=R.Buffer.isBuffer(t)?t:R.Buffer.from(t,"utf8"),a=sf+n.toString("hex"),f=gh().share(a,r,e),y=Fg.getRandomBuffer(8).toString("hex"),b=i.checksum===!0,S=b?jg.sha256(n).slice(0,4).toString("hex"):null,A=[],q=0;q<f.length;q++)A.push({v:Hg,id:q+1,threshold:e,shares:r,length:n.length,splitId:y,share:f[q],checksum:S});return A};Ze.combine=function(t){if(!t||t.length===0)throw new Error("Shares array is required");if(t[0]&&Array.isArray(t[0].bytes)&&t[0].share===void 0)return Ze._combineLegacy(t);var e=t[0].threshold,r=t[0].splitId;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var i=[],n=0;n<t.length;n++){var a=t[n];if(!a||typeof a.share!="string")throw new Error("Invalid share at index "+n);if(r!==void 0&&a.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(a.threshold!==e)throw new Error("Shares have inconsistent threshold");i.push(a.share)}var f=gh().combine(i);if(f.slice(0,sf.length)!==sf)throw new Error("Reconstruction failed: invalid or insufficient shares");var y=R.Buffer.from(f.slice(sf.length),"hex"),b=t[0].checksum;if(b){var S=jg.sha256(y).slice(0,4).toString("hex");if(S!==b)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return y};Ze.verifyShare=function(t){try{return!t||typeof t!="object"?!1:Array.isArray(t.bytes)&&t.share===void 0?Ze._verifyLegacyShare(t):t.v!==Hg||typeof t.share!="string"||!/^[0-9a-fA-F]+$/.test(t.share)||typeof t.threshold!="number"||typeof t.shares!="number"||t.threshold<2||t.shares<t.threshold||t.shares>255||t.id<1||t.id>t.shares||t.checksum!==null&&t.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(t.checksum)?!1:(gh().extractShareComponents(t.share),!0)}catch{return!1}};Ze.generateTestVectors=function(){var t="Hello, Bitcoin SV!",e=3,r=5,i=Ze.split(t,e,r),n=Ze.combine(i.slice(0,e));return{secret:t,threshold:e,totalShares:r,shares:i,reconstructed:n.toString("utf8"),valid:n.toString("utf8")===t}};var br=new at(2147483647);Ze._combineLegacy=function(t){var e=t[0].threshold,r=t[0].shares,i=t[0].length;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var n=0;n<t.length;n++){if(t[n].threshold!==e||t[n].shares!==r)throw new Error("Shares have inconsistent parameters");if(t[n].length!==i)throw new Error("Shares have different secret lengths")}for(var a=[],f=0;f<i;f++){for(var y=[],b=0;b<Math.min(t.length,e);b++)y.push(t[b].bytes[f]);a.push(Ze._combineByteLegacy(y))}return R.Buffer.from(a)};Ze._combineByteLegacy=function(t){for(var e=new at(0),r=0;r<t.length;r++){for(var i=new at(t[r].x),n=new at(t[r].y,16),a=new at(1),f=new at(1),y=0;y<t.length;y++)if(r!==y){var b=new at(t[y].x),S=new at(0).sub(b);S.lt(new at(0))&&(S=S.add(br)),a=a.mul(S).mod(br);var A=i.sub(b);A.lt(new at(0))&&(A=A.add(br)),f=f.mul(A).mod(br)}var q=Ze._modInverseLegacy(f,br),k=a.mul(q).mod(br);e=e.add(n.mul(k)).mod(br)}return e.mod(br).mod(new at(256)).toNumber()};Ze._modInverseLegacy=function(t,e){t.lt(new at(0))&&(t=t.mod(e).add(e));var r=Ze._extendedGCDLegacy(t,e);if(!r.gcd.eq(new at(1)))throw new Error("Modular inverse does not exist");return r.x.mod(e).add(e).mod(e)};Ze._extendedGCDLegacy=function(t,e){if(t.eq(new at(0)))return{gcd:e,x:new at(0),y:new at(1)};var r=Ze._extendedGCDLegacy(e.mod(t),t);return{gcd:r.gcd,x:r.y.sub(e.div(t).mul(r.x)),y:r.x}};Ze._verifyLegacyShare=function(t){if(!t.id||!t.threshold||!t.shares||!t.bytes||typeof t.length!="number"||t.threshold<2||t.shares<t.threshold||!Array.isArray(t.bytes)||t.bytes.length!==t.length)return!1;for(var e=0;e<t.bytes.length;e++){var r=t.bytes[e];if(!r||!r.x||!r.y||r.x<1||r.x>t.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};Kg.exports=Ze});var dE=B((wR,Gg)=>{w();Gg.exports=Wg()});return dE();})();
|
|
20
18
|
if(typeof module!=="undefined"&&module.exports){module.exports=bsvShamir}else if(typeof define==="function"&&define.amd){define([],function(){return bsvShamir})}
|