@nexload-sdk/logger 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- // @nexload-sdk/logger v0.0.0 (build 2025-10-29T16:03:29.219Z)
2
- var qo=Object.create;var qr=Object.defineProperty;var $o=Object.getOwnPropertyDescriptor;var Ro=Object.getOwnPropertyNames;var Io=Object.getPrototypeOf,ko=Object.prototype.hasOwnProperty;var B=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Fo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ro(t))!ko.call(e,i)&&i!==r&&qr(e,i,{get:()=>t[i],enumerable:!(n=$o(t,i))||n.enumerable});return e};var $r=(e,t,r)=>(r=e!=null?qo(Io(e)):{},Fo(t||!e||!e.__esModule?qr(r,"default",{value:e,enumerable:!0}):r,e));var ot=v((pg,Ur)=>{"use strict";var de=e=>e&&typeof e.message=="string",st=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return de(r)?r:void 0}else return de(t)?t:void 0},zr=(e,t)=>{if(!de(e))return"";let r=e.stack||"";if(t.has(e))return r+`
1
+ // @nexload-sdk/logger v1.0.0 (build 2025-10-30T11:06:26.538Z)
2
+ var Mo=Object.create;var qr=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var Ro=Object.getPrototypeOf,Io=Object.prototype.hasOwnProperty;var B=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ko=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $o(t))!Io.call(e,i)&&i!==r&&qr(e,i,{get:()=>t[i],enumerable:!(n=qo(t,i))||n.enumerable});return e};var $r=(e,t,r)=>(r=e!=null?Mo(Ro(e)):{},ko(t||!e||!e.__esModule?qr(r,"default",{value:e,enumerable:!0}):r,e));var ot=v((pg,Ur)=>{"use strict";var de=e=>e&&typeof e.message=="string",st=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return de(r)?r:void 0}else return de(t)?t:void 0},zr=(e,t)=>{if(!de(e))return"";let r=e.stack||"";if(t.has(e))return r+`
3
3
  causes have become circular...`;let n=st(e);return n?(t.add(e),r+`
4
- caused by: `+zr(n,t)):r},Qo=e=>zr(e,new Set),Vr=(e,t,r)=>{if(!de(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=st(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+Vr(i,t,s)}else return n},eu=e=>Vr(e,new Set);Ur.exports={isErrorLike:de,getErrorCause:st,stackWithCauses:Qo,messageWithCauses:eu}});var ut=v((mg,Hr)=>{"use strict";var tu=Symbol("circular-ref-tag"),ve=Symbol("pino-raw-err-ref"),Gr=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[ve]},set:function(e){this[ve]=e}}});Object.defineProperty(Gr,ve,{writable:!0,value:{}});Hr.exports={pinoErrProto:Gr,pinoErrorSymbols:{seen:tu,rawSymbol:ve}}});var Xr=v((bg,Yr)=>{"use strict";Yr.exports=ct;var{messageWithCauses:ru,stackWithCauses:nu,isErrorLike:Jr}=ot(),{pinoErrProto:iu,pinoErrorSymbols:su}=ut(),{seen:ft}=su,{toString:ou}=Object.prototype;function ct(e){if(!Jr(e))return e;e[ft]=void 0;let t=Object.create(iu);t.type=ou.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=ru(e),t.stack=nu(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>ct(r)));for(let r in e)if(t[r]===void 0){let n=e[r];Jr(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ft)&&(t[r]=ct(n)):t[r]=n}return delete e[ft],t.raw=e,t}});var Qr=v((wg,Zr)=>{"use strict";Zr.exports=_e;var{isErrorLike:lt}=ot(),{pinoErrProto:uu,pinoErrorSymbols:fu}=ut(),{seen:Oe}=fu,{toString:cu}=Object.prototype;function _e(e){if(!lt(e))return e;e[Oe]=void 0;let t=Object.create(uu);t.type=cu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>_e(r))),lt(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Oe)&&(t.cause=_e(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];lt(n)?Object.prototype.hasOwnProperty.call(n,Oe)||(t[r]=_e(n)):t[r]=n}return delete e[Oe],t.raw=e,t}});var nn=v((Sg,rn)=>{"use strict";rn.exports={mapHttpRequest:lu,reqSerializer:tn};var at=Symbol("pino-raw-req-ref"),en=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[at]},set:function(e){this[at]=e}}});Object.defineProperty(en,at,{writable:!0,value:{}});function tn(e){let t=e.info||e.socket,r=Object.create(en);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function lu(e){return{req:tn(e)}}});var fn=v((Eg,un)=>{"use strict";un.exports={mapHttpResponse:au,resSerializer:on};var dt=Symbol("pino-raw-res-ref"),sn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dt]},set:function(e){this[dt]=e}}});Object.defineProperty(sn,dt,{writable:!0,value:{}});function on(e){let t=Object.create(sn);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function au(e){return{res:on(e)}}});var yt=v((vg,cn)=>{"use strict";var ht=Xr(),du=Qr(),Le=nn(),xe=fn();cn.exports={err:ht,errWithCause:du,mapHttpRequest:Le.mapHttpRequest,mapHttpResponse:xe.mapHttpResponse,req:Le.reqSerializer,res:xe.resSerializer,wrapErrorSerializer:function(t){return t===ht?t:function(n){return t(ht(n))}},wrapRequestSerializer:function(t){return t===Le.reqSerializer?t:function(n){return t(Le.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===xe.resSerializer?t:function(n){return t(xe.resSerializer(n))}}}});var gt=v((Og,ln)=>{"use strict";function hu(e,t){return t}ln.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=hu;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var pn=v((_g,gn)=>{"use strict";function pt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=pt(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=pt(e[r]));return t}return e}function an(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let u=e[o];!n&&u==="."?r&&(t.push(r),r=""):u==="["?(r&&(t.push(r),r=""),n=!0):u==="]"&&n?(t.push(r),r="",n=!1,i=!1):(u==='"'||u==="'")&&n?i?u===s?(i=!1,s=""):r+=u:(i=!0,s=u):r+=u}return r&&t.push(r),t}function dn(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function hn(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ce=Symbol("PATH_NOT_FOUND");function yu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ce;r=r[n]}return r}function gu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function pu(e,t,r,n=!1){for(let i of t){let s=an(i);if(s.includes("*"))yn(e,s,r,i,n);else if(n)hn(e,s);else{let o=yu(e,s);if(o===Ce)continue;let u=typeof r=="function"?r(o,s):r;dn(e,s,u)}}}function yn(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),u=e;for(let f of o){if(u==null||typeof u!="object"||u===null)return;u=u[f]}if(Array.isArray(u))if(i)for(let f=0;f<u.length;f++)u[f]=void 0;else for(let f=0;f<u.length;f++){let c=[...o,f.toString()],d=typeof r=="function"?r(u[f],c):r;u[f]=d}else if(typeof u=="object"&&u!==null)if(i){let f=[];for(let c in u)Object.prototype.hasOwnProperty.call(u,c)&&f.push(c);for(let c of f)delete u[c]}else for(let f in u){let c=[...o,f],d=typeof r=="function"?r(u[f],c):r;u[f]=d}}else mu(e,t,r,s,n,i)}function mu(e,t,r,n,i,s=!1){let o=t.slice(0,n),u=t.slice(n+1),f=[];function c(d,l){if(l===o.length){if(Array.isArray(d))for(let y=0;y<d.length;y++)f[l]=y.toString(),c(d[y],l+1);else if(typeof d=="object"&&d!==null)for(let y in d)f[l]=y,c(d[y],l+1)}else if(l<o.length){let y=o[l];d&&typeof d=="object"&&d!==null&&y in d&&(f[l]=y,c(d[y],l+1))}else if(u.includes("*"))yn(d,u,typeof r=="function"?(h,a)=>{let m=[...f.slice(0,l),...a];return r(h,m)}:r,i,s);else if(s)hn(d,u);else{let y=typeof r=="function"?r(gu(d,u),[...f.slice(0,l),...u]):r;dn(d,u,y)}}if(o.length===0)c(e,0);else{let d=e;for(let l=0;l<o.length;l++){let y=o[l];if(d==null||typeof d!="object"||d===null)return;d=d[y],f[l]=y}d!=null&&c(d,o.length)}}function bu(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=an(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function wu(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let u=[];for(let f=0;f<n.length;f++){let c=f.toString();i.has(c)||i.has("*")?u[f]=r(n[f],i.get(c)||i.get("*")):u[f]=n[f]}return u}let o=Object.create(Object.getPrototypeOf(n));for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&(i.has(u)||i.has("*")?o[u]=r(n[u],i.get(u)||i.get("*")):o[u]=n[u]);return o}return r(e,t)}function Su(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function Eu(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)Su(t)}function vu(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;Eu(t);let o=bu(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return n?n(f):f;let c=wu(f,o),d=f,l=r;return typeof r=="function"&&(l=r),pu(c,t,l,s),n===!1?(c.restore=function(){return pt(d)},c):typeof n=="function"?n(c):JSON.stringify(c)}}gn.exports=vu});var ie=v((Lg,mn)=>{"use strict";var Ou=Symbol("pino.setLevel"),_u=Symbol("pino.getLevel"),Lu=Symbol("pino.levelVal"),xu=Symbol("pino.levelComp"),Cu=Symbol("pino.useLevelLabels"),Tu=Symbol("pino.useOnlyCustomLevels"),Au=Symbol("pino.mixin"),ju=Symbol("pino.lsCache"),Pu=Symbol("pino.chindings"),Nu=Symbol("pino.asJson"),Bu=Symbol("pino.write"),Du=Symbol("pino.redactFmt"),Mu=Symbol("pino.time"),qu=Symbol("pino.timeSliceIndex"),$u=Symbol("pino.stream"),Ru=Symbol("pino.stringify"),Iu=Symbol("pino.stringifySafe"),ku=Symbol("pino.stringifiers"),Fu=Symbol("pino.end"),Wu=Symbol("pino.formatOpts"),Ku=Symbol("pino.messageKey"),zu=Symbol("pino.errorKey"),Vu=Symbol("pino.nestedKey"),Uu=Symbol("pino.nestedKeyStr"),Gu=Symbol("pino.mixinMergeStrategy"),Hu=Symbol("pino.msgPrefix"),Ju=Symbol("pino.wildcardFirst"),Yu=Symbol.for("pino.serializers"),Xu=Symbol.for("pino.formatters"),Zu=Symbol.for("pino.hooks"),Qu=Symbol.for("pino.metadata");mn.exports={setLevelSym:Ou,getLevelSym:_u,levelValSym:Lu,levelCompSym:xu,useLevelLabelsSym:Cu,mixinSym:Au,lsCacheSym:ju,chindingsSym:Pu,asJsonSym:Nu,writeSym:Bu,serializersSym:Yu,redactFmtSym:Du,timeSym:Mu,timeSliceIndexSym:qu,streamSym:$u,stringifySym:Ru,stringifySafeSym:Iu,stringifiersSym:ku,endSym:Fu,formatOptsSym:Wu,messageKeySym:Ku,errorKeySym:zu,nestedKeySym:Vu,wildcardFirstSym:Ju,needsMetadataGsym:Qu,useOnlyCustomLevelsSym:Tu,formattersSym:Xu,hooksSym:Zu,nestedKeyStrSym:Uu,mixinMergeStrategySym:Gu,msgPrefixSym:Hu}});var bt=v((xg,En)=>{"use strict";var bn=pn(),{redactFmtSym:ef,wildcardFirstSym:Te}=ie(),mt=/[^.[\]]+|\[([^[\]]*?)\]/g,wn="[Redacted]",Sn=!1;function tf(e,t){let{paths:r,censor:n,remove:i}=rf(e),s=r.reduce((f,c)=>{mt.lastIndex=0;let d=mt.exec(c),l=mt.exec(c),y=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(y==="*"&&(y=Te),l===null)return f[y]=null,f;if(f[y]===null)return f;let{index:h}=l,a=`${c.substr(h,c.length-1)}`;return f[y]=f[y]||[],y!==Te&&f[y].length===0&&f[y].push(...f[Te]||[]),y===Te&&Object.keys(f).forEach(function(m){f[m]&&f[m].push(a)}),f[y].push(a),f},{}),o={[ef]:bn({paths:r,censor:n,serialize:t,strict:Sn,remove:i})},u=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,c)=>{if(s[c]===null)f[c]=d=>u(d,[c]);else{let d=typeof n=="function"?(l,y)=>n(l,[c,...y]):n;f[c]=bn({paths:s[c],censor:d,serialize:t,strict:Sn,remove:i})}return f},o)}function rf(e){if(Array.isArray(e))return e={paths:e,censor:wn},e;let{paths:t,censor:r=wn,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),{paths:t,censor:r,remove:n}}En.exports=tf});var _n=v((Cg,On)=>{"use strict";var nf=()=>"",sf=()=>`,"time":${Date.now()}`,of=()=>`,"time":${Math.round(Date.now()/1e3)}`,uf=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,ff=1000000n,vn=1000000000n,cf=BigInt(Date.now())*ff,lf=process.hrtime.bigint(),af=()=>{let e=process.hrtime.bigint()-lf,t=cf+e,r=t/vn,n=t%vn,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),u=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),c=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),l=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${u}-${f}T${c}:${d}:${l}.${n.toString().padStart(9,"0")}Z"`};On.exports={nullTime:nf,epochTime:sf,unixTime:of,isoTime:uf,isoTimeNano:af}});var xn=v((Tg,Ln)=>{"use strict";function df(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}Ln.exports=hf;function hf(e,t,r){var n=r&&r.stringify||df,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var u=1;u<s;u++)o[u]=n(t[u]);return o.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var c="",d=1-i,l=-1,y=e&&e.length||0,h=0;h<y;){if(e.charCodeAt(h)===37&&h+1<y){switch(l=l>-1?l:0,e.charCodeAt(h+1)){case 100:case 102:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Number(t[d]),l=h+2,h++;break;case 105:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Math.floor(Number(t[d])),l=h+2,h++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;l<h&&(c+=e.slice(l,h));var a=typeof t[d];if(a==="string"){c+="'"+t[d]+"'",l=h+2,h++;break}if(a==="function"){c+=t[d].name||"<anonymous>",l=h+2,h++;break}c+=n(t[d]),l=h+2,h++;break;case 115:if(d>=f)break;l<h&&(c+=e.slice(l,h)),c+=String(t[d]),l=h+2,h++;break;case 37:l<h&&(c+=e.slice(l,h)),c+="%",l=h+2,h++,d--;break}++d}++h}return l===-1?e:(l<y&&(c+=e.slice(l)),c)}});var St=v((Ag,wt)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));wt.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};wt.exports=e}});var Ot=v((jg,Bn)=>{"use strict";var M=B("fs"),yf=B("events"),gf=B("util").inherits,Cn=B("path"),vt=St(),pf=B("assert"),Ae=100,je=Buffer.allocUnsafe(0),mf=16*1024,Tn="buffer",An="utf8",[bf,wf]=(process.versions.node||"0.0").split(".").map(Number),Sf=bf>=22&&wf>=7;function jn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let u=t._reopening;t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():u&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&M.mkdirSync(Cn.dirname(e),{recursive:!0});let s=M.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?M.mkdir(Cn.dirname(e),{recursive:!0},s=>{if(s)return r(s);M.open(e,n,i,r)}):M.open(e,n,i,r)}function k(e){if(!(this instanceof k))return new k(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:u,append:f=!0,mkdir:c,retryEAGAIN:d,fsync:l,contentMode:y,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||mf,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=l||!1,this.append=f||!1,this.mode=h,this.retryEAGAIN=d||(()=>!0),this.mkdir=c||!1;let a,m;if(y===Tn)this._writingBuf=je,this.write=Of,this.flush=Lf,this.flushSync=Cf,this._actualWrite=Af,a=()=>M.writeSync(this.fd,this._writingBuf),m=()=>M.write(this.fd,this._writingBuf,this.release);else if(y===void 0||y===An)this._writingBuf="",this.write=vf,this.flush=_f,this.flushSync=xf,this._actualWrite=Tf,a=()=>M.writeSync(this.fd,this._writingBuf,"utf8"),m=()=>M.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${An}" and "${Tn}", but passed ${y}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")jn(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(p,b)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{vt(Ae),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(m,Ae);else this._writing=!1,this.emit("error",p);return}this.emit("write",b);let w=Et(this._writingBuf,this._len,b);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){m();return}try{do{let O=a(),x=Et(this._writingBuf,this._len,O);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&M.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,Pe(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Ef,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function Et(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function Ef(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}gf(k,yf);function Pn(e,t){return e.length===0?je:e.length===1?e[0]:Buffer.concat(e,t)}function vf(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Of(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Nn(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{M.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function _f(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Nn.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function Lf(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Nn.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}k.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&M.close(t,r=>{if(r)return this.emit("error",r)})}),jn(this.file,this)};k.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Pe(this)))};function xf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=M.writeSync(this.fd,e,"utf8"),r=Et(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}try{M.fsyncSync(this.fd)}catch{}}function Cf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=je);let e=je;for(;this._bufs.length||e.length;){e.length<=0&&(e=Pn(this._bufs[0],this._lens[0]));try{let t=M.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}}k.prototype.destroy=function(){this.destroyed||Pe(this)};function Tf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=M.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else M.write(this.fd,this._writingBuf,"utf8",e)}function Af(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Pn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=M.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else Sf&&(this._writingBuf=Buffer.from(this._writingBuf)),M.write(this.fd,this._writingBuf,e)}function Pe(e){if(e.fd===-1){e.once("ready",Pe.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],pf(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{M.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?M.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}k.SonicBoom=k;k.default=k;Bn.exports=k});var Ne=v((Pg,Rn)=>{"use strict";var F={exit:[],beforeExit:[]},Dn={exit:Nf,beforeExit:Bf},se;function jf(){se===void 0&&(se=new FinalizationRegistry(Df))}function Pf(e){F[e].length>0||process.on(e,Dn[e])}function Mn(e){F[e].length>0||(process.removeListener(e,Dn[e]),F.exit.length===0&&F.beforeExit.length===0&&(se=void 0))}function Nf(){qn("exit")}function Bf(){qn("beforeExit")}function qn(e){for(let t of F[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}F[e]=[]}function Df(e){for(let t of["exit","beforeExit"]){let r=F[t].indexOf(e);F[t].splice(r,r+1),Mn(t)}}function $n(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Pf(e);let n=new WeakRef(t);n.fn=r,jf(),se.register(t,n),F[e].push(n)}function Mf(e,t){$n("exit",e,t)}function qf(e,t){$n("beforeExit",e,t)}function $f(e){if(se!==void 0){se.unregister(e);for(let t of["exit","beforeExit"])F[t]=F[t].filter(r=>{let n=r.deref();return n&&n!==e}),Mn(t)}}Rn.exports={register:Mf,registerBeforeExit:qf,unregister:$f}});var In=v((Ng,Rf)=>{Rf.exports={name:"thread-stream",version:"3.1.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Fn=v((Bg,kn)=>{"use strict";function If(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let u=o,f=c=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(e,t),o===u?f(c>=1e3?1e3:c*2):o===r?i(null,"ok"):i(null,"not-equal")},c)};f(1)}function kf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let u=f=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):u(f>=1e3?1e3:f*2)},f)};u(1)}kn.exports={wait:If,waitDiff:kf}});var Kn=v((Dg,Wn)=>{"use strict";Wn.exports={WRITE_INDEX:4,READ_INDEX:8}});var Hn=v((Mg,Gn)=>{"use strict";var{version:Ff}=In(),{EventEmitter:Wf}=B("events"),{Worker:Kf}=B("worker_threads"),{join:zf}=B("path"),{pathToFileURL:Vf}=B("url"),{wait:Uf}=Fn(),{WRITE_INDEX:$,READ_INDEX:W}=Kn(),Gf=B("buffer"),Hf=B("assert"),g=Symbol("kImpl"),Jf=Gf.constants.MAX_STRING_LENGTH,he=class{constructor(t){this._value=t}deref(){return this._value}},De=class{register(){}unregister(){}},Yf=process.env.NODE_V8_COVERAGE?De:global.FinalizationRegistry||De,Xf=process.env.NODE_V8_COVERAGE?he:global.WeakRef||he,zn=new Yf(e=>{e.exited||e.terminate()});function Zf(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||zf(__dirname,"lib","worker.js"),o=new Kf(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Vf(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:{$context:{threadStreamVersion:Ff},...n}}});return o.stream=new he(e),o.on("message",Qf),o.on("exit",Un),zn.register(e,o),o}function Vn(e){Hf(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Be(e){let t=Atomics.load(e[g].state,$),r=e[g].data.length-t;if(r>0){if(e[g].buf.length===0){e[g].flushing=!1,e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(Vn,e);return}let n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[g].buf=e[g].buf.slice(r),Me(e,n,Be.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);i>e[g].data.length;)r=r/2,n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);e[g].buf=e[g].buf.slice(r),Me(e,n,Be.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0),Be(e)})}else K(e,new Error("overwritten"))}function Qf(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Xf(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":K(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:K(t,new Error("this should not happen: "+e.code))}}function Un(e){let t=this.stream.deref();t!==void 0&&(zn.unregister(t),t.worker.exited=!0,t.worker.off("exit",Un),K(t,e!==0?new Error("the worker thread exited"):null))}var Lt=class extends Wf{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[g]={},this[g].stateBuf=new SharedArrayBuffer(128),this[g].state=new Int32Array(this[g].stateBuf),this[g].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[g].data=Buffer.from(this[g].dataBuf),this[g].sync=t.sync||!1,this[g].ending=!1,this[g].ended=!1,this[g].needDrain=!1,this[g].destroyed=!1,this[g].flushing=!1,this[g].ready=!1,this[g].finished=!1,this[g].errored=null,this[g].closed=!1,this[g].buf="",this.worker=Zf(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){if(this[g].destroyed)return xt(this,new Error("the worker has exited")),!1;if(this[g].ending)return xt(this,new Error("the worker is ending")),!1;if(this[g].flushing&&this[g].buf.length+t.length>=Jf)try{_t(this),this[g].flushing=!0}catch(r){return K(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return _t(this),!0}catch(r){return K(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Be,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,$)<=0,!this[g].needDrain}end(){this[g].destroyed||(this[g].ending=!0,Tt(this))}flush(t){if(this[g].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[g].state,$);Uf(this[g].state,W,r,1/0,(n,i)=>{if(n){K(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(_t(this),Ct(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[g].ready}get destroyed(){return this[g].destroyed}get closed(){return this[g].closed}get writable(){return!this[g].destroyed&&!this[g].ending}get writableEnded(){return this[g].ending}get writableFinished(){return this[g].finished}get writableNeedDrain(){return this[g].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[g].errored}};function xt(e,t){setImmediate(()=>{e.emit("error",t)})}function K(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,xt(e,t)),e.worker.exited?setImmediate(()=>{e[g].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[g].closed=!0,e.emit("close")}))}function Me(e,t,r){let n=Atomics.load(e[g].state,$),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,$,n+i),Atomics.notify(e[g].state,$),r(),!0}function Tt(e){if(!(e[g].ended||!e[g].ending||e[g].flushing)){e[g].ended=!0;try{e.flushSync();let t=Atomics.load(e[g].state,W);Atomics.store(e[g].state,$,-1),Atomics.notify(e[g].state,$);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,W,t,1e3),t=Atomics.load(e[g].state,W),t===-2){K(e,new Error("end() failed"));return}if(++r===10){K(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){K(e,t)}}}function _t(e){let t=()=>{e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(Vn,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,$),n=e[g].data.length-r;if(n===0){Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);continue}else if(n<0)throw new Error("overwritten");let i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[g].buf=e[g].buf.slice(n),Me(e,i,t);else{for(Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);s>e[g].buf.length;)n=n/2,i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);e[g].buf=e[g].buf.slice(n),Me(e,i,t)}}}function Ct(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,$),r=0;for(;;){let n=Atomics.load(e[g].state,W);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,W,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}Gn.exports=Lt});var Pt=v((qg,Jn)=>{"use strict";var{createRequire:ec}=B("module"),tc=gt(),{join:At,isAbsolute:rc,sep:nc}=B("node:path"),ic=St(),jt=Ne(),sc=Hn();function oc(e){jt.register(e,fc),jt.registerBeforeExit(e,cc),e.on("close",function(){jt.unregister(e)})}function uc(e,t,r,n){let i=new sc({filename:e,workerData:t,workerOpts:r,sync:n});i.on("ready",s),i.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function s(){process.removeListener("exit",o),i.unref(),r.autoEnd!==!1&&oc(i)}function o(){i.closed||(i.flushSync(),ic(100),i.end())}return i}function fc(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function cc(e){e.flushSync()}function lc(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=tc(),sync:u=!1}=e,f={...e.options},c=typeof o=="string"?[o]:o,d="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},l=e.target;if(l&&r)throw new Error("only one of target or targets can be specified");return r?(l=d["pino-worker"]||At(__dirname,"worker.js"),f.targets=r.filter(h=>h.target).map(h=>({...h,target:y(h.target)})),f.pipelines=r.filter(h=>h.pipeline).map(h=>h.pipeline.map(a=>({...a,level:h.level,target:y(a.target)})))):t&&(l=d["pino-worker"]||At(__dirname,"worker.js"),f.pipelines=[t.map(h=>({...h,target:y(h.target)}))]),n&&(f.levels=n),i&&(f.dedupe=i),f.pinoWillSendConfig=!0,uc(y(l),f,s,u);function y(h){if(h=d[h]||h,rc(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return At(__dirname,"..","file.js");let a;for(let m of c)try{let p=m==="node:repl"?process.cwd()+nc:m;a=ec(p).resolve(h);break}catch{continue}if(!a)throw new Error(`unable to determine transport target for "${h}"`);return a}}Jn.exports=lc});var Re=v(($g,fi)=>{"use strict";var ac=B("node:diagnostics_channel"),Yn=xn(),{mapHttpRequest:dc,mapHttpResponse:hc}=yt(),Bt=Ot(),Xn=Ne(),{lsCacheSym:yc,chindingsSym:ri,writeSym:Zn,serializersSym:ni,formatOptsSym:Qn,endSym:gc,stringifiersSym:ii,stringifySym:si,stringifySafeSym:Dt,wildcardFirstSym:oi,nestedKeySym:pc,formattersSym:ui,messageKeySym:mc,errorKeySym:bc,nestedKeyStrSym:wc,msgPrefixSym:qe}=ie(),{isMainThread:Sc}=B("worker_threads"),Ec=Pt(),ei=ac.tracingChannel("pino_asJson");function oe(){}function vc(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(n,...i){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=dc(n):typeof n.setHeader=="function"&&(n=hc(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Zn](n,Yn(s,o,this[Qn]),e)}else{let s=n===void 0?i.shift():n;typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Zn](null,Yn(s,i,this[Qn]),e)}}}function Nt(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function Oc(e,t,r,n){if(ei.hasSubscribers===!1)return ti.call(this,e,t,r,n);let i={instance:this,arguments};return ei.traceSync(ti,i,this,e,t,r,n)}function ti(e,t,r,n){let i=this[si],s=this[Dt],o=this[ii],u=this[gc],f=this[ri],c=this[ni],d=this[ui],l=this[mc],y=this[bc],h=this[yc][r]+n;h=h+f;let a;d.log&&(e=d.log(e));let m=o[oi],p="";for(let w in e)if(a=e[w],Object.prototype.hasOwnProperty.call(e,w)&&a!==void 0){c[w]?a=c[w](a):w===y&&c.err&&(a=c.err(a));let S=o[w]||m;switch(typeof a){case"undefined":case"function":continue;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":S&&(a=S(a));break;case"string":a=(S||Nt)(a);break;default:a=(S||i)(a,s)}if(a===void 0)continue;let O=Nt(w);p+=","+O+":"+a}let b="";if(t!==void 0){a=c[l]?c[l](t):t;let w=o[l]||m;switch(typeof a){case"function":break;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":w&&(a=w(a)),b=',"'+l+'":'+a;break;case"string":a=(w||Nt)(a),b=',"'+l+'":'+a;break;default:a=(w||i)(a,s),b=',"'+l+'":'+a}}return this[pc]&&p?h+this[wc]+p.slice(1)+"}"+b+u:h+p+b+u}function _c(e,t){let r,n=e[ri],i=e[si],s=e[Dt],o=e[ii],u=o[oi],f=e[ni],c=e[ui].bindings;t=c(t);for(let d in t)if(r=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&r!==void 0)===!0){if(r=f[d]?f[d](r):r,r=(o[d]||u||i)(r,s),r===void 0)continue;n+=',"'+d+'":'+r}return n}function Lc(e){return e.write!==e.constructor.prototype.write}function $e(e){let t=new Bt(e);return t.on("error",r),!e.sync&&Sc&&(Xn.register(t,xc),t.on("close",function(){Xn.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=oe,t.end=oe,t.flushSync=oe,t.destroy=oe;return}t.removeListener("error",r),t.emit("error",n)}}function xc(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function Cc(e){return function(r,n,i={},s){if(typeof i=="string")s=$e({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=$e({dest:s})}else if(i instanceof Bt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Bt||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Ec({caller:n,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=i;return o===!1&&(i.level="silent"),u||(i.onChild=oe),s||(Lc(process.stdout)?s=process.stdout:s=$e({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function Tc(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Dt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Ac(e,t,r){return{level:e,bindings:t,log:r}}function jc(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}fi.exports={noop:oe,buildSafeSonicBoom:$e,asChindings:_c,asJson:Oc,genLog:vc,createArgsNormalizer:Cc,stringify:Tc,buildFormatters:Ac,normalizeDestFileDescriptor:jc}});var Ie=v((Rg,ci)=>{var Pc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Nc={ASC:"ASC",DESC:"DESC"};ci.exports={DEFAULT_LEVELS:Pc,SORTING_ORDER:Nc}});var $t=v((Ig,hi)=>{"use strict";var{lsCacheSym:Bc,levelValSym:Mt,useOnlyCustomLevelsSym:Dc,streamSym:Mc,formattersSym:qc,hooksSym:$c,levelCompSym:li}=ie(),{noop:Rc,genLog:Z}=Re(),{DEFAULT_LEVELS:z,SORTING_ORDER:ai}=Ie(),di={fatal:e=>{let t=Z(z.fatal,e);return function(...r){let n=this[Mc];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>Z(z.error,e),warn:e=>Z(z.warn,e),info:e=>Z(z.info,e),debug:e=>Z(z.debug,e),trace:e=>Z(z.trace,e)},qt=Object.keys(z).reduce((e,t)=>(e[z[t]]=t,e),{}),Ic=Object.keys(qt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function kc(e){let t=e[qc].level,{labels:r}=e.levels,n={};for(let i in r){let s=t(r[i],Number(i));n[i]=JSON.stringify(s).slice(0,-1)}return e[Bc]=n,e}function Fc(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Wc(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[Mt],i=this[Mt]=r[e],s=this[Dc],o=this[li],u=this[$c].logMethod;for(let f in r){if(o(r[f],i)===!1){this[f]=Rc;continue}this[f]=Fc(f,s)?di[f](u):Z(r[f],u)}this.emit("level-change",e,i,t[n],n,this)}function Kc(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function zc(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[li](r,this[Mt])}function Vc(e,t,r){return e===ai.DESC?t<=r:t>=r}function Uc(e){return typeof e=="string"?Vc.bind(null,e):e}function Gc(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:qt,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:z,e);return{labels:n,values:i}}function Hc(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(qt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:z,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Jc(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}function Yc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(ai).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}hi.exports={initialLsCache:Ic,genLsCache:kc,levelMethods:di,getLevel:Kc,setLevel:Wc,isLevelEnabled:zc,mappings:Gc,assertNoLevelCollisions:Jc,assertDefaultLevelFound:Hc,genLevelComparison:Uc,assertLevelComparison:Yc}});var Rt=v((kg,yi)=>{"use strict";yi.exports={version:"10.1.0"}});var vi=v((Wg,Ei)=>{"use strict";var{EventEmitter:Xc}=B("node:events"),{lsCacheSym:Zc,levelValSym:Qc,setLevelSym:kt,getLevelSym:gi,chindingsSym:Fe,mixinSym:el,asJsonSym:mi,writeSym:tl,mixinMergeStrategySym:rl,timeSym:nl,timeSliceIndexSym:il,streamSym:bi,serializersSym:Q,formattersSym:ye,errorKeySym:sl,messageKeySym:ol,useOnlyCustomLevelsSym:ul,needsMetadataGsym:fl,redactFmtSym:cl,stringifySym:ll,formatOptsSym:al,stringifiersSym:dl,msgPrefixSym:Ft,hooksSym:hl}=ie(),{getLevel:yl,setLevel:gl,isLevelEnabled:pl,mappings:ml,initialLsCache:bl,genLsCache:wl,assertNoLevelCollisions:Sl}=$t(),{asChindings:Wt,asJson:El,buildFormatters:It,stringify:pi,noop:wi}=Re(),{version:vl}=Rt(),Ol=bt(),_l=class{},Si={constructor:_l,child:Ll,bindings:xl,setBindings:Cl,flush:jl,isLevelEnabled:pl,version:vl,get level(){return this[gi]()},set level(e){this[kt](e)},get levelVal(){return this[Qc]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Ft]},get[Symbol.toStringTag](){return"Pino"},[Zc]:bl,[tl]:Al,[mi]:El,[gi]:yl,[kt]:gl};Object.setPrototypeOf(Si,Xc.prototype);Ei.exports=function(){return Object.create(Si)};var ke=e=>e;function Ll(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Q],n=this[ye],i=Object.create(this);if(t==null)return i[ye].bindings!==ke&&(i[ye]=It(n.level,ke,n.log)),i[Fe]=Wt(i,e),this.onChild!==wi&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Q]=Object.create(null);for(let c in r)i[Q][c]=r[c];let u=Object.getOwnPropertySymbols(r);for(var s=0;s<u.length;s++){let c=u[s];i[Q][c]=r[c]}for(let c in t.serializers)i[Q][c]=t.serializers[c];let f=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<f.length;o++){let c=f[o];i[Q][c]=t.serializers[c]}}else i[Q]=r;if(t.hasOwnProperty("formatters")){let{level:u,bindings:f,log:c}=t.formatters;i[ye]=It(u||n.level,f||ke,c||n.log)}else i[ye]=It(n.level,ke,n.log);if(t.hasOwnProperty("customLevels")===!0&&(Sl(this.levels,t.customLevels),i.levels=ml(t.customLevels,i[ul]),wl(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let u=Ol(i.redact,pi),f={stringify:u[cl]};i[ll]=pi,i[dl]=u,i[al]=f}if(typeof t.msgPrefix=="string"&&(i[Ft]=(this[Ft]||"")+t.msgPrefix),i[Fe]=Wt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let u=t.level||this.level;i[kt](u)}return this.onChild(i),i}function xl(){let t=`{${this[Fe].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Cl(e){let t=Wt(this,e);this[Fe]=t}function Tl(e,t){return Object.assign(t,e)}function Al(e,t,r){let n=this[nl](),i=this[el],s=this[sl],o=this[ol],u=this[rl]||Tl,f,c=this[hl].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(f=u(f,i(f,r,this)));let d=this[mi](f,t,r,n),l=this[bi];l[fl]===!0&&(l.lastLevel=r,l.lastObj=f,l.lastMsg=t,l.lastTime=n.slice(this[il]),l.lastLogger=this),l.write(c?c(d):d)}function jl(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[bi];typeof t.flush=="function"?t.flush(e||wi):e&&e()}});var xi=v((Ut,Li)=>{"use strict";var{hasOwnProperty:ge}=Object.prototype,te=Vt();te.configure=Vt;te.stringify=te;te.default=te;Ut.stringify=te;Ut.configure=Vt;Li.exports=te;var Pl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function G(e){return e.length<5e3&&!Pl.test(e)?`"${e}"`:JSON.stringify(e)}function Kt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;for(;i!==0&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}var Nl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function zt(e){return Nl.call(e)!==void 0&&e.length!==0}function Oi(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)i+=`${t}"${s}":${n}${e[s]}`;return i}function Bl(e){if(ge.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Dl(e){let t;if(ge.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Ml(e,t){let r;if(ge.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function _i(e,t){let r;if(ge.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function ee(e){return e===1?"1 item":`${e} items`}function ql(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function $l(e){if(ge.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Vt(e){e={...e};let t=$l(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Bl(e),n=Ml(e,"bigint"),i=Dl(e),s=typeof i=="function"?i:void 0,o=_i(e,"maximumDepth"),u=_i(e,"maximumBreadth");function f(h,a,m,p,b,w){let S=a[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=p.call(a,h,S),typeof S){case"string":return G(S);case"object":{if(S===null)return"null";if(m.indexOf(S)!==-1)return r;let O="",x=",",P=w;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(S),b!==""&&(w+=b,O+=`
4
+ caused by: `+zr(n,t)):r},Zo=e=>zr(e,new Set),Vr=(e,t,r)=>{if(!de(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=st(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+Vr(i,t,s)}else return n},Qo=e=>Vr(e,new Set);Ur.exports={isErrorLike:de,getErrorCause:st,stackWithCauses:Zo,messageWithCauses:Qo}});var ut=v((mg,Hr)=>{"use strict";var eu=Symbol("circular-ref-tag"),ve=Symbol("pino-raw-err-ref"),Gr=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[ve]},set:function(e){this[ve]=e}}});Object.defineProperty(Gr,ve,{writable:!0,value:{}});Hr.exports={pinoErrProto:Gr,pinoErrorSymbols:{seen:eu,rawSymbol:ve}}});var Xr=v((bg,Yr)=>{"use strict";Yr.exports=ct;var{messageWithCauses:tu,stackWithCauses:ru,isErrorLike:Jr}=ot(),{pinoErrProto:nu,pinoErrorSymbols:iu}=ut(),{seen:ft}=iu,{toString:su}=Object.prototype;function ct(e){if(!Jr(e))return e;e[ft]=void 0;let t=Object.create(nu);t.type=su.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=tu(e),t.stack=ru(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>ct(r)));for(let r in e)if(t[r]===void 0){let n=e[r];Jr(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ft)&&(t[r]=ct(n)):t[r]=n}return delete e[ft],t.raw=e,t}});var Qr=v((wg,Zr)=>{"use strict";Zr.exports=_e;var{isErrorLike:lt}=ot(),{pinoErrProto:ou,pinoErrorSymbols:uu}=ut(),{seen:Oe}=uu,{toString:fu}=Object.prototype;function _e(e){if(!lt(e))return e;e[Oe]=void 0;let t=Object.create(ou);t.type=fu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>_e(r))),lt(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Oe)&&(t.cause=_e(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];lt(n)?Object.prototype.hasOwnProperty.call(n,Oe)||(t[r]=_e(n)):t[r]=n}return delete e[Oe],t.raw=e,t}});var nn=v((Sg,rn)=>{"use strict";rn.exports={mapHttpRequest:cu,reqSerializer:tn};var at=Symbol("pino-raw-req-ref"),en=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[at]},set:function(e){this[at]=e}}});Object.defineProperty(en,at,{writable:!0,value:{}});function tn(e){let t=e.info||e.socket,r=Object.create(en);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function cu(e){return{req:tn(e)}}});var fn=v((Eg,un)=>{"use strict";un.exports={mapHttpResponse:lu,resSerializer:on};var dt=Symbol("pino-raw-res-ref"),sn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dt]},set:function(e){this[dt]=e}}});Object.defineProperty(sn,dt,{writable:!0,value:{}});function on(e){let t=Object.create(sn);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function lu(e){return{res:on(e)}}});var yt=v((vg,cn)=>{"use strict";var ht=Xr(),au=Qr(),Le=nn(),xe=fn();cn.exports={err:ht,errWithCause:au,mapHttpRequest:Le.mapHttpRequest,mapHttpResponse:xe.mapHttpResponse,req:Le.reqSerializer,res:xe.resSerializer,wrapErrorSerializer:function(t){return t===ht?t:function(n){return t(ht(n))}},wrapRequestSerializer:function(t){return t===Le.reqSerializer?t:function(n){return t(Le.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===xe.resSerializer?t:function(n){return t(xe.resSerializer(n))}}}});var gt=v((Og,ln)=>{"use strict";function du(e,t){return t}ln.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=du;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var pn=v((_g,gn)=>{"use strict";function pt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=pt(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=pt(e[r]));return t}return e}function an(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let u=e[o];!n&&u==="."?r&&(t.push(r),r=""):u==="["?(r&&(t.push(r),r=""),n=!0):u==="]"&&n?(t.push(r),r="",n=!1,i=!1):(u==='"'||u==="'")&&n?i?u===s?(i=!1,s=""):r+=u:(i=!0,s=u):r+=u}return r&&t.push(r),t}function dn(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function hn(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ce=Symbol("PATH_NOT_FOUND");function hu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ce;r=r[n]}return r}function yu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function gu(e,t,r,n=!1){for(let i of t){let s=an(i);if(s.includes("*"))yn(e,s,r,i,n);else if(n)hn(e,s);else{let o=hu(e,s);if(o===Ce)continue;let u=typeof r=="function"?r(o,s):r;dn(e,s,u)}}}function yn(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),u=e;for(let f of o){if(u==null||typeof u!="object"||u===null)return;u=u[f]}if(Array.isArray(u))if(i)for(let f=0;f<u.length;f++)u[f]=void 0;else for(let f=0;f<u.length;f++){let c=[...o,f.toString()],d=typeof r=="function"?r(u[f],c):r;u[f]=d}else if(typeof u=="object"&&u!==null)if(i){let f=[];for(let c in u)Object.prototype.hasOwnProperty.call(u,c)&&f.push(c);for(let c of f)delete u[c]}else for(let f in u){let c=[...o,f],d=typeof r=="function"?r(u[f],c):r;u[f]=d}}else pu(e,t,r,s,n,i)}function pu(e,t,r,n,i,s=!1){let o=t.slice(0,n),u=t.slice(n+1),f=[];function c(d,l){if(l===o.length){if(Array.isArray(d))for(let y=0;y<d.length;y++)f[l]=y.toString(),c(d[y],l+1);else if(typeof d=="object"&&d!==null)for(let y in d)f[l]=y,c(d[y],l+1)}else if(l<o.length){let y=o[l];d&&typeof d=="object"&&d!==null&&y in d&&(f[l]=y,c(d[y],l+1))}else if(u.includes("*"))yn(d,u,typeof r=="function"?(h,a)=>{let m=[...f.slice(0,l),...a];return r(h,m)}:r,i,s);else if(s)hn(d,u);else{let y=typeof r=="function"?r(yu(d,u),[...f.slice(0,l),...u]):r;dn(d,u,y)}}if(o.length===0)c(e,0);else{let d=e;for(let l=0;l<o.length;l++){let y=o[l];if(d==null||typeof d!="object"||d===null)return;d=d[y],f[l]=y}d!=null&&c(d,o.length)}}function mu(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=an(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function bu(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let u=[];for(let f=0;f<n.length;f++){let c=f.toString();i.has(c)||i.has("*")?u[f]=r(n[f],i.get(c)||i.get("*")):u[f]=n[f]}return u}let o=Object.create(Object.getPrototypeOf(n));for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&(i.has(u)||i.has("*")?o[u]=r(n[u],i.get(u)||i.get("*")):o[u]=n[u]);return o}return r(e,t)}function wu(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function Su(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)wu(t)}function Eu(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;Su(t);let o=mu(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return n?n(f):f;let c=bu(f,o),d=f,l=r;return typeof r=="function"&&(l=r),gu(c,t,l,s),n===!1?(c.restore=function(){return pt(d)},c):typeof n=="function"?n(c):JSON.stringify(c)}}gn.exports=Eu});var ie=v((Lg,mn)=>{"use strict";var vu=Symbol("pino.setLevel"),Ou=Symbol("pino.getLevel"),_u=Symbol("pino.levelVal"),Lu=Symbol("pino.levelComp"),xu=Symbol("pino.useLevelLabels"),Cu=Symbol("pino.useOnlyCustomLevels"),Tu=Symbol("pino.mixin"),Au=Symbol("pino.lsCache"),ju=Symbol("pino.chindings"),Pu=Symbol("pino.asJson"),Nu=Symbol("pino.write"),Bu=Symbol("pino.redactFmt"),Du=Symbol("pino.time"),Mu=Symbol("pino.timeSliceIndex"),qu=Symbol("pino.stream"),$u=Symbol("pino.stringify"),Ru=Symbol("pino.stringifySafe"),Iu=Symbol("pino.stringifiers"),ku=Symbol("pino.end"),Fu=Symbol("pino.formatOpts"),Wu=Symbol("pino.messageKey"),Ku=Symbol("pino.errorKey"),zu=Symbol("pino.nestedKey"),Vu=Symbol("pino.nestedKeyStr"),Uu=Symbol("pino.mixinMergeStrategy"),Gu=Symbol("pino.msgPrefix"),Hu=Symbol("pino.wildcardFirst"),Ju=Symbol.for("pino.serializers"),Yu=Symbol.for("pino.formatters"),Xu=Symbol.for("pino.hooks"),Zu=Symbol.for("pino.metadata");mn.exports={setLevelSym:vu,getLevelSym:Ou,levelValSym:_u,levelCompSym:Lu,useLevelLabelsSym:xu,mixinSym:Tu,lsCacheSym:Au,chindingsSym:ju,asJsonSym:Pu,writeSym:Nu,serializersSym:Ju,redactFmtSym:Bu,timeSym:Du,timeSliceIndexSym:Mu,streamSym:qu,stringifySym:$u,stringifySafeSym:Ru,stringifiersSym:Iu,endSym:ku,formatOptsSym:Fu,messageKeySym:Wu,errorKeySym:Ku,nestedKeySym:zu,wildcardFirstSym:Hu,needsMetadataGsym:Zu,useOnlyCustomLevelsSym:Cu,formattersSym:Yu,hooksSym:Xu,nestedKeyStrSym:Vu,mixinMergeStrategySym:Uu,msgPrefixSym:Gu}});var bt=v((xg,En)=>{"use strict";var bn=pn(),{redactFmtSym:Qu,wildcardFirstSym:Te}=ie(),mt=/[^.[\]]+|\[([^[\]]*?)\]/g,wn="[Redacted]",Sn=!1;function ef(e,t){let{paths:r,censor:n,remove:i}=tf(e),s=r.reduce((f,c)=>{mt.lastIndex=0;let d=mt.exec(c),l=mt.exec(c),y=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(y==="*"&&(y=Te),l===null)return f[y]=null,f;if(f[y]===null)return f;let{index:h}=l,a=`${c.substr(h,c.length-1)}`;return f[y]=f[y]||[],y!==Te&&f[y].length===0&&f[y].push(...f[Te]||[]),y===Te&&Object.keys(f).forEach(function(m){f[m]&&f[m].push(a)}),f[y].push(a),f},{}),o={[Qu]:bn({paths:r,censor:n,serialize:t,strict:Sn,remove:i})},u=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,c)=>{if(s[c]===null)f[c]=d=>u(d,[c]);else{let d=typeof n=="function"?(l,y)=>n(l,[c,...y]):n;f[c]=bn({paths:s[c],censor:d,serialize:t,strict:Sn,remove:i})}return f},o)}function tf(e){if(Array.isArray(e))return e={paths:e,censor:wn},e;let{paths:t,censor:r=wn,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),{paths:t,censor:r,remove:n}}En.exports=ef});var _n=v((Cg,On)=>{"use strict";var rf=()=>"",nf=()=>`,"time":${Date.now()}`,sf=()=>`,"time":${Math.round(Date.now()/1e3)}`,of=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,uf=1000000n,vn=1000000000n,ff=BigInt(Date.now())*uf,cf=process.hrtime.bigint(),lf=()=>{let e=process.hrtime.bigint()-cf,t=ff+e,r=t/vn,n=t%vn,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),u=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),c=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),l=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${u}-${f}T${c}:${d}:${l}.${n.toString().padStart(9,"0")}Z"`};On.exports={nullTime:rf,epochTime:nf,unixTime:sf,isoTime:of,isoTimeNano:lf}});var xn=v((Tg,Ln)=>{"use strict";function af(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}Ln.exports=df;function df(e,t,r){var n=r&&r.stringify||af,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var u=1;u<s;u++)o[u]=n(t[u]);return o.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var c="",d=1-i,l=-1,y=e&&e.length||0,h=0;h<y;){if(e.charCodeAt(h)===37&&h+1<y){switch(l=l>-1?l:0,e.charCodeAt(h+1)){case 100:case 102:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Number(t[d]),l=h+2,h++;break;case 105:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Math.floor(Number(t[d])),l=h+2,h++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;l<h&&(c+=e.slice(l,h));var a=typeof t[d];if(a==="string"){c+="'"+t[d]+"'",l=h+2,h++;break}if(a==="function"){c+=t[d].name||"<anonymous>",l=h+2,h++;break}c+=n(t[d]),l=h+2,h++;break;case 115:if(d>=f)break;l<h&&(c+=e.slice(l,h)),c+=String(t[d]),l=h+2,h++;break;case 37:l<h&&(c+=e.slice(l,h)),c+="%",l=h+2,h++,d--;break}++d}++h}return l===-1?e:(l<y&&(c+=e.slice(l)),c)}});var St=v((Ag,wt)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));wt.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};wt.exports=e}});var Ot=v((jg,Bn)=>{"use strict";var M=B("fs"),hf=B("events"),yf=B("util").inherits,Cn=B("path"),vt=St(),gf=B("assert"),Ae=100,je=Buffer.allocUnsafe(0),pf=16*1024,Tn="buffer",An="utf8",[mf,bf]=(process.versions.node||"0.0").split(".").map(Number),wf=mf>=22&&bf>=7;function jn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let u=t._reopening;t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():u&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&M.mkdirSync(Cn.dirname(e),{recursive:!0});let s=M.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?M.mkdir(Cn.dirname(e),{recursive:!0},s=>{if(s)return r(s);M.open(e,n,i,r)}):M.open(e,n,i,r)}function k(e){if(!(this instanceof k))return new k(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:u,append:f=!0,mkdir:c,retryEAGAIN:d,fsync:l,contentMode:y,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||pf,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=l||!1,this.append=f||!1,this.mode=h,this.retryEAGAIN=d||(()=>!0),this.mkdir=c||!1;let a,m;if(y===Tn)this._writingBuf=je,this.write=vf,this.flush=_f,this.flushSync=xf,this._actualWrite=Tf,a=()=>M.writeSync(this.fd,this._writingBuf),m=()=>M.write(this.fd,this._writingBuf,this.release);else if(y===void 0||y===An)this._writingBuf="",this.write=Ef,this.flush=Of,this.flushSync=Lf,this._actualWrite=Cf,a=()=>M.writeSync(this.fd,this._writingBuf,"utf8"),m=()=>M.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${An}" and "${Tn}", but passed ${y}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")jn(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(p,b)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{vt(Ae),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(m,Ae);else this._writing=!1,this.emit("error",p);return}this.emit("write",b);let w=Et(this._writingBuf,this._len,b);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){m();return}try{do{let O=a(),x=Et(this._writingBuf,this._len,O);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&M.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,Pe(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Sf,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function Et(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function Sf(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}yf(k,hf);function Pn(e,t){return e.length===0?je:e.length===1?e[0]:Buffer.concat(e,t)}function Ef(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function vf(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Nn(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{M.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function Of(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Nn.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function _f(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Nn.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}k.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&M.close(t,r=>{if(r)return this.emit("error",r)})}),jn(this.file,this)};k.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Pe(this)))};function Lf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=M.writeSync(this.fd,e,"utf8"),r=Et(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}try{M.fsyncSync(this.fd)}catch{}}function xf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=je);let e=je;for(;this._bufs.length||e.length;){e.length<=0&&(e=Pn(this._bufs[0],this._lens[0]));try{let t=M.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}}k.prototype.destroy=function(){this.destroyed||Pe(this)};function Cf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=M.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else M.write(this.fd,this._writingBuf,"utf8",e)}function Tf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Pn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=M.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else wf&&(this._writingBuf=Buffer.from(this._writingBuf)),M.write(this.fd,this._writingBuf,e)}function Pe(e){if(e.fd===-1){e.once("ready",Pe.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],gf(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{M.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?M.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}k.SonicBoom=k;k.default=k;Bn.exports=k});var Ne=v((Pg,Rn)=>{"use strict";var F={exit:[],beforeExit:[]},Dn={exit:Pf,beforeExit:Nf},se;function Af(){se===void 0&&(se=new FinalizationRegistry(Bf))}function jf(e){F[e].length>0||process.on(e,Dn[e])}function Mn(e){F[e].length>0||(process.removeListener(e,Dn[e]),F.exit.length===0&&F.beforeExit.length===0&&(se=void 0))}function Pf(){qn("exit")}function Nf(){qn("beforeExit")}function qn(e){for(let t of F[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}F[e]=[]}function Bf(e){for(let t of["exit","beforeExit"]){let r=F[t].indexOf(e);F[t].splice(r,r+1),Mn(t)}}function $n(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");jf(e);let n=new WeakRef(t);n.fn=r,Af(),se.register(t,n),F[e].push(n)}function Df(e,t){$n("exit",e,t)}function Mf(e,t){$n("beforeExit",e,t)}function qf(e){if(se!==void 0){se.unregister(e);for(let t of["exit","beforeExit"])F[t]=F[t].filter(r=>{let n=r.deref();return n&&n!==e}),Mn(t)}}Rn.exports={register:Df,registerBeforeExit:Mf,unregister:qf}});var In=v((Ng,$f)=>{$f.exports={name:"thread-stream",version:"3.1.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Fn=v((Bg,kn)=>{"use strict";function Rf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let u=o,f=c=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(e,t),o===u?f(c>=1e3?1e3:c*2):o===r?i(null,"ok"):i(null,"not-equal")},c)};f(1)}function If(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let u=f=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):u(f>=1e3?1e3:f*2)},f)};u(1)}kn.exports={wait:Rf,waitDiff:If}});var Kn=v((Dg,Wn)=>{"use strict";Wn.exports={WRITE_INDEX:4,READ_INDEX:8}});var Hn=v((Mg,Gn)=>{"use strict";var{version:kf}=In(),{EventEmitter:Ff}=B("events"),{Worker:Wf}=B("worker_threads"),{join:Kf}=B("path"),{pathToFileURL:zf}=B("url"),{wait:Vf}=Fn(),{WRITE_INDEX:$,READ_INDEX:W}=Kn(),Uf=B("buffer"),Gf=B("assert"),g=Symbol("kImpl"),Hf=Uf.constants.MAX_STRING_LENGTH,he=class{constructor(t){this._value=t}deref(){return this._value}},De=class{register(){}unregister(){}},Jf=process.env.NODE_V8_COVERAGE?De:global.FinalizationRegistry||De,Yf=process.env.NODE_V8_COVERAGE?he:global.WeakRef||he,zn=new Jf(e=>{e.exited||e.terminate()});function Xf(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Kf(__dirname,"lib","worker.js"),o=new Wf(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:zf(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:{$context:{threadStreamVersion:kf},...n}}});return o.stream=new he(e),o.on("message",Zf),o.on("exit",Un),zn.register(e,o),o}function Vn(e){Gf(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Be(e){let t=Atomics.load(e[g].state,$),r=e[g].data.length-t;if(r>0){if(e[g].buf.length===0){e[g].flushing=!1,e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(Vn,e);return}let n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[g].buf=e[g].buf.slice(r),Me(e,n,Be.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);i>e[g].data.length;)r=r/2,n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);e[g].buf=e[g].buf.slice(r),Me(e,n,Be.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0),Be(e)})}else K(e,new Error("overwritten"))}function Zf(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Yf(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":K(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:K(t,new Error("this should not happen: "+e.code))}}function Un(e){let t=this.stream.deref();t!==void 0&&(zn.unregister(t),t.worker.exited=!0,t.worker.off("exit",Un),K(t,e!==0?new Error("the worker thread exited"):null))}var Lt=class extends Ff{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[g]={},this[g].stateBuf=new SharedArrayBuffer(128),this[g].state=new Int32Array(this[g].stateBuf),this[g].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[g].data=Buffer.from(this[g].dataBuf),this[g].sync=t.sync||!1,this[g].ending=!1,this[g].ended=!1,this[g].needDrain=!1,this[g].destroyed=!1,this[g].flushing=!1,this[g].ready=!1,this[g].finished=!1,this[g].errored=null,this[g].closed=!1,this[g].buf="",this.worker=Xf(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){if(this[g].destroyed)return xt(this,new Error("the worker has exited")),!1;if(this[g].ending)return xt(this,new Error("the worker is ending")),!1;if(this[g].flushing&&this[g].buf.length+t.length>=Hf)try{_t(this),this[g].flushing=!0}catch(r){return K(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return _t(this),!0}catch(r){return K(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Be,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,$)<=0,!this[g].needDrain}end(){this[g].destroyed||(this[g].ending=!0,Tt(this))}flush(t){if(this[g].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[g].state,$);Vf(this[g].state,W,r,1/0,(n,i)=>{if(n){K(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(_t(this),Ct(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[g].ready}get destroyed(){return this[g].destroyed}get closed(){return this[g].closed}get writable(){return!this[g].destroyed&&!this[g].ending}get writableEnded(){return this[g].ending}get writableFinished(){return this[g].finished}get writableNeedDrain(){return this[g].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[g].errored}};function xt(e,t){setImmediate(()=>{e.emit("error",t)})}function K(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,xt(e,t)),e.worker.exited?setImmediate(()=>{e[g].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[g].closed=!0,e.emit("close")}))}function Me(e,t,r){let n=Atomics.load(e[g].state,$),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,$,n+i),Atomics.notify(e[g].state,$),r(),!0}function Tt(e){if(!(e[g].ended||!e[g].ending||e[g].flushing)){e[g].ended=!0;try{e.flushSync();let t=Atomics.load(e[g].state,W);Atomics.store(e[g].state,$,-1),Atomics.notify(e[g].state,$);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,W,t,1e3),t=Atomics.load(e[g].state,W),t===-2){K(e,new Error("end() failed"));return}if(++r===10){K(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){K(e,t)}}}function _t(e){let t=()=>{e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(Vn,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,$),n=e[g].data.length-r;if(n===0){Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);continue}else if(n<0)throw new Error("overwritten");let i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[g].buf=e[g].buf.slice(n),Me(e,i,t);else{for(Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);s>e[g].buf.length;)n=n/2,i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);e[g].buf=e[g].buf.slice(n),Me(e,i,t)}}}function Ct(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,$),r=0;for(;;){let n=Atomics.load(e[g].state,W);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,W,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}Gn.exports=Lt});var Pt=v((qg,Jn)=>{"use strict";var{createRequire:Qf}=B("module"),ec=gt(),{join:At,isAbsolute:tc,sep:rc}=B("node:path"),nc=St(),jt=Ne(),ic=Hn();function sc(e){jt.register(e,uc),jt.registerBeforeExit(e,fc),e.on("close",function(){jt.unregister(e)})}function oc(e,t,r,n){let i=new ic({filename:e,workerData:t,workerOpts:r,sync:n});i.on("ready",s),i.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function s(){process.removeListener("exit",o),i.unref(),r.autoEnd!==!1&&sc(i)}function o(){i.closed||(i.flushSync(),nc(100),i.end())}return i}function uc(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function fc(e){e.flushSync()}function cc(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=ec(),sync:u=!1}=e,f={...e.options},c=typeof o=="string"?[o]:o,d="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},l=e.target;if(l&&r)throw new Error("only one of target or targets can be specified");return r?(l=d["pino-worker"]||At(__dirname,"worker.js"),f.targets=r.filter(h=>h.target).map(h=>({...h,target:y(h.target)})),f.pipelines=r.filter(h=>h.pipeline).map(h=>h.pipeline.map(a=>({...a,level:h.level,target:y(a.target)})))):t&&(l=d["pino-worker"]||At(__dirname,"worker.js"),f.pipelines=[t.map(h=>({...h,target:y(h.target)}))]),n&&(f.levels=n),i&&(f.dedupe=i),f.pinoWillSendConfig=!0,oc(y(l),f,s,u);function y(h){if(h=d[h]||h,tc(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return At(__dirname,"..","file.js");let a;for(let m of c)try{let p=m==="node:repl"?process.cwd()+rc:m;a=Qf(p).resolve(h);break}catch{continue}if(!a)throw new Error(`unable to determine transport target for "${h}"`);return a}}Jn.exports=cc});var Re=v(($g,fi)=>{"use strict";var lc=B("node:diagnostics_channel"),Yn=xn(),{mapHttpRequest:ac,mapHttpResponse:dc}=yt(),Bt=Ot(),Xn=Ne(),{lsCacheSym:hc,chindingsSym:ri,writeSym:Zn,serializersSym:ni,formatOptsSym:Qn,endSym:yc,stringifiersSym:ii,stringifySym:si,stringifySafeSym:Dt,wildcardFirstSym:oi,nestedKeySym:gc,formattersSym:ui,messageKeySym:pc,errorKeySym:mc,nestedKeyStrSym:bc,msgPrefixSym:qe}=ie(),{isMainThread:wc}=B("worker_threads"),Sc=Pt(),ei=lc.tracingChannel("pino_asJson");function oe(){}function Ec(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(n,...i){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=ac(n):typeof n.setHeader=="function"&&(n=dc(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Zn](n,Yn(s,o,this[Qn]),e)}else{let s=n===void 0?i.shift():n;typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Zn](null,Yn(s,i,this[Qn]),e)}}}function Nt(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function vc(e,t,r,n){if(ei.hasSubscribers===!1)return ti.call(this,e,t,r,n);let i={instance:this,arguments};return ei.traceSync(ti,i,this,e,t,r,n)}function ti(e,t,r,n){let i=this[si],s=this[Dt],o=this[ii],u=this[yc],f=this[ri],c=this[ni],d=this[ui],l=this[pc],y=this[mc],h=this[hc][r]+n;h=h+f;let a;d.log&&(e=d.log(e));let m=o[oi],p="";for(let w in e)if(a=e[w],Object.prototype.hasOwnProperty.call(e,w)&&a!==void 0){c[w]?a=c[w](a):w===y&&c.err&&(a=c.err(a));let S=o[w]||m;switch(typeof a){case"undefined":case"function":continue;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":S&&(a=S(a));break;case"string":a=(S||Nt)(a);break;default:a=(S||i)(a,s)}if(a===void 0)continue;let O=Nt(w);p+=","+O+":"+a}let b="";if(t!==void 0){a=c[l]?c[l](t):t;let w=o[l]||m;switch(typeof a){case"function":break;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":w&&(a=w(a)),b=',"'+l+'":'+a;break;case"string":a=(w||Nt)(a),b=',"'+l+'":'+a;break;default:a=(w||i)(a,s),b=',"'+l+'":'+a}}return this[gc]&&p?h+this[bc]+p.slice(1)+"}"+b+u:h+p+b+u}function Oc(e,t){let r,n=e[ri],i=e[si],s=e[Dt],o=e[ii],u=o[oi],f=e[ni],c=e[ui].bindings;t=c(t);for(let d in t)if(r=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&r!==void 0)===!0){if(r=f[d]?f[d](r):r,r=(o[d]||u||i)(r,s),r===void 0)continue;n+=',"'+d+'":'+r}return n}function _c(e){return e.write!==e.constructor.prototype.write}function $e(e){let t=new Bt(e);return t.on("error",r),!e.sync&&wc&&(Xn.register(t,Lc),t.on("close",function(){Xn.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=oe,t.end=oe,t.flushSync=oe,t.destroy=oe;return}t.removeListener("error",r),t.emit("error",n)}}function Lc(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function xc(e){return function(r,n,i={},s){if(typeof i=="string")s=$e({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=$e({dest:s})}else if(i instanceof Bt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Bt||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Sc({caller:n,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=i;return o===!1&&(i.level="silent"),u||(i.onChild=oe),s||(_c(process.stdout)?s=process.stdout:s=$e({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function Cc(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Dt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Tc(e,t,r){return{level:e,bindings:t,log:r}}function Ac(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}fi.exports={noop:oe,buildSafeSonicBoom:$e,asChindings:Oc,asJson:vc,genLog:Ec,createArgsNormalizer:xc,stringify:Cc,buildFormatters:Tc,normalizeDestFileDescriptor:Ac}});var Ie=v((Rg,ci)=>{var jc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Pc={ASC:"ASC",DESC:"DESC"};ci.exports={DEFAULT_LEVELS:jc,SORTING_ORDER:Pc}});var $t=v((Ig,hi)=>{"use strict";var{lsCacheSym:Nc,levelValSym:Mt,useOnlyCustomLevelsSym:Bc,streamSym:Dc,formattersSym:Mc,hooksSym:qc,levelCompSym:li}=ie(),{noop:$c,genLog:Z}=Re(),{DEFAULT_LEVELS:z,SORTING_ORDER:ai}=Ie(),di={fatal:e=>{let t=Z(z.fatal,e);return function(...r){let n=this[Dc];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>Z(z.error,e),warn:e=>Z(z.warn,e),info:e=>Z(z.info,e),debug:e=>Z(z.debug,e),trace:e=>Z(z.trace,e)},qt=Object.keys(z).reduce((e,t)=>(e[z[t]]=t,e),{}),Rc=Object.keys(qt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Ic(e){let t=e[Mc].level,{labels:r}=e.levels,n={};for(let i in r){let s=t(r[i],Number(i));n[i]=JSON.stringify(s).slice(0,-1)}return e[Nc]=n,e}function kc(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Fc(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[Mt],i=this[Mt]=r[e],s=this[Bc],o=this[li],u=this[qc].logMethod;for(let f in r){if(o(r[f],i)===!1){this[f]=$c;continue}this[f]=kc(f,s)?di[f](u):Z(r[f],u)}this.emit("level-change",e,i,t[n],n,this)}function Wc(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function Kc(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[li](r,this[Mt])}function zc(e,t,r){return e===ai.DESC?t<=r:t>=r}function Vc(e){return typeof e=="string"?zc.bind(null,e):e}function Uc(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:qt,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:z,e);return{labels:n,values:i}}function Gc(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(qt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:z,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Hc(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}function Jc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(ai).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}hi.exports={initialLsCache:Rc,genLsCache:Ic,levelMethods:di,getLevel:Wc,setLevel:Fc,isLevelEnabled:Kc,mappings:Uc,assertNoLevelCollisions:Hc,assertDefaultLevelFound:Gc,genLevelComparison:Vc,assertLevelComparison:Jc}});var Rt=v((kg,yi)=>{"use strict";yi.exports={version:"10.1.0"}});var vi=v((Wg,Ei)=>{"use strict";var{EventEmitter:Yc}=B("node:events"),{lsCacheSym:Xc,levelValSym:Zc,setLevelSym:kt,getLevelSym:gi,chindingsSym:Fe,mixinSym:Qc,asJsonSym:mi,writeSym:el,mixinMergeStrategySym:tl,timeSym:rl,timeSliceIndexSym:nl,streamSym:bi,serializersSym:Q,formattersSym:ye,errorKeySym:il,messageKeySym:sl,useOnlyCustomLevelsSym:ol,needsMetadataGsym:ul,redactFmtSym:fl,stringifySym:cl,formatOptsSym:ll,stringifiersSym:al,msgPrefixSym:Ft,hooksSym:dl}=ie(),{getLevel:hl,setLevel:yl,isLevelEnabled:gl,mappings:pl,initialLsCache:ml,genLsCache:bl,assertNoLevelCollisions:wl}=$t(),{asChindings:Wt,asJson:Sl,buildFormatters:It,stringify:pi,noop:wi}=Re(),{version:El}=Rt(),vl=bt(),Ol=class{},Si={constructor:Ol,child:_l,bindings:Ll,setBindings:xl,flush:Al,isLevelEnabled:gl,version:El,get level(){return this[gi]()},set level(e){this[kt](e)},get levelVal(){return this[Zc]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Ft]},get[Symbol.toStringTag](){return"Pino"},[Xc]:ml,[el]:Tl,[mi]:Sl,[gi]:hl,[kt]:yl};Object.setPrototypeOf(Si,Yc.prototype);Ei.exports=function(){return Object.create(Si)};var ke=e=>e;function _l(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Q],n=this[ye],i=Object.create(this);if(t==null)return i[ye].bindings!==ke&&(i[ye]=It(n.level,ke,n.log)),i[Fe]=Wt(i,e),this.onChild!==wi&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Q]=Object.create(null);for(let c in r)i[Q][c]=r[c];let u=Object.getOwnPropertySymbols(r);for(var s=0;s<u.length;s++){let c=u[s];i[Q][c]=r[c]}for(let c in t.serializers)i[Q][c]=t.serializers[c];let f=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<f.length;o++){let c=f[o];i[Q][c]=t.serializers[c]}}else i[Q]=r;if(t.hasOwnProperty("formatters")){let{level:u,bindings:f,log:c}=t.formatters;i[ye]=It(u||n.level,f||ke,c||n.log)}else i[ye]=It(n.level,ke,n.log);if(t.hasOwnProperty("customLevels")===!0&&(wl(this.levels,t.customLevels),i.levels=pl(t.customLevels,i[ol]),bl(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let u=vl(i.redact,pi),f={stringify:u[fl]};i[cl]=pi,i[al]=u,i[ll]=f}if(typeof t.msgPrefix=="string"&&(i[Ft]=(this[Ft]||"")+t.msgPrefix),i[Fe]=Wt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let u=t.level||this.level;i[kt](u)}return this.onChild(i),i}function Ll(){let t=`{${this[Fe].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function xl(e){let t=Wt(this,e);this[Fe]=t}function Cl(e,t){return Object.assign(t,e)}function Tl(e,t,r){let n=this[rl](),i=this[Qc],s=this[il],o=this[sl],u=this[tl]||Cl,f,c=this[dl].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(f=u(f,i(f,r,this)));let d=this[mi](f,t,r,n),l=this[bi];l[ul]===!0&&(l.lastLevel=r,l.lastObj=f,l.lastMsg=t,l.lastTime=n.slice(this[nl]),l.lastLogger=this),l.write(c?c(d):d)}function Al(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[bi];typeof t.flush=="function"?t.flush(e||wi):e&&e()}});var xi=v((Ut,Li)=>{"use strict";var{hasOwnProperty:ge}=Object.prototype,te=Vt();te.configure=Vt;te.stringify=te;te.default=te;Ut.stringify=te;Ut.configure=Vt;Li.exports=te;var jl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function G(e){return e.length<5e3&&!jl.test(e)?`"${e}"`:JSON.stringify(e)}function Kt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;for(;i!==0&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}var Pl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function zt(e){return Pl.call(e)!==void 0&&e.length!==0}function Oi(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)i+=`${t}"${s}":${n}${e[s]}`;return i}function Nl(e){if(ge.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Bl(e){let t;if(ge.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Dl(e,t){let r;if(ge.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function _i(e,t){let r;if(ge.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function ee(e){return e===1?"1 item":`${e} items`}function Ml(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function ql(e){if(ge.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Vt(e){e={...e};let t=ql(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Nl(e),n=Dl(e,"bigint"),i=Bl(e),s=typeof i=="function"?i:void 0,o=_i(e,"maximumDepth"),u=_i(e,"maximumBreadth");function f(h,a,m,p,b,w){let S=a[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=p.call(a,h,S),typeof S){case"string":return G(S);case"object":{if(S===null)return"null";if(m.indexOf(S)!==-1)return r;let O="",x=",",P=w;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(S),b!==""&&(w+=b,O+=`
5
5
  ${w}`,x=`,
6
6
  ${w}`);let A=Math.min(S.length,u),E=0;for(;E<A-1;E++){let R=f(String(E),S,m,p,b,w);O+=R!==void 0?R:"null",O+=x}let q=f(String(E),S,m,p,b,w);if(O+=q!==void 0?q:"null",S.length-1>u){let R=S.length-u-1;O+=`${x}"... ${ee(R)} not stringified"`}return b!==""&&(O+=`
7
7
  ${P}`),m.pop(),`[${O}]`}let T=Object.keys(S),j=T.length;if(j===0)return"{}";if(o<m.length+1)return'"[Object]"';let _="",N="";b!==""&&(w+=b,x=`,
@@ -19,11 +19,11 @@ ${b}`,D=Math.min(a.length,u),A=0;for(;A<D-1;A++){let q=d(String(A),a[A],m,p,b);_
19
19
  ${w}`,m.pop(),`[${_}]`}let S=Object.keys(a),O=S.length;if(O===0)return"{}";if(o<m.length+1)return'"[Object]"';b+=p;let x=`,
20
20
  ${b}`,P="",T="",j=Math.min(O,u);zt(a)&&(P+=Oi(a,x,u),S=S.slice(a.length),j-=a.length,T=x),i&&(S=Kt(S,s)),m.push(a);for(let _=0;_<j;_++){let N=S[_],D=d(N,a[N],m,p,b);D!==void 0&&(P+=`${T}${G(N)}: ${D}`,T=x)}if(O>u){let _=O-u;P+=`${T}"...": "${ee(_)} not stringified"`,T=x}return T!==""&&(P=`
21
21
  ${b}${P}
22
- ${w}`),m.pop(),`{${P}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function l(h,a,m){switch(typeof a){case"string":return G(a);case"object":{if(a===null)return"null";if(typeof a.toJSON=="function"){if(a=a.toJSON(h),typeof a!="object")return l(h,a,m);if(a===null)return"null"}if(m.indexOf(a)!==-1)return r;let p="",b=a.length!==void 0;if(b&&Array.isArray(a)){if(a.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(a);let P=Math.min(a.length,u),T=0;for(;T<P-1;T++){let _=l(String(T),a[T],m);p+=_!==void 0?_:"null",p+=","}let j=l(String(T),a[T],m);if(p+=j!==void 0?j:"null",a.length-1>u){let _=a.length-u-1;p+=`,"... ${ee(_)} not stringified"`}return m.pop(),`[${p}]`}let w=Object.keys(a),S=w.length;if(S===0)return"{}";if(o<m.length+1)return'"[Object]"';let O="",x=Math.min(S,u);b&&zt(a)&&(p+=Oi(a,",",u),w=w.slice(a.length),x-=a.length,O=","),i&&(w=Kt(w,s)),m.push(a);for(let P=0;P<x;P++){let T=w[P],j=l(T,a[T],m);j!==void 0&&(p+=`${O}${G(T)}:${j}`,O=",")}if(S>u){let P=S-u;p+=`${O}"...":"${ee(P)} not stringified"`}return m.pop(),`{${p}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function y(h,a,m){if(arguments.length>1){let p="";if(typeof m=="number"?p=" ".repeat(Math.min(m,10)):typeof m=="string"&&(p=m.slice(0,10)),a!=null){if(typeof a=="function")return f("",{"":h},[],a,p,"");if(Array.isArray(a))return c("",h,[],ql(a),p,"")}if(p.length!==0)return d("",h,[],p,"")}return l("",h,[])}return y}});var ji=v((Kg,Ai)=>{"use strict";var Gt=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ti}=Ie(),Rl=Ti.info;function Il(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Ti);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(l=>{r[l]=t.levels[l]});let n={write:i,add:u,remove:f,emit:s,flushSync:o,end:c,minLevel:0,lastId:0,streams:[],clone:d,[Gt]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,n):u.call(n,e),e=null,n;function i(l){let y,h=this.lastLevel,{streams:a}=this,m=0,p;for(let b=kl(a.length,t.dedupe);Wl(b,a.length,t.dedupe);b=Fl(b,t.dedupe))if(y=a[b],y.level<=h){if(m!==0&&m!==y.level)break;if(p=y.stream,p[Gt]){let{lastTime:w,lastMsg:S,lastObj:O,lastLogger:x}=this;p.lastLevel=h,p.lastTime=w,p.lastMsg=S,p.lastObj=O,p.lastLogger=x}p.write(l),t.dedupe&&(m=y.level)}else if(!t.dedupe)break}function s(...l){for(let{stream:y}of this.streams)typeof y.emit=="function"&&y.emit(...l)}function o(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync()}function u(l){if(!l)return n;let y=typeof l.write=="function"||l.stream,h=l.write?l:l.stream;if(!y)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:a,streamLevels:m}=this,p;typeof l.levelVal=="number"?p=l.levelVal:typeof l.level=="string"?p=m[l.level]:typeof l.level=="number"?p=l.level:p=Rl;let b={stream:h,level:p,levelVal:void 0,id:++n.lastId};return a.unshift(b),a.sort(Ci),this.minLevel=a[0].level,n}function f(l){let{streams:y}=this,h=y.findIndex(a=>a.id===l);return h>=0&&(y.splice(h,1),y.sort(Ci),this.minLevel=y.length>0?y[0].level:-1),n}function c(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync(),l.end()}function d(l){let y=new Array(this.streams.length);for(let h=0;h<y.length;h++)y[h]={level:l,stream:this.streams[h].stream};return{write:i,add:u,remove:f,minLevel:l,streams:y,clone:d,emit:s,flushSync:o,[Gt]:!0}}}function Ci(e,t){return e.level-t.level}function kl(e,t){return t?e-1:0}function Fl(e,t){return t?e-1:e+1}function Wl(e,t,r){return r?e>=0:e<t}Ai.exports=Il});var zi=v((zg,I)=>{"use strict";var Kl=B("node:os"),Ri=yt(),zl=gt(),Vl=bt(),Ii=_n(),Ul=vi(),ki=ie(),{configure:Gl}=xi(),{assertDefaultLevelFound:Hl,mappings:Fi,genLsCache:Jl,genLevelComparison:Yl,assertLevelComparison:Xl}=$t(),{DEFAULT_LEVELS:Wi,SORTING_ORDER:Zl}=Ie(),{createArgsNormalizer:Ql,asChindings:ea,buildSafeSonicBoom:Pi,buildFormatters:ta,stringify:Ht,normalizeDestFileDescriptor:Ni,noop:ra}=Re(),{version:na}=Rt(),{chindingsSym:Bi,redactFmtSym:ia,serializersSym:Di,timeSym:sa,timeSliceIndexSym:oa,streamSym:ua,stringifySym:Mi,stringifySafeSym:Jt,stringifiersSym:qi,setLevelSym:fa,endSym:ca,formatOptsSym:la,messageKeySym:aa,errorKeySym:da,nestedKeySym:ha,mixinSym:ya,levelCompSym:ga,useOnlyCustomLevelsSym:pa,formattersSym:$i,hooksSym:ma,nestedKeyStrSym:ba,mixinMergeStrategySym:wa,msgPrefixSym:Sa}=ki,{epochTime:Ki,nullTime:Ea}=Ii,{pid:va}=process,Oa=Kl.hostname(),_a=Ri.err,La={level:"info",levelComparison:Zl.ASC,levels:Wi,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:va,hostname:Oa},serializers:Object.assign(Object.create(null),{err:_a}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Ki,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},xa=Ql(La),Ca=Object.assign(Object.create(null),Ri);function Yt(...e){let t={},{opts:r,stream:n}=xa(t,zl(),...e);r.level&&typeof r.level=="string"&&Wi[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:u,messageKey:f,errorKey:c,nestedKey:d,base:l,name:y,level:h,customLevels:a,levelComparison:m,mixin:p,mixinMergeStrategy:b,useOnlyCustomLevels:w,formatters:S,hooks:O,depthLimit:x,edgeLimit:P,onChild:T,msgPrefix:j}=r,_=Gl({maximumDepth:x,maximumBreadth:P}),N=ta(S.level,S.bindings,S.log),D=Ht.bind({[Jt]:_}),A=i?Vl(i,D):{},E=i?{stringify:A[ia]}:{stringify:D},q="}"+(s?`\r
22
+ ${w}`),m.pop(),`{${P}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function l(h,a,m){switch(typeof a){case"string":return G(a);case"object":{if(a===null)return"null";if(typeof a.toJSON=="function"){if(a=a.toJSON(h),typeof a!="object")return l(h,a,m);if(a===null)return"null"}if(m.indexOf(a)!==-1)return r;let p="",b=a.length!==void 0;if(b&&Array.isArray(a)){if(a.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(a);let P=Math.min(a.length,u),T=0;for(;T<P-1;T++){let _=l(String(T),a[T],m);p+=_!==void 0?_:"null",p+=","}let j=l(String(T),a[T],m);if(p+=j!==void 0?j:"null",a.length-1>u){let _=a.length-u-1;p+=`,"... ${ee(_)} not stringified"`}return m.pop(),`[${p}]`}let w=Object.keys(a),S=w.length;if(S===0)return"{}";if(o<m.length+1)return'"[Object]"';let O="",x=Math.min(S,u);b&&zt(a)&&(p+=Oi(a,",",u),w=w.slice(a.length),x-=a.length,O=","),i&&(w=Kt(w,s)),m.push(a);for(let P=0;P<x;P++){let T=w[P],j=l(T,a[T],m);j!==void 0&&(p+=`${O}${G(T)}:${j}`,O=",")}if(S>u){let P=S-u;p+=`${O}"...":"${ee(P)} not stringified"`}return m.pop(),`{${p}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function y(h,a,m){if(arguments.length>1){let p="";if(typeof m=="number"?p=" ".repeat(Math.min(m,10)):typeof m=="string"&&(p=m.slice(0,10)),a!=null){if(typeof a=="function")return f("",{"":h},[],a,p,"");if(Array.isArray(a))return c("",h,[],Ml(a),p,"")}if(p.length!==0)return d("",h,[],p,"")}return l("",h,[])}return y}});var ji=v((Kg,Ai)=>{"use strict";var Gt=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ti}=Ie(),$l=Ti.info;function Rl(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Ti);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(l=>{r[l]=t.levels[l]});let n={write:i,add:u,remove:f,emit:s,flushSync:o,end:c,minLevel:0,lastId:0,streams:[],clone:d,[Gt]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,n):u.call(n,e),e=null,n;function i(l){let y,h=this.lastLevel,{streams:a}=this,m=0,p;for(let b=Il(a.length,t.dedupe);Fl(b,a.length,t.dedupe);b=kl(b,t.dedupe))if(y=a[b],y.level<=h){if(m!==0&&m!==y.level)break;if(p=y.stream,p[Gt]){let{lastTime:w,lastMsg:S,lastObj:O,lastLogger:x}=this;p.lastLevel=h,p.lastTime=w,p.lastMsg=S,p.lastObj=O,p.lastLogger=x}p.write(l),t.dedupe&&(m=y.level)}else if(!t.dedupe)break}function s(...l){for(let{stream:y}of this.streams)typeof y.emit=="function"&&y.emit(...l)}function o(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync()}function u(l){if(!l)return n;let y=typeof l.write=="function"||l.stream,h=l.write?l:l.stream;if(!y)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:a,streamLevels:m}=this,p;typeof l.levelVal=="number"?p=l.levelVal:typeof l.level=="string"?p=m[l.level]:typeof l.level=="number"?p=l.level:p=$l;let b={stream:h,level:p,levelVal:void 0,id:++n.lastId};return a.unshift(b),a.sort(Ci),this.minLevel=a[0].level,n}function f(l){let{streams:y}=this,h=y.findIndex(a=>a.id===l);return h>=0&&(y.splice(h,1),y.sort(Ci),this.minLevel=y.length>0?y[0].level:-1),n}function c(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync(),l.end()}function d(l){let y=new Array(this.streams.length);for(let h=0;h<y.length;h++)y[h]={level:l,stream:this.streams[h].stream};return{write:i,add:u,remove:f,minLevel:l,streams:y,clone:d,emit:s,flushSync:o,[Gt]:!0}}}function Ci(e,t){return e.level-t.level}function Il(e,t){return t?e-1:0}function kl(e,t){return t?e-1:e+1}function Fl(e,t,r){return r?e>=0:e<t}Ai.exports=Rl});var zi=v((zg,I)=>{"use strict";var Wl=B("node:os"),Ri=yt(),Kl=gt(),zl=bt(),Ii=_n(),Vl=vi(),ki=ie(),{configure:Ul}=xi(),{assertDefaultLevelFound:Gl,mappings:Fi,genLsCache:Hl,genLevelComparison:Jl,assertLevelComparison:Yl}=$t(),{DEFAULT_LEVELS:Wi,SORTING_ORDER:Xl}=Ie(),{createArgsNormalizer:Zl,asChindings:Ql,buildSafeSonicBoom:Pi,buildFormatters:ea,stringify:Ht,normalizeDestFileDescriptor:Ni,noop:ta}=Re(),{version:ra}=Rt(),{chindingsSym:Bi,redactFmtSym:na,serializersSym:Di,timeSym:ia,timeSliceIndexSym:sa,streamSym:oa,stringifySym:Mi,stringifySafeSym:Jt,stringifiersSym:qi,setLevelSym:ua,endSym:fa,formatOptsSym:ca,messageKeySym:la,errorKeySym:aa,nestedKeySym:da,mixinSym:ha,levelCompSym:ya,useOnlyCustomLevelsSym:ga,formattersSym:$i,hooksSym:pa,nestedKeyStrSym:ma,mixinMergeStrategySym:ba,msgPrefixSym:wa}=ki,{epochTime:Ki,nullTime:Sa}=Ii,{pid:Ea}=process,va=Wl.hostname(),Oa=Ri.err,_a={level:"info",levelComparison:Xl.ASC,levels:Wi,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Ea,hostname:va},serializers:Object.assign(Object.create(null),{err:Oa}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Ki,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},La=Zl(_a),xa=Object.assign(Object.create(null),Ri);function Yt(...e){let t={},{opts:r,stream:n}=La(t,Kl(),...e);r.level&&typeof r.level=="string"&&Wi[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:u,messageKey:f,errorKey:c,nestedKey:d,base:l,name:y,level:h,customLevels:a,levelComparison:m,mixin:p,mixinMergeStrategy:b,useOnlyCustomLevels:w,formatters:S,hooks:O,depthLimit:x,edgeLimit:P,onChild:T,msgPrefix:j}=r,_=Ul({maximumDepth:x,maximumBreadth:P}),N=ea(S.level,S.bindings,S.log),D=Ht.bind({[Jt]:_}),A=i?zl(i,D):{},E=i?{stringify:A[na]}:{stringify:D},q="}"+(s?`\r
23
23
  `:`
24
- `),R=ea.bind(null,{[Bi]:"",[Di]:o,[qi]:A,[Mi]:Ht,[Jt]:_,[$i]:N}),X="";l!==null&&(y===void 0?X=R(l):X=R(Object.assign({},l,{name:y})));let Dr=u instanceof Function?u:u?Ki:Ea,Do=Dr().indexOf(":")+1;if(w&&!a)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(j&&typeof j!="string")throw Error(`Unknown msgPrefix type "${typeof j}" - expected "string"`);Hl(h,a,w);let Mr=Fi(a,w);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:Mr,messageKey:f,errorKey:c}}),Xl(m);let Mo=Yl(m);return Object.assign(t,{levels:Mr,[ga]:Mo,[pa]:w,[ua]:n,[sa]:Dr,[oa]:Do,[Mi]:Ht,[Jt]:_,[qi]:A,[ca]:q,[la]:E,[aa]:f,[da]:c,[ha]:d,[ba]:d?`,${JSON.stringify(d)}:{`:"",[Di]:o,[ya]:p,[wa]:b,[Bi]:X,[$i]:N,[ma]:O,silent:ra,onChild:T,[Sa]:j}),Object.setPrototypeOf(t,Ul()),Jl(t),t[fa](h),t}I.exports=Yt;I.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Ni(e.dest||process.stdout.fd),Pi(e)):Pi({dest:Ni(e),minLength:0});I.exports.transport=Pt();I.exports.multistream=ji();I.exports.levels=Fi();I.exports.stdSerializers=Ca;I.exports.stdTimeFunctions=Object.assign({},Ii);I.exports.symbols=ki;I.exports.version=na;I.exports.default=Yt;I.exports.pino=Yt});var Zt=v(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var Ta=B("tty");function Aa(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Xt=Aa(Ta),{env:H={},argv:Ui=[],platform:ja=""}=typeof process>"u"?{}:process,Pa="NO_COLOR"in H||Ui.includes("--no-color"),Na="FORCE_COLOR"in H||Ui.includes("--color"),Ba=ja==="win32",Gi=H.TERM==="dumb",Da=Xt&&Xt.isatty&&Xt.isatty(1)&&H.TERM&&!Gi,Ma="CI"in H&&("GITHUB_ACTIONS"in H||"GITLAB_CI"in H||"CIRCLECI"in H),Hi=!Pa&&(Na||Ba&&!Gi||Da||Ma),Ji=(e,t,r,n,i=t.substring(0,e)+n,s=t.substring(e+r.length),o=s.indexOf(r))=>i+(o<0?s:Ji(o,s,r,n)),qa=(e,t,r,n,i)=>e<0?r+t+n:r+Ji(e,t,n,i)+n,$a=(e,t,r=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?qa((""+i).indexOf(t,n),i,e,t,r):"",C=(e,t,r)=>$a(`\x1B[${e}m`,`\x1B[${t}m`,r),Vi={reset:C(0,0),bold:C(1,22,"\x1B[22m\x1B[1m"),dim:C(2,22,"\x1B[22m\x1B[2m"),italic:C(3,23),underline:C(4,24),inverse:C(7,27),hidden:C(8,28),strikethrough:C(9,29),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),gray:C(90,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},Yi=({useColor:e=Hi}={})=>e?Vi:Object.keys(Vi).reduce((t,r)=>({...t,[r]:String}),{}),{reset:Ra,bold:Ia,dim:ka,italic:Fa,underline:Wa,inverse:Ka,hidden:za,strikethrough:Va,black:Ua,red:Ga,green:Ha,yellow:Ja,blue:Ya,magenta:Xa,cyan:Za,white:Qa,gray:ed,bgBlack:td,bgRed:rd,bgGreen:nd,bgYellow:id,bgBlue:sd,bgMagenta:od,bgCyan:ud,bgWhite:fd,blackBright:cd,redBright:ld,greenBright:ad,yellowBright:dd,blueBright:hd,magentaBright:yd,cyanBright:gd,whiteBright:pd,bgBlackBright:md,bgRedBright:bd,bgGreenBright:wd,bgYellowBright:Sd,bgBlueBright:Ed,bgMagentaBright:vd,bgCyanBright:Od,bgWhiteBright:_d}=Yi();L.bgBlack=td;L.bgBlackBright=md;L.bgBlue=sd;L.bgBlueBright=Ed;L.bgCyan=ud;L.bgCyanBright=Od;L.bgGreen=nd;L.bgGreenBright=wd;L.bgMagenta=od;L.bgMagentaBright=vd;L.bgRed=rd;L.bgRedBright=bd;L.bgWhite=fd;L.bgWhiteBright=_d;L.bgYellow=id;L.bgYellowBright=Sd;L.black=Ua;L.blackBright=cd;L.blue=Ya;L.blueBright=hd;L.bold=Ia;L.createColors=Yi;L.cyan=Za;L.cyanBright=gd;L.dim=ka;L.gray=ed;L.green=Ha;L.greenBright=ad;L.hidden=za;L.inverse=Ka;L.isColorSupported=Hi;L.italic=Fa;L.magenta=Xa;L.magentaBright=yd;L.red=Ga;L.redBright=ld;L.reset=Ra;L.strikethrough=Va;L.underline=Wa;L.white=Qa;L.whiteBright=pd;L.yellow=Ja;L.yellowBright=dd});var Qi=v((Ug,Zi)=>{Zi.exports=Xi;function Xi(e,t){if(e&&t)return Xi(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(u){s[u]=o[u]}),s}}});var er=v((Gg,Qt)=>{var es=Qi();Qt.exports=es(We);Qt.exports.strict=es(ts);We.proto=We(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return We(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ts(this)},configurable:!0})});function We(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function ts(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var is=v((Hg,ns)=>{var Ld=er(),xd=function(){},Cd=global.Bare?queueMicrotask:process.nextTick.bind(process),Td=function(e){return e.setHeader&&typeof e.abort=="function"},Ad=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},rs=function(e,t,r){if(typeof t=="function")return rs(e,null,t);t||(t={}),r=Ld(r||xd);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,f=function(){e.writable||c()},c=function(){o=!1,s||r.call(e)},d=function(){s=!1,o||r.call(e)},l=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},y=function(p){r.call(e,p)},h=function(){Cd(a)},a=function(){if(!u){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",c)};return Td(e)?(e.on("complete",c),e.on("abort",h),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",f),e.on("close",f)),Ad(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),t.error!==!1&&e.on("error",y),e.on("close",h),function(){u=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",h)}};ns.exports=rs});var us=v((Jg,os)=>{var jd=er(),Pd=is(),Ke;try{Ke=B("fs")}catch{}var pe=function(){},Nd=typeof process>"u"?!1:/^v?\.0/.test(process.version),ze=function(e){return typeof e=="function"},Bd=function(e){return!Nd||!Ke?!1:(e instanceof(Ke.ReadStream||pe)||e instanceof(Ke.WriteStream||pe))&&ze(e.close)},Dd=function(e){return e.setHeader&&ze(e.abort)},Md=function(e,t,r,n){n=jd(n);var i=!1;e.on("close",function(){i=!0}),Pd(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Bd(e))return e.close(pe);if(Dd(e))return e.abort();if(ze(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},ss=function(e){e()},qd=function(e,t){return e.pipe(t)},$d=function(){var e=Array.prototype.slice.call(arguments),t=ze(e[e.length-1]||pe)&&e.pop()||pe;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,u=s>0;return Md(i,o,u,function(f){r||(r=f),f&&n.forEach(ss),!o&&(n.forEach(ss),t(r))})});return e.reduce(qd)};os.exports=$d});var as=v((Yg,ls)=>{"use strict";var{Transform:Rd}=B("stream"),{StringDecoder:Id}=B("string_decoder"),J=Symbol("last"),Ve=Symbol("decoder");function kd(e,t,r){let n;if(this.overflow){if(n=this[Ve].write(e).split(this.matcher),n.length===1)return r();n.shift(),this.overflow=!1}else this[J]+=this[Ve].write(e),n=this[J].split(this.matcher);this[J]=n.pop();for(let i=0;i<n.length;i++)try{cs(this,this.mapper(n[i]))}catch(s){return r(s)}if(this.overflow=this[J].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function Fd(e){if(this[J]+=this[Ve].end(),this[J])try{cs(this,this.mapper(this[J]))}catch(t){return e(t)}e()}function cs(e,t){t!==void 0&&e.push(t)}function fs(e){return e}function Wd(e,t,r){switch(e=e||/\r?\n/,t=t||fs,r=r||{},arguments.length){case 1:typeof e=="function"?(t=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(r=e,e=/\r?\n/);break;case 2:typeof e=="function"?(r=t,t=e,e=/\r?\n/):typeof t=="object"&&(r=t,t=fs)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=kd,r.flush=Fd,r.readableObjectMode=!0;let n=new Rd(r);return n[J]="",n[Ve]=new Id("utf8"),n.matcher=e,n.mapper=t,n.maxLength=r.maxLength,n.skipOverflow=r.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,s){this._writableState.errorEmitted=!1,s(i)},n}ls.exports=Wd});var ps=v((Xg,gs)=>{"use strict";var ds=Symbol.for("pino.metadata"),Kd=as(),{Duplex:zd}=B("stream"),{parentPort:hs,workerData:ys}=B("worker_threads");function Vd(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}gs.exports=function(t,r={}){let n=r.expectPinoConfig===!0&&ys?.workerData?.pinoWillSendConfig===!0,i=r.parse==="lines",s=typeof r.parseLine=="function"?r.parseLine:JSON.parse,o=r.close||Ud,u=Kd(function(c){let d;try{d=s(c)}catch(l){this.emit("unknown",c,l);return}if(d===null){this.emit("unknown",c,"Null value ignored");return}return typeof d!="object"&&(d={data:d,time:Date.now()}),u[ds]&&(u.lastTime=d.time,u.lastLevel=d.level,u.lastObj=d),i?c:d},{autoDestroy:!0});if(u._destroy=function(c,d){let l=o(c,d);l&&typeof l.then=="function"&&l.then(d,d)},r.expectPinoConfig===!0&&ys?.workerData?.pinoWillSendConfig!==!0&&setImmediate(()=>{u.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),r.metadata!==!1&&(u[ds]=!0,u.lastTime=0,u.lastLevel=0,u.lastObj=null),n){let c={},d=Vd();return hs.on("message",function l(y){y.code==="PINO_CONFIG"&&(c=y.config,d.resolve(),hs.off("message",l))}),Object.defineProperties(u,{levels:{get(){return c.levels}},messageKey:{get(){return c.messageKey}},errorKey:{get(){return c.errorKey}}}),d.then(f)}return f();function f(){let c=t(u);if(c&&typeof c.catch=="function")c.catch(d=>{u.destroy(d)}),c=null;else if(r.enablePipelining&&c)return zd.from({writable:u,readable:c});return u}};function Ud(e,t){process.nextTick(t,e)}});var U=v((Zg,ms)=>{"use strict";ms.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var Ue=v((Qg,Ss)=>{"use strict";Ss.exports=Gd;var{LEVELS:bs,LEVEL_NAMES:ws}=U();function Gd(e,t,r){let n=e?t||bs:Object.assign({},bs,t),i=e?r||ws:Object.assign({},ws,r);return function(s){let o="default";return Number.isInteger(+s)?o=Object.prototype.hasOwnProperty.call(n,s)?s:o:o=Object.prototype.hasOwnProperty.call(i,s.toLowerCase())?i[s.toLowerCase()]:o,[n[o],o]}}});var ir=v((ep,_s)=>{"use strict";var V=e=>e,Ge={default:V,60:V,50:V,40:V,30:V,20:V,10:V,message:V,greyMessage:V,property:V},{createColors:Es}=Zt(),Hd=Ue(),be=Es({useColor:!0}),{white:tr,bgRed:Jd,red:Yd,yellow:Xd,green:Zd,blue:Qd,gray:rr,cyan:vs,magenta:Os}=be,me={default:tr,60:Jd,50:Yd,40:Xd,30:Zd,20:Qd,10:rr,message:vs,greyMessage:rr,property:Os};function eh(e){return e.reduce(function(t,[r,n]){return t[r]=typeof be[n]=="function"?be[n]:tr,t},{default:tr,message:vs,greyMessage:rr,property:Os})}function nr(e){return function(t,r,{customLevels:n,customLevelNames:i}={}){let[s,o]=Hd(e,n,i)(t);return Object.prototype.hasOwnProperty.call(r,o)?r[o](s):r.default(s)}}function th(e){let t=nr(e),r=function(n,i){return t(n,Ge,i)};return r.message=Ge.message,r.greyMessage=Ge.greyMessage,r.property=Ge.property,r.colors=Es({useColor:!1}),r}function rh(e){let t=nr(e),r=function(n,i){return t(n,me,i)};return r.message=me.message,r.property=me.property,r.greyMessage=me.greyMessage,r.colors=be,r}function nh(e,t){let r=eh(e),n=t?r:Object.assign({},me,r),i=nr(t),s=function(o,u){return i(o,n,u)};return s.colors=be,s.message=s.message||n.message,s.property=s.property||n.property,s.greyMessage=s.greyMessage||n.greyMessage,s}_s.exports=function(t=!1,r,n){return t&&r!==void 0?nh(r,n):t?rh(n):th(n)}});var sr=v((tp,Ls)=>{"use strict";Ls.exports=function(){}});var Cs=v((rp,xs)=>{"use strict";xs.exports=oh;var{isMainThread:ih}=B("node:worker_threads"),sh=Ot(),He=sr();function oh(e){let t=new sh(e);return t.on("error",r),!e.sync&&ih&&uh(t),t;function r(n){if(n.code==="EPIPE"){t.write=He,t.end=He,t.flushSync=He,t.destroy=He;return}t.removeListener("error",r)}}function uh(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=Ne();t.register(e,fh),e.on("close",function(){t.unregister(e)})}}function fh(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var Je=v((np,Ts)=>{"use strict";Ts.exports=ch;function ch(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var or=v((ip,As)=>{"use strict";As.exports=ah;var lh=Je();function ah(e){let t=new Date(e);return lh(t)||(t=new Date(+e)),t}});var Ye=v((sp,js)=>{"use strict";js.exports=dh;function dh(e){let t=[],r=!1,n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"){r=!0;continue}if(r){r=!1,n+=s;continue}if(s==="."){t.push(n),n="";continue}n+=s}return n.length&&t.push(n),t}});var ue=v((op,Ps)=>{"use strict";Ps.exports=yh;var hh=Ye();function yh(e,t){let r=Array.isArray(t)?t:hh(t);for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var ur=v((up,Ns)=>{"use strict";Ns.exports=mh;var gh=ue(),ph=Ye();function mh(e,t){let r=ph(t),n=r.pop();e=gh(e,r),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Ks=v(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var bh=Function.prototype.toString,fr=Object.create,wh=Object.prototype.toString,Sh=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function Eh(){return new Sh}function vh(){return new WeakMap}var Oh=typeof WeakMap<"u"?vh:Eh;function lr(e){if(!e)return fr(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:fr(e);if(t&&~bh.call(t).indexOf("[native code]"))try{return new t}catch{}return fr(e)}function _h(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function Lh(e){return e.flags}var xh=/test/g.flags==="g"?Lh:_h;function Bs(e){var t=wh.call(e);return t.substring(8,t.length-1)}function Ch(e){return e[Symbol.toStringTag]||Bs(e)}var Th=typeof Symbol<"u"?Ch:Bs,Ah=Object.defineProperty,jh=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyNames,ar=Object.getOwnPropertySymbols,Ms=Object.prototype,qs=Ms.hasOwnProperty,Ph=Ms.propertyIsEnumerable,$s=typeof ar=="function";function Nh(e){return Ds(e).concat(ar(e))}var Bh=$s?Nh:Ds;function Ze(e,t,r){for(var n=Bh(e),i=0,s=n.length,o=void 0,u=void 0;i<s;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(u=jh(e,o),!u){t[o]=r.copier(e[o],r);continue}!u.get&&!u.set&&(u.value=r.copier(u.value,r));try{Ah(t,o,u)}catch{t[o]=u.value}}return t}function Dh(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function Mh(e,t){var r=new t.Constructor;return t.cache.set(e,r),Ze(e,r,t)}function Rs(e,t){return e.slice(0)}function qh(e,t){return e.slice(0,e.size,e.type)}function $h(e,t){return new t.Constructor(Rs(e.buffer))}function Rh(e,t){return new t.Constructor(e.getTime())}function Is(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function Ih(e,t){return Ze(e,Is(e,t),t)}function kh(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function Fh(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=ar(e),s=0,o=i.length,u=void 0;s<o;++s)u=i[s],Ph.call(e,u)&&(r[u]=t.copier(e[u],t));return r}var Wh=$s?Fh:kh;function Kh(e,t){var r=lr(t.prototype);return t.cache.set(e,r),Ze(e,r,t)}function cr(e,t){return new t.Constructor(e.valueOf())}function zh(e,t){var r=new t.Constructor(e.source,xh(e));return r.lastIndex=e.lastIndex,r}function Xe(e,t){return e}function ks(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function Vh(e,t){return Ze(e,ks(e,t),t)}var Uh=Array.isArray,dr=Object.assign,Gh=Object.getPrototypeOf||(function(e){return e.__proto__}),Fs={array:Dh,arrayBuffer:Rs,blob:qh,dataView:$h,date:Rh,error:Xe,map:Is,object:Wh,regExp:zh,set:ks},Hh=dr({},Fs,{array:Mh,map:Ih,object:Kh,set:Vh});function Jh(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:cr,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:cr,Object:e.object,Promise:Xe,RegExp:e.regExp,Set:e.set,String:cr,WeakMap:Xe,WeakSet:Xe,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function hr(e){var t=dr({},Fs,e),r=Jh(t),n=r.Array,i=r.Object;function s(o,u){if(u.prototype=u.Constructor=void 0,!o||typeof o!="object")return o;if(u.cache.has(o))return u.cache.get(o);if(u.prototype=Gh(o),u.Constructor=u.prototype&&u.prototype.constructor,!u.Constructor||u.Constructor===Object)return i(o,u);if(Uh(o))return n(o,u);var f=r[Th(o)];return f?f(o,u):typeof o.then=="function"?o:i(o,u)}return function(u){return s(u,{Constructor:void 0,cache:Oh(),copier:s,prototype:void 0})}}function Ws(e){return hr(dr({},Hh,e))}var Yh=Ws({}),Xh=hr({});fe.copyStrict=Yh;fe.createCopier=hr;fe.createStrictCopier=Ws;fe.default=Xh});var yr=v((cp,zs)=>{"use strict";zs.exports=ty;var{createCopier:Zh}=Ks(),Qh=Zh({}),ey=ur();function ty({log:e,context:t}){let{ignoreKeys:r,includeKeys:n}=t,i=Qh(e);if(n){let s={};return n.forEach(o=>{s[o]=i[o]}),s}return r.forEach(s=>{ey(i,s)}),i}});var Us=v((gr,Vs)=>{"use strict";function ce(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(r){return typeof r}:ce=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ce(e)}(function(e){var t=arguments,r=(function(){var f=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(l,y,h,a){if(t.length===1&&u(l)==="string"&&!/\d/.test(l)&&(y=l,l=void 0),l=l||l===0?l:new Date,l instanceof Date||(l=new Date(l)),isNaN(l))throw TypeError("Invalid date");y=String(r.masks[y]||y||r.masks.default);var m=y.slice(0,4);(m==="UTC:"||m==="GMT:")&&(y=y.slice(4),h=!0,m==="GMT:"&&(a=!0));var p=function(){return h?"getUTC":"get"},b=function(){return l[p()+"Date"]()},w=function(){return l[p()+"Day"]()},S=function(){return l[p()+"Month"]()},O=function(){return l[p()+"FullYear"]()},x=function(){return l[p()+"Hours"]()},P=function(){return l[p()+"Minutes"]()},T=function(){return l[p()+"Seconds"]()},j=function(){return l[p()+"Milliseconds"]()},_=function(){return h?0:l.getTimezoneOffset()},N=function(){return s(l)},D=function(){return o(l)},A={d:function(){return b()},dd:function(){return n(b())},ddd:function(){return r.i18n.dayNames[w()]},DDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()],short:!0})},dddd:function(){return r.i18n.dayNames[w()+7]},DDDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()+7]})},m:function(){return S()+1},mm:function(){return n(S()+1)},mmm:function(){return r.i18n.monthNames[S()]},mmmm:function(){return r.i18n.monthNames[S()+12]},yy:function(){return String(O()).slice(2)},yyyy:function(){return n(O(),4)},h:function(){return x()%12||12},hh:function(){return n(x()%12||12)},H:function(){return x()},HH:function(){return n(x())},M:function(){return P()},MM:function(){return n(P())},s:function(){return T()},ss:function(){return n(T())},l:function(){return n(j(),3)},L:function(){return n(Math.floor(j()/10))},t:function(){return x()<12?r.i18n.timeNames[0]:r.i18n.timeNames[1]},tt:function(){return x()<12?r.i18n.timeNames[2]:r.i18n.timeNames[3]},T:function(){return x()<12?r.i18n.timeNames[4]:r.i18n.timeNames[5]},TT:function(){return x()<12?r.i18n.timeNames[6]:r.i18n.timeNames[7]},Z:function(){return a?"GMT":h?"UTC":(String(l).match(c)||[""]).pop().replace(d,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60)*100+Math.abs(_())%60,4)},p:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60),2)+":"+n(Math.floor(Math.abs(_())%60),2)},S:function(){return["th","st","nd","rd"][b()%10>3?0:(b()%100-b()%10!=10)*b()%10]},W:function(){return N()},WW:function(){return n(N())},N:function(){return D()}};return y.replace(f,function(E){return E in A?A[E]():E.slice(1,E.length-1)})}})();r.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},r.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(c,d){for(c=String(c),d=d||2;c.length<d;)c="0"+c;return c},i=function(c){var d=c.y,l=c.m,y=c.d,h=c._,a=c.dayName,m=c.short,p=m===void 0?!1:m,b=new Date,w=new Date;w.setDate(w[h+"Date"]()-1);var S=new Date;S.setDate(S[h+"Date"]()+1);var O=function(){return b[h+"Date"]()},x=function(){return b[h+"Month"]()},P=function(){return b[h+"FullYear"]()},T=function(){return w[h+"Date"]()},j=function(){return w[h+"Month"]()},_=function(){return w[h+"FullYear"]()},N=function(){return S[h+"Date"]()},D=function(){return S[h+"Month"]()},A=function(){return S[h+"FullYear"]()};return P()===d&&x()===l&&O()===y?p?"Tdy":"Today":_()===d&&j()===l&&T()===y?p?"Ysd":"Yesterday":A()===d&&D()===l&&N()===y?p?"Tmw":"Tomorrow":a},s=function(c){var d=new Date(c.getFullYear(),c.getMonth(),c.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var l=new Date(d.getFullYear(),0,4);l.setDate(l.getDate()-(l.getDay()+6)%7+3);var y=d.getTimezoneOffset()-l.getTimezoneOffset();d.setHours(d.getHours()-y);var h=(d-l)/(864e5*7);return 1+Math.floor(h)},o=function(c){var d=c.getDay();return d===0&&(d=7),d},u=function(c){return c===null?"null":c===void 0?"undefined":ce(c)!=="object"?ce(c):Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return r}):(typeof gr>"u"?"undefined":ce(gr))==="object"?Vs.exports=r:e.dateFormat=r})(void 0)});var pr=v((lp,Gs)=>{"use strict";Gs.exports=oy;var{DATE_FORMAT:ry,DATE_FORMAT_SIMPLE:ny}=U(),we=Us(),iy=or(),sy=Je();function oy(e,t=!1){if(t===!1)return e;let r=iy(e);if(!sy(r))return e;if(t===!0)return we(r,ny);let n=t.toUpperCase();if(n==="SYS:STANDARD")return we(r,ry);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?we(r,t):we(r,t.slice(4)):we(r,`UTC:${t}`)}});var mr=v((ap,Hs)=>{"use strict";Hs.exports=uy;function uy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[i.toLowerCase()]=s,t},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{}):{}:{}}});var br=v((dp,Js)=>{"use strict";Js.exports=fy;function fy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[s]=i.toUpperCase(),t},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[e[r]]=r.toUpperCase(),t),{default:"USERLVL"}):{}:{}}});var wr=v((hp,Ys)=>{"use strict";Ys.exports=ly;var cy=ue();function ly(e,t){return e=e.replace(/{if (.*?)}(.*?){end}/g,r),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function r(n,i,s){let o=cy(t,i);return o&&s.includes(i)?s.replace(new RegExp("{"+i+"}","g"),o):""}}});var Qe=v((yp,Xs)=>{"use strict";Xs.exports=ay;function ay(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var Se=v((gp,Zs)=>{"use strict";Zs.exports=dy;function dy({input:e,ident:t=" ",eol:r=`
25
- `}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=t+n[i];return n.join(r)}});var ro=v((pp,to)=>{"use strict";to.exports=py;var{LEVEL_NAMES:Qs}=U(),eo=ir(),hy=br(),yy=mr(),gy=Ue();function py(e){let t=e.crlf?`\r
24
+ `),R=Ql.bind(null,{[Bi]:"",[Di]:o,[qi]:A,[Mi]:Ht,[Jt]:_,[$i]:N}),X="";l!==null&&(y===void 0?X=R(l):X=R(Object.assign({},l,{name:y})));let Dr=u instanceof Function?u:u?Ki:Sa,Bo=Dr().indexOf(":")+1;if(w&&!a)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(j&&typeof j!="string")throw Error(`Unknown msgPrefix type "${typeof j}" - expected "string"`);Gl(h,a,w);let Mr=Fi(a,w);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:Mr,messageKey:f,errorKey:c}}),Yl(m);let Do=Jl(m);return Object.assign(t,{levels:Mr,[ya]:Do,[ga]:w,[oa]:n,[ia]:Dr,[sa]:Bo,[Mi]:Ht,[Jt]:_,[qi]:A,[fa]:q,[ca]:E,[la]:f,[aa]:c,[da]:d,[ma]:d?`,${JSON.stringify(d)}:{`:"",[Di]:o,[ha]:p,[ba]:b,[Bi]:X,[$i]:N,[pa]:O,silent:ta,onChild:T,[wa]:j}),Object.setPrototypeOf(t,Vl()),Hl(t),t[ua](h),t}I.exports=Yt;I.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Ni(e.dest||process.stdout.fd),Pi(e)):Pi({dest:Ni(e),minLength:0});I.exports.transport=Pt();I.exports.multistream=ji();I.exports.levels=Fi();I.exports.stdSerializers=xa;I.exports.stdTimeFunctions=Object.assign({},Ii);I.exports.symbols=ki;I.exports.version=ra;I.exports.default=Yt;I.exports.pino=Yt});var Zt=v(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var Ca=B("tty");function Ta(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Xt=Ta(Ca),{env:H={},argv:Ui=[],platform:Aa=""}=typeof process>"u"?{}:process,ja="NO_COLOR"in H||Ui.includes("--no-color"),Pa="FORCE_COLOR"in H||Ui.includes("--color"),Na=Aa==="win32",Gi=H.TERM==="dumb",Ba=Xt&&Xt.isatty&&Xt.isatty(1)&&H.TERM&&!Gi,Da="CI"in H&&("GITHUB_ACTIONS"in H||"GITLAB_CI"in H||"CIRCLECI"in H),Hi=!ja&&(Pa||Na&&!Gi||Ba||Da),Ji=(e,t,r,n,i=t.substring(0,e)+n,s=t.substring(e+r.length),o=s.indexOf(r))=>i+(o<0?s:Ji(o,s,r,n)),Ma=(e,t,r,n,i)=>e<0?r+t+n:r+Ji(e,t,n,i)+n,qa=(e,t,r=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?Ma((""+i).indexOf(t,n),i,e,t,r):"",C=(e,t,r)=>qa(`\x1B[${e}m`,`\x1B[${t}m`,r),Vi={reset:C(0,0),bold:C(1,22,"\x1B[22m\x1B[1m"),dim:C(2,22,"\x1B[22m\x1B[2m"),italic:C(3,23),underline:C(4,24),inverse:C(7,27),hidden:C(8,28),strikethrough:C(9,29),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),gray:C(90,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},Yi=({useColor:e=Hi}={})=>e?Vi:Object.keys(Vi).reduce((t,r)=>({...t,[r]:String}),{}),{reset:$a,bold:Ra,dim:Ia,italic:ka,underline:Fa,inverse:Wa,hidden:Ka,strikethrough:za,black:Va,red:Ua,green:Ga,yellow:Ha,blue:Ja,magenta:Ya,cyan:Xa,white:Za,gray:Qa,bgBlack:ed,bgRed:td,bgGreen:rd,bgYellow:nd,bgBlue:id,bgMagenta:sd,bgCyan:od,bgWhite:ud,blackBright:fd,redBright:cd,greenBright:ld,yellowBright:ad,blueBright:dd,magentaBright:hd,cyanBright:yd,whiteBright:gd,bgBlackBright:pd,bgRedBright:md,bgGreenBright:bd,bgYellowBright:wd,bgBlueBright:Sd,bgMagentaBright:Ed,bgCyanBright:vd,bgWhiteBright:Od}=Yi();L.bgBlack=ed;L.bgBlackBright=pd;L.bgBlue=id;L.bgBlueBright=Sd;L.bgCyan=od;L.bgCyanBright=vd;L.bgGreen=rd;L.bgGreenBright=bd;L.bgMagenta=sd;L.bgMagentaBright=Ed;L.bgRed=td;L.bgRedBright=md;L.bgWhite=ud;L.bgWhiteBright=Od;L.bgYellow=nd;L.bgYellowBright=wd;L.black=Va;L.blackBright=fd;L.blue=Ja;L.blueBright=dd;L.bold=Ra;L.createColors=Yi;L.cyan=Xa;L.cyanBright=yd;L.dim=Ia;L.gray=Qa;L.green=Ga;L.greenBright=ld;L.hidden=Ka;L.inverse=Wa;L.isColorSupported=Hi;L.italic=ka;L.magenta=Ya;L.magentaBright=hd;L.red=Ua;L.redBright=cd;L.reset=$a;L.strikethrough=za;L.underline=Fa;L.white=Za;L.whiteBright=gd;L.yellow=Ha;L.yellowBright=ad});var Qi=v((Ug,Zi)=>{Zi.exports=Xi;function Xi(e,t){if(e&&t)return Xi(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(u){s[u]=o[u]}),s}}});var er=v((Gg,Qt)=>{var es=Qi();Qt.exports=es(We);Qt.exports.strict=es(ts);We.proto=We(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return We(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ts(this)},configurable:!0})});function We(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function ts(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var is=v((Hg,ns)=>{var _d=er(),Ld=function(){},xd=global.Bare?queueMicrotask:process.nextTick.bind(process),Cd=function(e){return e.setHeader&&typeof e.abort=="function"},Td=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},rs=function(e,t,r){if(typeof t=="function")return rs(e,null,t);t||(t={}),r=_d(r||Ld);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,f=function(){e.writable||c()},c=function(){o=!1,s||r.call(e)},d=function(){s=!1,o||r.call(e)},l=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},y=function(p){r.call(e,p)},h=function(){xd(a)},a=function(){if(!u){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",c)};return Cd(e)?(e.on("complete",c),e.on("abort",h),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",f),e.on("close",f)),Td(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),t.error!==!1&&e.on("error",y),e.on("close",h),function(){u=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",h)}};ns.exports=rs});var us=v((Jg,os)=>{var Ad=er(),jd=is(),Ke;try{Ke=B("fs")}catch{}var pe=function(){},Pd=typeof process>"u"?!1:/^v?\.0/.test(process.version),ze=function(e){return typeof e=="function"},Nd=function(e){return!Pd||!Ke?!1:(e instanceof(Ke.ReadStream||pe)||e instanceof(Ke.WriteStream||pe))&&ze(e.close)},Bd=function(e){return e.setHeader&&ze(e.abort)},Dd=function(e,t,r,n){n=Ad(n);var i=!1;e.on("close",function(){i=!0}),jd(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Nd(e))return e.close(pe);if(Bd(e))return e.abort();if(ze(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},ss=function(e){e()},Md=function(e,t){return e.pipe(t)},qd=function(){var e=Array.prototype.slice.call(arguments),t=ze(e[e.length-1]||pe)&&e.pop()||pe;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,u=s>0;return Dd(i,o,u,function(f){r||(r=f),f&&n.forEach(ss),!o&&(n.forEach(ss),t(r))})});return e.reduce(Md)};os.exports=qd});var as=v((Yg,ls)=>{"use strict";var{Transform:$d}=B("stream"),{StringDecoder:Rd}=B("string_decoder"),J=Symbol("last"),Ve=Symbol("decoder");function Id(e,t,r){let n;if(this.overflow){if(n=this[Ve].write(e).split(this.matcher),n.length===1)return r();n.shift(),this.overflow=!1}else this[J]+=this[Ve].write(e),n=this[J].split(this.matcher);this[J]=n.pop();for(let i=0;i<n.length;i++)try{cs(this,this.mapper(n[i]))}catch(s){return r(s)}if(this.overflow=this[J].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function kd(e){if(this[J]+=this[Ve].end(),this[J])try{cs(this,this.mapper(this[J]))}catch(t){return e(t)}e()}function cs(e,t){t!==void 0&&e.push(t)}function fs(e){return e}function Fd(e,t,r){switch(e=e||/\r?\n/,t=t||fs,r=r||{},arguments.length){case 1:typeof e=="function"?(t=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(r=e,e=/\r?\n/);break;case 2:typeof e=="function"?(r=t,t=e,e=/\r?\n/):typeof t=="object"&&(r=t,t=fs)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=Id,r.flush=kd,r.readableObjectMode=!0;let n=new $d(r);return n[J]="",n[Ve]=new Rd("utf8"),n.matcher=e,n.mapper=t,n.maxLength=r.maxLength,n.skipOverflow=r.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,s){this._writableState.errorEmitted=!1,s(i)},n}ls.exports=Fd});var ps=v((Xg,gs)=>{"use strict";var ds=Symbol.for("pino.metadata"),Wd=as(),{Duplex:Kd}=B("stream"),{parentPort:hs,workerData:ys}=B("worker_threads");function zd(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}gs.exports=function(t,r={}){let n=r.expectPinoConfig===!0&&ys?.workerData?.pinoWillSendConfig===!0,i=r.parse==="lines",s=typeof r.parseLine=="function"?r.parseLine:JSON.parse,o=r.close||Vd,u=Wd(function(c){let d;try{d=s(c)}catch(l){this.emit("unknown",c,l);return}if(d===null){this.emit("unknown",c,"Null value ignored");return}return typeof d!="object"&&(d={data:d,time:Date.now()}),u[ds]&&(u.lastTime=d.time,u.lastLevel=d.level,u.lastObj=d),i?c:d},{autoDestroy:!0});if(u._destroy=function(c,d){let l=o(c,d);l&&typeof l.then=="function"&&l.then(d,d)},r.expectPinoConfig===!0&&ys?.workerData?.pinoWillSendConfig!==!0&&setImmediate(()=>{u.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),r.metadata!==!1&&(u[ds]=!0,u.lastTime=0,u.lastLevel=0,u.lastObj=null),n){let c={},d=zd();return hs.on("message",function l(y){y.code==="PINO_CONFIG"&&(c=y.config,d.resolve(),hs.off("message",l))}),Object.defineProperties(u,{levels:{get(){return c.levels}},messageKey:{get(){return c.messageKey}},errorKey:{get(){return c.errorKey}}}),d.then(f)}return f();function f(){let c=t(u);if(c&&typeof c.catch=="function")c.catch(d=>{u.destroy(d)}),c=null;else if(r.enablePipelining&&c)return Kd.from({writable:u,readable:c});return u}};function Vd(e,t){process.nextTick(t,e)}});var U=v((Zg,ms)=>{"use strict";ms.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var Ue=v((Qg,Ss)=>{"use strict";Ss.exports=Ud;var{LEVELS:bs,LEVEL_NAMES:ws}=U();function Ud(e,t,r){let n=e?t||bs:Object.assign({},bs,t),i=e?r||ws:Object.assign({},ws,r);return function(s){let o="default";return Number.isInteger(+s)?o=Object.prototype.hasOwnProperty.call(n,s)?s:o:o=Object.prototype.hasOwnProperty.call(i,s.toLowerCase())?i[s.toLowerCase()]:o,[n[o],o]}}});var ir=v((ep,_s)=>{"use strict";var V=e=>e,Ge={default:V,60:V,50:V,40:V,30:V,20:V,10:V,message:V,greyMessage:V,property:V},{createColors:Es}=Zt(),Gd=Ue(),be=Es({useColor:!0}),{white:tr,bgRed:Hd,red:Jd,yellow:Yd,green:Xd,blue:Zd,gray:rr,cyan:vs,magenta:Os}=be,me={default:tr,60:Hd,50:Jd,40:Yd,30:Xd,20:Zd,10:rr,message:vs,greyMessage:rr,property:Os};function Qd(e){return e.reduce(function(t,[r,n]){return t[r]=typeof be[n]=="function"?be[n]:tr,t},{default:tr,message:vs,greyMessage:rr,property:Os})}function nr(e){return function(t,r,{customLevels:n,customLevelNames:i}={}){let[s,o]=Gd(e,n,i)(t);return Object.prototype.hasOwnProperty.call(r,o)?r[o](s):r.default(s)}}function eh(e){let t=nr(e),r=function(n,i){return t(n,Ge,i)};return r.message=Ge.message,r.greyMessage=Ge.greyMessage,r.property=Ge.property,r.colors=Es({useColor:!1}),r}function th(e){let t=nr(e),r=function(n,i){return t(n,me,i)};return r.message=me.message,r.property=me.property,r.greyMessage=me.greyMessage,r.colors=be,r}function rh(e,t){let r=Qd(e),n=t?r:Object.assign({},me,r),i=nr(t),s=function(o,u){return i(o,n,u)};return s.colors=be,s.message=s.message||n.message,s.property=s.property||n.property,s.greyMessage=s.greyMessage||n.greyMessage,s}_s.exports=function(t=!1,r,n){return t&&r!==void 0?rh(r,n):t?th(n):eh(n)}});var sr=v((tp,Ls)=>{"use strict";Ls.exports=function(){}});var Cs=v((rp,xs)=>{"use strict";xs.exports=sh;var{isMainThread:nh}=B("node:worker_threads"),ih=Ot(),He=sr();function sh(e){let t=new ih(e);return t.on("error",r),!e.sync&&nh&&oh(t),t;function r(n){if(n.code==="EPIPE"){t.write=He,t.end=He,t.flushSync=He,t.destroy=He;return}t.removeListener("error",r)}}function oh(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=Ne();t.register(e,uh),e.on("close",function(){t.unregister(e)})}}function uh(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var Je=v((np,Ts)=>{"use strict";Ts.exports=fh;function fh(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var or=v((ip,As)=>{"use strict";As.exports=lh;var ch=Je();function lh(e){let t=new Date(e);return ch(t)||(t=new Date(+e)),t}});var Ye=v((sp,js)=>{"use strict";js.exports=ah;function ah(e){let t=[],r=!1,n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"){r=!0;continue}if(r){r=!1,n+=s;continue}if(s==="."){t.push(n),n="";continue}n+=s}return n.length&&t.push(n),t}});var ue=v((op,Ps)=>{"use strict";Ps.exports=hh;var dh=Ye();function hh(e,t){let r=Array.isArray(t)?t:dh(t);for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var ur=v((up,Ns)=>{"use strict";Ns.exports=ph;var yh=ue(),gh=Ye();function ph(e,t){let r=gh(t),n=r.pop();e=yh(e,r),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Ks=v(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var mh=Function.prototype.toString,fr=Object.create,bh=Object.prototype.toString,wh=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function Sh(){return new wh}function Eh(){return new WeakMap}var vh=typeof WeakMap<"u"?Eh:Sh;function lr(e){if(!e)return fr(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:fr(e);if(t&&~mh.call(t).indexOf("[native code]"))try{return new t}catch{}return fr(e)}function Oh(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function _h(e){return e.flags}var Lh=/test/g.flags==="g"?_h:Oh;function Bs(e){var t=bh.call(e);return t.substring(8,t.length-1)}function xh(e){return e[Symbol.toStringTag]||Bs(e)}var Ch=typeof Symbol<"u"?xh:Bs,Th=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyNames,ar=Object.getOwnPropertySymbols,Ms=Object.prototype,qs=Ms.hasOwnProperty,jh=Ms.propertyIsEnumerable,$s=typeof ar=="function";function Ph(e){return Ds(e).concat(ar(e))}var Nh=$s?Ph:Ds;function Ze(e,t,r){for(var n=Nh(e),i=0,s=n.length,o=void 0,u=void 0;i<s;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(u=Ah(e,o),!u){t[o]=r.copier(e[o],r);continue}!u.get&&!u.set&&(u.value=r.copier(u.value,r));try{Th(t,o,u)}catch{t[o]=u.value}}return t}function Bh(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function Dh(e,t){var r=new t.Constructor;return t.cache.set(e,r),Ze(e,r,t)}function Rs(e,t){return e.slice(0)}function Mh(e,t){return e.slice(0,e.size,e.type)}function qh(e,t){return new t.Constructor(Rs(e.buffer))}function $h(e,t){return new t.Constructor(e.getTime())}function Is(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function Rh(e,t){return Ze(e,Is(e,t),t)}function Ih(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function kh(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=ar(e),s=0,o=i.length,u=void 0;s<o;++s)u=i[s],jh.call(e,u)&&(r[u]=t.copier(e[u],t));return r}var Fh=$s?kh:Ih;function Wh(e,t){var r=lr(t.prototype);return t.cache.set(e,r),Ze(e,r,t)}function cr(e,t){return new t.Constructor(e.valueOf())}function Kh(e,t){var r=new t.Constructor(e.source,Lh(e));return r.lastIndex=e.lastIndex,r}function Xe(e,t){return e}function ks(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function zh(e,t){return Ze(e,ks(e,t),t)}var Vh=Array.isArray,dr=Object.assign,Uh=Object.getPrototypeOf||(function(e){return e.__proto__}),Fs={array:Bh,arrayBuffer:Rs,blob:Mh,dataView:qh,date:$h,error:Xe,map:Is,object:Fh,regExp:Kh,set:ks},Gh=dr({},Fs,{array:Dh,map:Rh,object:Wh,set:zh});function Hh(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:cr,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:cr,Object:e.object,Promise:Xe,RegExp:e.regExp,Set:e.set,String:cr,WeakMap:Xe,WeakSet:Xe,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function hr(e){var t=dr({},Fs,e),r=Hh(t),n=r.Array,i=r.Object;function s(o,u){if(u.prototype=u.Constructor=void 0,!o||typeof o!="object")return o;if(u.cache.has(o))return u.cache.get(o);if(u.prototype=Uh(o),u.Constructor=u.prototype&&u.prototype.constructor,!u.Constructor||u.Constructor===Object)return i(o,u);if(Vh(o))return n(o,u);var f=r[Ch(o)];return f?f(o,u):typeof o.then=="function"?o:i(o,u)}return function(u){return s(u,{Constructor:void 0,cache:vh(),copier:s,prototype:void 0})}}function Ws(e){return hr(dr({},Gh,e))}var Jh=Ws({}),Yh=hr({});fe.copyStrict=Jh;fe.createCopier=hr;fe.createStrictCopier=Ws;fe.default=Yh});var yr=v((cp,zs)=>{"use strict";zs.exports=ey;var{createCopier:Xh}=Ks(),Zh=Xh({}),Qh=ur();function ey({log:e,context:t}){let{ignoreKeys:r,includeKeys:n}=t,i=Zh(e);if(n){let s={};return n.forEach(o=>{s[o]=i[o]}),s}return r.forEach(s=>{Qh(i,s)}),i}});var Us=v((gr,Vs)=>{"use strict";function ce(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(r){return typeof r}:ce=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ce(e)}(function(e){var t=arguments,r=(function(){var f=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(l,y,h,a){if(t.length===1&&u(l)==="string"&&!/\d/.test(l)&&(y=l,l=void 0),l=l||l===0?l:new Date,l instanceof Date||(l=new Date(l)),isNaN(l))throw TypeError("Invalid date");y=String(r.masks[y]||y||r.masks.default);var m=y.slice(0,4);(m==="UTC:"||m==="GMT:")&&(y=y.slice(4),h=!0,m==="GMT:"&&(a=!0));var p=function(){return h?"getUTC":"get"},b=function(){return l[p()+"Date"]()},w=function(){return l[p()+"Day"]()},S=function(){return l[p()+"Month"]()},O=function(){return l[p()+"FullYear"]()},x=function(){return l[p()+"Hours"]()},P=function(){return l[p()+"Minutes"]()},T=function(){return l[p()+"Seconds"]()},j=function(){return l[p()+"Milliseconds"]()},_=function(){return h?0:l.getTimezoneOffset()},N=function(){return s(l)},D=function(){return o(l)},A={d:function(){return b()},dd:function(){return n(b())},ddd:function(){return r.i18n.dayNames[w()]},DDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()],short:!0})},dddd:function(){return r.i18n.dayNames[w()+7]},DDDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()+7]})},m:function(){return S()+1},mm:function(){return n(S()+1)},mmm:function(){return r.i18n.monthNames[S()]},mmmm:function(){return r.i18n.monthNames[S()+12]},yy:function(){return String(O()).slice(2)},yyyy:function(){return n(O(),4)},h:function(){return x()%12||12},hh:function(){return n(x()%12||12)},H:function(){return x()},HH:function(){return n(x())},M:function(){return P()},MM:function(){return n(P())},s:function(){return T()},ss:function(){return n(T())},l:function(){return n(j(),3)},L:function(){return n(Math.floor(j()/10))},t:function(){return x()<12?r.i18n.timeNames[0]:r.i18n.timeNames[1]},tt:function(){return x()<12?r.i18n.timeNames[2]:r.i18n.timeNames[3]},T:function(){return x()<12?r.i18n.timeNames[4]:r.i18n.timeNames[5]},TT:function(){return x()<12?r.i18n.timeNames[6]:r.i18n.timeNames[7]},Z:function(){return a?"GMT":h?"UTC":(String(l).match(c)||[""]).pop().replace(d,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60)*100+Math.abs(_())%60,4)},p:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60),2)+":"+n(Math.floor(Math.abs(_())%60),2)},S:function(){return["th","st","nd","rd"][b()%10>3?0:(b()%100-b()%10!=10)*b()%10]},W:function(){return N()},WW:function(){return n(N())},N:function(){return D()}};return y.replace(f,function(E){return E in A?A[E]():E.slice(1,E.length-1)})}})();r.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},r.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(c,d){for(c=String(c),d=d||2;c.length<d;)c="0"+c;return c},i=function(c){var d=c.y,l=c.m,y=c.d,h=c._,a=c.dayName,m=c.short,p=m===void 0?!1:m,b=new Date,w=new Date;w.setDate(w[h+"Date"]()-1);var S=new Date;S.setDate(S[h+"Date"]()+1);var O=function(){return b[h+"Date"]()},x=function(){return b[h+"Month"]()},P=function(){return b[h+"FullYear"]()},T=function(){return w[h+"Date"]()},j=function(){return w[h+"Month"]()},_=function(){return w[h+"FullYear"]()},N=function(){return S[h+"Date"]()},D=function(){return S[h+"Month"]()},A=function(){return S[h+"FullYear"]()};return P()===d&&x()===l&&O()===y?p?"Tdy":"Today":_()===d&&j()===l&&T()===y?p?"Ysd":"Yesterday":A()===d&&D()===l&&N()===y?p?"Tmw":"Tomorrow":a},s=function(c){var d=new Date(c.getFullYear(),c.getMonth(),c.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var l=new Date(d.getFullYear(),0,4);l.setDate(l.getDate()-(l.getDay()+6)%7+3);var y=d.getTimezoneOffset()-l.getTimezoneOffset();d.setHours(d.getHours()-y);var h=(d-l)/(864e5*7);return 1+Math.floor(h)},o=function(c){var d=c.getDay();return d===0&&(d=7),d},u=function(c){return c===null?"null":c===void 0?"undefined":ce(c)!=="object"?ce(c):Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return r}):(typeof gr>"u"?"undefined":ce(gr))==="object"?Vs.exports=r:e.dateFormat=r})(void 0)});var pr=v((lp,Gs)=>{"use strict";Gs.exports=sy;var{DATE_FORMAT:ty,DATE_FORMAT_SIMPLE:ry}=U(),we=Us(),ny=or(),iy=Je();function sy(e,t=!1){if(t===!1)return e;let r=ny(e);if(!iy(r))return e;if(t===!0)return we(r,ry);let n=t.toUpperCase();if(n==="SYS:STANDARD")return we(r,ty);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?we(r,t):we(r,t.slice(4)):we(r,`UTC:${t}`)}});var mr=v((ap,Hs)=>{"use strict";Hs.exports=oy;function oy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[i.toLowerCase()]=s,t},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{}):{}:{}}});var br=v((dp,Js)=>{"use strict";Js.exports=uy;function uy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[s]=i.toUpperCase(),t},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[e[r]]=r.toUpperCase(),t),{default:"USERLVL"}):{}:{}}});var wr=v((hp,Ys)=>{"use strict";Ys.exports=cy;var fy=ue();function cy(e,t){return e=e.replace(/{if (.*?)}(.*?){end}/g,r),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function r(n,i,s){let o=fy(t,i);return o&&s.includes(i)?s.replace(new RegExp("{"+i+"}","g"),o):""}}});var Qe=v((yp,Xs)=>{"use strict";Xs.exports=ly;function ly(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var Se=v((gp,Zs)=>{"use strict";Zs.exports=ay;function ay({input:e,ident:t=" ",eol:r=`
25
+ `}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=t+n[i];return n.join(r)}});var ro=v((pp,to)=>{"use strict";to.exports=gy;var{LEVEL_NAMES:Qs}=U(),eo=ir(),dy=br(),hy=mr(),yy=Ue();function gy(e){let t=e.crlf?`\r
26
26
  `:`
27
- `,r=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:s,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,singleLine:y,timestampKey:h,translateTime:a}=e,m=e.errorProps.split(","),p=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",b=hy(e.customLevels),w=yy(e.customLevels),S=gy(p,b,w),O;if(e.customColors)if(typeof e.customColors=="string")O=e.customColors.split(",").reduce((N,D)=>{let[A,E]=D.split(":"),R=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],X=R!==void 0?R:A;return N.push([X,E]),N},[]);else if(typeof e.customColors=="object")O=Object.keys(e.customColors).reduce((N,D)=>{let[A,E]=[D,e.customColors[D]],R=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],X=R!==void 0?R:A;return N.push([X,E]),N},[]);else throw new Error("options.customColors must be of type string or object.");let x={customLevels:b,customLevelNames:w};p===!0&&!e.customLevels&&(x.customLevels=void 0,x.customLevelNames=void 0);let P=e.include!==void 0?new Set(e.include.split(",")):void 0,T=!P&&e.ignore?new Set(e.ignore.split(",")):void 0,j=eo(e.colorize,O,p),_=e.colorizeObjects?j:eo(!1,[],!1);return{EOL:t,IDENT:r,colorizer:j,customColors:O,customLevelNames:w,customLevels:b,customPrettifiers:n,customProperties:x,errorLikeObjectKeys:i,errorProps:m,getLevelLabelData:S,hideObject:s,ignoreKeys:T,includeKeys:P,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,objectColorizer:_,singleLine:y,timestampKey:h,translateTime:a,useOnlyCustomProps:p}}});var fo=v((mp,uo)=>{uo.exports=Ee;Ee.default=Ee;Ee.stable=so;Ee.stableStringify=so;var et="[...]",no="[Circular]",ne=[],re=[];function io(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ee(e,t,r,n){typeof n>"u"&&(n=io()),Sr(e,"",0,[],void 0,0,n);var i;try{re.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var s=ne.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function le(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),ne.push([n,r,t,i])):re.push([t,r,e]):(n[r]=e,ne.push([n,r,t]))}function Sr(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Sr(e[u],u,u,n,e,s,o);else{var f=Object.keys(e);for(u=0;u<f.length;u++){var c=f[u];Sr(e[c],c,u,n,e,s,o)}}n.pop()}}function my(e,t){return e<t?-1:e>t?1:0}function so(e,t,r,n){typeof n>"u"&&(n=io());var i=Er(e,"",0,[],void 0,0,n)||e,s;try{re.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var o=ne.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Er(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Er(e[u],u,u,n,e,s,o);else{var f={},c=Object.keys(e).sort(my);for(u=0;u<c.length;u++){var d=c[u];Er(e[d],d,u,n,e,s,o),f[d]=e[d]}if(typeof i<"u")ne.push([i,t,e]),i[t]=f;else return f}n.pop()}}function oo(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(re.length>0)for(var n=0;n<re.length;n++){var i=re[n];if(i[1]===t&&i[0]===r){r=i[2],re.splice(n,1);break}}return e.call(this,t,r)}}});var vr=v((bp,co)=>{"use strict";co.exports=wy;var by=Se();function wy({keyName:e,lines:t,eol:r,ident:n}){let i="",s=by({input:t,ident:n,eol:r}),o=`${n}${e}: ${s}${r}`.split(r);for(let u=0;u<o.length;u+=1){u!==0&&(i+=r);let f=o[u];if(/^\s*"stack"/.test(f)){let c=/^(\s*"stack":)\s*(".*"),?$/.exec(f);if(c&&c.length===3){let d=/^\s*/.exec(f)[0].length+4,l=" ".repeat(d),y=c[2];i+=c[1]+r+l+JSON.parse(y).replace(/\n/g,r+l)}else i+=f}else i+=f}return i}});var tt=v((wp,lo)=>{"use strict";lo.exports=Oy;var{LOGGER_KEYS:Sy}=U(),Or=fo(),Ey=Se(),vy=vr();function Oy({log:e,excludeLoggerKeys:t=!0,skipKeys:r=[],context:n}){let{EOL:i,IDENT:s,customPrettifiers:o,errorLikeObjectKeys:u,objectColorizer:f,singleLine:c,colorizer:d}=n,l=[].concat(r);t===!0&&Array.prototype.push.apply(l,Sy);let y="",{plain:h,errors:a}=Object.entries(e).reduce(({plain:m,errors:p},[b,w])=>{if(l.includes(b)===!1){let S=typeof o[b]=="function"?o[b](w,b,e,{colors:d.colors}):w;u.includes(b)?p[b]=S:m[b]=S}return{plain:m,errors:p}},{plain:{},errors:{}});return c?(Object.keys(h).length>0&&(y+=f.greyMessage(Or(h))),y+=i,y=y.replace(/\\\\/gi,"\\")):Object.entries(h).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);if(b===void 0)return;b=b.replace(/\\\\/gi,"\\");let w=Ey({input:b,ident:s,eol:i});y+=`${s}${f.property(m)}:${w.startsWith(i)?"":" "}${w}${i}`}),Object.entries(a).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);b!==void 0&&(y+=vy({keyName:m,lines:b,eol:i,ident:s}))}),y}});var _r=v((Sp,ao)=>{"use strict";ao.exports=Ty;var{LOGGER_KEYS:_y}=U(),Ly=Qe(),xy=Se(),Cy=tt();function Ty({log:e,context:t}){let{EOL:r,IDENT:n,errorProps:i,messageKey:s}=t,o=e.stack,u=xy({input:o,ident:n,eol:r}),f=`${n}${u}${r}`;if(i.length>0){let c=_y.concat(s,"type","stack"),d;i[0]==="*"?d=Object.keys(e).filter(l=>c.includes(l)===!1):d=i.filter(l=>c.includes(l)===!1);for(let l=0;l<d.length;l+=1){let y=d[l];if(y in e){if(Ly(e[y])){let h=Cy({log:e[y],excludeLoggerKeys:!1,context:{...t,IDENT:n+n}});f=`${f}${n}${y}: {${r}${h}${n}}${r}`;continue}f=`${f}${n}${y}: ${e[y]}${r}`}}}return f}});var Lr=v((Ep,ho)=>{"use strict";ho.exports=jy;var Ay=ue();function jy({log:e,context:t}){let{colorizer:r,customLevels:n,customLevelNames:i,levelKey:s,getLevelLabelData:o}=t,u=t.customPrettifiers?.level,f=Ay(e,s);if(f===void 0)return;let c=r(f,{customLevels:n,customLevelNames:i});if(u){let[d]=o(f);return u(f,s,e,{label:d,labelColorized:c,colors:r.colors})}return c}});var xr=v((vp,go)=>{"use strict";go.exports=By;var{LEVELS:Py}=U(),yo=ue(),Ny=wr();function By({log:e,context:t}){let{colorizer:r,customLevels:n,levelKey:i,levelLabel:s,messageFormat:o,messageKey:u,useOnlyCustomProps:f}=t;if(o&&typeof o=="string"){let c=Ny(o,e),d=String(c).replace(/{([^{}]+)}/g,function(l,y){let h;return y===s&&(h=yo(e,i))!==void 0?(f?n===void 0:n[h]===void 0)?Py[h]:n[h]:yo(e,y)||""});return r.message(d)}if(o&&typeof o=="function"){let c=o(e,u,s,{colors:r.colors});return r.message(c)}if(u in e&&!(typeof e[u]!="string"&&typeof e[u]!="number"&&typeof e[u]!="boolean"))return r.message(e[u])}});var Cr=v((Op,po)=>{"use strict";po.exports=Dy;function Dy({log:e,context:t}){let{customPrettifiers:r,colorizer:n}=t,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=r.name?r.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let s=r.pid?r.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+s:i+=s}if(e.hostname){let s=r.hostname?r.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${s}`}i+=")"}if(e.caller){let s=r.caller?r.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${s}>`}if(i!=="")return i}});var Tr=v((_p,mo)=>{"use strict";mo.exports=qy;var My=pr();function qy({log:e,context:t}){let{timestampKey:r,translateTime:n}=t,i=t.customPrettifiers?.time,s=null;if(r in e?s=e[r]:"timestamp"in e&&(s=e.timestamp),s===null)return;let o=n?My(s,n):s;return i?i(o):`[${o}]`}});var wo=v((Lp,bo)=>{"use strict";bo.exports={buildSafeSonicBoom:Cs(),createDate:or(),deleteLogProperty:ur(),filterLog:yr(),formatTime:pr(),getPropertyValue:ue(),handleCustomLevelsNamesOpts:mr(),handleCustomLevelsOpts:br(),interpretConditionals:wr(),isObject:Qe(),isValidDate:Je(),joinLinesWithIndentation:Se(),noop:sr(),parseFactoryOptions:ro(),prettifyErrorLog:_r(),prettifyError:vr(),prettifyLevel:Lr(),prettifyMessage:xr(),prettifyMetadata:Cr(),prettifyObject:tt(),prettifyTime:Tr(),splitPropertyKey:Ye(),getLevelLabelData:Ue()}});var _o=v((xp,ae)=>{"use strict";var $y=typeof Buffer<"u",So=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Eo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function vo(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),$y&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(So.test(e)===!1&&Eo.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(So.test(e)===!1)return n}else if(Eo.test(e)===!1)return n;return Oo(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function Oo(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let u in o){let f=o[u];f&&typeof f=="object"&&i.push(f)}}}return e}function Ar(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return vo(e,t,r)}finally{Error.stackTraceLimit=n}}function Ry(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return vo(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}ae.exports=Ar;ae.exports.default=Ar;ae.exports.parse=Ar;ae.exports.safeParse=Ry;ae.exports.scan=Oo});var Co=v((Cp,xo)=>{"use strict";xo.exports=Yy;var Iy=_o(),Lo=Qe(),ky=_r(),Fy=Lr(),Wy=xr(),Ky=Cr(),zy=tt(),Vy=Tr(),Uy=yr(),{LEVELS:Gy,LEVEL_KEY:Hy,LEVEL_NAMES:jr}=U(),Jy=e=>{try{return{value:Iy.parse(e,{protoAction:"remove"})}}catch(t){return{err:t}}};function Yy(e){let t;if(Lo(e))t=e;else{let u=Jy(e);if(u.err||!Lo(u.value))return e+this.EOL;t=u.value}if(this.minimumLevel){let u;this.useOnlyCustomProps?u=this.customLevels:u=this.customLevelNames[this.minimumLevel]!==void 0;let f;if(u?f=this.customLevelNames[this.minimumLevel]:f=jr[this.minimumLevel],f||(f=typeof this.minimumLevel=="string"?jr[this.minimumLevel]:jr[Gy[this.minimumLevel].toLowerCase()]),t[this.levelKey===void 0?Hy:this.levelKey]<f)return}let r=Wy({log:t,context:this.context});(this.ignoreKeys||this.includeKeys)&&(t=Uy({log:t,context:this.context}));let n=Fy({log:t,context:{...this.context,...this.context.customProperties}}),i=Ky({log:t,context:this.context}),s=Vy({log:t,context:this.context}),o="";if(this.levelFirst&&n&&(o=`${n}`),s&&o===""?o=`${s}`:s&&(o=`${o} ${s}`),!this.levelFirst&&n&&(o.length>0?o=`${o} ${n}`:o=n),i&&(o.length>0?o=`${o} ${i}:`:o=i),o.endsWith(":")===!1&&o!==""&&(o+=":"),r!==void 0&&(o.length>0?o=`${o} ${r}`:o=r),o.length>0&&!this.singleLine&&(o+=this.EOL),t.type==="Error"&&typeof t.stack=="string"){let u=ky({log:t,context:this.context});this.singleLine&&(o+=this.EOL),o+=u}else if(this.hideObject===!1){let u=[this.messageKey,this.levelKey,this.timestampKey].map(c=>c.replaceAll(/\\/g,"")).filter(c=>typeof t[c]=="string"||typeof t[c]=="number"||typeof t[c]=="boolean"),f=zy({log:t,skipKeys:u,context:this.context});this.singleLine&&!/^\s$/.test(f)&&(o+=" "),o+=f}return o}});var jo=v((Tp,Y)=>{"use strict";var{isColorSupported:To}=Zt(),Xy=us(),{Transform:Zy}=B("node:stream"),Qy=ps(),eg=ir(),{ERROR_LIKE_KEYS:Ao,LEVEL_KEY:tg,LEVEL_LABEL:rg,MESSAGE_KEY:ng,TIMESTAMP_KEY:ig}=U(),{buildSafeSonicBoom:sg,parseFactoryOptions:og}=wo(),ug=Co(),fg={colorize:To,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:Ao,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:tg,levelLabel:rg,messageFormat:null,messageKey:ng,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:ig,translateTime:!0,useOnlyCustomProps:!0};function Pr(e){let t=og(Object.assign({},fg,e));return ug.bind({...t,context:t})}function rt(e={}){let t=Pr(e),r;return Qy(function(n){n.on("message",function s(o){!o||o.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:o.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||Ao,o.config.errorKey])),customLevels:o.config.levels.values}),t=Pr(e),n.off("message",s))});let i=new Zy({objectMode:!0,autoDestroy:!0,transform(s,o,u){let f=t(s);u(null,f)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?r=e.destination:r=sg({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(s){r.write(s+`
28
- `)}),Xy(n,i,r),i},{parse:"lines",close(n,i){r.on("close",()=>{i(n)})}})}Y.exports=rt;Y.exports.build=rt;Y.exports.PinoPretty=rt;Y.exports.prettyFactory=Pr;Y.exports.colorizerFactory=eg;Y.exports.isColorSupported=To;Y.exports.default=rt});var Wo=Object.defineProperty,Ko=(e,t,r)=>t in e?Wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ir=(e,t,r)=>Ko(e,typeof t!="symbol"?t+"":t,r),zo=/([\p{Ll}\d])(\p{Lu})/gu,Vo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,Uo=/(\d)\p{Ll}|(\p{L})\d/u,Go=/[^\p{L}\d]+/giu,Rr="$1\0$2";function kr(e){let t=e.trim();t=t.replace(zo,Rr).replace(Vo,Rr),t=t.replace(Go,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function Ho(e){let t=kr(e);for(let r=0;r<t.length;r++){let n=t[r],i=Uo.exec(n);if(i){let s=i.index+(i[1]??i[2]).length;t.splice(r,1,n.slice(0,s),n.slice(s))}}return t}function Jo(e,t){let[r,n,i]=Xo(e,t);return r+n.map(Yo(t?.locale)).join(t?.delimiter??"_")+i}function Yo(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Xo(e,t={}){let r=t.split??(t.separateNumbers?Ho:kr),n=t.prefixCharacters??"",i=t.suffixCharacters??"",s=0,o=e.length;for(;s<e.length;){let u=e.charAt(s);if(!n.includes(u))break;s++}for(;o>s;){let u=o-1,f=e.charAt(u);if(!i.includes(f))break;o=u}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}var Zo=class it{constructor(t){Ir(this,"serviceName"),this.serviceName=Jo(t)}log(t,...r){let{color:n,reset:i}=it.getColor(t),s=[it.getSymbols(t)+"{ENV}",n+`[${this.serviceName}]:`+i,...r];t==="success"?console.log(...s):console[t](...s)}static getColor(t){let r="\x1B[34m";return t==="success"&&(r="\x1B[32m"),t==="warn"&&(r="\x1B[33m"),t==="error"&&(r="\x1B[31m"),{color:r,reset:"\x1B[0m"}}static getSymbols(t){let{color:r,reset:n}=this.getColor(t);return t==="success"?r+" \u2714 "+n:t==="warn"?r+" \u25B2 "+n:t==="error"?r+" \u2717 "+n:r+" \uFFEE "+n}};function Fr(...e){return e.reduce((t,r)=>({...t,...r}),{})}var Wr=class extends Zo{constructor(e,t){super(e),this.variables=t,Ir(this,"env",new Map),this.validate(),this.load()}validate(){let e=Object.keys(this.variables);for(let t of e){let r=this.variables[t],n=process.env[t];if(n==null){r.default?this.log("warn",`'${t}' not exists and default:`,r.default):this.log("error",`'${t}' not exists and not have defaults`);continue}if(r.type==="number"&&isNaN(Number(n))){this.log("warn",`is '${typeof n}', but must 'number'`);continue}if(r.type==="boolean"&&n!=="true"&&n!=="false"){this.log("warn",`'${t}' should be boolean ('true' or 'false')`);continue}this.log("success",`'${t}' successfully loaded`)}}load(){let e=Object.keys(this.variables);for(let t of e)this.$(t,!1);this.env.set("SERVICE_NAME",this.serviceName)}$(e,t=!0){if(t&&this.env.has(String(e)))return this.env.get(String(e));let r=this.variables[e],n=process.env[e]||r.default;return r.type==="number"&&(n=Number(n)),r.type==="boolean"&&(n=n==="true"),r.type==="string"&&(n=String(n)),this.env.set(String(e),n),n}};var Kr={NODE_ENV:{type:"string",default:"development"},LOG_LEVEL:{type:"string",default:"info"},SERVICE_NAME:{type:"string",default:"UNKNOWN"}};var Nr=$r(zi(),1),Br=$r(jo(),1);var Po=(e,t)=>{if("timing"in e){let r=e.timing;return{...e,timing:{...Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.toFixed(2)+"ms"])),total:Object.values(r).reduce((n,i)=>n+i,0).toFixed(2)+"ms"}}}return{...e,duration:t}};async function cg(e,t){let r=performance.now(),n=e.type==="render"?"Rendering":"Getting data",i={route:e.route,...e.type==="get-data"&&e.functionName?{functionName:e.functionName}:{}};nt.debug(i,`${n} start`);let s=o=>{let u=performance.now()-r;r=performance.now(),i.timing??(i.timing={}),i.timing[String(o)]=u};try{let o=await Promise.resolve(t(s)),u=performance.now()-r;return nt.debug(Po(i,`${u.toFixed(2)}ms`),`${n} completed`),o}catch(o){let u=performance.now()-r;throw nt.error(Po(i,`${u.toFixed(2)}ms`),`${n} failed`,o),o}}var No=new Wr("logger",Fr(Kr)),lg=No.$("SERVICE_NAME"),ag=(0,Br.default)({colorize:Br.default.isColorSupported,ignore:"pid,hostname"}),Bo=(0,Nr.default)({name:lg,level:No.$("LOG_LEVEL"),timestamp:Nr.default.stdTimeFunctions.isoTime,formatters:{level(e){return{level:e.toUpperCase()}}},base:{pid:process.pid},redact:{paths:["req.headers.authorization","req.headers.cookie","user.password","user.secret"],censor:"[REDACTED]"}},ag),nt=Bo;Bo.warn({module:"core"},"hello");export{nt as default,cg as withLogger};
27
+ `,r=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:s,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,singleLine:y,timestampKey:h,translateTime:a}=e,m=e.errorProps.split(","),p=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",b=dy(e.customLevels),w=hy(e.customLevels),S=yy(p,b,w),O;if(e.customColors)if(typeof e.customColors=="string")O=e.customColors.split(",").reduce((N,D)=>{let[A,E]=D.split(":"),R=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],X=R!==void 0?R:A;return N.push([X,E]),N},[]);else if(typeof e.customColors=="object")O=Object.keys(e.customColors).reduce((N,D)=>{let[A,E]=[D,e.customColors[D]],R=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],X=R!==void 0?R:A;return N.push([X,E]),N},[]);else throw new Error("options.customColors must be of type string or object.");let x={customLevels:b,customLevelNames:w};p===!0&&!e.customLevels&&(x.customLevels=void 0,x.customLevelNames=void 0);let P=e.include!==void 0?new Set(e.include.split(",")):void 0,T=!P&&e.ignore?new Set(e.ignore.split(",")):void 0,j=eo(e.colorize,O,p),_=e.colorizeObjects?j:eo(!1,[],!1);return{EOL:t,IDENT:r,colorizer:j,customColors:O,customLevelNames:w,customLevels:b,customPrettifiers:n,customProperties:x,errorLikeObjectKeys:i,errorProps:m,getLevelLabelData:S,hideObject:s,ignoreKeys:T,includeKeys:P,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,objectColorizer:_,singleLine:y,timestampKey:h,translateTime:a,useOnlyCustomProps:p}}});var fo=v((mp,uo)=>{uo.exports=Ee;Ee.default=Ee;Ee.stable=so;Ee.stableStringify=so;var et="[...]",no="[Circular]",ne=[],re=[];function io(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ee(e,t,r,n){typeof n>"u"&&(n=io()),Sr(e,"",0,[],void 0,0,n);var i;try{re.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var s=ne.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function le(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),ne.push([n,r,t,i])):re.push([t,r,e]):(n[r]=e,ne.push([n,r,t]))}function Sr(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Sr(e[u],u,u,n,e,s,o);else{var f=Object.keys(e);for(u=0;u<f.length;u++){var c=f[u];Sr(e[c],c,u,n,e,s,o)}}n.pop()}}function py(e,t){return e<t?-1:e>t?1:0}function so(e,t,r,n){typeof n>"u"&&(n=io());var i=Er(e,"",0,[],void 0,0,n)||e,s;try{re.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var o=ne.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Er(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Er(e[u],u,u,n,e,s,o);else{var f={},c=Object.keys(e).sort(py);for(u=0;u<c.length;u++){var d=c[u];Er(e[d],d,u,n,e,s,o),f[d]=e[d]}if(typeof i<"u")ne.push([i,t,e]),i[t]=f;else return f}n.pop()}}function oo(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(re.length>0)for(var n=0;n<re.length;n++){var i=re[n];if(i[1]===t&&i[0]===r){r=i[2],re.splice(n,1);break}}return e.call(this,t,r)}}});var vr=v((bp,co)=>{"use strict";co.exports=by;var my=Se();function by({keyName:e,lines:t,eol:r,ident:n}){let i="",s=my({input:t,ident:n,eol:r}),o=`${n}${e}: ${s}${r}`.split(r);for(let u=0;u<o.length;u+=1){u!==0&&(i+=r);let f=o[u];if(/^\s*"stack"/.test(f)){let c=/^(\s*"stack":)\s*(".*"),?$/.exec(f);if(c&&c.length===3){let d=/^\s*/.exec(f)[0].length+4,l=" ".repeat(d),y=c[2];i+=c[1]+r+l+JSON.parse(y).replace(/\n/g,r+l)}else i+=f}else i+=f}return i}});var tt=v((wp,lo)=>{"use strict";lo.exports=vy;var{LOGGER_KEYS:wy}=U(),Or=fo(),Sy=Se(),Ey=vr();function vy({log:e,excludeLoggerKeys:t=!0,skipKeys:r=[],context:n}){let{EOL:i,IDENT:s,customPrettifiers:o,errorLikeObjectKeys:u,objectColorizer:f,singleLine:c,colorizer:d}=n,l=[].concat(r);t===!0&&Array.prototype.push.apply(l,wy);let y="",{plain:h,errors:a}=Object.entries(e).reduce(({plain:m,errors:p},[b,w])=>{if(l.includes(b)===!1){let S=typeof o[b]=="function"?o[b](w,b,e,{colors:d.colors}):w;u.includes(b)?p[b]=S:m[b]=S}return{plain:m,errors:p}},{plain:{},errors:{}});return c?(Object.keys(h).length>0&&(y+=f.greyMessage(Or(h))),y+=i,y=y.replace(/\\\\/gi,"\\")):Object.entries(h).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);if(b===void 0)return;b=b.replace(/\\\\/gi,"\\");let w=Sy({input:b,ident:s,eol:i});y+=`${s}${f.property(m)}:${w.startsWith(i)?"":" "}${w}${i}`}),Object.entries(a).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);b!==void 0&&(y+=Ey({keyName:m,lines:b,eol:i,ident:s}))}),y}});var _r=v((Sp,ao)=>{"use strict";ao.exports=Cy;var{LOGGER_KEYS:Oy}=U(),_y=Qe(),Ly=Se(),xy=tt();function Cy({log:e,context:t}){let{EOL:r,IDENT:n,errorProps:i,messageKey:s}=t,o=e.stack,u=Ly({input:o,ident:n,eol:r}),f=`${n}${u}${r}`;if(i.length>0){let c=Oy.concat(s,"type","stack"),d;i[0]==="*"?d=Object.keys(e).filter(l=>c.includes(l)===!1):d=i.filter(l=>c.includes(l)===!1);for(let l=0;l<d.length;l+=1){let y=d[l];if(y in e){if(_y(e[y])){let h=xy({log:e[y],excludeLoggerKeys:!1,context:{...t,IDENT:n+n}});f=`${f}${n}${y}: {${r}${h}${n}}${r}`;continue}f=`${f}${n}${y}: ${e[y]}${r}`}}}return f}});var Lr=v((Ep,ho)=>{"use strict";ho.exports=Ay;var Ty=ue();function Ay({log:e,context:t}){let{colorizer:r,customLevels:n,customLevelNames:i,levelKey:s,getLevelLabelData:o}=t,u=t.customPrettifiers?.level,f=Ty(e,s);if(f===void 0)return;let c=r(f,{customLevels:n,customLevelNames:i});if(u){let[d]=o(f);return u(f,s,e,{label:d,labelColorized:c,colors:r.colors})}return c}});var xr=v((vp,go)=>{"use strict";go.exports=Ny;var{LEVELS:jy}=U(),yo=ue(),Py=wr();function Ny({log:e,context:t}){let{colorizer:r,customLevels:n,levelKey:i,levelLabel:s,messageFormat:o,messageKey:u,useOnlyCustomProps:f}=t;if(o&&typeof o=="string"){let c=Py(o,e),d=String(c).replace(/{([^{}]+)}/g,function(l,y){let h;return y===s&&(h=yo(e,i))!==void 0?(f?n===void 0:n[h]===void 0)?jy[h]:n[h]:yo(e,y)||""});return r.message(d)}if(o&&typeof o=="function"){let c=o(e,u,s,{colors:r.colors});return r.message(c)}if(u in e&&!(typeof e[u]!="string"&&typeof e[u]!="number"&&typeof e[u]!="boolean"))return r.message(e[u])}});var Cr=v((Op,po)=>{"use strict";po.exports=By;function By({log:e,context:t}){let{customPrettifiers:r,colorizer:n}=t,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=r.name?r.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let s=r.pid?r.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+s:i+=s}if(e.hostname){let s=r.hostname?r.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${s}`}i+=")"}if(e.caller){let s=r.caller?r.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${s}>`}if(i!=="")return i}});var Tr=v((_p,mo)=>{"use strict";mo.exports=My;var Dy=pr();function My({log:e,context:t}){let{timestampKey:r,translateTime:n}=t,i=t.customPrettifiers?.time,s=null;if(r in e?s=e[r]:"timestamp"in e&&(s=e.timestamp),s===null)return;let o=n?Dy(s,n):s;return i?i(o):`[${o}]`}});var wo=v((Lp,bo)=>{"use strict";bo.exports={buildSafeSonicBoom:Cs(),createDate:or(),deleteLogProperty:ur(),filterLog:yr(),formatTime:pr(),getPropertyValue:ue(),handleCustomLevelsNamesOpts:mr(),handleCustomLevelsOpts:br(),interpretConditionals:wr(),isObject:Qe(),isValidDate:Je(),joinLinesWithIndentation:Se(),noop:sr(),parseFactoryOptions:ro(),prettifyErrorLog:_r(),prettifyError:vr(),prettifyLevel:Lr(),prettifyMessage:xr(),prettifyMetadata:Cr(),prettifyObject:tt(),prettifyTime:Tr(),splitPropertyKey:Ye(),getLevelLabelData:Ue()}});var _o=v((xp,ae)=>{"use strict";var qy=typeof Buffer<"u",So=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Eo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function vo(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),qy&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(So.test(e)===!1&&Eo.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(So.test(e)===!1)return n}else if(Eo.test(e)===!1)return n;return Oo(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function Oo(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let u in o){let f=o[u];f&&typeof f=="object"&&i.push(f)}}}return e}function Ar(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return vo(e,t,r)}finally{Error.stackTraceLimit=n}}function $y(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return vo(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}ae.exports=Ar;ae.exports.default=Ar;ae.exports.parse=Ar;ae.exports.safeParse=$y;ae.exports.scan=Oo});var Co=v((Cp,xo)=>{"use strict";xo.exports=Jy;var Ry=_o(),Lo=Qe(),Iy=_r(),ky=Lr(),Fy=xr(),Wy=Cr(),Ky=tt(),zy=Tr(),Vy=yr(),{LEVELS:Uy,LEVEL_KEY:Gy,LEVEL_NAMES:jr}=U(),Hy=e=>{try{return{value:Ry.parse(e,{protoAction:"remove"})}}catch(t){return{err:t}}};function Jy(e){let t;if(Lo(e))t=e;else{let u=Hy(e);if(u.err||!Lo(u.value))return e+this.EOL;t=u.value}if(this.minimumLevel){let u;this.useOnlyCustomProps?u=this.customLevels:u=this.customLevelNames[this.minimumLevel]!==void 0;let f;if(u?f=this.customLevelNames[this.minimumLevel]:f=jr[this.minimumLevel],f||(f=typeof this.minimumLevel=="string"?jr[this.minimumLevel]:jr[Uy[this.minimumLevel].toLowerCase()]),t[this.levelKey===void 0?Gy:this.levelKey]<f)return}let r=Fy({log:t,context:this.context});(this.ignoreKeys||this.includeKeys)&&(t=Vy({log:t,context:this.context}));let n=ky({log:t,context:{...this.context,...this.context.customProperties}}),i=Wy({log:t,context:this.context}),s=zy({log:t,context:this.context}),o="";if(this.levelFirst&&n&&(o=`${n}`),s&&o===""?o=`${s}`:s&&(o=`${o} ${s}`),!this.levelFirst&&n&&(o.length>0?o=`${o} ${n}`:o=n),i&&(o.length>0?o=`${o} ${i}:`:o=i),o.endsWith(":")===!1&&o!==""&&(o+=":"),r!==void 0&&(o.length>0?o=`${o} ${r}`:o=r),o.length>0&&!this.singleLine&&(o+=this.EOL),t.type==="Error"&&typeof t.stack=="string"){let u=Iy({log:t,context:this.context});this.singleLine&&(o+=this.EOL),o+=u}else if(this.hideObject===!1){let u=[this.messageKey,this.levelKey,this.timestampKey].map(c=>c.replaceAll(/\\/g,"")).filter(c=>typeof t[c]=="string"||typeof t[c]=="number"||typeof t[c]=="boolean"),f=Ky({log:t,skipKeys:u,context:this.context});this.singleLine&&!/^\s$/.test(f)&&(o+=" "),o+=f}return o}});var jo=v((Tp,Y)=>{"use strict";var{isColorSupported:To}=Zt(),Yy=us(),{Transform:Xy}=B("node:stream"),Zy=ps(),Qy=ir(),{ERROR_LIKE_KEYS:Ao,LEVEL_KEY:eg,LEVEL_LABEL:tg,MESSAGE_KEY:rg,TIMESTAMP_KEY:ng}=U(),{buildSafeSonicBoom:ig,parseFactoryOptions:sg}=wo(),og=Co(),ug={colorize:To,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:Ao,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:eg,levelLabel:tg,messageFormat:null,messageKey:rg,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:ng,translateTime:!0,useOnlyCustomProps:!0};function Pr(e){let t=sg(Object.assign({},ug,e));return og.bind({...t,context:t})}function rt(e={}){let t=Pr(e),r;return Zy(function(n){n.on("message",function s(o){!o||o.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:o.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||Ao,o.config.errorKey])),customLevels:o.config.levels.values}),t=Pr(e),n.off("message",s))});let i=new Xy({objectMode:!0,autoDestroy:!0,transform(s,o,u){let f=t(s);u(null,f)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?r=e.destination:r=ig({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(s){r.write(s+`
28
+ `)}),Yy(n,i,r),i},{parse:"lines",close(n,i){r.on("close",()=>{i(n)})}})}Y.exports=rt;Y.exports.build=rt;Y.exports.PinoPretty=rt;Y.exports.prettyFactory=Pr;Y.exports.colorizerFactory=Qy;Y.exports.isColorSupported=To;Y.exports.default=rt});var Fo=Object.defineProperty,Wo=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ir=(e,t,r)=>Wo(e,typeof t!="symbol"?t+"":t,r),Ko=/([\p{Ll}\d])(\p{Lu})/gu,zo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,Vo=/(\d)\p{Ll}|(\p{L})\d/u,Uo=/[^\p{L}\d]+/giu,Rr="$1\0$2";function kr(e){let t=e.trim();t=t.replace(Ko,Rr).replace(zo,Rr),t=t.replace(Uo,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function Go(e){let t=kr(e);for(let r=0;r<t.length;r++){let n=t[r],i=Vo.exec(n);if(i){let s=i.index+(i[1]??i[2]).length;t.splice(r,1,n.slice(0,s),n.slice(s))}}return t}function Ho(e,t){let[r,n,i]=Yo(e,t);return r+n.map(Jo(t?.locale)).join(t?.delimiter??"_")+i}function Jo(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Yo(e,t={}){let r=t.split??(t.separateNumbers?Go:kr),n=t.prefixCharacters??"",i=t.suffixCharacters??"",s=0,o=e.length;for(;s<e.length;){let u=e.charAt(s);if(!n.includes(u))break;s++}for(;o>s;){let u=o-1,f=e.charAt(u);if(!i.includes(f))break;o=u}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}var Xo=class it{constructor(t){Ir(this,"serviceName"),this.serviceName=Ho(t)}log(t,...r){let{color:n,reset:i}=it.getColor(t),s=[it.getSymbols(t)+"{ENV}",n+`[${this.serviceName}]:`+i,...r];t==="success"?console.log(...s):console[t](...s)}static getColor(t){let r="\x1B[34m";return t==="success"&&(r="\x1B[32m"),t==="warn"&&(r="\x1B[33m"),t==="error"&&(r="\x1B[31m"),{color:r,reset:"\x1B[0m"}}static getSymbols(t){let{color:r,reset:n}=this.getColor(t);return t==="success"?r+" \u2714 "+n:t==="warn"?r+" \u25B2 "+n:t==="error"?r+" \u2717 "+n:r+" \uFFEE "+n}};function Fr(...e){return e.reduce((t,r)=>({...t,...r}),{})}var Wr=class extends Xo{constructor(e,t){super(e),this.variables=t,Ir(this,"env",new Map),this.validate(),this.load()}validate(){let e=Object.keys(this.variables);for(let t of e){let r=this.variables[t],n=process.env[t];if(n==null){r.default?this.log("warn",`'${t}' not exists and default:`,r.default):this.log("error",`'${t}' not exists and not have defaults`);continue}if(r.type==="number"&&isNaN(Number(n))){this.log("warn",`is '${typeof n}', but must 'number'`);continue}if(r.type==="boolean"&&n!=="true"&&n!=="false"){this.log("warn",`'${t}' should be boolean ('true' or 'false')`);continue}this.log("success",`'${t}' successfully loaded`)}}load(){let e=Object.keys(this.variables);for(let t of e)this.$(t,!1);this.env.set("SERVICE_NAME",this.serviceName)}$(e,t=!0){if(t&&this.env.has(String(e)))return this.env.get(String(e));let r=this.variables[e],n=process.env[e]||r.default;return r.type==="number"&&(n=Number(n)),r.type==="boolean"&&(n=n==="true"),r.type==="string"&&(n=String(n)),this.env.set(String(e),n),n}};var Kr={NODE_ENV:{type:"string",default:"development"},LOG_LEVEL:{type:"string",default:"info"},SERVICE_NAME:{type:"string",default:"UNKNOWN"}};var Nr=$r(zi(),1),Br=$r(jo(),1);var Po=(e,t)=>{if("timing"in e){let r=e.timing;return{...e,timing:{...Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.toFixed(2)+"ms"])),total:Object.values(r).reduce((n,i)=>n+i,0).toFixed(2)+"ms"}}}return{...e,duration:t}};async function fg(e,t){let r=performance.now(),n=e.type==="render"?"Rendering":"Getting data",i={route:e.route,...e.type==="get-data"&&e.functionName?{functionName:e.functionName}:{}};nt.debug(i,`${n} start`);let s=o=>{let u=performance.now()-r;r=performance.now(),i.timing??(i.timing={}),i.timing[String(o)]=u};try{let o=await Promise.resolve(t(s)),u=performance.now()-r;return nt.debug(Po(i,`${u.toFixed(2)}ms`),`${n} completed`),o}catch(o){let u=performance.now()-r;throw nt.error(Po(i,`${u.toFixed(2)}ms`),`${n} failed`,o),o}}var No=new Wr("logger",Fr(Kr)),cg=No.$("SERVICE_NAME"),lg=(0,Br.default)({colorize:Br.default.isColorSupported,ignore:"pid,hostname"}),ag=(0,Nr.default)({name:cg,level:No.$("LOG_LEVEL"),timestamp:Nr.default.stdTimeFunctions.isoTime,formatters:{level(e){return{level:e.toUpperCase()}}},base:{pid:process.pid},redact:{paths:["req.headers.authorization","req.headers.cookie","user.password","user.secret"],censor:"[REDACTED]"}},lg),nt=ag;export{nt as default,fg as withLogger};
29
29
  //# sourceMappingURL=index.mjs.map