@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 LTe,{createHash,randomBytes,createHmac,pbkdf2Sync}from'crypto';import*as Om from'node:crypto';import Fo from'fs';import ph from'path';import FTe from'url';import V6e from'http';import H6e from'https';import M6e from'util';import fu from'zlib';import Ah,{Readable}from'stream';import {EventEmitter}from'events';import {AsyncLocalStorage,AsyncResource}from'node:async_hooks';import Vo from'node:process';import*as EZ from'node:readline';import EZ__default from'node:readline';import {stripVTControlCharacters}from'node:util';var gne=Object.create;var Cp=Object.defineProperty;var vne=Object.getOwnPropertyDescriptor;var Ene=Object.getOwnPropertyNames;var yne=Object.getPrototypeOf,_ne=Object.prototype.hasOwnProperty;var jO=t=>{throw TypeError(t)};var Tne=(t,e,r)=>e in t?Cp(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)Cp(t,r,{get:e[r],enumerable:true});},VO=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ene(e))!_ne.call(t,i)&&i!==r&&Cp(t,i,{get:()=>e[i],enumerable:!(n=vne(e,i))||n.enumerable});return t};var ze=(t,e,r)=>(r=t!=null?gne(yne(t)):{},VO(e||!t||!t.__esModule?Cp(r,"default",{value:t,enumerable:true}):r,t)),ur=t=>VO(Cp({},"__esModule",{value:true}),t);var be=(t,e,r)=>Tne(t,typeof e!="symbol"?e+"":e,r),fw=(t,e,r)=>e.has(t)||jO("Cannot "+r);var ne=(t,e,r)=>(fw(t,e,"read from private field"),r?r.call(t):e.get(t)),Te=(t,e,r)=>e.has(t)?jO("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),pe=(t,e,r,n)=>(fw(t,e,"write to private field"),e.set(t,r),r),it=(t,e,r)=>(fw(t,e,"access private method"),r);var zn=E((aFe,HO)=>{var dw=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);}};HO.exports=t=>{if(t.length>2)throw new dw(t);function e(n={}){this.options=n;}e.prototype.transform=t;function r(n){return new e(n)}return r.Format=e,r};});var WO=E((cFe,$O)=>{var zO={};$O.exports=zO;var GO={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(GO).forEach(function(t){var e=GO[t],r=zO[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m";});});var YO=E((uFe,KO)=>{KO.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 JO=E((lFe,ZO)=>{var wne=se("os"),ds=YO(),kn=process.env,tf=void 0;ds("no-color")||ds("no-colors")||ds("color=false")?tf=false:(ds("color")||ds("colors")||ds("color=true")||ds("color=always"))&&(tf=true);"FORCE_COLOR"in kn&&(tf=kn.FORCE_COLOR.length===0||parseInt(kn.FORCE_COLOR,10)!==0);function Nne(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function Ane(t){if(tf===false)return 0;if(ds("color=16m")||ds("color=full")||ds("color=truecolor"))return 3;if(ds("color=256"))return 2;if(t&&!t.isTTY&&tf!==true)return 0;var e=tf?1:0;if(process.platform==="win32"){var r=wne.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 hw(t){var e=Ane(t);return Nne(e)}ZO.exports={supportsColor:hw,stdout:hw(process.stdout),stderr:hw(process.stderr)};});var QO=E((fFe,XO)=>{XO.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 tD=E((dFe,eD)=>{eD.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 h=["up","mid","down"];for(var p in h)for(var g=h[p],y=0;y<=d[g];y++)u[g]&&(f=f+n[g][s(n[g].length)]);}return f}return a(e,r)};});var nD=E((hFe,rD)=>{rD.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 sD=E((pFe,iD)=>{iD.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}};});var aD=E((xFe,oD)=>{oD.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 uD=E((mFe,cD)=>{cD.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 xD=E((gFe,pD)=>{var Ke={};pD.exports=Ke;Ke.themes={};var Sne=se("util"),il=Ke.styles=WO(),fD=Object.defineProperties,One=new RegExp(/[\r\n]+/g);Ke.supportsColor=JO().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 Dne=/[|\\{}()[\]^$+*?.]/g,Rne=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Dne,"\\$&")};function dD(t){var e=function r(){return Mne.apply(r,arguments)};return e._styles=t,e.__proto__=Cne,e}var hD=function(){var t={};return il.grey=il.gray,Object.keys(il).forEach(function(e){il[e].closeRe=new RegExp(Rne(il[e].close),"g"),t[e]={get:function(){return dD(this._styles.concat(e))}};}),t}(),Cne=fD(function(){},hD);function Mne(){var t=Array.prototype.slice.call(arguments),e=t.map(function(o){return o!=null&&o.constructor===String?o:Sne.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(One,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 Pne(){var t={};return Object.keys(hD).forEach(function(e){t[e]={get:function(){return dD([e])}};}),t}var Ine=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};Ke.trap=QO();Ke.zalgo=tD();Ke.maps={};Ke.maps.america=nD()(Ke);Ke.maps.zebra=sD()(Ke);Ke.maps.rainbow=aD()(Ke);Ke.maps.random=uD()(Ke);for(lD in Ke.maps)(function(t){Ke[t]=function(e){return Ine(Ke.maps[t],e)};})(lD);var lD;fD(Ke,Pne());});var pw=E((vFe,mD)=>{var kne=xD();mD.exports=kne;});var bD=E(xw=>{xw.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};xw.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"};});var gD=E(mw=>{mw.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};mw.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"};});var vD=E(bw=>{bw.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};bw.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"};});var ED=E(Gb=>{Object.defineProperty(Gb,"cli",{value:bD()});Object.defineProperty(Gb,"npm",{value:gD()});Object.defineProperty(Gb,"syslog",{value:vD()});});var Vr=E(Mp=>{Object.defineProperty(Mp,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Mp,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Mp,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Mp,"configs",{value:ED()});});var Wb=E((NFe,$b)=>{var Ew=pw(),{LEVEL:gw,MESSAGE:vw}=Vr();Ew.enabled=true;var yD=/\s+/,zb=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]=yD.test(e[i])?e[i].split(yD):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 Ew[t.allColors[e]](n);for(let i=0,s=t.allColors[e].length;i<s;i++)n=Ew[t.allColors[e][i]](n);return n}transform(e,r){return r.all&&typeof e[vw]=="string"&&(e[vw]=this.colorize(e[gw],e.level,e[vw])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[gw],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[gw],e.level,e.message)),e}};$b.exports=t=>new zb(t);$b.exports.Colorizer=$b.exports.Format=zb;});var TD=E((AFe,_D)=>{var{Colorizer:Bne}=Wb();_D.exports=t=>(Bne.addColors(t.colors||t),t);});var ND=E((SFe,wD)=>{var Fne=zn();wD.exports=Fne(t=>(t.message=` ${t.message}`,t));});var OD=E((OFe,SD)=>{var Lne=zn(),{LEVEL:AD,MESSAGE:yw}=Vr();SD.exports=Lne((t,{stack:e,cause:r})=>{if(t instanceof Error){let i=Object.assign({},t,{level:t.level,[AD]:t[AD]||t.level,message:t.message,[yw]:t[yw]||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[yw]=n.message,e&&(t.stack=n.stack),r&&(t.cause=n.cause),t});});var Tw=E((DFe,Yb)=>{var{configs:qne,LEVEL:DD,MESSAGE:_w}=Vr(),Kb=class t{constructor(e={levels:qne.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[DD]]}${e.message}`,e[_w]&&(e[_w]=`${this.paddings[e[DD]]}${e[_w]}`),e}};Yb.exports=t=>new Kb(t);Yb.exports.Padder=Yb.exports.Format=Kb;});var RD=E((RFe,ww)=>{var{Colorizer:Une}=Wb(),{Padder:jne}=Tw(),{configs:Vne,MESSAGE:Hne}=Vr(),Zb=class{constructor(e={}){e.levels||(e.levels=Vne.cli.levels),this.colorizer=new Une(e),this.padder=new jne(e),this.options=e;}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[Hne]=`${e.level}:${e.message}`,e}};ww.exports=t=>new Zb(t);ww.exports.Format=Zb;});var MD=E((CFe,Nw)=>{var Gne=zn();function CD(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}Nw.exports=(...t)=>{let e=Gne(CD(t)),r=e();return r.Format=e.Format,r};Nw.exports.cascade=CD;});var Pp=E((Dw,BD)=>{var{hasOwnProperty:Jb}=Object.prototype,ol=Ow();ol.configure=Ow;ol.stringify=ol;ol.default=ol;Dw.stringify=ol;Dw.configure=Ow;BD.exports=ol;var $ne=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function oc(t){return t.length<5e3&&!$ne.test(t)?`"${t}"`:JSON.stringify(t)}function Aw(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 Wne=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Sw(t){return Wne.call(t)!==void 0&&t.length!==0}function PD(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 Kne(t){if(Jb.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 ID(t,e){let r;if(Jb.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 kD(t,e){let r;if(Jb.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 Yne(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Zne(t){if(Jb.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 Ow(t){t={...t};let e=Zne(t);e&&(t.bigint===void 0&&(t.bigint=false),"circularValue"in t||(t.circularValue=Error));let r=Kne(t),n=ID(t,"bigint"),i=ID(t,"deterministic"),s=kD(t,"maximumDepth"),o=kD(t,"maximumBreadth");function a(m,h,p,g,y,_){let D=h[m];switch(typeof D=="object"&&D!==null&&typeof D.toJSON=="function"&&(D=D.toJSON(m)),D=g.call(h,m,D),typeof D){case "string":return oc(D);case "object":{if(D===null)return "null";if(p.indexOf(D)!==-1)return r;let I="",L=",",k=_;if(Array.isArray(D)){if(D.length===0)return "[]";if(s<p.length+1)return '"[Array]"';p.push(D),y!==""&&(_+=y,I+=`
${_}`,L=`,
${_}`);let J=Math.min(D.length,o),ae=0;for(;ae<J-1;ae++){let x=a(String(ae),D,p,g,y,_);I+=x!==void 0?x:"null",I+=L;}let P=a(String(ae),D,p,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}`),p.pop(),`[${I}]`}let F=Object.keys(D),G=F.length;if(G===0)return "{}";if(s<p.length+1)return '"[Object]"';let H="",Y="";y!==""&&(_+=y,L=`,
${_}`,H=" ");let te=Math.min(G,o);i&&!Sw(D)&&(F=Aw(F)),p.push(D);for(let J=0;J<te;J++){let ae=F[J],P=a(ae,D,p,g,y,_);P!==void 0&&(I+=`${Y}${oc(ae)}:${H}${P}`,Y=L);}if(G>o){let J=G-o;I+=`${Y}"...":${H}"${sl(J)} not stringified"`,Y=L;}return y!==""&&Y.length>1&&(I=`
${_}${I}
${k}`),p.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,h,p,g,y,_){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case "string":return oc(h);case "object":{if(h===null)return "null";if(p.indexOf(h)!==-1)return r;let D=_,I="",L=",";if(Array.isArray(h)){if(h.length===0)return "[]";if(s<p.length+1)return '"[Array]"';p.push(h),y!==""&&(_+=y,I+=`
${_}`,L=`,
${_}`);let G=Math.min(h.length,o),H=0;for(;H<G-1;H++){let te=c(String(H),h[H],p,g,y,_);I+=te!==void 0?te:"null",I+=L;}let Y=c(String(H),h[H],p,g,y,_);if(I+=Y!==void 0?Y:"null",h.length-1>o){let te=h.length-o-1;I+=`${L}"... ${sl(te)} not stringified"`;}return y!==""&&(I+=`
${D}`),p.pop(),`[${I}]`}p.push(h);let k="";y!==""&&(_+=y,L=`,
${_}`,k=" ");let F="";for(let G of g){let H=c(G,h[G],p,g,y,_);H!==void 0&&(I+=`${F}${oc(G)}:${k}${H}`,F=L);}return y!==""&&F.length>1&&(I=`
${_}${I}
${D}`),p.pop(),`{${I}}`}case "number":return isFinite(h)?String(h):e?e(h):"null";case "boolean":return h===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(h);default:return e?e(h):void 0}}function u(m,h,p,g,y){switch(typeof h){case "string":return oc(h);case "object":{if(h===null)return "null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return u(m,h,p,g,y);if(h===null)return "null"}if(p.indexOf(h)!==-1)return r;let _=y;if(Array.isArray(h)){if(h.length===0)return "[]";if(s<p.length+1)return '"[Array]"';p.push(h),y+=g;let H=`
${y}`,Y=`,
${y}`,te=Math.min(h.length,o),J=0;for(;J<te-1;J++){let P=u(String(J),h[J],p,g,y);H+=P!==void 0?P:"null",H+=Y;}let ae=u(String(J),h[J],p,g,y);if(H+=ae!==void 0?ae:"null",h.length-1>o){let P=h.length-o-1;H+=`${Y}"... ${sl(P)} not stringified"`;}return H+=`
${_}`,p.pop(),`[${H}]`}let D=Object.keys(h),I=D.length;if(I===0)return "{}";if(s<p.length+1)return '"[Object]"';y+=g;let L=`,
${y}`,k="",F="",G=Math.min(I,o);Sw(h)&&(k+=PD(h,L,o),D=D.slice(h.length),G-=h.length,F=L),i&&(D=Aw(D)),p.push(h);for(let H=0;H<G;H++){let Y=D[H],te=u(Y,h[Y],p,g,y);te!==void 0&&(k+=`${F}${oc(Y)}: ${te}`,F=L);}if(I>o){let H=I-o;k+=`${F}"...": "${sl(H)} not stringified"`,F=L;}return F!==""&&(k=`
${y}${k}
${_}`),p.pop(),`{${k}}`}case "number":return isFinite(h)?String(h):e?e(h):"null";case "boolean":return h===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(h);default:return e?e(h):void 0}}function f(m,h,p){switch(typeof h){case "string":return oc(h);case "object":{if(h===null)return "null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return f(m,h,p);if(h===null)return "null"}if(p.indexOf(h)!==-1)return r;let g="";if(Array.isArray(h)){if(h.length===0)return "[]";if(s<p.length+1)return '"[Array]"';p.push(h);let L=Math.min(h.length,o),k=0;for(;k<L-1;k++){let G=f(String(k),h[k],p);g+=G!==void 0?G:"null",g+=",";}let F=f(String(k),h[k],p);if(g+=F!==void 0?F:"null",h.length-1>o){let G=h.length-o-1;g+=`,"... ${sl(G)} not stringified"`;}return p.pop(),`[${g}]`}let y=Object.keys(h),_=y.length;if(_===0)return "{}";if(s<p.length+1)return '"[Object]"';let D="",I=Math.min(_,o);Sw(h)&&(g+=PD(h,",",o),y=y.slice(h.length),I-=h.length,D=","),i&&(y=Aw(y)),p.push(h);for(let L=0;L<I;L++){let k=y[L],F=f(k,h[k],p);F!==void 0&&(g+=`${D}${oc(k)}:${F}`,D=",");}if(_>o){let L=_-o;g+=`${D}"...":"${sl(L)} not stringified"`;}return p.pop(),`{${g}}`}case "number":return isFinite(h)?String(h):e?e(h):"null";case "boolean":return h===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(h);default:return e?e(h):void 0}}function d(m,h,p){if(arguments.length>1){let g="";if(typeof p=="number"?g=" ".repeat(Math.min(p,10)):typeof p=="string"&&(g=p.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":m},[],h,g,"");if(Array.isArray(h))return c("",m,[],Yne(h),g,"")}if(g.length!==0)return u("",m,[],g,"")}return f("",m,[])}return d}});var Rw=E((MFe,FD)=>{var Jne=zn(),{MESSAGE:Xne}=Vr(),Qne=Pp();function eie(t,e){return typeof e=="bigint"?e.toString():e}FD.exports=Jne((t,e)=>{let r=Qne.configure(e);return t[Xne]=r(t,e.replacer||eie,e.space),t});});var qD=E((PFe,LD)=>{var tie=zn();LD.exports=tie((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t));});var jD=E((IFe,UD)=>{var rie=zn(),{MESSAGE:nie}=Vr(),iie=Pp();UD.exports=rie(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[nie]=iie(e),t});});var HD=E((kFe,VD)=>{var sie=zn();function oie(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 aie(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}VD.exports=sie((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?oie(t,n,r):e.fillWith?aie(t,e.fillWith,r):t});});var Cw=E((BFe,GD)=>{var rf=1e3,nf=rf*60,sf=nf*60,al=sf*24,cie=al*7,uie=al*365.25;GD.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return lie(t);if(r==="number"&&isFinite(t))return e.long?die(t):fie(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function lie(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*uie;case "weeks":case "week":case "w":return r*cie;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 fie(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 die(t){var e=Math.abs(t);return e>=al?Xb(t,e,al,"day"):e>=sf?Xb(t,e,sf,"hour"):e>=nf?Xb(t,e,nf,"minute"):e>=rf?Xb(t,e,rf,"second"):t+" ms"}function Xb(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var $D=E((Ip,zD)=>{var hie=zn(),pie=Cw();zD.exports=hie(t=>{let e=+new Date;return Ip.diff=e-(Ip.prevTime||e),Ip.prevTime=e,t.ms=`+${pie(Ip.diff)}`,t});});var YD=E((FFe,KD)=>{var xie=se("util").inspect,mie=zn(),{LEVEL:bie,MESSAGE:WD,SPLAT:gie}=Vr();KD.exports=mie((t,e={})=>{let r=Object.assign({},t);return delete r[bie],delete r[WD],delete r[gie],t[WD]=xie(r,false,e.depth||null,e.colorize),t});});var ZD=E((LFe,e1)=>{var{MESSAGE:vie}=Vr(),Qb=class{constructor(e){this.template=e;}transform(e){return e[vie]=this.template(e),e}};e1.exports=t=>new Qb(t);e1.exports.Printf=e1.exports.Format=Qb;});var QD=E((qFe,XD)=>{var Eie=zn(),{MESSAGE:JD}=Vr(),yie=Pp();XD.exports=Eie(t=>{let e=yie(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[JD]=`${t.level}:${r} ${t.message} ${e}`:t[JD]=`${t.level}:${r} ${t.message}`,t});});var rR=E((UFe,tR)=>{var _ie=se("util"),{SPLAT:eR}=Vr(),Tie=/%[scdjifoO%]/g,wie=/%%/g,Mw=class{constructor(e){this.options=e;}_splat(e,r){let n=e.message,i=e[eR]||e.splat||[],s=n.match(wie),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=_ie.format(n,...i),e}transform(e){let r=e.message,n=e[eR]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(Tie);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}};tR.exports=t=>new Mw(t);});var vR={};yt(vR,{assign:()=>uc,default:()=>Mie,defaultI18n:()=>Pw,format:()=>bR,parse:()=>gR,setGlobalDateI18n:()=>xR,setGlobalDateMasks:()=>mR});function dR(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 gR(t,e,r){if(r===void 0&&(r={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=r1[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(fR,function(L,k){return o.push(iR(k)),"@@@"}),c={},u={};a=iR(a).replace(lR,function(L){var k=Rie[L],F=k[0],G=k[1],H=k[3];if(c[F])throw new Error("Invalid format. "+F+" specified twice in format");return c[F]=true,H&&(u[H]=true),s.push(k),"("+G+")"}),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({},t1),r),m=1;m<f.length;m++){var h=s[m-1],p=h[0],g=h[2],y=g?g(f[m],d):+f[m];if(y==null)return null;i[p]=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 lR,cc,ac,Nie,Aie,kp,fR,nR,hR,pR,Sie,Oie,Pw,t1,xR,iR,$n,Die,sR,oR,aR,cR,uR,Rie,r1,mR,bR,Cie,Mie,ER=ie(()=>{lR=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,cc="\\d\\d?",ac="\\d\\d",Nie="\\d{3}",Aie="\\d{4}",kp="[^\\s]+",fR=/\[([^]*?)\]/gm;nR=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"],pR=["January","February","March","April","May","June","July","August","September","October","November","December"],Sie=dR(pR,3),Oie=dR(hR,3),Pw={dayNamesShort:Oie,dayNames:hR,monthNamesShort:Sie,monthNames:pR,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},t1=uc({},Pw),xR=function(t){return t1=uc(t1,t)},iR=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},Die={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)}},sR=function(t){return +t-1},oR=[null,cc],aR=[null,kp],cR=["isPm",kp,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],uR=["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}],Rie={D:["day",cc],DD:["day",ac],Do:["day",cc+kp,function(t){return parseInt(t,10)}],M:["month",cc,sR],MM:["month",ac,sR],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",Aie],S:["millisecond","\\d",function(t){return +t*100}],SS:["millisecond",ac,function(t){return +t*10}],SSS:["millisecond",Nie],d:oR,dd:oR,ddd:aR,dddd:aR,MMM:["month",kp,nR("monthNamesShort")],MMMM:["month",kp,nR("monthNames")],a:cR,A:cR,ZZ:uR,Z:uR},r1={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"},mR=function(t){return uc(r1,t)},bR=function(t,e,r){if(e===void 0&&(e=r1.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=r1[e]||e;var n=[];e=e.replace(fR,function(s,o){return n.push(o),"@@@"});var i=uc(uc({},t1),r);return e=e.replace(lR,function(s){return Die[s](t,i)}),e.replace(/@@@/g,function(){return n.shift()})};Cie={format:bR,parse:gR,defaultI18n:Pw,setGlobalDateI18n:xR,setGlobalDateMasks:mR},Mie=Cie;});var _R=E((jFe,yR)=>{var Pie=(ER(),ur(vR)),Iie=zn();yR.exports=Iie((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Pie.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t));});var wR=E((VFe,TR)=>{var Iw=pw(),kie=zn(),{MESSAGE:kw}=Vr();TR.exports=kie((t,e)=>(e.level!==false&&(t.level=Iw.strip(t.level)),e.message!==false&&(t.message=Iw.strip(String(t.message))),e.raw!==false&&t[kw]&&(t[kw]=Iw.strip(String(t[kw]))),t));});var Fw=E(Bw=>{var Bie=Bw.format=zn();Bw.levels=TD();function cn(t,e){Object.defineProperty(Bie,t,{get(){return e()},configurable:true});}cn("align",function(){return ND()});cn("errors",function(){return OD()});cn("cli",function(){return RD()});cn("combine",function(){return MD()});cn("colorize",function(){return Wb()});cn("json",function(){return Rw()});cn("label",function(){return qD()});cn("logstash",function(){return jD()});cn("metadata",function(){return HD()});cn("ms",function(){return $D()});cn("padLevels",function(){return Tw()});cn("prettyPrint",function(){return YD()});cn("printf",function(){return ZD()});cn("simple",function(){return QD()});cn("splat",function(){return rR()});cn("timestamp",function(){return _R()});cn("uncolorize",function(){return wR()});});var Lw=E(n1=>{var{format:NR}=se("util");n1.warn={deprecated(t){return ()=>{throw new Error(NR("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return ()=>{throw new Error([NR("{ %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]=n1.warn[e](n);});},forProperties(t,e,r){r.forEach(n=>{let i=n1.warn[e](n);Object.defineProperty(t,n,{get:i,set:i});});}};});var AR=E((zFe,Fie)=>{Fie.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 OR=E(($Fe,SR)=>{SR.exports=se("util").deprecate;});var qw=E((WFe,DR)=>{DR.exports=se("stream");});var jw=E((KFe,CR)=>{function Lie(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(Uw,this,t)):process.nextTick(Uw,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(i1,r):(r._writableState.errorEmitted=true,process.nextTick(RR,r,s)):process.nextTick(RR,r,s):e?(process.nextTick(i1,r),e(s)):process.nextTick(i1,r);}),this)}function RR(t,e){Uw(t,e),i1(t);}function i1(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function qie(){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 Uw(t,e){t.emit("error",e);}function Uie(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e);}CR.exports={destroy:Lie,undestroy:qie,errorOrDestroy:Uie};});var lc=E((YFe,IR)=>{var PR={};function ki(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,PR[t]=i;}function MR(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 jie(t,e,r){return t.substr(0,e.length)===e}function Vie(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Hie(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?false:t.indexOf(e,r)!==-1}ki("ERR_INVALID_OPT_VALUE",function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);ki("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&jie(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Vie(t," argument"))i=`The ${t} ${n} ${MR(e,"type")}`;else {let s=Hie(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${MR(e,"type")}`;}return i+=`. Received type ${typeof r}`,i},TypeError);ki("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ki("ERR_METHOD_NOT_IMPLEMENTED",function(t){return "The "+t+" method is not implemented"});ki("ERR_STREAM_PREMATURE_CLOSE","Premature close");ki("ERR_STREAM_DESTROYED",function(t){return "Cannot call "+t+" after a stream was destroyed"});ki("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ki("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ki("ERR_STREAM_WRITE_AFTER_END","write after end");ki("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ki("ERR_UNKNOWN_ENCODING",function(t){return "Unknown encoding: "+t},TypeError);ki("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");IR.exports.codes=PR;});var Vw=E((ZFe,kR)=>{var Gie=lc().codes.ERR_INVALID_OPT_VALUE;function zie(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function $ie(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 Gie(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}kR.exports={getHighWaterMark:$ie};});var BR=E((JFe,Hw)=>{typeof Object.create=="function"?Hw.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}}));}:Hw.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((XFe,zw)=>{try{if(Gw=se("util"),typeof Gw.inherits!="function")throw "";zw.exports=Gw.inherits;}catch(t){zw.exports=BR();}var Gw;});var VR=E((QFe,jR)=>{function FR(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 LR(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?FR(Object(r),true).forEach(function(n){Wie(t,n,r[n]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):FR(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n));});}return t}function Wie(t,e,r){return e=UR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function Kie(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qR(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,UR(n.key),n);}}function Yie(t,e,r){return e&&qR(t.prototype,e),Object.defineProperty(t,"prototype",{writable:false}),t}function UR(t){var e=Zie(t,"string");return typeof e=="symbol"?e:String(e)}function Zie(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 Jie=se("buffer"),s1=Jie.Buffer,Xie=se("util"),$w=Xie.inspect,Qie=$w&&$w.custom||"inspect";function ese(t,e,r){s1.prototype.copy.call(t,e,r);}jR.exports=function(){function t(){Kie(this,t),this.head=null,this.tail=null,this.length=0;}return Yie(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 s1.alloc(0);for(var n=s1.allocUnsafe(r>>>0),i=this.head,s=0;i;)ese(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=s1.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:Qie,value:function(r,n){return $w(this,LR(LR({},n),{},{depth:0,customInspect:false}))}}]),t}();});var zR=E((Ww,GR)=>{var o1=se("buffer"),Ys=o1.Buffer;function HR(t,e){for(var r in t)e[r]=t[r];}Ys.from&&Ys.alloc&&Ys.allocUnsafe&&Ys.allocUnsafeSlow?GR.exports=o1:(HR(o1,Ww),Ww.Buffer=ul);function ul(t,e,r){return Ys(t,e,r)}ul.prototype=Object.create(Ys.prototype);HR(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 o1.SlowBuffer(t)};});var Zw=E(WR=>{var Yw=zR().Buffer,$R=Yw.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 tse(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 rse(t){var e=tse(t);if(typeof e!="string"&&(Yw.isEncoding===$R||!$R(t)))throw new Error("Unknown encoding: "+t);return e||t}WR.StringDecoder=Bp;function Bp(t){this.encoding=rse(t);var e;switch(this.encoding){case "utf16le":this.text=cse,this.end=use,e=4;break;case "utf8":this.fillLast=sse,e=4;break;case "base64":this.text=lse,this.end=fse,e=3;break;default:this.write=dse,this.end=hse;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Yw.allocUnsafe(e);}Bp.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||""};Bp.prototype.end=ase;Bp.prototype.text=ose;Bp.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 Kw(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function nse(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Kw(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Kw(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Kw(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function ise(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 sse(t){var e=this.lastTotal-this.lastNeed,r=ise(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 ose(t,e){var r=nse(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 ase(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function cse(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 use(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 lse(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 fse(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function dse(t){return t.toString(this.encoding)}function hse(t){return t&&t.length?this.write(t):""}});var a1=E((tLe,ZR)=>{var KR=lc().codes.ERR_STREAM_PREMATURE_CLOSE;function pse(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 xse(){}function mse(t){return t.setHeader&&typeof t.abort=="function"}function YR(t,e,r){if(typeof e=="function")return YR(t,null,e);e||(e={}),r=pse(r||xse);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(p){r.call(t,p);},d=function(){var p;if(n&&!c)return (!t._readableState||!t._readableState.ended)&&(p=new KR),r.call(t,p);if(i&&!o)return (!t._writableState||!t._writableState.ended)&&(p=new KR),r.call(t,p)},m=function(){t.req.on("finish",a);};return mse(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("