@augmentcode/onison 1.2.0-prerelease.202608211508 → 1.2.0-prerelease.202608240915
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auggie-v2.mjs +1458 -1464
- package/package.json +1 -1
- package/vfs-prefetch-worker.mjs +17 -17
package/vfs-prefetch-worker.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
var
|
|
2
|
+
var dl=Object.create;var Mi=Object.defineProperty;var pl=Object.getOwnPropertyDescriptor;var gl=Object.getOwnPropertyNames;var ml=Object.getPrototypeOf,yl=Object.prototype.hasOwnProperty;var L=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var c=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var bl=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gl(e))!yl.call(t,i)&&i!==r&&Mi(t,i,{get:()=>e[i],enumerable:!(n=pl(e,i))||n.enumerable});return t};var _l=(t,e,r)=>(r=t!=null?dl(ml(t)):{},bl(e||!t||!t.__esModule?Mi(r,"default",{value:t,enumerable:!0}):r,t));var Q=c((u0,qi)=>{"use strict";var Wr=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
3
3
|
Found: ${e.toString().split(`
|
|
4
4
|
`)[0]}
|
|
5
|
-
`),Error.captureStackTrace(this,t)}};
|
|
6
|
-
`)!=-1,n=this._styles,i=n.length;i--;){var s=qe[n[i]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(
|
|
7
|
-
`));return!0}
|
|
5
|
+
`),Error.captureStackTrace(this,t)}};qi.exports=t=>{if(t.length>2)throw new Wr(t);function e(n={}){this.options=n}e.prototype.transform=t;function r(n){return new e(n)}return r.Format=e,r}});var Pi=c((l0,Ai)=>{var Li={};Ai.exports=Li;var Ti={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(Ti).forEach(function(t){var e=Ti[t],r=Li[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var Ni=c((f0,ji)=>{"use strict";ji.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?!0:i<r)}});var Ci=c((c0,Di)=>{"use strict";var vl=L("os"),se=Ni(),K=process.env,Be=void 0;se("no-color")||se("no-colors")||se("color=false")?Be=!1:(se("color")||se("colors")||se("color=true")||se("color=always"))&&(Be=!0);"FORCE_COLOR"in K&&(Be=K.FORCE_COLOR.length===0||parseInt(K.FORCE_COLOR,10)!==0);function wl(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function El(t){if(Be===!1)return 0;if(se("color=16m")||se("color=full")||se("color=truecolor"))return 3;if(se("color=256"))return 2;if(t&&!t.isTTY&&Be!==!0)return 0;var e=Be?1:0;if(process.platform==="win32"){var r=vl.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 K)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in K})||K.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in K){var n=parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||"COLORTERM"in K?1:(K.TERM==="dumb",e)}function Br(t){var e=El(t);return wl(e)}Di.exports={supportsColor:Br,stdout:Br(process.stdout),stderr:Br(process.stderr)}});var $i=c((h0,Ii)=>{Ii.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]<"u"?n+=i[s][a]:n+=s}),n}});var Fi=c((d0,ki)=>{ki.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(u){var l=Math.floor(Math.random()*u);return l}function o(u){var l=!1;return i.filter(function(d){l=d===u}),l}function a(u,l){var d="",g,p;l=l||{},l.up=typeof l.up<"u"?l.up:!0,l.mid=typeof l.mid<"u"?l.mid:!0,l.down=typeof l.down<"u"?l.down:!0,l.size=typeof l.size<"u"?l.size:"maxi",u=u.split("");for(p in u)if(!o(p)){switch(d=d+u[p],g={up:0,down:0,mid:0},l.size){case"mini":g.up=s(8),g.mid=s(2),g.down=s(8);break;case"maxi":g.up=s(16)+3,g.mid=s(4)+1,g.down=s(64)+3;break;default:g.up=s(8)+1,g.mid=s(6)/2,g.down=s(8)+1;break}var v=["up","mid","down"];for(var f in v)for(var y=v[f],w=0;w<=g[y];w++)l[y]&&(d=d+n[y][s(n[y].length)])}return d}return a(e,r)}});var Bi=c((p0,Wi)=>{Wi.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 Hi=c((g0,Ui)=>{Ui.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}}});var Gi=c((m0,zi)=>{zi.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 Yi=c((y0,Vi)=>{Vi.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 es=c((_0,Xi)=>{var M={};Xi.exports=M;M.themes={};var Sl=L("util"),qe=M.styles=Pi(),Ji=Object.defineProperties,xl=new RegExp(/[\r\n]+/g);M.supportsColor=Ci().supportsColor;typeof M.enabled>"u"&&(M.enabled=M.supportsColor()!==!1);M.enable=function(){M.enabled=!0};M.disable=function(){M.enabled=!1};M.stripColors=M.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var b0=M.stylize=function(e,r){if(!M.enabled)return e+"";var n=qe[r];return!n&&r in M?M[r](e):n.open+e+n.close},Ml=/[|\\{}()[\]^$+*?.]/g,Ol=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Ml,"\\$&")};function Zi(t){var e=function r(){return ql.apply(r,arguments)};return e._styles=t,e.__proto__=Rl,e}var Qi=(function(){var t={};return qe.grey=qe.gray,Object.keys(qe).forEach(function(e){qe[e].closeRe=new RegExp(Ol(qe[e].close),"g"),t[e]={get:function(){return Zi(this._styles.concat(e))}}}),t})(),Rl=Ji(function(){},Qi);function ql(){var t=Array.prototype.slice.call(arguments),e=t.map(function(o){return o!=null&&o.constructor===String?o:Sl.inspect(o)}).join(" ");if(!M.enabled||!e)return e;for(var r=e.indexOf(`
|
|
6
|
+
`)!=-1,n=this._styles,i=n.length;i--;){var s=qe[n[i]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(xl,function(o){return s.close+o+s.open}))}return e}M.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){M[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var s in t[r])i=M[t[r][s]](i);return i}return M[t[r]](n)}})(e)};function Tl(){var t={};return Object.keys(Qi).forEach(function(e){t[e]={get:function(){return Zi([e])}}}),t}var Ll=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};M.trap=$i();M.zalgo=Fi();M.maps={};M.maps.america=Bi()(M);M.maps.zebra=Hi()(M);M.maps.rainbow=Gi()(M);M.maps.random=Yi()(M);for(Ki in M.maps)(function(t){M[t]=function(e){return Ll(M.maps[t],e)}})(Ki);var Ki;Ji(M,Tl())});var Ur=c((v0,ts)=>{var Al=es();ts.exports=Al});var rs=c(Hr=>{"use strict";Hr.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};Hr.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var ns=c(zr=>{"use strict";zr.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};zr.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var is=c(Gr=>{"use strict";Gr.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Gr.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var ss=c($t=>{"use strict";Object.defineProperty($t,"cli",{value:rs()});Object.defineProperty($t,"npm",{value:ns()});Object.defineProperty($t,"syslog",{value:is()})});var k=c(at=>{"use strict";Object.defineProperty(at,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(at,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(at,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(at,"configs",{value:ss()})});var Wt=c((O0,Ft)=>{"use strict";var Kr=Ur(),{LEVEL:Vr,MESSAGE:Yr}=k();Kr.enabled=!0;var os=/\s+/,kt=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]=os.test(e[i])?e[i].split(os):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>"u"&&(n=r),!Array.isArray(t.allColors[e]))return Kr[t.allColors[e]](n);for(let i=0,s=t.allColors[e].length;i<s;i++)n=Kr[t.allColors[e][i]](n);return n}transform(e,r){return r.all&&typeof e[Yr]=="string"&&(e[Yr]=this.colorize(e[Vr],e.level,e[Yr])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[Vr],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[Vr],e.level,e.message)),e}};Ft.exports=t=>new kt(t);Ft.exports.Colorizer=Ft.exports.Format=kt});var us=c((R0,as)=>{"use strict";var{Colorizer:Pl}=Wt();as.exports=t=>(Pl.addColors(t.colors||t),t)});var fs=c((q0,ls)=>{"use strict";var jl=Q();ls.exports=jl(t=>(t.message=` ${t.message}`,t))});var ds=c((T0,hs)=>{"use strict";var Nl=Q(),{LEVEL:cs,MESSAGE:Jr}=k();hs.exports=Nl((t,{stack:e,cause:r})=>{if(t instanceof Error){let i=Object.assign({},t,{level:t.level,[cs]:t[cs]||t.level,message:t.message,[Jr]:t[Jr]||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[Jr]=n.message,e&&(t.stack=n.stack),r&&(t.cause=n.cause),t})});var Qr=c((L0,Ut)=>{"use strict";var{configs:Dl,LEVEL:ps,MESSAGE:Zr}=k(),Bt=class t{constructor(e={levels:Dl.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[ps]]}${e.message}`,e[Zr]&&(e[Zr]=`${this.paddings[e[ps]]}${e[Zr]}`),e}};Ut.exports=t=>new Bt(t);Ut.exports.Padder=Ut.exports.Format=Bt});var gs=c((A0,Xr)=>{"use strict";var{Colorizer:Cl}=Wt(),{Padder:Il}=Qr(),{configs:$l,MESSAGE:kl}=k(),Ht=class{constructor(e={}){e.levels||(e.levels=$l.cli.levels),this.colorizer=new Cl(e),this.padder=new Il(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[kl]=`${e.level}:${e.message}`,e}};Xr.exports=t=>new Ht(t);Xr.exports.Format=Ht});var ys=c((P0,en)=>{"use strict";var Fl=Q();function ms(t){if(t.every(Wl))return e=>{let r=e;for(let n=0;n<t.length;n++)if(r=t[n].transform(r,t[n].options),!r)return!1;return r}}function Wl(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(`
|
|
7
|
+
`));return!0}en.exports=(...t)=>{let e=Fl(ms(t)),r=e();return r.Format=e.Format,r};en.exports.cascade=ms});var lt=c((sn,vs)=>{"use strict";var{hasOwnProperty:ut}=Object.prototype,Le=nn();Le.configure=nn;Le.stringify=Le;Le.default=Le;sn.stringify=Le;sn.configure=nn;vs.exports=Le;var Bl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function _e(t){return t.length<5e3&&!Bl.test(t)?`"${t}"`:JSON.stringify(t)}function tn(t,e){if(t.length>200||e)return t.sort(e);for(let r=1;r<t.length;r++){let n=t[r],i=r;for(;i!==0&&t[i-1]>n;)t[i]=t[i-1],i--;t[i]=n}return t}var Ul=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function rn(t){return Ul.call(t)!==void 0&&t.length!==0}function bs(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 Hl(t){if(ut.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 zl(t){let e;if(ut.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?!0:e}function Gl(t,e){let r;if(ut.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function _s(t,e){let r;if(ut.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 Te(t){return t===1?"1 item":`${t} items`}function Vl(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Yl(t){if(ut.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 nn(t){t={...t};let e=Yl(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=Hl(t),n=Gl(t,"bigint"),i=zl(t),s=typeof i=="function"?i:void 0,o=_s(t,"maximumDepth"),a=_s(t,"maximumBreadth");function u(v,f,y,w,S,R){let _=f[v];switch(typeof _=="object"&&_!==null&&typeof _.toJSON=="function"&&(_=_.toJSON(v)),_=w.call(f,v,_),typeof _){case"string":return _e(_);case"object":{if(_===null)return"null";if(y.indexOf(_)!==-1)return r;let O="",N=",",D=R;if(Array.isArray(_)){if(_.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(_),S!==""&&(R+=S,O+=`
|
|
8
8
|
${R}`,N=`,
|
|
9
|
-
${R}`);let G=Math.min(_.length,a),
|
|
9
|
+
${R}`);let G=Math.min(_.length,a),ee=0;for(;ee<G-1;ee++){let Fe=u(String(ee),_,y,w,S,R);O+=Fe!==void 0?Fe:"null",O+=N}let te=u(String(ee),_,y,w,S,R);if(O+=te!==void 0?te:"null",_.length-1>a){let Fe=_.length-a-1;O+=`${N}"... ${Te(Fe)} not stringified"`}return S!==""&&(O+=`
|
|
10
10
|
${D}`),y.pop(),`[${O}]`}let A=Object.keys(_),C=A.length;if(C===0)return"{}";if(o<y.length+1)return'"[Object]"';let q="",z="";S!==""&&(R+=S,N=`,
|
|
11
|
-
${R}`,q=" ");let Y=Math.min(C,a);i&&!
|
|
11
|
+
${R}`,q=" ");let Y=Math.min(C,a);i&&!rn(_)&&(A=tn(A,s)),y.push(_);for(let G=0;G<Y;G++){let ee=A[G],te=u(ee,_,y,w,S,R);te!==void 0&&(O+=`${z}${_e(ee)}:${q}${te}`,z=N)}if(C>a){let G=C-a;O+=`${z}"...":${q}"${Te(G)} not stringified"`,z=N}return S!==""&&z.length>1&&(O=`
|
|
12
12
|
${R}${O}
|
|
13
13
|
${D}`),y.pop(),`{${O}}`}case"number":return isFinite(_)?String(_):e?e(_):"null";case"boolean":return _===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(_);default:return e?e(_):void 0}}function l(v,f,y,w,S,R){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(v)),typeof f){case"string":return _e(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let _=R,O="",N=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f),S!==""&&(R+=S,O+=`
|
|
14
14
|
${R}`,N=`,
|
|
@@ -18,19 +18,19 @@ ${R}`,D=" ");let A="";for(let C of w){let q=l(C,f[C],y,w,S,R);q!==void 0&&(O+=`$
|
|
|
18
18
|
${R}${O}
|
|
19
19
|
${_}`),y.pop(),`{${O}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function d(v,f,y,w,S){switch(typeof f){case"string":return _e(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(v),typeof f!="object")return d(v,f,y,w,S);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let R=S;if(Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f),S+=w;let q=`
|
|
20
20
|
${S}`,z=`,
|
|
21
|
-
${S}`,Y=Math.min(f.length,a),G=0;for(;G<Y-1;G++){let
|
|
21
|
+
${S}`,Y=Math.min(f.length,a),G=0;for(;G<Y-1;G++){let te=d(String(G),f[G],y,w,S);q+=te!==void 0?te:"null",q+=z}let ee=d(String(G),f[G],y,w,S);if(q+=ee!==void 0?ee:"null",f.length-1>a){let te=f.length-a-1;q+=`${z}"... ${Te(te)} not stringified"`}return q+=`
|
|
22
22
|
${R}`,y.pop(),`[${q}]`}let _=Object.keys(f),O=_.length;if(O===0)return"{}";if(o<y.length+1)return'"[Object]"';S+=w;let N=`,
|
|
23
|
-
${S}`,D="",A="",C=Math.min(O,a);
|
|
23
|
+
${S}`,D="",A="",C=Math.min(O,a);rn(f)&&(D+=bs(f,N,a),_=_.slice(f.length),C-=f.length,A=N),i&&(_=tn(_,s)),y.push(f);for(let q=0;q<C;q++){let z=_[q],Y=d(z,f[z],y,w,S);Y!==void 0&&(D+=`${A}${_e(z)}: ${Y}`,A=N)}if(O>a){let q=O-a;D+=`${A}"...": "${Te(q)} not stringified"`,A=N}return A!==""&&(D=`
|
|
24
24
|
${S}${D}
|
|
25
|
-
${R}`),y.pop(),`{${D}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function g(v,f,y){switch(typeof f){case"string":return _e(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(v),typeof f!="object")return g(v,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let w="",S=f.length!==void 0;if(S&&Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f);let D=Math.min(f.length,a),A=0;for(;A<D-1;A++){let q=g(String(A),f[A],y);w+=q!==void 0?q:"null",w+=","}let C=g(String(A),f[A],y);if(w+=C!==void 0?C:"null",f.length-1>a){let q=f.length-a-1;w+=`,"... ${Te(q)} not stringified"`}return y.pop(),`[${w}]`}let R=Object.keys(f),_=R.length;if(_===0)return"{}";if(o<y.length+1)return'"[Object]"';let O="",N=Math.min(_,a);S&&tn(f)&&(w+=ys(f,",",a),R=R.slice(f.length),N-=f.length,O=","),i&&(R=en(R,s)),y.push(f);for(let D=0;D<N;D++){let A=R[D],C=g(A,f[A],y);C!==void 0&&(w+=`${O}${_e(A)}:${C}`,O=",")}if(_>a){let D=_-a;w+=`${O}"...":"${Te(D)} not stringified"`}return y.pop(),`{${w}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function p(v,f,y){if(arguments.length>1){let w="";if(typeof y=="number"?w=" ".repeat(Math.min(y,10)):typeof y=="string"&&(w=y.slice(0,10)),f!=null){if(typeof f=="function")return u("",{"":v},[],f,w,"");if(Array.isArray(f))return l("",v,[],zl(f),w,"")}if(w.length!==0)return d("",v,[],w,"")}return g("",v,[])}return p}});var sn=c((A0,vs)=>{"use strict";var Vl=Z(),{MESSAGE:Yl}=k(),Kl=lt();function Jl(t,e){return typeof e=="bigint"?e.toString():e}vs.exports=Vl((t,e)=>{let r=Kl.configure(e);return t[Yl]=r(t,e.replacer||Jl,e.space),t})});var Es=c((P0,ws)=>{"use strict";var Zl=Z();ws.exports=Zl((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var xs=c((j0,Ss)=>{"use strict";var Ql=Z(),{MESSAGE:Xl}=k(),ef=lt();Ss.exports=Ql(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[Xl]=ef(e),t})});var Os=c((N0,Ms)=>{"use strict";var tf=Z();function rf(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 nf(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}Ms.exports=tf((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?rf(t,n,r):e.fillWith?nf(t,e.fillWith,r):t})});var qs=c((D0,Rs)=>{var He=1e3,Ue=He*60,ze=Ue*60,Ae=ze*24,sf=Ae*7,of=Ae*365.25;Rs.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return af(t);if(r==="number"&&isFinite(t))return e.long?lf(t):uf(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function af(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*of;case"weeks":case"week":case"w":return r*sf;case"days":case"day":case"d":return r*Ae;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ze;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ue;case"seconds":case"second":case"secs":case"sec":case"s":return r*He;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function uf(t){var e=Math.abs(t);return e>=Ae?Math.round(t/Ae)+"d":e>=ze?Math.round(t/ze)+"h":e>=Ue?Math.round(t/Ue)+"m":e>=He?Math.round(t/He)+"s":t+"ms"}function lf(t){var e=Math.abs(t);return e>=Ae?Ut(t,e,Ae,"day"):e>=ze?Ut(t,e,ze,"hour"):e>=Ue?Ut(t,e,Ue,"minute"):e>=He?Ut(t,e,He,"second"):t+" ms"}function Ut(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var Ls=c((ft,Ts)=>{"use strict";var ff=Z(),cf=qs();Ts.exports=ff(t=>{let e=+new Date;return ft.diff=e-(ft.prevTime||e),ft.prevTime=e,t.ms=`+${cf(ft.diff)}`,t})});var js=c((C0,Ps)=>{"use strict";var hf=L("util").inspect,df=Z(),{LEVEL:pf,MESSAGE:As,SPLAT:gf}=k();Ps.exports=df((t,e={})=>{let r=Object.assign({},t);return delete r[pf],delete r[As],delete r[gf],t[As]=hf(r,!1,e.depth||null,e.colorize),t})});var Ns=c((I0,Gt)=>{"use strict";var{MESSAGE:mf}=k(),zt=class{constructor(e){this.template=e}transform(e){return e[mf]=this.template(e),e}};Gt.exports=t=>new zt(t);Gt.exports.Printf=Gt.exports.Format=zt});var Is=c(($0,Cs)=>{"use strict";var yf=Z(),{MESSAGE:Ds}=k(),bf=lt();Cs.exports=yf(t=>{let e=bf(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Ds]=`${t.level}:${r} ${t.message} ${e}`:t[Ds]=`${t.level}:${r} ${t.message}`,t})});var Fs=c((k0,ks)=>{"use strict";var _f=L("util"),{SPLAT:$s}=k(),vf=/%[scdjifoO%]/g,wf=/%%/g,on=class{constructor(e){this.options=e}_splat(e,r){let n=e.message,i=e[$s]||e.splat||[],s=n.match(wf),o=s&&s.length||0,u=r.length-o-i.length,l=u<0?i.splice(u,-1*u):[],d=l.length;if(d)for(let g=0;g<d;g++)Object.assign(e,l[g]);return e.message=_f.format(n,...i),e}transform(e){let r=e.message,n=e[$s]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(vf);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}};ks.exports=t=>new on(t)});var Bs=c((Vt,Ws)=>{(function(t,e){typeof Vt=="object"&&typeof Ws<"u"?e(Vt):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Vt,(function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",n="\\d\\d",i="\\d{3}",s="\\d{4}",o="[^\\s]+",a=/\[([^]*?)\]/gm;function u(h,b){for(var j=[],J=0,E=h.length;J<E;J++)j.push(h[J].substr(0,b));return j}var l=function(h){return function(b,j){var J=j[h].map(function(le){return le.toLowerCase()}),E=J.indexOf(b.toLowerCase());return E>-1?E:null}};function d(h){for(var b=[],j=1;j<arguments.length;j++)b[j-1]=arguments[j];for(var J=0,E=b;J<E.length;J++){var le=E[J];for(var Re in le)h[Re]=le[Re]}return h}var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],v=u(p,3),f=u(g,3),y={dayNamesShort:f,dayNames:g,monthNamesShort:v,monthNames:p,amPm:["am","pm"],DoFn:function(h){return h+["th","st","nd","rd"][h%10>3?0:(h-h%10!==10?1:0)*h%10]}},w=d({},y),S=function(h){return w=d(w,h)},R=function(h){return h.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},_=function(h,b){for(b===void 0&&(b=2),h=String(h);h.length<b;)h="0"+h;return h},O={D:function(h){return String(h.getDate())},DD:function(h){return _(h.getDate())},Do:function(h,b){return b.DoFn(h.getDate())},d:function(h){return String(h.getDay())},dd:function(h){return _(h.getDay())},ddd:function(h,b){return b.dayNamesShort[h.getDay()]},dddd:function(h,b){return b.dayNames[h.getDay()]},M:function(h){return String(h.getMonth()+1)},MM:function(h){return _(h.getMonth()+1)},MMM:function(h,b){return b.monthNamesShort[h.getMonth()]},MMMM:function(h,b){return b.monthNames[h.getMonth()]},YY:function(h){return _(String(h.getFullYear()),4).substr(2)},YYYY:function(h){return _(h.getFullYear(),4)},h:function(h){return String(h.getHours()%12||12)},hh:function(h){return _(h.getHours()%12||12)},H:function(h){return String(h.getHours())},HH:function(h){return _(h.getHours())},m:function(h){return String(h.getMinutes())},mm:function(h){return _(h.getMinutes())},s:function(h){return String(h.getSeconds())},ss:function(h){return _(h.getSeconds())},S:function(h){return String(Math.round(h.getMilliseconds()/100))},SS:function(h){return _(Math.round(h.getMilliseconds()/10),2)},SSS:function(h){return _(h.getMilliseconds(),3)},a:function(h,b){return h.getHours()<12?b.amPm[0]:b.amPm[1]},A:function(h,b){return h.getHours()<12?b.amPm[0].toUpperCase():b.amPm[1].toUpperCase()},ZZ:function(h){var b=h.getTimezoneOffset();return(b>0?"-":"+")+_(Math.floor(Math.abs(b)/60)*100+Math.abs(b)%60,4)},Z:function(h){var b=h.getTimezoneOffset();return(b>0?"-":"+")+_(Math.floor(Math.abs(b)/60),2)+":"+_(Math.abs(b)%60,2)}},N=function(h){return+h-1},D=[null,r],A=[null,o],C=["isPm",o,function(h,b){var j=h.toLowerCase();return j===b.amPm[0]?0:j===b.amPm[1]?1:null}],q=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(h){var b=(h+"").match(/([+-]|\d\d)/gi);if(b){var j=+b[1]*60+parseInt(b[2],10);return b[0]==="+"?j:-j}return 0}],z={D:["day",r],DD:["day",n],Do:["day",r+o,function(h){return parseInt(h,10)}],M:["month",r,N],MM:["month",n,N],YY:["year",n,function(h){var b=new Date,j=+(""+b.getFullYear()).substr(0,2);return+(""+(+h>68?j-1:j)+h)}],h:["hour",r,void 0,"isPm"],hh:["hour",n,void 0,"isPm"],H:["hour",r],HH:["hour",n],m:["minute",r],mm:["minute",n],s:["second",r],ss:["second",n],YYYY:["year",s],S:["millisecond","\\d",function(h){return+h*100}],SS:["millisecond",n,function(h){return+h*10}],SSS:["millisecond",i],d:D,dd:D,ddd:A,dddd:A,MMM:["month",o,l("monthNamesShort")],MMMM:["month",o,l("monthNames")],a:C,A:C,ZZ:q,Z:q},Y={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"},G=function(h){return d(Y,h)},X=function(h,b,j){if(b===void 0&&(b=Y.default),j===void 0&&(j={}),typeof h=="number"&&(h=new Date(h)),Object.prototype.toString.call(h)!=="[object Date]"||isNaN(h.getTime()))throw new Error("Invalid Date pass to format");b=Y[b]||b;var J=[];b=b.replace(a,function(le,Re){return J.push(Re),"@@@"});var E=d(d({},w),j);return b=b.replace(e,function(le){return O[le](h,E)}),b.replace(/@@@/g,function(){return J.shift()})};function ee(h,b,j){if(j===void 0&&(j={}),typeof b!="string")throw new Error("Invalid format in fecha parse");if(b=Y[b]||b,h.length>1e3)return null;var J=new Date,E={year:J.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},le=[],Re=[],st=b.replace(a,function(ot,We){return Re.push(R(We)),"@@@"}),jt={},_i={};st=R(st).replace(e,function(ot){var We=z[ot],kr=We[0],fl=We[1],Si=We[3];if(jt[kr])throw new Error("Invalid format. "+kr+" specified twice in format");return jt[kr]=!0,Si&&(_i[Si]=!0),le.push(We),"("+fl+")"}),Object.keys(_i).forEach(function(ot){if(!jt[ot])throw new Error("Invalid format. "+ot+" is required in specified format")}),st=st.replace(/@@@/g,function(){return Re.shift()});var Nt=h.match(new RegExp(st,"i"));if(!Nt)return null;for(var al=d(d({},w),j),ie=1;ie<Nt.length;ie++){var vi=le[ie-1],ul=vi[0],wi=vi[2],Ei=wi?wi(Nt[ie],al):+Nt[ie];if(Ei==null)return null;E[ul]=Ei}E.isPm===1&&E.hour!=null&&+E.hour!=12?E.hour=+E.hour+12:E.isPm===0&&+E.hour==12&&(E.hour=0);var Dt;if(E.timezoneOffset==null){Dt=new Date(E.year,E.month,E.day,E.hour,E.minute,E.second,E.millisecond);for(var Ct=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],ie=0,ll=Ct.length;ie<ll;ie++)if(jt[Ct[ie][0]]&&E[Ct[ie][0]]!==Dt[Ct[ie][1]]())return null}else if(Dt=new Date(Date.UTC(E.year,E.month,E.day,E.hour,E.minute-E.timezoneOffset,E.second,E.millisecond)),E.month>11||E.month<0||E.day>31||E.day<1||E.hour>23||E.hour<0||E.minute>59||E.minute<0||E.second>59||E.second<0)return null;return Dt}var Fe={format:X,parse:ee,defaultI18n:y,setGlobalDateI18n:S,setGlobalDateMasks:G};t.assign=d,t.default=Fe,t.format=X,t.parse=ee,t.defaultI18n=y,t.setGlobalDateI18n=S,t.setGlobalDateMasks=G,Object.defineProperty(t,"__esModule",{value:!0})}))});var Us=c((F0,Hs)=>{"use strict";var Ef=Bs(),Sf=Z();Hs.exports=Sf((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Ef.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Gs=c((W0,zs)=>{"use strict";var an=Br(),xf=Z(),{MESSAGE:un}=k();zs.exports=xf((t,e)=>(e.level!==!1&&(t.level=an.strip(t.level)),e.message!==!1&&(t.message=an.strip(String(t.message))),e.raw!==!1&&t[un]&&(t[un]=an.strip(String(t[un]))),t))});var fn=c(ln=>{"use strict";var Mf=ln.format=Z();ln.levels=as();function V(t,e){Object.defineProperty(Mf,t,{get(){return e()},configurable:!0})}V("align",function(){return ls()});V("errors",function(){return hs()});V("cli",function(){return ps()});V("combine",function(){return ms()});V("colorize",function(){return Ft()});V("json",function(){return sn()});V("label",function(){return Es()});V("logstash",function(){return xs()});V("metadata",function(){return Os()});V("ms",function(){return Ls()});V("padLevels",function(){return Zr()});V("prettyPrint",function(){return js()});V("printf",function(){return Ns()});V("simple",function(){return Is()});V("splat",function(){return Fs()});V("timestamp",function(){return Us()});V("uncolorize",function(){return Gs()})});var cn=c(Yt=>{"use strict";var{format:Vs}=L("util");Yt.warn={deprecated(t){return()=>{throw new Error(Vs("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Vs("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
-
`))}},forFunctions(t,e,r){r.forEach(n=>{t[n]=Yt.warn[e](n)})},forProperties(t,e,r){r.forEach(n=>{let i=Yt.warn[e](n);Object.defineProperty(t,n,{get:i,set:i})})}}});var Ys=c((U0,Of)=>{Of.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.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.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.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.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",jest:"^29.7.0",rimraf:"5.0.10",split2:"^4.1.0","std-mocks":"^2.0.0",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:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Js=c((z0,Ks)=>{Ks.exports=L("util").deprecate});var hn=c((G0,Zs)=>{Zs.exports=L("stream")});var pn=c((V0,Xs)=>{"use strict";function Rf(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=!0,process.nextTick(dn,this,t)):process.nextTick(dn,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Kt,r):(r._writableState.errorEmitted=!0,process.nextTick(Qs,r,s)):process.nextTick(Qs,r,s):e?(process.nextTick(Kt,r),e(s)):process.nextTick(Kt,r)}),this)}function Qs(t,e){dn(t,e),Kt(t)}function Kt(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function qf(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function dn(t,e){t.emit("error",e)}function Tf(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}Xs.exports={destroy:Rf,undestroy:qf,errorOrDestroy:Tf}});var ve=c((Y0,ro)=>{"use strict";var to={};function re(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,u){super(n(o,a,u))}}i.prototype.name=r.name,i.prototype.code=t,to[t]=i}function eo(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 Lf(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Af(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Pf(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}re("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);re("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&Lf(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Af(t," argument"))i=`The ${t} ${n} ${eo(e,"type")}`;else{let s=Pf(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${eo(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);re("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");re("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});re("ERR_STREAM_PREMATURE_CLOSE","Premature close");re("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});re("ERR_MULTIPLE_CALLBACK","Callback called multiple times");re("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");re("ERR_STREAM_WRITE_AFTER_END","write after end");re("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);re("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);re("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ro.exports.codes=to});var gn=c((K0,no)=>{"use strict";var jf=ve().codes.ERR_INVALID_OPT_VALUE;function Nf(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Df(t,e,r,n){var i=Nf(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new jf(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}no.exports={getHighWaterMark:Df}});var io=c((J0,mn)=>{typeof Object.create=="function"?mn.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:mn.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 Ge=c((Z0,bn)=>{try{if(yn=L("util"),typeof yn.inherits!="function")throw"";bn.exports=yn.inherits}catch{bn.exports=io()}var yn});var fo=c((Q0,lo)=>{"use strict";function so(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 oo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?so(Object(r),!0).forEach(function(n){Cf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):so(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Cf(t,e,r){return e=uo(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function If(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ao(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uo(n.key),n)}}function $f(t,e,r){return e&&ao(t.prototype,e),r&&ao(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uo(t){var e=kf(t,"string");return typeof e=="symbol"?e:String(e)}function kf(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||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ff=L("buffer"),Jt=Ff.Buffer,Wf=L("util"),_n=Wf.inspect,Bf=_n&&_n.custom||"inspect";function Hf(t,e,r){Jt.prototype.copy.call(t,e,r)}lo.exports=(function(){function t(){If(this,t),this.head=null,this.tail=null,this.length=0}return $f(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 Jt.alloc(0);for(var n=Jt.allocUnsafe(r>>>0),i=this.head,s=0;i;)Hf(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=Jt.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:Bf,value:function(r,n){return _n(this,oo(oo({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var po=c((vn,ho)=>{var Zt=L("buffer"),fe=Zt.Buffer;function co(t,e){for(var r in t)e[r]=t[r]}fe.from&&fe.alloc&&fe.allocUnsafe&&fe.allocUnsafeSlow?ho.exports=Zt:(co(Zt,vn),vn.Buffer=Pe);function Pe(t,e,r){return fe(t,e,r)}Pe.prototype=Object.create(fe.prototype);co(fe,Pe);Pe.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return fe(t,e,r)};Pe.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=fe(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Pe.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return fe(t)};Pe.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Zt.SlowBuffer(t)}});var Sn=c(mo=>{"use strict";var En=po().Buffer,go=En.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!0;default:return!1}};function Uf(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=!0}}function zf(t){var e=Uf(t);if(typeof e!="string"&&(En.isEncoding===go||!go(t)))throw new Error("Unknown encoding: "+t);return e||t}mo.StringDecoder=ct;function ct(t){this.encoding=zf(t);var e;switch(this.encoding){case"utf16le":this.text=Zf,this.end=Qf,e=4;break;case"utf8":this.fillLast=Yf,e=4;break;case"base64":this.text=Xf,this.end=ec,e=3;break;default:this.write=tc,this.end=rc;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=En.allocUnsafe(e)}ct.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||""};ct.prototype.end=Jf;ct.prototype.text=Kf;ct.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 wn(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Gf(t,e,r){var n=e.length-1;if(n<r)return 0;var i=wn(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=wn(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=wn(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function Vf(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 Yf(t){var e=this.lastTotal-this.lastNeed,r=Vf(this,t,e);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 Kf(t,e){var r=Gf(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 Jf(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Zf(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 Qf(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 Xf(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 ec(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function tc(t){return t.toString(this.encoding)}function rc(t){return t&&t.length?this.write(t):""}});var Qt=c((em,_o)=>{"use strict";var yo=ve().codes.ERR_STREAM_PREMATURE_CLOSE;function nc(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function ic(){}function sc(t){return t.setHeader&&typeof t.abort=="function"}function bo(t,e,r){if(typeof e=="function")return bo(t,null,e);e||(e={}),r=nc(r||ic);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){i=!1,o=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,l=function(){n=!1,u=!0,i||r.call(t)},d=function(f){r.call(t,f)},g=function(){var f;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(f=new yo),r.call(t,f);if(i&&!o)return(!t._writableState||!t._writableState.ended)&&(f=new yo),r.call(t,f)},p=function(){t.req.on("finish",a)};return sc(t)?(t.on("complete",a),t.on("abort",g),t.req?p():t.on("request",p)):i&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",l),t.on("finish",a),e.error!==!1&&t.on("error",d),t.on("close",g),function(){t.removeListener("complete",a),t.removeListener("abort",g),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",l),t.removeListener("error",d),t.removeListener("close",g)}}_o.exports=bo});var wo=c((tm,vo)=>{"use strict";var Xt;function we(t,e,r){return e=oc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oc(t){var e=ac(t,"string");return typeof e=="symbol"?e:String(e)}function ac(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||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var uc=Qt(),Ee=Symbol("lastResolve"),je=Symbol("lastReject"),ht=Symbol("error"),er=Symbol("ended"),Ne=Symbol("lastPromise"),xn=Symbol("handlePromise"),De=Symbol("stream");function Se(t,e){return{value:t,done:e}}function lc(t){var e=t[Ee];if(e!==null){var r=t[De].read();r!==null&&(t[Ne]=null,t[Ee]=null,t[je]=null,e(Se(r,!1)))}}function fc(t){process.nextTick(lc,t)}function cc(t,e){return function(r,n){t.then(function(){if(e[er]){r(Se(void 0,!0));return}e[xn](r,n)},n)}}var hc=Object.getPrototypeOf(function(){}),dc=Object.setPrototypeOf((Xt={get stream(){return this[De]},next:function(){var e=this,r=this[ht];if(r!==null)return Promise.reject(r);if(this[er])return Promise.resolve(Se(void 0,!0));if(this[De].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[ht]?a(e[ht]):o(Se(void 0,!0))})});var n=this[Ne],i;if(n)i=new Promise(cc(n,this));else{var s=this[De].read();if(s!==null)return Promise.resolve(Se(s,!1));i=new Promise(this[xn])}return this[Ne]=i,i}},we(Xt,Symbol.asyncIterator,function(){return this}),we(Xt,"return",function(){var e=this;return new Promise(function(r,n){e[De].destroy(null,function(i){if(i){n(i);return}r(Se(void 0,!0))})})}),Xt),hc),pc=function(e){var r,n=Object.create(dc,(r={},we(r,De,{value:e,writable:!0}),we(r,Ee,{value:null,writable:!0}),we(r,je,{value:null,writable:!0}),we(r,ht,{value:null,writable:!0}),we(r,er,{value:e._readableState.endEmitted,writable:!0}),we(r,xn,{value:function(s,o){var a=n[De].read();a?(n[Ne]=null,n[Ee]=null,n[je]=null,s(Se(a,!1))):(n[Ee]=s,n[je]=o)},writable:!0}),r));return n[Ne]=null,uc(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[je];s!==null&&(n[Ne]=null,n[Ee]=null,n[je]=null,s(i)),n[ht]=i;return}var o=n[Ee];o!==null&&(n[Ne]=null,n[Ee]=null,n[je]=null,o(Se(void 0,!0))),n[er]=!0}),e.on("readable",fc.bind(null,n)),n};vo.exports=pc});var Mo=c((rm,xo)=>{"use strict";function Eo(t,e,r,n,i,s,o){try{var a=t[s](o),u=a.value}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function gc(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(u){Eo(s,n,i,o,a,"next",u)}function a(u){Eo(s,n,i,o,a,"throw",u)}o(void 0)})}}function So(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 mc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?So(Object(r),!0).forEach(function(n){yc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yc(t,e,r){return e=bc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bc(t){var e=_c(t,"string");return typeof e=="symbol"?e:String(e)}function _c(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||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vc=ve().codes.ERR_INVALID_ARG_TYPE;function wc(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new vc("iterable",["Iterable"],e);var i=new t(mc({objectMode:!0},r)),s=!1;i._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=gc(function*(){try{var u=yield n.next(),l=u.value,d=u.done;d?i.push(null):i.push(yield l)?o():s=!1}catch(g){i.destroy(g)}}),a.apply(this,arguments)}return i}xo.exports=wc});var Nn=c((im,Do)=>{"use strict";Do.exports=T;var Ve;T.ReadableState=To;var nm=L("events").EventEmitter,qo=function(e,r){return e.listeners(r).length},pt=hn(),tr=L("buffer").Buffer,Ec=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Sc(t){return tr.from(t)}function xc(t){return tr.isBuffer(t)||t instanceof Ec}var Mn=L("util"),x;Mn&&Mn.debuglog?x=Mn.debuglog("stream"):x=function(){};var Mc=fo(),Pn=pn(),Oc=gn(),Rc=Oc.getHighWaterMark,rr=ve().codes,qc=rr.ERR_INVALID_ARG_TYPE,Tc=rr.ERR_STREAM_PUSH_AFTER_EOF,Lc=rr.ERR_METHOD_NOT_IMPLEMENTED,Ac=rr.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ye,On,Rn;Ge()(T,pt);var dt=Pn.errorOrDestroy,qn=["error","close","destroy","pause","resume"];function Pc(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function To(t,e,r){Ve=Ve||Ce(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ve),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Rc(this,t,"readableHighWaterMark",r),this.buffer=new Mc,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Ye||(Ye=Sn().StringDecoder),this.decoder=new Ye(t.encoding),this.encoding=t.encoding)}function T(t){if(Ve=Ve||Ce(),!(this instanceof T))return new T(t);var e=this instanceof Ve;this._readableState=new To(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),pt.call(this)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});T.prototype.destroy=Pn.destroy;T.prototype._undestroy=Pn.undestroy;T.prototype._destroy=function(t,e){e(t)};T.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=tr.from(t,e),e=""),n=!0),Lo(this,t,e,!1,n)};T.prototype.unshift=function(t){return Lo(this,t,null,!0,!1)};function Lo(t,e,r,n,i){x("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Dc(t,s);else{var o;if(i||(o=jc(s,e)),o)dt(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==tr.prototype&&(e=Sc(e)),n)s.endEmitted?dt(t,new Ac):Tn(t,s,e,!0);else if(s.ended)dt(t,new Tc);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Tn(t,s,e,!1):An(t,s)):Tn(t,s,e,!1)}else n||(s.reading=!1,An(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Tn(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&nr(t)),An(t,e)}function jc(t,e){var r;return!xc(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new qc("chunk",["string","Buffer","Uint8Array"],e)),r}T.prototype.isPaused=function(){return this._readableState.flowing===!1};T.prototype.setEncoding=function(t){Ye||(Ye=Sn().StringDecoder);var e=new Ye(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Oo=1073741824;function Nc(t){return t>=Oo?t=Oo:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Ro(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Nc(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}T.prototype.read=function(t){x("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return x("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Ln(this):nr(this),null;if(t=Ro(t,e),t===0&&e.ended)return e.length===0&&Ln(this),null;var n=e.needReadable;x("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,x("length less than watermark",n)),e.ended||e.reading?(n=!1,x("reading or ended",n)):n&&(x("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Ro(r,e)));var i;return t>0?i=jo(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Ln(this)),i!==null&&this.emit("data",i),i};function Dc(t,e){if(x("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?nr(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ao(t)))}}function nr(t){var e=t._readableState;x("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(x("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Ao,t))}function Ao(t){var e=t._readableState;x("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,jn(t)}function An(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Cc,t,e))}function Cc(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(x("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}T.prototype._read=function(t){dt(this,new Lc("_read()"))};T.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,x("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=i?a:y;n.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(w,S){x("onunpipe"),w===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,d())}function a(){x("onend"),t.end()}var u=Ic(r);t.on("drain",u);var l=!1;function d(){x("cleanup"),t.removeListener("close",v),t.removeListener("finish",f),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",y),r.removeListener("data",g),l=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",g);function g(w){x("ondata");var S=t.write(w);x("dest.write",S),S===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&No(n.pipes,t)!==-1)&&!l&&(x("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(w){x("onerror",w),y(),t.removeListener("error",p),qo(t,"error")===0&&dt(t,w)}Pc(t,"error",p);function v(){t.removeListener("finish",f),y()}t.once("close",v);function f(){x("onfinish"),t.removeListener("close",v),y()}t.once("finish",f);function y(){x("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(x("pipe resume"),r.resume()),t};function Ic(t){return function(){var r=t._readableState;x("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&qo(t,"data")&&(r.flowing=!0,jn(t))}}T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=No(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};T.prototype.on=function(t,e){var r=pt.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,x("on readable",n.length,n.reading),n.length?nr(this):n.reading||process.nextTick($c,this)),r};T.prototype.addListener=T.prototype.on;T.prototype.removeListener=function(t,e){var r=pt.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Po,this),r};T.prototype.removeAllListeners=function(t){var e=pt.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Po,this),e};function Po(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function $c(t){x("readable nexttick read 0"),t.read(0)}T.prototype.resume=function(){var t=this._readableState;return t.flowing||(x("resume"),t.flowing=!t.readableListening,kc(this,t)),t.paused=!1,this};function kc(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Fc,t,e))}function Fc(t,e){x("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),jn(t),e.flowing&&!e.reading&&t.read(0)}T.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function jn(t){var e=t._readableState;for(x("flow",e.flowing);e.flowing&&t.read()!==null;);}T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(x("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(x("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var s=0;s<qn.length;s++)t.on(qn[s],this.emit.bind(this,qn[s]));return this._read=function(o){x("wrapped _read",o),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(T.prototype[Symbol.asyncIterator]=function(){return On===void 0&&(On=wo()),On(this)});Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});T._fromList=jo;Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function jo(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Ln(t){var e=t._readableState;x("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Wc,e,t))}function Wc(t,e){if(x("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(T.from=function(t,e){return Rn===void 0&&(Rn=Mo()),Rn(T,t,e)});function No(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Ce=c((sm,Io)=>{"use strict";var Bc=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Io.exports=ce;var Co=Nn(),Cn=or();Ge()(ce,Co);for(Dn=Bc(Cn.prototype),ir=0;ir<Dn.length;ir++)sr=Dn[ir],ce.prototype[sr]||(ce.prototype[sr]=Cn.prototype[sr]);var Dn,sr,ir;function ce(t){if(!(this instanceof ce))return new ce(t);Co.call(this,t),Cn.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Hc)))}Object.defineProperty(ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ce.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ce.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Hc(){this._writableState.ended||process.nextTick(Uc,this)}function Uc(t){t.end()}Object.defineProperty(ce.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var or=c((om,Ho)=>{"use strict";Ho.exports=I;function ko(t){var e=this;this.next=null,this.entry=null,this.finish=function(){yh(e,t)}}var Ke;I.WritableState=mt;var zc={deprecate:Js()},Fo=hn(),ur=L("buffer").Buffer,Gc=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Vc(t){return ur.from(t)}function Yc(t){return ur.isBuffer(t)||t instanceof Gc}var $n=pn(),Kc=gn(),Jc=Kc.getHighWaterMark,xe=ve().codes,Zc=xe.ERR_INVALID_ARG_TYPE,Qc=xe.ERR_METHOD_NOT_IMPLEMENTED,Xc=xe.ERR_MULTIPLE_CALLBACK,eh=xe.ERR_STREAM_CANNOT_PIPE,th=xe.ERR_STREAM_DESTROYED,rh=xe.ERR_STREAM_NULL_VALUES,nh=xe.ERR_STREAM_WRITE_AFTER_END,ih=xe.ERR_UNKNOWN_ENCODING,Je=$n.errorOrDestroy;Ge()(I,Fo);function sh(){}function mt(t,e,r){Ke=Ke||Ce(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ke),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Jc(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){hh(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ko(this)}mt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(mt.prototype,"buffer",{get:zc.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ar;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ar=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(e){return ar.call(this,e)?!0:this!==I?!1:e&&e._writableState instanceof mt}})):ar=function(e){return e instanceof this};function I(t){Ke=Ke||Ce();var e=this instanceof Ke;if(!e&&!ar.call(I,this))return new I(t);this._writableState=new mt(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Fo.call(this)}I.prototype.pipe=function(){Je(this,new eh)};function oh(t,e){var r=new nh;Je(t,r),process.nextTick(e,r)}function ah(t,e,r,n){var i;return r===null?i=new rh:typeof r!="string"&&!e.objectMode&&(i=new Zc("chunk",["string","Buffer"],r)),i?(Je(t,i),process.nextTick(n,i),!1):!0}I.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&Yc(t);return s&&!ur.isBuffer(t)&&(t=Vc(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=sh),n.ending?oh(this,r):(s||ah(this,n,t,r))&&(n.pendingcb++,i=lh(this,n,s,t,e,r)),i};I.prototype.cork=function(){this._writableState.corked++};I.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Wo(this,t))};I.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new ih(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function uh(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ur.from(e,r)),e}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function lh(t,e,r,n,i,s){if(!r){var o=uh(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else In(t,e,!1,a,n,i,s);return u}function In(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new th("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function fh(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(gt,t,e),t._writableState.errorEmitted=!0,Je(t,n)):(i(n),t._writableState.errorEmitted=!0,Je(t,n),gt(t,e))}function ch(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function hh(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new Xc;if(ch(r),e)fh(t,r,n,e,i);else{var s=Bo(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Wo(t,r),n?process.nextTick($o,t,r,s,i):$o(t,r,s,i)}}function $o(t,e,r,n){r||dh(t,e),e.pendingcb--,n(),gt(t,e)}function dh(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Wo(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,In(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new ko(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,d=r.callback,g=e.objectMode?1:u.length;if(In(t,e,!1,g,u,l,d),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}I.prototype._write=function(t,e,r){r(new Qc("_write()"))};I.prototype._writev=null;I.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||mh(this,n,r),this};Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Bo(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function ph(t,e){t._final(function(r){e.pendingcb--,r&&Je(t,r),e.prefinished=!0,t.emit("prefinish"),gt(t,e)})}function gh(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(ph,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function gt(t,e){var r=Bo(e);if(r&&(gh(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function mh(t,e,r){e.ending=!0,gt(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function yh(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});I.prototype.destroy=$n.destroy;I.prototype._undestroy=$n.undestroy;I.prototype._destroy=function(t,e){e(t)}});var kn=c((am,Go)=>{"use strict";var bh=L("util"),Uo=or(),{LEVEL:zo}=k(),yt=Go.exports=function(e={}){Uo.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};bh.inherits(yt,Uo);yt.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);let i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[zo]]){if(e&&!this.format)return this.log(e,n);let s,o;try{o=this.format.transform(Object.assign({},e),this.format.options)}catch(a){s=a}if(s||!o){if(n(),s)throw s;return}return this.log(o,n)}return this._writableState.sync=!1,n(null)};yt.prototype._writev=function(e,r){if(this.logv){let n=e.filter(this._accept,this);return n.length?this.logv(n,r):r(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,s;try{s=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(o){i=o}if(i||!s){if(e[n].callback(),i)throw r(null),i}else this.log(s,e[n].callback)}return r(null)};yt.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let n=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!n||this.levels[n]>=this.levels[r[zo]])&&(this.handleExceptions||r.exception!==!0))};yt.prototype._nop=function(){}});var Wn=c((um,Yo)=>{"use strict";var _h=L("util"),{LEVEL:Fn}=k(),Vo=kn(),bt=Yo.exports=function(e={}){if(Vo.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(n){this.emit("error",n,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};_h.inherits(bt,Vo);bt.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[e[Fn]])&&this.transport.log(e[Fn],e.message,e,this._nop),n(null)};bt.prototype._writev=function(e,r){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[Fn],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return r(null)};bt.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
-
`))};bt.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var Ze=c((lm,Bn)=>{"use strict";Bn.exports=kn();Bn.exports.LegacyTransportStream=Wn()});var Zo=c((cm,Jo)=>{"use strict";var vh=L("os"),{LEVEL:Ko,MESSAGE:Qe}=k(),wh=Ze();Jo.exports=class extends wh{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:vh.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Ko]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Qe]}${this.eol}`):this._consoleError(e[Qe]),r&&r();return}else if(this.consoleWarnLevels[e[Ko]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Qe]}${this.eol}`):this._consoleWarn(e[Qe]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[Qe]}${this.eol}`):this._consoleLog(e[Qe]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((n,i)=>{if(typeof i!="string")throw new Error(r);return n[i]=!0,n},{})}}});var fr=c((lr,Qo)=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.default=Eh;function Eh(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Qo.exports=lr.default});var ea=c((cr,Xo)=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};Xo.exports=cr.default});var na=c(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.fallback=ta;Me.wrap=ra;var Sh=Me.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,xh=Me.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,Mh=Me.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function ta(t){setTimeout(t,0)}function ra(t){return(e,...r)=>t(()=>e(...r))}var _t;Sh?_t=queueMicrotask:xh?_t=setImmediate:Mh?_t=process.nextTick:_t=ta;Me.default=ra(_t)});var ua=c((hr,aa)=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.default=Ah;var Oh=ea(),Rh=oa(Oh),qh=na(),Th=oa(qh),Lh=Ie();function oa(t){return t&&t.__esModule?t:{default:t}}function Ah(t){return(0,Lh.isAsync)(t)?function(...e){let r=e.pop(),n=t.apply(this,e);return ia(n,r)}:(0,Rh.default)(function(e,r){var n;try{n=t.apply(this,e)}catch(i){return r(i)}if(n&&typeof n.then=="function")return ia(n,r);r(null,n)})}function ia(t,e){return t.then(r=>{sa(e,null,r)},r=>{sa(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function sa(t,e,r){try{t(e,r)}catch(n){(0,Th.default)(i=>{throw i},n)}}aa.exports=hr.default});var Ie=c(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.isAsyncIterable=me.isAsyncGenerator=me.isAsync=void 0;var Ph=ua(),jh=Nh(Ph);function Nh(t){return t&&t.__esModule?t:{default:t}}function la(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Dh(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function Ch(t){return typeof t[Symbol.asyncIterator]=="function"}function Ih(t){if(typeof t!="function")throw new Error("expected a function");return la(t)?(0,jh.default)(t):t}me.default=Ih;me.isAsync=la;me.isAsyncGenerator=Dh;me.isAsyncIterable=Ch});var Xe=c((dr,fa)=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.default=$h;function $h(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...n){return typeof n[e-1]=="function"?t.apply(this,n):new Promise((i,s)=>{n[e-1]=(o,...a)=>{if(o)return s(o);i(a.length>1?a:a[0])},t.apply(this,n)})}return r}fa.exports=dr.default});var ha=c((pr,ca)=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});var kh=fr(),Fh=Hn(kh),Wh=Ie(),Bh=Hn(Wh),Hh=Xe(),Uh=Hn(Hh);function Hn(t){return t&&t.__esModule?t:{default:t}}pr.default=(0,Uh.default)((t,e,r)=>{var n=(0,Fh.default)(e)?[]:{};t(e,(i,s,o)=>{(0,Bh.default)(i)((a,...u)=>{u.length<2&&([u]=u),n[s]=u,o(a)})},i=>r(i,n))},3);ca.exports=pr.default});var Un=c((gr,da)=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.default=zh;function zh(t){function e(...r){if(t!==null){var n=t;t=null,n.apply(this,r)}}return Object.assign(e,t),e}da.exports=gr.default});var ga=c((mr,pa)=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};pa.exports=mr.default});var ba=c((yr,ya)=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.default=Xh;var Gh=fr(),Vh=ma(Gh),Yh=ga(),Kh=ma(Yh);function ma(t){return t&&t.__esModule?t:{default:t}}function Jh(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function Zh(t){var e=-1;return function(){var n=t.next();return n.done?null:(e++,{value:n.value,key:e})}}function Qh(t){var e=t?Object.keys(t):[],r=-1,n=e.length;return function i(){var s=e[++r];return s==="__proto__"?i():r<n?{value:t[s],key:s}:null}}function Xh(t){if((0,Vh.default)(t))return Jh(t);var e=(0,Kh.default)(t);return e?Zh(e):Qh(t)}ya.exports=yr.default});var zn=c((br,_a)=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.default=ed;function ed(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}_a.exports=br.default});var vr=c((_r,va)=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});var td={};_r.default=td;va.exports=_r.default});var Ea=c((wr,wa)=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.default=sd;var rd=vr(),nd=id(rd);function id(t){return t&&t.__esModule?t:{default:t}}function sd(t,e,r,n){let i=!1,s=!1,o=!1,a=0,u=0;function l(){a>=e||o||i||(o=!0,t.next().then(({value:p,done:v})=>{if(!(s||i)){if(o=!1,v){i=!0,a<=0&&n(null);return}a++,r(p,u,d),u++,l()}}).catch(g))}function d(p,v){if(a-=1,!s){if(p)return g(p);if(p===!1){i=!0,s=!0;return}if(v===nd.default||i&&a<=0)return i=!0,n(null);l()}}function g(p){s||(o=!1,i=!0,n(p))}l()}wa.exports=wr.default});var Oa=c((Er,Ma)=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});var od=Un(),ad=vt(od),ud=ba(),ld=vt(ud),fd=zn(),cd=vt(fd),Sa=Ie(),hd=Ea(),xa=vt(hd),dd=vr(),pd=vt(dd);function vt(t){return t&&t.__esModule?t:{default:t}}Er.default=t=>(e,r,n)=>{if(n=(0,ad.default)(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if((0,Sa.isAsyncGenerator)(e))return(0,xa.default)(e,t,r,n);if((0,Sa.isAsyncIterable)(e))return(0,xa.default)(e[Symbol.asyncIterator](),t,r,n);var i=(0,ld.default)(e),s=!1,o=!1,a=0,u=!1;function l(g,p){if(!o)if(a-=1,g)s=!0,n(g);else if(g===!1)s=!0,o=!0;else{if(p===pd.default||s&&a<=0)return s=!0,n(null);u||d()}}function d(){for(u=!0;a<t&&!s;){var g=i();if(g===null){s=!0,a<=0&&n(null);return}a+=1,r(g.value,g.key,(0,cd.default)(l))}u=!1}d()};Ma.exports=Er.default});var Vn=c((Sr,Ra)=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});var gd=Oa(),md=Gn(gd),yd=Ie(),bd=Gn(yd),_d=Xe(),vd=Gn(_d);function Gn(t){return t&&t.__esModule?t:{default:t}}function wd(t,e,r,n){return(0,md.default)(e)(t,(0,bd.default)(r),n)}Sr.default=(0,vd.default)(wd,4);Ra.exports=Sr.default});var La=c((xr,Ta)=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});var Ed=Vn(),Sd=qa(Ed),xd=Xe(),Md=qa(xd);function qa(t){return t&&t.__esModule?t:{default:t}}function Od(t,e,r){return(0,Sd.default)(t,1,e,r)}xr.default=(0,Md.default)(Od,3);Ta.exports=xr.default});var ja=c((Mr,Pa)=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.default=Ad;var Rd=ha(),qd=Aa(Rd),Td=La(),Ld=Aa(Td);function Aa(t){return t&&t.__esModule?t:{default:t}}function Ad(t,e){return(0,qd.default)(Ld.default,t,e)}Pa.exports=Mr.default});var Yn=c((pm,Da)=>{"use strict";Da.exports=ye;var Or=ve().codes,Pd=Or.ERR_METHOD_NOT_IMPLEMENTED,jd=Or.ERR_MULTIPLE_CALLBACK,Nd=Or.ERR_TRANSFORM_ALREADY_TRANSFORMING,Dd=Or.ERR_TRANSFORM_WITH_LENGTH_0,Rr=Ce();Ge()(ye,Rr);function Cd(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new jd);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function ye(t){if(!(this instanceof ye))return new ye(t);Rr.call(this,t),this._transformState={afterTransform:Cd.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Id)}function Id(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Na(t,e,r)}):Na(this,null,null)}ye.prototype.push=function(t,e){return this._transformState.needTransform=!1,Rr.prototype.push.call(this,t,e)};ye.prototype._transform=function(t,e,r){r(new Pd("_transform()"))};ye.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};ye.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};ye.prototype._destroy=function(t,e){Rr.prototype._destroy.call(this,t,function(r){e(r)})};function Na(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Dd;if(t._transformState.transforming)throw new Nd;return t.push(null)}});var $a=c((gm,Ia)=>{"use strict";Ia.exports=wt;var Ca=Yn();Ge()(wt,Ca);function wt(t){if(!(this instanceof wt))return new wt(t);Ca.call(this,t)}wt.prototype._transform=function(t,e,r){r(null,t)}});var Ha=c((mm,Ba)=>{"use strict";var Kn;function $d(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Wa=ve().codes,kd=Wa.ERR_MISSING_ARGS,Fd=Wa.ERR_STREAM_DESTROYED;function ka(t){if(t)throw t}function Wd(t){return t.setHeader&&typeof t.abort=="function"}function Bd(t,e,r,n){n=$d(n);var i=!1;t.on("close",function(){i=!0}),Kn===void 0&&(Kn=Qt()),Kn(t,{readable:e,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Wd(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(o||new Fd("pipe"))}}}function Fa(t){t()}function Hd(t,e){return t.pipe(e)}function Ud(t){return!t.length||typeof t[t.length-1]!="function"?ka:t.pop()}function zd(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=Ud(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new kd("streams");var i,s=e.map(function(o,a){var u=a<e.length-1,l=a>0;return Bd(o,u,l,function(d){i||(i=d),d&&s.forEach(Fa),!u&&(s.forEach(Fa),n(i))})});return e.reduce(Hd)}Ba.exports=zd});var $e=c((ne,St)=>{var Et=L("stream");process.env.READABLE_STREAM==="disable"&&Et?(St.exports=Et.Readable,Object.assign(St.exports,Et),St.exports.Stream=Et):(ne=St.exports=Nn(),ne.Stream=Et||ne,ne.Readable=ne,ne.Writable=or(),ne.Duplex=Ce(),ne.Transform=Yn(),ne.PassThrough=$a(),ne.finished=Qt(),ne.pipeline=Ha())});var ri=c((ym,za)=>{var et=[],xt=[],Jn=function(){};function Qn(t){return~et.indexOf(t)?!1:(et.push(t),!0)}function Xn(t){Jn=t}function Gd(t){for(var e=[],r=0;r<et.length;r++){if(et[r].async){e.push(et[r]);continue}if(et[r](t))return!0}return e.length?new Promise(function(i){Promise.all(e.map(function(o){return o(t)})).then(function(o){i(o.some(Boolean))})}):!1}function ei(t){return~xt.indexOf(t)?!1:(xt.push(t),!0)}function Zn(){Jn.apply(Jn,arguments)}function Ua(t){for(var e=0;e<xt.length;e++)t=xt[e].apply(xt[e],arguments);return t}function ti(t,e){var r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&(t[n]=e[n]);return t}function Vd(t){return t.enabled=!1,t.modify=ei,t.set=Xn,t.use=Qn,ti(function(){return!1},t)}function Yd(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Zn.call(Zn,t,Ua(r,t)),!0}return t.enabled=!0,t.modify=ei,t.set=Xn,t.use=Qn,ti(e,t)}za.exports=function(e){return e.introduce=ti,e.enabled=Gd,e.process=Ua,e.modify=ei,e.write=Zn,e.nope=Vd,e.yep=Yd,e.set=Xn,e.use=Qn,e}});var Va=c((bm,Ga)=>{var Kd=ri(),Jd=Kd(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});Ga.exports=Jd});var Xa=c((_m,Qa)=>{"use strict";var he={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ka=Object.create(null);for(let t in he)Object.hasOwn(he,t)&&(Ka[he[t]]=t);var B={to:{},get:{}};B.get=function(t){let e=t.slice(0,3).toLowerCase(),r,n;switch(e){case"hsl":{r=B.get.hsl(t),n="hsl";break}case"hwb":{r=B.get.hwb(t),n="hwb";break}default:{r=B.get.rgb(t),n="rgb";break}}return r?{model:n,value:r}:null};B.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,u,l;if(a=t.match(r)){for(l=a[2],a=a[1],u=0;u<3;u++){let d=u*2;o[u]=Number.parseInt(a.slice(d,d+2),16)}l&&(o[3]=Number.parseInt(l,16)/255)}else if(a=t.match(e)){for(a=a[1],l=a[3],u=0;u<3;u++)o[u]=Number.parseInt(a[u]+a[u],16);l&&(o[3]=Number.parseInt(l+l,16)/255)}else if(a=t.match(n)){for(u=0;u<3;u++)o[u]=Number.parseInt(a[u+1],10);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(i)){for(u=0;u<3;u++)o[u]=Math.round(Number.parseFloat(a[u+1])*2.55);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(he,a[1])?(o=he[a[1]],o[3]=1,o):null:null;for(u=0;u<3;u++)o[u]=Oe(o[u],0,255);return o[3]=Oe(o[3],0,1),o};B.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,s=Oe(Number.parseFloat(r[2]),0,100),o=Oe(Number.parseFloat(r[3]),0,100),a=Oe(Number.isNaN(n)?1:n,0,1);return[i,s,o,a]}return null};B.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,s=Oe(Number.parseFloat(r[2]),0,100),o=Oe(Number.parseFloat(r[3]),0,100),a=Oe(Number.isNaN(n)?1:n,0,1);return[i,s,o,a]}return null};B.to.hex=function(...t){return"#"+qr(t[0])+qr(t[1])+qr(t[2])+(t[3]<1?qr(Math.round(t[3]*255)):"")};B.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};B.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"};B.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};B.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};B.to.keyword=function(...t){return Ka[t.slice(0,3)]};function Oe(t,e,r){return Math.min(Math.max(e,t),r)}function qr(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var Ja={};for(let t of Object.keys(he))Ja[he[t]]=t;var m={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},be=(6/29)**3;function tt(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function rt(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(m)){if(!("channels"in m[t]))throw new Error("missing channels property: "+t);if(!("labels"in m[t]))throw new Error("missing channel labels property: "+t);if(m[t].labels.length!==m[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=m[t];delete m[t].channels,delete m[t].labels,Object.defineProperty(m[t],"channels",{value:e}),Object.defineProperty(m[t],"labels",{value:r})}m.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,u;switch(s){case i:{a=0;break}case e:{a=(r-n)/o;break}case r:{a=2+(n-e)/o;break}case n:{a=4+(e-r)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);let l=(i+s)/2;return s===i?u=0:l<=.5?u=o/(s+i):u=o/(2-s-i),[a,u*100,l*100]};m.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,u=t[2]/255,l=Math.max(o,a,u),d=l-Math.min(o,a,u),g=function(p){return(l-p)/6/d+1/2};if(d===0)i=0,s=0;else{switch(s=d/l,e=g(o),r=g(a),n=g(u),l){case o:{i=n-r;break}case a:{i=1/3+e-n;break}case u:{i=2/3+r-e;break}}i<0?i+=1:i>1&&(i-=1)}return[i*360,s*100,l*100]};m.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=m.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};m.rgb.oklab=function(t){let e=rt(t[0]/255),r=rt(t[1]/255),n=rt(t[2]/255),i=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*n),s=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*n),o=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*n),a=.2104542553*i+.793617785*s-.0040720468*o,u=1.9779984951*i-2.428592205*s+.4505937099*o,l=.0259040371*i+.7827717662*s-.808675766*o;return[a*100,u*100,l*100]};m.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function Zd(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}m.rgb.keyword=function(t){let e=Ja[t];if(e)return e;let r=Number.POSITIVE_INFINITY,n;for(let i of Object.keys(he)){let s=he[i],o=Zd(t,s);o<r&&(r=o,n=i)}return n};m.keyword.rgb=function(t){return he[t]};m.rgb.xyz=function(t){let e=rt(t[0]/255),r=rt(t[1]/255),n=rt(t[2]/255),i=e*.4124564+r*.3575761+n*.1804375,s=e*.2126729+r*.7151522+n*.072175,o=e*.0193339+r*.119192+n*.9503041;return[i*100,s*100,o*100]};m.rgb.lab=function(t){let e=m.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>be?r**(1/3):7.787*r+16/116,n=n>be?n**(1/3):7.787*n+16/116,i=i>be?i**(1/3):7.787*i+16/116;let s=116*n-16,o=500*(r-n),a=200*(n-i);return[s,o,a]};m.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s;if(r===0)return s=n*255,[s,s,s];let o=n<.5?n*(1+r):n+r-n*r,a=2*n-o,u=[0,0,0];for(let l=0;l<3;l++)i=e+1/3*-(l-1),i<0&&i++,i>1&&i--,6*i<1?s=a+(o-a)*6*i:2*i<1?s=o:3*i<2?s=a+(o-a)*(2/3-i)*6:s=a,u[l]=s*255;return u};m.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return[e,a*100,o*100]};m.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,o];case 1:return[a,n,o];case 2:return[o,n,u];case 3:return[o,a,n];case 4:return[u,o,n];case 5:return[n,o,a]}};m.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};m.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let o=Math.floor(6*e),a=1-n;s=6*e-o,(o&1)!==0&&(s=1-s);let u=r+s*(a-r),l,d,g;switch(o){default:case 6:case 0:{l=a,d=u,g=r;break}case 1:{l=u,d=a,g=r;break}case 2:{l=r,d=a,g=u;break}case 3:{l=r,d=u,g=a;break}case 4:{l=u,d=r,g=a;break}case 5:{l=a,d=r,g=u;break}}return[l*255,d*255,g*255]};m.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[s*255,o*255,a*255]};m.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2404542+r*-1.5371385+n*-.4985314,s=e*-.969266+r*1.8760108+n*.041556,o=e*.0556434+r*-.2040259+n*1.0572252,i=tt(i),s=tt(s),o=tt(o),[i*255,s*255,o*255]};m.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>be?e**(1/3):7.787*e+16/116,r=r>be?r**(1/3):7.787*r+16/116,n=n>be?n**(1/3):7.787*n+16/116;let i=116*r-16,s=500*(e-r),o=200*(r-n);return[i,s,o]};m.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*n),s=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*n),o=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*n),a=.2104542553*i+.793617785*s-.0040720468*o,u=1.9779984951*i-2.428592205*s+.4505937099*o,l=.0259040371*i+.7827717662*s-.808675766*o;return[a*100,u*100,l*100]};m.oklab.oklch=function(t){return m.lab.lch(t)};m.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(.999999998*e+.396337792*r+.215803758*n)**3,s=(1.000000008*e-.105561342*r-.063854175*n)**3,o=(1.000000055*e-.089484182*r-1.291485538*n)**3,a=1.227013851*i-.55779998*s+.281256149*o,u=-.040580178*i+1.11225687*s-.071676679*o,l=-.076381285*i-.421481978*s+1.58616322*o;return[a*100,u*100,l*100]};m.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(e+.3963377774*r+.2158037573*n)**3,s=(e-.1055613458*r-.0638541728*n)**3,o=(e-.0894841775*r-1.291485548*n)**3,a=tt(4.0767416621*i-3.3077115913*s+.2309699292*o),u=tt(-1.2684380046*i+2.6097574011*s-.3413193965*o),l=tt(-.0041960863*i-.7034186147*s+1.707614701*o);return[a*255,u*255,l*255]};m.oklch.oklab=function(t){return m.lch.lab(t)};m.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;let a=s**3,u=i**3,l=o**3;return s=a>be?a:(s-16/116)/7.787,i=u>be?u:(i-16/116)/7.787,o=l>be?l:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};m.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(r*r+n*n);return[e,o,i]};m.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};m.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?m.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};m.hsv.ansi16=function(t){return m.rgb.ansi16(m.hsv.rgb(t),t[2])};m.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e>>4===r>>4&&r>>4===n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};m.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[n,i,s]};m.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};m.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};m.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let n=Number.parseInt(r,16),i=n>>16&255,s=n>>8&255,o=n&255;return[i,s,o]};m.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),o=i-s,a,u=o<1?s/(1-o):0;return o<=0?a=0:i===e?a=(r-n)/o%6:i===r?a=2+(n-e)/o:a=4+(e-r)/o,a/=6,a%=1,[a*360,o*100,u*100]};m.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};m.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};m.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],s=e%1*6,o=s%1,a=1-o,u=0;switch(Math.floor(s)){case 0:{i[0]=1,i[1]=o,i[2]=0;break}case 1:{i[0]=a,i[1]=1,i[2]=0;break}case 2:{i[0]=0,i[1]=1,i[2]=o;break}case 3:{i[0]=0,i[1]=a,i[2]=1;break}case 4:{i[0]=o,i[1]=0,i[2]=1;break}default:i[0]=1,i[1]=0,i[2]=a}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};m.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};m.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};m.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};m.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};m.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};m.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};m.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};m.gray.hsl=function(t){return[0,0,t[0]]};m.gray.hsv=m.gray.hsl;m.gray.hwb=function(t){return[0,100,t[0]]};m.gray.cmyk=function(t){return[0,0,0,t[0]]};m.gray.lab=function(t){return[t[0],0,0]};m.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(n.length)+n};m.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function Qd(){let t={},e=Object.keys(m);for(let{length:r}=e,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Xd(t){let e=Qd(),r=[t];for(e[t].distance=0;r.length>0;){let n=r.pop(),i=Object.keys(m[n]);for(let{length:s}=i,o=0;o<s;o++){let a=i[o],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}}return e}function ep(t,e){return function(r){return e(t(r))}}function tp(t,e){let r=[e[t].parent,t],n=m[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=ep(m[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}function rp(t){let e=Xd(t),r={},n=Object.keys(e);for(let{length:i}=n,s=0;s<i;s++){let o=n[s];e[o].parent!==null&&(r[o]=tp(o,e))}return r}var H={},np=Object.keys(m);function ip(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function sp(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let{length:s}=i,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of np){H[t]={},Object.defineProperty(H[t],"channels",{value:m[t].channels}),Object.defineProperty(H[t],"labels",{value:m[t].labels});let e=rp(t),r=Object.keys(e);for(let n of r){let i=e[n];H[t][n]=sp(i),H[t][n].raw=ip(i)}}var Za=["keyword","gray","hex"],ni={};for(let t of Object.keys(H))ni[[...H[t].labels].sort().join("")]=t;var ii={};function W(t,e){if(!(this instanceof W))return new W(t,e);if(e&&e in Za&&(e=null),e&&!(e in H))throw new Error("Unknown model: "+e);let r,n;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof W)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let i=B.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,n=H[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=H[this.model].channels;let i=Array.prototype.slice.call(t,0,n);this.color=si(i,n),this.valpha=typeof t[n]=="number"?t[n]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=i.sort().join("");if(!(s in ni))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=ni[s];let{labels:o}=H[this.model],a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=si(a)}if(ii[this.model])for(n=H[this.model].channels,r=0;r<n;r++){let i=ii[this.model][r];i&&(this.color[r]=i(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}W.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in B.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return B.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return B.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=H[this.model],{labels:r}=H[this.model];for(let n=0;n<e;n++)t[r[n]]=this.color[n];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new W([...this.color.map(ap(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new W([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:$("rgb",0,F(255)),green:$("rgb",1,F(255)),blue:$("rgb",2,F(255)),hue:$(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:$("hsl",1,F(100)),lightness:$("hsl",2,F(100)),saturationv:$("hsv",1,F(100)),value:$("hsv",2,F(100)),chroma:$("hcg",1,F(100)),gray:$("hcg",2,F(100)),white:$("hwb",1,F(100)),wblack:$("hwb",2,F(100)),cyan:$("cmyk",0,F(100)),magenta:$("cmyk",1,F(100)),yellow:$("cmyk",2,F(100)),black:$("cmyk",3,F(100)),x:$("xyz",0,F(95.047)),y:$("xyz",1,F(100)),z:$("xyz",2,F(108.833)),l:$("lab",0,F(100)),a:$("lab",1),b:$("lab",2),keyword(t){return t!==void 0?new W(t):H[this.model].keyword(this.color)},hex(t){return t!==void 0?new W(t):B.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new W(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),B.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,n]of t.entries()){let i=n/255;e[r]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return W.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),n=this.rgb(),i=e===void 0?.5:e,s=2*i-1,o=r.alpha()-n.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-a;return W.rgb(a*r.red()+u*n.red(),a*r.green()+u*n.green(),a*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(let t of Object.keys(H)){if(Za.includes(t))continue;let{channels:e}=H[t];W.prototype[t]=function(...r){return this.model===t?new W(this):r.length>0?new W(r,t):new W([...up(H[this.model][t].raw(this.color)),this.valpha],t)},W[t]=function(...r){let n=r[0];return typeof n=="number"&&(n=si(r,e)),new W(n,t)}}function op(t,e){return Number(t.toFixed(e))}function ap(t){return function(e){return op(e,t)}}function $(t,e,r){t=Array.isArray(t)?t:[t];for(let n of t)(ii[n]||=[])[e]=r;return t=t[0],function(n){let i;return n!==void 0?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function F(t){return function(e){return Math.max(0,Math.min(t,e))}}function up(t){return Array.isArray(t)?t:[t]}function si(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function lp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fp=function(e){for(var r=0,n=0;r<e.length;n=e.charCodeAt(r++)+((n<<5)-n));var i=Math.floor(Math.abs(Math.sin(n)*1e4%1*16777216)).toString(16);return"#"+Array(6-i.length+1).join("0")+i},Ya=lp(fp);function cp(t,e){let r=t.split(e||":"),n=Ya(r[0]);if(!r.length)return n;for(let i=0,s=r.length-1;i<s;i++)n=W(n).mix(W(Ya(r[i+1]))).saturate(1).hex();return n}Qa.exports=cp});var tu=c((vm,eu)=>{"use strict";function oe(t,e){if(e)return new oe(t).style(e);if(!(this instanceof oe))return new oe(t);this.text=t}oe.prototype.prefix="\x1B[";oe.prototype.suffix="m";oe.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),n=e.substring(2,4),i=e.substring(4,6);return[parseInt(r,16),parseInt(n,16),parseInt(i,16)]};oe.prototype.rgb=function(e,r,n){var i=e/255*5,s=r/255*5,o=n/255*5;return this.ansi(i,s,o)};oe.prototype.ansi=function(e,r,n){var i=Math.round(e),s=Math.round(r),o=Math.round(n);return 16+i*36+s*6+o};oe.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};oe.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};eu.exports=oe});var nu=c((wm,ru)=>{var hp=Xa(),dp=tu();ru.exports=function(e,r){var n=r.namespace,i=r.colors!==!1?dp(n+":",hp(n)):n+":";return e[0]=i+" "+e[0],e}});var su=c((Em,iu)=>{"use strict";iu.exports=function(e,r){if(!r)return!1;for(var n=r.split(/[\s,]+/),i=0;i<n.length;i++){if(r=n[i].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var au=c((Sm,ou)=>{var pp=su();ou.exports=function(e){return function(n){try{return pp(n,e())}catch{}return!1}}});var lu=c((xm,uu)=>{var gp=au();uu.exports=gp(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var cu=c((Mm,fu)=>{fu.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var du=c((Om,hu)=>{var mp=ri(),yp=L("tty").isatty(1),Tr=mp(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:yp,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Tr.modify(nu());Tr.use(lu());Tr.set(cu());hu.exports=Tr});var Mt=c((Rm,oi)=>{process.env.NODE_ENV==="production"?oi.exports=Va():oi.exports=du()});var gu=c((qm,pu)=>{"use strict";var ai=L("fs"),{StringDecoder:bp}=L("string_decoder"),{Stream:_p}=$e();function vp(){}pu.exports=(t,e)=>{let r=Buffer.alloc(65536),n=new bp("utf8"),i=new _p,s="",o=0,a=0;return t.start===-1&&delete t.start,i.readable=!0,i.destroy=()=>{i.destroyed=!0,i.emit("end"),i.emit("close")},ai.open(t.file,"a+","0644",(u,l)=>{if(u){e?e(u):i.emit("error",u),i.destroy();return}(function d(){if(i.destroyed){ai.close(l,vp);return}return ai.read(l,r,0,r.length,o,(g,p)=>{if(g){e?e(g):i.emit("error",g),i.destroy();return}if(!p)return s&&((t.start==null||a>t.start)&&(e?e(null,s):i.emit("line",s)),a++,s=""),setTimeout(d,1e3);let v=n.write(r.slice(0,p));e||i.emit("data",v),v=(s+v).split(/\n+/);let f=v.length-1,y=0;for(;y<f;y++)(t.start==null||a>t.start)&&(e?e(null,v[y]):i.emit("line",v[y])),a++;return s=v[f],o+=p,d()})})()}),e?i.destroy:i}});var _u=c((Lm,bu)=>{"use strict";var Q=L("fs"),U=L("path"),mu=ja(),wp=L("zlib"),{MESSAGE:Ep}=k(),{Stream:Sp,PassThrough:yu}=$e(),xp=Ze(),ae=Mt()("winston:file"),Mp=L("os"),Op=gu();bu.exports=class extends xp{constructor(e={}){super(e),this.name=e.name||"file";function r(n,...i){i.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${n} together`)})}if(this._stream=new yu,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?U.basename(e.filename):"winston.log",this.dirname=e.dirname||U.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=U.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:Mp.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}_final(e){if(this._opening){this.once("open",()=>this._final(e));return}if(this._stream.end(),!this._dest||this._dest.writableFinished)return e();this._dest.once("finish",e),this._dest.once("error",e)}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let n=`${e[Ep]}${this.eol}`,i=Buffer.byteLength(n);function s(){if(this._size+=i,this._pendingSize-=i,ae("logged %s %s",this._size,n),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let o=this._stream.write(n,s.bind(this));return o?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),ae("written",o,this._drain),this.finishIfEnding(),o}query(e,r){typeof e=="function"&&(r=e,e={}),e=g(e);let n=U.join(this.dirname,this.filename),i="",s=[],o=0,a=Q.createReadStream(n,{encoding:"utf8"});a.on("error",p=>{if(a.readable&&a.destroy(),!!r)return p.code!=="ENOENT"?r(p):r(null,s)}),a.on("data",p=>{p=(i+p).split(/\n+/);let v=p.length-1,f=0;for(;f<v;f++)(!e.start||o>=e.start)&&u(p[f]),o++;i=p[v]}),a.on("close",()=>{i&&u(i,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function u(p,v){try{let f=JSON.parse(p);d(f)&&l(f)}catch(f){v||a.emit("error",f)}}function l(p){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(p=e.fields.reduce((v,f)=>(v[f]=p[f],v),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(p)}function d(p){if(!p||typeof p!="object")return;let v=new Date(p.timestamp);if(!(e.from&&v<e.from||e.until&&v>e.until||e.level&&e.level!==p.level))return!0}function g(p){return p=p||{},p.rows=p.rows||p.limit||10,p.start=p.start||0,p.until=p.until||new Date,typeof p.until!="object"&&(p.until=new Date(p.until)),p.from=p.from||p.until-1440*60*1e3,typeof p.from!="object"&&(p.from=new Date(p.from)),p.order=p.order||"desc",p}}stream(e={}){let r=U.join(this.dirname,this.filename),n=new Sp,i={file:r,start:e.start};return n.destroy=Op(i,(s,o)=>{if(s)return n.emit("error",s);try{n.emit("data",o),o=JSON.parse(o),n.emit("log",o)}catch(a){n.emit("error",a)}}),n}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);ae("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),n=U.join(this.dirname,r);Q.stat(n,(i,s)=>{if(i&&i.code==="ENOENT")return ae("ENOENT\xA0ok",n),this.filename=r,e(null,0);if(i)return ae(`err ${i.code} ${n}`),e(i);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=U.join(this.dirname,this.filename);ae("create stream start",r,this.options);let n=Q.createWriteStream(r,this.options).on("error",i=>ae(i)).on("close",()=>ae("close",n.path,n.bytesWritten)).on("open",()=>{ae("file open ok",r),this.emit("open",r),e.pipe(n),this.rotatedWhileOpening&&(this._stream=new yu,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),e.end())});return ae("create stream ok",r),n}_incFile(e){ae("_incFile",this.filename);let r=U.extname(this._basename),n=U.basename(this._basename,r),i=[];this.zippedArchive&&i.push(function(s){let o=this._created>0&&!this.tailable?this._created:"";this._compressFile(U.join(this.dirname,`${n}${o}${r}`),U.join(this.dirname,`${n}${o}${r}.gz`),s)}.bind(this)),i.push(function(s){this.tailable?this._checkMaxFilesTailable(r,n,s):(this._created+=1,this._checkMaxFilesIncrementing(r,n,s))}.bind(this)),mu(i,e)}_getFile(){let e=U.extname(this._basename),r=U.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${n}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let i=this._created-this.maxFiles,s=i!==0?i:"",o=this.zippedArchive?".gz":"",a=`${r}${s}${e}${o}`,u=U.join(this.dirname,a);Q.unlink(u,n)}_checkMaxFilesTailable(e,r,n){let i=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let o=this.maxFiles-1;o>1;o--)i.push(function(a,u){let l=`${r}${a-1}${e}${s}`,d=U.join(this.dirname,l);Q.exists(d,g=>{if(!g)return u(null);l=`${r}${a}${e}${s}`,Q.rename(d,U.join(this.dirname,l),u)})}.bind(this,o));mu(i,()=>{Q.rename(U.join(this.dirname,`${r}${e}${s}`),U.join(this.dirname,`${r}1${e}${s}`),n)})}_compressFile(e,r,n){Q.access(e,Q.F_OK,i=>{if(i)return n();var s=wp.createGzip(),o=Q.createReadStream(e),a=Q.createWriteStream(r);a.on("finish",()=>{Q.unlink(e,n)}),o.pipe(s).pipe(a)})}_createLogDirIfNotExist(e){Q.existsSync(e)||Q.mkdirSync(e,{recursive:!0})}}});var wu=c((Pm,vu)=>{"use strict";var Rp=L("http"),qp=L("https"),{Stream:Tp}=$e(),Lp=Ze(),{configure:Ap}=lt();vu.exports=class extends Lp{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(n,i)=>{i&&i.statusCode!==200&&(n=new Error(`Invalid HTTP Status Code: ${i.statusCode}`)),n?this.emit("warn",n):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let n=e.params.auth||null;delete e.params.auth;let i=e.params.path||null;delete e.params.path,this._request(e,n,i,(s,o,a)=>{if(o&&o.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${o.statusCode}`)),s)return r(s);if(typeof a=="string")try{a=JSON.parse(a)}catch(u){return r(u)}r(null,a)})}stream(e={}){let r=new Tp;e={method:"stream",params:e};let n=e.params.path||null;delete e.params.path;let i=e.params.auth||null;delete e.params.auth;let s="",o=this._request(e,i,n);return r.destroy=()=>o.destroy(),o.on("data",a=>{a=(s+a).split(/\n+/);let u=a.length-1,l=0;for(;l<u;l++)try{r.emit("log",JSON.parse(a[l]))}catch(d){r.emit("error",d)}s=a[u]}),o.on("error",a=>r.emit("error",a)),r}_request(e,r,n,i){e=e||{},r=r||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,r,n):this._doRequest(e,i,r,n)}_doBatch(e,r,n,i){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,n,i)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}_doBatchRequest(e,r,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,r,n)}_doRequest(e,r,n,i){let s=Object.assign({},this.headers);n&&n.bearer&&(s.Authorization=`Bearer ${n.bearer}`);let o=(this.ssl?qp:Rp).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:s,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});o.on("error",r),o.on("response",u=>u.on("end",()=>r(null,u)).resume());let a=Ap({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var ui=c((jm,Eu)=>{"use strict";var de=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";de.writable=t=>de(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";de.readable=t=>de(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";de.duplex=t=>de.writable(t)&&de.readable(t);de.transform=t=>de.duplex(t)&&typeof t._transform=="function";Eu.exports=de});var xu=c((Dm,Su)=>{"use strict";var Pp=ui(),{MESSAGE:jp}=k(),Np=L("os"),Dp=Ze();Su.exports=class extends Dp{constructor(e={}){if(super(e),!e.stream||!Pp(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:Np.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[jp]}${this.eol}`),r&&r()}}});var Mu=c(Ot=>{"use strict";Object.defineProperty(Ot,"Console",{configurable:!0,enumerable:!0,get(){return Zo()}});Object.defineProperty(Ot,"File",{configurable:!0,enumerable:!0,get(){return _u()}});Object.defineProperty(Ot,"Http",{configurable:!0,enumerable:!0,get(){return wu()}});Object.defineProperty(Ot,"Stream",{configurable:!0,enumerable:!0,get(){return xu()}})});var Ar=c(Rt=>{"use strict";var Lr=fn(),{configs:li}=k();Rt.cli=Lr.levels(li.cli);Rt.npm=Lr.levels(li.npm);Rt.syslog=Lr.levels(li.syslog);Rt.addColors=Lr.levels});var Ru=c((Pr,Ou)=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});var Cp=fr(),Ip=ke(Cp),$p=vr(),kp=ke($p),Fp=Vn(),Wp=ke(Fp),Bp=Un(),Hp=ke(Bp),Up=zn(),zp=ke(Up),Gp=Ie(),Vp=ke(Gp),Yp=Xe(),Kp=ke(Yp);function ke(t){return t&&t.__esModule?t:{default:t}}function Jp(t,e,r){r=(0,Hp.default)(r);var n=0,i=0,{length:s}=t,o=!1;s===0&&r(null);function a(u,l){u===!1&&(o=!0),o!==!0&&(u?r(u):(++i===s||l===kp.default)&&r(null))}for(;n<s;n++)e(t[n],n,(0,zp.default)(a))}function Zp(t,e,r){return(0,Wp.default)(t,1/0,e,r)}function Qp(t,e,r){var n=(0,Ip.default)(t)?Jp:Zp;return n(t,(0,Vp.default)(e),r)}Pr.default=(0,Kp.default)(Qp,3);Ou.exports=Pr.default});var Tu=c((jr,qu)=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.default=Xp;function Xp(t){return(e,r,n)=>t(e,n)}qu.exports=jr.default});var Cr=c((Dr,Lu)=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});var eg=Ru(),tg=Nr(eg),rg=Tu(),ng=Nr(rg),ig=Ie(),sg=Nr(ig),og=Xe(),ag=Nr(og);function Nr(t){return t&&t.__esModule?t:{default:t}}function ug(t,e,r){return(0,tg.default)(t,(0,ng.default)((0,sg.default)(e)),r)}Dr.default=(0,ag.default)(ug,3);Lu.exports=Dr.default});var Pu=c(($m,Au)=>{"use strict";var lg=Object.prototype.toString;Au.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),n=lg.call(e).slice(8,-1);return n==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=n,r||"anonymous"}});var fi=c((km,ju)=>{"use strict";var fg=Pu();ju.exports=function(e){var r=0,n;function i(){return r||(r=1,n=e.apply(this,arguments),e=null),n}return i.displayName=fg(e),i}});var ci=c(Tt=>{Tt.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o},Error.captureStackTrace(r,t||Tt.get);var i=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i};Tt.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
-
`).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:n,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var i=n.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(i){var s=null,o=null,a=null,u=null,l=null,d=i[5]==="native";if(i[1]){a=i[1];var g=a.lastIndexOf(".");if(a[g-1]=="."&&g--,g>0){s=a.substr(0,g),o=a.substr(g+1);var p=s.indexOf(".Module");p>0&&(a=a.substr(p+1),s=s.substr(0,p))}u=null}o&&(u=s,l=o),o==="<anonymous>"&&(l=null,a=null);var v={fileName:i[2]||null,lineNumber:parseInt(i[3],10)||null,functionName:a,typeName:u,methodName:l,columnNumber:parseInt(i[4],10)||null,native:d};return e._createParsedCallSite(v)}}).filter(function(n){return!!n})};function qt(t){for(var e in t)this[e]=t[e]}var
|
|
29
|
-
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:
|
|
30
|
-
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:
|
|
31
|
-
`));f&&this.exceptions.handle(f),y&&this.rejections.handle(y)}getHighestLogLevel(){let e=Lt(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,n)=>{let i=Lt(this.levels,n.level);return i!==null&&i>r?i:r},e)}isLevelEnabled(e){let r=Lt(this.levels,e);if(r===null)return!1;let n=Lt(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(s=>{let o=Lt(this.levels,s.level);return o===null&&(o=n),o>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[pe]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[pe]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[pe]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(
|
|
32
|
-
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Lt(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(
|
|
33
|
-
`);a=g.pop()??"";for(let p of g)u(p)}a+=o.decode(),u(a)}finally{s.releaseLock()}
|
|
25
|
+
${R}`),y.pop(),`{${D}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function g(v,f,y){switch(typeof f){case"string":return _e(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(v),typeof f!="object")return g(v,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let w="",S=f.length!==void 0;if(S&&Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f);let D=Math.min(f.length,a),A=0;for(;A<D-1;A++){let q=g(String(A),f[A],y);w+=q!==void 0?q:"null",w+=","}let C=g(String(A),f[A],y);if(w+=C!==void 0?C:"null",f.length-1>a){let q=f.length-a-1;w+=`,"... ${Te(q)} not stringified"`}return y.pop(),`[${w}]`}let R=Object.keys(f),_=R.length;if(_===0)return"{}";if(o<y.length+1)return'"[Object]"';let O="",N=Math.min(_,a);S&&rn(f)&&(w+=bs(f,",",a),R=R.slice(f.length),N-=f.length,O=","),i&&(R=tn(R,s)),y.push(f);for(let D=0;D<N;D++){let A=R[D],C=g(A,f[A],y);C!==void 0&&(w+=`${O}${_e(A)}:${C}`,O=",")}if(_>a){let D=_-a;w+=`${O}"...":"${Te(D)} not stringified"`}return y.pop(),`{${w}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function p(v,f,y){if(arguments.length>1){let w="";if(typeof y=="number"?w=" ".repeat(Math.min(y,10)):typeof y=="string"&&(w=y.slice(0,10)),f!=null){if(typeof f=="function")return u("",{"":v},[],f,w,"");if(Array.isArray(f))return l("",v,[],Vl(f),w,"")}if(w.length!==0)return d("",v,[],w,"")}return g("",v,[])}return p}});var on=c((j0,ws)=>{"use strict";var Kl=Q(),{MESSAGE:Jl}=k(),Zl=lt();function Ql(t,e){return typeof e=="bigint"?e.toString():e}ws.exports=Kl((t,e)=>{let r=Zl.configure(e);return t[Jl]=r(t,e.replacer||Ql,e.space),t})});var Ss=c((N0,Es)=>{"use strict";var Xl=Q();Es.exports=Xl((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Ms=c((D0,xs)=>{"use strict";var ef=Q(),{MESSAGE:tf}=k(),rf=lt();xs.exports=ef(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[tf]=rf(e),t})});var Rs=c((C0,Os)=>{"use strict";var nf=Q();function sf(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 of(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}Os.exports=nf((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?sf(t,n,r):e.fillWith?of(t,e.fillWith,r):t})});var Ts=c((I0,qs)=>{var Ue=1e3,He=Ue*60,ze=He*60,Ae=ze*24,af=Ae*7,uf=Ae*365.25;qs.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return lf(t);if(r==="number"&&isFinite(t))return e.long?cf(t):ff(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function lf(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*uf;case"weeks":case"week":case"w":return r*af;case"days":case"day":case"d":return r*Ae;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ze;case"minutes":case"minute":case"mins":case"min":case"m":return r*He;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ue;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ff(t){var e=Math.abs(t);return e>=Ae?Math.round(t/Ae)+"d":e>=ze?Math.round(t/ze)+"h":e>=He?Math.round(t/He)+"m":e>=Ue?Math.round(t/Ue)+"s":t+"ms"}function cf(t){var e=Math.abs(t);return e>=Ae?zt(t,e,Ae,"day"):e>=ze?zt(t,e,ze,"hour"):e>=He?zt(t,e,He,"minute"):e>=Ue?zt(t,e,Ue,"second"):t+" ms"}function zt(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var As=c((ft,Ls)=>{"use strict";var hf=Q(),df=Ts();Ls.exports=hf(t=>{let e=+new Date;return ft.diff=e-(ft.prevTime||e),ft.prevTime=e,t.ms=`+${df(ft.diff)}`,t})});var Ns=c(($0,js)=>{"use strict";var pf=L("util").inspect,gf=Q(),{LEVEL:mf,MESSAGE:Ps,SPLAT:yf}=k();js.exports=gf((t,e={})=>{let r=Object.assign({},t);return delete r[mf],delete r[Ps],delete r[yf],t[Ps]=pf(r,!1,e.depth||null,e.colorize),t})});var Ds=c((k0,Vt)=>{"use strict";var{MESSAGE:bf}=k(),Gt=class{constructor(e){this.template=e}transform(e){return e[bf]=this.template(e),e}};Vt.exports=t=>new Gt(t);Vt.exports.Printf=Vt.exports.Format=Gt});var $s=c((F0,Is)=>{"use strict";var _f=Q(),{MESSAGE:Cs}=k(),vf=lt();Is.exports=_f(t=>{let e=vf(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Cs]=`${t.level}:${r} ${t.message} ${e}`:t[Cs]=`${t.level}:${r} ${t.message}`,t})});var Ws=c((W0,Fs)=>{"use strict";var wf=L("util"),{SPLAT:ks}=k(),Ef=/%[scdjifoO%]/g,Sf=/%%/g,an=class{constructor(e){this.options=e}_splat(e,r){let n=e.message,i=e[ks]||e.splat||[],s=n.match(Sf),o=s&&s.length||0,u=r.length-o-i.length,l=u<0?i.splice(u,-1*u):[],d=l.length;if(d)for(let g=0;g<d;g++)Object.assign(e,l[g]);return e.message=wf.format(n,...i),e}transform(e){let r=e.message,n=e[ks]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(Ef);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}};Fs.exports=t=>new an(t)});var Us=c((Yt,Bs)=>{(function(t,e){typeof Yt=="object"&&typeof Bs<"u"?e(Yt):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Yt,(function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",n="\\d\\d",i="\\d{3}",s="\\d{4}",o="[^\\s]+",a=/\[([^]*?)\]/gm;function u(h,b){for(var j=[],Z=0,E=h.length;Z<E;Z++)j.push(h[Z].substr(0,b));return j}var l=function(h){return function(b,j){var Z=j[h].map(function(le){return le.toLowerCase()}),E=Z.indexOf(b.toLowerCase());return E>-1?E:null}};function d(h){for(var b=[],j=1;j<arguments.length;j++)b[j-1]=arguments[j];for(var Z=0,E=b;Z<E.length;Z++){var le=E[Z];for(var Re in le)h[Re]=le[Re]}return h}var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],v=u(p,3),f=u(g,3),y={dayNamesShort:f,dayNames:g,monthNamesShort:v,monthNames:p,amPm:["am","pm"],DoFn:function(h){return h+["th","st","nd","rd"][h%10>3?0:(h-h%10!==10?1:0)*h%10]}},w=d({},y),S=function(h){return w=d(w,h)},R=function(h){return h.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},_=function(h,b){for(b===void 0&&(b=2),h=String(h);h.length<b;)h="0"+h;return h},O={D:function(h){return String(h.getDate())},DD:function(h){return _(h.getDate())},Do:function(h,b){return b.DoFn(h.getDate())},d:function(h){return String(h.getDay())},dd:function(h){return _(h.getDay())},ddd:function(h,b){return b.dayNamesShort[h.getDay()]},dddd:function(h,b){return b.dayNames[h.getDay()]},M:function(h){return String(h.getMonth()+1)},MM:function(h){return _(h.getMonth()+1)},MMM:function(h,b){return b.monthNamesShort[h.getMonth()]},MMMM:function(h,b){return b.monthNames[h.getMonth()]},YY:function(h){return _(String(h.getFullYear()),4).substr(2)},YYYY:function(h){return _(h.getFullYear(),4)},h:function(h){return String(h.getHours()%12||12)},hh:function(h){return _(h.getHours()%12||12)},H:function(h){return String(h.getHours())},HH:function(h){return _(h.getHours())},m:function(h){return String(h.getMinutes())},mm:function(h){return _(h.getMinutes())},s:function(h){return String(h.getSeconds())},ss:function(h){return _(h.getSeconds())},S:function(h){return String(Math.round(h.getMilliseconds()/100))},SS:function(h){return _(Math.round(h.getMilliseconds()/10),2)},SSS:function(h){return _(h.getMilliseconds(),3)},a:function(h,b){return h.getHours()<12?b.amPm[0]:b.amPm[1]},A:function(h,b){return h.getHours()<12?b.amPm[0].toUpperCase():b.amPm[1].toUpperCase()},ZZ:function(h){var b=h.getTimezoneOffset();return(b>0?"-":"+")+_(Math.floor(Math.abs(b)/60)*100+Math.abs(b)%60,4)},Z:function(h){var b=h.getTimezoneOffset();return(b>0?"-":"+")+_(Math.floor(Math.abs(b)/60),2)+":"+_(Math.abs(b)%60,2)}},N=function(h){return+h-1},D=[null,r],A=[null,o],C=["isPm",o,function(h,b){var j=h.toLowerCase();return j===b.amPm[0]?0:j===b.amPm[1]?1:null}],q=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(h){var b=(h+"").match(/([+-]|\d\d)/gi);if(b){var j=+b[1]*60+parseInt(b[2],10);return b[0]==="+"?j:-j}return 0}],z={D:["day",r],DD:["day",n],Do:["day",r+o,function(h){return parseInt(h,10)}],M:["month",r,N],MM:["month",n,N],YY:["year",n,function(h){var b=new Date,j=+(""+b.getFullYear()).substr(0,2);return+(""+(+h>68?j-1:j)+h)}],h:["hour",r,void 0,"isPm"],hh:["hour",n,void 0,"isPm"],H:["hour",r],HH:["hour",n],m:["minute",r],mm:["minute",n],s:["second",r],ss:["second",n],YYYY:["year",s],S:["millisecond","\\d",function(h){return+h*100}],SS:["millisecond",n,function(h){return+h*10}],SSS:["millisecond",i],d:D,dd:D,ddd:A,dddd:A,MMM:["month",o,l("monthNamesShort")],MMMM:["month",o,l("monthNames")],a:C,A:C,ZZ:q,Z:q},Y={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"},G=function(h){return d(Y,h)},ee=function(h,b,j){if(b===void 0&&(b=Y.default),j===void 0&&(j={}),typeof h=="number"&&(h=new Date(h)),Object.prototype.toString.call(h)!=="[object Date]"||isNaN(h.getTime()))throw new Error("Invalid Date pass to format");b=Y[b]||b;var Z=[];b=b.replace(a,function(le,Re){return Z.push(Re),"@@@"});var E=d(d({},w),j);return b=b.replace(e,function(le){return O[le](h,E)}),b.replace(/@@@/g,function(){return Z.shift()})};function te(h,b,j){if(j===void 0&&(j={}),typeof b!="string")throw new Error("Invalid format in fecha parse");if(b=Y[b]||b,h.length>1e3)return null;var Z=new Date,E={year:Z.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},le=[],Re=[],st=b.replace(a,function(ot,We){return Re.push(R(We)),"@@@"}),Nt={},vi={};st=R(st).replace(e,function(ot){var We=z[ot],Fr=We[0],hl=We[1],xi=We[3];if(Nt[Fr])throw new Error("Invalid format. "+Fr+" specified twice in format");return Nt[Fr]=!0,xi&&(vi[xi]=!0),le.push(We),"("+hl+")"}),Object.keys(vi).forEach(function(ot){if(!Nt[ot])throw new Error("Invalid format. "+ot+" is required in specified format")}),st=st.replace(/@@@/g,function(){return Re.shift()});var Dt=h.match(new RegExp(st,"i"));if(!Dt)return null;for(var ll=d(d({},w),j),ie=1;ie<Dt.length;ie++){var wi=le[ie-1],fl=wi[0],Ei=wi[2],Si=Ei?Ei(Dt[ie],ll):+Dt[ie];if(Si==null)return null;E[fl]=Si}E.isPm===1&&E.hour!=null&&+E.hour!=12?E.hour=+E.hour+12:E.isPm===0&&+E.hour==12&&(E.hour=0);var Ct;if(E.timezoneOffset==null){Ct=new Date(E.year,E.month,E.day,E.hour,E.minute,E.second,E.millisecond);for(var It=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],ie=0,cl=It.length;ie<cl;ie++)if(Nt[It[ie][0]]&&E[It[ie][0]]!==Ct[It[ie][1]]())return null}else if(Ct=new Date(Date.UTC(E.year,E.month,E.day,E.hour,E.minute-E.timezoneOffset,E.second,E.millisecond)),E.month>11||E.month<0||E.day>31||E.day<1||E.hour>23||E.hour<0||E.minute>59||E.minute<0||E.second>59||E.second<0)return null;return Ct}var Fe={format:ee,parse:te,defaultI18n:y,setGlobalDateI18n:S,setGlobalDateMasks:G};t.assign=d,t.default=Fe,t.format=ee,t.parse=te,t.defaultI18n=y,t.setGlobalDateI18n=S,t.setGlobalDateMasks=G,Object.defineProperty(t,"__esModule",{value:!0})}))});var zs=c((B0,Hs)=>{"use strict";var xf=Us(),Mf=Q();Hs.exports=Mf((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():xf.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Vs=c((U0,Gs)=>{"use strict";var un=Ur(),Of=Q(),{MESSAGE:ln}=k();Gs.exports=Of((t,e)=>(e.level!==!1&&(t.level=un.strip(t.level)),e.message!==!1&&(t.message=un.strip(String(t.message))),e.raw!==!1&&t[ln]&&(t[ln]=un.strip(String(t[ln]))),t))});var cn=c(fn=>{"use strict";var Rf=fn.format=Q();fn.levels=us();function V(t,e){Object.defineProperty(Rf,t,{get(){return e()},configurable:!0})}V("align",function(){return fs()});V("errors",function(){return ds()});V("cli",function(){return gs()});V("combine",function(){return ys()});V("colorize",function(){return Wt()});V("json",function(){return on()});V("label",function(){return Ss()});V("logstash",function(){return Ms()});V("metadata",function(){return Rs()});V("ms",function(){return As()});V("padLevels",function(){return Qr()});V("prettyPrint",function(){return Ns()});V("printf",function(){return Ds()});V("simple",function(){return $s()});V("splat",function(){return Ws()});V("timestamp",function(){return zs()});V("uncolorize",function(){return Vs()})});var hn=c(Kt=>{"use strict";var{format:Ys}=L("util");Kt.warn={deprecated(t){return()=>{throw new Error(Ys("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Ys("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
+
`))}},forFunctions(t,e,r){r.forEach(n=>{t[n]=Kt.warn[e](n)})},forProperties(t,e,r){r.forEach(n=>{let i=Kt.warn[e](n);Object.defineProperty(t,n,{get:i,set:i})})}}});var Ks=c((G0,qf)=>{qf.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.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.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.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.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",jest:"^29.7.0",rimraf:"5.0.10",split2:"^4.1.0","std-mocks":"^2.0.0",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:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Zs=c((V0,Js)=>{Js.exports=L("util").deprecate});var dn=c((Y0,Qs)=>{Qs.exports=L("stream")});var gn=c((K0,eo)=>{"use strict";function Tf(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=!0,process.nextTick(pn,this,t)):process.nextTick(pn,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Jt,r):(r._writableState.errorEmitted=!0,process.nextTick(Xs,r,s)):process.nextTick(Xs,r,s):e?(process.nextTick(Jt,r),e(s)):process.nextTick(Jt,r)}),this)}function Xs(t,e){pn(t,e),Jt(t)}function Jt(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Lf(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function pn(t,e){t.emit("error",e)}function Af(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}eo.exports={destroy:Tf,undestroy:Lf,errorOrDestroy:Af}});var ve=c((J0,no)=>{"use strict";var ro={};function re(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,u){super(n(o,a,u))}}i.prototype.name=r.name,i.prototype.code=t,ro[t]=i}function to(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 Pf(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function jf(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Nf(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}re("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);re("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&Pf(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(jf(t," argument"))i=`The ${t} ${n} ${to(e,"type")}`;else{let s=Nf(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${to(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);re("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");re("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});re("ERR_STREAM_PREMATURE_CLOSE","Premature close");re("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});re("ERR_MULTIPLE_CALLBACK","Callback called multiple times");re("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");re("ERR_STREAM_WRITE_AFTER_END","write after end");re("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);re("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);re("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");no.exports.codes=ro});var mn=c((Z0,io)=>{"use strict";var Df=ve().codes.ERR_INVALID_OPT_VALUE;function Cf(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function If(t,e,r,n){var i=Cf(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Df(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}io.exports={getHighWaterMark:If}});var so=c((Q0,yn)=>{typeof Object.create=="function"?yn.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:yn.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 Ge=c((X0,_n)=>{try{if(bn=L("util"),typeof bn.inherits!="function")throw"";_n.exports=bn.inherits}catch{_n.exports=so()}var bn});var co=c((em,fo)=>{"use strict";function oo(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 ao(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?oo(Object(r),!0).forEach(function(n){$f(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $f(t,e,r){return e=lo(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lo(n.key),n)}}function Ff(t,e,r){return e&&uo(t.prototype,e),r&&uo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function lo(t){var e=Wf(t,"string");return typeof e=="symbol"?e:String(e)}function Wf(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||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Bf=L("buffer"),Zt=Bf.Buffer,Uf=L("util"),vn=Uf.inspect,Hf=vn&&vn.custom||"inspect";function zf(t,e,r){Zt.prototype.copy.call(t,e,r)}fo.exports=(function(){function t(){kf(this,t),this.head=null,this.tail=null,this.length=0}return Ff(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 Zt.alloc(0);for(var n=Zt.allocUnsafe(r>>>0),i=this.head,s=0;i;)zf(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=Zt.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:Hf,value:function(r,n){return vn(this,ao(ao({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var go=c((wn,po)=>{var Qt=L("buffer"),fe=Qt.Buffer;function ho(t,e){for(var r in t)e[r]=t[r]}fe.from&&fe.alloc&&fe.allocUnsafe&&fe.allocUnsafeSlow?po.exports=Qt:(ho(Qt,wn),wn.Buffer=Pe);function Pe(t,e,r){return fe(t,e,r)}Pe.prototype=Object.create(fe.prototype);ho(fe,Pe);Pe.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return fe(t,e,r)};Pe.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=fe(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Pe.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return fe(t)};Pe.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qt.SlowBuffer(t)}});var xn=c(yo=>{"use strict";var Sn=go().Buffer,mo=Sn.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!0;default:return!1}};function Gf(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=!0}}function Vf(t){var e=Gf(t);if(typeof e!="string"&&(Sn.isEncoding===mo||!mo(t)))throw new Error("Unknown encoding: "+t);return e||t}yo.StringDecoder=ct;function ct(t){this.encoding=Vf(t);var e;switch(this.encoding){case"utf16le":this.text=Xf,this.end=ec,e=4;break;case"utf8":this.fillLast=Jf,e=4;break;case"base64":this.text=tc,this.end=rc,e=3;break;default:this.write=nc,this.end=ic;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sn.allocUnsafe(e)}ct.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||""};ct.prototype.end=Qf;ct.prototype.text=Zf;ct.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 En(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Yf(t,e,r){var n=e.length-1;if(n<r)return 0;var i=En(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=En(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=En(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function Kf(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 Jf(t){var e=this.lastTotal-this.lastNeed,r=Kf(this,t,e);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 Zf(t,e){var r=Yf(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 Qf(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Xf(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 ec(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 tc(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 rc(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function nc(t){return t.toString(this.encoding)}function ic(t){return t&&t.length?this.write(t):""}});var Xt=c((rm,vo)=>{"use strict";var bo=ve().codes.ERR_STREAM_PREMATURE_CLOSE;function sc(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function oc(){}function ac(t){return t.setHeader&&typeof t.abort=="function"}function _o(t,e,r){if(typeof e=="function")return _o(t,null,e);e||(e={}),r=sc(r||oc);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){i=!1,o=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,l=function(){n=!1,u=!0,i||r.call(t)},d=function(f){r.call(t,f)},g=function(){var f;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(f=new bo),r.call(t,f);if(i&&!o)return(!t._writableState||!t._writableState.ended)&&(f=new bo),r.call(t,f)},p=function(){t.req.on("finish",a)};return ac(t)?(t.on("complete",a),t.on("abort",g),t.req?p():t.on("request",p)):i&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",l),t.on("finish",a),e.error!==!1&&t.on("error",d),t.on("close",g),function(){t.removeListener("complete",a),t.removeListener("abort",g),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",l),t.removeListener("error",d),t.removeListener("close",g)}}vo.exports=_o});var Eo=c((nm,wo)=>{"use strict";var er;function we(t,e,r){return e=uc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uc(t){var e=lc(t,"string");return typeof e=="symbol"?e:String(e)}function lc(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||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fc=Xt(),Ee=Symbol("lastResolve"),je=Symbol("lastReject"),ht=Symbol("error"),tr=Symbol("ended"),Ne=Symbol("lastPromise"),Mn=Symbol("handlePromise"),De=Symbol("stream");function Se(t,e){return{value:t,done:e}}function cc(t){var e=t[Ee];if(e!==null){var r=t[De].read();r!==null&&(t[Ne]=null,t[Ee]=null,t[je]=null,e(Se(r,!1)))}}function hc(t){process.nextTick(cc,t)}function dc(t,e){return function(r,n){t.then(function(){if(e[tr]){r(Se(void 0,!0));return}e[Mn](r,n)},n)}}var pc=Object.getPrototypeOf(function(){}),gc=Object.setPrototypeOf((er={get stream(){return this[De]},next:function(){var e=this,r=this[ht];if(r!==null)return Promise.reject(r);if(this[tr])return Promise.resolve(Se(void 0,!0));if(this[De].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[ht]?a(e[ht]):o(Se(void 0,!0))})});var n=this[Ne],i;if(n)i=new Promise(dc(n,this));else{var s=this[De].read();if(s!==null)return Promise.resolve(Se(s,!1));i=new Promise(this[Mn])}return this[Ne]=i,i}},we(er,Symbol.asyncIterator,function(){return this}),we(er,"return",function(){var e=this;return new Promise(function(r,n){e[De].destroy(null,function(i){if(i){n(i);return}r(Se(void 0,!0))})})}),er),pc),mc=function(e){var r,n=Object.create(gc,(r={},we(r,De,{value:e,writable:!0}),we(r,Ee,{value:null,writable:!0}),we(r,je,{value:null,writable:!0}),we(r,ht,{value:null,writable:!0}),we(r,tr,{value:e._readableState.endEmitted,writable:!0}),we(r,Mn,{value:function(s,o){var a=n[De].read();a?(n[Ne]=null,n[Ee]=null,n[je]=null,s(Se(a,!1))):(n[Ee]=s,n[je]=o)},writable:!0}),r));return n[Ne]=null,fc(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[je];s!==null&&(n[Ne]=null,n[Ee]=null,n[je]=null,s(i)),n[ht]=i;return}var o=n[Ee];o!==null&&(n[Ne]=null,n[Ee]=null,n[je]=null,o(Se(void 0,!0))),n[tr]=!0}),e.on("readable",hc.bind(null,n)),n};wo.exports=mc});var Oo=c((im,Mo)=>{"use strict";function So(t,e,r,n,i,s,o){try{var a=t[s](o),u=a.value}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function yc(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(u){So(s,n,i,o,a,"next",u)}function a(u){So(s,n,i,o,a,"throw",u)}o(void 0)})}}function xo(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 bc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xo(Object(r),!0).forEach(function(n){_c(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _c(t,e,r){return e=vc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vc(t){var e=wc(t,"string");return typeof e=="symbol"?e:String(e)}function wc(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||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ec=ve().codes.ERR_INVALID_ARG_TYPE;function Sc(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new Ec("iterable",["Iterable"],e);var i=new t(bc({objectMode:!0},r)),s=!1;i._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=yc(function*(){try{var u=yield n.next(),l=u.value,d=u.done;d?i.push(null):i.push(yield l)?o():s=!1}catch(g){i.destroy(g)}}),a.apply(this,arguments)}return i}Mo.exports=Sc});var Dn=c((om,Co)=>{"use strict";Co.exports=T;var Ve;T.ReadableState=Lo;var sm=L("events").EventEmitter,To=function(e,r){return e.listeners(r).length},pt=dn(),rr=L("buffer").Buffer,xc=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Mc(t){return rr.from(t)}function Oc(t){return rr.isBuffer(t)||t instanceof xc}var On=L("util"),x;On&&On.debuglog?x=On.debuglog("stream"):x=function(){};var Rc=co(),jn=gn(),qc=mn(),Tc=qc.getHighWaterMark,nr=ve().codes,Lc=nr.ERR_INVALID_ARG_TYPE,Ac=nr.ERR_STREAM_PUSH_AFTER_EOF,Pc=nr.ERR_METHOD_NOT_IMPLEMENTED,jc=nr.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ye,Rn,qn;Ge()(T,pt);var dt=jn.errorOrDestroy,Tn=["error","close","destroy","pause","resume"];function Nc(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Lo(t,e,r){Ve=Ve||Ce(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ve),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Tc(this,t,"readableHighWaterMark",r),this.buffer=new Rc,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Ye||(Ye=xn().StringDecoder),this.decoder=new Ye(t.encoding),this.encoding=t.encoding)}function T(t){if(Ve=Ve||Ce(),!(this instanceof T))return new T(t);var e=this instanceof Ve;this._readableState=new Lo(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),pt.call(this)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});T.prototype.destroy=jn.destroy;T.prototype._undestroy=jn.undestroy;T.prototype._destroy=function(t,e){e(t)};T.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=rr.from(t,e),e=""),n=!0),Ao(this,t,e,!1,n)};T.prototype.unshift=function(t){return Ao(this,t,null,!0,!1)};function Ao(t,e,r,n,i){x("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Ic(t,s);else{var o;if(i||(o=Dc(s,e)),o)dt(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==rr.prototype&&(e=Mc(e)),n)s.endEmitted?dt(t,new jc):Ln(t,s,e,!0);else if(s.ended)dt(t,new Ac);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ln(t,s,e,!1):Pn(t,s)):Ln(t,s,e,!1)}else n||(s.reading=!1,Pn(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ln(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&ir(t)),Pn(t,e)}function Dc(t,e){var r;return!Oc(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Lc("chunk",["string","Buffer","Uint8Array"],e)),r}T.prototype.isPaused=function(){return this._readableState.flowing===!1};T.prototype.setEncoding=function(t){Ye||(Ye=xn().StringDecoder);var e=new Ye(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Ro=1073741824;function Cc(t){return t>=Ro?t=Ro:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qo(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Cc(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}T.prototype.read=function(t){x("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return x("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?An(this):ir(this),null;if(t=qo(t,e),t===0&&e.ended)return e.length===0&&An(this),null;var n=e.needReadable;x("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,x("length less than watermark",n)),e.ended||e.reading?(n=!1,x("reading or ended",n)):n&&(x("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=qo(r,e)));var i;return t>0?i=No(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&An(this)),i!==null&&this.emit("data",i),i};function Ic(t,e){if(x("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?ir(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Po(t)))}}function ir(t){var e=t._readableState;x("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(x("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Po,t))}function Po(t){var e=t._readableState;x("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Nn(t)}function Pn(t,e){e.readingMore||(e.readingMore=!0,process.nextTick($c,t,e))}function $c(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(x("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}T.prototype._read=function(t){dt(this,new Pc("_read()"))};T.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,x("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=i?a:y;n.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(w,S){x("onunpipe"),w===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,d())}function a(){x("onend"),t.end()}var u=kc(r);t.on("drain",u);var l=!1;function d(){x("cleanup"),t.removeListener("close",v),t.removeListener("finish",f),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",y),r.removeListener("data",g),l=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",g);function g(w){x("ondata");var S=t.write(w);x("dest.write",S),S===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Do(n.pipes,t)!==-1)&&!l&&(x("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(w){x("onerror",w),y(),t.removeListener("error",p),To(t,"error")===0&&dt(t,w)}Nc(t,"error",p);function v(){t.removeListener("finish",f),y()}t.once("close",v);function f(){x("onfinish"),t.removeListener("close",v),y()}t.once("finish",f);function y(){x("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(x("pipe resume"),r.resume()),t};function kc(t){return function(){var r=t._readableState;x("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&To(t,"data")&&(r.flowing=!0,Nn(t))}}T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Do(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};T.prototype.on=function(t,e){var r=pt.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,x("on readable",n.length,n.reading),n.length?ir(this):n.reading||process.nextTick(Fc,this)),r};T.prototype.addListener=T.prototype.on;T.prototype.removeListener=function(t,e){var r=pt.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(jo,this),r};T.prototype.removeAllListeners=function(t){var e=pt.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(jo,this),e};function jo(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Fc(t){x("readable nexttick read 0"),t.read(0)}T.prototype.resume=function(){var t=this._readableState;return t.flowing||(x("resume"),t.flowing=!t.readableListening,Wc(this,t)),t.paused=!1,this};function Wc(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Bc,t,e))}function Bc(t,e){x("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Nn(t),e.flowing&&!e.reading&&t.read(0)}T.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Nn(t){var e=t._readableState;for(x("flow",e.flowing);e.flowing&&t.read()!==null;);}T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(x("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(x("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var s=0;s<Tn.length;s++)t.on(Tn[s],this.emit.bind(this,Tn[s]));return this._read=function(o){x("wrapped _read",o),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(T.prototype[Symbol.asyncIterator]=function(){return Rn===void 0&&(Rn=Eo()),Rn(this)});Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});T._fromList=No;Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function No(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function An(t){var e=t._readableState;x("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Uc,e,t))}function Uc(t,e){if(x("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(T.from=function(t,e){return qn===void 0&&(qn=Oo()),qn(T,t,e)});function Do(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Ce=c((am,$o)=>{"use strict";var Hc=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};$o.exports=ce;var Io=Dn(),In=ar();Ge()(ce,Io);for(Cn=Hc(In.prototype),sr=0;sr<Cn.length;sr++)or=Cn[sr],ce.prototype[or]||(ce.prototype[or]=In.prototype[or]);var Cn,or,sr;function ce(t){if(!(this instanceof ce))return new ce(t);Io.call(this,t),In.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",zc)))}Object.defineProperty(ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ce.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ce.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function zc(){this._writableState.ended||process.nextTick(Gc,this)}function Gc(t){t.end()}Object.defineProperty(ce.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var ar=c((um,Ho)=>{"use strict";Ho.exports=I;function Fo(t){var e=this;this.next=null,this.entry=null,this.finish=function(){_h(e,t)}}var Ke;I.WritableState=mt;var Vc={deprecate:Zs()},Wo=dn(),lr=L("buffer").Buffer,Yc=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Kc(t){return lr.from(t)}function Jc(t){return lr.isBuffer(t)||t instanceof Yc}var kn=gn(),Zc=mn(),Qc=Zc.getHighWaterMark,xe=ve().codes,Xc=xe.ERR_INVALID_ARG_TYPE,eh=xe.ERR_METHOD_NOT_IMPLEMENTED,th=xe.ERR_MULTIPLE_CALLBACK,rh=xe.ERR_STREAM_CANNOT_PIPE,nh=xe.ERR_STREAM_DESTROYED,ih=xe.ERR_STREAM_NULL_VALUES,sh=xe.ERR_STREAM_WRITE_AFTER_END,oh=xe.ERR_UNKNOWN_ENCODING,Je=kn.errorOrDestroy;Ge()(I,Wo);function ah(){}function mt(t,e,r){Ke=Ke||Ce(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ke),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Qc(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){ph(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Fo(this)}mt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(mt.prototype,"buffer",{get:Vc.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ur;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ur=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(e){return ur.call(this,e)?!0:this!==I?!1:e&&e._writableState instanceof mt}})):ur=function(e){return e instanceof this};function I(t){Ke=Ke||Ce();var e=this instanceof Ke;if(!e&&!ur.call(I,this))return new I(t);this._writableState=new mt(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Wo.call(this)}I.prototype.pipe=function(){Je(this,new rh)};function uh(t,e){var r=new sh;Je(t,r),process.nextTick(e,r)}function lh(t,e,r,n){var i;return r===null?i=new ih:typeof r!="string"&&!e.objectMode&&(i=new Xc("chunk",["string","Buffer"],r)),i?(Je(t,i),process.nextTick(n,i),!1):!0}I.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&Jc(t);return s&&!lr.isBuffer(t)&&(t=Kc(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=ah),n.ending?uh(this,r):(s||lh(this,n,t,r))&&(n.pendingcb++,i=ch(this,n,s,t,e,r)),i};I.prototype.cork=function(){this._writableState.corked++};I.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Bo(this,t))};I.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new oh(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function fh(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=lr.from(e,r)),e}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ch(t,e,r,n,i,s){if(!r){var o=fh(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else $n(t,e,!1,a,n,i,s);return u}function $n(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new nh("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function hh(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(gt,t,e),t._writableState.errorEmitted=!0,Je(t,n)):(i(n),t._writableState.errorEmitted=!0,Je(t,n),gt(t,e))}function dh(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function ph(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new th;if(dh(r),e)hh(t,r,n,e,i);else{var s=Uo(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Bo(t,r),n?process.nextTick(ko,t,r,s,i):ko(t,r,s,i)}}function ko(t,e,r,n){r||gh(t,e),e.pendingcb--,n(),gt(t,e)}function gh(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Bo(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,$n(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Fo(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,d=r.callback,g=e.objectMode?1:u.length;if($n(t,e,!1,g,u,l,d),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}I.prototype._write=function(t,e,r){r(new eh("_write()"))};I.prototype._writev=null;I.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||bh(this,n,r),this};Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Uo(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function mh(t,e){t._final(function(r){e.pendingcb--,r&&Je(t,r),e.prefinished=!0,t.emit("prefinish"),gt(t,e)})}function yh(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(mh,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function gt(t,e){var r=Uo(e);if(r&&(yh(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function bh(t,e,r){e.ending=!0,gt(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function _h(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});I.prototype.destroy=kn.destroy;I.prototype._undestroy=kn.undestroy;I.prototype._destroy=function(t,e){e(t)}});var Fn=c((lm,Vo)=>{"use strict";var vh=L("util"),zo=ar(),{LEVEL:Go}=k(),yt=Vo.exports=function(e={}){zo.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};vh.inherits(yt,zo);yt.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);let i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[Go]]){if(e&&!this.format)return this.log(e,n);let s,o;try{o=this.format.transform(Object.assign({},e),this.format.options)}catch(a){s=a}if(s||!o){if(n(),s)throw s;return}return this.log(o,n)}return this._writableState.sync=!1,n(null)};yt.prototype._writev=function(e,r){if(this.logv){let n=e.filter(this._accept,this);return n.length?this.logv(n,r):r(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,s;try{s=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(o){i=o}if(i||!s){if(e[n].callback(),i)throw r(null),i}else this.log(s,e[n].callback)}return r(null)};yt.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let n=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!n||this.levels[n]>=this.levels[r[Go]])&&(this.handleExceptions||r.exception!==!0))};yt.prototype._nop=function(){}});var Bn=c((fm,Ko)=>{"use strict";var wh=L("util"),{LEVEL:Wn}=k(),Yo=Fn(),bt=Ko.exports=function(e={}){if(Yo.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(n){this.emit("error",n,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};wh.inherits(bt,Yo);bt.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[e[Wn]])&&this.transport.log(e[Wn],e.message,e,this._nop),n(null)};bt.prototype._writev=function(e,r){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[Wn],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return r(null)};bt.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
+
`))};bt.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var Ze=c((cm,Un)=>{"use strict";Un.exports=Fn();Un.exports.LegacyTransportStream=Bn()});var Qo=c((dm,Zo)=>{"use strict";var Eh=L("os"),{LEVEL:Jo,MESSAGE:Qe}=k(),Sh=Ze();Zo.exports=class extends Sh{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:Eh.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Jo]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Qe]}${this.eol}`):this._consoleError(e[Qe]),r&&r();return}else if(this.consoleWarnLevels[e[Jo]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Qe]}${this.eol}`):this._consoleWarn(e[Qe]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[Qe]}${this.eol}`):this._consoleLog(e[Qe]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((n,i)=>{if(typeof i!="string")throw new Error(r);return n[i]=!0,n},{})}}});var cr=c((fr,Xo)=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.default=xh;function xh(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Xo.exports=fr.default});var ta=c((hr,ea)=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};ea.exports=hr.default});var ia=c(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.fallback=ra;Me.wrap=na;var Mh=Me.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Oh=Me.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,Rh=Me.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function ra(t){setTimeout(t,0)}function na(t){return(e,...r)=>t(()=>e(...r))}var _t;Mh?_t=queueMicrotask:Oh?_t=setImmediate:Rh?_t=process.nextTick:_t=ra;Me.default=na(_t)});var la=c((dr,ua)=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.default=jh;var qh=ta(),Th=aa(qh),Lh=ia(),Ah=aa(Lh),Ph=Ie();function aa(t){return t&&t.__esModule?t:{default:t}}function jh(t){return(0,Ph.isAsync)(t)?function(...e){let r=e.pop(),n=t.apply(this,e);return sa(n,r)}:(0,Th.default)(function(e,r){var n;try{n=t.apply(this,e)}catch(i){return r(i)}if(n&&typeof n.then=="function")return sa(n,r);r(null,n)})}function sa(t,e){return t.then(r=>{oa(e,null,r)},r=>{oa(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function oa(t,e,r){try{t(e,r)}catch(n){(0,Ah.default)(i=>{throw i},n)}}ua.exports=dr.default});var Ie=c(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.isAsyncIterable=me.isAsyncGenerator=me.isAsync=void 0;var Nh=la(),Dh=Ch(Nh);function Ch(t){return t&&t.__esModule?t:{default:t}}function fa(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Ih(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function $h(t){return typeof t[Symbol.asyncIterator]=="function"}function kh(t){if(typeof t!="function")throw new Error("expected a function");return fa(t)?(0,Dh.default)(t):t}me.default=kh;me.isAsync=fa;me.isAsyncGenerator=Ih;me.isAsyncIterable=$h});var Xe=c((pr,ca)=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.default=Fh;function Fh(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...n){return typeof n[e-1]=="function"?t.apply(this,n):new Promise((i,s)=>{n[e-1]=(o,...a)=>{if(o)return s(o);i(a.length>1?a:a[0])},t.apply(this,n)})}return r}ca.exports=pr.default});var da=c((gr,ha)=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});var Wh=cr(),Bh=Hn(Wh),Uh=Ie(),Hh=Hn(Uh),zh=Xe(),Gh=Hn(zh);function Hn(t){return t&&t.__esModule?t:{default:t}}gr.default=(0,Gh.default)((t,e,r)=>{var n=(0,Bh.default)(e)?[]:{};t(e,(i,s,o)=>{(0,Hh.default)(i)((a,...u)=>{u.length<2&&([u]=u),n[s]=u,o(a)})},i=>r(i,n))},3);ha.exports=gr.default});var zn=c((mr,pa)=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.default=Vh;function Vh(t){function e(...r){if(t!==null){var n=t;t=null,n.apply(this,r)}}return Object.assign(e,t),e}pa.exports=mr.default});var ma=c((yr,ga)=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};ga.exports=yr.default});var _a=c((br,ba)=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.default=td;var Yh=cr(),Kh=ya(Yh),Jh=ma(),Zh=ya(Jh);function ya(t){return t&&t.__esModule?t:{default:t}}function Qh(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function Xh(t){var e=-1;return function(){var n=t.next();return n.done?null:(e++,{value:n.value,key:e})}}function ed(t){var e=t?Object.keys(t):[],r=-1,n=e.length;return function i(){var s=e[++r];return s==="__proto__"?i():r<n?{value:t[s],key:s}:null}}function td(t){if((0,Kh.default)(t))return Qh(t);var e=(0,Zh.default)(t);return e?Xh(e):ed(t)}ba.exports=br.default});var Gn=c((_r,va)=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.default=rd;function rd(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}va.exports=_r.default});var wr=c((vr,wa)=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});var nd={};vr.default=nd;wa.exports=vr.default});var Sa=c((Er,Ea)=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.default=ad;var id=wr(),sd=od(id);function od(t){return t&&t.__esModule?t:{default:t}}function ad(t,e,r,n){let i=!1,s=!1,o=!1,a=0,u=0;function l(){a>=e||o||i||(o=!0,t.next().then(({value:p,done:v})=>{if(!(s||i)){if(o=!1,v){i=!0,a<=0&&n(null);return}a++,r(p,u,d),u++,l()}}).catch(g))}function d(p,v){if(a-=1,!s){if(p)return g(p);if(p===!1){i=!0,s=!0;return}if(v===sd.default||i&&a<=0)return i=!0,n(null);l()}}function g(p){s||(o=!1,i=!0,n(p))}l()}Ea.exports=Er.default});var Ra=c((Sr,Oa)=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});var ud=zn(),ld=vt(ud),fd=_a(),cd=vt(fd),hd=Gn(),dd=vt(hd),xa=Ie(),pd=Sa(),Ma=vt(pd),gd=wr(),md=vt(gd);function vt(t){return t&&t.__esModule?t:{default:t}}Sr.default=t=>(e,r,n)=>{if(n=(0,ld.default)(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if((0,xa.isAsyncGenerator)(e))return(0,Ma.default)(e,t,r,n);if((0,xa.isAsyncIterable)(e))return(0,Ma.default)(e[Symbol.asyncIterator](),t,r,n);var i=(0,cd.default)(e),s=!1,o=!1,a=0,u=!1;function l(g,p){if(!o)if(a-=1,g)s=!0,n(g);else if(g===!1)s=!0,o=!0;else{if(p===md.default||s&&a<=0)return s=!0,n(null);u||d()}}function d(){for(u=!0;a<t&&!s;){var g=i();if(g===null){s=!0,a<=0&&n(null);return}a+=1,r(g.value,g.key,(0,dd.default)(l))}u=!1}d()};Oa.exports=Sr.default});var Yn=c((xr,qa)=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});var yd=Ra(),bd=Vn(yd),_d=Ie(),vd=Vn(_d),wd=Xe(),Ed=Vn(wd);function Vn(t){return t&&t.__esModule?t:{default:t}}function Sd(t,e,r,n){return(0,bd.default)(e)(t,(0,vd.default)(r),n)}xr.default=(0,Ed.default)(Sd,4);qa.exports=xr.default});var Aa=c((Mr,La)=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});var xd=Yn(),Md=Ta(xd),Od=Xe(),Rd=Ta(Od);function Ta(t){return t&&t.__esModule?t:{default:t}}function qd(t,e,r){return(0,Md.default)(t,1,e,r)}Mr.default=(0,Rd.default)(qd,3);La.exports=Mr.default});var Na=c((Or,ja)=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.default=jd;var Td=da(),Ld=Pa(Td),Ad=Aa(),Pd=Pa(Ad);function Pa(t){return t&&t.__esModule?t:{default:t}}function jd(t,e){return(0,Ld.default)(Pd.default,t,e)}ja.exports=Or.default});var Kn=c((mm,Ca)=>{"use strict";Ca.exports=ye;var Rr=ve().codes,Nd=Rr.ERR_METHOD_NOT_IMPLEMENTED,Dd=Rr.ERR_MULTIPLE_CALLBACK,Cd=Rr.ERR_TRANSFORM_ALREADY_TRANSFORMING,Id=Rr.ERR_TRANSFORM_WITH_LENGTH_0,qr=Ce();Ge()(ye,qr);function $d(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Dd);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function ye(t){if(!(this instanceof ye))return new ye(t);qr.call(this,t),this._transformState={afterTransform:$d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",kd)}function kd(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Da(t,e,r)}):Da(this,null,null)}ye.prototype.push=function(t,e){return this._transformState.needTransform=!1,qr.prototype.push.call(this,t,e)};ye.prototype._transform=function(t,e,r){r(new Nd("_transform()"))};ye.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};ye.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};ye.prototype._destroy=function(t,e){qr.prototype._destroy.call(this,t,function(r){e(r)})};function Da(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Id;if(t._transformState.transforming)throw new Cd;return t.push(null)}});var ka=c((ym,$a)=>{"use strict";$a.exports=wt;var Ia=Kn();Ge()(wt,Ia);function wt(t){if(!(this instanceof wt))return new wt(t);Ia.call(this,t)}wt.prototype._transform=function(t,e,r){r(null,t)}});var Ha=c((bm,Ua)=>{"use strict";var Jn;function Fd(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Ba=ve().codes,Wd=Ba.ERR_MISSING_ARGS,Bd=Ba.ERR_STREAM_DESTROYED;function Fa(t){if(t)throw t}function Ud(t){return t.setHeader&&typeof t.abort=="function"}function Hd(t,e,r,n){n=Fd(n);var i=!1;t.on("close",function(){i=!0}),Jn===void 0&&(Jn=Xt()),Jn(t,{readable:e,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Ud(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(o||new Bd("pipe"))}}}function Wa(t){t()}function zd(t,e){return t.pipe(e)}function Gd(t){return!t.length||typeof t[t.length-1]!="function"?Fa:t.pop()}function Vd(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=Gd(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Wd("streams");var i,s=e.map(function(o,a){var u=a<e.length-1,l=a>0;return Hd(o,u,l,function(d){i||(i=d),d&&s.forEach(Wa),!u&&(s.forEach(Wa),n(i))})});return e.reduce(zd)}Ua.exports=Vd});var $e=c((ne,St)=>{var Et=L("stream");process.env.READABLE_STREAM==="disable"&&Et?(St.exports=Et.Readable,Object.assign(St.exports,Et),St.exports.Stream=Et):(ne=St.exports=Dn(),ne.Stream=Et||ne,ne.Readable=ne,ne.Writable=ar(),ne.Duplex=Ce(),ne.Transform=Kn(),ne.PassThrough=ka(),ne.finished=Xt(),ne.pipeline=Ha())});var ni=c((_m,Ga)=>{var et=[],xt=[],Zn=function(){};function Xn(t){return~et.indexOf(t)?!1:(et.push(t),!0)}function ei(t){Zn=t}function Yd(t){for(var e=[],r=0;r<et.length;r++){if(et[r].async){e.push(et[r]);continue}if(et[r](t))return!0}return e.length?new Promise(function(i){Promise.all(e.map(function(o){return o(t)})).then(function(o){i(o.some(Boolean))})}):!1}function ti(t){return~xt.indexOf(t)?!1:(xt.push(t),!0)}function Qn(){Zn.apply(Zn,arguments)}function za(t){for(var e=0;e<xt.length;e++)t=xt[e].apply(xt[e],arguments);return t}function ri(t,e){var r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&(t[n]=e[n]);return t}function Kd(t){return t.enabled=!1,t.modify=ti,t.set=ei,t.use=Xn,ri(function(){return!1},t)}function Jd(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Qn.call(Qn,t,za(r,t)),!0}return t.enabled=!0,t.modify=ti,t.set=ei,t.use=Xn,ri(e,t)}Ga.exports=function(e){return e.introduce=ri,e.enabled=Yd,e.process=za,e.modify=ti,e.write=Qn,e.nope=Kd,e.yep=Jd,e.set=ei,e.use=Xn,e}});var Ya=c((vm,Va)=>{var Zd=ni(),Qd=Zd(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});Va.exports=Qd});var eu=c((wm,Xa)=>{"use strict";var he={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ja=Object.create(null);for(let t in he)Object.hasOwn(he,t)&&(Ja[he[t]]=t);var B={to:{},get:{}};B.get=function(t){let e=t.slice(0,3).toLowerCase(),r,n;switch(e){case"hsl":{r=B.get.hsl(t),n="hsl";break}case"hwb":{r=B.get.hwb(t),n="hwb";break}default:{r=B.get.rgb(t),n="rgb";break}}return r?{model:n,value:r}:null};B.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,u,l;if(a=t.match(r)){for(l=a[2],a=a[1],u=0;u<3;u++){let d=u*2;o[u]=Number.parseInt(a.slice(d,d+2),16)}l&&(o[3]=Number.parseInt(l,16)/255)}else if(a=t.match(e)){for(a=a[1],l=a[3],u=0;u<3;u++)o[u]=Number.parseInt(a[u]+a[u],16);l&&(o[3]=Number.parseInt(l+l,16)/255)}else if(a=t.match(n)){for(u=0;u<3;u++)o[u]=Number.parseInt(a[u+1],10);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(i)){for(u=0;u<3;u++)o[u]=Math.round(Number.parseFloat(a[u+1])*2.55);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(he,a[1])?(o=he[a[1]],o[3]=1,o):null:null;for(u=0;u<3;u++)o[u]=Oe(o[u],0,255);return o[3]=Oe(o[3],0,1),o};B.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,s=Oe(Number.parseFloat(r[2]),0,100),o=Oe(Number.parseFloat(r[3]),0,100),a=Oe(Number.isNaN(n)?1:n,0,1);return[i,s,o,a]}return null};B.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,s=Oe(Number.parseFloat(r[2]),0,100),o=Oe(Number.parseFloat(r[3]),0,100),a=Oe(Number.isNaN(n)?1:n,0,1);return[i,s,o,a]}return null};B.to.hex=function(...t){return"#"+Tr(t[0])+Tr(t[1])+Tr(t[2])+(t[3]<1?Tr(Math.round(t[3]*255)):"")};B.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};B.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"};B.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};B.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};B.to.keyword=function(...t){return Ja[t.slice(0,3)]};function Oe(t,e,r){return Math.min(Math.max(e,t),r)}function Tr(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var Za={};for(let t of Object.keys(he))Za[he[t]]=t;var m={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},be=(6/29)**3;function tt(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function rt(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(m)){if(!("channels"in m[t]))throw new Error("missing channels property: "+t);if(!("labels"in m[t]))throw new Error("missing channel labels property: "+t);if(m[t].labels.length!==m[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=m[t];delete m[t].channels,delete m[t].labels,Object.defineProperty(m[t],"channels",{value:e}),Object.defineProperty(m[t],"labels",{value:r})}m.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,u;switch(s){case i:{a=0;break}case e:{a=(r-n)/o;break}case r:{a=2+(n-e)/o;break}case n:{a=4+(e-r)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);let l=(i+s)/2;return s===i?u=0:l<=.5?u=o/(s+i):u=o/(2-s-i),[a,u*100,l*100]};m.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,u=t[2]/255,l=Math.max(o,a,u),d=l-Math.min(o,a,u),g=function(p){return(l-p)/6/d+1/2};if(d===0)i=0,s=0;else{switch(s=d/l,e=g(o),r=g(a),n=g(u),l){case o:{i=n-r;break}case a:{i=1/3+e-n;break}case u:{i=2/3+r-e;break}}i<0?i+=1:i>1&&(i-=1)}return[i*360,s*100,l*100]};m.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=m.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};m.rgb.oklab=function(t){let e=rt(t[0]/255),r=rt(t[1]/255),n=rt(t[2]/255),i=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*n),s=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*n),o=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*n),a=.2104542553*i+.793617785*s-.0040720468*o,u=1.9779984951*i-2.428592205*s+.4505937099*o,l=.0259040371*i+.7827717662*s-.808675766*o;return[a*100,u*100,l*100]};m.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function Xd(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}m.rgb.keyword=function(t){let e=Za[t];if(e)return e;let r=Number.POSITIVE_INFINITY,n;for(let i of Object.keys(he)){let s=he[i],o=Xd(t,s);o<r&&(r=o,n=i)}return n};m.keyword.rgb=function(t){return he[t]};m.rgb.xyz=function(t){let e=rt(t[0]/255),r=rt(t[1]/255),n=rt(t[2]/255),i=e*.4124564+r*.3575761+n*.1804375,s=e*.2126729+r*.7151522+n*.072175,o=e*.0193339+r*.119192+n*.9503041;return[i*100,s*100,o*100]};m.rgb.lab=function(t){let e=m.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>be?r**(1/3):7.787*r+16/116,n=n>be?n**(1/3):7.787*n+16/116,i=i>be?i**(1/3):7.787*i+16/116;let s=116*n-16,o=500*(r-n),a=200*(n-i);return[s,o,a]};m.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s;if(r===0)return s=n*255,[s,s,s];let o=n<.5?n*(1+r):n+r-n*r,a=2*n-o,u=[0,0,0];for(let l=0;l<3;l++)i=e+1/3*-(l-1),i<0&&i++,i>1&&i--,6*i<1?s=a+(o-a)*6*i:2*i<1?s=o:3*i<2?s=a+(o-a)*(2/3-i)*6:s=a,u[l]=s*255;return u};m.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return[e,a*100,o*100]};m.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,o];case 1:return[a,n,o];case 2:return[o,n,u];case 3:return[o,a,n];case 4:return[u,o,n];case 5:return[n,o,a]}};m.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};m.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let o=Math.floor(6*e),a=1-n;s=6*e-o,(o&1)!==0&&(s=1-s);let u=r+s*(a-r),l,d,g;switch(o){default:case 6:case 0:{l=a,d=u,g=r;break}case 1:{l=u,d=a,g=r;break}case 2:{l=r,d=a,g=u;break}case 3:{l=r,d=u,g=a;break}case 4:{l=u,d=r,g=a;break}case 5:{l=a,d=r,g=u;break}}return[l*255,d*255,g*255]};m.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[s*255,o*255,a*255]};m.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2404542+r*-1.5371385+n*-.4985314,s=e*-.969266+r*1.8760108+n*.041556,o=e*.0556434+r*-.2040259+n*1.0572252,i=tt(i),s=tt(s),o=tt(o),[i*255,s*255,o*255]};m.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>be?e**(1/3):7.787*e+16/116,r=r>be?r**(1/3):7.787*r+16/116,n=n>be?n**(1/3):7.787*n+16/116;let i=116*r-16,s=500*(e-r),o=200*(r-n);return[i,s,o]};m.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*n),s=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*n),o=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*n),a=.2104542553*i+.793617785*s-.0040720468*o,u=1.9779984951*i-2.428592205*s+.4505937099*o,l=.0259040371*i+.7827717662*s-.808675766*o;return[a*100,u*100,l*100]};m.oklab.oklch=function(t){return m.lab.lch(t)};m.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(.999999998*e+.396337792*r+.215803758*n)**3,s=(1.000000008*e-.105561342*r-.063854175*n)**3,o=(1.000000055*e-.089484182*r-1.291485538*n)**3,a=1.227013851*i-.55779998*s+.281256149*o,u=-.040580178*i+1.11225687*s-.071676679*o,l=-.076381285*i-.421481978*s+1.58616322*o;return[a*100,u*100,l*100]};m.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(e+.3963377774*r+.2158037573*n)**3,s=(e-.1055613458*r-.0638541728*n)**3,o=(e-.0894841775*r-1.291485548*n)**3,a=tt(4.0767416621*i-3.3077115913*s+.2309699292*o),u=tt(-1.2684380046*i+2.6097574011*s-.3413193965*o),l=tt(-.0041960863*i-.7034186147*s+1.707614701*o);return[a*255,u*255,l*255]};m.oklch.oklab=function(t){return m.lch.lab(t)};m.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;let a=s**3,u=i**3,l=o**3;return s=a>be?a:(s-16/116)/7.787,i=u>be?u:(i-16/116)/7.787,o=l>be?l:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};m.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(r*r+n*n);return[e,o,i]};m.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};m.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?m.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};m.hsv.ansi16=function(t){return m.rgb.ansi16(m.hsv.rgb(t),t[2])};m.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e>>4===r>>4&&r>>4===n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};m.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[n,i,s]};m.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};m.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};m.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let n=Number.parseInt(r,16),i=n>>16&255,s=n>>8&255,o=n&255;return[i,s,o]};m.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),o=i-s,a,u=o<1?s/(1-o):0;return o<=0?a=0:i===e?a=(r-n)/o%6:i===r?a=2+(n-e)/o:a=4+(e-r)/o,a/=6,a%=1,[a*360,o*100,u*100]};m.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};m.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};m.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],s=e%1*6,o=s%1,a=1-o,u=0;switch(Math.floor(s)){case 0:{i[0]=1,i[1]=o,i[2]=0;break}case 1:{i[0]=a,i[1]=1,i[2]=0;break}case 2:{i[0]=0,i[1]=1,i[2]=o;break}case 3:{i[0]=0,i[1]=a,i[2]=1;break}case 4:{i[0]=o,i[1]=0,i[2]=1;break}default:i[0]=1,i[1]=0,i[2]=a}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};m.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};m.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};m.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};m.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};m.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};m.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};m.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};m.gray.hsl=function(t){return[0,0,t[0]]};m.gray.hsv=m.gray.hsl;m.gray.hwb=function(t){return[0,100,t[0]]};m.gray.cmyk=function(t){return[0,0,0,t[0]]};m.gray.lab=function(t){return[t[0],0,0]};m.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(n.length)+n};m.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function ep(){let t={},e=Object.keys(m);for(let{length:r}=e,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function tp(t){let e=ep(),r=[t];for(e[t].distance=0;r.length>0;){let n=r.pop(),i=Object.keys(m[n]);for(let{length:s}=i,o=0;o<s;o++){let a=i[o],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}}return e}function rp(t,e){return function(r){return e(t(r))}}function np(t,e){let r=[e[t].parent,t],n=m[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=rp(m[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}function ip(t){let e=tp(t),r={},n=Object.keys(e);for(let{length:i}=n,s=0;s<i;s++){let o=n[s];e[o].parent!==null&&(r[o]=np(o,e))}return r}var U={},sp=Object.keys(m);function op(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function ap(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let{length:s}=i,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of sp){U[t]={},Object.defineProperty(U[t],"channels",{value:m[t].channels}),Object.defineProperty(U[t],"labels",{value:m[t].labels});let e=ip(t),r=Object.keys(e);for(let n of r){let i=e[n];U[t][n]=ap(i),U[t][n].raw=op(i)}}var Qa=["keyword","gray","hex"],ii={};for(let t of Object.keys(U))ii[[...U[t].labels].sort().join("")]=t;var si={};function W(t,e){if(!(this instanceof W))return new W(t,e);if(e&&e in Qa&&(e=null),e&&!(e in U))throw new Error("Unknown model: "+e);let r,n;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof W)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let i=B.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,n=U[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=U[this.model].channels;let i=Array.prototype.slice.call(t,0,n);this.color=oi(i,n),this.valpha=typeof t[n]=="number"?t[n]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=i.sort().join("");if(!(s in ii))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=ii[s];let{labels:o}=U[this.model],a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=oi(a)}if(si[this.model])for(n=U[this.model].channels,r=0;r<n;r++){let i=si[this.model][r];i&&(this.color[r]=i(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}W.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in B.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return B.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return B.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=U[this.model],{labels:r}=U[this.model];for(let n=0;n<e;n++)t[r[n]]=this.color[n];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new W([...this.color.map(lp(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new W([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:$("rgb",0,F(255)),green:$("rgb",1,F(255)),blue:$("rgb",2,F(255)),hue:$(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:$("hsl",1,F(100)),lightness:$("hsl",2,F(100)),saturationv:$("hsv",1,F(100)),value:$("hsv",2,F(100)),chroma:$("hcg",1,F(100)),gray:$("hcg",2,F(100)),white:$("hwb",1,F(100)),wblack:$("hwb",2,F(100)),cyan:$("cmyk",0,F(100)),magenta:$("cmyk",1,F(100)),yellow:$("cmyk",2,F(100)),black:$("cmyk",3,F(100)),x:$("xyz",0,F(95.047)),y:$("xyz",1,F(100)),z:$("xyz",2,F(108.833)),l:$("lab",0,F(100)),a:$("lab",1),b:$("lab",2),keyword(t){return t!==void 0?new W(t):U[this.model].keyword(this.color)},hex(t){return t!==void 0?new W(t):B.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new W(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),B.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,n]of t.entries()){let i=n/255;e[r]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return W.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),n=this.rgb(),i=e===void 0?.5:e,s=2*i-1,o=r.alpha()-n.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-a;return W.rgb(a*r.red()+u*n.red(),a*r.green()+u*n.green(),a*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(let t of Object.keys(U)){if(Qa.includes(t))continue;let{channels:e}=U[t];W.prototype[t]=function(...r){return this.model===t?new W(this):r.length>0?new W(r,t):new W([...fp(U[this.model][t].raw(this.color)),this.valpha],t)},W[t]=function(...r){let n=r[0];return typeof n=="number"&&(n=oi(r,e)),new W(n,t)}}function up(t,e){return Number(t.toFixed(e))}function lp(t){return function(e){return up(e,t)}}function $(t,e,r){t=Array.isArray(t)?t:[t];for(let n of t)(si[n]||=[])[e]=r;return t=t[0],function(n){let i;return n!==void 0?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function F(t){return function(e){return Math.max(0,Math.min(t,e))}}function fp(t){return Array.isArray(t)?t:[t]}function oi(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function cp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hp=function(e){for(var r=0,n=0;r<e.length;n=e.charCodeAt(r++)+((n<<5)-n));var i=Math.floor(Math.abs(Math.sin(n)*1e4%1*16777216)).toString(16);return"#"+Array(6-i.length+1).join("0")+i},Ka=cp(hp);function dp(t,e){let r=t.split(e||":"),n=Ka(r[0]);if(!r.length)return n;for(let i=0,s=r.length-1;i<s;i++)n=W(n).mix(W(Ka(r[i+1]))).saturate(1).hex();return n}Xa.exports=dp});var ru=c((Em,tu)=>{"use strict";function oe(t,e){if(e)return new oe(t).style(e);if(!(this instanceof oe))return new oe(t);this.text=t}oe.prototype.prefix="\x1B[";oe.prototype.suffix="m";oe.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),n=e.substring(2,4),i=e.substring(4,6);return[parseInt(r,16),parseInt(n,16),parseInt(i,16)]};oe.prototype.rgb=function(e,r,n){var i=e/255*5,s=r/255*5,o=n/255*5;return this.ansi(i,s,o)};oe.prototype.ansi=function(e,r,n){var i=Math.round(e),s=Math.round(r),o=Math.round(n);return 16+i*36+s*6+o};oe.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};oe.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};tu.exports=oe});var iu=c((Sm,nu)=>{var pp=eu(),gp=ru();nu.exports=function(e,r){var n=r.namespace,i=r.colors!==!1?gp(n+":",pp(n)):n+":";return e[0]=i+" "+e[0],e}});var ou=c((xm,su)=>{"use strict";su.exports=function(e,r){if(!r)return!1;for(var n=r.split(/[\s,]+/),i=0;i<n.length;i++){if(r=n[i].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var uu=c((Mm,au)=>{var mp=ou();au.exports=function(e){return function(n){try{return mp(n,e())}catch{}return!1}}});var fu=c((Om,lu)=>{var yp=uu();lu.exports=yp(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var hu=c((Rm,cu)=>{cu.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var pu=c((qm,du)=>{var bp=ni(),_p=L("tty").isatty(1),Lr=bp(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:_p,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Lr.modify(iu());Lr.use(fu());Lr.set(hu());du.exports=Lr});var Mt=c((Tm,ai)=>{process.env.NODE_ENV==="production"?ai.exports=Ya():ai.exports=pu()});var mu=c((Lm,gu)=>{"use strict";var ui=L("fs"),{StringDecoder:vp}=L("string_decoder"),{Stream:wp}=$e();function Ep(){}gu.exports=(t,e)=>{let r=Buffer.alloc(65536),n=new vp("utf8"),i=new wp,s="",o=0,a=0;return t.start===-1&&delete t.start,i.readable=!0,i.destroy=()=>{i.destroyed=!0,i.emit("end"),i.emit("close")},ui.open(t.file,"a+","0644",(u,l)=>{if(u){e?e(u):i.emit("error",u),i.destroy();return}(function d(){if(i.destroyed){ui.close(l,Ep);return}return ui.read(l,r,0,r.length,o,(g,p)=>{if(g){e?e(g):i.emit("error",g),i.destroy();return}if(!p)return s&&((t.start==null||a>t.start)&&(e?e(null,s):i.emit("line",s)),a++,s=""),setTimeout(d,1e3);let v=n.write(r.slice(0,p));e||i.emit("data",v),v=(s+v).split(/\n+/);let f=v.length-1,y=0;for(;y<f;y++)(t.start==null||a>t.start)&&(e?e(null,v[y]):i.emit("line",v[y])),a++;return s=v[f],o+=p,d()})})()}),e?i.destroy:i}});var vu=c((Pm,_u)=>{"use strict";var X=L("fs"),H=L("path"),yu=Na(),Sp=L("zlib"),{MESSAGE:xp}=k(),{Stream:Mp,PassThrough:bu}=$e(),Op=Ze(),ae=Mt()("winston:file"),Rp=L("os"),qp=mu();_u.exports=class extends Op{constructor(e={}){super(e),this.name=e.name||"file";function r(n,...i){i.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${n} together`)})}if(this._stream=new bu,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?H.basename(e.filename):"winston.log",this.dirname=e.dirname||H.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=H.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:Rp.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}_final(e){if(this._opening){this.once("open",()=>this._final(e));return}if(this._stream.end(),!this._dest||this._dest.writableFinished)return e();this._dest.once("finish",e),this._dest.once("error",e)}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let n=`${e[xp]}${this.eol}`,i=Buffer.byteLength(n);function s(){if(this._size+=i,this._pendingSize-=i,ae("logged %s %s",this._size,n),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let o=this._stream.write(n,s.bind(this));return o?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),ae("written",o,this._drain),this.finishIfEnding(),o}query(e,r){typeof e=="function"&&(r=e,e={}),e=g(e);let n=H.join(this.dirname,this.filename),i="",s=[],o=0,a=X.createReadStream(n,{encoding:"utf8"});a.on("error",p=>{if(a.readable&&a.destroy(),!!r)return p.code!=="ENOENT"?r(p):r(null,s)}),a.on("data",p=>{p=(i+p).split(/\n+/);let v=p.length-1,f=0;for(;f<v;f++)(!e.start||o>=e.start)&&u(p[f]),o++;i=p[v]}),a.on("close",()=>{i&&u(i,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function u(p,v){try{let f=JSON.parse(p);d(f)&&l(f)}catch(f){v||a.emit("error",f)}}function l(p){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(p=e.fields.reduce((v,f)=>(v[f]=p[f],v),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(p)}function d(p){if(!p||typeof p!="object")return;let v=new Date(p.timestamp);if(!(e.from&&v<e.from||e.until&&v>e.until||e.level&&e.level!==p.level))return!0}function g(p){return p=p||{},p.rows=p.rows||p.limit||10,p.start=p.start||0,p.until=p.until||new Date,typeof p.until!="object"&&(p.until=new Date(p.until)),p.from=p.from||p.until-1440*60*1e3,typeof p.from!="object"&&(p.from=new Date(p.from)),p.order=p.order||"desc",p}}stream(e={}){let r=H.join(this.dirname,this.filename),n=new Mp,i={file:r,start:e.start};return n.destroy=qp(i,(s,o)=>{if(s)return n.emit("error",s);try{n.emit("data",o),o=JSON.parse(o),n.emit("log",o)}catch(a){n.emit("error",a)}}),n}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);ae("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),n=H.join(this.dirname,r);X.stat(n,(i,s)=>{if(i&&i.code==="ENOENT")return ae("ENOENT\xA0ok",n),this.filename=r,e(null,0);if(i)return ae(`err ${i.code} ${n}`),e(i);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=H.join(this.dirname,this.filename);ae("create stream start",r,this.options);let n=X.createWriteStream(r,this.options).on("error",i=>ae(i)).on("close",()=>ae("close",n.path,n.bytesWritten)).on("open",()=>{ae("file open ok",r),this.emit("open",r),e.pipe(n),this.rotatedWhileOpening&&(this._stream=new bu,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),e.end())});return ae("create stream ok",r),n}_incFile(e){ae("_incFile",this.filename);let r=H.extname(this._basename),n=H.basename(this._basename,r),i=[];this.zippedArchive&&i.push(function(s){let o=this._created>0&&!this.tailable?this._created:"";this._compressFile(H.join(this.dirname,`${n}${o}${r}`),H.join(this.dirname,`${n}${o}${r}.gz`),s)}.bind(this)),i.push(function(s){this.tailable?this._checkMaxFilesTailable(r,n,s):(this._created+=1,this._checkMaxFilesIncrementing(r,n,s))}.bind(this)),yu(i,e)}_getFile(){let e=H.extname(this._basename),r=H.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${n}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let i=this._created-this.maxFiles,s=i!==0?i:"",o=this.zippedArchive?".gz":"",a=`${r}${s}${e}${o}`,u=H.join(this.dirname,a);X.unlink(u,n)}_checkMaxFilesTailable(e,r,n){let i=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let o=this.maxFiles-1;o>1;o--)i.push(function(a,u){let l=`${r}${a-1}${e}${s}`,d=H.join(this.dirname,l);X.exists(d,g=>{if(!g)return u(null);l=`${r}${a}${e}${s}`,X.rename(d,H.join(this.dirname,l),u)})}.bind(this,o));yu(i,()=>{X.rename(H.join(this.dirname,`${r}${e}${s}`),H.join(this.dirname,`${r}1${e}${s}`),n)})}_compressFile(e,r,n){X.access(e,X.F_OK,i=>{if(i)return n();var s=Sp.createGzip(),o=X.createReadStream(e),a=X.createWriteStream(r);a.on("finish",()=>{X.unlink(e,n)}),o.pipe(s).pipe(a)})}_createLogDirIfNotExist(e){X.existsSync(e)||X.mkdirSync(e,{recursive:!0})}}});var Eu=c((Nm,wu)=>{"use strict";var Tp=L("http"),Lp=L("https"),{Stream:Ap}=$e(),Pp=Ze(),{configure:jp}=lt();wu.exports=class extends Pp{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(n,i)=>{i&&i.statusCode!==200&&(n=new Error(`Invalid HTTP Status Code: ${i.statusCode}`)),n?this.emit("warn",n):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let n=e.params.auth||null;delete e.params.auth;let i=e.params.path||null;delete e.params.path,this._request(e,n,i,(s,o,a)=>{if(o&&o.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${o.statusCode}`)),s)return r(s);if(typeof a=="string")try{a=JSON.parse(a)}catch(u){return r(u)}r(null,a)})}stream(e={}){let r=new Ap;e={method:"stream",params:e};let n=e.params.path||null;delete e.params.path;let i=e.params.auth||null;delete e.params.auth;let s="",o=this._request(e,i,n);return r.destroy=()=>o.destroy(),o.on("data",a=>{a=(s+a).split(/\n+/);let u=a.length-1,l=0;for(;l<u;l++)try{r.emit("log",JSON.parse(a[l]))}catch(d){r.emit("error",d)}s=a[u]}),o.on("error",a=>r.emit("error",a)),r}_request(e,r,n,i){e=e||{},r=r||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,r,n):this._doRequest(e,i,r,n)}_doBatch(e,r,n,i){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,n,i)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}_doBatchRequest(e,r,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,r,n)}_doRequest(e,r,n,i){let s=Object.assign({},this.headers);n&&n.bearer&&(s.Authorization=`Bearer ${n.bearer}`);let o=(this.ssl?Lp:Tp).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:s,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});o.on("error",r),o.on("response",u=>u.on("end",()=>r(null,u)).resume());let a=jp({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var li=c((Dm,Su)=>{"use strict";var de=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";de.writable=t=>de(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";de.readable=t=>de(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";de.duplex=t=>de.writable(t)&&de.readable(t);de.transform=t=>de.duplex(t)&&typeof t._transform=="function";Su.exports=de});var Mu=c((Im,xu)=>{"use strict";var Np=li(),{MESSAGE:Dp}=k(),Cp=L("os"),Ip=Ze();xu.exports=class extends Ip{constructor(e={}){if(super(e),!e.stream||!Np(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:Cp.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[Dp]}${this.eol}`),r&&r()}}});var Ou=c(Ot=>{"use strict";Object.defineProperty(Ot,"Console",{configurable:!0,enumerable:!0,get(){return Qo()}});Object.defineProperty(Ot,"File",{configurable:!0,enumerable:!0,get(){return vu()}});Object.defineProperty(Ot,"Http",{configurable:!0,enumerable:!0,get(){return Eu()}});Object.defineProperty(Ot,"Stream",{configurable:!0,enumerable:!0,get(){return Mu()}})});var Pr=c(Rt=>{"use strict";var Ar=cn(),{configs:fi}=k();Rt.cli=Ar.levels(fi.cli);Rt.npm=Ar.levels(fi.npm);Rt.syslog=Ar.levels(fi.syslog);Rt.addColors=Ar.levels});var qu=c((jr,Ru)=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});var $p=cr(),kp=ke($p),Fp=wr(),Wp=ke(Fp),Bp=Yn(),Up=ke(Bp),Hp=zn(),zp=ke(Hp),Gp=Gn(),Vp=ke(Gp),Yp=Ie(),Kp=ke(Yp),Jp=Xe(),Zp=ke(Jp);function ke(t){return t&&t.__esModule?t:{default:t}}function Qp(t,e,r){r=(0,zp.default)(r);var n=0,i=0,{length:s}=t,o=!1;s===0&&r(null);function a(u,l){u===!1&&(o=!0),o!==!0&&(u?r(u):(++i===s||l===Wp.default)&&r(null))}for(;n<s;n++)e(t[n],n,(0,Vp.default)(a))}function Xp(t,e,r){return(0,Up.default)(t,1/0,e,r)}function eg(t,e,r){var n=(0,kp.default)(t)?Qp:Xp;return n(t,(0,Kp.default)(e),r)}jr.default=(0,Zp.default)(eg,3);Ru.exports=jr.default});var Lu=c((Nr,Tu)=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.default=tg;function tg(t){return(e,r,n)=>t(e,n)}Tu.exports=Nr.default});var Ir=c((Cr,Au)=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});var rg=qu(),ng=Dr(rg),ig=Lu(),sg=Dr(ig),og=Ie(),ag=Dr(og),ug=Xe(),lg=Dr(ug);function Dr(t){return t&&t.__esModule?t:{default:t}}function fg(t,e,r){return(0,ng.default)(t,(0,sg.default)((0,ag.default)(e)),r)}Cr.default=(0,lg.default)(fg,3);Au.exports=Cr.default});var ju=c((Fm,Pu)=>{"use strict";var cg=Object.prototype.toString;Pu.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),n=cg.call(e).slice(8,-1);return n==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=n,r||"anonymous"}});var ci=c((Wm,Nu)=>{"use strict";var hg=ju();Nu.exports=function(e){var r=0,n;function i(){return r||(r=1,n=e.apply(this,arguments),e=null),n}return i.displayName=hg(e),i}});var hi=c(Tt=>{Tt.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o},Error.captureStackTrace(r,t||Tt.get);var i=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i};Tt.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
+
`).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:n,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var i=n.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(i){var s=null,o=null,a=null,u=null,l=null,d=i[5]==="native";if(i[1]){a=i[1];var g=a.lastIndexOf(".");if(a[g-1]=="."&&g--,g>0){s=a.substr(0,g),o=a.substr(g+1);var p=s.indexOf(".Module");p>0&&(a=a.substr(p+1),s=s.substr(0,p))}u=null}o&&(u=s,l=o),o==="<anonymous>"&&(l=null,a=null);var v={fileName:i[2]||null,lineNumber:parseInt(i[3],10)||null,functionName:a,typeName:u,methodName:l,columnNumber:parseInt(i[4],10)||null,native:d};return e._createParsedCallSite(v)}}).filter(function(n){return!!n})};function qt(t){for(var e in t)this[e]=t[e]}var dg=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],pg=["topLevel","eval","native","constructor"];dg.forEach(function(t){qt.prototype[t]=null,qt.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});pg.forEach(function(t){qt.prototype[t]=!1,qt.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});Tt._createParsedCallSite=function(t){return new qt(t)}});var Cu=c((Hm,Du)=>{"use strict";var{Writable:gg}=$e();Du.exports=class extends gg{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,r,n){return e.exception?this.transport.log(e,n):(n(),!0)}}});var pi=c((Gm,ku)=>{"use strict";var Iu=L("os"),mg=Ir(),di=Mt()("winston:exception"),yg=ci(),$u=hi(),bg=Cu();ku.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
29
|
+
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:Iu.loadavg(),uptime:Iu.uptime()}}getTrace(e){return(e?$u.parse(e):$u.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new bg(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=!1);function o(){di("doExit",i),di("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);mg(n,(a,u)=>{let l=yg(u),d=a.transport||a;function g(p){return()=>{di(p),l()}}d._ending=!0,d.once("finish",g("finished")),d.once("error",g("error"))},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var Wu=c((Ym,Fu)=>{"use strict";var{Writable:_g}=$e();Fu.exports=class extends _g{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}});var mi=c((Jm,Hu)=>{"use strict";var Bu=L("os"),vg=Ir(),gi=Mt()("winston:rejection"),wg=ci(),Uu=hi(),Eg=Wu();Hu.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
30
|
+
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:Bu.loadavg(),uptime:Bu.uptime()}}getTrace(e){return(e?Uu.parse(e):Uu.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new Eg(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=!1);function o(){gi("doExit",i),gi("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);vg(n,(a,u)=>{let l=wg(u),d=a.transport||a;function g(p){return()=>{gi(p),l()}}d._ending=!0,d.once("finish",g("finished")),d.once("error",g("error"))},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var Gu=c((Zm,zu)=>{"use strict";var yi=class{constructor(e){let r=$r();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};zu.exports=yi});var $r=c((Qm,Ju)=>{"use strict";var{Stream:Sg,Transform:xg}=$e(),Vu=Ir(),{LEVEL:pe,SPLAT:Yu}=k(),Ku=li(),Mg=pi(),Og=mi(),Rg=Bn(),qg=Gu(),{warn:Tg}=hn(),Lg=Pr(),Ag=/%[scdjifoO%]/g,kr=class extends xg{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(n){let i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message,i.cause=n.cause),r.write(i)}}})}configure({silent:e,format:r,defaultMeta:n,levels:i,level:s="info",exitOnError:o=!0,transports:a,colors:u,emitErrs:l,formatters:d,padLevels:g,rewriters:p,stripColors:v,exceptionHandlers:f,rejectionHandlers:y}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||on()(),this.defaultMeta=n||null,this.levels=i||this.levels||Lg.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new Mg(this),this.rejections=new Og(this),this.profilers={},this.exitOnError=o,a&&(a=Array.isArray(a)?a:[a],a.forEach(w=>this.add(w))),u||l||d||g||p||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
31
|
+
`));f&&this.exceptions.handle(f),y&&this.rejections.handle(y)}getHighestLogLevel(){let e=Lt(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,n)=>{let i=Lt(this.levels,n.level);return i!==null&&i>r?i:r},e)}isLevelEnabled(e){let r=Lt(this.levels,e);if(r===null)return!1;let n=Lt(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(s=>{let o=Lt(this.levels,s.level);return o===null&&(o=n),o>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[pe]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[pe]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[pe]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(Ag))){let o=Object.assign({},this.defaultMeta,i,{[pe]:e,[Yu]:n,level:e,message:r});return i.message&&(o.message=`${o.message} ${i.message}`),i.stack&&(o.stack=i.stack),i.cause&&(o.cause=i.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[pe]:e,[Yu]:n,level:e,message:r})),this}_transform(e,r,n){if(this.silent)return n();e[pe]||(e[pe]=e.level),!this.levels[e[pe]]&&this.levels[e[pe]]!==0&&console.error("[winston] Unknown logger level: %s",e[pe]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){let r=this.transports.slice();Vu(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end()},e)}add(e){let r=!Ku(e)||e.log.length>2?new Rg({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!Ku(e)||e.log.length>2)&&(r=this.transports.filter(n=>n.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){Tg.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let n={},i=Object.assign({},e.query||{});function s(a,u){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(i)),a.query(e,(l,d)=>{if(l)return u(l);typeof a.formatResults=="function"&&(d=a.formatResults(d,e.format)),u(null,d)})}function o(a,u){s(a,(l,d)=>{u&&(d=l||d,d&&(n[a.name]=d),u()),u=null})}Vu(this.transports.filter(a=>!!a.query),o,()=>r(null,n))}stream(e={}){let r=new Sg,n=[];return r._streams=n,r.destroy=()=>{let i=n.length;for(;i--;)n[i].destroy()},this.transports.filter(i=>!!i.stream).forEach(i=>{let s=i.stream(e);s&&(n.push(s),s.on("log",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("log",o)}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("error",o)}))}),r}startTimer(){return new qg(this)}profile(e,...r){let n=Date.now();if(this.profilers[e]){let i=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let s=typeof r[r.length-1]=="object"?r.pop():{};return s.level=s.level||"info",s.durationMs=n-i,s.message=s.message||e,this.write(s)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
32
|
+
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Lt(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(kr.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Ju.exports=kr});var bi=c((Xm,Zu)=>{"use strict";var{LEVEL:Pg}=k(),jg=Pr(),Ng=$r(),Dg=Mt()("winston:create-logger");function Cg(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Zu.exports=function(t={}){t.levels=t.levels||jg.npm.levels;class e extends Ng{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(Dg('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let s=this||r;if(i.length===1){let[o]=i,a=o&&o.message&&o||{message:o};return a.level=a[Pg]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[Cg(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var Xu=c((ty,Qu)=>{"use strict";var Ig=bi();Qu.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=Ig(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var tl=c(P=>{"use strict";var el=cn(),{warn:At}=hn();P.version=Ks().version;P.transports=Ou();P.config=Pr();P.addColors=el.levels;P.format=el.format;P.createLogger=bi();P.Logger=$r();P.ExceptionHandler=pi();P.RejectionHandler=mi();P.Container=Xu();P.Transport=Ze();P.loggers=new P.Container;var ge=P.createLogger();Object.keys(P.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>P[t]=(...e)=>ge[t](...e));Object.defineProperty(P,"level",{get(){return ge.level},set(t){ge.level=t}});Object.defineProperty(P,"exceptions",{get(){return ge.exceptions}});Object.defineProperty(P,"rejections",{get(){return ge.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(P,t,{get(){return ge[t]},set(e){ge[t]=e}})});Object.defineProperty(P,"default",{get(){return{exceptionHandlers:ge.exceptionHandlers,rejectionHandlers:ge.rejectionHandlers,transports:ge.transports}}});At.deprecated(P,"setLevels");At.forFunctions(P,"useFormat",["cli"]);At.forProperties(P,"useFormat",["padLevels","stripColors"]);At.forFunctions(P,"deprecated",["addRewriter","addFilter","clone","extend"]);At.forProperties(P,"deprecated",["emitErrs","levelLength"])});import{createHash as Kg}from"node:crypto";import{mkdirSync as Jg,writeFileSync as Zg}from"node:fs";import{dirname as Qg,join as Xg}from"node:path";import{parentPort as ul,threadId as e0,workerData as t0}from"node:worker_threads";import{tmpdir as $g}from"node:os";import{join as kg}from"node:path";import{homedir as Oi}from"node:os";function Ri(t){return t==="~"?Oi():t.startsWith("~/")||t.startsWith("~\\")?Oi()+t.slice(1):t}var ue=_l(tl(),1),nl=kg($g(),"augment-onison-log.txt"),Fg=ue.default.format.combine(ue.default.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),ue.default.format.errors({stack:!0}),ue.default.format.printf(({timestamp:t,level:e,message:r,prefix:n,...i})=>{let s=n?` [${n}]`:"",o=Object.keys(i).length>0?` ${JSON.stringify(i)}`:"";return`${t} ${e.toUpperCase().padEnd(5)}${s} ${r}${o}`})),Wg=ue.default.format.combine(ue.default.format.timestamp(),ue.default.format.errors({stack:!0}),ue.default.format.json()),nt,rl=nl;function Bg(t,e){rl=t&&t!=="-"?Ri(t):nl;let r=e||process.env.LOG_LEVEL||"info",n=new ue.default.transports.File({filename:rl,format:process.env.AUGMENT_LOG_FORMAT==="json"?Wg:Fg});nt?(nt.clear().add(n),nt.level=r):nt=ue.default.createLogger({level:r,transports:[n]})}var il=new Proxy({},{get(t,e,r){return nt||Bg(),Reflect.get(nt,e,r)}});import{existsSync as Ug,realpathSync as Hg}from"node:fs";import{basename as zg,dirname as Gg,join as Vg,sep as Yg}from"node:path";function sl(t){let e=[],r=t;for(;!Ug(r);){e.unshift(zg(r));let i=Gg(r);if(i===r)break;r=i}let n=Hg(r);return e.length>0?Vg(n,...e):n}function ol(t,e){let r=sl(e),n=sl(t);if(!n.startsWith(r+Yg)&&n!==r)throw new Error(`Path traversal blocked: ${t} escapes VFS root ${e}`)}var it=class extends Error{constructor(e,r){super(e),this.name="VfsRequestError",this.statusCode=r}},Pt=class extends Error{constructor(e,r){super(`VFS ${e} request timed out after ${r}ms`),this.name="VfsRequestTimeoutError",this.timeoutMs=r}};if(!ul)throw new Error("vfs-prefetch-worker must be a worker thread");var _i=ul,J=t0,jt=il.child({prefix:`vfs-worker-child:${e0}`});function r0(t){let e=t instanceof Error?t:new Error(String(t));jt.error(`posting error name=${e.name} status=${e instanceof it?e.statusCode:"unknown"}`),_i.postMessage({type:"error",message:e.message,stack:e.stack,...e instanceof it?{statusCode:e.statusCode}:{},...e instanceof Pt?{timeoutMs:e.timeoutMs}:{}})}function n0(t){let{file:e,assignedPaths:r,seqs:n,state:i}=t;if(!r.has(e.path))throw new Error(`VFS stream returned unrequested path: ${e.path}`);let s=Array.isArray(e.content)?Buffer.from(e.content):Buffer.from(e.content,"base64"),o=Xg(J.vfsDir,e.path);ol(o,J.vfsDir),Jg(Qg(o),{recursive:!0}),Zg(o,s),i.push({path:e.path,hash:Kg("sha256").update(s).digest("hex"),seq:n.get(e.path)})}async function i0(){jt.info(`started paths=${J.paths.length}`);let t;try{t=await fetch(`${J.apiUrl}/cloud-agents/vfs/stream-content`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${J.authToken}`,"User-Agent":J.userAgent},body:JSON.stringify({filesystem_id:J.filesystemId,space_id:J.spaceId,paths:J.paths,...J.agentId?{agent_id:J.agentId}:{}}),signal:AbortSignal.timeout(J.requestTimeoutMs??3e4)})}catch(l){throw l instanceof Error&&l.name==="TimeoutError"?new Pt("stream-content",J.requestTimeoutMs??3e4):l}if(!t.ok){let l=await t.text();throw jt.error(`stream-content failed status=${t.status}`),new it(`VFS stream-content failed: ${t.status} ${l}`,t.status)}let e=new Set(J.paths),r=new Map(J.changeSeqs),n=[],i=l=>n0({file:l,assignedPaths:e,seqs:r,state:n});if(!t.body){let l=await t.json();for(let d of l.files??[])i(d);jt.info(`completed files=${n.length}`),_i.postMessage({type:"result",result:{state:n}});return}let s=t.body.getReader(),o=new TextDecoder,a="",u=l=>{let d=l.trim();d&&i(JSON.parse(d))};try{for(;;){let{done:l,value:d}=await s.read();if(l)break;a+=o.decode(d,{stream:!0});let g=a.split(`
|
|
33
|
+
`);a=g.pop()??"";for(let p of g)u(p)}a+=o.decode(),u(a)}finally{s.releaseLock()}jt.info(`completed files=${n.length}`),_i.postMessage({type:"result",result:{state:n}})}i0().catch(r0);
|
|
34
34
|
/*! Bundled license information:
|
|
35
35
|
|
|
36
36
|
safe-buffer/index.js:
|