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