tabby/clients/tabby-agent/dist/cli.js

177 lines
416 KiB
JavaScript
Raw Normal View History

#!/bin/env node
'use strict';
var child_process = require('child_process');
var qt = require('zlib');
var Mn = require('stream');
var fs = require('fs');
var promises = require('fs/promises');
var path = require('path');
var sR = require('util');
var cR = require('events');
var Hb = require('crypto');
var tO = require('url');
var oR = require('http');
var aR = require('https');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var qt__default = /*#__PURE__*/_interopDefault(qt);
var Mn__default = /*#__PURE__*/_interopDefault(Mn);
var sR__default = /*#__PURE__*/_interopDefault(sR);
var cR__default = /*#__PURE__*/_interopDefault(cR);
var Hb__default = /*#__PURE__*/_interopDefault(Hb);
var tO__default = /*#__PURE__*/_interopDefault(tO);
var oR__default = /*#__PURE__*/_interopDefault(oR);
var aR__default = /*#__PURE__*/_interopDefault(aR);
var Ib=Object.create;var yi=Object.defineProperty;var Lb=Object.getOwnPropertyDescriptor;var Db=Object.getOwnPropertyNames;var Nb=Object.getPrototypeOf,Ub=Object.prototype.hasOwnProperty;var zb=(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 $b=(t,e)=>()=>(t&&(e=t(t=0)),e);var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Mb=(t,e)=>{for(var n in e)yi(t,n,{get:e[n],enumerable:!0});},Iu=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Db(e))!Ub.call(t,r)&&r!==n&&yi(t,r,{get:()=>e[r],enumerable:!(i=Lb(e,r))||i.enumerable});return t};var tt=(t,e,n)=>(n=t!=null?Ib(Nb(t)):{},Iu(e||!t||!t.__esModule?yi(n,"default",{value:t,enumerable:!0}):n,t)),Wb=t=>Iu(yi({},"__esModule",{value:!0}),t);var U=(t,e,n)=>(zb(t,typeof e!="symbol"?e+"":e,n),n),ua=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(ua(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)=>(ua(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)=>(ua(t,e,"access private method"),n);var fa=g((SP,Nu)=>{var Du=Object.prototype.toString;Nu.exports=function(e){var n=Du.call(e),i=n==="[object Arguments]";return i||(i=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Du.call(e.callee)==="[object Function]"),i};});var Ju=g((EP,Vu)=>{var Gu;Object.keys||(xi=Object.prototype.hasOwnProperty,da=Object.prototype.toString,Uu=fa(),ma=Object.prototype.propertyIsEnumerable,zu=!ma.call({toString:null},"toString"),$u=ma.call(function(){},"prototype"),gi=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],yr=function(t){var e=t.constructor;return e&&e.prototype===t},Mu={$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},Wu=function(){if(typeof window>"u")return !1;for(var t in window)try{if(!Mu["$"+t]&&xi.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{yr(window[t]);}catch{return !0}}catch{return !0}return !1}(),Hu=function(t){if(typeof window>"u"||!Wu)return yr(t);try{return yr(t)}catch{return !1}},Gu=function(e){var n=e!==null&&typeof e=="object",i=da.call(e)==="[object Function]",r=Uu(e),o=n&&da.call(e)==="[object String]",a=[];if(!n&&!i&&!r)throw new TypeError("Object.keys called on a non-object");var s=$u&&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(zu)for(var p=Hu(e),h=0;h<gi.length;++h)!(p&&gi[h]==="constructor")&&xi.call(e,gi[h])&&a.push(gi[h]);return a});var xi,da,Uu,ma,zu,$u,gi,yr,Mu,Wu,Hu;Vu.exports=Gu;});var gr=g((AP,Xu)=>{var Jb=Array.prototype.slice,Kb=fa(),Ku=Object.keys,xr=Ku?function(e){return Ku(e)}:Ju(),Yu=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 Kb(i)?Yu(Jb.call(i)):Yu(i)});}else Object.keys=xr;return Object.keys||xr};Xu.exports=xr;});var vr=g((OP,Qu)=>{Qu.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 O0(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 Ia(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=Ba(t),i=[];if(n){i.length=t.length;for(var r=0;r<t.length;r++)i[r]=Rt(t,r)?e(t[r],t):"";}var o=typeof _a=="function"?_a(t):[],a;if(Cn){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s];}for(var c in t)Rt(t,c)&&(n&&String(Number(c))===c&&c<t.length||Cn&&a["$"+c]instanceof Symbol||(dp.call(/[^\w$]/,c)?i.push(e(c,t)+": "+e(t[c],t)):i.push(c+": "+e(t[c],t))));if(typeof _a=="function")for(var l=0;l<o.length;l++)mp.call(t,o[l])&&i.push("["+e(o[l])+"]: "+e(t[o[l]],t));return i}});var Sp=g((JP,wp)=>{var Ua=xt(),_n=Fe(),R0=bp(),T0=Ua("%TypeError%"),Tr=Ua("%WeakMap%",!0),kr=Ua("%Map%",!0),k0=_n("WeakMap.prototype.get",!0),C0=_n("WeakMap.prototype.set",!0),_0=_n("WeakMap.prototype.has",!0),F0=_n("Map.prototype.get",!0),q0=_n("Map.prototype.set",!0),P0=_n("Map.prototype.has",!0),za=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},j0=function(t,e){var n=za(t,e);return n&&n.value},B0=function(t,e,n){var i=za(t,e);i?i.value=n:t.next={key:e,next:t.next,value:n};},I0=function(t,e){return !!za(t,e)};wp.exports=function(){var e,n,i,r={assert:function(o){if(!r.has(o))throw new T0("Side channel does not contain "+R0(o))},get:function(o){if(Tr&&o&&(typeof o=="object"||typeof o=="function")){if(e)return k0(e,o)}else if(kr){if(n)return F0(n,o)}else if(i)return j0(i,o)},has:function(o){if(Tr&&o&&(typeof o=="object"||typeof o=="function")){if(e)return _0(e,o)}else if(kr){if(n)return P0(n,o)}else if(i)return I0(i,o);return !1},set:function(o,a){Tr&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Tr),C0(e,o,a)):kr?(n||(n=new kr),q0(n,o,a)):(i||(i={key:{},next:null}),B0(i,o,a));}};return r};});var $a=g((KP,Ap)=>{var Ep=function(t){return t!==t};Ap.exports=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Ep(e)&&Ep(n))};});var Ma=g((YP,Op)=>{var L0=$a();Op.exports=function(){return typeof Object.is=="function"?Object.is:L0};});var Tp=g((XP,Rp)=>{var D0=Ma(),N0=Ot();Rp.exports=function(){var e=D0();return N0(Object,{is:e},{is:function(){return Object.is!==e}}),e};});var Fp=g((QP,_p)=>{var U0=Ot(),z0=kn(),$0=$a(),kp=Ma(),M0=Tp(),Cp=z0(kp(),Object);U0(Cp,{getPolyfill:kp,implementation:$0,shim:M0});_p.exports=Cp;});var gt=g((ZP,qp)=>{var W0=vr();qp.exports=function(){return W0()&&!!Symbol.toStringTag};});var Bp=g((ej,jp)=>{var H0=gt()(),G0=Fe(),Wa=G0("Object.prototype.toString"),Cr=function(e){return H0&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Wa(e)==="[object Arguments]"},Pp=function(e){return Cr(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Wa(e)!=="[object Array]"&&Wa(e.callee)==="[object Function]"},V0=function(){return Cr(arguments)}();Cr.isLegacyArguments=Pp;jp.exports=V0?Cr:Pp;});var Lp=g((tj,Ip)=>{var J0={}.toString;Ip.exports=Array.isArray||function(t){return J0.call(t)=="[object Array]"};});var zp=g((nj,Up)=>{var Np=Function.prototype.toString,Fn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ga,_r;if(typeof Fn=="function"&&typeof Object.defineProperty=="function")try{Ga=Object.defineProperty({},"length",{get:function(){throw _r}}),_r={},Fn(function(){throw 42},null,Ga);}catch(t){t!==_r&&(Fn=null);}else Fn=null;var K0=/^\s*class\b/,Va=function(e){try{var n=Np.call(e);return K0.test(n)}catch{return !1}},Ha=function(e){try{return Va(e)?!1:(Np.call(e),!0)}catch{return !1}},Fr=Object.prototype.toString,Y0="[object Object]",X0="[object Function]",Q0="[object GeneratorFunction]",Z0="[object HTMLAllCollection]",eS="[object HTML document.all class]",tS="[object HTMLCollection]",nS=typeof Symbol=="function"&&!!Symbol.toStringTag,iS=!(0 in[,]),Ja=function(){return !1};typeof document=="object"&&(Dp=document.all,Fr.call(Dp)===Fr.call(document.all)&&(Ja=function(e){if((iS||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=Fr.call(e);return (n===Z0||n===eS||n===tS||n===Y0)&&e("")==null}catch{}return !1}));var Dp;Up.exports=Fn?function(e){if(Ja(e))return !0;if(!e||typeof e!="function"&&typeof e!="object")return !1;try{Fn(e,null,Ga);}catch(n){if(n!==_r)return !1}return !Va(e)&&Ha(e)}:function(e){if(Ja(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=Fs.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),wm.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 KA))&&(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)):JA.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"&&_s(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=ks.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=ks.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=ks.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=Cs.lookup(t.name)),!n&&t.path&&(n=Cs.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=Cs.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]=qO()+e+" "+t[0];}function qO(){return pe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function PO(...t){return process.stderr.write(ro.format(...t)+`
`)}function jO(t){t?process.env.DEBUG=t:delete process.env.DEBUG;}function BO(){return process.env.DEBUG}function IO(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=Us()(pe);var{formatters:Um}=oo.exports;Um.o=function(t){return this.inspectOpts.colors=this.useColors,ro.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Um.O=function(t){return this.inspectOpts.colors=this.useColors,ro.inspect(t,this.inspectOpts)};});var $m=g((ZB,zs)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?zs.exports=Nm():zs.exports=zm();});var Wm=g((eI,Mm)=>{var Pi;Mm.exports=function(){if(!Pi){try{Pi=$m()("follow-redirects");}catch{}typeof Pi!="function"&&(Pi=function(){});}Pi.apply(null,arguments);};});var Qm=g((tI,Gs)=>{var en=_("url"),$s=en.URL,LO=_("http"),DO=_("https"),Vm=_("stream").Writable,Jm=_("assert"),Km=Wm(),Ws=["abort","aborted","connect","error","socket","timeout"],Hs=Object.create(null);Ws.forEach(function(t){Hs[t]=function(e,n,i){this._redirectable.emit(t,e,n,i);};});var NO=Bi("ERR_INVALID_URL","Invalid URL",TypeError),Hm=Bi("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),UO=Bi("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),zO=Bi("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),$O=Bi("ERR_STREAM_WRITE_AFTER_END","write after end");function Pe(t,e){Vm.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();}Pe.prototype=Object.create(Vm.prototype);Pe.prototype.abort=function(){Xm(this._currentRequest),this.emit("abort");};Pe.prototype.write=function(t,e,n){if(this._ending)throw new $O;if(!tn(t)&&!HO(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 zO),this.abort());};Pe.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;}};Pe.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e);};Pe.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t);};Pe.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){Pe.prototype[t]=function(e,n){return this._currentRequest[t](e,n)};});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Pe.prototype,t,{get:function(){return this._currentRequest[t]}});});Pe.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));}};Pe.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 Ws)i.on(r,Hs[r]);if(this._currentUrl=/^\//.test(this._options.path)?en.
GFS4: `),console.error(t);});Z[fe]||(_h=global[fe]||[],qh(Z,_h),Z.close=function(t){function e(n,i){return t.call(Z,n,function(r){r||Fh(),typeof i=="function"&&i.apply(this,arguments);})}return Object.defineProperty(e,wo,{value:t}),e}(Z.close),Z.closeSync=function(t){function e(n){t.apply(Z,arguments),Fh();}return Object.defineProperty(e,wo,{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 _h;global[fe]||qh(global,Z[fe]);pc.exports=uc(DR(Z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Z.__patched&&(pc.exports=uc(Z),Z.__patched=!0);function uc(t){IR(t),t.gracefulify=uc,t.createReadStream=k,t.createWriteStream=P;var e=t.readFile;t.readFile=n;function n(R,B,I){return typeof B=="function"&&(I=B,B=null),M(R,B,I);function M(W,z,V,K){return e(W,z,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?Jn([M,[W,z,V],T,K||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments);})}}var i=t.writeFile;t.writeFile=r;function r(R,B,I,M){return typeof I=="function"&&(M=I,I=null),W(R,B,I,M);function W(z,V,K,T,q){return i(z,V,K,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,T],H,q||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments);})}}var o=t.appendFile;o&&(t.appendFile=a);function a(R,B,I,M){return typeof I=="function"&&(M=I,I=null),W(R,B,I,M);function W(z,V,K,T,q){return o(z,V,K,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,T],H,q||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments);})}}var s=t.copyFile;s&&(t.copyFile=c);function c(R,B,I,M){return typeof I=="function"&&(M=I,I=0),W(R,B,I,M);function W(z,V,K,T,q){return s(z,V,K,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,T],H,q||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments);})}}var l=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(R,B,I){typeof B=="function"&&(I=B,B=null);var M=u.test(process.version)?function(V,K,T,q){return l(V,W(V,K,T,q))}:function(V,K,T,q){return l(V,K,W(V,K,T,q))};return M(R,B,I);function W(z,V,K,T){return function(q,H){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Jn([M,[z,V,K],q,T||Date.now(),Date.now()]):(H&&H.sort&&H.sort(),typeof K=="function"&&K.call(this,q,H));}}}if(process.version.substr(0,4)==="v0.8"){var h=LR(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(R){b=R;},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return A},set:function(R){A=R;},enumerable:!0,configurable:!0});var y=b;Object.defineProperty(t,"FileReadStream",{get:function(){return y},set:function(R){y=R;},enumerable:!0,configurable:!0});var v=A;Object.defineProperty(t,"FileWriteStream",{get:function(){return v},set:function(R){v=R;},enumerable:!0,configurable:!0});function b(R,B){return this instanceof b?(f.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function w(){var R=this;D(R.path,R.flags,R.mode,function(B,I){B?(R.autoClose&&R.destroy(),R.emit("error",B)):(R.fd=I,R.emit("open",I),R.read());});}function A(R,B){return this instanceof A?(d.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function O(){var R=this;D(R.path,R.flags,R.mode,function(B,I){B?(R.destroy(),R.emit("error",B)):(R.fd=I,R.emit("open",I));});}function k(R,B){return new t.ReadStream(R,B)}function P(R,B){return new t.WriteStream(R,B)}var L=t.open;t.open=D;function D(R,B,I,M){return typeof I=="function"&&(M=I,I=null),W(R,B,I,M);function W(z,V,K,T,q){return L(z,V,K,function(H,lr){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Jn([W,[z,V,K,T],H,q||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments);})}}return t}function Jn(t){sn("ENQUEUE",t[0].name,t[1]),Z[fe].push(t),lc();}var bo;function Fh(){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);Jh(t,e,n,(l,u)=>{if(l)return i(l);if(!u)return i();iT(s,t,e,n,i);});});});}function iT(t,e,n,i,r){let o=Hi.dirname(n);eT(o,(a,s)=>{if(a)return r(a);if(s)return xc(t,e,n,i,r);ZR(o,c=>c?r(c):xc(t,e,n,i,r));});}function Jh(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 xc(t,e,n,i,r){(i.dereference?Ae.stat:Ae.lstat)(e,(a,s)=>a?r(a):s.isDirectory()?lT(s,t,e,n,i,r):s.isFile()||s.isCharacterDevice()||s.isBlockDevice()?rT(s,t,e,n,i,r):s.isSymbolicLink()?dT(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 rT(t,e,n,i,r,o){return e?oT(t,n,i,r,o):Kh(t,n,i,r,o)}function oT(t,e,n,i,r){if(i.overwrite)Ae.unlink(n,o=>o?r(o):Kh(t,e,n,i,r));else return i.errorOnExist?r(new Error(`'${n}' already exists`)):r()}function Kh(t,e,n,i,r){Ae.copyFile(e,n,o=>o?r(o):i.preserveTimestamps?aT(t.mode,e,n,r):Eo(n,t.mode,r));}function aT(t,e,n,i){return sT(t)?cT(n,t,r=>r?i(r):Vh(t,e,n,i)):Vh(t,e,n,i)}function sT(t){return (t&128)===0}function cT(t,e,n){return Eo(t,e|128,n)}function Vh(t,e,n,i){uT(e,n,r=>r?i(r):Eo(n,t,i));}function Eo(t,e,n){return Ae.chmod(t,e,n)}function uT(t,e,n){Ae.stat(t,(i,r)=>i?n(i):tT(e,r.atime,r.mtime,n));}function lT(t,e,n,i,r,o){return e?Yh(n,i,r,o):pT(t.mode,n,i,r,o)}function pT(t,e,n,i,r){Ae.mkdir(n,o=>{if(o)return r(o);Yh(e,n,i,a=>a?r(a):Eo(n,t,r));});}function Yh(t,e,n,i){Ae.readdir(t,(r,o)=>r?i(r):gc(o,t,e,n,i));}function gc(t,e,n,i,r){let o=t.pop();return o?fT(t,o,e,n,i,r):r()}function fT(t,e,n,i,r,o){let a=Hi.join(n,e),s=Hi.join(i,e);Jh(a,s,r,(c,l)=>{if(c)return o(c);if(!l)return gc(t,n,i,r,o);Gi.checkPaths(a,s,"copy",r,(u,p)=>{if(u)return o(u);let{destStat:h}=p;xc(h,a,s,r,f=>f?o(f):gc(t,n,i,r,o));});});}function dT(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}'.`)):mT(a,n,r)));else return Ae.symlink(a,n,r)});}function mT(t,e,n){Ae.unlink(e,i=>i?n(i):Ae.symlink(t,e,n));}Xh.exports=nT;});var iy=g((gD,ny)=>{var ge=Ee(),Vi=_("path"),hT=Ve().mkdirsSync,yT=hc().utimesMillisSync,Ji=un();function xT(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)||hT(o),Zh(r,t,e,n)}function Zh(t,e,n,i){let o=(i.dereference?ge.statSync:ge.lstatSync)(e);if(o.isDirectory())return AT(o,t,e,n,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return gT(o,t,e,n,i);if(o.isSymbolicLink())return TT(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 gT(t,e,n,i,r){return e?vT(t,n,i,r):ey(t,n,i,r)}function vT(t,e,n,i){if(i.overwrite)return ge.unlinkSync(n),ey(t,e,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}function ey(t,e,n,i){return ge.copyFileSync(e,n),i.preserveTimestamps&&bT(t.mode,e,n),vc(n,t.mode)}function bT(t,e,n){return wT(t)&&ST(n,t),ET(e,n)}function wT(t){return (t&128)===0}function ST(t,e){return vc(t,e|128)}function vc(t,e){return ge.chmodSync(t,e)}function ET(t,e){let n=ge.statSync(t);return yT(e,n.atime,n.mtime)}function AT(t,e,n,i,r){return e?ty(n,i,r):OT(t.mode,n,i,r)}function OT(t,e,n,i){return ge.mkdirSync(n),ty(e,n,i),vc(n,t)}function ty(t,e,n){ge.readdirSync(t).forEach(i=>RT(i,t,e,n));}function RT(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 Zh(a,r,o,i)}function TT(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 kT(r,n)}else return ge.symlinkSync(r,n)}function kT(t,e){return ge.unlinkSync(e),ge.symlinkSync(t,e)}ny.exports=xT;});var Ao=g((vD,ry)=>{var CT=Se().fromCallback;ry.exports={copy:CT(Qh()),copySync:iy()};});var Ki=g((bD,ay)=>{var oy=Ee(),_T=Se().fromCallback;function FT(t,e){oy.rm(t,{recursive:!0,force:!0},e);}function qT(t){oy.rmSync(t,{recursive:!0,force:!0});}ay.exports={remove:_T(FT),removeSync:qT};});var my=g((wD,dy)=>{var PT=Se().fromPromise,uy=cn(),ly=_("path"),py=Ve(),fy=Ki(),sy=PT(async function(e){let n;try{n=await uy.readdir(e);}catch{return py.mkdirs(e)}return Promise.all(n.map(i=>fy.remove(ly.join(e,i))))});function cy(t){let e;try{e=uy.readdirSync(t);}catch{return py.mkdirsSync(t)}e.forEach(n=>{n=ly.join(t,n),fy.removeSync(n);});}dy.exports={emptyDirSync:cy,emptydirSync:cy,emptyDir:sy,emptydir:sy};});var gy=g((SD,xy)=>{var jT=Se().fromCallback,hy=_("path"),Dt=Ee(),yy=Ve();function BT(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=hy.dirname(t);Dt.stat(o,(a,s)=>{if(a)return a.code==="ENOENT"?yy.mkdirs(o,c=>{if(c)return e(c);n();}):e(a);s.isDirectory()?n():Dt.readdir(o,c=>{if(c)return e(c)});});});}function IT(t){let e;try{e=Dt.statSync(t);}catch{}if(e&&e.isFile())return;let n=hy.dirname(t);try{Dt.statSync(n).isDirectory()||Dt.readdirSync(n);}catch(i){if(i&&i.code==="ENOENT")yy.mkdirsSync(n);else throw i}Dt.writeFileSync(t,"");}xy.exports={createFile:jT(BT),createFileSync:IT};});var Ey=g((ED,Sy)=>{var LT=Se().fromCallback,vy=_("path"),Nt=Ee(),by=Ve(),DT=Lt().pathExists,{areIdentical:wy}=un();function NT(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&&wy(s,o))return n(null);let c=vy.dirname(e);DT(c,(l,u)=>{if(l)return n(l);if(u)return i(t,e);by.mkdirs(c,p=>{if(p)return n(p);i(t,e);});});});});}function UT(t,e){let n;try{n=Nt.lstatSync(e);}catch{}try{let o=Nt.lstatSync(t);if(n&&wy(o,n))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=vy.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 i1(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Hy.exports={stringify:n1,stripBom:i1};});var Ky=g((CD,Jy)=>{var Xn;try{Xn=Ee();}catch{Xn=_("fs");}var Ro=Se(),{stringify:Gy,stripBom:Vy}=Oo();async function r1(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=Vy(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 o1=Ro.fromPromise(r1);function a1(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=Vy(r),JSON.parse(r,e.reviver)}catch(r){if(i)throw r.message=`${t}: ${r.message}`,r;return null}}async function s1(t,e,n={}){let i=n.fs||Xn,r=Gy(e,n);await Ro.fromCallback(i.writeFile)(t,r,n);}var c1=Ro.fromPromise(s1);function u1(t,e,n={}){let i=n.fs||Xn,r=Gy(e,n);return i.writeFileSync(t,r,n)}var l1={readFile:o1,readFileSync:a1,writeFile:c1,writeFileSync:u1};Jy.exports=l1;});var Xy=g((_D,Yy)=>{var To=Ky();Yy.exports={readJson:To.readFile,readJsonSync:To.readFileSync,writeJson:To.writeFile,writeJsonSync:To.writeFileSync};});var ko=g((FD,ex)=>{var p1=Se().fromCallback,Xi=Ee(),Qy=_("path"),Zy=Ve(),f1=Lt().pathExists;function d1(t,e,n,i){typeof n=="function"&&(i=n,n="utf8");let r=Qy.dirname(t);f1(r,(o,a)=>{if(o)return i(o);if(a)return Xi.writeFile(t,e,n,i);Zy.mkdirs(r,s=>{if(s)return i(s);Xi.writeFile(t,e,n,i);});});}function m1(t,...e){let n=Qy.dirname(t);if(Xi.existsSync(n))return Xi.writeFileSync(t,...e);Zy.mkdirsSync(n),Xi.writeFileSync(t,...e);}ex.exports={outputFile:p1(d1),outputFileSync:m1};});var nx=g((qD,tx)=>{var{stringify:h1}=Oo(),{outputFile:y1}=ko();async function x1(t,e,n={}){let i=h1(e,n);await y1(t,i,n);}tx.exports=x1;});var rx=g((PD,ix)=>{var{stringify:g1}=Oo(),{outputFileSync:v1}=ko();function b1(t,e,n){let i=g1(e,n);v1(t,i,n);}ix.exports=b1;});var ax=g((jD,ox)=>{var w1=Se().fromPromise,ve=Xy();ve.outputJson=w1(nx());ve.outputJsonSync=rx();ve.outputJSON=ve.outputJson;ve.outputJSONSync=ve.outputJsonSync;ve.writeJSON=ve.writeJson;ve.writeJSONSync=ve.writeJsonSync;ve.readJSON=ve.readJson;ve.readJSONSync=ve.readJsonSync;ox.exports=ve;});var px=g((BD,lx)=>{var S1=Ee(),wc=_("path"),E1=Ao().copy,ux=Ki().remove,A1=Ve().mkdirp,O1=Lt().pathExists,sx=un();function R1(t,e,n,i){typeof n=="function"&&(i=n,n={}),n=n||{};let r=n.overwrite||n.clobber||!1;sx.checkPaths(t,e,"move",n,(o,a)=>{if(o)return i(o);let{srcStat:s,isChangingCase:c=!1}=a;sx.checkParentPaths(t,s,e,"move",l=>{if(l)return i(l);if(T1(e))return cx(t,e,r,c,i);A1(wc.dirname(e),u=>u?i(u):cx(t,e,r,c,i));});});}function T1(t){let e=wc.dirname(t);return wc.parse(e).root===e}function cx(t,e,n,i,r){if(i)return bc(t,e,n,r);if(n)return ux(e,o=>o?r(o):bc(t,e,n,r));O1(e,(o,a)=>o?r(o):a?r(new Error("dest already exists.")):bc(t,e,n,r));}function bc(t,e,n,i){S1.rename(t,e,r=>r?r.code!=="EXDEV"?i(r):k1(t,e,n,i):i());}function k1(t,e,n,i){E1(t,e,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0},o=>o?i(o):ux(t,i));}lx.exports=R1;});var yx=g((ID,hx)=>{var dx=Ee(),Ec=_("path"),C1=Ao().copySync,mx=Ki().removeSync,_1=Ve().mkdirpSync,fx=un();function F1(t,e,n){n=n||{};let i=n.overwrite||n.clobber||!1,{srcStat:r,isChangingCase:o=!1}=fx.checkPathsSync(t,e,"move",n);return fx.checkParentPathsSync(t,r,e,"move"),q1(e)||_1(Ec.dirname(e)),P1(t,e,i,o)}function q1(t){let e=Ec.dirname(t);return Ec.parse(e).root===e}function P1(t,e,n,i){if(i)return Sc(t,e,n);if(n)return mx(e),Sc(t,e,n);if(dx.existsSync(e))throw new Error("dest already exists.");return Sc(t,e,n)}function Sc(t,e,n){try{dx.renameSync(t,e);}catch(i){if(i.code!=="EXDEV")throw i;return j1(t,e,n)}}function j1(t,e,n){return C1(t,e,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),mx(t)}hx.exports=F1;});var gx=g((LD,xx)=>{var B1=Se().fromCallback;xx.exports={move:B1(px()),moveSync:yx()};});var bx=g((DD,vx)=>{vx.exports={...cn(),...Ao(),...my(),...Wy(),...ax(),...Ve()
causes have become circular...`;let i=Ac(t);return i?(e.add(t),n+`
caused by: `+wx(i,e)):n},I1=t=>wx(t,new Set),Sx=(t,e,n)=>{if(!Qi(t))return "";let i=n?"":t.message||"";if(e.has(t))return i+": ...";let r=Ac(t);if(r){e.add(t);let o=typeof t.cause=="function";return i+(o?"":": ")+Sx(r,e,o)}else return i},L1=t=>Sx(t,new Set);Ex.exports={isErrorLike:Qi,getErrorCause:Ac,stackWithCauses:I1,messageWithCauses:L1};});var Rc=g(($D,Ox)=>{var D1=Symbol("circular-ref-tag"),_o=Symbol("pino-raw-err-ref"),Ax=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[_o]},set:function(t){this[_o]=t;}}});Object.defineProperty(Ax,_o,{writable:!0,value:{}});Ox.exports={pinoErrProto:Ax,pinoErrorSymbols:{seen:D1,rawSymbol:_o}};});var kx=g((MD,Tx)=>{Tx.exports=kc;var{messageWithCauses:N1,stackWithCauses:U1,isErrorLike:Rx}=Oc(),{pinoErrProto:z1,pinoErrorSymbols:$1}=Rc(),{seen:Tc}=$1,{toString:M1}=Object.prototype;function kc(t){if(!Rx(t))return t;t[Tc]=void 0;let e=Object.create(z1);e.type=M1.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=N1(t),e.stack=U1(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>kc(n)));for(let n in t)if(e[n]===void 0){let i=t[n];Rx(i)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(i,Tc)&&(e[n]=kc(i)):e[n]=i;}return delete t[Tc],e.raw=t,e}});var _x=g((WD,Cx)=>{Cx.exports=qo;var{isErrorLike:Cc}=Oc(),{pinoErrProto:W1,pinoErrorSymbols:H1}=Rc(),{seen:Fo}=H1,{toString:G1}=Object.prototype;function qo(t){if(!Cc(t))return t;t[Fo]=void 0;let e=Object.create(W1);e.type=G1.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))),Cc(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Fo)&&(e.cause=qo(t.cause));for(let n in t)if(e[n]===void 0){let i=t[n];Cc(i)?Object.prototype.hasOwnProperty.call(i,Fo)||(e[n]=qo(i)):e[n]=i;}return delete t[Fo],e.raw=t,e}});var jx=g((HD,Px)=>{Px.exports={mapHttpRequest:V1,reqSerializer:qx};var _c=Symbol("pino-raw-req-ref"),Fx=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[_c]},set:function(t){this[_c]=t;}}});Object.defineProperty(Fx,_c,{writable:!0,value:{}});function qx(t){let e=t.info||t.socket,n=Object.create(Fx);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 V1(t){return {req:qx(t)}}});var Dx=g((GD,Lx)=>{Lx.exports={mapHttpResponse:J1,resSerializer:Ix};var Fc=Symbol("pino-raw-res-ref"),Bx=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Fc]},set:function(t){this[Fc]=t;}}});Object.defineProperty(Bx,Fc,{writable:!0,value:{}});function Ix(t){let e=Object.create(Bx);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function J1(t){return {res:Ix(t)}}});var Pc=g((VD,Nx)=>{var qc=kx(),K1=_x(),Po=jx(),jo=Dx();Nx.exports={err:qc,errWithCause:K1,mapHttpRequest:Po.mapHttpRequest,mapHttpResponse:jo.mapHttpResponse,req:Po.reqSerializer,res:jo.resSerializer,wrapErrorSerializer:function(e){return e===qc?e:function(i){return e(qc(i))}},wrapRequestSerializer:function(e){return e===Po.reqSerializer?e:function(i){return e(Po.reqSerializer(i))}},wrapResponseSeri
2023-06-06 14:25:31 +00:00
'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 Bo=g((YD,Mx)=>{Mx.exports=/[^.[\]]+|\[((?:.)*?)\]/g;});var Hx=g((XD,Wx)=>{var Q1=Bo();Wx.exports=Z1;function Z1({paths:t}){let e=[];var n=0;let i=t.reduce(function(r,o,a){var s=o.match(Q1).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 Vx=g((QD,Gx)=>{var ek=Bo();Gx.exports=tk;function tk({secret:t,serialize:e,wcLen:n,strict:i,isCensorFct:r,censorFctTakesPath:o},a){let s=Function("o",`
2023-06-06 14:25:31 +00:00
if (typeof o !== 'object' || o == null) {
${ok(i,e)}
2023-06-06 14:25:31 +00:00
}
const { censor, secret } = this
${nk(t,r,o)}
2023-06-06 14:25:31 +00:00
this.compileRestore()
${ik(n>0,r,o)}
${rk(e)}
`).bind(a);return e===!1&&(s.restore=c=>a.restore(c)),s}function nk(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=ek.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=`
2023-06-06 14:25:31 +00:00
switch (true) {
${l.reverse().map(d=>`
case o${c}${d} === censor:
secret[${r}].circle = ${JSON.stringify(d)}
2023-06-06 14:25:31 +00:00
break
`).join(`
`)}
}
`,f=n?`val, ${JSON.stringify(a)}`:"val";return `
if (${p}) {
const val = o${c}${i}
2023-06-06 14:25:31 +00:00
if (val === censor) {
secret[${r}].precensored = true
} else {
secret[${r}].val = val
o${c}${i} = ${e?`censor(${f})`:"censor"}
2023-06-06 14:25:31 +00:00
${h}
}
}
`}).join(`
`)}function ik(t,e,n){return t===!0?`
2023-06-06 14:25:31 +00:00
{
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})
2023-06-06 14:25:31 +00:00
}
}
`:""}function rk(t){return t===!1?"return o":`
2023-06-06 14:25:31 +00:00
var s = this.serialize(o)
this.restore(o)
return s
`}function ok(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var Bc=g((ZD,Xx)=>{Xx.exports={groupRedact:sk,groupRestore:ak,nestedRedact:uk,nestedRestore:ck};function ak({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 sk(t,e,n,i,r){let o=Jx(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 ck(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 Yx(r,o,a,s);}}function uk(t,e,n,i,r,o,a){let s=Jx(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}=lk(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 lk(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 P=Object.keys(p);for(var k=0;k<P.length;k++){let L=P[k];w=p[L],b=e==="*",A?(O=u,f=Kx(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 Jx(t,e){for(var n=-1,i=e.length,r=t;r!=null&&++n<i;)r=r[e[n]];return r}function Kx(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=Kx(t[w],e-1,n,i,r,o,a,s,c,l,u,p,h,f,d,y);return b}}function Yx(t,e,n,i){if(i===0){Qn(e,t)&&(e[t]=n);return}for(let r in e)typeof e[r]=="object"&&Yx(t,e[r],n,i-1);}});var Zx=g((eN,Qx)=>{var{groupRestore:pk,nestedRestore:fk}=Bc();Qx.exports=dk;function dk({secret:t,wcLen:e}){return function(){if(this.restore)return;let i=Object.keys(t),r=mk(t,i),o=e>0,a=o?{secret:t,groupRestore:pk,nestedRestore:fk}:{secret:t};this.restore=Function("o",hk(r,i,o)).bind(a);}}function mk(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 `
2023-06-06 14:25:31 +00:00
if (secret[${r}].val !== undefined) {
try { ${s} } catch (e) {}
${c}
}
`}).join("")}function hk(t,e,n){return `
2023-06-06 14:25:31 +00:00
const secret = this.secret
${n===!0?`
2023-06-06 14:25:31 +00:00
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 tg=g((tN,eg)=>{eg.exports=yk;function yk(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 rg=g((nN,ig)=>{var ng=$x(),xk=Hx(),gk=Vx(),vk=Zx(),{groupRedact:bk,nestedRedact:wk}=Bc(),Sk=tg(),Ek=Bo(),Ak=ng(),Ic=t=>t;Ic.restore=Ic;var Ok="[REDACTED]";Lc.rx=Ek;Lc.validator=ng;ig.exports=Lc;function Lc(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:Ok,o=typeof r=="function",a=o&&r.length>1;if(e.length===0)return n||Ic;Ak({paths:e,serialize:n,censor:r});let{wildcards:s,wcLen:c,secret:l}=xk({paths:e,censor:r}),u=vk({secret:l,wcLen:c}),p="strict"in t?t.strict:!0;return gk({secret:l,wcLen:c,serialize:n,strict:p,isCensorFct:o,censorFctTakesPath:a},Sk({secret:l,censor:r,compileRestore:u,serialize:n,groupRedact:bk,nestedRedact:wk,wildcards:s,wcLen:c}))}});var Zn=g((iN,og)=>{var Rk=Symbol("pino.setLevel"),Tk=Symbol("pino.getLevel"),kk=Symbol("pino.levelVal"),Ck=Symbol("pino.useLevelLabels"),_k=Symbol("pino.useOnlyCustomLevels"),Fk=Symbol("pino.mixin"),qk=Symbol("pino.lsCache"),Pk=Symbol("pino.chindings"),jk=Symbol("pino.asJson"),Bk=Symbol("pino.write"),Ik=Symbol("pino.redactFmt"),Lk=Symbol("pino.time"),Dk=Symbol("pino.timeSliceIndex"),Nk=Symbol("pino.stream"),Uk=Symbol("pino.stringify"),zk=Symbol("pino.stringifySafe"),$k=Symbol("pino.stringifiers"),Mk=Symbol("pino.end"),Wk=Symbol("pino.formatOpts"),Hk=Symbol("pino.messageKey"),Gk=Symbol("pino.errorKey"),Vk=Symbol("pino.nestedKey"),Jk=Symbol("pino.nestedKeyStr"),Kk=Symbol("pino.mixinMergeStrategy"),Yk=Symbol("pino.msgPrefix"),Xk=Symbol("pino.wildcardFirst"),Qk=Symbol.for("pino.serializers"),Zk=Symbol.for("pino.formatters"),eC=Symbol.for("pino.hooks"),tC=Symbol.for("pino.metadata");og.exports={setLevelSym:Rk,getLevelSym:Tk,levelValSym:kk,useLevelLabelsSym:Ck,mixinSym:Fk,lsCacheSym:qk,chindingsSym:Pk,asJsonSym:jk,writeSym:Bk,serializersSym:Qk,redactFmtSym:Ik,timeSym:Lk,timeSliceIndexSym:Dk,streamSym:Nk,stringifySym:Uk,stringifySafeSym:zk,stringifiersSym:$k,endSym:Mk,formatOptsSym:Wk,messageKeySym:Hk,errorKeySym:Gk,nestedKeySym:Vk,wildcardFirstSym:Xk,needsMetadataGsym:tC,useOnlyCustomLevelsSym:_k,formattersSym:Zk,hooksSym:eC,nestedKeyStrSym:Jk,mixinMergeStrategySym:Kk,msgPrefixSym:Yk};});var Uc=g((rN,ug)=>{var Nc=rg(),{redactFmtSym:nC,wildcardFirstSym:Io}=Zn(),{rx:Dc,validator:iC}=Nc,ag=iC({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})`}),sg="[Redacted]",cg=!1;function rC(t,e){let{paths:n,censor:i}=oC(t),r=n.reduce((s,c)=>{Dc.lastIndex=0;let l=Dc.exec(c),u=Dc.exec(c),p=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(p==="*"&&(p=Io),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!==Io&&s[p].length===0&&s[p].push(...s[Io]||[]),p===Io&&Object.keys(s).forEach(function(d){s[d]&&s[d].push(f);}),s[p].push(f),s},{}),o={[nC]:Nc({paths:n,censor:i,serialize:e,strict:cg})},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]=Nc({paths:r[c],censor:l,serialize:e,strict:cg});}return s},o)}function oC(t){if(Array.isArray(t))return t={paths:t,censor:sg},ag(t),t;let{paths:e,censor:n=sg,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),ag({paths:e,censor:n}),{paths:e,censor:n}}ug.exports=rC;});var pg=g((oN,lg)=>{var aC=()=>"",sC=()=>`,"time":${Date.now()}`,cC=()=>`,"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 P=Object.keys(w),L=P.length;if(L===0)return "{}";if(o<d.length+1)return '"[Object]"';let D="",R="";v!==""&&(b+=v,O=`,
${b}`,D=" ");let B=Math.min(L,a);r&&!cu(w)&&(P=su(P)),d.push(w);for(let I=0;I<B;I++){let M=P[I],W=s(M,w,d,y,v,b);W!==void 0&&(A+=`${R}${$t(M)}:${D}${W}`,R=O);}if(L>a){let I=L-a;A+=`${R}"...":${D}"${fn(I)} not stringified"`,R=O;}return v!==""&&R.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 R=c(String(D),f[D],d,y,v,b);if(A+=R!==void 0?R:"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 P="";for(let L of y){let D=c(L,f[L],d,y,v,b);D!==void 0&&(A+=`${P}${$t(L)}:${k}${D}`,P=O);}return v!==""&&P.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}`,R=`,
${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+=R;}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+=`${R}"... ${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="",P="",L=Math.min(A,a);cu(f)&&(k+=cv(f,O,a),w=w.slice(f.length),L-=f.length,P=O),r&&(w=su(w)),d.push(f);for(let D=0;D<L;D++){let R=w[D],B=l(R,f[R],d,y,v);B!==void 0&&(k+=`${P}${$t(R)}: ${B}`,P=O);}if(A>a){let D=A-a;k+=`${P}"...": "${fn(D)} not stringified"`,P=O;}return P!==""&&(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 P=u(String(k),f[k],d);if(y+=P!==void 0?P:"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);cu(f)&&(y+=cv(f,",",a),v=v.slice(f.length),A-=f.length,w=","),r&&(v=su(v)),d.push(f);for(let O=0;O<A;O++){let k=v[O],P=u(k,f[k],d);P!==void 0&&(y+=`${w}${$t(k)}:${P}`,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,[],fF(f),y,"")}if(y.length!==0)return l("",h,[],y,"")}return u("",h,[])}return p}});var yv=g((wN,hv)=>{var pu=Symbol.for("pino.metadata"),{levels:dv}=Wo(),mv=Object.create(dv);mv.silent=1/0;var mF=dv.info;function hF(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let i=mv;e.levels&&typeof e.levels=="object"&&(i=e.levels);let r={write:o,add:s,flushSync:a,end:c,minLevel:0,streams:[],clone:l,[pu]:!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=xF(f.length,e.dedupe);vF(v,f.length,e.dedupe);v=gF(v,e.dedupe))if(p=f[v],p.level<=h){if(d!==0&&d!==p.level)break;if(y=p.stream,y[pu]){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=mF;let y={stream:h,level:d,levelVal:void 0,id:n++};return f.unshift(y),f.sort(yF),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,[pu]:!0}}}function yF(t,e){return t.level-e.level}function xF(t,e){return e?t-1:0}function gF(t,e){return e?t-1:t+1}function vF(t,e,n){return n?t>=0:t<e}hv.exports=hF;});var Cv=g((SN,ze)=>{var bF=_("os"),Av=Pc(),wF=jc(),SF=Uc(),Ov=pg(),EF=sv(),Rv=Zn(),{configure:AF}=fv(),{assertDefaultLevelFound:OF,mappings:Tv,genLsCache:RF,levels:TF}=Wo(),{createArgsNormalizer:kF,asChindings:CF,buildSafeSonicBoom:xv,buildFormatters:_F,stringify:fu,normalizeDestFileDescriptor:gv,noop:FF}=Mo(),{version:qF}=iu(),{chindingsSym:vv,redactFmtSym:PF,serializersSym:bv,timeSym:jF,timeSliceIndexSym:BF,streamSym:IF,stringifySym:wv,stringifySafeSym:du,stringifiersSym:Sv,setLevelSym:LF,endSym:DF,formatOptsSym:NF,messageKeySym:UF,errorKeySym:zF,nestedKeySym:$F,mixinSym:MF,useOnlyCustomLevelsSym:WF,formattersSym:Ev,hooksSym:HF,nestedKeyStrSym:GF,mixinMe
2023-06-06 14:25:31 +00:00
`:`
`),z=CF.bind(null,{[vv]:"",[bv]:a,[Sv]:I,[wv]:fu,[du]:D,[Ev]:R}),V="";p!==null&&(h===void 0?V=z(p):V=z(Object.assign({},p,{name:h})));let K=s instanceof Function?s:s?kv:KF,T=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"`);OF(f,d,b);let q=Tv(d,b);return Object.assign(e,{levels:q,[WF]:b,[IF]:i,[jF]:K,[BF]:T,[wv]:fu,[du]:D,[Sv]:I,[DF]:W,[NF]:M,[UF]:c,[zF]:l,[$F]:u,[GF]:u?`,${JSON.stringify(u)}:{`:"",[bv]:a,[MF]:y,[VF]:v,[vv]:V,[Ev]:R,[HF]:A,silent:FF,onChild:P,[JF]:L}),Object.setPrototypeOf(e,EF()),RF(e),e[LF](f),e}ze.exports=mu;ze.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=gv(t.dest||process.stdout.fd),xv(t)):xv({dest:gv(t),minLength:0});ze.exports.transport=Qc();ze.exports.multistream=yv();ze.exports.levels=Tv();ze.exports.stdSerializers=tq;ze.exports.stdTimeFunctions=Object.assign({},Ov);ze.exports.symbols=Rv;ze.exports.version=qF;ze.exports.default=mu;ze.exports.pino=mu;});var Iv={};Mb(Iv,{RotatingFileStream:()=>Jo,RotatingFileStreamError:()=>Zi,createStream:()=>bq});async function Fv(t){return new Promise(e=>fs.access(t,fs.constants.F_OK,n=>e(!n)))}function qv(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 yu(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 Bv(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 xu(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 hq(t){let e=Bv(t,"interval",mq);switch(e.unit){case"h":xu(e,"hours",24);break;case"m":xu(e,"minutes",60);break;case"s":xu(e,"seconds",60);break}return e}function Pv(t){let e=Bv(t,"size",yq);return e.unit==="K"?e.num*1024:e.unit==="M"?e.num*1048576:e.unit==="G"?e.num*1073741824:e.num}function xq(t){let e={};for(let n in t){let i=t[n],r=typeof i;if(!(n in jv))throw new Error(`Unknown option: ${n}`);e[n]=t[n],jv[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 gq(t,e,n){return i=>i?`${t}.${i}${e&&!n?".gz":""}`:t}function vq(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 bq(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=xq(e),{compress:i,omitExtension:r}=n,o;if(typeof t=="string")o=e.rotate?gq(t,i!==void 0,r):vq(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 Jo(o,n)}var Zi,Jo,mq,yq,jv,Lv=$b(()=>{Zi=class extends Error{constructor(){super("Too many destination file attempts");U(this,"code","RFS-TOO-MANY");}},Jo=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(`
2023-06-06 14:25:31 +00:00
`)+`
`,"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);}}};mq={M:!0,d:!0,h:!0,m:!0,s:!0};yq={B:!0,G:!0,K:!0,M:!0};jv={encoding:(t,e,n)=>new sR.TextDecoder(n),immutable:()=>{},initialRotation:()=>{},interval:yu("interval",hq),intervalBoundary:()=>{},maxFiles:qv("maxFiles"),maxSize:yu("maxSize",Pv),mode:()=>{},omitExtension:()=>{},rotate:qv("rotate"),size:yu("size",Pv),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 Yv=g((gn,Kv)=>{var Au=_("crypto");gn=Kv.exports=sr;function sr(t,e){return e=Vv(t,e),Eq(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=Au.getHashes?Au.getHashes().slice():["sha1","md5"];li.push("passthrough");var Hv=["buffer","hex","binary","base64"];function Vv(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(Hv.indexOf(n.encoding)===-1&&n.algorithm!=="passthrough")throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+Hv.join(", "));return n}function Gv(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 Eq(t,e){var n;e.algorithm!=="passthrough"?n=Au.createHash(e.algorithm):n=new Jv,typeof n.write>"u"&&(n.write=n.update,n.end=n.update);var i=Ou(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=Vv(t,e),Ou(e,n).dispatch(t)};function Ou(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 Jv(){return {buf:"",write:function(t){this.buf+=t;},end:function(t){this.buf+=t;},read:function(){return this.buf}}}});var Qv=g((GN,Xv)=>{Xv.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 tb=g(na=>{na.byteLength=Oq;na.toByteArray=Tq;na.fromByteArray=_q;var mt=[],$e=[],Aq=typeof Uint8Array<"u"?Uint8Array:Array,Ru="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(vn=0,Zv=Ru.length;vn<Zv;++vn)mt[vn]=Ru[vn],$e[Ru.charCodeAt(vn)]=vn;var vn,Zv;$e["-".charCodeAt(0)]=62;$e["_".charCodeAt(0)]=63;function eb(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 Oq(t){var e=eb(t),n=e[0],i=e[1];return (n+i)*3/4-i}function Rq(t,e,n){return (e+n)*3/4-n}function Tq(t){var e,n=eb(t),i=n[0],r=n[1],o=new Aq(Rq(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 kq(t){return mt[t>>18&63]+mt[t>>12&63]+mt[t>>6&63]+mt[t&63]}function Cq(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(kq(i));return r.join("")}function _q(t){for(var e,n=t.length,i=n%3,r=[],o=16383,a=0,s=n-i;a<s;a+=o)r.push(Cq(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 nb=g(Tu=>{Tu.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)};Tu.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 vb=g(mi=>{var ku=tb(),fi=nb(),ib=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;mi.Buffer=S;mi.SlowBuffer=Iq;mi.INSPECT_MAX_BYTES=50;var ia=2147483647;mi.kMaxLength=ia;S.TYPED_ARRAY_SUPPORT=Fq();!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 Fq(){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]&&sO[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i);}),e};var qm=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 cO(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 uO=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ls(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 lO(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function pO(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())&&!uO(e)?a(Fm(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 cO(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||Ls(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||Ls(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||Ls(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?lO(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[qm]=this[qm]={accessors:{}}).accessors,r=this.prototype;function o(a){let s=_i(a);i[s]||(pO(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 qi(t){return !!(t&&t.__CANCEL__)}function Pm(t,e,n){C.call(this,t??"canceled",C.ERR_CANCELED,e,n),this.name="CanceledError";}x.inherits(Pm,C,{__CANCEL__:!0});var He=Pm;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 Ds(t){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ns(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Qt(t,e){return t&&!Ds(e)?Ns(t,e):e}var sh=tt(Bm(),1),ch=tt(Qm(),1);var nn="1.4.0";function Ii(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var GO=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Vs(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=GO.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 VO(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 Zm=VO;function JO(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=JO;var so=Symbol("internals"),Js=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=Zm(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
`,eR=Li.encode(Ft),tR=2,Ys=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+tR,this.name=e,this.value=n;}async*encode(){yield this.headers;let{value:e}=this;x.isTypedArray(e)?yield e:yield*co(e),yield eR;}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},nR=(t,e,n)=>{let{tag:i="form-data-boundary",size:r=25,boundary:o=i+"-"+x.generateString(r,ZO)}=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 Ys(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;}())},th=nR;var Xs=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);}},nh=Xs;var rR=(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,ih=rR;var rh={flush:qt__default.default.constants.Z_SYNC_FLUSH,finishFlush:qt__default.default.constants.Z_SYNC_FLUSH},uR={flush:qt__default.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:qt__default.default.constants.BROTLI_OPERATION_FLUSH},oh=x.isFunction(qt__default.default.createBrotliDecompress),{http:lR,https:pR}=ch.default,fR=/https:?/,ah=te.protocols.map(t=>t+":");function dR(t){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t);}function uh(t,e,n){let i=e;if(!i&&i!==!1){let r=(0, sh.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){uh(o,e,o.href);};}var mR=typeof process<"u"&&x.kindOf(process)==="process",hR=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);}),lh=mR&&function(e){return hR(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=ih(s,T=>{if(x.isString(T))T=[T,T.indexOf(".")<0?6:4];else if(!x.isArray(T))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return T}));let y=new cR__default.default,v=()=>{e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b),y.removeAllListeners();};o((T,q)=>{h=!0,q&&(f=!0,v());});function b(T){y.emit("abort",!T||T.type?new He(null,e,d):T);}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||ah[0];if(O==="data:"){let T;if(p!=="GET")return _t(i,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{T=Vs(e.url,l==="blob",{Blob:e.env&&e.env.Blob});}catch(q){throw C.from(q,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},`Failed to handle request: ${JSON.stringify(e)}`);}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 Pb)this.agent.on(n,i=>{this.sendResponse([0,i]);});}listen(){this.inStream.on("data",this.handleInput.bind(this));}};var jb=new sa;ur.create().then(t=>{jb.bind(t);});jb.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
2023-06-06 14:25:31 +00:00
//# sourceMappingURL=cli.js.map