UNPKG

@layerzerolabs/hyperliquid-composer

Version:

LayerZero Labs reference EVM OmniChain Fungible Token (OFT) implementation for Hyperliquid

25 lines 2.03 MB
'use strict';var commander=require('commander'),Xi=require('fs'),Kv=require('path'),Pm=require('crypto'),s6e=require('url'),lwe=require('http'),fwe=require('https'),ewe=require('util'),fu=require('zlib'),Sp=require('stream'),events=require('events'),async_hooks=require('async_hooks'),Ho=require('process'),MZ=require('readline');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Xi__default=/*#__PURE__*/_interopDefault(Xi);var Kv__default=/*#__PURE__*/_interopDefault(Kv);var Pm__namespace=/*#__PURE__*/_interopNamespace(Pm);var s6e__default=/*#__PURE__*/_interopDefault(s6e);var lwe__default=/*#__PURE__*/_interopDefault(lwe);var fwe__default=/*#__PURE__*/_interopDefault(fwe);var ewe__default=/*#__PURE__*/_interopDefault(ewe);var fu__default=/*#__PURE__*/_interopDefault(fu);var Sp__default=/*#__PURE__*/_interopDefault(Sp);var Ho__default=/*#__PURE__*/_interopDefault(Ho);var MZ__namespace=/*#__PURE__*/_interopNamespace(MZ);var Lne=Object.create;var Ph=Object.defineProperty;var qne=Object.getOwnPropertyDescriptor;var Une=Object.getOwnPropertyNames;var jne=Object.getPrototypeOf,Vne=Object.prototype.hasOwnProperty;var eD=t=>{throw TypeError(t)};var Hne=(t,e,r)=>e in t?Ph(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 v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_t=(t,e)=>{for(var r in e)Ph(t,r,{get:e[r],enumerable:true});},tD=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Une(e))!Vne.call(t,i)&&i!==r&&Ph(t,i,{get:()=>e[i],enumerable:!(n=qne(e,i))||n.enumerable});return t};var We=(t,e,r)=>(r=t!=null?Lne(jne(t)):{},tD(e||!t||!t.__esModule?Ph(r,"default",{value:t,enumerable:true}):r,t)),pr=t=>tD(Ph({},"__esModule",{value:true}),t);var fe=(t,e,r)=>Hne(t,typeof e!="symbol"?e+"":e,r),hw=(t,e,r)=>e.has(t)||eD("Cannot "+r);var ne=(t,e,r)=>(hw(t,e,"read from private field"),r?r.call(t):e.get(t)),Te=(t,e,r)=>e.has(t)?eD("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),xe=(t,e,r,n)=>(hw(t,e,"write to private field"),e.set(t,r),r),ot=(t,e,r)=>(hw(t,e,"access private method"),r);var $n=v((IBe,rD)=>{var xw=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);}};rD.exports=t=>{if(t.length>2)throw new xw(t);function e(n={}){this.options=n;}e.prototype.transform=t;function r(n){return new e(n)}return r.Format=e,r};});var oD=v((kBe,sD)=>{var iD={};sD.exports=iD;var nD={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(nD).forEach(function(t){var e=nD[t],r=iD[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m";});});var cD=v((FBe,aD)=>{aD.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 lD=v((BBe,uD)=>{var Gne=se("os"),ms=cD(),Ln=process.env,ef=void 0;ms("no-color")||ms("no-colors")||ms("color=false")?ef=false:(ms("color")||ms("colors")||ms("color=true")||ms("color=always"))&&(ef=true);"FORCE_COLOR"in Ln&&(ef=Ln.FORCE_COLOR.length===0||parseInt(Ln.FORCE_COLOR,10)!==0);function zne(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function $ne(t){if(ef===false)return 0;if(ms("color=16m")||ms("color=full")||ms("color=truecolor"))return 3;if(ms("color=256"))return 2;if(t&&!t.isTTY&&ef!==true)return 0;var e=ef?1:0;if(process.platform==="win32"){var r=Gne.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 Ln)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in Ln})||Ln.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Ln)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ln.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Ln){var n=parseInt((Ln.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ln.TERM_PROGRAM){case "iTerm.app":return n>=3?3:2;case "Hyper":return 3;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(Ln.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Ln.TERM)||"COLORTERM"in Ln?1:(Ln.TERM==="dumb",e)}function mw(t){var e=$ne(t);return zne(e)}uD.exports={supportsColor:mw,stdout:mw(process.stdout),stderr:mw(process.stderr)};});var dD=v((LBe,fD)=>{fD.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 hD=v((qBe,pD)=>{pD.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,x;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(x in c)if(!o(x)){switch(f=f+c[x],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 mD=v((UBe,xD)=>{xD.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 gD=v((jBe,bD)=>{bD.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}};});var vD=v((VBe,ED)=>{ED.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 _D=v((HBe,yD)=>{yD.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 OD=v((zBe,SD)=>{var Ze={};SD.exports=Ze;Ze.themes={};var Wne=se("util"),il=Ze.styles=oD(),wD=Object.defineProperties,Kne=new RegExp(/[\r\n]+/g);Ze.supportsColor=lD().supportsColor;typeof Ze.enabled=="undefined"&&(Ze.enabled=Ze.supportsColor()!==false);Ze.enable=function(){Ze.enabled=true;};Ze.disable=function(){Ze.enabled=false;};Ze.stripColors=Ze.strip=function(t){return (""+t).replace(/\x1B\[\d+m/g,"")};Ze.stylize=function(e,r){if(!Ze.enabled)return e+"";var n=il[r];return !n&&r in Ze?Ze[r](e):n.open+e+n.close};var Yne=/[|\\{}()[\]^$+*?.]/g,Zne=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Yne,"\\$&")};function ND(t){var e=function r(){return Xne.apply(r,arguments)};return e._styles=t,e.__proto__=Jne,e}var AD=function(){var t={};return il.grey=il.gray,Object.keys(il).forEach(function(e){il[e].closeRe=new RegExp(Zne(il[e].close),"g"),t[e]={get:function(){return ND(this._styles.concat(e))}};}),t}(),Jne=wD(function(){},AD);function Xne(){var t=Array.prototype.slice.call(arguments),e=t.map(function(o){return o!=null&&o.constructor===String?o:Wne.inspect(o)}).join(" ");if(!Ze.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(Kne,function(o){return s.close+o+s.open}));}return e}Ze.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){Ze[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var s in t[r])i=Ze[t[r][s]](i);return i}return Ze[t[r]](n)};})(e);};function Qne(){var t={};return Object.keys(AD).forEach(function(e){t[e]={get:function(){return ND([e])}};}),t}var eie=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};Ze.trap=dD();Ze.zalgo=hD();Ze.maps={};Ze.maps.america=mD()(Ze);Ze.maps.zebra=gD()(Ze);Ze.maps.rainbow=vD()(Ze);Ze.maps.random=_D()(Ze);for(TD in Ze.maps)(function(t){Ze[t]=function(e){return eie(Ze.maps[t],e)};})(TD);var TD;wD(Ze,Qne());});var bw=v(($Be,DD)=>{var tie=OD();DD.exports=tie;});var RD=v(gw=>{gw.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};gw.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"};});var CD=v(Ew=>{Ew.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Ew.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"};});var PD=v(vw=>{vw.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};vw.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"};});var MD=v(Wb=>{Object.defineProperty(Wb,"cli",{value:RD()});Object.defineProperty(Wb,"npm",{value:CD()});Object.defineProperty(Wb,"syslog",{value:PD()});});var zr=v(Mh=>{Object.defineProperty(Mh,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Mh,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Mh,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Mh,"configs",{value:MD()});});var Zb=v((XBe,Yb)=>{var Tw=bw(),{LEVEL:yw,MESSAGE:_w}=zr();Tw.enabled=true;var ID=/\s+/,Kb=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]=ID.test(e[i])?e[i].split(ID):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 Tw[t.allColors[e]](n);for(let i=0,s=t.allColors[e].length;i<s;i++)n=Tw[t.allColors[e][i]](n);return n}transform(e,r){return r.all&&typeof e[_w]=="string"&&(e[_w]=this.colorize(e[yw],e.level,e[_w])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[yw],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[yw],e.level,e.message)),e}};Yb.exports=t=>new Kb(t);Yb.exports.Colorizer=Yb.exports.Format=Kb;});var FD=v((QBe,kD)=>{var{Colorizer:rie}=Zb();kD.exports=t=>(rie.addColors(t.colors||t),t);});var LD=v((eLe,BD)=>{var nie=$n();BD.exports=nie(t=>(t.message=` ${t.message}`,t));});var jD=v((tLe,UD)=>{var iie=$n(),{LEVEL:qD,MESSAGE:ww}=zr();UD.exports=iie((t,{stack:e,cause:r})=>{if(t instanceof Error){let i=Object.assign({},t,{level:t.level,[qD]:t[qD]||t.level,message:t.message,[ww]:t[ww]||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[ww]=n.message,e&&(t.stack=n.stack),r&&(t.cause=n.cause),t});});var Aw=v((rLe,Xb)=>{var{configs:sie,LEVEL:VD,MESSAGE:Nw}=zr(),Jb=class t{constructor(e={levels:sie.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[VD]]}${e.message}`,e[Nw]&&(e[Nw]=`${this.paddings[e[VD]]}${e[Nw]}`),e}};Xb.exports=t=>new Jb(t);Xb.exports.Padder=Xb.exports.Format=Jb;});var HD=v((nLe,Sw)=>{var{Colorizer:oie}=Zb(),{Padder:aie}=Aw(),{configs:cie,MESSAGE:uie}=zr(),Qb=class{constructor(e={}){e.levels||(e.levels=cie.cli.levels),this.colorizer=new oie(e),this.padder=new aie(e),this.options=e;}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[uie]=`${e.level}:${e.message}`,e}};Sw.exports=t=>new Qb(t);Sw.exports.Format=Qb;});var zD=v((iLe,Ow)=>{var lie=$n();function GD(t){if(t.every(fie))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 fie(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}Ow.exports=(...t)=>{let e=lie(GD(t)),r=e();return r.Format=e.Format,r};Ow.exports.cascade=GD;});var Ih=v((Pw,YD)=>{var{hasOwnProperty:eg}=Object.prototype,ol=Cw();ol.configure=Cw;ol.stringify=ol;ol.default=ol;Pw.stringify=ol;Pw.configure=Cw;YD.exports=ol;var die=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function ac(t){return t.length<5e3&&!die.test(t)?`"${t}"`:JSON.stringify(t)}function Dw(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 pie=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Rw(t){return pie.call(t)!==void 0&&t.length!==0}function $D(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 hie(t){if(eg.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 WD(t,e){let r;if(eg.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(eg.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 xie(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function mie(t){if(eg.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 Cw(t){t={...t};let e=mie(t);e&&(t.bigint===void 0&&(t.bigint=false),"circularValue"in t||(t.circularValue=Error));let r=hie(t),n=WD(t,"bigint"),i=WD(t,"deterministic"),s=KD(t,"maximumDepth"),o=KD(t,"maximumBreadth");function a(x,p,h,g,y,_){let D=p[x];switch(typeof D=="object"&&D!==null&&typeof D.toJSON=="function"&&(D=D.toJSON(x)),D=g.call(p,x,D),typeof D){case "string":return ac(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 m=a(String(ue),D,h,g,y,_);I+=m!==void 0?m:"null",I+=L;}let M=a(String(ue),D,h,g,y,_);if(I+=M!==void 0?M:"null",D.length-1>o){let m=D.length-o-1;I+=`${L}"... ${sl(m)} 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&&!Rw(D)&&(F=Dw(F)),h.push(D);for(let X=0;X<re;X++){let ue=F[X],M=a(ue,D,h,g,y,_);M!==void 0&&(I+=`${Y}${ac(ue)}:${G}${M}`,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(x,p,h,g,y,_){switch(typeof p=="object"&&p!==null&&typeof p.toJSON=="function"&&(p=p.toJSON(x)),typeof p){case "string":return ac(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}${ac(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(x,p,h,g,y){switch(typeof p){case "string":return ac(p);case "object":{if(p===null)return "null";if(typeof p.toJSON=="function"){if(p=p.toJSON(x),typeof p!="object")return u(x,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 M=u(String(X),p[X],h,g,y);G+=M!==void 0?M:"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 M=p.length-o-1;G+=`${Y}"... ${sl(M)} 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);Rw(p)&&(k+=$D(p,L,o),D=D.slice(p.length),H-=p.length,F=L),i&&(D=Dw(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}${ac(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(x,p,h){switch(typeof p){case "string":return ac(p);case "object":{if(p===null)return "null";if(typeof p.toJSON=="function"){if(p=p.toJSON(x),typeof p!="object")return f(x,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);Rw(p)&&(g+=$D(p,",",o),y=y.slice(p.length),I-=p.length,D=","),i&&(y=Dw(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}${ac(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(x,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("",{"":x},[],p,g,"");if(Array.isArray(p))return c("",x,[],xie(p),g,"")}if(g.length!==0)return u("",x,[],g,"")}return f("",x,[])}return d}});var Mw=v((sLe,ZD)=>{var bie=$n(),{MESSAGE:gie}=zr(),Eie=Ih();function vie(t,e){return typeof e=="bigint"?e.toString():e}ZD.exports=bie((t,e)=>{let r=Eie.configure(e);return t[gie]=r(t,e.replacer||vie,e.space),t});});var XD=v((oLe,JD)=>{var yie=$n();JD.exports=yie((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t));});var eR=v((aLe,QD)=>{var _ie=$n(),{MESSAGE:Tie}=zr(),wie=Ih();QD.exports=_ie(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[Tie]=wie(e),t});});var rR=v((cLe,tR)=>{var Nie=$n();function Aie(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 Sie(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}tR.exports=Nie((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?Aie(t,n,r):e.fillWith?Sie(t,e.fillWith,r):t});});var Iw=v((uLe,nR)=>{var tf=1e3,rf=tf*60,nf=rf*60,al=nf*24,Oie=al*7,Die=al*365.25;nR.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Rie(t);if(r==="number"&&isFinite(t))return e.long?Pie(t):Cie(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Rie(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*Die;case "weeks":case "week":case "w":return r*Oie;case "days":case "day":case "d":return r*al;case "hours":case "hour":case "hrs":case "hr":case "h":return r*nf;case "minutes":case "minute":case "mins":case "min":case "m":return r*rf;case "seconds":case "second":case "secs":case "sec":case "s":return r*tf;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function Cie(t){var e=Math.abs(t);return e>=al?Math.round(t/al)+"d":e>=nf?Math.round(t/nf)+"h":e>=rf?Math.round(t/rf)+"m":e>=tf?Math.round(t/tf)+"s":t+"ms"}function Pie(t){var e=Math.abs(t);return e>=al?tg(t,e,al,"day"):e>=nf?tg(t,e,nf,"hour"):e>=rf?tg(t,e,rf,"minute"):e>=tf?tg(t,e,tf,"second"):t+" ms"}function tg(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var sR=v((kh,iR)=>{var Mie=$n(),Iie=Iw();iR.exports=Mie(t=>{let e=+new Date;return kh.diff=e-(kh.prevTime||e),kh.prevTime=e,t.ms=`+${Iie(kh.diff)}`,t});});var cR=v((lLe,aR)=>{var kie=se("util").inspect,Fie=$n(),{LEVEL:Bie,MESSAGE:oR,SPLAT:Lie}=zr();aR.exports=Fie((t,e={})=>{let r=Object.assign({},t);return delete r[Bie],delete r[oR],delete r[Lie],t[oR]=kie(r,false,e.depth||null,e.colorize),t});});var uR=v((fLe,ng)=>{var{MESSAGE:qie}=zr(),rg=class{constructor(e){this.template=e;}transform(e){return e[qie]=this.template(e),e}};ng.exports=t=>new rg(t);ng.exports.Printf=ng.exports.Format=rg;});var dR=v((dLe,fR)=>{var Uie=$n(),{MESSAGE:lR}=zr(),jie=Ih();fR.exports=Uie(t=>{let e=jie(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[lR]=`${t.level}:${r} ${t.message} ${e}`:t[lR]=`${t.level}:${r} ${t.message}`,t});});var xR=v((pLe,hR)=>{var Vie=se("util"),{SPLAT:pR}=zr(),Hie=/%[scdjifoO%]/g,Gie=/%%/g,kw=class{constructor(e){this.options=e;}_splat(e,r){let n=e.message,i=e[pR]||e.splat||[],s=n.match(Gie),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=Vie.format(n,...i),e}transform(e){let r=e.message,n=e[pR]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(Hie);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}};hR.exports=t=>new kw(t);});var PR={};_t(PR,{assign:()=>lc,default:()=>Xie,defaultI18n:()=>Fw,format:()=>RR,parse:()=>CR,setGlobalDateI18n:()=>OR,setGlobalDateMasks:()=>DR});function NR(t,e){for(var r=[],n=0,i=t.length;n<i;n++)r.push(t[n].substr(0,e));return r}function lc(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 CR(t,e,r){if(r===void 0&&(r={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=sg[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(wR,function(L,k){return o.push(bR(k)),"@@@"}),c={},u={};a=bR(a).replace(TR,function(L){var k=Zie[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=lc(lc({},ig),r),x=1;x<f.length;x++){var p=s[x-1],h=p[0],g=p[2],y=g?g(f[x],d):+f[x];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"]],x=0,I=D.length;x<I;x++)if(c[D[x][0]]&&i[D[x][0]]!==_[D[x][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 TR,uc,cc,zie,$ie,Fh,wR,mR,AR,SR,Wie,Kie,Fw,ig,OR,bR,Wn,Yie,gR,ER,vR,yR,_R,Zie,sg,DR,RR,Jie,Xie,MR=ie(()=>{TR=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,uc="\\d\\d?",cc="\\d\\d",zie="\\d{3}",$ie="\\d{4}",Fh="[^\\s]+",wR=/\[([^]*?)\]/gm;mR=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}};AR=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],SR=["January","February","March","April","May","June","July","August","September","October","November","December"],Wie=NR(SR,3),Kie=NR(AR,3),Fw={dayNamesShort:Kie,dayNames:AR,monthNamesShort:Wie,monthNames:SR,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},ig=lc({},Fw),OR=function(t){return ig=lc(ig,t)},bR=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Wn=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},Yie={D:function(t){return String(t.getDate())},DD:function(t){return Wn(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Wn(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 Wn(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 Wn(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Wn(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Wn(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Wn(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Wn(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Wn(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Wn(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Wn(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?"-":"+")+Wn(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+Wn(Math.floor(Math.abs(e)/60),2)+":"+Wn(Math.abs(e)%60,2)}},gR=function(t){return +t-1},ER=[null,uc],vR=[null,Fh],yR=["isPm",Fh,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],_R=["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}],Zie={D:["day",uc],DD:["day",cc],Do:["day",uc+Fh,function(t){return parseInt(t,10)}],M:["month",uc,gR],MM:["month",cc,gR],YY:["year",cc,function(t){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);return +(""+(+t>68?r-1:r)+t)}],h:["hour",uc,void 0,"isPm"],hh:["hour",cc,void 0,"isPm"],H:["hour",uc],HH:["hour",cc],m:["minute",uc],mm:["minute",cc],s:["second",uc],ss:["second",cc],YYYY:["year",$ie],S:["millisecond","\\d",function(t){return +t*100}],SS:["millisecond",cc,function(t){return +t*10}],SSS:["millisecond",zie],d:ER,dd:ER,ddd:vR,dddd:vR,MMM:["month",Fh,mR("monthNamesShort")],MMMM:["month",Fh,mR("monthNames")],a:yR,A:yR,ZZ:_R,Z:_R},sg={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"},DR=function(t){return lc(sg,t)},RR=function(t,e,r){if(e===void 0&&(e=sg.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=sg[e]||e;var n=[];e=e.replace(wR,function(s,o){return n.push(o),"@@@"});var i=lc(lc({},ig),r);return e=e.replace(TR,function(s){return Yie[s](t,i)}),e.replace(/@@@/g,function(){return n.shift()})};Jie={format:RR,parse:CR,defaultI18n:Fw,setGlobalDateI18n:OR,setGlobalDateMasks:DR},Xie=Jie;});var kR=v((hLe,IR)=>{var Qie=(MR(),pr(PR)),ese=$n();IR.exports=ese((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Qie.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t));});var BR=v((xLe,FR)=>{var Bw=bw(),tse=$n(),{MESSAGE:Lw}=zr();FR.exports=tse((t,e)=>(e.level!==false&&(t.level=Bw.strip(t.level)),e.message!==false&&(t.message=Bw.strip(String(t.message))),e.raw!==false&&t[Lw]&&(t[Lw]=Bw.strip(String(t[Lw]))),t));});var Uw=v(qw=>{var rse=qw.format=$n();qw.levels=FD();function un(t,e){Object.defineProperty(rse,t,{get(){return e()},configurable:true});}un("align",function(){return LD()});un("errors",function(){return jD()});un("cli",function(){return HD()});un("combine",function(){return zD()});un("colorize",function(){return Zb()});un("json",function(){return Mw()});un("label",function(){return XD()});un("logstash",function(){return eR()});un("metadata",function(){return rR()});un("ms",function(){return sR()});un("padLevels",function(){return Aw()});un("prettyPrint",function(){return cR()});un("printf",function(){return uR()});un("simple",function(){return dR()});un("splat",function(){return xR()});un("timestamp",function(){return kR()});un("uncolorize",function(){return BR()});});var jw=v(og=>{var{format:LR}=se("util");og.warn={deprecated(t){return ()=>{throw new Error(LR("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return ()=>{throw new Error([LR("{ %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]=og.warn[e](n);});},forProperties(t,e,r){r.forEach(n=>{let i=og.warn[e](n);Object.defineProperty(t,n,{get:i,set:i});});}};});var qR=v((gLe,nse)=>{nse.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 jR=v((ELe,UR)=>{UR.exports=se("util").deprecate;});var Vw=v((vLe,VR)=>{VR.exports=se("stream");});var Gw=v((yLe,GR)=>{function ise(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(Hw,this,t)):process.nextTick(Hw,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(ag,r):(r._writableState.errorEmitted=true,process.nextTick(HR,r,s)):process.nextTick(HR,r,s):e?(process.nextTick(ag,r),e(s)):process.nextTick(ag,r);}),this)}function HR(t,e){Hw(t,e),ag(t);}function ag(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function sse(){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 Hw(t,e){t.emit("error",e);}function ose(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e);}GR.exports={destroy:ise,undestroy:sse,errorOrDestroy:ose};});var fc=v((_Le,WR)=>{var $R={};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,$R[t]=i;}function zR(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 ase(t,e,r){return t.substr(0,e.length)===e}function cse(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function use(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"&&ase(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(cse(t," argument"))i=`The ${t} ${n} ${zR(e,"type")}`;else {let s=use(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${zR(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");WR.exports.codes=$R;});var zw=v((TLe,KR)=>{var lse=fc().codes.ERR_INVALID_OPT_VALUE;function fse(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function dse(t,e,r,n){var i=fse(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new lse(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}KR.exports={getHighWaterMark:dse};});var YR=v((wLe,$w)=>{typeof Object.create=="function"?$w.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}}));}:$w.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=v((NLe,Kw)=>{try{if(Ww=se("util"),typeof Ww.inherits!="function")throw "";Kw.exports=Ww.inherits;}catch(t){Kw.exports=YR();}var Ww;});var tC=v((ALe,eC)=>{function ZR(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 JR(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ZR(Object(r),true).forEach(function(n){pse(t,n,r[n]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZR(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n));});}return t}function pse(t,e,r){return e=QR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function hse(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XR(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,QR(n.key),n);}}function xse(t,e,r){return e&&XR(t.prototype,e),Object.defineProperty(t,"prototype",{writable:false}),t}function QR(t){var e=mse(t,"string");return typeof e=="symbol"?e:String(e)}function mse(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 bse=se("buffer"),cg=bse.Buffer,gse=se("util"),Yw=gse.inspect,Ese=Yw&&Yw.custom||"inspect";function vse(t,e,r){cg.prototype.copy.call(t,e,r);}eC.exports=function(){function t(){hse(this,t),this.head=null,this.tail=null,this.length=0;}return xse(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 cg.alloc(0);for(var n=cg.allocUnsafe(r>>>0),i=this.head,s=0;i;)vse(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=cg.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:Ese,value:function(r,n){return Yw(this,JR(JR({},n),{},{depth:0,customInspect:false}))}}]),t}();});var iC=v((Zw,nC)=>{var ug=se("buffer"),Qs=ug.Buffer;function rC(t,e){for(var r in t)e[r]=t[r];}Qs.from&&Qs.alloc&&Qs.allocUnsafe&&Qs.allocUnsafeSlow?nC.exports=ug:(rC(ug,Zw),Zw.Buffer=ul);function ul(t,e,r){return Qs(t,e,r)}ul.prototype=Object.create(Qs.prototype);rC(Qs,ul);ul.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Qs(t,e,r)};ul.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Qs(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 Qs(t)};ul.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ug.SlowBuffer(t)};});var Qw=v(oC=>{var Xw=iC().Buffer,sC=Xw.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 yse(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 _se(t){var e=yse(t);if(typeof e!="string"&&(Xw.isEncoding===sC||!sC(t)))throw new Error("Unknown encoding: "+t);return e||t}oC.StringDecoder=Bh;function Bh(t){this.encoding=_se(t);var e;switch(this.encoding){case "utf16le":this.text=Ose,this.end=Dse,e=4;break;case "utf8":this.fillLast=Nse,e=4;break;case "base64":this.text=Rse,this.end=Cse,e=3;break;default:this.write=Pse,this.end=Mse;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Xw.allocUnsafe(e);}Bh.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||""};Bh.prototype.end=Sse;Bh.prototype.text=Ase;Bh.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 Jw(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Tse(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Jw(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Jw(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Jw(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function wse(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 Nse(t){var e=this.lastTotal-this.lastNeed,r=wse(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 Ase(t,e){var r=Tse(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 Sse(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Ose(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 Dse(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 Rse(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 Cse(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Pse(t){return t.toString(this.encoding)}function Mse(t){return t&&t.length?this.write(t):""}});var lg=v((OLe,uC)=>{var aC=fc().codes.ERR_STREAM_PREMATURE_CLOSE;function Ise(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 kse(){}function Fse(t){return t.setHeader&&typeof t.abort=="function"}function cC(t,e,r){if(typeof e=="function")return cC(t,null,e);e||(e={}),r=Ise(r||kse);var n=e.readable||e.readable!==false&&t.readable,i=e.writable||e.wr