zaileys 0.28.3-dev → 0.28.5-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- var us=Object.create;var Ne=Object.defineProperty,fs=Object.defineProperties,hs=Object.getOwnPropertyDescriptor,ds=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertyNames,Ht=Object.getOwnPropertySymbols,ys=Object.getPrototypeOf,Jt=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable;var De=(e,t,r)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))Jt.call(t,r)&&De(e,r,t[r]);if(Ht)for(var r of Ht(t))gs.call(t,r)&&De(e,r,t[r]);return e},Q=(e,t)=>fs(e,ds(t));var C=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ms=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ps(t))!Jt.call(e,n)&&n!==r&&Ne(e,n,{get:()=>t[n],enumerable:!(i=hs(t,n))||i.enumerable});return e};var ze=(e,t,r)=>(r=e!=null?us(ys(e)):{},ms(t||!e||!e.__esModule?Ne(r,"default",{value:e,enumerable:!0}):r,e));var Gt=(e,t,r)=>De(e,typeof t!="symbol"?t+"":t,r);var Z=(e,t,r)=>new Promise((i,n)=>{var s=o=>{try{f(r.next(o))}catch(c){n(c)}},l=o=>{try{f(r.throw(o))}catch(c){n(c)}},f=o=>o.done?i(o.value):Promise.resolve(o.value).then(s,l);f((r=r.apply(e,t)).next())});var Fe=O((Fc,Xt)=>{"use strict";Xt.exports=class extends Error{constructor(r,i){super(r||"Unknown error");Gt(this,"name","AssertError");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i)}}});var We=O((Kc,Yt)=>{"use strict";Yt.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var ie=O((Uc,Qt)=>{"use strict";var bs=Fe(),ws=We(),Ss=Qt.exports=function(e,...t){if(e)return;if(t.length===1&&t[0]instanceof Error)throw t[0];let r=t.filter(i=>i!=="").map(i=>typeof i=="string"?i:i instanceof Error?i.message:ws(i));throw new bs(r.join(" "),Ss)}});var ye=O((Vc,er)=>{"use strict";var Ke=ie(),Zt={};er.exports=function(e,t,r){if(t===!1||t===null||t===void 0)return e;r=r||{},typeof r=="string"&&(r={separator:r});let i=Array.isArray(t);Ke(!i||!r.separator,"Separator option is not valid for array-based chain");let n=i?t:t.split(r.separator||"."),s=e;for(let l=0;l<n.length;++l){let f=n[l],o=r.iterables&&Zt.iterables(s);if(Array.isArray(s)||o==="set"){let c=Number(f);Number.isInteger(c)&&(f=c<0?s.length+c:c)}if(!s||typeof s=="function"&&r.functions===!1||!o&&s[f]===void 0){Ke(!r.strict||l+1===n.length,"Missing segment",f,"in reach path ",t),Ke(typeof s=="object"||r.functions===!0||typeof s!="function","Invalid segment",f,"in reach path ",t),s=r.default;break}o?o==="set"?s=[...s][f]:s=s.get(f):s=s[f]}return s};Zt.iterables=function(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map"}});var Ue=O((P,rr)=>{"use strict";var tr={};P=rr.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,url:URL.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};tr.typeMap=new Map([["[object Error]",P.error],["[object Map]",P.map],["[object Promise]",P.promise],["[object Set]",P.set],["[object URL]",P.url],["[object WeakMap]",P.weakMap],["[object WeakSet]",P.weakSet]]);P.getInternalProto=function(e){if(Array.isArray(e))return P.array;if(Buffer&&e instanceof Buffer)return P.buffer;if(e instanceof Date)return P.date;if(e instanceof RegExp)return P.regex;if(e instanceof Error)return P.error;let t=Object.prototype.toString.call(e);return tr.typeMap.get(t)||P.generic}});var we=O(nr=>{"use strict";nr.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var Se=O((Jc,ir)=>{"use strict";var vs=ye(),z=Ue(),Es=we(),ee={needsProtoHack:new Set([z.set,z.map,z.weakSet,z.weakMap])};ir.exports=ee.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let i=ee.clone,n=r;if(t.shallow){if(t.shallow!==!0)return ee.cloneWithShallow(e,t);i=o=>o}else if(n){let o=n.get(e);if(o)return o}else n=new Map;let s=z.getInternalProto(e);switch(s){case z.buffer:return Buffer==null?void 0:Buffer.from(e);case z.date:return new Date(e.getTime());case z.regex:case z.url:return new s.constructor(e)}let l=ee.base(e,s,t);if(l===e)return e;if(n&&n.set(e,l),s===z.set)for(let o of e)l.add(i(o,t,n));else if(s===z.map)for(let[o,c]of e)l.set(o,i(c,t,n));let f=Es.keys(e,t);for(let o of f){if(o==="__proto__")continue;if(s===z.array&&o==="length"){l.length=e.length;continue}let c=Object.getOwnPropertyDescriptor(e,o);c?c.get||c.set?Object.defineProperty(l,o,c):c.enumerable?l[o]=i(e[o],t,n):Object.defineProperty(l,o,{enumerable:!1,writable:!0,configurable:!0,value:i(e[o],t,n)}):Object.defineProperty(l,o,{enumerable:!0,writable:!0,configurable:!0,value:i(e[o],t,n)})}return l};ee.cloneWithShallow=function(e,t){let r=t.shallow;t=Object.assign({},t),t.shallow=!1;let i=new Map;for(let n of r){let s=vs(e,n);(typeof s=="object"||typeof s=="function")&&i.set(s,s)}return ee.clone(e,t,i)};ee.base=function(e,t,r){if(r.prototype===!1)return ee.needsProtoHack.has(t)?new t.constructor:t===z.array?[]:{};let i=Object.getPrototypeOf(e);if(i&&i.isImmutable)return e;if(t===z.array){let n=[];return i!==t&&Object.setPrototypeOf(n,i),n}if(ee.needsProtoHack.has(t)){let n=new i.constructor;return i!==t&&Object.setPrototypeOf(n,i),n}return Object.create(i)}});var He=O((Gc,lr)=>{"use strict";var Ve=ie(),sr=Se(),Os=we(),or={};lr.exports=or.merge=function(e,t,r){if(Ve(e&&typeof e=="object","Invalid target value: must be an object"),Ve(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){Ve(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let n=0;n<t.length;++n)e.push(sr(t[n],{symbols:r.symbols}));return e}let i=Os.keys(t,r);for(let n=0;n<i.length;++n){let s=i[n];if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let l=t[s];if(l&&typeof l=="object"){if(e[s]===l)continue;!e[s]||typeof e[s]!="object"||Array.isArray(e[s])!==Array.isArray(l)||l instanceof Date||Buffer&&Buffer.isBuffer(l)||l instanceof RegExp?e[s]=sr(l,{symbols:r.symbols}):or.merge(e[s],l,r)}else(l!=null||r.nullOverride)&&(e[s]=l)}return e}});var hr=O((Xc,fr)=>{"use strict";var ve=ie(),cr=Se(),ur=He(),ar=ye(),Ee={};fr.exports=function(e,t,r={}){if(ve(e&&typeof e=="object","Invalid defaults value: must be an object"),ve(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),ve(typeof r=="object","Invalid options: must be an object"),!t)return null;if(r.shallow)return Ee.applyToDefaultsWithShallow(e,t,r);let i=cr(e);if(t===!0)return i;let n=r.nullOverride!==void 0?r.nullOverride:!1;return ur(i,t,{nullOverride:n,mergeArrays:!1})};Ee.applyToDefaultsWithShallow=function(e,t,r){let i=r.shallow;ve(Array.isArray(i),"Invalid keys");let n=new Map,s=t===!0?null:new Set;for(let o of i){o=Array.isArray(o)?o:o.split(".");let c=ar(e,o);c&&typeof c=="object"?n.set(c,s&&ar(t,o)||c):s&&s.add(o)}let l=cr(e,{},n);if(!s)return l;for(let o of s)Ee.reachCopy(l,t,o);let f=r.nullOverride!==void 0?r.nullOverride:!1;return ur(l,t,{nullOverride:f,mergeArrays:!1})};Ee.reachCopy=function(e,t,r){for(let s of r){if(!(s in t))return;let l=t[s];if(typeof l!="object"||l===null)return;t=l}let i=t,n=e;for(let s=0;s<r.length-1;++s){let l=r[s];typeof n[l]!="object"&&(n[l]={}),n=n[l]}n[r[r.length-1]]=i}});var pr=O((Yc,dr)=>{"use strict";var Je={};dr.exports=Je.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=Je.Bench.now()}elapsed(){return Je.Bench.now()-this.ts}static now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var Ge=O((Zc,yr)=>{"use strict";yr.exports=function(){}});var mr=O((eu,gr)=>{"use strict";var xs=Ge();gr.exports=function(){return new Promise(xs)}});var Xe=O((tu,br)=>{"use strict";var G=Ue(),D={mismatched:null};br.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!D.isDeepEqual(e,t,r,[])};D.isDeepEqual=function(e,t,r,i){if(e===t)return e!==0||1/e===1/t;let n=typeof e;if(n!==typeof t||e===null||t===null)return!1;if(n==="function"){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(n!=="object")return e!==e&&t!==t;let s=D.getSharedType(e,t,!!r.prototype);switch(s){case G.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case G.promise:return e===t;case G.regex:case G.url:return e.toString()===t.toString();case D.mismatched:return!1}for(let l=i.length-1;l>=0;--l)if(i[l].isSame(e,t))return!0;i.push(new D.SeenEntry(e,t));try{return!!D.isDeepEqualObj(s,e,t,r,i)}finally{i.pop()}};D.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?D.mismatched:G.getInternalProto(e);let i=G.getInternalProto(e);return i!==G.getInternalProto(t)?D.mismatched:i};D.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(r){return r}};D.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};D.isSetSimpleEqual=function(e,t){for(let r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0};D.isDeepEqualObj=function(e,t,r,i,n){var u;let{isDeepEqual:s,valueOf:l,hasOwnEnumerableProperty:f}=D,{keys:o,getOwnPropertySymbols:c}=Object;if(e===G.array)if(i.part){for(let g of t)for(let S of r)if(s(g,S,i,n))return!0}else{if(t.length!==r.length)return!1;for(let g=0;g<t.length;++g)if(!s(t[g],r[g],i,n))return!1;return!0}else if(e===G.set){if(t.size!==r.size)return!1;if(!D.isSetSimpleEqual(t,r)){let g=new Set(Set.prototype.values.call(r));for(let S of Set.prototype.values.call(t)){if(g.delete(S))continue;let w=!1;for(let v of g)if(s(S,v,i,n)){g.delete(v),w=!0;break}if(!w)return!1}}}else if(e===G.map){if(t.size!==r.size)return!1;for(let[g,S]of Map.prototype.entries.call(t))if(S===void 0&&!Map.prototype.has.call(r,g)||!s(S,Map.prototype.get.call(r,g),i,n))return!1}else if(e===G.error&&(t.name!==r.name||t.message!==r.message))return!1;let a=l(t),h=l(r);if((t!==a||r!==h)&&!s(a,h,i,n))return!1;let p=o(t);if(!i.part&&p.length!==o(r).length&&!i.skip)return!1;let d=0;for(let g of p){if(i.skip&&i.skip.includes(g)){r[g]===void 0&&++d;continue}if(!f(r,g)||!s(t[g],r[g],i,n))return!1}if(!i.part&&p.length-d!==o(r).length)return!1;if(i.symbols!==!1){let g=c(t),S=new Set(c(r));for(let w of g){if(!((u=i.skip)!=null&&u.includes(w))){if(f(t,w)){if(!f(r,w)||!s(t[w],r[w],i,n))return!1}else if(f(r,w))return!1}S.delete(w)}for(let w of S)if(f(r,w))return!1}return!0};D.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}});var Ye=O((nu,wr)=>{"use strict";wr.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var vr=O((iu,Sr)=>{"use strict";var Oe=ie(),_s=Xe(),ks=Ye(),Ts=we(),U={};Sr.exports=function(e,t,r={}){return typeof t!="object"&&(t=[t]),Oe(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof e=="string"?U.string(e,t,r):Array.isArray(e)?U.array(e,t,r):(Oe(typeof e=="object","Reference must be string or an object"),U.object(e,t,r))};U.array=function(e,t,r){if(Array.isArray(t)||(t=[t]),!e.length||r.only&&r.once&&e.length!==t.length)return!1;let i,n=new Map;for(let l of t)if(!r.deep||!l||typeof l!="object"){let f=n.get(l);f?++f.allowed:n.set(l,{allowed:1,hits:0})}else{i=i!=null?i:U.compare(r);let f=!1;for(let[o,c]of n.entries())if(i(o,l)){++c.allowed,f=!0;break}f||n.set(l,{allowed:1,hits:0})}let s=0;for(let l of e){let f;if(!r.deep||!l||typeof l!="object")f=n.get(l);else{i=i!=null?i:U.compare(r);for(let[o,c]of n.entries())if(i(o,l)){f=c;break}}if(f&&(++f.hits,++s,r.once&&f.hits>f.allowed))return!1}if(r.only&&s!==e.length)return!1;for(let l of n.values())if(l.hits!==l.allowed&&l.hits<l.allowed&&!r.part)return!1;return!!s};U.object=function(e,t,r){Oe(r.once===void 0,"Cannot use option once with object");let i=Ts.keys(e,r);if(!i.length)return!1;if(Array.isArray(t))return U.array(i,t,r);let n=Object.getOwnPropertySymbols(t).filter(o=>t.propertyIsEnumerable(o)),s=[...Object.keys(t),...n],l=U.compare(r),f=new Set(s);for(let o of i){if(!f.has(o)){if(r.only)return!1;continue}if(!l(t[o],e[o]))return!1;f.delete(o)}return f.size?r.part?f.size<s.length:!1:!0};U.string=function(e,t,r){if(e==="")return t.length===1&&t[0]===""||!r.once&&!t.some(o=>o!=="");let i=new Map,n=[];for(let o of t)if(Oe(typeof o=="string","Cannot compare string reference to non-string value"),o){let c=i.get(o);c?++c.allowed:(i.set(o,{allowed:1,hits:0}),n.push(ks(o)))}else if(r.once||r.only)return!1;if(!n.length)return!0;let s=new RegExp(`(${n.join("|")})`,"g"),l=e.replace(s,(o,c)=>(++i.get(c).hits,""));if(r.only&&l)return!1;let f=!1;for(let o of i.values())if(o.hits&&(f=!0),o.hits!==o.allowed&&(o.hits<o.allowed&&!r.part||r.once))return!1;return!!f};U.compare=function(e){if(!e.deep)return U.shallow;let t=e.only!==void 0,r=e.part!==void 0,i={prototype:t?e.only:r?!e.part:!1,part:t?!e.only:r?e.part:!1};return(n,s)=>_s(n,s,i)};U.shallow=function(e,t){return e===t}});var Or=O((su,Er)=>{"use strict";var As=ie();Er.exports=function(e){return As(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var _r=O((ou,xr)=>{"use strict";var re={};xr.exports=function(e){if(!e)return"";let t="";for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);re.isSafe(i)?t+=e[r]:t+=re.escapeHtmlChar(i)}return t};re.escapeHtmlChar=function(e){let t=re.namedHtml.get(e);return t||(e>=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)};re.isSafe=function(e){return re.safeCharCodes.has(e)};re.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]);re.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()});var Tr=O((lu,kr)=>{"use strict";var xe={};kr.exports=function(e){return e?e.replace(/[<>&\u2028\u2029]/g,xe.escape):""};xe.escape=function(e){return xe.replacements.get(e)};xe.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var Rr=O((au,jr)=>{"use strict";var Ar={};jr.exports=Ar.flatten=function(e,t){let r=t||[];for(let i of e)Array.isArray(i)?Ar.flatten(i,r):r.push(i);return r}});var Br=O((cu,qr)=>{"use strict";var Lr={};qr.exports=function(e,t,r={}){if(!e||!t)return r.first?null:[];let i=[],n=Array.isArray(e)?new Set(e):e,s=new Set;for(let l of t)if(Lr.has(n,l)&&!s.has(l)){if(r.first)return l;i.push(l),s.add(l)}return r.first?null:i};Lr.has=function(e,t){return typeof e.has=="function"?e.has(t):e[t]!==void 0}});var Cr=O((uu,$r)=>{"use strict";$r.exports=function(e){return typeof(e==null?void 0:e.then)=="function"}});var Pr=O((fu,Mr)=>{"use strict";var Ir={wrapped:Symbol("wrapped")};Mr.exports=function(e){if(e[Ir.wrapped])return e;let t=!1,r=function(...i){t||(t=!0,e(...i))};return r[Ir.wrapped]=!0,r}});var Nr=O((hu,Dr)=>{"use strict";var js=ye();Dr.exports=function(e,t,r){return t.replace(/{([^{}]+)}/g,(i,n)=>{let s=js(e,n,r);return s!=null?s:""})}});var Fr=O((du,zr)=>{"use strict";var Rs={maxTimer:2147483647};zr.exports=function(e,t,r){if(typeof e=="bigint"&&(e=Number(e)),e>=Number.MAX_SAFE_INTEGER&&(e=1/0),typeof e!="number"&&e!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let n=r?r.setTimeout:setTimeout,s=()=>{let l=Math.min(e,Rs.maxTimer);e-=l,n(()=>e>0?s():i(t),l)};e!==1/0&&s()})}});var Wr=O(q=>{"use strict";q.applyToDefaults=hr();q.assert=ie();q.AssertError=Fe();q.Bench=pr();q.block=mr();q.clone=Se();q.contain=vr();q.deepEqual=Xe();q.escapeHeaderAttribute=Or();q.escapeHtml=_r();q.escapeJson=Tr();q.escapeRegex=Ye();q.flatten=Rr();q.ignore=Ge();q.intersect=Br();q.isPromise=Cr();q.merge=He();q.once=Pr();q.reach=ye();q.reachTemplate=Nr();q.stringify=We();q.wait=Fr()});var Kr=O(m=>{"use strict";var se=Wr(),F={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};m.Boom=class extends Error{constructor(e,t={}){if(e instanceof Error)return m.boomify(se.clone(e),t);let{statusCode:r=500,data:i=null,ctor:n=m.Boom}=t,s=new Error(e||void 0);Error.captureStackTrace(s,n),s.data=i;let l=F.initialize(s,r);return Object.defineProperty(l,"typeof",{value:n}),t.decorate&&Object.assign(l,t.decorate),l}static[Symbol.hasInstance](e){return this===m.Boom?m.isBoom(e):this.prototype.isPrototypeOf(e)}};m.isBoom=function(e,t){return e instanceof Error&&!!e.isBoom&&(!t||e.output.statusCode===t)};m.boomify=function(e,t){var r,i;return se.assert(e instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(e.data=t.data),t.decorate&&Object.assign(e,t.decorate),e.isBoom?t.override===!1||!t.statusCode&&!t.message?e:F.initialize(e,(i=t.statusCode)!=null?i:e.output.statusCode,t.message):F.initialize(e,(r=t.statusCode)!=null?r:500,t.message)};m.badRequest=function(e,t){return new m.Boom(e,{statusCode:400,data:t,ctor:m.badRequest})};m.unauthorized=function(e,t,r){let i=new m.Boom(e,{statusCode:401,ctor:m.unauthorized});if(!t)return i;if(typeof t!="string")return i.output.headers["WWW-Authenticate"]=t.join(", "),i;let n=`${t}`;return(r||e)&&(i.output.payload.attributes={}),r&&(typeof r=="string"?(n+=" "+se.escapeHeaderAttribute(r),i.output.payload.attributes=r):n+=" "+Object.keys(r).map(s=>{var f;let l=(f=r[s])!=null?f:"";return i.output.payload.attributes[s]=l,`${s}="${se.escapeHeaderAttribute(l.toString())}"`}).join(", ")),e?(r&&(n+=","),n+=` error="${se.escapeHeaderAttribute(e)}"`,i.output.payload.attributes.error=e):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=n,i};m.paymentRequired=function(e,t){return new m.Boom(e,{statusCode:402,data:t,ctor:m.paymentRequired})};m.forbidden=function(e,t){return new m.Boom(e,{statusCode:403,data:t,ctor:m.forbidden})};m.notFound=function(e,t){return new m.Boom(e,{statusCode:404,data:t,ctor:m.notFound})};m.methodNotAllowed=function(e,t,r){let i=new m.Boom(e,{statusCode:405,data:t,ctor:m.methodNotAllowed});return typeof r=="string"&&(r=[r]),Array.isArray(r)&&(i.output.headers.Allow=r.join(", ")),i};m.notAcceptable=function(e,t){return new m.Boom(e,{statusCode:406,data:t,ctor:m.notAcceptable})};m.proxyAuthRequired=function(e,t){return new m.Boom(e,{statusCode:407,data:t,ctor:m.proxyAuthRequired})};m.clientTimeout=function(e,t){return new m.Boom(e,{statusCode:408,data:t,ctor:m.clientTimeout})};m.conflict=function(e,t){return new m.Boom(e,{statusCode:409,data:t,ctor:m.conflict})};m.resourceGone=function(e,t){return new m.Boom(e,{statusCode:410,data:t,ctor:m.resourceGone})};m.lengthRequired=function(e,t){return new m.Boom(e,{statusCode:411,data:t,ctor:m.lengthRequired})};m.preconditionFailed=function(e,t){return new m.Boom(e,{statusCode:412,data:t,ctor:m.preconditionFailed})};m.entityTooLarge=function(e,t){return new m.Boom(e,{statusCode:413,data:t,ctor:m.entityTooLarge})};m.uriTooLong=function(e,t){return new m.Boom(e,{statusCode:414,data:t,ctor:m.uriTooLong})};m.unsupportedMediaType=function(e,t){return new m.Boom(e,{statusCode:415,data:t,ctor:m.unsupportedMediaType})};m.rangeNotSatisfiable=function(e,t){return new m.Boom(e,{statusCode:416,data:t,ctor:m.rangeNotSatisfiable})};m.expectationFailed=function(e,t){return new m.Boom(e,{statusCode:417,data:t,ctor:m.expectationFailed})};m.teapot=function(e,t){return new m.Boom(e,{statusCode:418,data:t,ctor:m.teapot})};m.badData=function(e,t){return new m.Boom(e,{statusCode:422,data:t,ctor:m.badData})};m.locked=function(e,t){return new m.Boom(e,{statusCode:423,data:t,ctor:m.locked})};m.failedDependency=function(e,t){return new m.Boom(e,{statusCode:424,data:t,ctor:m.failedDependency})};m.tooEarly=function(e,t){return new m.Boom(e,{statusCode:425,data:t,ctor:m.tooEarly})};m.preconditionRequired=function(e,t){return new m.Boom(e,{statusCode:428,data:t,ctor:m.preconditionRequired})};m.tooManyRequests=function(e,t){return new m.Boom(e,{statusCode:429,data:t,ctor:m.tooManyRequests})};m.illegal=function(e,t){return new m.Boom(e,{statusCode:451,data:t,ctor:m.illegal})};m.internal=function(e,t,r=500){return F.serverError(e,t,r,m.internal)};m.notImplemented=function(e,t){return F.serverError(e,t,501,m.notImplemented)};m.badGateway=function(e,t){return F.serverError(e,t,502,m.badGateway)};m.serverUnavailable=function(e,t){return F.serverError(e,t,503,m.serverUnavailable)};m.gatewayTimeout=function(e,t){return F.serverError(e,t,504,m.gatewayTimeout)};m.badImplementation=function(e,t){let r=F.serverError(e,t,500,m.badImplementation);return r.isDeveloperError=!0,r};F.initialize=function(e,t,r){let i=parseInt(t,10);if(se.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",t),e.isBoom=!0,e.isServer=i>=500,e.hasOwnProperty("data")||(e.data=null),e.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(e,"reformat",{value:F.reformat,configurable:!0}),!r&&!e.message&&(e.reformat(),r=e.output.payload.error),r){let n=Object.getOwnPropertyDescriptor(e,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"message");se.assert(!n||n.configurable&&!n.get,"The error is not compatible with boom"),e.message=r+(e.message?": "+e.message:""),e.output.payload.message=e.message}return e.reformat(),e};F.reformat=function(e=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=F.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&e!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};F.serverError=function(e,t,r,i){return t instanceof Error&&!t.isBoom?m.boomify(t,{statusCode:r,message:e}):new m.Boom(e,{statusCode:r,data:t,ctor:i})}});var Ur=O((mu,_e)=>{"use strict";var Ls=function(){"use strict";function e(a,h){return h!=null&&a instanceof h}var t;try{t=Map}catch(a){t=function(){}}var r;try{r=Set}catch(a){r=function(){}}var i;try{i=Promise}catch(a){i=function(){}}function n(a,h,p,d,u){typeof h=="object"&&(p=h.depth,d=h.prototype,u=h.includeNonEnumerable,h=h.circular);var g=[],S=[],w=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof p=="undefined"&&(p=1/0);function v(b,x){if(b===null)return null;if(x===0)return b;var E,k;if(typeof b!="object")return b;if(e(b,t))E=new t;else if(e(b,r))E=new r;else if(e(b,i))E=new i(function(J,de){b.then(function(pe){J(v(pe,x-1))},function(pe){de(v(pe,x-1))})});else if(n.__isArray(b))E=[];else if(n.__isRegExp(b))E=new RegExp(b.source,c(b)),b.lastIndex&&(E.lastIndex=b.lastIndex);else if(n.__isDate(b))E=new Date(b.getTime());else{if(w&&Buffer.isBuffer(b))return Buffer.allocUnsafe?E=Buffer.allocUnsafe(b.length):E=new Buffer(b.length),b.copy(E),E;e(b,Error)?E=Object.create(b):typeof d=="undefined"?(k=Object.getPrototypeOf(b),E=Object.create(k)):(E=Object.create(d),k=d)}if(h){var A=g.indexOf(b);if(A!=-1)return S[A];g.push(b),S.push(E)}e(b,t)&&b.forEach(function(J,de){var pe=v(de,x-1),cs=v(J,x-1);E.set(pe,cs)}),e(b,r)&&b.forEach(function(J){var de=v(J,x-1);E.add(de)});for(var T in b){var _;k&&(_=Object.getOwnPropertyDescriptor(k,T)),!(_&&_.set==null)&&(E[T]=v(b[T],x-1))}if(Object.getOwnPropertySymbols)for(var L=Object.getOwnPropertySymbols(b),T=0;T<L.length;T++){var $=L[T],j=Object.getOwnPropertyDescriptor(b,$);j&&!j.enumerable&&!u||(E[$]=v(b[$],x-1),j.enumerable||Object.defineProperty(E,$,{enumerable:!1}))}if(u)for(var M=Object.getOwnPropertyNames(b),T=0;T<M.length;T++){var I=M[T],j=Object.getOwnPropertyDescriptor(b,I);j&&j.enumerable||(E[I]=v(b[I],x-1),Object.defineProperty(E,I,{enumerable:!1}))}return E}return v(a,p)}n.clonePrototype=function(h){if(h===null)return null;var p=function(){};return p.prototype=h,new p};function s(a){return Object.prototype.toString.call(a)}n.__objToStr=s;function l(a){return typeof a=="object"&&s(a)==="[object Date]"}n.__isDate=l;function f(a){return typeof a=="object"&&s(a)==="[object Array]"}n.__isArray=f;function o(a){return typeof a=="object"&&s(a)==="[object RegExp]"}n.__isRegExp=o;function c(a){var h="";return a.global&&(h+="g"),a.ignoreCase&&(h+="i"),a.multiline&&(h+="m"),h}return n.__getRegExpFlags=c,n}();typeof _e=="object"&&_e.exports&&(_e.exports=Ls)});var Jr=O((Vr,Hr)=>{"use strict";(function(){var e,t,r,i=[].splice,n=function(l,f){if(!(l instanceof f))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=Ur(),e=C("events").EventEmitter,Hr.exports=t=function(){class l extends e{constructor(o={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=o,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(c=>{var a;a=this[c],this[c]=function(...h){var p,d,u,g;if(u=h,[...h]=u,[p]=i.call(h,-1),typeof p=="function")try{g=a(...h),p(null,g)}catch(S){d=S,p(d)}else return a(...h,p)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(o){var c,a;if(n(this,l),(a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return this.stats.hits++,c=this._unwrap(this.data[o]),c;this.stats.misses++}mget(o){var c,a,h,p,d,u;if(n(this,l),!Array.isArray(o))throw c=this._error("EKEYSTYPE"),c;for(u={},h=0,d=o.length;h<d;h++){if(p=o[h],(a=this._isInvalidKey(p))!=null)throw a;this.data[p]!=null&&this._check(p,this.data[p])?(this.stats.hits++,u[p]=this._unwrap(this.data[p])):this.stats.misses++}return u}set(o,c,a){var h,p,d;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw h=this._error("ECACHEFULL"),h;if(this.options.forceString&&!1==="string"&&(c=JSON.stringify(c)),a==null&&(a=this.options.stdTTL),(p=this._isInvalidKey(o))!=null)throw p;return d=!1,this.data[o]&&(d=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[o],!1))),this.data[o]=this._wrap(c,a),this.stats.vsize+=this._getValLength(c),d||(this.stats.ksize+=this._getKeyLength(o),this.stats.keys++),this.emit("set",o,c),!0}mset(o){var c,a,h,p,d,u,g,S,w,v;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys+o.length>=this.options.maxKeys)throw c=this._error("ECACHEFULL"),c;for(h=0,g=o.length;h<g;h++){if(u=o[h],{key:d,val:v,ttl:w}=u,w&&typeof w!="number")throw c=this._error("ETTLTYPE"),c;if((a=this._isInvalidKey(d))!=null)throw a}for(p=0,S=o.length;p<S;p++)u=o[p],{key:d,val:v,ttl:w}=u,this.set(d,v,w);return!0}del(o){var c,a,h,p,d,u;for(n(this,l),Array.isArray(o)||(o=[o]),c=0,h=0,d=o.length;h<d;h++){if(p=o[h],(a=this._isInvalidKey(p))!=null)throw a;this.data[p]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[p],!1)),this.stats.ksize-=this._getKeyLength(p),this.stats.keys--,c++,u=this.data[p],delete this.data[p],this.emit("del",p,u.v))}return c}take(o){var c;return n(this,l),c=this.get(o),c!=null&&this.del(o),c}ttl(o,c){var a;if(n(this,l),c||(c=this.options.stdTTL),!o)return!1;if((a=this._isInvalidKey(o))!=null)throw a;return this.data[o]!=null&&this._check(o,this.data[o])?(c>=0?this.data[o]=this._wrap(this.data[o].v,c,!1):this.del(o),!0):!1}getTtl(o){var c,a;if(n(this,l),!!o){if((a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return c=this.data[o].t,c}}keys(){var o;return n(this,l),o=Object.keys(this.data),o}has(o){var c;return n(this,l),c=this.data[o]!=null&&this._check(o,this.data[o]),c}getStats(){return n(this,l),this.stats}flushAll(o=!0){n(this,l),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(o),this.emit("flush")}flushStats(){n(this,l),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){n(this,l),this._killCheckPeriod()}_checkData(o=!0){var c,a,h;n(this,l),a=this.data;for(c in a)h=a[c],this._check(c,h);o&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,o),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(o,c){var a;return n(this,l),a=!0,c.t!==0&&c.t<Date.now()&&(this.options.deleteOnExpire&&(a=!1,this.del(o)),this.emit("expired",o,this._unwrap(c))),a}_isInvalidKey(o){var c;if(n(this,l),c=typeof o,s.call(this.validKeyTypes,c)<0)return this._error("EKEYTYPE",{type:typeof o})}_wrap(o,c,a=!0){var h,p,d,u;return n(this,l),this.options.useClones||(a=!1),p=Date.now(),h=0,u=1e3,c===0?h=0:c?h=p+c*u:this.options.stdTTL===0?h=this.options.stdTTL:h=p+this.options.stdTTL*u,d={t:h,v:a?r(o):o}}_unwrap(o,c=!0){return this.options.useClones||(c=!1),o.v!=null?c?r(o.v):o.v:null}_getKeyLength(o){return o.toString().length}_getValLength(o){return n(this,l),typeof o=="string"?o.length:this.options.forceString?JSON.stringify(o).length:Array.isArray(o)?this.options.arrayValueSize*o.length:typeof o=="number"?8:typeof(o!=null?o.then:void 0)=="function"?this.options.promiseValueSize:typeof Buffer!="undefined"&&Buffer!==null&&Buffer.isBuffer(o)?o.length:o!=null&&typeof o=="object"?this.options.objectValueSize*Object.keys(o).length:typeof o=="boolean"?8:0}_error(o,c={}){var a;return n(this,l),a=new Error,a.name=o,a.errorcode=o,a.message=this.ERRORS[o]!=null?this.ERRORS[o](c):"-",a.data=c,a}_initErrors(){var o,c,a;n(this,l),this.ERRORS={},a=this._ERRORS;for(c in a)o=a[c],this.ERRORS[c]=this.createErrorMessage(o)}createErrorMessage(o){return function(c){return o.replace("__key",c.type)}}}return l.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},l}.call(this)}).call(Vr)});var Yr=O((Gr,Xr)=>{"use strict";(function(){var e;e=Xr.exports=Jr(),e.version="5.1.2"}).call(Gr)});var tn=O((bu,en)=>{"use strict";en.exports=Zr;var{toString:qs}=Object.prototype,Qe=Symbol("circular-ref-tag"),Ze=Symbol("pino-raw-err-ref"),Qr=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},raw:{enumerable:!1,get:function(){return this[Ze]},set:function(e){this[Ze]=e}}});Object.defineProperty(Qr,Ze,{writable:!0,value:{}});function Zr(e){if(!(e instanceof Error))return e;e[Qe]=void 0;let t=Object.create(Qr);t.type=qs.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack;for(let r in e)if(t[r]===void 0){let i=e[r];i instanceof Error?i.hasOwnProperty(Qe)||(t[r]=Zr(i)):t[r]=i}return delete e[Qe],t.raw=e,t}});var on=O((wu,sn)=>{"use strict";sn.exports={mapHttpRequest:Bs,reqSerializer:nn};var et=Symbol("pino-raw-req-ref"),rn=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[et]},set:function(e){this[et]=e}}});Object.defineProperty(rn,et,{writable:!0,value:{}});function nn(e){let t=e.info||e.socket,r=Object.create(rn);return 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,r.query=e.query,r.params=e.params):r.url=e.path||(e.url?e.url.path||e.url:void 0),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function Bs(e){return{req:nn(e)}}});var un=O((Su,cn)=>{"use strict";cn.exports={mapHttpResponse:$s,resSerializer:an};var tt=Symbol("pino-raw-res-ref"),ln=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[tt]},set:function(e){this[tt]=e}}});Object.defineProperty(ln,tt,{writable:!0,value:{}});function an(e){let t=Object.create(ln);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function $s(e){return{res:an(e)}}});var nt=O((vu,fn)=>{"use strict";var rt=tn(),ke=on(),Te=un();fn.exports={err:rt,mapHttpRequest:ke.mapHttpRequest,mapHttpResponse:Te.mapHttpResponse,req:ke.reqSerializer,res:Te.resSerializer,wrapErrorSerializer:function(t){return t===rt?t:function(i){return t(rt(i))}},wrapRequestSerializer:function(t){return t===ke.reqSerializer?t:function(i){return t(ke.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===Te.resSerializer?t:function(i){return t(Te.resSerializer(i))}}}});var it=O((Eu,hn)=>{"use strict";function Cs(e,t){return t}hn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=Cs;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)s&&n.push(s.getFileName());return n}});var pn=O((Ou,dn)=>{"use strict";dn.exports=Is;function Is(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=i=>`fast-redact \u2013 Invalid path (${i})`}=e;return function({paths:n}){n.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let l=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(l)||/\/\*/.test(l))throw Error();Function(`
1
+ var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=Object.getOwnPropertyDescriptor,us=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertyNames,Vt=Object.getOwnPropertySymbols,hs=Object.getPrototypeOf,Ht=Object.prototype.hasOwnProperty,ds=Object.prototype.propertyIsEnumerable;var De=(e,t,r)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t)=>{for(var r in t||(t={}))Ht.call(t,r)&&De(e,r,t[r]);if(Vt)for(var r of Vt(t))ds.call(t,r)&&De(e,r,t[r]);return e},Q=(e,t)=>as(e,us(t));var B=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ys=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of fs(t))!Ht.call(e,n)&&n!==r&&ze(e,n,{get:()=>t[n],enumerable:!(i=cs(t,n))||i.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?ls(hs(e)):{},ys(t||!e||!e.__esModule?ze(r,"default",{value:e,enumerable:!0}):r,e));var Jt=(e,t,r)=>De(e,typeof t!="symbol"?t+"":t,r);var J=(e,t,r)=>new Promise((i,n)=>{var s=o=>{try{f(r.next(o))}catch(c){n(c)}},l=o=>{try{f(r.throw(o))}catch(c){n(c)}},f=o=>o.done?i(o.value):Promise.resolve(o.value).then(s,l);f((r=r.apply(e,t)).next())});var Fe=E((Pc,Gt)=>{"use strict";Gt.exports=class extends Error{constructor(r,i){super(r||"Unknown error");Jt(this,"name","AssertError");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i)}}});var We=E((zc,Xt)=>{"use strict";Xt.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var ne=E((Nc,Yt)=>{"use strict";var ps=Fe(),gs=We(),ms=Yt.exports=function(e,...t){if(e)return;if(t.length===1&&t[0]instanceof Error)throw t[0];let r=t.filter(i=>i!=="").map(i=>typeof i=="string"?i:i instanceof Error?i.message:gs(i));throw new ps(r.join(" "),ms)}});var ye=E((Fc,Zt)=>{"use strict";var Ke=ne(),Qt={};Zt.exports=function(e,t,r){if(t===!1||t===null||t===void 0)return e;r=r||{},typeof r=="string"&&(r={separator:r});let i=Array.isArray(t);Ke(!i||!r.separator,"Separator option is not valid for array-based chain");let n=i?t:t.split(r.separator||"."),s=e;for(let l=0;l<n.length;++l){let f=n[l],o=r.iterables&&Qt.iterables(s);if(Array.isArray(s)||o==="set"){let c=Number(f);Number.isInteger(c)&&(f=c<0?s.length+c:c)}if(!s||typeof s=="function"&&r.functions===!1||!o&&s[f]===void 0){Ke(!r.strict||l+1===n.length,"Missing segment",f,"in reach path ",t),Ke(typeof s=="object"||r.functions===!0||typeof s!="function","Invalid segment",f,"in reach path ",t),s=r.default;break}o?o==="set"?s=[...s][f]:s=s.get(f):s=s[f]}return s};Qt.iterables=function(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map"}});var Ue=E((I,tr)=>{"use strict";var er={};I=tr.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,url:URL.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};er.typeMap=new Map([["[object Error]",I.error],["[object Map]",I.map],["[object Promise]",I.promise],["[object Set]",I.set],["[object URL]",I.url],["[object WeakMap]",I.weakMap],["[object WeakSet]",I.weakSet]]);I.getInternalProto=function(e){if(Array.isArray(e))return I.array;if(Buffer&&e instanceof Buffer)return I.buffer;if(e instanceof Date)return I.date;if(e instanceof RegExp)return I.regex;if(e instanceof Error)return I.error;let t=Object.prototype.toString.call(e);return er.typeMap.get(t)||I.generic}});var we=E(rr=>{"use strict";rr.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var Se=E((Kc,nr)=>{"use strict";var bs=ye(),z=Ue(),ws=we(),Z={needsProtoHack:new Set([z.set,z.map,z.weakSet,z.weakMap])};nr.exports=Z.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let i=Z.clone,n=r;if(t.shallow){if(t.shallow!==!0)return Z.cloneWithShallow(e,t);i=o=>o}else if(n){let o=n.get(e);if(o)return o}else n=new Map;let s=z.getInternalProto(e);switch(s){case z.buffer:return Buffer==null?void 0:Buffer.from(e);case z.date:return new Date(e.getTime());case z.regex:case z.url:return new s.constructor(e)}let l=Z.base(e,s,t);if(l===e)return e;if(n&&n.set(e,l),s===z.set)for(let o of e)l.add(i(o,t,n));else if(s===z.map)for(let[o,c]of e)l.set(o,i(c,t,n));let f=ws.keys(e,t);for(let o of f){if(o==="__proto__")continue;if(s===z.array&&o==="length"){l.length=e.length;continue}let c=Object.getOwnPropertyDescriptor(e,o);c?c.get||c.set?Object.defineProperty(l,o,c):c.enumerable?l[o]=i(e[o],t,n):Object.defineProperty(l,o,{enumerable:!1,writable:!0,configurable:!0,value:i(e[o],t,n)}):Object.defineProperty(l,o,{enumerable:!0,writable:!0,configurable:!0,value:i(e[o],t,n)})}return l};Z.cloneWithShallow=function(e,t){let r=t.shallow;t=Object.assign({},t),t.shallow=!1;let i=new Map;for(let n of r){let s=bs(e,n);(typeof s=="object"||typeof s=="function")&&i.set(s,s)}return Z.clone(e,t,i)};Z.base=function(e,t,r){if(r.prototype===!1)return Z.needsProtoHack.has(t)?new t.constructor:t===z.array?[]:{};let i=Object.getPrototypeOf(e);if(i&&i.isImmutable)return e;if(t===z.array){let n=[];return i!==t&&Object.setPrototypeOf(n,i),n}if(Z.needsProtoHack.has(t)){let n=new i.constructor;return i!==t&&Object.setPrototypeOf(n,i),n}return Object.create(i)}});var He=E((Uc,or)=>{"use strict";var Ve=ne(),ir=Se(),Ss=we(),sr={};or.exports=sr.merge=function(e,t,r){if(Ve(e&&typeof e=="object","Invalid target value: must be an object"),Ve(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){Ve(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let n=0;n<t.length;++n)e.push(ir(t[n],{symbols:r.symbols}));return e}let i=Ss.keys(t,r);for(let n=0;n<i.length;++n){let s=i[n];if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let l=t[s];if(l&&typeof l=="object"){if(e[s]===l)continue;!e[s]||typeof e[s]!="object"||Array.isArray(e[s])!==Array.isArray(l)||l instanceof Date||Buffer&&Buffer.isBuffer(l)||l instanceof RegExp?e[s]=ir(l,{symbols:r.symbols}):sr.merge(e[s],l,r)}else(l!=null||r.nullOverride)&&(e[s]=l)}return e}});var fr=E((Vc,ur)=>{"use strict";var ve=ne(),ar=Se(),cr=He(),lr=ye(),Oe={};ur.exports=function(e,t,r={}){if(ve(e&&typeof e=="object","Invalid defaults value: must be an object"),ve(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),ve(typeof r=="object","Invalid options: must be an object"),!t)return null;if(r.shallow)return Oe.applyToDefaultsWithShallow(e,t,r);let i=ar(e);if(t===!0)return i;let n=r.nullOverride!==void 0?r.nullOverride:!1;return cr(i,t,{nullOverride:n,mergeArrays:!1})};Oe.applyToDefaultsWithShallow=function(e,t,r){let i=r.shallow;ve(Array.isArray(i),"Invalid keys");let n=new Map,s=t===!0?null:new Set;for(let o of i){o=Array.isArray(o)?o:o.split(".");let c=lr(e,o);c&&typeof c=="object"?n.set(c,s&&lr(t,o)||c):s&&s.add(o)}let l=ar(e,{},n);if(!s)return l;for(let o of s)Oe.reachCopy(l,t,o);let f=r.nullOverride!==void 0?r.nullOverride:!1;return cr(l,t,{nullOverride:f,mergeArrays:!1})};Oe.reachCopy=function(e,t,r){for(let s of r){if(!(s in t))return;let l=t[s];if(typeof l!="object"||l===null)return;t=l}let i=t,n=e;for(let s=0;s<r.length-1;++s){let l=r[s];typeof n[l]!="object"&&(n[l]={}),n=n[l]}n[r[r.length-1]]=i}});var dr=E((Hc,hr)=>{"use strict";var Je={};hr.exports=Je.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=Je.Bench.now()}elapsed(){return Je.Bench.now()-this.ts}static now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var Ge=E((Gc,yr)=>{"use strict";yr.exports=function(){}});var gr=E((Xc,pr)=>{"use strict";var vs=Ge();pr.exports=function(){return new Promise(vs)}});var Xe=E((Yc,mr)=>{"use strict";var G=Ue(),P={mismatched:null};mr.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!P.isDeepEqual(e,t,r,[])};P.isDeepEqual=function(e,t,r,i){if(e===t)return e!==0||1/e===1/t;let n=typeof e;if(n!==typeof t||e===null||t===null)return!1;if(n==="function"){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(n!=="object")return e!==e&&t!==t;let s=P.getSharedType(e,t,!!r.prototype);switch(s){case G.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case G.promise:return e===t;case G.regex:case G.url:return e.toString()===t.toString();case P.mismatched:return!1}for(let l=i.length-1;l>=0;--l)if(i[l].isSame(e,t))return!0;i.push(new P.SeenEntry(e,t));try{return!!P.isDeepEqualObj(s,e,t,r,i)}finally{i.pop()}};P.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?P.mismatched:G.getInternalProto(e);let i=G.getInternalProto(e);return i!==G.getInternalProto(t)?P.mismatched:i};P.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(r){return r}};P.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};P.isSetSimpleEqual=function(e,t){for(let r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0};P.isDeepEqualObj=function(e,t,r,i,n){var u;let{isDeepEqual:s,valueOf:l,hasOwnEnumerableProperty:f}=P,{keys:o,getOwnPropertySymbols:c}=Object;if(e===G.array)if(i.part){for(let g of t)for(let S of r)if(s(g,S,i,n))return!0}else{if(t.length!==r.length)return!1;for(let g=0;g<t.length;++g)if(!s(t[g],r[g],i,n))return!1;return!0}else if(e===G.set){if(t.size!==r.size)return!1;if(!P.isSetSimpleEqual(t,r)){let g=new Set(Set.prototype.values.call(r));for(let S of Set.prototype.values.call(t)){if(g.delete(S))continue;let w=!1;for(let v of g)if(s(S,v,i,n)){g.delete(v),w=!0;break}if(!w)return!1}}}else if(e===G.map){if(t.size!==r.size)return!1;for(let[g,S]of Map.prototype.entries.call(t))if(S===void 0&&!Map.prototype.has.call(r,g)||!s(S,Map.prototype.get.call(r,g),i,n))return!1}else if(e===G.error&&(t.name!==r.name||t.message!==r.message))return!1;let a=l(t),h=l(r);if((t!==a||r!==h)&&!s(a,h,i,n))return!1;let y=o(t);if(!i.part&&y.length!==o(r).length&&!i.skip)return!1;let d=0;for(let g of y){if(i.skip&&i.skip.includes(g)){r[g]===void 0&&++d;continue}if(!f(r,g)||!s(t[g],r[g],i,n))return!1}if(!i.part&&y.length-d!==o(r).length)return!1;if(i.symbols!==!1){let g=c(t),S=new Set(c(r));for(let w of g){if(!((u=i.skip)!=null&&u.includes(w))){if(f(t,w)){if(!f(r,w)||!s(t[w],r[w],i,n))return!1}else if(f(r,w))return!1}S.delete(w)}for(let w of S)if(f(r,w))return!1}return!0};P.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}});var Ye=E((Zc,br)=>{"use strict";br.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var Sr=E((eu,wr)=>{"use strict";var Ee=ne(),Os=Xe(),Es=Ye(),xs=we(),K={};wr.exports=function(e,t,r={}){return typeof t!="object"&&(t=[t]),Ee(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof e=="string"?K.string(e,t,r):Array.isArray(e)?K.array(e,t,r):(Ee(typeof e=="object","Reference must be string or an object"),K.object(e,t,r))};K.array=function(e,t,r){if(Array.isArray(t)||(t=[t]),!e.length||r.only&&r.once&&e.length!==t.length)return!1;let i,n=new Map;for(let l of t)if(!r.deep||!l||typeof l!="object"){let f=n.get(l);f?++f.allowed:n.set(l,{allowed:1,hits:0})}else{i=i!=null?i:K.compare(r);let f=!1;for(let[o,c]of n.entries())if(i(o,l)){++c.allowed,f=!0;break}f||n.set(l,{allowed:1,hits:0})}let s=0;for(let l of e){let f;if(!r.deep||!l||typeof l!="object")f=n.get(l);else{i=i!=null?i:K.compare(r);for(let[o,c]of n.entries())if(i(o,l)){f=c;break}}if(f&&(++f.hits,++s,r.once&&f.hits>f.allowed))return!1}if(r.only&&s!==e.length)return!1;for(let l of n.values())if(l.hits!==l.allowed&&l.hits<l.allowed&&!r.part)return!1;return!!s};K.object=function(e,t,r){Ee(r.once===void 0,"Cannot use option once with object");let i=xs.keys(e,r);if(!i.length)return!1;if(Array.isArray(t))return K.array(i,t,r);let n=Object.getOwnPropertySymbols(t).filter(o=>t.propertyIsEnumerable(o)),s=[...Object.keys(t),...n],l=K.compare(r),f=new Set(s);for(let o of i){if(!f.has(o)){if(r.only)return!1;continue}if(!l(t[o],e[o]))return!1;f.delete(o)}return f.size?r.part?f.size<s.length:!1:!0};K.string=function(e,t,r){if(e==="")return t.length===1&&t[0]===""||!r.once&&!t.some(o=>o!=="");let i=new Map,n=[];for(let o of t)if(Ee(typeof o=="string","Cannot compare string reference to non-string value"),o){let c=i.get(o);c?++c.allowed:(i.set(o,{allowed:1,hits:0}),n.push(Es(o)))}else if(r.once||r.only)return!1;if(!n.length)return!0;let s=new RegExp(`(${n.join("|")})`,"g"),l=e.replace(s,(o,c)=>(++i.get(c).hits,""));if(r.only&&l)return!1;let f=!1;for(let o of i.values())if(o.hits&&(f=!0),o.hits!==o.allowed&&(o.hits<o.allowed&&!r.part||r.once))return!1;return!!f};K.compare=function(e){if(!e.deep)return K.shallow;let t=e.only!==void 0,r=e.part!==void 0,i={prototype:t?e.only:r?!e.part:!1,part:t?!e.only:r?e.part:!1};return(n,s)=>Os(n,s,i)};K.shallow=function(e,t){return e===t}});var Or=E((tu,vr)=>{"use strict";var _s=ne();vr.exports=function(e){return _s(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var xr=E((ru,Er)=>{"use strict";var te={};Er.exports=function(e){if(!e)return"";let t="";for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);te.isSafe(i)?t+=e[r]:t+=te.escapeHtmlChar(i)}return t};te.escapeHtmlChar=function(e){let t=te.namedHtml.get(e);return t||(e>=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)};te.isSafe=function(e){return te.safeCharCodes.has(e)};te.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]);te.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()});var Tr=E((nu,_r)=>{"use strict";var xe={};_r.exports=function(e){return e?e.replace(/[<>&\u2028\u2029]/g,xe.escape):""};xe.escape=function(e){return xe.replacements.get(e)};xe.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var jr=E((iu,kr)=>{"use strict";var Ar={};kr.exports=Ar.flatten=function(e,t){let r=t||[];for(let i of e)Array.isArray(i)?Ar.flatten(i,r):r.push(i);return r}});var qr=E((su,Lr)=>{"use strict";var Rr={};Lr.exports=function(e,t,r={}){if(!e||!t)return r.first?null:[];let i=[],n=Array.isArray(e)?new Set(e):e,s=new Set;for(let l of t)if(Rr.has(n,l)&&!s.has(l)){if(r.first)return l;i.push(l),s.add(l)}return r.first?null:i};Rr.has=function(e,t){return typeof e.has=="function"?e.has(t):e[t]!==void 0}});var Br=E((ou,$r)=>{"use strict";$r.exports=function(e){return typeof(e==null?void 0:e.then)=="function"}});var Ir=E((lu,Cr)=>{"use strict";var Mr={wrapped:Symbol("wrapped")};Cr.exports=function(e){if(e[Mr.wrapped])return e;let t=!1,r=function(...i){t||(t=!0,e(...i))};return r[Mr.wrapped]=!0,r}});var Dr=E((au,Pr)=>{"use strict";var Ts=ye();Pr.exports=function(e,t,r){return t.replace(/{([^{}]+)}/g,(i,n)=>{let s=Ts(e,n,r);return s!=null?s:""})}});var Nr=E((cu,zr)=>{"use strict";var As={maxTimer:2147483647};zr.exports=function(e,t,r){if(typeof e=="bigint"&&(e=Number(e)),e>=Number.MAX_SAFE_INTEGER&&(e=1/0),typeof e!="number"&&e!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let n=r?r.setTimeout:setTimeout,s=()=>{let l=Math.min(e,As.maxTimer);e-=l,n(()=>e>0?s():i(t),l)};e!==1/0&&s()})}});var Fr=E(q=>{"use strict";q.applyToDefaults=fr();q.assert=ne();q.AssertError=Fe();q.Bench=dr();q.block=gr();q.clone=Se();q.contain=Sr();q.deepEqual=Xe();q.escapeHeaderAttribute=Or();q.escapeHtml=xr();q.escapeJson=Tr();q.escapeRegex=Ye();q.flatten=jr();q.ignore=Ge();q.intersect=qr();q.isPromise=Br();q.merge=He();q.once=Ir();q.reach=ye();q.reachTemplate=Dr();q.stringify=We();q.wait=Nr()});var Wr=E(m=>{"use strict";var ie=Fr(),N={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};m.Boom=class extends Error{constructor(e,t={}){if(e instanceof Error)return m.boomify(ie.clone(e),t);let{statusCode:r=500,data:i=null,ctor:n=m.Boom}=t,s=new Error(e||void 0);Error.captureStackTrace(s,n),s.data=i;let l=N.initialize(s,r);return Object.defineProperty(l,"typeof",{value:n}),t.decorate&&Object.assign(l,t.decorate),l}static[Symbol.hasInstance](e){return this===m.Boom?m.isBoom(e):this.prototype.isPrototypeOf(e)}};m.isBoom=function(e,t){return e instanceof Error&&!!e.isBoom&&(!t||e.output.statusCode===t)};m.boomify=function(e,t){var r,i;return ie.assert(e instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(e.data=t.data),t.decorate&&Object.assign(e,t.decorate),e.isBoom?t.override===!1||!t.statusCode&&!t.message?e:N.initialize(e,(i=t.statusCode)!=null?i:e.output.statusCode,t.message):N.initialize(e,(r=t.statusCode)!=null?r:500,t.message)};m.badRequest=function(e,t){return new m.Boom(e,{statusCode:400,data:t,ctor:m.badRequest})};m.unauthorized=function(e,t,r){let i=new m.Boom(e,{statusCode:401,ctor:m.unauthorized});if(!t)return i;if(typeof t!="string")return i.output.headers["WWW-Authenticate"]=t.join(", "),i;let n=`${t}`;return(r||e)&&(i.output.payload.attributes={}),r&&(typeof r=="string"?(n+=" "+ie.escapeHeaderAttribute(r),i.output.payload.attributes=r):n+=" "+Object.keys(r).map(s=>{var f;let l=(f=r[s])!=null?f:"";return i.output.payload.attributes[s]=l,`${s}="${ie.escapeHeaderAttribute(l.toString())}"`}).join(", ")),e?(r&&(n+=","),n+=` error="${ie.escapeHeaderAttribute(e)}"`,i.output.payload.attributes.error=e):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=n,i};m.paymentRequired=function(e,t){return new m.Boom(e,{statusCode:402,data:t,ctor:m.paymentRequired})};m.forbidden=function(e,t){return new m.Boom(e,{statusCode:403,data:t,ctor:m.forbidden})};m.notFound=function(e,t){return new m.Boom(e,{statusCode:404,data:t,ctor:m.notFound})};m.methodNotAllowed=function(e,t,r){let i=new m.Boom(e,{statusCode:405,data:t,ctor:m.methodNotAllowed});return typeof r=="string"&&(r=[r]),Array.isArray(r)&&(i.output.headers.Allow=r.join(", ")),i};m.notAcceptable=function(e,t){return new m.Boom(e,{statusCode:406,data:t,ctor:m.notAcceptable})};m.proxyAuthRequired=function(e,t){return new m.Boom(e,{statusCode:407,data:t,ctor:m.proxyAuthRequired})};m.clientTimeout=function(e,t){return new m.Boom(e,{statusCode:408,data:t,ctor:m.clientTimeout})};m.conflict=function(e,t){return new m.Boom(e,{statusCode:409,data:t,ctor:m.conflict})};m.resourceGone=function(e,t){return new m.Boom(e,{statusCode:410,data:t,ctor:m.resourceGone})};m.lengthRequired=function(e,t){return new m.Boom(e,{statusCode:411,data:t,ctor:m.lengthRequired})};m.preconditionFailed=function(e,t){return new m.Boom(e,{statusCode:412,data:t,ctor:m.preconditionFailed})};m.entityTooLarge=function(e,t){return new m.Boom(e,{statusCode:413,data:t,ctor:m.entityTooLarge})};m.uriTooLong=function(e,t){return new m.Boom(e,{statusCode:414,data:t,ctor:m.uriTooLong})};m.unsupportedMediaType=function(e,t){return new m.Boom(e,{statusCode:415,data:t,ctor:m.unsupportedMediaType})};m.rangeNotSatisfiable=function(e,t){return new m.Boom(e,{statusCode:416,data:t,ctor:m.rangeNotSatisfiable})};m.expectationFailed=function(e,t){return new m.Boom(e,{statusCode:417,data:t,ctor:m.expectationFailed})};m.teapot=function(e,t){return new m.Boom(e,{statusCode:418,data:t,ctor:m.teapot})};m.badData=function(e,t){return new m.Boom(e,{statusCode:422,data:t,ctor:m.badData})};m.locked=function(e,t){return new m.Boom(e,{statusCode:423,data:t,ctor:m.locked})};m.failedDependency=function(e,t){return new m.Boom(e,{statusCode:424,data:t,ctor:m.failedDependency})};m.tooEarly=function(e,t){return new m.Boom(e,{statusCode:425,data:t,ctor:m.tooEarly})};m.preconditionRequired=function(e,t){return new m.Boom(e,{statusCode:428,data:t,ctor:m.preconditionRequired})};m.tooManyRequests=function(e,t){return new m.Boom(e,{statusCode:429,data:t,ctor:m.tooManyRequests})};m.illegal=function(e,t){return new m.Boom(e,{statusCode:451,data:t,ctor:m.illegal})};m.internal=function(e,t,r=500){return N.serverError(e,t,r,m.internal)};m.notImplemented=function(e,t){return N.serverError(e,t,501,m.notImplemented)};m.badGateway=function(e,t){return N.serverError(e,t,502,m.badGateway)};m.serverUnavailable=function(e,t){return N.serverError(e,t,503,m.serverUnavailable)};m.gatewayTimeout=function(e,t){return N.serverError(e,t,504,m.gatewayTimeout)};m.badImplementation=function(e,t){let r=N.serverError(e,t,500,m.badImplementation);return r.isDeveloperError=!0,r};N.initialize=function(e,t,r){let i=parseInt(t,10);if(ie.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",t),e.isBoom=!0,e.isServer=i>=500,e.hasOwnProperty("data")||(e.data=null),e.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(e,"reformat",{value:N.reformat,configurable:!0}),!r&&!e.message&&(e.reformat(),r=e.output.payload.error),r){let n=Object.getOwnPropertyDescriptor(e,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"message");ie.assert(!n||n.configurable&&!n.get,"The error is not compatible with boom"),e.message=r+(e.message?": "+e.message:""),e.output.payload.message=e.message}return e.reformat(),e};N.reformat=function(e=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=N.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&e!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};N.serverError=function(e,t,r,i){return t instanceof Error&&!t.isBoom?m.boomify(t,{statusCode:r,message:e}):new m.Boom(e,{statusCode:r,data:t,ctor:i})}});var Kr=E((du,_e)=>{"use strict";var ks=function(){"use strict";function e(a,h){return h!=null&&a instanceof h}var t;try{t=Map}catch(a){t=function(){}}var r;try{r=Set}catch(a){r=function(){}}var i;try{i=Promise}catch(a){i=function(){}}function n(a,h,y,d,u){typeof h=="object"&&(y=h.depth,d=h.prototype,u=h.includeNonEnumerable,h=h.circular);var g=[],S=[],w=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof y=="undefined"&&(y=1/0);function v(b,x){if(b===null)return null;if(x===0)return b;var O,T;if(typeof b!="object")return b;if(e(b,t))O=new t;else if(e(b,r))O=new r;else if(e(b,i))O=new i(function(H,he){b.then(function(de){H(v(de,x-1))},function(de){he(v(de,x-1))})});else if(n.__isArray(b))O=[];else if(n.__isRegExp(b))O=new RegExp(b.source,c(b)),b.lastIndex&&(O.lastIndex=b.lastIndex);else if(n.__isDate(b))O=new Date(b.getTime());else{if(w&&Buffer.isBuffer(b))return Buffer.allocUnsafe?O=Buffer.allocUnsafe(b.length):O=new Buffer(b.length),b.copy(O),O;e(b,Error)?O=Object.create(b):typeof d=="undefined"?(T=Object.getPrototypeOf(b),O=Object.create(T)):(O=Object.create(d),T=d)}if(h){var k=g.indexOf(b);if(k!=-1)return S[k];g.push(b),S.push(O)}e(b,t)&&b.forEach(function(H,he){var de=v(he,x-1),os=v(H,x-1);O.set(de,os)}),e(b,r)&&b.forEach(function(H){var he=v(H,x-1);O.add(he)});for(var A in b){var _;T&&(_=Object.getOwnPropertyDescriptor(T,A)),!(_&&_.set==null)&&(O[A]=v(b[A],x-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(b),A=0;A<R.length;A++){var $=R[A],j=Object.getOwnPropertyDescriptor(b,$);j&&!j.enumerable&&!u||(O[$]=v(b[$],x-1),j.enumerable||Object.defineProperty(O,$,{enumerable:!1}))}if(u)for(var C=Object.getOwnPropertyNames(b),A=0;A<C.length;A++){var M=C[A],j=Object.getOwnPropertyDescriptor(b,M);j&&j.enumerable||(O[M]=v(b[M],x-1),Object.defineProperty(O,M,{enumerable:!1}))}return O}return v(a,y)}n.clonePrototype=function(h){if(h===null)return null;var y=function(){};return y.prototype=h,new y};function s(a){return Object.prototype.toString.call(a)}n.__objToStr=s;function l(a){return typeof a=="object"&&s(a)==="[object Date]"}n.__isDate=l;function f(a){return typeof a=="object"&&s(a)==="[object Array]"}n.__isArray=f;function o(a){return typeof a=="object"&&s(a)==="[object RegExp]"}n.__isRegExp=o;function c(a){var h="";return a.global&&(h+="g"),a.ignoreCase&&(h+="i"),a.multiline&&(h+="m"),h}return n.__getRegExpFlags=c,n}();typeof _e=="object"&&_e.exports&&(_e.exports=ks)});var Hr=E((Ur,Vr)=>{"use strict";(function(){var e,t,r,i=[].splice,n=function(l,f){if(!(l instanceof f))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=Kr(),e=B("events").EventEmitter,Vr.exports=t=function(){class l extends e{constructor(o={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=o,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(c=>{var a;a=this[c],this[c]=function(...h){var y,d,u,g;if(u=h,[...h]=u,[y]=i.call(h,-1),typeof y=="function")try{g=a(...h),y(null,g)}catch(S){d=S,y(d)}else return a(...h,y)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(o){var c,a;if(n(this,l),(a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return this.stats.hits++,c=this._unwrap(this.data[o]),c;this.stats.misses++}mget(o){var c,a,h,y,d,u;if(n(this,l),!Array.isArray(o))throw c=this._error("EKEYSTYPE"),c;for(u={},h=0,d=o.length;h<d;h++){if(y=o[h],(a=this._isInvalidKey(y))!=null)throw a;this.data[y]!=null&&this._check(y,this.data[y])?(this.stats.hits++,u[y]=this._unwrap(this.data[y])):this.stats.misses++}return u}set(o,c,a){var h,y,d;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw h=this._error("ECACHEFULL"),h;if(this.options.forceString&&!1==="string"&&(c=JSON.stringify(c)),a==null&&(a=this.options.stdTTL),(y=this._isInvalidKey(o))!=null)throw y;return d=!1,this.data[o]&&(d=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[o],!1))),this.data[o]=this._wrap(c,a),this.stats.vsize+=this._getValLength(c),d||(this.stats.ksize+=this._getKeyLength(o),this.stats.keys++),this.emit("set",o,c),!0}mset(o){var c,a,h,y,d,u,g,S,w,v;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys+o.length>=this.options.maxKeys)throw c=this._error("ECACHEFULL"),c;for(h=0,g=o.length;h<g;h++){if(u=o[h],{key:d,val:v,ttl:w}=u,w&&typeof w!="number")throw c=this._error("ETTLTYPE"),c;if((a=this._isInvalidKey(d))!=null)throw a}for(y=0,S=o.length;y<S;y++)u=o[y],{key:d,val:v,ttl:w}=u,this.set(d,v,w);return!0}del(o){var c,a,h,y,d,u;for(n(this,l),Array.isArray(o)||(o=[o]),c=0,h=0,d=o.length;h<d;h++){if(y=o[h],(a=this._isInvalidKey(y))!=null)throw a;this.data[y]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[y],!1)),this.stats.ksize-=this._getKeyLength(y),this.stats.keys--,c++,u=this.data[y],delete this.data[y],this.emit("del",y,u.v))}return c}take(o){var c;return n(this,l),c=this.get(o),c!=null&&this.del(o),c}ttl(o,c){var a;if(n(this,l),c||(c=this.options.stdTTL),!o)return!1;if((a=this._isInvalidKey(o))!=null)throw a;return this.data[o]!=null&&this._check(o,this.data[o])?(c>=0?this.data[o]=this._wrap(this.data[o].v,c,!1):this.del(o),!0):!1}getTtl(o){var c,a;if(n(this,l),!!o){if((a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return c=this.data[o].t,c}}keys(){var o;return n(this,l),o=Object.keys(this.data),o}has(o){var c;return n(this,l),c=this.data[o]!=null&&this._check(o,this.data[o]),c}getStats(){return n(this,l),this.stats}flushAll(o=!0){n(this,l),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(o),this.emit("flush")}flushStats(){n(this,l),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){n(this,l),this._killCheckPeriod()}_checkData(o=!0){var c,a,h;n(this,l),a=this.data;for(c in a)h=a[c],this._check(c,h);o&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,o),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(o,c){var a;return n(this,l),a=!0,c.t!==0&&c.t<Date.now()&&(this.options.deleteOnExpire&&(a=!1,this.del(o)),this.emit("expired",o,this._unwrap(c))),a}_isInvalidKey(o){var c;if(n(this,l),c=typeof o,s.call(this.validKeyTypes,c)<0)return this._error("EKEYTYPE",{type:typeof o})}_wrap(o,c,a=!0){var h,y,d,u;return n(this,l),this.options.useClones||(a=!1),y=Date.now(),h=0,u=1e3,c===0?h=0:c?h=y+c*u:this.options.stdTTL===0?h=this.options.stdTTL:h=y+this.options.stdTTL*u,d={t:h,v:a?r(o):o}}_unwrap(o,c=!0){return this.options.useClones||(c=!1),o.v!=null?c?r(o.v):o.v:null}_getKeyLength(o){return o.toString().length}_getValLength(o){return n(this,l),typeof o=="string"?o.length:this.options.forceString?JSON.stringify(o).length:Array.isArray(o)?this.options.arrayValueSize*o.length:typeof o=="number"?8:typeof(o!=null?o.then:void 0)=="function"?this.options.promiseValueSize:typeof Buffer!="undefined"&&Buffer!==null&&Buffer.isBuffer(o)?o.length:o!=null&&typeof o=="object"?this.options.objectValueSize*Object.keys(o).length:typeof o=="boolean"?8:0}_error(o,c={}){var a;return n(this,l),a=new Error,a.name=o,a.errorcode=o,a.message=this.ERRORS[o]!=null?this.ERRORS[o](c):"-",a.data=c,a}_initErrors(){var o,c,a;n(this,l),this.ERRORS={},a=this._ERRORS;for(c in a)o=a[c],this.ERRORS[c]=this.createErrorMessage(o)}createErrorMessage(o){return function(c){return o.replace("__key",c.type)}}}return l.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},l}.call(this)}).call(Ur)});var Xr=E((Jr,Gr)=>{"use strict";(function(){var e;e=Gr.exports=Hr(),e.version="5.1.2"}).call(Jr)});var en=E((yu,Zr)=>{"use strict";Zr.exports=Qr;var{toString:js}=Object.prototype,Qe=Symbol("circular-ref-tag"),Ze=Symbol("pino-raw-err-ref"),Yr=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},raw:{enumerable:!1,get:function(){return this[Ze]},set:function(e){this[Ze]=e}}});Object.defineProperty(Yr,Ze,{writable:!0,value:{}});function Qr(e){if(!(e instanceof Error))return e;e[Qe]=void 0;let t=Object.create(Yr);t.type=js.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack;for(let r in e)if(t[r]===void 0){let i=e[r];i instanceof Error?i.hasOwnProperty(Qe)||(t[r]=Qr(i)):t[r]=i}return delete e[Qe],t.raw=e,t}});var sn=E((pu,nn)=>{"use strict";nn.exports={mapHttpRequest:Rs,reqSerializer:rn};var et=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[et]},set:function(e){this[et]=e}}});Object.defineProperty(tn,et,{writable:!0,value:{}});function rn(e){let t=e.info||e.socket,r=Object.create(tn);return 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,r.query=e.query,r.params=e.params):r.url=e.path||(e.url?e.url.path||e.url:void 0),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function Rs(e){return{req:rn(e)}}});var cn=E((gu,an)=>{"use strict";an.exports={mapHttpResponse:Ls,resSerializer:ln};var tt=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[tt]},set:function(e){this[tt]=e}}});Object.defineProperty(on,tt,{writable:!0,value:{}});function ln(e){let t=Object.create(on);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function Ls(e){return{res:ln(e)}}});var nt=E((mu,un)=>{"use strict";var rt=en(),Te=sn(),Ae=cn();un.exports={err:rt,mapHttpRequest:Te.mapHttpRequest,mapHttpResponse:Ae.mapHttpResponse,req:Te.reqSerializer,res:Ae.resSerializer,wrapErrorSerializer:function(t){return t===rt?t:function(i){return t(rt(i))}},wrapRequestSerializer:function(t){return t===Te.reqSerializer?t:function(i){return t(Te.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===Ae.resSerializer?t:function(i){return t(Ae.resSerializer(i))}}}});var it=E((bu,fn)=>{"use strict";function qs(e,t){return t}fn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=qs;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)s&&n.push(s.getFileName());return n}});var dn=E((wu,hn)=>{"use strict";hn.exports=$s;function $s(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=i=>`fast-redact \u2013 Invalid path (${i})`}=e;return function({paths:n}){n.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let l=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(l)||/\/\*/.test(l))throw Error();Function(`
2
2
  'use strict'
3
3
  const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
4
4
  const \u3007 = null;
5
5
  o${l}
6
- if ([o${l}].length !== 1) throw Error()`)()}catch(l){throw Error(r(s))}})}}});var Ae=O((xu,yn)=>{"use strict";yn.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var mn=O((_u,gn)=>{"use strict";var Ms=Ae();gn.exports=Ps;function Ps({paths:e}){let t=[];var r=0;let i=e.reduce(function(n,s,l){var f=s.match(Ms).map(a=>a.replace(/'|"|`/g,""));let o=s[0]==="[";f=f.map(a=>a[0]==="["?a.substr(1,a.length-2):a);let c=f.indexOf("*");if(c>-1){let a=f.slice(0,c),h=a.join("."),p=f.slice(c+1,f.length),d=p.length>0;r++,t.push({before:a,beforeStr:h,after:p,nested:d})}else n[s]={path:f,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:o};return n},{});return{wildcards:t,wcLen:r,secret:i}}});var wn=O((ku,bn)=>{"use strict";var Ds=Ae();bn.exports=Ns;function Ns({secret:e,serialize:t,wcLen:r,strict:i,isCensorFct:n,censorFctTakesPath:s},l){let f=Function("o",`
6
+ if ([o${l}].length !== 1) throw Error()`)()}catch(l){throw Error(r(s))}})}}});var ke=E((Su,yn)=>{"use strict";yn.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var gn=E((vu,pn)=>{"use strict";var Bs=ke();pn.exports=Ms;function Ms({paths:e}){let t=[];var r=0;let i=e.reduce(function(n,s,l){var f=s.match(Bs).map(a=>a.replace(/'|"|`/g,""));let o=s[0]==="[";f=f.map(a=>a[0]==="["?a.substr(1,a.length-2):a);let c=f.indexOf("*");if(c>-1){let a=f.slice(0,c),h=a.join("."),y=f.slice(c+1,f.length),d=y.length>0;r++,t.push({before:a,beforeStr:h,after:y,nested:d})}else n[s]={path:f,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:o};return n},{});return{wildcards:t,wcLen:r,secret:i}}});var bn=E((Ou,mn)=>{"use strict";var Cs=ke();mn.exports=Is;function Is({secret:e,serialize:t,wcLen:r,strict:i,isCensorFct:n,censorFctTakesPath:s},l){let f=Function("o",`
7
7
  if (typeof o !== 'object' || o == null) {
8
- ${Ks(i,t)}
8
+ ${Ns(i,t)}
9
9
  }
10
10
  const { censor, secret } = this
11
11
  const originalSecret = {}
@@ -14,12 +14,12 @@ var us=Object.create;var Ne=Object.defineProperty,fs=Object.defineProperties,hs=
14
14
  originalSecret[secretKeys[i]] = secret[secretKeys[i]]
15
15
  }
16
16
 
17
- ${zs(e,n,s)}
17
+ ${Ps(e,n,s)}
18
18
  this.compileRestore()
19
- ${Fs(r>0,n,s)}
19
+ ${Ds(r>0,n,s)}
20
20
  this.secret = originalSecret
21
- ${Ws(t)}
22
- `).bind(l);return f.state=l,t===!1&&(f.restore=o=>l.restore(o)),f}function zs(e,t,r){return Object.keys(e).map(i=>{let{escPath:n,leadingBracket:s,path:l}=e[i],f=s?1:0,o=s?"":".",c=[];for(var a;(a=Ds.exec(i))!==null;){let[,u]=a,{index:g,input:S}=a;g>f&&c.push(S.substring(0,g-(u?0:1)))}var h=c.map(u=>`o${o}${u}`).join(" && ");h.length===0?h+=`o${o}${i} != null`:h+=` && o${o}${i} != null`;let p=`
21
+ ${zs(t)}
22
+ `).bind(l);return f.state=l,t===!1&&(f.restore=o=>l.restore(o)),f}function Ps(e,t,r){return Object.keys(e).map(i=>{let{escPath:n,leadingBracket:s,path:l}=e[i],f=s?1:0,o=s?"":".",c=[];for(var a;(a=Cs.exec(i))!==null;){let[,u]=a,{index:g,input:S}=a;g>f&&c.push(S.substring(0,g-(u?0:1)))}var h=c.map(u=>`o${o}${u}`).join(" && ");h.length===0?h+=`o${o}${i} != null`:h+=` && o${o}${i} != null`;let y=`
23
23
  switch (true) {
24
24
  ${c.reverse().map(u=>`
25
25
  case o${o}${u} === censor:
@@ -36,11 +36,11 @@ var us=Object.create;var Ne=Object.defineProperty,fs=Object.defineProperties,hs=
36
36
  } else {
37
37
  secret[${n}].val = val
38
38
  o${o}${i} = ${t?`censor(${d})`:"censor"}
39
- ${p}
39
+ ${y}
40
40
  }
41
41
  }
42
42
  `}).join(`
43
- `)}function Fs(e,t,r){return e===!0?`
43
+ `)}function Ds(e,t,r){return e===!0?`
44
44
  {
45
45
  const { wildcards, wcLen, groupRedact, nestedRedact } = this
46
46
  for (var i = 0; i < wcLen; i++) {
@@ -51,16 +51,16 @@ var us=Object.create;var Ne=Object.defineProperty,fs=Object.defineProperties,hs=
51
51
  } else secret[beforeStr] = groupRedact(o, before, censor, ${t}, ${r})
52
52
  }
53
53
  }
54
- `:""}function Ws(e){return e===!1?"return o":`
54
+ `:""}function zs(e){return e===!1?"return o":`
55
55
  var s = this.serialize(o)
56
56
  this.restore(o)
57
57
  return s
58
- `}function Ks(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}});var ot=O((Tu,En)=>{"use strict";En.exports={groupRedact:Vs,groupRestore:Us,nestedRedact:Js,nestedRestore:Hs};function Us({keys:e,values:t,target:r}){if(r==null||typeof r=="string")return;let i=e.length;for(var n=0;n<i;n++){let s=e[n];r[s]=t[n]}}function Vs(e,t,r,i,n){let s=Sn(e,t);if(s==null||typeof s=="string")return{keys:null,values:null,target:s,flat:!0};let l=Object.keys(s),f=l.length,o=t.length,c=n?[...t]:void 0,a=new Array(f);for(var h=0;h<f;h++){let p=l[h];a[h]=s[p],n?(c[o]=p,s[p]=r(s[p],c)):i?s[p]=r(s[p]):s[p]=r}return{keys:l,values:a,target:s,flat:!0}}function Hs(e){for(let t=0;t<e.length;t++){let{target:r,path:i,value:n}=e[t],s=r;for(let l=i.length-1;l>0;l--)s=s[i[l]];s[i[0]]=n}}function Js(e,t,r,i,n,s,l){let f=Sn(t,r);if(f==null)return;let o=Object.keys(f),c=o.length;for(var a=0;a<c;a++){let h=o[a];Gs(e,f,h,r,i,n,s,l)}return e}function st(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}function Gs(e,t,r,i,n,s,l,f){let o=n.length,c=o-1,a=r;var h=-1,p,d,u,g=null,S=null,w,v,b=!1,x=0,E=0,k=Xs();if(u=p=t[r],typeof p=="object"){for(;p!=null&&++h<o&&(E+=1,r=n[h],g=u,!(r!=="*"&&!S&&!(typeof p=="object"&&r in p)));)if(!(r==="*"&&(S==="*"&&(b=!0),S=r,h!==c))){if(S){let T=Object.keys(p);for(var A=0;A<T.length;A++){let _=T[A];if(v=p[_],w=r==="*",b)k=te(k,_,E),x=h,u=vn(v,x-1,r,i,n,s,l,f,a,p,d,u,w,_,h,c,k,e,t[a],E+1);else if(w||typeof v=="object"&&v!==null&&r in v){if(w?u=v:u=v[r],d=h!==c?u:l?f?s(u,[...i,a,...n]):s(u):s,w){let L=ge(te(k,_,E),u,t[a]);e.push(L),p[_]=d}else if(v[r]!==d)if(d===void 0&&s!==void 0||st(v,r)&&d===u)k=te(k,_,E);else{k=te(k,_,E);let L=ge(te(k,r,E+1),u,t[a]);e.push(L),v[r]=d}}}S=null}else{if(u=p[r],k=te(k,r,E),d=h!==c?u:l?f?s(u,[...i,a,...n]):s(u):s,!(st(p,r)&&d===u||d===void 0&&s!==void 0)){let T=ge(k,u,t[a]);e.push(T),p[r]=d}p=p[r]}if(typeof p!="object")break}}}function Sn(e,t){for(var r=-1,i=t.length,n=e;n!=null&&++r<i;)n=n[t[r]];return n}function vn(e,t,r,i,n,s,l,f,o,c,a,h,p,d,u,g,S,w,v,b){if(t===0&&(p||typeof e=="object"&&e!==null&&r in e)){if(p?h=e:h=e[r],a=u!==g?h:l?f?s(h,[...i,o,...n]):s(h):s,p){let x=ge(S,h,v);w.push(x),c[d]=a}else if(e[r]!==a){if(!(a===void 0&&s!==void 0||st(e,r)&&a===h)){let x=ge(te(S,r,b+1),h,v);w.push(x),e[r]=a}}}for(let x in e)typeof e[x]=="object"&&(S=te(S,x,b),vn(e[x],t-1,r,i,n,s,l,f,o,c,a,h,p,d,u,g,S,w,v,b+1))}function Xs(){return{parent:null,key:null,children:[],depth:0}}function te(e,t,r){if(e.depth===r)return te(e.parent,t,r);var i={parent:e,key:t,depth:r,children:[]};return e.children.push(i),i}function ge(e,t,r){let i=e,n=[];do n.push(i.key),i=i.parent;while(i.parent!=null);return{path:n,value:t,target:r}}});var xn=O((Au,On)=>{"use strict";var{groupRestore:Ys,nestedRestore:Qs}=ot();On.exports=Zs;function Zs(){return function(){if(this.restore){this.restore.state.secret=this.secret;return}let{secret:t,wcLen:r}=this,i=Object.keys(t),n=eo(t,i),s=r>0,l=s?{secret:t,groupRestore:Ys,nestedRestore:Qs}:{secret:t};this.restore=Function("o",to(n,i,s)).bind(l),this.restore.state=l}}function eo(e,t){return t.map(r=>{let{circle:i,escPath:n,leadingBracket:s}=e[r],f=i?`o.${i} = secret[${n}].val`:`o${s?"":"."}${r} = secret[${n}].val`,o=`secret[${n}].val = undefined`;return`
58
+ `}function Ns(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}});var ot=E((Eu,vn)=>{"use strict";vn.exports={groupRedact:Ws,groupRestore:Fs,nestedRedact:Us,nestedRestore:Ks};function Fs({keys:e,values:t,target:r}){if(r==null||typeof r=="string")return;let i=e.length;for(var n=0;n<i;n++){let s=e[n];r[s]=t[n]}}function Ws(e,t,r,i,n){let s=wn(e,t);if(s==null||typeof s=="string")return{keys:null,values:null,target:s,flat:!0};let l=Object.keys(s),f=l.length,o=t.length,c=n?[...t]:void 0,a=new Array(f);for(var h=0;h<f;h++){let y=l[h];a[h]=s[y],n?(c[o]=y,s[y]=r(s[y],c)):i?s[y]=r(s[y]):s[y]=r}return{keys:l,values:a,target:s,flat:!0}}function Ks(e){for(let t=0;t<e.length;t++){let{target:r,path:i,value:n}=e[t],s=r;for(let l=i.length-1;l>0;l--)s=s[i[l]];s[i[0]]=n}}function Us(e,t,r,i,n,s,l){let f=wn(t,r);if(f==null)return;let o=Object.keys(f),c=o.length;for(var a=0;a<c;a++){let h=o[a];Vs(e,f,h,r,i,n,s,l)}return e}function st(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}function Vs(e,t,r,i,n,s,l,f){let o=n.length,c=o-1,a=r;var h=-1,y,d,u,g=null,S=null,w,v,b=!1,x=0,O=0,T=Hs();if(u=y=t[r],typeof y=="object"){for(;y!=null&&++h<o&&(O+=1,r=n[h],g=u,!(r!=="*"&&!S&&!(typeof y=="object"&&r in y)));)if(!(r==="*"&&(S==="*"&&(b=!0),S=r,h!==c))){if(S){let A=Object.keys(y);for(var k=0;k<A.length;k++){let _=A[k];if(v=y[_],w=r==="*",b)T=ee(T,_,O),x=h,u=Sn(v,x-1,r,i,n,s,l,f,a,y,d,u,w,_,h,c,T,e,t[a],O+1);else if(w||typeof v=="object"&&v!==null&&r in v){if(w?u=v:u=v[r],d=h!==c?u:l?f?s(u,[...i,a,...n]):s(u):s,w){let R=pe(ee(T,_,O),u,t[a]);e.push(R),y[_]=d}else if(v[r]!==d)if(d===void 0&&s!==void 0||st(v,r)&&d===u)T=ee(T,_,O);else{T=ee(T,_,O);let R=pe(ee(T,r,O+1),u,t[a]);e.push(R),v[r]=d}}}S=null}else{if(u=y[r],T=ee(T,r,O),d=h!==c?u:l?f?s(u,[...i,a,...n]):s(u):s,!(st(y,r)&&d===u||d===void 0&&s!==void 0)){let A=pe(T,u,t[a]);e.push(A),y[r]=d}y=y[r]}if(typeof y!="object")break}}}function wn(e,t){for(var r=-1,i=t.length,n=e;n!=null&&++r<i;)n=n[t[r]];return n}function Sn(e,t,r,i,n,s,l,f,o,c,a,h,y,d,u,g,S,w,v,b){if(t===0&&(y||typeof e=="object"&&e!==null&&r in e)){if(y?h=e:h=e[r],a=u!==g?h:l?f?s(h,[...i,o,...n]):s(h):s,y){let x=pe(S,h,v);w.push(x),c[d]=a}else if(e[r]!==a){if(!(a===void 0&&s!==void 0||st(e,r)&&a===h)){let x=pe(ee(S,r,b+1),h,v);w.push(x),e[r]=a}}}for(let x in e)typeof e[x]=="object"&&(S=ee(S,x,b),Sn(e[x],t-1,r,i,n,s,l,f,o,c,a,h,y,d,u,g,S,w,v,b+1))}function Hs(){return{parent:null,key:null,children:[],depth:0}}function ee(e,t,r){if(e.depth===r)return ee(e.parent,t,r);var i={parent:e,key:t,depth:r,children:[]};return e.children.push(i),i}function pe(e,t,r){let i=e,n=[];do n.push(i.key),i=i.parent;while(i.parent!=null);return{path:n,value:t,target:r}}});var En=E((xu,On)=>{"use strict";var{groupRestore:Js,nestedRestore:Gs}=ot();On.exports=Xs;function Xs(){return function(){if(this.restore){this.restore.state.secret=this.secret;return}let{secret:t,wcLen:r}=this,i=Object.keys(t),n=Ys(t,i),s=r>0,l=s?{secret:t,groupRestore:Js,nestedRestore:Gs}:{secret:t};this.restore=Function("o",Qs(n,i,s)).bind(l),this.restore.state=l}}function Ys(e,t){return t.map(r=>{let{circle:i,escPath:n,leadingBracket:s}=e[r],f=i?`o.${i} = secret[${n}].val`:`o${s?"":"."}${r} = secret[${n}].val`,o=`secret[${n}].val = undefined`;return`
59
59
  if (secret[${n}].val !== undefined) {
60
60
  try { ${f} } catch (e) {}
61
61
  ${o}
62
62
  }
63
- `}).join("")}function to(e,t,r){return`
63
+ `}).join("")}function Qs(e,t,r){return`
64
64
  const secret = this.secret
65
65
  ${r===!0?`
66
66
  const keys = Object.keys(secret)
@@ -77,28 +77,28 @@ var us=Object.create;var Ne=Object.defineProperty,fs=Object.defineProperties,hs=
77
77
  `:""}
78
78
  ${e}
79
79
  return o
80
- `}});var kn=O((ju,_n)=>{"use strict";_n.exports=ro;function ro(e){let{secret:t,censor:r,compileRestore:i,serialize:n,groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}=e,c=[{secret:t,censor:r,compileRestore:i}];return n!==!1&&c.push({serialize:n}),o>0&&c.push({groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}),Object.assign(...c)}});var jn=O((Ru,An)=>{"use strict";var Tn=pn(),no=mn(),io=wn(),so=xn(),{groupRedact:oo,nestedRedact:lo}=ot(),ao=kn(),co=Ae(),uo=Tn(),lt=e=>e;lt.restore=lt;var fo="[REDACTED]";at.rx=co;at.validator=Tn;An.exports=at;function at(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,i=e.remove;if(i===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let n=i===!0?void 0:"censor"in e?e.censor:fo,s=typeof n=="function",l=s&&n.length>1;if(t.length===0)return r||lt;uo({paths:t,serialize:r,censor:n});let{wildcards:f,wcLen:o,secret:c}=no({paths:t,censor:n}),a=so(),h="strict"in e?e.strict:!0;return io({secret:c,wcLen:o,serialize:r,strict:h,isCensorFct:s,censorFctTakesPath:l},ao({secret:c,censor:n,compileRestore:a,serialize:r,groupRedact:oo,nestedRedact:lo,wildcards:f,wcLen:o}))}});var ue=O((Lu,Rn)=>{"use strict";var ho=Symbol("pino.setLevel"),po=Symbol("pino.getLevel"),yo=Symbol("pino.levelVal"),go=Symbol("pino.useLevelLabels"),mo=Symbol("pino.useOnlyCustomLevels"),bo=Symbol("pino.mixin"),wo=Symbol("pino.lsCache"),So=Symbol("pino.chindings"),vo=Symbol("pino.parsedChindings"),Eo=Symbol("pino.asJson"),Oo=Symbol("pino.write"),xo=Symbol("pino.redactFmt"),_o=Symbol("pino.time"),ko=Symbol("pino.timeSliceIndex"),To=Symbol("pino.stream"),Ao=Symbol("pino.stringify"),jo=Symbol("pino.stringifySafe"),Ro=Symbol("pino.stringifiers"),Lo=Symbol("pino.end"),qo=Symbol("pino.formatOpts"),Bo=Symbol("pino.messageKey"),$o=Symbol("pino.nestedKey"),Co=Symbol("pino.nestedKeyStr"),Io=Symbol("pino.mixinMergeStrategy"),Mo=Symbol("pino.wildcardFirst"),Po=Symbol.for("pino.serializers"),Do=Symbol.for("pino.formatters"),No=Symbol.for("pino.hooks"),zo=Symbol.for("pino.metadata");Rn.exports={setLevelSym:ho,getLevelSym:po,levelValSym:yo,useLevelLabelsSym:go,mixinSym:bo,lsCacheSym:wo,chindingsSym:So,parsedChindingsSym:vo,asJsonSym:Eo,writeSym:Oo,serializersSym:Po,redactFmtSym:xo,timeSym:_o,timeSliceIndexSym:ko,streamSym:To,stringifySym:Ao,stringifySafeSym:jo,stringifiersSym:Ro,endSym:Lo,formatOptsSym:qo,messageKeySym:Bo,nestedKeySym:$o,wildcardFirstSym:Mo,needsMetadataGsym:zo,useOnlyCustomLevelsSym:mo,formattersSym:Do,hooksSym:No,nestedKeyStrSym:Co,mixinMergeStrategySym:Io}});var ft=O((qu,$n)=>{"use strict";var ut=jn(),{redactFmtSym:Fo,wildcardFirstSym:je}=ue(),{rx:ct,validator:Wo}=ut,Ln=Wo({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),qn="[Redacted]",Bn=!1;function Ko(e,t){let{paths:r,censor:i}=Uo(e),n=r.reduce((f,o)=>{ct.lastIndex=0;let c=ct.exec(o),a=ct.exec(o),h=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(h==="*"&&(h=je),a===null)return f[h]=null,f;if(f[h]===null)return f;let{index:p}=a,d=`${o.substr(p,o.length-1)}`;return f[h]=f[h]||[],h!==je&&f[h].length===0&&f[h].push(...f[je]||[]),h===je&&Object.keys(f).forEach(function(u){f[u]&&f[u].push(d)}),f[h].push(d),f},{}),s={[Fo]:ut({paths:r,censor:i,serialize:t,strict:Bn})},l=(...f)=>t(typeof i=="function"?i(...f):i);return[...Object.keys(n),...Object.getOwnPropertySymbols(n)].reduce((f,o)=>{if(n[o]===null)f[o]=c=>l(c,[o]);else{let c=typeof i=="function"?(a,h)=>i(a,[o,...h]):i;f[o]=ut({paths:n[o],censor:c,serialize:t,strict:Bn})}return f},s)}function Uo(e){if(Array.isArray(e))return e={paths:e,censor:qn},Ln(e),e;let{paths:t,censor:r=qn,remove:i}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),Ln({paths:t,censor:r}),{paths:t,censor:r}}$n.exports=Ko});var In=O((Bu,Cn)=>{"use strict";var Vo=()=>"",Ho=()=>`,"time":${Date.now()}`,Jo=()=>`,"time":${Math.round(Date.now()/1e3)}`,Go=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Cn.exports={nullTime:Vo,epochTime:Ho,unixTime:Jo,isoTime:Go}});var Pn=O(($u,Mn)=>{"use strict";function Xo(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}Mn.exports=Yo;function Yo(e,t,r){var i=r&&r.stringify||Xo,n=1;if(typeof e=="object"&&e!==null){var s=t.length+n;if(s===1)return e;var l=new Array(s);l[0]=i(e);for(var f=1;f<s;f++)l[f]=i(t[f]);return l.join(" ")}if(typeof e!="string")return e;var o=t.length;if(o===0)return e;for(var c="",a=1-n,h=-1,p=e&&e.length||0,d=0;d<p;){if(e.charCodeAt(d)===37&&d+1<p){switch(h=h>-1?h:0,e.charCodeAt(d+1)){case 100:case 102:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Number(t[a]),h=d+2,d++;break;case 105:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Math.floor(Number(t[a])),h=d+2,d++;break;case 79:case 111:case 106:if(a>=o||t[a]===void 0)break;h<d&&(c+=e.slice(h,d));var u=typeof t[a];if(u==="string"){c+="'"+t[a]+"'",h=d+2,d++;break}if(u==="function"){c+=t[a].name||"<anonymous>",h=d+2,d++;break}c+=i(t[a]),h=d+2,d++;break;case 115:if(a>=o)break;h<d&&(c+=e.slice(h,d)),c+=String(t[a]),h=d+2,d++;break;case 37:h<d&&(c+=e.slice(h,d)),c+="%",h=d+2,d++,a--;break}++a}++d}return h===-1?e:(h<p&&(c+=e.slice(h)),c)}});var dt=O((Cu,ht)=>{"use strict";if(typeof SharedArrayBuffer!="undefined"&&typeof Atomics!="undefined"){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));ht.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 i=Date.now()+Number(t);for(;i>Date.now(););};ht.exports=e}});var Wn=O((Iu,Fn)=>{"use strict";var V=C("fs"),Qo=C("events"),Zo=C("util").inherits,Dn=C("path"),Nn=dt(),pt=100,el=16*1024;function zn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,l){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}t.fd=l,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&!t._writing&&t._len>t.minLength&&!t.destroyed&&fe(t)}let i=t.append?"a":"w",n=t.mode;if(t.sync)try{t.mkdir&&V.mkdirSync(Dn.dirname(e),{recursive:!0});let s=V.openSync(e,i,n);r(null,s)}catch(s){throw r(s),s}else t.mkdir?V.mkdir(Dn.dirname(e),{recursive:!0},s=>{if(s)return r(s);V.open(e,i,n,r)}):V.open(e,i,n,r)}function W(e){if(!(this instanceof W))return new W(e);let{fd:t,dest:r,minLength:i,maxLength:n,maxWrite:s,sync:l,append:f=!0,mode:o,mkdir:c,retryEAGAIN:a}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=n||0,this.maxWrite=s||el,this.sync=l||!1,this.append=f||!1,this.mode=o,this.retryEAGAIN=a||(()=>!0),this.mkdir=c||!1,typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")zn(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=(h,p)=>{if(h){if(h.code==="EAGAIN"&&this.retryEAGAIN(h,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Nn(pt),this.release(void 0,0)}catch(u){this.release(u)}else setTimeout(()=>{V.write(this.fd,this._writingBuf,"utf8",this.release)},pt);else this._writing=!1,this.emit("error",h);return}if(this.emit("write",p),this._len-=p,this._writingBuf=this._writingBuf.slice(p),this._writingBuf.length){if(!this.sync){V.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let u=V.writeSync(this.fd,this._writingBuf,"utf8");this._len-=u,this._writingBuf=this._writingBuf.slice(u)}while(this._writingBuf)}catch(u){this.release(u);return}}let d=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):d>this.minLength?fe(this):this._ending?d>0?fe(this):(this._writing=!1,Re(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(tl,this)):this.emit("drain"))},this.on("newListener",function(h){h==="drain"&&(this._asyncDrainScheduled=!1)})}function tl(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}Zo(W,Qo);W.prototype.write=function(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&&fe(this),this._len<this._hwm)};W.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),fe(this))};W.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(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&V.close(t,r=>{if(r)return this.emit("error",r)})}),zn(e||this.file,this)};W.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?fe(this):Re(this)))};W.prototype.flushSync=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=V.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if(t.code!=="EAGAIN"||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Nn(pt)}}};W.prototype.destroy=function(){this.destroyed||Re(this)};function fe(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift()||"",e.sync)try{let r=V.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(r){t(r)}else V.write(e.fd,e._writingBuf,"utf8",t)}function Re(e){if(e.fd===-1){e.once("ready",Re.bind(null,e));return}e.destroyed=!0,e._bufs=[],e.fd!==1&&e.fd!==2?V.close(e.fd,t):setImmediate(t);function t(r){if(r){e.emit("error",r);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}W.SonicBoom=W;W.default=W;Fn.exports=W});var Un=O((Mu,Kn)=>{"use strict";var{format:yt}=C("util");function rl(){let e={},t=new Map;function r(n,s,l){if(!n)throw new Error("Warning name must not be empty");if(!s)throw new Error("Warning code must not be empty");if(!l)throw new Error("Warning message must not be empty");if(s=s.toUpperCase(),e[s]!==void 0)throw new Error(`The code '${s}' already exist`);function f(o,c,a){let h;return o&&c&&a?h=yt(l,o,c,a):o&&c?h=yt(l,o,c):o?h=yt(l,o):h=l,{code:s,name:n,message:h}}return t.set(s,!1),e[s]=f,e[s]}function i(n,s,l,f){if(e[n]===void 0)throw new Error(`The code '${n}' does not exist`);if(t.get(n)===!0)return;t.set(n,!0);let o=e[n](s,l,f);process.emitWarning(o.message,o.name,o.code)}return{create:r,emit:i,emitted:t}}Kn.exports=rl});var Jn=O((Pu,Hn)=>{"use strict";var gt=Un()();Hn.exports=gt;var Vn="PinoWarning";gt.create(Vn,"PINODEP008","prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.");gt.create(Vn,"PINODEP009","The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version")});var bt=O((Du,Qn)=>{"use strict";function Gn(e,t,r,i){function n(){let s=t.deref();s!==void 0&&r(s,i)}e[i]=n,process.once(i,n)}var Xn=new FinalizationRegistry(Yn),mt=new WeakMap;function Yn(e){process.removeListener("exit",e.exit),process.removeListener("beforeExit",e.beforeExit)}function nl(e,t){if(e===void 0)throw new Error("the object can't be undefined");let r=new WeakRef(e),i={};mt.set(e,i),Xn.register(e,i),Gn(i,r,t,"exit"),Gn(i,r,t,"beforeExit")}function il(e){let t=mt.get(e);mt.delete(e),t&&Yn(t),Xn.unregister(e)}Qn.exports={register:nl,unregister:il}});var ei=O((Nu,Zn)=>{"use strict";function sl(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l===r){n(null,"ok");return}let f=l,o=c=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{f=l,l=Atomics.load(e,t),l===f?o(c>=1e3?1e3:c*2):l===r?n(null,"ok"):n(null,"not-equal")},c)};o(1)}function ol(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l!==r){n(null,"ok");return}let f=o=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{l=Atomics.load(e,t),l!==r?n(null,"ok"):f(o>=1e3?1e3:o*2)},o)};f(1)}Zn.exports={wait:sl,waitDiff:ol}});var ri=O((zu,ti)=>{"use strict";ti.exports={WRITE_INDEX:4,READ_INDEX:8}});var li=O((Wu,oi)=>{"use strict";var{EventEmitter:ll}=C("events"),{Worker:al}=C("worker_threads"),{join:cl}=C("path"),{pathToFileURL:ul}=C("url"),{wait:fl}=ei(),{WRITE_INDEX:K,READ_INDEX:Y}=ri(),hl=C("buffer"),dl=C("assert"),y=Symbol("kImpl"),pl=hl.constants.MAX_STRING_LENGTH,qe=class{constructor(t){this._value=t}deref(){return this._value}},yl=global.FinalizationRegistry||class{register(){}unregister(){}},gl=global.WeakRef||qe,ni=new yl(e=>{e.exited||e.terminate()});function ml(e,t){let{filename:r,workerData:i}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||cl(__dirname,"lib","worker.js"),l=new al(s,Q(N({},t.workerOpts),{workerData:{filename:r.indexOf("file://")===0?r:ul(r).href,dataBuf:e[y].dataBuf,stateBuf:e[y].stateBuf,workerData:i}}));return l.stream=new qe(e),l.on("message",bl),l.on("exit",si),ni.register(e,l),l}function ii(e){dl(!e[y].sync),e[y].needDrain&&(e[y].needDrain=!1,e.emit("drain"))}function Le(e){let t=Atomics.load(e[y].state,K),r=e[y].data.length-t;if(r>0){if(e[y].buf.length===0){e[y].flushing=!1,e[y].ending?Et(e):e[y].needDrain&&process.nextTick(ii,e);return}let i=e[y].buf.slice(0,r),n=Buffer.byteLength(i);n<=r?(e[y].buf=e[y].buf.slice(r),Be(e,i,Le.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[y].state,Y,0),Atomics.store(e[y].state,K,0);n>e[y].data.length;)r=r/2,i=e[y].buf.slice(0,r),n=Buffer.byteLength(i);e[y].buf=e[y].buf.slice(r),Be(e,i,Le.bind(null,e))}})}else if(r===0){if(t===0&&e[y].buf.length===0)return;e.flush(()=>{Atomics.store(e[y].state,Y,0),Atomics.store(e[y].state,K,0),Le(e)})}else throw new Error("overwritten")}function bl(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new gl(t),t.flush(()=>{t[y].ready=!0,t.emit("ready")});break;case"ERROR":he(t,e.err);break;default:throw new Error("this should not happen: "+e.code)}}function si(e){let t=this.stream.deref();t!==void 0&&(ni.unregister(t),t.worker.exited=!0,t.worker.off("exit",si),he(t,e!==0?new Error("The worker thread exited"):null))}var St=class extends ll{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[y]={},this[y].stateBuf=new SharedArrayBuffer(128),this[y].state=new Int32Array(this[y].stateBuf),this[y].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[y].data=Buffer.from(this[y].dataBuf),this[y].sync=t.sync||!1,this[y].ending=!1,this[y].ended=!1,this[y].needDrain=!1,this[y].destroyed=!1,this[y].flushing=!1,this[y].ready=!1,this[y].finished=!1,this[y].errored=null,this[y].closed=!1,this[y].buf="",this.worker=ml(this,t)}write(t){if(this[y].destroyed)throw new Error("the worker has exited");if(this[y].ending)throw new Error("the worker is ending");if(this[y].flushing&&this[y].buf.length+t.length>=pl)try{wt(this),this[y].flushing=!0}catch(r){return he(this,r),!1}if(this[y].buf+=t,this[y].sync)try{return wt(this),!0}catch(r){return he(this,r),!1}return this[y].flushing||(this[y].flushing=!0,setImmediate(Le,this)),this[y].needDrain=this[y].data.length-this[y].buf.length-Atomics.load(this[y].state,K)<=0,!this[y].needDrain}end(){this[y].destroyed||(this[y].ending=!0,Et(this))}flush(t){if(this[y].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[y].state,K);fl(this[y].state,Y,r,1/0,(i,n)=>{if(i){he(this,i),process.nextTick(t,i);return}if(n==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[y].destroyed||(wt(this),vt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[y].ready}get destroyed(){return this[y].destroyed}get closed(){return this[y].closed}get writable(){return!this[y].destroyed&&!this[y].ending}get writableEnded(){return this[y].ending}get writableFinished(){return this[y].finished}get writableNeedDrain(){return this[y].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[y].errored}};function he(e,t){e[y].destroyed||(e[y].destroyed=!0,t&&(e[y].errored=t,e.emit("error",t)),e.worker.exited?setImmediate(()=>{e[y].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[y].closed=!0,e.emit("close")}))}function Be(e,t,r){let i=Atomics.load(e[y].state,K),n=Buffer.byteLength(t);return e[y].data.write(t,i),Atomics.store(e[y].state,K,i+n),Atomics.notify(e[y].state,K),r(),!0}function Et(e){if(!(e[y].ended||!e[y].ending||e[y].flushing)){e[y].ended=!0;try{e.flushSync();let t=Atomics.load(e[y].state,Y);Atomics.store(e[y].state,K,-1),Atomics.notify(e[y].state,K);let r=0;for(;t!==-1;){if(Atomics.wait(e[y].state,Y,t,1e3),t=Atomics.load(e[y].state,Y),t===-2)throw new Error("end() failed");if(++r===10)throw new Error("end() took too long (10s)")}process.nextTick(()=>{e[y].finished=!0,e.emit("finish")})}catch(t){he(e,t)}}}function wt(e){let t=()=>{e[y].ending?Et(e):e[y].needDrain&&process.nextTick(ii,e)};for(e[y].flushing=!1;e[y].buf.length!==0;){let r=Atomics.load(e[y].state,K),i=e[y].data.length-r;if(i===0){vt(e),Atomics.store(e[y].state,Y,0),Atomics.store(e[y].state,K,0);continue}else if(i<0)throw new Error("overwritten");let n=e[y].buf.slice(0,i),s=Buffer.byteLength(n);if(s<=i)e[y].buf=e[y].buf.slice(i),Be(e,n,t);else{for(vt(e),Atomics.store(e[y].state,Y,0),Atomics.store(e[y].state,K,0);s>e[y].buf.length;)i=i/2,n=e[y].buf.slice(0,i),s=Buffer.byteLength(n);e[y].buf=e[y].buf.slice(i),Be(e,n,t)}}}function vt(e){if(e[y].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[y].state,K),r=0;for(;;){let i=Atomics.load(e[y].state,Y);if(i===-2)throw new Error("_flushSync failed");if(i!==t)Atomics.wait(e[y].state,Y,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}oi.exports=St});var xt=O((Uu,ci)=>{"use strict";var{createRequire:wl}=C("module"),Sl=it(),{join:Ot,isAbsolute:vl}=C("path"),El=dt(),$e;global.WeakRef&&global.WeakMap&&global.FinalizationRegistry&&($e=bt());var Ol=li();function xl(e){if($e)$e.register(e,ai),e.on("close",function(){$e.unregister(e)});else{let t=ai.bind(null,e);process.once("beforeExit",t),process.once("exit",t),e.on("close",function(){process.removeListener("beforeExit",t),process.removeListener("exit",t)})}}function _l(e,t,r){let i=new Ol({filename:e,workerData:t,workerOpts:r});i.on("ready",n),i.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function n(){process.removeListener("exit",s),i.unref(),r.autoEnd!==!1&&xl(i)}function s(){i.closed||(i.flushSync(),El(100),i.end())}return i}function ai(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function kl(e){let{pipeline:t,targets:r,levels:i,options:n={},worker:s={},caller:l=Sl()}=e,f=typeof l=="string"?[l]:l,o="__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=o["pino-worker"]||Ot(__dirname,"worker.js"),n.targets=r.map(h=>Q(N({},h),{target:a(h.target)}))):t&&(c=o["pino-pipeline-worker"]||Ot(__dirname,"worker-pipeline.js"),n.targets=t.map(h=>Q(N({},h),{target:a(h.target)}))),i&&(n.levels=i),_l(a(c),n,s);function a(h){if(h=o[h]||h,vl(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return Ot(__dirname,"..","file.js");let p;for(let d of f)try{p=wl(d).resolve(h);break}catch(u){continue}if(!p)throw new Error(`unable to determine transport target for "${h}"`);return p}}ci.exports=kl});var Ie=O((Hu,vi)=>{"use strict";var ui=Pn(),{mapHttpRequest:Tl,mapHttpResponse:Al}=nt(),Tt=Wn(),yi=Jn(),{lsCacheSym:jl,chindingsSym:At,parsedChindingsSym:_t,writeSym:fi,serializersSym:jt,formatOptsSym:hi,endSym:Rl,stringifiersSym:Rt,stringifySym:gi,stringifySafeSym:Lt,wildcardFirstSym:mi,needsMetadataGsym:bi,redactFmtSym:Ll,streamSym:ql,nestedKeySym:Bl,formattersSym:qt,messageKeySym:wi,nestedKeyStrSym:$l}=ue(),{isMainThread:Cl}=C("worker_threads"),Il=xt();function me(){}function Ml(e,t){if(!t)return r;return function(...n){t.call(this,n,r,e)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=Tl(i):typeof i.setHeader=="function"&&(i=Al(i)));let l;s===null&&n.length===0?l=[null]:(s=n.shift(),l=n),this[fi](i,ui(s,l,this[hi]),e)}else this[fi](null,ui(i,n,this[hi]),e)}}function di(e){let t="",r=0,i=!1,n=255,s=e.length;if(s>100)return JSON.stringify(e);for(var l=0;l<s&&n>=32;l++)n=e.charCodeAt(l),(n===34||n===92)&&(t+=e.slice(r,l)+"\\",r=l,i=!0);return i?t+=e.slice(r):t=e,n<32?JSON.stringify(e):'"'+t+'"'}function Pl(e,t,r,i){let n=this[gi],s=this[Lt],l=this[Rt],f=this[Rl],o=this[At],c=this[jt],a=this[qt],h=this[wi],p=this[jl][r]+i;p=p+o;let d;a.log&&(e=a.log(e));let u=l[mi],g="";for(let w in e)if(d=e[w],Object.prototype.hasOwnProperty.call(e,w)&&d!==void 0){d=c[w]?c[w](d):d;let v=l[w]||u;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":v&&(d=v(d));break;case"string":d=(v||di)(d);break;default:d=(v||n)(d,s)}if(d===void 0)continue;g+=',"'+w+'":'+d}let S="";if(t!==void 0){d=c[h]?c[h](t):t;let w=l[h]||u;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":w&&(d=w(d)),S=',"'+h+'":'+d;break;case"string":d=(w||di)(d),S=',"'+h+'":'+d;break;default:d=(w||n)(d,s),S=',"'+h+'":'+d}}return this[Bl]&&g?p+this[$l]+g.slice(1)+"}"+S+f:p+g+S+f}function Dl(e,t){let r,i=e[At],n=e[gi],s=e[Lt],l=e[Rt],f=l[mi],o=e[jt],c=e[qt].bindings;t=c(t);for(let a in t)if(r=t[a],(a!=="level"&&a!=="serializers"&&a!=="formatters"&&a!=="customLevels"&&t.hasOwnProperty(a)&&r!==void 0)===!0){if(r=o[a]?o[a](r):r,r=(l[a]||f||n)(r,s),r===void 0)continue;i+=',"'+a+'":'+r}return i}function Si(e,t,r,i){if(t&&typeof t=="function")return t=t.bind(i),kt(t(e),r,e);try{let n=C("pino-pretty").prettyFactory;return n.asMetaWrapper=kt,kt(n(e),r,e)}catch(n){throw n.message.startsWith("Cannot find module 'pino-pretty'")?Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately"):n}}function kt(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let i=!1;return{[bi]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||i||(i=!0,pi(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let n=this.lastLogger,s=null;return n?(n.hasOwnProperty(_t)?s=n[_t]:(s=JSON.parse("{"+n[At].substr(1)+"}"),n[_t]=s),s):null},write(n){let s=this.lastLogger,l=this.chindings(),f=this.lastTime;typeof f=="number"||(f.match(/^\d+/)?f=parseInt(f):f=f.slice(1,-1));let o=this.lastObj,c=this.lastMsg,a=null,h=s[qt],p=h.log?h.log(o):o,d=s[wi];c&&p&&!Object.prototype.hasOwnProperty.call(p,d)&&(p[d]=c);let u=Object.assign({level:this.lastLevel,time:f},p,a),g=s[jt],S=Object.keys(g);for(var w=0;w<S.length;w++){let E=S[w];u[E]!==void 0&&(u[E]=g[E](u[E]))}for(let E in l)u.hasOwnProperty(E)||(u[E]=l[E]);let b=s[Rt][Ll],x=e(typeof b=="function"?b(u):u);x!==void 0&&(pi(t,this),t.write(x))}}}function Nl(e){return e.write!==e.constructor.prototype.write}function Ce(e){let t=new Tt(e);return t.on("error",r),!e.sync&&Cl&&zl(t),t;function r(i){if(i.code==="EPIPE"){t.write=me,t.end=me,t.flushSync=me,t.destroy=me;return}t.removeListener("error",r),t.emit("error",i)}}function zl(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=bt();t.register(e,Fl),e.on("close",function(){t.unregister(e)})}}function Fl(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function Wl(e){return function(r,i,n={},s){if(typeof n=="string")s=Ce({dest:n,sync:!0}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=Ce({dest:s,sync:!0})}else if(n instanceof Tt||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof Tt||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let a;n.customLevels&&(a=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=Il(Q(N({caller:i},n.transport),{levels:a}))}if(n=Object.assign({},e,n),n.serializers=Object.assign({},e.serializers,n.serializers),n.formatters=Object.assign({},e.formatters,n.formatters),"onTerminated"in n)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in n&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),n.levelKey=n.changeLevelName,delete n.changeLevelName);let{enabled:l,prettyPrint:f,prettifier:o,messageKey:c}=n;if(l===!1&&(n.level="silent"),s=s||process.stdout,s===process.stdout&&s.fd>=0&&!Nl(s)&&(s=Ce({fd:s.fd,sync:!0})),f){yi.emit("PINODEP008");let a=Object.assign({messageKey:c},f);s=Si(a,o,s,r)}return{opts:n,stream:s}}}function Kl(e,t){if(Number(process.versions.node.split(".")[0])>=14&&yi.emit("PINODEP009"),typeof e=="undefined"||typeof e.child!="function")throw Error("expected a pino logger instance");let i=typeof t!="undefined";if(i&&typeof t!="function")throw Error("if supplied, the handler parameter should be a function");let n=e[ql];if(typeof n.flushSync!="function")throw Error("final requires a stream that has a flushSync method, such as pino.destination");let s=new Proxy(e,{get:(l,f)=>f in l.levels.values?(...o)=>{l[f](...o),n.flushSync()}:l[f]});if(!i){try{n.flushSync()}catch(l){}return s}return(l=null,...f)=>{try{n.flushSync()}catch(o){}return t(l,s,...f)}}function Ul(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[Lt])(e)}catch(i){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Vl(e,t,r){return{level:e,bindings:t,log:r}}function pi(e,t){e[bi]===!0&&(e.lastLevel=t.lastLevel,e.lastMsg=t.lastMsg,e.lastObj=t.lastObj,e.lastTime=t.lastTime,e.lastLogger=t.lastLogger)}function Hl(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e}vi.exports={noop:me,buildSafeSonicBoom:Ce,getPrettyStream:Si,asChindings:Dl,asJson:Pl,genLog:Ml,createArgsNormalizer:Wl,final:Kl,stringify:Ul,buildFormatters:Vl,normalizeDestFileDescriptor:Hl}});var Me=O((Gu,Oi)=>{"use strict";var{lsCacheSym:Jl,levelValSym:Bt,useOnlyCustomLevelsSym:Gl,streamSym:Xl,formattersSym:Yl,hooksSym:Ql}=ue(),{noop:Zl,genLog:oe}=Ie(),X={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Ei={fatal:e=>{let t=oe(X.fatal,e);return function(...r){let i=this[Xl];if(t.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch(n){}}},error:e=>oe(X.error,e),warn:e=>oe(X.warn,e),info:e=>oe(X.info,e),debug:e=>oe(X.debug,e),trace:e=>oe(X.trace,e)},$t=Object.keys(X).reduce((e,t)=>(e[X[t]]=t,e),{}),ea=Object.keys($t).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function ta(e){let t=e[Yl].level,{labels:r}=e.levels,i={};for(let n in r){let s=t(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return e[Jl]=i,e}function ra(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 na(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 i=this[Bt],n=this[Bt]=r[e],s=this[Gl],l=this[Ql].logMethod;for(let f in r){if(n>r[f]){this[f]=Zl;continue}this[f]=ra(f,s)?Ei[f](l):oe(r[f],l)}this.emit("level-change",e,n,t[i],i)}function ia(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function sa(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&r>=this[Bt]}function oa(e=null,t=!1){let r=e?Object.keys(e).reduce((s,l)=>(s[e[l]]=l,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:$t,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:X,e);return{labels:i,values:n}}function la(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 i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:X,t);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function aa(e,t){let{labels:r,values:i}=e;for(let n in t){if(n in i)throw Error("levels cannot be overridden");if(t[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}Oi.exports={initialLsCache:ea,genLsCache:ta,levelMethods:Ei,getLevel:ia,setLevel:na,isLevelEnabled:sa,mappings:oa,levels:X,assertNoLevelCollisions:aa,assertDefaultLevelFound:la}});var xi=O((Xu,ca)=>{ca.exports={name:"pino",version:"7.11.0",description:"super fast, all natural json logger",main:"pino.js",type:"commonjs",types:"pino.d.ts",browser:"./browser.js",files:["pino.js","file.js","pino.d.ts","bin.js","browser.js","pretty.js","usage.txt","test","docs","example.js","lib"],scripts:{docs:"docsify serve","browser-test":"airtap --local 8080 test/browser*test.js",lint:"eslint .",test:"npm run lint && npm run transpile && tap --ts && jest test/jest && npm run test-types","test-ci":"npm run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly && npm run test-types","test-ci-pnpm":"pnpm run lint && npm run transpile && tap --ts --no-coverage --no-check-coverage && pnpm run test-types","test-ci-yarn-pnp":"yarn run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly","test-types":"tsc && tsd && ts-node test/types/pino.ts",transpile:"node ./test/fixtures/ts/transpile.cjs","cov-ui":"tap --ts --coverage-report=html",bench:"node benchmarks/utils/runbench all","bench-basic":"node benchmarks/utils/runbench basic","bench-object":"node benchmarks/utils/runbench object","bench-deep-object":"node benchmarks/utils/runbench deep-object","bench-multi-arg":"node benchmarks/utils/runbench multi-arg","bench-longs-tring":"node benchmarks/utils/runbench long-string","bench-child":"node benchmarks/utils/runbench child","bench-child-child":"node benchmarks/utils/runbench child-child","bench-child-creation":"node benchmarks/utils/runbench child-creation","bench-formatters":"node benchmarks/utils/runbench formatters","update-bench-doc":"node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md"},bin:{pino:"./bin.js"},precommit:"test",repository:{type:"git",url:"git+https://github.com/pinojs/pino.git"},keywords:["fast","logger","stream","json"],author:"Matteo Collina <hello@matteocollina.com>",contributors:["David Mark Clements <huperekchuno@googlemail.com>","James Sumners <james.sumners@gmail.com>","Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)"],license:"MIT",bugs:{url:"https://github.com/pinojs/pino/issues"},homepage:"http://getpino.io",devDependencies:{"@types/flush-write-stream":"^1.0.0","@types/node":"^17.0.0","@types/tap":"^15.0.6",airtap:"4.0.4",benchmark:"^2.1.4",bole:"^4.0.0",bunyan:"^1.8.14","docsify-cli":"^4.4.1",eslint:"^7.17.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0",execa:"^5.0.0",fastbench:"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1",jest:"^27.3.1",log:"^6.0.0",loglevel:"^1.6.7","pino-pretty":"^v7.6.0","pre-commit":"^1.2.2",proxyquire:"^2.1.3",pump:"^3.0.0",rimraf:"^3.0.2",semver:"^7.0.0",split2:"^4.0.0",steed:"^1.1.3","strip-ansi":"^6.0.0",tap:"^16.0.0",tape:"^5.0.0",through2:"^4.0.0","ts-node":"^10.7.0",tsd:"^0.20.0",typescript:"^4.4.4",winston:"^3.3.3"},dependencies:{"atomic-sleep":"^1.0.0","fast-redact":"^3.0.0","on-exit-leak-free":"^0.2.0","pino-abstract-transport":"v0.5.0","pino-std-serializers":"^4.0.0","process-warning":"^1.0.0","quick-format-unescaped":"^4.0.3","real-require":"^0.1.0","safe-stable-stringify":"^2.1.0","sonic-boom":"^2.2.1","thread-stream":"^0.15.1"},tsd:{directory:"test/types"}}});var Ct=O((Yu,_i)=>{"use strict";var{version:ua}=xi();_i.exports={version:ua}});var Ci=O((Zu,$i)=>{"use strict";var{EventEmitter:fa}=C("events"),{lsCacheSym:ha,levelValSym:da,setLevelSym:Mt,getLevelSym:ki,chindingsSym:Pt,parsedChindingsSym:pa,mixinSym:ya,asJsonSym:Ri,writeSym:ga,mixinMergeStrategySym:ma,timeSym:ba,timeSliceIndexSym:wa,streamSym:Li,serializersSym:le,formattersSym:It,useOnlyCustomLevelsSym:Sa,needsMetadataGsym:va,redactFmtSym:Ea,stringifySym:Oa,formatOptsSym:xa,stringifiersSym:_a}=ue(),{getLevel:ka,setLevel:Ta,isLevelEnabled:Aa,mappings:ja,initialLsCache:Ra,genLsCache:La,assertNoLevelCollisions:qa}=Me(),{asChindings:qi,asJson:Ba,buildFormatters:Ti,stringify:Ai}=Ie(),{version:$a}=Ct(),Ca=ft(),Ia=class{},Bi={constructor:Ia,child:Ma,bindings:Pa,setBindings:Da,flush:Wa,isLevelEnabled:Aa,version:$a,get level(){return this[ki]()},set level(e){this[Mt](e)},get levelVal(){return this[da]},set levelVal(e){throw Error("levelVal is read-only")},[ha]:Ra,[ga]:za,[Ri]:Ba,[ki]:ka,[Mt]:Ta};Object.setPrototypeOf(Bi,fa.prototype);$i.exports=function(){return Object.create(Bi)};var ji=e=>e;function Ma(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[le],i=this[It],n=Object.create(this);if(t.hasOwnProperty("serializers")===!0){n[le]=Object.create(null);for(let a in r)n[le][a]=r[a];let o=Object.getOwnPropertySymbols(r);for(var s=0;s<o.length;s++){let a=o[s];n[le][a]=r[a]}for(let a in t.serializers)n[le][a]=t.serializers[a];let c=Object.getOwnPropertySymbols(t.serializers);for(var l=0;l<c.length;l++){let a=c[l];n[le][a]=t.serializers[a]}}else n[le]=r;if(t.hasOwnProperty("formatters")){let{level:o,bindings:c,log:a}=t.formatters;n[It]=Ti(o||i.level,c||ji,a||i.log)}else n[It]=Ti(i.level,ji,i.log);if(t.hasOwnProperty("customLevels")===!0&&(qa(this.levels,t.customLevels),n.levels=ja(t.customLevels,n[Sa]),La(n)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){n.redact=t.redact;let o=Ca(n.redact,Ai),c={stringify:o[Ea]};n[Oa]=Ai,n[_a]=o,n[xa]=c}n[Pt]=qi(n,e);let f=t.level||this.level;return n[Mt](f),n}function Pa(){let t=`{${this[Pt].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Da(e){let t=qi(this,e);this[Pt]=t,delete this[pa]}function Na(e,t){return Object.assign(t,e)}function za(e,t,r){let i=this[ba](),n=this[ya],s=this[ma]||Na,l;e==null?l={}:e instanceof Error?(l={err:e},t===void 0&&(t=e.message)):(l=e,t===void 0&&e.err&&(t=e.err.message)),n&&(l=s(l,n(l,r)));let f=this[Ri](l,t,r,i),o=this[Li];o[va]===!0&&(o.lastLevel=r,o.lastObj=l,o.lastMsg=t,o.lastTime=i.slice(this[wa]),o.lastLogger=this),o.write(f)}function Fa(){}function Wa(){let e=this[Li];"flush"in e&&e.flush(Fa)}});var Di=O((Ft,Pi)=>{"use strict";var{hasOwnProperty:be}=Object.prototype,ce=zt();ce.configure=zt;ce.stringify=ce;ce.default=ce;Ft.stringify=ce;Ft.configure=zt;Pi.exports=ce;var Ka=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ne(e){return e.length<5e3&&!Ka.test(e)?`"${e}"`:JSON.stringify(e)}function Dt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],n=r;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var Ua=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Nt(e){return Ua.call(e)!==void 0&&e.length!==0}function Ii(e,t,r){e.length<r&&(r=e.length);let i=t===","?"":" ",n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++)n+=`${t}"${s}":${i}${e[s]}`;return n}function Va(e){if(be.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 Ha(e){let t;if(be.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 Ja(e,t){let r;if(be.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 Mi(e,t){let r;if(be.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 ae(e){return e===1?"1 item":`${e} items`}function Ga(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Xa(e){if(be.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 i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function zt(e){e=N({},e);let t=Xa(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Va(e),i=Ja(e,"bigint"),n=Ha(e),s=typeof n=="function"?n:void 0,l=Mi(e,"maximumDepth"),f=Mi(e,"maximumBreadth");function o(d,u,g,S,w,v){let b=u[d];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(d)),b=S.call(u,d,b),typeof b){case"string":return ne(b);case"object":{if(b===null)return"null";if(g.indexOf(b)!==-1)return r;let x="",E=",",k=v;if(Array.isArray(b)){if(b.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(b),w!==""&&(v+=w,x+=`
81
- ${v}`,E=`,
82
- ${v}`);let j=Math.min(b.length,f),M=0;for(;M<j-1;M++){let J=o(String(M),b,g,S,w,v);x+=J!==void 0?J:"null",x+=E}let I=o(String(M),b,g,S,w,v);if(x+=I!==void 0?I:"null",b.length-1>f){let J=b.length-f-1;x+=`${E}"... ${ae(J)} not stringified"`}return w!==""&&(x+=`
83
- ${k}`),g.pop(),`[${x}]`}let A=Object.keys(b),T=A.length;if(T===0)return"{}";if(l<g.length+1)return'"[Object]"';let _="",L="";w!==""&&(v+=w,E=`,
84
- ${v}`,_=" ");let $=Math.min(T,f);n&&!Nt(b)&&(A=Dt(A,s)),g.push(b);for(let j=0;j<$;j++){let M=A[j],I=o(M,b,g,S,w,v);I!==void 0&&(x+=`${L}${ne(M)}:${_}${I}`,L=E)}if(T>f){let j=T-f;x+=`${L}"...":${_}"${ae(j)} not stringified"`,L=E}return w!==""&&L.length>1&&(x=`
80
+ `}});var _n=E((_u,xn)=>{"use strict";xn.exports=Zs;function Zs(e){let{secret:t,censor:r,compileRestore:i,serialize:n,groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}=e,c=[{secret:t,censor:r,compileRestore:i}];return n!==!1&&c.push({serialize:n}),o>0&&c.push({groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}),Object.assign(...c)}});var kn=E((Tu,An)=>{"use strict";var Tn=dn(),eo=gn(),to=bn(),ro=En(),{groupRedact:no,nestedRedact:io}=ot(),so=_n(),oo=ke(),lo=Tn(),lt=e=>e;lt.restore=lt;var ao="[REDACTED]";at.rx=oo;at.validator=Tn;An.exports=at;function at(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,i=e.remove;if(i===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let n=i===!0?void 0:"censor"in e?e.censor:ao,s=typeof n=="function",l=s&&n.length>1;if(t.length===0)return r||lt;lo({paths:t,serialize:r,censor:n});let{wildcards:f,wcLen:o,secret:c}=eo({paths:t,censor:n}),a=ro(),h="strict"in e?e.strict:!0;return to({secret:c,wcLen:o,serialize:r,strict:h,isCensorFct:s,censorFctTakesPath:l},so({secret:c,censor:n,compileRestore:a,serialize:r,groupRedact:no,nestedRedact:io,wildcards:f,wcLen:o}))}});var ce=E((Au,jn)=>{"use strict";var co=Symbol("pino.setLevel"),uo=Symbol("pino.getLevel"),fo=Symbol("pino.levelVal"),ho=Symbol("pino.useLevelLabels"),yo=Symbol("pino.useOnlyCustomLevels"),po=Symbol("pino.mixin"),go=Symbol("pino.lsCache"),mo=Symbol("pino.chindings"),bo=Symbol("pino.parsedChindings"),wo=Symbol("pino.asJson"),So=Symbol("pino.write"),vo=Symbol("pino.redactFmt"),Oo=Symbol("pino.time"),Eo=Symbol("pino.timeSliceIndex"),xo=Symbol("pino.stream"),_o=Symbol("pino.stringify"),To=Symbol("pino.stringifySafe"),Ao=Symbol("pino.stringifiers"),ko=Symbol("pino.end"),jo=Symbol("pino.formatOpts"),Ro=Symbol("pino.messageKey"),Lo=Symbol("pino.nestedKey"),qo=Symbol("pino.nestedKeyStr"),$o=Symbol("pino.mixinMergeStrategy"),Bo=Symbol("pino.wildcardFirst"),Mo=Symbol.for("pino.serializers"),Co=Symbol.for("pino.formatters"),Io=Symbol.for("pino.hooks"),Po=Symbol.for("pino.metadata");jn.exports={setLevelSym:co,getLevelSym:uo,levelValSym:fo,useLevelLabelsSym:ho,mixinSym:po,lsCacheSym:go,chindingsSym:mo,parsedChindingsSym:bo,asJsonSym:wo,writeSym:So,serializersSym:Mo,redactFmtSym:vo,timeSym:Oo,timeSliceIndexSym:Eo,streamSym:xo,stringifySym:_o,stringifySafeSym:To,stringifiersSym:Ao,endSym:ko,formatOptsSym:jo,messageKeySym:Ro,nestedKeySym:Lo,wildcardFirstSym:Bo,needsMetadataGsym:Po,useOnlyCustomLevelsSym:yo,formattersSym:Co,hooksSym:Io,nestedKeyStrSym:qo,mixinMergeStrategySym:$o}});var ft=E((ku,$n)=>{"use strict";var ut=kn(),{redactFmtSym:Do,wildcardFirstSym:je}=ce(),{rx:ct,validator:zo}=ut,Rn=zo({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),Ln="[Redacted]",qn=!1;function No(e,t){let{paths:r,censor:i}=Fo(e),n=r.reduce((f,o)=>{ct.lastIndex=0;let c=ct.exec(o),a=ct.exec(o),h=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(h==="*"&&(h=je),a===null)return f[h]=null,f;if(f[h]===null)return f;let{index:y}=a,d=`${o.substr(y,o.length-1)}`;return f[h]=f[h]||[],h!==je&&f[h].length===0&&f[h].push(...f[je]||[]),h===je&&Object.keys(f).forEach(function(u){f[u]&&f[u].push(d)}),f[h].push(d),f},{}),s={[Do]:ut({paths:r,censor:i,serialize:t,strict:qn})},l=(...f)=>t(typeof i=="function"?i(...f):i);return[...Object.keys(n),...Object.getOwnPropertySymbols(n)].reduce((f,o)=>{if(n[o]===null)f[o]=c=>l(c,[o]);else{let c=typeof i=="function"?(a,h)=>i(a,[o,...h]):i;f[o]=ut({paths:n[o],censor:c,serialize:t,strict:qn})}return f},s)}function Fo(e){if(Array.isArray(e))return e={paths:e,censor:Ln},Rn(e),e;let{paths:t,censor:r=Ln,remove:i}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),Rn({paths:t,censor:r}),{paths:t,censor:r}}$n.exports=No});var Mn=E((ju,Bn)=>{"use strict";var Wo=()=>"",Ko=()=>`,"time":${Date.now()}`,Uo=()=>`,"time":${Math.round(Date.now()/1e3)}`,Vo=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Bn.exports={nullTime:Wo,epochTime:Ko,unixTime:Uo,isoTime:Vo}});var In=E((Ru,Cn)=>{"use strict";function Ho(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}Cn.exports=Jo;function Jo(e,t,r){var i=r&&r.stringify||Ho,n=1;if(typeof e=="object"&&e!==null){var s=t.length+n;if(s===1)return e;var l=new Array(s);l[0]=i(e);for(var f=1;f<s;f++)l[f]=i(t[f]);return l.join(" ")}if(typeof e!="string")return e;var o=t.length;if(o===0)return e;for(var c="",a=1-n,h=-1,y=e&&e.length||0,d=0;d<y;){if(e.charCodeAt(d)===37&&d+1<y){switch(h=h>-1?h:0,e.charCodeAt(d+1)){case 100:case 102:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Number(t[a]),h=d+2,d++;break;case 105:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Math.floor(Number(t[a])),h=d+2,d++;break;case 79:case 111:case 106:if(a>=o||t[a]===void 0)break;h<d&&(c+=e.slice(h,d));var u=typeof t[a];if(u==="string"){c+="'"+t[a]+"'",h=d+2,d++;break}if(u==="function"){c+=t[a].name||"<anonymous>",h=d+2,d++;break}c+=i(t[a]),h=d+2,d++;break;case 115:if(a>=o)break;h<d&&(c+=e.slice(h,d)),c+=String(t[a]),h=d+2,d++;break;case 37:h<d&&(c+=e.slice(h,d)),c+="%",h=d+2,d++,a--;break}++a}++d}return h===-1?e:(h<y&&(c+=e.slice(h)),c)}});var dt=E((Lu,ht)=>{"use strict";if(typeof SharedArrayBuffer!="undefined"&&typeof Atomics!="undefined"){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));ht.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 i=Date.now()+Number(t);for(;i>Date.now(););};ht.exports=e}});var Fn=E((qu,Nn)=>{"use strict";var U=B("fs"),Go=B("events"),Xo=B("util").inherits,Pn=B("path"),Dn=dt(),yt=100,Yo=16*1024;function zn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,l){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}t.fd=l,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&!t._writing&&t._len>t.minLength&&!t.destroyed&&ue(t)}let i=t.append?"a":"w",n=t.mode;if(t.sync)try{t.mkdir&&U.mkdirSync(Pn.dirname(e),{recursive:!0});let s=U.openSync(e,i,n);r(null,s)}catch(s){throw r(s),s}else t.mkdir?U.mkdir(Pn.dirname(e),{recursive:!0},s=>{if(s)return r(s);U.open(e,i,n,r)}):U.open(e,i,n,r)}function F(e){if(!(this instanceof F))return new F(e);let{fd:t,dest:r,minLength:i,maxLength:n,maxWrite:s,sync:l,append:f=!0,mode:o,mkdir:c,retryEAGAIN:a}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=n||0,this.maxWrite=s||Yo,this.sync=l||!1,this.append=f||!1,this.mode=o,this.retryEAGAIN=a||(()=>!0),this.mkdir=c||!1,typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")zn(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=(h,y)=>{if(h){if(h.code==="EAGAIN"&&this.retryEAGAIN(h,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Dn(yt),this.release(void 0,0)}catch(u){this.release(u)}else setTimeout(()=>{U.write(this.fd,this._writingBuf,"utf8",this.release)},yt);else this._writing=!1,this.emit("error",h);return}if(this.emit("write",y),this._len-=y,this._writingBuf=this._writingBuf.slice(y),this._writingBuf.length){if(!this.sync){U.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let u=U.writeSync(this.fd,this._writingBuf,"utf8");this._len-=u,this._writingBuf=this._writingBuf.slice(u)}while(this._writingBuf)}catch(u){this.release(u);return}}let d=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):d>this.minLength?ue(this):this._ending?d>0?ue(this):(this._writing=!1,Re(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Qo,this)):this.emit("drain"))},this.on("newListener",function(h){h==="drain"&&(this._asyncDrainScheduled=!1)})}function Qo(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}Xo(F,Go);F.prototype.write=function(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&&ue(this),this._len<this._hwm)};F.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),ue(this))};F.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(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&U.close(t,r=>{if(r)return this.emit("error",r)})}),zn(e||this.file,this)};F.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?ue(this):Re(this)))};F.prototype.flushSync=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=U.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if(t.code!=="EAGAIN"||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Dn(yt)}}};F.prototype.destroy=function(){this.destroyed||Re(this)};function ue(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift()||"",e.sync)try{let r=U.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(r){t(r)}else U.write(e.fd,e._writingBuf,"utf8",t)}function Re(e){if(e.fd===-1){e.once("ready",Re.bind(null,e));return}e.destroyed=!0,e._bufs=[],e.fd!==1&&e.fd!==2?U.close(e.fd,t):setImmediate(t);function t(r){if(r){e.emit("error",r);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}F.SonicBoom=F;F.default=F;Nn.exports=F});var Kn=E(($u,Wn)=>{"use strict";var{format:pt}=B("util");function Zo(){let e={},t=new Map;function r(n,s,l){if(!n)throw new Error("Warning name must not be empty");if(!s)throw new Error("Warning code must not be empty");if(!l)throw new Error("Warning message must not be empty");if(s=s.toUpperCase(),e[s]!==void 0)throw new Error(`The code '${s}' already exist`);function f(o,c,a){let h;return o&&c&&a?h=pt(l,o,c,a):o&&c?h=pt(l,o,c):o?h=pt(l,o):h=l,{code:s,name:n,message:h}}return t.set(s,!1),e[s]=f,e[s]}function i(n,s,l,f){if(e[n]===void 0)throw new Error(`The code '${n}' does not exist`);if(t.get(n)===!0)return;t.set(n,!0);let o=e[n](s,l,f);process.emitWarning(o.message,o.name,o.code)}return{create:r,emit:i,emitted:t}}Wn.exports=Zo});var Hn=E((Bu,Vn)=>{"use strict";var gt=Kn()();Vn.exports=gt;var Un="PinoWarning";gt.create(Un,"PINODEP008","prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.");gt.create(Un,"PINODEP009","The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version")});var bt=E((Mu,Yn)=>{"use strict";function Jn(e,t,r,i){function n(){let s=t.deref();s!==void 0&&r(s,i)}e[i]=n,process.once(i,n)}var Gn=new FinalizationRegistry(Xn),mt=new WeakMap;function Xn(e){process.removeListener("exit",e.exit),process.removeListener("beforeExit",e.beforeExit)}function el(e,t){if(e===void 0)throw new Error("the object can't be undefined");let r=new WeakRef(e),i={};mt.set(e,i),Gn.register(e,i),Jn(i,r,t,"exit"),Jn(i,r,t,"beforeExit")}function tl(e){let t=mt.get(e);mt.delete(e),t&&Xn(t),Gn.unregister(e)}Yn.exports={register:el,unregister:tl}});var Zn=E((Cu,Qn)=>{"use strict";function rl(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l===r){n(null,"ok");return}let f=l,o=c=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{f=l,l=Atomics.load(e,t),l===f?o(c>=1e3?1e3:c*2):l===r?n(null,"ok"):n(null,"not-equal")},c)};o(1)}function nl(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l!==r){n(null,"ok");return}let f=o=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{l=Atomics.load(e,t),l!==r?n(null,"ok"):f(o>=1e3?1e3:o*2)},o)};f(1)}Qn.exports={wait:rl,waitDiff:nl}});var ti=E((Iu,ei)=>{"use strict";ei.exports={WRITE_INDEX:4,READ_INDEX:8}});var oi=E((Du,si)=>{"use strict";var{EventEmitter:il}=B("events"),{Worker:sl}=B("worker_threads"),{join:ol}=B("path"),{pathToFileURL:ll}=B("url"),{wait:al}=Zn(),{WRITE_INDEX:W,READ_INDEX:Y}=ti(),cl=B("buffer"),ul=B("assert"),p=Symbol("kImpl"),fl=cl.constants.MAX_STRING_LENGTH,qe=class{constructor(t){this._value=t}deref(){return this._value}},hl=global.FinalizationRegistry||class{register(){}unregister(){}},dl=global.WeakRef||qe,ri=new hl(e=>{e.exited||e.terminate()});function yl(e,t){let{filename:r,workerData:i}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||ol(__dirname,"lib","worker.js"),l=new sl(s,Q(D({},t.workerOpts),{workerData:{filename:r.indexOf("file://")===0?r:ll(r).href,dataBuf:e[p].dataBuf,stateBuf:e[p].stateBuf,workerData:i}}));return l.stream=new qe(e),l.on("message",pl),l.on("exit",ii),ri.register(e,l),l}function ni(e){ul(!e[p].sync),e[p].needDrain&&(e[p].needDrain=!1,e.emit("drain"))}function Le(e){let t=Atomics.load(e[p].state,W),r=e[p].data.length-t;if(r>0){if(e[p].buf.length===0){e[p].flushing=!1,e[p].ending?Ot(e):e[p].needDrain&&process.nextTick(ni,e);return}let i=e[p].buf.slice(0,r),n=Buffer.byteLength(i);n<=r?(e[p].buf=e[p].buf.slice(r),$e(e,i,Le.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);n>e[p].data.length;)r=r/2,i=e[p].buf.slice(0,r),n=Buffer.byteLength(i);e[p].buf=e[p].buf.slice(r),$e(e,i,Le.bind(null,e))}})}else if(r===0){if(t===0&&e[p].buf.length===0)return;e.flush(()=>{Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0),Le(e)})}else throw new Error("overwritten")}function pl(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new dl(t),t.flush(()=>{t[p].ready=!0,t.emit("ready")});break;case"ERROR":fe(t,e.err);break;default:throw new Error("this should not happen: "+e.code)}}function ii(e){let t=this.stream.deref();t!==void 0&&(ri.unregister(t),t.worker.exited=!0,t.worker.off("exit",ii),fe(t,e!==0?new Error("The worker thread exited"):null))}var St=class extends il{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[p]={},this[p].stateBuf=new SharedArrayBuffer(128),this[p].state=new Int32Array(this[p].stateBuf),this[p].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[p].data=Buffer.from(this[p].dataBuf),this[p].sync=t.sync||!1,this[p].ending=!1,this[p].ended=!1,this[p].needDrain=!1,this[p].destroyed=!1,this[p].flushing=!1,this[p].ready=!1,this[p].finished=!1,this[p].errored=null,this[p].closed=!1,this[p].buf="",this.worker=yl(this,t)}write(t){if(this[p].destroyed)throw new Error("the worker has exited");if(this[p].ending)throw new Error("the worker is ending");if(this[p].flushing&&this[p].buf.length+t.length>=fl)try{wt(this),this[p].flushing=!0}catch(r){return fe(this,r),!1}if(this[p].buf+=t,this[p].sync)try{return wt(this),!0}catch(r){return fe(this,r),!1}return this[p].flushing||(this[p].flushing=!0,setImmediate(Le,this)),this[p].needDrain=this[p].data.length-this[p].buf.length-Atomics.load(this[p].state,W)<=0,!this[p].needDrain}end(){this[p].destroyed||(this[p].ending=!0,Ot(this))}flush(t){if(this[p].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[p].state,W);al(this[p].state,Y,r,1/0,(i,n)=>{if(i){fe(this,i),process.nextTick(t,i);return}if(n==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[p].destroyed||(wt(this),vt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[p].ready}get destroyed(){return this[p].destroyed}get closed(){return this[p].closed}get writable(){return!this[p].destroyed&&!this[p].ending}get writableEnded(){return this[p].ending}get writableFinished(){return this[p].finished}get writableNeedDrain(){return this[p].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[p].errored}};function fe(e,t){e[p].destroyed||(e[p].destroyed=!0,t&&(e[p].errored=t,e.emit("error",t)),e.worker.exited?setImmediate(()=>{e[p].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[p].closed=!0,e.emit("close")}))}function $e(e,t,r){let i=Atomics.load(e[p].state,W),n=Buffer.byteLength(t);return e[p].data.write(t,i),Atomics.store(e[p].state,W,i+n),Atomics.notify(e[p].state,W),r(),!0}function Ot(e){if(!(e[p].ended||!e[p].ending||e[p].flushing)){e[p].ended=!0;try{e.flushSync();let t=Atomics.load(e[p].state,Y);Atomics.store(e[p].state,W,-1),Atomics.notify(e[p].state,W);let r=0;for(;t!==-1;){if(Atomics.wait(e[p].state,Y,t,1e3),t=Atomics.load(e[p].state,Y),t===-2)throw new Error("end() failed");if(++r===10)throw new Error("end() took too long (10s)")}process.nextTick(()=>{e[p].finished=!0,e.emit("finish")})}catch(t){fe(e,t)}}}function wt(e){let t=()=>{e[p].ending?Ot(e):e[p].needDrain&&process.nextTick(ni,e)};for(e[p].flushing=!1;e[p].buf.length!==0;){let r=Atomics.load(e[p].state,W),i=e[p].data.length-r;if(i===0){vt(e),Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);continue}else if(i<0)throw new Error("overwritten");let n=e[p].buf.slice(0,i),s=Buffer.byteLength(n);if(s<=i)e[p].buf=e[p].buf.slice(i),$e(e,n,t);else{for(vt(e),Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);s>e[p].buf.length;)i=i/2,n=e[p].buf.slice(0,i),s=Buffer.byteLength(n);e[p].buf=e[p].buf.slice(i),$e(e,n,t)}}}function vt(e){if(e[p].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[p].state,W),r=0;for(;;){let i=Atomics.load(e[p].state,Y);if(i===-2)throw new Error("_flushSync failed");if(i!==t)Atomics.wait(e[p].state,Y,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}si.exports=St});var xt=E((Nu,ai)=>{"use strict";var{createRequire:gl}=B("module"),ml=it(),{join:Et,isAbsolute:bl}=B("path"),wl=dt(),Be;global.WeakRef&&global.WeakMap&&global.FinalizationRegistry&&(Be=bt());var Sl=oi();function vl(e){if(Be)Be.register(e,li),e.on("close",function(){Be.unregister(e)});else{let t=li.bind(null,e);process.once("beforeExit",t),process.once("exit",t),e.on("close",function(){process.removeListener("beforeExit",t),process.removeListener("exit",t)})}}function Ol(e,t,r){let i=new Sl({filename:e,workerData:t,workerOpts:r});i.on("ready",n),i.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function n(){process.removeListener("exit",s),i.unref(),r.autoEnd!==!1&&vl(i)}function s(){i.closed||(i.flushSync(),wl(100),i.end())}return i}function li(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function El(e){let{pipeline:t,targets:r,levels:i,options:n={},worker:s={},caller:l=ml()}=e,f=typeof l=="string"?[l]:l,o="__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=o["pino-worker"]||Et(__dirname,"worker.js"),n.targets=r.map(h=>Q(D({},h),{target:a(h.target)}))):t&&(c=o["pino-pipeline-worker"]||Et(__dirname,"worker-pipeline.js"),n.targets=t.map(h=>Q(D({},h),{target:a(h.target)}))),i&&(n.levels=i),Ol(a(c),n,s);function a(h){if(h=o[h]||h,bl(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return Et(__dirname,"..","file.js");let y;for(let d of f)try{y=gl(d).resolve(h);break}catch(u){continue}if(!y)throw new Error(`unable to determine transport target for "${h}"`);return y}}ai.exports=El});var Ce=E((Wu,Si)=>{"use strict";var ci=In(),{mapHttpRequest:xl,mapHttpResponse:_l}=nt(),At=Fn(),yi=Hn(),{lsCacheSym:Tl,chindingsSym:kt,parsedChindingsSym:_t,writeSym:ui,serializersSym:jt,formatOptsSym:fi,endSym:Al,stringifiersSym:Rt,stringifySym:pi,stringifySafeSym:Lt,wildcardFirstSym:gi,needsMetadataGsym:mi,redactFmtSym:kl,streamSym:jl,nestedKeySym:Rl,formattersSym:qt,messageKeySym:bi,nestedKeyStrSym:Ll}=ce(),{isMainThread:ql}=B("worker_threads"),$l=xt();function ge(){}function Bl(e,t){if(!t)return r;return function(...n){t.call(this,n,r,e)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=xl(i):typeof i.setHeader=="function"&&(i=_l(i)));let l;s===null&&n.length===0?l=[null]:(s=n.shift(),l=n),this[ui](i,ci(s,l,this[fi]),e)}else this[ui](null,ci(i,n,this[fi]),e)}}function hi(e){let t="",r=0,i=!1,n=255,s=e.length;if(s>100)return JSON.stringify(e);for(var l=0;l<s&&n>=32;l++)n=e.charCodeAt(l),(n===34||n===92)&&(t+=e.slice(r,l)+"\\",r=l,i=!0);return i?t+=e.slice(r):t=e,n<32?JSON.stringify(e):'"'+t+'"'}function Ml(e,t,r,i){let n=this[pi],s=this[Lt],l=this[Rt],f=this[Al],o=this[kt],c=this[jt],a=this[qt],h=this[bi],y=this[Tl][r]+i;y=y+o;let d;a.log&&(e=a.log(e));let u=l[gi],g="";for(let w in e)if(d=e[w],Object.prototype.hasOwnProperty.call(e,w)&&d!==void 0){d=c[w]?c[w](d):d;let v=l[w]||u;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":v&&(d=v(d));break;case"string":d=(v||hi)(d);break;default:d=(v||n)(d,s)}if(d===void 0)continue;g+=',"'+w+'":'+d}let S="";if(t!==void 0){d=c[h]?c[h](t):t;let w=l[h]||u;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":w&&(d=w(d)),S=',"'+h+'":'+d;break;case"string":d=(w||hi)(d),S=',"'+h+'":'+d;break;default:d=(w||n)(d,s),S=',"'+h+'":'+d}}return this[Rl]&&g?y+this[Ll]+g.slice(1)+"}"+S+f:y+g+S+f}function Cl(e,t){let r,i=e[kt],n=e[pi],s=e[Lt],l=e[Rt],f=l[gi],o=e[jt],c=e[qt].bindings;t=c(t);for(let a in t)if(r=t[a],(a!=="level"&&a!=="serializers"&&a!=="formatters"&&a!=="customLevels"&&t.hasOwnProperty(a)&&r!==void 0)===!0){if(r=o[a]?o[a](r):r,r=(l[a]||f||n)(r,s),r===void 0)continue;i+=',"'+a+'":'+r}return i}function wi(e,t,r,i){if(t&&typeof t=="function")return t=t.bind(i),Tt(t(e),r,e);try{let n=B("pino-pretty").prettyFactory;return n.asMetaWrapper=Tt,Tt(n(e),r,e)}catch(n){throw n.message.startsWith("Cannot find module 'pino-pretty'")?Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately"):n}}function Tt(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let i=!1;return{[mi]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||i||(i=!0,di(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let n=this.lastLogger,s=null;return n?(n.hasOwnProperty(_t)?s=n[_t]:(s=JSON.parse("{"+n[kt].substr(1)+"}"),n[_t]=s),s):null},write(n){let s=this.lastLogger,l=this.chindings(),f=this.lastTime;typeof f=="number"||(f.match(/^\d+/)?f=parseInt(f):f=f.slice(1,-1));let o=this.lastObj,c=this.lastMsg,a=null,h=s[qt],y=h.log?h.log(o):o,d=s[bi];c&&y&&!Object.prototype.hasOwnProperty.call(y,d)&&(y[d]=c);let u=Object.assign({level:this.lastLevel,time:f},y,a),g=s[jt],S=Object.keys(g);for(var w=0;w<S.length;w++){let O=S[w];u[O]!==void 0&&(u[O]=g[O](u[O]))}for(let O in l)u.hasOwnProperty(O)||(u[O]=l[O]);let b=s[Rt][kl],x=e(typeof b=="function"?b(u):u);x!==void 0&&(di(t,this),t.write(x))}}}function Il(e){return e.write!==e.constructor.prototype.write}function Me(e){let t=new At(e);return t.on("error",r),!e.sync&&ql&&Pl(t),t;function r(i){if(i.code==="EPIPE"){t.write=ge,t.end=ge,t.flushSync=ge,t.destroy=ge;return}t.removeListener("error",r),t.emit("error",i)}}function Pl(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=bt();t.register(e,Dl),e.on("close",function(){t.unregister(e)})}}function Dl(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function zl(e){return function(r,i,n={},s){if(typeof n=="string")s=Me({dest:n,sync:!0}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=Me({dest:s,sync:!0})}else if(n instanceof At||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof At||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let a;n.customLevels&&(a=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=$l(Q(D({caller:i},n.transport),{levels:a}))}if(n=Object.assign({},e,n),n.serializers=Object.assign({},e.serializers,n.serializers),n.formatters=Object.assign({},e.formatters,n.formatters),"onTerminated"in n)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in n&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),n.levelKey=n.changeLevelName,delete n.changeLevelName);let{enabled:l,prettyPrint:f,prettifier:o,messageKey:c}=n;if(l===!1&&(n.level="silent"),s=s||process.stdout,s===process.stdout&&s.fd>=0&&!Il(s)&&(s=Me({fd:s.fd,sync:!0})),f){yi.emit("PINODEP008");let a=Object.assign({messageKey:c},f);s=wi(a,o,s,r)}return{opts:n,stream:s}}}function Nl(e,t){if(Number(process.versions.node.split(".")[0])>=14&&yi.emit("PINODEP009"),typeof e=="undefined"||typeof e.child!="function")throw Error("expected a pino logger instance");let i=typeof t!="undefined";if(i&&typeof t!="function")throw Error("if supplied, the handler parameter should be a function");let n=e[jl];if(typeof n.flushSync!="function")throw Error("final requires a stream that has a flushSync method, such as pino.destination");let s=new Proxy(e,{get:(l,f)=>f in l.levels.values?(...o)=>{l[f](...o),n.flushSync()}:l[f]});if(!i){try{n.flushSync()}catch(l){}return s}return(l=null,...f)=>{try{n.flushSync()}catch(o){}return t(l,s,...f)}}function Fl(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[Lt])(e)}catch(i){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Wl(e,t,r){return{level:e,bindings:t,log:r}}function di(e,t){e[mi]===!0&&(e.lastLevel=t.lastLevel,e.lastMsg=t.lastMsg,e.lastObj=t.lastObj,e.lastTime=t.lastTime,e.lastLogger=t.lastLogger)}function Kl(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e}Si.exports={noop:ge,buildSafeSonicBoom:Me,getPrettyStream:wi,asChindings:Cl,asJson:Ml,genLog:Bl,createArgsNormalizer:zl,final:Nl,stringify:Fl,buildFormatters:Wl,normalizeDestFileDescriptor:Kl}});var Ie=E((Uu,Oi)=>{"use strict";var{lsCacheSym:Ul,levelValSym:$t,useOnlyCustomLevelsSym:Vl,streamSym:Hl,formattersSym:Jl,hooksSym:Gl}=ce(),{noop:Xl,genLog:se}=Ce(),X={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},vi={fatal:e=>{let t=se(X.fatal,e);return function(...r){let i=this[Hl];if(t.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch(n){}}},error:e=>se(X.error,e),warn:e=>se(X.warn,e),info:e=>se(X.info,e),debug:e=>se(X.debug,e),trace:e=>se(X.trace,e)},Bt=Object.keys(X).reduce((e,t)=>(e[X[t]]=t,e),{}),Yl=Object.keys(Bt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Ql(e){let t=e[Jl].level,{labels:r}=e.levels,i={};for(let n in r){let s=t(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return e[Ul]=i,e}function Zl(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 ea(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 i=this[$t],n=this[$t]=r[e],s=this[Vl],l=this[Gl].logMethod;for(let f in r){if(n>r[f]){this[f]=Xl;continue}this[f]=Zl(f,s)?vi[f](l):se(r[f],l)}this.emit("level-change",e,n,t[i],i)}function ta(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function ra(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&r>=this[$t]}function na(e=null,t=!1){let r=e?Object.keys(e).reduce((s,l)=>(s[e[l]]=l,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Bt,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:X,e);return{labels:i,values:n}}function ia(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Bt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:X,t);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function sa(e,t){let{labels:r,values:i}=e;for(let n in t){if(n in i)throw Error("levels cannot be overridden");if(t[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}Oi.exports={initialLsCache:Yl,genLsCache:Ql,levelMethods:vi,getLevel:ta,setLevel:ea,isLevelEnabled:ra,mappings:na,levels:X,assertNoLevelCollisions:sa,assertDefaultLevelFound:ia}});var Ei=E((Vu,oa)=>{oa.exports={name:"pino",version:"7.11.0",description:"super fast, all natural json logger",main:"pino.js",type:"commonjs",types:"pino.d.ts",browser:"./browser.js",files:["pino.js","file.js","pino.d.ts","bin.js","browser.js","pretty.js","usage.txt","test","docs","example.js","lib"],scripts:{docs:"docsify serve","browser-test":"airtap --local 8080 test/browser*test.js",lint:"eslint .",test:"npm run lint && npm run transpile && tap --ts && jest test/jest && npm run test-types","test-ci":"npm run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly && npm run test-types","test-ci-pnpm":"pnpm run lint && npm run transpile && tap --ts --no-coverage --no-check-coverage && pnpm run test-types","test-ci-yarn-pnp":"yarn run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly","test-types":"tsc && tsd && ts-node test/types/pino.ts",transpile:"node ./test/fixtures/ts/transpile.cjs","cov-ui":"tap --ts --coverage-report=html",bench:"node benchmarks/utils/runbench all","bench-basic":"node benchmarks/utils/runbench basic","bench-object":"node benchmarks/utils/runbench object","bench-deep-object":"node benchmarks/utils/runbench deep-object","bench-multi-arg":"node benchmarks/utils/runbench multi-arg","bench-longs-tring":"node benchmarks/utils/runbench long-string","bench-child":"node benchmarks/utils/runbench child","bench-child-child":"node benchmarks/utils/runbench child-child","bench-child-creation":"node benchmarks/utils/runbench child-creation","bench-formatters":"node benchmarks/utils/runbench formatters","update-bench-doc":"node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md"},bin:{pino:"./bin.js"},precommit:"test",repository:{type:"git",url:"git+https://github.com/pinojs/pino.git"},keywords:["fast","logger","stream","json"],author:"Matteo Collina <hello@matteocollina.com>",contributors:["David Mark Clements <huperekchuno@googlemail.com>","James Sumners <james.sumners@gmail.com>","Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)"],license:"MIT",bugs:{url:"https://github.com/pinojs/pino/issues"},homepage:"http://getpino.io",devDependencies:{"@types/flush-write-stream":"^1.0.0","@types/node":"^17.0.0","@types/tap":"^15.0.6",airtap:"4.0.4",benchmark:"^2.1.4",bole:"^4.0.0",bunyan:"^1.8.14","docsify-cli":"^4.4.1",eslint:"^7.17.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0",execa:"^5.0.0",fastbench:"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1",jest:"^27.3.1",log:"^6.0.0",loglevel:"^1.6.7","pino-pretty":"^v7.6.0","pre-commit":"^1.2.2",proxyquire:"^2.1.3",pump:"^3.0.0",rimraf:"^3.0.2",semver:"^7.0.0",split2:"^4.0.0",steed:"^1.1.3","strip-ansi":"^6.0.0",tap:"^16.0.0",tape:"^5.0.0",through2:"^4.0.0","ts-node":"^10.7.0",tsd:"^0.20.0",typescript:"^4.4.4",winston:"^3.3.3"},dependencies:{"atomic-sleep":"^1.0.0","fast-redact":"^3.0.0","on-exit-leak-free":"^0.2.0","pino-abstract-transport":"v0.5.0","pino-std-serializers":"^4.0.0","process-warning":"^1.0.0","quick-format-unescaped":"^4.0.3","real-require":"^0.1.0","safe-stable-stringify":"^2.1.0","sonic-boom":"^2.2.1","thread-stream":"^0.15.1"},tsd:{directory:"test/types"}}});var Mt=E((Hu,xi)=>{"use strict";var{version:la}=Ei();xi.exports={version:la}});var Bi=E((Gu,$i)=>{"use strict";var{EventEmitter:aa}=B("events"),{lsCacheSym:ca,levelValSym:ua,setLevelSym:It,getLevelSym:_i,chindingsSym:Pt,parsedChindingsSym:fa,mixinSym:ha,asJsonSym:ji,writeSym:da,mixinMergeStrategySym:ya,timeSym:pa,timeSliceIndexSym:ga,streamSym:Ri,serializersSym:oe,formattersSym:Ct,useOnlyCustomLevelsSym:ma,needsMetadataGsym:ba,redactFmtSym:wa,stringifySym:Sa,formatOptsSym:va,stringifiersSym:Oa}=ce(),{getLevel:Ea,setLevel:xa,isLevelEnabled:_a,mappings:Ta,initialLsCache:Aa,genLsCache:ka,assertNoLevelCollisions:ja}=Ie(),{asChindings:Li,asJson:Ra,buildFormatters:Ti,stringify:Ai}=Ce(),{version:La}=Mt(),qa=ft(),$a=class{},qi={constructor:$a,child:Ba,bindings:Ma,setBindings:Ca,flush:za,isLevelEnabled:_a,version:La,get level(){return this[_i]()},set level(e){this[It](e)},get levelVal(){return this[ua]},set levelVal(e){throw Error("levelVal is read-only")},[ca]:Aa,[da]:Pa,[ji]:Ra,[_i]:Ea,[It]:xa};Object.setPrototypeOf(qi,aa.prototype);$i.exports=function(){return Object.create(qi)};var ki=e=>e;function Ba(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[oe],i=this[Ct],n=Object.create(this);if(t.hasOwnProperty("serializers")===!0){n[oe]=Object.create(null);for(let a in r)n[oe][a]=r[a];let o=Object.getOwnPropertySymbols(r);for(var s=0;s<o.length;s++){let a=o[s];n[oe][a]=r[a]}for(let a in t.serializers)n[oe][a]=t.serializers[a];let c=Object.getOwnPropertySymbols(t.serializers);for(var l=0;l<c.length;l++){let a=c[l];n[oe][a]=t.serializers[a]}}else n[oe]=r;if(t.hasOwnProperty("formatters")){let{level:o,bindings:c,log:a}=t.formatters;n[Ct]=Ti(o||i.level,c||ki,a||i.log)}else n[Ct]=Ti(i.level,ki,i.log);if(t.hasOwnProperty("customLevels")===!0&&(ja(this.levels,t.customLevels),n.levels=Ta(t.customLevels,n[ma]),ka(n)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){n.redact=t.redact;let o=qa(n.redact,Ai),c={stringify:o[wa]};n[Sa]=Ai,n[Oa]=o,n[va]=c}n[Pt]=Li(n,e);let f=t.level||this.level;return n[It](f),n}function Ma(){let t=`{${this[Pt].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Ca(e){let t=Li(this,e);this[Pt]=t,delete this[fa]}function Ia(e,t){return Object.assign(t,e)}function Pa(e,t,r){let i=this[pa](),n=this[ha],s=this[ya]||Ia,l;e==null?l={}:e instanceof Error?(l={err:e},t===void 0&&(t=e.message)):(l=e,t===void 0&&e.err&&(t=e.err.message)),n&&(l=s(l,n(l,r)));let f=this[ji](l,t,r,i),o=this[Ri];o[ba]===!0&&(o.lastLevel=r,o.lastObj=l,o.lastMsg=t,o.lastTime=i.slice(this[ga]),o.lastLogger=this),o.write(f)}function Da(){}function za(){let e=this[Ri];"flush"in e&&e.flush(Da)}});var Pi=E((Ft,Ii)=>{"use strict";var{hasOwnProperty:me}=Object.prototype,ae=Nt();ae.configure=Nt;ae.stringify=ae;ae.default=ae;Ft.stringify=ae;Ft.configure=Nt;Ii.exports=ae;var Na=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function re(e){return e.length<5e3&&!Na.test(e)?`"${e}"`:JSON.stringify(e)}function Dt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],n=r;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var Fa=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function zt(e){return Fa.call(e)!==void 0&&e.length!==0}function Mi(e,t,r){e.length<r&&(r=e.length);let i=t===","?"":" ",n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++)n+=`${t}"${s}":${i}${e[s]}`;return n}function Wa(e){if(me.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 Ka(e){let t;if(me.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 Ua(e,t){let r;if(me.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 Ci(e,t){let r;if(me.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 le(e){return e===1?"1 item":`${e} items`}function Va(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Ha(e){if(me.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 i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Nt(e){e=D({},e);let t=Ha(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Wa(e),i=Ua(e,"bigint"),n=Ka(e),s=typeof n=="function"?n:void 0,l=Ci(e,"maximumDepth"),f=Ci(e,"maximumBreadth");function o(d,u,g,S,w,v){let b=u[d];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(d)),b=S.call(u,d,b),typeof b){case"string":return re(b);case"object":{if(b===null)return"null";if(g.indexOf(b)!==-1)return r;let x="",O=",",T=v;if(Array.isArray(b)){if(b.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(b),w!==""&&(v+=w,x+=`
81
+ ${v}`,O=`,
82
+ ${v}`);let j=Math.min(b.length,f),C=0;for(;C<j-1;C++){let H=o(String(C),b,g,S,w,v);x+=H!==void 0?H:"null",x+=O}let M=o(String(C),b,g,S,w,v);if(x+=M!==void 0?M:"null",b.length-1>f){let H=b.length-f-1;x+=`${O}"... ${le(H)} not stringified"`}return w!==""&&(x+=`
83
+ ${T}`),g.pop(),`[${x}]`}let k=Object.keys(b),A=k.length;if(A===0)return"{}";if(l<g.length+1)return'"[Object]"';let _="",R="";w!==""&&(v+=w,O=`,
84
+ ${v}`,_=" ");let $=Math.min(A,f);n&&!zt(b)&&(k=Dt(k,s)),g.push(b);for(let j=0;j<$;j++){let C=k[j],M=o(C,b,g,S,w,v);M!==void 0&&(x+=`${R}${re(C)}:${_}${M}`,R=O)}if(A>f){let j=A-f;x+=`${R}"...":${_}"${le(j)} not stringified"`,R=O}return w!==""&&R.length>1&&(x=`
85
85
  ${v}${x}
86
- ${k}`),g.pop(),`{${x}}`}case"number":return isFinite(b)?String(b):t?t(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return t?t(b):void 0}}function c(d,u,g,S,w,v){switch(typeof u=="object"&&u!==null&&typeof u.toJSON=="function"&&(u=u.toJSON(d)),typeof u){case"string":return ne(u);case"object":{if(u===null)return"null";if(g.indexOf(u)!==-1)return r;let b=v,x="",E=",";if(Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u),w!==""&&(v+=w,x+=`
87
- ${v}`,E=`,
88
- ${v}`);let T=Math.min(u.length,f),_=0;for(;_<T-1;_++){let $=c(String(_),u[_],g,S,w,v);x+=$!==void 0?$:"null",x+=E}let L=c(String(_),u[_],g,S,w,v);if(x+=L!==void 0?L:"null",u.length-1>f){let $=u.length-f-1;x+=`${E}"... ${ae($)} not stringified"`}return w!==""&&(x+=`
89
- ${b}`),g.pop(),`[${x}]`}g.push(u);let k="";w!==""&&(v+=w,E=`,
90
- ${v}`,k=" ");let A="";for(let T of S){let _=c(T,u[T],g,S,w,v);_!==void 0&&(x+=`${A}${ne(T)}:${k}${_}`,A=E)}return w!==""&&A.length>1&&(x=`
86
+ ${T}`),g.pop(),`{${x}}`}case"number":return isFinite(b)?String(b):t?t(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return t?t(b):void 0}}function c(d,u,g,S,w,v){switch(typeof u=="object"&&u!==null&&typeof u.toJSON=="function"&&(u=u.toJSON(d)),typeof u){case"string":return re(u);case"object":{if(u===null)return"null";if(g.indexOf(u)!==-1)return r;let b=v,x="",O=",";if(Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u),w!==""&&(v+=w,x+=`
87
+ ${v}`,O=`,
88
+ ${v}`);let A=Math.min(u.length,f),_=0;for(;_<A-1;_++){let $=c(String(_),u[_],g,S,w,v);x+=$!==void 0?$:"null",x+=O}let R=c(String(_),u[_],g,S,w,v);if(x+=R!==void 0?R:"null",u.length-1>f){let $=u.length-f-1;x+=`${O}"... ${le($)} not stringified"`}return w!==""&&(x+=`
89
+ ${b}`),g.pop(),`[${x}]`}g.push(u);let T="";w!==""&&(v+=w,O=`,
90
+ ${v}`,T=" ");let k="";for(let A of S){let _=c(A,u[A],g,S,w,v);_!==void 0&&(x+=`${k}${re(A)}:${T}${_}`,k=O)}return w!==""&&k.length>1&&(x=`
91
91
  ${v}${x}
92
- ${b}`),g.pop(),`{${x}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function a(d,u,g,S,w){switch(typeof u){case"string":return ne(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return a(d,u,g,S,w);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let v=w;if(Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u),w+=S;let _=`
93
- ${w}`,L=`,
94
- ${w}`,$=Math.min(u.length,f),j=0;for(;j<$-1;j++){let I=a(String(j),u[j],g,S,w);_+=I!==void 0?I:"null",_+=L}let M=a(String(j),u[j],g,S,w);if(_+=M!==void 0?M:"null",u.length-1>f){let I=u.length-f-1;_+=`${L}"... ${ae(I)} not stringified"`}return _+=`
95
- ${v}`,g.pop(),`[${_}]`}let b=Object.keys(u),x=b.length;if(x===0)return"{}";if(l<g.length+1)return'"[Object]"';w+=S;let E=`,
96
- ${w}`,k="",A="",T=Math.min(x,f);Nt(u)&&(k+=Ii(u,E,f),b=b.slice(u.length),T-=u.length,A=E),n&&(b=Dt(b,s)),g.push(u);for(let _=0;_<T;_++){let L=b[_],$=a(L,u[L],g,S,w);$!==void 0&&(k+=`${A}${ne(L)}: ${$}`,A=E)}if(x>f){let _=x-f;k+=`${A}"...": "${ae(_)} not stringified"`,A=E}return A!==""&&(k=`
97
- ${w}${k}
98
- ${v}`),g.pop(),`{${k}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function h(d,u,g){switch(typeof u){case"string":return ne(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return h(d,u,g);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let S="",w=u.length!==void 0;if(w&&Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u);let k=Math.min(u.length,f),A=0;for(;A<k-1;A++){let _=h(String(A),u[A],g);S+=_!==void 0?_:"null",S+=","}let T=h(String(A),u[A],g);if(S+=T!==void 0?T:"null",u.length-1>f){let _=u.length-f-1;S+=`,"... ${ae(_)} not stringified"`}return g.pop(),`[${S}]`}let v=Object.keys(u),b=v.length;if(b===0)return"{}";if(l<g.length+1)return'"[Object]"';let x="",E=Math.min(b,f);w&&Nt(u)&&(S+=Ii(u,",",f),v=v.slice(u.length),E-=u.length,x=","),n&&(v=Dt(v,s)),g.push(u);for(let k=0;k<E;k++){let A=v[k],T=h(A,u[A],g);T!==void 0&&(S+=`${x}${ne(A)}:${T}`,x=",")}if(b>f){let k=b-f;S+=`${x}"...":"${ae(k)} not stringified"`}return g.pop(),`{${S}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function p(d,u,g){if(arguments.length>1){let S="";if(typeof g=="number"?S=" ".repeat(Math.min(g,10)):typeof g=="string"&&(S=g.slice(0,10)),u!=null){if(typeof u=="function")return o("",{"":d},[],u,S,"");if(Array.isArray(u))return c("",d,[],Ga(u),S,"")}if(S.length!==0)return a("",d,[],S,"")}return h("",d,[])}return p}});var Wi=O((tf,Fi)=>{"use strict";var Wt=Symbol.for("pino.metadata"),{levels:Ni}=Me(),zi=Object.create(Ni);zi.silent=1/0;var Ya=Ni.info;function Qa(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let i=zi;t.levels&&typeof t.levels=="object"&&(i=t.levels);let n={write:s,add:f,flushSync:l,end:o,minLevel:0,streams:[],clone:c,[Wt]:!0};return Array.isArray(e)?e.forEach(f,n):f.call(n,e),e=null,n;function s(a){let h,p=this.lastLevel,{streams:d}=this,u;for(let g=0;g<d.length&&(h=d[g],h.level<=p);g++){if(u=h.stream,u[Wt]){let{lastTime:S,lastMsg:w,lastObj:v,lastLogger:b}=this;u.lastLevel=p,u.lastTime=S,u.lastMsg=w,u.lastObj=v,u.lastLogger=b}(!t.dedupe||h.level===p)&&u.write(a)}}function l(){for(let{stream:a}of this.streams)typeof a.flushSync=="function"&&a.flushSync()}function f(a){if(!a)return n;let h=typeof a.write=="function"||a.stream,p=a.write?a:a.stream;if(!h)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d}=this,u;typeof a.levelVal=="number"?u=a.levelVal:typeof a.level=="string"?u=i[a.level]:typeof a.level=="number"?u=a.level:u=Ya;let g={stream:p,level:u,levelVal:void 0,id:r++};return d.unshift(g),d.sort(Za),this.minLevel=d[0].level,n}function o(){for(let{stream:a}of this.streams)typeof a.flushSync=="function"&&a.flushSync(),a.end()}function c(a){let h=new Array(this.streams.length);for(let p=0;p<h.length;p++)h[p]={level:a,stream:this.streams[p].stream};return{write:s,add:f,minLevel:a,streams:h,clone:c,flushSync:l,[Wt]:!0}}}function Za(e,t){return e.level-t.level}Fi.exports=Qa});var rs=O((rf,H)=>{"use strict";var ec=C("os"),Yi=nt(),tc=it(),rc=ft(),Qi=In(),nc=Ci(),Zi=ue(),{configure:ic}=Di(),{assertDefaultLevelFound:sc,mappings:es,genLsCache:oc,levels:lc}=Me(),{createArgsNormalizer:ac,asChindings:cc,final:uc,buildSafeSonicBoom:Ki,buildFormatters:fc,stringify:Pe,normalizeDestFileDescriptor:Ui,noop:hc}=Ie(),{version:dc}=Ct(),{chindingsSym:Vi,redactFmtSym:pc,serializersSym:Hi,timeSym:yc,timeSliceIndexSym:gc,streamSym:mc,stringifySym:Ji,stringifySafeSym:Kt,stringifiersSym:Gi,setLevelSym:bc,endSym:wc,formatOptsSym:Sc,messageKeySym:vc,nestedKeySym:Ec,mixinSym:Oc,useOnlyCustomLevelsSym:xc,formattersSym:Xi,hooksSym:_c,nestedKeyStrSym:kc,mixinMergeStrategySym:Tc}=Zi,{epochTime:ts,nullTime:Ac}=Qi,{pid:jc}=process,Rc=ec.hostname(),Lc=Yi.err,qc={level:"info",levels:lc,messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:jc,hostname:Rc},serializers:Object.assign(Object.create(null),{err:Lc}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:ts,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Bc=ac(qc),$c=Object.assign(Object.create(null),Yi);function Ut(...e){let t={},{opts:r,stream:i}=Bc(t,tc(),...e),{redact:n,crlf:s,serializers:l,timestamp:f,messageKey:o,nestedKey:c,base:a,name:h,level:p,customLevels:d,mixin:u,mixinMergeStrategy:g,useOnlyCustomLevels:S,formatters:w,hooks:v,depthLimit:b,edgeLimit:x}=r,E=ic({maximumDepth:b,maximumBreadth:x}),k=fc(w.level,w.bindings,w.log),A=n?rc(n,Pe):{},T=Pe.bind({[Kt]:E}),_=n?{stringify:A[pc]}:{stringify:T},L="}"+(s?`\r
92
+ ${b}`),g.pop(),`{${x}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function a(d,u,g,S,w){switch(typeof u){case"string":return re(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return a(d,u,g,S,w);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let v=w;if(Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u),w+=S;let _=`
93
+ ${w}`,R=`,
94
+ ${w}`,$=Math.min(u.length,f),j=0;for(;j<$-1;j++){let M=a(String(j),u[j],g,S,w);_+=M!==void 0?M:"null",_+=R}let C=a(String(j),u[j],g,S,w);if(_+=C!==void 0?C:"null",u.length-1>f){let M=u.length-f-1;_+=`${R}"... ${le(M)} not stringified"`}return _+=`
95
+ ${v}`,g.pop(),`[${_}]`}let b=Object.keys(u),x=b.length;if(x===0)return"{}";if(l<g.length+1)return'"[Object]"';w+=S;let O=`,
96
+ ${w}`,T="",k="",A=Math.min(x,f);zt(u)&&(T+=Mi(u,O,f),b=b.slice(u.length),A-=u.length,k=O),n&&(b=Dt(b,s)),g.push(u);for(let _=0;_<A;_++){let R=b[_],$=a(R,u[R],g,S,w);$!==void 0&&(T+=`${k}${re(R)}: ${$}`,k=O)}if(x>f){let _=x-f;T+=`${k}"...": "${le(_)} not stringified"`,k=O}return k!==""&&(T=`
97
+ ${w}${T}
98
+ ${v}`),g.pop(),`{${T}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function h(d,u,g){switch(typeof u){case"string":return re(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return h(d,u,g);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let S="",w=u.length!==void 0;if(w&&Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u);let T=Math.min(u.length,f),k=0;for(;k<T-1;k++){let _=h(String(k),u[k],g);S+=_!==void 0?_:"null",S+=","}let A=h(String(k),u[k],g);if(S+=A!==void 0?A:"null",u.length-1>f){let _=u.length-f-1;S+=`,"... ${le(_)} not stringified"`}return g.pop(),`[${S}]`}let v=Object.keys(u),b=v.length;if(b===0)return"{}";if(l<g.length+1)return'"[Object]"';let x="",O=Math.min(b,f);w&&zt(u)&&(S+=Mi(u,",",f),v=v.slice(u.length),O-=u.length,x=","),n&&(v=Dt(v,s)),g.push(u);for(let T=0;T<O;T++){let k=v[T],A=h(k,u[k],g);A!==void 0&&(S+=`${x}${re(k)}:${A}`,x=",")}if(b>f){let T=b-f;S+=`${x}"...":"${le(T)} not stringified"`}return g.pop(),`{${S}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function y(d,u,g){if(arguments.length>1){let S="";if(typeof g=="number"?S=" ".repeat(Math.min(g,10)):typeof g=="string"&&(S=g.slice(0,10)),u!=null){if(typeof u=="function")return o("",{"":d},[],u,S,"");if(Array.isArray(u))return c("",d,[],Va(u),S,"")}if(S.length!==0)return a("",d,[],S,"")}return h("",d,[])}return y}});var Fi=E((Yu,Ni)=>{"use strict";var Wt=Symbol.for("pino.metadata"),{levels:Di}=Ie(),zi=Object.create(Di);zi.silent=1/0;var Ja=Di.info;function Ga(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let i=zi;t.levels&&typeof t.levels=="object"&&(i=t.levels);let n={write:s,add:f,flushSync:l,end:o,minLevel:0,streams:[],clone:c,[Wt]:!0};return Array.isArray(e)?e.forEach(f,n):f.call(n,e),e=null,n;function s(a){let h,y=this.lastLevel,{streams:d}=this,u;for(let g=0;g<d.length&&(h=d[g],h.level<=y);g++){if(u=h.stream,u[Wt]){let{lastTime:S,lastMsg:w,lastObj:v,lastLogger:b}=this;u.lastLevel=y,u.lastTime=S,u.lastMsg=w,u.lastObj=v,u.lastLogger=b}(!t.dedupe||h.level===y)&&u.write(a)}}function l(){for(let{stream:a}of this.streams)typeof a.flushSync=="function"&&a.flushSync()}function f(a){if(!a)return n;let h=typeof a.write=="function"||a.stream,y=a.write?a:a.stream;if(!h)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d}=this,u;typeof a.levelVal=="number"?u=a.levelVal:typeof a.level=="string"?u=i[a.level]:typeof a.level=="number"?u=a.level:u=Ja;let g={stream:y,level:u,levelVal:void 0,id:r++};return d.unshift(g),d.sort(Xa),this.minLevel=d[0].level,n}function o(){for(let{stream:a}of this.streams)typeof a.flushSync=="function"&&a.flushSync(),a.end()}function c(a){let h=new Array(this.streams.length);for(let y=0;y<h.length;y++)h[y]={level:a,stream:this.streams[y].stream};return{write:s,add:f,minLevel:a,streams:h,clone:c,flushSync:l,[Wt]:!0}}}function Xa(e,t){return e.level-t.level}Ni.exports=Ga});var ts=E((Qu,V)=>{"use strict";var Ya=B("os"),Xi=nt(),Qa=it(),Za=ft(),Yi=Mn(),ec=Bi(),Qi=ce(),{configure:tc}=Pi(),{assertDefaultLevelFound:rc,mappings:Zi,genLsCache:nc,levels:ic}=Ie(),{createArgsNormalizer:sc,asChindings:oc,final:lc,buildSafeSonicBoom:Wi,buildFormatters:ac,stringify:Pe,normalizeDestFileDescriptor:Ki,noop:cc}=Ce(),{version:uc}=Mt(),{chindingsSym:Ui,redactFmtSym:fc,serializersSym:Vi,timeSym:hc,timeSliceIndexSym:dc,streamSym:yc,stringifySym:Hi,stringifySafeSym:Kt,stringifiersSym:Ji,setLevelSym:pc,endSym:gc,formatOptsSym:mc,messageKeySym:bc,nestedKeySym:wc,mixinSym:Sc,useOnlyCustomLevelsSym:vc,formattersSym:Gi,hooksSym:Oc,nestedKeyStrSym:Ec,mixinMergeStrategySym:xc}=Qi,{epochTime:es,nullTime:_c}=Yi,{pid:Tc}=process,Ac=Ya.hostname(),kc=Xi.err,jc={level:"info",levels:ic,messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:Tc,hostname:Ac},serializers:Object.assign(Object.create(null),{err:kc}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:es,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Rc=sc(jc),Lc=Object.assign(Object.create(null),Xi);function Ut(...e){let t={},{opts:r,stream:i}=Rc(t,Qa(),...e),{redact:n,crlf:s,serializers:l,timestamp:f,messageKey:o,nestedKey:c,base:a,name:h,level:y,customLevels:d,mixin:u,mixinMergeStrategy:g,useOnlyCustomLevels:S,formatters:w,hooks:v,depthLimit:b,edgeLimit:x}=r,O=tc({maximumDepth:b,maximumBreadth:x}),T=ac(w.level,w.bindings,w.log),k=n?Za(n,Pe):{},A=Pe.bind({[Kt]:O}),_=n?{stringify:k[fc]}:{stringify:A},R="}"+(s?`\r
99
99
  `:`
100
- `),$=cc.bind(null,{[Vi]:"",[Hi]:l,[Gi]:A,[Ji]:Pe,[Kt]:E,[Xi]:k}),j="";a!==null&&(h===void 0?j=$(a):j=$(Object.assign({},a,{name:h})));let M=f instanceof Function?f:f?ts:Ac,I=M().indexOf(":")+1;if(S&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(u&&typeof u!="function")throw Error(`Unknown mixin type "${typeof u}" - expected "function"`);sc(p,d,S);let J=es(d,S);return Object.assign(t,{levels:J,[xc]:S,[mc]:i,[yc]:M,[gc]:I,[Ji]:Pe,[Kt]:E,[Gi]:A,[wc]:L,[Sc]:_,[vc]:o,[Ec]:c,[kc]:c?`,${JSON.stringify(c)}:{`:"",[Hi]:l,[Oc]:u,[Tc]:g,[Vi]:j,[Xi]:k,[_c]:v,silent:hc}),Object.setPrototypeOf(t,nc()),oc(t),t[bc](p),t}H.exports=Ut;H.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Ui(e.dest||process.stdout.fd),Ki(e)):Ki({dest:Ui(e),minLength:0,sync:!0});H.exports.transport=xt();H.exports.multistream=Wi();H.exports.final=uc;H.exports.levels=es();H.exports.stdSerializers=$c;H.exports.stdTimeFunctions=Object.assign({},Qi);H.exports.symbols=Zi;H.exports.version=dc;H.exports.default=Ut;H.exports.pino=Ut});var ss=ze(Kr()),os=ze(Yr()),ls=ze(rs());import Cc from"fs";import*as R from"@whiskeysockets/baileys";import B from"chalk";import{EventEmitter as Ic}from"events";import Mc from"figlet";import Pc from"readline";import ns from"ora";var Vt=e=>new Promise(t=>setTimeout(t,e)),as=Pc.createInterface({input:process.stdin,output:process.stdout}),Dc=e=>new Promise(t=>as.question(e,t)),is=class extends Ic{constructor(){super();this.spinner=null;this.isRunning=!1;this.start()}showBanner(){return Z(this,null,function*(){console.clear(),console.log(B.yellowBright.bold.italic(`
100
+ `),$=oc.bind(null,{[Ui]:"",[Vi]:l,[Ji]:k,[Hi]:Pe,[Kt]:O,[Gi]:T}),j="";a!==null&&(h===void 0?j=$(a):j=$(Object.assign({},a,{name:h})));let C=f instanceof Function?f:f?es:_c,M=C().indexOf(":")+1;if(S&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(u&&typeof u!="function")throw Error(`Unknown mixin type "${typeof u}" - expected "function"`);rc(y,d,S);let H=Zi(d,S);return Object.assign(t,{levels:H,[vc]:S,[yc]:i,[hc]:C,[dc]:M,[Hi]:Pe,[Kt]:O,[Ji]:k,[gc]:R,[mc]:_,[bc]:o,[wc]:c,[Ec]:c?`,${JSON.stringify(c)}:{`:"",[Vi]:l,[Sc]:u,[xc]:g,[Ui]:j,[Gi]:T,[Oc]:v,silent:cc}),Object.setPrototypeOf(t,ec()),nc(t),t[pc](y),t}V.exports=Ut;V.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Ki(e.dest||process.stdout.fd),Wi(e)):Wi({dest:Ki(e),minLength:0,sync:!0});V.exports.transport=xt();V.exports.multistream=Fi();V.exports.final=lc;V.exports.levels=Zi();V.exports.stdSerializers=Lc;V.exports.stdTimeFunctions=Object.assign({},Yi);V.exports.symbols=Qi;V.exports.version=uc;V.exports.default=Ut;V.exports.pino=Ut});var ns=Ne(Wr()),is=Ne(Xr()),ss=Ne(ts());import qc from"fs";import*as L from"@whiskeysockets/baileys";import be from"chalk";import{EventEmitter as $c}from"events";import Bc from"figlet";import Mc from"ora";var rs=class extends $c{constructor(){super();this.isRunning=!1;this.setMaxListeners(20),this.start()}start(){return J(this,null,function*(){if(yield this.showBanner(),!this.isRunning){this.isRunning=!0;try{yield this.setupClient()}catch(r){this.stopLoading("Error initializing client","fail"),this.startLoading("Connecting to WhatsApp..."),this.isRunning=!1,setTimeout(()=>this.start(),3e3);return}this.setupProcessHandlers()}})}restart(){return J(this,null,function*(){this.stopLoading("Restarting connection...","info"),this.isRunning=!1,yield this.start()})}handleConnection(r){var f;let{receivedPendingNotifications:i,lastDisconnect:n,connection:s,qr:l}=r;if(i&&this.conn.ev.flush(),s==="close"){let o=(f=new ns.default.Boom(n==null?void 0:n.error))==null?void 0:f.output.statusCode;({[L.DisconnectReason.badSession]:this.restart.bind(this),[L.DisconnectReason.connectionClosed]:this.restart.bind(this),[L.DisconnectReason.connectionLost]:this.restart.bind(this),[L.DisconnectReason.connectionReplaced]:()=>{console.log("Connection Replaced, New Session Opened, Please Close Current Session First"),this.restart()},[L.DisconnectReason.loggedOut]:()=>{console.log("Device Logged Out, Please Connect Again"),this.restart()},[L.DisconnectReason.restartRequired]:this.restart.bind(this),[L.DisconnectReason.multideviceMismatch]:()=>{console.log("Multi-device Mismatch, Please Connect Again"),this.restart()}}[o]||(()=>{this.restart()}))()}s==="open"&&this.stopLoading("Connected to WhatsApp","succeed")}showBanner(){return J(this,null,function*(){console.clear(),console.log(be.yellowBright.bold.italic(`
101
101
  ============================
102
- `)),console.log(yield new Promise(r=>Mc("Zaileys",(i,n)=>r(B.yellowBright.italic(n))))),console.log(B.yellowBright.bold.italic(`
102
+ `)),console.log(yield new Promise(r=>Bc("Zaileys",(i,n)=>r(be.yellowBright.italic(n))))),console.log(be.yellowBright.bold.italic(`
103
103
  ============================
104
- `)),this.startLoading("Connecting to WhatsApp..."),yield Vt(4e3)})}start(){return Z(this,null,function*(){if(yield this.showBanner(),!this.isRunning){this.isRunning=!0;try{yield this.initClient(),this.spinner.succeed(B.green("Connected successfully")),this.spinner.succeed(B.green("Connected successfully"))}catch(r){this.spinner.fail(B.red("Error initializing client")),this.isRunning=!1,setTimeout(()=>this.start(),5e3);return}this.setupProcessHandlers()}})}setupProcessHandlers(){process.on("message",i=>{var n;console.log("[ RECEIVED ] ",i),i==="reset"?(this.isRunning=!1,this.start()):i==="uptime"&&((n=process.send)==null||n.call(process,process.uptime()))});let r=i=>{this.isRunning=!1,console.error("Exited with code: ",i),i!==0&&this.start()};process.on("exit",r),["SIGINT","SIGTERM","SIGUSR2"].forEach(i=>{process.on(i,()=>{console.log(`Received ${i}, shutting down.`),process.exit(1)})})}initClient(){return Z(this,null,function*(){this.logger=(0,ls.default)({timestamp:()=>`,"time":"${new Date().toJSON()}"`}).child({class:"irull2nd"}),this.logger.level="fatal",this.store=R.makeInMemoryStore({logger:this.logger}),this.store.readFromFile("./storage/store.json");let{state:r,saveCreds:i}=yield R.useMultiFileAuthState("./storage/temp/session");r.creds.registered||(this.spinner=ns({text:"Waiting for pairing code...",color:"yellow"}).start()),this.conn=R.default({logger:this.logger,printQRInTerminal:!1,auth:{creds:r.creds,keys:R.makeCacheableSignalKeyStore(r.keys,this.logger)},browser:R.Browsers.ubuntu("Safari"),markOnlineOnConnect:!0,getMessage:n=>Z(this,null,function*(){var l;let s=R.jidNormalizedUser(n.remoteJid);return((l=yield this.store.loadMessage(s,n.id))==null?void 0:l.message)||""}),msgRetryCounterCache:new os.default,defaultQueryTimeoutMs:0,connectTimeoutMs:6e4,generateHighQualityLinkPreview:!0,syncFullHistory:!1}),this.store.bind(this.conn.ev),Cc.existsSync("./storage/temp/session/creds.json")&&!this.conn.authState.creds.registered&&(console.log(B.yellow("-- WARNING: creds.json is broken, please delete it first & try re-pairing --")),process.exit(0)),yield this.setupPairingCode(),this.conn.ev.on("creds.update",i),this.conn.ev.on("connection.update",this.handleConnection.bind(this)),this.conn.ev.on("messages.upsert",this.handleMessages.bind(this)),this.conn.ev.on("contacts.update",this.handleContactsUpdate.bind(this)),this.conn.ev.on("contacts.upsert",this.handleContactsUpsert.bind(this)),this.conn.ev.on("groups.update",this.handleGroupsUpdate.bind(this)),setInterval(()=>this.store.writeToFile("./storage/store.json"),1e4)})}setupPairingCode(){return Z(this,null,function*(){if(!this.conn.authState.creds.registered){let i="62858788977802".replace(/[^0-9]/g,"");console.log("\u{1F680} ~ Client ~ setupPairingCode ~ phoneNumber:",i),Object.keys(R.PHONENUMBER_MCC).some(n=>i.startsWith(n))||(console.log(B.bgBlack(B.redBright("Start with your country's WhatsApp code, Example : 62xxx"))),i=yield Dc(B.bgBlack(B.greenBright("Please type your WhatsApp number : "))),i=i.replace(/[^0-9]/g,""),Object.keys(R.PHONENUMBER_MCC).some(n=>i.startsWith(n))||(console.log(B.bgBlack(B.redBright("Invalid number format. Exiting..."))),process.exit(0))),as.close(),setTimeout(()=>Z(this,null,function*(){var s;let n=yield this.conn.requestPairingCode(i);n=((s=n==null?void 0:n.match(/.{1,4}/g))==null?void 0:s.join("-"))||n,console.log(B.black(B.bgGreen("Your Pairing Code : ")),B.black(B.white(n)))}),3e3)}})}handleConnection(r){return Z(this,null,function*(){var f;let{receivedPendingNotifications:i,lastDisconnect:n,connection:s,qr:l}=r;if(i&&this.conn.ev.flush(),s&&this.logger.info(`Connection Status : ${s}`),s==="close"){let o=(f=new ss.default.Boom(n==null?void 0:n.error))==null?void 0:f.output.statusCode;({[R.DisconnectReason.badSession]:()=>{var a;console.log("File Sesi Rusak, Harap Hapus Sesi dan Pindai Lagi"),(a=process.send)==null||a.call(process,"reset")},[R.DisconnectReason.connectionClosed]:()=>this.start(),[R.DisconnectReason.connectionReplaced]:()=>{console.log("Koneksi Diganti, Sesi Baru Dibuka, Harap Tutup Sesi Saat Ini Terlebih Dahulu"),process.exit(1)},[R.DisconnectReason.loggedOut]:()=>{console.log("Perangkat Keluar, Silakan Pindai Lagi"),process.exit(1)},[R.DisconnectReason.restartRequired]:()=>this.start(),[R.DisconnectReason.timedOut]:()=>{var a;console.log("Waktu Sambungan Habis, Mulai Ulang..."),(a=process.send)==null||a.call(process,"reset")},[R.DisconnectReason.multideviceMismatch]:()=>{console.log("Ketidakcocokan multi perangkat, harap pindai lagi"),process.exit(0)}}[o]||(()=>{var a;console.log(o),(a=process.send)==null||a.call(process,"reset")}))()}if(s==="connecting"&&(console.log(B.bold.green("Izumii Whatsapp Bot")),console.log(B.yellow.bgBlack("Created By Rulzz.")),console.log(B.bold.red("This script is open source, sale and purchase are prohibited!!!")),console.log(B.blue("[Is Connecting]"))),s==="open"){yield Vt(5e3),console.log(B.blue("[Connecting to] WhatsApp web")),console.log(B.green("[Connected] "+JSON.stringify(this.conn.user,null,2))),yield Vt(1e3);let o=new Date().getTime()-new Date().getTime(),c=o<0?"N/A":`${o}ms`;console.log("\u{1F680} ~ Client ~ handleConnection ~ formattedPingSpeed:",c)}})}startLoading(r){this.spinner||(this.spinner=ns({text:r,color:"cyan"}).start())}stopLoading(r,i=!0){this.spinner&&(i?this.spinner.succeed(r||"Operation completed successfully"):this.spinner.fail(r||"Operation failed"),this.spinner=null)}handleMessages(r){console.log("Got message"),this.emit("message",r)}handleContactsUpdate(r){for(let i of r){let n=R.jidNormalizedUser(i.id);this.store&&this.store.contacts&&(this.store.contacts[n]={id:n,name:i.notify})}}handleContactsUpsert(r){for(let i of r){let n=R.jidNormalizedUser(i.id);this.store&&this.store.contacts&&this.store.contacts[n]!=null&&Q(N(N({},this.store.contacts[n]||{}),i),{isContact:!0})}}handleGroupsUpdate(r){for(let i of r){let n=i.id;this.store.groupMetadata[n]&&(this.store.groupMetadata[n]=N(N({},this.store.groupMetadata[n]||{}),i))}}sendMessage(s,l){return Z(this,arguments,function*(r,i,n={}){return this.conn.sendMessage(r,i,n)})}on(r,i){return super.on(r,i),this}simulateMessage(r){this.emit("message",r)}simulateClose(r,i){this.emit("close",r,i)}simulateError(r){this.emit("error",r)}};export{is as Client};
104
+ `)),this.startLoading("Checking server connection...")})}setupClient(){return J(this,null,function*(){let{state:r,saveCreds:i}=yield L.useMultiFileAuthState("./.zaileys/zaileys-auth");this.logger=(0,ss.default)().child({class:"zaileys"}),this.logger.level="fatal",this.store=L.makeInMemoryStore({logger:this.logger}),this.store.readFromFile("./.zaileys/zaileys-store.json"),this.conn=L.default({logger:this.logger,printQRInTerminal:!1,auth:{creds:r.creds,keys:L.makeCacheableSignalKeyStore(r.keys,this.logger)},browser:L.Browsers.ubuntu("Safari"),markOnlineOnConnect:!0,getMessage:n=>J(this,null,function*(){var l;let s=L.jidNormalizedUser(n.remoteJid);return((l=yield this.store.loadMessage(s,n.id))==null?void 0:l.message)||""}),msgRetryCounterCache:new is.default,defaultQueryTimeoutMs:0,connectTimeoutMs:6e4,generateHighQualityLinkPreview:!0,syncFullHistory:!1}),this.store.bind(this.conn.ev),qc.existsSync("./.zaileys/zaileys-auth/creds.json")&&!this.conn.authState.creds.registered&&(this.stopLoading("Session is broken, please delete .zaileys folder & try again","fail"),process.exit(0)),yield this.setupPairingCode(),this.conn.ev.on("creds.update",i),this.conn.ev.on("connection.update",this.handleConnection.bind(this)),this.conn.ev.on("messages.upsert",this.handleMessages.bind(this)),this.conn.ev.on("contacts.update",this.handleContactsUpdate.bind(this)),this.conn.ev.on("contacts.upsert",this.handleContactsUpsert.bind(this)),this.conn.ev.on("groups.update",this.handleGroupsUpdate.bind(this)),setInterval(()=>this.store.writeToFile("./.zaileys/zaileys-store.json"),1e4)})}setupPairingCode(){return J(this,null,function*(){if(!this.conn.authState.creds.registered){let r="62858788977802",i=r.replace(/[^0-9]/g,"");Object.keys(L.PHONENUMBER_MCC).some(n=>i.startsWith(n))||(this.stopLoading("Warning: Please enter valid phone number","fail"),process.exit(0)),this.stopLoading("Connection ready to run"),this.startLoading("Waiting for requests pairing code..."),setTimeout(()=>J(this,null,function*(){var s;i=r.replace(/[^0-9]/g,"");let n=yield this.conn.requestPairingCode(i);n=((s=n==null?void 0:n.match(/.{1,4}/g))==null?void 0:s.join("-"))||n,this.stopLoading("Your Pairing Code : "+be.black(be.bgYellowBright.bold(` ${n} `)),"info")}),3e3)}})}setupProcessHandlers(){process.setMaxListeners(20),process.on("message",i=>J(this,null,function*(){var n;console.log("[ RECEIVED ] ",i),i==="reset"?yield this.restart():i==="uptime"&&((n=process.send)==null||n.call(process,process.uptime()))}));let r=i=>J(this,null,function*(){this.isRunning=!1,this.stopLoading(`Exited with code: ${i}`,"fail"),i!==0&&(yield this.start())});process.once("exit",r),["SIGINT","SIGTERM","SIGUSR2"].forEach(i=>{process.once(i,()=>{process.exit(1)})})}startLoading(r){this.spinner||(this.spinner=Mc({text:r,color:"cyan"}).start())}stopLoading(r,i="succeed"){this.spinner&&(this.spinner[i](r||"Operation failed"),this.spinner=null)}handleMessages(r){console.log("Got message"),this.emit("message",r)}handleContactsUpdate(r){for(let i of r){let n=L.jidNormalizedUser(i.id);this.store&&this.store.contacts&&(this.store.contacts[n]={id:n,name:i.notify})}}handleContactsUpsert(r){for(let i of r){let n=L.jidNormalizedUser(i.id);this.store&&this.store.contacts&&this.store.contacts[n]!=null&&Q(D(D({},this.store.contacts[n]||{}),i),{isContact:!0})}}handleGroupsUpdate(r){for(let i of r){let n=i.id;this.store.groupMetadata[n]&&(this.store.groupMetadata[n]=D(D({},this.store.groupMetadata[n]||{}),i))}}sendMessage(s,l){return J(this,arguments,function*(r,i,n={}){return this.conn.sendMessage(r,i,n)})}on(r,i){return super.on(r,i),this}};export{rs as Client};