@layerzerolabs/hyperliquid-composer
Version:
LayerZero Labs reference EVM OmniChain Fungible Token (OFT) implementation for Hyperliquid
25 lines • 2.01 MB
JavaScript
import {Command}from'commander';import VTe,{createHash,randomBytes,createHmac,pbkdf2Sync}from'crypto';import*as Sm from'node:crypto';import Ha from'fs';import G8 from'path';import jTe from'url';import $6e from'http';import W6e from'https';import B6e from'util';import fu from'zlib';import Np,{Readable}from'stream';import {EventEmitter}from'events';import {AsyncLocalStorage,AsyncResource}from'node:async_hooks';import Uo from'node:process';import*as yZ from'node:readline';import yZ__default from'node:readline';import {stripVTControlCharacters}from'node:util';var Tne=Object.create;var Rh=Object.defineProperty;var wne=Object.getOwnPropertyDescriptor;var Nne=Object.getOwnPropertyNames;var Ane=Object.getPrototypeOf,Sne=Object.prototype.hasOwnProperty;var VO=t=>{throw TypeError(t)};var One=(t,e,r)=>e in t?Rh(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r;var se=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yt=(t,e)=>{for(var r in e)Rh(t,r,{get:e[r],enumerable:true});},HO=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nne(e))!Sne.call(t,i)&&i!==r&&Rh(t,i,{get:()=>e[i],enumerable:!(n=wne(e,i))||n.enumerable});return t};var ze=(t,e,r)=>(r=t!=null?Tne(Ane(t)):{},HO(e||!t||!t.__esModule?Rh(r,"default",{value:t,enumerable:true}):r,t)),fr=t=>HO(Rh({},"__esModule",{value:true}),t);var be=(t,e,r)=>One(t,typeof e!="symbol"?e+"":e,r),lw=(t,e,r)=>e.has(t)||VO("Cannot "+r);var ne=(t,e,r)=>(lw(t,e,"read from private field"),r?r.call(t):e.get(t)),Te=(t,e,r)=>e.has(t)?VO("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),he=(t,e,r,n)=>(lw(t,e,"write to private field"),e.set(t,r),r),ot=(t,e,r)=>(lw(t,e,"access private method"),r);var zn=E((dFe,GO)=>{var fw=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
Found: ${e.toString().split(`
`)[0]}
`),Error.captureStackTrace(this,t);}};GO.exports=t=>{if(t.length>2)throw new fw(t);function e(n={}){this.options=n;}e.prototype.transform=t;function r(n){return new e(n)}return r.Format=e,r};});var KO=E((pFe,WO)=>{var $O={};WO.exports=$O;var zO={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(zO).forEach(function(t){var e=zO[t],r=$O[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m";});});var ZO=E((hFe,YO)=>{YO.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),n=/^-{1,2}/.test(t)?"":"--",i=e.indexOf(n+t);return i!==-1&&(r===-1?true:i<r)};});var XO=E((xFe,JO)=>{var Dne=se("os"),ps=ZO(),kn=process.env,tf=void 0;ps("no-color")||ps("no-colors")||ps("color=false")?tf=false:(ps("color")||ps("colors")||ps("color=true")||ps("color=always"))&&(tf=true);"FORCE_COLOR"in kn&&(tf=kn.FORCE_COLOR.length===0||parseInt(kn.FORCE_COLOR,10)!==0);function Rne(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function Cne(t){if(tf===false)return 0;if(ps("color=16m")||ps("color=full")||ps("color=truecolor"))return 3;if(ps("color=256"))return 2;if(t&&!t.isTTY&&tf!==true)return 0;var e=tf?1:0;if(process.platform==="win32"){var r=Dne.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in kn)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in kn})||kn.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in kn)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(kn.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in kn){var n=parseInt((kn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(kn.TERM_PROGRAM){case "iTerm.app":return n>=3?3:2;case "Hyper":return 3;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(kn.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(kn.TERM)||"COLORTERM"in kn?1:(kn.TERM==="dumb",e)}function dw(t){var e=Cne(t);return Rne(e)}JO.exports={supportsColor:dw,stdout:dw(process.stdout),stderr:dw(process.stderr)};});var eD=E((mFe,QO)=>{QO.exports=function(e,r){var n="";e=e||"Run the trap, drop the bass",e=e.split("");var i={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var o=i[s]||[" "],a=Math.floor(Math.random()*o.length);typeof i[s]!="undefined"?n+=i[s][a]:n+=s;}),n};});var rD=E((bFe,tD)=>{tD.exports=function(e,r){e=e||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},i=[].concat(n.up,n.down,n.mid);function s(c){var u=Math.floor(Math.random()*c);return u}function o(c){var u=false;return i.filter(function(f){u=f===c;}),u}function a(c,u){var f="",d,m;u=u||{},u.up=typeof u.up!="undefined"?u.up:true,u.mid=typeof u.mid!="undefined"?u.mid:true,u.down=typeof u.down!="undefined"?u.down:true,u.size=typeof u.size!="undefined"?u.size:"maxi",c=c.split("");for(m in c)if(!o(m)){switch(f=f+c[m],d={up:0,down:0,mid:0},u.size){case "mini":d.up=s(8),d.mid=s(2),d.down=s(8);break;case "maxi":d.up=s(16)+3,d.mid=s(4)+1,d.down=s(64)+3;break;default:d.up=s(8)+1,d.mid=s(6)/2,d.down=s(8)+1;break}var p=["up","mid","down"];for(var h in p)for(var g=p[h],y=0;y<=d[g];y++)u[g]&&(f=f+n[g][s(n[g].length)]);}return f}return a(e,r)};});var iD=E((gFe,nD)=>{nD.exports=function(t){return function(e,r,n){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}};});var oD=E((vFe,sD)=>{sD.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}};});var cD=E((EFe,aD)=>{aD.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return r===" "?r:t[e[n++%e.length]](r)}};});var lD=E((yFe,uD)=>{uD.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,i){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}};});var mD=E((TFe,xD)=>{var Ke={};xD.exports=Ke;Ke.themes={};var Mne=se("util"),il=Ke.styles=KO(),dD=Object.defineProperties,Pne=new RegExp(/[\r\n]+/g);Ke.supportsColor=XO().supportsColor;typeof Ke.enabled=="undefined"&&(Ke.enabled=Ke.supportsColor()!==false);Ke.enable=function(){Ke.enabled=true;};Ke.disable=function(){Ke.enabled=false;};Ke.stripColors=Ke.strip=function(t){return (""+t).replace(/\x1B\[\d+m/g,"")};Ke.stylize=function(e,r){if(!Ke.enabled)return e+"";var n=il[r];return !n&&r in Ke?Ke[r](e):n.open+e+n.close};var Ine=/[|\\{}()[\]^$+*?.]/g,kne=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Ine,"\\$&")};function pD(t){var e=function r(){return Fne.apply(r,arguments)};return e._styles=t,e.__proto__=Bne,e}var hD=function(){var t={};return il.grey=il.gray,Object.keys(il).forEach(function(e){il[e].closeRe=new RegExp(kne(il[e].close),"g"),t[e]={get:function(){return pD(this._styles.concat(e))}};}),t}(),Bne=dD(function(){},hD);function Fne(){var t=Array.prototype.slice.call(arguments),e=t.map(function(o){return o!=null&&o.constructor===String?o:Mne.inspect(o)}).join(" ");if(!Ke.enabled||!e)return e;for(var r=e.indexOf(`
`)!=-1,n=this._styles,i=n.length;i--;){var s=il[n[i]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Pne,function(o){return s.close+o+s.open}));}return e}Ke.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){Ke[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var s in t[r])i=Ke[t[r][s]](i);return i}return Ke[t[r]](n)};})(e);};function Lne(){var t={};return Object.keys(hD).forEach(function(e){t[e]={get:function(){return pD([e])}};}),t}var qne=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};Ke.trap=eD();Ke.zalgo=rD();Ke.maps={};Ke.maps.america=iD()(Ke);Ke.maps.zebra=oD()(Ke);Ke.maps.rainbow=cD()(Ke);Ke.maps.random=lD()(Ke);for(fD in Ke.maps)(function(t){Ke[t]=function(e){return qne(Ke.maps[t],e)};})(fD);var fD;dD(Ke,Lne());});var pw=E((wFe,bD)=>{var Une=mD();bD.exports=Une;});var gD=E(hw=>{hw.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};hw.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"};});var vD=E(xw=>{xw.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};xw.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"};});var ED=E(mw=>{mw.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};mw.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"};});var yD=E(Vb=>{Object.defineProperty(Vb,"cli",{value:gD()});Object.defineProperty(Vb,"npm",{value:vD()});Object.defineProperty(Vb,"syslog",{value:ED()});});var Gr=E(Ch=>{Object.defineProperty(Ch,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Ch,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Ch,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Ch,"configs",{value:yD()});});var zb=E((RFe,Gb)=>{var vw=pw(),{LEVEL:bw,MESSAGE:gw}=Gr();vw.enabled=true;var _D=/\s+/,Hb=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e;}static addColors(e){let r=Object.keys(e).reduce((n,i)=>(n[i]=_D.test(e[i])?e[i].split(_D):e[i],n),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,n){if(typeof n=="undefined"&&(n=r),!Array.isArray(t.allColors[e]))return vw[t.allColors[e]](n);for(let i=0,s=t.allColors[e].length;i<s;i++)n=vw[t.allColors[e][i]](n);return n}transform(e,r){return r.all&&typeof e[gw]=="string"&&(e[gw]=this.colorize(e[bw],e.level,e[gw])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[bw],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[bw],e.level,e.message)),e}};Gb.exports=t=>new Hb(t);Gb.exports.Colorizer=Gb.exports.Format=Hb;});var wD=E((CFe,TD)=>{var{Colorizer:jne}=zb();TD.exports=t=>(jne.addColors(t.colors||t),t);});var AD=E((MFe,ND)=>{var Vne=zn();ND.exports=Vne(t=>(t.message=` ${t.message}`,t));});var DD=E((PFe,OD)=>{var Hne=zn(),{LEVEL:SD,MESSAGE:Ew}=Gr();OD.exports=Hne((t,{stack:e,cause:r})=>{if(t instanceof Error){let i=Object.assign({},t,{level:t.level,[SD]:t[SD]||t.level,message:t.message,[Ew]:t[Ew]||t.message});return e&&(i.stack=t.stack),r&&(i.cause=t.cause),i}if(!(t.message instanceof Error))return t;let n=t.message;return Object.assign(t,n),t.message=n.message,t[Ew]=n.message,e&&(t.stack=n.stack),r&&(t.cause=n.cause),t});});var _w=E((IFe,Wb)=>{var{configs:Gne,LEVEL:RD,MESSAGE:yw}=Gr(),$b=class t{constructor(e={levels:Gne.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e;}static getLongestLevel(e){let r=Object.keys(e).map(n=>n.length);return Math.max(...r)}static paddingForLevel(e,r,n){let i=n+1-e.length,s=Math.floor(i/r.length);return `${r}${r.repeat(s)}`.slice(0,i)}static paddingForLevels(e,r=" "){let n=t.getLongestLevel(e);return Object.keys(e).reduce((i,s)=>(i[s]=t.paddingForLevel(s,r,n),i),{})}transform(e,r){return e.message=`${this.paddings[e[RD]]}${e.message}`,e[yw]&&(e[yw]=`${this.paddings[e[RD]]}${e[yw]}`),e}};Wb.exports=t=>new $b(t);Wb.exports.Padder=Wb.exports.Format=$b;});var CD=E((kFe,Tw)=>{var{Colorizer:zne}=zb(),{Padder:$ne}=_w(),{configs:Wne,MESSAGE:Kne}=Gr(),Kb=class{constructor(e={}){e.levels||(e.levels=Wne.cli.levels),this.colorizer=new zne(e),this.padder=new $ne(e),this.options=e;}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[Kne]=`${e.level}:${e.message}`,e}};Tw.exports=t=>new Kb(t);Tw.exports.Format=Kb;});var PD=E((BFe,ww)=>{var Yne=zn();function MD(t){if(t.every(Zne))return e=>{let r=e;for(let n=0;n<t.length;n++)if(r=t[n].transform(r,t[n].options),!r)return false;return r}}function Zne(t){if(typeof t.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
`));return true}ww.exports=(...t)=>{let e=Yne(MD(t)),r=e();return r.Format=e.Format,r};ww.exports.cascade=MD;});var Mh=E((Ow,FD)=>{var{hasOwnProperty:Yb}=Object.prototype,ol=Sw();ol.configure=Sw;ol.stringify=ol;ol.default=ol;Ow.stringify=ol;Ow.configure=Sw;FD.exports=ol;var Jne=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function oc(t){return t.length<5e3&&!Jne.test(t)?`"${t}"`:JSON.stringify(t)}function Nw(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],n=e;for(;n!==0&&t[n-1]>r;)t[n]=t[n-1],n--;t[n]=r;}return t}var Xne=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Aw(t){return Xne.call(t)!==void 0&&t.length!==0}function ID(t,e,r){t.length<r&&(r=t.length);let n=e===","?"":" ",i=`"0":${n}${t[0]}`;for(let s=1;s<r;s++)i+=`${e}"${s}":${n}${t[s]}`;return i}function Qne(t){if(Yb.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return `"${e}"`;if(e==null)return e;if(e===Error||e===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 kD(t,e){let r;if(Yb.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?true:r}function BD(t,e){let r;if(Yb.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function sl(t){return t===1?"1 item":`${t} items`}function eie(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function tie(t){if(Yb.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Sw(t){t={...t};let e=tie(t);e&&(t.bigint===void 0&&(t.bigint=false),"circularValue"in t||(t.circularValue=Error));let r=Qne(t),n=kD(t,"bigint"),i=kD(t,"deterministic"),s=BD(t,"maximumDepth"),o=BD(t,"maximumBreadth");function a(m,p,h,g,y,_){let D=p[m];switch(typeof D=="object"&&D!==null&&typeof D.toJSON=="function"&&(D=D.toJSON(m)),D=g.call(p,m,D),typeof D){case "string":return oc(D);case "object":{if(D===null)return "null";if(h.indexOf(D)!==-1)return r;let I="",L=",",k=_;if(Array.isArray(D)){if(D.length===0)return "[]";if(s<h.length+1)return '"[Array]"';h.push(D),y!==""&&(_+=y,I+=`
${_}`,L=`,
${_}`);let X=Math.min(D.length,o),ue=0;for(;ue<X-1;ue++){let x=a(String(ue),D,h,g,y,_);I+=x!==void 0?x:"null",I+=L;}let P=a(String(ue),D,h,g,y,_);if(I+=P!==void 0?P:"null",D.length-1>o){let x=D.length-o-1;I+=`${L}"... ${sl(x)} not stringified"`;}return y!==""&&(I+=`
${k}`),h.pop(),`[${I}]`}let F=Object.keys(D),H=F.length;if(H===0)return "{}";if(s<h.length+1)return '"[Object]"';let G="",Y="";y!==""&&(_+=y,L=`,
${_}`,G=" ");let re=Math.min(H,o);i&&!Aw(D)&&(F=Nw(F)),h.push(D);for(let X=0;X<re;X++){let ue=F[X],P=a(ue,D,h,g,y,_);P!==void 0&&(I+=`${Y}${oc(ue)}:${G}${P}`,Y=L);}if(H>o){let X=H-o;I+=`${Y}"...":${G}"${sl(X)} not stringified"`,Y=L;}return y!==""&&Y.length>1&&(I=`
${_}${I}
${k}`),h.pop(),`{${I}}`}case "number":return isFinite(D)?String(D):e?e(D):"null";case "boolean":return D===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(D);default:return e?e(D):void 0}}function c(m,p,h,g,y,_){switch(typeof p=="object"&&p!==null&&typeof p.toJSON=="function"&&(p=p.toJSON(m)),typeof p){case "string":return oc(p);case "object":{if(p===null)return "null";if(h.indexOf(p)!==-1)return r;let D=_,I="",L=",";if(Array.isArray(p)){if(p.length===0)return "[]";if(s<h.length+1)return '"[Array]"';h.push(p),y!==""&&(_+=y,I+=`
${_}`,L=`,
${_}`);let H=Math.min(p.length,o),G=0;for(;G<H-1;G++){let re=c(String(G),p[G],h,g,y,_);I+=re!==void 0?re:"null",I+=L;}let Y=c(String(G),p[G],h,g,y,_);if(I+=Y!==void 0?Y:"null",p.length-1>o){let re=p.length-o-1;I+=`${L}"... ${sl(re)} not stringified"`;}return y!==""&&(I+=`
${D}`),h.pop(),`[${I}]`}h.push(p);let k="";y!==""&&(_+=y,L=`,
${_}`,k=" ");let F="";for(let H of g){let G=c(H,p[H],h,g,y,_);G!==void 0&&(I+=`${F}${oc(H)}:${k}${G}`,F=L);}return y!==""&&F.length>1&&(I=`
${_}${I}
${D}`),h.pop(),`{${I}}`}case "number":return isFinite(p)?String(p):e?e(p):"null";case "boolean":return p===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(p);default:return e?e(p):void 0}}function u(m,p,h,g,y){switch(typeof p){case "string":return oc(p);case "object":{if(p===null)return "null";if(typeof p.toJSON=="function"){if(p=p.toJSON(m),typeof p!="object")return u(m,p,h,g,y);if(p===null)return "null"}if(h.indexOf(p)!==-1)return r;let _=y;if(Array.isArray(p)){if(p.length===0)return "[]";if(s<h.length+1)return '"[Array]"';h.push(p),y+=g;let G=`
${y}`,Y=`,
${y}`,re=Math.min(p.length,o),X=0;for(;X<re-1;X++){let P=u(String(X),p[X],h,g,y);G+=P!==void 0?P:"null",G+=Y;}let ue=u(String(X),p[X],h,g,y);if(G+=ue!==void 0?ue:"null",p.length-1>o){let P=p.length-o-1;G+=`${Y}"... ${sl(P)} not stringified"`;}return G+=`
${_}`,h.pop(),`[${G}]`}let D=Object.keys(p),I=D.length;if(I===0)return "{}";if(s<h.length+1)return '"[Object]"';y+=g;let L=`,
${y}`,k="",F="",H=Math.min(I,o);Aw(p)&&(k+=ID(p,L,o),D=D.slice(p.length),H-=p.length,F=L),i&&(D=Nw(D)),h.push(p);for(let G=0;G<H;G++){let Y=D[G],re=u(Y,p[Y],h,g,y);re!==void 0&&(k+=`${F}${oc(Y)}: ${re}`,F=L);}if(I>o){let G=I-o;k+=`${F}"...": "${sl(G)} not stringified"`,F=L;}return F!==""&&(k=`
${y}${k}
${_}`),h.pop(),`{${k}}`}case "number":return isFinite(p)?String(p):e?e(p):"null";case "boolean":return p===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(p);default:return e?e(p):void 0}}function f(m,p,h){switch(typeof p){case "string":return oc(p);case "object":{if(p===null)return "null";if(typeof p.toJSON=="function"){if(p=p.toJSON(m),typeof p!="object")return f(m,p,h);if(p===null)return "null"}if(h.indexOf(p)!==-1)return r;let g="";if(Array.isArray(p)){if(p.length===0)return "[]";if(s<h.length+1)return '"[Array]"';h.push(p);let L=Math.min(p.length,o),k=0;for(;k<L-1;k++){let H=f(String(k),p[k],h);g+=H!==void 0?H:"null",g+=",";}let F=f(String(k),p[k],h);if(g+=F!==void 0?F:"null",p.length-1>o){let H=p.length-o-1;g+=`,"... ${sl(H)} not stringified"`;}return h.pop(),`[${g}]`}let y=Object.keys(p),_=y.length;if(_===0)return "{}";if(s<h.length+1)return '"[Object]"';let D="",I=Math.min(_,o);Aw(p)&&(g+=ID(p,",",o),y=y.slice(p.length),I-=p.length,D=","),i&&(y=Nw(y)),h.push(p);for(let L=0;L<I;L++){let k=y[L],F=f(k,p[k],h);F!==void 0&&(g+=`${D}${oc(k)}:${F}`,D=",");}if(_>o){let L=_-o;g+=`${D}"...":"${sl(L)} not stringified"`;}return h.pop(),`{${g}}`}case "number":return isFinite(p)?String(p):e?e(p):"null";case "boolean":return p===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(p);default:return e?e(p):void 0}}function d(m,p,h){if(arguments.length>1){let g="";if(typeof h=="number"?g=" ".repeat(Math.min(h,10)):typeof h=="string"&&(g=h.slice(0,10)),p!=null){if(typeof p=="function")return a("",{"":m},[],p,g,"");if(Array.isArray(p))return c("",m,[],eie(p),g,"")}if(g.length!==0)return u("",m,[],g,"")}return f("",m,[])}return d}});var Dw=E((FFe,LD)=>{var rie=zn(),{MESSAGE:nie}=Gr(),iie=Mh();function sie(t,e){return typeof e=="bigint"?e.toString():e}LD.exports=rie((t,e)=>{let r=iie.configure(e);return t[nie]=r(t,e.replacer||sie,e.space),t});});var UD=E((LFe,qD)=>{var oie=zn();qD.exports=oie((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t));});var VD=E((qFe,jD)=>{var aie=zn(),{MESSAGE:cie}=Gr(),uie=Mh();jD.exports=aie(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[cie]=uie(e),t});});var GD=E((UFe,HD)=>{var lie=zn();function fie(t,e,r){let n=e.reduce((s,o)=>(s[o]=t[o],delete t[o],s),{}),i=Object.keys(t).reduce((s,o)=>(s[o]=t[o],delete t[o],s),{});return Object.assign(t,n,{[r]:i}),t}function die(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}HD.exports=lie((t,e={})=>{let r="metadata";e.key&&(r=e.key);let n=[];return !e.fillExcept&&!e.fillWith&&(n.push("level"),n.push("message")),e.fillExcept&&(n=e.fillExcept),n.length>0?fie(t,n,r):e.fillWith?die(t,e.fillWith,r):t});});var Rw=E((jFe,zD)=>{var rf=1e3,nf=rf*60,sf=nf*60,al=sf*24,pie=al*7,hie=al*365.25;zD.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return xie(t);if(r==="number"&&isFinite(t))return e.long?bie(t):mie(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function xie(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case "years":case "year":case "yrs":case "yr":case "y":return r*hie;case "weeks":case "week":case "w":return r*pie;case "days":case "day":case "d":return r*al;case "hours":case "hour":case "hrs":case "hr":case "h":return r*sf;case "minutes":case "minute":case "mins":case "min":case "m":return r*nf;case "seconds":case "second":case "secs":case "sec":case "s":return r*rf;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function mie(t){var e=Math.abs(t);return e>=al?Math.round(t/al)+"d":e>=sf?Math.round(t/sf)+"h":e>=nf?Math.round(t/nf)+"m":e>=rf?Math.round(t/rf)+"s":t+"ms"}function bie(t){var e=Math.abs(t);return e>=al?Zb(t,e,al,"day"):e>=sf?Zb(t,e,sf,"hour"):e>=nf?Zb(t,e,nf,"minute"):e>=rf?Zb(t,e,rf,"second"):t+" ms"}function Zb(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var WD=E((Ph,$D)=>{var gie=zn(),vie=Rw();$D.exports=gie(t=>{let e=+new Date;return Ph.diff=e-(Ph.prevTime||e),Ph.prevTime=e,t.ms=`+${vie(Ph.diff)}`,t});});var ZD=E((VFe,YD)=>{var Eie=se("util").inspect,yie=zn(),{LEVEL:_ie,MESSAGE:KD,SPLAT:Tie}=Gr();YD.exports=yie((t,e={})=>{let r=Object.assign({},t);return delete r[_ie],delete r[KD],delete r[Tie],t[KD]=Eie(r,false,e.depth||null,e.colorize),t});});var JD=E((HFe,Xb)=>{var{MESSAGE:wie}=Gr(),Jb=class{constructor(e){this.template=e;}transform(e){return e[wie]=this.template(e),e}};Xb.exports=t=>new Jb(t);Xb.exports.Printf=Xb.exports.Format=Jb;});var eR=E((GFe,QD)=>{var Nie=zn(),{MESSAGE:XD}=Gr(),Aie=Mh();QD.exports=Nie(t=>{let e=Aie(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[XD]=`${t.level}:${r} ${t.message} ${e}`:t[XD]=`${t.level}:${r} ${t.message}`,t});});var nR=E((zFe,rR)=>{var Sie=se("util"),{SPLAT:tR}=Gr(),Oie=/%[scdjifoO%]/g,Die=/%%/g,Cw=class{constructor(e){this.options=e;}_splat(e,r){let n=e.message,i=e[tR]||e.splat||[],s=n.match(Die),o=s&&s.length||0,c=r.length-o-i.length,u=c<0?i.splice(c,-1*c):[],f=u.length;if(f)for(let d=0;d<f;d++)Object.assign(e,u[d]);return e.message=Sie.format(n,...i),e}transform(e){let r=e.message,n=e[tR]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(Oie);if(!i&&(n||n.length)){let s=n.length>1?n.splice(0):n,o=s.length;if(o)for(let a=0;a<o;a++)Object.assign(e,s[a]);return e}return i?this._splat(e,i):e}};rR.exports=t=>new Cw(t);});var ER={};yt(ER,{assign:()=>uc,default:()=>Fie,defaultI18n:()=>Mw,format:()=>gR,parse:()=>vR,setGlobalDateI18n:()=>mR,setGlobalDateMasks:()=>bR});function pR(t,e){for(var r=[],n=0,i=t.length;n<i;n++)r.push(t[n].substr(0,e));return r}function uc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=0,i=e;n<i.length;n++){var s=i[n];for(var o in s)t[o]=s[o];}return t}function vR(t,e,r){if(r===void 0&&(r={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=e1[e]||e,t.length>1e3)return null;var n=new Date,i={year:n.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},s=[],o=[],a=e.replace(dR,function(L,k){return o.push(sR(k)),"@@@"}),c={},u={};a=sR(a).replace(fR,function(L){var k=kie[L],F=k[0],H=k[1],G=k[3];if(c[F])throw new Error("Invalid format. "+F+" specified twice in format");return c[F]=true,G&&(u[G]=true),s.push(k),"("+H+")"}),Object.keys(u).forEach(function(L){if(!c[L])throw new Error("Invalid format. "+L+" is required in specified format")}),a=a.replace(/@@@/g,function(){return o.shift()});var f=t.match(new RegExp(a,"i"));if(!f)return null;for(var d=uc(uc({},Qb),r),m=1;m<f.length;m++){var p=s[m-1],h=p[0],g=p[2],y=g?g(f[m],d):+f[m];if(y==null)return null;i[h]=y;}i.isPm===1&&i.hour!=null&&+i.hour!=12?i.hour=+i.hour+12:i.isPm===0&&+i.hour==12&&(i.hour=0);var _;if(i.timezoneOffset==null){_=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var D=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],m=0,I=D.length;m<I;m++)if(c[D[m][0]]&&i[D[m][0]]!==_[D[m][1]]())return null}else if(_=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return _}var fR,cc,ac,Rie,Cie,Ih,dR,iR,hR,xR,Mie,Pie,Mw,Qb,mR,sR,$n,Iie,oR,aR,cR,uR,lR,kie,e1,bR,gR,Bie,Fie,yR=ie(()=>{fR=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,cc="\\d\\d?",ac="\\d\\d",Rie="\\d{3}",Cie="\\d{4}",Ih="[^\\s]+",dR=/\[([^]*?)\]/gm;iR=function(t){return function(e,r){var n=r[t].map(function(s){return s.toLowerCase()}),i=n.indexOf(e.toLowerCase());return i>-1?i:null}};hR=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xR=["January","February","March","April","May","June","July","August","September","October","November","December"],Mie=pR(xR,3),Pie=pR(hR,3),Mw={dayNamesShort:Pie,dayNames:hR,monthNamesShort:Mie,monthNames:xR,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},Qb=uc({},Mw),mR=function(t){return Qb=uc(Qb,t)},sR=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},$n=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},Iie={D:function(t){return String(t.getDate())},DD:function(t){return $n(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return $n(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return $n(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return $n(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return $n(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return $n(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return $n(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return $n(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return $n(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return $n(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return $n(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+$n(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+$n(Math.floor(Math.abs(e)/60),2)+":"+$n(Math.abs(e)%60,2)}},oR=function(t){return +t-1},aR=[null,cc],cR=[null,Ih],uR=["isPm",Ih,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],lR=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var r=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?r:-r}return 0}],kie={D:["day",cc],DD:["day",ac],Do:["day",cc+Ih,function(t){return parseInt(t,10)}],M:["month",cc,oR],MM:["month",ac,oR],YY:["year",ac,function(t){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);return +(""+(+t>68?r-1:r)+t)}],h:["hour",cc,void 0,"isPm"],hh:["hour",ac,void 0,"isPm"],H:["hour",cc],HH:["hour",ac],m:["minute",cc],mm:["minute",ac],s:["second",cc],ss:["second",ac],YYYY:["year",Cie],S:["millisecond","\\d",function(t){return +t*100}],SS:["millisecond",ac,function(t){return +t*10}],SSS:["millisecond",Rie],d:aR,dd:aR,ddd:cR,dddd:cR,MMM:["month",Ih,iR("monthNamesShort")],MMMM:["month",Ih,iR("monthNames")],a:uR,A:uR,ZZ:lR,Z:lR},e1={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},bR=function(t){return uc(e1,t)},gR=function(t,e,r){if(e===void 0&&(e=e1.default),r===void 0&&(r={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=e1[e]||e;var n=[];e=e.replace(dR,function(s,o){return n.push(o),"@@@"});var i=uc(uc({},Qb),r);return e=e.replace(fR,function(s){return Iie[s](t,i)}),e.replace(/@@@/g,function(){return n.shift()})};Bie={format:gR,parse:vR,defaultI18n:Mw,setGlobalDateI18n:mR,setGlobalDateMasks:bR},Fie=Bie;});var TR=E(($Fe,_R)=>{var Lie=(yR(),fr(ER)),qie=zn();_R.exports=qie((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Lie.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t));});var NR=E((WFe,wR)=>{var Pw=pw(),Uie=zn(),{MESSAGE:Iw}=Gr();wR.exports=Uie((t,e)=>(e.level!==false&&(t.level=Pw.strip(t.level)),e.message!==false&&(t.message=Pw.strip(String(t.message))),e.raw!==false&&t[Iw]&&(t[Iw]=Pw.strip(String(t[Iw]))),t));});var Bw=E(kw=>{var jie=kw.format=zn();kw.levels=wD();function cn(t,e){Object.defineProperty(jie,t,{get(){return e()},configurable:true});}cn("align",function(){return AD()});cn("errors",function(){return DD()});cn("cli",function(){return CD()});cn("combine",function(){return PD()});cn("colorize",function(){return zb()});cn("json",function(){return Dw()});cn("label",function(){return UD()});cn("logstash",function(){return VD()});cn("metadata",function(){return GD()});cn("ms",function(){return WD()});cn("padLevels",function(){return _w()});cn("prettyPrint",function(){return ZD()});cn("printf",function(){return JD()});cn("simple",function(){return eR()});cn("splat",function(){return nR()});cn("timestamp",function(){return TR()});cn("uncolorize",function(){return NR()});});var Fw=E(t1=>{var{format:AR}=se("util");t1.warn={deprecated(t){return ()=>{throw new Error(AR("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return ()=>{throw new Error([AR("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
`))}},forFunctions(t,e,r){r.forEach(n=>{t[n]=t1.warn[e](n);});},forProperties(t,e,r){r.forEach(n=>{let i=t1.warn[e](n);Object.defineProperty(t,n,{get:i,set:i});});}};});var SR=E((ZFe,Vie)=>{Vie.exports={name:"winston",description:"A logger for just about everything.",version:"3.11.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.5.0"},devDependencies:{"@babel/cli":"^7.17.0","@babel/core":"^7.17.2","@babel/preset-env":"^7.16.7","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.3.1","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.9.0",hock:"^1.4.1",mocha:"8.1.3",nyc:"^15.1.0",rimraf:"^5.0.5",split2:"^4.1.0","std-mocks":"^1.0.1",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"};});var DR=E((JFe,OR)=>{OR.exports=se("util").deprecate;});var Lw=E((XFe,RR)=>{RR.exports=se("stream");});var Uw=E((QFe,MR)=>{function Hie(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,process.nextTick(qw,this,t)):process.nextTick(qw,this,t)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(r1,r):(r._writableState.errorEmitted=true,process.nextTick(CR,r,s)):process.nextTick(CR,r,s):e?(process.nextTick(r1,r),e(s)):process.nextTick(r1,r);}),this)}function CR(t,e){qw(t,e),r1(t);}function r1(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function Gie(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);}function qw(t,e){t.emit("error",e);}function zie(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e);}MR.exports={destroy:Hie,undestroy:Gie,errorOrDestroy:zie};});var lc=E((eLe,kR)=>{var IR={};function Bi(t,e,r){r||(r=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}class i extends r{constructor(o,a,c){super(n(o,a,c));}}i.prototype.name=r.name,i.prototype.code=t,IR[t]=i;}function PR(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return `of ${e} ${String(t)}`}function $ie(t,e,r){return t.substr(0,e.length)===e}function Wie(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Kie(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?false:t.indexOf(e,r)!==-1}Bi("ERR_INVALID_OPT_VALUE",function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Bi("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&$ie(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Wie(t," argument"))i=`The ${t} ${n} ${PR(e,"type")}`;else {let s=Kie(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${PR(e,"type")}`;}return i+=`. Received type ${typeof r}`,i},TypeError);Bi("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Bi("ERR_METHOD_NOT_IMPLEMENTED",function(t){return "The "+t+" method is not implemented"});Bi("ERR_STREAM_PREMATURE_CLOSE","Premature close");Bi("ERR_STREAM_DESTROYED",function(t){return "Cannot call "+t+" after a stream was destroyed"});Bi("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Bi("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Bi("ERR_STREAM_WRITE_AFTER_END","write after end");Bi("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Bi("ERR_UNKNOWN_ENCODING",function(t){return "Unknown encoding: "+t},TypeError);Bi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");kR.exports.codes=IR;});var jw=E((tLe,BR)=>{var Yie=lc().codes.ERR_INVALID_OPT_VALUE;function Zie(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Jie(t,e,r,n){var i=Zie(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Yie(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}BR.exports={getHighWaterMark:Jie};});var FR=E((rLe,Vw)=>{typeof Object.create=="function"?Vw.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}}));}:Vw.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e;}};});var cl=E((nLe,Gw)=>{try{if(Hw=se("util"),typeof Hw.inherits!="function")throw "";Gw.exports=Hw.inherits;}catch(t){Gw.exports=FR();}var Hw;});var HR=E((iLe,VR)=>{function LR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n);}return r}function qR(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LR(Object(r),true).forEach(function(n){Xie(t,n,r[n]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LR(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n));});}return t}function Xie(t,e,r){return e=jR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function Qie(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function UR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||false,n.configurable=true,"value"in n&&(n.writable=true),Object.defineProperty(t,jR(n.key),n);}}function ese(t,e,r){return e&&UR(t.prototype,e),Object.defineProperty(t,"prototype",{writable:false}),t}function jR(t){var e=tse(t,"string");return typeof e=="symbol"?e:String(e)}function tse(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return (String)(t)}var rse=se("buffer"),n1=rse.Buffer,nse=se("util"),zw=nse.inspect,ise=zw&&zw.custom||"inspect";function sse(t,e,r){n1.prototype.copy.call(t,e,r);}VR.exports=function(){function t(){Qie(this,t),this.head=null,this.tail=null,this.length=0;}return ese(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length;}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(r){if(this.length===0)return "";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return n1.alloc(0);for(var n=n1.allocUnsafe(r>>>0),i=this.head,s=0;i;)sse(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,s=n.data;for(r-=s.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++i;}return this.length-=i,s}},{key:"_getBuffer",value:function(r){var n=n1.allocUnsafe(r),i=this.head,s=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){a===o.length?(++s,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++s;}return this.length-=s,n}},{key:ise,value:function(r,n){return zw(this,qR(qR({},n),{},{depth:0,customInspect:false}))}}]),t}();});var $R=E(($w,zR)=>{var i1=se("buffer"),Ys=i1.Buffer;function GR(t,e){for(var r in t)e[r]=t[r];}Ys.from&&Ys.alloc&&Ys.allocUnsafe&&Ys.allocUnsafeSlow?zR.exports=i1:(GR(i1,$w),$w.Buffer=ul);function ul(t,e,r){return Ys(t,e,r)}ul.prototype=Object.create(Ys.prototype);GR(Ys,ul);ul.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ys(t,e,r)};ul.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Ys(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};ul.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ys(t)};ul.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return i1.SlowBuffer(t)};});var Yw=E(KR=>{var Kw=$R().Buffer,WR=Kw.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return true;default:return false}};function ose(t){if(!t)return "utf8";for(var e;;)switch(t){case "utf8":case "utf-8":return "utf8";case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return "utf16le";case "latin1":case "binary":return "latin1";case "base64":case "ascii":case "hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=true;}}function ase(t){var e=ose(t);if(typeof e!="string"&&(Kw.isEncoding===WR||!WR(t)))throw new Error("Unknown encoding: "+t);return e||t}KR.StringDecoder=kh;function kh(t){this.encoding=ase(t);var e;switch(this.encoding){case "utf16le":this.text=pse,this.end=hse,e=4;break;case "utf8":this.fillLast=lse,e=4;break;case "base64":this.text=xse,this.end=mse,e=3;break;default:this.write=bse,this.end=gse;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Kw.allocUnsafe(e);}kh.prototype.write=function(t){if(t.length===0)return "";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};kh.prototype.end=dse;kh.prototype.text=fse;kh.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};function Ww(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function cse(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Ww(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Ww(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Ww(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function use(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function lse(t){var e=this.lastTotal-this.lastNeed,r=use(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length;}function fse(t,e){var r=cse(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function dse(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function pse(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function hse(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function xse(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function mse(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function bse(t){return t.toString(this.encoding)}function gse(t){return t&&t.length?this.write(t):""}});var s1=E((oLe,JR)=>{var YR=lc().codes.ERR_STREAM_PREMATURE_CLOSE;function vse(t){var e=false;return function(){if(!e){e=true;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n);}}}function Ese(){}function yse(t){return t.setHeader&&typeof t.abort=="function"}function ZR(t,e,r){if(typeof e=="function")return ZR(t,null,e);e||(e={}),r=vse(r||Ese);var n=e.readable||e.readable!==false&&t.readable,i=e.writable||e.writable!==false&&t.writable,s=function(){t.writable||a();},o=t._writableState&&t._writableState.finished,a=function(){i=false,o=true,n||r.call(t);},c=t._readableState&&t._readableState.endEmitted,u=function(){n=false,c=true,i||r.call(t);},f=function(h){r.call(t,h);},d=function(){var h;if(n&&!c)return (!t._readableState||!t._readableState.ended)&&(h=new YR),r.call(t,h);if(i&&!o)return (!t._writableState||!t._writableState.ended)&&(h=new YR),r.call(t,h)},m=function(){t.req.on("finish",a);};return yse(t)?(t.on("complete",a),t.on("abort",d),t.req?m():t.on("request",m)):i&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==false&&t.on("error",f),t.on("