tabby/clients/vim/node_scripts/tabby-agent.js

177 lines
418 KiB
JavaScript
Raw Normal View History

#!/bin/env node
'use strict';
var child_process = require('child_process');
var Pt = require('zlib');
var Mn = require('stream');
var fs = require('fs');
var promises = require('fs/promises');
var path = require('path');
var pT = require('util');
var fT = require('events');
var Kb = require('crypto');
var oO = require('url');
var uT = require('http');
var lT = require('https');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var Pt__default = /*#__PURE__*/_interopDefault(Pt);
var Mn__default = /*#__PURE__*/_interopDefault(Mn);
var pT__default = /*#__PURE__*/_interopDefault(pT);
var fT__default = /*#__PURE__*/_interopDefault(fT);
var Kb__default = /*#__PURE__*/_interopDefault(Kb);
var oO__default = /*#__PURE__*/_interopDefault(oO);
var uT__default = /*#__PURE__*/_interopDefault(uT);
var lT__default = /*#__PURE__*/_interopDefault(lT);
var Ub=Object.create;var yi=Object.defineProperty;var zb=Object.getOwnPropertyDescriptor;var $b=Object.getOwnPropertyNames;var Mb=Object.getPrototypeOf,Wb=Object.prototype.hasOwnProperty;var Hb=(t,e,n)=>e in t?yi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Gb=(t,e)=>()=>(t&&(e=t(t=0)),e);var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vb=(t,e)=>{for(var n in e)yi(t,n,{get:e[n],enumerable:!0});},Nu=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of $b(e))!Wb.call(t,r)&&r!==n&&yi(t,r,{get:()=>e[r],enumerable:!(i=zb(e,r))||i.enumerable});return t};var tt=(t,e,n)=>(n=t!=null?Ub(Mb(t)):{},Nu(e||!t||!t.__esModule?yi(n,"default",{value:t,enumerable:!0}):n,t)),Jb=t=>Nu(yi({},"__esModule",{value:!0}),t);var U=(t,e,n)=>(Hb(t,typeof e!="symbol"?e+"":e,n),n),la=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(la(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n);},F=(t,e,n,i)=>(la(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),dr=(t,e,n,i)=>({set _(r){F(t,e,r,n);},get _(){return m(t,e,i)}}),j=(t,e,n)=>(la(t,e,"access private method"),n);var da=g((kq,$u)=>{var zu=Object.prototype.toString;$u.exports=function(e){var n=zu.call(e),i=n==="[object Arguments]";return i||(i=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&zu.call(e.callee)==="[object Function]"),i};});var Xu=g((Cq,Yu)=>{var Ku;Object.keys||(xi=Object.prototype.hasOwnProperty,ma=Object.prototype.toString,Mu=da(),ha=Object.prototype.propertyIsEnumerable,Wu=!ha.call({toString:null},"toString"),Hu=ha.call(function(){},"prototype"),gi=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],yr=function(t){var e=t.constructor;return e&&e.prototype===t},Gu={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Vu=function(){if(typeof window>"u")return !1;for(var t in window)try{if(!Gu["$"+t]&&xi.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{yr(window[t]);}catch{return !0}}catch{return !0}return !1}(),Ju=function(t){if(typeof window>"u"||!Vu)return yr(t);try{return yr(t)}catch{return !1}},Ku=function(e){var n=e!==null&&typeof e=="object",i=ma.call(e)==="[object Function]",r=Mu(e),o=n&&ma.call(e)==="[object String]",a=[];if(!n&&!i&&!r)throw new TypeError("Object.keys called on a non-object");var s=Hu&&i;if(o&&e.length>0&&!xi.call(e,0))for(var c=0;c<e.length;++c)a.push(String(c));if(r&&e.length>0)for(var l=0;l<e.length;++l)a.push(String(l));else for(var u in e)!(s&&u==="prototype")&&xi.call(e,u)&&a.push(String(u));if(Wu)for(var p=Ju(e),h=0;h<gi.length;++h)!(p&&gi[h]==="constructor")&&xi.call(e,gi[h])&&a.push(gi[h]);return a});var xi,ma,Mu,ha,Wu,Hu,gi,yr,Gu,Vu,Ju;Yu.exports=Ku;});var gr=g((_q,el)=>{var Qb=Array.prototype.slice,Zb=da(),Qu=Object.keys,xr=Qu?function(e){return Qu(e)}:Xu(),Zu=Object.keys;xr.shim=function(){if(Object.keys){var e=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);e||(Object.keys=function(i){return Zb(i)?Zu(Qb.call(i)):Zu(i)});}else Object.keys=xr;return Object.keys||xr};el.exports=xr;});var vr=g((Fq,tl)=>{tl.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return !1;if(typeof Symbol.iterator=="symbol")return !0;var e={},n=Symbol("test"),i=Object(n);if(typeof n=="string"||Object.prototype.toString.c
`)>=0)return !1;return !0}function C0(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=nt.call(Array(t.indent+1)," ");else return null;return {base:n,prev:nt.call(Array(e+1),n)}}function La(t,e){if(t.length===0)return "";var n=`
`+e.prev+e.base;return n+nt.call(t,","+n)+`
`+e.prev}function Ar(t,e){var n=Ia(t),i=[];if(n){i.length=t.length;for(var r=0;r<t.length;r++)i[r]=Tt(t,r)?e(t[r],t):"";}var o=typeof Fa=="function"?Fa(t):[],a;if(Cn){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s];}for(var c in t)Tt(t,c)&&(n&&String(Number(c))===c&&c<t.length||Cn&&a["$"+c]instanceof Symbol||(yp.call(/[^\w$]/,c)?i.push(e(c,t)+": "+e(t[c],t)):i.push(c+": "+e(t[c],t))));if(typeof Fa=="function")for(var l=0;l<o.length;l++)xp.call(t,o[l])&&i.push("["+e(o[l])+"]: "+e(t[o[l]],t));return i}});var Op=g((ej,Ap)=>{var za=xt(),_n=Fe(),_0=Ep(),F0=za("%TypeError%"),Rr=za("%WeakMap%",!0),kr=za("%Map%",!0),P0=_n("WeakMap.prototype.get",!0),q0=_n("WeakMap.prototype.set",!0),j0=_n("WeakMap.prototype.has",!0),B0=_n("Map.prototype.get",!0),I0=_n("Map.prototype.set",!0),L0=_n("Map.prototype.has",!0),$a=function(t,e){for(var n=t,i;(i=n.next)!==null;n=i)if(i.key===e)return n.next=i.next,i.next=t.next,t.next=i,i},D0=function(t,e){var n=$a(t,e);return n&&n.value},N0=function(t,e,n){var i=$a(t,e);i?i.value=n:t.next={key:e,next:t.next,value:n};},U0=function(t,e){return !!$a(t,e)};Ap.exports=function(){var e,n,i,r={assert:function(o){if(!r.has(o))throw new F0("Side channel does not contain "+_0(o))},get:function(o){if(Rr&&o&&(typeof o=="object"||typeof o=="function")){if(e)return P0(e,o)}else if(kr){if(n)return B0(n,o)}else if(i)return D0(i,o)},has:function(o){if(Rr&&o&&(typeof o=="object"||typeof o=="function")){if(e)return j0(e,o)}else if(kr){if(n)return L0(n,o)}else if(i)return U0(i,o);return !1},set:function(o,a){Rr&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Rr),q0(e,o,a)):kr?(n||(n=new kr),I0(n,o,a)):(i||(i={key:{},next:null}),N0(i,o,a));}};return r};});var Ma=g((tj,Rp)=>{var Tp=function(t){return t!==t};Rp.exports=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Tp(e)&&Tp(n))};});var Wa=g((nj,kp)=>{var z0=Ma();kp.exports=function(){return typeof Object.is=="function"?Object.is:z0};});var _p=g((ij,Cp)=>{var $0=Wa(),M0=Ot();Cp.exports=function(){var e=$0();return M0(Object,{is:e},{is:function(){return Object.is!==e}}),e};});var jp=g((rj,qp)=>{var W0=Ot(),H0=kn(),G0=Ma(),Fp=Wa(),V0=_p(),Pp=H0(Fp(),Object);W0(Pp,{getPolyfill:Fp,implementation:G0,shim:V0});qp.exports=Pp;});var gt=g((oj,Bp)=>{var J0=vr();Bp.exports=function(){return J0()&&!!Symbol.toStringTag};});var Dp=g((aj,Lp)=>{var K0=gt()(),Y0=Fe(),Ha=Y0("Object.prototype.toString"),Cr=function(e){return K0&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Ha(e)==="[object Arguments]"},Ip=function(e){return Cr(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ha(e)!=="[object Array]"&&Ha(e.callee)==="[object Function]"},X0=function(){return Cr(arguments)}();Cr.isLegacyArguments=Ip;Lp.exports=X0?Cr:Ip;});var Up=g((sj,Np)=>{var Q0={}.toString;Np.exports=Array.isArray||function(t){return Q0.call(t)=="[object Array]"};});var Wp=g((cj,Mp)=>{var $p=Function.prototype.toString,Fn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Va,_r;if(typeof Fn=="function"&&typeof Object.defineProperty=="function")try{Va=Object.defineProperty({},"length",{get:function(){throw _r}}),_r={},Fn(function(){throw 42},null,Va);}catch(t){t!==_r&&(Fn=null);}else Fn=null;var Z0=/^\s*class\b/,Ja=function(e){try{var n=$p.call(e);return Z0.test(n)}catch{return !1}},Ga=function(e){try{return Ja(e)?!1:($p.call(e),!0)}catch{return !1}},Fr=Object.prototype.toString,eS="[object Object]",tS="[object Function]",nS="[object GeneratorFunction]",iS="[object HTMLAllCollection]",rS="[object HTML document.all class]",oS="[object HTMLCollection]",aS=typeof Symbol=="function"&&!!Symbol.toStringTag,sS=!(0 in[,]),Ka=function(){return !1};typeof document=="object"&&(zp=document.all,Fr.call(zp)===Fr.call(document.all)&&(Ka=function(e){if((sS||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=Fr.call(e);return (n===iS||n===rS||n===oS||n===eS)&&e("")==null}catch{}return !1}));var zp;Mp.exports=Fn?function(e){if(Ka(e))return !0;if(!e||typeof e!="function"&&typeof e!="object")return !1;try{Fn(e,null,Va);}catch(n){if(n!==_r)return !1}return !Ja(e)&&Ga(e)}:function(e){if(Ka(e))re
`;J.DEFAULT_CONTENT_TYPE="application/octet-stream";J.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var i=Ps.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),Am.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,n),o=this._multiPartFooter();i(r),i(e),i(o),this._trackLength(r,e,n);};J.prototype._trackLength=function(t,e,n){var i=0;n.knownLength!=null?i+=+n.knownLength:Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(t)+J.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof ZA))&&(n.knownLength||this._valuesToMeasure.push(e));};J.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):QA.stat(t.path,function(n,i){var r;if(n){e(n);return}r=i.size-(t.start?t.start:0),e(null,r);}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"]);}),t.resume()):e("Unknown stream");};J.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var i=this._getContentDisposition(e,n),r=this._getContentType(e,n),o="",a={"Content-Disposition":["form-data",'name="'+t+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&Fs(a,n.header);var s;for(var c in a)a.hasOwnProperty(c)&&(s=a[c],s!=null&&(Array.isArray(s)||(s=[s]),s.length&&(o+=c+": "+s.join("; ")+J.LINE_BREAK)));return "--"+this.getBoundary()+J.LINE_BREAK+o+J.LINE_BREAK};J.prototype._getContentDisposition=function(t,e){var n,i;return typeof e.filepath=="string"?n=Cs.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=Cs.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=Cs.basename(t.client._httpMessage.path||"")),n&&(i='filename="'+n+'"'),i};J.prototype._getContentType=function(t,e){var n=e.contentType;return !n&&t.name&&(n=_s.lookup(t.name)),!n&&t.path&&(n=_s.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=_s.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=J.DEFAULT_CONTENT_TYPE),n};J.prototype._multiPartFooter=function(){return function(t){var e=J.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e);}.bind(this)};J.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+J.LINE_BREAK};J.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};J.prototype.setBoundary=function(t){this._boundary=t;};J.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};J.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,i=this._streams.length;n<i;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(J.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};J.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t;};J.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};J.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};J.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process
2023-05-29 02:09:44 +00:00
`).join(`
`+o),t.push(r+"m+"+oo.exports.humanize(this.diff)+"\x1B[0m");}else t[0]=IO()+e+" "+t[0];}function IO(){return pe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function LO(...t){return process.stderr.write(ro.format(...t)+`
`)}function DO(t){t?process.env.DEBUG=t:delete process.env.DEBUG;}function NO(){return process.env.DEBUG}function UO(t){t.inspectOpts={};let e=Object.keys(pe.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=pe.inspectOpts[e[n]];}oo.exports=zs()(pe);var{formatters:Mm}=oo.exports;Mm.o=function(t){return this.inspectOpts.colors=this.useColors,ro.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Mm.O=function(t){return this.inspectOpts.colors=this.useColors,ro.inspect(t,this.inspectOpts)};});var Hm=g((oI,$s)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?$s.exports=$m():$s.exports=Wm();});var Vm=g((aI,Gm)=>{var qi;Gm.exports=function(){if(!qi){try{qi=Hm()("follow-redirects");}catch{}typeof qi!="function"&&(qi=function(){});}qi.apply(null,arguments);};});var th=g((sI,Vs)=>{var en=_("url"),Ms=en.URL,zO=_("http"),$O=_("https"),Ym=_("stream").Writable,Xm=_("assert"),Qm=Vm(),Hs=["abort","aborted","connect","error","socket","timeout"],Gs=Object.create(null);Hs.forEach(function(t){Gs[t]=function(e,n,i){this._redirectable.emit(t,e,n,i);};});var MO=Bi("ERR_INVALID_URL","Invalid URL",TypeError),Jm=Bi("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),WO=Bi("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),HO=Bi("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),GO=Bi("ERR_STREAM_WRITE_AFTER_END","write after end");function qe(t,e){Ym.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(i){n._processResponse(i);},this._performRequest();}qe.prototype=Object.create(Ym.prototype);qe.prototype.abort=function(){eh(this._currentRequest),this.emit("abort");};qe.prototype.write=function(t,e,n){if(this._ending)throw new GO;if(!tn(t)&&!KO(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ji(e)&&(n=e,e=null),t.length===0){n&&n();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new HO),this.abort());};qe.prototype.end=function(t,e,n){if(ji(t)?(n=t,t=e=null):ji(e)&&(n=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else {var i=this,r=this._currentRequest;this.write(t,e,function(){i._ended=!0,r.end(null,null,n);}),this._ending=!0;}};qe.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e);};qe.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t);};qe.prototype.setTimeout=function(t,e){var n=this;function i(a){a.setTimeout(t),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy);}function r(a){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),o();},t),i(a);}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),e&&n.removeListener("timeout",e),n.socket||n._currentRequest.removeListener("socket",r);}return e&&this.on("timeout",e),this.socket?r(this.socket):this._currentRequest.once("socket",r),this.on("socket",i),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){qe.prototype[t]=function(e,n){return this._currentRequest[t](e,n)};});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(qe.prototype,t,{get:function(){return this._currentRequest[t]}});});qe.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e));}};qe.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e){this.emit("error",new TypeError("Unsupported protocol "+t));return}if(this._options.agents){var n=t.slice(0,-1);this._options.agent=this._options.agents[n];}var i=this._currentRequest=e.request(this._options,this._onNativeResponse);i._redirectable=this;for(var r of Hs)i.on(r,Gs[r]);if(this._currentUrl=/^\//.test(this._options.path)?en.
GFS4: `),console.error(t);});Z[fe]||(jh=global[fe]||[],Ih(Z,jh),Z.close=function(t){function e(n,i){return t.call(Z,n,function(r){r||Bh(),typeof i=="function"&&i.apply(this,arguments);})}return Object.defineProperty(e,So,{value:t}),e}(Z.close),Z.closeSync=function(t){function e(n){t.apply(Z,arguments),Bh();}return Object.defineProperty(e,So,{value:t}),e}(Z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){sn(Z[fe]),_("assert").equal(Z[fe].length,0);}));var jh;global[fe]||Ih(global,Z[fe]);mc.exports=fc(WT(Z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Z.__patched&&(mc.exports=fc(Z),Z.__patched=!0);function fc(t){$T(t),t.gracefulify=fc,t.createReadStream=k,t.createWriteStream=q;var e=t.readFile;t.readFile=n;function n(T,B,I){return typeof B=="function"&&(I=B,B=null),M(T,B,I);function M(W,z,V,K){return e(W,z,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Jn([M,[W,z,V],R,K||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments);})}}var i=t.writeFile;t.writeFile=r;function r(T,B,I,M){return typeof I=="function"&&(M=I,I=null),W(T,B,I,M);function W(z,V,K,R,P){return i(z,V,K,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,R],H,P||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments);})}}var o=t.appendFile;o&&(t.appendFile=a);function a(T,B,I,M){return typeof I=="function"&&(M=I,I=null),W(T,B,I,M);function W(z,V,K,R,P){return o(z,V,K,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,R],H,P||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments);})}}var s=t.copyFile;s&&(t.copyFile=c);function c(T,B,I,M){return typeof I=="function"&&(M=I,I=0),W(T,B,I,M);function W(z,V,K,R,P){return s(z,V,K,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,R],H,P||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments);})}}var l=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(T,B,I){typeof B=="function"&&(I=B,B=null);var M=u.test(process.version)?function(V,K,R,P){return l(V,W(V,K,R,P))}:function(V,K,R,P){return l(V,K,W(V,K,R,P))};return M(T,B,I);function W(z,V,K,R){return function(P,H){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Jn([M,[z,V,K],P,R||Date.now(),Date.now()]):(H&&H.sort&&H.sort(),typeof K=="function"&&K.call(this,P,H));}}}if(process.version.substr(0,4)==="v0.8"){var h=MT(t);b=h.ReadStream,A=h.WriteStream;}var f=t.ReadStream;f&&(b.prototype=Object.create(f.prototype),b.prototype.open=w);var d=t.WriteStream;d&&(A.prototype=Object.create(d.prototype),A.prototype.open=O),Object.defineProperty(t,"ReadStream",{get:function(){return b},set:function(T){b=T;},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return A},set:function(T){A=T;},enumerable:!0,configurable:!0});var y=b;Object.defineProperty(t,"FileReadStream",{get:function(){return y},set:function(T){y=T;},enumerable:!0,configurable:!0});var v=A;Object.defineProperty(t,"FileWriteStream",{get:function(){return v},set:function(T){v=T;},enumerable:!0,configurable:!0});function b(T,B){return this instanceof b?(f.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function w(){var T=this;D(T.path,T.flags,T.mode,function(B,I){B?(T.autoClose&&T.destroy(),T.emit("error",B)):(T.fd=I,T.emit("open",I),T.read());});}function A(T,B){return this instanceof A?(d.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function O(){var T=this;D(T.path,T.flags,T.mode,function(B,I){B?(T.destroy(),T.emit("error",B)):(T.fd=I,T.emit("open",I));});}function k(T,B){return new t.ReadStream(T,B)}function q(T,B){return new t.WriteStream(T,B)}var L=t.open;t.open=D;function D(T,B,I,M){return typeof I=="function"&&(M=I,I=null),W(T,B,I,M);function W(z,V,K,R,P){return L(z,V,K,function(H,lr){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,R],H,P||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments);})}}return t}function Jn(t){sn("ENQUEUE",t[0].name,t[1]),Z[fe].push(t),dc();}var wo;function Bh(){for(var t=Date.now(),e=0;e<Z[fe].length;++e)Z[fe][e].length>2&&(Z[fe][
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),Gi.checkPaths(t,e,"copy",n,(r,o)=>{if(r)return i(r);let{srcStat:a,destStat:s}=o;Gi.checkParentPaths(t,a,e,"copy",c=>{if(c)return i(c);Qh(t,e,n,(l,u)=>{if(l)return i(l);if(!u)return i();uR(s,t,e,n,i);});});});}function uR(t,e,n,i,r){let o=Hi.dirname(n);aR(o,(a,s)=>{if(a)return r(a);if(s)return bc(t,e,n,i,r);oR(o,c=>c?r(c):bc(t,e,n,i,r));});}function Qh(t,e,n,i){if(!n.filter)return i(null,!0);Promise.resolve(n.filter(t,e)).then(r=>i(null,r),r=>i(r));}function bc(t,e,n,i,r){(i.dereference?Ae.stat:Ae.lstat)(e,(a,s)=>a?r(a):s.isDirectory()?yR(s,t,e,n,i,r):s.isFile()||s.isCharacterDevice()||s.isBlockDevice()?lR(s,t,e,n,i,r):s.isSymbolicLink()?vR(t,e,n,i,r):s.isSocket()?r(new Error(`Cannot copy a socket file: ${e}`)):s.isFIFO()?r(new Error(`Cannot copy a FIFO pipe: ${e}`)):r(new Error(`Unknown file: ${e}`)));}function lR(t,e,n,i,r,o){return e?pR(t,n,i,r,o):Zh(t,n,i,r,o)}function pR(t,e,n,i,r){if(i.overwrite)Ae.unlink(n,o=>o?r(o):Zh(t,e,n,i,r));else return i.errorOnExist?r(new Error(`'${n}' already exists`)):r()}function Zh(t,e,n,i,r){Ae.copyFile(e,n,o=>o?r(o):i.preserveTimestamps?fR(t.mode,e,n,r):Ao(n,t.mode,r));}function fR(t,e,n,i){return dR(t)?mR(n,t,r=>r?i(r):Xh(t,e,n,i)):Xh(t,e,n,i)}function dR(t){return (t&128)===0}function mR(t,e,n){return Ao(t,e|128,n)}function Xh(t,e,n,i){hR(e,n,r=>r?i(r):Ao(n,t,i));}function Ao(t,e,n){return Ae.chmod(t,e,n)}function hR(t,e,n){Ae.stat(t,(i,r)=>i?n(i):sR(e,r.atime,r.mtime,n));}function yR(t,e,n,i,r,o){return e?ey(n,i,r,o):xR(t.mode,n,i,r,o)}function xR(t,e,n,i,r){Ae.mkdir(n,o=>{if(o)return r(o);ey(e,n,i,a=>a?r(a):Ao(n,t,r));});}function ey(t,e,n,i){Ae.readdir(t,(r,o)=>r?i(r):wc(o,t,e,n,i));}function wc(t,e,n,i,r){let o=t.pop();return o?gR(t,o,e,n,i,r):r()}function gR(t,e,n,i,r,o){let a=Hi.join(n,e),s=Hi.join(i,e);Qh(a,s,r,(c,l)=>{if(c)return o(c);if(!l)return wc(t,n,i,r,o);Gi.checkPaths(a,s,"copy",r,(u,p)=>{if(u)return o(u);let{destStat:h}=p;bc(h,a,s,r,f=>f?o(f):wc(t,n,i,r,o));});});}function vR(t,e,n,i,r){Ae.readlink(e,(o,a)=>{if(o)return r(o);if(i.dereference&&(a=Hi.resolve(process.cwd(),a)),t)Ae.readlink(n,(s,c)=>s?s.code==="EINVAL"||s.code==="UNKNOWN"?Ae.symlink(a,n,r):r(s):(i.dereference&&(c=Hi.resolve(process.cwd(),c)),Gi.isSrcSubdir(a,c)?r(new Error(`Cannot copy '${a}' to a subdirectory of itself, '${c}'.`)):Gi.isSrcSubdir(c,a)?r(new Error(`Cannot overwrite '${c}' with '${a}'.`)):bR(a,n,r)));else return Ae.symlink(a,n,r)});}function bR(t,e,n){Ae.unlink(e,i=>i?n(i):Ae.symlink(t,e,n));}ty.exports=cR;});var sy=g((OD,ay)=>{var ge=Ee(),Vi=_("path"),wR=Ve().mkdirsSync,SR=gc().utimesMillisSync,Ji=un();function ER(t,e,n){typeof n=="function"&&(n={filter:n}),n=n||{},n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:i,destStat:r}=Ji.checkPathsSync(t,e,"copy",n);if(Ji.checkParentPathsSync(t,i,e,"copy"),n.filter&&!n.filter(t,e))return;let o=Vi.dirname(e);return ge.existsSync(o)||wR(o),iy(r,t,e,n)}function iy(t,e,n,i){let o=(i.dereference?ge.statSync:ge.lstatSync)(e);if(o.isDirectory())return _R(o,t,e,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return AR(o,t,e,n,i);if(o.isSymbolicLink())return qR(t,e,n,i);throw o.isSocket()?new Error(`Cannot copy a socket file: ${e}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}function AR(t,e,n,i,r){return e?OR(t,n,i,r):ry(t,n,i,r)}function OR(t,e,n,i){if(i.overwrite)return ge.unlinkSync(n),ry(t,e,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}function ry(t,e,n,i){return ge.copyFileSync(e,n),i.preserveTimestamps&&TR(t.mode,e,n),Sc(n,t.mode)}function TR(t,e,n){return RR(t)&&kR(n,t),CR(e,n)}function RR(t){return (t&128)===0}function kR(t,e){return Sc(t,e|128)}function Sc(t,e){return ge.chmodSync(t,e)}function CR(t,e){let n=ge.statSync(t);return SR(e,n.atime,n.mtime)}function _R(t,e,n,i,r){return e?oy(n,i,r):FR(t.mode,n,i,r)}function FR(t,e,n,i){return ge.mkdirSync(n),oy(e,n,i),Sc(n,t)}function oy(t,e,n){ge.readdirSync(t).forEach(i=>PR(i,t,e,n));}function PR(t,e,n,i){let r=Vi.join(e,t),o=Vi.join(n,t);if(i.filter&&!i.filter(r,o))return;let{destStat:a}=Ji.checkPathsSync(r,o,"copy",i);return iy(a,r,o,i)}function qR(t,e,n,i){let r=ge.readlinkSync(e);if(i.dereference&&(r=Vi.resolve(process.cwd(),r)),t){let o;try{o=ge.readlinkSync(n);}catch(a){if(a.code==="EINVAL"||a.code==="UNKNOWN")return ge.symlinkSync(r,n);throw a}if(i.dereference&&(o=Vi.resolve(process.cwd(),o)),Ji.isSrcSubdir(r,o))throw new Error(`Cannot copy '${r}' to a subdirectory of itself, '${o}'.`);if(Ji.isSrcSubdir(o,r))throw new Error(`Cannot overwrite '${o}' with '${r}'.`);return jR(r,n)}else return ge.symlinkSync(r,n)}function jR(t,e){return ge.unlinkSync(e),ge.symlinkSync(t,e)}ay.exports=ER;});var Oo=g((TD,cy)=>{var BR=Se().fromCallback;cy.exports={copy:BR(ny()),copySync:sy()};});var Ki=g((RD,ly)=>{var uy=Ee(),IR=Se().fromCallback;function LR(t,e){uy.rm(t,{recursive:!0,force:!0},e);}function DR(t){uy.rmSync(t,{recursive:!0,force:!0});}ly.exports={remove:IR(LR),removeSync:DR};});var gy=g((kD,xy)=>{var NR=Se().fromPromise,dy=cn(),my=_("path"),hy=Ve(),yy=Ki(),py=NR(async function(e){let n;try{n=await dy.readdir(e);}catch{return hy.mkdirs(e)}return Promise.all(n.map(i=>yy.remove(my.join(e,i))))});function fy(t){let e;try{e=dy.readdirSync(t);}catch{return hy.mkdirsSync(t)}e.forEach(n=>{n=my.join(t,n),yy.removeSync(n);});}xy.exports={emptyDirSync:fy,emptydirSync:fy,emptyDir:py,emptydir:py};});var Sy=g((CD,wy)=>{var UR=Se().fromCallback,vy=_("path"),Dt=Ee(),by=Ve();function zR(t,e){function n(){Dt.writeFile(t,"",i=>{if(i)return e(i);e();});}Dt.stat(t,(i,r)=>{if(!i&&r.isFile())return e();let o=vy.dirname(t);Dt.stat(o,(a,s)=>{if(a)return a.code==="ENOENT"?by.mkdirs(o,c=>{if(c)return e(c);n();}):e(a);s.isDirectory()?n():Dt.readdir(o,c=>{if(c)return e(c)});});});}function $R(t){let e;try{e=Dt.statSync(t);}catch{}if(e&&e.isFile())return;let n=vy.dirname(t);try{Dt.statSync(n).isDirectory()||Dt.readdirSync(n);}catch(i){if(i&&i.code==="ENOENT")by.mkdirsSync(n);else throw i}Dt.writeFileSync(t,"");}wy.exports={createFile:UR(zR),createFileSync:$R};});var Ry=g((_D,Ty)=>{var MR=Se().fromCallback,Ey=_("path"),Nt=Ee(),Ay=Ve(),WR=Lt().pathExists,{areIdentical:Oy}=un();function HR(t,e,n){function i(r,o){Nt.link(r,o,a=>{if(a)return n(a);n(null);});}Nt.lstat(e,(r,o)=>{Nt.lstat(t,(a,s)=>{if(a)return a.message=a.message.replace("lstat","ensureLink"),n(a);if(o&&Oy(s,o))return n(null);let c=Ey.dirname(e);WR(c,(l,u)=>{if(l)return n(l);if(u)return i(t,e);Ay.mkdirs(c,p=>{if(p)return n(p);i(t,e);});});});});}function GR(t,e){let n;try{n=Nt.lstatSync(e);}catch{}try{let o=Nt.lstatSync(t);if(n&&Oy(o,n))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=Ey.dirname(e);retur
`,finalEOL:n=!0,replacer:i=null,spaces:r}={}){let o=n?e:"";return JSON.stringify(t,i,r).replace(/\n/g,e)+o}function uk(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Ky.exports={stringify:ck,stripBom:uk};});var Zy=g((ID,Qy)=>{var Xn;try{Xn=Ee();}catch{Xn=_("fs");}var Ro=Se(),{stringify:Yy,stripBom:Xy}=To();async function lk(t,e={}){typeof e=="string"&&(e={encoding:e});let n=e.fs||Xn,i="throws"in e?e.throws:!0,r=await Ro.fromCallback(n.readFile)(t,e);r=Xy(r);let o;try{o=JSON.parse(r,e?e.reviver:null);}catch(a){if(i)throw a.message=`${t}: ${a.message}`,a;return null}return o}var pk=Ro.fromPromise(lk);function fk(t,e={}){typeof e=="string"&&(e={encoding:e});let n=e.fs||Xn,i="throws"in e?e.throws:!0;try{let r=n.readFileSync(t,e);return r=Xy(r),JSON.parse(r,e.reviver)}catch(r){if(i)throw r.message=`${t}: ${r.message}`,r;return null}}async function dk(t,e,n={}){let i=n.fs||Xn,r=Yy(e,n);await Ro.fromCallback(i.writeFile)(t,r,n);}var mk=Ro.fromPromise(dk);function hk(t,e,n={}){let i=n.fs||Xn,r=Yy(e,n);return i.writeFileSync(t,r,n)}var yk={readFile:pk,readFileSync:fk,writeFile:mk,writeFileSync:hk};Qy.exports=yk;});var tx=g((LD,ex)=>{var ko=Zy();ex.exports={readJson:ko.readFile,readJsonSync:ko.readFileSync,writeJson:ko.writeFile,writeJsonSync:ko.writeFileSync};});var Co=g((DD,rx)=>{var xk=Se().fromCallback,Xi=Ee(),nx=_("path"),ix=Ve(),gk=Lt().pathExists;function vk(t,e,n,i){typeof n=="function"&&(i=n,n="utf8");let r=nx.dirname(t);gk(r,(o,a)=>{if(o)return i(o);if(a)return Xi.writeFile(t,e,n,i);ix.mkdirs(r,s=>{if(s)return i(s);Xi.writeFile(t,e,n,i);});});}function bk(t,...e){let n=nx.dirname(t);if(Xi.existsSync(n))return Xi.writeFileSync(t,...e);ix.mkdirsSync(n),Xi.writeFileSync(t,...e);}rx.exports={outputFile:xk(vk),outputFileSync:bk};});var ax=g((ND,ox)=>{var{stringify:wk}=To(),{outputFile:Sk}=Co();async function Ek(t,e,n={}){let i=wk(e,n);await Sk(t,i,n);}ox.exports=Ek;});var cx=g((UD,sx)=>{var{stringify:Ak}=To(),{outputFileSync:Ok}=Co();function Tk(t,e,n){let i=Ak(e,n);Ok(t,i,n);}sx.exports=Tk;});var lx=g((zD,ux)=>{var Rk=Se().fromPromise,ve=tx();ve.outputJson=Rk(ax());ve.outputJsonSync=cx();ve.outputJSON=ve.outputJson;ve.outputJSONSync=ve.outputJsonSync;ve.writeJSON=ve.writeJson;ve.writeJSONSync=ve.writeJsonSync;ve.readJSON=ve.readJson;ve.readJSONSync=ve.readJsonSync;ux.exports=ve;});var hx=g(($D,mx)=>{var kk=Ee(),Ac=_("path"),Ck=Oo().copy,dx=Ki().remove,_k=Ve().mkdirp,Fk=Lt().pathExists,px=un();function Pk(t,e,n,i){typeof n=="function"&&(i=n,n={}),n=n||{};let r=n.overwrite||n.clobber||!1;px.checkPaths(t,e,"move",n,(o,a)=>{if(o)return i(o);let{srcStat:s,isChangingCase:c=!1}=a;px.checkParentPaths(t,s,e,"move",l=>{if(l)return i(l);if(qk(e))return fx(t,e,r,c,i);_k(Ac.dirname(e),u=>u?i(u):fx(t,e,r,c,i));});});}function qk(t){let e=Ac.dirname(t);return Ac.parse(e).root===e}function fx(t,e,n,i,r){if(i)return Ec(t,e,n,r);if(n)return dx(e,o=>o?r(o):Ec(t,e,n,r));Fk(e,(o,a)=>o?r(o):a?r(new Error("dest already exists.")):Ec(t,e,n,r));}function Ec(t,e,n,i){kk.rename(t,e,r=>r?r.code!=="EXDEV"?i(r):jk(t,e,n,i):i());}function jk(t,e,n,i){Ck(t,e,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0},o=>o?i(o):dx(t,i));}mx.exports=Pk;});var bx=g((MD,vx)=>{var xx=Ee(),Tc=_("path"),Bk=Oo().copySync,gx=Ki().removeSync,Ik=Ve().mkdirpSync,yx=un();function Lk(t,e,n){n=n||{};let i=n.overwrite||n.clobber||!1,{srcStat:r,isChangingCase:o=!1}=yx.checkPathsSync(t,e,"move",n);return yx.checkParentPathsSync(t,r,e,"move"),Dk(e)||Ik(Tc.dirname(e)),Nk(t,e,i,o)}function Dk(t){let e=Tc.dirname(t);return Tc.parse(e).root===e}function Nk(t,e,n,i){if(i)return Oc(t,e,n);if(n)return gx(e),Oc(t,e,n);if(xx.existsSync(e))throw new Error("dest already exists.");return Oc(t,e,n)}function Oc(t,e,n){try{xx.renameSync(t,e);}catch(i){if(i.code!=="EXDEV")throw i;return Uk(t,e,n)}}function Uk(t,e,n){return Bk(t,e,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),gx(t)}vx.exports=Lk;});var Sx=g((WD,wx)=>{var zk=Se().fromCallback;wx.exports={move:zk(hx()),moveSync:bx()};});var Ax=g((HD,Ex)=>{Ex.exports={...cn(),...Oo(),...gy(),...Jy(),...lx(),...Ve()
causes have become circular...`;let i=Rc(t);return i?(e.add(t),n+`
caused by: `+Ox(i,e)):n},$k=t=>Ox(t,new Set),Tx=(t,e,n)=>{if(!Qi(t))return "";let i=n?"":t.message||"";if(e.has(t))return i+": ...";let r=Rc(t);if(r){e.add(t);let o=typeof t.cause=="function";return i+(o?"":": ")+Tx(r,e,o)}else return i},Mk=t=>Tx(t,new Set);Rx.exports={isErrorLike:Qi,getErrorCause:Rc,stackWithCauses:$k,messageWithCauses:Mk};});var Cc=g((KD,Cx)=>{var Wk=Symbol("circular-ref-tag"),Fo=Symbol("pino-raw-err-ref"),kx=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Fo]},set:function(t){this[Fo]=t;}}});Object.defineProperty(kx,Fo,{writable:!0,value:{}});Cx.exports={pinoErrProto:kx,pinoErrorSymbols:{seen:Wk,rawSymbol:Fo}};});var Px=g((YD,Fx)=>{Fx.exports=Fc;var{messageWithCauses:Hk,stackWithCauses:Gk,isErrorLike:_x}=kc(),{pinoErrProto:Vk,pinoErrorSymbols:Jk}=Cc(),{seen:_c}=Jk,{toString:Kk}=Object.prototype;function Fc(t){if(!_x(t))return t;t[_c]=void 0;let e=Object.create(Vk);e.type=Kk.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Hk(t),e.stack=Gk(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Fc(n)));for(let n in t)if(e[n]===void 0){let i=t[n];_x(i)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(i,_c)&&(e[n]=Fc(i)):e[n]=i;}return delete t[_c],e.raw=t,e}});var jx=g((XD,qx)=>{qx.exports=qo;var{isErrorLike:Pc}=kc(),{pinoErrProto:Yk,pinoErrorSymbols:Xk}=Cc(),{seen:Po}=Xk,{toString:Qk}=Object.prototype;function qo(t){if(!Pc(t))return t;t[Po]=void 0;let e=Object.create(Yk);e.type=Qk.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>qo(n))),Pc(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Po)&&(e.cause=qo(t.cause));for(let n in t)if(e[n]===void 0){let i=t[n];Pc(i)?Object.prototype.hasOwnProperty.call(i,Po)||(e[n]=qo(i)):e[n]=i;}return delete t[Po],e.raw=t,e}});var Dx=g((QD,Lx)=>{Lx.exports={mapHttpRequest:Zk,reqSerializer:Ix};var qc=Symbol("pino-raw-req-ref"),Bx=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[qc]},set:function(t){this[qc]=t;}}});Object.defineProperty(Bx,qc,{writable:!0,value:{}});function Ix(t){let e=t.info||t.socket,n=Object.create(Bx);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else {let i=t.path;n.url=typeof i=="string"?i:t.url?t.url.path||t.url:void 0;}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function Zk(t){return {req:Ix(t)}}});var $x=g((ZD,zx)=>{zx.exports={mapHttpResponse:e1,resSerializer:Ux};var jc=Symbol("pino-raw-res-ref"),Nx=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[jc]},set:function(t){this[jc]=t;}}});Object.defineProperty(Nx,jc,{writable:!0,value:{}});function Ux(t){let e=Object.create(Nx);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function e1(t){return {res:Ux(t)}}});var Ic=g((eN,Mx)=>{var Bc=Px(),t1=jx(),jo=Dx(),Bo=$x();Mx.exports={err:Bc,errWithCause:t1,mapHttpRequest:jo.mapHttpRequest,mapHttpResponse:Bo.mapHttpResponse,req:jo.reqSerializer,res:Bo.resSerializer,wrapErrorSerializer:function(e){return e===Bc?e:function(i){return e(Bc(i))}},wrapRequestSerializer:function(e){return e===jo.reqSerializer?e:function(i){return e(jo.reqSerializer(i))}},wrapResponseSeri
'use strict'
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
const \u3007 = null;
o${a}
if ([o${a}].length !== 1) throw Error()`)();}catch{throw Error(n(o))}});}}});var Io=g((iN,Vx)=>{Vx.exports=/[^.[\]]+|\[((?:.)*?)\]/g;});var Kx=g((rN,Jx)=>{var r1=Io();Jx.exports=o1;function o1({paths:t}){let e=[];var n=0;let i=t.reduce(function(r,o,a){var s=o.match(r1).map(u=>u.replace(/'|"|`/g,""));let c=o[0]==="[";s=s.map(u=>u[0]==="["?u.substr(1,u.length-2):u);let l=s.indexOf("*");if(l>-1){let u=s.slice(0,l),p=u.join("."),h=s.slice(l+1,s.length),f=h.length>0;n++,e.push({before:u,beforeStr:p,after:h,nested:f});}else r[o]={path:s,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(o),leadingBracket:c};return r},{});return {wildcards:e,wcLen:n,secret:i}}});var Xx=g((oN,Yx)=>{var a1=Io();Yx.exports=s1;function s1({secret:t,serialize:e,wcLen:n,strict:i,isCensorFct:r,censorFctTakesPath:o},a){let s=Function("o",`
if (typeof o !== 'object' || o == null) {
${p1(i,e)}
}
const { censor, secret } = this
${c1(t,r,o)}
this.compileRestore()
${u1(n>0,r,o)}
${l1(e)}
`).bind(a);return e===!1&&(s.restore=c=>a.restore(c)),s}function c1(t,e,n){return Object.keys(t).map(i=>{let{escPath:r,leadingBracket:o,path:a}=t[i],s=o?1:0,c=o?"":".",l=[];for(var u;(u=a1.exec(i))!==null;){let[,d]=u,{index:y,input:v}=u;y>s&&l.push(v.substring(0,y-(d?0:1)));}var p=l.map(d=>`o${c}${d}`).join(" && ");p.length===0?p+=`o${c}${i} != null`:p+=` && o${c}${i} != null`;let h=`
switch (true) {
${l.reverse().map(d=>`
case o${c}${d} === censor:
secret[${r}].circle = ${JSON.stringify(d)}
break
`).join(`
`)}
}
`,f=n?`val, ${JSON.stringify(a)}`:"val";return `
if (${p}) {
const val = o${c}${i}
if (val === censor) {
secret[${r}].precensored = true
} else {
secret[${r}].val = val
o${c}${i} = ${e?`censor(${f})`:"censor"}
${h}
}
}
`}).join(`
`)}function u1(t,e,n){return t===!0?`
{
const { wildcards, wcLen, groupRedact, nestedRedact } = this
for (var i = 0; i < wcLen; i++) {
const { before, beforeStr, after, nested } = wildcards[i]
if (nested === true) {
secret[beforeStr] = secret[beforeStr] || []
nestedRedact(secret[beforeStr], o, before, after, censor, ${e}, ${n})
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
}
}
`:""}function l1(t){return t===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function p1(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var Dc=g((aN,tg)=>{tg.exports={groupRedact:d1,groupRestore:f1,nestedRedact:h1,nestedRestore:m1};function f1({keys:t,values:e,target:n}){if(n==null)return;let i=t.length;for(var r=0;r<i;r++){let o=t[r];n[o]=e[r];}}function d1(t,e,n,i,r){let o=Qx(t,e);if(o==null)return {keys:null,values:null,target:null,flat:!0};let a=Object.keys(o),s=a.length,c=e.length,l=r?[...e]:void 0,u=new Array(s);for(var p=0;p<s;p++){let h=a[p];u[p]=o[h],r?(l[c]=h,o[h]=n(o[h],l)):i?o[h]=n(o[h]):o[h]=n;}return {keys:a,values:u,target:o,flat:!0}}function m1(t){let e=t.length;for(var n=0;n<e;n++){let{key:r,target:o,value:a,level:s}=t[n];if(s===0||s===1){if(Qn(o,r)&&(o[r]=a),typeof o=="object"){let c=Object.keys(o);for(var i=0;i<c.length;i++){let l=c[i],u=o[l];Qn(u,r)&&(u[r]=a);}}}else eg(r,o,a,s);}}function h1(t,e,n,i,r,o,a){let s=Qx(e,n);if(s==null)return;let c=Object.keys(s),l=c.length;for(var u=0;u<l;u++){let p=c[u],{value:h,parent:f,exists:d,level:y}=y1(s,p,n,i,r,o,a);d===!0&&f!==null&&t.push({key:i[i.length-1],target:f,value:h,level:y});}return t}function Qn(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function y1(t,e,n,i,r,o,a){let s=i.length,c=s-1,l=e;var u=-1,p,h,f,d=null,y=!0,v=null,b,w,A=!1,O=0;if(f=p=t[e],typeof p!="object")return {value:null,parent:null,exists:y};for(;p!=null&&++u<s;){if(e=i[u],d=f,e!=="*"&&!v&&!(typeof p=="object"&&e in p)){y=!1;break}if(!(e==="*"&&(v==="*"&&(A=!0),v=e,u!==c))){if(v){let q=Object.keys(p);for(var k=0;k<q.length;k++){let L=q[k];w=p[L],b=e==="*",A?(O=u,f=Zx(w,O-1,e,n,i,r,o,a,l,p,h,f,b,L,u,c)):(b||typeof w=="object"&&w!==null&&e in w)&&(b?f=w:f=w[e],h=u!==c?f:o?a?r(f,[...n,l,...i]):r(f):r,b?p[L]=h:w[e]===h?y=!1:w[e]=h===void 0&&r!==void 0||Qn(w,e)&&h===f?w[e]:h);}v=null;}else f=p[e],h=u!==c?f:o?a?r(f,[...n,l,...i]):r(f):r,p[e]=Qn(p,e)&&h===f||h===void 0&&r!==void 0?p[e]:h,p=p[e];if(typeof p!="object")break;(f===d||typeof f>"u")&&(y=!1);}}return {value:f,parent:d,exists:y,level:O}}function Qx(t,e){for(var n=-1,i=e.length,r=t;r!=null&&++n<i;)r=r[e[n]];return r}function Zx(t,e,n,i,r,o,a,s,c,l,u,p,h,f,d,y,v){if(e===0)return (h||typeof t=="object"&&t!==null&&n in t)&&(h?p=t:p=t[n],u=d!==y?p:a?s?o(p,[...i,c,...r]):o(p):o,h?l[f]=u:t[n]===u?!1:t[n]=u===void 0&&o!==void 0||Qn(t,n)&&u===p?t[n]:u),p;for(let w in t)if(typeof t[w]=="object"){var b=Zx(t[w],e-1,n,i,r,o,a,s,c,l,u,p,h,f,d,y);return b}}function eg(t,e,n,i){if(i===0){Qn(e,t)&&(e[t]=n);return}for(let r in e)typeof e[r]=="object"&&eg(t,e[r],n,i-1);}});var ig=g((sN,ng)=>{var{groupRestore:x1,nestedRestore:g1}=Dc();ng.exports=v1;function v1({secret:t,wcLen:e}){return function(){if(this.restore)return;let i=Object.keys(t),r=b1(t,i),o=e>0,a=o?{secret:t,groupRestore:x1,nestedRestore:g1}:{secret:t};this.restore=Function("o",w1(r,i,o)).bind(a);}}function b1(t,e){return e.map(n=>{let{circle:i,escPath:r,leadingBracket:o}=t[n],s=i?`o.${i} = secret[${r}].val`:`o${o?"":"."}${n} = secret[${r}].val`,c=`secret[${r}].val = undefined`;return `
if (secret[${r}].val !== undefined) {
try { ${s} } catch (e) {}
${c}
}
`}).join("")}function w1(t,e,n){return `
const secret = this.secret
${n===!0?`
const keys = Object.keys(secret)
const len = keys.length
for (var i = len - 1; i >= ${e.length}; i--) {
const k = keys[i]
const o = secret[k]
if (o.flat === true) this.groupRestore(o)
else this.nestedRestore(o)
secret[k] = null
}
`:""}
${t}
return o
`}});var og=g((cN,rg)=>{rg.exports=S1;function S1(t){let{secret:e,censor:n,compileRestore:i,serialize:r,groupRedact:o,nestedRedact:a,wildcards:s,wcLen:c}=t,l=[{secret:e,censor:n,compileRestore:i}];return r!==!1&&l.push({serialize:r}),c>0&&l.push({groupRedact:o,nestedRedact:a,wildcards:s,wcLen:c}),Object.assign(...l)}});var cg=g((uN,sg)=>{var ag=Gx(),E1=Kx(),A1=Xx(),O1=ig(),{groupRedact:T1,nestedRedact:R1}=Dc(),k1=og(),C1=Io(),_1=ag(),Nc=t=>t;Nc.restore=Nc;var F1="[REDACTED]";Uc.rx=C1;Uc.validator=ag;sg.exports=Uc;function Uc(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,i=t.remove;if(i===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let r=i===!0?void 0:"censor"in t?t.censor:F1,o=typeof r=="function",a=o&&r.length>1;if(e.length===0)return n||Nc;_1({paths:e,serialize:n,censor:r});let{wildcards:s,wcLen:c,secret:l}=E1({paths:e,censor:r}),u=O1({secret:l,wcLen:c}),p="strict"in t?t.strict:!0;return A1({secret:l,wcLen:c,serialize:n,strict:p,isCensorFct:o,censorFctTakesPath:a},k1({secret:l,censor:r,compileRestore:u,serialize:n,groupRedact:T1,nestedRedact:R1,wildcards:s,wcLen:c}))}});var Zn=g((lN,ug)=>{var P1=Symbol("pino.setLevel"),q1=Symbol("pino.getLevel"),j1=Symbol("pino.levelVal"),B1=Symbol("pino.useLevelLabels"),I1=Symbol("pino.useOnlyCustomLevels"),L1=Symbol("pino.mixin"),D1=Symbol("pino.lsCache"),N1=Symbol("pino.chindings"),U1=Symbol("pino.asJson"),z1=Symbol("pino.write"),$1=Symbol("pino.redactFmt"),M1=Symbol("pino.time"),W1=Symbol("pino.timeSliceIndex"),H1=Symbol("pino.stream"),G1=Symbol("pino.stringify"),V1=Symbol("pino.stringifySafe"),J1=Symbol("pino.stringifiers"),K1=Symbol("pino.end"),Y1=Symbol("pino.formatOpts"),X1=Symbol("pino.messageKey"),Q1=Symbol("pino.errorKey"),Z1=Symbol("pino.nestedKey"),eC=Symbol("pino.nestedKeyStr"),tC=Symbol("pino.mixinMergeStrategy"),nC=Symbol("pino.msgPrefix"),iC=Symbol("pino.wildcardFirst"),rC=Symbol.for("pino.serializers"),oC=Symbol.for("pino.formatters"),aC=Symbol.for("pino.hooks"),sC=Symbol.for("pino.metadata");ug.exports={setLevelSym:P1,getLevelSym:q1,levelValSym:j1,useLevelLabelsSym:B1,mixinSym:L1,lsCacheSym:D1,chindingsSym:N1,asJsonSym:U1,writeSym:z1,serializersSym:rC,redactFmtSym:$1,timeSym:M1,timeSliceIndexSym:W1,streamSym:H1,stringifySym:G1,stringifySafeSym:V1,stringifiersSym:J1,endSym:K1,formatOptsSym:Y1,messageKeySym:X1,errorKeySym:Q1,nestedKeySym:Z1,wildcardFirstSym:iC,needsMetadataGsym:sC,useOnlyCustomLevelsSym:I1,formattersSym:oC,hooksSym:aC,nestedKeyStrSym:eC,mixinMergeStrategySym:tC,msgPrefixSym:nC};});var Mc=g((pN,dg)=>{var $c=cg(),{redactFmtSym:cC,wildcardFirstSym:Lo}=Zn(),{rx:zc,validator:uC}=$c,lg=uC({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),pg="[Redacted]",fg=!1;function lC(t,e){let{paths:n,censor:i}=pC(t),r=n.reduce((s,c)=>{zc.lastIndex=0;let l=zc.exec(c),u=zc.exec(c),p=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(p==="*"&&(p=Lo),u===null)return s[p]=null,s;if(s[p]===null)return s;let{index:h}=u,f=`${c.substr(h,c.length-1)}`;return s[p]=s[p]||[],p!==Lo&&s[p].length===0&&s[p].push(...s[Lo]||[]),p===Lo&&Object.keys(s).forEach(function(d){s[d]&&s[d].push(f);}),s[p].push(f),s},{}),o={[cC]:$c({paths:n,censor:i,serialize:e,strict:fg})},a=(...s)=>e(typeof i=="function"?i(...s):i);return [...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((s,c)=>{if(r[c]===null)s[c]=l=>a(l,[c]);else {let l=typeof i=="function"?(u,p)=>i(u,[c,...p]):i;s[c]=$c({paths:r[c],censor:l,serialize:e,strict:fg});}return s},o)}function pC(t){if(Array.isArray(t))return t={paths:t,censor:pg},lg(t),t;let{paths:e,censor:n=pg,remove:i}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(n=void 0),lg({paths:e,censor:n}),{paths:e,censor:n}}dg.exports=lC;});var hg=g((fN,mg)=>{var fC=()=>"",dC=()=>`,"time":${Date.now()}`,mC=()=>`,"t
${b}`,O=`,
${b}`);let I=Math.min(w.length,a),M=0;for(;M<I-1;M++){let z=s(String(M),w,d,y,v,b);A+=z!==void 0?z:"null",A+=O;}let W=s(String(M),w,d,y,v,b);if(A+=W!==void 0?W:"null",w.length-1>a){let z=w.length-a-1;A+=`${O}"... ${fn(z)} not stringified"`;}return v!==""&&(A+=`
${k}`),d.pop(),`[${A}]`}let q=Object.keys(w),L=q.length;if(L===0)return "{}";if(o<d.length+1)return '"[Object]"';let D="",T="";v!==""&&(b+=v,O=`,
${b}`,D=" ");let B=Math.min(L,a);r&&!pu(w)&&(q=lu(q)),d.push(w);for(let I=0;I<B;I++){let M=q[I],W=s(M,w,d,y,v,b);W!==void 0&&(A+=`${T}${$t(M)}:${D}${W}`,T=O);}if(L>a){let I=L-a;A+=`${T}"...":${D}"${fn(I)} not stringified"`,T=O;}return v!==""&&T.length>1&&(A=`
${b}${A}
${k}`),d.pop(),`{${A}}`}case"number":return isFinite(w)?String(w):e?e(w):"null";case"boolean":return w===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(w);default:return e?e(w):void 0}}function c(h,f,d,y,v,b){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(h)),typeof f){case"string":return $t(f);case"object":{if(f===null)return "null";if(d.indexOf(f)!==-1)return n;let w=b,A="",O=",";if(Array.isArray(f)){if(f.length===0)return "[]";if(o<d.length+1)return '"[Array]"';d.push(f),v!==""&&(b+=v,A+=`
${b}`,O=`,
${b}`);let L=Math.min(f.length,a),D=0;for(;D<L-1;D++){let B=c(String(D),f[D],d,y,v,b);A+=B!==void 0?B:"null",A+=O;}let T=c(String(D),f[D],d,y,v,b);if(A+=T!==void 0?T:"null",f.length-1>a){let B=f.length-a-1;A+=`${O}"... ${fn(B)} not stringified"`;}return v!==""&&(A+=`
${w}`),d.pop(),`[${A}]`}d.push(f);let k="";v!==""&&(b+=v,O=`,
${b}`,k=" ");let q="";for(let L of y){let D=c(L,f[L],d,y,v,b);D!==void 0&&(A+=`${q}${$t(L)}:${k}${D}`,q=O);}return v!==""&&q.length>1&&(A=`
${b}${A}
${w}`),d.pop(),`{${A}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function l(h,f,d,y,v){switch(typeof f){case"string":return $t(f);case"object":{if(f===null)return "null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return l(h,f,d,y,v);if(f===null)return "null"}if(d.indexOf(f)!==-1)return n;let b=v;if(Array.isArray(f)){if(f.length===0)return "[]";if(o<d.length+1)return '"[Array]"';d.push(f),v+=y;let D=`
${v}`,T=`,
${v}`,B=Math.min(f.length,a),I=0;for(;I<B-1;I++){let W=l(String(I),f[I],d,y,v);D+=W!==void 0?W:"null",D+=T;}let M=l(String(I),f[I],d,y,v);if(D+=M!==void 0?M:"null",f.length-1>a){let W=f.length-a-1;D+=`${T}"... ${fn(W)} not stringified"`;}return D+=`
${b}`,d.pop(),`[${D}]`}let w=Object.keys(f),A=w.length;if(A===0)return "{}";if(o<d.length+1)return '"[Object]"';v+=y;let O=`,
${v}`,k="",q="",L=Math.min(A,a);pu(f)&&(k+=fv(f,O,a),w=w.slice(f.length),L-=f.length,q=O),r&&(w=lu(w)),d.push(f);for(let D=0;D<L;D++){let T=w[D],B=l(T,f[T],d,y,v);B!==void 0&&(k+=`${q}${$t(T)}: ${B}`,q=O);}if(A>a){let D=A-a;k+=`${q}"...": "${fn(D)} not stringified"`,q=O;}return q!==""&&(k=`
${v}${k}
${b}`),d.pop(),`{${k}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function u(h,f,d){switch(typeof f){case"string":return $t(f);case"object":{if(f===null)return "null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return u(h,f,d);if(f===null)return "null"}if(d.indexOf(f)!==-1)return n;let y="";if(Array.isArray(f)){if(f.length===0)return "[]";if(o<d.length+1)return '"[Array]"';d.push(f);let O=Math.min(f.length,a),k=0;for(;k<O-1;k++){let L=u(String(k),f[k],d);y+=L!==void 0?L:"null",y+=",";}let q=u(String(k),f[k],d);if(y+=q!==void 0?q:"null",f.length-1>a){let L=f.length-a-1;y+=`,"... ${fn(L)} not stringified"`;}return d.pop(),`[${y}]`}let v=Object.keys(f),b=v.length;if(b===0)return "{}";if(o<d.length+1)return '"[Object]"';let w="",A=Math.min(b,a);pu(f)&&(y+=fv(f,",",a),v=v.slice(f.length),A-=f.length,w=","),r&&(v=lu(v)),d.push(f);for(let O=0;O<A;O++){let k=v[O],q=u(k,f[k],d);q!==void 0&&(y+=`${w}${$t(k)}:${q}`,w=",");}if(b>a){let O=b-a;y+=`${w}"...":"${fn(O)} not stringified"`;}return d.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function p(h,f,d){if(arguments.length>1){let y="";if(typeof d=="number"?y=" ".repeat(Math.min(d,10)):typeof d=="string"&&(y=d.slice(0,10)),f!=null){if(typeof f=="function")return s("",{"":h},[],f,y,"");if(Array.isArray(f))return c("",h,[],gF(f),y,"")}if(y.length!==0)return l("",h,[],y,"")}return u("",h,[])}return p}});var bv=g((kN,vv)=>{var mu=Symbol.for("pino.metadata"),{levels:xv}=Ho(),gv=Object.create(xv);gv.silent=1/0;var bF=xv.info;function wF(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let i=gv;e.levels&&typeof e.levels=="object"&&(i=e.levels);let r={write:o,add:s,flushSync:a,end:c,minLevel:0,streams:[],clone:l,[mu]:!0};return Array.isArray(t)?t.forEach(s,r):s.call(r,t),t=null,r;function o(u){let p,h=this.lastLevel,{streams:f}=this,d=0,y;for(let v=EF(f.length,e.dedupe);OF(v,f.length,e.dedupe);v=AF(v,e.dedupe))if(p=f[v],p.level<=h){if(d!==0&&d!==p.level)break;if(y=p.stream,y[mu]){let{lastTime:b,lastMsg:w,lastObj:A,lastLogger:O}=this;y.lastLevel=h,y.lastTime=b,y.lastMsg=w,y.lastObj=A,y.lastLogger=O;}y.write(u),e.dedupe&&(d=p.level);}else if(!e.dedupe)break}function a(){for(let{stream:u}of this.streams)typeof u.flushSync=="function"&&u.flushSync();}function s(u){if(!u)return r;let p=typeof u.write=="function"||u.stream,h=u.write?u:u.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f}=this,d;typeof u.levelVal=="number"?d=u.levelVal:typeof u.level=="string"?d=i[u.level]:typeof u.level=="number"?d=u.level:d=bF;let y={stream:h,level:d,levelVal:void 0,id:n++};return f.unshift(y),f.sort(SF),this.minLevel=f[0].level,r}function c(){for(let{stream:u}of this.streams)typeof u.flushSync=="function"&&u.flushSync(),u.end();}function l(u){let p=new Array(this.streams.length);for(let h=0;h<p.length;h++)p[h]={level:u,stream:this.streams[h].stream};return {write:o,add:s,minLevel:u,streams:p,clone:l,flushSync:a,[mu]:!0}}}function SF(t,e){return t.level-e.level}function EF(t,e){return e?t-1:0}function AF(t,e){return e?t-1:t+1}function OF(t,e,n){return n?t>=0:t<e}vv.exports=wF;});var qv=g((CN,ze)=>{var TF=_("os"),kv=Ic(),RF=Lc(),kF=Mc(),Cv=hg(),CF=pv(),_v=Zn(),{configure:_F}=yv(),{assertDefaultLevelFound:FF,mappings:Fv,genLsCache:PF,levels:qF}=Ho(),{createArgsNormalizer:jF,asChindings:BF,buildSafeSonicBoom:wv,buildFormatters:IF,stringify:hu,normalizeDestFileDescriptor:Sv,noop:LF}=Wo(),{version:DF}=au(),{chindingsSym:Ev,redactFmtSym:NF,serializersSym:Av,timeSym:UF,timeSliceIndexSym:zF,streamSym:$F,stringifySym:Ov,stringifySafeSym:yu,stringifiersSym:Tv,setLevelSym:MF,endSym:WF,formatOptsSym:HF,messageKeySym:GF,errorKeySym:VF,nestedKeySym:JF,mixinSym:KF,useOnlyCustomLevelsSym:YF,formattersSym:Rv,hooksSym:XF,nestedKeyStrSym:QF,mixinMe
`:`
`),z=BF.bind(null,{[Ev]:"",[Av]:a,[Tv]:I,[Ov]:hu,[yu]:D,[Rv]:T}),V="";p!==null&&(h===void 0?V=z(p):V=z(Object.assign({},p,{name:h})));let K=s instanceof Function?s:s?Pv:tP,R=K().indexOf(":")+1;if(b&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(L&&typeof L!="string")throw Error(`Unknown msgPrefix type "${typeof L}" - expected "string"`);FF(f,d,b);let P=Fv(d,b);return Object.assign(e,{levels:P,[YF]:b,[$F]:i,[UF]:K,[zF]:R,[Ov]:hu,[yu]:D,[Tv]:I,[WF]:W,[HF]:M,[GF]:c,[VF]:l,[JF]:u,[QF]:u?`,${JSON.stringify(u)}:{`:"",[Av]:a,[KF]:y,[ZF]:v,[Ev]:V,[Rv]:T,[XF]:A,silent:LF,onChild:q,[eP]:L}),Object.setPrototypeOf(e,CF()),PF(e),e[MF](f),e}ze.exports=xu;ze.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=Sv(t.dest||process.stdout.fd),wv(t)):wv({dest:Sv(t),minLength:0});ze.exports.transport=tu();ze.exports.multistream=bv();ze.exports.levels=Fv();ze.exports.stdSerializers=sP;ze.exports.stdTimeFunctions=Object.assign({},Cv);ze.exports.symbols=_v;ze.exports.version=DF;ze.exports.default=xu;ze.exports.pino=xu;});var Uv={};Vb(Uv,{RotatingFileStream:()=>Ko,RotatingFileStreamError:()=>Zi,createStream:()=>TP});async function Bv(t){return new Promise(e=>fs.access(t,fs.constants.F_OK,n=>e(!n)))}function Iv(t){return (e,n,i)=>{let r=parseInt(i,10);if(e!=="number"||r!==i||r<=0)throw new Error(`'${t}' option must be a positive integer number`)}}function vu(t,e){return (n,i,r)=>{if(n!=="string")throw new Error(`Don't know how to handle 'options.${t}' type: ${n}`);i[t]=e(r);}}function Nv(t,e,n){let i={};if(i.num=parseInt(t,10),isNaN(i.num))throw new Error(`Unknown 'options.${e}' format: ${t}`);if(i.num<=0)throw new Error(`A positive integer number is expected for 'options.${e}'`);if(i.unit=t.replace(/^[ 0]*/g,"").substr((i.num+"").length,1),i.unit.length===0)throw new Error(`Missing unit for 'options.${e}'`);if(!n[i.unit])throw new Error(`Unknown 'options.${e}' unit: ${i.unit}`);return i}function bu(t,e,n){if(parseInt(n/t.num,10)*t.num!==n)throw new Error(`An integer divider of ${n} is expected as ${e} for 'options.interval'`)}function wP(t){let e=Nv(t,"interval",bP);switch(e.unit){case"h":bu(e,"hours",24);break;case"m":bu(e,"minutes",60);break;case"s":bu(e,"seconds",60);break}return e}function Lv(t){let e=Nv(t,"size",SP);return e.unit==="K"?e.num*1024:e.unit==="M"?e.num*1048576:e.unit==="G"?e.num*1073741824:e.num}function EP(t){let e={};for(let n in t){let i=t[n],r=typeof i;if(!(n in Dv))throw new Error(`Unknown option: ${n}`);e[n]=t[n],Dv[n](r,e,i);}return e.path||(e.path=""),e.interval||(delete e.immutable,delete e.initialRotation,delete e.intervalBoundary),e.rotate&&(delete e.history,delete e.immutable,delete e.maxFiles,delete e.maxSize,delete e.intervalBoundary),e.immutable&&delete e.compress,e.intervalBoundary||delete e.initialRotation,e}function AP(t,e,n){return i=>i?`${t}.${i}${e&&!n?".gz":""}`:t}function OP(t,e,n){let i=r=>(r>9?"":"0")+r;return (r,o)=>{if(!r)return t;let a=r.getFullYear()+""+i(r.getMonth()+1),s=i(r.getDate()),c=i(r.getHours()),l=i(r.getMinutes());return a+s+"-"+c+l+"-"+i(o)+"-"+t+(e&&!n?".gz":"")}}function TP(t,e){if(typeof e>"u")e={};else if(typeof e!="object")throw new Error(`The "options" argument must be of type object. Received type ${typeof e}`);let n=EP(e),{compress:i,omitExtension:r}=n,o;if(typeof t=="string")o=e.rotate?AP(t,i!==void 0,r):OP(t,i!==void 0,r);else if(typeof t=="function")o=t;else throw new Error(`The "filename" argument must be one of type string or function. Received type ${typeof t}`);return new Ko(o,n)}var Zi,Ko,bP,SP,Dv,zv=Gb(()=>{Zi=class extends Error{constructor(){super("Too many destination file attempts");U(this,"code","RFS-TOO-MANY");}},Ko=class extends Mn.Writable{constructor(n,i){let{encoding:r,history:o,maxFiles:a,maxSize:s,path:c}=i;super({decodeStrings:!0,defaultEncoding:r});U(this,"createGzip");U(this,"exec");U(this,"file");U(this,"filename");U(this,"finished");U(this,"fsCreateReadStream");U(this,"fsCreateWriteStream");U(this,"fsOpen"
`),n];}catch(c){if(c.code!=="ENOENT")throw c}for(let c of s)if(c)try{let l=await this.fsStat(c);l.isFile()?a.push({name:c,size:l.size,time:l.ctime.getTime()}):this.emit("warning",new Error(`File '${c}' contained in history is not a regular file`));}catch(l){if(l.code!=="ENOENT")throw l}if(a.sort((c,l)=>c.time-l.time),r)for(;a.length>r;){let c=a.shift();await this.unlink(c.name),this.emit("removed",c.name,!0);}if(o)for(;a.reduce((c,l)=>c+l.size,0)>o;){let c=a.shift();await this.unlink(c.name),this.emit("removed",c.name,!1);}await promises.writeFile(i,a.map(c=>c.name).join(`
`)+`
`,"utf-8"),this.emit("history");}async immutate(n){let{size:i}=this.options,r=this.now();for(let o=1;o<1e3;++o){let a=0,s;this.filename=this.options.path+this.generator(r,o);try{s=await this.fsStat(this.filename);}catch(c){if(c.code!=="ENOENT")throw c}if(s){if(a=s.size,!s.isFile())throw new Error(`Can't write on: '${this.filename}' (it is not a file)`);if(i&&a>=i)continue}if(n)return this.last=this.filename,this.reopen(a);await this.rotated(this.last),this.last=this.filename;return}throw new Zi}async unlink(n){try{await this.fsUnlink(n);}catch(i){if(i.code!=="ENOENT")throw i;this.emit("warning",i);}}};bP={M:!0,d:!0,h:!0,m:!0,s:!0};SP={B:!0,G:!0,K:!0,M:!0};Dv={encoding:(t,e,n)=>new pT.TextDecoder(n),immutable:()=>{},initialRotation:()=>{},interval:vu("interval",wP),intervalBoundary:()=>{},maxFiles:Iv("maxFiles"),maxSize:vu("maxSize",Lv),mode:()=>{},omitExtension:()=>{},rotate:Iv("rotate"),size:vu("size",Lv),teeToStdout:()=>{},compress:(t,e,n)=>{if(!n)throw new Error("A value for 'options.compress' must be specified");if(t==="boolean")return e.compress=(i,r)=>`cat ${i} | gzip -c9 > ${r}`;if(t!=="function"){if(t!=="string")throw new Error(`Don't know how to handle 'options.compress' type: ${t}`);if(n!=="gzip")throw new Error(`Don't know how to handle compression method: ${n}`)}},history:t=>{if(t!=="string")throw new Error(`Don't know how to handle 'options.history' type: ${t}`)},path:(t,e,n)=>{if(t!=="string")throw new Error(`Don't know how to handle 'options.path' type: ${t}`);n[n.length-1]!==path.sep&&(e.path=n+path.sep);}};});var eb=g((gn,Zv)=>{var Ru=_("crypto");gn=Zv.exports=sr;function sr(t,e){return e=Xv(t,e),CP(t,e)}gn.sha1=function(t){return sr(t)};gn.keys=function(t){return sr(t,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})};gn.MD5=function(t){return sr(t,{algorithm:"md5",encoding:"hex"})};gn.keysMD5=function(t){return sr(t,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var li=Ru.getHashes?Ru.getHashes().slice():["sha1","md5"];li.push("passthrough");var Kv=["buffer","hex","binary","base64"];function Xv(t,e){e=e||{};var n={};if(n.algorithm=e.algorithm||"sha1",n.encoding=e.encoding||"hex",n.excludeValues=!!e.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=e.ignoreUnknown===!0,n.respectType=e.respectType!==!1,n.respectFunctionNames=e.respectFunctionNames!==!1,n.respectFunctionProperties=e.respectFunctionProperties!==!1,n.unorderedArrays=e.unorderedArrays===!0,n.unorderedSets=e.unorderedSets!==!1,n.unorderedObjects=e.unorderedObjects!==!1,n.replacer=e.replacer||void 0,n.excludeKeys=e.excludeKeys||void 0,typeof t>"u")throw new Error("Object argument required.");for(var i=0;i<li.length;++i)li[i].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=li[i]);if(li.indexOf(n.algorithm)===-1)throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+li.join(", "));if(Kv.indexOf(n.encoding)===-1&&n.algorithm!=="passthrough")throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+Kv.join(", "));return n}function Yv(t){if(typeof t!="function")return !1;var e=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return e.exec(Function.prototype.toString.call(t))!=null}function CP(t,e){var n;e.algorithm!=="passthrough"?n=Ru.createHash(e.algorithm):n=new Qv,typeof n.write>"u"&&(n.write=n.update,n.end=n.update);var i=ku(e,n);if(i.dispatch(t),n.update||n.end(""),n.digest)return n.digest(e.encoding==="buffer"?void 0:e.encoding);var r=n.read();return e.encoding==="buffer"?r:r.toString(e.encoding)}gn.writeToStream=function(t,e,n){return typeof n>"u"&&(n=e,e={}),e=Xv(t,e),ku(e,n).dispatch(t)};function ku(t,e,n){n=n||[];var i=function(r){return e.update?e.update(r,"utf8"):e.write(r,"utf8")};return {dispatch:function(r){t.replacer&&(r=t.replacer(r));var o=typeof r;return r===null&&(o="null"),this["_"+o](r)},_object:function(r){var o=/\[object (.*)\]/i,a=Object.prototype.toString.call(r),s=o.exec(a);s?s=s[1]:s="unknown:["+a+"]",s=s.toLowerCase();var c=null;if((c=n.indexOf(r))>=0)return this.dispatch("[CIRCULAR:"+c+"]");if(n.
(see https://github.com/puleos/object-hash/issues/26)
Use "options.replacer" or "options.ignoreUnknown"
`)},_domwindow:function(){return i("domwindow")},_bigint:function(r){return i("bigint:"+r.toString())},_process:function(){return i("process")},_timer:function(){return i("timer")},_pipe:function(){return i("pipe")},_tcp:function(){return i("tcp")},_udp:function(){return i("udp")},_tty:function(){return i("tty")},_statwatcher:function(){return i("statwatcher")},_securecontext:function(){return i("securecontext")},_connection:function(){return i("connection")},_zlib:function(){return i("zlib")},_context:function(){return i("context")},_nodescript:function(){return i("nodescript")},_httpparser:function(){return i("httpparser")},_dataview:function(){return i("dataview")},_signal:function(){return i("signal")},_fsevent:function(){return i("fsevent")},_tlswrap:function(){return i("tlswrap")}}}function Qv(){return {buf:"",write:function(t){this.buf+=t;},end:function(t){this.buf+=t;},read:function(){return this.buf}}}});var nb=g((e3,tb)=>{tb.exports={STRING:2,BOOLEAN:4,BYTES:4,NUMBER:8,Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};});var ob=g(ia=>{ia.byteLength=FP;ia.toByteArray=qP;ia.fromByteArray=IP;var mt=[],$e=[],_P=typeof Uint8Array<"u"?Uint8Array:Array,Cu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(vn=0,ib=Cu.length;vn<ib;++vn)mt[vn]=Cu[vn],$e[Cu.charCodeAt(vn)]=vn;var vn,ib;$e["-".charCodeAt(0)]=62;$e["_".charCodeAt(0)]=63;function rb(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var i=n===e?0:4-n%4;return [n,i]}function FP(t){var e=rb(t),n=e[0],i=e[1];return (n+i)*3/4-i}function PP(t,e,n){return (e+n)*3/4-n}function qP(t){var e,n=rb(t),i=n[0],r=n[1],o=new _P(PP(t,i,r)),a=0,s=r>0?i-4:i,c;for(c=0;c<s;c+=4)e=$e[t.charCodeAt(c)]<<18|$e[t.charCodeAt(c+1)]<<12|$e[t.charCodeAt(c+2)]<<6|$e[t.charCodeAt(c+3)],o[a++]=e>>16&255,o[a++]=e>>8&255,o[a++]=e&255;return r===2&&(e=$e[t.charCodeAt(c)]<<2|$e[t.charCodeAt(c+1)]>>4,o[a++]=e&255),r===1&&(e=$e[t.charCodeAt(c)]<<10|$e[t.charCodeAt(c+1)]<<4|$e[t.charCodeAt(c+2)]>>2,o[a++]=e>>8&255,o[a++]=e&255),o}function jP(t){return mt[t>>18&63]+mt[t>>12&63]+mt[t>>6&63]+mt[t&63]}function BP(t,e,n){for(var i,r=[],o=e;o<n;o+=3)i=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),r.push(jP(i));return r.join("")}function IP(t){for(var e,n=t.length,i=n%3,r=[],o=16383,a=0,s=n-i;a<s;a+=o)r.push(BP(t,a,a+o>s?s:a+o));return i===1?(e=t[n-1],r.push(mt[e>>2]+mt[e<<4&63]+"==")):i===2&&(e=(t[n-2]<<8)+t[n-1],r.push(mt[e>>10]+mt[e>>4&63]+mt[e<<2&63]+"=")),r.join("")}});var ab=g(_u=>{_u.read=function(t,e,n,i,r){var o,a,s=r*8-i-1,c=(1<<s)-1,l=c>>1,u=-7,p=n?r-1:0,h=n?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=o*256+t[e+p],p+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=i;u>0;a=a*256+t[e+p],p+=h,u-=8);if(o===0)o=1-l;else {if(o===c)return a?NaN:(f?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-l;}return (f?-1:1)*a*Math.pow(2,o-i)};_u.write=function(t,e,n,i,r,o){var a,s,c,l=o*8-r-1,u=(1<<l)-1,p=u>>1,h=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+p>=1?e+=h/c:e+=h*Math.pow(2,1-p),e*c>=2&&(a++,c/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(e*c-1)*Math.pow(2,r),a=a+p):(s=e*Math.pow(2,p-1)*Math.pow(2,r),a=0));r>=8;t[n+f]=s&255,f+=d,s/=256,r-=8);for(a=a<<r|s,l+=r;l>0;t[n+f]=a&255,f+=d,a/=256,l-=8);t[n+f-d]|=y*128;};});var Eb=g(mi=>{var Fu=ob(),fi=ab(),sb=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;mi.Buffer=S;mi.SlowBuffer=$P;mi.INSPECT_MAX_BYTES=50;var ra=2147483647;mi.kMaxLength=ra;S.TYPED_ARRAY_SUPPORT=LP();!S.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function LP(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.set
`).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!n||e[n]&&pO[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i);}),e};var Bm=Symbol("internals");function _i(t){return t&&String(t).trim().toLowerCase()}function to(t){return t===!1||t==null?t:x.isArray(t)?t.map(to):String(t)}function fO(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}var dO=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ds(t,e,n,i,r){if(x.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!x.isString(e)){if(x.isString(i))return e.indexOf(i)!==-1;if(x.isRegExp(i))return i.test(e)}}function mO(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function hO(t,e){let n=x.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,o,a){return this[i].call(this,e,r,o,a)},configurable:!0});});}var Dn=class{constructor(e){e&&this.set(e);}set(e,n,i){let r=this;function o(s,c,l){let u=_i(c);if(!u)throw new Error("header name must be a non-empty string");let p=x.findKey(r,u);(!p||r[p]===void 0||l===!0||l===void 0&&r[p]!==!1)&&(r[p||c]=to(s));}let a=(s,c)=>x.forEach(s,(l,u)=>o(l,u,c));return x.isPlainObject(e)||e instanceof this.constructor?a(e,n):x.isString(e)&&(e=e.trim())&&!dO(e)?a(jm(e),n):e!=null&&o(n,e,i),this}get(e,n){if(e=_i(e),e){let i=x.findKey(this,e);if(i){let r=this[i];if(!n)return r;if(n===!0)return fO(r);if(x.isFunction(n))return n.call(this,r,i);if(x.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=_i(e),e){let i=x.findKey(this,e);return !!(i&&this[i]!==void 0&&(!n||Ds(this,this[i],i,n)))}return !1}delete(e,n){let i=this,r=!1;function o(a){if(a=_i(a),a){let s=x.findKey(i,a);s&&(!n||Ds(i,i[s],s,n))&&(delete i[s],r=!0);}}return x.isArray(e)?e.forEach(o):o(e),r}clear(e){let n=Object.keys(this),i=n.length,r=!1;for(;i--;){let o=n[i];(!e||Ds(this,this[o],o,e,!0))&&(delete this[o],r=!0);}return r}normalize(e){let n=this,i={};return x.forEach(this,(r,o)=>{let a=x.findKey(i,o);if(a){n[a]=to(r),delete n[o];return}let s=e?mO(o):String(o).trim();s!==o&&delete n[o],n[s]=to(r),i[s]=!0;}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return x.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&x.isArray(i)?i.join(", "):i);}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return "AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){let i=(this[Bm]=this[Bm]={accessors:{}}).accessors,r=this.prototype;function o(a){let s=_i(a);i[s]||(hO(r,a),i[s]=!0);}return x.isArray(e)?e.forEach(o):o(e),this}};Dn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.freezeMethods(Dn.prototype);x.freezeMethods(Dn);var ne=Dn;function Fi(t,e){let n=this||Ln,i=e||n,r=ne.from(i.headers),o=i.data;return x.forEach(t,function(s){o=s.call(n,o,r.normalize(),e?e.status:void 0);}),r.normalize(),o}function Pi(t){return !!(t&&t.__CANCEL__)}function Im(t,e,n){C.call(this,t??"canceled",C.ERR_CANCELED,e,n),this.name="CanceledError";}x.inherits(Im,C,{__CANCEL__:!0});var He=Im;function _t(t,e,n){let i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n));}function Ns(t){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Us(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Qt(t,e){return t&&!Ns(e)?Us(t,e):e}var lh=tt(Dm(),1),ph=tt(th(),1);var nn="1.4.0";function Ii(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var YO=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Js(t,e,n){let i=n&&n.Blob||te.classes.Blob,r=Ii(t);if(e===void 0&&i&&(e=!0),r==="data"){t=r.length?t.slice(r.length+1):t;let o=YO.exec(t);if(!o)throw new C("Invalid URL",C.ERR_INVALID_URL);let a=o[1],s=o[2],c=o[3],l=Buffer.from(decodeURIComponent(c),s?"base64":"utf8");if(e){if(!i)throw new C("Blob is not supported",C.ERR_NOT_SUPPORT);return new i([l],{type:a})}return l}throw new C("Unsupported protocol "+r,C.ERR_NOT_SUPPORT)}function XO(t,e){let n=0,i=1e3/e,r=null;return function(a,s){let c=Date.now();if(a||c-n>i)return r&&(clearTimeout(r),r=null),n=c,t.apply(null,s);r||(r=setTimeout(()=>(r=null,n=Date.now(),t.apply(null,s)),i-(c-n)));}}var nh=XO;function QO(t,e){t=t||10;let n=new Array(t),i=new Array(t),r=0,o=0,a;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),u=i[o];a||(a=l),n[r]=c,i[r]=l;let p=o,h=0;for(;p!==r;)h+=n[p++],p=p%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),l-a<e)return;let f=u&&l-u;return f?Math.round(h*1e3/f):void 0}}var ao=QO;var so=Symbol("internals"),Ks=class extends Mn__default.default.Transform{constructor(e){e=x.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(s,c)=>!x.isUndefined(c[s])),super({readableHighWaterMark:e.chunkSize});let n=this,i=this[so]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},r=ao(i.ticksRate*e.samplesCount,i.timeWindow);this.on("newListener",s=>{s==="progress"&&(i.isCaptured||(i.isCaptured=!0));});let o=0;i.updateProgress=nh(function(){let c=i.length,l=i.bytesSeen,u=l-o;if(!u||n.destroyed)return;let p=r(u);o=l,process.nextTick(()=>{n.emit("progress",{loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:p||void 0,estimated:p&&c&&l<=c?(c-l)/p:void 0});});},i.ticksRate);let a=()=>{i.updateProgress(!0);};this.once("end",a),this.once("error",a);}_read(e){let n=this[so];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,i){let r=this,o=this[so],a=o.maxRate,s=this.readableHighWaterMark,c=o.timeWindow,l=1e3/c,u=a/l,p=o.minChunkSize!==!1?Math.max(o.minChunkSize,u*.01):0;function h(d,y){let v=Buffer.byteLength(d);o.bytesSeen+=v,o.bytes+=v,o.isCaptured&&o.updateProgress(),r.push(d)?process.nextTick(y):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(y);};}let f=(d,y)=>{let v=Buffer.byteLength(d),b=null,w=s,A,O=0;if(a){let k=Date.now();(!o.ts||(O=k-o.ts)>=c)&&(o.ts=k,A=u-o.bytes,o.bytes=A<0?-A:0,O=0),A=u-o.bytes;}if(a){if(A<=0)return setTimeout(()=>{y(null,d);},c-O);A<w&&(w=A);}w&&v>w&&v-w>p&&(b=d.s
`,rT=Li.encode(Ft),oT=2,Xs=class{constructor(e,n){let{escapeName:i}=this.constructor,r=x.isString(n),o=`Content-Disposition: form-data; name="${i(e)}"${!r&&n.name?`; filename="${i(n.name)}"`:""}${Ft}`;r?n=Li.encode(String(n).replace(/\r?\n|\r\n?/g,Ft)):o+=`Content-Type: ${n.type||"application/octet-stream"}${Ft}`,this.headers=Li.encode(o+Ft),this.contentLength=r?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+oT,this.name=e,this.value=n;}async*encode(){yield this.headers;let{value:e}=this;x.isTypedArray(e)?yield e:yield*co(e),yield rT;}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},aT=(t,e,n)=>{let{tag:i="form-data-boundary",size:r=25,boundary:o=i+"-"+x.generateString(r,iT)}=n||{};if(!x.isFormData(t))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let a=Li.encode("--"+o+Ft),s=Li.encode("--"+o+"--"+Ft+Ft),c=s.byteLength,l=Array.from(t.entries()).map(([p,h])=>{let f=new Xs(p,h);return c+=f.size,f});c+=a.byteLength*l.length,c=x.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(u["Content-Length"]=c),e&&e(u),Mn.Readable.from(async function*(){for(let p of l)yield a,yield*p.encode();yield s;}())},rh=aT;var Qs=class extends Mn__default.default.Transform{__transform(e,n,i){this.push(e),i();}_transform(e,n,i){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,n);}this.__transform(e,n,i);}},oh=Qs;var cT=(t,e)=>x.isAsyncFn(t)?function(...n){let i=n.pop();t.apply(this,n).then(r=>{try{e?i(null,...e(r)):i(null,r);}catch(o){i(o);}},i);}:t,ah=cT;var sh={flush:Pt__default.default.constants.Z_SYNC_FLUSH,finishFlush:Pt__default.default.constants.Z_SYNC_FLUSH},dT={flush:Pt__default.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Pt__default.default.constants.BROTLI_OPERATION_FLUSH},ch=x.isFunction(Pt__default.default.createBrotliDecompress),{http:mT,https:hT}=ph.default,yT=/https:?/,uh=te.protocols.map(t=>t+":");function xT(t){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t);}function fh(t,e,n){let i=e;if(!i&&i!==!1){let r=(0, lh.getProxyForUrl)(n);r&&(i=new URL(r));}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let o=Buffer.from(i.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+o;}t.headers.host=t.hostname+(t.port?":"+t.port:"");let r=i.hostname||i.host;t.hostname=r,t.host=r,t.port=i.port,t.path=n,i.protocol&&(t.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`);}t.beforeRedirects.proxy=function(o){fh(o,e,o.href);};}var gT=typeof process<"u"&&x.kindOf(process)==="process",vT=t=>new Promise((e,n)=>{let i,r,o=(c,l)=>{r||(r=!0,i&&i(c,l));},a=c=>{o(c),e(c);},s=c=>{o(c,!0),n(c);};t(a,s,c=>i=c).catch(s);}),dh=gT&&function(e){return vT(async function(i,r,o){let{data:a,lookup:s,family:c}=e,{responseType:l,responseEncoding:u}=e,p=e.method.toUpperCase(),h,f=!1,d;s&&x.isAsyncFn(s)&&(s=ah(s,R=>{if(x.isString(R))R=[R,R.indexOf(".")<0?6:4];else if(!x.isArray(R))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return R}));let y=new fT__default.default,v=()=>{e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b),y.removeAllListeners();};o((R,P)=>{h=!0,P&&(f=!0,v());});function b(R){y.emit("abort",!R||R.type?new He(null,e,d):R);}y.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b)));let w=Qt(e.baseURL,e.url),A=new URL(w,"http://localhost"),O=A.protocol||uh[0];if(O==="data:"){let R;if(p!=="GET")return _t(i,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{R=Js(e.url,l==="blob",{Blob:e.env&&e.env.Blob});}catch(P){throw C.from(P,C.ERR_BAD_REQUEST,e)}retur
`)?this.buffer="":this.buffer=i.pop();for(let r of i){let o=null;try{o=JSON.parse(r);}catch(a){this.logger.error({error:a},`Failed to parse request: ${r}`);continue}this.logger.debug({request:o},"Received request"),this.handleRequest(o).then(a=>{this.sendResponse(a),this.logger.debug({response:a},"Sent response");});}}}async handleRequest(e){let n=[0,null];try{if(!this.agent)throw new Error(`Agent not bound.
`);n[0]=e[0];let i=e[1].func;if(i==="cancelRequest")n[1]=this.cancelRequest(e);else {let r=this.agent[i];if(!r)throw new Error(`Unknown function: ${i}`);let o=r.apply(this.agent,e[1].args);typeof o=="object"&&typeof o.then=="function"?(this.ongoingRequests[e[0]]=o,n[1]=await o,delete this.ongoingRequests[e[0]]):n[1]=o;}}catch(i){this.logger.error({error:i,request:e},"Failed to handle request");}finally{return n}}cancelRequest(e){let n=this.ongoingRequests[e[1].args[0]];return n?(n instanceof Ue&&n.cancel(),delete this.ongoingRequests[e[1].args[0]],!0):!1}sendResponse(e){this.outStream.write(JSON.stringify(e)+`
`);}bind(e){this.agent=e;for(let n of Lb)this.agent.on(n,i=>{this.sendResponse([0,i]);});}listen(){this.inStream.on("data",this.handleInput.bind(this));}};var Db=new ca;ur.create().then(t=>{Db.bind(t),Db.listen();});
2023-05-29 02:09:44 +00:00
/*! Bundled license information:
mime-db/index.js:
(*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*)
mime-types/index.js:
(*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*)
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
*/
//# sourceMappingURL=out.js.map
//# sourceMappingURL=cli.js.map