@wendongfly/myhi 1.3.108 → 1.3.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat.html +57 -6
- package/dist/grid.html +33 -3
- package/dist/index.js +1 -1
- package/dist/index.min.js +8 -8
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -32,7 +32,7 @@ import{createRequire as __WEBPACK_EXTERNAL_createRequire}from"module";import*as
|
|
|
32
32
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
33
33
|
* MIT Licensed
|
|
34
34
|
*/var n=u(4531),t=u(756),c=u(8024),l=u(2830)("body-parser:urlencoded"),m=u(95)("body-parser"),o=u(7946),i=u(7323);S.exports=e;var a=Object.create(null);function e(v){var b=v||{};b.extended===void 0&&m("undefined extended: provide extended option");var d=b.extended!==!1,w=b.inflate!==!1,k=typeof b.limit!="number"?n.parse(b.limit||"100kb"):b.limit,R=b.type||"application/x-www-form-urlencoded",T=b.verify||!1;if(T!==!1&&typeof T!="function")throw new TypeError("option verify must be function");var I=d?r(b):g(b),C=typeof R!="function"?h(R):R;function A(O){return O.length?I(O):{}}return function(E,P,N){if(E._body){l("body already parsed"),N();return}if(E.body=E.body||{},!i.hasBody(E)){l("skip empty body"),N();return}if(l("content-type %j",E.headers["content-type"]),!C(E)){l("skip parsing"),N();return}var j=p(E)||"utf-8";if(j!=="utf-8"){l("invalid charset"),N(c(415,'unsupported charset "'+j.toUpperCase()+'"',{charset:j,type:"charset.unsupported"}));return}o(E,P,N,A,l,{debug:l,encoding:j,inflate:w,limit:k,verify:T})}}function r(v){var b=v.parameterLimit!==void 0?v.parameterLimit:1e3,d=v.depth!==void 0?v.depth:32,w=s("qs");if(isNaN(b)||b<1)throw new TypeError("option parameterLimit must be a positive number");if(isNaN(d)||d<0)throw new TypeError("option depth must be a zero or a positive number");return isFinite(b)&&(b=b|0),function(R){var T=f(R,b);if(T===void 0)throw l("too many parameters"),c(413,"too many parameters",{type:"parameters.too.many"});var I=Math.max(100,T);l("parse extended urlencoding");try{return w(R,{allowPrototypes:!0,arrayLimit:I,depth:d,strictDepth:!0,parameterLimit:b})}catch(C){throw C instanceof RangeError?c(400,"The input exceeded the depth",{type:"querystring.parse.rangeError"}):C}}}function p(v){try{return(t.parse(v).parameters.charset||"").toLowerCase()}catch{return}}function f(v,b){for(var d=0,w=0;(w=v.indexOf("&",w))!==-1;)if(d++,w++,d===b)return;return d}function s(v){var b=a[v];if(b!==void 0)return b.parse;switch(v){case"qs":b=u(240);break;case"querystring":b=u(3480);break}return a[v]=b,b.parse}function g(v){var b=v.parameterLimit!==void 0?v.parameterLimit:1e3,d=s("querystring");if(isNaN(b)||b<1)throw new TypeError("option parameterLimit must be a positive number");return isFinite(b)&&(b=b|0),function(k){var R=f(k,b);if(R===void 0)throw l("too many parameters"),c(413,"too many parameters",{type:"parameters.too.many"});return l("parse urlencoding"),d(k,void 0,void 0,{maxKeys:b})}}function h(v){return function(d){return!!i(d,v)}}},4718:S=>{var _=Object.prototype.toString,u=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function n(m){return _.call(m).slice(8,-1)==="ArrayBuffer"}function t(m,o,i){o>>>=0;var a=m.byteLength-o;if(a<0)throw new RangeError("'offset' is out of bounds");if(i===void 0)i=a;else if(i>>>=0,i>a)throw new RangeError("'length' is out of bounds");return u?Buffer.from(m.slice(o,o+i)):new Buffer(new Uint8Array(m.slice(o,o+i)))}function c(m,o){if((typeof o!="string"||o==="")&&(o="utf8"),!Buffer.isEncoding(o))throw new TypeError('"encoding" must be a valid string encoding');return u?Buffer.from(m,o):new Buffer(m,o)}function l(m,o,i){if(typeof m=="number")throw new TypeError('"value" argument must not be a number');return n(m)?t(m,o,i):typeof m=="string"?c(m,o):u?Buffer.from(m):new Buffer(m)}S.exports=l},680:(S,_,u)=>{const{parseContentType:n}=u(5313);function t(l){const m=l.headers,o=n(m["content-type"]);if(!o)throw new Error("Malformed content type");for(const i of c){if(!i.detect(o))continue;const e={limits:l.limits,headers:m,conType:o,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return l.highWaterMark&&(e.highWaterMark=l.highWaterMark),l.fileHwm&&(e.fileHwm=l.fileHwm),e.defCharset=l.defCharset,e.defParamCharset=l.defParamCharset,e.preservePath=l.preservePath,new i(e)}throw new Error(`Unsupported content type: ${m["content-type"]}`)}const c=[u(894),u(6261)].filter((function(l){return typeof l.detect=="function"}));S.exports=l=>{if((typeof l!="object"||l===null)&&(l={}),typeof l.headers!="object"||l.headers===null||typeof l.headers["content-type"]!="string")throw new Error("Missing Content-Type");return t(l)}},894:(S,_,u)=>{const{Readable:n,Writable:t}=u(2203),c=u(9026),{basename:l,convertToUTF8:m,getDecoder:o,parseContentType:i,parseDisposition:a}=u(5313),e=Buffer.from(`\r
|
|
35
|
-
`),r=Buffer.from("\r"),p=Buffer.from("-");function f(){}const s=2e3,g=16*1024,h=0,v=1,b=2;class d{constructor(N){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=h,this.name="",this.value="",this.crlf=0,this.cb=N}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=h,this.name="",this.value="",this.crlf=0}push(N,j,M){let z=j;for(;j<M;)switch(this.state){case h:{let H=!1;for(;j<M;++j){if(this.byteCount===g)return-1;++this.byteCount;const X=N[j];if(O[X]!==1){if(X!==58||(this.name+=N.latin1Slice(z,j),this.name.length===0))return-1;++j,H=!0,this.state=v;break}}if(!H){this.name+=N.latin1Slice(z,j);break}}case v:{let H=!1;for(;j<M;++j){if(this.byteCount===g)return-1;++this.byteCount;const X=N[j];if(X!==32&&X!==9){z=j,H=!0,this.state=b;break}}if(!H)break}case b:switch(this.crlf){case 0:for(;j<M;++j){if(this.byteCount===g)return-1;++this.byteCount;const H=N[j];if(E[H]!==1){if(H!==13)return-1;++this.crlf;break}}this.value+=N.latin1Slice(z,j++);break;case 1:if(this.byteCount===g||(++this.byteCount,N[j++]!==10))return-1;++this.crlf;break;case 2:{if(this.byteCount===g)return-1;++this.byteCount;const H=N[j];H===32||H===9?(z=j,this.crlf=0):(++this.pairCount<s&&(this.name=this.name.toLowerCase(),this.header[this.name]===void 0?this.header[this.name]=[this.value]:this.header[this.name].push(this.value)),H===13?(++this.crlf,++j):(z=j,this.crlf=0,this.state=h,this.name="",this.value=""));break}case 3:{if(this.byteCount===g||(++this.byteCount,N[j++]!==10))return-1;const H=this.header;return this.reset(),this.cb(H),j}}break}return j}}class w extends n{constructor(N,j){super(N),this.truncated=!1,this._readcb=null,this.once("end",(()=>{if(this._read(),--j._fileEndsLeft===0&&j._finalcb){const M=j._finalcb;j._finalcb=null,process.nextTick(M)}}))}_read(N){const j=this._readcb;j&&(this._readcb=null,j())}}const k={push:(P,N)=>{},destroy:()=>{}};function R(P,N){const j=P._writecb;P._writecb=null,N?P.destroy(N):j&&j()}function T(P,N){return P}class I extends t{constructor(N){const j={autoDestroy:!0,emitClose:!0,highWaterMark:typeof N.highWaterMark=="number"?N.highWaterMark:void 0};if(super(j),!N.conType.params||typeof N.conType.params.boundary!="string")throw new Error("Multipart: Boundary not found");const M=N.conType.params.boundary,z=typeof N.defParamCharset=="string"&&N.defParamCharset?o(N.defParamCharset):T,H=N.defCharset||"utf8",X=N.preservePath,F={autoDestroy:!0,emitClose:!0,highWaterMark:typeof N.fileHwm=="number"?N.fileHwm:void 0},Z=N.limits,re=Z&&typeof Z.fieldSize=="number"?Z.fieldSize:1*1024*1024,oe=Z&&typeof Z.fileSize=="number"?Z.fileSize:1/0,he=Z&&typeof Z.files=="number"?Z.files:1/0,de=Z&&typeof Z.fields=="number"?Z.fields:1/0,fe=Z&&typeof Z.parts=="number"?Z.parts:1/0;let ne=-1,te=0,Y=0,W=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let ie=0,$,L=0,D,B,U,G,ee=!1,q=!1,J=!1;this._hparser=null;const pe=new d((me=>{this._hparser=null,W=!1,U="text/plain",D=H,B="7bit",G=void 0,ee=!1;let be;if(!me["content-disposition"]){W=!0;return}const ye=a(me["content-disposition"][0],z);if(!ye||ye.type!=="form-data"){W=!0;return}if(ye.params&&(ye.params.name&&(G=ye.params.name),ye.params["filename*"]?be=ye.params["filename*"]:ye.params.filename&&(be=ye.params.filename),be!==void 0&&!X&&(be=l(be))),me["content-type"]){const
|
|
35
|
+
`),r=Buffer.from("\r"),p=Buffer.from("-");function f(){}const s=2e3,g=16*1024,h=0,v=1,b=2;class d{constructor(N){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=h,this.name="",this.value="",this.crlf=0,this.cb=N}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=h,this.name="",this.value="",this.crlf=0}push(N,j,M){let z=j;for(;j<M;)switch(this.state){case h:{let H=!1;for(;j<M;++j){if(this.byteCount===g)return-1;++this.byteCount;const X=N[j];if(O[X]!==1){if(X!==58||(this.name+=N.latin1Slice(z,j),this.name.length===0))return-1;++j,H=!0,this.state=v;break}}if(!H){this.name+=N.latin1Slice(z,j);break}}case v:{let H=!1;for(;j<M;++j){if(this.byteCount===g)return-1;++this.byteCount;const X=N[j];if(X!==32&&X!==9){z=j,H=!0,this.state=b;break}}if(!H)break}case b:switch(this.crlf){case 0:for(;j<M;++j){if(this.byteCount===g)return-1;++this.byteCount;const H=N[j];if(E[H]!==1){if(H!==13)return-1;++this.crlf;break}}this.value+=N.latin1Slice(z,j++);break;case 1:if(this.byteCount===g||(++this.byteCount,N[j++]!==10))return-1;++this.crlf;break;case 2:{if(this.byteCount===g)return-1;++this.byteCount;const H=N[j];H===32||H===9?(z=j,this.crlf=0):(++this.pairCount<s&&(this.name=this.name.toLowerCase(),this.header[this.name]===void 0?this.header[this.name]=[this.value]:this.header[this.name].push(this.value)),H===13?(++this.crlf,++j):(z=j,this.crlf=0,this.state=h,this.name="",this.value=""));break}case 3:{if(this.byteCount===g||(++this.byteCount,N[j++]!==10))return-1;const H=this.header;return this.reset(),this.cb(H),j}}break}return j}}class w extends n{constructor(N,j){super(N),this.truncated=!1,this._readcb=null,this.once("end",(()=>{if(this._read(),--j._fileEndsLeft===0&&j._finalcb){const M=j._finalcb;j._finalcb=null,process.nextTick(M)}}))}_read(N){const j=this._readcb;j&&(this._readcb=null,j())}}const k={push:(P,N)=>{},destroy:()=>{}};function R(P,N){const j=P._writecb;P._writecb=null,N?P.destroy(N):j&&j()}function T(P,N){return P}class I extends t{constructor(N){const j={autoDestroy:!0,emitClose:!0,highWaterMark:typeof N.highWaterMark=="number"?N.highWaterMark:void 0};if(super(j),!N.conType.params||typeof N.conType.params.boundary!="string")throw new Error("Multipart: Boundary not found");const M=N.conType.params.boundary,z=typeof N.defParamCharset=="string"&&N.defParamCharset?o(N.defParamCharset):T,H=N.defCharset||"utf8",X=N.preservePath,F={autoDestroy:!0,emitClose:!0,highWaterMark:typeof N.fileHwm=="number"?N.fileHwm:void 0},Z=N.limits,re=Z&&typeof Z.fieldSize=="number"?Z.fieldSize:1*1024*1024,oe=Z&&typeof Z.fileSize=="number"?Z.fileSize:1/0,he=Z&&typeof Z.files=="number"?Z.files:1/0,de=Z&&typeof Z.fields=="number"?Z.fields:1/0,fe=Z&&typeof Z.parts=="number"?Z.parts:1/0;let ne=-1,te=0,Y=0,W=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let ie=0,$,L=0,D,B,U,G,ee=!1,q=!1,J=!1;this._hparser=null;const pe=new d((me=>{this._hparser=null,W=!1,U="text/plain",D=H,B="7bit",G=void 0,ee=!1;let be;if(!me["content-disposition"]){W=!0;return}const ye=a(me["content-disposition"][0],z);if(!ye||ye.type!=="form-data"){W=!0;return}if(ye.params&&(ye.params.name&&(G=ye.params.name),ye.params["filename*"]?be=ye.params["filename*"]:ye.params.filename&&(be=ye.params.filename),be!==void 0&&!X&&(be=l(be))),me["content-type"]){const xe=i(me["content-type"][0]);xe&&(U=`${xe.type}/${xe.subtype}`,xe.params&&typeof xe.params.charset=="string"&&(D=xe.params.charset.toLowerCase()))}if(me["content-transfer-encoding"]&&(B=me["content-transfer-encoding"][0].toLowerCase()),U==="application/octet-stream"||be!==void 0){if(Y===he){q||(q=!0,this.emit("filesLimit")),W=!0;return}if(++Y,this.listenerCount("file")===0){W=!0;return}ie=0,this._fileStream=new w(F,this),++this._fileEndsLeft,this.emit("file",G,this._fileStream,{filename:be,encoding:B,mimeType:U})}else{if(te===de){J||(J=!0,this.emit("fieldsLimit")),W=!0;return}if(++te,this.listenerCount("field")===0){W=!0;return}$=[],L=0}}));let ue=0;const ae=(me,be,ye,xe,Oe)=>{e:for(;be;){if(this._hparser!==null){const Ee=this._hparser.push(be,ye,xe);if(Ee===-1){this._hparser=null,pe.reset(),this.emit("error",new Error("Malformed part header"));break}ye=Ee}if(ye===xe)break;if(ue!==0){if(ue===1){switch(be[ye]){case 45:ue=2,++ye;break;case 13:ue=3,++ye;break;default:ue=0}if(ye===xe)return}if(ue===2){if(ue=0,be[ye]===45){this._complete=!0,this._bparser=k;return}const Ee=this._writecb;this._writecb=f,ae(!1,p,0,1,!1),this._writecb=Ee}else if(ue===3)if(ue=0,be[ye]===10){if(++ye,ne>=fe||(this._hparser=pe,ye===xe))break;continue e}else{const Ee=this._writecb;this._writecb=f,ae(!1,r,0,1,!1),this._writecb=Ee}}if(!W){if(this._fileStream){let Ee;const Te=Math.min(xe-ye,oe-ie);Oe?Ee=be.slice(ye,ye+Te):(Ee=Buffer.allocUnsafe(Te),be.copy(Ee,0,ye,ye+Te)),ie+=Ee.length,ie===oe?(Ee.length>0&&this._fileStream.push(Ee),this._fileStream.emit("limit"),this._fileStream.truncated=!0,W=!0):this._fileStream.push(Ee)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if($!==void 0){let Ee;const Te=Math.min(xe-ye,re-L);Oe?Ee=be.slice(ye,ye+Te):(Ee=Buffer.allocUnsafe(Te),be.copy(Ee,0,ye,ye+Te)),L+=Te,$.push(Ee),L===re&&(W=!0,ee=!0)}}break}if(me){if(ue=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if($!==void 0){let Ee;switch($.length){case 0:Ee="";break;case 1:Ee=m($[0],D,0);break;default:Ee=m(Buffer.concat($,L),D,0)}$=void 0,L=0,this.emit("field",G,Ee,{nameTruncated:!1,valueTruncated:ee,encoding:B,mimeType:U})}++ne===fe&&this.emit("partsLimit")}};this._bparser=new c(`\r
|
|
36
36
|
--${M}`,ae),this._writecb=null,this._finalcb=null,this.write(e)}static detect(N){return N.type==="multipart"&&N.subtype==="form-data"}_write(N,j,M){this._writecb=M,this._bparser.push(N,0),this._writecb&&R(this)}_destroy(N,j){this._hparser=null,this._bparser=k,N||(N=A(this));const M=this._fileStream;M&&(this._fileStream=null,M.destroy(N)),j(N)}_final(N){if(this._bparser.destroy(),!this._complete)return N(new Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=C.bind(null,this,N):C(this,N)}}function C(P,N,j){if(j)return N(j);j=A(P),N(j)}function A(P){if(P._hparser)return new Error("Malformed part header");const N=P._fileStream;if(N&&(P._fileStream=null,N.destroy(new Error("Unexpected end of file"))),!P._complete)return new Error("Unexpected end of form")}const O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];S.exports=I},6261:(S,_,u)=>{const{Writable:n}=u(2203),{getDecoder:t}=u(5313);class c extends n{constructor(e){const r={autoDestroy:!0,emitClose:!0,highWaterMark:typeof e.highWaterMark=="number"?e.highWaterMark:void 0};super(r);let p=e.defCharset||"utf8";e.conType.params&&typeof e.conType.params.charset=="string"&&(p=e.conType.params.charset),this.charset=p;const f=e.limits;this.fieldSizeLimit=f&&typeof f.fieldSize=="number"?f.fieldSize:1*1024*1024,this.fieldsLimit=f&&typeof f.fields=="number"?f.fields:1/0,this.fieldNameSizeLimit=f&&typeof f.fieldNameSize=="number"?f.fieldNameSize:100,this._inKey=!0,this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,this._fields=0,this._key="",this._val="",this._byte=-2,this._lastPos=0,this._encode=0,this._decoder=t(p)}static detect(e){return e.type==="application"&&e.subtype==="x-www-form-urlencoded"}_write(e,r,p){if(this._fields>=this.fieldsLimit)return p();let f=0;const s=e.length;if(this._lastPos=0,this._byte!==-2){if(f=l(this,e,f,s),f===-1)return p(new Error("Malformed urlencoded form"));if(f>=s)return p();this._inKey?++this._bytesKey:++this._bytesVal}e:for(;f<s;)if(this._inKey){for(f=m(this,e,f,s);f<s;){switch(e[f]){case 61:this._lastPos<f&&(this._key+=e.latin1Slice(this._lastPos,f)),this._lastPos=++f,this._key=this._decoder(this._key,this._encode),this._encode=0,this._inKey=!1;continue e;case 38:if(this._lastPos<f&&(this._key+=e.latin1Slice(this._lastPos,f)),this._lastPos=++f,this._key=this._decoder(this._key,this._encode),this._encode=0,this._bytesKey>0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),p();continue;case 43:this._lastPos<f&&(this._key+=e.latin1Slice(this._lastPos,f)),this._key+=" ",this._lastPos=f+1;break;case 37:if(this._encode===0&&(this._encode=1),this._lastPos<f&&(this._key+=e.latin1Slice(this._lastPos,f)),this._lastPos=f+1,this._byte=-1,f=l(this,e,f+1,s),f===-1)return p(new Error("Malformed urlencoded form"));if(f>=s)return p();++this._bytesKey,f=m(this,e,f,s);continue}++f,++this._bytesKey,f=m(this,e,f,s)}this._lastPos<f&&(this._key+=e.latin1Slice(this._lastPos,f))}else{for(f=o(this,e,f,s);f<s;){switch(e[f]){case 38:if(this._lastPos<f&&(this._val+=e.latin1Slice(this._lastPos,f)),this._lastPos=++f,this._inKey=!0,this._val=this._decoder(this._val,this._encode),this._encode=0,(this._bytesKey>0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),p();continue e;case 43:this._lastPos<f&&(this._val+=e.latin1Slice(this._lastPos,f)),this._val+=" ",this._lastPos=f+1;break;case 37:if(this._encode===0&&(this._encode=1),this._lastPos<f&&(this._val+=e.latin1Slice(this._lastPos,f)),this._lastPos=f+1,this._byte=-1,f=l(this,e,f+1,s),f===-1)return p(new Error("Malformed urlencoded form"));if(f>=s)return p();++this._bytesVal,f=o(this,e,f,s);continue}++f,++this._bytesVal,f=o(this,e,f,s)}this._lastPos<f&&(this._val+=e.latin1Slice(this._lastPos,f))}p()}_final(e){if(this._byte!==-2)return e(new Error("Malformed urlencoded form"));(!this._inKey||this._bytesKey>0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),e()}}function l(a,e,r,p){if(r>=p)return p;if(a._byte===-1){const f=i[e[r++]];if(f===-1)return-1;if(f>=8&&(a._encode=2),r<p){const s=i[e[r++]];if(s===-1)return-1;a._inKey?a._key+=String.fromCharCode((f<<4)+s):a._val+=String.fromCharCode((f<<4)+s),a._byte=-2,a._lastPos=r}else a._byte=f}else{const f=i[e[r++]];if(f===-1)return-1;a._inKey?a._key+=String.fromCharCode((a._byte<<4)+f):a._val+=String.fromCharCode((a._byte<<4)+f),a._byte=-2,a._lastPos=r}return r}function m(a,e,r,p){if(a._bytesKey>a.fieldNameSizeLimit){for(a._keyTrunc||a._lastPos<r&&(a._key+=e.latin1Slice(a._lastPos,r-1)),a._keyTrunc=!0;r<p;++r){const f=e[r];if(f===61||f===38)break;++a._bytesKey}a._lastPos=r}return r}function o(a,e,r,p){if(a._bytesVal>a.fieldSizeLimit){for(a._valTrunc||a._lastPos<r&&(a._val+=e.latin1Slice(a._lastPos,r-1)),a._valTrunc=!0;r<p&&e[r]!==38;++r)++a._bytesVal;a._lastPos=r}return r}const i=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];S.exports=c},5313:function(S){function _(f){if(f.length===0)return;const s=Object.create(null);let g=0;for(;g<f.length;++g){const d=f.charCodeAt(g);if(i[d]!==1){if(d!==47||g===0)return;break}}if(g===f.length)return;const h=f.slice(0,g).toLowerCase(),v=++g;for(;g<f.length;++g){const d=f.charCodeAt(g);if(i[d]!==1){if(g===v||u(f,g,s)===void 0)return;break}}if(g===v)return;const b=f.slice(v,g).toLowerCase();return{type:h,subtype:b,params:s}}function u(f,s,g){for(;s<f.length;){for(;s<f.length;++s){const w=f.charCodeAt(s);if(w!==32&&w!==9)break}if(s===f.length)break;if(f.charCodeAt(s++)!==59)return;for(;s<f.length;++s){const w=f.charCodeAt(s);if(w!==32&&w!==9)break}if(s===f.length)return;let h;const v=s;for(;s<f.length;++s){const w=f.charCodeAt(s);if(i[w]!==1){if(w!==61)return;break}}if(s===f.length||(h=f.slice(v,s),++s,s===f.length))return;let b="",d;if(f.charCodeAt(s)===34){d=++s;let w=!1;for(;s<f.length;++s){const k=f.charCodeAt(s);if(k===92){w?(d=s,w=!1):(b+=f.slice(d,s),w=!0);continue}if(k===34){if(w){d=s,w=!1;continue}b+=f.slice(d,s);break}if(w&&(d=s-1,w=!1),a[k]!==1)return}if(s===f.length)return;++s}else{for(d=s;s<f.length;++s){const w=f.charCodeAt(s);if(i[w]!==1){if(s===d)return;break}}b=f.slice(d,s)}h=h.toLowerCase(),g[h]===void 0&&(g[h]=b)}return g}function n(f,s){if(f.length===0)return;const g=Object.create(null);let h=0;for(;h<f.length;++h){const b=f.charCodeAt(h);if(i[b]!==1){if(t(f,h,g,s)===void 0)return;break}}return{type:f.slice(0,h).toLowerCase(),params:g}}function t(f,s,g,h){for(;s<f.length;){for(;s<f.length;++s){const R=f.charCodeAt(s);if(R!==32&&R!==9)break}if(s===f.length)break;if(f.charCodeAt(s++)!==59)return;for(;s<f.length;++s){const R=f.charCodeAt(s);if(R!==32&&R!==9)break}if(s===f.length)return;let v;const b=s;for(;s<f.length;++s){const R=f.charCodeAt(s);if(i[R]!==1){if(R===61)break;return}}if(s===f.length)return;let d="",w,k;if(v=f.slice(b,s),v.charCodeAt(v.length-1)===42){const R=++s;for(;s<f.length;++s){const I=f.charCodeAt(s);if(e[I]!==1){if(I!==39)return;break}}if(s===f.length)return;for(k=f.slice(R,s),++s;s<f.length&&f.charCodeAt(s)!==39;++s);if(s===f.length||(++s,s===f.length))return;w=s;let T=0;for(;s<f.length;++s){const I=f.charCodeAt(s);if(r[I]!==1){if(I===37){let C,A;if(s+2<f.length&&(C=p[f.charCodeAt(s+1)])!==-1&&(A=p[f.charCodeAt(s+2)])!==-1){const O=(C<<4)+A;d+=f.slice(w,s),d+=String.fromCharCode(O),s+=2,w=s+1,O>=128?T=2:T===0&&(T=1);continue}return}break}}if(d+=f.slice(w,s),d=m(d,k,T),d===void 0)return}else{if(++s,s===f.length)return;if(f.charCodeAt(s)===34){w=++s;let R=!1;for(;s<f.length;++s){const T=f.charCodeAt(s);if(T===92){R?(w=s,R=!1):(d+=f.slice(w,s),R=!0);continue}if(T===34){if(R){w=s,R=!1;continue}d+=f.slice(w,s);break}if(R&&(w=s-1,R=!1),a[T]!==1)return}if(s===f.length)return;++s}else{for(w=s;s<f.length;++s){const R=f.charCodeAt(s);if(i[R]!==1){if(s===w)return;break}}d=f.slice(w,s)}if(d=h(d,2),d===void 0)return}v=v.toLowerCase(),g[v]===void 0&&(g[v]=d)}return g}function c(f){let s;for(;;)switch(f){case"utf-8":case"utf8":return l.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return l.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return l.utf16le;case"base64":return l.base64;default:if(s===void 0){s=!0,f=f.toLowerCase();continue}return l.other.bind(f)}}const l={utf8:(f,s)=>{if(f.length===0)return"";if(typeof f=="string"){if(s<2)return f;f=Buffer.from(f,"latin1")}return f.utf8Slice(0,f.length)},latin1:(f,s)=>f.length===0?"":typeof f=="string"?f:f.latin1Slice(0,f.length),utf16le:(f,s)=>f.length===0?"":(typeof f=="string"&&(f=Buffer.from(f,"latin1")),f.ucs2Slice(0,f.length)),base64:(f,s)=>f.length===0?"":(typeof f=="string"&&(f=Buffer.from(f,"latin1")),f.base64Slice(0,f.length)),other:(f,s)=>{if(f.length===0)return"";typeof f=="string"&&(f=Buffer.from(f,"latin1"));try{return new TextDecoder(this).decode(f)}catch{}}};function m(f,s,g){const h=c(s);if(h)return h(f,g)}function o(f){if(typeof f!="string")return"";for(let s=f.length-1;s>=0;--s)switch(f.charCodeAt(s)){case 47:case 92:return f=f.slice(s+1),f===".."||f==="."?"":f}return f===".."||f==="."?"":f}const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];S.exports={basename:o,convertToUTF8:m,getDecoder:c,parseContentType:_,parseDisposition:n}},4531:S=>{/*!
|
|
37
37
|
* bytes
|
|
38
38
|
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|
@@ -231,7 +231,7 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
|
|
|
231
231
|
`);for(var p="",f=0;f<a*e;++f)p+=" ";switch(r+=p+"Tag: ",i.tagClass){case t.Class.UNIVERSAL:r+="Universal:";break;case t.Class.APPLICATION:r+="Application:";break;case t.Class.CONTEXT_SPECIFIC:r+="Context-Specific:";break;case t.Class.PRIVATE:r+="Private:";break}if(i.tagClass===t.Class.UNIVERSAL)switch(r+=i.type,i.type){case t.Type.NONE:r+=" (None)";break;case t.Type.BOOLEAN:r+=" (Boolean)";break;case t.Type.INTEGER:r+=" (Integer)";break;case t.Type.BITSTRING:r+=" (Bit string)";break;case t.Type.OCTETSTRING:r+=" (Octet string)";break;case t.Type.NULL:r+=" (Null)";break;case t.Type.OID:r+=" (Object Identifier)";break;case t.Type.ODESC:r+=" (Object Descriptor)";break;case t.Type.EXTERNAL:r+=" (External or Instance of)";break;case t.Type.REAL:r+=" (Real)";break;case t.Type.ENUMERATED:r+=" (Enumerated)";break;case t.Type.EMBEDDED:r+=" (Embedded PDV)";break;case t.Type.UTF8:r+=" (UTF8)";break;case t.Type.ROID:r+=" (Relative Object Identifier)";break;case t.Type.SEQUENCE:r+=" (Sequence)";break;case t.Type.SET:r+=" (Set)";break;case t.Type.PRINTABLESTRING:r+=" (Printable String)";break;case t.Type.IA5String:r+=" (IA5String (ASCII))";break;case t.Type.UTCTIME:r+=" (UTC time)";break;case t.Type.GENERALIZEDTIME:r+=" (Generalized time)";break;case t.Type.BMPSTRING:r+=" (BMP String)";break}else r+=i.type;if(r+=`
|
|
232
232
|
`,r+=p+"Constructed: "+i.constructed+`
|
|
233
233
|
`,i.composed){for(var s=0,g="",f=0;f<i.value.length;++f)i.value[f]!==void 0&&(s+=1,g+=t.prettyPrint(i.value[f],a+1,e),f+1<i.value.length&&(g+=","));r+=p+"Sub values: "+s+g}else{if(r+=p+"Value: ",i.type===t.Type.OID){var h=t.derToOid(i.value);r+=h,n.pki&&n.pki.oids&&h in n.pki.oids&&(r+=" ("+n.pki.oids[h]+") ")}if(i.type===t.Type.INTEGER)try{r+=t.derToInteger(i.value)}catch{r+="0x"+n.util.bytesToHex(i.value)}else if(i.type===t.Type.BITSTRING){if(i.value.length>1?r+="0x"+n.util.bytesToHex(i.value.slice(1)):r+="(none)",i.value.length>0){var v=i.value.charCodeAt(0);v==1?r+=" (1 unused bit shown)":v>1&&(r+=" ("+v+" unused bits shown)")}}else if(i.type===t.Type.OCTETSTRING)o.test(i.value)||(r+="("+i.value+") "),r+="0x"+n.util.bytesToHex(i.value);else if(i.type===t.Type.UTF8)try{r+=n.util.decodeUtf8(i.value)}catch(b){if(b.message==="URI malformed")r+="0x"+n.util.bytesToHex(i.value)+" (malformed UTF8)";else throw b}else i.type===t.Type.PRINTABLESTRING||i.type===t.Type.IA5String?r+=i.value:o.test(i.value)?r+="0x"+n.util.bytesToHex(i.value):i.value.length===0?r+="[null]":r+=i.value}return r}},763:S=>{var _={};S.exports=_;var u={};_.encode=function(t,c,l){if(typeof c!="string")throw new TypeError('"alphabet" must be a string.');if(l!==void 0&&typeof l!="number")throw new TypeError('"maxline" must be a number.');var m="";if(!(t instanceof Uint8Array))m=n(t,c);else{var o=0,i=c.length,a=c.charAt(0),e=[0];for(o=0;o<t.length;++o){for(var r=0,p=t[o];r<e.length;++r)p+=e[r]<<8,e[r]=p%i,p=p/i|0;for(;p>0;)e.push(p%i),p=p/i|0}for(o=0;t[o]===0&&o<t.length-1;++o)m+=a;for(o=e.length-1;o>=0;--o)m+=c[e[o]]}if(l){var f=new RegExp(".{1,"+l+"}","g");m=m.match(f).join(`\r
|
|
234
|
-
`)}return m},_.decode=function(t,c){if(typeof t!="string")throw new TypeError('"input" must be a string.');if(typeof c!="string")throw new TypeError('"alphabet" must be a string.');var l=u[c];if(!l){l=u[c]=[];for(var m=0;m<c.length;++m)l[c.charCodeAt(m)]=m}t=t.replace(/\s/g,"");for(var o=c.length,i=c.charAt(0),a=[0],m=0;m<t.length;m++){var e=l[t.charCodeAt(m)];if(e===void 0)return;for(var r=0,p=e;r<a.length;++r)p+=a[r]*o,a[r]=p&255,p>>=8;for(;p>0;)a.push(p&255),p>>=8}for(var f=0;t[f]===i&&f<t.length-1;++f)a.push(0);return typeof Buffer<"u"?Buffer.from(a.reverse()):new Uint8Array(a.reverse())};function n(t,c){var l=0,m=c.length,o=c.charAt(0),i=[0];for(l=0;l<t.length();++l){for(var a=0,e=t.at(l);a<i.length;++a)e+=i[a]<<8,i[a]=e%m,e=e/m|0;for(;e>0;)i.push(e%m),e=e/m|0}var r="";for(l=0;t.at(l)===0&&l<t.length()-1;++l)r+=o;for(l=i.length-1;l>=0;--l)r+=c[i[l]];return r}},4723:(S,_,u)=>{var n=u(8561);u(7456),S.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(c,l){var m=c;if(typeof m=="string"&&(m=n.cipher.getAlgorithm(m),m&&(m=m())),!m)throw new Error("Unsupported algorithm: "+c);return new n.cipher.BlockCipher({algorithm:m,key:l,decrypt:!1})},n.cipher.createDecipher=function(c,l){var m=c;if(typeof m=="string"&&(m=n.cipher.getAlgorithm(m),m&&(m=m())),!m)throw new Error("Unsupported algorithm: "+c);return new n.cipher.BlockCipher({algorithm:m,key:l,decrypt:!0})},n.cipher.registerAlgorithm=function(c,l){c=c.toUpperCase(),n.cipher.algorithms[c]=l},n.cipher.getAlgorithm=function(c){return c=c.toUpperCase(),c in n.cipher.algorithms?n.cipher.algorithms[c]:null};var t=n.cipher.BlockCipher=function(c){this.algorithm=c.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=c.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=c.decrypt,this.algorithm.initialize(c)};t.prototype.start=function(c){c=c||{};var l={};for(var m in c)l[m]=c[m];l.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=c.output||n.util.createBuffer(),this.mode.start(l)},t.prototype.update=function(c){for(c&&this._input.putBuffer(c);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},t.prototype.finish=function(c){c&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(m){return c(this.blockSize,m,!1)},this.mode.unpad=function(m){return c(this.blockSize,m,!0)});var l={};return l.decrypt=this._decrypt,l.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,l)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,l))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,l))}},1203:(S,_,u)=>{var n=u(8561);u(7456),n.cipher=n.cipher||{};var t=S.exports=n.cipher.modes=n.cipher.modes||{};t.ecb=function(o){o=o||{},this.name="ECB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.ecb.prototype.start=function(o){},t.ecb.prototype.encrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=o.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._outBlock[e])},t.ecb.prototype.decrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=o.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._outBlock[e])},t.ecb.prototype.pad=function(o,i){var a=o.length()===this.blockSize?this.blockSize:this.blockSize-o.length();return o.fillWithByte(a,a),!0},t.ecb.prototype.unpad=function(o,i){if(i.overflow>0)return!1;var a=o.length(),e=o.at(a-1);return e>this.blockSize<<2?!1:(o.truncate(e),!0)},t.cbc=function(o){o=o||{},this.name="CBC",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.cbc.prototype.start=function(o){if(o.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in o)this._iv=c(o.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")},t.cbc.prototype.encrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=this._prev[e]^o.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._outBlock[e]);this._prev=this._outBlock},t.cbc.prototype.decrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=o.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._prev[e]^this._outBlock[e]);this._prev=this._inBlock.slice(0)},t.cbc.prototype.pad=function(o,i){var a=o.length()===this.blockSize?this.blockSize:this.blockSize-o.length();return o.fillWithByte(a,a),!0},t.cbc.prototype.unpad=function(o,i){if(i.overflow>0)return!1;var a=o.length(),e=o.at(a-1);return e>this.blockSize<<2?!1:(o.truncate(e),!0)},t.cfb=function(o){o=o||{},this.name="CFB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},t.cfb.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");this._iv=c(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.cfb.prototype.encrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)this._inBlock[r]=o.getInt32()^this._outBlock[r],i.putInt32(this._inBlock[r]);return}var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialBlock[r]=o.getInt32()^this._outBlock[r],this._partialOutput.putInt32(this._partialBlock[r]);if(p>0)o.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._partialBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0},t.cfb.prototype.decrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)this._inBlock[r]=o.getInt32(),i.putInt32(this._inBlock[r]^this._outBlock[r]);return}var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialBlock[r]=o.getInt32(),this._partialOutput.putInt32(this._partialBlock[r]^this._outBlock[r]);if(p>0)o.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._partialBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0},t.ofb=function(o){o=o||{},this.name="OFB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},t.ofb.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");this._iv=c(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ofb.prototype.encrypt=function(o,i,a){var e=o.length();if(o.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)i.putInt32(o.getInt32()^this._outBlock[r]),this._inBlock[r]=this._outBlock[r];return}var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(o.getInt32()^this._outBlock[r]);if(p>0)o.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._outBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0},t.ofb.prototype.decrypt=t.ofb.prototype.encrypt,t.ctr=function(o){o=o||{},this.name="CTR",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},t.ctr.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");this._iv=c(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ctr.prototype.encrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize)for(var r=0;r<this._ints;++r)i.putInt32(o.getInt32()^this._outBlock[r]);else{var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(o.getInt32()^this._outBlock[r]);if(p>0&&(o.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0}l(this._inBlock)},t.ctr.prototype.decrypt=t.ctr.prototype.encrypt,t.gcm=function(o){o=o||{},this.name="GCM",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},t.gcm.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");var i=n.util.createBuffer(o.iv);this._cipherLength=0;var a;if("additionalData"in o?a=n.util.createBuffer(o.additionalData):a=n.util.createBuffer(),"tagLength"in o?this._tagLength=o.tagLength:this._tagLength=128,this._tag=null,o.decrypt&&(this._tag=n.util.createBuffer(o.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var e=i.length();if(e===12)this._j0=[i.getInt32(),i.getInt32(),i.getInt32(),1];else{for(this._j0=[0,0,0,0];i.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[i.getInt32(),i.getInt32(),i.getInt32(),i.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(m(e*8)))}this._inBlock=this._j0.slice(0),l(this._inBlock),this._partialBytes=0,a=n.util.createBuffer(a),this._aDataLength=m(a.length()*8);var r=a.length()%this.blockSize;for(r&&a.fillWithByte(0,this.blockSize-r),this._s=[0,0,0,0];a.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()])},t.gcm.prototype.encrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)i.putInt32(this._outBlock[r]^=o.getInt32());this._cipherLength+=this.blockSize}else{var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(o.getInt32()^this._outBlock[r]);if(p<=0||a){if(a){var f=e%this.blockSize;this._cipherLength+=f,this._partialOutput.truncate(this.blockSize-f)}else this._cipherLength+=this.blockSize;for(var r=0;r<this._ints;++r)this._outBlock[r]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return o.read-=this.blockSize,i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),l(this._inBlock)},t.gcm.prototype.decrypt=function(o,i,a){var e=o.length();if(e<this.blockSize&&!(a&&e>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),l(this._inBlock),this._hashBlock[0]=o.getInt32(),this._hashBlock[1]=o.getInt32(),this._hashBlock[2]=o.getInt32(),this._hashBlock[3]=o.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var r=0;r<this._ints;++r)i.putInt32(this._outBlock[r]^this._hashBlock[r]);e<this.blockSize?this._cipherLength+=e%this.blockSize:this._cipherLength+=this.blockSize},t.gcm.prototype.afterFinish=function(o,i){var a=!0;i.decrypt&&i.overflow&&o.truncate(this.blockSize-i.overflow),this.tag=n.util.createBuffer();var e=this._aDataLength.concat(m(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,e);var r=[];this.cipher.encrypt(this._j0,r);for(var p=0;p<this._ints;++p)this.tag.putInt32(this._s[p]^r[p]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),i.decrypt&&this.tag.bytes()!==this._tag&&(a=!1),a},t.gcm.prototype.multiply=function(o,i){for(var a=[0,0,0,0],e=i.slice(0),r=0;r<128;++r){var p=o[r/32|0]&1<<31-r%32;p&&(a[0]^=e[0],a[1]^=e[1],a[2]^=e[2],a[3]^=e[3]),this.pow(e,e)}return a},t.gcm.prototype.pow=function(o,i){for(var a=o[3]&1,e=3;e>0;--e)i[e]=o[e]>>>1|(o[e-1]&1)<<31;i[0]=o[0]>>>1,a&&(i[0]^=this._R)},t.gcm.prototype.tableMultiply=function(o){for(var i=[0,0,0,0],a=0;a<32;++a){var e=a/8|0,r=o[e]>>>(7-a%8)*4&15,p=this._m[a][r];i[0]^=p[0],i[1]^=p[1],i[2]^=p[2],i[3]^=p[3]}return i},t.gcm.prototype.ghash=function(o,i,a){return i[0]^=a[0],i[1]^=a[1],i[2]^=a[2],i[3]^=a[3],this.tableMultiply(i)},t.gcm.prototype.generateHashTable=function(o,i){for(var a=8/i,e=4*a,r=16*a,p=new Array(r),f=0;f<r;++f){var s=[0,0,0,0],g=f/e|0,h=(e-1-f%e)*i;s[g]=1<<i-1<<h,p[f]=this.generateSubHashTable(this.multiply(s,o),i)}return p},t.gcm.prototype.generateSubHashTable=function(o,i){var a=1<<i,e=a>>>1,r=new Array(a);r[e]=o.slice(0);for(var p=e>>>1;p>0;)this.pow(r[2*p],r[p]=[]),p>>=1;for(p=2;p<e;){for(var f=1;f<p;++f){var s=r[p],g=r[f];r[p+f]=[s[0]^g[0],s[1]^g[1],s[2]^g[2],s[3]^g[3]]}p*=2}for(r[0]=[0,0,0,0],p=e+1;p<a;++p){var h=r[p^e];r[p]=[o[0]^h[0],o[1]^h[1],o[2]^h[2],o[3]^h[3]]}return r};function c(o,i){if(typeof o=="string"&&(o=n.util.createBuffer(o)),n.util.isArray(o)&&o.length>4){var a=o;o=n.util.createBuffer();for(var e=0;e<a.length;++e)o.putByte(a[e])}if(o.length()<i)throw new Error("Invalid IV length; got "+o.length()+" bytes and expected "+i+" bytes.");if(!n.util.isArray(o)){for(var r=[],p=i/4,e=0;e<p;++e)r.push(o.getInt32());o=r}return o}function l(o){o[o.length-1]=o[o.length-1]+1&4294967295}function m(o){return[o/4294967296|0,o&4294967295]}},5918:(S,_,u)=>{var n=u(8561);u(4723),u(1203),u(7456),S.exports=n.des=n.des||{},n.des.startEncrypting=function(g,h,v,b){var d=s({key:g,output:v,decrypt:!1,mode:b||(h===null?"ECB":"CBC")});return d.start(h),d},n.des.createEncryptionCipher=function(g,h){return s({key:g,output:null,decrypt:!1,mode:h})},n.des.startDecrypting=function(g,h,v,b){var d=s({key:g,output:v,decrypt:!0,mode:b||(h===null?"ECB":"CBC")});return d.start(h),d},n.des.createDecryptionCipher=function(g,h){return s({key:g,output:null,decrypt:!0,mode:h})},n.des.Algorithm=function(g,h){var v=this;v.name=g,v.mode=new h({blockSize:8,cipher:{encrypt:function(b,d){return f(v._keys,b,d,!1)},decrypt:function(b,d){return f(v._keys,b,d,!0)}}}),v._init=!1},n.des.Algorithm.prototype.initialize=function(g){if(!this._init){var h=n.util.createBuffer(g.key);if(this.name.indexOf("3DES")===0&&h.length()!==24)throw new Error("Invalid Triple-DES key size: "+h.length()*8);this._keys=p(h),this._init=!0}},t("DES-ECB",n.cipher.modes.ecb),t("DES-CBC",n.cipher.modes.cbc),t("DES-CFB",n.cipher.modes.cfb),t("DES-OFB",n.cipher.modes.ofb),t("DES-CTR",n.cipher.modes.ctr),t("3DES-ECB",n.cipher.modes.ecb),t("3DES-CBC",n.cipher.modes.cbc),t("3DES-CFB",n.cipher.modes.cfb),t("3DES-OFB",n.cipher.modes.ofb),t("3DES-CTR",n.cipher.modes.ctr);function t(g,h){var v=function(){return new n.des.Algorithm(g,h)};n.cipher.registerAlgorithm(g,v)}var c=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],l=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],o=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],i=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],a=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],e=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],r=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(g){for(var h=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],v=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],b=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],d=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],w=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],R=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],T=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],I=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],C=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],A=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],O=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],E=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],P=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],N=g.length()>8?3:1,j=[],M=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],z=0,H,X=0;X<N;X++){var F=g.getInt32(),Z=g.getInt32();H=(F>>>4^Z)&252645135,Z^=H,F^=H<<4,H=(Z>>>-16^F)&65535,F^=H,Z^=H<<-16,H=(F>>>2^Z)&858993459,Z^=H,F^=H<<2,H=(Z>>>-16^F)&65535,F^=H,Z^=H<<-16,H=(F>>>1^Z)&1431655765,Z^=H,F^=H<<1,H=(Z>>>8^F)&16711935,F^=H,Z^=H<<8,H=(F>>>1^Z)&1431655765,Z^=H,F^=H<<1,H=F<<8|Z>>>20&240,F=Z<<24|Z<<8&16711680|Z>>>8&65280|Z>>>24&240,Z=H;for(var re=0;re<M.length;++re){M[re]?(F=F<<2|F>>>26,Z=Z<<2|Z>>>26):(F=F<<1|F>>>27,Z=Z<<1|Z>>>27),F&=-15,Z&=-15;var oe=h[F>>>28]|v[F>>>24&15]|b[F>>>20&15]|d[F>>>16&15]|w[F>>>12&15]|k[F>>>8&15]|R[F>>>4&15],he=T[Z>>>28]|I[Z>>>24&15]|C[Z>>>20&15]|A[Z>>>16&15]|O[Z>>>12&15]|E[Z>>>8&15]|P[Z>>>4&15];H=(he>>>16^oe)&65535,j[z++]=oe^H,j[z++]=he^H<<16}}return j}function f(g,h,v,b){var d=g.length===32?3:9,w;d===3?w=b?[30,-2,-2]:[0,32,2]:w=b?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var k,R=h[0],T=h[1];k=(R>>>4^T)&252645135,T^=k,R^=k<<4,k=(R>>>16^T)&65535,T^=k,R^=k<<16,k=(T>>>2^R)&858993459,R^=k,T^=k<<2,k=(T>>>8^R)&16711935,R^=k,T^=k<<8,k=(R>>>1^T)&1431655765,T^=k,R^=k<<1,R=R<<1|R>>>31,T=T<<1|T>>>31;for(var I=0;I<d;I+=3){for(var C=w[I+1],A=w[I+2],O=w[I];O!=C;O+=A){var E=T^g[O],P=(T>>>4|T<<28)^g[O+1];k=R,R=T,T=k^(l[E>>>24&63]|o[E>>>16&63]|a[E>>>8&63]|r[E&63]|c[P>>>24&63]|m[P>>>16&63]|i[P>>>8&63]|e[P&63])}k=R,R=T,T=k}R=R>>>1|R<<31,T=T>>>1|T<<31,k=(R>>>1^T)&1431655765,T^=k,R^=k<<1,k=(T>>>8^R)&16711935,R^=k,T^=k<<8,k=(T>>>2^R)&858993459,R^=k,T^=k<<2,k=(R>>>16^T)&65535,T^=k,R^=k<<16,k=(R>>>4^T)&252645135,T^=k,R^=k<<4,v[0]=R,v[1]=T}function s(g){g=g||{};var h=(g.mode||"CBC").toUpperCase(),v="DES-"+h,b;g.decrypt?b=n.cipher.createDecipher(v,g.key):b=n.cipher.createCipher(v,g.key);var d=b.start;return b.start=function(w,k){var R=null;k instanceof n.util.ByteBuffer&&(R=k,k={}),k=k||{},k.output=R,k.iv=w,d.call(b,k)},b}},6735:(S,_,u)=>{var n=u(8561);u(9592),u(2055),u(2734),u(7456);var t=u(938),c=t.publicKeyValidator,l=t.privateKeyValidator;if(typeof m>"u")var m=n.jsbn.BigInteger;var o=n.util.ByteBuffer,i=typeof Buffer>"u"?Uint8Array:Buffer;n.pki=n.pki||{},S.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var a=n.ed25519;a.constants={},a.constants.PUBLIC_KEY_BYTE_LENGTH=32,a.constants.PRIVATE_KEY_BYTE_LENGTH=64,a.constants.SEED_BYTE_LENGTH=32,a.constants.SIGN_BYTE_LENGTH=64,a.constants.HASH_BYTE_LENGTH=64,a.generateKeyPair=function($){$=$||{};var L=$.seed;if(L===void 0)L=n.random.getBytesSync(a.constants.SEED_BYTE_LENGTH);else if(typeof L=="string"){if(L.length!==a.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+a.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(L instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');L=e({message:L,encoding:"binary"});for(var D=new i(a.constants.PUBLIC_KEY_BYTE_LENGTH),B=new i(a.constants.PRIVATE_KEY_BYTE_LENGTH),U=0;U<32;++U)B[U]=L[U];return w(D,B),{publicKey:D,privateKey:B}},a.privateKeyFromAsn1=function($){var L={},D=[],B=n.asn1.validate($,l,L,D);if(!B){var U=new Error("Invalid Key.");throw U.errors=D,U}var G=n.asn1.derToOid(L.privateKeyOid),ee=n.oids.EdDSA25519;if(G!==ee)throw new Error('Invalid OID "'+G+'"; OID must be "'+ee+'".');var q=L.privateKey,J=e({message:n.asn1.fromDer(q).value,encoding:"binary"});return{privateKeyBytes:J}},a.publicKeyFromAsn1=function($){var L={},D=[],B=n.asn1.validate($,c,L,D);if(!B){var U=new Error("Invalid Key.");throw U.errors=D,U}var G=n.asn1.derToOid(L.publicKeyOid),ee=n.oids.EdDSA25519;if(G!==ee)throw new Error('Invalid OID "'+G+'"; OID must be "'+ee+'".');var q=L.ed25519PublicKey;if(q.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return e({message:q,encoding:"binary"})},a.publicKeyFromPrivateKey=function($){$=$||{};var L=e({message:$.privateKey,encoding:"binary"});if(L.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.PRIVATE_KEY_BYTE_LENGTH);for(var D=new i(a.constants.PUBLIC_KEY_BYTE_LENGTH),B=0;B<D.length;++B)D[B]=L[32+B];return D},a.sign=function($){$=$||{};var L=e($),D=e({message:$.privateKey,encoding:"binary"});if(D.length===a.constants.SEED_BYTE_LENGTH){var B=a.generateKeyPair({seed:D});D=B.privateKey}else if(D.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.SEED_BYTE_LENGTH+" or "+a.constants.PRIVATE_KEY_BYTE_LENGTH);var U=new i(a.constants.SIGN_BYTE_LENGTH+L.length);k(U,L,L.length,D);for(var G=new i(a.constants.SIGN_BYTE_LENGTH),ee=0;ee<G.length;++ee)G[ee]=U[ee];return G},a.verify=function($){$=$||{};var L=e($);if($.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var D=e({message:$.signature,encoding:"binary"});if(D.length!==a.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+a.constants.SIGN_BYTE_LENGTH);var B=e({message:$.publicKey,encoding:"binary"});if(B.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+a.constants.PUBLIC_KEY_BYTE_LENGTH);var U=new i(a.constants.SIGN_BYTE_LENGTH+L.length),G=new i(a.constants.SIGN_BYTE_LENGTH+L.length),ee;for(ee=0;ee<a.constants.SIGN_BYTE_LENGTH;++ee)U[ee]=D[ee];for(ee=0;ee<L.length;++ee)U[ee+a.constants.SIGN_BYTE_LENGTH]=L[ee];return R(G,U,U.length,B)>=0};function e($){var L=$.message;if(L instanceof Uint8Array||L instanceof i)return L;var D=$.encoding;if(L===void 0)if($.md)L=$.md.digest().getBytes(),D="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof L=="string"&&!D)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof L=="string"){if(typeof Buffer<"u")return Buffer.from(L,D);L=new o(L,D)}else if(!(L instanceof o))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var B=new i(L.length()),U=0;U<B.length;++U)B[U]=L.at(U);return B}var r=ne(),p=ne([1]),f=ne([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),s=ne([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),g=ne([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=ne([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),b=ne([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d($,L){var D=n.md.sha512.create(),B=new o($);D.update(B.getBytes(L),"binary");var U=D.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(U,"binary");for(var G=new i(a.constants.HASH_BYTE_LENGTH),ee=0;ee<64;++ee)G[ee]=U.charCodeAt(ee);return G}function w($,L){var D=[ne(),ne(),ne(),ne()],B,U=d(L,32);for(U[0]&=248,U[31]&=127,U[31]|=64,re(D,U),E($,D),B=0;B<32;++B)L[B+32]=$[B];return 0}function k($,L,D,B){var U,G,ee=new Float64Array(64),q=[ne(),ne(),ne(),ne()],J=d(B,32);J[0]&=248,J[31]&=127,J[31]|=64;var pe=D+64;for(U=0;U<D;++U)$[64+U]=L[U];for(U=0;U<32;++U)$[32+U]=J[32+U];var ue=d($.subarray(32),D+32);for(C(ue),re(q,ue),E($,q),U=32;U<64;++U)$[U]=B[U];var ae=d($,D+64);for(C(ae),U=32;U<64;++U)ee[U]=0;for(U=0;U<32;++U)ee[U]=ue[U];for(U=0;U<32;++U)for(G=0;G<32;G++)ee[U+G]+=ae[U]*J[G];return I($.subarray(32),ee),pe}function R($,L,D,B){var U,G,ee=new i(32),q=[ne(),ne(),ne(),ne()],J=[ne(),ne(),ne(),ne()];if(G=-1,D<64||N(J,B)||!T(L,32))return-1;for(U=0;U<D;++U)$[U]=L[U];for(U=0;U<32;++U)$[U+32]=B[U];var pe=d($,D);if(C(pe),Z(q,J,pe),re(J,L.subarray(32)),A(q,J),E(ee,q),D-=64,H(L,0,ee,0)){for(U=0;U<D;++U)$[U]=0;return-1}for(U=0;U<D;++U)$[U]=L[U+64];return G=D,G}function T($,L){var D;for(D=31;D>=0;--D){if($[L+D]<v[D])return!0;if($[L+D]>v[D])return!1}return!1}function I($,L){var D,B,U,G;for(B=63;B>=32;--B){for(D=0,U=B-32,G=B-12;U<G;++U)L[U]+=D-16*L[B]*v[U-(B-32)],D=L[U]+128>>8,L[U]-=D*256;L[U]+=D,L[B]=0}for(D=0,U=0;U<32;++U)L[U]+=D-(L[31]>>4)*v[U],D=L[U]>>8,L[U]&=255;for(U=0;U<32;++U)L[U]-=D*v[U];for(B=0;B<32;++B)L[B+1]+=L[B]>>8,$[B]=L[B]&255}function C($){for(var L=new Float64Array(64),D=0;D<64;++D)L[D]=$[D],$[D]=0;I($,L)}function A($,L){var D=ne(),B=ne(),U=ne(),G=ne(),ee=ne(),q=ne(),J=ne(),pe=ne(),ue=ne();Y(D,$[1],$[0]),Y(ue,L[1],L[0]),ie(D,D,ue),te(B,$[0],$[1]),te(ue,L[0],L[1]),ie(B,B,ue),ie(U,$[3],L[3]),ie(U,U,s),ie(G,$[2],L[2]),te(G,G,G),Y(ee,B,D),Y(q,G,U),te(J,G,U),te(pe,B,D),ie($[0],ee,q),ie($[1],pe,J),ie($[2],J,q),ie($[3],ee,pe)}function O($,L,D){for(var B=0;B<4;++B)fe($[B],L[B],D)}function E($,L){var D=ne(),B=ne(),U=ne();he(U,L[2]),ie(D,L[0],U),ie(B,L[1],U),P($,B),$[31]^=F(D)<<7}function P($,L){var D,B,U,G=ne(),ee=ne();for(D=0;D<16;++D)ee[D]=L[D];for(de(ee),de(ee),de(ee),B=0;B<2;++B){for(G[0]=ee[0]-65517,D=1;D<15;++D)G[D]=ee[D]-65535-(G[D-1]>>16&1),G[D-1]&=65535;G[15]=ee[15]-32767-(G[14]>>16&1),U=G[15]>>16&1,G[14]&=65535,fe(ee,G,1-U)}for(D=0;D<16;D++)$[2*D]=ee[D]&255,$[2*D+1]=ee[D]>>8}function N($,L){var D=ne(),B=ne(),U=ne(),G=ne(),ee=ne(),q=ne(),J=ne();return oe($[2],p),j($[1],L),W(U,$[1]),ie(G,U,f),Y(U,U,$[2]),te(G,$[2],G),W(ee,G),W(q,ee),ie(J,q,ee),ie(D,J,U),ie(D,D,G),M(D,D),ie(D,D,U),ie(D,D,G),ie(D,D,G),ie($[0],D,G),W(B,$[0]),ie(B,B,G),z(B,U)&&ie($[0],$[0],b),W(B,$[0]),ie(B,B,G),z(B,U)?-1:(F($[0])===L[31]>>7&&Y($[0],r,$[0]),ie($[3],$[0],$[1]),0)}function j($,L){var D;for(D=0;D<16;++D)$[D]=L[2*D]+(L[2*D+1]<<8);$[15]&=32767}function M($,L){var D=ne(),B;for(B=0;B<16;++B)D[B]=L[B];for(B=250;B>=0;--B)W(D,D),B!==1&&ie(D,D,L);for(B=0;B<16;++B)$[B]=D[B]}function z($,L){var D=new i(32),B=new i(32);return P(D,$),P(B,L),H(D,0,B,0)}function H($,L,D,B){return X($,L,D,B,32)}function X($,L,D,B,U){var G,ee=0;for(G=0;G<U;++G)ee|=$[L+G]^D[B+G];return(1&ee-1>>>8)-1}function F($){var L=new i(32);return P(L,$),L[0]&1}function Z($,L,D){var B,U;for(oe($[0],r),oe($[1],p),oe($[2],p),oe($[3],r),U=255;U>=0;--U)B=D[U/8|0]>>(U&7)&1,O($,L,B),A(L,$),A($,$),O($,L,B)}function re($,L){var D=[ne(),ne(),ne(),ne()];oe(D[0],g),oe(D[1],h),oe(D[2],p),ie(D[3],g,h),Z($,D,L)}function oe($,L){var D;for(D=0;D<16;D++)$[D]=L[D]|0}function he($,L){var D=ne(),B;for(B=0;B<16;++B)D[B]=L[B];for(B=253;B>=0;--B)W(D,D),B!==2&&B!==4&&ie(D,D,L);for(B=0;B<16;++B)$[B]=D[B]}function de($){var L,D,B=1;for(L=0;L<16;++L)D=$[L]+B+65535,B=Math.floor(D/65536),$[L]=D-B*65536;$[0]+=B-1+37*(B-1)}function fe($,L,D){for(var B,U=~(D-1),G=0;G<16;++G)B=U&($[G]^L[G]),$[G]^=B,L[G]^=B}function ne($){var L,D=new Float64Array(16);if($)for(L=0;L<$.length;++L)D[L]=$[L];return D}function te($,L,D){for(var B=0;B<16;++B)$[B]=L[B]+D[B]}function Y($,L,D){for(var B=0;B<16;++B)$[B]=L[B]-D[B]}function W($,L){ie($,L,L)}function ie($,L,D){var B,U,G=0,ee=0,q=0,J=0,pe=0,ue=0,ae=0,me=0,be=0,ye=0,_e=0,Oe=0,Ee=0,Te=0,Ae=0,Ne=0,Ie=0,Ce=0,Pe=0,je=0,Ue=0,ce=0,le=0,ke=0,Be=0,Re=0,Se=0,et=0,it=0,tt=0,nt=0,He=D[0],Me=D[1],Le=D[2],Ye=D[3],Qe=D[4],Xe=D[5],qe=D[6],Ke=D[7],Ve=D[8],We=D[9],Ge=D[10],Je=D[11],Ze=D[12],$e=D[13],Fe=D[14],ze=D[15];B=L[0],G+=B*He,ee+=B*Me,q+=B*Le,J+=B*Ye,pe+=B*Qe,ue+=B*Xe,ae+=B*qe,me+=B*Ke,be+=B*Ve,ye+=B*We,_e+=B*Ge,Oe+=B*Je,Ee+=B*Ze,Te+=B*$e,Ae+=B*Fe,Ne+=B*ze,B=L[1],ee+=B*He,q+=B*Me,J+=B*Le,pe+=B*Ye,ue+=B*Qe,ae+=B*Xe,me+=B*qe,be+=B*Ke,ye+=B*Ve,_e+=B*We,Oe+=B*Ge,Ee+=B*Je,Te+=B*Ze,Ae+=B*$e,Ne+=B*Fe,Ie+=B*ze,B=L[2],q+=B*He,J+=B*Me,pe+=B*Le,ue+=B*Ye,ae+=B*Qe,me+=B*Xe,be+=B*qe,ye+=B*Ke,_e+=B*Ve,Oe+=B*We,Ee+=B*Ge,Te+=B*Je,Ae+=B*Ze,Ne+=B*$e,Ie+=B*Fe,Ce+=B*ze,B=L[3],J+=B*He,pe+=B*Me,ue+=B*Le,ae+=B*Ye,me+=B*Qe,be+=B*Xe,ye+=B*qe,_e+=B*Ke,Oe+=B*Ve,Ee+=B*We,Te+=B*Ge,Ae+=B*Je,Ne+=B*Ze,Ie+=B*$e,Ce+=B*Fe,Pe+=B*ze,B=L[4],pe+=B*He,ue+=B*Me,ae+=B*Le,me+=B*Ye,be+=B*Qe,ye+=B*Xe,_e+=B*qe,Oe+=B*Ke,Ee+=B*Ve,Te+=B*We,Ae+=B*Ge,Ne+=B*Je,Ie+=B*Ze,Ce+=B*$e,Pe+=B*Fe,je+=B*ze,B=L[5],ue+=B*He,ae+=B*Me,me+=B*Le,be+=B*Ye,ye+=B*Qe,_e+=B*Xe,Oe+=B*qe,Ee+=B*Ke,Te+=B*Ve,Ae+=B*We,Ne+=B*Ge,Ie+=B*Je,Ce+=B*Ze,Pe+=B*$e,je+=B*Fe,Ue+=B*ze,B=L[6],ae+=B*He,me+=B*Me,be+=B*Le,ye+=B*Ye,_e+=B*Qe,Oe+=B*Xe,Ee+=B*qe,Te+=B*Ke,Ae+=B*Ve,Ne+=B*We,Ie+=B*Ge,Ce+=B*Je,Pe+=B*Ze,je+=B*$e,Ue+=B*Fe,ce+=B*ze,B=L[7],me+=B*He,be+=B*Me,ye+=B*Le,_e+=B*Ye,Oe+=B*Qe,Ee+=B*Xe,Te+=B*qe,Ae+=B*Ke,Ne+=B*Ve,Ie+=B*We,Ce+=B*Ge,Pe+=B*Je,je+=B*Ze,Ue+=B*$e,ce+=B*Fe,le+=B*ze,B=L[8],be+=B*He,ye+=B*Me,_e+=B*Le,Oe+=B*Ye,Ee+=B*Qe,Te+=B*Xe,Ae+=B*qe,Ne+=B*Ke,Ie+=B*Ve,Ce+=B*We,Pe+=B*Ge,je+=B*Je,Ue+=B*Ze,ce+=B*$e,le+=B*Fe,ke+=B*ze,B=L[9],ye+=B*He,_e+=B*Me,Oe+=B*Le,Ee+=B*Ye,Te+=B*Qe,Ae+=B*Xe,Ne+=B*qe,Ie+=B*Ke,Ce+=B*Ve,Pe+=B*We,je+=B*Ge,Ue+=B*Je,ce+=B*Ze,le+=B*$e,ke+=B*Fe,Be+=B*ze,B=L[10],_e+=B*He,Oe+=B*Me,Ee+=B*Le,Te+=B*Ye,Ae+=B*Qe,Ne+=B*Xe,Ie+=B*qe,Ce+=B*Ke,Pe+=B*Ve,je+=B*We,Ue+=B*Ge,ce+=B*Je,le+=B*Ze,ke+=B*$e,Be+=B*Fe,Re+=B*ze,B=L[11],Oe+=B*He,Ee+=B*Me,Te+=B*Le,Ae+=B*Ye,Ne+=B*Qe,Ie+=B*Xe,Ce+=B*qe,Pe+=B*Ke,je+=B*Ve,Ue+=B*We,ce+=B*Ge,le+=B*Je,ke+=B*Ze,Be+=B*$e,Re+=B*Fe,Se+=B*ze,B=L[12],Ee+=B*He,Te+=B*Me,Ae+=B*Le,Ne+=B*Ye,Ie+=B*Qe,Ce+=B*Xe,Pe+=B*qe,je+=B*Ke,Ue+=B*Ve,ce+=B*We,le+=B*Ge,ke+=B*Je,Be+=B*Ze,Re+=B*$e,Se+=B*Fe,et+=B*ze,B=L[13],Te+=B*He,Ae+=B*Me,Ne+=B*Le,Ie+=B*Ye,Ce+=B*Qe,Pe+=B*Xe,je+=B*qe,Ue+=B*Ke,ce+=B*Ve,le+=B*We,ke+=B*Ge,Be+=B*Je,Re+=B*Ze,Se+=B*$e,et+=B*Fe,it+=B*ze,B=L[14],Ae+=B*He,Ne+=B*Me,Ie+=B*Le,Ce+=B*Ye,Pe+=B*Qe,je+=B*Xe,Ue+=B*qe,ce+=B*Ke,le+=B*Ve,ke+=B*We,Be+=B*Ge,Re+=B*Je,Se+=B*Ze,et+=B*$e,it+=B*Fe,tt+=B*ze,B=L[15],Ne+=B*He,Ie+=B*Me,Ce+=B*Le,Pe+=B*Ye,je+=B*Qe,Ue+=B*Xe,ce+=B*qe,le+=B*Ke,ke+=B*Ve,Be+=B*We,Re+=B*Ge,Se+=B*Je,et+=B*Ze,it+=B*$e,tt+=B*Fe,nt+=B*ze,G+=38*Ie,ee+=38*Ce,q+=38*Pe,J+=38*je,pe+=38*Ue,ue+=38*ce,ae+=38*le,me+=38*ke,be+=38*Be,ye+=38*Re,_e+=38*Se,Oe+=38*et,Ee+=38*it,Te+=38*tt,Ae+=38*nt,U=1,B=G+U+65535,U=Math.floor(B/65536),G=B-U*65536,B=ee+U+65535,U=Math.floor(B/65536),ee=B-U*65536,B=q+U+65535,U=Math.floor(B/65536),q=B-U*65536,B=J+U+65535,U=Math.floor(B/65536),J=B-U*65536,B=pe+U+65535,U=Math.floor(B/65536),pe=B-U*65536,B=ue+U+65535,U=Math.floor(B/65536),ue=B-U*65536,B=ae+U+65535,U=Math.floor(B/65536),ae=B-U*65536,B=me+U+65535,U=Math.floor(B/65536),me=B-U*65536,B=be+U+65535,U=Math.floor(B/65536),be=B-U*65536,B=ye+U+65535,U=Math.floor(B/65536),ye=B-U*65536,B=_e+U+65535,U=Math.floor(B/65536),_e=B-U*65536,B=Oe+U+65535,U=Math.floor(B/65536),Oe=B-U*65536,B=Ee+U+65535,U=Math.floor(B/65536),Ee=B-U*65536,B=Te+U+65535,U=Math.floor(B/65536),Te=B-U*65536,B=Ae+U+65535,U=Math.floor(B/65536),Ae=B-U*65536,B=Ne+U+65535,U=Math.floor(B/65536),Ne=B-U*65536,G+=U-1+37*(U-1),U=1,B=G+U+65535,U=Math.floor(B/65536),G=B-U*65536,B=ee+U+65535,U=Math.floor(B/65536),ee=B-U*65536,B=q+U+65535,U=Math.floor(B/65536),q=B-U*65536,B=J+U+65535,U=Math.floor(B/65536),J=B-U*65536,B=pe+U+65535,U=Math.floor(B/65536),pe=B-U*65536,B=ue+U+65535,U=Math.floor(B/65536),ue=B-U*65536,B=ae+U+65535,U=Math.floor(B/65536),ae=B-U*65536,B=me+U+65535,U=Math.floor(B/65536),me=B-U*65536,B=be+U+65535,U=Math.floor(B/65536),be=B-U*65536,B=ye+U+65535,U=Math.floor(B/65536),ye=B-U*65536,B=_e+U+65535,U=Math.floor(B/65536),_e=B-U*65536,B=Oe+U+65535,U=Math.floor(B/65536),Oe=B-U*65536,B=Ee+U+65535,U=Math.floor(B/65536),Ee=B-U*65536,B=Te+U+65535,U=Math.floor(B/65536),Te=B-U*65536,B=Ae+U+65535,U=Math.floor(B/65536),Ae=B-U*65536,B=Ne+U+65535,U=Math.floor(B/65536),Ne=B-U*65536,G+=U-1+37*(U-1),$[0]=G,$[1]=ee,$[2]=q,$[3]=J,$[4]=pe,$[5]=ue,$[6]=ae,$[7]=me,$[8]=be,$[9]=ye,$[10]=_e,$[11]=Oe,$[12]=Ee,$[13]=Te,$[14]=Ae,$[15]=Ne}},8561:S=>{S.exports={options:{usePureJavaScript:!1}}},2007:(S,_,u)=>{var n=u(8561);u(6777),u(7456);var t=S.exports=n.hmac=n.hmac||{};t.create=function(){var c=null,l=null,m=null,o=null,i={};return i.start=function(a,e){if(a!==null)if(typeof a=="string")if(a=a.toLowerCase(),a in n.md.algorithms)l=n.md.algorithms[a].create();else throw new Error('Unknown hash algorithm "'+a+'"');else l=a;if(e===null)e=c;else{if(typeof e=="string")e=n.util.createBuffer(e);else if(n.util.isArray(e)){var r=e;e=n.util.createBuffer();for(var p=0;p<r.length;++p)e.putByte(r[p])}var f=e.length();f>l.blockLength&&(l.start(),l.update(e.bytes()),e=l.digest()),m=n.util.createBuffer(),o=n.util.createBuffer(),f=e.length();for(var p=0;p<f;++p){var r=e.at(p);m.putByte(54^r),o.putByte(92^r)}if(f<l.blockLength)for(var r=l.blockLength-f,p=0;p<r;++p)m.putByte(54),o.putByte(92);c=e,m=m.bytes(),o=o.bytes()}l.start(),l.update(m)},i.update=function(a){l.update(a)},i.getMac=function(){var a=l.digest().bytes();return l.start(),l.update(o),l.update(a),l.digest()},i.digest=i.getMac,i}},8542:(S,_,u)=>{S.exports=u(8561),u(9445),u(6087),u(7357),u(4723),u(5918),u(6735),u(2007),u(9477),u(8388),u(5472),u(2893),u(9429),u(492),u(1608),u(1296),u(4382),u(2493),u(7013),u(5189),u(6736),u(2055),u(9274),u(3140),u(4275),u(7456)},9592:(S,_,u)=>{var n=u(8561);S.exports=n.jsbn=n.jsbn||{};var t,c=0xdeadbeefcafe,l=(c&16777215)==15715070;function m(V,K,Q){this.data=[],V!=null&&(typeof V=="number"?this.fromNumber(V,K,Q):K==null&&typeof V!="string"?this.fromString(V,256):this.fromString(V,K))}n.jsbn.BigInteger=m;function o(){return new m(null)}function i(V,K,Q,se,ge,ve){for(;--ve>=0;){var we=K*this.data[V++]+Q.data[se]+ge;ge=Math.floor(we/67108864),Q.data[se++]=we&67108863}return ge}function a(V,K,Q,se,ge,ve){for(var we=K&32767,xe=K>>15;--ve>=0;){var De=this.data[V]&32767,rt=this.data[V++]>>15,st=xe*De+rt*we;De=we*De+((st&32767)<<15)+Q.data[se]+(ge&1073741823),ge=(De>>>30)+(st>>>15)+xe*rt+(ge>>>30),Q.data[se++]=De&1073741823}return ge}function e(V,K,Q,se,ge,ve){for(var we=K&16383,xe=K>>14;--ve>=0;){var De=this.data[V]&16383,rt=this.data[V++]>>14,st=xe*De+rt*we;De=we*De+((st&16383)<<14)+Q.data[se]+ge,ge=(De>>28)+(st>>14)+xe*rt,Q.data[se++]=De&268435455}return ge}typeof navigator>"u"?(m.prototype.am=e,t=28):l&&navigator.appName=="Microsoft Internet Explorer"?(m.prototype.am=a,t=30):l&&navigator.appName!="Netscape"?(m.prototype.am=i,t=26):(m.prototype.am=e,t=28),m.prototype.DB=t,m.prototype.DM=(1<<t)-1,m.prototype.DV=1<<t;var r=52;m.prototype.FV=Math.pow(2,r),m.prototype.F1=r-t,m.prototype.F2=2*t-r;var p="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array,s,g;for(s=48,g=0;g<=9;++g)f[s++]=g;for(s=97,g=10;g<36;++g)f[s++]=g;for(s=65,g=10;g<36;++g)f[s++]=g;function h(V){return p.charAt(V)}function v(V,K){var Q=f[V.charCodeAt(K)];return Q??-1}function b(V){for(var K=this.t-1;K>=0;--K)V.data[K]=this.data[K];V.t=this.t,V.s=this.s}function d(V){this.t=1,this.s=V<0?-1:0,V>0?this.data[0]=V:V<-1?this.data[0]=V+this.DV:this.t=0}function w(V){var K=o();return K.fromInt(V),K}function k(V,K){var Q;if(K==16)Q=4;else if(K==8)Q=3;else if(K==256)Q=8;else if(K==2)Q=1;else if(K==32)Q=5;else if(K==4)Q=2;else{this.fromRadix(V,K);return}this.t=0,this.s=0;for(var se=V.length,ge=!1,ve=0;--se>=0;){var we=Q==8?V[se]&255:v(V,se);if(we<0){V.charAt(se)=="-"&&(ge=!0);continue}ge=!1,ve==0?this.data[this.t++]=we:ve+Q>this.DB?(this.data[this.t-1]|=(we&(1<<this.DB-ve)-1)<<ve,this.data[this.t++]=we>>this.DB-ve):this.data[this.t-1]|=we<<ve,ve+=Q,ve>=this.DB&&(ve-=this.DB)}Q==8&&(V[0]&128)!=0&&(this.s=-1,ve>0&&(this.data[this.t-1]|=(1<<this.DB-ve)-1<<ve)),this.clamp(),ge&&m.ZERO.subTo(this,this)}function R(){for(var V=this.s&this.DM;this.t>0&&this.data[this.t-1]==V;)--this.t}function T(V){if(this.s<0)return"-"+this.negate().toString(V);var K;if(V==16)K=4;else if(V==8)K=3;else if(V==2)K=1;else if(V==32)K=5;else if(V==4)K=2;else return this.toRadix(V);var Q=(1<<K)-1,se,ge=!1,ve="",we=this.t,xe=this.DB-we*this.DB%K;if(we-- >0)for(xe<this.DB&&(se=this.data[we]>>xe)>0&&(ge=!0,ve=h(se));we>=0;)xe<K?(se=(this.data[we]&(1<<xe)-1)<<K-xe,se|=this.data[--we]>>(xe+=this.DB-K)):(se=this.data[we]>>(xe-=K)&Q,xe<=0&&(xe+=this.DB,--we)),se>0&&(ge=!0),ge&&(ve+=h(se));return ge?ve:"0"}function I(){var V=o();return m.ZERO.subTo(this,V),V}function C(){return this.s<0?this.negate():this}function A(V){var K=this.s-V.s;if(K!=0)return K;var Q=this.t;if(K=Q-V.t,K!=0)return this.s<0?-K:K;for(;--Q>=0;)if((K=this.data[Q]-V.data[Q])!=0)return K;return 0}function O(V){var K=1,Q;return(Q=V>>>16)!=0&&(V=Q,K+=16),(Q=V>>8)!=0&&(V=Q,K+=8),(Q=V>>4)!=0&&(V=Q,K+=4),(Q=V>>2)!=0&&(V=Q,K+=2),(Q=V>>1)!=0&&(V=Q,K+=1),K}function E(){return this.t<=0?0:this.DB*(this.t-1)+O(this.data[this.t-1]^this.s&this.DM)}function P(V,K){var Q;for(Q=this.t-1;Q>=0;--Q)K.data[Q+V]=this.data[Q];for(Q=V-1;Q>=0;--Q)K.data[Q]=0;K.t=this.t+V,K.s=this.s}function N(V,K){for(var Q=V;Q<this.t;++Q)K.data[Q-V]=this.data[Q];K.t=Math.max(this.t-V,0),K.s=this.s}function j(V,K){var Q=V%this.DB,se=this.DB-Q,ge=(1<<se)-1,ve=Math.floor(V/this.DB),we=this.s<<Q&this.DM,xe;for(xe=this.t-1;xe>=0;--xe)K.data[xe+ve+1]=this.data[xe]>>se|we,we=(this.data[xe]&ge)<<Q;for(xe=ve-1;xe>=0;--xe)K.data[xe]=0;K.data[ve]=we,K.t=this.t+ve+1,K.s=this.s,K.clamp()}function M(V,K){K.s=this.s;var Q=Math.floor(V/this.DB);if(Q>=this.t){K.t=0;return}var se=V%this.DB,ge=this.DB-se,ve=(1<<se)-1;K.data[0]=this.data[Q]>>se;for(var we=Q+1;we<this.t;++we)K.data[we-Q-1]|=(this.data[we]&ve)<<ge,K.data[we-Q]=this.data[we]>>se;se>0&&(K.data[this.t-Q-1]|=(this.s&ve)<<ge),K.t=this.t-Q,K.clamp()}function z(V,K){for(var Q=0,se=0,ge=Math.min(V.t,this.t);Q<ge;)se+=this.data[Q]-V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;if(V.t<this.t){for(se-=V.s;Q<this.t;)se+=this.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se+=this.s}else{for(se+=this.s;Q<V.t;)se-=V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se-=V.s}K.s=se<0?-1:0,se<-1?K.data[Q++]=this.DV+se:se>0&&(K.data[Q++]=se),K.t=Q,K.clamp()}function H(V,K){var Q=this.abs(),se=V.abs(),ge=Q.t;for(K.t=ge+se.t;--ge>=0;)K.data[ge]=0;for(ge=0;ge<se.t;++ge)K.data[ge+Q.t]=Q.am(0,se.data[ge],K,ge,0,Q.t);K.s=0,K.clamp(),this.s!=V.s&&m.ZERO.subTo(K,K)}function X(V){for(var K=this.abs(),Q=V.t=2*K.t;--Q>=0;)V.data[Q]=0;for(Q=0;Q<K.t-1;++Q){var se=K.am(Q,K.data[Q],V,2*Q,0,1);(V.data[Q+K.t]+=K.am(Q+1,2*K.data[Q],V,2*Q+1,se,K.t-Q-1))>=K.DV&&(V.data[Q+K.t]-=K.DV,V.data[Q+K.t+1]=1)}V.t>0&&(V.data[V.t-1]+=K.am(Q,K.data[Q],V,2*Q,0,1)),V.s=0,V.clamp()}function F(V,K,Q){var se=V.abs();if(!(se.t<=0)){var ge=this.abs();if(ge.t<se.t){K?.fromInt(0),Q!=null&&this.copyTo(Q);return}Q==null&&(Q=o());var ve=o(),we=this.s,xe=V.s,De=this.DB-O(se.data[se.t-1]);De>0?(se.lShiftTo(De,ve),ge.lShiftTo(De,Q)):(se.copyTo(ve),ge.copyTo(Q));var rt=ve.t,st=ve.data[rt-1];if(st!=0){var at=st*(1<<this.F1)+(rt>1?ve.data[rt-2]>>this.F2:0),ut=this.FV/at,yt=(1<<this.F1)/at,ct=1<<this.F2,lt=Q.t,bt=lt-rt,dt=K??o();for(ve.dlShiftTo(bt,dt),Q.compareTo(dt)>=0&&(Q.data[Q.t++]=1,Q.subTo(dt,Q)),m.ONE.dlShiftTo(rt,dt),dt.subTo(ve,ve);ve.t<rt;)ve.data[ve.t++]=0;for(;--bt>=0;){var _t=Q.data[--lt]==st?this.DM:Math.floor(Q.data[lt]*ut+(Q.data[lt-1]+ct)*yt);if((Q.data[lt]+=ve.am(0,_t,Q,bt,0,rt))<_t)for(ve.dlShiftTo(bt,dt),Q.subTo(dt,Q);Q.data[lt]<--_t;)Q.subTo(dt,Q)}K!=null&&(Q.drShiftTo(rt,K),we!=xe&&m.ZERO.subTo(K,K)),Q.t=rt,Q.clamp(),De>0&&Q.rShiftTo(De,Q),we<0&&m.ZERO.subTo(Q,Q)}}}function Z(V){var K=o();return this.abs().divRemTo(V,null,K),this.s<0&&K.compareTo(m.ZERO)>0&&V.subTo(K,K),K}function re(V){this.m=V}function oe(V){return V.s<0||V.compareTo(this.m)>=0?V.mod(this.m):V}function he(V){return V}function de(V){V.divRemTo(this.m,null,V)}function fe(V,K,Q){V.multiplyTo(K,Q),this.reduce(Q)}function ne(V,K){V.squareTo(K),this.reduce(K)}re.prototype.convert=oe,re.prototype.revert=he,re.prototype.reduce=de,re.prototype.mulTo=fe,re.prototype.sqrTo=ne;function te(){if(this.t<1)return 0;var V=this.data[0];if((V&1)==0)return 0;var K=V&3;return K=K*(2-(V&15)*K)&15,K=K*(2-(V&255)*K)&255,K=K*(2-((V&65535)*K&65535))&65535,K=K*(2-V*K%this.DV)%this.DV,K>0?this.DV-K:-K}function Y(V){this.m=V,this.mp=V.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<V.DB-15)-1,this.mt2=2*V.t}function W(V){var K=o();return V.abs().dlShiftTo(this.m.t,K),K.divRemTo(this.m,null,K),V.s<0&&K.compareTo(m.ZERO)>0&&this.m.subTo(K,K),K}function ie(V){var K=o();return V.copyTo(K),this.reduce(K),K}function $(V){for(;V.t<=this.mt2;)V.data[V.t++]=0;for(var K=0;K<this.m.t;++K){var Q=V.data[K]&32767,se=Q*this.mpl+((Q*this.mph+(V.data[K]>>15)*this.mpl&this.um)<<15)&V.DM;for(Q=K+this.m.t,V.data[Q]+=this.m.am(0,se,V,K,0,this.m.t);V.data[Q]>=V.DV;)V.data[Q]-=V.DV,V.data[++Q]++}V.clamp(),V.drShiftTo(this.m.t,V),V.compareTo(this.m)>=0&&V.subTo(this.m,V)}function L(V,K){V.squareTo(K),this.reduce(K)}function D(V,K,Q){V.multiplyTo(K,Q),this.reduce(Q)}Y.prototype.convert=W,Y.prototype.revert=ie,Y.prototype.reduce=$,Y.prototype.mulTo=D,Y.prototype.sqrTo=L;function B(){return(this.t>0?this.data[0]&1:this.s)==0}function U(V,K){if(V>4294967295||V<1)return m.ONE;var Q=o(),se=o(),ge=K.convert(this),ve=O(V)-1;for(ge.copyTo(Q);--ve>=0;)if(K.sqrTo(Q,se),(V&1<<ve)>0)K.mulTo(se,ge,Q);else{var we=Q;Q=se,se=we}return K.revert(Q)}function G(V,K){var Q;return V<256||K.isEven()?Q=new re(K):Q=new Y(K),this.exp(V,Q)}m.prototype.copyTo=b,m.prototype.fromInt=d,m.prototype.fromString=k,m.prototype.clamp=R,m.prototype.dlShiftTo=P,m.prototype.drShiftTo=N,m.prototype.lShiftTo=j,m.prototype.rShiftTo=M,m.prototype.subTo=z,m.prototype.multiplyTo=H,m.prototype.squareTo=X,m.prototype.divRemTo=F,m.prototype.invDigit=te,m.prototype.isEven=B,m.prototype.exp=U,m.prototype.toString=T,m.prototype.negate=I,m.prototype.abs=C,m.prototype.compareTo=A,m.prototype.bitLength=E,m.prototype.mod=Z,m.prototype.modPowInt=G,m.ZERO=w(0),m.ONE=w(1);function ee(){var V=o();return this.copyTo(V),V}function q(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function J(){return this.t==0?this.s:this.data[0]<<24>>24}function pe(){return this.t==0?this.s:this.data[0]<<16>>16}function ue(V){return Math.floor(Math.LN2*this.DB/Math.log(V))}function ae(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function me(V){if(V==null&&(V=10),this.signum()==0||V<2||V>36)return"0";var K=this.chunkSize(V),Q=Math.pow(V,K),se=w(Q),ge=o(),ve=o(),we="";for(this.divRemTo(se,ge,ve);ge.signum()>0;)we=(Q+ve.intValue()).toString(V).substr(1)+we,ge.divRemTo(se,ge,ve);return ve.intValue().toString(V)+we}function be(V,K){this.fromInt(0),K==null&&(K=10);for(var Q=this.chunkSize(K),se=Math.pow(K,Q),ge=!1,ve=0,we=0,xe=0;xe<V.length;++xe){var De=v(V,xe);if(De<0){V.charAt(xe)=="-"&&this.signum()==0&&(ge=!0);continue}we=K*we+De,++ve>=Q&&(this.dMultiply(se),this.dAddOffset(we,0),ve=0,we=0)}ve>0&&(this.dMultiply(Math.pow(K,ve)),this.dAddOffset(we,0)),ge&&m.ZERO.subTo(this,this)}function ye(V,K,Q){if(typeof K=="number")if(V<2)this.fromInt(1);else for(this.fromNumber(V,Q),this.testBit(V-1)||this.bitwiseTo(m.ONE.shiftLeft(V-1),Ce,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(K);)this.dAddOffset(2,0),this.bitLength()>V&&this.subTo(m.ONE.shiftLeft(V-1),this);else{var se=new Array,ge=V&7;se.length=(V>>3)+1,K.nextBytes(se),ge>0?se[0]&=(1<<ge)-1:se[0]=0,this.fromString(se,256)}}function _e(){var V=this.t,K=new Array;K[0]=this.s;var Q=this.DB-V*this.DB%8,se,ge=0;if(V-- >0)for(Q<this.DB&&(se=this.data[V]>>Q)!=(this.s&this.DM)>>Q&&(K[ge++]=se|this.s<<this.DB-Q);V>=0;)Q<8?(se=(this.data[V]&(1<<Q)-1)<<8-Q,se|=this.data[--V]>>(Q+=this.DB-8)):(se=this.data[V]>>(Q-=8)&255,Q<=0&&(Q+=this.DB,--V)),(se&128)!=0&&(se|=-256),ge==0&&(this.s&128)!=(se&128)&&++ge,(ge>0||se!=this.s)&&(K[ge++]=se);return K}function Oe(V){return this.compareTo(V)==0}function Ee(V){return this.compareTo(V)<0?this:V}function Te(V){return this.compareTo(V)>0?this:V}function Ae(V,K,Q){var se,ge,ve=Math.min(V.t,this.t);for(se=0;se<ve;++se)Q.data[se]=K(this.data[se],V.data[se]);if(V.t<this.t){for(ge=V.s&this.DM,se=ve;se<this.t;++se)Q.data[se]=K(this.data[se],ge);Q.t=this.t}else{for(ge=this.s&this.DM,se=ve;se<V.t;++se)Q.data[se]=K(ge,V.data[se]);Q.t=V.t}Q.s=K(this.s,V.s),Q.clamp()}function Ne(V,K){return V&K}function Ie(V){var K=o();return this.bitwiseTo(V,Ne,K),K}function Ce(V,K){return V|K}function Pe(V){var K=o();return this.bitwiseTo(V,Ce,K),K}function je(V,K){return V^K}function Ue(V){var K=o();return this.bitwiseTo(V,je,K),K}function ce(V,K){return V&~K}function le(V){var K=o();return this.bitwiseTo(V,ce,K),K}function ke(){for(var V=o(),K=0;K<this.t;++K)V.data[K]=this.DM&~this.data[K];return V.t=this.t,V.s=~this.s,V}function Be(V){var K=o();return V<0?this.rShiftTo(-V,K):this.lShiftTo(V,K),K}function Re(V){var K=o();return V<0?this.lShiftTo(-V,K):this.rShiftTo(V,K),K}function Se(V){if(V==0)return-1;var K=0;return(V&65535)==0&&(V>>=16,K+=16),(V&255)==0&&(V>>=8,K+=8),(V&15)==0&&(V>>=4,K+=4),(V&3)==0&&(V>>=2,K+=2),(V&1)==0&&++K,K}function et(){for(var V=0;V<this.t;++V)if(this.data[V]!=0)return V*this.DB+Se(this.data[V]);return this.s<0?this.t*this.DB:-1}function it(V){for(var K=0;V!=0;)V&=V-1,++K;return K}function tt(){for(var V=0,K=this.s&this.DM,Q=0;Q<this.t;++Q)V+=it(this.data[Q]^K);return V}function nt(V){var K=Math.floor(V/this.DB);return K>=this.t?this.s!=0:(this.data[K]&1<<V%this.DB)!=0}function He(V,K){var Q=m.ONE.shiftLeft(V);return this.bitwiseTo(Q,K,Q),Q}function Me(V){return this.changeBit(V,Ce)}function Le(V){return this.changeBit(V,ce)}function Ye(V){return this.changeBit(V,je)}function Qe(V,K){for(var Q=0,se=0,ge=Math.min(V.t,this.t);Q<ge;)se+=this.data[Q]+V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;if(V.t<this.t){for(se+=V.s;Q<this.t;)se+=this.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se+=this.s}else{for(se+=this.s;Q<V.t;)se+=V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se+=V.s}K.s=se<0?-1:0,se>0?K.data[Q++]=se:se<-1&&(K.data[Q++]=this.DV+se),K.t=Q,K.clamp()}function Xe(V){var K=o();return this.addTo(V,K),K}function qe(V){var K=o();return this.subTo(V,K),K}function Ke(V){var K=o();return this.multiplyTo(V,K),K}function Ve(){var V=o();return this.squareTo(V),V}function We(V){var K=o();return this.divRemTo(V,K,null),K}function Ge(V){var K=o();return this.divRemTo(V,null,K),K}function Je(V){var K=o(),Q=o();return this.divRemTo(V,K,Q),new Array(K,Q)}function Ze(V){this.data[this.t]=this.am(0,V-1,this,0,0,this.t),++this.t,this.clamp()}function $e(V,K){if(V!=0){for(;this.t<=K;)this.data[this.t++]=0;for(this.data[K]+=V;this.data[K]>=this.DV;)this.data[K]-=this.DV,++K>=this.t&&(this.data[this.t++]=0),++this.data[K]}}function Fe(){}function ze(V){return V}function gt(V,K,Q){V.multiplyTo(K,Q)}function xt(V,K){V.squareTo(K)}Fe.prototype.convert=ze,Fe.prototype.revert=ze,Fe.prototype.mulTo=gt,Fe.prototype.sqrTo=xt;function mt(V){return this.exp(V,new Fe)}function pt(V,K,Q){var se=Math.min(this.t+V.t,K);for(Q.s=0,Q.t=se;se>0;)Q.data[--se]=0;var ge;for(ge=Q.t-this.t;se<ge;++se)Q.data[se+this.t]=this.am(0,V.data[se],Q,se,0,this.t);for(ge=Math.min(V.t,K);se<ge;++se)this.am(0,V.data[se],Q,se,0,K-se);Q.clamp()}function ht(V,K,Q){--K;var se=Q.t=this.t+V.t-K;for(Q.s=0;--se>=0;)Q.data[se]=0;for(se=Math.max(K-this.t,0);se<V.t;++se)Q.data[this.t+se-K]=this.am(K-se,V.data[se],Q,0,0,this.t+se-K);Q.clamp(),Q.drShiftTo(1,Q)}function ft(V){this.r2=o(),this.q3=o(),m.ONE.dlShiftTo(2*V.t,this.r2),this.mu=this.r2.divide(V),this.m=V}function vt(V){if(V.s<0||V.t>2*this.m.t)return V.mod(this.m);if(V.compareTo(this.m)<0)return V;var K=o();return V.copyTo(K),this.reduce(K),K}function wt(V){return V}function Et(V){for(V.drShiftTo(this.m.t-1,this.r2),V.t>this.m.t+1&&(V.t=this.m.t+1,V.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);V.compareTo(this.r2)<0;)V.dAddOffset(1,this.m.t+1);for(V.subTo(this.r2,V);V.compareTo(this.m)>=0;)V.subTo(this.m,V)}function Ct(V,K){V.squareTo(K),this.reduce(K)}function St(V,K,Q){V.multiplyTo(K,Q),this.reduce(Q)}ft.prototype.convert=vt,ft.prototype.revert=wt,ft.prototype.reduce=Et,ft.prototype.mulTo=St,ft.prototype.sqrTo=Ct;function kt(V,K){var Q=V.bitLength(),se,ge=w(1),ve;if(Q<=0)return ge;Q<18?se=1:Q<48?se=3:Q<144?se=4:Q<768?se=5:se=6,Q<8?ve=new re(K):K.isEven()?ve=new ft(K):ve=new Y(K);var we=new Array,xe=3,De=se-1,rt=(1<<se)-1;if(we[1]=ve.convert(this),se>1){var st=o();for(ve.sqrTo(we[1],st);xe<=rt;)we[xe]=o(),ve.mulTo(st,we[xe-2],we[xe]),xe+=2}var at=V.t-1,ut,yt=!0,ct=o(),lt;for(Q=O(V.data[at])-1;at>=0;){for(Q>=De?ut=V.data[at]>>Q-De&rt:(ut=(V.data[at]&(1<<Q+1)-1)<<De-Q,at>0&&(ut|=V.data[at-1]>>this.DB+Q-De)),xe=se;(ut&1)==0;)ut>>=1,--xe;if((Q-=xe)<0&&(Q+=this.DB,--at),yt)we[ut].copyTo(ge),yt=!1;else{for(;xe>1;)ve.sqrTo(ge,ct),ve.sqrTo(ct,ge),xe-=2;xe>0?ve.sqrTo(ge,ct):(lt=ge,ge=ct,ct=lt),ve.mulTo(ct,we[ut],ge)}for(;at>=0&&(V.data[at]&1<<Q)==0;)ve.sqrTo(ge,ct),lt=ge,ge=ct,ct=lt,--Q<0&&(Q=this.DB-1,--at)}return ve.revert(ge)}function Tt(V){var K=this.s<0?this.negate():this.clone(),Q=V.s<0?V.negate():V.clone();if(K.compareTo(Q)<0){var se=K;K=Q,Q=se}var ge=K.getLowestSetBit(),ve=Q.getLowestSetBit();if(ve<0)return K;for(ge<ve&&(ve=ge),ve>0&&(K.rShiftTo(ve,K),Q.rShiftTo(ve,Q));K.signum()>0;)(ge=K.getLowestSetBit())>0&&K.rShiftTo(ge,K),(ge=Q.getLowestSetBit())>0&&Q.rShiftTo(ge,Q),K.compareTo(Q)>=0?(K.subTo(Q,K),K.rShiftTo(1,K)):(Q.subTo(K,Q),Q.rShiftTo(1,Q));return ve>0&&Q.lShiftTo(ve,Q),Q}function At(V){if(V<=0)return 0;var K=this.DV%V,Q=this.s<0?V-1:0;if(this.t>0)if(K==0)Q=this.data[0]%V;else for(var se=this.t-1;se>=0;--se)Q=(K*Q+this.data[se])%V;return Q}function It(V){if(this.signum()==0)return m.ZERO;var K=V.isEven();if(this.isEven()&&K||V.signum()==0)return m.ZERO;for(var Q=V.clone(),se=this.clone(),ge=w(1),ve=w(0),we=w(0),xe=w(1);Q.signum()!=0;){for(;Q.isEven();)Q.rShiftTo(1,Q),K?((!ge.isEven()||!ve.isEven())&&(ge.addTo(this,ge),ve.subTo(V,ve)),ge.rShiftTo(1,ge)):ve.isEven()||ve.subTo(V,ve),ve.rShiftTo(1,ve);for(;se.isEven();)se.rShiftTo(1,se),K?((!we.isEven()||!xe.isEven())&&(we.addTo(this,we),xe.subTo(V,xe)),we.rShiftTo(1,we)):xe.isEven()||xe.subTo(V,xe),xe.rShiftTo(1,xe);Q.compareTo(se)>=0?(Q.subTo(se,Q),K&&ge.subTo(we,ge),ve.subTo(xe,ve)):(se.subTo(Q,se),K&&we.subTo(ge,we),xe.subTo(ve,xe))}if(se.compareTo(m.ONE)!=0)return m.ZERO;if(xe.compareTo(V)>=0)return xe.subtract(V);if(xe.signum()<0)xe.addTo(V,xe);else return xe;return xe.signum()<0?xe.add(V):xe}var ot=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Bt=(1<<26)/ot[ot.length-1];function Rt(V){var K,Q=this.abs();if(Q.t==1&&Q.data[0]<=ot[ot.length-1]){for(K=0;K<ot.length;++K)if(Q.data[0]==ot[K])return!0;return!1}if(Q.isEven())return!1;for(K=1;K<ot.length;){for(var se=ot[K],ge=K+1;ge<ot.length&&se<Bt;)se*=ot[ge++];for(se=Q.modInt(se);K<ge;)if(se%ot[K++]==0)return!1}return Q.millerRabin(V)}function Ot(V){var K=this.subtract(m.ONE),Q=K.getLowestSetBit();if(Q<=0)return!1;for(var se=K.shiftRight(Q),ge=Nt(),ve,we=0;we<V;++we){do ve=new m(this.bitLength(),ge);while(ve.compareTo(m.ONE)<=0||ve.compareTo(K)>=0);var xe=ve.modPow(se,this);if(xe.compareTo(m.ONE)!=0&&xe.compareTo(K)!=0){for(var De=1;De++<Q&&xe.compareTo(K)!=0;)if(xe=xe.modPowInt(2,this),xe.compareTo(m.ONE)==0)return!1;if(xe.compareTo(K)!=0)return!1}}return!0}function Nt(){return{nextBytes:function(V){for(var K=0;K<V.length;++K)V[K]=Math.floor(Math.random()*256)}}}m.prototype.chunkSize=ue,m.prototype.toRadix=me,m.prototype.fromRadix=be,m.prototype.fromNumber=ye,m.prototype.bitwiseTo=Ae,m.prototype.changeBit=He,m.prototype.addTo=Qe,m.prototype.dMultiply=Ze,m.prototype.dAddOffset=$e,m.prototype.multiplyLowerTo=pt,m.prototype.multiplyUpperTo=ht,m.prototype.modInt=At,m.prototype.millerRabin=Ot,m.prototype.clone=ee,m.prototype.intValue=q,m.prototype.byteValue=J,m.prototype.shortValue=pe,m.prototype.signum=ae,m.prototype.toByteArray=_e,m.prototype.equals=Oe,m.prototype.min=Ee,m.prototype.max=Te,m.prototype.and=Ie,m.prototype.or=Pe,m.prototype.xor=Ue,m.prototype.andNot=le,m.prototype.not=ke,m.prototype.shiftLeft=Be,m.prototype.shiftRight=Re,m.prototype.getLowestSetBit=et,m.prototype.bitCount=tt,m.prototype.testBit=nt,m.prototype.setBit=Me,m.prototype.clearBit=Le,m.prototype.flipBit=Ye,m.prototype.add=Xe,m.prototype.subtract=qe,m.prototype.multiply=Ke,m.prototype.divide=We,m.prototype.remainder=Ge,m.prototype.divideAndRemainder=Je,m.prototype.modPow=kt,m.prototype.modInverse=It,m.prototype.pow=mt,m.prototype.gcd=Tt,m.prototype.isProbablePrime=Rt,m.prototype.square=Ve},9477:(S,_,u)=>{var n=u(8561);u(7456),u(2055),u(9592),S.exports=n.kem=n.kem||{};var t=n.jsbn.BigInteger;n.kem.rsa={},n.kem.rsa.create=function(l,m){m=m||{};var o=m.prng||n.random,i={};return i.encrypt=function(a,e){var r=Math.ceil(a.n.bitLength()/8),p;do p=new t(n.util.bytesToHex(o.getBytesSync(r)),16).mod(a.n);while(p.compareTo(t.ONE)<=0);p=n.util.hexToBytes(p.toString(16));var f=r-p.length;f>0&&(p=n.util.fillString("\0",f)+p);var s=a.encrypt(p,"NONE"),g=l.generate(p,e);return{encapsulation:s,key:g}},i.decrypt=function(a,e,r){var p=a.decrypt(e,"NONE");return l.generate(p,r)},i},n.kem.kdf1=function(l,m){c(this,l,0,m||l.digestLength)},n.kem.kdf2=function(l,m){c(this,l,1,m||l.digestLength)};function c(l,m,o,i){l.generate=function(a,e){for(var r=new n.util.ByteBuffer,p=Math.ceil(e/i)+o,f=new n.util.ByteBuffer,s=o;s<p;++s){f.putInt32(s),m.start(),m.update(a+f.getBytes());var g=m.digest();r.putBytes(g.getBytes(i))}return r.truncate(r.length()-e),r.getBytes()}}},8388:(S,_,u)=>{var n=u(8561);u(7456),S.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var t={},c=[],l=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var m=0;m<n.log.levels.length;++m){var o=n.log.levels[m];t[o]={index:m,name:o.toUpperCase()}}n.log.logMessage=function(s){for(var g=t[s.level].index,h=0;h<c.length;++h){var v=c[h];if(v.flags&n.log.NO_LEVEL_CHECK)v.f(s);else{var b=t[v.level].index;g<=b&&v.f(v,s)}}},n.log.prepareStandard=function(s){"standard"in s||(s.standard=t[s.level].name+" ["+s.category+"] "+s.message)},n.log.prepareFull=function(s){if(!("full"in s)){var g=[s.message];g=g.concat([]),s.full=n.util.format.apply(this,g)}},n.log.prepareStandardFull=function(s){"standardFull"in s||(n.log.prepareStandard(s),s.standardFull=s.standard)};for(var i=["error","warning","info","debug","verbose"],m=0;m<i.length;++m)(function(g){n.log[g]=function(h,v){var b=Array.prototype.slice.call(arguments).slice(2),d={timestamp:new Date,level:g,category:h,message:v,arguments:b};n.log.logMessage(d)}})(i[m]);if(n.log.makeLogger=function(s){var g={flags:0,f:s};return n.log.setLevel(g,"none"),g},n.log.setLevel=function(s,g){var h=!1;if(s&&!(s.flags&n.log.LEVEL_LOCKED))for(var v=0;v<n.log.levels.length;++v){var b=n.log.levels[v];if(g==b){s.level=g,h=!0;break}}return h},n.log.lock=function(s,g){typeof g>"u"||g?s.flags|=n.log.LEVEL_LOCKED:s.flags&=~n.log.LEVEL_LOCKED},n.log.addLogger=function(s){c.push(s)},typeof console<"u"&&"log"in console){var a;if(console.error&&console.warn&&console.info&&console.debug){var e={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},r=function(s,g){n.log.prepareStandard(g);var h=e[g.level],v=[g.standard];v=v.concat(g.arguments.slice()),h.apply(console,v)};a=n.log.makeLogger(r)}else{var r=function(g,h){n.log.prepareStandardFull(h),console.log(h.standardFull)};a=n.log.makeLogger(r)}n.log.setLevel(a,"debug"),n.log.addLogger(a),l=a}else console={log:function(){}};if(l!==null&&typeof window<"u"&&window.location){var p=new URL(window.location.href).searchParams;if(p.has("console.level")&&n.log.setLevel(l,p.get("console.level").slice(-1)[0]),p.has("console.lock")){var f=p.get("console.lock").slice(-1)[0];f=="true"&&n.log.lock(l)}}n.log.consoleLogger=l},5472:(S,_,u)=>{S.exports=u(6777),u(6138),u(6485),u(855),u(2734)},6777:(S,_,u)=>{var n=u(8561);S.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},6138:(S,_,u)=>{var n=u(8561);u(6777),u(7456);var t=S.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=t,t.create=function(){i||a();var r=null,p=n.util.createBuffer(),f=new Array(16),s={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return s.start=function(){s.messageLength=0,s.fullMessageLength=s.messageLength64=[];for(var g=s.messageLengthSize/4,h=0;h<g;++h)s.fullMessageLength.push(0);return p=n.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},s},s.start(),s.update=function(g,h){h==="utf8"&&(g=n.util.encodeUtf8(g));var v=g.length;s.messageLength+=v,v=[v/4294967296>>>0,v>>>0];for(var b=s.fullMessageLength.length-1;b>=0;--b)s.fullMessageLength[b]+=v[1],v[1]=v[0]+(s.fullMessageLength[b]/4294967296>>>0),s.fullMessageLength[b]=s.fullMessageLength[b]>>>0,v[0]=v[1]/4294967296>>>0;return p.putBytes(g),e(r,f,p),(p.read>2048||p.length()===0)&&p.compact(),s},s.digest=function(){var g=n.util.createBuffer();g.putBytes(p.bytes());var h=s.fullMessageLength[s.fullMessageLength.length-1]+s.messageLengthSize,v=h&s.blockLength-1;g.putBytes(c.substr(0,s.blockLength-v));for(var b,d=0,w=s.fullMessageLength.length-1;w>=0;--w)b=s.fullMessageLength[w]*8+d,d=b/4294967296>>>0,g.putInt32Le(b>>>0);var k={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3};e(k,f,g);var R=n.util.createBuffer();return R.putInt32Le(k.h0),R.putInt32Le(k.h1),R.putInt32Le(k.h2),R.putInt32Le(k.h3),R},s};var c=null,l=null,m=null,o=null,i=!1;function a(){c="\x80",c+=n.util.fillString("\0",64),l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],o=new Array(64);for(var r=0;r<64;++r)o[r]=Math.floor(Math.abs(Math.sin(r+1))*4294967296);i=!0}function e(r,p,f){for(var s,g,h,v,b,d,w,k,R=f.length();R>=64;){for(g=r.h0,h=r.h1,v=r.h2,b=r.h3,k=0;k<16;++k)p[k]=f.getInt32Le(),d=b^h&(v^b),s=g+d+o[k]+p[k],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;for(;k<32;++k)d=v^b&(h^v),s=g+d+o[k]+p[l[k]],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;for(;k<48;++k)d=h^v^b,s=g+d+o[k]+p[l[k]],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;for(;k<64;++k)d=v^(h|~b),s=g+d+o[k]+p[l[k]],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;r.h0=r.h0+g|0,r.h1=r.h1+h|0,r.h2=r.h2+v|0,r.h3=r.h3+b|0,R-=64}}},7220:(S,_,u)=>{var n=u(8561);u(2893),S.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},2893:(S,_,u)=>{var n=u(8561);u(7456),n.mgf=n.mgf||{};var t=S.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{};t.create=function(c){var l={generate:function(m,o){for(var i=new n.util.ByteBuffer,a=Math.ceil(o/c.digestLength),e=0;e<a;e++){var r=new n.util.ByteBuffer;r.putInt32(e),c.start(),c.update(m+r.getBytes()),i.putBuffer(c.digest())}return i.truncate(i.length()-o),i.getBytes()}};return l}},245:(S,_,u)=>{var n=u(8561);n.pki=n.pki||{};var t=S.exports=n.pki.oids=n.oids=n.oids||{};function c(m,o){t[m]=o,t[o]=m}function l(m,o){t[m]=o}c("1.2.840.113549.1.1.1","rsaEncryption"),c("1.2.840.113549.1.1.4","md5WithRSAEncryption"),c("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),c("1.2.840.113549.1.1.7","RSAES-OAEP"),c("1.2.840.113549.1.1.8","mgf1"),c("1.2.840.113549.1.1.9","pSpecified"),c("1.2.840.113549.1.1.10","RSASSA-PSS"),c("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),c("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),c("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),c("1.3.101.112","EdDSA25519"),c("1.2.840.10040.4.3","dsa-with-sha1"),c("1.3.14.3.2.7","desCBC"),c("1.3.14.3.2.26","sha1"),c("1.3.14.3.2.29","sha1WithRSASignature"),c("2.16.840.1.101.3.4.2.1","sha256"),c("2.16.840.1.101.3.4.2.2","sha384"),c("2.16.840.1.101.3.4.2.3","sha512"),c("2.16.840.1.101.3.4.2.4","sha224"),c("2.16.840.1.101.3.4.2.5","sha512-224"),c("2.16.840.1.101.3.4.2.6","sha512-256"),c("1.2.840.113549.2.2","md2"),c("1.2.840.113549.2.5","md5"),c("1.2.840.113549.1.7.1","data"),c("1.2.840.113549.1.7.2","signedData"),c("1.2.840.113549.1.7.3","envelopedData"),c("1.2.840.113549.1.7.4","signedAndEnvelopedData"),c("1.2.840.113549.1.7.5","digestedData"),c("1.2.840.113549.1.7.6","encryptedData"),c("1.2.840.113549.1.9.1","emailAddress"),c("1.2.840.113549.1.9.2","unstructuredName"),c("1.2.840.113549.1.9.3","contentType"),c("1.2.840.113549.1.9.4","messageDigest"),c("1.2.840.113549.1.9.5","signingTime"),c("1.2.840.113549.1.9.6","counterSignature"),c("1.2.840.113549.1.9.7","challengePassword"),c("1.2.840.113549.1.9.8","unstructuredAddress"),c("1.2.840.113549.1.9.14","extensionRequest"),c("1.2.840.113549.1.9.20","friendlyName"),c("1.2.840.113549.1.9.21","localKeyId"),c("1.2.840.113549.1.9.22.1","x509Certificate"),c("1.2.840.113549.1.12.10.1.1","keyBag"),c("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),c("1.2.840.113549.1.12.10.1.3","certBag"),c("1.2.840.113549.1.12.10.1.4","crlBag"),c("1.2.840.113549.1.12.10.1.5","secretBag"),c("1.2.840.113549.1.12.10.1.6","safeContentsBag"),c("1.2.840.113549.1.5.13","pkcs5PBES2"),c("1.2.840.113549.1.5.12","pkcs5PBKDF2"),c("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),c("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),c("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),c("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),c("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),c("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),c("1.2.840.113549.2.7","hmacWithSHA1"),c("1.2.840.113549.2.8","hmacWithSHA224"),c("1.2.840.113549.2.9","hmacWithSHA256"),c("1.2.840.113549.2.10","hmacWithSHA384"),c("1.2.840.113549.2.11","hmacWithSHA512"),c("1.2.840.113549.3.7","des-EDE3-CBC"),c("2.16.840.1.101.3.4.1.2","aes128-CBC"),c("2.16.840.1.101.3.4.1.22","aes192-CBC"),c("2.16.840.1.101.3.4.1.42","aes256-CBC"),c("2.5.4.3","commonName"),c("2.5.4.4","surname"),c("2.5.4.5","serialNumber"),c("2.5.4.6","countryName"),c("2.5.4.7","localityName"),c("2.5.4.8","stateOrProvinceName"),c("2.5.4.9","streetAddress"),c("2.5.4.10","organizationName"),c("2.5.4.11","organizationalUnitName"),c("2.5.4.12","title"),c("2.5.4.13","description"),c("2.5.4.15","businessCategory"),c("2.5.4.17","postalCode"),c("2.5.4.42","givenName"),c("2.5.4.65","pseudonym"),c("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),c("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),c("2.16.840.1.113730.1.1","nsCertType"),c("2.16.840.1.113730.1.13","nsComment"),l("2.5.29.1","authorityKeyIdentifier"),l("2.5.29.2","keyAttributes"),l("2.5.29.3","certificatePolicies"),l("2.5.29.4","keyUsageRestriction"),l("2.5.29.5","policyMapping"),l("2.5.29.6","subtreesConstraint"),l("2.5.29.7","subjectAltName"),l("2.5.29.8","issuerAltName"),l("2.5.29.9","subjectDirectoryAttributes"),l("2.5.29.10","basicConstraints"),l("2.5.29.11","nameConstraints"),l("2.5.29.12","policyConstraints"),l("2.5.29.13","basicConstraints"),c("2.5.29.14","subjectKeyIdentifier"),c("2.5.29.15","keyUsage"),l("2.5.29.16","privateKeyUsagePeriod"),c("2.5.29.17","subjectAltName"),c("2.5.29.18","issuerAltName"),c("2.5.29.19","basicConstraints"),l("2.5.29.20","cRLNumber"),l("2.5.29.21","cRLReason"),l("2.5.29.22","expirationDate"),l("2.5.29.23","instructionCode"),l("2.5.29.24","invalidityDate"),l("2.5.29.25","cRLDistributionPoints"),l("2.5.29.26","issuingDistributionPoint"),l("2.5.29.27","deltaCRLIndicator"),l("2.5.29.28","issuingDistributionPoint"),l("2.5.29.29","certificateIssuer"),l("2.5.29.30","nameConstraints"),c("2.5.29.31","cRLDistributionPoints"),c("2.5.29.32","certificatePolicies"),l("2.5.29.33","policyMappings"),l("2.5.29.34","policyConstraints"),c("2.5.29.35","authorityKeyIdentifier"),l("2.5.29.36","policyConstraints"),c("2.5.29.37","extKeyUsage"),l("2.5.29.46","freshestCRL"),l("2.5.29.54","inhibitAnyPolicy"),c("1.3.6.1.4.1.11129.2.4.2","timestampList"),c("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),c("1.3.6.1.5.5.7.3.1","serverAuth"),c("1.3.6.1.5.5.7.3.2","clientAuth"),c("1.3.6.1.5.5.7.3.3","codeSigning"),c("1.3.6.1.5.5.7.3.4","emailProtection"),c("1.3.6.1.5.5.7.3.8","timeStamping")},6959:(S,_,u)=>{var n=u(8561);if(u(9445),u(7357),u(5918),u(6777),u(245),u(9429),u(492),u(2055),u(9274),u(2804),u(7456),typeof t>"u")var t=n.jsbn.BigInteger;var c=n.asn1,l=n.pki=n.pki||{};S.exports=l.pbe=n.pbe=n.pbe||{};var m=l.oids,o={name:"EncryptedPrivateKeyInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},i={name:"PBES2Algorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},a={name:"pkcs-12PbeParams",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(s,g,h){h=h||{},h.saltSize=h.saltSize||8,h.count=h.count||2048,h.algorithm=h.algorithm||"aes128",h.prfAlgorithm=h.prfAlgorithm||"sha1";var v=n.random.getBytesSync(h.saltSize),b=h.count,d=c.integerToDer(b),w,k,R;if(h.algorithm.indexOf("aes")===0||h.algorithm==="des"){var T,I,C;switch(h.algorithm){case"aes128":w=16,T=16,I=m["aes128-CBC"],C=n.aes.createEncryptionCipher;break;case"aes192":w=24,T=16,I=m["aes192-CBC"],C=n.aes.createEncryptionCipher;break;case"aes256":w=32,T=16,I=m["aes256-CBC"],C=n.aes.createEncryptionCipher;break;case"des":w=8,T=8,I=m.desCBC,C=n.des.createEncryptionCipher;break;default:var A=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw A.algorithm=h.algorithm,A}var O="hmacWith"+h.prfAlgorithm.toUpperCase(),E=p(O),P=n.pkcs5.pbkdf2(g,v,b,w,E),N=n.random.getBytesSync(T),j=C(P);j.start(N),j.update(c.toDer(s)),j.finish(),R=j.output.getBytes();var M=f(v,d,w,O);k=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(m.pkcs5PBES2).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(m.pkcs5PBKDF2).getBytes()),M]),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(I).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,N)])])])}else if(h.algorithm==="3des"){w=24;var z=new n.util.ByteBuffer(v),P=l.pbe.generatePkcs12Key(g,z,1,b,w),N=l.pbe.generatePkcs12Key(g,z,2,b,w),j=n.des.createEncryptionCipher(P);j.start(N),j.update(c.toDer(s)),j.finish(),R=j.output.getBytes(),k=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(m["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,v),c.create(c.Class.UNIVERSAL,c.Type.INTEGER,!1,d.getBytes())])])}else{var A=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw A.algorithm=h.algorithm,A}var H=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[k,c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,R)]);return H},l.decryptPrivateKeyInfo=function(s,g){var h=null,v={},b=[];if(!c.validate(s,o,v,b)){var d=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw d.errors=b,d}var w=c.derToOid(v.encryptionOid),k=l.pbe.getCipher(w,v.encryptionParams,g),R=n.util.createBuffer(v.encryptedData);return k.update(R),k.finish()&&(h=c.fromDer(k.output)),h},l.encryptedPrivateKeyToPem=function(s,g){var h={type:"ENCRYPTED PRIVATE KEY",body:c.toDer(s).getBytes()};return n.pem.encode(h,{maxline:g})},l.encryptedPrivateKeyFromPem=function(s){var g=n.pem.decode(s)[0];if(g.type!=="ENCRYPTED PRIVATE KEY"){var h=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw h.headerType=g.type,h}if(g.procType&&g.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return c.fromDer(g.body)},l.encryptRsaPrivateKey=function(s,g,h){if(h=h||{},!h.legacy){var v=l.wrapRsaPrivateKey(l.privateKeyToAsn1(s));return v=l.encryptPrivateKeyInfo(v,g,h),l.encryptedPrivateKeyToPem(v)}var b,d,w,k;switch(h.algorithm){case"aes128":b="AES-128-CBC",w=16,d=n.random.getBytesSync(16),k=n.aes.createEncryptionCipher;break;case"aes192":b="AES-192-CBC",w=24,d=n.random.getBytesSync(16),k=n.aes.createEncryptionCipher;break;case"aes256":b="AES-256-CBC",w=32,d=n.random.getBytesSync(16),k=n.aes.createEncryptionCipher;break;case"3des":b="DES-EDE3-CBC",w=24,d=n.random.getBytesSync(8),k=n.des.createEncryptionCipher;break;case"des":b="DES-CBC",w=8,d=n.random.getBytesSync(8),k=n.des.createEncryptionCipher;break;default:var R=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+h.algorithm+'".');throw R.algorithm=h.algorithm,R}var T=n.pbe.opensslDeriveBytes(g,d.substr(0,8),w),I=k(T);I.start(d),I.update(c.toDer(l.privateKeyToAsn1(s))),I.finish();var C={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:b,parameters:n.util.bytesToHex(d).toUpperCase()},body:I.output.getBytes()};return n.pem.encode(C)},l.decryptRsaPrivateKey=function(s,g){var h=null,v=n.pem.decode(s)[0];if(v.type!=="ENCRYPTED PRIVATE KEY"&&v.type!=="PRIVATE KEY"&&v.type!=="RSA PRIVATE KEY"){var b=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw b.headerType=b,b}if(v.procType&&v.procType.type==="ENCRYPTED"){var d,w;switch(v.dekInfo.algorithm){case"DES-CBC":d=8,w=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":d=24,w=n.des.createDecryptionCipher;break;case"AES-128-CBC":d=16,w=n.aes.createDecryptionCipher;break;case"AES-192-CBC":d=24,w=n.aes.createDecryptionCipher;break;case"AES-256-CBC":d=32,w=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":d=5,w=function(C){return n.rc2.createDecryptionCipher(C,40)};break;case"RC2-64-CBC":d=8,w=function(C){return n.rc2.createDecryptionCipher(C,64)};break;case"RC2-128-CBC":d=16,w=function(C){return n.rc2.createDecryptionCipher(C,128)};break;default:var b=new Error('Could not decrypt private key; unsupported encryption algorithm "'+v.dekInfo.algorithm+'".');throw b.algorithm=v.dekInfo.algorithm,b}var k=n.util.hexToBytes(v.dekInfo.parameters),R=n.pbe.opensslDeriveBytes(g,k.substr(0,8),d),T=w(R);if(T.start(k),T.update(n.util.createBuffer(v.body)),T.finish())h=T.output.getBytes();else return h}else h=v.body;return v.type==="ENCRYPTED PRIVATE KEY"?h=l.decryptPrivateKeyInfo(c.fromDer(h),g):h=c.fromDer(h),h!==null&&(h=l.privateKeyFromAsn1(h)),h},l.pbe.generatePkcs12Key=function(s,g,h,v,b,d){var w,k;if(typeof d>"u"||d===null){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');d=n.md.sha1.create()}var R=d.digestLength,T=d.blockLength,I=new n.util.ByteBuffer,C=new n.util.ByteBuffer;if(s!=null){for(k=0;k<s.length;k++)C.putInt16(s.charCodeAt(k));C.putInt16(0)}var A=C.length(),O=g.length(),E=new n.util.ByteBuffer;E.fillWithByte(h,T);var P=T*Math.ceil(O/T),N=new n.util.ByteBuffer;for(k=0;k<P;k++)N.putByte(g.at(k%O));var j=T*Math.ceil(A/T),M=new n.util.ByteBuffer;for(k=0;k<j;k++)M.putByte(C.at(k%A));var z=N;z.putBuffer(M);for(var H=Math.ceil(b/R),X=1;X<=H;X++){var F=new n.util.ByteBuffer;F.putBytes(E.bytes()),F.putBytes(z.bytes());for(var Z=0;Z<v;Z++)d.start(),d.update(F.getBytes()),F=d.digest();var re=new n.util.ByteBuffer;for(k=0;k<T;k++)re.putByte(F.at(k%R));var oe=Math.ceil(O/T)+Math.ceil(A/T),he=new n.util.ByteBuffer;for(w=0;w<oe;w++){var de=new n.util.ByteBuffer(z.getBytes(T)),fe=511;for(k=re.length()-1;k>=0;k--)fe=fe>>8,fe+=re.at(k)+de.at(k),de.setAt(k,fe&255);he.putBuffer(de)}z=he,I.putBuffer(F)}return I.truncate(I.length()-b),I},l.pbe.getCipher=function(s,g,h){switch(s){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(s,g,h);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(s,g,h);default:var v=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw v.oid=s,v.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],v}},l.pbe.getCipherForPBES2=function(s,g,h){var v={},b=[];if(!c.validate(g,i,v,b)){var d=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw d.errors=b,d}if(s=c.derToOid(v.kdfOid),s!==l.oids.pkcs5PBKDF2){var d=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw d.oid=s,d.supportedOids=["pkcs5PBKDF2"],d}if(s=c.derToOid(v.encOid),s!==l.oids["aes128-CBC"]&&s!==l.oids["aes192-CBC"]&&s!==l.oids["aes256-CBC"]&&s!==l.oids["des-EDE3-CBC"]&&s!==l.oids.desCBC){var d=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw d.oid=s,d.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],d}var w=v.kdfSalt,k=n.util.createBuffer(v.kdfIterationCount);k=k.getInt(k.length()<<3);var R,T;switch(l.oids[s]){case"aes128-CBC":R=16,T=n.aes.createDecryptionCipher;break;case"aes192-CBC":R=24,T=n.aes.createDecryptionCipher;break;case"aes256-CBC":R=32,T=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":R=24,T=n.des.createDecryptionCipher;break;case"desCBC":R=8,T=n.des.createDecryptionCipher;break}var I=r(v.prfOid),C=n.pkcs5.pbkdf2(h,w,k,R,I),A=v.encIv,O=T(C);return O.start(A),O},l.pbe.getCipherForPKCS12PBE=function(s,g,h){var v={},b=[];if(!c.validate(g,a,v,b)){var d=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw d.errors=b,d}var w=n.util.createBuffer(v.salt),k=n.util.createBuffer(v.iterations);k=k.getInt(k.length()<<3);var R,T,I;switch(s){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:R=24,T=8,I=n.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:R=5,T=8,I=function(P,N){var j=n.rc2.createDecryptionCipher(P,40);return j.start(N,null),j};break;default:var d=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw d.oid=s,d}var C=r(v.prfOid),A=l.pbe.generatePkcs12Key(h,w,1,k,R,C);C.start();var O=l.pbe.generatePkcs12Key(h,w,2,k,T,C);return I(A,O)},l.pbe.opensslDeriveBytes=function(s,g,h,v){if(typeof v>"u"||v===null){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');v=n.md.md5.create()}g===null&&(g="");for(var b=[e(v,s+g)],d=16,w=1;d<h;++w,d+=16)b.push(e(v,b[w-1]+s+g));return b.join("").substr(0,h)};function e(s,g){return s.start().update(g).digest().getBytes()}function r(s){var g;if(!s)g="hmacWithSHA1";else if(g=l.oids[c.derToOid(s)],!g){var h=new Error("Unsupported PRF OID.");throw h.oid=s,h.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],h}return p(g)}function p(s){var g=n.md;switch(s){case"hmacWithSHA224":g=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":s=s.substr(8).toLowerCase();break;default:var h=new Error("Unsupported PRF algorithm.");throw h.algorithm=s,h.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],h}if(!g||!(s in g))throw new Error("Unknown hash algorithm: "+s);return g[s].create()}function f(s,g,h,v){var b=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,s),c.create(c.Class.UNIVERSAL,c.Type.INTEGER,!1,g.getBytes())]);return v!=="hmacWithSHA1"&&b.value.push(c.create(c.Class.UNIVERSAL,c.Type.INTEGER,!1,n.util.hexToBytes(h.toString(16))),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(l.oids[v]).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.NULL,!1,"")])),b}},9429:(S,_,u)=>{var n=u(8561);u(2007),u(6777),u(7456);var t=n.pkcs5=n.pkcs5||{},c;n.util.isNodejs&&!n.options.usePureJavaScript&&(c=u(6982)),S.exports=n.pbkdf2=t.pbkdf2=function(l,m,o,i,a,e){if(typeof a=="function"&&(e=a,a=null),n.util.isNodejs&&!n.options.usePureJavaScript&&c.pbkdf2&&(a===null||typeof a!="object")&&(c.pbkdf2Sync.length>4||!a||a==="sha1"))return typeof a!="string"&&(a="sha1"),l=Buffer.from(l,"binary"),m=Buffer.from(m,"binary"),e?c.pbkdf2Sync.length===4?c.pbkdf2(l,m,o,i,(function(I,C){if(I)return e(I);e(null,C.toString("binary"))})):c.pbkdf2(l,m,o,i,a,(function(I,C){if(I)return e(I);e(null,C.toString("binary"))})):c.pbkdf2Sync.length===4?c.pbkdf2Sync(l,m,o,i).toString("binary"):c.pbkdf2Sync(l,m,o,i,a).toString("binary");if((typeof a>"u"||a===null)&&(a="sha1"),typeof a=="string"){if(!(a in n.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=n.md[a].create()}var r=a.digestLength;if(i>4294967295*r){var p=new Error("Derived key is too long.");if(e)return e(p);throw p}var f=Math.ceil(i/r),s=i-(f-1)*r,g=n.hmac.create();g.start(a,l);var h="",v,b,d;if(!e){for(var w=1;w<=f;++w){g.start(null,null),g.update(m),g.update(n.util.int32ToBytes(w)),v=d=g.digest().getBytes();for(var k=2;k<=o;++k)g.start(null,null),g.update(d),b=g.digest().getBytes(),v=n.util.xorBytes(v,b,r),d=b;h+=w<f?v:v.substr(0,s)}return h}var w=1,k;function R(){if(w>f)return e(null,h);g.start(null,null),g.update(m),g.update(n.util.int32ToBytes(w)),v=d=g.digest().getBytes(),k=2,T()}function T(){if(k<=o)return g.start(null,null),g.update(d),b=g.digest().getBytes(),v=n.util.xorBytes(v,b,r),d=b,++k,n.util.setImmediate(T);h+=w<f?v:v.substr(0,s),++w,R()}R()}},492:(S,_,u)=>{var n=u(8561);u(7456);var t=S.exports=n.pem=n.pem||{};t.encode=function(m,o){o=o||{};var i="-----BEGIN "+m.type+`-----\r
|
|
234
|
+
`)}return m},_.decode=function(t,c){if(typeof t!="string")throw new TypeError('"input" must be a string.');if(typeof c!="string")throw new TypeError('"alphabet" must be a string.');var l=u[c];if(!l){l=u[c]=[];for(var m=0;m<c.length;++m)l[c.charCodeAt(m)]=m}t=t.replace(/\s/g,"");for(var o=c.length,i=c.charAt(0),a=[0],m=0;m<t.length;m++){var e=l[t.charCodeAt(m)];if(e===void 0)return;for(var r=0,p=e;r<a.length;++r)p+=a[r]*o,a[r]=p&255,p>>=8;for(;p>0;)a.push(p&255),p>>=8}for(var f=0;t[f]===i&&f<t.length-1;++f)a.push(0);return typeof Buffer<"u"?Buffer.from(a.reverse()):new Uint8Array(a.reverse())};function n(t,c){var l=0,m=c.length,o=c.charAt(0),i=[0];for(l=0;l<t.length();++l){for(var a=0,e=t.at(l);a<i.length;++a)e+=i[a]<<8,i[a]=e%m,e=e/m|0;for(;e>0;)i.push(e%m),e=e/m|0}var r="";for(l=0;t.at(l)===0&&l<t.length()-1;++l)r+=o;for(l=i.length-1;l>=0;--l)r+=c[i[l]];return r}},4723:(S,_,u)=>{var n=u(8561);u(7456),S.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(c,l){var m=c;if(typeof m=="string"&&(m=n.cipher.getAlgorithm(m),m&&(m=m())),!m)throw new Error("Unsupported algorithm: "+c);return new n.cipher.BlockCipher({algorithm:m,key:l,decrypt:!1})},n.cipher.createDecipher=function(c,l){var m=c;if(typeof m=="string"&&(m=n.cipher.getAlgorithm(m),m&&(m=m())),!m)throw new Error("Unsupported algorithm: "+c);return new n.cipher.BlockCipher({algorithm:m,key:l,decrypt:!0})},n.cipher.registerAlgorithm=function(c,l){c=c.toUpperCase(),n.cipher.algorithms[c]=l},n.cipher.getAlgorithm=function(c){return c=c.toUpperCase(),c in n.cipher.algorithms?n.cipher.algorithms[c]:null};var t=n.cipher.BlockCipher=function(c){this.algorithm=c.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=c.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=c.decrypt,this.algorithm.initialize(c)};t.prototype.start=function(c){c=c||{};var l={};for(var m in c)l[m]=c[m];l.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=c.output||n.util.createBuffer(),this.mode.start(l)},t.prototype.update=function(c){for(c&&this._input.putBuffer(c);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},t.prototype.finish=function(c){c&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(m){return c(this.blockSize,m,!1)},this.mode.unpad=function(m){return c(this.blockSize,m,!0)});var l={};return l.decrypt=this._decrypt,l.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,l)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,l))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,l))}},1203:(S,_,u)=>{var n=u(8561);u(7456),n.cipher=n.cipher||{};var t=S.exports=n.cipher.modes=n.cipher.modes||{};t.ecb=function(o){o=o||{},this.name="ECB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.ecb.prototype.start=function(o){},t.ecb.prototype.encrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=o.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._outBlock[e])},t.ecb.prototype.decrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=o.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._outBlock[e])},t.ecb.prototype.pad=function(o,i){var a=o.length()===this.blockSize?this.blockSize:this.blockSize-o.length();return o.fillWithByte(a,a),!0},t.ecb.prototype.unpad=function(o,i){if(i.overflow>0)return!1;var a=o.length(),e=o.at(a-1);return e>this.blockSize<<2?!1:(o.truncate(e),!0)},t.cbc=function(o){o=o||{},this.name="CBC",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.cbc.prototype.start=function(o){if(o.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in o)this._iv=c(o.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")},t.cbc.prototype.encrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=this._prev[e]^o.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._outBlock[e]);this._prev=this._outBlock},t.cbc.prototype.decrypt=function(o,i,a){if(o.length()<this.blockSize&&!(a&&o.length()>0))return!0;for(var e=0;e<this._ints;++e)this._inBlock[e]=o.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var e=0;e<this._ints;++e)i.putInt32(this._prev[e]^this._outBlock[e]);this._prev=this._inBlock.slice(0)},t.cbc.prototype.pad=function(o,i){var a=o.length()===this.blockSize?this.blockSize:this.blockSize-o.length();return o.fillWithByte(a,a),!0},t.cbc.prototype.unpad=function(o,i){if(i.overflow>0)return!1;var a=o.length(),e=o.at(a-1);return e>this.blockSize<<2?!1:(o.truncate(e),!0)},t.cfb=function(o){o=o||{},this.name="CFB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},t.cfb.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");this._iv=c(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.cfb.prototype.encrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)this._inBlock[r]=o.getInt32()^this._outBlock[r],i.putInt32(this._inBlock[r]);return}var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialBlock[r]=o.getInt32()^this._outBlock[r],this._partialOutput.putInt32(this._partialBlock[r]);if(p>0)o.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._partialBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0},t.cfb.prototype.decrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)this._inBlock[r]=o.getInt32(),i.putInt32(this._inBlock[r]^this._outBlock[r]);return}var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialBlock[r]=o.getInt32(),this._partialOutput.putInt32(this._partialBlock[r]^this._outBlock[r]);if(p>0)o.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._partialBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0},t.ofb=function(o){o=o||{},this.name="OFB",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},t.ofb.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");this._iv=c(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ofb.prototype.encrypt=function(o,i,a){var e=o.length();if(o.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)i.putInt32(o.getInt32()^this._outBlock[r]),this._inBlock[r]=this._outBlock[r];return}var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(o.getInt32()^this._outBlock[r]);if(p>0)o.read-=this.blockSize;else for(var r=0;r<this._ints;++r)this._inBlock[r]=this._outBlock[r];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0},t.ofb.prototype.decrypt=t.ofb.prototype.encrypt,t.ctr=function(o){o=o||{},this.name="CTR",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},t.ctr.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");this._iv=c(o.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ctr.prototype.encrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize)for(var r=0;r<this._ints;++r)i.putInt32(o.getInt32()^this._outBlock[r]);else{var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(o.getInt32()^this._outBlock[r]);if(p>0&&(o.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0}l(this._inBlock)},t.ctr.prototype.decrypt=t.ctr.prototype.encrypt,t.gcm=function(o){o=o||{},this.name="GCM",this.cipher=o.cipher,this.blockSize=o.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},t.gcm.prototype.start=function(o){if(!("iv"in o))throw new Error("Invalid IV parameter.");var i=n.util.createBuffer(o.iv);this._cipherLength=0;var a;if("additionalData"in o?a=n.util.createBuffer(o.additionalData):a=n.util.createBuffer(),"tagLength"in o?this._tagLength=o.tagLength:this._tagLength=128,this._tag=null,o.decrypt&&(this._tag=n.util.createBuffer(o.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var e=i.length();if(e===12)this._j0=[i.getInt32(),i.getInt32(),i.getInt32(),1];else{for(this._j0=[0,0,0,0];i.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[i.getInt32(),i.getInt32(),i.getInt32(),i.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(m(e*8)))}this._inBlock=this._j0.slice(0),l(this._inBlock),this._partialBytes=0,a=n.util.createBuffer(a),this._aDataLength=m(a.length()*8);var r=a.length()%this.blockSize;for(r&&a.fillWithByte(0,this.blockSize-r),this._s=[0,0,0,0];a.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()])},t.gcm.prototype.encrypt=function(o,i,a){var e=o.length();if(e===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&e>=this.blockSize){for(var r=0;r<this._ints;++r)i.putInt32(this._outBlock[r]^=o.getInt32());this._cipherLength+=this.blockSize}else{var p=(this.blockSize-e)%this.blockSize;p>0&&(p=this.blockSize-p),this._partialOutput.clear();for(var r=0;r<this._ints;++r)this._partialOutput.putInt32(o.getInt32()^this._outBlock[r]);if(p<=0||a){if(a){var f=e%this.blockSize;this._cipherLength+=f,this._partialOutput.truncate(this.blockSize-f)}else this._cipherLength+=this.blockSize;for(var r=0;r<this._ints;++r)this._outBlock[r]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),p>0&&!a)return o.read-=this.blockSize,i.putBytes(this._partialOutput.getBytes(p-this._partialBytes)),this._partialBytes=p,!0;i.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),l(this._inBlock)},t.gcm.prototype.decrypt=function(o,i,a){var e=o.length();if(e<this.blockSize&&!(a&&e>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),l(this._inBlock),this._hashBlock[0]=o.getInt32(),this._hashBlock[1]=o.getInt32(),this._hashBlock[2]=o.getInt32(),this._hashBlock[3]=o.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var r=0;r<this._ints;++r)i.putInt32(this._outBlock[r]^this._hashBlock[r]);e<this.blockSize?this._cipherLength+=e%this.blockSize:this._cipherLength+=this.blockSize},t.gcm.prototype.afterFinish=function(o,i){var a=!0;i.decrypt&&i.overflow&&o.truncate(this.blockSize-i.overflow),this.tag=n.util.createBuffer();var e=this._aDataLength.concat(m(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,e);var r=[];this.cipher.encrypt(this._j0,r);for(var p=0;p<this._ints;++p)this.tag.putInt32(this._s[p]^r[p]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),i.decrypt&&this.tag.bytes()!==this._tag&&(a=!1),a},t.gcm.prototype.multiply=function(o,i){for(var a=[0,0,0,0],e=i.slice(0),r=0;r<128;++r){var p=o[r/32|0]&1<<31-r%32;p&&(a[0]^=e[0],a[1]^=e[1],a[2]^=e[2],a[3]^=e[3]),this.pow(e,e)}return a},t.gcm.prototype.pow=function(o,i){for(var a=o[3]&1,e=3;e>0;--e)i[e]=o[e]>>>1|(o[e-1]&1)<<31;i[0]=o[0]>>>1,a&&(i[0]^=this._R)},t.gcm.prototype.tableMultiply=function(o){for(var i=[0,0,0,0],a=0;a<32;++a){var e=a/8|0,r=o[e]>>>(7-a%8)*4&15,p=this._m[a][r];i[0]^=p[0],i[1]^=p[1],i[2]^=p[2],i[3]^=p[3]}return i},t.gcm.prototype.ghash=function(o,i,a){return i[0]^=a[0],i[1]^=a[1],i[2]^=a[2],i[3]^=a[3],this.tableMultiply(i)},t.gcm.prototype.generateHashTable=function(o,i){for(var a=8/i,e=4*a,r=16*a,p=new Array(r),f=0;f<r;++f){var s=[0,0,0,0],g=f/e|0,h=(e-1-f%e)*i;s[g]=1<<i-1<<h,p[f]=this.generateSubHashTable(this.multiply(s,o),i)}return p},t.gcm.prototype.generateSubHashTable=function(o,i){var a=1<<i,e=a>>>1,r=new Array(a);r[e]=o.slice(0);for(var p=e>>>1;p>0;)this.pow(r[2*p],r[p]=[]),p>>=1;for(p=2;p<e;){for(var f=1;f<p;++f){var s=r[p],g=r[f];r[p+f]=[s[0]^g[0],s[1]^g[1],s[2]^g[2],s[3]^g[3]]}p*=2}for(r[0]=[0,0,0,0],p=e+1;p<a;++p){var h=r[p^e];r[p]=[o[0]^h[0],o[1]^h[1],o[2]^h[2],o[3]^h[3]]}return r};function c(o,i){if(typeof o=="string"&&(o=n.util.createBuffer(o)),n.util.isArray(o)&&o.length>4){var a=o;o=n.util.createBuffer();for(var e=0;e<a.length;++e)o.putByte(a[e])}if(o.length()<i)throw new Error("Invalid IV length; got "+o.length()+" bytes and expected "+i+" bytes.");if(!n.util.isArray(o)){for(var r=[],p=i/4,e=0;e<p;++e)r.push(o.getInt32());o=r}return o}function l(o){o[o.length-1]=o[o.length-1]+1&4294967295}function m(o){return[o/4294967296|0,o&4294967295]}},5918:(S,_,u)=>{var n=u(8561);u(4723),u(1203),u(7456),S.exports=n.des=n.des||{},n.des.startEncrypting=function(g,h,v,b){var d=s({key:g,output:v,decrypt:!1,mode:b||(h===null?"ECB":"CBC")});return d.start(h),d},n.des.createEncryptionCipher=function(g,h){return s({key:g,output:null,decrypt:!1,mode:h})},n.des.startDecrypting=function(g,h,v,b){var d=s({key:g,output:v,decrypt:!0,mode:b||(h===null?"ECB":"CBC")});return d.start(h),d},n.des.createDecryptionCipher=function(g,h){return s({key:g,output:null,decrypt:!0,mode:h})},n.des.Algorithm=function(g,h){var v=this;v.name=g,v.mode=new h({blockSize:8,cipher:{encrypt:function(b,d){return f(v._keys,b,d,!1)},decrypt:function(b,d){return f(v._keys,b,d,!0)}}}),v._init=!1},n.des.Algorithm.prototype.initialize=function(g){if(!this._init){var h=n.util.createBuffer(g.key);if(this.name.indexOf("3DES")===0&&h.length()!==24)throw new Error("Invalid Triple-DES key size: "+h.length()*8);this._keys=p(h),this._init=!0}},t("DES-ECB",n.cipher.modes.ecb),t("DES-CBC",n.cipher.modes.cbc),t("DES-CFB",n.cipher.modes.cfb),t("DES-OFB",n.cipher.modes.ofb),t("DES-CTR",n.cipher.modes.ctr),t("3DES-ECB",n.cipher.modes.ecb),t("3DES-CBC",n.cipher.modes.cbc),t("3DES-CFB",n.cipher.modes.cfb),t("3DES-OFB",n.cipher.modes.ofb),t("3DES-CTR",n.cipher.modes.ctr);function t(g,h){var v=function(){return new n.des.Algorithm(g,h)};n.cipher.registerAlgorithm(g,v)}var c=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],l=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],o=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],i=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],a=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],e=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],r=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(g){for(var h=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],v=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],b=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],d=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],w=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],R=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],T=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],I=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],C=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],A=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],O=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],E=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],P=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],N=g.length()>8?3:1,j=[],M=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],z=0,H,X=0;X<N;X++){var F=g.getInt32(),Z=g.getInt32();H=(F>>>4^Z)&252645135,Z^=H,F^=H<<4,H=(Z>>>-16^F)&65535,F^=H,Z^=H<<-16,H=(F>>>2^Z)&858993459,Z^=H,F^=H<<2,H=(Z>>>-16^F)&65535,F^=H,Z^=H<<-16,H=(F>>>1^Z)&1431655765,Z^=H,F^=H<<1,H=(Z>>>8^F)&16711935,F^=H,Z^=H<<8,H=(F>>>1^Z)&1431655765,Z^=H,F^=H<<1,H=F<<8|Z>>>20&240,F=Z<<24|Z<<8&16711680|Z>>>8&65280|Z>>>24&240,Z=H;for(var re=0;re<M.length;++re){M[re]?(F=F<<2|F>>>26,Z=Z<<2|Z>>>26):(F=F<<1|F>>>27,Z=Z<<1|Z>>>27),F&=-15,Z&=-15;var oe=h[F>>>28]|v[F>>>24&15]|b[F>>>20&15]|d[F>>>16&15]|w[F>>>12&15]|k[F>>>8&15]|R[F>>>4&15],he=T[Z>>>28]|I[Z>>>24&15]|C[Z>>>20&15]|A[Z>>>16&15]|O[Z>>>12&15]|E[Z>>>8&15]|P[Z>>>4&15];H=(he>>>16^oe)&65535,j[z++]=oe^H,j[z++]=he^H<<16}}return j}function f(g,h,v,b){var d=g.length===32?3:9,w;d===3?w=b?[30,-2,-2]:[0,32,2]:w=b?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var k,R=h[0],T=h[1];k=(R>>>4^T)&252645135,T^=k,R^=k<<4,k=(R>>>16^T)&65535,T^=k,R^=k<<16,k=(T>>>2^R)&858993459,R^=k,T^=k<<2,k=(T>>>8^R)&16711935,R^=k,T^=k<<8,k=(R>>>1^T)&1431655765,T^=k,R^=k<<1,R=R<<1|R>>>31,T=T<<1|T>>>31;for(var I=0;I<d;I+=3){for(var C=w[I+1],A=w[I+2],O=w[I];O!=C;O+=A){var E=T^g[O],P=(T>>>4|T<<28)^g[O+1];k=R,R=T,T=k^(l[E>>>24&63]|o[E>>>16&63]|a[E>>>8&63]|r[E&63]|c[P>>>24&63]|m[P>>>16&63]|i[P>>>8&63]|e[P&63])}k=R,R=T,T=k}R=R>>>1|R<<31,T=T>>>1|T<<31,k=(R>>>1^T)&1431655765,T^=k,R^=k<<1,k=(T>>>8^R)&16711935,R^=k,T^=k<<8,k=(T>>>2^R)&858993459,R^=k,T^=k<<2,k=(R>>>16^T)&65535,T^=k,R^=k<<16,k=(R>>>4^T)&252645135,T^=k,R^=k<<4,v[0]=R,v[1]=T}function s(g){g=g||{};var h=(g.mode||"CBC").toUpperCase(),v="DES-"+h,b;g.decrypt?b=n.cipher.createDecipher(v,g.key):b=n.cipher.createCipher(v,g.key);var d=b.start;return b.start=function(w,k){var R=null;k instanceof n.util.ByteBuffer&&(R=k,k={}),k=k||{},k.output=R,k.iv=w,d.call(b,k)},b}},6735:(S,_,u)=>{var n=u(8561);u(9592),u(2055),u(2734),u(7456);var t=u(938),c=t.publicKeyValidator,l=t.privateKeyValidator;if(typeof m>"u")var m=n.jsbn.BigInteger;var o=n.util.ByteBuffer,i=typeof Buffer>"u"?Uint8Array:Buffer;n.pki=n.pki||{},S.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var a=n.ed25519;a.constants={},a.constants.PUBLIC_KEY_BYTE_LENGTH=32,a.constants.PRIVATE_KEY_BYTE_LENGTH=64,a.constants.SEED_BYTE_LENGTH=32,a.constants.SIGN_BYTE_LENGTH=64,a.constants.HASH_BYTE_LENGTH=64,a.generateKeyPair=function($){$=$||{};var L=$.seed;if(L===void 0)L=n.random.getBytesSync(a.constants.SEED_BYTE_LENGTH);else if(typeof L=="string"){if(L.length!==a.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+a.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(L instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');L=e({message:L,encoding:"binary"});for(var D=new i(a.constants.PUBLIC_KEY_BYTE_LENGTH),B=new i(a.constants.PRIVATE_KEY_BYTE_LENGTH),U=0;U<32;++U)B[U]=L[U];return w(D,B),{publicKey:D,privateKey:B}},a.privateKeyFromAsn1=function($){var L={},D=[],B=n.asn1.validate($,l,L,D);if(!B){var U=new Error("Invalid Key.");throw U.errors=D,U}var G=n.asn1.derToOid(L.privateKeyOid),ee=n.oids.EdDSA25519;if(G!==ee)throw new Error('Invalid OID "'+G+'"; OID must be "'+ee+'".');var q=L.privateKey,J=e({message:n.asn1.fromDer(q).value,encoding:"binary"});return{privateKeyBytes:J}},a.publicKeyFromAsn1=function($){var L={},D=[],B=n.asn1.validate($,c,L,D);if(!B){var U=new Error("Invalid Key.");throw U.errors=D,U}var G=n.asn1.derToOid(L.publicKeyOid),ee=n.oids.EdDSA25519;if(G!==ee)throw new Error('Invalid OID "'+G+'"; OID must be "'+ee+'".');var q=L.ed25519PublicKey;if(q.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return e({message:q,encoding:"binary"})},a.publicKeyFromPrivateKey=function($){$=$||{};var L=e({message:$.privateKey,encoding:"binary"});if(L.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.PRIVATE_KEY_BYTE_LENGTH);for(var D=new i(a.constants.PUBLIC_KEY_BYTE_LENGTH),B=0;B<D.length;++B)D[B]=L[32+B];return D},a.sign=function($){$=$||{};var L=e($),D=e({message:$.privateKey,encoding:"binary"});if(D.length===a.constants.SEED_BYTE_LENGTH){var B=a.generateKeyPair({seed:D});D=B.privateKey}else if(D.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.SEED_BYTE_LENGTH+" or "+a.constants.PRIVATE_KEY_BYTE_LENGTH);var U=new i(a.constants.SIGN_BYTE_LENGTH+L.length);k(U,L,L.length,D);for(var G=new i(a.constants.SIGN_BYTE_LENGTH),ee=0;ee<G.length;++ee)G[ee]=U[ee];return G},a.verify=function($){$=$||{};var L=e($);if($.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var D=e({message:$.signature,encoding:"binary"});if(D.length!==a.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+a.constants.SIGN_BYTE_LENGTH);var B=e({message:$.publicKey,encoding:"binary"});if(B.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+a.constants.PUBLIC_KEY_BYTE_LENGTH);var U=new i(a.constants.SIGN_BYTE_LENGTH+L.length),G=new i(a.constants.SIGN_BYTE_LENGTH+L.length),ee;for(ee=0;ee<a.constants.SIGN_BYTE_LENGTH;++ee)U[ee]=D[ee];for(ee=0;ee<L.length;++ee)U[ee+a.constants.SIGN_BYTE_LENGTH]=L[ee];return R(G,U,U.length,B)>=0};function e($){var L=$.message;if(L instanceof Uint8Array||L instanceof i)return L;var D=$.encoding;if(L===void 0)if($.md)L=$.md.digest().getBytes(),D="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof L=="string"&&!D)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof L=="string"){if(typeof Buffer<"u")return Buffer.from(L,D);L=new o(L,D)}else if(!(L instanceof o))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var B=new i(L.length()),U=0;U<B.length;++U)B[U]=L.at(U);return B}var r=ne(),p=ne([1]),f=ne([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),s=ne([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),g=ne([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=ne([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),b=ne([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d($,L){var D=n.md.sha512.create(),B=new o($);D.update(B.getBytes(L),"binary");var U=D.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(U,"binary");for(var G=new i(a.constants.HASH_BYTE_LENGTH),ee=0;ee<64;++ee)G[ee]=U.charCodeAt(ee);return G}function w($,L){var D=[ne(),ne(),ne(),ne()],B,U=d(L,32);for(U[0]&=248,U[31]&=127,U[31]|=64,re(D,U),E($,D),B=0;B<32;++B)L[B+32]=$[B];return 0}function k($,L,D,B){var U,G,ee=new Float64Array(64),q=[ne(),ne(),ne(),ne()],J=d(B,32);J[0]&=248,J[31]&=127,J[31]|=64;var pe=D+64;for(U=0;U<D;++U)$[64+U]=L[U];for(U=0;U<32;++U)$[32+U]=J[32+U];var ue=d($.subarray(32),D+32);for(C(ue),re(q,ue),E($,q),U=32;U<64;++U)$[U]=B[U];var ae=d($,D+64);for(C(ae),U=32;U<64;++U)ee[U]=0;for(U=0;U<32;++U)ee[U]=ue[U];for(U=0;U<32;++U)for(G=0;G<32;G++)ee[U+G]+=ae[U]*J[G];return I($.subarray(32),ee),pe}function R($,L,D,B){var U,G,ee=new i(32),q=[ne(),ne(),ne(),ne()],J=[ne(),ne(),ne(),ne()];if(G=-1,D<64||N(J,B)||!T(L,32))return-1;for(U=0;U<D;++U)$[U]=L[U];for(U=0;U<32;++U)$[U+32]=B[U];var pe=d($,D);if(C(pe),Z(q,J,pe),re(J,L.subarray(32)),A(q,J),E(ee,q),D-=64,H(L,0,ee,0)){for(U=0;U<D;++U)$[U]=0;return-1}for(U=0;U<D;++U)$[U]=L[U+64];return G=D,G}function T($,L){var D;for(D=31;D>=0;--D){if($[L+D]<v[D])return!0;if($[L+D]>v[D])return!1}return!1}function I($,L){var D,B,U,G;for(B=63;B>=32;--B){for(D=0,U=B-32,G=B-12;U<G;++U)L[U]+=D-16*L[B]*v[U-(B-32)],D=L[U]+128>>8,L[U]-=D*256;L[U]+=D,L[B]=0}for(D=0,U=0;U<32;++U)L[U]+=D-(L[31]>>4)*v[U],D=L[U]>>8,L[U]&=255;for(U=0;U<32;++U)L[U]-=D*v[U];for(B=0;B<32;++B)L[B+1]+=L[B]>>8,$[B]=L[B]&255}function C($){for(var L=new Float64Array(64),D=0;D<64;++D)L[D]=$[D],$[D]=0;I($,L)}function A($,L){var D=ne(),B=ne(),U=ne(),G=ne(),ee=ne(),q=ne(),J=ne(),pe=ne(),ue=ne();Y(D,$[1],$[0]),Y(ue,L[1],L[0]),ie(D,D,ue),te(B,$[0],$[1]),te(ue,L[0],L[1]),ie(B,B,ue),ie(U,$[3],L[3]),ie(U,U,s),ie(G,$[2],L[2]),te(G,G,G),Y(ee,B,D),Y(q,G,U),te(J,G,U),te(pe,B,D),ie($[0],ee,q),ie($[1],pe,J),ie($[2],J,q),ie($[3],ee,pe)}function O($,L,D){for(var B=0;B<4;++B)fe($[B],L[B],D)}function E($,L){var D=ne(),B=ne(),U=ne();he(U,L[2]),ie(D,L[0],U),ie(B,L[1],U),P($,B),$[31]^=F(D)<<7}function P($,L){var D,B,U,G=ne(),ee=ne();for(D=0;D<16;++D)ee[D]=L[D];for(de(ee),de(ee),de(ee),B=0;B<2;++B){for(G[0]=ee[0]-65517,D=1;D<15;++D)G[D]=ee[D]-65535-(G[D-1]>>16&1),G[D-1]&=65535;G[15]=ee[15]-32767-(G[14]>>16&1),U=G[15]>>16&1,G[14]&=65535,fe(ee,G,1-U)}for(D=0;D<16;D++)$[2*D]=ee[D]&255,$[2*D+1]=ee[D]>>8}function N($,L){var D=ne(),B=ne(),U=ne(),G=ne(),ee=ne(),q=ne(),J=ne();return oe($[2],p),j($[1],L),W(U,$[1]),ie(G,U,f),Y(U,U,$[2]),te(G,$[2],G),W(ee,G),W(q,ee),ie(J,q,ee),ie(D,J,U),ie(D,D,G),M(D,D),ie(D,D,U),ie(D,D,G),ie(D,D,G),ie($[0],D,G),W(B,$[0]),ie(B,B,G),z(B,U)&&ie($[0],$[0],b),W(B,$[0]),ie(B,B,G),z(B,U)?-1:(F($[0])===L[31]>>7&&Y($[0],r,$[0]),ie($[3],$[0],$[1]),0)}function j($,L){var D;for(D=0;D<16;++D)$[D]=L[2*D]+(L[2*D+1]<<8);$[15]&=32767}function M($,L){var D=ne(),B;for(B=0;B<16;++B)D[B]=L[B];for(B=250;B>=0;--B)W(D,D),B!==1&&ie(D,D,L);for(B=0;B<16;++B)$[B]=D[B]}function z($,L){var D=new i(32),B=new i(32);return P(D,$),P(B,L),H(D,0,B,0)}function H($,L,D,B){return X($,L,D,B,32)}function X($,L,D,B,U){var G,ee=0;for(G=0;G<U;++G)ee|=$[L+G]^D[B+G];return(1&ee-1>>>8)-1}function F($){var L=new i(32);return P(L,$),L[0]&1}function Z($,L,D){var B,U;for(oe($[0],r),oe($[1],p),oe($[2],p),oe($[3],r),U=255;U>=0;--U)B=D[U/8|0]>>(U&7)&1,O($,L,B),A(L,$),A($,$),O($,L,B)}function re($,L){var D=[ne(),ne(),ne(),ne()];oe(D[0],g),oe(D[1],h),oe(D[2],p),ie(D[3],g,h),Z($,D,L)}function oe($,L){var D;for(D=0;D<16;D++)$[D]=L[D]|0}function he($,L){var D=ne(),B;for(B=0;B<16;++B)D[B]=L[B];for(B=253;B>=0;--B)W(D,D),B!==2&&B!==4&&ie(D,D,L);for(B=0;B<16;++B)$[B]=D[B]}function de($){var L,D,B=1;for(L=0;L<16;++L)D=$[L]+B+65535,B=Math.floor(D/65536),$[L]=D-B*65536;$[0]+=B-1+37*(B-1)}function fe($,L,D){for(var B,U=~(D-1),G=0;G<16;++G)B=U&($[G]^L[G]),$[G]^=B,L[G]^=B}function ne($){var L,D=new Float64Array(16);if($)for(L=0;L<$.length;++L)D[L]=$[L];return D}function te($,L,D){for(var B=0;B<16;++B)$[B]=L[B]+D[B]}function Y($,L,D){for(var B=0;B<16;++B)$[B]=L[B]-D[B]}function W($,L){ie($,L,L)}function ie($,L,D){var B,U,G=0,ee=0,q=0,J=0,pe=0,ue=0,ae=0,me=0,be=0,ye=0,xe=0,Oe=0,Ee=0,Te=0,Ae=0,Ne=0,Ie=0,Ce=0,Pe=0,je=0,Ue=0,ce=0,le=0,ke=0,Be=0,Re=0,Se=0,et=0,it=0,tt=0,nt=0,He=D[0],Me=D[1],Le=D[2],Ye=D[3],Qe=D[4],Xe=D[5],qe=D[6],Ke=D[7],Ve=D[8],We=D[9],Ge=D[10],Je=D[11],Ze=D[12],$e=D[13],Fe=D[14],ze=D[15];B=L[0],G+=B*He,ee+=B*Me,q+=B*Le,J+=B*Ye,pe+=B*Qe,ue+=B*Xe,ae+=B*qe,me+=B*Ke,be+=B*Ve,ye+=B*We,xe+=B*Ge,Oe+=B*Je,Ee+=B*Ze,Te+=B*$e,Ae+=B*Fe,Ne+=B*ze,B=L[1],ee+=B*He,q+=B*Me,J+=B*Le,pe+=B*Ye,ue+=B*Qe,ae+=B*Xe,me+=B*qe,be+=B*Ke,ye+=B*Ve,xe+=B*We,Oe+=B*Ge,Ee+=B*Je,Te+=B*Ze,Ae+=B*$e,Ne+=B*Fe,Ie+=B*ze,B=L[2],q+=B*He,J+=B*Me,pe+=B*Le,ue+=B*Ye,ae+=B*Qe,me+=B*Xe,be+=B*qe,ye+=B*Ke,xe+=B*Ve,Oe+=B*We,Ee+=B*Ge,Te+=B*Je,Ae+=B*Ze,Ne+=B*$e,Ie+=B*Fe,Ce+=B*ze,B=L[3],J+=B*He,pe+=B*Me,ue+=B*Le,ae+=B*Ye,me+=B*Qe,be+=B*Xe,ye+=B*qe,xe+=B*Ke,Oe+=B*Ve,Ee+=B*We,Te+=B*Ge,Ae+=B*Je,Ne+=B*Ze,Ie+=B*$e,Ce+=B*Fe,Pe+=B*ze,B=L[4],pe+=B*He,ue+=B*Me,ae+=B*Le,me+=B*Ye,be+=B*Qe,ye+=B*Xe,xe+=B*qe,Oe+=B*Ke,Ee+=B*Ve,Te+=B*We,Ae+=B*Ge,Ne+=B*Je,Ie+=B*Ze,Ce+=B*$e,Pe+=B*Fe,je+=B*ze,B=L[5],ue+=B*He,ae+=B*Me,me+=B*Le,be+=B*Ye,ye+=B*Qe,xe+=B*Xe,Oe+=B*qe,Ee+=B*Ke,Te+=B*Ve,Ae+=B*We,Ne+=B*Ge,Ie+=B*Je,Ce+=B*Ze,Pe+=B*$e,je+=B*Fe,Ue+=B*ze,B=L[6],ae+=B*He,me+=B*Me,be+=B*Le,ye+=B*Ye,xe+=B*Qe,Oe+=B*Xe,Ee+=B*qe,Te+=B*Ke,Ae+=B*Ve,Ne+=B*We,Ie+=B*Ge,Ce+=B*Je,Pe+=B*Ze,je+=B*$e,Ue+=B*Fe,ce+=B*ze,B=L[7],me+=B*He,be+=B*Me,ye+=B*Le,xe+=B*Ye,Oe+=B*Qe,Ee+=B*Xe,Te+=B*qe,Ae+=B*Ke,Ne+=B*Ve,Ie+=B*We,Ce+=B*Ge,Pe+=B*Je,je+=B*Ze,Ue+=B*$e,ce+=B*Fe,le+=B*ze,B=L[8],be+=B*He,ye+=B*Me,xe+=B*Le,Oe+=B*Ye,Ee+=B*Qe,Te+=B*Xe,Ae+=B*qe,Ne+=B*Ke,Ie+=B*Ve,Ce+=B*We,Pe+=B*Ge,je+=B*Je,Ue+=B*Ze,ce+=B*$e,le+=B*Fe,ke+=B*ze,B=L[9],ye+=B*He,xe+=B*Me,Oe+=B*Le,Ee+=B*Ye,Te+=B*Qe,Ae+=B*Xe,Ne+=B*qe,Ie+=B*Ke,Ce+=B*Ve,Pe+=B*We,je+=B*Ge,Ue+=B*Je,ce+=B*Ze,le+=B*$e,ke+=B*Fe,Be+=B*ze,B=L[10],xe+=B*He,Oe+=B*Me,Ee+=B*Le,Te+=B*Ye,Ae+=B*Qe,Ne+=B*Xe,Ie+=B*qe,Ce+=B*Ke,Pe+=B*Ve,je+=B*We,Ue+=B*Ge,ce+=B*Je,le+=B*Ze,ke+=B*$e,Be+=B*Fe,Re+=B*ze,B=L[11],Oe+=B*He,Ee+=B*Me,Te+=B*Le,Ae+=B*Ye,Ne+=B*Qe,Ie+=B*Xe,Ce+=B*qe,Pe+=B*Ke,je+=B*Ve,Ue+=B*We,ce+=B*Ge,le+=B*Je,ke+=B*Ze,Be+=B*$e,Re+=B*Fe,Se+=B*ze,B=L[12],Ee+=B*He,Te+=B*Me,Ae+=B*Le,Ne+=B*Ye,Ie+=B*Qe,Ce+=B*Xe,Pe+=B*qe,je+=B*Ke,Ue+=B*Ve,ce+=B*We,le+=B*Ge,ke+=B*Je,Be+=B*Ze,Re+=B*$e,Se+=B*Fe,et+=B*ze,B=L[13],Te+=B*He,Ae+=B*Me,Ne+=B*Le,Ie+=B*Ye,Ce+=B*Qe,Pe+=B*Xe,je+=B*qe,Ue+=B*Ke,ce+=B*Ve,le+=B*We,ke+=B*Ge,Be+=B*Je,Re+=B*Ze,Se+=B*$e,et+=B*Fe,it+=B*ze,B=L[14],Ae+=B*He,Ne+=B*Me,Ie+=B*Le,Ce+=B*Ye,Pe+=B*Qe,je+=B*Xe,Ue+=B*qe,ce+=B*Ke,le+=B*Ve,ke+=B*We,Be+=B*Ge,Re+=B*Je,Se+=B*Ze,et+=B*$e,it+=B*Fe,tt+=B*ze,B=L[15],Ne+=B*He,Ie+=B*Me,Ce+=B*Le,Pe+=B*Ye,je+=B*Qe,Ue+=B*Xe,ce+=B*qe,le+=B*Ke,ke+=B*Ve,Be+=B*We,Re+=B*Ge,Se+=B*Je,et+=B*Ze,it+=B*$e,tt+=B*Fe,nt+=B*ze,G+=38*Ie,ee+=38*Ce,q+=38*Pe,J+=38*je,pe+=38*Ue,ue+=38*ce,ae+=38*le,me+=38*ke,be+=38*Be,ye+=38*Re,xe+=38*Se,Oe+=38*et,Ee+=38*it,Te+=38*tt,Ae+=38*nt,U=1,B=G+U+65535,U=Math.floor(B/65536),G=B-U*65536,B=ee+U+65535,U=Math.floor(B/65536),ee=B-U*65536,B=q+U+65535,U=Math.floor(B/65536),q=B-U*65536,B=J+U+65535,U=Math.floor(B/65536),J=B-U*65536,B=pe+U+65535,U=Math.floor(B/65536),pe=B-U*65536,B=ue+U+65535,U=Math.floor(B/65536),ue=B-U*65536,B=ae+U+65535,U=Math.floor(B/65536),ae=B-U*65536,B=me+U+65535,U=Math.floor(B/65536),me=B-U*65536,B=be+U+65535,U=Math.floor(B/65536),be=B-U*65536,B=ye+U+65535,U=Math.floor(B/65536),ye=B-U*65536,B=xe+U+65535,U=Math.floor(B/65536),xe=B-U*65536,B=Oe+U+65535,U=Math.floor(B/65536),Oe=B-U*65536,B=Ee+U+65535,U=Math.floor(B/65536),Ee=B-U*65536,B=Te+U+65535,U=Math.floor(B/65536),Te=B-U*65536,B=Ae+U+65535,U=Math.floor(B/65536),Ae=B-U*65536,B=Ne+U+65535,U=Math.floor(B/65536),Ne=B-U*65536,G+=U-1+37*(U-1),U=1,B=G+U+65535,U=Math.floor(B/65536),G=B-U*65536,B=ee+U+65535,U=Math.floor(B/65536),ee=B-U*65536,B=q+U+65535,U=Math.floor(B/65536),q=B-U*65536,B=J+U+65535,U=Math.floor(B/65536),J=B-U*65536,B=pe+U+65535,U=Math.floor(B/65536),pe=B-U*65536,B=ue+U+65535,U=Math.floor(B/65536),ue=B-U*65536,B=ae+U+65535,U=Math.floor(B/65536),ae=B-U*65536,B=me+U+65535,U=Math.floor(B/65536),me=B-U*65536,B=be+U+65535,U=Math.floor(B/65536),be=B-U*65536,B=ye+U+65535,U=Math.floor(B/65536),ye=B-U*65536,B=xe+U+65535,U=Math.floor(B/65536),xe=B-U*65536,B=Oe+U+65535,U=Math.floor(B/65536),Oe=B-U*65536,B=Ee+U+65535,U=Math.floor(B/65536),Ee=B-U*65536,B=Te+U+65535,U=Math.floor(B/65536),Te=B-U*65536,B=Ae+U+65535,U=Math.floor(B/65536),Ae=B-U*65536,B=Ne+U+65535,U=Math.floor(B/65536),Ne=B-U*65536,G+=U-1+37*(U-1),$[0]=G,$[1]=ee,$[2]=q,$[3]=J,$[4]=pe,$[5]=ue,$[6]=ae,$[7]=me,$[8]=be,$[9]=ye,$[10]=xe,$[11]=Oe,$[12]=Ee,$[13]=Te,$[14]=Ae,$[15]=Ne}},8561:S=>{S.exports={options:{usePureJavaScript:!1}}},2007:(S,_,u)=>{var n=u(8561);u(6777),u(7456);var t=S.exports=n.hmac=n.hmac||{};t.create=function(){var c=null,l=null,m=null,o=null,i={};return i.start=function(a,e){if(a!==null)if(typeof a=="string")if(a=a.toLowerCase(),a in n.md.algorithms)l=n.md.algorithms[a].create();else throw new Error('Unknown hash algorithm "'+a+'"');else l=a;if(e===null)e=c;else{if(typeof e=="string")e=n.util.createBuffer(e);else if(n.util.isArray(e)){var r=e;e=n.util.createBuffer();for(var p=0;p<r.length;++p)e.putByte(r[p])}var f=e.length();f>l.blockLength&&(l.start(),l.update(e.bytes()),e=l.digest()),m=n.util.createBuffer(),o=n.util.createBuffer(),f=e.length();for(var p=0;p<f;++p){var r=e.at(p);m.putByte(54^r),o.putByte(92^r)}if(f<l.blockLength)for(var r=l.blockLength-f,p=0;p<r;++p)m.putByte(54),o.putByte(92);c=e,m=m.bytes(),o=o.bytes()}l.start(),l.update(m)},i.update=function(a){l.update(a)},i.getMac=function(){var a=l.digest().bytes();return l.start(),l.update(o),l.update(a),l.digest()},i.digest=i.getMac,i}},8542:(S,_,u)=>{S.exports=u(8561),u(9445),u(6087),u(7357),u(4723),u(5918),u(6735),u(2007),u(9477),u(8388),u(5472),u(2893),u(9429),u(492),u(1608),u(1296),u(4382),u(2493),u(7013),u(5189),u(6736),u(2055),u(9274),u(3140),u(4275),u(7456)},9592:(S,_,u)=>{var n=u(8561);S.exports=n.jsbn=n.jsbn||{};var t,c=0xdeadbeefcafe,l=(c&16777215)==15715070;function m(V,K,Q){this.data=[],V!=null&&(typeof V=="number"?this.fromNumber(V,K,Q):K==null&&typeof V!="string"?this.fromString(V,256):this.fromString(V,K))}n.jsbn.BigInteger=m;function o(){return new m(null)}function i(V,K,Q,se,ge,ve){for(;--ve>=0;){var we=K*this.data[V++]+Q.data[se]+ge;ge=Math.floor(we/67108864),Q.data[se++]=we&67108863}return ge}function a(V,K,Q,se,ge,ve){for(var we=K&32767,_e=K>>15;--ve>=0;){var De=this.data[V]&32767,rt=this.data[V++]>>15,st=_e*De+rt*we;De=we*De+((st&32767)<<15)+Q.data[se]+(ge&1073741823),ge=(De>>>30)+(st>>>15)+_e*rt+(ge>>>30),Q.data[se++]=De&1073741823}return ge}function e(V,K,Q,se,ge,ve){for(var we=K&16383,_e=K>>14;--ve>=0;){var De=this.data[V]&16383,rt=this.data[V++]>>14,st=_e*De+rt*we;De=we*De+((st&16383)<<14)+Q.data[se]+ge,ge=(De>>28)+(st>>14)+_e*rt,Q.data[se++]=De&268435455}return ge}typeof navigator>"u"?(m.prototype.am=e,t=28):l&&navigator.appName=="Microsoft Internet Explorer"?(m.prototype.am=a,t=30):l&&navigator.appName!="Netscape"?(m.prototype.am=i,t=26):(m.prototype.am=e,t=28),m.prototype.DB=t,m.prototype.DM=(1<<t)-1,m.prototype.DV=1<<t;var r=52;m.prototype.FV=Math.pow(2,r),m.prototype.F1=r-t,m.prototype.F2=2*t-r;var p="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array,s,g;for(s=48,g=0;g<=9;++g)f[s++]=g;for(s=97,g=10;g<36;++g)f[s++]=g;for(s=65,g=10;g<36;++g)f[s++]=g;function h(V){return p.charAt(V)}function v(V,K){var Q=f[V.charCodeAt(K)];return Q??-1}function b(V){for(var K=this.t-1;K>=0;--K)V.data[K]=this.data[K];V.t=this.t,V.s=this.s}function d(V){this.t=1,this.s=V<0?-1:0,V>0?this.data[0]=V:V<-1?this.data[0]=V+this.DV:this.t=0}function w(V){var K=o();return K.fromInt(V),K}function k(V,K){var Q;if(K==16)Q=4;else if(K==8)Q=3;else if(K==256)Q=8;else if(K==2)Q=1;else if(K==32)Q=5;else if(K==4)Q=2;else{this.fromRadix(V,K);return}this.t=0,this.s=0;for(var se=V.length,ge=!1,ve=0;--se>=0;){var we=Q==8?V[se]&255:v(V,se);if(we<0){V.charAt(se)=="-"&&(ge=!0);continue}ge=!1,ve==0?this.data[this.t++]=we:ve+Q>this.DB?(this.data[this.t-1]|=(we&(1<<this.DB-ve)-1)<<ve,this.data[this.t++]=we>>this.DB-ve):this.data[this.t-1]|=we<<ve,ve+=Q,ve>=this.DB&&(ve-=this.DB)}Q==8&&(V[0]&128)!=0&&(this.s=-1,ve>0&&(this.data[this.t-1]|=(1<<this.DB-ve)-1<<ve)),this.clamp(),ge&&m.ZERO.subTo(this,this)}function R(){for(var V=this.s&this.DM;this.t>0&&this.data[this.t-1]==V;)--this.t}function T(V){if(this.s<0)return"-"+this.negate().toString(V);var K;if(V==16)K=4;else if(V==8)K=3;else if(V==2)K=1;else if(V==32)K=5;else if(V==4)K=2;else return this.toRadix(V);var Q=(1<<K)-1,se,ge=!1,ve="",we=this.t,_e=this.DB-we*this.DB%K;if(we-- >0)for(_e<this.DB&&(se=this.data[we]>>_e)>0&&(ge=!0,ve=h(se));we>=0;)_e<K?(se=(this.data[we]&(1<<_e)-1)<<K-_e,se|=this.data[--we]>>(_e+=this.DB-K)):(se=this.data[we]>>(_e-=K)&Q,_e<=0&&(_e+=this.DB,--we)),se>0&&(ge=!0),ge&&(ve+=h(se));return ge?ve:"0"}function I(){var V=o();return m.ZERO.subTo(this,V),V}function C(){return this.s<0?this.negate():this}function A(V){var K=this.s-V.s;if(K!=0)return K;var Q=this.t;if(K=Q-V.t,K!=0)return this.s<0?-K:K;for(;--Q>=0;)if((K=this.data[Q]-V.data[Q])!=0)return K;return 0}function O(V){var K=1,Q;return(Q=V>>>16)!=0&&(V=Q,K+=16),(Q=V>>8)!=0&&(V=Q,K+=8),(Q=V>>4)!=0&&(V=Q,K+=4),(Q=V>>2)!=0&&(V=Q,K+=2),(Q=V>>1)!=0&&(V=Q,K+=1),K}function E(){return this.t<=0?0:this.DB*(this.t-1)+O(this.data[this.t-1]^this.s&this.DM)}function P(V,K){var Q;for(Q=this.t-1;Q>=0;--Q)K.data[Q+V]=this.data[Q];for(Q=V-1;Q>=0;--Q)K.data[Q]=0;K.t=this.t+V,K.s=this.s}function N(V,K){for(var Q=V;Q<this.t;++Q)K.data[Q-V]=this.data[Q];K.t=Math.max(this.t-V,0),K.s=this.s}function j(V,K){var Q=V%this.DB,se=this.DB-Q,ge=(1<<se)-1,ve=Math.floor(V/this.DB),we=this.s<<Q&this.DM,_e;for(_e=this.t-1;_e>=0;--_e)K.data[_e+ve+1]=this.data[_e]>>se|we,we=(this.data[_e]&ge)<<Q;for(_e=ve-1;_e>=0;--_e)K.data[_e]=0;K.data[ve]=we,K.t=this.t+ve+1,K.s=this.s,K.clamp()}function M(V,K){K.s=this.s;var Q=Math.floor(V/this.DB);if(Q>=this.t){K.t=0;return}var se=V%this.DB,ge=this.DB-se,ve=(1<<se)-1;K.data[0]=this.data[Q]>>se;for(var we=Q+1;we<this.t;++we)K.data[we-Q-1]|=(this.data[we]&ve)<<ge,K.data[we-Q]=this.data[we]>>se;se>0&&(K.data[this.t-Q-1]|=(this.s&ve)<<ge),K.t=this.t-Q,K.clamp()}function z(V,K){for(var Q=0,se=0,ge=Math.min(V.t,this.t);Q<ge;)se+=this.data[Q]-V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;if(V.t<this.t){for(se-=V.s;Q<this.t;)se+=this.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se+=this.s}else{for(se+=this.s;Q<V.t;)se-=V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se-=V.s}K.s=se<0?-1:0,se<-1?K.data[Q++]=this.DV+se:se>0&&(K.data[Q++]=se),K.t=Q,K.clamp()}function H(V,K){var Q=this.abs(),se=V.abs(),ge=Q.t;for(K.t=ge+se.t;--ge>=0;)K.data[ge]=0;for(ge=0;ge<se.t;++ge)K.data[ge+Q.t]=Q.am(0,se.data[ge],K,ge,0,Q.t);K.s=0,K.clamp(),this.s!=V.s&&m.ZERO.subTo(K,K)}function X(V){for(var K=this.abs(),Q=V.t=2*K.t;--Q>=0;)V.data[Q]=0;for(Q=0;Q<K.t-1;++Q){var se=K.am(Q,K.data[Q],V,2*Q,0,1);(V.data[Q+K.t]+=K.am(Q+1,2*K.data[Q],V,2*Q+1,se,K.t-Q-1))>=K.DV&&(V.data[Q+K.t]-=K.DV,V.data[Q+K.t+1]=1)}V.t>0&&(V.data[V.t-1]+=K.am(Q,K.data[Q],V,2*Q,0,1)),V.s=0,V.clamp()}function F(V,K,Q){var se=V.abs();if(!(se.t<=0)){var ge=this.abs();if(ge.t<se.t){K?.fromInt(0),Q!=null&&this.copyTo(Q);return}Q==null&&(Q=o());var ve=o(),we=this.s,_e=V.s,De=this.DB-O(se.data[se.t-1]);De>0?(se.lShiftTo(De,ve),ge.lShiftTo(De,Q)):(se.copyTo(ve),ge.copyTo(Q));var rt=ve.t,st=ve.data[rt-1];if(st!=0){var at=st*(1<<this.F1)+(rt>1?ve.data[rt-2]>>this.F2:0),ut=this.FV/at,yt=(1<<this.F1)/at,ct=1<<this.F2,lt=Q.t,bt=lt-rt,dt=K??o();for(ve.dlShiftTo(bt,dt),Q.compareTo(dt)>=0&&(Q.data[Q.t++]=1,Q.subTo(dt,Q)),m.ONE.dlShiftTo(rt,dt),dt.subTo(ve,ve);ve.t<rt;)ve.data[ve.t++]=0;for(;--bt>=0;){var xt=Q.data[--lt]==st?this.DM:Math.floor(Q.data[lt]*ut+(Q.data[lt-1]+ct)*yt);if((Q.data[lt]+=ve.am(0,xt,Q,bt,0,rt))<xt)for(ve.dlShiftTo(bt,dt),Q.subTo(dt,Q);Q.data[lt]<--xt;)Q.subTo(dt,Q)}K!=null&&(Q.drShiftTo(rt,K),we!=_e&&m.ZERO.subTo(K,K)),Q.t=rt,Q.clamp(),De>0&&Q.rShiftTo(De,Q),we<0&&m.ZERO.subTo(Q,Q)}}}function Z(V){var K=o();return this.abs().divRemTo(V,null,K),this.s<0&&K.compareTo(m.ZERO)>0&&V.subTo(K,K),K}function re(V){this.m=V}function oe(V){return V.s<0||V.compareTo(this.m)>=0?V.mod(this.m):V}function he(V){return V}function de(V){V.divRemTo(this.m,null,V)}function fe(V,K,Q){V.multiplyTo(K,Q),this.reduce(Q)}function ne(V,K){V.squareTo(K),this.reduce(K)}re.prototype.convert=oe,re.prototype.revert=he,re.prototype.reduce=de,re.prototype.mulTo=fe,re.prototype.sqrTo=ne;function te(){if(this.t<1)return 0;var V=this.data[0];if((V&1)==0)return 0;var K=V&3;return K=K*(2-(V&15)*K)&15,K=K*(2-(V&255)*K)&255,K=K*(2-((V&65535)*K&65535))&65535,K=K*(2-V*K%this.DV)%this.DV,K>0?this.DV-K:-K}function Y(V){this.m=V,this.mp=V.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<V.DB-15)-1,this.mt2=2*V.t}function W(V){var K=o();return V.abs().dlShiftTo(this.m.t,K),K.divRemTo(this.m,null,K),V.s<0&&K.compareTo(m.ZERO)>0&&this.m.subTo(K,K),K}function ie(V){var K=o();return V.copyTo(K),this.reduce(K),K}function $(V){for(;V.t<=this.mt2;)V.data[V.t++]=0;for(var K=0;K<this.m.t;++K){var Q=V.data[K]&32767,se=Q*this.mpl+((Q*this.mph+(V.data[K]>>15)*this.mpl&this.um)<<15)&V.DM;for(Q=K+this.m.t,V.data[Q]+=this.m.am(0,se,V,K,0,this.m.t);V.data[Q]>=V.DV;)V.data[Q]-=V.DV,V.data[++Q]++}V.clamp(),V.drShiftTo(this.m.t,V),V.compareTo(this.m)>=0&&V.subTo(this.m,V)}function L(V,K){V.squareTo(K),this.reduce(K)}function D(V,K,Q){V.multiplyTo(K,Q),this.reduce(Q)}Y.prototype.convert=W,Y.prototype.revert=ie,Y.prototype.reduce=$,Y.prototype.mulTo=D,Y.prototype.sqrTo=L;function B(){return(this.t>0?this.data[0]&1:this.s)==0}function U(V,K){if(V>4294967295||V<1)return m.ONE;var Q=o(),se=o(),ge=K.convert(this),ve=O(V)-1;for(ge.copyTo(Q);--ve>=0;)if(K.sqrTo(Q,se),(V&1<<ve)>0)K.mulTo(se,ge,Q);else{var we=Q;Q=se,se=we}return K.revert(Q)}function G(V,K){var Q;return V<256||K.isEven()?Q=new re(K):Q=new Y(K),this.exp(V,Q)}m.prototype.copyTo=b,m.prototype.fromInt=d,m.prototype.fromString=k,m.prototype.clamp=R,m.prototype.dlShiftTo=P,m.prototype.drShiftTo=N,m.prototype.lShiftTo=j,m.prototype.rShiftTo=M,m.prototype.subTo=z,m.prototype.multiplyTo=H,m.prototype.squareTo=X,m.prototype.divRemTo=F,m.prototype.invDigit=te,m.prototype.isEven=B,m.prototype.exp=U,m.prototype.toString=T,m.prototype.negate=I,m.prototype.abs=C,m.prototype.compareTo=A,m.prototype.bitLength=E,m.prototype.mod=Z,m.prototype.modPowInt=G,m.ZERO=w(0),m.ONE=w(1);function ee(){var V=o();return this.copyTo(V),V}function q(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function J(){return this.t==0?this.s:this.data[0]<<24>>24}function pe(){return this.t==0?this.s:this.data[0]<<16>>16}function ue(V){return Math.floor(Math.LN2*this.DB/Math.log(V))}function ae(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function me(V){if(V==null&&(V=10),this.signum()==0||V<2||V>36)return"0";var K=this.chunkSize(V),Q=Math.pow(V,K),se=w(Q),ge=o(),ve=o(),we="";for(this.divRemTo(se,ge,ve);ge.signum()>0;)we=(Q+ve.intValue()).toString(V).substr(1)+we,ge.divRemTo(se,ge,ve);return ve.intValue().toString(V)+we}function be(V,K){this.fromInt(0),K==null&&(K=10);for(var Q=this.chunkSize(K),se=Math.pow(K,Q),ge=!1,ve=0,we=0,_e=0;_e<V.length;++_e){var De=v(V,_e);if(De<0){V.charAt(_e)=="-"&&this.signum()==0&&(ge=!0);continue}we=K*we+De,++ve>=Q&&(this.dMultiply(se),this.dAddOffset(we,0),ve=0,we=0)}ve>0&&(this.dMultiply(Math.pow(K,ve)),this.dAddOffset(we,0)),ge&&m.ZERO.subTo(this,this)}function ye(V,K,Q){if(typeof K=="number")if(V<2)this.fromInt(1);else for(this.fromNumber(V,Q),this.testBit(V-1)||this.bitwiseTo(m.ONE.shiftLeft(V-1),Ce,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(K);)this.dAddOffset(2,0),this.bitLength()>V&&this.subTo(m.ONE.shiftLeft(V-1),this);else{var se=new Array,ge=V&7;se.length=(V>>3)+1,K.nextBytes(se),ge>0?se[0]&=(1<<ge)-1:se[0]=0,this.fromString(se,256)}}function xe(){var V=this.t,K=new Array;K[0]=this.s;var Q=this.DB-V*this.DB%8,se,ge=0;if(V-- >0)for(Q<this.DB&&(se=this.data[V]>>Q)!=(this.s&this.DM)>>Q&&(K[ge++]=se|this.s<<this.DB-Q);V>=0;)Q<8?(se=(this.data[V]&(1<<Q)-1)<<8-Q,se|=this.data[--V]>>(Q+=this.DB-8)):(se=this.data[V]>>(Q-=8)&255,Q<=0&&(Q+=this.DB,--V)),(se&128)!=0&&(se|=-256),ge==0&&(this.s&128)!=(se&128)&&++ge,(ge>0||se!=this.s)&&(K[ge++]=se);return K}function Oe(V){return this.compareTo(V)==0}function Ee(V){return this.compareTo(V)<0?this:V}function Te(V){return this.compareTo(V)>0?this:V}function Ae(V,K,Q){var se,ge,ve=Math.min(V.t,this.t);for(se=0;se<ve;++se)Q.data[se]=K(this.data[se],V.data[se]);if(V.t<this.t){for(ge=V.s&this.DM,se=ve;se<this.t;++se)Q.data[se]=K(this.data[se],ge);Q.t=this.t}else{for(ge=this.s&this.DM,se=ve;se<V.t;++se)Q.data[se]=K(ge,V.data[se]);Q.t=V.t}Q.s=K(this.s,V.s),Q.clamp()}function Ne(V,K){return V&K}function Ie(V){var K=o();return this.bitwiseTo(V,Ne,K),K}function Ce(V,K){return V|K}function Pe(V){var K=o();return this.bitwiseTo(V,Ce,K),K}function je(V,K){return V^K}function Ue(V){var K=o();return this.bitwiseTo(V,je,K),K}function ce(V,K){return V&~K}function le(V){var K=o();return this.bitwiseTo(V,ce,K),K}function ke(){for(var V=o(),K=0;K<this.t;++K)V.data[K]=this.DM&~this.data[K];return V.t=this.t,V.s=~this.s,V}function Be(V){var K=o();return V<0?this.rShiftTo(-V,K):this.lShiftTo(V,K),K}function Re(V){var K=o();return V<0?this.lShiftTo(-V,K):this.rShiftTo(V,K),K}function Se(V){if(V==0)return-1;var K=0;return(V&65535)==0&&(V>>=16,K+=16),(V&255)==0&&(V>>=8,K+=8),(V&15)==0&&(V>>=4,K+=4),(V&3)==0&&(V>>=2,K+=2),(V&1)==0&&++K,K}function et(){for(var V=0;V<this.t;++V)if(this.data[V]!=0)return V*this.DB+Se(this.data[V]);return this.s<0?this.t*this.DB:-1}function it(V){for(var K=0;V!=0;)V&=V-1,++K;return K}function tt(){for(var V=0,K=this.s&this.DM,Q=0;Q<this.t;++Q)V+=it(this.data[Q]^K);return V}function nt(V){var K=Math.floor(V/this.DB);return K>=this.t?this.s!=0:(this.data[K]&1<<V%this.DB)!=0}function He(V,K){var Q=m.ONE.shiftLeft(V);return this.bitwiseTo(Q,K,Q),Q}function Me(V){return this.changeBit(V,Ce)}function Le(V){return this.changeBit(V,ce)}function Ye(V){return this.changeBit(V,je)}function Qe(V,K){for(var Q=0,se=0,ge=Math.min(V.t,this.t);Q<ge;)se+=this.data[Q]+V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;if(V.t<this.t){for(se+=V.s;Q<this.t;)se+=this.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se+=this.s}else{for(se+=this.s;Q<V.t;)se+=V.data[Q],K.data[Q++]=se&this.DM,se>>=this.DB;se+=V.s}K.s=se<0?-1:0,se>0?K.data[Q++]=se:se<-1&&(K.data[Q++]=this.DV+se),K.t=Q,K.clamp()}function Xe(V){var K=o();return this.addTo(V,K),K}function qe(V){var K=o();return this.subTo(V,K),K}function Ke(V){var K=o();return this.multiplyTo(V,K),K}function Ve(){var V=o();return this.squareTo(V),V}function We(V){var K=o();return this.divRemTo(V,K,null),K}function Ge(V){var K=o();return this.divRemTo(V,null,K),K}function Je(V){var K=o(),Q=o();return this.divRemTo(V,K,Q),new Array(K,Q)}function Ze(V){this.data[this.t]=this.am(0,V-1,this,0,0,this.t),++this.t,this.clamp()}function $e(V,K){if(V!=0){for(;this.t<=K;)this.data[this.t++]=0;for(this.data[K]+=V;this.data[K]>=this.DV;)this.data[K]-=this.DV,++K>=this.t&&(this.data[this.t++]=0),++this.data[K]}}function Fe(){}function ze(V){return V}function gt(V,K,Q){V.multiplyTo(K,Q)}function _t(V,K){V.squareTo(K)}Fe.prototype.convert=ze,Fe.prototype.revert=ze,Fe.prototype.mulTo=gt,Fe.prototype.sqrTo=_t;function mt(V){return this.exp(V,new Fe)}function pt(V,K,Q){var se=Math.min(this.t+V.t,K);for(Q.s=0,Q.t=se;se>0;)Q.data[--se]=0;var ge;for(ge=Q.t-this.t;se<ge;++se)Q.data[se+this.t]=this.am(0,V.data[se],Q,se,0,this.t);for(ge=Math.min(V.t,K);se<ge;++se)this.am(0,V.data[se],Q,se,0,K-se);Q.clamp()}function ht(V,K,Q){--K;var se=Q.t=this.t+V.t-K;for(Q.s=0;--se>=0;)Q.data[se]=0;for(se=Math.max(K-this.t,0);se<V.t;++se)Q.data[this.t+se-K]=this.am(K-se,V.data[se],Q,0,0,this.t+se-K);Q.clamp(),Q.drShiftTo(1,Q)}function ft(V){this.r2=o(),this.q3=o(),m.ONE.dlShiftTo(2*V.t,this.r2),this.mu=this.r2.divide(V),this.m=V}function vt(V){if(V.s<0||V.t>2*this.m.t)return V.mod(this.m);if(V.compareTo(this.m)<0)return V;var K=o();return V.copyTo(K),this.reduce(K),K}function wt(V){return V}function Et(V){for(V.drShiftTo(this.m.t-1,this.r2),V.t>this.m.t+1&&(V.t=this.m.t+1,V.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);V.compareTo(this.r2)<0;)V.dAddOffset(1,this.m.t+1);for(V.subTo(this.r2,V);V.compareTo(this.m)>=0;)V.subTo(this.m,V)}function Ct(V,K){V.squareTo(K),this.reduce(K)}function St(V,K,Q){V.multiplyTo(K,Q),this.reduce(Q)}ft.prototype.convert=vt,ft.prototype.revert=wt,ft.prototype.reduce=Et,ft.prototype.mulTo=St,ft.prototype.sqrTo=Ct;function kt(V,K){var Q=V.bitLength(),se,ge=w(1),ve;if(Q<=0)return ge;Q<18?se=1:Q<48?se=3:Q<144?se=4:Q<768?se=5:se=6,Q<8?ve=new re(K):K.isEven()?ve=new ft(K):ve=new Y(K);var we=new Array,_e=3,De=se-1,rt=(1<<se)-1;if(we[1]=ve.convert(this),se>1){var st=o();for(ve.sqrTo(we[1],st);_e<=rt;)we[_e]=o(),ve.mulTo(st,we[_e-2],we[_e]),_e+=2}var at=V.t-1,ut,yt=!0,ct=o(),lt;for(Q=O(V.data[at])-1;at>=0;){for(Q>=De?ut=V.data[at]>>Q-De&rt:(ut=(V.data[at]&(1<<Q+1)-1)<<De-Q,at>0&&(ut|=V.data[at-1]>>this.DB+Q-De)),_e=se;(ut&1)==0;)ut>>=1,--_e;if((Q-=_e)<0&&(Q+=this.DB,--at),yt)we[ut].copyTo(ge),yt=!1;else{for(;_e>1;)ve.sqrTo(ge,ct),ve.sqrTo(ct,ge),_e-=2;_e>0?ve.sqrTo(ge,ct):(lt=ge,ge=ct,ct=lt),ve.mulTo(ct,we[ut],ge)}for(;at>=0&&(V.data[at]&1<<Q)==0;)ve.sqrTo(ge,ct),lt=ge,ge=ct,ct=lt,--Q<0&&(Q=this.DB-1,--at)}return ve.revert(ge)}function Tt(V){var K=this.s<0?this.negate():this.clone(),Q=V.s<0?V.negate():V.clone();if(K.compareTo(Q)<0){var se=K;K=Q,Q=se}var ge=K.getLowestSetBit(),ve=Q.getLowestSetBit();if(ve<0)return K;for(ge<ve&&(ve=ge),ve>0&&(K.rShiftTo(ve,K),Q.rShiftTo(ve,Q));K.signum()>0;)(ge=K.getLowestSetBit())>0&&K.rShiftTo(ge,K),(ge=Q.getLowestSetBit())>0&&Q.rShiftTo(ge,Q),K.compareTo(Q)>=0?(K.subTo(Q,K),K.rShiftTo(1,K)):(Q.subTo(K,Q),Q.rShiftTo(1,Q));return ve>0&&Q.lShiftTo(ve,Q),Q}function At(V){if(V<=0)return 0;var K=this.DV%V,Q=this.s<0?V-1:0;if(this.t>0)if(K==0)Q=this.data[0]%V;else for(var se=this.t-1;se>=0;--se)Q=(K*Q+this.data[se])%V;return Q}function It(V){if(this.signum()==0)return m.ZERO;var K=V.isEven();if(this.isEven()&&K||V.signum()==0)return m.ZERO;for(var Q=V.clone(),se=this.clone(),ge=w(1),ve=w(0),we=w(0),_e=w(1);Q.signum()!=0;){for(;Q.isEven();)Q.rShiftTo(1,Q),K?((!ge.isEven()||!ve.isEven())&&(ge.addTo(this,ge),ve.subTo(V,ve)),ge.rShiftTo(1,ge)):ve.isEven()||ve.subTo(V,ve),ve.rShiftTo(1,ve);for(;se.isEven();)se.rShiftTo(1,se),K?((!we.isEven()||!_e.isEven())&&(we.addTo(this,we),_e.subTo(V,_e)),we.rShiftTo(1,we)):_e.isEven()||_e.subTo(V,_e),_e.rShiftTo(1,_e);Q.compareTo(se)>=0?(Q.subTo(se,Q),K&&ge.subTo(we,ge),ve.subTo(_e,ve)):(se.subTo(Q,se),K&&we.subTo(ge,we),_e.subTo(ve,_e))}if(se.compareTo(m.ONE)!=0)return m.ZERO;if(_e.compareTo(V)>=0)return _e.subtract(V);if(_e.signum()<0)_e.addTo(V,_e);else return _e;return _e.signum()<0?_e.add(V):_e}var ot=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Bt=(1<<26)/ot[ot.length-1];function Rt(V){var K,Q=this.abs();if(Q.t==1&&Q.data[0]<=ot[ot.length-1]){for(K=0;K<ot.length;++K)if(Q.data[0]==ot[K])return!0;return!1}if(Q.isEven())return!1;for(K=1;K<ot.length;){for(var se=ot[K],ge=K+1;ge<ot.length&&se<Bt;)se*=ot[ge++];for(se=Q.modInt(se);K<ge;)if(se%ot[K++]==0)return!1}return Q.millerRabin(V)}function Ot(V){var K=this.subtract(m.ONE),Q=K.getLowestSetBit();if(Q<=0)return!1;for(var se=K.shiftRight(Q),ge=Nt(),ve,we=0;we<V;++we){do ve=new m(this.bitLength(),ge);while(ve.compareTo(m.ONE)<=0||ve.compareTo(K)>=0);var _e=ve.modPow(se,this);if(_e.compareTo(m.ONE)!=0&&_e.compareTo(K)!=0){for(var De=1;De++<Q&&_e.compareTo(K)!=0;)if(_e=_e.modPowInt(2,this),_e.compareTo(m.ONE)==0)return!1;if(_e.compareTo(K)!=0)return!1}}return!0}function Nt(){return{nextBytes:function(V){for(var K=0;K<V.length;++K)V[K]=Math.floor(Math.random()*256)}}}m.prototype.chunkSize=ue,m.prototype.toRadix=me,m.prototype.fromRadix=be,m.prototype.fromNumber=ye,m.prototype.bitwiseTo=Ae,m.prototype.changeBit=He,m.prototype.addTo=Qe,m.prototype.dMultiply=Ze,m.prototype.dAddOffset=$e,m.prototype.multiplyLowerTo=pt,m.prototype.multiplyUpperTo=ht,m.prototype.modInt=At,m.prototype.millerRabin=Ot,m.prototype.clone=ee,m.prototype.intValue=q,m.prototype.byteValue=J,m.prototype.shortValue=pe,m.prototype.signum=ae,m.prototype.toByteArray=xe,m.prototype.equals=Oe,m.prototype.min=Ee,m.prototype.max=Te,m.prototype.and=Ie,m.prototype.or=Pe,m.prototype.xor=Ue,m.prototype.andNot=le,m.prototype.not=ke,m.prototype.shiftLeft=Be,m.prototype.shiftRight=Re,m.prototype.getLowestSetBit=et,m.prototype.bitCount=tt,m.prototype.testBit=nt,m.prototype.setBit=Me,m.prototype.clearBit=Le,m.prototype.flipBit=Ye,m.prototype.add=Xe,m.prototype.subtract=qe,m.prototype.multiply=Ke,m.prototype.divide=We,m.prototype.remainder=Ge,m.prototype.divideAndRemainder=Je,m.prototype.modPow=kt,m.prototype.modInverse=It,m.prototype.pow=mt,m.prototype.gcd=Tt,m.prototype.isProbablePrime=Rt,m.prototype.square=Ve},9477:(S,_,u)=>{var n=u(8561);u(7456),u(2055),u(9592),S.exports=n.kem=n.kem||{};var t=n.jsbn.BigInteger;n.kem.rsa={},n.kem.rsa.create=function(l,m){m=m||{};var o=m.prng||n.random,i={};return i.encrypt=function(a,e){var r=Math.ceil(a.n.bitLength()/8),p;do p=new t(n.util.bytesToHex(o.getBytesSync(r)),16).mod(a.n);while(p.compareTo(t.ONE)<=0);p=n.util.hexToBytes(p.toString(16));var f=r-p.length;f>0&&(p=n.util.fillString("\0",f)+p);var s=a.encrypt(p,"NONE"),g=l.generate(p,e);return{encapsulation:s,key:g}},i.decrypt=function(a,e,r){var p=a.decrypt(e,"NONE");return l.generate(p,r)},i},n.kem.kdf1=function(l,m){c(this,l,0,m||l.digestLength)},n.kem.kdf2=function(l,m){c(this,l,1,m||l.digestLength)};function c(l,m,o,i){l.generate=function(a,e){for(var r=new n.util.ByteBuffer,p=Math.ceil(e/i)+o,f=new n.util.ByteBuffer,s=o;s<p;++s){f.putInt32(s),m.start(),m.update(a+f.getBytes());var g=m.digest();r.putBytes(g.getBytes(i))}return r.truncate(r.length()-e),r.getBytes()}}},8388:(S,_,u)=>{var n=u(8561);u(7456),S.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var t={},c=[],l=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var m=0;m<n.log.levels.length;++m){var o=n.log.levels[m];t[o]={index:m,name:o.toUpperCase()}}n.log.logMessage=function(s){for(var g=t[s.level].index,h=0;h<c.length;++h){var v=c[h];if(v.flags&n.log.NO_LEVEL_CHECK)v.f(s);else{var b=t[v.level].index;g<=b&&v.f(v,s)}}},n.log.prepareStandard=function(s){"standard"in s||(s.standard=t[s.level].name+" ["+s.category+"] "+s.message)},n.log.prepareFull=function(s){if(!("full"in s)){var g=[s.message];g=g.concat([]),s.full=n.util.format.apply(this,g)}},n.log.prepareStandardFull=function(s){"standardFull"in s||(n.log.prepareStandard(s),s.standardFull=s.standard)};for(var i=["error","warning","info","debug","verbose"],m=0;m<i.length;++m)(function(g){n.log[g]=function(h,v){var b=Array.prototype.slice.call(arguments).slice(2),d={timestamp:new Date,level:g,category:h,message:v,arguments:b};n.log.logMessage(d)}})(i[m]);if(n.log.makeLogger=function(s){var g={flags:0,f:s};return n.log.setLevel(g,"none"),g},n.log.setLevel=function(s,g){var h=!1;if(s&&!(s.flags&n.log.LEVEL_LOCKED))for(var v=0;v<n.log.levels.length;++v){var b=n.log.levels[v];if(g==b){s.level=g,h=!0;break}}return h},n.log.lock=function(s,g){typeof g>"u"||g?s.flags|=n.log.LEVEL_LOCKED:s.flags&=~n.log.LEVEL_LOCKED},n.log.addLogger=function(s){c.push(s)},typeof console<"u"&&"log"in console){var a;if(console.error&&console.warn&&console.info&&console.debug){var e={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},r=function(s,g){n.log.prepareStandard(g);var h=e[g.level],v=[g.standard];v=v.concat(g.arguments.slice()),h.apply(console,v)};a=n.log.makeLogger(r)}else{var r=function(g,h){n.log.prepareStandardFull(h),console.log(h.standardFull)};a=n.log.makeLogger(r)}n.log.setLevel(a,"debug"),n.log.addLogger(a),l=a}else console={log:function(){}};if(l!==null&&typeof window<"u"&&window.location){var p=new URL(window.location.href).searchParams;if(p.has("console.level")&&n.log.setLevel(l,p.get("console.level").slice(-1)[0]),p.has("console.lock")){var f=p.get("console.lock").slice(-1)[0];f=="true"&&n.log.lock(l)}}n.log.consoleLogger=l},5472:(S,_,u)=>{S.exports=u(6777),u(6138),u(6485),u(855),u(2734)},6777:(S,_,u)=>{var n=u(8561);S.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},6138:(S,_,u)=>{var n=u(8561);u(6777),u(7456);var t=S.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=t,t.create=function(){i||a();var r=null,p=n.util.createBuffer(),f=new Array(16),s={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return s.start=function(){s.messageLength=0,s.fullMessageLength=s.messageLength64=[];for(var g=s.messageLengthSize/4,h=0;h<g;++h)s.fullMessageLength.push(0);return p=n.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},s},s.start(),s.update=function(g,h){h==="utf8"&&(g=n.util.encodeUtf8(g));var v=g.length;s.messageLength+=v,v=[v/4294967296>>>0,v>>>0];for(var b=s.fullMessageLength.length-1;b>=0;--b)s.fullMessageLength[b]+=v[1],v[1]=v[0]+(s.fullMessageLength[b]/4294967296>>>0),s.fullMessageLength[b]=s.fullMessageLength[b]>>>0,v[0]=v[1]/4294967296>>>0;return p.putBytes(g),e(r,f,p),(p.read>2048||p.length()===0)&&p.compact(),s},s.digest=function(){var g=n.util.createBuffer();g.putBytes(p.bytes());var h=s.fullMessageLength[s.fullMessageLength.length-1]+s.messageLengthSize,v=h&s.blockLength-1;g.putBytes(c.substr(0,s.blockLength-v));for(var b,d=0,w=s.fullMessageLength.length-1;w>=0;--w)b=s.fullMessageLength[w]*8+d,d=b/4294967296>>>0,g.putInt32Le(b>>>0);var k={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3};e(k,f,g);var R=n.util.createBuffer();return R.putInt32Le(k.h0),R.putInt32Le(k.h1),R.putInt32Le(k.h2),R.putInt32Le(k.h3),R},s};var c=null,l=null,m=null,o=null,i=!1;function a(){c="\x80",c+=n.util.fillString("\0",64),l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],o=new Array(64);for(var r=0;r<64;++r)o[r]=Math.floor(Math.abs(Math.sin(r+1))*4294967296);i=!0}function e(r,p,f){for(var s,g,h,v,b,d,w,k,R=f.length();R>=64;){for(g=r.h0,h=r.h1,v=r.h2,b=r.h3,k=0;k<16;++k)p[k]=f.getInt32Le(),d=b^h&(v^b),s=g+d+o[k]+p[k],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;for(;k<32;++k)d=v^b&(h^v),s=g+d+o[k]+p[l[k]],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;for(;k<48;++k)d=h^v^b,s=g+d+o[k]+p[l[k]],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;for(;k<64;++k)d=v^(h|~b),s=g+d+o[k]+p[l[k]],w=m[k],g=b,b=v,v=h,h+=s<<w|s>>>32-w;r.h0=r.h0+g|0,r.h1=r.h1+h|0,r.h2=r.h2+v|0,r.h3=r.h3+b|0,R-=64}}},7220:(S,_,u)=>{var n=u(8561);u(2893),S.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},2893:(S,_,u)=>{var n=u(8561);u(7456),n.mgf=n.mgf||{};var t=S.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{};t.create=function(c){var l={generate:function(m,o){for(var i=new n.util.ByteBuffer,a=Math.ceil(o/c.digestLength),e=0;e<a;e++){var r=new n.util.ByteBuffer;r.putInt32(e),c.start(),c.update(m+r.getBytes()),i.putBuffer(c.digest())}return i.truncate(i.length()-o),i.getBytes()}};return l}},245:(S,_,u)=>{var n=u(8561);n.pki=n.pki||{};var t=S.exports=n.pki.oids=n.oids=n.oids||{};function c(m,o){t[m]=o,t[o]=m}function l(m,o){t[m]=o}c("1.2.840.113549.1.1.1","rsaEncryption"),c("1.2.840.113549.1.1.4","md5WithRSAEncryption"),c("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),c("1.2.840.113549.1.1.7","RSAES-OAEP"),c("1.2.840.113549.1.1.8","mgf1"),c("1.2.840.113549.1.1.9","pSpecified"),c("1.2.840.113549.1.1.10","RSASSA-PSS"),c("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),c("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),c("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),c("1.3.101.112","EdDSA25519"),c("1.2.840.10040.4.3","dsa-with-sha1"),c("1.3.14.3.2.7","desCBC"),c("1.3.14.3.2.26","sha1"),c("1.3.14.3.2.29","sha1WithRSASignature"),c("2.16.840.1.101.3.4.2.1","sha256"),c("2.16.840.1.101.3.4.2.2","sha384"),c("2.16.840.1.101.3.4.2.3","sha512"),c("2.16.840.1.101.3.4.2.4","sha224"),c("2.16.840.1.101.3.4.2.5","sha512-224"),c("2.16.840.1.101.3.4.2.6","sha512-256"),c("1.2.840.113549.2.2","md2"),c("1.2.840.113549.2.5","md5"),c("1.2.840.113549.1.7.1","data"),c("1.2.840.113549.1.7.2","signedData"),c("1.2.840.113549.1.7.3","envelopedData"),c("1.2.840.113549.1.7.4","signedAndEnvelopedData"),c("1.2.840.113549.1.7.5","digestedData"),c("1.2.840.113549.1.7.6","encryptedData"),c("1.2.840.113549.1.9.1","emailAddress"),c("1.2.840.113549.1.9.2","unstructuredName"),c("1.2.840.113549.1.9.3","contentType"),c("1.2.840.113549.1.9.4","messageDigest"),c("1.2.840.113549.1.9.5","signingTime"),c("1.2.840.113549.1.9.6","counterSignature"),c("1.2.840.113549.1.9.7","challengePassword"),c("1.2.840.113549.1.9.8","unstructuredAddress"),c("1.2.840.113549.1.9.14","extensionRequest"),c("1.2.840.113549.1.9.20","friendlyName"),c("1.2.840.113549.1.9.21","localKeyId"),c("1.2.840.113549.1.9.22.1","x509Certificate"),c("1.2.840.113549.1.12.10.1.1","keyBag"),c("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),c("1.2.840.113549.1.12.10.1.3","certBag"),c("1.2.840.113549.1.12.10.1.4","crlBag"),c("1.2.840.113549.1.12.10.1.5","secretBag"),c("1.2.840.113549.1.12.10.1.6","safeContentsBag"),c("1.2.840.113549.1.5.13","pkcs5PBES2"),c("1.2.840.113549.1.5.12","pkcs5PBKDF2"),c("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),c("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),c("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),c("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),c("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),c("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),c("1.2.840.113549.2.7","hmacWithSHA1"),c("1.2.840.113549.2.8","hmacWithSHA224"),c("1.2.840.113549.2.9","hmacWithSHA256"),c("1.2.840.113549.2.10","hmacWithSHA384"),c("1.2.840.113549.2.11","hmacWithSHA512"),c("1.2.840.113549.3.7","des-EDE3-CBC"),c("2.16.840.1.101.3.4.1.2","aes128-CBC"),c("2.16.840.1.101.3.4.1.22","aes192-CBC"),c("2.16.840.1.101.3.4.1.42","aes256-CBC"),c("2.5.4.3","commonName"),c("2.5.4.4","surname"),c("2.5.4.5","serialNumber"),c("2.5.4.6","countryName"),c("2.5.4.7","localityName"),c("2.5.4.8","stateOrProvinceName"),c("2.5.4.9","streetAddress"),c("2.5.4.10","organizationName"),c("2.5.4.11","organizationalUnitName"),c("2.5.4.12","title"),c("2.5.4.13","description"),c("2.5.4.15","businessCategory"),c("2.5.4.17","postalCode"),c("2.5.4.42","givenName"),c("2.5.4.65","pseudonym"),c("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),c("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),c("2.16.840.1.113730.1.1","nsCertType"),c("2.16.840.1.113730.1.13","nsComment"),l("2.5.29.1","authorityKeyIdentifier"),l("2.5.29.2","keyAttributes"),l("2.5.29.3","certificatePolicies"),l("2.5.29.4","keyUsageRestriction"),l("2.5.29.5","policyMapping"),l("2.5.29.6","subtreesConstraint"),l("2.5.29.7","subjectAltName"),l("2.5.29.8","issuerAltName"),l("2.5.29.9","subjectDirectoryAttributes"),l("2.5.29.10","basicConstraints"),l("2.5.29.11","nameConstraints"),l("2.5.29.12","policyConstraints"),l("2.5.29.13","basicConstraints"),c("2.5.29.14","subjectKeyIdentifier"),c("2.5.29.15","keyUsage"),l("2.5.29.16","privateKeyUsagePeriod"),c("2.5.29.17","subjectAltName"),c("2.5.29.18","issuerAltName"),c("2.5.29.19","basicConstraints"),l("2.5.29.20","cRLNumber"),l("2.5.29.21","cRLReason"),l("2.5.29.22","expirationDate"),l("2.5.29.23","instructionCode"),l("2.5.29.24","invalidityDate"),l("2.5.29.25","cRLDistributionPoints"),l("2.5.29.26","issuingDistributionPoint"),l("2.5.29.27","deltaCRLIndicator"),l("2.5.29.28","issuingDistributionPoint"),l("2.5.29.29","certificateIssuer"),l("2.5.29.30","nameConstraints"),c("2.5.29.31","cRLDistributionPoints"),c("2.5.29.32","certificatePolicies"),l("2.5.29.33","policyMappings"),l("2.5.29.34","policyConstraints"),c("2.5.29.35","authorityKeyIdentifier"),l("2.5.29.36","policyConstraints"),c("2.5.29.37","extKeyUsage"),l("2.5.29.46","freshestCRL"),l("2.5.29.54","inhibitAnyPolicy"),c("1.3.6.1.4.1.11129.2.4.2","timestampList"),c("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),c("1.3.6.1.5.5.7.3.1","serverAuth"),c("1.3.6.1.5.5.7.3.2","clientAuth"),c("1.3.6.1.5.5.7.3.3","codeSigning"),c("1.3.6.1.5.5.7.3.4","emailProtection"),c("1.3.6.1.5.5.7.3.8","timeStamping")},6959:(S,_,u)=>{var n=u(8561);if(u(9445),u(7357),u(5918),u(6777),u(245),u(9429),u(492),u(2055),u(9274),u(2804),u(7456),typeof t>"u")var t=n.jsbn.BigInteger;var c=n.asn1,l=n.pki=n.pki||{};S.exports=l.pbe=n.pbe=n.pbe||{};var m=l.oids,o={name:"EncryptedPrivateKeyInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},i={name:"PBES2Algorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},a={name:"pkcs-12PbeParams",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(s,g,h){h=h||{},h.saltSize=h.saltSize||8,h.count=h.count||2048,h.algorithm=h.algorithm||"aes128",h.prfAlgorithm=h.prfAlgorithm||"sha1";var v=n.random.getBytesSync(h.saltSize),b=h.count,d=c.integerToDer(b),w,k,R;if(h.algorithm.indexOf("aes")===0||h.algorithm==="des"){var T,I,C;switch(h.algorithm){case"aes128":w=16,T=16,I=m["aes128-CBC"],C=n.aes.createEncryptionCipher;break;case"aes192":w=24,T=16,I=m["aes192-CBC"],C=n.aes.createEncryptionCipher;break;case"aes256":w=32,T=16,I=m["aes256-CBC"],C=n.aes.createEncryptionCipher;break;case"des":w=8,T=8,I=m.desCBC,C=n.des.createEncryptionCipher;break;default:var A=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw A.algorithm=h.algorithm,A}var O="hmacWith"+h.prfAlgorithm.toUpperCase(),E=p(O),P=n.pkcs5.pbkdf2(g,v,b,w,E),N=n.random.getBytesSync(T),j=C(P);j.start(N),j.update(c.toDer(s)),j.finish(),R=j.output.getBytes();var M=f(v,d,w,O);k=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(m.pkcs5PBES2).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(m.pkcs5PBKDF2).getBytes()),M]),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(I).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,N)])])])}else if(h.algorithm==="3des"){w=24;var z=new n.util.ByteBuffer(v),P=l.pbe.generatePkcs12Key(g,z,1,b,w),N=l.pbe.generatePkcs12Key(g,z,2,b,w),j=n.des.createEncryptionCipher(P);j.start(N),j.update(c.toDer(s)),j.finish(),R=j.output.getBytes(),k=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(m["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,v),c.create(c.Class.UNIVERSAL,c.Type.INTEGER,!1,d.getBytes())])])}else{var A=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw A.algorithm=h.algorithm,A}var H=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[k,c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,R)]);return H},l.decryptPrivateKeyInfo=function(s,g){var h=null,v={},b=[];if(!c.validate(s,o,v,b)){var d=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw d.errors=b,d}var w=c.derToOid(v.encryptionOid),k=l.pbe.getCipher(w,v.encryptionParams,g),R=n.util.createBuffer(v.encryptedData);return k.update(R),k.finish()&&(h=c.fromDer(k.output)),h},l.encryptedPrivateKeyToPem=function(s,g){var h={type:"ENCRYPTED PRIVATE KEY",body:c.toDer(s).getBytes()};return n.pem.encode(h,{maxline:g})},l.encryptedPrivateKeyFromPem=function(s){var g=n.pem.decode(s)[0];if(g.type!=="ENCRYPTED PRIVATE KEY"){var h=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw h.headerType=g.type,h}if(g.procType&&g.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return c.fromDer(g.body)},l.encryptRsaPrivateKey=function(s,g,h){if(h=h||{},!h.legacy){var v=l.wrapRsaPrivateKey(l.privateKeyToAsn1(s));return v=l.encryptPrivateKeyInfo(v,g,h),l.encryptedPrivateKeyToPem(v)}var b,d,w,k;switch(h.algorithm){case"aes128":b="AES-128-CBC",w=16,d=n.random.getBytesSync(16),k=n.aes.createEncryptionCipher;break;case"aes192":b="AES-192-CBC",w=24,d=n.random.getBytesSync(16),k=n.aes.createEncryptionCipher;break;case"aes256":b="AES-256-CBC",w=32,d=n.random.getBytesSync(16),k=n.aes.createEncryptionCipher;break;case"3des":b="DES-EDE3-CBC",w=24,d=n.random.getBytesSync(8),k=n.des.createEncryptionCipher;break;case"des":b="DES-CBC",w=8,d=n.random.getBytesSync(8),k=n.des.createEncryptionCipher;break;default:var R=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+h.algorithm+'".');throw R.algorithm=h.algorithm,R}var T=n.pbe.opensslDeriveBytes(g,d.substr(0,8),w),I=k(T);I.start(d),I.update(c.toDer(l.privateKeyToAsn1(s))),I.finish();var C={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:b,parameters:n.util.bytesToHex(d).toUpperCase()},body:I.output.getBytes()};return n.pem.encode(C)},l.decryptRsaPrivateKey=function(s,g){var h=null,v=n.pem.decode(s)[0];if(v.type!=="ENCRYPTED PRIVATE KEY"&&v.type!=="PRIVATE KEY"&&v.type!=="RSA PRIVATE KEY"){var b=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw b.headerType=b,b}if(v.procType&&v.procType.type==="ENCRYPTED"){var d,w;switch(v.dekInfo.algorithm){case"DES-CBC":d=8,w=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":d=24,w=n.des.createDecryptionCipher;break;case"AES-128-CBC":d=16,w=n.aes.createDecryptionCipher;break;case"AES-192-CBC":d=24,w=n.aes.createDecryptionCipher;break;case"AES-256-CBC":d=32,w=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":d=5,w=function(C){return n.rc2.createDecryptionCipher(C,40)};break;case"RC2-64-CBC":d=8,w=function(C){return n.rc2.createDecryptionCipher(C,64)};break;case"RC2-128-CBC":d=16,w=function(C){return n.rc2.createDecryptionCipher(C,128)};break;default:var b=new Error('Could not decrypt private key; unsupported encryption algorithm "'+v.dekInfo.algorithm+'".');throw b.algorithm=v.dekInfo.algorithm,b}var k=n.util.hexToBytes(v.dekInfo.parameters),R=n.pbe.opensslDeriveBytes(g,k.substr(0,8),d),T=w(R);if(T.start(k),T.update(n.util.createBuffer(v.body)),T.finish())h=T.output.getBytes();else return h}else h=v.body;return v.type==="ENCRYPTED PRIVATE KEY"?h=l.decryptPrivateKeyInfo(c.fromDer(h),g):h=c.fromDer(h),h!==null&&(h=l.privateKeyFromAsn1(h)),h},l.pbe.generatePkcs12Key=function(s,g,h,v,b,d){var w,k;if(typeof d>"u"||d===null){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');d=n.md.sha1.create()}var R=d.digestLength,T=d.blockLength,I=new n.util.ByteBuffer,C=new n.util.ByteBuffer;if(s!=null){for(k=0;k<s.length;k++)C.putInt16(s.charCodeAt(k));C.putInt16(0)}var A=C.length(),O=g.length(),E=new n.util.ByteBuffer;E.fillWithByte(h,T);var P=T*Math.ceil(O/T),N=new n.util.ByteBuffer;for(k=0;k<P;k++)N.putByte(g.at(k%O));var j=T*Math.ceil(A/T),M=new n.util.ByteBuffer;for(k=0;k<j;k++)M.putByte(C.at(k%A));var z=N;z.putBuffer(M);for(var H=Math.ceil(b/R),X=1;X<=H;X++){var F=new n.util.ByteBuffer;F.putBytes(E.bytes()),F.putBytes(z.bytes());for(var Z=0;Z<v;Z++)d.start(),d.update(F.getBytes()),F=d.digest();var re=new n.util.ByteBuffer;for(k=0;k<T;k++)re.putByte(F.at(k%R));var oe=Math.ceil(O/T)+Math.ceil(A/T),he=new n.util.ByteBuffer;for(w=0;w<oe;w++){var de=new n.util.ByteBuffer(z.getBytes(T)),fe=511;for(k=re.length()-1;k>=0;k--)fe=fe>>8,fe+=re.at(k)+de.at(k),de.setAt(k,fe&255);he.putBuffer(de)}z=he,I.putBuffer(F)}return I.truncate(I.length()-b),I},l.pbe.getCipher=function(s,g,h){switch(s){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(s,g,h);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(s,g,h);default:var v=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw v.oid=s,v.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],v}},l.pbe.getCipherForPBES2=function(s,g,h){var v={},b=[];if(!c.validate(g,i,v,b)){var d=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw d.errors=b,d}if(s=c.derToOid(v.kdfOid),s!==l.oids.pkcs5PBKDF2){var d=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw d.oid=s,d.supportedOids=["pkcs5PBKDF2"],d}if(s=c.derToOid(v.encOid),s!==l.oids["aes128-CBC"]&&s!==l.oids["aes192-CBC"]&&s!==l.oids["aes256-CBC"]&&s!==l.oids["des-EDE3-CBC"]&&s!==l.oids.desCBC){var d=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw d.oid=s,d.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],d}var w=v.kdfSalt,k=n.util.createBuffer(v.kdfIterationCount);k=k.getInt(k.length()<<3);var R,T;switch(l.oids[s]){case"aes128-CBC":R=16,T=n.aes.createDecryptionCipher;break;case"aes192-CBC":R=24,T=n.aes.createDecryptionCipher;break;case"aes256-CBC":R=32,T=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":R=24,T=n.des.createDecryptionCipher;break;case"desCBC":R=8,T=n.des.createDecryptionCipher;break}var I=r(v.prfOid),C=n.pkcs5.pbkdf2(h,w,k,R,I),A=v.encIv,O=T(C);return O.start(A),O},l.pbe.getCipherForPKCS12PBE=function(s,g,h){var v={},b=[];if(!c.validate(g,a,v,b)){var d=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw d.errors=b,d}var w=n.util.createBuffer(v.salt),k=n.util.createBuffer(v.iterations);k=k.getInt(k.length()<<3);var R,T,I;switch(s){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:R=24,T=8,I=n.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:R=5,T=8,I=function(P,N){var j=n.rc2.createDecryptionCipher(P,40);return j.start(N,null),j};break;default:var d=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw d.oid=s,d}var C=r(v.prfOid),A=l.pbe.generatePkcs12Key(h,w,1,k,R,C);C.start();var O=l.pbe.generatePkcs12Key(h,w,2,k,T,C);return I(A,O)},l.pbe.opensslDeriveBytes=function(s,g,h,v){if(typeof v>"u"||v===null){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');v=n.md.md5.create()}g===null&&(g="");for(var b=[e(v,s+g)],d=16,w=1;d<h;++w,d+=16)b.push(e(v,b[w-1]+s+g));return b.join("").substr(0,h)};function e(s,g){return s.start().update(g).digest().getBytes()}function r(s){var g;if(!s)g="hmacWithSHA1";else if(g=l.oids[c.derToOid(s)],!g){var h=new Error("Unsupported PRF OID.");throw h.oid=s,h.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],h}return p(g)}function p(s){var g=n.md;switch(s){case"hmacWithSHA224":g=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":s=s.substr(8).toLowerCase();break;default:var h=new Error("Unsupported PRF algorithm.");throw h.algorithm=s,h.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],h}if(!g||!(s in g))throw new Error("Unknown hash algorithm: "+s);return g[s].create()}function f(s,g,h,v){var b=c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OCTETSTRING,!1,s),c.create(c.Class.UNIVERSAL,c.Type.INTEGER,!1,g.getBytes())]);return v!=="hmacWithSHA1"&&b.value.push(c.create(c.Class.UNIVERSAL,c.Type.INTEGER,!1,n.util.hexToBytes(h.toString(16))),c.create(c.Class.UNIVERSAL,c.Type.SEQUENCE,!0,[c.create(c.Class.UNIVERSAL,c.Type.OID,!1,c.oidToDer(l.oids[v]).getBytes()),c.create(c.Class.UNIVERSAL,c.Type.NULL,!1,"")])),b}},9429:(S,_,u)=>{var n=u(8561);u(2007),u(6777),u(7456);var t=n.pkcs5=n.pkcs5||{},c;n.util.isNodejs&&!n.options.usePureJavaScript&&(c=u(6982)),S.exports=n.pbkdf2=t.pbkdf2=function(l,m,o,i,a,e){if(typeof a=="function"&&(e=a,a=null),n.util.isNodejs&&!n.options.usePureJavaScript&&c.pbkdf2&&(a===null||typeof a!="object")&&(c.pbkdf2Sync.length>4||!a||a==="sha1"))return typeof a!="string"&&(a="sha1"),l=Buffer.from(l,"binary"),m=Buffer.from(m,"binary"),e?c.pbkdf2Sync.length===4?c.pbkdf2(l,m,o,i,(function(I,C){if(I)return e(I);e(null,C.toString("binary"))})):c.pbkdf2(l,m,o,i,a,(function(I,C){if(I)return e(I);e(null,C.toString("binary"))})):c.pbkdf2Sync.length===4?c.pbkdf2Sync(l,m,o,i).toString("binary"):c.pbkdf2Sync(l,m,o,i,a).toString("binary");if((typeof a>"u"||a===null)&&(a="sha1"),typeof a=="string"){if(!(a in n.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=n.md[a].create()}var r=a.digestLength;if(i>4294967295*r){var p=new Error("Derived key is too long.");if(e)return e(p);throw p}var f=Math.ceil(i/r),s=i-(f-1)*r,g=n.hmac.create();g.start(a,l);var h="",v,b,d;if(!e){for(var w=1;w<=f;++w){g.start(null,null),g.update(m),g.update(n.util.int32ToBytes(w)),v=d=g.digest().getBytes();for(var k=2;k<=o;++k)g.start(null,null),g.update(d),b=g.digest().getBytes(),v=n.util.xorBytes(v,b,r),d=b;h+=w<f?v:v.substr(0,s)}return h}var w=1,k;function R(){if(w>f)return e(null,h);g.start(null,null),g.update(m),g.update(n.util.int32ToBytes(w)),v=d=g.digest().getBytes(),k=2,T()}function T(){if(k<=o)return g.start(null,null),g.update(d),b=g.digest().getBytes(),v=n.util.xorBytes(v,b,r),d=b,++k,n.util.setImmediate(T);h+=w<f?v:v.substr(0,s),++w,R()}R()}},492:(S,_,u)=>{var n=u(8561);u(7456);var t=S.exports=n.pem=n.pem||{};t.encode=function(m,o){o=o||{};var i="-----BEGIN "+m.type+`-----\r
|
|
235
235
|
`,a;if(m.procType&&(a={name:"Proc-Type",values:[String(m.procType.version),m.procType.type]},i+=c(a)),m.contentDomain&&(a={name:"Content-Domain",values:[m.contentDomain]},i+=c(a)),m.dekInfo&&(a={name:"DEK-Info",values:[m.dekInfo.algorithm]},m.dekInfo.parameters&&a.values.push(m.dekInfo.parameters),i+=c(a)),m.headers)for(var e=0;e<m.headers.length;++e)i+=c(m.headers[e]);return m.procType&&(i+=`\r
|
|
236
236
|
`),i+=n.util.encode64(m.body,o.maxline||64)+`\r
|
|
237
237
|
`,i+="-----END "+m.type+`-----\r
|
|
@@ -246,13 +246,13 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
|
|
|
246
246
|
Private-Lines: `+g+`\r
|
|
247
247
|
`,p+=v;var T=m("putty-private-key-file-mac-key",i),I=n.util.createBuffer();l(I,e),l(I,r),l(I,a),I.putInt32(f.length()),I.putBuffer(f),I.putInt32(h.length()),I.putBuffer(h);var C=n.hmac.create();return C.start("sha1",T),C.update(I.bytes()),p+=`\r
|
|
248
248
|
Private-MAC: `+C.digest().toHex()+`\r
|
|
249
|
-
`,p},t.publicKeyToOpenSSH=function(o,i){var a="ssh-rsa";i=i||"";var e=n.util.createBuffer();return l(e,a),c(e,o.e),c(e,o.n),a+" "+n.util.encode64(e.bytes())+" "+i},t.privateKeyToOpenSSH=function(o,i){return i?n.pki.encryptRsaPrivateKey(o,i,{legacy:!0,algorithm:"aes128"}):n.pki.privateKeyToPem(o)},t.getPublicKeyFingerprint=function(o,i){i=i||{};var a=i.md||n.md.md5.create(),e="ssh-rsa",r=n.util.createBuffer();l(r,e),c(r,o.e),c(r,o.n),a.start(),a.update(r.getBytes());var p=a.digest();if(i.encoding==="hex"){var f=p.toHex();return i.delimiter?f.match(/.{2}/g).join(i.delimiter):f}else{if(i.encoding==="binary")return p.getBytes();if(i.encoding)throw new Error('Unknown encoding "'+i.encoding+'".')}return p};function c(o,i){var a=i.toString(16);a[0]>="8"&&(a="00"+a);var e=n.util.hexToBytes(a);o.putInt32(e.length),o.putBytes(e)}function l(o,i){o.putInt32(i.length),o.putString(i)}function m(){for(var o=n.md.sha1.create(),i=arguments.length,a=0;a<i;++a)o.update(arguments[a]);return o.digest()}},4275:(S,_,u)=>{var n=u(8561);u(7357),u(2007),u(6138),u(492),u(2493),u(2055),u(6485),u(7456);var t=function(L,D,B,U){var G=n.util.createBuffer(),ee=L.length>>1,q=ee+(L.length&1),J=L.substr(0,q),pe=L.substr(ee,q),ue=n.util.createBuffer(),ae=n.hmac.create();B=D+B;var me=Math.ceil(U/16),be=Math.ceil(U/20);ae.start("MD5",J);var ye=n.util.createBuffer();ue.putBytes(B);for(var _e=0;_e<me;++_e)ae.start(null,null),ae.update(ue.getBytes()),ue.putBuffer(ae.digest()),ae.start(null,null),ae.update(ue.bytes()+B),ye.putBuffer(ae.digest());ae.start("SHA1",pe);var Oe=n.util.createBuffer();ue.clear(),ue.putBytes(B);for(var _e=0;_e<be;++_e)ae.start(null,null),ae.update(ue.getBytes()),ue.putBuffer(ae.digest()),ae.start(null,null),ae.update(ue.bytes()+B),Oe.putBuffer(ae.digest());return G.putBytes(n.util.xorBytes(ye.getBytes(),Oe.getBytes(),U)),G},c=function(L,D,B,U){},l=function(L,D,B){var U=n.hmac.create();U.start("SHA1",L);var G=n.util.createBuffer();return G.putInt32(D[0]),G.putInt32(D[1]),G.putByte(B.type),G.putByte(B.version.major),G.putByte(B.version.minor),G.putInt16(B.length),G.putBytes(B.fragment.bytes()),U.update(G.getBytes()),U.digest().getBytes()},m=function(L,D,B){var U=!1;try{var G=L.deflate(D.fragment.getBytes());D.fragment=n.util.createBuffer(G),D.length=G.length,U=!0}catch{}return U},o=function(L,D,B){var U=!1;try{var G=L.inflate(D.fragment.getBytes());D.fragment=n.util.createBuffer(G),D.length=G.length,U=!0}catch{}return U},i=function(L,D){var B=0;switch(D){case 1:B=L.getByte();break;case 2:B=L.getInt16();break;case 3:B=L.getInt24();break;case 4:B=L.getInt32();break}return n.util.createBuffer(L.getBytes(B))},a=function(L,D,B){L.putInt(B.length(),D<<3),L.putBuffer(B)},e={};e.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},e.SupportedVersions=[e.Versions.TLS_1_1,e.Versions.TLS_1_0],e.Version=e.SupportedVersions[0],e.MaxFragment=15360,e.ConnectionEnd={server:0,client:1},e.PRFAlgorithm={tls_prf_sha256:0},e.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},e.CipherType={stream:0,block:1,aead:2},e.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},e.CompressionMethod={none:0,deflate:1},e.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},e.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},e.Alert={},e.Alert.Level={warning:1,fatal:2},e.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},e.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},e.CipherSuites={},e.getCipherSuite=function(L){var D=null;for(var B in e.CipherSuites){var U=e.CipherSuites[B];if(U.id[0]===L.charCodeAt(0)&&U.id[1]===L.charCodeAt(1)){D=U;break}}return D},e.handleUnexpected=function(L,D){var B=!L.open&&L.entity===e.ConnectionEnd.client;B||L.error(L,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unexpected_message}})},e.handleHelloRequest=function(L,D,B){!L.handshaking&&L.handshakes>0&&(e.queue(L,e.createAlert(L,{level:e.Alert.Level.warning,description:e.Alert.Description.no_renegotiation})),e.flush(L)),L.process()},e.parseHelloMessage=function(L,D,B){var U=null,G=L.entity===e.ConnectionEnd.client;if(B<38)L.error(L,{message:G?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});else{var ee=D.fragment,q=ee.length();if(U={version:{major:ee.getByte(),minor:ee.getByte()},random:n.util.createBuffer(ee.getBytes(32)),session_id:i(ee,1),extensions:[]},G?(U.cipher_suite=ee.getBytes(2),U.compression_method=ee.getByte()):(U.cipher_suites=i(ee,2),U.compression_methods=i(ee,1)),q=B-(q-ee.length()),q>0){for(var J=i(ee,2);J.length()>0;)U.extensions.push({type:[J.getByte(),J.getByte()],data:i(J,2)});if(!G)for(var pe=0;pe<U.extensions.length;++pe){var ue=U.extensions[pe];if(ue.type[0]===0&&ue.type[1]===0)for(var ae=i(ue.data,2);ae.length()>0;){var me=ae.getByte();if(me!==0)break;L.session.extensions.server_name.serverNameList.push(i(ae,2).getBytes())}}}if(L.session.version&&(U.version.major!==L.session.version.major||U.version.minor!==L.session.version.minor))return L.error(L,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.protocol_version}});if(G)L.session.cipherSuite=e.getCipherSuite(U.cipher_suite);else for(var be=n.util.createBuffer(U.cipher_suites.bytes());be.length()>0&&(L.session.cipherSuite=e.getCipherSuite(be.getBytes(2)),L.session.cipherSuite===null););if(L.session.cipherSuite===null)return L.error(L,{message:"No cipher suites in common.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(U.cipher_suite)});G?L.session.compressionMethod=U.compression_method:L.session.compressionMethod=e.CompressionMethod.none}return U},e.createSecurityParameters=function(L,D){var B=L.entity===e.ConnectionEnd.client,U=D.random.bytes(),G=B?L.session.sp.client_random:U,ee=B?U:e.createRandom().getBytes();L.session.sp={entity:L.entity,prf_algorithm:e.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:L.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:G,server_random:ee}},e.handleServerHello=function(L,D,B){var U=e.parseHelloMessage(L,D,B);if(!L.fail){if(U.version.minor<=L.version.minor)L.version.minor=U.version.minor;else return L.error(L,{message:"Incompatible TLS version.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.protocol_version}});L.session.version=L.version;var G=U.session_id.bytes();G.length>0&&G===L.session.id?(L.expect=h,L.session.resuming=!0,L.session.sp.server_random=U.random.bytes()):(L.expect=p,L.session.resuming=!1,e.createSecurityParameters(L,U)),L.session.id=G,L.process()}},e.handleClientHello=function(L,D,B){var U=e.parseHelloMessage(L,D,B);if(!L.fail){var G=U.session_id.bytes(),ee=null;if(L.sessionCache&&(ee=L.sessionCache.getSession(G),ee===null?G="":(ee.version.major!==U.version.major||ee.version.minor>U.version.minor)&&(ee=null,G="")),G.length===0&&(G=n.random.getBytes(32)),L.session.id=G,L.session.clientHelloVersion=U.version,L.session.sp={},ee)L.version=L.session.version=ee.version,L.session.sp=ee.sp;else{for(var q,J=1;J<e.SupportedVersions.length&&(q=e.SupportedVersions[J],!(q.minor<=U.version.minor));++J);L.version={major:q.major,minor:q.minor},L.session.version=L.version}ee!==null?(L.expect=I,L.session.resuming=!0,L.session.sp.client_random=U.random.bytes()):(L.expect=L.verifyClient!==!1?k:R,L.session.resuming=!1,e.createSecurityParameters(L,U)),L.open=!0,e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createServerHello(L)})),L.session.resuming?(e.queue(L,e.createRecord(L,{type:e.ContentType.change_cipher_spec,data:e.createChangeCipherSpec()})),L.state.pending=e.createConnectionState(L),L.state.current.write=L.state.pending.write,e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createFinished(L)}))):(e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createCertificate(L)})),L.fail||(e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createServerKeyExchange(L)})),L.verifyClient!==!1&&e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createCertificateRequest(L)})),e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createServerHelloDone(L)})))),e.flush(L),L.process()}},e.handleCertificate=function(L,D,B){if(B<3)return L.error(L,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var U=D.fragment,G={certificate_list:i(U,3)},ee,q,J=[];try{for(;G.certificate_list.length()>0;)ee=i(G.certificate_list,3),q=n.asn1.fromDer(ee),ee=n.pki.certificateFromAsn1(q,!0),J.push(ee)}catch(ue){return L.error(L,{message:"Could not parse certificate list.",cause:ue,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.bad_certificate}})}var pe=L.entity===e.ConnectionEnd.client;(pe||L.verifyClient===!0)&&J.length===0?L.error(L,{message:pe?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}}):J.length===0?L.expect=pe?f:R:(pe?L.session.serverCertificate=J[0]:L.session.clientCertificate=J[0],e.verifyCertificateChain(L,J)&&(L.expect=pe?f:R)),L.process()},e.handleServerKeyExchange=function(L,D,B){if(B>0)return L.error(L,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unsupported_certificate}});L.expect=s,L.process()},e.handleClientKeyExchange=function(L,D,B){if(B<48)return L.error(L,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unsupported_certificate}});var U=D.fragment,G={enc_pre_master_secret:i(U,2).getBytes()},ee=null;if(L.getPrivateKey)try{ee=L.getPrivateKey(L,L.session.serverCertificate),ee=n.pki.privateKeyFromPem(ee)}catch(pe){L.error(L,{message:"Could not get private key.",cause:pe,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}})}if(ee===null)return L.error(L,{message:"No private key set.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}});try{var q=L.session.sp;q.pre_master_secret=ee.decrypt(G.enc_pre_master_secret);var J=L.session.clientHelloVersion;if(J.major!==q.pre_master_secret.charCodeAt(0)||J.minor!==q.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{q.pre_master_secret=n.random.getBytes(48)}L.expect=I,L.session.clientCertificate!==null&&(L.expect=T),L.process()},e.handleCertificateRequest=function(L,D,B){if(B<3)return L.error(L,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var U=D.fragment,G={certificate_types:i(U,1),certificate_authorities:i(U,2)};L.session.certificateRequest=G,L.expect=g,L.process()},e.handleCertificateVerify=function(L,D,B){if(B<2)return L.error(L,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var U=D.fragment;U.read-=4;var G=U.bytes();U.read+=4;var ee={signature:i(U,2).getBytes()},q=n.util.createBuffer();q.putBuffer(L.session.md5.digest()),q.putBuffer(L.session.sha1.digest()),q=q.getBytes();try{var J=L.session.clientCertificate;if(!J.publicKey.verify(q,ee.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");L.session.md5.update(G),L.session.sha1.update(G)}catch{return L.error(L,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.handshake_failure}})}L.expect=I,L.process()},e.handleServerHelloDone=function(L,D,B){if(B>0)return L.error(L,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.record_overflow}});if(L.serverCertificate===null){var U={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.insufficient_security}},G=0,ee=L.verify(L,U.alert.description,G,[]);if(ee!==!0)return(ee||ee===0)&&(typeof ee=="object"&&!n.util.isArray(ee)?(ee.message&&(U.message=ee.message),ee.alert&&(U.alert.description=ee.alert)):typeof ee=="number"&&(U.alert.description=ee)),L.error(L,U)}L.session.certificateRequest!==null&&(D=e.createRecord(L,{type:e.ContentType.handshake,data:e.createCertificate(L)}),e.queue(L,D)),D=e.createRecord(L,{type:e.ContentType.handshake,data:e.createClientKeyExchange(L)}),e.queue(L,D),L.expect=d;var q=function(J,pe){J.session.certificateRequest!==null&&J.session.clientCertificate!==null&&e.queue(J,e.createRecord(J,{type:e.ContentType.handshake,data:e.createCertificateVerify(J,pe)})),e.queue(J,e.createRecord(J,{type:e.ContentType.change_cipher_spec,data:e.createChangeCipherSpec()})),J.state.pending=e.createConnectionState(J),J.state.current.write=J.state.pending.write,e.queue(J,e.createRecord(J,{type:e.ContentType.handshake,data:e.createFinished(J)})),J.expect=h,e.flush(J),J.process()};if(L.session.certificateRequest===null||L.session.clientCertificate===null)return q(L,null);e.getClientSignature(L,q)},e.handleChangeCipherSpec=function(L,D){if(D.fragment.getByte()!==1)return L.error(L,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var B=L.entity===e.ConnectionEnd.client;(L.session.resuming&&B||!L.session.resuming&&!B)&&(L.state.pending=e.createConnectionState(L)),L.state.current.read=L.state.pending.read,(!L.session.resuming&&B||L.session.resuming&&!B)&&(L.state.pending=null),L.expect=B?v:C,L.process()},e.handleFinished=function(L,D,B){var U=D.fragment;U.read-=4;var G=U.bytes();U.read+=4;var ee=D.fragment.getBytes();U=n.util.createBuffer(),U.putBuffer(L.session.md5.digest()),U.putBuffer(L.session.sha1.digest());var q=L.entity===e.ConnectionEnd.client,J=q?"server finished":"client finished",pe=L.session.sp,ue=12,ae=t;if(U=ae(pe.master_secret,J,U.getBytes(),ue),U.getBytes()!==ee)return L.error(L,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.decrypt_error}});L.session.md5.update(G),L.session.sha1.update(G),(L.session.resuming&&q||!L.session.resuming&&!q)&&(e.queue(L,e.createRecord(L,{type:e.ContentType.change_cipher_spec,data:e.createChangeCipherSpec()})),L.state.current.write=L.state.pending.write,L.state.pending=null,e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createFinished(L)}))),L.expect=q?b:A,L.handshaking=!1,++L.handshakes,L.peerCertificate=q?L.session.serverCertificate:L.session.clientCertificate,e.flush(L),L.isConnected=!0,L.connected(L),L.process()},e.handleAlert=function(L,D){var B=D.fragment,U={level:B.getByte(),description:B.getByte()},G;switch(U.description){case e.Alert.Description.close_notify:G="Connection closed.";break;case e.Alert.Description.unexpected_message:G="Unexpected message.";break;case e.Alert.Description.bad_record_mac:G="Bad record MAC.";break;case e.Alert.Description.decryption_failed:G="Decryption failed.";break;case e.Alert.Description.record_overflow:G="Record overflow.";break;case e.Alert.Description.decompression_failure:G="Decompression failed.";break;case e.Alert.Description.handshake_failure:G="Handshake failure.";break;case e.Alert.Description.bad_certificate:G="Bad certificate.";break;case e.Alert.Description.unsupported_certificate:G="Unsupported certificate.";break;case e.Alert.Description.certificate_revoked:G="Certificate revoked.";break;case e.Alert.Description.certificate_expired:G="Certificate expired.";break;case e.Alert.Description.certificate_unknown:G="Certificate unknown.";break;case e.Alert.Description.illegal_parameter:G="Illegal parameter.";break;case e.Alert.Description.unknown_ca:G="Unknown certificate authority.";break;case e.Alert.Description.access_denied:G="Access denied.";break;case e.Alert.Description.decode_error:G="Decode error.";break;case e.Alert.Description.decrypt_error:G="Decrypt error.";break;case e.Alert.Description.export_restriction:G="Export restriction.";break;case e.Alert.Description.protocol_version:G="Unsupported protocol version.";break;case e.Alert.Description.insufficient_security:G="Insufficient security.";break;case e.Alert.Description.internal_error:G="Internal error.";break;case e.Alert.Description.user_canceled:G="User canceled.";break;case e.Alert.Description.no_renegotiation:G="Renegotiation not supported.";break;default:G="Unknown error.";break}if(U.description===e.Alert.Description.close_notify)return L.close();L.error(L,{message:G,send:!1,origin:L.entity===e.ConnectionEnd.client?"server":"client",alert:U}),L.process()},e.handleHandshake=function(L,D){var B=D.fragment,U=B.getByte(),G=B.getInt24();if(G>B.length())return L.fragmented=D,D.fragment=n.util.createBuffer(),B.read-=4,L.process();L.fragmented=null,B.read-=4;var ee=B.bytes(G+4);B.read+=4,U in fe[L.entity][L.expect]?(L.entity===e.ConnectionEnd.server&&!L.open&&!L.fail&&(L.handshaking=!0,L.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),U!==e.HandshakeType.hello_request&&U!==e.HandshakeType.certificate_verify&&U!==e.HandshakeType.finished&&(L.session.md5.update(ee),L.session.sha1.update(ee)),fe[L.entity][L.expect][U](L,D,G)):e.handleUnexpected(L,D)},e.handleApplicationData=function(L,D){L.data.putBuffer(D.fragment),L.dataReady(L),L.process()},e.handleHeartbeat=function(L,D){var B=D.fragment,U=B.getByte(),G=B.getInt16(),ee=B.getBytes(G);if(U===e.HeartbeatMessageType.heartbeat_request){if(L.handshaking||G>ee.length)return L.process();e.queue(L,e.createRecord(L,{type:e.ContentType.heartbeat,data:e.createHeartbeat(e.HeartbeatMessageType.heartbeat_response,ee)})),e.flush(L)}else if(U===e.HeartbeatMessageType.heartbeat_response){if(ee!==L.expectedHeartbeatPayload)return L.process();L.heartbeatReceived&&L.heartbeatReceived(L,n.util.createBuffer(ee))}L.process()};var r=0,p=1,f=2,s=3,g=4,h=5,v=6,b=7,d=8,w=0,k=1,R=2,T=3,I=4,C=5,A=6,O=7,E=e.handleUnexpected,P=e.handleChangeCipherSpec,N=e.handleAlert,j=e.handleHandshake,M=e.handleApplicationData,z=e.handleHeartbeat,H=[];H[e.ConnectionEnd.client]=[[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[P,N,E,E,z],[E,N,j,E,z],[E,N,j,M,z],[E,N,j,E,z]],H[e.ConnectionEnd.server]=[[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[P,N,E,E,z],[E,N,j,E,z],[E,N,j,M,z],[E,N,j,E,z]];var X=e.handleHelloRequest,F=e.handleServerHello,Z=e.handleCertificate,re=e.handleServerKeyExchange,oe=e.handleCertificateRequest,he=e.handleServerHelloDone,de=e.handleFinished,fe=[];fe[e.ConnectionEnd.client]=[[E,E,F,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,Z,re,oe,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,re,oe,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,oe,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,de],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]];var ne=e.handleClientHello,te=e.handleClientKeyExchange,Y=e.handleCertificateVerify;fe[e.ConnectionEnd.server]=[[E,ne,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,Z,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,te,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,Y,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,de],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]],e.generateKeys=function(L,D){var B=t,U=D.client_random+D.server_random;L.session.resuming||(D.master_secret=B(D.pre_master_secret,"master secret",U,48).bytes(),D.pre_master_secret=null),U=D.server_random+D.client_random;var G=2*D.mac_key_length+2*D.enc_key_length,ee=L.version.major===e.Versions.TLS_1_0.major&&L.version.minor===e.Versions.TLS_1_0.minor;ee&&(G+=2*D.fixed_iv_length);var q=B(D.master_secret,"key expansion",U,G),J={client_write_MAC_key:q.getBytes(D.mac_key_length),server_write_MAC_key:q.getBytes(D.mac_key_length),client_write_key:q.getBytes(D.enc_key_length),server_write_key:q.getBytes(D.enc_key_length)};return ee&&(J.client_write_IV=q.getBytes(D.fixed_iv_length),J.server_write_IV=q.getBytes(D.fixed_iv_length)),J},e.createConnectionState=function(L){var D=L.entity===e.ConnectionEnd.client,B=function(){var ee={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(q){return!0},compressionState:null,compressFunction:function(q){return!0},updateSequenceNumber:function(){ee.sequenceNumber[1]===4294967295?(ee.sequenceNumber[1]=0,++ee.sequenceNumber[0]):++ee.sequenceNumber[1]}};return ee},U={read:B(),write:B()};if(U.read.update=function(ee,q){return U.read.cipherFunction(q,U.read)?U.read.compressFunction(ee,q,U.read)||ee.error(ee,{message:"Could not decompress record.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.decompression_failure}}):ee.error(ee,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.bad_record_mac}}),!ee.fail},U.write.update=function(ee,q){return U.write.compressFunction(ee,q,U.write)?U.write.cipherFunction(q,U.write)||ee.error(ee,{message:"Could not encrypt record.",send:!1,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}}):ee.error(ee,{message:"Could not compress record.",send:!1,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}}),!ee.fail},L.session){var G=L.session.sp;switch(L.session.cipherSuite.initSecurityParameters(G),G.keys=e.generateKeys(L,G),U.read.macKey=D?G.keys.server_write_MAC_key:G.keys.client_write_MAC_key,U.write.macKey=D?G.keys.client_write_MAC_key:G.keys.server_write_MAC_key,L.session.cipherSuite.initConnectionState(U,L,G),G.compression_algorithm){case e.CompressionMethod.none:break;case e.CompressionMethod.deflate:U.read.compressFunction=o,U.write.compressFunction=m;break;default:throw new Error("Unsupported compression algorithm.")}}return U},e.createRandom=function(){var L=new Date,D=+L+L.getTimezoneOffset()*6e4,B=n.util.createBuffer();return B.putInt32(D),B.putBytes(n.random.getBytes(28)),B},e.createRecord=function(L,D){if(!D.data)return null;var B={type:D.type,version:{major:L.version.major,minor:L.version.minor},length:D.data.length(),fragment:D.data};return B},e.createAlert=function(L,D){var B=n.util.createBuffer();return B.putByte(D.level),B.putByte(D.description),e.createRecord(L,{type:e.ContentType.alert,data:B})},e.createClientHello=function(L){L.session.clientHelloVersion={major:L.version.major,minor:L.version.minor};for(var D=n.util.createBuffer(),B=0;B<L.cipherSuites.length;++B){var U=L.cipherSuites[B];D.putByte(U.id[0]),D.putByte(U.id[1])}var G=D.length(),ee=n.util.createBuffer();ee.putByte(e.CompressionMethod.none);var q=ee.length(),J=n.util.createBuffer();if(L.virtualHost){var pe=n.util.createBuffer();pe.putByte(0),pe.putByte(0);var ue=n.util.createBuffer();ue.putByte(0),a(ue,2,n.util.createBuffer(L.virtualHost));var ae=n.util.createBuffer();a(ae,2,ue),a(pe,2,ae),J.putBuffer(pe)}var me=J.length();me>0&&(me+=2);var be=L.session.id,ye=be.length+1+2+4+28+2+G+1+q+me,_e=n.util.createBuffer();return _e.putByte(e.HandshakeType.client_hello),_e.putInt24(ye),_e.putByte(L.version.major),_e.putByte(L.version.minor),_e.putBytes(L.session.sp.client_random),a(_e,1,n.util.createBuffer(be)),a(_e,2,D),a(_e,1,ee),me>0&&a(_e,2,J),_e},e.createServerHello=function(L){var D=L.session.id,B=D.length+1+2+4+28+2+1,U=n.util.createBuffer();return U.putByte(e.HandshakeType.server_hello),U.putInt24(B),U.putByte(L.version.major),U.putByte(L.version.minor),U.putBytes(L.session.sp.server_random),a(U,1,n.util.createBuffer(D)),U.putByte(L.session.cipherSuite.id[0]),U.putByte(L.session.cipherSuite.id[1]),U.putByte(L.session.compressionMethod),U},e.createCertificate=function(L){var D=L.entity===e.ConnectionEnd.client,B=null;if(L.getCertificate){var U;D?U=L.session.certificateRequest:U=L.session.extensions.server_name.serverNameList,B=L.getCertificate(L,U)}var G=n.util.createBuffer();if(B!==null)try{n.util.isArray(B)||(B=[B]);for(var ee=null,q=0;q<B.length;++q){var J=n.pem.decode(B[q])[0];if(J.type!=="CERTIFICATE"&&J.type!=="X509 CERTIFICATE"&&J.type!=="TRUSTED CERTIFICATE"){var pe=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw pe.headerType=J.type,pe}if(J.procType&&J.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var ue=n.util.createBuffer(J.body);ee===null&&(ee=n.asn1.fromDer(ue.bytes(),!1));var ae=n.util.createBuffer();a(ae,3,ue),G.putBuffer(ae)}B=n.pki.certificateFromAsn1(ee),D?L.session.clientCertificate=B:L.session.serverCertificate=B}catch(ye){return L.error(L,{message:"Could not send certificate list.",cause:ye,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.bad_certificate}})}var me=3+G.length(),be=n.util.createBuffer();return be.putByte(e.HandshakeType.certificate),be.putInt24(me),a(be,3,G),be},e.createClientKeyExchange=function(L){var D=n.util.createBuffer();D.putByte(L.session.clientHelloVersion.major),D.putByte(L.session.clientHelloVersion.minor),D.putBytes(n.random.getBytes(46));var B=L.session.sp;B.pre_master_secret=D.getBytes();var U=L.session.serverCertificate.publicKey;D=U.encrypt(B.pre_master_secret);var G=D.length+2,ee=n.util.createBuffer();return ee.putByte(e.HandshakeType.client_key_exchange),ee.putInt24(G),ee.putInt16(D.length),ee.putBytes(D),ee},e.createServerKeyExchange=function(L){var D=0,B=n.util.createBuffer();return D>0&&(B.putByte(e.HandshakeType.server_key_exchange),B.putInt24(D)),B},e.getClientSignature=function(L,D){var B=n.util.createBuffer();B.putBuffer(L.session.md5.digest()),B.putBuffer(L.session.sha1.digest()),B=B.getBytes(),L.getSignature=L.getSignature||function(U,G,ee){var q=null;if(U.getPrivateKey)try{q=U.getPrivateKey(U,U.session.clientCertificate),q=n.pki.privateKeyFromPem(q)}catch(J){U.error(U,{message:"Could not get private key.",cause:J,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}})}q===null?U.error(U,{message:"No private key set.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}}):G=q.sign(G,null),ee(U,G)},L.getSignature(L,B,D)},e.createCertificateVerify=function(L,D){var B=D.length+2,U=n.util.createBuffer();return U.putByte(e.HandshakeType.certificate_verify),U.putInt24(B),U.putInt16(D.length),U.putBytes(D),U},e.createCertificateRequest=function(L){var D=n.util.createBuffer();D.putByte(1);var B=n.util.createBuffer();for(var U in L.caStore.certs){var G=L.caStore.certs[U],ee=n.pki.distinguishedNameToAsn1(G.subject),q=n.asn1.toDer(ee);B.putInt16(q.length()),B.putBuffer(q)}var J=1+D.length()+2+B.length(),pe=n.util.createBuffer();return pe.putByte(e.HandshakeType.certificate_request),pe.putInt24(J),a(pe,1,D),a(pe,2,B),pe},e.createServerHelloDone=function(L){var D=n.util.createBuffer();return D.putByte(e.HandshakeType.server_hello_done),D.putInt24(0),D},e.createChangeCipherSpec=function(){var L=n.util.createBuffer();return L.putByte(1),L},e.createFinished=function(L){var D=n.util.createBuffer();D.putBuffer(L.session.md5.digest()),D.putBuffer(L.session.sha1.digest());var B=L.entity===e.ConnectionEnd.client,U=L.session.sp,G=12,ee=t,q=B?"client finished":"server finished";D=ee(U.master_secret,q,D.getBytes(),G);var J=n.util.createBuffer();return J.putByte(e.HandshakeType.finished),J.putInt24(D.length()),J.putBuffer(D),J},e.createHeartbeat=function(L,D,B){typeof B>"u"&&(B=D.length);var U=n.util.createBuffer();U.putByte(L),U.putInt16(B),U.putBytes(D);var G=U.length(),ee=Math.max(16,G-B-3);return U.putBytes(n.random.getBytes(ee)),U},e.queue=function(L,D){if(D&&!(D.fragment.length()===0&&(D.type===e.ContentType.handshake||D.type===e.ContentType.alert||D.type===e.ContentType.change_cipher_spec))){if(D.type===e.ContentType.handshake){var B=D.fragment.bytes();L.session.md5.update(B),L.session.sha1.update(B),B=null}var U;if(D.fragment.length()<=e.MaxFragment)U=[D];else{U=[];for(var G=D.fragment.bytes();G.length>e.MaxFragment;)U.push(e.createRecord(L,{type:D.type,data:n.util.createBuffer(G.slice(0,e.MaxFragment))})),G=G.slice(e.MaxFragment);G.length>0&&U.push(e.createRecord(L,{type:D.type,data:n.util.createBuffer(G)}))}for(var ee=0;ee<U.length&&!L.fail;++ee){var q=U[ee],J=L.state.current.write;J.update(L,q)&&L.records.push(q)}}},e.flush=function(L){for(var D=0;D<L.records.length;++D){var B=L.records[D];L.tlsData.putByte(B.type),L.tlsData.putByte(B.version.major),L.tlsData.putByte(B.version.minor),L.tlsData.putInt16(B.fragment.length()),L.tlsData.putBuffer(L.records[D].fragment)}return L.records=[],L.tlsDataReady(L)};var W=function(L){switch(L){case!0:return!0;case n.pki.certificateError.bad_certificate:return e.Alert.Description.bad_certificate;case n.pki.certificateError.unsupported_certificate:return e.Alert.Description.unsupported_certificate;case n.pki.certificateError.certificate_revoked:return e.Alert.Description.certificate_revoked;case n.pki.certificateError.certificate_expired:return e.Alert.Description.certificate_expired;case n.pki.certificateError.certificate_unknown:return e.Alert.Description.certificate_unknown;case n.pki.certificateError.unknown_ca:return e.Alert.Description.unknown_ca;default:return e.Alert.Description.bad_certificate}},ie=function(L){switch(L){case!0:return!0;case e.Alert.Description.bad_certificate:return n.pki.certificateError.bad_certificate;case e.Alert.Description.unsupported_certificate:return n.pki.certificateError.unsupported_certificate;case e.Alert.Description.certificate_revoked:return n.pki.certificateError.certificate_revoked;case e.Alert.Description.certificate_expired:return n.pki.certificateError.certificate_expired;case e.Alert.Description.certificate_unknown:return n.pki.certificateError.certificate_unknown;case e.Alert.Description.unknown_ca:return n.pki.certificateError.unknown_ca;default:return n.pki.certificateError.bad_certificate}};e.verifyCertificateChain=function(L,D){try{var B={};for(var U in L.verifyOptions)B[U]=L.verifyOptions[U];B.verify=function(ee,q,J){var pe=W(ee),ue=L.verify(L,ee,q,J);if(ue!==!0){if(typeof ue=="object"&&!n.util.isArray(ue)){var ae=new Error("The application rejected the certificate.");throw ae.send=!0,ae.alert={level:e.Alert.Level.fatal,description:e.Alert.Description.bad_certificate},ue.message&&(ae.message=ue.message),ue.alert&&(ae.alert.description=ue.alert),ae}ue!==ee&&(ue=ie(ue))}return ue},n.pki.verifyCertificateChain(L.caStore,D,B)}catch(ee){var G=ee;(typeof G!="object"||n.util.isArray(G))&&(G={send:!0,alert:{level:e.Alert.Level.fatal,description:W(ee)}}),"send"in G||(G.send=!0),"alert"in G||(G.alert={level:e.Alert.Level.fatal,description:W(G.error)}),L.error(L,G)}return!L.fail},e.createSessionCache=function(L,D){var B=null;if(L&&L.getSession&&L.setSession&&L.order)B=L;else{B={},B.cache=L||{},B.capacity=Math.max(D||100,1),B.order=[];for(var U in L)B.order.length<=D?B.order.push(U):delete L[U];B.getSession=function(G){var ee=null,q=null;if(G?q=n.util.bytesToHex(G):B.order.length>0&&(q=B.order[0]),q!==null&&q in B.cache){ee=B.cache[q],delete B.cache[q];for(var J in B.order)if(B.order[J]===q){B.order.splice(J,1);break}}return ee},B.setSession=function(G,ee){if(B.order.length===B.capacity){var q=B.order.shift();delete B.cache[q]}var q=n.util.bytesToHex(G);B.order.push(q),B.cache[q]=ee}}return B},e.createConnection=function(L){var D=null;L.caStore?n.util.isArray(L.caStore)?D=n.pki.createCaStore(L.caStore):D=L.caStore:D=n.pki.createCaStore();var B=L.cipherSuites||null;if(B===null){B=[];for(var U in e.CipherSuites)B.push(e.CipherSuites[U])}var G=L.server?e.ConnectionEnd.server:e.ConnectionEnd.client,ee=L.sessionCache?e.createSessionCache(L.sessionCache):null,q={version:{major:e.Version.major,minor:e.Version.minor},entity:G,sessionId:L.sessionId,caStore:D,sessionCache:ee,cipherSuites:B,connected:L.connected,virtualHost:L.virtualHost||null,verifyClient:L.verifyClient||!1,verify:L.verify||function(ae,me,be,ye){return me},verifyOptions:L.verifyOptions||{},getCertificate:L.getCertificate||null,getPrivateKey:L.getPrivateKey||null,getSignature:L.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:L.tlsDataReady,dataReady:L.dataReady,heartbeatReceived:L.heartbeatReceived,closed:L.closed,error:function(ae,me){me.origin=me.origin||(ae.entity===e.ConnectionEnd.client?"client":"server"),me.send&&(e.queue(ae,e.createAlert(ae,me.alert)),e.flush(ae));var be=me.fatal!==!1;be&&(ae.fail=!0),L.error(ae,me),be&&ae.close(!1)},deflate:L.deflate||null,inflate:L.inflate||null};q.reset=function(ae){q.version={major:e.Version.major,minor:e.Version.minor},q.record=null,q.session=null,q.peerCertificate=null,q.state={pending:null,current:null},q.expect=q.entity===e.ConnectionEnd.client?r:w,q.fragmented=null,q.records=[],q.open=!1,q.handshakes=0,q.handshaking=!1,q.isConnected=!1,q.fail=!(ae||typeof ae>"u"),q.input.clear(),q.tlsData.clear(),q.data.clear(),q.state.current=e.createConnectionState(q)},q.reset();var J=function(ae,me){var be=me.type-e.ContentType.change_cipher_spec,ye=H[ae.entity][ae.expect];be in ye?ye[be](ae,me):e.handleUnexpected(ae,me)},pe=function(ae){var me=0,be=ae.input,ye=be.length();if(ye<5)me=5-ye;else{ae.record={type:be.getByte(),version:{major:be.getByte(),minor:be.getByte()},length:be.getInt16(),fragment:n.util.createBuffer(),ready:!1};var _e=ae.record.version.major===ae.version.major;_e&&ae.session&&ae.session.version&&(_e=ae.record.version.minor===ae.version.minor),_e||ae.error(ae,{message:"Incompatible TLS version.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.protocol_version}})}return me},ue=function(ae){var me=0,be=ae.input,ye=be.length();if(ye<ae.record.length)me=ae.record.length-ye;else{ae.record.fragment.putBytes(be.getBytes(ae.record.length)),be.compact();var _e=ae.state.current.read;_e.update(ae,ae.record)&&(ae.fragmented!==null&&(ae.fragmented.type===ae.record.type?(ae.fragmented.fragment.putBuffer(ae.record.fragment),ae.record=ae.fragmented):ae.error(ae,{message:"Invalid fragmented record.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unexpected_message}})),ae.record.ready=!0)}return me};return q.handshake=function(ae){if(q.entity!==e.ConnectionEnd.client)q.error(q,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(q.handshaking)q.error(q,{message:"Handshake already in progress.",fatal:!1});else{q.fail&&!q.open&&q.handshakes===0&&(q.fail=!1),q.handshaking=!0,ae=ae||"";var me=null;ae.length>0&&(q.sessionCache&&(me=q.sessionCache.getSession(ae)),me===null&&(ae="")),ae.length===0&&q.sessionCache&&(me=q.sessionCache.getSession(),me!==null&&(ae=me.id)),q.session={id:ae,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},me&&(q.version=me.version,q.session.sp=me.sp),q.session.sp.client_random=e.createRandom().getBytes(),q.open=!0,e.queue(q,e.createRecord(q,{type:e.ContentType.handshake,data:e.createClientHello(q)})),e.flush(q)}},q.process=function(ae){var me=0;return ae&&q.input.putBytes(ae),q.fail||(q.record!==null&&q.record.ready&&q.record.fragment.isEmpty()&&(q.record=null),q.record===null&&(me=pe(q)),!q.fail&&q.record!==null&&!q.record.ready&&(me=ue(q)),!q.fail&&q.record!==null&&q.record.ready&&J(q,q.record)),me},q.prepare=function(ae){return e.queue(q,e.createRecord(q,{type:e.ContentType.application_data,data:n.util.createBuffer(ae)})),e.flush(q)},q.prepareHeartbeatRequest=function(ae,me){return ae instanceof n.util.ByteBuffer&&(ae=ae.bytes()),typeof me>"u"&&(me=ae.length),q.expectedHeartbeatPayload=ae,e.queue(q,e.createRecord(q,{type:e.ContentType.heartbeat,data:e.createHeartbeat(e.HeartbeatMessageType.heartbeat_request,ae,me)})),e.flush(q)},q.close=function(ae){if(!q.fail&&q.sessionCache&&q.session){var me={id:q.session.id,version:q.session.version,sp:q.session.sp};me.sp.keys=null,q.sessionCache.setSession(me.id,me)}q.open&&(q.open=!1,q.input.clear(),(q.isConnected||q.handshaking)&&(q.isConnected=q.handshaking=!1,e.queue(q,e.createAlert(q,{level:e.Alert.Level.warning,description:e.Alert.Description.close_notify})),e.flush(q)),q.closed(q)),q.reset(ae)},q},S.exports=n.tls=n.tls||{};for(var $ in e)typeof e[$]!="function"&&(n.tls[$]=e[$]);n.tls.prf_tls1=t,n.tls.hmac_sha1=l,n.tls.createSessionCache=e.createSessionCache,n.tls.createConnection=e.createConnection},7456:(S,_,u)=>{var n=u(8561),t=u(763),c=S.exports=n.util=n.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){c.nextTick=process.nextTick,typeof setImmediate=="function"?c.setImmediate=setImmediate:c.setImmediate=c.nextTick;return}if(typeof setImmediate=="function"){c.setImmediate=function(){return setImmediate.apply(void 0,arguments)},c.nextTick=function(C){return setImmediate(C)};return}if(c.setImmediate=function(C){setTimeout(C,0)},typeof window<"u"&&typeof window.postMessage=="function"){let C=function(A){if(A.source===window&&A.data===d){A.stopPropagation();var O=w.slice();w.length=0,O.forEach((function(E){E()}))}};var d="forge.setImmediate",w=[];c.setImmediate=function(A){w.push(A),w.length===1&&window.postMessage(d,"*")},window.addEventListener("message",C,!0)}if(typeof MutationObserver<"u"){var k=Date.now(),R=!0,T=document.createElement("div"),w=[];new MutationObserver((function(){var A=w.slice();w.length=0,A.forEach((function(O){O()}))})).observe(T,{attributes:!0});var I=c.setImmediate;c.setImmediate=function(A){Date.now()-k>15?(k=Date.now(),I(A)):(w.push(A),w.length===1&&T.setAttribute("a",R=!R))}}c.nextTick=c.setImmediate})(),c.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,c.globalScope=(function(){return c.isNodejs?global:typeof self>"u"?window:self})(),c.isArray=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"},c.isArrayBuffer=function(d){return typeof ArrayBuffer<"u"&&d instanceof ArrayBuffer},c.isArrayBufferView=function(d){return d&&c.isArrayBuffer(d.buffer)&&d.byteLength!==void 0};function l(d){if(!(d===8||d===16||d===24||d===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+d)}c.ByteBuffer=m;function m(d){if(this.data="",this.read=0,typeof d=="string")this.data=d;else if(c.isArrayBuffer(d)||c.isArrayBufferView(d))if(typeof Buffer<"u"&&d instanceof Buffer)this.data=d.toString("binary");else{var w=new Uint8Array(d);try{this.data=String.fromCharCode.apply(null,w)}catch{for(var k=0;k<w.length;++k)this.putByte(w[k])}}else(d instanceof m||typeof d=="object"&&typeof d.data=="string"&&typeof d.read=="number")&&(this.data=d.data,this.read=d.read);this._constructedStringLength=0}c.ByteStringBuffer=m;var o=4096;c.ByteStringBuffer.prototype._optimizeConstructedString=function(d){this._constructedStringLength+=d,this._constructedStringLength>o&&(this.data.substr(0,1),this._constructedStringLength=0)},c.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},c.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},c.ByteStringBuffer.prototype.putByte=function(d){return this.putBytes(String.fromCharCode(d))},c.ByteStringBuffer.prototype.fillWithByte=function(d,w){d=String.fromCharCode(d);for(var k=this.data;w>0;)w&1&&(k+=d),w>>>=1,w>0&&(d+=d);return this.data=k,this._optimizeConstructedString(w),this},c.ByteStringBuffer.prototype.putBytes=function(d){return this.data+=d,this._optimizeConstructedString(d.length),this},c.ByteStringBuffer.prototype.putString=function(d){return this.putBytes(c.encodeUtf8(d))},c.ByteStringBuffer.prototype.putInt16=function(d){return this.putBytes(String.fromCharCode(d>>8&255)+String.fromCharCode(d&255))},c.ByteStringBuffer.prototype.putInt24=function(d){return this.putBytes(String.fromCharCode(d>>16&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d&255))},c.ByteStringBuffer.prototype.putInt32=function(d){return this.putBytes(String.fromCharCode(d>>24&255)+String.fromCharCode(d>>16&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d&255))},c.ByteStringBuffer.prototype.putInt16Le=function(d){return this.putBytes(String.fromCharCode(d&255)+String.fromCharCode(d>>8&255))},c.ByteStringBuffer.prototype.putInt24Le=function(d){return this.putBytes(String.fromCharCode(d&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d>>16&255))},c.ByteStringBuffer.prototype.putInt32Le=function(d){return this.putBytes(String.fromCharCode(d&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d>>16&255)+String.fromCharCode(d>>24&255))},c.ByteStringBuffer.prototype.putInt=function(d,w){l(w);var k="";do w-=8,k+=String.fromCharCode(d>>w&255);while(w>0);return this.putBytes(k)},c.ByteStringBuffer.prototype.putSignedInt=function(d,w){return d<0&&(d+=2<<w-1),this.putInt(d,w)},c.ByteStringBuffer.prototype.putBuffer=function(d){return this.putBytes(d.getBytes())},c.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},c.ByteStringBuffer.prototype.getInt16=function(){var d=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,d},c.ByteStringBuffer.prototype.getInt24=function(){var d=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,d},c.ByteStringBuffer.prototype.getInt32=function(){var d=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,d},c.ByteStringBuffer.prototype.getInt16Le=function(){var d=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,d},c.ByteStringBuffer.prototype.getInt24Le=function(){var d=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,d},c.ByteStringBuffer.prototype.getInt32Le=function(){var d=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,d},c.ByteStringBuffer.prototype.getInt=function(d){l(d);var w=0;do w=(w<<8)+this.data.charCodeAt(this.read++),d-=8;while(d>0);return w},c.ByteStringBuffer.prototype.getSignedInt=function(d){var w=this.getInt(d),k=2<<d-2;return w>=k&&(w-=k<<1),w},c.ByteStringBuffer.prototype.getBytes=function(d){var w;return d?(d=Math.min(this.length(),d),w=this.data.slice(this.read,this.read+d),this.read+=d):d===0?w="":(w=this.read===0?this.data:this.data.slice(this.read),this.clear()),w},c.ByteStringBuffer.prototype.bytes=function(d){return typeof d>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+d)},c.ByteStringBuffer.prototype.at=function(d){return this.data.charCodeAt(this.read+d)},c.ByteStringBuffer.prototype.setAt=function(d,w){return this.data=this.data.substr(0,this.read+d)+String.fromCharCode(w)+this.data.substr(this.read+d+1),this},c.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},c.ByteStringBuffer.prototype.copy=function(){var d=c.createBuffer(this.data);return d.read=this.read,d},c.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},c.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},c.ByteStringBuffer.prototype.truncate=function(d){var w=Math.max(0,this.length()-d);return this.data=this.data.substr(this.read,w),this.read=0,this},c.ByteStringBuffer.prototype.toHex=function(){for(var d="",w=this.read;w<this.data.length;++w){var k=this.data.charCodeAt(w);k<16&&(d+="0"),d+=k.toString(16)}return d},c.ByteStringBuffer.prototype.toString=function(){return c.decodeUtf8(this.bytes())};function i(d,w){w=w||{},this.read=w.readOffset||0,this.growSize=w.growSize||1024;var k=c.isArrayBuffer(d),R=c.isArrayBufferView(d);if(k||R){k?this.data=new DataView(d):this.data=new DataView(d.buffer,d.byteOffset,d.byteLength),this.write="writeOffset"in w?w.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,d!=null&&this.putBytes(d),"writeOffset"in w&&(this.write=w.writeOffset)}c.DataBuffer=i,c.DataBuffer.prototype.length=function(){return this.write-this.read},c.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},c.DataBuffer.prototype.accommodate=function(d,w){if(this.length()>=d)return this;w=Math.max(w||this.growSize,d);var k=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),R=new Uint8Array(this.length()+w);return R.set(k),this.data=new DataView(R.buffer),this},c.DataBuffer.prototype.putByte=function(d){return this.accommodate(1),this.data.setUint8(this.write++,d),this},c.DataBuffer.prototype.fillWithByte=function(d,w){this.accommodate(w);for(var k=0;k<w;++k)this.data.setUint8(d);return this},c.DataBuffer.prototype.putBytes=function(d,w){if(c.isArrayBufferView(d)){var k=new Uint8Array(d.buffer,d.byteOffset,d.byteLength),R=k.byteLength-k.byteOffset;this.accommodate(R);var T=new Uint8Array(this.data.buffer,this.write);return T.set(k),this.write+=R,this}if(c.isArrayBuffer(d)){var k=new Uint8Array(d);this.accommodate(k.byteLength);var T=new Uint8Array(this.data.buffer);return T.set(k,this.write),this.write+=k.byteLength,this}if(d instanceof c.DataBuffer||typeof d=="object"&&typeof d.read=="number"&&typeof d.write=="number"&&c.isArrayBufferView(d.data)){var k=new Uint8Array(d.data.byteLength,d.read,d.length());this.accommodate(k.byteLength);var T=new Uint8Array(d.data.byteLength,this.write);return T.set(k),this.write+=k.byteLength,this}if(d instanceof c.ByteStringBuffer&&(d=d.data,w="binary"),w=w||"binary",typeof d=="string"){var I;if(w==="hex")return this.accommodate(Math.ceil(d.length/2)),I=new Uint8Array(this.data.buffer,this.write),this.write+=c.binary.hex.decode(d,I,this.write),this;if(w==="base64")return this.accommodate(Math.ceil(d.length/4)*3),I=new Uint8Array(this.data.buffer,this.write),this.write+=c.binary.base64.decode(d,I,this.write),this;if(w==="utf8"&&(d=c.encodeUtf8(d),w="binary"),w==="binary"||w==="raw")return this.accommodate(d.length),I=new Uint8Array(this.data.buffer,this.write),this.write+=c.binary.raw.decode(I),this;if(w==="utf16")return this.accommodate(d.length*2),I=new Uint16Array(this.data.buffer,this.write),this.write+=c.text.utf16.encode(I),this;throw new Error("Invalid encoding: "+w)}throw Error("Invalid parameter: "+d)},c.DataBuffer.prototype.putBuffer=function(d){return this.putBytes(d),d.clear(),this},c.DataBuffer.prototype.putString=function(d){return this.putBytes(d,"utf16")},c.DataBuffer.prototype.putInt16=function(d){return this.accommodate(2),this.data.setInt16(this.write,d),this.write+=2,this},c.DataBuffer.prototype.putInt24=function(d){return this.accommodate(3),this.data.setInt16(this.write,d>>8&65535),this.data.setInt8(this.write,d>>16&255),this.write+=3,this},c.DataBuffer.prototype.putInt32=function(d){return this.accommodate(4),this.data.setInt32(this.write,d),this.write+=4,this},c.DataBuffer.prototype.putInt16Le=function(d){return this.accommodate(2),this.data.setInt16(this.write,d,!0),this.write+=2,this},c.DataBuffer.prototype.putInt24Le=function(d){return this.accommodate(3),this.data.setInt8(this.write,d>>16&255),this.data.setInt16(this.write,d>>8&65535,!0),this.write+=3,this},c.DataBuffer.prototype.putInt32Le=function(d){return this.accommodate(4),this.data.setInt32(this.write,d,!0),this.write+=4,this},c.DataBuffer.prototype.putInt=function(d,w){l(w),this.accommodate(w/8);do w-=8,this.data.setInt8(this.write++,d>>w&255);while(w>0);return this},c.DataBuffer.prototype.putSignedInt=function(d,w){return l(w),this.accommodate(w/8),d<0&&(d+=2<<w-1),this.putInt(d,w)},c.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},c.DataBuffer.prototype.getInt16=function(){var d=this.data.getInt16(this.read);return this.read+=2,d},c.DataBuffer.prototype.getInt24=function(){var d=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,d},c.DataBuffer.prototype.getInt32=function(){var d=this.data.getInt32(this.read);return this.read+=4,d},c.DataBuffer.prototype.getInt16Le=function(){var d=this.data.getInt16(this.read,!0);return this.read+=2,d},c.DataBuffer.prototype.getInt24Le=function(){var d=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,d},c.DataBuffer.prototype.getInt32Le=function(){var d=this.data.getInt32(this.read,!0);return this.read+=4,d},c.DataBuffer.prototype.getInt=function(d){l(d);var w=0;do w=(w<<8)+this.data.getInt8(this.read++),d-=8;while(d>0);return w},c.DataBuffer.prototype.getSignedInt=function(d){var w=this.getInt(d),k=2<<d-2;return w>=k&&(w-=k<<1),w},c.DataBuffer.prototype.getBytes=function(d){var w;return d?(d=Math.min(this.length(),d),w=this.data.slice(this.read,this.read+d),this.read+=d):d===0?w="":(w=this.read===0?this.data:this.data.slice(this.read),this.clear()),w},c.DataBuffer.prototype.bytes=function(d){return typeof d>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+d)},c.DataBuffer.prototype.at=function(d){return this.data.getUint8(this.read+d)},c.DataBuffer.prototype.setAt=function(d,w){return this.data.setUint8(d,w),this},c.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},c.DataBuffer.prototype.copy=function(){return new c.DataBuffer(this)},c.DataBuffer.prototype.compact=function(){if(this.read>0){var d=new Uint8Array(this.data.buffer,this.read),w=new Uint8Array(d.byteLength);w.set(d),this.data=new DataView(w),this.write-=this.read,this.read=0}return this},c.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},c.DataBuffer.prototype.truncate=function(d){return this.write=Math.max(0,this.length()-d),this.read=Math.min(this.read,this.write),this},c.DataBuffer.prototype.toHex=function(){for(var d="",w=this.read;w<this.data.byteLength;++w){var k=this.data.getUint8(w);k<16&&(d+="0"),d+=k.toString(16)}return d},c.DataBuffer.prototype.toString=function(d){var w=new Uint8Array(this.data,this.read,this.length());if(d=d||"utf8",d==="binary"||d==="raw")return c.binary.raw.encode(w);if(d==="hex")return c.binary.hex.encode(w);if(d==="base64")return c.binary.base64.encode(w);if(d==="utf8")return c.text.utf8.decode(w);if(d==="utf16")return c.text.utf16.decode(w);throw new Error("Invalid encoding: "+d)},c.createBuffer=function(d,w){return w=w||"raw",d!==void 0&&w==="utf8"&&(d=c.encodeUtf8(d)),new c.ByteBuffer(d)},c.fillString=function(d,w){for(var k="";w>0;)w&1&&(k+=d),w>>>=1,w>0&&(d+=d);return k},c.xorBytes=function(d,w,k){for(var R="",T="",I="",C=0,A=0;k>0;--k,++C)T=d.charCodeAt(C)^w.charCodeAt(C),A>=10&&(R+=I,I="",A=0),I+=String.fromCharCode(T),++A;return R+=I,R},c.hexToBytes=function(d){var w="",k=0;for(d.length&!0&&(k=1,w+=String.fromCharCode(parseInt(d[0],16)));k<d.length;k+=2)w+=String.fromCharCode(parseInt(d.substr(k,2),16));return w},c.bytesToHex=function(d){return c.createBuffer(d).toHex()},c.int32ToBytes=function(d){return String.fromCharCode(d>>24&255)+String.fromCharCode(d>>16&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d&255)};var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],r="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";c.encode64=function(d,w){for(var k="",R="",T,I,C,A=0;A<d.length;)T=d.charCodeAt(A++),I=d.charCodeAt(A++),C=d.charCodeAt(A++),k+=a.charAt(T>>2),k+=a.charAt((T&3)<<4|I>>4),isNaN(I)?k+="==":(k+=a.charAt((I&15)<<2|C>>6),k+=isNaN(C)?"=":a.charAt(C&63)),w&&k.length>w&&(R+=k.substr(0,w)+`\r
|
|
249
|
+
`,p},t.publicKeyToOpenSSH=function(o,i){var a="ssh-rsa";i=i||"";var e=n.util.createBuffer();return l(e,a),c(e,o.e),c(e,o.n),a+" "+n.util.encode64(e.bytes())+" "+i},t.privateKeyToOpenSSH=function(o,i){return i?n.pki.encryptRsaPrivateKey(o,i,{legacy:!0,algorithm:"aes128"}):n.pki.privateKeyToPem(o)},t.getPublicKeyFingerprint=function(o,i){i=i||{};var a=i.md||n.md.md5.create(),e="ssh-rsa",r=n.util.createBuffer();l(r,e),c(r,o.e),c(r,o.n),a.start(),a.update(r.getBytes());var p=a.digest();if(i.encoding==="hex"){var f=p.toHex();return i.delimiter?f.match(/.{2}/g).join(i.delimiter):f}else{if(i.encoding==="binary")return p.getBytes();if(i.encoding)throw new Error('Unknown encoding "'+i.encoding+'".')}return p};function c(o,i){var a=i.toString(16);a[0]>="8"&&(a="00"+a);var e=n.util.hexToBytes(a);o.putInt32(e.length),o.putBytes(e)}function l(o,i){o.putInt32(i.length),o.putString(i)}function m(){for(var o=n.md.sha1.create(),i=arguments.length,a=0;a<i;++a)o.update(arguments[a]);return o.digest()}},4275:(S,_,u)=>{var n=u(8561);u(7357),u(2007),u(6138),u(492),u(2493),u(2055),u(6485),u(7456);var t=function(L,D,B,U){var G=n.util.createBuffer(),ee=L.length>>1,q=ee+(L.length&1),J=L.substr(0,q),pe=L.substr(ee,q),ue=n.util.createBuffer(),ae=n.hmac.create();B=D+B;var me=Math.ceil(U/16),be=Math.ceil(U/20);ae.start("MD5",J);var ye=n.util.createBuffer();ue.putBytes(B);for(var xe=0;xe<me;++xe)ae.start(null,null),ae.update(ue.getBytes()),ue.putBuffer(ae.digest()),ae.start(null,null),ae.update(ue.bytes()+B),ye.putBuffer(ae.digest());ae.start("SHA1",pe);var Oe=n.util.createBuffer();ue.clear(),ue.putBytes(B);for(var xe=0;xe<be;++xe)ae.start(null,null),ae.update(ue.getBytes()),ue.putBuffer(ae.digest()),ae.start(null,null),ae.update(ue.bytes()+B),Oe.putBuffer(ae.digest());return G.putBytes(n.util.xorBytes(ye.getBytes(),Oe.getBytes(),U)),G},c=function(L,D,B,U){},l=function(L,D,B){var U=n.hmac.create();U.start("SHA1",L);var G=n.util.createBuffer();return G.putInt32(D[0]),G.putInt32(D[1]),G.putByte(B.type),G.putByte(B.version.major),G.putByte(B.version.minor),G.putInt16(B.length),G.putBytes(B.fragment.bytes()),U.update(G.getBytes()),U.digest().getBytes()},m=function(L,D,B){var U=!1;try{var G=L.deflate(D.fragment.getBytes());D.fragment=n.util.createBuffer(G),D.length=G.length,U=!0}catch{}return U},o=function(L,D,B){var U=!1;try{var G=L.inflate(D.fragment.getBytes());D.fragment=n.util.createBuffer(G),D.length=G.length,U=!0}catch{}return U},i=function(L,D){var B=0;switch(D){case 1:B=L.getByte();break;case 2:B=L.getInt16();break;case 3:B=L.getInt24();break;case 4:B=L.getInt32();break}return n.util.createBuffer(L.getBytes(B))},a=function(L,D,B){L.putInt(B.length(),D<<3),L.putBuffer(B)},e={};e.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},e.SupportedVersions=[e.Versions.TLS_1_1,e.Versions.TLS_1_0],e.Version=e.SupportedVersions[0],e.MaxFragment=15360,e.ConnectionEnd={server:0,client:1},e.PRFAlgorithm={tls_prf_sha256:0},e.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},e.CipherType={stream:0,block:1,aead:2},e.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},e.CompressionMethod={none:0,deflate:1},e.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},e.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},e.Alert={},e.Alert.Level={warning:1,fatal:2},e.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},e.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},e.CipherSuites={},e.getCipherSuite=function(L){var D=null;for(var B in e.CipherSuites){var U=e.CipherSuites[B];if(U.id[0]===L.charCodeAt(0)&&U.id[1]===L.charCodeAt(1)){D=U;break}}return D},e.handleUnexpected=function(L,D){var B=!L.open&&L.entity===e.ConnectionEnd.client;B||L.error(L,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unexpected_message}})},e.handleHelloRequest=function(L,D,B){!L.handshaking&&L.handshakes>0&&(e.queue(L,e.createAlert(L,{level:e.Alert.Level.warning,description:e.Alert.Description.no_renegotiation})),e.flush(L)),L.process()},e.parseHelloMessage=function(L,D,B){var U=null,G=L.entity===e.ConnectionEnd.client;if(B<38)L.error(L,{message:G?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});else{var ee=D.fragment,q=ee.length();if(U={version:{major:ee.getByte(),minor:ee.getByte()},random:n.util.createBuffer(ee.getBytes(32)),session_id:i(ee,1),extensions:[]},G?(U.cipher_suite=ee.getBytes(2),U.compression_method=ee.getByte()):(U.cipher_suites=i(ee,2),U.compression_methods=i(ee,1)),q=B-(q-ee.length()),q>0){for(var J=i(ee,2);J.length()>0;)U.extensions.push({type:[J.getByte(),J.getByte()],data:i(J,2)});if(!G)for(var pe=0;pe<U.extensions.length;++pe){var ue=U.extensions[pe];if(ue.type[0]===0&&ue.type[1]===0)for(var ae=i(ue.data,2);ae.length()>0;){var me=ae.getByte();if(me!==0)break;L.session.extensions.server_name.serverNameList.push(i(ae,2).getBytes())}}}if(L.session.version&&(U.version.major!==L.session.version.major||U.version.minor!==L.session.version.minor))return L.error(L,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.protocol_version}});if(G)L.session.cipherSuite=e.getCipherSuite(U.cipher_suite);else for(var be=n.util.createBuffer(U.cipher_suites.bytes());be.length()>0&&(L.session.cipherSuite=e.getCipherSuite(be.getBytes(2)),L.session.cipherSuite===null););if(L.session.cipherSuite===null)return L.error(L,{message:"No cipher suites in common.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(U.cipher_suite)});G?L.session.compressionMethod=U.compression_method:L.session.compressionMethod=e.CompressionMethod.none}return U},e.createSecurityParameters=function(L,D){var B=L.entity===e.ConnectionEnd.client,U=D.random.bytes(),G=B?L.session.sp.client_random:U,ee=B?U:e.createRandom().getBytes();L.session.sp={entity:L.entity,prf_algorithm:e.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:L.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:G,server_random:ee}},e.handleServerHello=function(L,D,B){var U=e.parseHelloMessage(L,D,B);if(!L.fail){if(U.version.minor<=L.version.minor)L.version.minor=U.version.minor;else return L.error(L,{message:"Incompatible TLS version.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.protocol_version}});L.session.version=L.version;var G=U.session_id.bytes();G.length>0&&G===L.session.id?(L.expect=h,L.session.resuming=!0,L.session.sp.server_random=U.random.bytes()):(L.expect=p,L.session.resuming=!1,e.createSecurityParameters(L,U)),L.session.id=G,L.process()}},e.handleClientHello=function(L,D,B){var U=e.parseHelloMessage(L,D,B);if(!L.fail){var G=U.session_id.bytes(),ee=null;if(L.sessionCache&&(ee=L.sessionCache.getSession(G),ee===null?G="":(ee.version.major!==U.version.major||ee.version.minor>U.version.minor)&&(ee=null,G="")),G.length===0&&(G=n.random.getBytes(32)),L.session.id=G,L.session.clientHelloVersion=U.version,L.session.sp={},ee)L.version=L.session.version=ee.version,L.session.sp=ee.sp;else{for(var q,J=1;J<e.SupportedVersions.length&&(q=e.SupportedVersions[J],!(q.minor<=U.version.minor));++J);L.version={major:q.major,minor:q.minor},L.session.version=L.version}ee!==null?(L.expect=I,L.session.resuming=!0,L.session.sp.client_random=U.random.bytes()):(L.expect=L.verifyClient!==!1?k:R,L.session.resuming=!1,e.createSecurityParameters(L,U)),L.open=!0,e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createServerHello(L)})),L.session.resuming?(e.queue(L,e.createRecord(L,{type:e.ContentType.change_cipher_spec,data:e.createChangeCipherSpec()})),L.state.pending=e.createConnectionState(L),L.state.current.write=L.state.pending.write,e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createFinished(L)}))):(e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createCertificate(L)})),L.fail||(e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createServerKeyExchange(L)})),L.verifyClient!==!1&&e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createCertificateRequest(L)})),e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createServerHelloDone(L)})))),e.flush(L),L.process()}},e.handleCertificate=function(L,D,B){if(B<3)return L.error(L,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var U=D.fragment,G={certificate_list:i(U,3)},ee,q,J=[];try{for(;G.certificate_list.length()>0;)ee=i(G.certificate_list,3),q=n.asn1.fromDer(ee),ee=n.pki.certificateFromAsn1(q,!0),J.push(ee)}catch(ue){return L.error(L,{message:"Could not parse certificate list.",cause:ue,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.bad_certificate}})}var pe=L.entity===e.ConnectionEnd.client;(pe||L.verifyClient===!0)&&J.length===0?L.error(L,{message:pe?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}}):J.length===0?L.expect=pe?f:R:(pe?L.session.serverCertificate=J[0]:L.session.clientCertificate=J[0],e.verifyCertificateChain(L,J)&&(L.expect=pe?f:R)),L.process()},e.handleServerKeyExchange=function(L,D,B){if(B>0)return L.error(L,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unsupported_certificate}});L.expect=s,L.process()},e.handleClientKeyExchange=function(L,D,B){if(B<48)return L.error(L,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unsupported_certificate}});var U=D.fragment,G={enc_pre_master_secret:i(U,2).getBytes()},ee=null;if(L.getPrivateKey)try{ee=L.getPrivateKey(L,L.session.serverCertificate),ee=n.pki.privateKeyFromPem(ee)}catch(pe){L.error(L,{message:"Could not get private key.",cause:pe,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}})}if(ee===null)return L.error(L,{message:"No private key set.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}});try{var q=L.session.sp;q.pre_master_secret=ee.decrypt(G.enc_pre_master_secret);var J=L.session.clientHelloVersion;if(J.major!==q.pre_master_secret.charCodeAt(0)||J.minor!==q.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{q.pre_master_secret=n.random.getBytes(48)}L.expect=I,L.session.clientCertificate!==null&&(L.expect=T),L.process()},e.handleCertificateRequest=function(L,D,B){if(B<3)return L.error(L,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var U=D.fragment,G={certificate_types:i(U,1),certificate_authorities:i(U,2)};L.session.certificateRequest=G,L.expect=g,L.process()},e.handleCertificateVerify=function(L,D,B){if(B<2)return L.error(L,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var U=D.fragment;U.read-=4;var G=U.bytes();U.read+=4;var ee={signature:i(U,2).getBytes()},q=n.util.createBuffer();q.putBuffer(L.session.md5.digest()),q.putBuffer(L.session.sha1.digest()),q=q.getBytes();try{var J=L.session.clientCertificate;if(!J.publicKey.verify(q,ee.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");L.session.md5.update(G),L.session.sha1.update(G)}catch{return L.error(L,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.handshake_failure}})}L.expect=I,L.process()},e.handleServerHelloDone=function(L,D,B){if(B>0)return L.error(L,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.record_overflow}});if(L.serverCertificate===null){var U={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.insufficient_security}},G=0,ee=L.verify(L,U.alert.description,G,[]);if(ee!==!0)return(ee||ee===0)&&(typeof ee=="object"&&!n.util.isArray(ee)?(ee.message&&(U.message=ee.message),ee.alert&&(U.alert.description=ee.alert)):typeof ee=="number"&&(U.alert.description=ee)),L.error(L,U)}L.session.certificateRequest!==null&&(D=e.createRecord(L,{type:e.ContentType.handshake,data:e.createCertificate(L)}),e.queue(L,D)),D=e.createRecord(L,{type:e.ContentType.handshake,data:e.createClientKeyExchange(L)}),e.queue(L,D),L.expect=d;var q=function(J,pe){J.session.certificateRequest!==null&&J.session.clientCertificate!==null&&e.queue(J,e.createRecord(J,{type:e.ContentType.handshake,data:e.createCertificateVerify(J,pe)})),e.queue(J,e.createRecord(J,{type:e.ContentType.change_cipher_spec,data:e.createChangeCipherSpec()})),J.state.pending=e.createConnectionState(J),J.state.current.write=J.state.pending.write,e.queue(J,e.createRecord(J,{type:e.ContentType.handshake,data:e.createFinished(J)})),J.expect=h,e.flush(J),J.process()};if(L.session.certificateRequest===null||L.session.clientCertificate===null)return q(L,null);e.getClientSignature(L,q)},e.handleChangeCipherSpec=function(L,D){if(D.fragment.getByte()!==1)return L.error(L,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.illegal_parameter}});var B=L.entity===e.ConnectionEnd.client;(L.session.resuming&&B||!L.session.resuming&&!B)&&(L.state.pending=e.createConnectionState(L)),L.state.current.read=L.state.pending.read,(!L.session.resuming&&B||L.session.resuming&&!B)&&(L.state.pending=null),L.expect=B?v:C,L.process()},e.handleFinished=function(L,D,B){var U=D.fragment;U.read-=4;var G=U.bytes();U.read+=4;var ee=D.fragment.getBytes();U=n.util.createBuffer(),U.putBuffer(L.session.md5.digest()),U.putBuffer(L.session.sha1.digest());var q=L.entity===e.ConnectionEnd.client,J=q?"server finished":"client finished",pe=L.session.sp,ue=12,ae=t;if(U=ae(pe.master_secret,J,U.getBytes(),ue),U.getBytes()!==ee)return L.error(L,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.decrypt_error}});L.session.md5.update(G),L.session.sha1.update(G),(L.session.resuming&&q||!L.session.resuming&&!q)&&(e.queue(L,e.createRecord(L,{type:e.ContentType.change_cipher_spec,data:e.createChangeCipherSpec()})),L.state.current.write=L.state.pending.write,L.state.pending=null,e.queue(L,e.createRecord(L,{type:e.ContentType.handshake,data:e.createFinished(L)}))),L.expect=q?b:A,L.handshaking=!1,++L.handshakes,L.peerCertificate=q?L.session.serverCertificate:L.session.clientCertificate,e.flush(L),L.isConnected=!0,L.connected(L),L.process()},e.handleAlert=function(L,D){var B=D.fragment,U={level:B.getByte(),description:B.getByte()},G;switch(U.description){case e.Alert.Description.close_notify:G="Connection closed.";break;case e.Alert.Description.unexpected_message:G="Unexpected message.";break;case e.Alert.Description.bad_record_mac:G="Bad record MAC.";break;case e.Alert.Description.decryption_failed:G="Decryption failed.";break;case e.Alert.Description.record_overflow:G="Record overflow.";break;case e.Alert.Description.decompression_failure:G="Decompression failed.";break;case e.Alert.Description.handshake_failure:G="Handshake failure.";break;case e.Alert.Description.bad_certificate:G="Bad certificate.";break;case e.Alert.Description.unsupported_certificate:G="Unsupported certificate.";break;case e.Alert.Description.certificate_revoked:G="Certificate revoked.";break;case e.Alert.Description.certificate_expired:G="Certificate expired.";break;case e.Alert.Description.certificate_unknown:G="Certificate unknown.";break;case e.Alert.Description.illegal_parameter:G="Illegal parameter.";break;case e.Alert.Description.unknown_ca:G="Unknown certificate authority.";break;case e.Alert.Description.access_denied:G="Access denied.";break;case e.Alert.Description.decode_error:G="Decode error.";break;case e.Alert.Description.decrypt_error:G="Decrypt error.";break;case e.Alert.Description.export_restriction:G="Export restriction.";break;case e.Alert.Description.protocol_version:G="Unsupported protocol version.";break;case e.Alert.Description.insufficient_security:G="Insufficient security.";break;case e.Alert.Description.internal_error:G="Internal error.";break;case e.Alert.Description.user_canceled:G="User canceled.";break;case e.Alert.Description.no_renegotiation:G="Renegotiation not supported.";break;default:G="Unknown error.";break}if(U.description===e.Alert.Description.close_notify)return L.close();L.error(L,{message:G,send:!1,origin:L.entity===e.ConnectionEnd.client?"server":"client",alert:U}),L.process()},e.handleHandshake=function(L,D){var B=D.fragment,U=B.getByte(),G=B.getInt24();if(G>B.length())return L.fragmented=D,D.fragment=n.util.createBuffer(),B.read-=4,L.process();L.fragmented=null,B.read-=4;var ee=B.bytes(G+4);B.read+=4,U in fe[L.entity][L.expect]?(L.entity===e.ConnectionEnd.server&&!L.open&&!L.fail&&(L.handshaking=!0,L.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),U!==e.HandshakeType.hello_request&&U!==e.HandshakeType.certificate_verify&&U!==e.HandshakeType.finished&&(L.session.md5.update(ee),L.session.sha1.update(ee)),fe[L.entity][L.expect][U](L,D,G)):e.handleUnexpected(L,D)},e.handleApplicationData=function(L,D){L.data.putBuffer(D.fragment),L.dataReady(L),L.process()},e.handleHeartbeat=function(L,D){var B=D.fragment,U=B.getByte(),G=B.getInt16(),ee=B.getBytes(G);if(U===e.HeartbeatMessageType.heartbeat_request){if(L.handshaking||G>ee.length)return L.process();e.queue(L,e.createRecord(L,{type:e.ContentType.heartbeat,data:e.createHeartbeat(e.HeartbeatMessageType.heartbeat_response,ee)})),e.flush(L)}else if(U===e.HeartbeatMessageType.heartbeat_response){if(ee!==L.expectedHeartbeatPayload)return L.process();L.heartbeatReceived&&L.heartbeatReceived(L,n.util.createBuffer(ee))}L.process()};var r=0,p=1,f=2,s=3,g=4,h=5,v=6,b=7,d=8,w=0,k=1,R=2,T=3,I=4,C=5,A=6,O=7,E=e.handleUnexpected,P=e.handleChangeCipherSpec,N=e.handleAlert,j=e.handleHandshake,M=e.handleApplicationData,z=e.handleHeartbeat,H=[];H[e.ConnectionEnd.client]=[[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[P,N,E,E,z],[E,N,j,E,z],[E,N,j,M,z],[E,N,j,E,z]],H[e.ConnectionEnd.server]=[[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[E,N,j,E,z],[P,N,E,E,z],[E,N,j,E,z],[E,N,j,M,z],[E,N,j,E,z]];var X=e.handleHelloRequest,F=e.handleServerHello,Z=e.handleCertificate,re=e.handleServerKeyExchange,oe=e.handleCertificateRequest,he=e.handleServerHelloDone,de=e.handleFinished,fe=[];fe[e.ConnectionEnd.client]=[[E,E,F,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,Z,re,oe,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,re,oe,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,oe,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,he,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,de],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[X,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]];var ne=e.handleClientHello,te=e.handleClientKeyExchange,Y=e.handleCertificateVerify;fe[e.ConnectionEnd.server]=[[E,ne,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,Z,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,te,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,Y,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,de],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]],e.generateKeys=function(L,D){var B=t,U=D.client_random+D.server_random;L.session.resuming||(D.master_secret=B(D.pre_master_secret,"master secret",U,48).bytes(),D.pre_master_secret=null),U=D.server_random+D.client_random;var G=2*D.mac_key_length+2*D.enc_key_length,ee=L.version.major===e.Versions.TLS_1_0.major&&L.version.minor===e.Versions.TLS_1_0.minor;ee&&(G+=2*D.fixed_iv_length);var q=B(D.master_secret,"key expansion",U,G),J={client_write_MAC_key:q.getBytes(D.mac_key_length),server_write_MAC_key:q.getBytes(D.mac_key_length),client_write_key:q.getBytes(D.enc_key_length),server_write_key:q.getBytes(D.enc_key_length)};return ee&&(J.client_write_IV=q.getBytes(D.fixed_iv_length),J.server_write_IV=q.getBytes(D.fixed_iv_length)),J},e.createConnectionState=function(L){var D=L.entity===e.ConnectionEnd.client,B=function(){var ee={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(q){return!0},compressionState:null,compressFunction:function(q){return!0},updateSequenceNumber:function(){ee.sequenceNumber[1]===4294967295?(ee.sequenceNumber[1]=0,++ee.sequenceNumber[0]):++ee.sequenceNumber[1]}};return ee},U={read:B(),write:B()};if(U.read.update=function(ee,q){return U.read.cipherFunction(q,U.read)?U.read.compressFunction(ee,q,U.read)||ee.error(ee,{message:"Could not decompress record.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.decompression_failure}}):ee.error(ee,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.bad_record_mac}}),!ee.fail},U.write.update=function(ee,q){return U.write.compressFunction(ee,q,U.write)?U.write.cipherFunction(q,U.write)||ee.error(ee,{message:"Could not encrypt record.",send:!1,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}}):ee.error(ee,{message:"Could not compress record.",send:!1,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}}),!ee.fail},L.session){var G=L.session.sp;switch(L.session.cipherSuite.initSecurityParameters(G),G.keys=e.generateKeys(L,G),U.read.macKey=D?G.keys.server_write_MAC_key:G.keys.client_write_MAC_key,U.write.macKey=D?G.keys.client_write_MAC_key:G.keys.server_write_MAC_key,L.session.cipherSuite.initConnectionState(U,L,G),G.compression_algorithm){case e.CompressionMethod.none:break;case e.CompressionMethod.deflate:U.read.compressFunction=o,U.write.compressFunction=m;break;default:throw new Error("Unsupported compression algorithm.")}}return U},e.createRandom=function(){var L=new Date,D=+L+L.getTimezoneOffset()*6e4,B=n.util.createBuffer();return B.putInt32(D),B.putBytes(n.random.getBytes(28)),B},e.createRecord=function(L,D){if(!D.data)return null;var B={type:D.type,version:{major:L.version.major,minor:L.version.minor},length:D.data.length(),fragment:D.data};return B},e.createAlert=function(L,D){var B=n.util.createBuffer();return B.putByte(D.level),B.putByte(D.description),e.createRecord(L,{type:e.ContentType.alert,data:B})},e.createClientHello=function(L){L.session.clientHelloVersion={major:L.version.major,minor:L.version.minor};for(var D=n.util.createBuffer(),B=0;B<L.cipherSuites.length;++B){var U=L.cipherSuites[B];D.putByte(U.id[0]),D.putByte(U.id[1])}var G=D.length(),ee=n.util.createBuffer();ee.putByte(e.CompressionMethod.none);var q=ee.length(),J=n.util.createBuffer();if(L.virtualHost){var pe=n.util.createBuffer();pe.putByte(0),pe.putByte(0);var ue=n.util.createBuffer();ue.putByte(0),a(ue,2,n.util.createBuffer(L.virtualHost));var ae=n.util.createBuffer();a(ae,2,ue),a(pe,2,ae),J.putBuffer(pe)}var me=J.length();me>0&&(me+=2);var be=L.session.id,ye=be.length+1+2+4+28+2+G+1+q+me,xe=n.util.createBuffer();return xe.putByte(e.HandshakeType.client_hello),xe.putInt24(ye),xe.putByte(L.version.major),xe.putByte(L.version.minor),xe.putBytes(L.session.sp.client_random),a(xe,1,n.util.createBuffer(be)),a(xe,2,D),a(xe,1,ee),me>0&&a(xe,2,J),xe},e.createServerHello=function(L){var D=L.session.id,B=D.length+1+2+4+28+2+1,U=n.util.createBuffer();return U.putByte(e.HandshakeType.server_hello),U.putInt24(B),U.putByte(L.version.major),U.putByte(L.version.minor),U.putBytes(L.session.sp.server_random),a(U,1,n.util.createBuffer(D)),U.putByte(L.session.cipherSuite.id[0]),U.putByte(L.session.cipherSuite.id[1]),U.putByte(L.session.compressionMethod),U},e.createCertificate=function(L){var D=L.entity===e.ConnectionEnd.client,B=null;if(L.getCertificate){var U;D?U=L.session.certificateRequest:U=L.session.extensions.server_name.serverNameList,B=L.getCertificate(L,U)}var G=n.util.createBuffer();if(B!==null)try{n.util.isArray(B)||(B=[B]);for(var ee=null,q=0;q<B.length;++q){var J=n.pem.decode(B[q])[0];if(J.type!=="CERTIFICATE"&&J.type!=="X509 CERTIFICATE"&&J.type!=="TRUSTED CERTIFICATE"){var pe=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw pe.headerType=J.type,pe}if(J.procType&&J.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var ue=n.util.createBuffer(J.body);ee===null&&(ee=n.asn1.fromDer(ue.bytes(),!1));var ae=n.util.createBuffer();a(ae,3,ue),G.putBuffer(ae)}B=n.pki.certificateFromAsn1(ee),D?L.session.clientCertificate=B:L.session.serverCertificate=B}catch(ye){return L.error(L,{message:"Could not send certificate list.",cause:ye,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.bad_certificate}})}var me=3+G.length(),be=n.util.createBuffer();return be.putByte(e.HandshakeType.certificate),be.putInt24(me),a(be,3,G),be},e.createClientKeyExchange=function(L){var D=n.util.createBuffer();D.putByte(L.session.clientHelloVersion.major),D.putByte(L.session.clientHelloVersion.minor),D.putBytes(n.random.getBytes(46));var B=L.session.sp;B.pre_master_secret=D.getBytes();var U=L.session.serverCertificate.publicKey;D=U.encrypt(B.pre_master_secret);var G=D.length+2,ee=n.util.createBuffer();return ee.putByte(e.HandshakeType.client_key_exchange),ee.putInt24(G),ee.putInt16(D.length),ee.putBytes(D),ee},e.createServerKeyExchange=function(L){var D=0,B=n.util.createBuffer();return D>0&&(B.putByte(e.HandshakeType.server_key_exchange),B.putInt24(D)),B},e.getClientSignature=function(L,D){var B=n.util.createBuffer();B.putBuffer(L.session.md5.digest()),B.putBuffer(L.session.sha1.digest()),B=B.getBytes(),L.getSignature=L.getSignature||function(U,G,ee){var q=null;if(U.getPrivateKey)try{q=U.getPrivateKey(U,U.session.clientCertificate),q=n.pki.privateKeyFromPem(q)}catch(J){U.error(U,{message:"Could not get private key.",cause:J,send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}})}q===null?U.error(U,{message:"No private key set.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.internal_error}}):G=q.sign(G,null),ee(U,G)},L.getSignature(L,B,D)},e.createCertificateVerify=function(L,D){var B=D.length+2,U=n.util.createBuffer();return U.putByte(e.HandshakeType.certificate_verify),U.putInt24(B),U.putInt16(D.length),U.putBytes(D),U},e.createCertificateRequest=function(L){var D=n.util.createBuffer();D.putByte(1);var B=n.util.createBuffer();for(var U in L.caStore.certs){var G=L.caStore.certs[U],ee=n.pki.distinguishedNameToAsn1(G.subject),q=n.asn1.toDer(ee);B.putInt16(q.length()),B.putBuffer(q)}var J=1+D.length()+2+B.length(),pe=n.util.createBuffer();return pe.putByte(e.HandshakeType.certificate_request),pe.putInt24(J),a(pe,1,D),a(pe,2,B),pe},e.createServerHelloDone=function(L){var D=n.util.createBuffer();return D.putByte(e.HandshakeType.server_hello_done),D.putInt24(0),D},e.createChangeCipherSpec=function(){var L=n.util.createBuffer();return L.putByte(1),L},e.createFinished=function(L){var D=n.util.createBuffer();D.putBuffer(L.session.md5.digest()),D.putBuffer(L.session.sha1.digest());var B=L.entity===e.ConnectionEnd.client,U=L.session.sp,G=12,ee=t,q=B?"client finished":"server finished";D=ee(U.master_secret,q,D.getBytes(),G);var J=n.util.createBuffer();return J.putByte(e.HandshakeType.finished),J.putInt24(D.length()),J.putBuffer(D),J},e.createHeartbeat=function(L,D,B){typeof B>"u"&&(B=D.length);var U=n.util.createBuffer();U.putByte(L),U.putInt16(B),U.putBytes(D);var G=U.length(),ee=Math.max(16,G-B-3);return U.putBytes(n.random.getBytes(ee)),U},e.queue=function(L,D){if(D&&!(D.fragment.length()===0&&(D.type===e.ContentType.handshake||D.type===e.ContentType.alert||D.type===e.ContentType.change_cipher_spec))){if(D.type===e.ContentType.handshake){var B=D.fragment.bytes();L.session.md5.update(B),L.session.sha1.update(B),B=null}var U;if(D.fragment.length()<=e.MaxFragment)U=[D];else{U=[];for(var G=D.fragment.bytes();G.length>e.MaxFragment;)U.push(e.createRecord(L,{type:D.type,data:n.util.createBuffer(G.slice(0,e.MaxFragment))})),G=G.slice(e.MaxFragment);G.length>0&&U.push(e.createRecord(L,{type:D.type,data:n.util.createBuffer(G)}))}for(var ee=0;ee<U.length&&!L.fail;++ee){var q=U[ee],J=L.state.current.write;J.update(L,q)&&L.records.push(q)}}},e.flush=function(L){for(var D=0;D<L.records.length;++D){var B=L.records[D];L.tlsData.putByte(B.type),L.tlsData.putByte(B.version.major),L.tlsData.putByte(B.version.minor),L.tlsData.putInt16(B.fragment.length()),L.tlsData.putBuffer(L.records[D].fragment)}return L.records=[],L.tlsDataReady(L)};var W=function(L){switch(L){case!0:return!0;case n.pki.certificateError.bad_certificate:return e.Alert.Description.bad_certificate;case n.pki.certificateError.unsupported_certificate:return e.Alert.Description.unsupported_certificate;case n.pki.certificateError.certificate_revoked:return e.Alert.Description.certificate_revoked;case n.pki.certificateError.certificate_expired:return e.Alert.Description.certificate_expired;case n.pki.certificateError.certificate_unknown:return e.Alert.Description.certificate_unknown;case n.pki.certificateError.unknown_ca:return e.Alert.Description.unknown_ca;default:return e.Alert.Description.bad_certificate}},ie=function(L){switch(L){case!0:return!0;case e.Alert.Description.bad_certificate:return n.pki.certificateError.bad_certificate;case e.Alert.Description.unsupported_certificate:return n.pki.certificateError.unsupported_certificate;case e.Alert.Description.certificate_revoked:return n.pki.certificateError.certificate_revoked;case e.Alert.Description.certificate_expired:return n.pki.certificateError.certificate_expired;case e.Alert.Description.certificate_unknown:return n.pki.certificateError.certificate_unknown;case e.Alert.Description.unknown_ca:return n.pki.certificateError.unknown_ca;default:return n.pki.certificateError.bad_certificate}};e.verifyCertificateChain=function(L,D){try{var B={};for(var U in L.verifyOptions)B[U]=L.verifyOptions[U];B.verify=function(ee,q,J){var pe=W(ee),ue=L.verify(L,ee,q,J);if(ue!==!0){if(typeof ue=="object"&&!n.util.isArray(ue)){var ae=new Error("The application rejected the certificate.");throw ae.send=!0,ae.alert={level:e.Alert.Level.fatal,description:e.Alert.Description.bad_certificate},ue.message&&(ae.message=ue.message),ue.alert&&(ae.alert.description=ue.alert),ae}ue!==ee&&(ue=ie(ue))}return ue},n.pki.verifyCertificateChain(L.caStore,D,B)}catch(ee){var G=ee;(typeof G!="object"||n.util.isArray(G))&&(G={send:!0,alert:{level:e.Alert.Level.fatal,description:W(ee)}}),"send"in G||(G.send=!0),"alert"in G||(G.alert={level:e.Alert.Level.fatal,description:W(G.error)}),L.error(L,G)}return!L.fail},e.createSessionCache=function(L,D){var B=null;if(L&&L.getSession&&L.setSession&&L.order)B=L;else{B={},B.cache=L||{},B.capacity=Math.max(D||100,1),B.order=[];for(var U in L)B.order.length<=D?B.order.push(U):delete L[U];B.getSession=function(G){var ee=null,q=null;if(G?q=n.util.bytesToHex(G):B.order.length>0&&(q=B.order[0]),q!==null&&q in B.cache){ee=B.cache[q],delete B.cache[q];for(var J in B.order)if(B.order[J]===q){B.order.splice(J,1);break}}return ee},B.setSession=function(G,ee){if(B.order.length===B.capacity){var q=B.order.shift();delete B.cache[q]}var q=n.util.bytesToHex(G);B.order.push(q),B.cache[q]=ee}}return B},e.createConnection=function(L){var D=null;L.caStore?n.util.isArray(L.caStore)?D=n.pki.createCaStore(L.caStore):D=L.caStore:D=n.pki.createCaStore();var B=L.cipherSuites||null;if(B===null){B=[];for(var U in e.CipherSuites)B.push(e.CipherSuites[U])}var G=L.server?e.ConnectionEnd.server:e.ConnectionEnd.client,ee=L.sessionCache?e.createSessionCache(L.sessionCache):null,q={version:{major:e.Version.major,minor:e.Version.minor},entity:G,sessionId:L.sessionId,caStore:D,sessionCache:ee,cipherSuites:B,connected:L.connected,virtualHost:L.virtualHost||null,verifyClient:L.verifyClient||!1,verify:L.verify||function(ae,me,be,ye){return me},verifyOptions:L.verifyOptions||{},getCertificate:L.getCertificate||null,getPrivateKey:L.getPrivateKey||null,getSignature:L.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:L.tlsDataReady,dataReady:L.dataReady,heartbeatReceived:L.heartbeatReceived,closed:L.closed,error:function(ae,me){me.origin=me.origin||(ae.entity===e.ConnectionEnd.client?"client":"server"),me.send&&(e.queue(ae,e.createAlert(ae,me.alert)),e.flush(ae));var be=me.fatal!==!1;be&&(ae.fail=!0),L.error(ae,me),be&&ae.close(!1)},deflate:L.deflate||null,inflate:L.inflate||null};q.reset=function(ae){q.version={major:e.Version.major,minor:e.Version.minor},q.record=null,q.session=null,q.peerCertificate=null,q.state={pending:null,current:null},q.expect=q.entity===e.ConnectionEnd.client?r:w,q.fragmented=null,q.records=[],q.open=!1,q.handshakes=0,q.handshaking=!1,q.isConnected=!1,q.fail=!(ae||typeof ae>"u"),q.input.clear(),q.tlsData.clear(),q.data.clear(),q.state.current=e.createConnectionState(q)},q.reset();var J=function(ae,me){var be=me.type-e.ContentType.change_cipher_spec,ye=H[ae.entity][ae.expect];be in ye?ye[be](ae,me):e.handleUnexpected(ae,me)},pe=function(ae){var me=0,be=ae.input,ye=be.length();if(ye<5)me=5-ye;else{ae.record={type:be.getByte(),version:{major:be.getByte(),minor:be.getByte()},length:be.getInt16(),fragment:n.util.createBuffer(),ready:!1};var xe=ae.record.version.major===ae.version.major;xe&&ae.session&&ae.session.version&&(xe=ae.record.version.minor===ae.version.minor),xe||ae.error(ae,{message:"Incompatible TLS version.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.protocol_version}})}return me},ue=function(ae){var me=0,be=ae.input,ye=be.length();if(ye<ae.record.length)me=ae.record.length-ye;else{ae.record.fragment.putBytes(be.getBytes(ae.record.length)),be.compact();var xe=ae.state.current.read;xe.update(ae,ae.record)&&(ae.fragmented!==null&&(ae.fragmented.type===ae.record.type?(ae.fragmented.fragment.putBuffer(ae.record.fragment),ae.record=ae.fragmented):ae.error(ae,{message:"Invalid fragmented record.",send:!0,alert:{level:e.Alert.Level.fatal,description:e.Alert.Description.unexpected_message}})),ae.record.ready=!0)}return me};return q.handshake=function(ae){if(q.entity!==e.ConnectionEnd.client)q.error(q,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(q.handshaking)q.error(q,{message:"Handshake already in progress.",fatal:!1});else{q.fail&&!q.open&&q.handshakes===0&&(q.fail=!1),q.handshaking=!0,ae=ae||"";var me=null;ae.length>0&&(q.sessionCache&&(me=q.sessionCache.getSession(ae)),me===null&&(ae="")),ae.length===0&&q.sessionCache&&(me=q.sessionCache.getSession(),me!==null&&(ae=me.id)),q.session={id:ae,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},me&&(q.version=me.version,q.session.sp=me.sp),q.session.sp.client_random=e.createRandom().getBytes(),q.open=!0,e.queue(q,e.createRecord(q,{type:e.ContentType.handshake,data:e.createClientHello(q)})),e.flush(q)}},q.process=function(ae){var me=0;return ae&&q.input.putBytes(ae),q.fail||(q.record!==null&&q.record.ready&&q.record.fragment.isEmpty()&&(q.record=null),q.record===null&&(me=pe(q)),!q.fail&&q.record!==null&&!q.record.ready&&(me=ue(q)),!q.fail&&q.record!==null&&q.record.ready&&J(q,q.record)),me},q.prepare=function(ae){return e.queue(q,e.createRecord(q,{type:e.ContentType.application_data,data:n.util.createBuffer(ae)})),e.flush(q)},q.prepareHeartbeatRequest=function(ae,me){return ae instanceof n.util.ByteBuffer&&(ae=ae.bytes()),typeof me>"u"&&(me=ae.length),q.expectedHeartbeatPayload=ae,e.queue(q,e.createRecord(q,{type:e.ContentType.heartbeat,data:e.createHeartbeat(e.HeartbeatMessageType.heartbeat_request,ae,me)})),e.flush(q)},q.close=function(ae){if(!q.fail&&q.sessionCache&&q.session){var me={id:q.session.id,version:q.session.version,sp:q.session.sp};me.sp.keys=null,q.sessionCache.setSession(me.id,me)}q.open&&(q.open=!1,q.input.clear(),(q.isConnected||q.handshaking)&&(q.isConnected=q.handshaking=!1,e.queue(q,e.createAlert(q,{level:e.Alert.Level.warning,description:e.Alert.Description.close_notify})),e.flush(q)),q.closed(q)),q.reset(ae)},q},S.exports=n.tls=n.tls||{};for(var $ in e)typeof e[$]!="function"&&(n.tls[$]=e[$]);n.tls.prf_tls1=t,n.tls.hmac_sha1=l,n.tls.createSessionCache=e.createSessionCache,n.tls.createConnection=e.createConnection},7456:(S,_,u)=>{var n=u(8561),t=u(763),c=S.exports=n.util=n.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){c.nextTick=process.nextTick,typeof setImmediate=="function"?c.setImmediate=setImmediate:c.setImmediate=c.nextTick;return}if(typeof setImmediate=="function"){c.setImmediate=function(){return setImmediate.apply(void 0,arguments)},c.nextTick=function(C){return setImmediate(C)};return}if(c.setImmediate=function(C){setTimeout(C,0)},typeof window<"u"&&typeof window.postMessage=="function"){let C=function(A){if(A.source===window&&A.data===d){A.stopPropagation();var O=w.slice();w.length=0,O.forEach((function(E){E()}))}};var d="forge.setImmediate",w=[];c.setImmediate=function(A){w.push(A),w.length===1&&window.postMessage(d,"*")},window.addEventListener("message",C,!0)}if(typeof MutationObserver<"u"){var k=Date.now(),R=!0,T=document.createElement("div"),w=[];new MutationObserver((function(){var A=w.slice();w.length=0,A.forEach((function(O){O()}))})).observe(T,{attributes:!0});var I=c.setImmediate;c.setImmediate=function(A){Date.now()-k>15?(k=Date.now(),I(A)):(w.push(A),w.length===1&&T.setAttribute("a",R=!R))}}c.nextTick=c.setImmediate})(),c.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,c.globalScope=(function(){return c.isNodejs?global:typeof self>"u"?window:self})(),c.isArray=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"},c.isArrayBuffer=function(d){return typeof ArrayBuffer<"u"&&d instanceof ArrayBuffer},c.isArrayBufferView=function(d){return d&&c.isArrayBuffer(d.buffer)&&d.byteLength!==void 0};function l(d){if(!(d===8||d===16||d===24||d===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+d)}c.ByteBuffer=m;function m(d){if(this.data="",this.read=0,typeof d=="string")this.data=d;else if(c.isArrayBuffer(d)||c.isArrayBufferView(d))if(typeof Buffer<"u"&&d instanceof Buffer)this.data=d.toString("binary");else{var w=new Uint8Array(d);try{this.data=String.fromCharCode.apply(null,w)}catch{for(var k=0;k<w.length;++k)this.putByte(w[k])}}else(d instanceof m||typeof d=="object"&&typeof d.data=="string"&&typeof d.read=="number")&&(this.data=d.data,this.read=d.read);this._constructedStringLength=0}c.ByteStringBuffer=m;var o=4096;c.ByteStringBuffer.prototype._optimizeConstructedString=function(d){this._constructedStringLength+=d,this._constructedStringLength>o&&(this.data.substr(0,1),this._constructedStringLength=0)},c.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},c.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},c.ByteStringBuffer.prototype.putByte=function(d){return this.putBytes(String.fromCharCode(d))},c.ByteStringBuffer.prototype.fillWithByte=function(d,w){d=String.fromCharCode(d);for(var k=this.data;w>0;)w&1&&(k+=d),w>>>=1,w>0&&(d+=d);return this.data=k,this._optimizeConstructedString(w),this},c.ByteStringBuffer.prototype.putBytes=function(d){return this.data+=d,this._optimizeConstructedString(d.length),this},c.ByteStringBuffer.prototype.putString=function(d){return this.putBytes(c.encodeUtf8(d))},c.ByteStringBuffer.prototype.putInt16=function(d){return this.putBytes(String.fromCharCode(d>>8&255)+String.fromCharCode(d&255))},c.ByteStringBuffer.prototype.putInt24=function(d){return this.putBytes(String.fromCharCode(d>>16&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d&255))},c.ByteStringBuffer.prototype.putInt32=function(d){return this.putBytes(String.fromCharCode(d>>24&255)+String.fromCharCode(d>>16&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d&255))},c.ByteStringBuffer.prototype.putInt16Le=function(d){return this.putBytes(String.fromCharCode(d&255)+String.fromCharCode(d>>8&255))},c.ByteStringBuffer.prototype.putInt24Le=function(d){return this.putBytes(String.fromCharCode(d&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d>>16&255))},c.ByteStringBuffer.prototype.putInt32Le=function(d){return this.putBytes(String.fromCharCode(d&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d>>16&255)+String.fromCharCode(d>>24&255))},c.ByteStringBuffer.prototype.putInt=function(d,w){l(w);var k="";do w-=8,k+=String.fromCharCode(d>>w&255);while(w>0);return this.putBytes(k)},c.ByteStringBuffer.prototype.putSignedInt=function(d,w){return d<0&&(d+=2<<w-1),this.putInt(d,w)},c.ByteStringBuffer.prototype.putBuffer=function(d){return this.putBytes(d.getBytes())},c.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},c.ByteStringBuffer.prototype.getInt16=function(){var d=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,d},c.ByteStringBuffer.prototype.getInt24=function(){var d=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,d},c.ByteStringBuffer.prototype.getInt32=function(){var d=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,d},c.ByteStringBuffer.prototype.getInt16Le=function(){var d=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,d},c.ByteStringBuffer.prototype.getInt24Le=function(){var d=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,d},c.ByteStringBuffer.prototype.getInt32Le=function(){var d=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,d},c.ByteStringBuffer.prototype.getInt=function(d){l(d);var w=0;do w=(w<<8)+this.data.charCodeAt(this.read++),d-=8;while(d>0);return w},c.ByteStringBuffer.prototype.getSignedInt=function(d){var w=this.getInt(d),k=2<<d-2;return w>=k&&(w-=k<<1),w},c.ByteStringBuffer.prototype.getBytes=function(d){var w;return d?(d=Math.min(this.length(),d),w=this.data.slice(this.read,this.read+d),this.read+=d):d===0?w="":(w=this.read===0?this.data:this.data.slice(this.read),this.clear()),w},c.ByteStringBuffer.prototype.bytes=function(d){return typeof d>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+d)},c.ByteStringBuffer.prototype.at=function(d){return this.data.charCodeAt(this.read+d)},c.ByteStringBuffer.prototype.setAt=function(d,w){return this.data=this.data.substr(0,this.read+d)+String.fromCharCode(w)+this.data.substr(this.read+d+1),this},c.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},c.ByteStringBuffer.prototype.copy=function(){var d=c.createBuffer(this.data);return d.read=this.read,d},c.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},c.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},c.ByteStringBuffer.prototype.truncate=function(d){var w=Math.max(0,this.length()-d);return this.data=this.data.substr(this.read,w),this.read=0,this},c.ByteStringBuffer.prototype.toHex=function(){for(var d="",w=this.read;w<this.data.length;++w){var k=this.data.charCodeAt(w);k<16&&(d+="0"),d+=k.toString(16)}return d},c.ByteStringBuffer.prototype.toString=function(){return c.decodeUtf8(this.bytes())};function i(d,w){w=w||{},this.read=w.readOffset||0,this.growSize=w.growSize||1024;var k=c.isArrayBuffer(d),R=c.isArrayBufferView(d);if(k||R){k?this.data=new DataView(d):this.data=new DataView(d.buffer,d.byteOffset,d.byteLength),this.write="writeOffset"in w?w.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,d!=null&&this.putBytes(d),"writeOffset"in w&&(this.write=w.writeOffset)}c.DataBuffer=i,c.DataBuffer.prototype.length=function(){return this.write-this.read},c.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},c.DataBuffer.prototype.accommodate=function(d,w){if(this.length()>=d)return this;w=Math.max(w||this.growSize,d);var k=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),R=new Uint8Array(this.length()+w);return R.set(k),this.data=new DataView(R.buffer),this},c.DataBuffer.prototype.putByte=function(d){return this.accommodate(1),this.data.setUint8(this.write++,d),this},c.DataBuffer.prototype.fillWithByte=function(d,w){this.accommodate(w);for(var k=0;k<w;++k)this.data.setUint8(d);return this},c.DataBuffer.prototype.putBytes=function(d,w){if(c.isArrayBufferView(d)){var k=new Uint8Array(d.buffer,d.byteOffset,d.byteLength),R=k.byteLength-k.byteOffset;this.accommodate(R);var T=new Uint8Array(this.data.buffer,this.write);return T.set(k),this.write+=R,this}if(c.isArrayBuffer(d)){var k=new Uint8Array(d);this.accommodate(k.byteLength);var T=new Uint8Array(this.data.buffer);return T.set(k,this.write),this.write+=k.byteLength,this}if(d instanceof c.DataBuffer||typeof d=="object"&&typeof d.read=="number"&&typeof d.write=="number"&&c.isArrayBufferView(d.data)){var k=new Uint8Array(d.data.byteLength,d.read,d.length());this.accommodate(k.byteLength);var T=new Uint8Array(d.data.byteLength,this.write);return T.set(k),this.write+=k.byteLength,this}if(d instanceof c.ByteStringBuffer&&(d=d.data,w="binary"),w=w||"binary",typeof d=="string"){var I;if(w==="hex")return this.accommodate(Math.ceil(d.length/2)),I=new Uint8Array(this.data.buffer,this.write),this.write+=c.binary.hex.decode(d,I,this.write),this;if(w==="base64")return this.accommodate(Math.ceil(d.length/4)*3),I=new Uint8Array(this.data.buffer,this.write),this.write+=c.binary.base64.decode(d,I,this.write),this;if(w==="utf8"&&(d=c.encodeUtf8(d),w="binary"),w==="binary"||w==="raw")return this.accommodate(d.length),I=new Uint8Array(this.data.buffer,this.write),this.write+=c.binary.raw.decode(I),this;if(w==="utf16")return this.accommodate(d.length*2),I=new Uint16Array(this.data.buffer,this.write),this.write+=c.text.utf16.encode(I),this;throw new Error("Invalid encoding: "+w)}throw Error("Invalid parameter: "+d)},c.DataBuffer.prototype.putBuffer=function(d){return this.putBytes(d),d.clear(),this},c.DataBuffer.prototype.putString=function(d){return this.putBytes(d,"utf16")},c.DataBuffer.prototype.putInt16=function(d){return this.accommodate(2),this.data.setInt16(this.write,d),this.write+=2,this},c.DataBuffer.prototype.putInt24=function(d){return this.accommodate(3),this.data.setInt16(this.write,d>>8&65535),this.data.setInt8(this.write,d>>16&255),this.write+=3,this},c.DataBuffer.prototype.putInt32=function(d){return this.accommodate(4),this.data.setInt32(this.write,d),this.write+=4,this},c.DataBuffer.prototype.putInt16Le=function(d){return this.accommodate(2),this.data.setInt16(this.write,d,!0),this.write+=2,this},c.DataBuffer.prototype.putInt24Le=function(d){return this.accommodate(3),this.data.setInt8(this.write,d>>16&255),this.data.setInt16(this.write,d>>8&65535,!0),this.write+=3,this},c.DataBuffer.prototype.putInt32Le=function(d){return this.accommodate(4),this.data.setInt32(this.write,d,!0),this.write+=4,this},c.DataBuffer.prototype.putInt=function(d,w){l(w),this.accommodate(w/8);do w-=8,this.data.setInt8(this.write++,d>>w&255);while(w>0);return this},c.DataBuffer.prototype.putSignedInt=function(d,w){return l(w),this.accommodate(w/8),d<0&&(d+=2<<w-1),this.putInt(d,w)},c.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},c.DataBuffer.prototype.getInt16=function(){var d=this.data.getInt16(this.read);return this.read+=2,d},c.DataBuffer.prototype.getInt24=function(){var d=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,d},c.DataBuffer.prototype.getInt32=function(){var d=this.data.getInt32(this.read);return this.read+=4,d},c.DataBuffer.prototype.getInt16Le=function(){var d=this.data.getInt16(this.read,!0);return this.read+=2,d},c.DataBuffer.prototype.getInt24Le=function(){var d=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,d},c.DataBuffer.prototype.getInt32Le=function(){var d=this.data.getInt32(this.read,!0);return this.read+=4,d},c.DataBuffer.prototype.getInt=function(d){l(d);var w=0;do w=(w<<8)+this.data.getInt8(this.read++),d-=8;while(d>0);return w},c.DataBuffer.prototype.getSignedInt=function(d){var w=this.getInt(d),k=2<<d-2;return w>=k&&(w-=k<<1),w},c.DataBuffer.prototype.getBytes=function(d){var w;return d?(d=Math.min(this.length(),d),w=this.data.slice(this.read,this.read+d),this.read+=d):d===0?w="":(w=this.read===0?this.data:this.data.slice(this.read),this.clear()),w},c.DataBuffer.prototype.bytes=function(d){return typeof d>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+d)},c.DataBuffer.prototype.at=function(d){return this.data.getUint8(this.read+d)},c.DataBuffer.prototype.setAt=function(d,w){return this.data.setUint8(d,w),this},c.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},c.DataBuffer.prototype.copy=function(){return new c.DataBuffer(this)},c.DataBuffer.prototype.compact=function(){if(this.read>0){var d=new Uint8Array(this.data.buffer,this.read),w=new Uint8Array(d.byteLength);w.set(d),this.data=new DataView(w),this.write-=this.read,this.read=0}return this},c.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},c.DataBuffer.prototype.truncate=function(d){return this.write=Math.max(0,this.length()-d),this.read=Math.min(this.read,this.write),this},c.DataBuffer.prototype.toHex=function(){for(var d="",w=this.read;w<this.data.byteLength;++w){var k=this.data.getUint8(w);k<16&&(d+="0"),d+=k.toString(16)}return d},c.DataBuffer.prototype.toString=function(d){var w=new Uint8Array(this.data,this.read,this.length());if(d=d||"utf8",d==="binary"||d==="raw")return c.binary.raw.encode(w);if(d==="hex")return c.binary.hex.encode(w);if(d==="base64")return c.binary.base64.encode(w);if(d==="utf8")return c.text.utf8.decode(w);if(d==="utf16")return c.text.utf16.decode(w);throw new Error("Invalid encoding: "+d)},c.createBuffer=function(d,w){return w=w||"raw",d!==void 0&&w==="utf8"&&(d=c.encodeUtf8(d)),new c.ByteBuffer(d)},c.fillString=function(d,w){for(var k="";w>0;)w&1&&(k+=d),w>>>=1,w>0&&(d+=d);return k},c.xorBytes=function(d,w,k){for(var R="",T="",I="",C=0,A=0;k>0;--k,++C)T=d.charCodeAt(C)^w.charCodeAt(C),A>=10&&(R+=I,I="",A=0),I+=String.fromCharCode(T),++A;return R+=I,R},c.hexToBytes=function(d){var w="",k=0;for(d.length&!0&&(k=1,w+=String.fromCharCode(parseInt(d[0],16)));k<d.length;k+=2)w+=String.fromCharCode(parseInt(d.substr(k,2),16));return w},c.bytesToHex=function(d){return c.createBuffer(d).toHex()},c.int32ToBytes=function(d){return String.fromCharCode(d>>24&255)+String.fromCharCode(d>>16&255)+String.fromCharCode(d>>8&255)+String.fromCharCode(d&255)};var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],r="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";c.encode64=function(d,w){for(var k="",R="",T,I,C,A=0;A<d.length;)T=d.charCodeAt(A++),I=d.charCodeAt(A++),C=d.charCodeAt(A++),k+=a.charAt(T>>2),k+=a.charAt((T&3)<<4|I>>4),isNaN(I)?k+="==":(k+=a.charAt((I&15)<<2|C>>6),k+=isNaN(C)?"=":a.charAt(C&63)),w&&k.length>w&&(R+=k.substr(0,w)+`\r
|
|
250
250
|
`,k=k.substr(w));return R+=k,R},c.decode64=function(d){d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var w="",k,R,T,I,C=0;C<d.length;)k=e[d.charCodeAt(C++)-43],R=e[d.charCodeAt(C++)-43],T=e[d.charCodeAt(C++)-43],I=e[d.charCodeAt(C++)-43],w+=String.fromCharCode(k<<2|R>>4),T!==64&&(w+=String.fromCharCode((R&15)<<4|T>>2),I!==64&&(w+=String.fromCharCode((T&3)<<6|I)));return w},c.encodeUtf8=function(d){return unescape(encodeURIComponent(d))},c.decodeUtf8=function(d){return decodeURIComponent(escape(d))},c.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:t.encode,decode:t.decode}},c.binary.raw.encode=function(d){return String.fromCharCode.apply(null,d)},c.binary.raw.decode=function(d,w,k){var R=w;R||(R=new Uint8Array(d.length)),k=k||0;for(var T=k,I=0;I<d.length;++I)R[T++]=d.charCodeAt(I);return w?T-k:R},c.binary.hex.encode=c.bytesToHex,c.binary.hex.decode=function(d,w,k){var R=w;R||(R=new Uint8Array(Math.ceil(d.length/2))),k=k||0;var T=0,I=k;for(d.length&1&&(T=1,R[I++]=parseInt(d[0],16));T<d.length;T+=2)R[I++]=parseInt(d.substr(T,2),16);return w?I-k:R},c.binary.base64.encode=function(d,w){for(var k="",R="",T,I,C,A=0;A<d.byteLength;)T=d[A++],I=d[A++],C=d[A++],k+=a.charAt(T>>2),k+=a.charAt((T&3)<<4|I>>4),isNaN(I)?k+="==":(k+=a.charAt((I&15)<<2|C>>6),k+=isNaN(C)?"=":a.charAt(C&63)),w&&k.length>w&&(R+=k.substr(0,w)+`\r
|
|
251
251
|
`,k=k.substr(w));return R+=k,R},c.binary.base64.decode=function(d,w,k){var R=w;R||(R=new Uint8Array(Math.ceil(d.length/4)*3)),d=d.replace(/[^A-Za-z0-9\+\/\=]/g,""),k=k||0;for(var T,I,C,A,O=0,E=k;O<d.length;)T=e[d.charCodeAt(O++)-43],I=e[d.charCodeAt(O++)-43],C=e[d.charCodeAt(O++)-43],A=e[d.charCodeAt(O++)-43],R[E++]=T<<2|I>>4,C!==64&&(R[E++]=(I&15)<<4|C>>2,A!==64&&(R[E++]=(C&3)<<6|A));return w?E-k:R.subarray(0,E)},c.binary.base58.encode=function(d,w){return c.binary.baseN.encode(d,r,w)},c.binary.base58.decode=function(d,w){return c.binary.baseN.decode(d,r,w)},c.text={utf8:{},utf16:{}},c.text.utf8.encode=function(d,w,k){d=c.encodeUtf8(d);var R=w;R||(R=new Uint8Array(d.length)),k=k||0;for(var T=k,I=0;I<d.length;++I)R[T++]=d.charCodeAt(I);return w?T-k:R},c.text.utf8.decode=function(d){return c.decodeUtf8(String.fromCharCode.apply(null,d))},c.text.utf16.encode=function(d,w,k){var R=w;R||(R=new Uint8Array(d.length*2));var T=new Uint16Array(R.buffer);k=k||0;for(var I=k,C=k,A=0;A<d.length;++A)T[C++]=d.charCodeAt(A),I+=2;return w?I-k:R},c.text.utf16.decode=function(d){return String.fromCharCode.apply(null,new Uint16Array(d.buffer))},c.deflate=function(d,w,k){if(w=c.decode64(d.deflate(c.encode64(w)).rval),k){var R=2,T=w.charCodeAt(1);T&32&&(R=6),w=w.substring(R,w.length-4)}return w},c.inflate=function(d,w,k){var R=d.inflate(c.encode64(w)).rval;return R===null?null:c.decode64(R)};var p=function(d,w,k){if(!d)throw new Error("WebStorage not available.");var R;if(k===null?R=d.removeItem(w):(k=c.encode64(JSON.stringify(k)),R=d.setItem(w,k)),typeof R<"u"&&R.rval!==!0){var T=new Error(R.error.message);throw T.id=R.error.id,T.name=R.error.name,T}},f=function(d,w){if(!d)throw new Error("WebStorage not available.");var k=d.getItem(w);if(d.init)if(k.rval===null){if(k.error){var R=new Error(k.error.message);throw R.id=k.error.id,R.name=k.error.name,R}k=null}else k=k.rval;return k!==null&&(k=JSON.parse(c.decode64(k))),k},s=function(d,w,k,R){var T=f(d,w);T===null&&(T={}),T[k]=R,p(d,w,T)},g=function(d,w,k){var R=f(d,w);return R!==null&&(R=k in R?R[k]:null),R},h=function(d,w,k){var R=f(d,w);if(R!==null&&k in R){delete R[k];var T=!0;for(var I in R){T=!1;break}T&&(R=null),p(d,w,R)}},v=function(d,w){p(d,w,null)},b=function(d,w,k){var R=null;typeof k>"u"&&(k=["web","flash"]);var T,I=!1,C=null;for(var A in k){T=k[A];try{if(T==="flash"||T==="both"){if(w[0]===null)throw new Error("Flash local storage not available.");R=d.apply(this,w),I=T==="flash"}(T==="web"||T==="both")&&(w[0]=localStorage,R=d.apply(this,w),I=!0)}catch(O){C=O}if(I)break}if(!I)throw C;return R};c.setItem=function(d,w,k,R,T){b(s,arguments,T)},c.getItem=function(d,w,k,R){return b(g,arguments,R)},c.removeItem=function(d,w,k,R){b(h,arguments,R)},c.clearItems=function(d,w,k){b(v,arguments,k)},c.isEmpty=function(d){for(var w in d)if(d.hasOwnProperty(w))return!1;return!0},c.format=function(d){for(var w=/%./g,k,R,T=0,I=[],C=0;k=w.exec(d);){R=d.substring(C,w.lastIndex-2),R.length>0&&I.push(R),C=w.lastIndex;var A=k[0][1];switch(A){case"s":case"o":T<arguments.length?I.push(arguments[T+++1]):I.push("<?>");break;case"%":I.push("%");break;default:I.push("<%"+A+"?>")}}return I.push(d.substring(C)),I.join("")},c.formatNumber=function(d,w,k,R){var T=d,I=isNaN(w=Math.abs(w))?2:w,C=k===void 0?",":k,A=R===void 0?".":R,O=T<0?"-":"",E=parseInt(T=Math.abs(+T||0).toFixed(I),10)+"",P=E.length>3?E.length%3:0;return O+(P?E.substr(0,P)+A:"")+E.substr(P).replace(/(\d{3})(?=\d)/g,"$1"+A)+(I?C+Math.abs(T-E).toFixed(I).slice(2):"")},c.formatSize=function(d){return d>=1073741824?d=c.formatNumber(d/1073741824,2,".","")+" GiB":d>=1048576?d=c.formatNumber(d/1048576,2,".","")+" MiB":d>=1024?d=c.formatNumber(d/1024,0)+" KiB":d=c.formatNumber(d,0)+" bytes",d},c.bytesFromIP=function(d){return d.indexOf(".")!==-1?c.bytesFromIPv4(d):d.indexOf(":")!==-1?c.bytesFromIPv6(d):null},c.bytesFromIPv4=function(d){if(d=d.split("."),d.length!==4)return null;for(var w=c.createBuffer(),k=0;k<d.length;++k){var R=parseInt(d[k],10);if(isNaN(R))return null;w.putByte(R)}return w.getBytes()},c.bytesFromIPv6=function(d){var w=0;d=d.split(":").filter((function(C){return C.length===0&&++w,!0}));for(var k=(8-d.length+w)*2,R=c.createBuffer(),T=0;T<8;++T){if(!d[T]||d[T].length===0){R.fillWithByte(0,k),k=0;continue}var I=c.hexToBytes(d[T]);I.length<2&&R.putByte(0),R.putBytes(I)}return R.getBytes()},c.bytesToIP=function(d){return d.length===4?c.bytesToIPv4(d):d.length===16?c.bytesToIPv6(d):null},c.bytesToIPv4=function(d){if(d.length!==4)return null;for(var w=[],k=0;k<d.length;++k)w.push(d.charCodeAt(k));return w.join(".")},c.bytesToIPv6=function(d){if(d.length!==16)return null;for(var w=[],k=[],R=0,T=0;T<d.length;T+=2){for(var I=c.bytesToHex(d[T]+d[T+1]);I[0]==="0"&&I!=="0";)I=I.substr(1);if(I==="0"){var C=k[k.length-1],A=w.length;!C||A!==C.end+1?k.push({start:A,end:A}):(C.end=A,C.end-C.start>k[R].end-k[R].start&&(R=k.length-1))}w.push(I)}if(k.length>0){var O=k[R];O.end-O.start>0&&(w.splice(O.start,O.end-O.start+1,""),O.start===0&&w.unshift(""),O.end===7&&w.push(""))}return w.join(":")},c.estimateCores=function(d,w){if(typeof d=="function"&&(w=d,d={}),d=d||{},"cores"in c&&!d.update)return w(null,c.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return c.cores=navigator.hardwareConcurrency,w(null,c.cores);if(typeof Worker>"u")return c.cores=1,w(null,c.cores);if(typeof Blob>"u")return c.cores=2,w(null,c.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(C){for(var A=Date.now(),O=A+4;Date.now()<O;);self.postMessage({st:A,et:O})}))}.toString(),")()"],{type:"application/javascript"}));R([],5,16);function R(C,A,O){if(A===0){var E=Math.floor(C.reduce((function(P,N){return P+N}),0)/C.length);return c.cores=Math.max(1,E),URL.revokeObjectURL(k),w(null,c.cores)}T(O,(function(P,N){C.push(I(O,N)),R(C,A-1,O)}))}function T(C,A){for(var O=[],E=[],P=0;P<C;++P){var N=new Worker(k);N.addEventListener("message",(function(j){if(E.push(j.data),E.length===C){for(var M=0;M<C;++M)O[M].terminate();A(null,E)}})),O.push(N)}for(var P=0;P<C;++P)O[P].postMessage(P)}function I(C,A){for(var O=[],E=0;E<C;++E)for(var P=A[E],N=O[E]=[],j=0;j<C;++j)if(E!==j){var M=A[j];(P.st>M.st&&P.st<M.et||M.st>P.st&&M.st<P.et)&&N.push(j)}return O.reduce((function(z,H){return Math.max(z,H.length)}),0)}}},5184:(S,_,u)=>{var n=u(8561);u(9445),u(7357),u(5918),u(6777),u(7220),u(245),u(492),u(6736),u(2804),u(7456);var t=n.asn1,c=S.exports=n.pki=n.pki||{},l=c.oids,m={};m.CN=l.commonName,m.commonName="CN",m.C=l.countryName,m.countryName="C",m.L=l.localityName,m.localityName="L",m.ST=l.stateOrProvinceName,m.stateOrProvinceName="ST",m.O=l.organizationName,m.organizationName="O",m.OU=l.organizationalUnitName,m.organizationalUnitName="OU",m.E=l.emailAddress,m.emailAddress="E";var o=n.pki.rsa.publicKeyValidator,i={name:"Certificate",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:t.Class.UNIVERSAL,type:t.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:t.Class.UNIVERSAL,type:t.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:t.Class.UNIVERSAL,type:t.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:t.Class.UNIVERSAL,type:t.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},o,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:t.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:t.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},a={name:"rsapss",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:t.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:t.Class.UNIVERSAL,type:t.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:t.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:t.Class.UNIVERSAL,type:t.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},e={name:"CertificationRequestInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},o,{name:"CertificationRequestInfo.attributes",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0}]}]}]},r={name:"CertificationRequest",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[e,{name:"CertificationRequest.signatureAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};c.RDNAttributesAsArray=function(C,A){for(var O=[],E,P,N,j=0;j<C.value.length;++j){E=C.value[j];for(var M=0;M<E.value.length;++M)N={},P=E.value[M],N.type=t.derToOid(P.value[0].value),N.value=P.value[1].value,N.valueTagClass=P.value[1].type,N.type in l&&(N.name=l[N.type],N.name in m&&(N.shortName=m[N.name])),A&&(A.update(N.type),A.update(N.value)),O.push(N)}return O},c.CRIAttributesAsArray=function(C){for(var A=[],O=0;O<C.length;++O)for(var E=C[O],P=t.derToOid(E.value[0].value),N=E.value[1].value,j=0;j<N.length;++j){var M={};if(M.type=P,M.value=N[j].value,M.valueTagClass=N[j].type,M.type in l&&(M.name=l[M.type],M.name in m&&(M.shortName=m[M.name])),M.type===l.extensionRequest){M.extensions=[];for(var z=0;z<M.value.length;++z)M.extensions.push(c.certificateExtensionFromAsn1(M.value[z]))}A.push(M)}return A};function p(C,A){typeof A=="string"&&(A={shortName:A});for(var O=null,E,P=0;O===null&&P<C.attributes.length;++P)E=C.attributes[P],(A.type&&A.type===E.type||A.name&&A.name===E.name||A.shortName&&A.shortName===E.shortName)&&(O=E);return O}var f=function(C,A,O){var E={};if(C!==l["RSASSA-PSS"])return E;O&&(E={hash:{algorithmOid:l.sha1},mgf:{algorithmOid:l.mgf1,hash:{algorithmOid:l.sha1}},saltLength:20});var P={},N=[];if(!t.validate(A,a,P,N)){var j=new Error("Cannot read RSASSA-PSS parameter block.");throw j.errors=N,j}return P.hashOid!==void 0&&(E.hash=E.hash||{},E.hash.algorithmOid=t.derToOid(P.hashOid)),P.maskGenOid!==void 0&&(E.mgf=E.mgf||{},E.mgf.algorithmOid=t.derToOid(P.maskGenOid),E.mgf.hash=E.mgf.hash||{},E.mgf.hash.algorithmOid=t.derToOid(P.maskGenHashOid)),P.saltLength!==void 0&&(E.saltLength=P.saltLength.charCodeAt(0)),E},s=function(C){switch(l[C.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return n.md.sha1.create();case"md5WithRSAEncryption":return n.md.md5.create();case"sha256WithRSAEncryption":return n.md.sha256.create();case"sha384WithRSAEncryption":return n.md.sha384.create();case"sha512WithRSAEncryption":return n.md.sha512.create();case"RSASSA-PSS":return n.md.sha256.create();default:var A=new Error("Could not compute "+C.type+" digest. Unknown signature OID.");throw A.signatureOid=C.signatureOid,A}},g=function(C){var A=C.certificate,O;switch(A.signatureOid){case l.sha1WithRSAEncryption:case l.sha1WithRSASignature:break;case l["RSASSA-PSS"]:var E,P;if(E=l[A.signatureParameters.mgf.hash.algorithmOid],E===void 0||n.md[E]===void 0){var N=new Error("Unsupported MGF hash function.");throw N.oid=A.signatureParameters.mgf.hash.algorithmOid,N.name=E,N}if(P=l[A.signatureParameters.mgf.algorithmOid],P===void 0||n.mgf[P]===void 0){var N=new Error("Unsupported MGF function.");throw N.oid=A.signatureParameters.mgf.algorithmOid,N.name=P,N}if(P=n.mgf[P].create(n.md[E].create()),E=l[A.signatureParameters.hash.algorithmOid],E===void 0||n.md[E]===void 0){var N=new Error("Unsupported RSASSA-PSS hash function.");throw N.oid=A.signatureParameters.hash.algorithmOid,N.name=E,N}O=n.pss.create(n.md[E].create(),P,A.signatureParameters.saltLength);break}return A.publicKey.verify(C.md.digest().getBytes(),C.signature,O)};c.certificateFromPem=function(C,A,O){var E=n.pem.decode(C)[0];if(E.type!=="CERTIFICATE"&&E.type!=="X509 CERTIFICATE"&&E.type!=="TRUSTED CERTIFICATE"){var P=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw P.headerType=E.type,P}if(E.procType&&E.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var N=t.fromDer(E.body,O);return c.certificateFromAsn1(N,A)},c.certificateToPem=function(C,A){var O={type:"CERTIFICATE",body:t.toDer(c.certificateToAsn1(C)).getBytes()};return n.pem.encode(O,{maxline:A})},c.publicKeyFromPem=function(C){var A=n.pem.decode(C)[0];if(A.type!=="PUBLIC KEY"&&A.type!=="RSA PUBLIC KEY"){var O=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw O.headerType=A.type,O}if(A.procType&&A.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var E=t.fromDer(A.body);return c.publicKeyFromAsn1(E)},c.publicKeyToPem=function(C,A){var O={type:"PUBLIC KEY",body:t.toDer(c.publicKeyToAsn1(C)).getBytes()};return n.pem.encode(O,{maxline:A})},c.publicKeyToRSAPublicKeyPem=function(C,A){var O={type:"RSA PUBLIC KEY",body:t.toDer(c.publicKeyToRSAPublicKey(C)).getBytes()};return n.pem.encode(O,{maxline:A})},c.getPublicKeyFingerprint=function(C,A){A=A||{};var O=A.md||n.md.sha1.create(),E=A.type||"RSAPublicKey",P;switch(E){case"RSAPublicKey":P=t.toDer(c.publicKeyToRSAPublicKey(C)).getBytes();break;case"SubjectPublicKeyInfo":P=t.toDer(c.publicKeyToAsn1(C)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+A.type+'".')}O.start(),O.update(P);var N=O.digest();if(A.encoding==="hex"){var j=N.toHex();return A.delimiter?j.match(/.{2}/g).join(A.delimiter):j}else{if(A.encoding==="binary")return N.getBytes();if(A.encoding)throw new Error('Unknown encoding "'+A.encoding+'".')}return N},c.certificationRequestFromPem=function(C,A,O){var E=n.pem.decode(C)[0];if(E.type!=="CERTIFICATE REQUEST"){var P=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw P.headerType=E.type,P}if(E.procType&&E.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var N=t.fromDer(E.body,O);return c.certificationRequestFromAsn1(N,A)},c.certificationRequestToPem=function(C,A){var O={type:"CERTIFICATE REQUEST",body:t.toDer(c.certificationRequestToAsn1(C)).getBytes()};return n.pem.encode(O,{maxline:A})},c.createCertificate=function(){var C={};return C.version=2,C.serialNumber="00",C.signatureOid=null,C.signature=null,C.siginfo={},C.siginfo.algorithmOid=null,C.validity={},C.validity.notBefore=new Date,C.validity.notAfter=new Date,C.issuer={},C.issuer.getField=function(A){return p(C.issuer,A)},C.issuer.addField=function(A){b([A]),C.issuer.attributes.push(A)},C.issuer.attributes=[],C.issuer.hash=null,C.subject={},C.subject.getField=function(A){return p(C.subject,A)},C.subject.addField=function(A){b([A]),C.subject.attributes.push(A)},C.subject.attributes=[],C.subject.hash=null,C.extensions=[],C.publicKey=null,C.md=null,C.setSubject=function(A,O){b(A),C.subject.attributes=A,delete C.subject.uniqueId,O&&(C.subject.uniqueId=O),C.subject.hash=null},C.setIssuer=function(A,O){b(A),C.issuer.attributes=A,delete C.issuer.uniqueId,O&&(C.issuer.uniqueId=O),C.issuer.hash=null},C.setExtensions=function(A){for(var O=0;O<A.length;++O)d(A[O],{cert:C});C.extensions=A},C.getExtension=function(A){typeof A=="string"&&(A={name:A});for(var O=null,E,P=0;O===null&&P<C.extensions.length;++P)E=C.extensions[P],(A.id&&E.id===A.id||A.name&&E.name===A.name)&&(O=E);return O},C.sign=function(A,O){C.md=O||n.md.sha1.create();var E=l[C.md.algorithm+"WithRSAEncryption"];if(!E){var P=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw P.algorithm=C.md.algorithm,P}C.signatureOid=C.siginfo.algorithmOid=E,C.tbsCertificate=c.getTBSCertificate(C);var N=t.toDer(C.tbsCertificate);C.md.update(N.getBytes()),C.signature=A.sign(C.md)},C.verify=function(A){var O=!1;if(!C.issued(A)){var E=A.issuer,P=C.subject,N=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw N.expectedIssuer=P.attributes,N.actualIssuer=E.attributes,N}var j=A.md;if(j===null){j=s({signatureOid:A.signatureOid,type:"certificate"});var M=A.tbsCertificate||c.getTBSCertificate(A),z=t.toDer(M);j.update(z.getBytes())}return j!==null&&(O=g({certificate:C,md:j,signature:A.signature})),O},C.isIssuer=function(A){var O=!1,E=C.issuer,P=A.subject;if(E.hash&&P.hash)O=E.hash===P.hash;else if(E.attributes.length===P.attributes.length){O=!0;for(var N,j,M=0;O&&M<E.attributes.length;++M)N=E.attributes[M],j=P.attributes[M],(N.type!==j.type||N.value!==j.value)&&(O=!1)}return O},C.issued=function(A){return A.isIssuer(C)},C.generateSubjectKeyIdentifier=function(){return c.getPublicKeyFingerprint(C.publicKey,{type:"RSAPublicKey"})},C.verifySubjectKeyIdentifier=function(){for(var A=l.subjectKeyIdentifier,O=0;O<C.extensions.length;++O){var E=C.extensions[O];if(E.id===A){var P=C.generateSubjectKeyIdentifier().getBytes();return n.util.hexToBytes(E.subjectKeyIdentifier)===P}}return!1},C},c.certificateFromAsn1=function(C,A){var O={},E=[];if(!t.validate(C,i,O,E)){var P=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw P.errors=E,P}var N=t.derToOid(O.publicKeyOid);if(N!==c.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var j=c.createCertificate();j.version=O.certVersion?O.certVersion.charCodeAt(0):0;var M=n.util.createBuffer(O.certSerialNumber);j.serialNumber=M.toHex(),j.signatureOid=n.asn1.derToOid(O.certSignatureOid),j.signatureParameters=f(j.signatureOid,O.certSignatureParams,!0),j.siginfo.algorithmOid=n.asn1.derToOid(O.certinfoSignatureOid),j.siginfo.parameters=f(j.siginfo.algorithmOid,O.certinfoSignatureParams,!1),j.signature=O.certSignature;var z=[];if(O.certValidity1UTCTime!==void 0&&z.push(t.utcTimeToDate(O.certValidity1UTCTime)),O.certValidity2GeneralizedTime!==void 0&&z.push(t.generalizedTimeToDate(O.certValidity2GeneralizedTime)),O.certValidity3UTCTime!==void 0&&z.push(t.utcTimeToDate(O.certValidity3UTCTime)),O.certValidity4GeneralizedTime!==void 0&&z.push(t.generalizedTimeToDate(O.certValidity4GeneralizedTime)),z.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(z.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(j.validity.notBefore=z[0],j.validity.notAfter=z[1],j.tbsCertificate=O.tbsCertificate,A){j.md=s({signatureOid:j.signatureOid,type:"certificate"});var H=t.toDer(j.tbsCertificate);j.md.update(H.getBytes())}var X=n.md.sha1.create(),F=t.toDer(O.certIssuer);X.update(F.getBytes()),j.issuer.getField=function(oe){return p(j.issuer,oe)},j.issuer.addField=function(oe){b([oe]),j.issuer.attributes.push(oe)},j.issuer.attributes=c.RDNAttributesAsArray(O.certIssuer),O.certIssuerUniqueId&&(j.issuer.uniqueId=O.certIssuerUniqueId),j.issuer.hash=X.digest().toHex();var Z=n.md.sha1.create(),re=t.toDer(O.certSubject);return Z.update(re.getBytes()),j.subject.getField=function(oe){return p(j.subject,oe)},j.subject.addField=function(oe){b([oe]),j.subject.attributes.push(oe)},j.subject.attributes=c.RDNAttributesAsArray(O.certSubject),O.certSubjectUniqueId&&(j.subject.uniqueId=O.certSubjectUniqueId),j.subject.hash=Z.digest().toHex(),O.certExtensions?j.extensions=c.certificateExtensionsFromAsn1(O.certExtensions):j.extensions=[],j.publicKey=c.publicKeyFromAsn1(O.subjectPublicKeyInfo),j},c.certificateExtensionsFromAsn1=function(C){for(var A=[],O=0;O<C.value.length;++O)for(var E=C.value[O],P=0;P<E.value.length;++P)A.push(c.certificateExtensionFromAsn1(E.value[P]));return A},c.certificateExtensionFromAsn1=function(C){var A={};if(A.id=t.derToOid(C.value[0].value),A.critical=!1,C.value[1].type===t.Type.BOOLEAN?(A.critical=C.value[1].value.charCodeAt(0)!==0,A.value=C.value[2].value):A.value=C.value[1].value,A.id in l){if(A.name=l[A.id],A.name==="keyUsage"){var O=t.fromDer(A.value),E=0,P=0;O.value.length>1&&(E=O.value.charCodeAt(1),P=O.value.length>2?O.value.charCodeAt(2):0),A.digitalSignature=(E&128)===128,A.nonRepudiation=(E&64)===64,A.keyEncipherment=(E&32)===32,A.dataEncipherment=(E&16)===16,A.keyAgreement=(E&8)===8,A.keyCertSign=(E&4)===4,A.cRLSign=(E&2)===2,A.encipherOnly=(E&1)===1,A.decipherOnly=(P&128)===128}else if(A.name==="basicConstraints"){var O=t.fromDer(A.value);O.value.length>0&&O.value[0].type===t.Type.BOOLEAN?A.cA=O.value[0].value.charCodeAt(0)!==0:A.cA=!1;var N=null;O.value.length>0&&O.value[0].type===t.Type.INTEGER?N=O.value[0].value:O.value.length>1&&(N=O.value[1].value),N!==null&&(A.pathLenConstraint=t.derToInteger(N))}else if(A.name==="extKeyUsage")for(var O=t.fromDer(A.value),j=0;j<O.value.length;++j){var M=t.derToOid(O.value[j].value);M in l?A[l[M]]=!0:A[M]=!0}else if(A.name==="nsCertType"){var O=t.fromDer(A.value),E=0;O.value.length>1&&(E=O.value.charCodeAt(1)),A.client=(E&128)===128,A.server=(E&64)===64,A.email=(E&32)===32,A.objsign=(E&16)===16,A.reserved=(E&8)===8,A.sslCA=(E&4)===4,A.emailCA=(E&2)===2,A.objCA=(E&1)===1}else if(A.name==="subjectAltName"||A.name==="issuerAltName"){A.altNames=[];for(var z,O=t.fromDer(A.value),H=0;H<O.value.length;++H){z=O.value[H];var X={type:z.type,value:z.value};switch(A.altNames.push(X),z.type){case 1:case 2:case 6:break;case 7:X.ip=n.util.bytesToIP(z.value);break;case 8:X.oid=t.derToOid(z.value);break;default:}}}else if(A.name==="subjectKeyIdentifier"){var O=t.fromDer(A.value);A.subjectKeyIdentifier=n.util.bytesToHex(O.value)}}return A},c.certificationRequestFromAsn1=function(C,A){var O={},E=[];if(!t.validate(C,r,O,E)){var P=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw P.errors=E,P}var N=t.derToOid(O.publicKeyOid);if(N!==c.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var j=c.createCertificationRequest();if(j.version=O.csrVersion?O.csrVersion.charCodeAt(0):0,j.signatureOid=n.asn1.derToOid(O.csrSignatureOid),j.signatureParameters=f(j.signatureOid,O.csrSignatureParams,!0),j.siginfo.algorithmOid=n.asn1.derToOid(O.csrSignatureOid),j.siginfo.parameters=f(j.siginfo.algorithmOid,O.csrSignatureParams,!1),j.signature=O.csrSignature,j.certificationRequestInfo=O.certificationRequestInfo,A){j.md=s({signatureOid:j.signatureOid,type:"certification request"});var M=t.toDer(j.certificationRequestInfo);j.md.update(M.getBytes())}var z=n.md.sha1.create();return j.subject.getField=function(H){return p(j.subject,H)},j.subject.addField=function(H){b([H]),j.subject.attributes.push(H)},j.subject.attributes=c.RDNAttributesAsArray(O.certificationRequestInfoSubject,z),j.subject.hash=z.digest().toHex(),j.publicKey=c.publicKeyFromAsn1(O.subjectPublicKeyInfo),j.getAttribute=function(H){return p(j,H)},j.addAttribute=function(H){b([H]),j.attributes.push(H)},j.attributes=c.CRIAttributesAsArray(O.certificationRequestInfoAttributes||[]),j},c.createCertificationRequest=function(){var C={};return C.version=0,C.signatureOid=null,C.signature=null,C.siginfo={},C.siginfo.algorithmOid=null,C.subject={},C.subject.getField=function(A){return p(C.subject,A)},C.subject.addField=function(A){b([A]),C.subject.attributes.push(A)},C.subject.attributes=[],C.subject.hash=null,C.publicKey=null,C.attributes=[],C.getAttribute=function(A){return p(C,A)},C.addAttribute=function(A){b([A]),C.attributes.push(A)},C.md=null,C.setSubject=function(A){b(A),C.subject.attributes=A,C.subject.hash=null},C.setAttributes=function(A){b(A),C.attributes=A},C.sign=function(A,O){C.md=O||n.md.sha1.create();var E=l[C.md.algorithm+"WithRSAEncryption"];if(!E){var P=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw P.algorithm=C.md.algorithm,P}C.signatureOid=C.siginfo.algorithmOid=E,C.certificationRequestInfo=c.getCertificationRequestInfo(C);var N=t.toDer(C.certificationRequestInfo);C.md.update(N.getBytes()),C.signature=A.sign(C.md)},C.verify=function(){var A=!1,O=C.md;if(O===null){O=s({signatureOid:C.signatureOid,type:"certification request"});var E=C.certificationRequestInfo||c.getCertificationRequestInfo(C),P=t.toDer(E);O.update(P.getBytes())}return O!==null&&(A=g({certificate:C,md:O,signature:C.signature})),A},C};function h(C){for(var A=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),O,E,P=C.attributes,N=0;N<P.length;++N){O=P[N];var j=O.value,M=t.Type.PRINTABLESTRING;"valueTagClass"in O&&(M=O.valueTagClass,M===t.Type.UTF8&&(j=n.util.encodeUtf8(j))),E=t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(O.type).getBytes()),t.create(t.Class.UNIVERSAL,M,!1,j)])]),A.value.push(E)}return A}function v(C){for(var A={},O=0;O<C.length;++O){var E=C[O];if(E.shortName&&(E.valueTagClass===t.Type.UTF8||E.valueTagClass===t.Type.PRINTABLESTRING||E.valueTagClass===t.Type.IA5STRING)){var P=E.value;E.valueTagClass===t.Type.UTF8&&(P=n.util.encodeUtf8(E.value)),E.shortName in A?n.util.isArray(A[E.shortName])?A[E.shortName].push(P):A[E.shortName]=[A[E.shortName],P]:A[E.shortName]=P}}return A}function b(C){for(var A,O=0;O<C.length;++O){if(A=C[O],typeof A.name>"u"&&(A.type&&A.type in c.oids?A.name=c.oids[A.type]:A.shortName&&A.shortName in m&&(A.name=c.oids[m[A.shortName]])),typeof A.type>"u")if(A.name&&A.name in c.oids)A.type=c.oids[A.name];else{var E=new Error("Attribute type not specified.");throw E.attribute=A,E}if(typeof A.shortName>"u"&&A.name&&A.name in m&&(A.shortName=m[A.name]),A.type===l.extensionRequest&&(A.valueConstructed=!0,A.valueTagClass=t.Type.SEQUENCE,!A.value&&A.extensions)){A.value=[];for(var P=0;P<A.extensions.length;++P)A.value.push(c.certificateExtensionToAsn1(d(A.extensions[P])))}if(typeof A.value>"u"){var E=new Error("Attribute value not specified.");throw E.attribute=A,E}}}function d(C,A){if(A=A||{},typeof C.name>"u"&&C.id&&C.id in c.oids&&(C.name=c.oids[C.id]),typeof C.id>"u")if(C.name&&C.name in c.oids)C.id=c.oids[C.name];else{var O=new Error("Extension ID not specified.");throw O.extension=C,O}if(typeof C.value<"u")return C;if(C.name==="keyUsage"){var E=0,P=0,N=0;C.digitalSignature&&(P|=128,E=7),C.nonRepudiation&&(P|=64,E=6),C.keyEncipherment&&(P|=32,E=5),C.dataEncipherment&&(P|=16,E=4),C.keyAgreement&&(P|=8,E=3),C.keyCertSign&&(P|=4,E=2),C.cRLSign&&(P|=2,E=1),C.encipherOnly&&(P|=1,E=0),C.decipherOnly&&(N|=128,E=7);var j=String.fromCharCode(E);N!==0?j+=String.fromCharCode(P)+String.fromCharCode(N):P!==0&&(j+=String.fromCharCode(P)),C.value=t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,j)}else if(C.name==="basicConstraints")C.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),C.cA&&C.value.value.push(t.create(t.Class.UNIVERSAL,t.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in C&&C.value.value.push(t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(C.pathLenConstraint).getBytes()));else if(C.name==="extKeyUsage"){C.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);var M=C.value.value;for(var z in C)C[z]===!0&&(z in l?M.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(l[z]).getBytes())):z.indexOf(".")!==-1&&M.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(z).getBytes())))}else if(C.name==="nsCertType"){var E=0,P=0;C.client&&(P|=128,E=7),C.server&&(P|=64,E=6),C.email&&(P|=32,E=5),C.objsign&&(P|=16,E=4),C.reserved&&(P|=8,E=3),C.sslCA&&(P|=4,E=2),C.emailCA&&(P|=2,E=1),C.objCA&&(P|=1,E=0);var j=String.fromCharCode(E);P!==0&&(j+=String.fromCharCode(P)),C.value=t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,j)}else if(C.name==="subjectAltName"||C.name==="issuerAltName"){C.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);for(var H,X=0;X<C.altNames.length;++X){H=C.altNames[X];var j=H.value;if(H.type===7&&H.ip){if(j=n.util.bytesFromIP(H.ip),j===null){var O=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw O.extension=C,O}}else H.type===8&&(H.oid?j=t.oidToDer(t.oidToDer(H.oid)):j=t.oidToDer(j));C.value.value.push(t.create(t.Class.CONTEXT_SPECIFIC,H.type,!1,j))}}else if(C.name==="nsComment"&&A.cert){if(!/^[\x00-\x7F]*$/.test(C.comment)||C.comment.length<1||C.comment.length>128)throw new Error('Invalid "nsComment" content.');C.value=t.create(t.Class.UNIVERSAL,t.Type.IA5STRING,!1,C.comment)}else if(C.name==="subjectKeyIdentifier"&&A.cert){var F=A.cert.generateSubjectKeyIdentifier();C.subjectKeyIdentifier=F.toHex(),C.value=t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,F.getBytes())}else if(C.name==="authorityKeyIdentifier"&&A.cert){C.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);var M=C.value.value;if(C.keyIdentifier){var Z=C.keyIdentifier===!0?A.cert.generateSubjectKeyIdentifier().getBytes():C.keyIdentifier;M.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!1,Z))}if(C.authorityCertIssuer){var re=[t.create(t.Class.CONTEXT_SPECIFIC,4,!0,[h(C.authorityCertIssuer===!0?A.cert.issuer:C.authorityCertIssuer)])];M.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,re))}if(C.serialNumber){var oe=n.util.hexToBytes(C.serialNumber===!0?A.cert.serialNumber:C.serialNumber);M.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!1,oe))}}else if(C.name==="cRLDistributionPoints"){C.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);for(var M=C.value.value,he=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),de=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[]),H,X=0;X<C.altNames.length;++X){H=C.altNames[X];var j=H.value;if(H.type===7&&H.ip){if(j=n.util.bytesFromIP(H.ip),j===null){var O=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw O.extension=C,O}}else H.type===8&&(H.oid?j=t.oidToDer(t.oidToDer(H.oid)):j=t.oidToDer(j));de.value.push(t.create(t.Class.CONTEXT_SPECIFIC,H.type,!1,j))}he.value.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[de])),M.push(he)}if(typeof C.value>"u"){var O=new Error("Extension value not specified.");throw O.extension=C,O}return C}function w(C,A){if(C===l["RSASSA-PSS"]){var O=[];return A.hash.algorithmOid!==void 0&&O.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(A.hash.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])])),A.mgf.algorithmOid!==void 0&&O.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(A.mgf.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(A.mgf.hash.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])])])),A.saltLength!==void 0&&O.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(A.saltLength).getBytes())])),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,O)}else return t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")}function k(C){var A=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[]);if(C.attributes.length===0)return A;for(var O=C.attributes,E=0;E<O.length;++E){var P=O[E],N=P.value,j=t.Type.UTF8;"valueTagClass"in P&&(j=P.valueTagClass),j===t.Type.UTF8&&(N=n.util.encodeUtf8(N));var M=!1;"valueConstructed"in P&&(M=P.valueConstructed);var z=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(P.type).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,j,M,N)])]);A.value.push(z)}return A}var R=new Date("1950-01-01T00:00:00Z"),T=new Date("2050-01-01T00:00:00Z");function I(C){return C>=R&&C<T?t.create(t.Class.UNIVERSAL,t.Type.UTCTIME,!1,t.dateToUtcTime(C)):t.create(t.Class.UNIVERSAL,t.Type.GENERALIZEDTIME,!1,t.dateToGeneralizedTime(C))}c.getTBSCertificate=function(C){var A=I(C.validity.notBefore),O=I(C.validity.notAfter),E=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(C.version).getBytes())]),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,n.util.hexToBytes(C.serialNumber)),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(C.siginfo.algorithmOid).getBytes()),w(C.siginfo.algorithmOid,C.siginfo.parameters)]),h(C.issuer),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[A,O]),h(C.subject),c.publicKeyToAsn1(C.publicKey)]);return C.issuer.uniqueId&&E.value.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+C.issuer.uniqueId)])),C.subject.uniqueId&&E.value.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!0,[t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+C.subject.uniqueId)])),C.extensions.length>0&&E.value.push(c.certificateExtensionsToAsn1(C.extensions)),E},c.getCertificationRequestInfo=function(C){var A=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(C.version).getBytes()),h(C.subject),c.publicKeyToAsn1(C.publicKey),k(C)]);return A},c.distinguishedNameToAsn1=function(C){return h(C)},c.certificateToAsn1=function(C){var A=C.tbsCertificate||c.getTBSCertificate(C);return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[A,t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(C.signatureOid).getBytes()),w(C.signatureOid,C.signatureParameters)]),t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+C.signature)])},c.certificateExtensionsToAsn1=function(C){var A=t.create(t.Class.CONTEXT_SPECIFIC,3,!0,[]),O=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);A.value.push(O);for(var E=0;E<C.length;++E)O.value.push(c.certificateExtensionToAsn1(C[E]));return A},c.certificateExtensionToAsn1=function(C){var A=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);A.value.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(C.id).getBytes())),C.critical&&A.value.push(t.create(t.Class.UNIVERSAL,t.Type.BOOLEAN,!1,"\xFF"));var O=C.value;return typeof C.value!="string"&&(O=t.toDer(O).getBytes()),A.value.push(t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,O)),A},c.certificationRequestToAsn1=function(C){var A=C.certificationRequestInfo||c.getCertificationRequestInfo(C);return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[A,t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(C.signatureOid).getBytes()),w(C.signatureOid,C.signatureParameters)]),t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+C.signature)])},c.createCaStore=function(C){var A={certs:{}};A.getIssuer=function(j){var M=O(j.issuer);return M},A.addCertificate=function(j){if(typeof j=="string"&&(j=n.pki.certificateFromPem(j)),E(j.subject),!A.hasCertificate(j))if(j.subject.hash in A.certs){var M=A.certs[j.subject.hash];n.util.isArray(M)||(M=[M]),M.push(j),A.certs[j.subject.hash]=M}else A.certs[j.subject.hash]=j},A.hasCertificate=function(j){typeof j=="string"&&(j=n.pki.certificateFromPem(j));var M=O(j.subject);if(!M)return!1;n.util.isArray(M)||(M=[M]);for(var z=t.toDer(c.certificateToAsn1(j)).getBytes(),H=0;H<M.length;++H){var X=t.toDer(c.certificateToAsn1(M[H])).getBytes();if(z===X)return!0}return!1},A.listAllCertificates=function(){var j=[];for(var M in A.certs)if(A.certs.hasOwnProperty(M)){var z=A.certs[M];if(!n.util.isArray(z))j.push(z);else for(var H=0;H<z.length;++H)j.push(z[H])}return j},A.removeCertificate=function(j){var M;if(typeof j=="string"&&(j=n.pki.certificateFromPem(j)),E(j.subject),!A.hasCertificate(j))return null;var z=O(j.subject);if(!n.util.isArray(z))return M=A.certs[j.subject.hash],delete A.certs[j.subject.hash],M;for(var H=t.toDer(c.certificateToAsn1(j)).getBytes(),X=0;X<z.length;++X){var F=t.toDer(c.certificateToAsn1(z[X])).getBytes();H===F&&(M=z[X],z.splice(X,1))}return z.length===0&&delete A.certs[j.subject.hash],M};function O(j){return E(j),A.certs[j.hash]||null}function E(j){if(!j.hash){var M=n.md.sha1.create();j.attributes=c.RDNAttributesAsArray(h(j),M),j.hash=M.digest().toHex()}}if(C)for(var P=0;P<C.length;++P){var N=C[P];A.addCertificate(N)}return A},c.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},c.verifyCertificateChain=function(C,A,O){typeof O=="function"&&(O={verify:O}),O=O||{},A=A.slice(0);var E=A.slice(0),P=O.validityCheckDate;typeof P>"u"&&(P=new Date);var N=!0,j=null,M=0;do{var z=A.shift(),H=null,X=!1;if(P&&(P<z.validity.notBefore||P>z.validity.notAfter)&&(j={message:"Certificate is not valid yet or has expired.",error:c.certificateError.certificate_expired,notBefore:z.validity.notBefore,notAfter:z.validity.notAfter,now:P}),j===null){if(H=A[0]||C.getIssuer(z),H===null&&z.isIssuer(z)&&(X=!0,H=z),H){var F=H;n.util.isArray(F)||(F=[F]);for(var Z=!1;!Z&&F.length>0;){H=F.shift();try{Z=H.verify(z)}catch{}}Z||(j={message:"Certificate signature is invalid.",error:c.certificateError.bad_certificate})}j===null&&(!H||X)&&!C.hasCertificate(z)&&(j={message:"Certificate is not trusted.",error:c.certificateError.unknown_ca})}if(j===null&&H&&!z.isIssuer(H)&&(j={message:"Certificate issuer is invalid.",error:c.certificateError.bad_certificate}),j===null)for(var re={keyUsage:!0,basicConstraints:!0},oe=0;j===null&&oe<z.extensions.length;++oe){var he=z.extensions[oe];he.critical&&!(he.name in re)&&(j={message:"Certificate has an unsupported critical extension.",error:c.certificateError.unsupported_certificate})}if(j===null&&(!N||A.length===0&&(!H||X))){var de=z.getExtension("basicConstraints"),fe=z.getExtension("keyUsage");if(fe!==null&&(!fe.keyCertSign||de===null)&&(j={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:c.certificateError.bad_certificate}),j===null&&de===null&&(j={message:"Certificate is missing basicConstraints extension and cannot be used as a CA.",error:c.certificateError.bad_certificate}),j===null&&de!==null&&!de.cA&&(j={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:c.certificateError.bad_certificate}),j===null&&fe!==null&&"pathLenConstraint"in de){var ne=M-1;ne>de.pathLenConstraint&&(j={message:"Certificate basicConstraints pathLenConstraint violated.",error:c.certificateError.bad_certificate})}}var te=j===null?!0:j.error,Y=O.verify?O.verify(te,M,E):te;if(Y===!0)j=null;else throw te===!0&&(j={message:"The application rejected the certificate.",error:c.certificateError.bad_certificate}),(Y||Y===0)&&(typeof Y=="object"&&!n.util.isArray(Y)?(Y.message&&(j.message=Y.message),Y.error&&(j.error=Y.error)):typeof Y=="string"&&(j.error=Y)),j;N=!1,++M}while(A.length>0);return!0}},4615:S=>{/*
|
|
252
252
|
object-assign
|
|
253
253
|
(c) Sindre Sorhus
|
|
254
254
|
@license MIT
|
|
255
|
-
*/var _=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function t(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function c(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var m={},o=0;o<10;o++)m["_"+String.fromCharCode(o)]=o;var i=Object.getOwnPropertyNames(m).map((function(e){return m[e]}));if(i.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}S.exports=c()?Object.assign:function(l,m){for(var o,i=t(l),a,e=1;e<arguments.length;e++){o=Object(arguments[e]);for(var r in o)u.call(o,r)&&(i[r]=o[r]);if(_){a=_(o);for(var p=0;p<a.length;p++)n.call(o,a[p])&&(i[a[p]]=o[a[p]])}}return i}},506:(S,_,u)=>{var n=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,c=n&&t&&typeof t.get=="function"?t.get:null,l=n&&Map.prototype.forEach,m=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&m?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=m&&o&&typeof o.get=="function"?o.get:null,a=m&&Set.prototype.forEach,e=typeof WeakMap=="function"&&WeakMap.prototype,r=e?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype,f=p?WeakSet.prototype.has:null,s=typeof WeakRef=="function"&&WeakRef.prototype,g=s?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,v=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,w=String.prototype.slice,k=String.prototype.replace,R=String.prototype.toUpperCase,T=String.prototype.toLowerCase,I=RegExp.prototype.test,C=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,E=Math.floor,P=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,M=typeof Symbol=="function"&&typeof Symbol.iterator=="object",z=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||!0)?Symbol.toStringTag:null,H=Object.prototype.propertyIsEnumerable,X=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ce){return ce.__proto__}:null);function F(ce,le){if(ce===1/0||ce===-1/0||ce!==ce||ce&&ce>-1e3&&ce<1e3||I.call(/e/,le))return le;var ke=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ce=="number"){var Be=ce<0?-E(-ce):E(ce);if(Be!==ce){var Re=String(Be),Se=w.call(le,Re.length+1);return k.call(Re,ke,"$&_")+"."+k.call(k.call(Se,/([0-9]{3})/g,"$&_"),/_$/,"")}}return k.call(le,ke,"$&_")}var Z=u(8502),re=Z.custom,oe=U(re)?re:null,he={__proto__:null,double:'"',single:"'"},de={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};S.exports=function ce(le,ke,Be,Re){var Se=ke||{};if(q(Se,"quoteStyle")&&!q(he,Se.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(Se,"maxStringLength")&&(typeof Se.maxStringLength=="number"?Se.maxStringLength<0&&Se.maxStringLength!==1/0:Se.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var et=q(Se,"customInspect")?Se.customInspect:!0;if(typeof et!="boolean"&&et!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(Se,"indent")&&Se.indent!==null&&Se.indent!==" "&&!(parseInt(Se.indent,10)===Se.indent&&Se.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(Se,"numericSeparator")&&typeof Se.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var it=Se.numericSeparator;if(typeof le>"u")return"undefined";if(le===null)return"null";if(typeof le=="boolean")return le?"true":"false";if(typeof le=="string")return Ee(le,Se);if(typeof le=="number"){if(le===0)return 1/0/le>0?"0":"-0";var tt=String(le);return it?F(le,tt):tt}if(typeof le=="bigint"){var nt=String(le)+"n";return it?F(le,nt):nt}var He=typeof Se.depth>"u"?5:Se.depth;if(typeof Be>"u"&&(Be=0),Be>=He&&He>0&&typeof le=="object")return Y(le)?"[Array]":"[Object]";var Me=Pe(Se,Be);if(typeof Re>"u")Re=[];else if(ue(Re,le)>=0)return"[Circular]";function Le(pt,ht,ft){if(ht&&(Re=O.call(Re),Re.push(ht)),ft){var vt={depth:Se.depth};return q(Se,"quoteStyle")&&(vt.quoteStyle=Se.quoteStyle),ce(pt,vt,Be+1,Re)}return ce(pt,Se,Be+1,Re)}if(typeof le=="function"&&!ie(le)){var Ye=pe(le),Qe=Ue(le,Le);return"[Function"+(Ye?": "+Ye:" (anonymous)")+"]"+(Qe.length>0?" { "+A.call(Qe,", ")+" }":"")}if(U(le)){var Xe=M?k.call(String(le),/^(Symbol\(.*\))_[^)]*$/,"$1"):j.call(le);return typeof le=="object"&&!M?Ae(Xe):Xe}if(Oe(le)){for(var qe="<"+T.call(String(le.nodeName)),Ke=le.attributes||[],Ve=0;Ve<Ke.length;Ve++)qe+=" "+Ke[Ve].name+"="+fe(ne(Ke[Ve].value),"double",Se);return qe+=">",le.childNodes&&le.childNodes.length&&(qe+="..."),qe+="</"+T.call(String(le.nodeName))+">",qe}if(Y(le)){if(le.length===0)return"[]";var We=Ue(le,Le);return Me&&!Ce(We)?"["+je(We,Me)+"]":"[ "+A.call(We,", ")+" ]"}if($(le)){var Ge=Ue(le,Le);return!("cause"in Error.prototype)&&"cause"in le&&!H.call(le,"cause")?"{ ["+String(le)+"] "+A.call(C.call("[cause]: "+Le(le.cause),Ge),", ")+" }":Ge.length===0?"["+String(le)+"]":"{ ["+String(le)+"] "+A.call(Ge,", ")+" }"}if(typeof le=="object"&&et){if(oe&&typeof le[oe]=="function"&&Z)return Z(le,{depth:He-Be});if(et!=="symbol"&&typeof le.inspect=="function")return le.inspect()}if(ae(le)){var Je=[];return l&&l.call(le,(function(pt,ht){Je.push(Le(ht,le,!0)+" => "+Le(pt,le))})),Ie("Map",c.call(le),Je,Me)}if(ye(le)){var Ze=[];return a&&a.call(le,(function(pt){Ze.push(Le(pt,le))})),Ie("Set",i.call(le),Ze,Me)}if(me(le))return Ne("WeakMap");if(
|
|
255
|
+
*/var _=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function t(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function c(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var m={},o=0;o<10;o++)m["_"+String.fromCharCode(o)]=o;var i=Object.getOwnPropertyNames(m).map((function(e){return m[e]}));if(i.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}S.exports=c()?Object.assign:function(l,m){for(var o,i=t(l),a,e=1;e<arguments.length;e++){o=Object(arguments[e]);for(var r in o)u.call(o,r)&&(i[r]=o[r]);if(_){a=_(o);for(var p=0;p<a.length;p++)n.call(o,a[p])&&(i[a[p]]=o[a[p]])}}return i}},506:(S,_,u)=>{var n=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,c=n&&t&&typeof t.get=="function"?t.get:null,l=n&&Map.prototype.forEach,m=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&m?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=m&&o&&typeof o.get=="function"?o.get:null,a=m&&Set.prototype.forEach,e=typeof WeakMap=="function"&&WeakMap.prototype,r=e?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype,f=p?WeakSet.prototype.has:null,s=typeof WeakRef=="function"&&WeakRef.prototype,g=s?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,v=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,w=String.prototype.slice,k=String.prototype.replace,R=String.prototype.toUpperCase,T=String.prototype.toLowerCase,I=RegExp.prototype.test,C=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,E=Math.floor,P=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,M=typeof Symbol=="function"&&typeof Symbol.iterator=="object",z=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||!0)?Symbol.toStringTag:null,H=Object.prototype.propertyIsEnumerable,X=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ce){return ce.__proto__}:null);function F(ce,le){if(ce===1/0||ce===-1/0||ce!==ce||ce&&ce>-1e3&&ce<1e3||I.call(/e/,le))return le;var ke=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ce=="number"){var Be=ce<0?-E(-ce):E(ce);if(Be!==ce){var Re=String(Be),Se=w.call(le,Re.length+1);return k.call(Re,ke,"$&_")+"."+k.call(k.call(Se,/([0-9]{3})/g,"$&_"),/_$/,"")}}return k.call(le,ke,"$&_")}var Z=u(8502),re=Z.custom,oe=U(re)?re:null,he={__proto__:null,double:'"',single:"'"},de={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};S.exports=function ce(le,ke,Be,Re){var Se=ke||{};if(q(Se,"quoteStyle")&&!q(he,Se.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(Se,"maxStringLength")&&(typeof Se.maxStringLength=="number"?Se.maxStringLength<0&&Se.maxStringLength!==1/0:Se.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var et=q(Se,"customInspect")?Se.customInspect:!0;if(typeof et!="boolean"&&et!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(Se,"indent")&&Se.indent!==null&&Se.indent!==" "&&!(parseInt(Se.indent,10)===Se.indent&&Se.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(Se,"numericSeparator")&&typeof Se.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var it=Se.numericSeparator;if(typeof le>"u")return"undefined";if(le===null)return"null";if(typeof le=="boolean")return le?"true":"false";if(typeof le=="string")return Ee(le,Se);if(typeof le=="number"){if(le===0)return 1/0/le>0?"0":"-0";var tt=String(le);return it?F(le,tt):tt}if(typeof le=="bigint"){var nt=String(le)+"n";return it?F(le,nt):nt}var He=typeof Se.depth>"u"?5:Se.depth;if(typeof Be>"u"&&(Be=0),Be>=He&&He>0&&typeof le=="object")return Y(le)?"[Array]":"[Object]";var Me=Pe(Se,Be);if(typeof Re>"u")Re=[];else if(ue(Re,le)>=0)return"[Circular]";function Le(pt,ht,ft){if(ht&&(Re=O.call(Re),Re.push(ht)),ft){var vt={depth:Se.depth};return q(Se,"quoteStyle")&&(vt.quoteStyle=Se.quoteStyle),ce(pt,vt,Be+1,Re)}return ce(pt,Se,Be+1,Re)}if(typeof le=="function"&&!ie(le)){var Ye=pe(le),Qe=Ue(le,Le);return"[Function"+(Ye?": "+Ye:" (anonymous)")+"]"+(Qe.length>0?" { "+A.call(Qe,", ")+" }":"")}if(U(le)){var Xe=M?k.call(String(le),/^(Symbol\(.*\))_[^)]*$/,"$1"):j.call(le);return typeof le=="object"&&!M?Ae(Xe):Xe}if(Oe(le)){for(var qe="<"+T.call(String(le.nodeName)),Ke=le.attributes||[],Ve=0;Ve<Ke.length;Ve++)qe+=" "+Ke[Ve].name+"="+fe(ne(Ke[Ve].value),"double",Se);return qe+=">",le.childNodes&&le.childNodes.length&&(qe+="..."),qe+="</"+T.call(String(le.nodeName))+">",qe}if(Y(le)){if(le.length===0)return"[]";var We=Ue(le,Le);return Me&&!Ce(We)?"["+je(We,Me)+"]":"[ "+A.call(We,", ")+" ]"}if($(le)){var Ge=Ue(le,Le);return!("cause"in Error.prototype)&&"cause"in le&&!H.call(le,"cause")?"{ ["+String(le)+"] "+A.call(C.call("[cause]: "+Le(le.cause),Ge),", ")+" }":Ge.length===0?"["+String(le)+"]":"{ ["+String(le)+"] "+A.call(Ge,", ")+" }"}if(typeof le=="object"&&et){if(oe&&typeof le[oe]=="function"&&Z)return Z(le,{depth:He-Be});if(et!=="symbol"&&typeof le.inspect=="function")return le.inspect()}if(ae(le)){var Je=[];return l&&l.call(le,(function(pt,ht){Je.push(Le(ht,le,!0)+" => "+Le(pt,le))})),Ie("Map",c.call(le),Je,Me)}if(ye(le)){var Ze=[];return a&&a.call(le,(function(pt){Ze.push(Le(pt,le))})),Ie("Set",i.call(le),Ze,Me)}if(me(le))return Ne("WeakMap");if(xe(le))return Ne("WeakSet");if(be(le))return Ne("WeakRef");if(D(le))return Ae(Le(Number(le)));if(G(le))return Ae(Le(P.call(le)));if(B(le))return Ae(h.call(le));if(L(le))return Ae(Le(String(le)));if(typeof window<"u"&&le===window)return"{ [object Window] }";if(typeof globalThis<"u"&&le===globalThis||typeof global<"u"&&le===global)return"{ [object globalThis] }";if(!W(le)&&!ie(le)){var $e=Ue(le,Le),Fe=X?X(le)===Object.prototype:le instanceof Object||le.constructor===Object,ze=le instanceof Object?"":"null prototype",gt=!Fe&&z&&Object(le)===le&&z in le?w.call(J(le),8,-1):ze?"Object":"",_t=Fe||typeof le.constructor!="function"?"":le.constructor.name?le.constructor.name+" ":"",mt=_t+(gt||ze?"["+A.call(C.call([],gt||[],ze||[]),": ")+"] ":"");return $e.length===0?mt+"{}":Me?mt+"{"+je($e,Me)+"}":mt+"{ "+A.call($e,", ")+" }"}return String(le)};function fe(ce,le,ke){var Be=ke.quoteStyle||le,Re=he[Be];return Re+ce+Re}function ne(ce){return k.call(String(ce),/"/g,""")}function te(ce){return!z||!(typeof ce=="object"&&(z in ce||typeof ce[z]<"u"))}function Y(ce){return J(ce)==="[object Array]"&&te(ce)}function W(ce){return J(ce)==="[object Date]"&&te(ce)}function ie(ce){return J(ce)==="[object RegExp]"&&te(ce)}function $(ce){return J(ce)==="[object Error]"&&te(ce)}function L(ce){return J(ce)==="[object String]"&&te(ce)}function D(ce){return J(ce)==="[object Number]"&&te(ce)}function B(ce){return J(ce)==="[object Boolean]"&&te(ce)}function U(ce){if(M)return ce&&typeof ce=="object"&&ce instanceof Symbol;if(typeof ce=="symbol")return!0;if(!ce||typeof ce!="object"||!j)return!1;try{return j.call(ce),!0}catch{}return!1}function G(ce){if(!ce||typeof ce!="object"||!P)return!1;try{return P.call(ce),!0}catch{}return!1}var ee=Object.prototype.hasOwnProperty||function(ce){return ce in this};function q(ce,le){return ee.call(ce,le)}function J(ce){return v.call(ce)}function pe(ce){if(ce.name)return ce.name;var le=d.call(b.call(ce),/^function\s*([\w$]+)/);return le?le[1]:null}function ue(ce,le){if(ce.indexOf)return ce.indexOf(le);for(var ke=0,Be=ce.length;ke<Be;ke++)if(ce[ke]===le)return ke;return-1}function ae(ce){if(!c||!ce||typeof ce!="object")return!1;try{c.call(ce);try{i.call(ce)}catch{return!0}return ce instanceof Map}catch{}return!1}function me(ce){if(!r||!ce||typeof ce!="object")return!1;try{r.call(ce,r);try{f.call(ce,f)}catch{return!0}return ce instanceof WeakMap}catch{}return!1}function be(ce){if(!g||!ce||typeof ce!="object")return!1;try{return g.call(ce),!0}catch{}return!1}function ye(ce){if(!i||!ce||typeof ce!="object")return!1;try{i.call(ce);try{c.call(ce)}catch{return!0}return ce instanceof Set}catch{}return!1}function xe(ce){if(!f||!ce||typeof ce!="object")return!1;try{f.call(ce,f);try{r.call(ce,r)}catch{return!0}return ce instanceof WeakSet}catch{}return!1}function Oe(ce){return!ce||typeof ce!="object"?!1:typeof HTMLElement<"u"&&ce instanceof HTMLElement?!0:typeof ce.nodeName=="string"&&typeof ce.getAttribute=="function"}function Ee(ce,le){if(ce.length>le.maxStringLength){var ke=ce.length-le.maxStringLength,Be="... "+ke+" more character"+(ke>1?"s":"");return Ee(w.call(ce,0,le.maxStringLength),le)+Be}var Re=de[le.quoteStyle||"single"];Re.lastIndex=0;var Se=k.call(k.call(ce,Re,"\\$1"),/[\x00-\x1f]/g,Te);return fe(Se,"single",le)}function Te(ce){var le=ce.charCodeAt(0),ke={8:"b",9:"t",10:"n",12:"f",13:"r"}[le];return ke?"\\"+ke:"\\x"+(le<16?"0":"")+R.call(le.toString(16))}function Ae(ce){return"Object("+ce+")"}function Ne(ce){return ce+" { ? }"}function Ie(ce,le,ke,Be){var Re=Be?je(ke,Be):A.call(ke,", ");return ce+" ("+le+") {"+Re+"}"}function Ce(ce){for(var le=0;le<ce.length;le++)if(ue(ce[le],`
|
|
256
256
|
`)>=0)return!1;return!0}function Pe(ce,le){var ke;if(ce.indent===" ")ke=" ";else if(typeof ce.indent=="number"&&ce.indent>0)ke=A.call(Array(ce.indent+1)," ");else return null;return{base:ke,prev:A.call(Array(le+1),ke)}}function je(ce,le){if(ce.length===0)return"";var ke=`
|
|
257
257
|
`+le.prev+le.base;return ke+A.call(ce,","+ke)+`
|
|
258
258
|
`+le.prev}function Ue(ce,le){var ke=Y(ce),Be=[];if(ke){Be.length=ce.length;for(var Re=0;Re<ce.length;Re++)Be[Re]=q(ce,Re)?le(ce[Re],ce):""}var Se=typeof N=="function"?N(ce):[],et;if(M){et={};for(var it=0;it<Se.length;it++)et["$"+Se[it]]=Se[it]}for(var tt in ce)q(ce,tt)&&(ke&&String(Number(tt))===tt&&tt<ce.length||M&&et["$"+tt]instanceof Symbol||(I.call(/[^\w$]/,tt)?Be.push(le(tt,ce)+": "+le(ce[tt],ce)):Be.push(tt+": "+le(ce[tt],ce))));if(typeof N=="function")for(var nt=0;nt<Se.length;nt++)H.call(ce,Se[nt])&&Be.push("["+le(Se[nt])+"]: "+le(ce[Se[nt]],ce));return Be}},8502:(S,_,u)=>{S.exports=u(9023).inspect},5698:(S,_,u)=>{/*!
|
|
@@ -292,7 +292,7 @@ Minimum version required to store current data is: `+P+`.
|
|
|
292
292
|
* Copyright(c) 2013-2014 Jonathan Ong
|
|
293
293
|
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|
294
294
|
* MIT Licensed
|
|
295
|
-
*/var n=p(),t=u(4531),c=u(8024),l=u(1748),m=u(6367);S.exports=a;var o=/^Encoding not recognized: /;function i(s){if(!s)return null;try{return l.getDecoder(s)}catch(g){throw o.test(g.message)?c(415,"specified encoding unsupported",{encoding:s,type:"encoding.unsupported"}):g}}function a(s,g,h){var v=h,b=g||{};if(s===void 0)throw new TypeError("argument stream is required");if(typeof s!="object"||s===null||typeof s.on!="function")throw new TypeError("argument stream must be a stream");if((g===!0||typeof g=="string")&&(b={encoding:g}),typeof g=="function"&&(v=g,b={}),v!==void 0&&typeof v!="function")throw new TypeError("argument callback must be a function");if(!v&&!global.Promise)throw new TypeError("argument callback is required");var d=b.encoding!==!0?b.encoding:"utf-8",w=t.parse(b.limit),k=b.length!=null&&!isNaN(b.length)?parseInt(b.length,10):null;return v?r(s,d,k,w,f(v)):new Promise((function(T,I){r(s,d,k,w,(function(A,O){if(A)return I(A);T(O)}))}))}function e(s){m(s),typeof s.pause=="function"&&s.pause()}function r(s,g,h,v,b){var d=!1,w=!0;if(v!==null&&h!==null&&h>v)return C(c(413,"request entity too large",{expected:h,length:h,limit:v,type:"entity.too.large"}));var k=s._readableState;if(s._decoder||k&&(k.encoding||k.decoder))return C(c(500,"stream encoding should not be set",{type:"stream.encoding.set"}));if(typeof s.readable<"u"&&!s.readable)return C(c(500,"stream is not readable",{type:"stream.not.readable"}));var R=0,T;try{T=i(g)}catch(N){return C(N)}var I=T?"":[];s.on("aborted",A),s.on("close",P),s.on("data",O),s.on("end",E),s.on("error",E),w=!1;function C(){for(var N=new Array(arguments.length),j=0;j<N.length;j++)N[j]=arguments[j];d=!0,w?process.nextTick(M):M();function M(){P(),N[0]&&e(s),b.apply(null,N)}}function A(){d||C(c(400,"request aborted",{code:"ECONNABORTED",expected:h,length:h,received:R,type:"request.aborted"}))}function O(N){d||(R+=N.length,v!==null&&R>v?C(c(413,"request entity too large",{limit:v,received:R,type:"entity.too.large"})):T?I+=T.write(N):I.push(N))}function E(N){if(!d){if(N)return C(N);if(h!==null&&R!==h)C(c(400,"request size did not match content length",{expected:h,length:h,received:R,type:"request.size.invalid"}));else{var j=T?I+(T.end()||""):Buffer.concat(I);C(null,j)}}}function P(){I=null,s.removeListener("aborted",A),s.removeListener("data",O),s.removeListener("end",E),s.removeListener("error",E),s.removeListener("close",P)}}function p(){try{return u(290)}catch{return{}}}function f(s){var g;return n.AsyncResource&&(g=new n.AsyncResource(s.name||"bound-anonymous-fn")),!g||!g.runInAsyncScope?s:g.runInAsyncScope.bind(g,s,null)}},5500:S=>{const _={};function u(m,o,i){i||(i=Error);function a(r,p,f){return typeof o=="string"?o:o(r,p,f)}class e extends i{constructor(p,f,s){super(a(p,f,s))}}e.prototype.name=i.name,e.prototype.code=m,_[m]=e}function n(m,o){if(Array.isArray(m)){const i=m.length;return m=m.map((a=>String(a))),i>2?`one of ${o} ${m.slice(0,i-1).join(", ")}, or `+m[i-1]:i===2?`one of ${o} ${m[0]} or ${m[1]}`:`of ${o} ${m[0]}`}else return`of ${o} ${String(m)}`}function t(m,o,i){return m.substr(!i||i<0?0:+i,o.length)===o}function c(m,o,i){return(i===void 0||i>m.length)&&(i=m.length),m.substring(i-o.length,i)===o}function l(m,o,i){return typeof i!="number"&&(i=0),i+o.length>m.length?!1:m.indexOf(o,i)!==-1}u("ERR_INVALID_OPT_VALUE",(function(m,o){return'The value "'+o+'" is invalid for option "'+m+'"'}),TypeError),u("ERR_INVALID_ARG_TYPE",(function(m,o,i){let a;typeof o=="string"&&t(o,"not ")?(a="must not be",o=o.replace(/^not /,"")):a="must be";let e;if(c(m," argument"))e=`The ${m} ${a} ${n(o,"type")}`;else{const r=l(m,".")?"property":"argument";e=`The "${m}" ${r} ${a} ${n(o,"type")}`}return e+=`. Received type ${typeof i}`,e}),TypeError),u("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),u("ERR_METHOD_NOT_IMPLEMENTED",(function(m){return"The "+m+" method is not implemented"})),u("ERR_STREAM_PREMATURE_CLOSE","Premature close"),u("ERR_STREAM_DESTROYED",(function(m){return"Cannot call "+m+" after a stream was destroyed"})),u("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),u("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),u("ERR_STREAM_WRITE_AFTER_END","write after end"),u("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),u("ERR_UNKNOWN_ENCODING",(function(m){return"Unknown encoding: "+m}),TypeError),u("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),S.exports.F=_},2063:(S,_,u)=>{var n=Object.keys||function(r){var p=[];for(var f in r)p.push(f);return p};S.exports=i;var t=u(6893),c=u(8797);u(9598)(i,t);for(var l=n(c.prototype),m=0;m<l.length;m++){var o=l[m];i.prototype[o]||(i.prototype[o]=c.prototype[o])}function i(r){if(!(this instanceof i))return new i(r);t.call(this,r),c.call(this,r),this.allowHalfOpen=!0,r&&(r.readable===!1&&(this.readable=!1),r.writable===!1&&(this.writable=!1),r.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(i.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(i.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(e,this)}function e(r){r.end()}Object.defineProperty(i.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(p){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=p,this._writableState.destroyed=p)}})},5283:(S,_,u)=>{S.exports=t;var n=u(2337);u(9598)(t,n);function t(c){if(!(this instanceof t))return new t(c);n.call(this,c)}t.prototype._transform=function(c,l,m){m(null,c)}},6893:(S,_,u)=>{S.exports=E;var n;E.ReadableState=O;var t=u(4434).EventEmitter,c=function(B,U){return B.listeners(U).length},l=u(3283),m=u(181).Buffer,o=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(D){return m.from(D)}function a(D){return m.isBuffer(D)||D instanceof o}var e=u(9023),r;e&&e.debuglog?r=e.debuglog("stream"):r=function(){};var p=u(7336),f=u(5089),s=u(4874),g=s.getHighWaterMark,h=u(5500).F,v=h.ERR_INVALID_ARG_TYPE,b=h.ERR_STREAM_PUSH_AFTER_EOF,d=h.ERR_METHOD_NOT_IMPLEMENTED,w=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,R,T;u(9598)(E,l);var I=f.errorOrDestroy,C=["error","close","destroy","pause","resume"];function A(D,B,U){if(typeof D.prependListener=="function")return D.prependListener(B,U);!D._events||!D._events[B]?D.on(B,U):Array.isArray(D._events[B])?D._events[B].unshift(U):D._events[B]=[U,D._events[B]]}function O(D,B,U){n=n||u(2063),D=D||{},typeof U!="boolean"&&(U=B instanceof n),this.objectMode=!!D.objectMode,U&&(this.objectMode=this.objectMode||!!D.readableObjectMode),this.highWaterMark=g(this,D,"readableHighWaterMark",U),this.buffer=new p,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=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding&&(k||(k=u(634).I),this.decoder=new k(D.encoding),this.encoding=D.encoding)}function E(D){if(n=n||u(2063),!(this instanceof E))return new E(D);var B=this instanceof n;this._readableState=new O(D,this,B),this.readable=!0,D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy)),l.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(B){this._readableState&&(this._readableState.destroyed=B)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(D,B){B(D)},E.prototype.push=function(D,B){var U=this._readableState,G;return U.objectMode?G=!0:typeof D=="string"&&(B=B||U.defaultEncoding,B!==U.encoding&&(D=m.from(D,B),B=""),G=!0),P(this,D,B,!1,G)},E.prototype.unshift=function(D){return P(this,D,null,!0,!1)};function P(D,B,U,G,ee){r("readableAddChunk",B);var q=D._readableState;if(B===null)q.reading=!1,X(D,q);else{var J;if(ee||(J=j(q,B)),J)I(D,J);else if(q.objectMode||B&&B.length>0)if(typeof B!="string"&&!q.objectMode&&Object.getPrototypeOf(B)!==m.prototype&&(B=i(B)),G)q.endEmitted?I(D,new w):N(D,q,B,!0);else if(q.ended)I(D,new b);else{if(q.destroyed)return!1;q.reading=!1,q.decoder&&!U?(B=q.decoder.write(B),q.objectMode||B.length!==0?N(D,q,B,!1):re(D,q)):N(D,q,B,!1)}else G||(q.reading=!1,re(D,q))}return!q.ended&&(q.length<q.highWaterMark||q.length===0)}function N(D,B,U,G){B.flowing&&B.length===0&&!B.sync?(B.awaitDrain=0,D.emit("data",U)):(B.length+=B.objectMode?1:U.length,G?B.buffer.unshift(U):B.buffer.push(U),B.needReadable&&F(D)),re(D,B)}function j(D,B){var U;return!a(B)&&typeof B!="string"&&B!==void 0&&!D.objectMode&&(U=new v("chunk",["string","Buffer","Uint8Array"],B)),U}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(D){k||(k=u(634).I);var B=new k(D);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;for(var U=this._readableState.buffer.head,G="";U!==null;)G+=B.write(U.data),U=U.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var M=1073741824;function z(D){return D>=M?D=M:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function H(D,B){return D<=0||B.length===0&&B.ended?0:B.objectMode?1:D!==D?B.flowing&&B.length?B.buffer.head.data.length:B.length:(D>B.highWaterMark&&(B.highWaterMark=z(D)),D<=B.length?D:B.ended?B.length:(B.needReadable=!0,0))}E.prototype.read=function(D){r("read",D),D=parseInt(D,10);var B=this._readableState,U=D;if(D!==0&&(B.emittedReadable=!1),D===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return r("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?ie(this):F(this),null;if(D=H(D,B),D===0&&B.ended)return B.length===0&&ie(this),null;var G=B.needReadable;r("need readable",G),(B.length===0||B.length-D<B.highWaterMark)&&(G=!0,r("length less than watermark",G)),B.ended||B.reading?(G=!1,r("reading or ended",G)):G&&(r("do read"),B.reading=!0,B.sync=!0,B.length===0&&(B.needReadable=!0),this._read(B.highWaterMark),B.sync=!1,B.reading||(D=H(U,B)));var ee;return D>0?ee=W(D,B):ee=null,ee===null?(B.needReadable=B.length<=B.highWaterMark,D=0):(B.length-=D,B.awaitDrain=0),B.length===0&&(B.ended||(B.needReadable=!0),U!==D&&B.ended&&ie(this)),ee!==null&&this.emit("data",ee),ee};function X(D,B){if(r("onEofChunk"),!B.ended){if(B.decoder){var U=B.decoder.end();U&&U.length&&(B.buffer.push(U),B.length+=B.objectMode?1:U.length)}B.ended=!0,B.sync?F(D):(B.needReadable=!1,B.emittedReadable||(B.emittedReadable=!0,Z(D)))}}function F(D){var B=D._readableState;r("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(r("emitReadable",B.flowing),B.emittedReadable=!0,process.nextTick(Z,D))}function Z(D){var B=D._readableState;r("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&(B.length||B.ended)&&(D.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,Y(D)}function re(D,B){B.readingMore||(B.readingMore=!0,process.nextTick(oe,D,B))}function oe(D,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){var U=B.length;if(r("maybeReadMore read 0"),D.read(0),U===B.length)break}B.readingMore=!1}E.prototype._read=function(D){I(this,new d("_read()"))},E.prototype.pipe=function(D,B){var U=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=D;break;case 1:G.pipes=[G.pipes,D];break;default:G.pipes.push(D);break}G.pipesCount+=1,r("pipe count=%d opts=%j",G.pipesCount,B);var ee=(!B||B.end!==!1)&&D!==process.stdout&&D!==process.stderr,q=ee?pe:Ee;G.endEmitted?process.nextTick(q):U.once("end",q),D.on("unpipe",J);function J(Te,Ae){r("onunpipe"),Te===U&&Ae&&Ae.hasUnpiped===!1&&(Ae.hasUnpiped=!0,me())}function pe(){r("onend"),D.end()}var ue=he(U);D.on("drain",ue);var ae=!1;function me(){r("cleanup"),D.removeListener("close",_e),D.removeListener("finish",Oe),D.removeListener("drain",ue),D.removeListener("error",ye),D.removeListener("unpipe",J),U.removeListener("end",pe),U.removeListener("end",Ee),U.removeListener("data",be),ae=!0,G.awaitDrain&&(!D._writableState||D._writableState.needDrain)&&ue()}U.on("data",be);function be(Te){r("ondata");var Ae=D.write(Te);r("dest.write",Ae),Ae===!1&&((G.pipesCount===1&&G.pipes===D||G.pipesCount>1&&L(G.pipes,D)!==-1)&&!ae&&(r("false write response, pause",G.awaitDrain),G.awaitDrain++),U.pause())}function ye(Te){r("onerror",Te),Ee(),D.removeListener("error",ye),c(D,"error")===0&&I(D,Te)}A(D,"error",ye);function _e(){D.removeListener("finish",Oe),Ee()}D.once("close",_e);function Oe(){r("onfinish"),D.removeListener("close",_e),Ee()}D.once("finish",Oe);function Ee(){r("unpipe"),U.unpipe(D)}return D.emit("pipe",U),G.flowing||(r("pipe resume"),U.resume()),D};function he(D){return function(){var U=D._readableState;r("pipeOnDrain",U.awaitDrain),U.awaitDrain&&U.awaitDrain--,U.awaitDrain===0&&c(D,"data")&&(U.flowing=!0,Y(D))}}E.prototype.unpipe=function(D){var B=this._readableState,U={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return D&&D!==B.pipes?this:(D||(D=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,D&&D.emit("unpipe",this,U),this);if(!D){var G=B.pipes,ee=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var q=0;q<ee;q++)G[q].emit("unpipe",this,{hasUnpiped:!1});return this}var J=L(B.pipes,D);return J===-1?this:(B.pipes.splice(J,1),B.pipesCount-=1,B.pipesCount===1&&(B.pipes=B.pipes[0]),D.emit("unpipe",this,U),this)},E.prototype.on=function(D,B){var U=l.prototype.on.call(this,D,B),G=this._readableState;return D==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):D==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,r("on readable",G.length,G.reading),G.length?F(this):G.reading||process.nextTick(fe,this)),U},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(D,B){var U=l.prototype.removeListener.call(this,D,B);return D==="readable"&&process.nextTick(de,this),U},E.prototype.removeAllListeners=function(D){var B=l.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&process.nextTick(de,this),B};function de(D){var B=D._readableState;B.readableListening=D.listenerCount("readable")>0,B.resumeScheduled&&!B.paused?B.flowing=!0:D.listenerCount("data")>0&&D.resume()}function fe(D){r("readable nexttick read 0"),D.read(0)}E.prototype.resume=function(){var D=this._readableState;return D.flowing||(r("resume"),D.flowing=!D.readableListening,ne(this,D)),D.paused=!1,this};function ne(D,B){B.resumeScheduled||(B.resumeScheduled=!0,process.nextTick(te,D,B))}function te(D,B){r("resume",B.reading),B.reading||D.read(0),B.resumeScheduled=!1,D.emit("resume"),Y(D),B.flowing&&!B.reading&&D.read(0)}E.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(D){var B=D._readableState;for(r("flow",B.flowing);B.flowing&&D.read()!==null;);}E.prototype.wrap=function(D){var B=this,U=this._readableState,G=!1;D.on("end",(function(){if(r("wrapped end"),U.decoder&&!U.ended){var J=U.decoder.end();J&&J.length&&B.push(J)}B.push(null)})),D.on("data",(function(J){if(r("wrapped data"),U.decoder&&(J=U.decoder.write(J)),!(U.objectMode&&J==null)&&!(!U.objectMode&&(!J||!J.length))){var pe=B.push(J);pe||(G=!0,D.pause())}}));for(var ee in D)this[ee]===void 0&&typeof D[ee]=="function"&&(this[ee]=(function(pe){return function(){return D[pe].apply(D,arguments)}})(ee));for(var q=0;q<C.length;q++)D.on(C[q],this.emit.bind(this,C[q]));return this._read=function(J){r("wrapped _read",J),G&&(G=!1,D.resume())},this},typeof Symbol=="function"&&(E.prototype[Symbol.asyncIterator]=function(){return R===void 0&&(R=u(4868)),R(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(B){this._readableState&&(this._readableState.flowing=B)}}),E._fromList=W,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function W(D,B){if(B.length===0)return null;var U;return B.objectMode?U=B.buffer.shift():!D||D>=B.length?(B.decoder?U=B.buffer.join(""):B.buffer.length===1?U=B.buffer.first():U=B.buffer.concat(B.length),B.buffer.clear()):U=B.buffer.consume(D,B.decoder),U}function ie(D){var B=D._readableState;r("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,process.nextTick($,B,D))}function $(D,B){if(r("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,B.readable=!1,B.emit("end"),D.autoDestroy)){var U=B._writableState;(!U||U.autoDestroy&&U.finished)&&B.destroy()}}typeof Symbol=="function"&&(E.from=function(D,B){return T===void 0&&(T=u(4659)),T(E,D,B)});function L(D,B){for(var U=0,G=D.length;U<G;U++)if(D[U]===B)return U;return-1}},2337:(S,_,u)=>{S.exports=a;var n=u(5500).F,t=n.ERR_METHOD_NOT_IMPLEMENTED,c=n.ERR_MULTIPLE_CALLBACK,l=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,m=n.ERR_TRANSFORM_WITH_LENGTH_0,o=u(2063);u(9598)(a,o);function i(p,f){var s=this._transformState;s.transforming=!1;var g=s.writecb;if(g===null)return this.emit("error",new c);s.writechunk=null,s.writecb=null,f!=null&&this.push(f),g(p);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function a(p){if(!(this instanceof a))return new a(p);o.call(this,p),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",e)}function e(){var p=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush((function(f,s){r(p,f,s)})):r(this,null,null)}a.prototype.push=function(p,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,p,f)},a.prototype._transform=function(p,f,s){s(new t("_transform()"))},a.prototype._write=function(p,f,s){var g=this._transformState;if(g.writecb=s,g.writechunk=p,g.writeencoding=f,!g.transforming){var h=this._readableState;(g.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},a.prototype._read=function(p){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(p,f){o.prototype._destroy.call(this,p,(function(s){f(s)}))};function r(p,f,s){if(f)return p.emit("error",f);if(s!=null&&p.push(s),p._writableState.length)throw new m;if(p._transformState.transforming)throw new l;return p.push(null)}},8797:(S,_,u)=>{S.exports=O;function n(Y,W,ie){this.chunk=Y,this.encoding=W,this.callback=ie,this.next=null}function t(Y){var W=this;this.next=null,this.entry=null,this.finish=function(){te(W,Y)}}var c;O.WritableState=C;var l={deprecate:u(2107)},m=u(3283),o=u(181).Buffer,i=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(Y){return o.from(Y)}function e(Y){return o.isBuffer(Y)||Y instanceof i}var r=u(5089),p=u(4874),f=p.getHighWaterMark,s=u(5500).F,g=s.ERR_INVALID_ARG_TYPE,h=s.ERR_METHOD_NOT_IMPLEMENTED,v=s.ERR_MULTIPLE_CALLBACK,b=s.ERR_STREAM_CANNOT_PIPE,d=s.ERR_STREAM_DESTROYED,w=s.ERR_STREAM_NULL_VALUES,k=s.ERR_STREAM_WRITE_AFTER_END,R=s.ERR_UNKNOWN_ENCODING,T=r.errorOrDestroy;u(9598)(O,m);function I(){}function C(Y,W,ie){c=c||u(2063),Y=Y||{},typeof ie!="boolean"&&(ie=W instanceof c),this.objectMode=!!Y.objectMode,ie&&(this.objectMode=this.objectMode||!!Y.writableObjectMode),this.highWaterMark=f(this,Y,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var $=Y.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=Y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){X(W,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Y.emitClose!==!1,this.autoDestroy=!!Y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}C.prototype.getBuffer=function(){for(var W=this.bufferedRequest,ie=[];W;)ie.push(W),W=W.next;return ie},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:l.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(O,Symbol.hasInstance,{value:function(W){return A.call(this,W)?!0:this!==O?!1:W&&W._writableState instanceof C}})):A=function(W){return W instanceof this};function O(Y){c=c||u(2063);var W=this instanceof c;if(!W&&!A.call(O,this))return new O(Y);this._writableState=new C(Y,this,W),this.writable=!0,Y&&(typeof Y.write=="function"&&(this._write=Y.write),typeof Y.writev=="function"&&(this._writev=Y.writev),typeof Y.destroy=="function"&&(this._destroy=Y.destroy),typeof Y.final=="function"&&(this._final=Y.final)),m.call(this)}O.prototype.pipe=function(){T(this,new b)};function E(Y,W){var ie=new k;T(Y,ie),process.nextTick(W,ie)}function P(Y,W,ie,$){var L;return ie===null?L=new w:typeof ie!="string"&&!W.objectMode&&(L=new g("chunk",["string","Buffer"],ie)),L?(T(Y,L),process.nextTick($,L),!1):!0}O.prototype.write=function(Y,W,ie){var $=this._writableState,L=!1,D=!$.objectMode&&e(Y);return D&&!o.isBuffer(Y)&&(Y=a(Y)),typeof W=="function"&&(ie=W,W=null),D?W="buffer":W||(W=$.defaultEncoding),typeof ie!="function"&&(ie=I),$.ending?E(this,ie):(D||P(this,$,Y,ie))&&($.pendingcb++,L=j(this,$,D,Y,W,ie)),L},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var Y=this._writableState;Y.corked&&(Y.corked--,!Y.writing&&!Y.corked&&!Y.bufferProcessing&&Y.bufferedRequest&&re(this,Y))},O.prototype.setDefaultEncoding=function(W){if(typeof W=="string"&&(W=W.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((W+"").toLowerCase())>-1))throw new R(W);return this._writableState.defaultEncoding=W,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(Y,W,ie){return!Y.objectMode&&Y.decodeStrings!==!1&&typeof W=="string"&&(W=o.from(W,ie)),W}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function j(Y,W,ie,$,L,D){if(!ie){var B=N(W,$,L);$!==B&&(ie=!0,L="buffer",$=B)}var U=W.objectMode?1:$.length;W.length+=U;var G=W.length<W.highWaterMark;if(G||(W.needDrain=!0),W.writing||W.corked){var ee=W.lastBufferedRequest;W.lastBufferedRequest={chunk:$,encoding:L,isBuf:ie,callback:D,next:null},ee?ee.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else M(Y,W,!1,U,$,L,D);return G}function M(Y,W,ie,$,L,D,B){W.writelen=$,W.writecb=B,W.writing=!0,W.sync=!0,W.destroyed?W.onwrite(new d("write")):ie?Y._writev(L,W.onwrite):Y._write(L,D,W.onwrite),W.sync=!1}function z(Y,W,ie,$,L){--W.pendingcb,ie?(process.nextTick(L,$),process.nextTick(fe,Y,W),Y._writableState.errorEmitted=!0,T(Y,$)):(L($),Y._writableState.errorEmitted=!0,T(Y,$),fe(Y,W))}function H(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}function X(Y,W){var ie=Y._writableState,$=ie.sync,L=ie.writecb;if(typeof L!="function")throw new v;if(H(ie),W)z(Y,ie,$,W,L);else{var D=oe(ie)||Y.destroyed;!D&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&re(Y,ie),$?process.nextTick(F,Y,ie,D,L):F(Y,ie,D,L)}}function F(Y,W,ie,$){ie||Z(Y,W),W.pendingcb--,$(),fe(Y,W)}function Z(Y,W){W.length===0&&W.needDrain&&(W.needDrain=!1,Y.emit("drain"))}function re(Y,W){W.bufferProcessing=!0;var ie=W.bufferedRequest;if(Y._writev&&ie&&ie.next){var $=W.bufferedRequestCount,L=new Array($),D=W.corkedRequestsFree;D.entry=ie;for(var B=0,U=!0;ie;)L[B]=ie,ie.isBuf||(U=!1),ie=ie.next,B+=1;L.allBuffers=U,M(Y,W,!0,W.length,L,"",D.finish),W.pendingcb++,W.lastBufferedRequest=null,D.next?(W.corkedRequestsFree=D.next,D.next=null):W.corkedRequestsFree=new t(W),W.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ee=ie.encoding,q=ie.callback,J=W.objectMode?1:G.length;if(M(Y,W,!1,J,G,ee,q),ie=ie.next,W.bufferedRequestCount--,W.writing)break}ie===null&&(W.lastBufferedRequest=null)}W.bufferedRequest=ie,W.bufferProcessing=!1}O.prototype._write=function(Y,W,ie){ie(new h("_write()"))},O.prototype._writev=null,O.prototype.end=function(Y,W,ie){var $=this._writableState;return typeof Y=="function"?(ie=Y,Y=null,W=null):typeof W=="function"&&(ie=W,W=null),Y!=null&&this.write(Y,W),$.corked&&($.corked=1,this.uncork()),$.ending||ne(this,$,ie),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function oe(Y){return Y.ending&&Y.length===0&&Y.bufferedRequest===null&&!Y.finished&&!Y.writing}function he(Y,W){Y._final((function(ie){W.pendingcb--,ie&&T(Y,ie),W.prefinished=!0,Y.emit("prefinish"),fe(Y,W)}))}function de(Y,W){!W.prefinished&&!W.finalCalled&&(typeof Y._final=="function"&&!W.destroyed?(W.pendingcb++,W.finalCalled=!0,process.nextTick(he,Y,W)):(W.prefinished=!0,Y.emit("prefinish")))}function fe(Y,W){var ie=oe(W);if(ie&&(de(Y,W),W.pendingcb===0&&(W.finished=!0,Y.emit("finish"),W.autoDestroy))){var $=Y._readableState;(!$||$.autoDestroy&&$.endEmitted)&&Y.destroy()}return ie}function ne(Y,W,ie){W.ending=!0,fe(Y,W),ie&&(W.finished?process.nextTick(ie):Y.once("finish",ie)),W.ended=!0,Y.writable=!1}function te(Y,W,ie){var $=Y.entry;for(Y.entry=null;$;){var L=$.callback;W.pendingcb--,L(ie),$=$.next}W.corkedRequestsFree.next=Y}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(W){this._writableState&&(this._writableState.destroyed=W)}}),O.prototype.destroy=r.destroy,O.prototype._undestroy=r.undestroy,O.prototype._destroy=function(Y,W){W(Y)}},4868:(S,_,u)=>{var n;function t(k,R,T){return R=c(R),R in k?Object.defineProperty(k,R,{value:T,enumerable:!0,configurable:!0,writable:!0}):k[R]=T,k}function c(k){var R=l(k,"string");return typeof R=="symbol"?R:String(R)}function l(k,R){if(typeof k!="object"||k===null)return k;var T=k[Symbol.toPrimitive];if(T!==void 0){var I=T.call(k,R||"default");if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(k)}var m=u(6815),o=Symbol("lastResolve"),i=Symbol("lastReject"),a=Symbol("error"),e=Symbol("ended"),r=Symbol("lastPromise"),p=Symbol("handlePromise"),f=Symbol("stream");function s(k,R){return{value:k,done:R}}function g(k){var R=k[o];if(R!==null){var T=k[f].read();T!==null&&(k[r]=null,k[o]=null,k[i]=null,R(s(T,!1)))}}function h(k){process.nextTick(g,k)}function v(k,R){return function(T,I){k.then((function(){if(R[e]){T(s(void 0,!0));return}R[p](T,I)}),I)}}var b=Object.getPrototypeOf((function(){})),d=Object.setPrototypeOf((n={get stream(){return this[f]},next:function(){var R=this,T=this[a];if(T!==null)return Promise.reject(T);if(this[e])return Promise.resolve(s(void 0,!0));if(this[f].destroyed)return new Promise((function(O,E){process.nextTick((function(){R[a]?E(R[a]):O(s(void 0,!0))}))}));var I=this[r],C;if(I)C=new Promise(v(I,this));else{var A=this[f].read();if(A!==null)return Promise.resolve(s(A,!1));C=new Promise(this[p])}return this[r]=C,C}},t(n,Symbol.asyncIterator,(function(){return this})),t(n,"return",(function(){var R=this;return new Promise((function(T,I){R[f].destroy(null,(function(C){if(C){I(C);return}T(s(void 0,!0))}))}))})),n),b),w=function(R){var T,I=Object.create(d,(T={},t(T,f,{value:R,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,i,{value:null,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,e,{value:R._readableState.endEmitted,writable:!0}),t(T,p,{value:function(A,O){var E=I[f].read();E?(I[r]=null,I[o]=null,I[i]=null,A(s(E,!1))):(I[o]=A,I[i]=O)},writable:!0}),T));return I[r]=null,m(R,(function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var A=I[i];A!==null&&(I[r]=null,I[o]=null,I[i]=null,A(C)),I[a]=C;return}var O=I[o];O!==null&&(I[r]=null,I[o]=null,I[i]=null,O(s(void 0,!0))),I[e]=!0})),R.on("readable",h.bind(null,I)),I};S.exports=w},7336:(S,_,u)=>{function n(h,v){var b=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);v&&(d=d.filter((function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable}))),b.push.apply(b,d)}return b}function t(h){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?n(Object(b),!0).forEach((function(d){c(h,d,b[d])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(b)):n(Object(b)).forEach((function(d){Object.defineProperty(h,d,Object.getOwnPropertyDescriptor(b,d))}))}return h}function c(h,v,b){return v=i(v),v in h?Object.defineProperty(h,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):h[v]=b,h}function l(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}function m(h,v){for(var b=0;b<v.length;b++){var d=v[b];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,i(d.key),d)}}function o(h,v,b){return v&&m(h.prototype,v),b&&m(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h}function i(h){var v=a(h,"string");return typeof v=="symbol"?v:String(v)}function a(h,v){if(typeof h!="object"||h===null)return h;var b=h[Symbol.toPrimitive];if(b!==void 0){var d=b.call(h,v||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(h)}var e=u(181),r=e.Buffer,p=u(9023),f=p.inspect,s=f&&f.custom||"inspect";function g(h,v,b){r.prototype.copy.call(h,v,b)}S.exports=(function(){function h(){l(this,h),this.head=null,this.tail=null,this.length=0}return o(h,[{key:"push",value:function(b){var d={data:b,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(b){var d={data:b,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var d=this.head,w=""+d.data;d=d.next;)w+=b+d.data;return w}},{key:"concat",value:function(b){if(this.length===0)return r.alloc(0);for(var d=r.allocUnsafe(b>>>0),w=this.head,k=0;w;)g(w.data,d,k),k+=w.data.length,w=w.next;return d}},{key:"consume",value:function(b,d){var w;return b<this.head.data.length?(w=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?w=this.shift():w=d?this._getString(b):this._getBuffer(b),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var d=this.head,w=1,k=d.data;for(b-=k.length;d=d.next;){var R=d.data,T=b>R.length?R.length:b;if(T===R.length?k+=R:k+=R.slice(0,b),b-=T,b===0){T===R.length?(++w,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=R.slice(T));break}++w}return this.length-=w,k}},{key:"_getBuffer",value:function(b){var d=r.allocUnsafe(b),w=this.head,k=1;for(w.data.copy(d),b-=w.data.length;w=w.next;){var R=w.data,T=b>R.length?R.length:b;if(R.copy(d,d.length-b,0,T),b-=T,b===0){T===R.length?(++k,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=R.slice(T));break}++k}return this.length-=k,d}},{key:s,value:function(b,d){return f(this,t(t({},d),{},{depth:0,customInspect:!1}))}}]),h})()},5089:S=>{function _(m,o){var i=this,a=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return a||e?(o?o(m):m&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(c,this,m)):process.nextTick(c,this,m)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,(function(r){!o&&r?i._writableState?i._writableState.errorEmitted?process.nextTick(n,i):(i._writableState.errorEmitted=!0,process.nextTick(u,i,r)):process.nextTick(u,i,r):o?(process.nextTick(n,i),o(r)):process.nextTick(n,i)})),this)}function u(m,o){c(m,o),n(m)}function n(m){m._writableState&&!m._writableState.emitClose||m._readableState&&!m._readableState.emitClose||m.emit("close")}function t(){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 c(m,o){m.emit("error",o)}function l(m,o){var i=m._readableState,a=m._writableState;i&&i.autoDestroy||a&&a.autoDestroy?m.destroy(o):m.emit("error",o)}S.exports={destroy:_,undestroy:t,errorOrDestroy:l}},6815:(S,_,u)=>{var n=u(5500).F.ERR_STREAM_PREMATURE_CLOSE;function t(o){var i=!1;return function(){if(!i){i=!0;for(var a=arguments.length,e=new Array(a),r=0;r<a;r++)e[r]=arguments[r];o.apply(this,e)}}}function c(){}function l(o){return o.setHeader&&typeof o.abort=="function"}function m(o,i,a){if(typeof i=="function")return m(o,null,i);i||(i={}),a=t(a||c);var e=i.readable||i.readable!==!1&&o.readable,r=i.writable||i.writable!==!1&&o.writable,p=function(){o.writable||s()},f=o._writableState&&o._writableState.finished,s=function(){r=!1,f=!0,e||a.call(o)},g=o._readableState&&o._readableState.endEmitted,h=function(){e=!1,g=!0,r||a.call(o)},v=function(k){a.call(o,k)},b=function(){var k;if(e&&!g)return(!o._readableState||!o._readableState.ended)&&(k=new n),a.call(o,k);if(r&&!f)return(!o._writableState||!o._writableState.ended)&&(k=new n),a.call(o,k)},d=function(){o.req.on("finish",s)};return l(o)?(o.on("complete",s),o.on("abort",b),o.req?d():o.on("request",d)):r&&!o._writableState&&(o.on("end",p),o.on("close",p)),o.on("end",h),o.on("finish",s),i.error!==!1&&o.on("error",v),o.on("close",b),function(){o.removeListener("complete",s),o.removeListener("abort",b),o.removeListener("request",d),o.req&&o.req.removeListener("finish",s),o.removeListener("end",p),o.removeListener("close",p),o.removeListener("finish",s),o.removeListener("end",h),o.removeListener("error",v),o.removeListener("close",b)}}S.exports=m},4659:(S,_,u)=>{function n(r,p,f,s,g,h,v){try{var b=r[h](v),d=b.value}catch(w){f(w);return}b.done?p(d):Promise.resolve(d).then(s,g)}function t(r){return function(){var p=this,f=arguments;return new Promise((function(s,g){var h=r.apply(p,f);function v(d){n(h,s,g,v,b,"next",d)}function b(d){n(h,s,g,v,b,"throw",d)}v(void 0)}))}}function c(r,p){var f=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);p&&(s=s.filter((function(g){return Object.getOwnPropertyDescriptor(r,g).enumerable}))),f.push.apply(f,s)}return f}function l(r){for(var p=1;p<arguments.length;p++){var f=arguments[p]!=null?arguments[p]:{};p%2?c(Object(f),!0).forEach((function(s){m(r,s,f[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(f)):c(Object(f)).forEach((function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(f,s))}))}return r}function m(r,p,f){return p=o(p),p in r?Object.defineProperty(r,p,{value:f,enumerable:!0,configurable:!0,writable:!0}):r[p]=f,r}function o(r){var p=i(r,"string");return typeof p=="symbol"?p:String(p)}function i(r,p){if(typeof r!="object"||r===null)return r;var f=r[Symbol.toPrimitive];if(f!==void 0){var s=f.call(r,p||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(r)}var a=u(5500).F.ERR_INVALID_ARG_TYPE;function e(r,p,f){var s;if(p&&typeof p.next=="function")s=p;else if(p&&p[Symbol.asyncIterator])s=p[Symbol.asyncIterator]();else if(p&&p[Symbol.iterator])s=p[Symbol.iterator]();else throw new a("iterable",["Iterable"],p);var g=new r(l({objectMode:!0},f)),h=!1;g._read=function(){h||(h=!0,v())};function v(){return b.apply(this,arguments)}function b(){return b=t((function*(){try{var d=yield s.next(),w=d.value,k=d.done;k?g.push(null):g.push(yield w)?v():h=!1}catch(R){g.destroy(R)}})),b.apply(this,arguments)}return g}S.exports=e},6701:(S,_,u)=>{var n;function t(s){var g=!1;return function(){g||(g=!0,s.apply(void 0,arguments))}}var c=u(5500).F,l=c.ERR_MISSING_ARGS,m=c.ERR_STREAM_DESTROYED;function o(s){if(s)throw s}function i(s){return s.setHeader&&typeof s.abort=="function"}function a(s,g,h,v){v=t(v);var b=!1;s.on("close",(function(){b=!0})),n===void 0&&(n=u(6815)),n(s,{readable:g,writable:h},(function(w){if(w)return v(w);b=!0,v()}));var d=!1;return function(w){if(!b&&!d){if(d=!0,i(s))return s.abort();if(typeof s.destroy=="function")return s.destroy();v(w||new m("pipe"))}}}function e(s){s()}function r(s,g){return s.pipe(g)}function p(s){return!s.length||typeof s[s.length-1]!="function"?o:s.pop()}function f(){for(var s=arguments.length,g=new Array(s),h=0;h<s;h++)g[h]=arguments[h];var v=p(g);if(Array.isArray(g[0])&&(g=g[0]),g.length<2)throw new l("streams");var b,d=g.map((function(w,k){var R=k<g.length-1,T=k>0;return a(w,R,T,(function(I){b||(b=I),I&&d.forEach(e),!R&&(d.forEach(e),v(b))}))}));return g.reduce(r)}S.exports=f},4874:(S,_,u)=>{var n=u(5500).F.ERR_INVALID_OPT_VALUE;function t(l,m,o){return l.highWaterMark!=null?l.highWaterMark:m?l[o]:null}function c(l,m,o,i){var a=t(m,i,o);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var e=i?o:"highWaterMark";throw new n(e,a)}return Math.floor(a)}return l.objectMode?16:16*1024}S.exports={getHighWaterMark:c}},3283:(S,_,u)=>{S.exports=u(2203)},6131:(S,_,u)=>{var n=u(2203);process.env.READABLE_STREAM==="disable"&&n?(S.exports=n.Readable,Object.assign(S.exports,n),S.exports.Stream=n):(_=S.exports=u(6893),_.Stream=n||_,_.Readable=_,_.Writable=u(8797),_.Duplex=u(2063),_.Transform=u(2337),_.PassThrough=u(5283),_.finished=u(6815),_.pipeline=u(6701))},3058:(S,_,u)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=u(181),t=n.Buffer;function c(m,o){for(var i in m)o[i]=m[i]}t.from&&t.alloc&&t.allocUnsafe&&t.allocUnsafeSlow?S.exports=n:(c(n,_),_.Buffer=l);function l(m,o,i){return t(m,o,i)}l.prototype=Object.create(t.prototype),c(t,l),l.from=function(m,o,i){if(typeof m=="number")throw new TypeError("Argument must not be a number");return t(m,o,i)},l.alloc=function(m,o,i){if(typeof m!="number")throw new TypeError("Argument must be a number");var a=t(m);return o!==void 0?typeof i=="string"?a.fill(o,i):a.fill(o):a.fill(0),a},l.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return t(m)},l.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(m)}},2803:(S,_,u)=>{var n=u(181),t=n.Buffer,c={},l;for(l in n)n.hasOwnProperty(l)&&(l==="SlowBuffer"||l==="Buffer"||(c[l]=n[l]));var m=c.Buffer={};for(l in t)t.hasOwnProperty(l)&&(l==="allocUnsafe"||l==="allocUnsafeSlow"||(m[l]=t[l]));if(c.Buffer.prototype=t.prototype,(!m.from||m.from===Uint8Array.from)&&(m.from=function(o,i,a){if(typeof o=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof o);if(o&&typeof o.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);return t(o,i,a)}),m.alloc||(m.alloc=function(o,i,a){if(typeof o!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof o);if(o<0||o>=2*(1<<30))throw new RangeError('The value "'+o+'" is invalid for option "size"');var e=t(o);return!i||i.length===0?e.fill(0):typeof a=="string"?e.fill(i,a):e.fill(i),e}),!c.kStringMaxLength)try{c.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}c.constants||(c.constants={MAX_LENGTH:c.kMaxLength},c.kStringMaxLength&&(c.constants.MAX_STRING_LENGTH=c.kStringMaxLength)),S.exports=c},7686:(S,_,u)=>{var n=u(8542);function t(l){var m=parseInt(l[0],16);return m<8?l:(m-=8,m.toString()+l.substring(1))}function c(l){return l==="sha256"?n.md.sha256.create():n.md.sha1.create()}_.generate=function(m,o,i){typeof m=="function"?(i=m,m=void 0):typeof o=="function"&&(i=o,o={}),o=o||{};var a=function(p){var f=n.pki.createCertificate();f.serialNumber=t(n.util.bytesToHex(n.random.getBytesSync(9))),f.validity.notBefore=o.notBeforeDate||new Date;var s=new Date;f.validity.notAfter=s,f.validity.notAfter.setDate(s.getDate()+(o.days||365)),m=m||[{name:"commonName",value:"example.org"},{name:"countryName",value:"US"},{shortName:"ST",value:"Virginia"},{name:"localityName",value:"Blacksburg"},{name:"organizationName",value:"Test"},{shortName:"OU",value:"Test"}],f.setSubject(m),f.setIssuer(m),f.publicKey=p.publicKey,f.setExtensions(o.extensions||[{name:"basicConstraints",cA:!0},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},{name:"subjectAltName",altNames:[{type:6,value:"http://example.org/webid#me"}]}]),f.sign(p.privateKey,c(o&&o.algorithm));const g=n.md.sha1.create().update(n.asn1.toDer(n.pki.certificateToAsn1(f)).getBytes()).digest().toHex().match(/.{2}/g).join(":");var h={private:n.pki.privateKeyToPem(p.privateKey),public:n.pki.publicKeyToPem(p.publicKey),cert:n.pki.certificateToPem(f),fingerprint:g};if(o&&o.pkcs7){var v=n.pkcs7.createSignedData();v.addCertificate(f),h.pkcs7=n.pkcs7.messageToPem(v)}if(o&&o.clientCertificate){var b=n.pki.rsa.generateKeyPair(o.clientCertificateKeySize||1024),d=n.pki.createCertificate();d.serialNumber=t(n.util.bytesToHex(n.random.getBytesSync(9))),d.validity.notBefore=new Date,d.validity.notAfter=new Date,d.validity.notAfter.setFullYear(d.validity.notBefore.getFullYear()+1);for(var w=JSON.parse(JSON.stringify(m)),k=0;k<w.length;k++)w[k].name==="commonName"&&(o.clientCertificateCN?w[k]={name:"commonName",value:o.clientCertificateCN}:w[k]={name:"commonName",value:"John Doe jdoe123"});if(d.setSubject(w),d.setIssuer(m),d.publicKey=b.publicKey,d.sign(p.privateKey),h.clientprivate=n.pki.privateKeyToPem(b.privateKey),h.clientpublic=n.pki.publicKeyToPem(b.publicKey),h.clientcert=n.pki.certificateToPem(d),o.pkcs7){var R=n.pkcs7.createSignedData();R.addCertificate(d),h.clientpkcs7=n.pkcs7.messageToPem(R)}}var T=n.pki.createCaStore();T.addCertificate(f);try{n.pki.verifyCertificateChain(T,[f],(function(I,C,A){if(I!==!0)throw new Error("Certificate could not be verified.");return!0}))}catch(I){throw new Error(I)}return h},e=o.keySize||1024;if(i)return n.pki.rsa.generateKeyPair({bits:e},(function(p,f){if(p)return i(p);try{return i(null,a(f))}catch(s){return i(s)}}));var r=o.keyPair?{privateKey:n.pki.privateKeyFromPem(o.keyPair.privateKey),publicKey:n.pki.publicKeyFromPem(o.keyPair.publicKey)}:n.pki.rsa.generateKeyPair(e);return a(r)}},814:(S,_,u)=>{/*!
|
|
295
|
+
*/var n=p(),t=u(4531),c=u(8024),l=u(1748),m=u(6367);S.exports=a;var o=/^Encoding not recognized: /;function i(s){if(!s)return null;try{return l.getDecoder(s)}catch(g){throw o.test(g.message)?c(415,"specified encoding unsupported",{encoding:s,type:"encoding.unsupported"}):g}}function a(s,g,h){var v=h,b=g||{};if(s===void 0)throw new TypeError("argument stream is required");if(typeof s!="object"||s===null||typeof s.on!="function")throw new TypeError("argument stream must be a stream");if((g===!0||typeof g=="string")&&(b={encoding:g}),typeof g=="function"&&(v=g,b={}),v!==void 0&&typeof v!="function")throw new TypeError("argument callback must be a function");if(!v&&!global.Promise)throw new TypeError("argument callback is required");var d=b.encoding!==!0?b.encoding:"utf-8",w=t.parse(b.limit),k=b.length!=null&&!isNaN(b.length)?parseInt(b.length,10):null;return v?r(s,d,k,w,f(v)):new Promise((function(T,I){r(s,d,k,w,(function(A,O){if(A)return I(A);T(O)}))}))}function e(s){m(s),typeof s.pause=="function"&&s.pause()}function r(s,g,h,v,b){var d=!1,w=!0;if(v!==null&&h!==null&&h>v)return C(c(413,"request entity too large",{expected:h,length:h,limit:v,type:"entity.too.large"}));var k=s._readableState;if(s._decoder||k&&(k.encoding||k.decoder))return C(c(500,"stream encoding should not be set",{type:"stream.encoding.set"}));if(typeof s.readable<"u"&&!s.readable)return C(c(500,"stream is not readable",{type:"stream.not.readable"}));var R=0,T;try{T=i(g)}catch(N){return C(N)}var I=T?"":[];s.on("aborted",A),s.on("close",P),s.on("data",O),s.on("end",E),s.on("error",E),w=!1;function C(){for(var N=new Array(arguments.length),j=0;j<N.length;j++)N[j]=arguments[j];d=!0,w?process.nextTick(M):M();function M(){P(),N[0]&&e(s),b.apply(null,N)}}function A(){d||C(c(400,"request aborted",{code:"ECONNABORTED",expected:h,length:h,received:R,type:"request.aborted"}))}function O(N){d||(R+=N.length,v!==null&&R>v?C(c(413,"request entity too large",{limit:v,received:R,type:"entity.too.large"})):T?I+=T.write(N):I.push(N))}function E(N){if(!d){if(N)return C(N);if(h!==null&&R!==h)C(c(400,"request size did not match content length",{expected:h,length:h,received:R,type:"request.size.invalid"}));else{var j=T?I+(T.end()||""):Buffer.concat(I);C(null,j)}}}function P(){I=null,s.removeListener("aborted",A),s.removeListener("data",O),s.removeListener("end",E),s.removeListener("error",E),s.removeListener("close",P)}}function p(){try{return u(290)}catch{return{}}}function f(s){var g;return n.AsyncResource&&(g=new n.AsyncResource(s.name||"bound-anonymous-fn")),!g||!g.runInAsyncScope?s:g.runInAsyncScope.bind(g,s,null)}},5500:S=>{const _={};function u(m,o,i){i||(i=Error);function a(r,p,f){return typeof o=="string"?o:o(r,p,f)}class e extends i{constructor(p,f,s){super(a(p,f,s))}}e.prototype.name=i.name,e.prototype.code=m,_[m]=e}function n(m,o){if(Array.isArray(m)){const i=m.length;return m=m.map((a=>String(a))),i>2?`one of ${o} ${m.slice(0,i-1).join(", ")}, or `+m[i-1]:i===2?`one of ${o} ${m[0]} or ${m[1]}`:`of ${o} ${m[0]}`}else return`of ${o} ${String(m)}`}function t(m,o,i){return m.substr(!i||i<0?0:+i,o.length)===o}function c(m,o,i){return(i===void 0||i>m.length)&&(i=m.length),m.substring(i-o.length,i)===o}function l(m,o,i){return typeof i!="number"&&(i=0),i+o.length>m.length?!1:m.indexOf(o,i)!==-1}u("ERR_INVALID_OPT_VALUE",(function(m,o){return'The value "'+o+'" is invalid for option "'+m+'"'}),TypeError),u("ERR_INVALID_ARG_TYPE",(function(m,o,i){let a;typeof o=="string"&&t(o,"not ")?(a="must not be",o=o.replace(/^not /,"")):a="must be";let e;if(c(m," argument"))e=`The ${m} ${a} ${n(o,"type")}`;else{const r=l(m,".")?"property":"argument";e=`The "${m}" ${r} ${a} ${n(o,"type")}`}return e+=`. Received type ${typeof i}`,e}),TypeError),u("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),u("ERR_METHOD_NOT_IMPLEMENTED",(function(m){return"The "+m+" method is not implemented"})),u("ERR_STREAM_PREMATURE_CLOSE","Premature close"),u("ERR_STREAM_DESTROYED",(function(m){return"Cannot call "+m+" after a stream was destroyed"})),u("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),u("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),u("ERR_STREAM_WRITE_AFTER_END","write after end"),u("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),u("ERR_UNKNOWN_ENCODING",(function(m){return"Unknown encoding: "+m}),TypeError),u("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),S.exports.F=_},2063:(S,_,u)=>{var n=Object.keys||function(r){var p=[];for(var f in r)p.push(f);return p};S.exports=i;var t=u(6893),c=u(8797);u(9598)(i,t);for(var l=n(c.prototype),m=0;m<l.length;m++){var o=l[m];i.prototype[o]||(i.prototype[o]=c.prototype[o])}function i(r){if(!(this instanceof i))return new i(r);t.call(this,r),c.call(this,r),this.allowHalfOpen=!0,r&&(r.readable===!1&&(this.readable=!1),r.writable===!1&&(this.writable=!1),r.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(i.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(i.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(e,this)}function e(r){r.end()}Object.defineProperty(i.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(p){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=p,this._writableState.destroyed=p)}})},5283:(S,_,u)=>{S.exports=t;var n=u(2337);u(9598)(t,n);function t(c){if(!(this instanceof t))return new t(c);n.call(this,c)}t.prototype._transform=function(c,l,m){m(null,c)}},6893:(S,_,u)=>{S.exports=E;var n;E.ReadableState=O;var t=u(4434).EventEmitter,c=function(B,U){return B.listeners(U).length},l=u(3283),m=u(181).Buffer,o=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(D){return m.from(D)}function a(D){return m.isBuffer(D)||D instanceof o}var e=u(9023),r;e&&e.debuglog?r=e.debuglog("stream"):r=function(){};var p=u(7336),f=u(5089),s=u(4874),g=s.getHighWaterMark,h=u(5500).F,v=h.ERR_INVALID_ARG_TYPE,b=h.ERR_STREAM_PUSH_AFTER_EOF,d=h.ERR_METHOD_NOT_IMPLEMENTED,w=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,R,T;u(9598)(E,l);var I=f.errorOrDestroy,C=["error","close","destroy","pause","resume"];function A(D,B,U){if(typeof D.prependListener=="function")return D.prependListener(B,U);!D._events||!D._events[B]?D.on(B,U):Array.isArray(D._events[B])?D._events[B].unshift(U):D._events[B]=[U,D._events[B]]}function O(D,B,U){n=n||u(2063),D=D||{},typeof U!="boolean"&&(U=B instanceof n),this.objectMode=!!D.objectMode,U&&(this.objectMode=this.objectMode||!!D.readableObjectMode),this.highWaterMark=g(this,D,"readableHighWaterMark",U),this.buffer=new p,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=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding&&(k||(k=u(634).I),this.decoder=new k(D.encoding),this.encoding=D.encoding)}function E(D){if(n=n||u(2063),!(this instanceof E))return new E(D);var B=this instanceof n;this._readableState=new O(D,this,B),this.readable=!0,D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy)),l.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(B){this._readableState&&(this._readableState.destroyed=B)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(D,B){B(D)},E.prototype.push=function(D,B){var U=this._readableState,G;return U.objectMode?G=!0:typeof D=="string"&&(B=B||U.defaultEncoding,B!==U.encoding&&(D=m.from(D,B),B=""),G=!0),P(this,D,B,!1,G)},E.prototype.unshift=function(D){return P(this,D,null,!0,!1)};function P(D,B,U,G,ee){r("readableAddChunk",B);var q=D._readableState;if(B===null)q.reading=!1,X(D,q);else{var J;if(ee||(J=j(q,B)),J)I(D,J);else if(q.objectMode||B&&B.length>0)if(typeof B!="string"&&!q.objectMode&&Object.getPrototypeOf(B)!==m.prototype&&(B=i(B)),G)q.endEmitted?I(D,new w):N(D,q,B,!0);else if(q.ended)I(D,new b);else{if(q.destroyed)return!1;q.reading=!1,q.decoder&&!U?(B=q.decoder.write(B),q.objectMode||B.length!==0?N(D,q,B,!1):re(D,q)):N(D,q,B,!1)}else G||(q.reading=!1,re(D,q))}return!q.ended&&(q.length<q.highWaterMark||q.length===0)}function N(D,B,U,G){B.flowing&&B.length===0&&!B.sync?(B.awaitDrain=0,D.emit("data",U)):(B.length+=B.objectMode?1:U.length,G?B.buffer.unshift(U):B.buffer.push(U),B.needReadable&&F(D)),re(D,B)}function j(D,B){var U;return!a(B)&&typeof B!="string"&&B!==void 0&&!D.objectMode&&(U=new v("chunk",["string","Buffer","Uint8Array"],B)),U}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(D){k||(k=u(634).I);var B=new k(D);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;for(var U=this._readableState.buffer.head,G="";U!==null;)G+=B.write(U.data),U=U.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var M=1073741824;function z(D){return D>=M?D=M:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function H(D,B){return D<=0||B.length===0&&B.ended?0:B.objectMode?1:D!==D?B.flowing&&B.length?B.buffer.head.data.length:B.length:(D>B.highWaterMark&&(B.highWaterMark=z(D)),D<=B.length?D:B.ended?B.length:(B.needReadable=!0,0))}E.prototype.read=function(D){r("read",D),D=parseInt(D,10);var B=this._readableState,U=D;if(D!==0&&(B.emittedReadable=!1),D===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return r("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?ie(this):F(this),null;if(D=H(D,B),D===0&&B.ended)return B.length===0&&ie(this),null;var G=B.needReadable;r("need readable",G),(B.length===0||B.length-D<B.highWaterMark)&&(G=!0,r("length less than watermark",G)),B.ended||B.reading?(G=!1,r("reading or ended",G)):G&&(r("do read"),B.reading=!0,B.sync=!0,B.length===0&&(B.needReadable=!0),this._read(B.highWaterMark),B.sync=!1,B.reading||(D=H(U,B)));var ee;return D>0?ee=W(D,B):ee=null,ee===null?(B.needReadable=B.length<=B.highWaterMark,D=0):(B.length-=D,B.awaitDrain=0),B.length===0&&(B.ended||(B.needReadable=!0),U!==D&&B.ended&&ie(this)),ee!==null&&this.emit("data",ee),ee};function X(D,B){if(r("onEofChunk"),!B.ended){if(B.decoder){var U=B.decoder.end();U&&U.length&&(B.buffer.push(U),B.length+=B.objectMode?1:U.length)}B.ended=!0,B.sync?F(D):(B.needReadable=!1,B.emittedReadable||(B.emittedReadable=!0,Z(D)))}}function F(D){var B=D._readableState;r("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(r("emitReadable",B.flowing),B.emittedReadable=!0,process.nextTick(Z,D))}function Z(D){var B=D._readableState;r("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&(B.length||B.ended)&&(D.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,Y(D)}function re(D,B){B.readingMore||(B.readingMore=!0,process.nextTick(oe,D,B))}function oe(D,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){var U=B.length;if(r("maybeReadMore read 0"),D.read(0),U===B.length)break}B.readingMore=!1}E.prototype._read=function(D){I(this,new d("_read()"))},E.prototype.pipe=function(D,B){var U=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=D;break;case 1:G.pipes=[G.pipes,D];break;default:G.pipes.push(D);break}G.pipesCount+=1,r("pipe count=%d opts=%j",G.pipesCount,B);var ee=(!B||B.end!==!1)&&D!==process.stdout&&D!==process.stderr,q=ee?pe:Ee;G.endEmitted?process.nextTick(q):U.once("end",q),D.on("unpipe",J);function J(Te,Ae){r("onunpipe"),Te===U&&Ae&&Ae.hasUnpiped===!1&&(Ae.hasUnpiped=!0,me())}function pe(){r("onend"),D.end()}var ue=he(U);D.on("drain",ue);var ae=!1;function me(){r("cleanup"),D.removeListener("close",xe),D.removeListener("finish",Oe),D.removeListener("drain",ue),D.removeListener("error",ye),D.removeListener("unpipe",J),U.removeListener("end",pe),U.removeListener("end",Ee),U.removeListener("data",be),ae=!0,G.awaitDrain&&(!D._writableState||D._writableState.needDrain)&&ue()}U.on("data",be);function be(Te){r("ondata");var Ae=D.write(Te);r("dest.write",Ae),Ae===!1&&((G.pipesCount===1&&G.pipes===D||G.pipesCount>1&&L(G.pipes,D)!==-1)&&!ae&&(r("false write response, pause",G.awaitDrain),G.awaitDrain++),U.pause())}function ye(Te){r("onerror",Te),Ee(),D.removeListener("error",ye),c(D,"error")===0&&I(D,Te)}A(D,"error",ye);function xe(){D.removeListener("finish",Oe),Ee()}D.once("close",xe);function Oe(){r("onfinish"),D.removeListener("close",xe),Ee()}D.once("finish",Oe);function Ee(){r("unpipe"),U.unpipe(D)}return D.emit("pipe",U),G.flowing||(r("pipe resume"),U.resume()),D};function he(D){return function(){var U=D._readableState;r("pipeOnDrain",U.awaitDrain),U.awaitDrain&&U.awaitDrain--,U.awaitDrain===0&&c(D,"data")&&(U.flowing=!0,Y(D))}}E.prototype.unpipe=function(D){var B=this._readableState,U={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return D&&D!==B.pipes?this:(D||(D=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,D&&D.emit("unpipe",this,U),this);if(!D){var G=B.pipes,ee=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var q=0;q<ee;q++)G[q].emit("unpipe",this,{hasUnpiped:!1});return this}var J=L(B.pipes,D);return J===-1?this:(B.pipes.splice(J,1),B.pipesCount-=1,B.pipesCount===1&&(B.pipes=B.pipes[0]),D.emit("unpipe",this,U),this)},E.prototype.on=function(D,B){var U=l.prototype.on.call(this,D,B),G=this._readableState;return D==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):D==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,r("on readable",G.length,G.reading),G.length?F(this):G.reading||process.nextTick(fe,this)),U},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(D,B){var U=l.prototype.removeListener.call(this,D,B);return D==="readable"&&process.nextTick(de,this),U},E.prototype.removeAllListeners=function(D){var B=l.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&process.nextTick(de,this),B};function de(D){var B=D._readableState;B.readableListening=D.listenerCount("readable")>0,B.resumeScheduled&&!B.paused?B.flowing=!0:D.listenerCount("data")>0&&D.resume()}function fe(D){r("readable nexttick read 0"),D.read(0)}E.prototype.resume=function(){var D=this._readableState;return D.flowing||(r("resume"),D.flowing=!D.readableListening,ne(this,D)),D.paused=!1,this};function ne(D,B){B.resumeScheduled||(B.resumeScheduled=!0,process.nextTick(te,D,B))}function te(D,B){r("resume",B.reading),B.reading||D.read(0),B.resumeScheduled=!1,D.emit("resume"),Y(D),B.flowing&&!B.reading&&D.read(0)}E.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(D){var B=D._readableState;for(r("flow",B.flowing);B.flowing&&D.read()!==null;);}E.prototype.wrap=function(D){var B=this,U=this._readableState,G=!1;D.on("end",(function(){if(r("wrapped end"),U.decoder&&!U.ended){var J=U.decoder.end();J&&J.length&&B.push(J)}B.push(null)})),D.on("data",(function(J){if(r("wrapped data"),U.decoder&&(J=U.decoder.write(J)),!(U.objectMode&&J==null)&&!(!U.objectMode&&(!J||!J.length))){var pe=B.push(J);pe||(G=!0,D.pause())}}));for(var ee in D)this[ee]===void 0&&typeof D[ee]=="function"&&(this[ee]=(function(pe){return function(){return D[pe].apply(D,arguments)}})(ee));for(var q=0;q<C.length;q++)D.on(C[q],this.emit.bind(this,C[q]));return this._read=function(J){r("wrapped _read",J),G&&(G=!1,D.resume())},this},typeof Symbol=="function"&&(E.prototype[Symbol.asyncIterator]=function(){return R===void 0&&(R=u(4868)),R(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(B){this._readableState&&(this._readableState.flowing=B)}}),E._fromList=W,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function W(D,B){if(B.length===0)return null;var U;return B.objectMode?U=B.buffer.shift():!D||D>=B.length?(B.decoder?U=B.buffer.join(""):B.buffer.length===1?U=B.buffer.first():U=B.buffer.concat(B.length),B.buffer.clear()):U=B.buffer.consume(D,B.decoder),U}function ie(D){var B=D._readableState;r("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,process.nextTick($,B,D))}function $(D,B){if(r("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,B.readable=!1,B.emit("end"),D.autoDestroy)){var U=B._writableState;(!U||U.autoDestroy&&U.finished)&&B.destroy()}}typeof Symbol=="function"&&(E.from=function(D,B){return T===void 0&&(T=u(4659)),T(E,D,B)});function L(D,B){for(var U=0,G=D.length;U<G;U++)if(D[U]===B)return U;return-1}},2337:(S,_,u)=>{S.exports=a;var n=u(5500).F,t=n.ERR_METHOD_NOT_IMPLEMENTED,c=n.ERR_MULTIPLE_CALLBACK,l=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,m=n.ERR_TRANSFORM_WITH_LENGTH_0,o=u(2063);u(9598)(a,o);function i(p,f){var s=this._transformState;s.transforming=!1;var g=s.writecb;if(g===null)return this.emit("error",new c);s.writechunk=null,s.writecb=null,f!=null&&this.push(f),g(p);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function a(p){if(!(this instanceof a))return new a(p);o.call(this,p),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",e)}function e(){var p=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush((function(f,s){r(p,f,s)})):r(this,null,null)}a.prototype.push=function(p,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,p,f)},a.prototype._transform=function(p,f,s){s(new t("_transform()"))},a.prototype._write=function(p,f,s){var g=this._transformState;if(g.writecb=s,g.writechunk=p,g.writeencoding=f,!g.transforming){var h=this._readableState;(g.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},a.prototype._read=function(p){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(p,f){o.prototype._destroy.call(this,p,(function(s){f(s)}))};function r(p,f,s){if(f)return p.emit("error",f);if(s!=null&&p.push(s),p._writableState.length)throw new m;if(p._transformState.transforming)throw new l;return p.push(null)}},8797:(S,_,u)=>{S.exports=O;function n(Y,W,ie){this.chunk=Y,this.encoding=W,this.callback=ie,this.next=null}function t(Y){var W=this;this.next=null,this.entry=null,this.finish=function(){te(W,Y)}}var c;O.WritableState=C;var l={deprecate:u(2107)},m=u(3283),o=u(181).Buffer,i=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(Y){return o.from(Y)}function e(Y){return o.isBuffer(Y)||Y instanceof i}var r=u(5089),p=u(4874),f=p.getHighWaterMark,s=u(5500).F,g=s.ERR_INVALID_ARG_TYPE,h=s.ERR_METHOD_NOT_IMPLEMENTED,v=s.ERR_MULTIPLE_CALLBACK,b=s.ERR_STREAM_CANNOT_PIPE,d=s.ERR_STREAM_DESTROYED,w=s.ERR_STREAM_NULL_VALUES,k=s.ERR_STREAM_WRITE_AFTER_END,R=s.ERR_UNKNOWN_ENCODING,T=r.errorOrDestroy;u(9598)(O,m);function I(){}function C(Y,W,ie){c=c||u(2063),Y=Y||{},typeof ie!="boolean"&&(ie=W instanceof c),this.objectMode=!!Y.objectMode,ie&&(this.objectMode=this.objectMode||!!Y.writableObjectMode),this.highWaterMark=f(this,Y,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var $=Y.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=Y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){X(W,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Y.emitClose!==!1,this.autoDestroy=!!Y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}C.prototype.getBuffer=function(){for(var W=this.bufferedRequest,ie=[];W;)ie.push(W),W=W.next;return ie},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:l.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(O,Symbol.hasInstance,{value:function(W){return A.call(this,W)?!0:this!==O?!1:W&&W._writableState instanceof C}})):A=function(W){return W instanceof this};function O(Y){c=c||u(2063);var W=this instanceof c;if(!W&&!A.call(O,this))return new O(Y);this._writableState=new C(Y,this,W),this.writable=!0,Y&&(typeof Y.write=="function"&&(this._write=Y.write),typeof Y.writev=="function"&&(this._writev=Y.writev),typeof Y.destroy=="function"&&(this._destroy=Y.destroy),typeof Y.final=="function"&&(this._final=Y.final)),m.call(this)}O.prototype.pipe=function(){T(this,new b)};function E(Y,W){var ie=new k;T(Y,ie),process.nextTick(W,ie)}function P(Y,W,ie,$){var L;return ie===null?L=new w:typeof ie!="string"&&!W.objectMode&&(L=new g("chunk",["string","Buffer"],ie)),L?(T(Y,L),process.nextTick($,L),!1):!0}O.prototype.write=function(Y,W,ie){var $=this._writableState,L=!1,D=!$.objectMode&&e(Y);return D&&!o.isBuffer(Y)&&(Y=a(Y)),typeof W=="function"&&(ie=W,W=null),D?W="buffer":W||(W=$.defaultEncoding),typeof ie!="function"&&(ie=I),$.ending?E(this,ie):(D||P(this,$,Y,ie))&&($.pendingcb++,L=j(this,$,D,Y,W,ie)),L},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var Y=this._writableState;Y.corked&&(Y.corked--,!Y.writing&&!Y.corked&&!Y.bufferProcessing&&Y.bufferedRequest&&re(this,Y))},O.prototype.setDefaultEncoding=function(W){if(typeof W=="string"&&(W=W.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((W+"").toLowerCase())>-1))throw new R(W);return this._writableState.defaultEncoding=W,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(Y,W,ie){return!Y.objectMode&&Y.decodeStrings!==!1&&typeof W=="string"&&(W=o.from(W,ie)),W}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function j(Y,W,ie,$,L,D){if(!ie){var B=N(W,$,L);$!==B&&(ie=!0,L="buffer",$=B)}var U=W.objectMode?1:$.length;W.length+=U;var G=W.length<W.highWaterMark;if(G||(W.needDrain=!0),W.writing||W.corked){var ee=W.lastBufferedRequest;W.lastBufferedRequest={chunk:$,encoding:L,isBuf:ie,callback:D,next:null},ee?ee.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else M(Y,W,!1,U,$,L,D);return G}function M(Y,W,ie,$,L,D,B){W.writelen=$,W.writecb=B,W.writing=!0,W.sync=!0,W.destroyed?W.onwrite(new d("write")):ie?Y._writev(L,W.onwrite):Y._write(L,D,W.onwrite),W.sync=!1}function z(Y,W,ie,$,L){--W.pendingcb,ie?(process.nextTick(L,$),process.nextTick(fe,Y,W),Y._writableState.errorEmitted=!0,T(Y,$)):(L($),Y._writableState.errorEmitted=!0,T(Y,$),fe(Y,W))}function H(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}function X(Y,W){var ie=Y._writableState,$=ie.sync,L=ie.writecb;if(typeof L!="function")throw new v;if(H(ie),W)z(Y,ie,$,W,L);else{var D=oe(ie)||Y.destroyed;!D&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&re(Y,ie),$?process.nextTick(F,Y,ie,D,L):F(Y,ie,D,L)}}function F(Y,W,ie,$){ie||Z(Y,W),W.pendingcb--,$(),fe(Y,W)}function Z(Y,W){W.length===0&&W.needDrain&&(W.needDrain=!1,Y.emit("drain"))}function re(Y,W){W.bufferProcessing=!0;var ie=W.bufferedRequest;if(Y._writev&&ie&&ie.next){var $=W.bufferedRequestCount,L=new Array($),D=W.corkedRequestsFree;D.entry=ie;for(var B=0,U=!0;ie;)L[B]=ie,ie.isBuf||(U=!1),ie=ie.next,B+=1;L.allBuffers=U,M(Y,W,!0,W.length,L,"",D.finish),W.pendingcb++,W.lastBufferedRequest=null,D.next?(W.corkedRequestsFree=D.next,D.next=null):W.corkedRequestsFree=new t(W),W.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ee=ie.encoding,q=ie.callback,J=W.objectMode?1:G.length;if(M(Y,W,!1,J,G,ee,q),ie=ie.next,W.bufferedRequestCount--,W.writing)break}ie===null&&(W.lastBufferedRequest=null)}W.bufferedRequest=ie,W.bufferProcessing=!1}O.prototype._write=function(Y,W,ie){ie(new h("_write()"))},O.prototype._writev=null,O.prototype.end=function(Y,W,ie){var $=this._writableState;return typeof Y=="function"?(ie=Y,Y=null,W=null):typeof W=="function"&&(ie=W,W=null),Y!=null&&this.write(Y,W),$.corked&&($.corked=1,this.uncork()),$.ending||ne(this,$,ie),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function oe(Y){return Y.ending&&Y.length===0&&Y.bufferedRequest===null&&!Y.finished&&!Y.writing}function he(Y,W){Y._final((function(ie){W.pendingcb--,ie&&T(Y,ie),W.prefinished=!0,Y.emit("prefinish"),fe(Y,W)}))}function de(Y,W){!W.prefinished&&!W.finalCalled&&(typeof Y._final=="function"&&!W.destroyed?(W.pendingcb++,W.finalCalled=!0,process.nextTick(he,Y,W)):(W.prefinished=!0,Y.emit("prefinish")))}function fe(Y,W){var ie=oe(W);if(ie&&(de(Y,W),W.pendingcb===0&&(W.finished=!0,Y.emit("finish"),W.autoDestroy))){var $=Y._readableState;(!$||$.autoDestroy&&$.endEmitted)&&Y.destroy()}return ie}function ne(Y,W,ie){W.ending=!0,fe(Y,W),ie&&(W.finished?process.nextTick(ie):Y.once("finish",ie)),W.ended=!0,Y.writable=!1}function te(Y,W,ie){var $=Y.entry;for(Y.entry=null;$;){var L=$.callback;W.pendingcb--,L(ie),$=$.next}W.corkedRequestsFree.next=Y}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(W){this._writableState&&(this._writableState.destroyed=W)}}),O.prototype.destroy=r.destroy,O.prototype._undestroy=r.undestroy,O.prototype._destroy=function(Y,W){W(Y)}},4868:(S,_,u)=>{var n;function t(k,R,T){return R=c(R),R in k?Object.defineProperty(k,R,{value:T,enumerable:!0,configurable:!0,writable:!0}):k[R]=T,k}function c(k){var R=l(k,"string");return typeof R=="symbol"?R:String(R)}function l(k,R){if(typeof k!="object"||k===null)return k;var T=k[Symbol.toPrimitive];if(T!==void 0){var I=T.call(k,R||"default");if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(k)}var m=u(6815),o=Symbol("lastResolve"),i=Symbol("lastReject"),a=Symbol("error"),e=Symbol("ended"),r=Symbol("lastPromise"),p=Symbol("handlePromise"),f=Symbol("stream");function s(k,R){return{value:k,done:R}}function g(k){var R=k[o];if(R!==null){var T=k[f].read();T!==null&&(k[r]=null,k[o]=null,k[i]=null,R(s(T,!1)))}}function h(k){process.nextTick(g,k)}function v(k,R){return function(T,I){k.then((function(){if(R[e]){T(s(void 0,!0));return}R[p](T,I)}),I)}}var b=Object.getPrototypeOf((function(){})),d=Object.setPrototypeOf((n={get stream(){return this[f]},next:function(){var R=this,T=this[a];if(T!==null)return Promise.reject(T);if(this[e])return Promise.resolve(s(void 0,!0));if(this[f].destroyed)return new Promise((function(O,E){process.nextTick((function(){R[a]?E(R[a]):O(s(void 0,!0))}))}));var I=this[r],C;if(I)C=new Promise(v(I,this));else{var A=this[f].read();if(A!==null)return Promise.resolve(s(A,!1));C=new Promise(this[p])}return this[r]=C,C}},t(n,Symbol.asyncIterator,(function(){return this})),t(n,"return",(function(){var R=this;return new Promise((function(T,I){R[f].destroy(null,(function(C){if(C){I(C);return}T(s(void 0,!0))}))}))})),n),b),w=function(R){var T,I=Object.create(d,(T={},t(T,f,{value:R,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,i,{value:null,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,e,{value:R._readableState.endEmitted,writable:!0}),t(T,p,{value:function(A,O){var E=I[f].read();E?(I[r]=null,I[o]=null,I[i]=null,A(s(E,!1))):(I[o]=A,I[i]=O)},writable:!0}),T));return I[r]=null,m(R,(function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var A=I[i];A!==null&&(I[r]=null,I[o]=null,I[i]=null,A(C)),I[a]=C;return}var O=I[o];O!==null&&(I[r]=null,I[o]=null,I[i]=null,O(s(void 0,!0))),I[e]=!0})),R.on("readable",h.bind(null,I)),I};S.exports=w},7336:(S,_,u)=>{function n(h,v){var b=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);v&&(d=d.filter((function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable}))),b.push.apply(b,d)}return b}function t(h){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?n(Object(b),!0).forEach((function(d){c(h,d,b[d])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(b)):n(Object(b)).forEach((function(d){Object.defineProperty(h,d,Object.getOwnPropertyDescriptor(b,d))}))}return h}function c(h,v,b){return v=i(v),v in h?Object.defineProperty(h,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):h[v]=b,h}function l(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}function m(h,v){for(var b=0;b<v.length;b++){var d=v[b];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,i(d.key),d)}}function o(h,v,b){return v&&m(h.prototype,v),b&&m(h,b),Object.defineProperty(h,"prototype",{writable:!1}),h}function i(h){var v=a(h,"string");return typeof v=="symbol"?v:String(v)}function a(h,v){if(typeof h!="object"||h===null)return h;var b=h[Symbol.toPrimitive];if(b!==void 0){var d=b.call(h,v||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(h)}var e=u(181),r=e.Buffer,p=u(9023),f=p.inspect,s=f&&f.custom||"inspect";function g(h,v,b){r.prototype.copy.call(h,v,b)}S.exports=(function(){function h(){l(this,h),this.head=null,this.tail=null,this.length=0}return o(h,[{key:"push",value:function(b){var d={data:b,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(b){var d={data:b,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var d=this.head,w=""+d.data;d=d.next;)w+=b+d.data;return w}},{key:"concat",value:function(b){if(this.length===0)return r.alloc(0);for(var d=r.allocUnsafe(b>>>0),w=this.head,k=0;w;)g(w.data,d,k),k+=w.data.length,w=w.next;return d}},{key:"consume",value:function(b,d){var w;return b<this.head.data.length?(w=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?w=this.shift():w=d?this._getString(b):this._getBuffer(b),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var d=this.head,w=1,k=d.data;for(b-=k.length;d=d.next;){var R=d.data,T=b>R.length?R.length:b;if(T===R.length?k+=R:k+=R.slice(0,b),b-=T,b===0){T===R.length?(++w,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=R.slice(T));break}++w}return this.length-=w,k}},{key:"_getBuffer",value:function(b){var d=r.allocUnsafe(b),w=this.head,k=1;for(w.data.copy(d),b-=w.data.length;w=w.next;){var R=w.data,T=b>R.length?R.length:b;if(R.copy(d,d.length-b,0,T),b-=T,b===0){T===R.length?(++k,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=R.slice(T));break}++k}return this.length-=k,d}},{key:s,value:function(b,d){return f(this,t(t({},d),{},{depth:0,customInspect:!1}))}}]),h})()},5089:S=>{function _(m,o){var i=this,a=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return a||e?(o?o(m):m&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(c,this,m)):process.nextTick(c,this,m)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,(function(r){!o&&r?i._writableState?i._writableState.errorEmitted?process.nextTick(n,i):(i._writableState.errorEmitted=!0,process.nextTick(u,i,r)):process.nextTick(u,i,r):o?(process.nextTick(n,i),o(r)):process.nextTick(n,i)})),this)}function u(m,o){c(m,o),n(m)}function n(m){m._writableState&&!m._writableState.emitClose||m._readableState&&!m._readableState.emitClose||m.emit("close")}function t(){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 c(m,o){m.emit("error",o)}function l(m,o){var i=m._readableState,a=m._writableState;i&&i.autoDestroy||a&&a.autoDestroy?m.destroy(o):m.emit("error",o)}S.exports={destroy:_,undestroy:t,errorOrDestroy:l}},6815:(S,_,u)=>{var n=u(5500).F.ERR_STREAM_PREMATURE_CLOSE;function t(o){var i=!1;return function(){if(!i){i=!0;for(var a=arguments.length,e=new Array(a),r=0;r<a;r++)e[r]=arguments[r];o.apply(this,e)}}}function c(){}function l(o){return o.setHeader&&typeof o.abort=="function"}function m(o,i,a){if(typeof i=="function")return m(o,null,i);i||(i={}),a=t(a||c);var e=i.readable||i.readable!==!1&&o.readable,r=i.writable||i.writable!==!1&&o.writable,p=function(){o.writable||s()},f=o._writableState&&o._writableState.finished,s=function(){r=!1,f=!0,e||a.call(o)},g=o._readableState&&o._readableState.endEmitted,h=function(){e=!1,g=!0,r||a.call(o)},v=function(k){a.call(o,k)},b=function(){var k;if(e&&!g)return(!o._readableState||!o._readableState.ended)&&(k=new n),a.call(o,k);if(r&&!f)return(!o._writableState||!o._writableState.ended)&&(k=new n),a.call(o,k)},d=function(){o.req.on("finish",s)};return l(o)?(o.on("complete",s),o.on("abort",b),o.req?d():o.on("request",d)):r&&!o._writableState&&(o.on("end",p),o.on("close",p)),o.on("end",h),o.on("finish",s),i.error!==!1&&o.on("error",v),o.on("close",b),function(){o.removeListener("complete",s),o.removeListener("abort",b),o.removeListener("request",d),o.req&&o.req.removeListener("finish",s),o.removeListener("end",p),o.removeListener("close",p),o.removeListener("finish",s),o.removeListener("end",h),o.removeListener("error",v),o.removeListener("close",b)}}S.exports=m},4659:(S,_,u)=>{function n(r,p,f,s,g,h,v){try{var b=r[h](v),d=b.value}catch(w){f(w);return}b.done?p(d):Promise.resolve(d).then(s,g)}function t(r){return function(){var p=this,f=arguments;return new Promise((function(s,g){var h=r.apply(p,f);function v(d){n(h,s,g,v,b,"next",d)}function b(d){n(h,s,g,v,b,"throw",d)}v(void 0)}))}}function c(r,p){var f=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);p&&(s=s.filter((function(g){return Object.getOwnPropertyDescriptor(r,g).enumerable}))),f.push.apply(f,s)}return f}function l(r){for(var p=1;p<arguments.length;p++){var f=arguments[p]!=null?arguments[p]:{};p%2?c(Object(f),!0).forEach((function(s){m(r,s,f[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(f)):c(Object(f)).forEach((function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(f,s))}))}return r}function m(r,p,f){return p=o(p),p in r?Object.defineProperty(r,p,{value:f,enumerable:!0,configurable:!0,writable:!0}):r[p]=f,r}function o(r){var p=i(r,"string");return typeof p=="symbol"?p:String(p)}function i(r,p){if(typeof r!="object"||r===null)return r;var f=r[Symbol.toPrimitive];if(f!==void 0){var s=f.call(r,p||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(r)}var a=u(5500).F.ERR_INVALID_ARG_TYPE;function e(r,p,f){var s;if(p&&typeof p.next=="function")s=p;else if(p&&p[Symbol.asyncIterator])s=p[Symbol.asyncIterator]();else if(p&&p[Symbol.iterator])s=p[Symbol.iterator]();else throw new a("iterable",["Iterable"],p);var g=new r(l({objectMode:!0},f)),h=!1;g._read=function(){h||(h=!0,v())};function v(){return b.apply(this,arguments)}function b(){return b=t((function*(){try{var d=yield s.next(),w=d.value,k=d.done;k?g.push(null):g.push(yield w)?v():h=!1}catch(R){g.destroy(R)}})),b.apply(this,arguments)}return g}S.exports=e},6701:(S,_,u)=>{var n;function t(s){var g=!1;return function(){g||(g=!0,s.apply(void 0,arguments))}}var c=u(5500).F,l=c.ERR_MISSING_ARGS,m=c.ERR_STREAM_DESTROYED;function o(s){if(s)throw s}function i(s){return s.setHeader&&typeof s.abort=="function"}function a(s,g,h,v){v=t(v);var b=!1;s.on("close",(function(){b=!0})),n===void 0&&(n=u(6815)),n(s,{readable:g,writable:h},(function(w){if(w)return v(w);b=!0,v()}));var d=!1;return function(w){if(!b&&!d){if(d=!0,i(s))return s.abort();if(typeof s.destroy=="function")return s.destroy();v(w||new m("pipe"))}}}function e(s){s()}function r(s,g){return s.pipe(g)}function p(s){return!s.length||typeof s[s.length-1]!="function"?o:s.pop()}function f(){for(var s=arguments.length,g=new Array(s),h=0;h<s;h++)g[h]=arguments[h];var v=p(g);if(Array.isArray(g[0])&&(g=g[0]),g.length<2)throw new l("streams");var b,d=g.map((function(w,k){var R=k<g.length-1,T=k>0;return a(w,R,T,(function(I){b||(b=I),I&&d.forEach(e),!R&&(d.forEach(e),v(b))}))}));return g.reduce(r)}S.exports=f},4874:(S,_,u)=>{var n=u(5500).F.ERR_INVALID_OPT_VALUE;function t(l,m,o){return l.highWaterMark!=null?l.highWaterMark:m?l[o]:null}function c(l,m,o,i){var a=t(m,i,o);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var e=i?o:"highWaterMark";throw new n(e,a)}return Math.floor(a)}return l.objectMode?16:16*1024}S.exports={getHighWaterMark:c}},3283:(S,_,u)=>{S.exports=u(2203)},6131:(S,_,u)=>{var n=u(2203);process.env.READABLE_STREAM==="disable"&&n?(S.exports=n.Readable,Object.assign(S.exports,n),S.exports.Stream=n):(_=S.exports=u(6893),_.Stream=n||_,_.Readable=_,_.Writable=u(8797),_.Duplex=u(2063),_.Transform=u(2337),_.PassThrough=u(5283),_.finished=u(6815),_.pipeline=u(6701))},3058:(S,_,u)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=u(181),t=n.Buffer;function c(m,o){for(var i in m)o[i]=m[i]}t.from&&t.alloc&&t.allocUnsafe&&t.allocUnsafeSlow?S.exports=n:(c(n,_),_.Buffer=l);function l(m,o,i){return t(m,o,i)}l.prototype=Object.create(t.prototype),c(t,l),l.from=function(m,o,i){if(typeof m=="number")throw new TypeError("Argument must not be a number");return t(m,o,i)},l.alloc=function(m,o,i){if(typeof m!="number")throw new TypeError("Argument must be a number");var a=t(m);return o!==void 0?typeof i=="string"?a.fill(o,i):a.fill(o):a.fill(0),a},l.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return t(m)},l.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(m)}},2803:(S,_,u)=>{var n=u(181),t=n.Buffer,c={},l;for(l in n)n.hasOwnProperty(l)&&(l==="SlowBuffer"||l==="Buffer"||(c[l]=n[l]));var m=c.Buffer={};for(l in t)t.hasOwnProperty(l)&&(l==="allocUnsafe"||l==="allocUnsafeSlow"||(m[l]=t[l]));if(c.Buffer.prototype=t.prototype,(!m.from||m.from===Uint8Array.from)&&(m.from=function(o,i,a){if(typeof o=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof o);if(o&&typeof o.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);return t(o,i,a)}),m.alloc||(m.alloc=function(o,i,a){if(typeof o!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof o);if(o<0||o>=2*(1<<30))throw new RangeError('The value "'+o+'" is invalid for option "size"');var e=t(o);return!i||i.length===0?e.fill(0):typeof a=="string"?e.fill(i,a):e.fill(i),e}),!c.kStringMaxLength)try{c.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}c.constants||(c.constants={MAX_LENGTH:c.kMaxLength},c.kStringMaxLength&&(c.constants.MAX_STRING_LENGTH=c.kStringMaxLength)),S.exports=c},7686:(S,_,u)=>{var n=u(8542);function t(l){var m=parseInt(l[0],16);return m<8?l:(m-=8,m.toString()+l.substring(1))}function c(l){return l==="sha256"?n.md.sha256.create():n.md.sha1.create()}_.generate=function(m,o,i){typeof m=="function"?(i=m,m=void 0):typeof o=="function"&&(i=o,o={}),o=o||{};var a=function(p){var f=n.pki.createCertificate();f.serialNumber=t(n.util.bytesToHex(n.random.getBytesSync(9))),f.validity.notBefore=o.notBeforeDate||new Date;var s=new Date;f.validity.notAfter=s,f.validity.notAfter.setDate(s.getDate()+(o.days||365)),m=m||[{name:"commonName",value:"example.org"},{name:"countryName",value:"US"},{shortName:"ST",value:"Virginia"},{name:"localityName",value:"Blacksburg"},{name:"organizationName",value:"Test"},{shortName:"OU",value:"Test"}],f.setSubject(m),f.setIssuer(m),f.publicKey=p.publicKey,f.setExtensions(o.extensions||[{name:"basicConstraints",cA:!0},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},{name:"subjectAltName",altNames:[{type:6,value:"http://example.org/webid#me"}]}]),f.sign(p.privateKey,c(o&&o.algorithm));const g=n.md.sha1.create().update(n.asn1.toDer(n.pki.certificateToAsn1(f)).getBytes()).digest().toHex().match(/.{2}/g).join(":");var h={private:n.pki.privateKeyToPem(p.privateKey),public:n.pki.publicKeyToPem(p.publicKey),cert:n.pki.certificateToPem(f),fingerprint:g};if(o&&o.pkcs7){var v=n.pkcs7.createSignedData();v.addCertificate(f),h.pkcs7=n.pkcs7.messageToPem(v)}if(o&&o.clientCertificate){var b=n.pki.rsa.generateKeyPair(o.clientCertificateKeySize||1024),d=n.pki.createCertificate();d.serialNumber=t(n.util.bytesToHex(n.random.getBytesSync(9))),d.validity.notBefore=new Date,d.validity.notAfter=new Date,d.validity.notAfter.setFullYear(d.validity.notBefore.getFullYear()+1);for(var w=JSON.parse(JSON.stringify(m)),k=0;k<w.length;k++)w[k].name==="commonName"&&(o.clientCertificateCN?w[k]={name:"commonName",value:o.clientCertificateCN}:w[k]={name:"commonName",value:"John Doe jdoe123"});if(d.setSubject(w),d.setIssuer(m),d.publicKey=b.publicKey,d.sign(p.privateKey),h.clientprivate=n.pki.privateKeyToPem(b.privateKey),h.clientpublic=n.pki.publicKeyToPem(b.publicKey),h.clientcert=n.pki.certificateToPem(d),o.pkcs7){var R=n.pkcs7.createSignedData();R.addCertificate(d),h.clientpkcs7=n.pkcs7.messageToPem(R)}}var T=n.pki.createCaStore();T.addCertificate(f);try{n.pki.verifyCertificateChain(T,[f],(function(I,C,A){if(I!==!0)throw new Error("Certificate could not be verified.");return!0}))}catch(I){throw new Error(I)}return h},e=o.keySize||1024;if(i)return n.pki.rsa.generateKeyPair({bits:e},(function(p,f){if(p)return i(p);try{return i(null,a(f))}catch(s){return i(s)}}));var r=o.keyPair?{privateKey:n.pki.privateKeyFromPem(o.keyPair.privateKey),publicKey:n.pki.publicKeyFromPem(o.keyPair.publicKey)}:n.pki.rsa.generateKeyPair(e);return a(r)}},814:(S,_,u)=>{/*!
|
|
296
296
|
* send
|
|
297
297
|
* Copyright(c) 2012 TJ Holowaychuk
|
|
298
298
|
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|
@@ -349,7 +349,7 @@ Minimum version required to store current data is: `+P+`.
|
|
|
349
349
|
* Copyright(c) 2014 Jonathan Ong
|
|
350
350
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
351
351
|
* MIT Licensed
|
|
352
|
-
*/var n=u(827),t=u(4096);S.exports=m,S.exports.is=c,S.exports.hasBody=l,S.exports.normalize=o,S.exports.match=i;function c(r,p){var f,s=p,g=e(r);if(!g)return!1;if(s&&!Array.isArray(s))for(s=new Array(arguments.length-1),f=0;f<s.length;f++)s[f]=arguments[f+1];if(!s||!s.length)return g;var h;for(f=0;f<s.length;f++)if(i(o(h=s[f]),g))return h[0]==="+"||h.indexOf("*")!==-1?g:h;return!1}function l(r){return r.headers["transfer-encoding"]!==void 0||!isNaN(r.headers["content-length"])}function m(r,p){var f=p;if(!l(r))return null;if(arguments.length>2){f=new Array(arguments.length-1);for(var s=0;s<f.length;s++)f[s]=arguments[s+1]}var g=r.headers["content-type"];return c(g,f)}function o(r){if(typeof r!="string")return!1;switch(r){case"urlencoded":return"application/x-www-form-urlencoded";case"multipart":return"multipart/*"}return r[0]==="+"?"*/*"+r:r.indexOf("/")===-1?t.lookup(r):r}function i(r,p){if(r===!1)return!1;var f=p.split("/"),s=r.split("/");return f.length!==2||s.length!==2||s[0]!=="*"&&s[0]!==f[0]?!1:s[1].substr(0,2)==="*+"?s[1].length<=f[1].length+1&&s[1].substr(1)===f[1].substr(1-s[1].length):!(s[1]!=="*"&&s[1]!==f[1])}function a(r){var p=n.parse(r);return p.parameters=void 0,n.format(p)}function e(r){if(!r)return null;try{return a(r)}catch{return null}}},4698:(S,_)=>{var u=void 0,n=1e5,t=(function(){var F=Object.prototype.toString,Z=Object.prototype.hasOwnProperty;return{Class:function(re){return F.call(re).replace(/^\[object *|\]$/g,"")},HasProperty:function(re,oe){return oe in re},HasOwnProperty:function(re,oe){return Z.call(re,oe)},IsCallable:function(re){return typeof re=="function"},ToInt32:function(re){return re>>0},ToUint32:function(re){return re>>>0}}})(),c=Math.LN2,l=Math.abs,m=Math.floor,o=Math.log,i=Math.min,a=Math.pow,e=Math.round;function r(F){if(f&&p){var Z=f(F),re;for(re=0;re<Z.length;re+=1)p(F,Z[re],{value:F[Z[re]],writable:!1,enumerable:!1,configurable:!1})}}var p;Object.defineProperty&&(function(){try{return Object.defineProperty({},"x",{}),!0}catch{return!1}})()?p=Object.defineProperty:p=function(F,Z,re){if(!F===Object(F))throw new TypeError("Object.defineProperty called on non-object");return t.HasProperty(re,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(F,Z,re.get),t.HasProperty(re,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(F,Z,re.set),t.HasProperty(re,"value")&&(F[Z]=re.value),F};var f=Object.getOwnPropertyNames||function(F){if(F!==Object(F))throw new TypeError("Object.getOwnPropertyNames called on non-object");var Z=[],re;for(re in F)t.HasOwnProperty(F,re)&&Z.push(re);return Z};function s(F){if(!p)return;if(F.length>n)throw new RangeError("Array too large for polyfill");function Z(oe){p(F,oe,{get:function(){return F._getter(oe)},set:function(he){F._setter(oe,he)},enumerable:!0,configurable:!1})}var re;for(re=0;re<F.length;re+=1)Z(re)}function g(F,Z){var re=32-Z;return F<<re>>re}function h(F,Z){var re=32-Z;return F<<re>>>re}function v(F){return[F&255]}function b(F){return g(F[0],8)}function d(F){return[F&255]}function w(F){return h(F[0],8)}function k(F){return F=e(Number(F)),[F<0?0:F>255?255:F&255]}function R(F){return[F>>8&255,F&255]}function T(F){return g(F[0]<<8|F[1],16)}function I(F){return[F>>8&255,F&255]}function C(F){return h(F[0]<<8|F[1],16)}function A(F){return[F>>24&255,F>>16&255,F>>8&255,F&255]}function O(F){return g(F[0]<<24|F[1]<<16|F[2]<<8|F[3],32)}function E(F){return[F>>24&255,F>>16&255,F>>8&255,F&255]}function P(F){return h(F[0]<<24|F[1]<<16|F[2]<<8|F[3],32)}function N(F,Z,re){var oe=(1<<Z-1)-1,he,de,fe,ne,te,Y,W,ie;function $(L){var D=m(L),B=L-D;return B<.5?D:B>.5||D%2?D+1:D}for(F!==F?(de=(1<<Z)-1,fe=a(2,re-1),he=0):F===1/0||F===-1/0?(de=(1<<Z)-1,fe=0,he=F<0?1:0):F===0?(de=0,fe=0,he=1/F===-1/0?1:0):(he=F<0,F=l(F),F>=a(2,1-oe)?(de=i(m(o(F)/c),1023),fe=$(F/a(2,de)*a(2,re)),fe/a(2,re)>=2&&(de=de+1,fe=1),de>oe?(de=(1<<Z)-1,fe=0):(de=de+oe,fe=fe-a(2,re))):(de=0,fe=$(F/a(2,1-oe-re)))),Y=[],te=re;te;te-=1)Y.push(fe%2?1:0),fe=m(fe/2);for(te=Z;te;te-=1)Y.push(de%2?1:0),de=m(de/2);for(Y.push(he?1:0),Y.reverse(),W=Y.join(""),ie=[];W.length;)ie.push(parseInt(W.substring(0,8),2)),W=W.substring(8);return ie}function j(F,Z,re){var oe=[],he,de,fe,ne,te,Y,W,ie;for(he=F.length;he;he-=1)for(fe=F[he-1],de=8;de;de-=1)oe.push(fe%2?1:0),fe=fe>>1;return oe.reverse(),ne=oe.join(""),te=(1<<Z-1)-1,Y=parseInt(ne.substring(0,1),2)?-1:1,W=parseInt(ne.substring(1,1+Z),2),ie=parseInt(ne.substring(1+Z),2),W===(1<<Z)-1?ie!==0?NaN:Y*(1/0):W>0?Y*a(2,W-te)*(1+ie/a(2,re)):ie!==0?Y*a(2,-(te-1))*(ie/a(2,re)):Y<0?-0:0}function M(F){return j(F,11,52)}function z(F){return N(F,11,52)}function H(F){return j(F,8,23)}function X(F){return N(F,8,23)}(function(){var F=function(L){if(L=t.ToInt32(L),L<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=L,this._bytes=[],this._bytes.length=L;var D;for(D=0;D<this.byteLength;D+=1)this._bytes[D]=0;r(this)};_.Az=_.Az||F;var Z=function(){};function re($,L,D){var B;return B=function(U,G,ee){var q,J,pe,ue;if(!arguments.length||typeof arguments[0]=="number"){if(this.length=t.ToInt32(arguments[0]),ee<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new F(this.byteLength),this.byteOffset=0}else if(typeof arguments[0]=="object"&&arguments[0].constructor===B)for(q=arguments[0],this.length=q.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new F(this.byteLength),this.byteOffset=0,pe=0;pe<this.length;pe+=1)this._setter(pe,q._getter(pe));else if(typeof arguments[0]=="object"&&!(arguments[0]instanceof F||t.Class(arguments[0])==="ArrayBuffer"))for(J=arguments[0],this.length=t.ToUint32(J.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new F(this.byteLength),this.byteOffset=0,pe=0;pe<this.length;pe+=1)ue=J[pe],this._setter(pe,Number(ue));else if(typeof arguments[0]=="object"&&(arguments[0]instanceof F||t.Class(arguments[0])==="ArrayBuffer")){if(this.buffer=U,this.byteOffset=t.ToUint32(G),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=t.ToUint32(ee),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else throw new TypeError("Unexpected argument type(s)");this.constructor=B,r(this),s(this)},B.prototype=new Z,B.prototype.BYTES_PER_ELEMENT=$,B.prototype._pack=L,B.prototype._unpack=D,B.BYTES_PER_ELEMENT=$,B.prototype._getter=function(U){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(U=t.ToUint32(U),U>=this.length)return u;var G=[],ee,q;for(ee=0,q=this.byteOffset+U*this.BYTES_PER_ELEMENT;ee<this.BYTES_PER_ELEMENT;ee+=1,q+=1)G.push(this.buffer._bytes[q]);return this._unpack(G)},B.prototype.get=B.prototype._getter,B.prototype._setter=function(U,G){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if(U=t.ToUint32(U),U>=this.length)return u;var ee=this._pack(G),q,J;for(q=0,J=this.byteOffset+U*this.BYTES_PER_ELEMENT;q<this.BYTES_PER_ELEMENT;q+=1,J+=1)this.buffer._bytes[J]=ee[q]},B.prototype.set=function(U,G){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var ee,q,J,pe,ue,ae,me,be,ye,_e;if(typeof arguments[0]=="object"&&arguments[0].constructor===this.constructor){if(ee=arguments[0],J=t.ToUint32(arguments[1]),J+ee.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(be=this.byteOffset+J*this.BYTES_PER_ELEMENT,ye=ee.length*this.BYTES_PER_ELEMENT,ee.buffer===this.buffer){for(_e=[],ue=0,ae=ee.byteOffset;ue<ye;ue+=1,ae+=1)_e[ue]=ee.buffer._bytes[ae];for(ue=0,me=be;ue<ye;ue+=1,me+=1)this.buffer._bytes[me]=_e[ue]}else for(ue=0,ae=ee.byteOffset,me=be;ue<ye;ue+=1,ae+=1,me+=1)this.buffer._bytes[me]=ee.buffer._bytes[ae]}else if(typeof arguments[0]=="object"&&typeof arguments[0].length<"u"){if(q=arguments[0],pe=t.ToUint32(q.length),J=t.ToUint32(arguments[1]),J+pe>this.length)throw new RangeError("Offset plus length of array is out of range");for(ue=0;ue<pe;ue+=1)ae=q[ue],this._setter(J+ue,Number(ae))}else throw new TypeError("Unexpected argument type(s)")},B.prototype.subarray=function(U,G){function ee(J,pe,ue){return J<pe?pe:J>ue?ue:J}U=t.ToInt32(U),G=t.ToInt32(G),arguments.length<1&&(U=0),arguments.length<2&&(G=this.length),U<0&&(U=this.length+U),G<0&&(G=this.length+G),U=ee(U,0,this.length),G=ee(G,0,this.length);var q=G-U;return q<0&&(q=0),new this.constructor(this.buffer,this.byteOffset+U*this.BYTES_PER_ELEMENT,q)},B}var oe=re(1,v,b),he=re(1,d,w),de=re(1,k,w),fe=re(2,R,T),ne=re(2,I,C),te=re(4,A,O),Y=re(4,E,P),W=re(4,X,H),ie=re(8,z,M);_.fo=_.fo||oe,_.SE=_.SE||he,_.ER=_.ER||de,_.ss=_.ss||fe,_.hR=_.hR||ne,_.GM=_.GM||te,_.bt=_.bt||Y,_.l6=_.l6||W,_.aQ=_.aQ||ie})(),(function(){function F(de,fe){return t.IsCallable(de.get)?de.get(fe):de[fe]}var Z=(function(){var de=new _.hR([4660]),fe=new _.SE(de.buffer);return F(fe,0)===18})(),re=function(fe,ne,te){if(arguments.length===0)fe=new _.Az(0);else if(!(fe instanceof _.Az||t.Class(fe)==="ArrayBuffer"))throw new TypeError("TypeError");if(this.buffer=fe||new _.Az(0),this.byteOffset=t.ToUint32(ne),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=t.ToUint32(te),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");r(this)};function oe(de){return function(fe,ne){if(fe=t.ToUint32(fe),fe+de.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");fe+=this.byteOffset;var te=new _.SE(this.buffer,fe,de.BYTES_PER_ELEMENT),Y=[],W;for(W=0;W<de.BYTES_PER_ELEMENT;W+=1)Y.push(F(te,W));return!!ne==!!Z&&Y.reverse(),F(new de(new _.SE(Y).buffer),0)}}re.prototype.getUint8=oe(_.SE),re.prototype.getInt8=oe(_.fo),re.prototype.getUint16=oe(_.hR),re.prototype.getInt16=oe(_.ss),re.prototype.getUint32=oe(_.bt),re.prototype.getInt32=oe(_.GM),re.prototype.getFloat32=oe(_.l6),re.prototype.getFloat64=oe(_.aQ);function he(de){return function(fe,ne,te){if(fe=t.ToUint32(fe),fe+de.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var Y=new de([ne]),W=new _.SE(Y.buffer),ie=[],$,L;for($=0;$<de.BYTES_PER_ELEMENT;$+=1)ie.push(F(W,$));!!te==!!Z&&ie.reverse(),L=new _.SE(this.buffer,fe,de.BYTES_PER_ELEMENT),L.set(ie)}}re.prototype.setUint8=he(_.SE),re.prototype.setInt8=he(_.fo),re.prototype.setUint16=he(_.hR),re.prototype.setInt16=he(_.ss),re.prototype.setUint32=he(_.bt),re.prototype.setInt32=he(_.GM),re.prototype.setFloat32=he(_.l6),re.prototype.setFloat64=he(_.aQ),_.U$=_.U$||re})()},6367:S=>{/*!
|
|
352
|
+
*/var n=u(827),t=u(4096);S.exports=m,S.exports.is=c,S.exports.hasBody=l,S.exports.normalize=o,S.exports.match=i;function c(r,p){var f,s=p,g=e(r);if(!g)return!1;if(s&&!Array.isArray(s))for(s=new Array(arguments.length-1),f=0;f<s.length;f++)s[f]=arguments[f+1];if(!s||!s.length)return g;var h;for(f=0;f<s.length;f++)if(i(o(h=s[f]),g))return h[0]==="+"||h.indexOf("*")!==-1?g:h;return!1}function l(r){return r.headers["transfer-encoding"]!==void 0||!isNaN(r.headers["content-length"])}function m(r,p){var f=p;if(!l(r))return null;if(arguments.length>2){f=new Array(arguments.length-1);for(var s=0;s<f.length;s++)f[s]=arguments[s+1]}var g=r.headers["content-type"];return c(g,f)}function o(r){if(typeof r!="string")return!1;switch(r){case"urlencoded":return"application/x-www-form-urlencoded";case"multipart":return"multipart/*"}return r[0]==="+"?"*/*"+r:r.indexOf("/")===-1?t.lookup(r):r}function i(r,p){if(r===!1)return!1;var f=p.split("/"),s=r.split("/");return f.length!==2||s.length!==2||s[0]!=="*"&&s[0]!==f[0]?!1:s[1].substr(0,2)==="*+"?s[1].length<=f[1].length+1&&s[1].substr(1)===f[1].substr(1-s[1].length):!(s[1]!=="*"&&s[1]!==f[1])}function a(r){var p=n.parse(r);return p.parameters=void 0,n.format(p)}function e(r){if(!r)return null;try{return a(r)}catch{return null}}},4698:(S,_)=>{var u=void 0,n=1e5,t=(function(){var F=Object.prototype.toString,Z=Object.prototype.hasOwnProperty;return{Class:function(re){return F.call(re).replace(/^\[object *|\]$/g,"")},HasProperty:function(re,oe){return oe in re},HasOwnProperty:function(re,oe){return Z.call(re,oe)},IsCallable:function(re){return typeof re=="function"},ToInt32:function(re){return re>>0},ToUint32:function(re){return re>>>0}}})(),c=Math.LN2,l=Math.abs,m=Math.floor,o=Math.log,i=Math.min,a=Math.pow,e=Math.round;function r(F){if(f&&p){var Z=f(F),re;for(re=0;re<Z.length;re+=1)p(F,Z[re],{value:F[Z[re]],writable:!1,enumerable:!1,configurable:!1})}}var p;Object.defineProperty&&(function(){try{return Object.defineProperty({},"x",{}),!0}catch{return!1}})()?p=Object.defineProperty:p=function(F,Z,re){if(!F===Object(F))throw new TypeError("Object.defineProperty called on non-object");return t.HasProperty(re,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(F,Z,re.get),t.HasProperty(re,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(F,Z,re.set),t.HasProperty(re,"value")&&(F[Z]=re.value),F};var f=Object.getOwnPropertyNames||function(F){if(F!==Object(F))throw new TypeError("Object.getOwnPropertyNames called on non-object");var Z=[],re;for(re in F)t.HasOwnProperty(F,re)&&Z.push(re);return Z};function s(F){if(!p)return;if(F.length>n)throw new RangeError("Array too large for polyfill");function Z(oe){p(F,oe,{get:function(){return F._getter(oe)},set:function(he){F._setter(oe,he)},enumerable:!0,configurable:!1})}var re;for(re=0;re<F.length;re+=1)Z(re)}function g(F,Z){var re=32-Z;return F<<re>>re}function h(F,Z){var re=32-Z;return F<<re>>>re}function v(F){return[F&255]}function b(F){return g(F[0],8)}function d(F){return[F&255]}function w(F){return h(F[0],8)}function k(F){return F=e(Number(F)),[F<0?0:F>255?255:F&255]}function R(F){return[F>>8&255,F&255]}function T(F){return g(F[0]<<8|F[1],16)}function I(F){return[F>>8&255,F&255]}function C(F){return h(F[0]<<8|F[1],16)}function A(F){return[F>>24&255,F>>16&255,F>>8&255,F&255]}function O(F){return g(F[0]<<24|F[1]<<16|F[2]<<8|F[3],32)}function E(F){return[F>>24&255,F>>16&255,F>>8&255,F&255]}function P(F){return h(F[0]<<24|F[1]<<16|F[2]<<8|F[3],32)}function N(F,Z,re){var oe=(1<<Z-1)-1,he,de,fe,ne,te,Y,W,ie;function $(L){var D=m(L),B=L-D;return B<.5?D:B>.5||D%2?D+1:D}for(F!==F?(de=(1<<Z)-1,fe=a(2,re-1),he=0):F===1/0||F===-1/0?(de=(1<<Z)-1,fe=0,he=F<0?1:0):F===0?(de=0,fe=0,he=1/F===-1/0?1:0):(he=F<0,F=l(F),F>=a(2,1-oe)?(de=i(m(o(F)/c),1023),fe=$(F/a(2,de)*a(2,re)),fe/a(2,re)>=2&&(de=de+1,fe=1),de>oe?(de=(1<<Z)-1,fe=0):(de=de+oe,fe=fe-a(2,re))):(de=0,fe=$(F/a(2,1-oe-re)))),Y=[],te=re;te;te-=1)Y.push(fe%2?1:0),fe=m(fe/2);for(te=Z;te;te-=1)Y.push(de%2?1:0),de=m(de/2);for(Y.push(he?1:0),Y.reverse(),W=Y.join(""),ie=[];W.length;)ie.push(parseInt(W.substring(0,8),2)),W=W.substring(8);return ie}function j(F,Z,re){var oe=[],he,de,fe,ne,te,Y,W,ie;for(he=F.length;he;he-=1)for(fe=F[he-1],de=8;de;de-=1)oe.push(fe%2?1:0),fe=fe>>1;return oe.reverse(),ne=oe.join(""),te=(1<<Z-1)-1,Y=parseInt(ne.substring(0,1),2)?-1:1,W=parseInt(ne.substring(1,1+Z),2),ie=parseInt(ne.substring(1+Z),2),W===(1<<Z)-1?ie!==0?NaN:Y*(1/0):W>0?Y*a(2,W-te)*(1+ie/a(2,re)):ie!==0?Y*a(2,-(te-1))*(ie/a(2,re)):Y<0?-0:0}function M(F){return j(F,11,52)}function z(F){return N(F,11,52)}function H(F){return j(F,8,23)}function X(F){return N(F,8,23)}(function(){var F=function(L){if(L=t.ToInt32(L),L<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=L,this._bytes=[],this._bytes.length=L;var D;for(D=0;D<this.byteLength;D+=1)this._bytes[D]=0;r(this)};_.Az=_.Az||F;var Z=function(){};function re($,L,D){var B;return B=function(U,G,ee){var q,J,pe,ue;if(!arguments.length||typeof arguments[0]=="number"){if(this.length=t.ToInt32(arguments[0]),ee<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new F(this.byteLength),this.byteOffset=0}else if(typeof arguments[0]=="object"&&arguments[0].constructor===B)for(q=arguments[0],this.length=q.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new F(this.byteLength),this.byteOffset=0,pe=0;pe<this.length;pe+=1)this._setter(pe,q._getter(pe));else if(typeof arguments[0]=="object"&&!(arguments[0]instanceof F||t.Class(arguments[0])==="ArrayBuffer"))for(J=arguments[0],this.length=t.ToUint32(J.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new F(this.byteLength),this.byteOffset=0,pe=0;pe<this.length;pe+=1)ue=J[pe],this._setter(pe,Number(ue));else if(typeof arguments[0]=="object"&&(arguments[0]instanceof F||t.Class(arguments[0])==="ArrayBuffer")){if(this.buffer=U,this.byteOffset=t.ToUint32(G),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=t.ToUint32(ee),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else throw new TypeError("Unexpected argument type(s)");this.constructor=B,r(this),s(this)},B.prototype=new Z,B.prototype.BYTES_PER_ELEMENT=$,B.prototype._pack=L,B.prototype._unpack=D,B.BYTES_PER_ELEMENT=$,B.prototype._getter=function(U){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(U=t.ToUint32(U),U>=this.length)return u;var G=[],ee,q;for(ee=0,q=this.byteOffset+U*this.BYTES_PER_ELEMENT;ee<this.BYTES_PER_ELEMENT;ee+=1,q+=1)G.push(this.buffer._bytes[q]);return this._unpack(G)},B.prototype.get=B.prototype._getter,B.prototype._setter=function(U,G){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if(U=t.ToUint32(U),U>=this.length)return u;var ee=this._pack(G),q,J;for(q=0,J=this.byteOffset+U*this.BYTES_PER_ELEMENT;q<this.BYTES_PER_ELEMENT;q+=1,J+=1)this.buffer._bytes[J]=ee[q]},B.prototype.set=function(U,G){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var ee,q,J,pe,ue,ae,me,be,ye,xe;if(typeof arguments[0]=="object"&&arguments[0].constructor===this.constructor){if(ee=arguments[0],J=t.ToUint32(arguments[1]),J+ee.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(be=this.byteOffset+J*this.BYTES_PER_ELEMENT,ye=ee.length*this.BYTES_PER_ELEMENT,ee.buffer===this.buffer){for(xe=[],ue=0,ae=ee.byteOffset;ue<ye;ue+=1,ae+=1)xe[ue]=ee.buffer._bytes[ae];for(ue=0,me=be;ue<ye;ue+=1,me+=1)this.buffer._bytes[me]=xe[ue]}else for(ue=0,ae=ee.byteOffset,me=be;ue<ye;ue+=1,ae+=1,me+=1)this.buffer._bytes[me]=ee.buffer._bytes[ae]}else if(typeof arguments[0]=="object"&&typeof arguments[0].length<"u"){if(q=arguments[0],pe=t.ToUint32(q.length),J=t.ToUint32(arguments[1]),J+pe>this.length)throw new RangeError("Offset plus length of array is out of range");for(ue=0;ue<pe;ue+=1)ae=q[ue],this._setter(J+ue,Number(ae))}else throw new TypeError("Unexpected argument type(s)")},B.prototype.subarray=function(U,G){function ee(J,pe,ue){return J<pe?pe:J>ue?ue:J}U=t.ToInt32(U),G=t.ToInt32(G),arguments.length<1&&(U=0),arguments.length<2&&(G=this.length),U<0&&(U=this.length+U),G<0&&(G=this.length+G),U=ee(U,0,this.length),G=ee(G,0,this.length);var q=G-U;return q<0&&(q=0),new this.constructor(this.buffer,this.byteOffset+U*this.BYTES_PER_ELEMENT,q)},B}var oe=re(1,v,b),he=re(1,d,w),de=re(1,k,w),fe=re(2,R,T),ne=re(2,I,C),te=re(4,A,O),Y=re(4,E,P),W=re(4,X,H),ie=re(8,z,M);_.fo=_.fo||oe,_.SE=_.SE||he,_.ER=_.ER||de,_.ss=_.ss||fe,_.hR=_.hR||ne,_.GM=_.GM||te,_.bt=_.bt||Y,_.l6=_.l6||W,_.aQ=_.aQ||ie})(),(function(){function F(de,fe){return t.IsCallable(de.get)?de.get(fe):de[fe]}var Z=(function(){var de=new _.hR([4660]),fe=new _.SE(de.buffer);return F(fe,0)===18})(),re=function(fe,ne,te){if(arguments.length===0)fe=new _.Az(0);else if(!(fe instanceof _.Az||t.Class(fe)==="ArrayBuffer"))throw new TypeError("TypeError");if(this.buffer=fe||new _.Az(0),this.byteOffset=t.ToUint32(ne),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=t.ToUint32(te),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");r(this)};function oe(de){return function(fe,ne){if(fe=t.ToUint32(fe),fe+de.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");fe+=this.byteOffset;var te=new _.SE(this.buffer,fe,de.BYTES_PER_ELEMENT),Y=[],W;for(W=0;W<de.BYTES_PER_ELEMENT;W+=1)Y.push(F(te,W));return!!ne==!!Z&&Y.reverse(),F(new de(new _.SE(Y).buffer),0)}}re.prototype.getUint8=oe(_.SE),re.prototype.getInt8=oe(_.fo),re.prototype.getUint16=oe(_.hR),re.prototype.getInt16=oe(_.ss),re.prototype.getUint32=oe(_.bt),re.prototype.getInt32=oe(_.GM),re.prototype.getFloat32=oe(_.l6),re.prototype.getFloat64=oe(_.aQ);function he(de){return function(fe,ne,te){if(fe=t.ToUint32(fe),fe+de.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var Y=new de([ne]),W=new _.SE(Y.buffer),ie=[],$,L;for($=0;$<de.BYTES_PER_ELEMENT;$+=1)ie.push(F(W,$));!!te==!!Z&&ie.reverse(),L=new _.SE(this.buffer,fe,de.BYTES_PER_ELEMENT),L.set(ie)}}re.prototype.setUint8=he(_.SE),re.prototype.setInt8=he(_.fo),re.prototype.setUint16=he(_.hR),re.prototype.setInt16=he(_.ss),re.prototype.setUint32=he(_.bt),re.prototype.setInt32=he(_.GM),re.prototype.setFloat32=he(_.l6),re.prototype.setFloat64=he(_.aQ),_.U$=_.U$||re})()},6367:S=>{/*!
|
|
353
353
|
* unpipe
|
|
354
354
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
355
355
|
* MIT Licensed
|
|
@@ -363,7 +363,7 @@ Minimum version required to store current data is: `+P+`.
|
|
|
363
363
|
`+Object.keys(C).map((A=>`${A}: ${C[A]}`)).join(`\r
|
|
364
364
|
`)+`\r
|
|
365
365
|
\r
|
|
366
|
-
`+I)}function k(R,T,I,C,A,O){if(R.listenerCount("wsClientError")){const E=new Error(A);Error.captureStackTrace(E,k),R.emit("wsClientError",E,I,T)}else w(I,C,A,O)}},6681:(S,_,u)=>{const n=u(4434),t=u(5692),c=u(8611),l=u(9278),m=u(4756),{randomBytes:o,createHash:i}=u(6982),{Duplex:a,Readable:e}=u(2203),{URL:r}=u(7016),p=u(4376),f=u(893),s=u(7389),{isBlob:g}=u(6615),{BINARY_TYPES:h,EMPTY_BUFFER:v,GUID:b,kForOnEventAttribute:d,kListener:w,kStatusCode:k,kWebSocket:R,NOOP:T}=u(1791),{EventTarget:{addEventListener:I,removeEventListener:C}}=u(4634),{format:A,parse:O}=u(1335),{toBuffer:E}=u(5803),P=30*1e3,N=Symbol("kAborted"),j=[8,13],M=["CONNECTING","OPEN","CLOSING","CLOSED"],z=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class H extends n{constructor(J,pe,ue){super(),this._binaryType=h[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=v,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=H.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,J!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,pe===void 0?pe=[]:Array.isArray(pe)||(typeof pe=="object"&&pe!==null?(ue=pe,pe=[]):pe=[pe]),X(this,J,pe,ue)):(this._autoPong=ue.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(J){h.includes(J)&&(this._binaryType=J,this._receiver&&(this._receiver._binaryType=J))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(J,pe,ue){const ae=new f({allowSynchronousEvents:ue.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:ue.maxPayload,skipUTF8Validation:ue.skipUTF8Validation}),me=new s(J,this._extensions,ue.generateMask);this._receiver=ae,this._sender=me,this._socket=J,ae[R]=this,me[R]=this,J[R]=this,ae.on("conclude",de),ae.on("drain",fe),ae.on("error",ne),ae.on("message",Y),ae.on("ping",W),ae.on("pong",ie),me.onerror=L,J.setTimeout&&J.setTimeout(0),J.setNoDelay&&J.setNoDelay(),pe.length>0&&J.unshift(pe),J.on("close",B),J.on("data",U),J.on("end",G),J.on("error",ee),this._readyState=H.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=H.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[p.extensionName]&&this._extensions[p.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=H.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(J,pe){if(this.readyState!==H.CLOSED){if(this.readyState===H.CONNECTING){oe(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===H.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=H.CLOSING,this._sender.close(J,pe,!this._isServer,(ue=>{ue||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),D(this)}}pause(){this.readyState===H.CONNECTING||this.readyState===H.CLOSED||(this._paused=!0,this._socket.pause())}ping(J,pe,ue){if(this.readyState===H.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof J=="function"?(ue=J,J=pe=void 0):typeof pe=="function"&&(ue=pe,pe=void 0),typeof J=="number"&&(J=J.toString()),this.readyState!==H.OPEN){he(this,J,ue);return}pe===void 0&&(pe=!this._isServer),this._sender.ping(J||v,pe,ue)}pong(J,pe,ue){if(this.readyState===H.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof J=="function"?(ue=J,J=pe=void 0):typeof pe=="function"&&(ue=pe,pe=void 0),typeof J=="number"&&(J=J.toString()),this.readyState!==H.OPEN){he(this,J,ue);return}pe===void 0&&(pe=!this._isServer),this._sender.pong(J||v,pe,ue)}resume(){this.readyState===H.CONNECTING||this.readyState===H.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(J,pe,ue){if(this.readyState===H.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof pe=="function"&&(ue=pe,pe={}),typeof J=="number"&&(J=J.toString()),this.readyState!==H.OPEN){he(this,J,ue);return}const ae={binary:typeof J!="string",mask:!this._isServer,compress:!0,fin:!0,...pe};this._extensions[p.extensionName]||(ae.compress=!1),this._sender.send(J||v,ae,ue)}terminate(){if(this.readyState!==H.CLOSED){if(this.readyState===H.CONNECTING){oe(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=H.CLOSING,this._socket.destroy())}}}Object.defineProperty(H,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(H.prototype,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(H,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(H.prototype,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(H,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(H.prototype,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(H,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),Object.defineProperty(H.prototype,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((q=>{Object.defineProperty(H.prototype,q,{enumerable:!0})})),["open","error","close","message"].forEach((q=>{Object.defineProperty(H.prototype,`on${q}`,{enumerable:!0,get(){for(const J of this.listeners(q))if(J[d])return J[w];return null},set(J){for(const pe of this.listeners(q))if(pe[d]){this.removeListener(q,pe);break}typeof J=="function"&&this.addEventListener(q,J,{[d]:!0})}})})),H.prototype.addEventListener=I,H.prototype.removeEventListener=C,S.exports=H;function X(q,J,pe,ue){const ae={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:j[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...ue,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(q._autoPong=ae.autoPong,!j.includes(ae.protocolVersion))throw new RangeError(`Unsupported protocol version: ${ae.protocolVersion} (supported versions: ${j.join(", ")})`);let me;if(J instanceof r)me=J;else try{me=new r(J)}catch{throw new SyntaxError(`Invalid URL: ${J}`)}me.protocol==="http:"?me.protocol="ws:":me.protocol==="https:"&&(me.protocol="wss:"),q._url=me.href;const be=me.protocol==="wss:",ye=me.protocol==="ws+unix:";let _e;if(me.protocol!=="ws:"&&!be&&!ye?_e=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:ye&&!me.pathname?_e="The URL's pathname is empty":me.hash&&(_e="The URL contains a fragment identifier"),_e){const Ce=new SyntaxError(_e);if(q._redirects===0)throw Ce;F(q,Ce);return}const Oe=be?443:80,Ee=o(16).toString("base64"),Te=be?t.request:c.request,Ae=new Set;let Ne;if(ae.createConnection=ae.createConnection||(be?re:Z),ae.defaultPort=ae.defaultPort||Oe,ae.port=me.port||Oe,ae.host=me.hostname.startsWith("[")?me.hostname.slice(1,-1):me.hostname,ae.headers={...ae.headers,"Sec-WebSocket-Version":ae.protocolVersion,"Sec-WebSocket-Key":Ee,Connection:"Upgrade",Upgrade:"websocket"},ae.path=me.pathname+me.search,ae.timeout=ae.handshakeTimeout,ae.perMessageDeflate&&(Ne=new p(ae.perMessageDeflate!==!0?ae.perMessageDeflate:{},!1,ae.maxPayload),ae.headers["Sec-WebSocket-Extensions"]=A({[p.extensionName]:Ne.offer()})),pe.length){for(const Ce of pe){if(typeof Ce!="string"||!z.test(Ce)||Ae.has(Ce))throw new SyntaxError("An invalid or duplicated subprotocol was specified");Ae.add(Ce)}ae.headers["Sec-WebSocket-Protocol"]=pe.join(",")}if(ae.origin&&(ae.protocolVersion<13?ae.headers["Sec-WebSocket-Origin"]=ae.origin:ae.headers.Origin=ae.origin),(me.username||me.password)&&(ae.auth=`${me.username}:${me.password}`),ye){const Ce=ae.path.split(":");ae.socketPath=Ce[0],ae.path=Ce[1]}let Ie;if(ae.followRedirects){if(q._redirects===0){q._originalIpc=ye,q._originalSecure=be,q._originalHostOrSocketPath=ye?ae.socketPath:me.host;const Ce=ue&&ue.headers;if(ue={...ue,headers:{}},Ce)for(const[Pe,je]of Object.entries(Ce))ue.headers[Pe.toLowerCase()]=je}else if(q.listenerCount("redirect")===0){const Ce=ye?q._originalIpc?ae.socketPath===q._originalHostOrSocketPath:!1:q._originalIpc?!1:me.host===q._originalHostOrSocketPath;(!Ce||q._originalSecure&&!be)&&(delete ae.headers.authorization,delete ae.headers.cookie,Ce||delete ae.headers.host,ae.auth=void 0)}ae.auth&&!ue.headers.authorization&&(ue.headers.authorization="Basic "+Buffer.from(ae.auth).toString("base64")),Ie=q._req=Te(ae),q._redirects&&q.emit("redirect",q.url,Ie)}else Ie=q._req=Te(ae);ae.timeout&&Ie.on("timeout",(()=>{oe(q,Ie,"Opening handshake has timed out")})),Ie.on("error",(Ce=>{Ie===null||Ie[N]||(Ie=q._req=null,F(q,Ce))})),Ie.on("response",(Ce=>{const Pe=Ce.headers.location,je=Ce.statusCode;if(Pe&&ae.followRedirects&&je>=300&&je<400){if(++q._redirects>ae.maxRedirects){oe(q,Ie,"Maximum redirects exceeded");return}Ie.abort();let Ue;try{Ue=new r(Pe,J)}catch{const le=new SyntaxError(`Invalid URL: ${Pe}`);F(q,le);return}X(q,Ue,pe,ue)}else q.emit("unexpected-response",Ie,Ce)||oe(q,Ie,`Unexpected server response: ${Ce.statusCode}`)})),Ie.on("upgrade",((Ce,Pe,je)=>{if(q.emit("upgrade",Ce),q.readyState!==H.CONNECTING)return;Ie=q._req=null;const Ue=Ce.headers.upgrade;if(Ue===void 0||Ue.toLowerCase()!=="websocket"){oe(q,Pe,"Invalid Upgrade header");return}const ce=i("sha1").update(Ee+b).digest("base64");if(Ce.headers["sec-websocket-accept"]!==ce){oe(q,Pe,"Invalid Sec-WebSocket-Accept header");return}const le=Ce.headers["sec-websocket-protocol"];let ke;if(le!==void 0?Ae.size?Ae.has(le)||(ke="Server sent an invalid subprotocol"):ke="Server sent a subprotocol but none was requested":Ae.size&&(ke="Server sent no subprotocol"),ke){oe(q,Pe,ke);return}le&&(q._protocol=le);const Be=Ce.headers["sec-websocket-extensions"];if(Be!==void 0){if(!Ne){oe(q,Pe,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Re;try{Re=O(Be)}catch{oe(q,Pe,"Invalid Sec-WebSocket-Extensions header");return}const Se=Object.keys(Re);if(Se.length!==1||Se[0]!==p.extensionName){oe(q,Pe,"Server indicated an extension that was not requested");return}try{Ne.accept(Re[p.extensionName])}catch{oe(q,Pe,"Invalid Sec-WebSocket-Extensions header");return}q._extensions[p.extensionName]=Ne}q.setSocket(Pe,je,{allowSynchronousEvents:ae.allowSynchronousEvents,generateMask:ae.generateMask,maxPayload:ae.maxPayload,skipUTF8Validation:ae.skipUTF8Validation})})),ae.finishRequest?ae.finishRequest(Ie,q):Ie.end()}function F(q,J){q._readyState=H.CLOSING,q._errorEmitted=!0,q.emit("error",J),q.emitClose()}function Z(q){return q.path=q.socketPath,l.connect(q)}function re(q){return q.path=void 0,!q.servername&&q.servername!==""&&(q.servername=l.isIP(q.host)?"":q.host),m.connect(q)}function oe(q,J,pe){q._readyState=H.CLOSING;const ue=new Error(pe);Error.captureStackTrace(ue,oe),J.setHeader?(J[N]=!0,J.abort(),J.socket&&!J.socket.destroyed&&J.socket.destroy(),process.nextTick(F,q,ue)):(J.destroy(ue),J.once("error",q.emit.bind(q,"error")),J.once("close",q.emitClose.bind(q)))}function he(q,J,pe){if(J){const ue=g(J)?J.size:E(J).length;q._socket?q._sender._bufferedBytes+=ue:q._bufferedAmount+=ue}if(pe){const ue=new Error(`WebSocket is not open: readyState ${q.readyState} (${M[q.readyState]})`);process.nextTick(pe,ue)}}function de(q,J){const pe=this[R];pe._closeFrameReceived=!0,pe._closeMessage=J,pe._closeCode=q,pe._socket[R]!==void 0&&(pe._socket.removeListener("data",U),process.nextTick($,pe._socket),q===1005?pe.close():pe.close(q,J))}function fe(){const q=this[R];q.isPaused||q._socket.resume()}function ne(q){const J=this[R];J._socket[R]!==void 0&&(J._socket.removeListener("data",U),process.nextTick($,J._socket),J.close(q[k])),J._errorEmitted||(J._errorEmitted=!0,J.emit("error",q))}function te(){this[R].emitClose()}function Y(q,J){this[R].emit("message",q,J)}function W(q){const J=this[R];J._autoPong&&J.pong(q,!this._isServer,T),J.emit("ping",q)}function ie(q){this[R].emit("pong",q)}function $(q){q.resume()}function L(q){const J=this[R];J.readyState!==H.CLOSED&&(J.readyState===H.OPEN&&(J._readyState=H.CLOSING,D(J)),this._socket.end(),J._errorEmitted||(J._errorEmitted=!0,J.emit("error",q)))}function D(q){q._closeTimer=setTimeout(q._socket.destroy.bind(q._socket),P)}function B(){const q=this[R];this.removeListener("close",B),this.removeListener("data",U),this.removeListener("end",G),q._readyState=H.CLOSING;let J;!this._readableState.endEmitted&&!q._closeFrameReceived&&!q._receiver._writableState.errorEmitted&&(J=q._socket.read())!==null&&q._receiver.write(J),q._receiver.end(),this[R]=void 0,clearTimeout(q._closeTimer),q._receiver._writableState.finished||q._receiver._writableState.errorEmitted?q.emitClose():(q._receiver.on("error",te),q._receiver.on("finish",te))}function U(q){this[R]._receiver.write(q)||this.pause()}function G(){const q=this[R];q._readyState=H.CLOSING,q._receiver.end(),this.end()}function ee(){const q=this[R];this.removeListener("error",ee),this.on("error",T),q&&(q._readyState=H.CLOSING,this.destroy())}},8327:module=>{module.exports=eval("require")("bufferutil")},75:module=>{module.exports=eval("require")("supports-color")},2414:module=>{module.exports=eval("require")("utf-8-validate")},2613:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert")},290:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("async_hooks")},181:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("buffer")},6982:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto")},4434:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("events")},9896:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs")},8611:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("http")},5692:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("https")},9278:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("net")},857:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("os")},6928:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("path")},3480:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("querystring")},2203:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream")},3193:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder")},3557:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers")},4756:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls")},2018:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("tty")},7016:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("url")},9023:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("util")},3106:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("zlib")},2998:(S,_)=>{_.Emitter=u;function u(t){if(t)return n(t)}function n(t){for(var c in u.prototype)t[c]=u.prototype[c];return t}u.prototype.on=u.prototype.addEventListener=function(t,c){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(c),this},u.prototype.once=function(t,c){function l(){this.off(t,l),c.apply(this,arguments)}return l.fn=c,this.on(t,l),this},u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(t,c){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l=this._callbacks["$"+t];if(!l)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var m,o=0;o<l.length;o++)if(m=l[o],m===c||m.fn===c){l.splice(o,1);break}return l.length===0&&delete this._callbacks["$"+t],this},u.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var c=new Array(arguments.length-1),l=this._callbacks["$"+t],m=1;m<arguments.length;m++)c[m-1]=arguments[m];if(l){l=l.slice(0);for(var m=0,o=l.length;m<o;++m)l[m].apply(this,c)}return this},u.prototype.emitReserved=u.prototype.emit,u.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},u.prototype.hasListeners=function(t){return!!this.listeners(t).length}},2717:(S,_)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.ERROR_PACKET=_.PACKET_TYPES_REVERSE=_.PACKET_TYPES=void 0;const u=Object.create(null);_.PACKET_TYPES=u,u.open="0",u.close="1",u.ping="2",u.pong="3",u.message="4",u.upgrade="5",u.noop="6";const n=Object.create(null);_.PACKET_TYPES_REVERSE=n,Object.keys(u).forEach((c=>{n[u[c]]=c}));const t={type:"error",data:"parser error"};_.ERROR_PACKET=t},3377:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.decodePacket=void 0;const n=u(2717),t=(l,m)=>{if(typeof l!="string")return{type:"message",data:c(l,m)};const o=l.charAt(0);if(o==="b"){const i=Buffer.from(l.substring(1),"base64");return{type:"message",data:c(i,m)}}return n.PACKET_TYPES_REVERSE[o]?l.length>1?{type:n.PACKET_TYPES_REVERSE[o],data:l.substring(1)}:{type:n.PACKET_TYPES_REVERSE[o]}:n.ERROR_PACKET};_.decodePacket=t;const c=(l,m)=>m==="arraybuffer"?l instanceof ArrayBuffer?l:Buffer.isBuffer(l)?l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength):l.buffer:Buffer.isBuffer(l)?l:Buffer.from(l)},5897:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.encodePacket=void 0,_.encodePacketToBinary=m;const n=u(2717),t=({type:o,data:i},a,e)=>i instanceof ArrayBuffer||ArrayBuffer.isView(i)?e(a?i:"b"+c(i,!0).toString("base64")):e(n.PACKET_TYPES[o]+(i||""));_.encodePacket=t;const c=(o,i)=>Buffer.isBuffer(o)||o instanceof Uint8Array&&!i?o:o instanceof ArrayBuffer?Buffer.from(o):Buffer.from(o.buffer,o.byteOffset,o.byteLength);let l;function m(o,i){if(o.data instanceof ArrayBuffer||ArrayBuffer.isView(o.data))return i(c(o.data,!1));(0,_.encodePacket)(o,!0,(a=>{l||(l=new TextEncoder),i(l.encode(a))}))}},8007:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.decodePayload=_.decodePacket=_.encodePayload=_.encodePacket=_.protocol=void 0,_.createPacketEncoderStream=i,_.createPacketDecoderStream=p;const n=u(5897);Object.defineProperty(_,"encodePacket",{enumerable:!0,get:function(){return n.encodePacket}});const t=u(3377);Object.defineProperty(_,"decodePacket",{enumerable:!0,get:function(){return t.decodePacket}});const c=u(2717),l="",m=(f,s)=>{const g=f.length,h=new Array(g);let v=0;f.forEach(((b,d)=>{(0,n.encodePacket)(b,!1,(w=>{h[d]=w,++v===g&&s(h.join(l))}))}))};_.encodePayload=m;const o=(f,s)=>{const g=f.split(l),h=[];for(let v=0;v<g.length;v++){const b=(0,t.decodePacket)(g[v],s);if(h.push(b),b.type==="error")break}return h};_.decodePayload=o;function i(){return new TransformStream({transform(f,s){(0,n.encodePacketToBinary)(f,(g=>{const h=g.length;let v;if(h<126)v=new Uint8Array(1),new DataView(v.buffer).setUint8(0,h);else if(h<65536){v=new Uint8Array(3);const b=new DataView(v.buffer);b.setUint8(0,126),b.setUint16(1,h)}else{v=new Uint8Array(9);const b=new DataView(v.buffer);b.setUint8(0,127),b.setBigUint64(1,BigInt(h))}f.data&&typeof f.data!="string"&&(v[0]|=128),s.enqueue(v),s.enqueue(g)}))}})}let a;function e(f){return f.reduce(((s,g)=>s+g.length),0)}function r(f,s){if(f[0].length===s)return f.shift();const g=new Uint8Array(s);let h=0;for(let v=0;v<s;v++)g[v]=f[0][h++],h===f[0].length&&(f.shift(),h=0);return f.length&&h<f[0].length&&(f[0]=f[0].slice(h)),g}function p(f,s){a||(a=new TextDecoder);const g=[];let h=0,v=-1,b=!1;return new TransformStream({transform(d,w){for(g.push(d);;){if(h===0){if(e(g)<1)break;const k=r(g,1);b=(k[0]&128)===128,v=k[0]&127,v<126?h=3:v===126?h=1:h=2}else if(h===1){if(e(g)<2)break;const k=r(g,2);v=new DataView(k.buffer,k.byteOffset,k.length).getUint16(0),h=3}else if(h===2){if(e(g)<8)break;const k=r(g,8),R=new DataView(k.buffer,k.byteOffset,k.length),T=R.getUint32(0);if(T>Math.pow(2,21)-1){w.enqueue(c.ERROR_PACKET);break}v=T*Math.pow(2,32)+R.getUint32(4),h=3}else{if(e(g)<v)break;const k=r(g,v);w.enqueue((0,t.decodePacket)(b?k:a.decode(k),s)),h=0}if(v===0||v>f){w.enqueue(c.ERROR_PACKET);break}}}})}_.protocol=4},68:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.protocol=_.Transport=_.Socket=_.uServer=_.parser=_.transports=_.Server=void 0,_.listen=a,_.attach=e;const n=u(8611),t=u(2317);Object.defineProperty(_,"Server",{enumerable:!0,get:function(){return t.Server}});const c=u(2975);_.transports=c.default;const l=u(8007);_.parser=l;var m=u(2056);Object.defineProperty(_,"uServer",{enumerable:!0,get:function(){return m.uServer}});var o=u(3739);Object.defineProperty(_,"Socket",{enumerable:!0,get:function(){return o.Socket}});var i=u(4621);Object.defineProperty(_,"Transport",{enumerable:!0,get:function(){return i.Transport}}),_.protocol=l.protocol;function a(r,p,f){typeof p=="function"&&(f=p,p={});const s=(0,n.createServer)((function(h,v){v.writeHead(501),v.end("Not Implemented")})),g=e(s,p);return g.httpServer=s,s.listen(r,f),g}function e(r,p){const f=new t.Server(p);return f.attach(r,p),f}},2674:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.packets=_.protocol=void 0,_.encodePacket=o,_.encodeBase64Packet=a,_.decodePacket=e,_.decodeBase64Packet=p,_.encodePayload=f,_.decodePayload=h,_.encodePayloadAsBinary=w,_.decodePayloadAsBinary=R;var n=u(4875);_.protocol=3;const t=T=>{for(const I of T)if(I.data instanceof ArrayBuffer||ArrayBuffer.isView(I.data))return!0;return!1};_.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6};var c=Object.keys(_.packets),l={type:"error",data:"parser error"};const m=Buffer.concat([]);function o(T,I,C,A){if(typeof I=="function"&&(A=I,I=null),typeof C=="function"&&(A=C,C=null),Buffer.isBuffer(T.data))return i(T,I,A);if(T.data&&(T.data.buffer||T.data)instanceof ArrayBuffer)return i({type:T.type,data:d(T.data)},I,A);var O=_.packets[T.type];return T.data!==void 0&&(O+=C?n.encode(String(T.data),{strict:!1}):String(T.data)),A(""+O)}function i(T,I,C){if(!I)return a(T,C);var A=T.data,O=Buffer.allocUnsafe(1);return O[0]=_.packets[T.type],C(Buffer.concat([O,A]))}function a(T,I){var C=Buffer.isBuffer(T.data)?T.data:d(T.data),A="b"+_.packets[T.type];return A+=C.toString("base64"),I(A)}function e(T,I,C){if(T===void 0)return l;let A;if(typeof T=="string")return A=T.charAt(0),A==="b"?p(T.slice(1),I):C&&(T=r(T),T===!1)||Number(A)!=A||!c[A]?l:T.length>1?{type:c[A],data:T.slice(1)}:{type:c[A]};if(I==="arraybuffer"){var O=new Uint8Array(T);return A=O[0],{type:c[A],data:O.buffer.slice(1)}}return T instanceof ArrayBuffer&&(T=d(T)),A=T[0],{type:c[A],data:T.slice(1)}}function r(T){try{T=n.decode(T,{strict:!1})}catch{return!1}return T}function p(T,I){var C=c[T.charAt(0)],A=Buffer.from(T.slice(1),"base64");if(I==="arraybuffer"){for(var O=new Uint8Array(A.length),E=0;E<O.length;E++)O[E]=A[E];A=O.buffer}return{type:C,data:A}}function f(T,I,C){if(typeof I=="function"&&(C=I,I=null),I&&t(T))return w(T,C);if(!T.length)return C("0:");function A(O,E){o(O,I,!1,(function(P){E(null,s(P))}))}g(T,A,(function(O,E){return C(E.join(""))}))}function s(T){return T.length+":"+T}function g(T,I,C){const A=new Array(T.length);let O=0;for(let E=0;E<T.length;E++)I(T[E],((P,N)=>{A[E]=N,++O===T.length&&C(null,A)}))}function h(T,I,C){if(typeof T!="string")return R(T,I,C);if(typeof I=="function"&&(C=I,I=null),T==="")return C(l,0,1);for(var A="",O,E,P,N=0,j=T.length;N<j;N++){var M=T.charAt(N);if(M!==":"){A+=M;continue}if(A===""||A!=(O=Number(A))||(E=T.slice(N+1,N+1+O),A!=E.length))return C(l,0,1);if(E.length){if(P=e(E,I,!1),l.type===P.type&&l.data===P.data)return C(l,0,1);var z=C(P,N+O,j);if(z===!1)return}N+=O,A=""}if(A!=="")return C(l,0,1)}function v(T){for(var I="",C=0,A=T.length;C<A;C++)I+=String.fromCharCode(T[C]);return I}function b(T){for(var I=Buffer.allocUnsafe(T.length),C=0,A=T.length;C<A;C++)I.writeUInt8(T.charCodeAt(C),C);return I}function d(T){var I=T.byteLength||T.length,C=T.byteOffset||0;return Buffer.from(T.buffer||T,C,I)}function w(T,I){if(!T.length)return I(m);g(T,k,(function(C,A){return I(Buffer.concat(A))}))}function k(T,I){function C(A){var O=""+A.length,E;if(typeof A=="string"){E=Buffer.allocUnsafe(O.length+2),E[0]=0;for(var P=0;P<O.length;P++)E[P+1]=parseInt(O[P],10);return E[E.length-1]=255,I(null,Buffer.concat([E,b(A)]))}E=Buffer.allocUnsafe(O.length+2),E[0]=1;for(var P=0;P<O.length;P++)E[P+1]=parseInt(O[P],10);E[E.length-1]=255,I(null,Buffer.concat([E,A]))}o(T,!0,!0,C)}function R(T,I,C){typeof I=="function"&&(C=I,I=null);for(var A=T,O=[],E;A.length>0;){var P="",N=A[0]===0;for(E=1;A[E]!==255;E++){if(P.length>310)return C(l,0,1);P+=""+A[E]}A=A.slice(P.length+1);var j=parseInt(P,10),M=A.slice(1,j+1);N&&(M=v(M)),O.push(M),A=A.slice(j+1)}var z=O.length;for(E=0;E<z;E++){var H=O[E];C(e(H,I,!0),E,z)}}},4875:S=>{/*! https://mths.be/utf8js v2.1.2 by @mathias */var _=String.fromCharCode;function u(f){for(var s=[],g=0,h=f.length,v,b;g<h;)v=f.charCodeAt(g++),v>=55296&&v<=56319&&g<h?(b=f.charCodeAt(g++),(b&64512)==56320?s.push(((v&1023)<<10)+(b&1023)+65536):(s.push(v),g--)):s.push(v);return s}function n(f){for(var s=f.length,g=-1,h,v="";++g<s;)h=f[g],h>65535&&(h-=65536,v+=_(h>>>10&1023|55296),h=56320|h&1023),v+=_(h);return v}function t(f,s){if(f>=55296&&f<=57343){if(s)throw Error("Lone surrogate U+"+f.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(f,s){return _(f>>s&63|128)}function l(f,s){if((f&4294967168)==0)return _(f);var g="";return(f&4294965248)==0?g=_(f>>6&31|192):(f&4294901760)==0?(t(f,s)||(f=65533),g=_(f>>12&15|224),g+=c(f,6)):(f&4292870144)==0&&(g=_(f>>18&7|240),g+=c(f,12),g+=c(f,6)),g+=_(f&63|128),g}function m(f,s){s=s||{};for(var g=s.strict!==!1,h=u(f),v=h.length,b=-1,d,w="";++b<v;)d=h[b],w+=l(d,g);return w}function o(){if(r>=e)throw Error("Invalid byte index");var f=a[r]&255;if(r++,(f&192)==128)return f&63;throw Error("Invalid continuation byte")}function i(f){var s,g,h,v,b;if(r>e)throw Error("Invalid byte index");if(r==e)return!1;if(s=a[r]&255,r++,(s&128)==0)return s;if((s&224)==192){if(g=o(),b=(s&31)<<6|g,b>=128)return b;throw Error("Invalid continuation byte")}if((s&240)==224){if(g=o(),h=o(),b=(s&15)<<12|g<<6|h,b>=2048)return t(b,f)?b:65533;throw Error("Invalid continuation byte")}if((s&248)==240&&(g=o(),h=o(),v=o(),b=(s&7)<<18|g<<12|h<<6|v,b>=65536&&b<=1114111))return b;throw Error("Invalid UTF-8 detected")}var a,e,r;function p(f,s){s=s||{};var g=s.strict!==!1;a=u(f),e=a.length,r=0;for(var h=[],v;(v=i(g))!==!1;)h.push(v);return n(h)}S.exports={version:"2.1.2",encode:m,decode:p}},2317:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.Server=_.BaseServer=void 0;const n=u(1942),t=u(2975),c=u(4434),l=u(3739),m=u(26),o=u(3814),i=u(1354),a=u(8868),e=u(8007),r=(0,m.default)("engine"),p=Symbol("responseHeaders");function f(k){try{const R=JSON.parse(k);if(typeof R.sid=="string")return R.sid}catch{}}class s extends c.EventEmitter{constructor(R={}){super(),this.middlewares=[],this.clients={},this.clientsCount=0,this.opts=Object.assign({wsEngine:i.Server,pingTimeout:2e4,pingInterval:25e3,upgradeTimeout:1e4,maxHttpBufferSize:1e6,transports:["polling","websocket"],allowUpgrades:!0,httpCompression:{threshold:1024},cors:!1,allowEIO3:!1},R),R.cookie&&(this.opts.cookie=Object.assign({name:"io",path:"/",httpOnly:R.cookie.path!==!1,sameSite:"lax"},R.cookie)),this.opts.cors&&this.use(u(4085)(this.opts.cors)),R.perMessageDeflate&&(this.opts.perMessageDeflate=Object.assign({threshold:1024},R.perMessageDeflate)),this.init()}_computePath(R){let T=(R.path||"/engine.io").replace(/\/$/,"");return R.addTrailingSlash!==!1&&(T+="/"),T}upgrades(R){return this.opts.allowUpgrades?t.default[R].upgradesTo||[]:[]}verify(R,T,I){const C=R._query.transport;if(!~this.opts.transports.indexOf(C)||C==="webtransport")return r('unknown transport "%s"',C),I(h.errors.UNKNOWN_TRANSPORT,{transport:C});if(w(R.headers.origin)){const E=R.headers.origin;return R.headers.origin=null,r("origin header invalid"),I(h.errors.BAD_REQUEST,{name:"INVALID_ORIGIN",origin:E})}const O=R._query.sid;if(O){if(!this.clients.hasOwnProperty(O))return r('unknown sid "%s"',O),I(h.errors.UNKNOWN_SID,{sid:O});const E=this.clients[O].transport.name;if(!T&&E!==C)return r("bad request: unexpected transport without upgrade"),I(h.errors.BAD_REQUEST,{name:"TRANSPORT_MISMATCH",transport:C,previousTransport:E})}else return R.method!=="GET"?I(h.errors.BAD_HANDSHAKE_METHOD,{method:R.method}):C==="websocket"&&!T?(r("invalid transport upgrade"),I(h.errors.BAD_REQUEST,{name:"TRANSPORT_HANDSHAKE_ERROR"})):this.opts.allowRequest?this.opts.allowRequest(R,((E,P)=>{if(!P)return I(h.errors.FORBIDDEN,{message:E});I()})):I();I()}use(R){this.middlewares.push(R)}_applyMiddlewares(R,T,I){if(this.middlewares.length===0)return r("no middleware to apply, skipping"),I();const C=A=>{r("applying middleware n\xB0%d",A+1),this.middlewares[A](R,T,(O=>{if(O)return I(O);A+1<this.middlewares.length?C(A+1):I()}))};C(0)}close(){r("closing all open clients");for(let R in this.clients)this.clients.hasOwnProperty(R)&&this.clients[R].close(!0);return this.cleanup(),this}generateId(R){return n.generateId()}async handshake(R,T,I){const C=T._query.EIO==="4"?4:3;if(C===3&&!this.opts.allowEIO3){r("unsupported protocol version"),this.emit("connection_error",{req:T,code:h.errors.UNSUPPORTED_PROTOCOL_VERSION,message:h.errorMessages[h.errors.UNSUPPORTED_PROTOCOL_VERSION],context:{protocol:C}}),I(h.errors.UNSUPPORTED_PROTOCOL_VERSION);return}let A;try{A=await this.generateId(T)}catch(P){r("error while generating an id"),this.emit("connection_error",{req:T,code:h.errors.BAD_REQUEST,message:h.errorMessages[h.errors.BAD_REQUEST],context:{name:"ID_GENERATION_ERROR",error:P}}),I(h.errors.BAD_REQUEST);return}r('handshaking client "%s"',A);try{var O=this.createTransport(R,T);R==="polling"?(O.maxHttpBufferSize=this.opts.maxHttpBufferSize,O.httpCompression=this.opts.httpCompression):R==="websocket"&&(O.perMessageDeflate=this.opts.perMessageDeflate)}catch(P){r('error handshaking to transport "%s"',R),this.emit("connection_error",{req:T,code:h.errors.BAD_REQUEST,message:h.errorMessages[h.errors.BAD_REQUEST],context:{name:"TRANSPORT_HANDSHAKE_ERROR",error:P}}),I(h.errors.BAD_REQUEST);return}const E=new l.Socket(A,this,O,T,C);return O.on("headers",((P,N)=>{!N._query.sid&&(this.opts.cookie&&(P["Set-Cookie"]=[(0,o.serialize)(this.opts.cookie.name,A,this.opts.cookie)]),this.emit("initial_headers",P,N)),this.emit("headers",P,N)})),O.onRequest(T),this.clients[A]=E,this.clientsCount++,E.once("close",(()=>{delete this.clients[A],this.clientsCount--})),this.emit("connection",E),O}async onWebTransportSession(R){const T=setTimeout((()=>{r("the client failed to establish a bidirectional stream in the given period"),R.close()}),this.opts.upgradeTimeout),C=await R.incomingBidirectionalStreams.getReader().read();if(C.done){r("session is closed");return}const A=C.value,O=(0,e.createPacketDecoderStream)(this.opts.maxHttpBufferSize,"nodebuffer"),E=A.readable.pipeThrough(O).getReader(),{value:P,done:N}=await E.read();if(N){r("stream is closed");return}if(clearTimeout(T),P.type!=="open")return r("invalid WebTransport handshake"),R.close();if(P.data===void 0){const z=new a.WebTransport(R,A,E),H=n.generateId();r('handshaking client "%s" (WebTransport)',H);const X=new l.Socket(H,this,z,null,4);this.clients[H]=X,this.clientsCount++,X.once("close",(()=>{delete this.clients[H],this.clientsCount--})),this.emit("connection",X);return}const j=f(P.data);if(!j)return r("invalid WebTransport handshake"),R.close();const M=this.clients[j];if(!M)r("upgrade attempt for closed client"),R.close();else if(M.upgrading)r("transport has already been trying to upgrade"),R.close();else if(M.upgraded)r("transport had already been upgraded"),R.close();else{r("upgrading existing transport");const z=new a.WebTransport(R,A,E);M._maybeUpgrade(z)}}}_.BaseServer=s,s.errors={UNKNOWN_TRANSPORT:0,UNKNOWN_SID:1,BAD_HANDSHAKE_METHOD:2,BAD_REQUEST:3,FORBIDDEN:4,UNSUPPORTED_PROTOCOL_VERSION:5},s.errorMessages={0:"Transport unknown",1:"Session ID unknown",2:"Bad handshake method",3:"Bad request",4:"Forbidden",5:"Unsupported protocol version"};class g{constructor(R,T){this.req=R,this.socket=T,R[p]={}}setHeader(R,T){this.req[p][R]=T}getHeader(R){return this.req[p][R]}removeHeader(R){delete this.req[p][R]}write(){}writeHead(){}end(){this.socket.destroy()}}class h extends s{init(){~this.opts.transports.indexOf("websocket")&&(this.ws&&this.ws.close(),this.ws=new this.opts.wsEngine({noServer:!0,clientTracking:!1,perMessageDeflate:this.opts.perMessageDeflate,maxPayload:this.opts.maxHttpBufferSize}),typeof this.ws.on=="function"&&this.ws.on("headers",((R,T)=>{const I=T[p]||{};delete T[p],!T._query.sid&&this.emit("initial_headers",I,T),this.emit("headers",I,T),r("writing headers: %j",I),Object.keys(I).forEach((A=>{R.push(`${A}: ${I[A]}`)}))})))}cleanup(){this.ws&&(r("closing webSocketServer"),this.ws.close())}prepare(R){if(!R._query){const T=new URL(R.url,"https://socket.io");R._query=Object.fromEntries(T.searchParams.entries())}}createTransport(R,T){return new t.default[R](T)}handleRequest(R,T){r('handling "%s" http request "%s"',R.method,R.url),this.prepare(R),R.res=T;const I=(C,A)=>{if(C!==void 0){this.emit("connection_error",{req:R,code:C,message:h.errorMessages[C],context:A}),v(T,C,A);return}if(R._query.sid)r("setting new request for existing client"),this.clients[R._query.sid].transport.onRequest(R);else{const O=(E,P)=>v(T,E,P);this.handshake(R._query.transport,R,O)}};this._applyMiddlewares(R,T,(C=>{C?I(h.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(R,!1,I)}))}handleUpgrade(R,T,I){this.prepare(R);const C=new g(R,T),A=(O,E)=>{if(O!==void 0){this.emit("connection_error",{req:R,code:O,message:h.errorMessages[O],context:E}),b(T,O,E);return}const P=Buffer.from(I);I=null,C.writeHead(),this.ws.handleUpgrade(R,T,P,(N=>{this.onWebSocket(R,T,N)}))};this._applyMiddlewares(R,C,(O=>{O?A(h.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(R,!0,A)}))}onWebSocket(R,T,I){if(I.on("error",A),t.default[R._query.transport]!==void 0&&!t.default[R._query.transport].prototype.handlesUpgrades){r("transport doesnt handle upgraded requests"),I.close();return}const C=R._query.sid;if(R.websocket=I,C){const O=this.clients[C];if(!O)r("upgrade attempt for closed client"),I.close();else if(O.upgrading)r("transport has already been trying to upgrade"),I.close();else if(O.upgraded)r("transport had already been upgraded"),I.close();else{r("upgrading existing transport"),I.removeListener("error",A);const E=this.createTransport(R._query.transport,R);E.perMessageDeflate=this.opts.perMessageDeflate,O._maybeUpgrade(E)}}else{const O=(E,P)=>b(T,E,P);this.handshake(R._query.transport,R,O)}function A(){r("websocket error before upgrade")}}attach(R,T={}){const I=this._computePath(T),C=T.destroyUpgradeTimeout||1e3;function A(E){return I===E.url.slice(0,I.length)}const O=R.listeners("request").slice(0);R.removeAllListeners("request"),R.on("close",this.close.bind(this)),R.on("listening",this.init.bind(this)),R.on("request",((E,P)=>{if(A(E))r('intercepting request for path "%s"',I),this.handleRequest(E,P);else{let N=0;const j=O.length;for(;N<j;N++)O[N].call(R,E,P)}})),~this.opts.transports.indexOf("websocket")&&R.on("upgrade",((E,P,N)=>{A(E)?this.handleUpgrade(E,P,N):T.destroyUpgrade!==!1&&setTimeout((function(){if(P.writable&&P.bytesWritten<=0)return P.on("error",(j=>{r("error while destroying upgrade: %s",j.message)})),P.end()}),C)}))}}_.Server=h;function v(k,R,T){const I=R===h.errors.FORBIDDEN?403:400,C=T&&T.message?T.message:h.errorMessages[R];k.writeHead(I,{"Content-Type":"application/json"}),k.end(JSON.stringify({code:R,message:C}))}function b(k,R,T={}){if(k.on("error",(()=>{r("ignoring error from closed connection")})),k.writable){const I=T.message||h.errorMessages[R],C=Buffer.byteLength(I);k.write(`HTTP/1.1 400 Bad Request\r
|
|
366
|
+
`+I)}function k(R,T,I,C,A,O){if(R.listenerCount("wsClientError")){const E=new Error(A);Error.captureStackTrace(E,k),R.emit("wsClientError",E,I,T)}else w(I,C,A,O)}},6681:(S,_,u)=>{const n=u(4434),t=u(5692),c=u(8611),l=u(9278),m=u(4756),{randomBytes:o,createHash:i}=u(6982),{Duplex:a,Readable:e}=u(2203),{URL:r}=u(7016),p=u(4376),f=u(893),s=u(7389),{isBlob:g}=u(6615),{BINARY_TYPES:h,EMPTY_BUFFER:v,GUID:b,kForOnEventAttribute:d,kListener:w,kStatusCode:k,kWebSocket:R,NOOP:T}=u(1791),{EventTarget:{addEventListener:I,removeEventListener:C}}=u(4634),{format:A,parse:O}=u(1335),{toBuffer:E}=u(5803),P=30*1e3,N=Symbol("kAborted"),j=[8,13],M=["CONNECTING","OPEN","CLOSING","CLOSED"],z=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class H extends n{constructor(J,pe,ue){super(),this._binaryType=h[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=v,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=H.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,J!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,pe===void 0?pe=[]:Array.isArray(pe)||(typeof pe=="object"&&pe!==null?(ue=pe,pe=[]):pe=[pe]),X(this,J,pe,ue)):(this._autoPong=ue.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(J){h.includes(J)&&(this._binaryType=J,this._receiver&&(this._receiver._binaryType=J))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(J,pe,ue){const ae=new f({allowSynchronousEvents:ue.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:ue.maxPayload,skipUTF8Validation:ue.skipUTF8Validation}),me=new s(J,this._extensions,ue.generateMask);this._receiver=ae,this._sender=me,this._socket=J,ae[R]=this,me[R]=this,J[R]=this,ae.on("conclude",de),ae.on("drain",fe),ae.on("error",ne),ae.on("message",Y),ae.on("ping",W),ae.on("pong",ie),me.onerror=L,J.setTimeout&&J.setTimeout(0),J.setNoDelay&&J.setNoDelay(),pe.length>0&&J.unshift(pe),J.on("close",B),J.on("data",U),J.on("end",G),J.on("error",ee),this._readyState=H.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=H.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[p.extensionName]&&this._extensions[p.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=H.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(J,pe){if(this.readyState!==H.CLOSED){if(this.readyState===H.CONNECTING){oe(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===H.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=H.CLOSING,this._sender.close(J,pe,!this._isServer,(ue=>{ue||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),D(this)}}pause(){this.readyState===H.CONNECTING||this.readyState===H.CLOSED||(this._paused=!0,this._socket.pause())}ping(J,pe,ue){if(this.readyState===H.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof J=="function"?(ue=J,J=pe=void 0):typeof pe=="function"&&(ue=pe,pe=void 0),typeof J=="number"&&(J=J.toString()),this.readyState!==H.OPEN){he(this,J,ue);return}pe===void 0&&(pe=!this._isServer),this._sender.ping(J||v,pe,ue)}pong(J,pe,ue){if(this.readyState===H.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof J=="function"?(ue=J,J=pe=void 0):typeof pe=="function"&&(ue=pe,pe=void 0),typeof J=="number"&&(J=J.toString()),this.readyState!==H.OPEN){he(this,J,ue);return}pe===void 0&&(pe=!this._isServer),this._sender.pong(J||v,pe,ue)}resume(){this.readyState===H.CONNECTING||this.readyState===H.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(J,pe,ue){if(this.readyState===H.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof pe=="function"&&(ue=pe,pe={}),typeof J=="number"&&(J=J.toString()),this.readyState!==H.OPEN){he(this,J,ue);return}const ae={binary:typeof J!="string",mask:!this._isServer,compress:!0,fin:!0,...pe};this._extensions[p.extensionName]||(ae.compress=!1),this._sender.send(J||v,ae,ue)}terminate(){if(this.readyState!==H.CLOSED){if(this.readyState===H.CONNECTING){oe(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=H.CLOSING,this._socket.destroy())}}}Object.defineProperty(H,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(H.prototype,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(H,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(H.prototype,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(H,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(H.prototype,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(H,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),Object.defineProperty(H.prototype,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((q=>{Object.defineProperty(H.prototype,q,{enumerable:!0})})),["open","error","close","message"].forEach((q=>{Object.defineProperty(H.prototype,`on${q}`,{enumerable:!0,get(){for(const J of this.listeners(q))if(J[d])return J[w];return null},set(J){for(const pe of this.listeners(q))if(pe[d]){this.removeListener(q,pe);break}typeof J=="function"&&this.addEventListener(q,J,{[d]:!0})}})})),H.prototype.addEventListener=I,H.prototype.removeEventListener=C,S.exports=H;function X(q,J,pe,ue){const ae={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:j[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...ue,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(q._autoPong=ae.autoPong,!j.includes(ae.protocolVersion))throw new RangeError(`Unsupported protocol version: ${ae.protocolVersion} (supported versions: ${j.join(", ")})`);let me;if(J instanceof r)me=J;else try{me=new r(J)}catch{throw new SyntaxError(`Invalid URL: ${J}`)}me.protocol==="http:"?me.protocol="ws:":me.protocol==="https:"&&(me.protocol="wss:"),q._url=me.href;const be=me.protocol==="wss:",ye=me.protocol==="ws+unix:";let xe;if(me.protocol!=="ws:"&&!be&&!ye?xe=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:ye&&!me.pathname?xe="The URL's pathname is empty":me.hash&&(xe="The URL contains a fragment identifier"),xe){const Ce=new SyntaxError(xe);if(q._redirects===0)throw Ce;F(q,Ce);return}const Oe=be?443:80,Ee=o(16).toString("base64"),Te=be?t.request:c.request,Ae=new Set;let Ne;if(ae.createConnection=ae.createConnection||(be?re:Z),ae.defaultPort=ae.defaultPort||Oe,ae.port=me.port||Oe,ae.host=me.hostname.startsWith("[")?me.hostname.slice(1,-1):me.hostname,ae.headers={...ae.headers,"Sec-WebSocket-Version":ae.protocolVersion,"Sec-WebSocket-Key":Ee,Connection:"Upgrade",Upgrade:"websocket"},ae.path=me.pathname+me.search,ae.timeout=ae.handshakeTimeout,ae.perMessageDeflate&&(Ne=new p(ae.perMessageDeflate!==!0?ae.perMessageDeflate:{},!1,ae.maxPayload),ae.headers["Sec-WebSocket-Extensions"]=A({[p.extensionName]:Ne.offer()})),pe.length){for(const Ce of pe){if(typeof Ce!="string"||!z.test(Ce)||Ae.has(Ce))throw new SyntaxError("An invalid or duplicated subprotocol was specified");Ae.add(Ce)}ae.headers["Sec-WebSocket-Protocol"]=pe.join(",")}if(ae.origin&&(ae.protocolVersion<13?ae.headers["Sec-WebSocket-Origin"]=ae.origin:ae.headers.Origin=ae.origin),(me.username||me.password)&&(ae.auth=`${me.username}:${me.password}`),ye){const Ce=ae.path.split(":");ae.socketPath=Ce[0],ae.path=Ce[1]}let Ie;if(ae.followRedirects){if(q._redirects===0){q._originalIpc=ye,q._originalSecure=be,q._originalHostOrSocketPath=ye?ae.socketPath:me.host;const Ce=ue&&ue.headers;if(ue={...ue,headers:{}},Ce)for(const[Pe,je]of Object.entries(Ce))ue.headers[Pe.toLowerCase()]=je}else if(q.listenerCount("redirect")===0){const Ce=ye?q._originalIpc?ae.socketPath===q._originalHostOrSocketPath:!1:q._originalIpc?!1:me.host===q._originalHostOrSocketPath;(!Ce||q._originalSecure&&!be)&&(delete ae.headers.authorization,delete ae.headers.cookie,Ce||delete ae.headers.host,ae.auth=void 0)}ae.auth&&!ue.headers.authorization&&(ue.headers.authorization="Basic "+Buffer.from(ae.auth).toString("base64")),Ie=q._req=Te(ae),q._redirects&&q.emit("redirect",q.url,Ie)}else Ie=q._req=Te(ae);ae.timeout&&Ie.on("timeout",(()=>{oe(q,Ie,"Opening handshake has timed out")})),Ie.on("error",(Ce=>{Ie===null||Ie[N]||(Ie=q._req=null,F(q,Ce))})),Ie.on("response",(Ce=>{const Pe=Ce.headers.location,je=Ce.statusCode;if(Pe&&ae.followRedirects&&je>=300&&je<400){if(++q._redirects>ae.maxRedirects){oe(q,Ie,"Maximum redirects exceeded");return}Ie.abort();let Ue;try{Ue=new r(Pe,J)}catch{const le=new SyntaxError(`Invalid URL: ${Pe}`);F(q,le);return}X(q,Ue,pe,ue)}else q.emit("unexpected-response",Ie,Ce)||oe(q,Ie,`Unexpected server response: ${Ce.statusCode}`)})),Ie.on("upgrade",((Ce,Pe,je)=>{if(q.emit("upgrade",Ce),q.readyState!==H.CONNECTING)return;Ie=q._req=null;const Ue=Ce.headers.upgrade;if(Ue===void 0||Ue.toLowerCase()!=="websocket"){oe(q,Pe,"Invalid Upgrade header");return}const ce=i("sha1").update(Ee+b).digest("base64");if(Ce.headers["sec-websocket-accept"]!==ce){oe(q,Pe,"Invalid Sec-WebSocket-Accept header");return}const le=Ce.headers["sec-websocket-protocol"];let ke;if(le!==void 0?Ae.size?Ae.has(le)||(ke="Server sent an invalid subprotocol"):ke="Server sent a subprotocol but none was requested":Ae.size&&(ke="Server sent no subprotocol"),ke){oe(q,Pe,ke);return}le&&(q._protocol=le);const Be=Ce.headers["sec-websocket-extensions"];if(Be!==void 0){if(!Ne){oe(q,Pe,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Re;try{Re=O(Be)}catch{oe(q,Pe,"Invalid Sec-WebSocket-Extensions header");return}const Se=Object.keys(Re);if(Se.length!==1||Se[0]!==p.extensionName){oe(q,Pe,"Server indicated an extension that was not requested");return}try{Ne.accept(Re[p.extensionName])}catch{oe(q,Pe,"Invalid Sec-WebSocket-Extensions header");return}q._extensions[p.extensionName]=Ne}q.setSocket(Pe,je,{allowSynchronousEvents:ae.allowSynchronousEvents,generateMask:ae.generateMask,maxPayload:ae.maxPayload,skipUTF8Validation:ae.skipUTF8Validation})})),ae.finishRequest?ae.finishRequest(Ie,q):Ie.end()}function F(q,J){q._readyState=H.CLOSING,q._errorEmitted=!0,q.emit("error",J),q.emitClose()}function Z(q){return q.path=q.socketPath,l.connect(q)}function re(q){return q.path=void 0,!q.servername&&q.servername!==""&&(q.servername=l.isIP(q.host)?"":q.host),m.connect(q)}function oe(q,J,pe){q._readyState=H.CLOSING;const ue=new Error(pe);Error.captureStackTrace(ue,oe),J.setHeader?(J[N]=!0,J.abort(),J.socket&&!J.socket.destroyed&&J.socket.destroy(),process.nextTick(F,q,ue)):(J.destroy(ue),J.once("error",q.emit.bind(q,"error")),J.once("close",q.emitClose.bind(q)))}function he(q,J,pe){if(J){const ue=g(J)?J.size:E(J).length;q._socket?q._sender._bufferedBytes+=ue:q._bufferedAmount+=ue}if(pe){const ue=new Error(`WebSocket is not open: readyState ${q.readyState} (${M[q.readyState]})`);process.nextTick(pe,ue)}}function de(q,J){const pe=this[R];pe._closeFrameReceived=!0,pe._closeMessage=J,pe._closeCode=q,pe._socket[R]!==void 0&&(pe._socket.removeListener("data",U),process.nextTick($,pe._socket),q===1005?pe.close():pe.close(q,J))}function fe(){const q=this[R];q.isPaused||q._socket.resume()}function ne(q){const J=this[R];J._socket[R]!==void 0&&(J._socket.removeListener("data",U),process.nextTick($,J._socket),J.close(q[k])),J._errorEmitted||(J._errorEmitted=!0,J.emit("error",q))}function te(){this[R].emitClose()}function Y(q,J){this[R].emit("message",q,J)}function W(q){const J=this[R];J._autoPong&&J.pong(q,!this._isServer,T),J.emit("ping",q)}function ie(q){this[R].emit("pong",q)}function $(q){q.resume()}function L(q){const J=this[R];J.readyState!==H.CLOSED&&(J.readyState===H.OPEN&&(J._readyState=H.CLOSING,D(J)),this._socket.end(),J._errorEmitted||(J._errorEmitted=!0,J.emit("error",q)))}function D(q){q._closeTimer=setTimeout(q._socket.destroy.bind(q._socket),P)}function B(){const q=this[R];this.removeListener("close",B),this.removeListener("data",U),this.removeListener("end",G),q._readyState=H.CLOSING;let J;!this._readableState.endEmitted&&!q._closeFrameReceived&&!q._receiver._writableState.errorEmitted&&(J=q._socket.read())!==null&&q._receiver.write(J),q._receiver.end(),this[R]=void 0,clearTimeout(q._closeTimer),q._receiver._writableState.finished||q._receiver._writableState.errorEmitted?q.emitClose():(q._receiver.on("error",te),q._receiver.on("finish",te))}function U(q){this[R]._receiver.write(q)||this.pause()}function G(){const q=this[R];q._readyState=H.CLOSING,q._receiver.end(),this.end()}function ee(){const q=this[R];this.removeListener("error",ee),this.on("error",T),q&&(q._readyState=H.CLOSING,this.destroy())}},8327:module=>{module.exports=eval("require")("bufferutil")},75:module=>{module.exports=eval("require")("supports-color")},2414:module=>{module.exports=eval("require")("utf-8-validate")},2613:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert")},290:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("async_hooks")},181:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("buffer")},6982:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto")},4434:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("events")},9896:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs")},8611:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("http")},5692:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("https")},9278:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("net")},857:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("os")},6928:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("path")},3480:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("querystring")},2203:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream")},3193:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder")},3557:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers")},4756:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls")},2018:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("tty")},7016:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("url")},9023:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("util")},3106:S=>{S.exports=__WEBPACK_EXTERNAL_createRequire(import.meta.url)("zlib")},2998:(S,_)=>{_.Emitter=u;function u(t){if(t)return n(t)}function n(t){for(var c in u.prototype)t[c]=u.prototype[c];return t}u.prototype.on=u.prototype.addEventListener=function(t,c){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(c),this},u.prototype.once=function(t,c){function l(){this.off(t,l),c.apply(this,arguments)}return l.fn=c,this.on(t,l),this},u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(t,c){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l=this._callbacks["$"+t];if(!l)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var m,o=0;o<l.length;o++)if(m=l[o],m===c||m.fn===c){l.splice(o,1);break}return l.length===0&&delete this._callbacks["$"+t],this},u.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var c=new Array(arguments.length-1),l=this._callbacks["$"+t],m=1;m<arguments.length;m++)c[m-1]=arguments[m];if(l){l=l.slice(0);for(var m=0,o=l.length;m<o;++m)l[m].apply(this,c)}return this},u.prototype.emitReserved=u.prototype.emit,u.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},u.prototype.hasListeners=function(t){return!!this.listeners(t).length}},2717:(S,_)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.ERROR_PACKET=_.PACKET_TYPES_REVERSE=_.PACKET_TYPES=void 0;const u=Object.create(null);_.PACKET_TYPES=u,u.open="0",u.close="1",u.ping="2",u.pong="3",u.message="4",u.upgrade="5",u.noop="6";const n=Object.create(null);_.PACKET_TYPES_REVERSE=n,Object.keys(u).forEach((c=>{n[u[c]]=c}));const t={type:"error",data:"parser error"};_.ERROR_PACKET=t},3377:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.decodePacket=void 0;const n=u(2717),t=(l,m)=>{if(typeof l!="string")return{type:"message",data:c(l,m)};const o=l.charAt(0);if(o==="b"){const i=Buffer.from(l.substring(1),"base64");return{type:"message",data:c(i,m)}}return n.PACKET_TYPES_REVERSE[o]?l.length>1?{type:n.PACKET_TYPES_REVERSE[o],data:l.substring(1)}:{type:n.PACKET_TYPES_REVERSE[o]}:n.ERROR_PACKET};_.decodePacket=t;const c=(l,m)=>m==="arraybuffer"?l instanceof ArrayBuffer?l:Buffer.isBuffer(l)?l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength):l.buffer:Buffer.isBuffer(l)?l:Buffer.from(l)},5897:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.encodePacket=void 0,_.encodePacketToBinary=m;const n=u(2717),t=({type:o,data:i},a,e)=>i instanceof ArrayBuffer||ArrayBuffer.isView(i)?e(a?i:"b"+c(i,!0).toString("base64")):e(n.PACKET_TYPES[o]+(i||""));_.encodePacket=t;const c=(o,i)=>Buffer.isBuffer(o)||o instanceof Uint8Array&&!i?o:o instanceof ArrayBuffer?Buffer.from(o):Buffer.from(o.buffer,o.byteOffset,o.byteLength);let l;function m(o,i){if(o.data instanceof ArrayBuffer||ArrayBuffer.isView(o.data))return i(c(o.data,!1));(0,_.encodePacket)(o,!0,(a=>{l||(l=new TextEncoder),i(l.encode(a))}))}},8007:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.decodePayload=_.decodePacket=_.encodePayload=_.encodePacket=_.protocol=void 0,_.createPacketEncoderStream=i,_.createPacketDecoderStream=p;const n=u(5897);Object.defineProperty(_,"encodePacket",{enumerable:!0,get:function(){return n.encodePacket}});const t=u(3377);Object.defineProperty(_,"decodePacket",{enumerable:!0,get:function(){return t.decodePacket}});const c=u(2717),l="",m=(f,s)=>{const g=f.length,h=new Array(g);let v=0;f.forEach(((b,d)=>{(0,n.encodePacket)(b,!1,(w=>{h[d]=w,++v===g&&s(h.join(l))}))}))};_.encodePayload=m;const o=(f,s)=>{const g=f.split(l),h=[];for(let v=0;v<g.length;v++){const b=(0,t.decodePacket)(g[v],s);if(h.push(b),b.type==="error")break}return h};_.decodePayload=o;function i(){return new TransformStream({transform(f,s){(0,n.encodePacketToBinary)(f,(g=>{const h=g.length;let v;if(h<126)v=new Uint8Array(1),new DataView(v.buffer).setUint8(0,h);else if(h<65536){v=new Uint8Array(3);const b=new DataView(v.buffer);b.setUint8(0,126),b.setUint16(1,h)}else{v=new Uint8Array(9);const b=new DataView(v.buffer);b.setUint8(0,127),b.setBigUint64(1,BigInt(h))}f.data&&typeof f.data!="string"&&(v[0]|=128),s.enqueue(v),s.enqueue(g)}))}})}let a;function e(f){return f.reduce(((s,g)=>s+g.length),0)}function r(f,s){if(f[0].length===s)return f.shift();const g=new Uint8Array(s);let h=0;for(let v=0;v<s;v++)g[v]=f[0][h++],h===f[0].length&&(f.shift(),h=0);return f.length&&h<f[0].length&&(f[0]=f[0].slice(h)),g}function p(f,s){a||(a=new TextDecoder);const g=[];let h=0,v=-1,b=!1;return new TransformStream({transform(d,w){for(g.push(d);;){if(h===0){if(e(g)<1)break;const k=r(g,1);b=(k[0]&128)===128,v=k[0]&127,v<126?h=3:v===126?h=1:h=2}else if(h===1){if(e(g)<2)break;const k=r(g,2);v=new DataView(k.buffer,k.byteOffset,k.length).getUint16(0),h=3}else if(h===2){if(e(g)<8)break;const k=r(g,8),R=new DataView(k.buffer,k.byteOffset,k.length),T=R.getUint32(0);if(T>Math.pow(2,21)-1){w.enqueue(c.ERROR_PACKET);break}v=T*Math.pow(2,32)+R.getUint32(4),h=3}else{if(e(g)<v)break;const k=r(g,v);w.enqueue((0,t.decodePacket)(b?k:a.decode(k),s)),h=0}if(v===0||v>f){w.enqueue(c.ERROR_PACKET);break}}}})}_.protocol=4},68:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.protocol=_.Transport=_.Socket=_.uServer=_.parser=_.transports=_.Server=void 0,_.listen=a,_.attach=e;const n=u(8611),t=u(2317);Object.defineProperty(_,"Server",{enumerable:!0,get:function(){return t.Server}});const c=u(2975);_.transports=c.default;const l=u(8007);_.parser=l;var m=u(2056);Object.defineProperty(_,"uServer",{enumerable:!0,get:function(){return m.uServer}});var o=u(3739);Object.defineProperty(_,"Socket",{enumerable:!0,get:function(){return o.Socket}});var i=u(4621);Object.defineProperty(_,"Transport",{enumerable:!0,get:function(){return i.Transport}}),_.protocol=l.protocol;function a(r,p,f){typeof p=="function"&&(f=p,p={});const s=(0,n.createServer)((function(h,v){v.writeHead(501),v.end("Not Implemented")})),g=e(s,p);return g.httpServer=s,s.listen(r,f),g}function e(r,p){const f=new t.Server(p);return f.attach(r,p),f}},2674:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.packets=_.protocol=void 0,_.encodePacket=o,_.encodeBase64Packet=a,_.decodePacket=e,_.decodeBase64Packet=p,_.encodePayload=f,_.decodePayload=h,_.encodePayloadAsBinary=w,_.decodePayloadAsBinary=R;var n=u(4875);_.protocol=3;const t=T=>{for(const I of T)if(I.data instanceof ArrayBuffer||ArrayBuffer.isView(I.data))return!0;return!1};_.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6};var c=Object.keys(_.packets),l={type:"error",data:"parser error"};const m=Buffer.concat([]);function o(T,I,C,A){if(typeof I=="function"&&(A=I,I=null),typeof C=="function"&&(A=C,C=null),Buffer.isBuffer(T.data))return i(T,I,A);if(T.data&&(T.data.buffer||T.data)instanceof ArrayBuffer)return i({type:T.type,data:d(T.data)},I,A);var O=_.packets[T.type];return T.data!==void 0&&(O+=C?n.encode(String(T.data),{strict:!1}):String(T.data)),A(""+O)}function i(T,I,C){if(!I)return a(T,C);var A=T.data,O=Buffer.allocUnsafe(1);return O[0]=_.packets[T.type],C(Buffer.concat([O,A]))}function a(T,I){var C=Buffer.isBuffer(T.data)?T.data:d(T.data),A="b"+_.packets[T.type];return A+=C.toString("base64"),I(A)}function e(T,I,C){if(T===void 0)return l;let A;if(typeof T=="string")return A=T.charAt(0),A==="b"?p(T.slice(1),I):C&&(T=r(T),T===!1)||Number(A)!=A||!c[A]?l:T.length>1?{type:c[A],data:T.slice(1)}:{type:c[A]};if(I==="arraybuffer"){var O=new Uint8Array(T);return A=O[0],{type:c[A],data:O.buffer.slice(1)}}return T instanceof ArrayBuffer&&(T=d(T)),A=T[0],{type:c[A],data:T.slice(1)}}function r(T){try{T=n.decode(T,{strict:!1})}catch{return!1}return T}function p(T,I){var C=c[T.charAt(0)],A=Buffer.from(T.slice(1),"base64");if(I==="arraybuffer"){for(var O=new Uint8Array(A.length),E=0;E<O.length;E++)O[E]=A[E];A=O.buffer}return{type:C,data:A}}function f(T,I,C){if(typeof I=="function"&&(C=I,I=null),I&&t(T))return w(T,C);if(!T.length)return C("0:");function A(O,E){o(O,I,!1,(function(P){E(null,s(P))}))}g(T,A,(function(O,E){return C(E.join(""))}))}function s(T){return T.length+":"+T}function g(T,I,C){const A=new Array(T.length);let O=0;for(let E=0;E<T.length;E++)I(T[E],((P,N)=>{A[E]=N,++O===T.length&&C(null,A)}))}function h(T,I,C){if(typeof T!="string")return R(T,I,C);if(typeof I=="function"&&(C=I,I=null),T==="")return C(l,0,1);for(var A="",O,E,P,N=0,j=T.length;N<j;N++){var M=T.charAt(N);if(M!==":"){A+=M;continue}if(A===""||A!=(O=Number(A))||(E=T.slice(N+1,N+1+O),A!=E.length))return C(l,0,1);if(E.length){if(P=e(E,I,!1),l.type===P.type&&l.data===P.data)return C(l,0,1);var z=C(P,N+O,j);if(z===!1)return}N+=O,A=""}if(A!=="")return C(l,0,1)}function v(T){for(var I="",C=0,A=T.length;C<A;C++)I+=String.fromCharCode(T[C]);return I}function b(T){for(var I=Buffer.allocUnsafe(T.length),C=0,A=T.length;C<A;C++)I.writeUInt8(T.charCodeAt(C),C);return I}function d(T){var I=T.byteLength||T.length,C=T.byteOffset||0;return Buffer.from(T.buffer||T,C,I)}function w(T,I){if(!T.length)return I(m);g(T,k,(function(C,A){return I(Buffer.concat(A))}))}function k(T,I){function C(A){var O=""+A.length,E;if(typeof A=="string"){E=Buffer.allocUnsafe(O.length+2),E[0]=0;for(var P=0;P<O.length;P++)E[P+1]=parseInt(O[P],10);return E[E.length-1]=255,I(null,Buffer.concat([E,b(A)]))}E=Buffer.allocUnsafe(O.length+2),E[0]=1;for(var P=0;P<O.length;P++)E[P+1]=parseInt(O[P],10);E[E.length-1]=255,I(null,Buffer.concat([E,A]))}o(T,!0,!0,C)}function R(T,I,C){typeof I=="function"&&(C=I,I=null);for(var A=T,O=[],E;A.length>0;){var P="",N=A[0]===0;for(E=1;A[E]!==255;E++){if(P.length>310)return C(l,0,1);P+=""+A[E]}A=A.slice(P.length+1);var j=parseInt(P,10),M=A.slice(1,j+1);N&&(M=v(M)),O.push(M),A=A.slice(j+1)}var z=O.length;for(E=0;E<z;E++){var H=O[E];C(e(H,I,!0),E,z)}}},4875:S=>{/*! https://mths.be/utf8js v2.1.2 by @mathias */var _=String.fromCharCode;function u(f){for(var s=[],g=0,h=f.length,v,b;g<h;)v=f.charCodeAt(g++),v>=55296&&v<=56319&&g<h?(b=f.charCodeAt(g++),(b&64512)==56320?s.push(((v&1023)<<10)+(b&1023)+65536):(s.push(v),g--)):s.push(v);return s}function n(f){for(var s=f.length,g=-1,h,v="";++g<s;)h=f[g],h>65535&&(h-=65536,v+=_(h>>>10&1023|55296),h=56320|h&1023),v+=_(h);return v}function t(f,s){if(f>=55296&&f<=57343){if(s)throw Error("Lone surrogate U+"+f.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(f,s){return _(f>>s&63|128)}function l(f,s){if((f&4294967168)==0)return _(f);var g="";return(f&4294965248)==0?g=_(f>>6&31|192):(f&4294901760)==0?(t(f,s)||(f=65533),g=_(f>>12&15|224),g+=c(f,6)):(f&4292870144)==0&&(g=_(f>>18&7|240),g+=c(f,12),g+=c(f,6)),g+=_(f&63|128),g}function m(f,s){s=s||{};for(var g=s.strict!==!1,h=u(f),v=h.length,b=-1,d,w="";++b<v;)d=h[b],w+=l(d,g);return w}function o(){if(r>=e)throw Error("Invalid byte index");var f=a[r]&255;if(r++,(f&192)==128)return f&63;throw Error("Invalid continuation byte")}function i(f){var s,g,h,v,b;if(r>e)throw Error("Invalid byte index");if(r==e)return!1;if(s=a[r]&255,r++,(s&128)==0)return s;if((s&224)==192){if(g=o(),b=(s&31)<<6|g,b>=128)return b;throw Error("Invalid continuation byte")}if((s&240)==224){if(g=o(),h=o(),b=(s&15)<<12|g<<6|h,b>=2048)return t(b,f)?b:65533;throw Error("Invalid continuation byte")}if((s&248)==240&&(g=o(),h=o(),v=o(),b=(s&7)<<18|g<<12|h<<6|v,b>=65536&&b<=1114111))return b;throw Error("Invalid UTF-8 detected")}var a,e,r;function p(f,s){s=s||{};var g=s.strict!==!1;a=u(f),e=a.length,r=0;for(var h=[],v;(v=i(g))!==!1;)h.push(v);return n(h)}S.exports={version:"2.1.2",encode:m,decode:p}},2317:(S,_,u)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.Server=_.BaseServer=void 0;const n=u(1942),t=u(2975),c=u(4434),l=u(3739),m=u(26),o=u(3814),i=u(1354),a=u(8868),e=u(8007),r=(0,m.default)("engine"),p=Symbol("responseHeaders");function f(k){try{const R=JSON.parse(k);if(typeof R.sid=="string")return R.sid}catch{}}class s extends c.EventEmitter{constructor(R={}){super(),this.middlewares=[],this.clients={},this.clientsCount=0,this.opts=Object.assign({wsEngine:i.Server,pingTimeout:2e4,pingInterval:25e3,upgradeTimeout:1e4,maxHttpBufferSize:1e6,transports:["polling","websocket"],allowUpgrades:!0,httpCompression:{threshold:1024},cors:!1,allowEIO3:!1},R),R.cookie&&(this.opts.cookie=Object.assign({name:"io",path:"/",httpOnly:R.cookie.path!==!1,sameSite:"lax"},R.cookie)),this.opts.cors&&this.use(u(4085)(this.opts.cors)),R.perMessageDeflate&&(this.opts.perMessageDeflate=Object.assign({threshold:1024},R.perMessageDeflate)),this.init()}_computePath(R){let T=(R.path||"/engine.io").replace(/\/$/,"");return R.addTrailingSlash!==!1&&(T+="/"),T}upgrades(R){return this.opts.allowUpgrades?t.default[R].upgradesTo||[]:[]}verify(R,T,I){const C=R._query.transport;if(!~this.opts.transports.indexOf(C)||C==="webtransport")return r('unknown transport "%s"',C),I(h.errors.UNKNOWN_TRANSPORT,{transport:C});if(w(R.headers.origin)){const E=R.headers.origin;return R.headers.origin=null,r("origin header invalid"),I(h.errors.BAD_REQUEST,{name:"INVALID_ORIGIN",origin:E})}const O=R._query.sid;if(O){if(!this.clients.hasOwnProperty(O))return r('unknown sid "%s"',O),I(h.errors.UNKNOWN_SID,{sid:O});const E=this.clients[O].transport.name;if(!T&&E!==C)return r("bad request: unexpected transport without upgrade"),I(h.errors.BAD_REQUEST,{name:"TRANSPORT_MISMATCH",transport:C,previousTransport:E})}else return R.method!=="GET"?I(h.errors.BAD_HANDSHAKE_METHOD,{method:R.method}):C==="websocket"&&!T?(r("invalid transport upgrade"),I(h.errors.BAD_REQUEST,{name:"TRANSPORT_HANDSHAKE_ERROR"})):this.opts.allowRequest?this.opts.allowRequest(R,((E,P)=>{if(!P)return I(h.errors.FORBIDDEN,{message:E});I()})):I();I()}use(R){this.middlewares.push(R)}_applyMiddlewares(R,T,I){if(this.middlewares.length===0)return r("no middleware to apply, skipping"),I();const C=A=>{r("applying middleware n\xB0%d",A+1),this.middlewares[A](R,T,(O=>{if(O)return I(O);A+1<this.middlewares.length?C(A+1):I()}))};C(0)}close(){r("closing all open clients");for(let R in this.clients)this.clients.hasOwnProperty(R)&&this.clients[R].close(!0);return this.cleanup(),this}generateId(R){return n.generateId()}async handshake(R,T,I){const C=T._query.EIO==="4"?4:3;if(C===3&&!this.opts.allowEIO3){r("unsupported protocol version"),this.emit("connection_error",{req:T,code:h.errors.UNSUPPORTED_PROTOCOL_VERSION,message:h.errorMessages[h.errors.UNSUPPORTED_PROTOCOL_VERSION],context:{protocol:C}}),I(h.errors.UNSUPPORTED_PROTOCOL_VERSION);return}let A;try{A=await this.generateId(T)}catch(P){r("error while generating an id"),this.emit("connection_error",{req:T,code:h.errors.BAD_REQUEST,message:h.errorMessages[h.errors.BAD_REQUEST],context:{name:"ID_GENERATION_ERROR",error:P}}),I(h.errors.BAD_REQUEST);return}r('handshaking client "%s"',A);try{var O=this.createTransport(R,T);R==="polling"?(O.maxHttpBufferSize=this.opts.maxHttpBufferSize,O.httpCompression=this.opts.httpCompression):R==="websocket"&&(O.perMessageDeflate=this.opts.perMessageDeflate)}catch(P){r('error handshaking to transport "%s"',R),this.emit("connection_error",{req:T,code:h.errors.BAD_REQUEST,message:h.errorMessages[h.errors.BAD_REQUEST],context:{name:"TRANSPORT_HANDSHAKE_ERROR",error:P}}),I(h.errors.BAD_REQUEST);return}const E=new l.Socket(A,this,O,T,C);return O.on("headers",((P,N)=>{!N._query.sid&&(this.opts.cookie&&(P["Set-Cookie"]=[(0,o.serialize)(this.opts.cookie.name,A,this.opts.cookie)]),this.emit("initial_headers",P,N)),this.emit("headers",P,N)})),O.onRequest(T),this.clients[A]=E,this.clientsCount++,E.once("close",(()=>{delete this.clients[A],this.clientsCount--})),this.emit("connection",E),O}async onWebTransportSession(R){const T=setTimeout((()=>{r("the client failed to establish a bidirectional stream in the given period"),R.close()}),this.opts.upgradeTimeout),C=await R.incomingBidirectionalStreams.getReader().read();if(C.done){r("session is closed");return}const A=C.value,O=(0,e.createPacketDecoderStream)(this.opts.maxHttpBufferSize,"nodebuffer"),E=A.readable.pipeThrough(O).getReader(),{value:P,done:N}=await E.read();if(N){r("stream is closed");return}if(clearTimeout(T),P.type!=="open")return r("invalid WebTransport handshake"),R.close();if(P.data===void 0){const z=new a.WebTransport(R,A,E),H=n.generateId();r('handshaking client "%s" (WebTransport)',H);const X=new l.Socket(H,this,z,null,4);this.clients[H]=X,this.clientsCount++,X.once("close",(()=>{delete this.clients[H],this.clientsCount--})),this.emit("connection",X);return}const j=f(P.data);if(!j)return r("invalid WebTransport handshake"),R.close();const M=this.clients[j];if(!M)r("upgrade attempt for closed client"),R.close();else if(M.upgrading)r("transport has already been trying to upgrade"),R.close();else if(M.upgraded)r("transport had already been upgraded"),R.close();else{r("upgrading existing transport");const z=new a.WebTransport(R,A,E);M._maybeUpgrade(z)}}}_.BaseServer=s,s.errors={UNKNOWN_TRANSPORT:0,UNKNOWN_SID:1,BAD_HANDSHAKE_METHOD:2,BAD_REQUEST:3,FORBIDDEN:4,UNSUPPORTED_PROTOCOL_VERSION:5},s.errorMessages={0:"Transport unknown",1:"Session ID unknown",2:"Bad handshake method",3:"Bad request",4:"Forbidden",5:"Unsupported protocol version"};class g{constructor(R,T){this.req=R,this.socket=T,R[p]={}}setHeader(R,T){this.req[p][R]=T}getHeader(R){return this.req[p][R]}removeHeader(R){delete this.req[p][R]}write(){}writeHead(){}end(){this.socket.destroy()}}class h extends s{init(){~this.opts.transports.indexOf("websocket")&&(this.ws&&this.ws.close(),this.ws=new this.opts.wsEngine({noServer:!0,clientTracking:!1,perMessageDeflate:this.opts.perMessageDeflate,maxPayload:this.opts.maxHttpBufferSize}),typeof this.ws.on=="function"&&this.ws.on("headers",((R,T)=>{const I=T[p]||{};delete T[p],!T._query.sid&&this.emit("initial_headers",I,T),this.emit("headers",I,T),r("writing headers: %j",I),Object.keys(I).forEach((A=>{R.push(`${A}: ${I[A]}`)}))})))}cleanup(){this.ws&&(r("closing webSocketServer"),this.ws.close())}prepare(R){if(!R._query){const T=new URL(R.url,"https://socket.io");R._query=Object.fromEntries(T.searchParams.entries())}}createTransport(R,T){return new t.default[R](T)}handleRequest(R,T){r('handling "%s" http request "%s"',R.method,R.url),this.prepare(R),R.res=T;const I=(C,A)=>{if(C!==void 0){this.emit("connection_error",{req:R,code:C,message:h.errorMessages[C],context:A}),v(T,C,A);return}if(R._query.sid)r("setting new request for existing client"),this.clients[R._query.sid].transport.onRequest(R);else{const O=(E,P)=>v(T,E,P);this.handshake(R._query.transport,R,O)}};this._applyMiddlewares(R,T,(C=>{C?I(h.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(R,!1,I)}))}handleUpgrade(R,T,I){this.prepare(R);const C=new g(R,T),A=(O,E)=>{if(O!==void 0){this.emit("connection_error",{req:R,code:O,message:h.errorMessages[O],context:E}),b(T,O,E);return}const P=Buffer.from(I);I=null,C.writeHead(),this.ws.handleUpgrade(R,T,P,(N=>{this.onWebSocket(R,T,N)}))};this._applyMiddlewares(R,C,(O=>{O?A(h.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(R,!0,A)}))}onWebSocket(R,T,I){if(I.on("error",A),t.default[R._query.transport]!==void 0&&!t.default[R._query.transport].prototype.handlesUpgrades){r("transport doesnt handle upgraded requests"),I.close();return}const C=R._query.sid;if(R.websocket=I,C){const O=this.clients[C];if(!O)r("upgrade attempt for closed client"),I.close();else if(O.upgrading)r("transport has already been trying to upgrade"),I.close();else if(O.upgraded)r("transport had already been upgraded"),I.close();else{r("upgrading existing transport"),I.removeListener("error",A);const E=this.createTransport(R._query.transport,R);E.perMessageDeflate=this.opts.perMessageDeflate,O._maybeUpgrade(E)}}else{const O=(E,P)=>b(T,E,P);this.handshake(R._query.transport,R,O)}function A(){r("websocket error before upgrade")}}attach(R,T={}){const I=this._computePath(T),C=T.destroyUpgradeTimeout||1e3;function A(E){return I===E.url.slice(0,I.length)}const O=R.listeners("request").slice(0);R.removeAllListeners("request"),R.on("close",this.close.bind(this)),R.on("listening",this.init.bind(this)),R.on("request",((E,P)=>{if(A(E))r('intercepting request for path "%s"',I),this.handleRequest(E,P);else{let N=0;const j=O.length;for(;N<j;N++)O[N].call(R,E,P)}})),~this.opts.transports.indexOf("websocket")&&R.on("upgrade",((E,P,N)=>{A(E)?this.handleUpgrade(E,P,N):T.destroyUpgrade!==!1&&setTimeout((function(){if(P.writable&&P.bytesWritten<=0)return P.on("error",(j=>{r("error while destroying upgrade: %s",j.message)})),P.end()}),C)}))}}_.Server=h;function v(k,R,T){const I=R===h.errors.FORBIDDEN?403:400,C=T&&T.message?T.message:h.errorMessages[R];k.writeHead(I,{"Content-Type":"application/json"}),k.end(JSON.stringify({code:R,message:C}))}function b(k,R,T={}){if(k.on("error",(()=>{r("ignoring error from closed connection")})),k.writable){const I=T.message||h.errorMessages[R],C=Buffer.byteLength(I);k.write(`HTTP/1.1 400 Bad Request\r
|
|
367
367
|
Connection: close\r
|
|
368
368
|
Content-type: text/html\r
|
|
369
369
|
Content-Length: `+C+`\r
|
|
@@ -404,7 +404,7 @@ Content-Length: `+C+`\r
|
|
|
404
404
|
helper = store --file ${l.replace(/\\/g,"/")}
|
|
405
405
|
[user]
|
|
406
406
|
name = ${n}
|
|
407
|
-
`,{mode:384})}catch{}console.log(`[\u7BA1\u7406] \u6DFB\u52A0\u7528\u6237 ${n} (\u76EE\u5F55: ${t})`),_.json({ok:!0})})),app.delete("/api/admin/user",checkAdminAuth,express.json(),((S,_)=>{const{name:u}=S.body||{};if(!u)return _.json({ok:!1,error:"\u8BF7\u6307\u5B9A\u7528\u6237\u540D\u79F0"});if(loadUsers(),!listUsers().find((n=>n.name===u)))return _.json({ok:!1,error:"\u7528\u6237\u4E0D\u5B58\u5728"});try{const n=(0,external_path_.join)(server_configDir,"users.json"),t=JSON.parse((0,external_fs_.readFileSync)(n,"utf8"));for(const[c,l]of Object.entries(t.users||{}))if(l.name===u){delete t.users[c];break}(0,external_fs_.writeFileSync)(n,JSON.stringify(t,null,2),{mode:384}),loadUsers(),console.log(`[\u7BA1\u7406] \u5220\u9664\u7528\u6237 ${u}`),_.json({ok:!0})}catch(n){_.json({ok:!1,error:n.message})}})),app.post("/api/admin/user/password",checkAdminAuth,express.json(),((S,_)=>{const{name:u,password:n}=S.body||{};if(!u||!n)return _.json({ok:!1,error:"\u540D\u79F0\u548C\u65B0\u5BC6\u7801\u5FC5\u586B"});try{const t=(0,external_path_.join)(server_configDir,"users.json"),c=JSON.parse((0,external_fs_.readFileSync)(t,"utf8"));let l=null;for(const[m,o]of Object.entries(c.users||{}))if(o.name===u){l=o,delete c.users[m];break}if(!l)return _.json({ok:!1,error:"\u7528\u6237\u4E0D\u5B58\u5728"});c.users[n]=l,(0,external_fs_.writeFileSync)(t,JSON.stringify(c,null,2),{mode:384}),loadUsers(),console.log(`[\u7BA1\u7406] \u4FEE\u6539\u7528\u6237 ${u} \u7684\u5BC6\u7801`),_.json({ok:!0})}catch(t){_.json({ok:!1,error:t.message})}})),app.post("/api/admin/password",checkAdminAuth,express.json(),((S,_)=>{const{password:u}=S.body||{};if(!u||u.length<4)return _.json({ok:!1,error:"\u5BC6\u7801\u81F3\u5C114\u4F4D"});try{(0,external_fs_.writeFileSync)((0,external_path_.join)(server_configDir,"password"),u,{mode:384}),PASSWORD=u,_.json({ok:!0}),console.log("[\u7BA1\u7406] \u7BA1\u7406\u5BC6\u7801\u5DF2\u4FEE\u6539")}catch(n){_.json({ok:!1,error:n.message})}})),app.post("/upload",checkAuth,((S,_)=>{const u=S.query.sessionId,n=u?manager.get(u):null,t=n?.cwd?(0,external_path_.join)(n.cwd,"upload"):uploadDir;(0,external_fs_.mkdirSync)(t,{recursive:!0}),multer({storage:multer.diskStorage({destination:t,filename:(c,l,m)=>{const o=l.originalname.match(/\.[^.]+$/)?.[0]||".jpg";m(null,`${Date.now()}-${(0,external_crypto_.randomBytes)(3).toString("hex")}${o}`)}}),limits:{fileSize:20*1024*1024},fileFilter:(c,l,m)=>m(null,l.mimetype.startsWith("image/"))}).single("image")(S,_,(c=>{if(c)return _.status(400).json({error:c.message});if(!S.file)return _.status(400).json({error:"\u6CA1\u6709\u56FE\u7247"});_.json({path:(0,external_path_.resolve)(S.file.path).replace(/\\/g,"/")})}))})),app.post("/api/voice-transcribe",checkAuth,multer({storage:multer.memoryStorage(),limits:{fileSize:200*1024*1024}}).single("audio"),(async(S,_)=>{if(!S.file)return _.status(400).json({error:"\u65E0\u97F3\u9891\u6570\u636E"});const u=process.env.ASR_URL||(()=>{try{return JSON.parse((0,external_fs_.readFileSync)((0,external_path_.join)((0,external_os_.homedir)(),".myhi","asr.json"),"utf8")).url}catch{return null}})();if(!u)return _.status(503).json({error:"\u672A\u914D\u7F6E ASR \u670D\u52A1\uFF0C\u8BF7\u8BBE\u7F6E ASR_URL \u73AF\u5883\u53D8\u91CF\u6216 ~/.myhi/asr.json"});try{const n=new FormData,t=S.file.mimetype||"audio/webm",c=S.file.originalname||"audio.webm";n.append("audio",new Blob([S.file.buffer],{type:t}),c);const m=await(await fetch(u+"/transcribe",{method:"POST",body:n})).json();_.json({text:m.text||"",error:m.error})}catch(n){const t=n.cause?.message||n.cause?.code||"",c=t?`${n.message} (${t})`:n.message;console.error(`[myhi] ASR fetch \u5931\u8D25 url=${u} file=${filename} mime=${mime} size=${S.file.buffer.length}:`,c,n.cause),_.status(500).json({error:c})}})),app.post("/api/voice-assist/organize",checkAuth,express.json(),(async(S,_)=>{const{transcript:u}=S.body||{};if(!u?.trim())return _.status(400).json({error:"\u65E0\u8F6C\u5F55\u5185\u5BB9"});const n=`\u7528\u6237\u901A\u8FC7\u8BED\u97F3\u53E3\u8FF0\u4E86\u4EE5\u4E0B\u5185\u5BB9\uFF0C\u539F\u6587\u5982\u4E0B\uFF1A
|
|
407
|
+
`,{mode:384})}catch{}console.log(`[\u7BA1\u7406] \u6DFB\u52A0\u7528\u6237 ${n} (\u76EE\u5F55: ${t})`),_.json({ok:!0})})),app.delete("/api/admin/user",checkAdminAuth,express.json(),((S,_)=>{const{name:u}=S.body||{};if(!u)return _.json({ok:!1,error:"\u8BF7\u6307\u5B9A\u7528\u6237\u540D\u79F0"});if(loadUsers(),!listUsers().find((n=>n.name===u)))return _.json({ok:!1,error:"\u7528\u6237\u4E0D\u5B58\u5728"});try{const n=(0,external_path_.join)(server_configDir,"users.json"),t=JSON.parse((0,external_fs_.readFileSync)(n,"utf8"));for(const[c,l]of Object.entries(t.users||{}))if(l.name===u){delete t.users[c];break}(0,external_fs_.writeFileSync)(n,JSON.stringify(t,null,2),{mode:384}),loadUsers(),console.log(`[\u7BA1\u7406] \u5220\u9664\u7528\u6237 ${u}`),_.json({ok:!0})}catch(n){_.json({ok:!1,error:n.message})}})),app.post("/api/admin/user/password",checkAdminAuth,express.json(),((S,_)=>{const{name:u,password:n}=S.body||{};if(!u||!n)return _.json({ok:!1,error:"\u540D\u79F0\u548C\u65B0\u5BC6\u7801\u5FC5\u586B"});try{const t=(0,external_path_.join)(server_configDir,"users.json"),c=JSON.parse((0,external_fs_.readFileSync)(t,"utf8"));let l=null;for(const[m,o]of Object.entries(c.users||{}))if(o.name===u){l=o,delete c.users[m];break}if(!l)return _.json({ok:!1,error:"\u7528\u6237\u4E0D\u5B58\u5728"});c.users[n]=l,(0,external_fs_.writeFileSync)(t,JSON.stringify(c,null,2),{mode:384}),loadUsers(),console.log(`[\u7BA1\u7406] \u4FEE\u6539\u7528\u6237 ${u} \u7684\u5BC6\u7801`),_.json({ok:!0})}catch(t){_.json({ok:!1,error:t.message})}})),app.post("/api/admin/password",checkAdminAuth,express.json(),((S,_)=>{const{password:u}=S.body||{};if(!u||u.length<4)return _.json({ok:!1,error:"\u5BC6\u7801\u81F3\u5C114\u4F4D"});try{(0,external_fs_.writeFileSync)((0,external_path_.join)(server_configDir,"password"),u,{mode:384}),PASSWORD=u,_.json({ok:!0}),console.log("[\u7BA1\u7406] \u7BA1\u7406\u5BC6\u7801\u5DF2\u4FEE\u6539")}catch(n){_.json({ok:!1,error:n.message})}})),app.post("/upload",checkAuth,((S,_)=>{const u=S.query.sessionId,n=u?manager.get(u):null,t=n?.cwd?(0,external_path_.join)(n.cwd,"upload"):uploadDir;(0,external_fs_.mkdirSync)(t,{recursive:!0}),multer({storage:multer.diskStorage({destination:t,filename:(c,l,m)=>{const o=l.originalname.match(/\.[^.]+$/)?.[0]||".jpg";m(null,`${Date.now()}-${(0,external_crypto_.randomBytes)(3).toString("hex")}${o}`)}}),limits:{fileSize:20*1024*1024},fileFilter:(c,l,m)=>m(null,l.mimetype.startsWith("image/"))}).single("image")(S,_,(c=>{if(c)return _.status(400).json({error:c.message});if(!S.file)return _.status(400).json({error:"\u6CA1\u6709\u56FE\u7247"});_.json({path:(0,external_path_.resolve)(S.file.path).replace(/\\/g,"/")})}))})),app.post("/upload-file",checkAuth,((S,_)=>{(0,external_fs_.mkdirSync)(uploadDir,{recursive:!0}),multer({storage:multer.diskStorage({destination:uploadDir,filename:(u,n,t)=>{const c=(n.originalname||"file").replace(/[\\/:*?"<>|]/g,"_").slice(-80);t(null,`${Date.now()}-${(0,external_crypto_.randomBytes)(3).toString("hex")}-${c}`)}}),limits:{fileSize:50*1024*1024}}).single("file")(S,_,(u=>{if(u)return _.status(400).json({error:u.message});if(!S.file)return _.status(400).json({error:"\u6CA1\u6709\u6587\u4EF6"});_.json({path:(0,external_path_.resolve)(S.file.path).replace(/\\/g,"/"),name:S.file.originalname})}))})),app.post("/api/voice-transcribe",checkAuth,multer({storage:multer.memoryStorage(),limits:{fileSize:200*1024*1024}}).single("audio"),(async(S,_)=>{if(!S.file)return _.status(400).json({error:"\u65E0\u97F3\u9891\u6570\u636E"});const u=process.env.ASR_URL||(()=>{try{return JSON.parse((0,external_fs_.readFileSync)((0,external_path_.join)((0,external_os_.homedir)(),".myhi","asr.json"),"utf8")).url}catch{return null}})();if(!u)return _.status(503).json({error:"\u672A\u914D\u7F6E ASR \u670D\u52A1\uFF0C\u8BF7\u8BBE\u7F6E ASR_URL \u73AF\u5883\u53D8\u91CF\u6216 ~/.myhi/asr.json"});try{const n=new FormData,t=S.file.mimetype||"audio/webm",c=S.file.originalname||"audio.webm";n.append("audio",new Blob([S.file.buffer],{type:t}),c);const m=await(await fetch(u+"/transcribe",{method:"POST",body:n})).json();_.json({text:m.text||"",error:m.error})}catch(n){const t=n.cause?.message||n.cause?.code||"",c=t?`${n.message} (${t})`:n.message;console.error(`[myhi] ASR fetch \u5931\u8D25 url=${u} file=${filename} mime=${mime} size=${S.file.buffer.length}:`,c,n.cause),_.status(500).json({error:c})}})),app.post("/api/voice-assist/organize",checkAuth,express.json(),(async(S,_)=>{const{transcript:u}=S.body||{};if(!u?.trim())return _.status(400).json({error:"\u65E0\u8F6C\u5F55\u5185\u5BB9"});const n=`\u7528\u6237\u901A\u8FC7\u8BED\u97F3\u53E3\u8FF0\u4E86\u4EE5\u4E0B\u5185\u5BB9\uFF0C\u539F\u6587\u5982\u4E0B\uFF1A
|
|
408
408
|
|
|
409
409
|
---
|
|
410
410
|
${u}
|