@stlite/desktop 0.76.1 → 0.76.3
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/bin/dump_artifacts.js +30 -30
- package/build/assets/{FileDownload.esm--KUF2yhQ.js → FileDownload.esm-BIJCW18t.js} +1 -1
- package/build/assets/{FormClearHelper-D3yotkXf.js → FormClearHelper-9eaBETaU.js} +1 -1
- package/build/assets/{Hooks-rnMPF1_I.js → Hooks-BNfoYvra.js} +1 -1
- package/build/assets/{InputInstructions-D1xaOoA_.js → InputInstructions-C-ODKekf.js} +1 -1
- package/build/assets/{ProgressBar-TrtX1yYk.js → ProgressBar-556DCe2G.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-F44RH20T.js → RenderInPortalIfExists-CUkPZKNv.js} +1 -1
- package/build/assets/{Toolbar-CfaA32cH.js → Toolbar-CTzbm8jh.js} +1 -1
- package/build/assets/{base-input-Bvc5b-2K.js → base-input-Dtkz4-6L.js} +1 -1
- package/build/assets/{createSuper-CxJ5Qet3.js → createSuper-DEEzb3jl.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-Bhwq6yq9.js → data-grid-overlay-editor-DPoQdFTw.js} +1 -1
- package/build/assets/{downloader-Lbha8Mka.js → downloader-ByyRLqH8.js} +1 -1
- package/build/assets/{es6-CJjM6kbP.js → es6-DuFilFNR.js} +2 -2
- package/build/assets/{getPrototypeOf-Do3gT2Di.js → getPrototypeOf-CddPd8GH.js} +1 -1
- package/build/assets/{iframeResizer.contentWindow-DknzVf8U.js → iframeResizer.contentWindow-WXhkpkLh.js} +1 -1
- package/build/assets/{index-EOIuoj4I.js → index-B-xJO1Ho.js} +45 -45
- package/build/assets/{index-Dzngiwb-.js → index-B7jeBG3I.js} +1 -1
- package/build/assets/{index-hQJE4Hk3.js → index-BM1ZT3Ff.js} +1 -1
- package/build/assets/{index-BJ35Ra3B.js → index-BVYH87rb.js} +1 -1
- package/build/assets/{index-DUrta3it.js → index-BYNFhnUr.js} +1 -1
- package/build/assets/{index-3jxc0CXG.js → index-BcOJcuIY.js} +1 -1
- package/build/assets/{index-BZtVxUC0.js → index-BhoRIEB3.js} +1 -1
- package/build/assets/{index-0dVGR9fp.js → index-Bi-U93sQ.js} +1 -1
- package/build/assets/{index-TNhAYJaK.js → index-BjuVmbek.js} +1 -1
- package/build/assets/{index-ohl-VCS7.js → index-C3tRfgPv.js} +1 -1
- package/build/assets/{index-KMQVOp6a.js → index-C6_T4XU6.js} +1 -1
- package/build/assets/{index-BewMEcPF.js → index-CBHc7z3n.js} +1 -1
- package/build/assets/{index-pzpBn5Mj.js → index-CEvXUeud.js} +1 -1
- package/build/assets/{index-BABCx9XF.js → index-CHFwO0AW.js} +1 -1
- package/build/assets/{index-DP9d5w-p.js → index-CLyeNt_C.js} +1 -1
- package/build/assets/{index-D_z1Z4Yp.js → index-ChjuSLOe.js} +1 -1
- package/build/assets/{index-bFKuAFZe.js → index-CoFiEMgW.js} +1 -1
- package/build/assets/{index-B9g0kqq9.js → index-CpMQR4wM.js} +1 -1
- package/build/assets/{index-Dtz56C3X.js → index-CpjZwpIx.js} +1 -1
- package/build/assets/{index-VISX5Zc0.js → index-Cq7Gc9v7.js} +1 -1
- package/build/assets/{index-DEVPgMwx.js → index-DDdOpIWs.js} +1 -1
- package/build/assets/{index-CKt_OoH9.js → index-DNTxN24q.js} +1 -1
- package/build/assets/{index-j0a753Nr.js → index-DTaHLfXk.js} +1 -1
- package/build/assets/{index-VlvN4Fc-.js → index-D_klJm3B.js} +1 -1
- package/build/assets/{index-CKkCIAau.js → index-De3JC6IK.js} +1 -1
- package/build/assets/{index-B_-cqmHC.js → index-DegiiTk-.js} +1 -1
- package/build/assets/{index-DGh7Hb6h.js → index-DjD7cT7O.js} +1 -1
- package/build/assets/{index-C7BdVmrL.js → index-Dk9XWjMr.js} +1 -1
- package/build/assets/{index-Bf-WIrdq.js → index-HPV1LTrz.js} +1 -1
- package/build/assets/{index-Dv0Prv3W.js → index-MeAdQQio.js} +1 -1
- package/build/assets/{index-DBwYfcOH.js → index-PUIfv8RQ.js} +1 -1
- package/build/assets/{index-CMbTUrxn.js → index-Q8BeOtD9.js} +5 -5
- package/build/assets/{index-DQW8WX8T.js → index-TIt04xnQ.js} +1 -1
- package/build/assets/{index-CQKm6Iu1.js → index-V2cMT1WJ.js} +1 -1
- package/build/assets/{index-Dr_f2tyR.js → index-m3gyit8Q.js} +1 -1
- package/build/assets/{index-BHhK2I00.js → index-xBvoLAr1.js} +1 -1
- package/build/assets/{index-CXJQYh7L.js → index-y4Hom3N9.js} +1 -1
- package/build/assets/{input-5A8NzOK5.js → input-CR_-e9gB.js} +1 -1
- package/build/assets/{memory-B_asHZdO.js → memory-VreDnN7X.js} +1 -1
- package/build/assets/{number-overlay-editor-DH7XBeu0.js → number-overlay-editor-BRKoTj3K.js} +1 -1
- package/build/assets/{sandbox-D_C1UB9w.js → sandbox-BESdsCEV.js} +1 -1
- package/build/assets/{slicedToArray-DPmPM4Il.js → slicedToArray-DFtVT9Ta.js} +1 -1
- package/build/assets/{textarea-D5BngIZU.js → textarea-zpR5l8uh.js} +1 -1
- package/build/assets/{timepicker-DDIjFLFG.js → timepicker-CBUeK5RX.js} +1 -1
- package/build/assets/{uniqueId-CI1tp1qG.js → uniqueId-DHqXS3LS.js} +1 -1
- package/build/assets/{useBasicWidgetState-C9ZYeVU1.js → useBasicWidgetState-H1nJNjQy.js} +1 -1
- package/build/assets/{useOnInputChange-7prOUvRG.js → useOnInputChange-D46JoCXj.js} +1 -1
- package/build/assets/{withFullScreenWrapper-B9gGgkei.js → withFullScreenWrapper--g6uY0Wf.js} +1 -1
- package/build/electron/worker.js +11 -12
- package/build/index.html +1 -1
- package/package.json +7 -8
- package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
package/bin/dump_artifacts.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var Ug=Object.create;var Al=Object.defineProperty;var zg=Object.getOwnPropertyDescriptor;var Hg=Object.getOwnPropertyNames;var Gg=Object.getPrototypeOf,Yg=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Vg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Hg(e))!Yg.call(t,n)&&n!==r&&Al(t,n,{get:()=>e[n],enumerable:!(i=zg(e,n))||i.enumerable});return t};var be=(t,e,r)=>(r=t!=null?Ug(Gg(t)):{},Vg(e||!t||!t.__esModule?Al(r,"default",{value:t,enumerable:!0}):r,t));var Ae=w((HE,kl)=>{"use strict";var Ks=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,i=this._styles,n=i.length;n--;){var s=
|
|
7
|
-
`));return!0}
|
|
8
|
-
${E}`,
|
|
9
|
-
${E}`);let K=Math.min(R.length,a),
|
|
10
|
-
${k}`),y.pop(),`[${x}]`}let
|
|
11
|
-
${E}`,
|
|
5
|
+
`),Error.captureStackTrace(this,t)}};kl.exports=t=>{if(t.length>2)throw new Ks(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var ql=w((GE,Cl)=>{var Pl={};Cl.exports=Pl;var Dl={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(Dl).forEach(function(t){var e=Dl[t],r=Pl[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var jl=w((YE,Ll)=>{"use strict";Ll.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),i=/^-{1,2}/.test(t)?"":"--",n=e.indexOf(i+t);return n!==-1&&(r===-1?!0:n<r)}});var Fl=w((VE,Nl)=>{"use strict";var Kg=require("os"),Ge=jl(),Re=process.env,hr=void 0;Ge("no-color")||Ge("no-colors")||Ge("color=false")?hr=!1:(Ge("color")||Ge("colors")||Ge("color=true")||Ge("color=always"))&&(hr=!0);"FORCE_COLOR"in Re&&(hr=Re.FORCE_COLOR.length===0||parseInt(Re.FORCE_COLOR,10)!==0);function Jg(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Zg(t){if(hr===!1)return 0;if(Ge("color=16m")||Ge("color=full")||Ge("color=truecolor"))return 3;if(Ge("color=256"))return 2;if(t&&!t.isTTY&&hr!==!0)return 0;var e=hr?1:0;if(process.platform==="win32"){var r=Kg.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 Re)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in Re})||Re.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Re)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Re.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Re){var i=parseInt((Re.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Re.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Re.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Re.TERM)||"COLORTERM"in Re?1:(Re.TERM==="dumb",e)}function Js(t){var e=Zg(t);return Jg(e)}Nl.exports={supportsColor:Js,stdout:Js(process.stdout),stderr:Js(process.stderr)}});var $l=w((KE,Il)=>{Il.exports=function(e,r){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var n={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 a=n[s]||[" "],o=Math.floor(Math.random()*a.length);typeof n[s]<"u"?i+=n[s][o]:i+=s}),i}});var Bl=w((JE,Wl)=>{Wl.exports=function(e,r){e=e||" he is here ";var i={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"]},n=[].concat(i.up,i.down,i.mid);function s(l){var u=Math.floor(Math.random()*l);return u}function a(l){var u=!1;return n.filter(function(c){u=c===l}),u}function o(l,u){var c="",h,d;u=u||{},u.up=typeof u.up<"u"?u.up:!0,u.mid=typeof u.mid<"u"?u.mid:!0,u.down=typeof u.down<"u"?u.down:!0,u.size=typeof u.size<"u"?u.size:"maxi",l=l.split("");for(d in l)if(!a(d)){switch(c=c+l[d],h={up:0,down:0,mid:0},u.size){case"mini":h.up=s(8),h.mid=s(2),h.down=s(8);break;case"maxi":h.up=s(16)+3,h.mid=s(4)+1,h.down=s(64)+3;break;default:h.up=s(8)+1,h.mid=s(6)/2,h.down=s(8)+1;break}var f=["up","mid","down"];for(var y in f)for(var b=f[y],_=0;_<=h[b];_++)u[b]&&(c=c+i[b][s(i[b].length)])}return c}return o(e,r)}});var zl=w((ZE,Ul)=>{Ul.exports=function(t){return function(e,r,i){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 Gl=w((QE,Hl)=>{Hl.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var Vl=w((XE,Yl)=>{Yl.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,i,n){return r===" "?r:t[e[i++%e.length]](r)}}});var Jl=w((e2,Kl)=>{Kl.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,i,n){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var ru=w((r2,tu)=>{var N={};tu.exports=N;N.themes={};var Qg=require("util"),zt=N.styles=ql(),Ql=Object.defineProperties,Xg=new RegExp(/[\r\n]+/g);N.supportsColor=Fl().supportsColor;typeof N.enabled>"u"&&(N.enabled=N.supportsColor()!==!1);N.enable=function(){N.enabled=!0};N.disable=function(){N.enabled=!1};N.stripColors=N.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var t2=N.stylize=function(e,r){if(!N.enabled)return e+"";var i=zt[r];return!i&&r in N?N[r](e):i.open+e+i.close},em=/[|\\{}()[\]^$+*?.]/g,tm=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(em,"\\$&")};function Xl(t){var e=function r(){return im.apply(r,arguments)};return e._styles=t,e.__proto__=rm,e}var eu=function(){var t={};return zt.grey=zt.gray,Object.keys(zt).forEach(function(e){zt[e].closeRe=new RegExp(tm(zt[e].close),"g"),t[e]={get:function(){return Xl(this._styles.concat(e))}}}),t}(),rm=Ql(function(){},eu);function im(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:Qg.inspect(a)}).join(" ");if(!N.enabled||!e)return e;for(var r=e.indexOf(`
|
|
6
|
+
`)!=-1,i=this._styles,n=i.length;n--;){var s=zt[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Xg,function(a){return s.close+a+s.open}))}return e}N.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){N[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var s in t[r])n=N[t[r][s]](n);return n}return N[t[r]](i)}})(e)};function nm(){var t={};return Object.keys(eu).forEach(function(e){t[e]={get:function(){return Xl([e])}}}),t}var sm=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};N.trap=$l();N.zalgo=Bl();N.maps={};N.maps.america=zl()(N);N.maps.zebra=Gl()(N);N.maps.rainbow=Vl()(N);N.maps.random=Jl()(N);for(Zl in N.maps)(function(t){N[t]=function(e){return sm(N.maps[t],e)}})(Zl);var Zl;Ql(N,nm())});var Zs=w((i2,iu)=>{var am=ru();iu.exports=am});var nu=w(Qs=>{"use strict";Qs.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};Qs.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var su=w(Xs=>{"use strict";Xs.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Xs.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var au=w(ea=>{"use strict";ea.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};ea.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var ou=w(Xi=>{"use strict";Object.defineProperty(Xi,"cli",{value:nu()});Object.defineProperty(Xi,"npm",{value:su()});Object.defineProperty(Xi,"syslog",{value:au()})});var re=w(Hr=>{"use strict";Object.defineProperty(Hr,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Hr,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Hr,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Hr,"configs",{value:ou()})});var rn=w((u2,tn)=>{"use strict";var ia=Zs(),{LEVEL:ta,MESSAGE:ra}=re();ia.enabled=!0;var lu=/\s+/,en=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){let r=Object.keys(e).reduce((i,n)=>(i[n]=lu.test(e[n])?e[n].split(lu):e[n],i),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,i){if(typeof i>"u"&&(i=r),!Array.isArray(t.allColors[e]))return ia[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=ia[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[ra]=="string"&&(e[ra]=this.colorize(e[ta],e.level,e[ra])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[ta],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[ta],e.level,e.message)),e}};tn.exports=t=>new en(t);tn.exports.Colorizer=tn.exports.Format=en});var fu=w((f2,uu)=>{"use strict";var{Colorizer:om}=rn();uu.exports=t=>(om.addColors(t.colors||t),t)});var cu=w((h2,hu)=>{"use strict";var lm=Ae();hu.exports=lm(t=>(t.message=` ${t.message}`,t))});var gu=w((c2,pu)=>{"use strict";var um=Ae(),{LEVEL:du,MESSAGE:na}=re();pu.exports=um((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[du]:t[du]||t.level,message:t.message,[na]:t[na]||t.message});return e&&(n.stack=t.stack),r&&(n.cause=t.cause),n}if(!(t.message instanceof Error))return t;let i=t.message;return Object.assign(t,i),t.message=i.message,t[na]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var aa=w((d2,sn)=>{"use strict";var{configs:fm,LEVEL:mu,MESSAGE:sa}=re(),nn=class t{constructor(e={levels:fm.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){let r=Object.keys(e).map(i=>i.length);return Math.max(...r)}static paddingForLevel(e,r,i){let n=i+1-e.length,s=Math.floor(n/r.length);return`${r}${r.repeat(s)}`.slice(0,n)}static paddingForLevels(e,r=" "){let i=t.getLongestLevel(e);return Object.keys(e).reduce((n,s)=>(n[s]=t.paddingForLevel(s,r,i),n),{})}transform(e,r){return e.message=`${this.paddings[e[mu]]}${e.message}`,e[sa]&&(e[sa]=`${this.paddings[e[mu]]}${e[sa]}`),e}};sn.exports=t=>new nn(t);sn.exports.Padder=sn.exports.Format=nn});var yu=w((p2,oa)=>{"use strict";var{Colorizer:hm}=rn(),{Padder:cm}=aa(),{configs:dm,MESSAGE:pm}=re(),an=class{constructor(e={}){e.levels||(e.levels=dm.cli.levels),this.colorizer=new hm(e),this.padder=new cm(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[pm]=`${e.level}:${e.message}`,e}};oa.exports=t=>new an(t);oa.exports.Format=an});var wu=w((g2,la)=>{"use strict";var gm=Ae();function bu(t){if(t.every(mm))return e=>{let r=e;for(let i=0;i<t.length;i++)if(r=t[i].transform(r,t[i].options),!r)return!1;return r}}function mm(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}la.exports=(...t)=>{let e=gm(bu(t)),r=e();return r.Format=e.Format,r};la.exports.cascade=bu});var Gr=w((ca,Eu)=>{"use strict";var{hasOwnProperty:on}=Object.prototype,Gt=ha();Gt.configure=ha;Gt.stringify=Gt;Gt.default=Gt;ca.stringify=Gt;ca.configure=ha;Eu.exports=Gt;var ym=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function St(t){return t.length<5e3&&!ym.test(t)?`"${t}"`:JSON.stringify(t)}function ua(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],i=e;for(;i!==0&&t[i-1]>r;)t[i]=t[i-1],i--;t[i]=r}return t}var bm=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function fa(t){return bm.call(t)!==void 0&&t.length!==0}function vu(t,e,r){t.length<r&&(r=t.length);let i=e===","?"":" ",n=`"0":${i}${t[0]}`;for(let s=1;s<r;s++)n+=`${e}"${s}":${i}${t[s]}`;return n}function wm(t){if(on.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 _u(t,e){let r;if(on.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 Su(t,e){let r;if(on.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 Ht(t){return t===1?"1 item":`${t} items`}function vm(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function _m(t){if(on.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 i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function ha(t){t={...t};let e=_m(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=wm(t),i=_u(t,"bigint"),n=_u(t,"deterministic"),s=Su(t,"maximumDepth"),a=Su(t,"maximumBreadth");function o(d,f,y,b,_,E){let R=f[d];switch(typeof R=="object"&&R!==null&&typeof R.toJSON=="function"&&(R=R.toJSON(d)),R=b.call(f,d,R),typeof R){case"string":return St(R);case"object":{if(R===null)return"null";if(y.indexOf(R)!==-1)return r;let x="",M=",",k=E;if(Array.isArray(R)){if(R.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(R),_!==""&&(E+=_,x+=`
|
|
8
|
+
${E}`,M=`,
|
|
9
|
+
${E}`);let K=Math.min(R.length,a),Se=0;for(;Se<K-1;Se++){let ft=o(String(Se),R,y,b,_,E);x+=ft!==void 0?ft:"null",x+=M}let Ee=o(String(Se),R,y,b,_,E);if(x+=Ee!==void 0?Ee:"null",R.length-1>a){let ft=R.length-a-1;x+=`${M}"... ${Ht(ft)} not stringified"`}return _!==""&&(x+=`
|
|
10
|
+
${k}`),y.pop(),`[${x}]`}let C=Object.keys(R),F=C.length;if(F===0)return"{}";if(s<y.length+1)return'"[Object]"';let q="",U="";_!==""&&(E+=_,M=`,
|
|
11
|
+
${E}`,q=" ");let te=Math.min(F,a);n&&!fa(R)&&(C=ua(C)),y.push(R);for(let K=0;K<te;K++){let Se=C[K],Ee=o(Se,R,y,b,_,E);Ee!==void 0&&(x+=`${U}${St(Se)}:${q}${Ee}`,U=M)}if(F>a){let K=F-a;x+=`${U}"...":${q}"${Ht(K)} not stringified"`,U=M}return _!==""&&U.length>1&&(x=`
|
|
12
12
|
${E}${x}
|
|
13
|
-
${k}`),y.pop(),`{${x}}`}case"number":return isFinite(R)?String(R):e?e(R):"null";case"boolean":return R===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(R);default:return e?e(R):void 0}}function l(d,f,y,b,_,E){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return
|
|
14
|
-
${E}`,
|
|
15
|
-
${E}`);let F=Math.min(f.length,a),
|
|
16
|
-
${R}`),y.pop(),`[${x}]`}y.push(f);let k="";_!==""&&(E+=_,
|
|
17
|
-
${E}`,k=" ");let
|
|
13
|
+
${k}`),y.pop(),`{${x}}`}case"number":return isFinite(R)?String(R):e?e(R):"null";case"boolean":return R===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(R);default:return e?e(R):void 0}}function l(d,f,y,b,_,E){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return St(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let R=E,x="",M=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_!==""&&(E+=_,x+=`
|
|
14
|
+
${E}`,M=`,
|
|
15
|
+
${E}`);let F=Math.min(f.length,a),q=0;for(;q<F-1;q++){let te=l(String(q),f[q],y,b,_,E);x+=te!==void 0?te:"null",x+=M}let U=l(String(q),f[q],y,b,_,E);if(x+=U!==void 0?U:"null",f.length-1>a){let te=f.length-a-1;x+=`${M}"... ${Ht(te)} not stringified"`}return _!==""&&(x+=`
|
|
16
|
+
${R}`),y.pop(),`[${x}]`}y.push(f);let k="";_!==""&&(E+=_,M=`,
|
|
17
|
+
${E}`,k=" ");let C="";for(let F of b){let q=l(F,f[F],y,b,_,E);q!==void 0&&(x+=`${C}${St(F)}:${k}${q}`,C=M)}return _!==""&&C.length>1&&(x=`
|
|
18
18
|
${E}${x}
|
|
19
|
-
${R}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function u(d,f,y,b,_){switch(typeof f){case"string":return
|
|
19
|
+
${R}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function u(d,f,y,b,_){switch(typeof f){case"string":return St(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return u(d,f,y,b,_);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let E=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_+=b;let q=`
|
|
20
20
|
${_}`,U=`,
|
|
21
|
-
${_}`,
|
|
22
|
-
${E}`,y.pop(),`[${
|
|
23
|
-
${_}`,k="",
|
|
21
|
+
${_}`,te=Math.min(f.length,a),K=0;for(;K<te-1;K++){let Ee=u(String(K),f[K],y,b,_);q+=Ee!==void 0?Ee:"null",q+=U}let Se=u(String(K),f[K],y,b,_);if(q+=Se!==void 0?Se:"null",f.length-1>a){let Ee=f.length-a-1;q+=`${U}"... ${Ht(Ee)} not stringified"`}return q+=`
|
|
22
|
+
${E}`,y.pop(),`[${q}]`}let R=Object.keys(f),x=R.length;if(x===0)return"{}";if(s<y.length+1)return'"[Object]"';_+=b;let M=`,
|
|
23
|
+
${_}`,k="",C="",F=Math.min(x,a);fa(f)&&(k+=vu(f,M,a),R=R.slice(f.length),F-=f.length,C=M),n&&(R=ua(R)),y.push(f);for(let q=0;q<F;q++){let U=R[q],te=u(U,f[U],y,b,_);te!==void 0&&(k+=`${C}${St(U)}: ${te}`,C=M)}if(x>a){let q=x-a;k+=`${C}"...": "${Ht(q)} not stringified"`,C=M}return C!==""&&(k=`
|
|
24
24
|
${_}${k}
|
|
25
|
-
${E}`),y.pop(),`{${k}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function c(d,f,y){switch(typeof f){case"string":return ct(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return c(d,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let b="";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f);let O=Math.min(f.length,a),k=0;for(;k<O-1;k++){let F=c(String(k),f[k],y);b+=F!==void 0?F:"null",b+=","}let q=c(String(k),f[k],y);if(b+=q!==void 0?q:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${jt(F)} not stringified"`}return y.pop(),`[${b}]`}let _=Object.keys(f),E=_.length;if(E===0)return"{}";if(s<y.length+1)return'"[Object]"';let R="",x=Math.min(E,a);Bs(f)&&(b+=Yl(f,",",a),_=_.slice(f.length),x-=f.length,R=","),n&&(_=Ws(_)),y.push(f);for(let O=0;O<x;O++){let k=_[O],q=c(k,f[k],y);q!==void 0&&(b+=`${R}${ct(k)}:${q}`,R=",")}if(E>a){let O=E-a;b+=`${R}"...":"${jt(O)} not stringified"`}return y.pop(),`{${b}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(d,f,y){if(arguments.length>1){let b="";if(typeof y=="number"?b=" ".repeat(Math.min(y,10)):typeof y=="string"&&(b=y.slice(0,10)),f!=null){if(typeof f=="function")return o("",{"":d},[],f,b,"");if(Array.isArray(f))return l("",d,[],zg(f),b,"")}if(b.length!==0)return u("",d,[],b,"")}return c("",d,[])}return h}});var Hs=w((CE,Zl)=>{"use strict";var Gg=Ee(),{MESSAGE:Yg}=te(),Vg=Pr();function Kg(t,e){return typeof e=="bigint"?e.toString():e}Zl.exports=Gg((t,e)=>{let r=Vg.configure(e);return t[Yg]=r(t,e.replacer||Kg,e.space),t})});var Xl=w((jE,Ql)=>{"use strict";var Jg=Ee();Ql.exports=Jg((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var tu=w((LE,eu)=>{"use strict";var Zg=Ee(),{MESSAGE:Qg}=te(),Xg=Pr();eu.exports=Zg(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[Qg]=Xg(e),t})});var iu=w((NE,ru)=>{"use strict";var em=Ee();function tm(t,e,r){let i=e.reduce((s,a)=>(s[a]=t[a],delete t[a],s),{}),n=Object.keys(t).reduce((s,a)=>(s[a]=t[a],delete t[a],s),{});return Object.assign(t,i,{[r]:n}),t}function rm(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}ru.exports=em((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?tm(t,i,r):e.fillWith?rm(t,e.fillWith,r):t})});var su=w((FE,nu)=>{var tr=1e3,rr=tr*60,ir=rr*60,Nt=ir*24,im=Nt*7,nm=Nt*365.25;nu.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return sm(t);if(r==="number"&&isFinite(t))return e.long?om(t):am(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function sm(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]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*nm;case"weeks":case"week":case"w":return r*im;case"days":case"day":case"d":return r*Nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ir;case"minutes":case"minute":case"mins":case"min":case"m":return r*rr;case"seconds":case"second":case"secs":case"sec":case"s":return r*tr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function am(t){var e=Math.abs(t);return e>=Nt?Math.round(t/Nt)+"d":e>=ir?Math.round(t/ir)+"h":e>=rr?Math.round(t/rr)+"m":e>=tr?Math.round(t/tr)+"s":t+"ms"}function om(t){var e=Math.abs(t);return e>=Nt?Bi(t,e,Nt,"day"):e>=ir?Bi(t,e,ir,"hour"):e>=rr?Bi(t,e,rr,"minute"):e>=tr?Bi(t,e,tr,"second"):t+" ms"}function Bi(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var ou=w((Dr,au)=>{"use strict";var lm=Ee(),um=su();au.exports=lm(t=>{let e=+new Date;return Dr.diff=e-(Dr.prevTime||e),Dr.prevTime=e,t.ms=`+${um(Dr.diff)}`,t})});var fu=w((IE,uu)=>{"use strict";var fm=require("util").inspect,hm=Ee(),{LEVEL:cm,MESSAGE:lu,SPLAT:dm}=te();uu.exports=hm((t,e={})=>{let r=Object.assign({},t);return delete r[cm],delete r[lu],delete r[dm],t[lu]=fm(r,!1,e.depth||null,e.colorize),t})});var hu=w(($E,zi)=>{"use strict";var{MESSAGE:pm}=te(),Ui=class{constructor(e){this.template=e}transform(e){return e[pm]=this.template(e),e}};zi.exports=t=>new Ui(t);zi.exports.Printf=zi.exports.Format=Ui});var pu=w((WE,du)=>{"use strict";var gm=Ee(),{MESSAGE:cu}=te(),mm=Pr();du.exports=gm(t=>{let e=mm(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[cu]=`${t.level}:${r} ${t.message} ${e}`:t[cu]=`${t.level}:${r} ${t.message}`,t})});var yu=w((BE,mu)=>{"use strict";var ym=require("util"),{SPLAT:gu}=te(),bm=/%[scdjifoO%]/g,wm=/%%/g,Gs=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[gu]||e.splat||[],s=i.match(wm),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],c=u.length;if(c)for(let h=0;h<c;h++)Object.assign(e,u[h]);return e.message=ym.format(i,...n),e}transform(e){let r=e.message,i=e[gu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(bm);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,a=s.length;if(a)for(let o=0;o<a;o++)Object.assign(e,s[o]);return e}return n?this._splat(e,n):e}};mu.exports=t=>new Gs(t)});var wu=w((Hi,bu)=>{(function(t,e){typeof Hi=="object"&&typeof bu<"u"?e(Hi):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Hi,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?",i="\\d\\d",n="\\d{3}",s="\\d{4}",a="[^\\s]+",o=/\[([^]*?)\]/gm;function l(S,M){for(var z=[],de=0,P=S.length;de<P;de++)z.push(S[de].substr(0,M));return z}var u=function(S){return function(M,z){var de=z[S].map(function(ke){return ke.toLowerCase()}),P=de.indexOf(M.toLowerCase());return P>-1?P:null}};function c(S){for(var M=[],z=1;z<arguments.length;z++)M[z-1]=arguments[z];for(var de=0,P=M;de<P.length;de++){var ke=P[de];for(var Fe in ke)S[Fe]=ke[Fe]}return S}var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(d,3),y=l(h,3),b={dayNamesShort:y,dayNames:h,monthNamesShort:f,monthNames:d,amPm:["am","pm"],DoFn:function(S){return S+["th","st","nd","rd"][S%10>3?0:(S-S%10!==10?1:0)*S%10]}},_=c({},b),E=function(S){return _=c(_,S)},R=function(S){return S.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},x=function(S,M){for(M===void 0&&(M=2),S=String(S);S.length<M;)S="0"+S;return S},O={D:function(S){return String(S.getDate())},DD:function(S){return x(S.getDate())},Do:function(S,M){return M.DoFn(S.getDate())},d:function(S){return String(S.getDay())},dd:function(S){return x(S.getDay())},ddd:function(S,M){return M.dayNamesShort[S.getDay()]},dddd:function(S,M){return M.dayNames[S.getDay()]},M:function(S){return String(S.getMonth()+1)},MM:function(S){return x(S.getMonth()+1)},MMM:function(S,M){return M.monthNamesShort[S.getMonth()]},MMMM:function(S,M){return M.monthNames[S.getMonth()]},YY:function(S){return x(String(S.getFullYear()),4).substr(2)},YYYY:function(S){return x(S.getFullYear(),4)},h:function(S){return String(S.getHours()%12||12)},hh:function(S){return x(S.getHours()%12||12)},H:function(S){return String(S.getHours())},HH:function(S){return x(S.getHours())},m:function(S){return String(S.getMinutes())},mm:function(S){return x(S.getMinutes())},s:function(S){return String(S.getSeconds())},ss:function(S){return x(S.getSeconds())},S:function(S){return String(Math.round(S.getMilliseconds()/100))},SS:function(S){return x(Math.round(S.getMilliseconds()/10),2)},SSS:function(S){return x(S.getMilliseconds(),3)},a:function(S,M){return S.getHours()<12?M.amPm[0]:M.amPm[1]},A:function(S,M){return S.getHours()<12?M.amPm[0].toUpperCase():M.amPm[1].toUpperCase()},ZZ:function(S){var M=S.getTimezoneOffset();return(M>0?"-":"+")+x(Math.floor(Math.abs(M)/60)*100+Math.abs(M)%60,4)},Z:function(S){var M=S.getTimezoneOffset();return(M>0?"-":"+")+x(Math.floor(Math.abs(M)/60),2)+":"+x(Math.abs(M)%60,2)}},k=function(S){return+S-1},q=[null,r],F=[null,a],N=["isPm",a,function(S,M){var z=S.toLowerCase();return z===M.amPm[0]?0:z===M.amPm[1]?1:null}],U=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var M=(S+"").match(/([+-]|\d\d)/gi);if(M){var z=+M[1]*60+parseInt(M[2],10);return M[0]==="+"?z:-z}return 0}],ee={D:["day",r],DD:["day",i],Do:["day",r+a,function(S){return parseInt(S,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(S){var M=new Date,z=+(""+M.getFullYear()).substr(0,2);return+(""+(+S>68?z-1:z)+S)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(S){return+S*100}],SS:["millisecond",i,function(S){return+S*10}],SSS:["millisecond",n],d:q,dd:q,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:N,A:N,ZZ:U,Z:U},K={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"},ye=function(S){return c(K,S)},be=function(S,M,z){if(M===void 0&&(M=K.default),z===void 0&&(z={}),typeof S=="number"&&(S=new Date(S)),Object.prototype.toString.call(S)!=="[object Date]"||isNaN(S.getTime()))throw new Error("Invalid Date pass to format");M=K[M]||M;var de=[];M=M.replace(o,function(ke,Fe){return de.push(Fe),"@@@"});var P=c(c({},_),z);return M=M.replace(e,function(ke){return O[ke](S,P)}),M.replace(/@@@/g,function(){return de.shift()})};function tt(S,M,z){if(z===void 0&&(z={}),typeof M!="string")throw new Error("Invalid format in fecha parse");if(M=K[M]||M,S.length>1e3)return null;var de=new Date,P={year:de.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ke=[],Fe=[],At=M.replace(o,function(Dt,ht){return Fe.push(R(ht)),"@@@"}),Qt={},ut={};At=R(At).replace(e,function(Dt){var ht=ee[Dt],Ar=ht[0],Pi=ht[1],Di=ht[3];if(Qt[Ar])throw new Error("Invalid format. "+Ar+" specified twice in format");return Qt[Ar]=!0,Di&&(ut[Di]=!0),ke.push(ht),"("+Pi+")"}),Object.keys(ut).forEach(function(Dt){if(!Qt[Dt])throw new Error("Invalid format. "+Dt+" is required in specified format")}),At=At.replace(/@@@/g,function(){return Fe.shift()});var kt=S.match(new RegExp(At,"i"));if(!kt)return null;for(var Ts=c(c({},_),z),xe=1;xe<kt.length;xe++){var Mi=ke[xe-1],Ai=Mi[0],ki=Mi[2],ft=ki?ki(kt[xe],Ts):+kt[xe];if(ft==null)return null;P[Ai]=ft}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Xt;if(P.timezoneOffset==null){Xt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var Pt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],xe=0,Mr=Pt.length;xe<Mr;xe++)if(Qt[Pt[xe][0]]&&P[Pt[xe][0]]!==Xt[Pt[xe][1]]())return null}else if(Xt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Xt}var xs={format:be,parse:tt,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:ye};t.assign=c,t.default=xs,t.format=be,t.parse=tt,t.defaultI18n=b,t.setGlobalDateI18n=E,t.setGlobalDateMasks=ye,Object.defineProperty(t,"__esModule",{value:!0})})});var _u=w((UE,vu)=>{"use strict";var vm=wu(),_m=Ee();vu.exports=_m((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():vm.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Eu=w((zE,Su)=>{"use strict";var Ys=As(),Sm=Ee(),{MESSAGE:Vs}=te();Su.exports=Sm((t,e)=>(e.level!==!1&&(t.level=Ys.strip(t.level)),e.message!==!1&&(t.message=Ys.strip(String(t.message))),e.raw!==!1&&t[Vs]&&(t[Vs]=Ys.strip(String(t[Vs]))),t))});var Js=w(Ks=>{"use strict";var Em=Ks.format=Ee();Ks.levels=Nl();function le(t,e){Object.defineProperty(Em,t,{get(){return e()},configurable:!0})}le("align",function(){return Il()});le("errors",function(){return Bl()});le("cli",function(){return zl()});le("combine",function(){return Gl()});le("colorize",function(){return Ni()});le("json",function(){return Hs()});le("label",function(){return Xl()});le("logstash",function(){return tu()});le("metadata",function(){return iu()});le("ms",function(){return ou()});le("padLevels",function(){return Fs()});le("prettyPrint",function(){return fu()});le("printf",function(){return hu()});le("simple",function(){return pu()});le("splat",function(){return yu()});le("timestamp",function(){return _u()});le("uncolorize",function(){return Eu()})});var Zs=w(Gi=>{"use strict";var{format:Ru}=require("util");Gi.warn={deprecated(t){return()=>{throw new Error(Ru("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Ru("{ %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(i=>{t[i]=Gi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Gi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var xu=w((YE,Rm)=>{Rm.exports={name:"winston",description:"A logger for just about everything.",version:"3.13.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.7.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^5.0.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",mocha:"^10.3.0",nyc:"^15.1.0",rimraf:"^5.0.5",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:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Qs=w((VE,Tu)=>{Tu.exports=require("util").deprecate});var Xs=w((KE,Ou)=>{Ou.exports=require("stream")});var ta=w((JE,Au)=>{"use strict";function xm(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ea,this,t)):process.nextTick(ea,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(Yi,r):(r._writableState.errorEmitted=!0,process.nextTick(Mu,r,s)):process.nextTick(Mu,r,s):e?(process.nextTick(Yi,r),e(s)):process.nextTick(Yi,r)}),this)}function Mu(t,e){ea(t,e),Yi(t)}function Yi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Tm(){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 ea(t,e){t.emit("error",e)}function Om(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Au.exports={destroy:xm,undestroy:Tm,errorOrDestroy:Om}});var nr=w((ZE,Du)=>{"use strict";var Pu={};function De(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,Pu[t]=n}function ku(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),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 Mm(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Am(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function km(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Mm(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Am(t," argument"))n=`The ${t} ${i} ${ku(e,"type")}`;else{let s=km(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${ku(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Du.exports.codes=Pu});var ra=w((QE,qu)=>{"use strict";var Pm=nr().codes.ERR_INVALID_OPT_VALUE;function Dm(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function qm(t,e,r,i){var n=Dm(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Pm(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}qu.exports={getHighWaterMark:qm}});var Cu=w((XE,ia)=>{typeof Object.create=="function"?ia.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ia.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var rt=w((e2,sa)=>{try{if(na=require("util"),typeof na.inherits!="function")throw"";sa.exports=na.inherits}catch{sa.exports=Cu()}var na});var $u=w((t2,Iu)=>{"use strict";function ju(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Lu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ju(Object(r),!0).forEach(function(i){Cm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ju(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Cm(t,e,r){return e=Fu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fu(i.key),i)}}function Lm(t,e,r){return e&&Nu(t.prototype,e),r&&Nu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fu(t){var e=Nm(t,"string");return typeof e=="symbol"?e:String(e)}function Nm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Fm=require("buffer"),Vi=Fm.Buffer,Im=require("util"),aa=Im.inspect,$m=aa&&aa.custom||"inspect";function Wm(t,e,r){Vi.prototype.copy.call(t,e,r)}Iu.exports=function(){function t(){jm(this,t),this.head=null,this.tail=null,this.length=0}return Lm(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++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 i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Vi.alloc(0);for(var i=Vi.allocUnsafe(r>>>0),n=this.head,s=0;n;)Wm(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Vi.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:$m,value:function(r,i){return aa(this,Lu(Lu({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var la=w((oa,Bu)=>{var Ki=require("buffer"),Ge=Ki.Buffer;function Wu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?Bu.exports=Ki:(Wu(Ki,oa),oa.Buffer=Ft);function Ft(t,e,r){return Ge(t,e,r)}Ft.prototype=Object.create(Ge.prototype);Wu(Ge,Ft);Ft.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};Ft.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Ft.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};Ft.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ki.SlowBuffer(t)}});var ha=w(zu=>{"use strict";var fa=la().Buffer,Uu=fa.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 Bm(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 Um(t){var e=Bm(t);if(typeof e!="string"&&(fa.isEncoding===Uu||!Uu(t)))throw new Error("Unknown encoding: "+t);return e||t}zu.StringDecoder=qr;function qr(t){this.encoding=Um(t);var e;switch(this.encoding){case"utf16le":this.text=Km,this.end=Jm,e=4;break;case"utf8":this.fillLast=Gm,e=4;break;case"base64":this.text=Zm,this.end=Qm,e=3;break;default:this.write=Xm,this.end=ey;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fa.allocUnsafe(e)}qr.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||""};qr.prototype.end=Vm;qr.prototype.text=Ym;qr.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 ua(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function zm(t,e,r){var i=e.length-1;if(i<r)return 0;var n=ua(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Hm(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 Gm(t){var e=this.lastTotal-this.lastNeed,r=Hm(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 Ym(t,e){var r=zm(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Vm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Km(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=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 Jm(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 Zm(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 Qm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Xm(t){return t.toString(this.encoding)}function ey(t){return t&&t.length?this.write(t):""}});var Vu=w((i2,Yu)=>{"use strict";var Hu=nr().codes.ERR_STREAM_PREMATURE_CLOSE;function ty(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function ry(){}function iy(t){return t.setHeader&&typeof t.abort=="function"}function Gu(t,e,r){if(typeof e=="function")return Gu(t,null,e);e||(e={}),r=ty(r||ry);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Hu),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Hu),r.call(t,y)},d=function(){t.req.on("finish",o)};return iy(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",h)}}Yu.exports=Gu});var Ju=w((n2,Ku)=>{"use strict";var Ji;function dt(t,e,r){return e=ny(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ny(t){var e=sy(t,"string");return typeof e=="symbol"?e:String(e)}function sy(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ay=Vu(),pt=Symbol("lastResolve"),It=Symbol("lastReject"),Cr=Symbol("error"),Zi=Symbol("ended"),$t=Symbol("lastPromise"),ca=Symbol("handlePromise"),Wt=Symbol("stream");function gt(t,e){return{value:t,done:e}}function oy(t){var e=t[pt];if(e!==null){var r=t[Wt].read();r!==null&&(t[$t]=null,t[pt]=null,t[It]=null,e(gt(r,!1)))}}function ly(t){process.nextTick(oy,t)}function uy(t,e){return function(r,i){t.then(function(){if(e[Zi]){r(gt(void 0,!0));return}e[ca](r,i)},i)}}var fy=Object.getPrototypeOf(function(){}),hy=Object.setPrototypeOf((Ji={get stream(){return this[Wt]},next:function(){var e=this,r=this[Cr];if(r!==null)return Promise.reject(r);if(this[Zi])return Promise.resolve(gt(void 0,!0));if(this[Wt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Cr]?o(e[Cr]):a(gt(void 0,!0))})});var i=this[$t],n;if(i)n=new Promise(uy(i,this));else{var s=this[Wt].read();if(s!==null)return Promise.resolve(gt(s,!1));n=new Promise(this[ca])}return this[$t]=n,n}},dt(Ji,Symbol.asyncIterator,function(){return this}),dt(Ji,"return",function(){var e=this;return new Promise(function(r,i){e[Wt].destroy(null,function(n){if(n){i(n);return}r(gt(void 0,!0))})})}),Ji),fy),cy=function(e){var r,i=Object.create(hy,(r={},dt(r,Wt,{value:e,writable:!0}),dt(r,pt,{value:null,writable:!0}),dt(r,It,{value:null,writable:!0}),dt(r,Cr,{value:null,writable:!0}),dt(r,Zi,{value:e._readableState.endEmitted,writable:!0}),dt(r,ca,{value:function(s,a){var o=i[Wt].read();o?(i[$t]=null,i[pt]=null,i[It]=null,s(gt(o,!1))):(i[pt]=s,i[It]=a)},writable:!0}),r));return i[$t]=null,ay(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[It];s!==null&&(i[$t]=null,i[pt]=null,i[It]=null,s(n)),i[Cr]=n;return}var a=i[pt];a!==null&&(i[$t]=null,i[pt]=null,i[It]=null,a(gt(void 0,!0))),i[Zi]=!0}),e.on("readable",ly.bind(null,i)),i};Ku.exports=cy});var ef=w((s2,Xu)=>{"use strict";function Zu(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function dy(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Zu(s,i,n,a,o,"next",l)}function o(l){Zu(s,i,n,a,o,"throw",l)}a(void 0)})}}function Qu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function py(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qu(Object(r),!0).forEach(function(i){gy(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function gy(t,e,r){return e=my(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function my(t){var e=yy(t,"string");return typeof e=="symbol"?e:String(e)}function yy(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var by=nr().codes.ERR_INVALID_ARG_TYPE;function wy(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new by("iterable",["Iterable"],e);var n=new t(py({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=dy(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}Xu.exports=wy});var cf=w((o2,hf)=>{"use strict";hf.exports=W;var sr;W.ReadableState=sf;var a2=require("events").EventEmitter,nf=function(e,r){return e.listeners(r).length},Lr=Xs(),Qi=require("buffer").Buffer,vy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _y(t){return Qi.from(t)}function Sy(t){return Qi.isBuffer(t)||t instanceof vy}var da=require("util"),C;da&&da.debuglog?C=da.debuglog("stream"):C=function(){};var Ey=$u(),va=ta(),Ry=ra(),xy=Ry.getHighWaterMark,Xi=nr().codes,Ty=Xi.ERR_INVALID_ARG_TYPE,Oy=Xi.ERR_STREAM_PUSH_AFTER_EOF,My=Xi.ERR_METHOD_NOT_IMPLEMENTED,Ay=Xi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ar,pa,ga;rt()(W,Lr);var jr=va.errorOrDestroy,ma=["error","close","destroy","pause","resume"];function ky(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 sf(t,e,r){sr=sr||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof sr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=xy(this,t,"readableHighWaterMark",r),this.buffer=new Ey,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&&(ar||(ar=ha().StringDecoder),this.decoder=new ar(t.encoding),this.encoding=t.encoding)}function W(t){if(sr=sr||Nr(),!(this instanceof W))return new W(t);var e=this instanceof sr;this._readableState=new sf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Lr.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=va.destroy;W.prototype._undestroy=va.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Qi.from(t,e),e=""),i=!0),af(this,t,e,!1,i)};W.prototype.unshift=function(t){return af(this,t,null,!0,!1)};function af(t,e,r,i,n){C("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,qy(t,s);else{var a;if(n||(a=Py(s,e)),a)jr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Qi.prototype&&(e=_y(e)),i)s.endEmitted?jr(t,new Ay):ya(t,s,e,!0);else if(s.ended)jr(t,new Oy);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?ya(t,s,e,!1):wa(t,s)):ya(t,s,e,!1)}else i||(s.reading=!1,wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function ya(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&en(t)),wa(t,e)}function Py(t,e){var r;return!Sy(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Ty("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){ar||(ar=ha().StringDecoder);var e=new ar(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var tf=1073741824;function Dy(t){return t>=tf?t=tf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function rf(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=Dy(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){C("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 C("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ba(this):en(this),null;if(t=rf(t,e),t===0&&e.ended)return e.length===0&&ba(this),null;var i=e.needReadable;C("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,C("length less than watermark",i)),e.ended||e.reading?(i=!1,C("reading or ended",i)):i&&(C("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=rf(r,e)));var n;return t>0?n=uf(t,e):n=null,n===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&&ba(this)),n!==null&&this.emit("data",n),n};function qy(t,e){if(C("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?en(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,of(t)))}}function en(t){var e=t._readableState;C("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(C("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(of,t))}function of(t){var e=t._readableState;C("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,_a(t)}function wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Cy,t,e))}function Cy(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(C("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){jr(this,new My("_read()"))};W.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,C("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(_,E){C("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){C("onend"),t.end()}var l=jy(r);t.on("drain",l);var u=!1;function c(){C("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){C("ondata");var E=t.write(_);C("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&ff(i.pipes,t)!==-1)&&!u&&(C("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){C("onerror",_),b(),t.removeListener("error",d),nf(t,"error")===0&&jr(t,_)}ky(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){C("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){C("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(C("pipe resume"),r.resume()),t};function jy(t){return function(){var r=t._readableState;C("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&nf(t,"data")&&(r.flowing=!0,_a(t))}}W.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 i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=ff(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=Lr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C("on readable",i.length,i.reading),i.length?en(this):i.reading||process.nextTick(Ly,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Lr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(lf,this),r};W.prototype.removeAllListeners=function(t){var e=Lr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(lf,this),e};function lf(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 Ly(t){C("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(C("resume"),t.flowing=!t.readableListening,Ny(this,t)),t.paused=!1,this};function Ny(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Fy,t,e))}function Fy(t,e){C("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),_a(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _a(t){var e=t._readableState;for(C("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(C("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(C("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<ma.length;s++)t.on(ma[s],this.emit.bind(this,ma[s]));return this._read=function(a){C("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return pa===void 0&&(pa=Ju()),pa(this)});Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});W._fromList=uf;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function uf(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 ba(t){var e=t._readableState;C("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Iy,e,t))}function Iy(t,e){if(C("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"&&(W.from=function(t,e){return ga===void 0&&(ga=ef()),ga(W,t,e)});function ff(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Nr=w((l2,pf)=>{"use strict";var $y=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};pf.exports=Ye;var df=cf(),Ea=Ra();rt()(Ye,df);for(Sa=$y(Ea.prototype),tn=0;tn<Sa.length;tn++)rn=Sa[tn],Ye.prototype[rn]||(Ye.prototype[rn]=Ea.prototype[rn]);var Sa,rn,tn;function Ye(t){if(!(this instanceof Ye))return new Ye(t);df.call(this,t),Ea.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",Wy)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Wy(){this._writableState.ended||process.nextTick(By,this)}function By(t){t.end()}Object.defineProperty(Ye.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 Ra=w((u2,vf)=>{"use strict";vf.exports=G;function mf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){g0(e,t)}}var or;G.WritableState=Ir;var Uy={deprecate:Qs()},yf=Xs(),sn=require("buffer").Buffer,zy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Hy(t){return sn.from(t)}function Gy(t){return sn.isBuffer(t)||t instanceof zy}var Ta=ta(),Yy=ra(),Vy=Yy.getHighWaterMark,mt=nr().codes,Ky=mt.ERR_INVALID_ARG_TYPE,Jy=mt.ERR_METHOD_NOT_IMPLEMENTED,Zy=mt.ERR_MULTIPLE_CALLBACK,Qy=mt.ERR_STREAM_CANNOT_PIPE,Xy=mt.ERR_STREAM_DESTROYED,e0=mt.ERR_STREAM_NULL_VALUES,t0=mt.ERR_STREAM_WRITE_AFTER_END,r0=mt.ERR_UNKNOWN_ENCODING,lr=Ta.errorOrDestroy;rt()(G,yf);function i0(){}function Ir(t,e,r){or=or||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Vy(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){f0(e,n)},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 mf(this)}Ir.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ir.prototype,"buffer",{get:Uy.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var nn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(nn=Function.prototype[Symbol.hasInstance],Object.defineProperty(G,Symbol.hasInstance,{value:function(e){return nn.call(this,e)?!0:this!==G?!1:e&&e._writableState instanceof Ir}})):nn=function(e){return e instanceof this};function G(t){or=or||Nr();var e=this instanceof or;if(!e&&!nn.call(G,this))return new G(t);this._writableState=new Ir(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)),yf.call(this)}G.prototype.pipe=function(){lr(this,new Qy)};function n0(t,e){var r=new t0;lr(t,r),process.nextTick(e,r)}function s0(t,e,r,i){var n;return r===null?n=new e0:typeof r!="string"&&!e.objectMode&&(n=new Ky("chunk",["string","Buffer"],r)),n?(lr(t,n),process.nextTick(i,n),!1):!0}G.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Gy(t);return s&&!sn.isBuffer(t)&&(t=Hy(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=i0),i.ending?n0(this,r):(s||s0(this,i,t,r))&&(i.pendingcb++,n=o0(this,i,s,t,e,r)),n};G.prototype.cork=function(){this._writableState.corked++};G.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&bf(this,t))};G.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 r0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(G.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function a0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=sn.from(e,r)),e}Object.defineProperty(G.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o0(t,e,r,i,n,s){if(!r){var a=a0(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xa(t,e,!1,o,i,n,s);return l}function xa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Xy("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function l0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Fr,t,e),t._writableState.errorEmitted=!0,lr(t,i)):(n(i),t._writableState.errorEmitted=!0,lr(t,i),Fr(t,e))}function u0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Zy;if(u0(r),e)l0(t,r,i,e,n);else{var s=wf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&bf(t,r),i?process.nextTick(gf,t,r,s,n):gf(t,r,s,n)}}function gf(t,e,r,i){r||h0(t,e),e.pendingcb--,i(),Fr(t,e)}function h0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function bf(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,xa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new mf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(xa(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}G.prototype._write=function(t,e,r){r(new Jy("_write()"))};G.prototype._writev=null;G.prototype.end=function(t,e,r){var i=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),i.corked&&(i.corked=1,this.uncork()),i.ending||p0(this,i,r),this};Object.defineProperty(G.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function wf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function c0(t,e){t._final(function(r){e.pendingcb--,r&&lr(t,r),e.prefinished=!0,t.emit("prefinish"),Fr(t,e)})}function d0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(c0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Fr(t,e){var r=wf(e);if(r&&(d0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function p0(t,e,r){e.ending=!0,Fr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function g0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(G.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});G.prototype.destroy=Ta.destroy;G.prototype._undestroy=Ta.undestroy;G.prototype._destroy=function(t,e){e(t)}});var Oa=w((f2,Ef)=>{"use strict";var m0=require("util"),_f=Ra(),{LEVEL:Sf}=te(),$r=Ef.exports=function(e={}){_f.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())})};m0.inherits($r,_f);$r.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[Sf]]){if(e&&!this.format)return this.log(e,i);let s,a;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(o){s=o}if(s||!a){if(i(),s)throw s;return}return this.log(a,i)}return this._writableState.sync=!1,i(null)};$r.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(a){n=a}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};$r.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[Sf]])&&(this.handleExceptions||r.exception!==!0))};$r.prototype._nop=function(){}});var Aa=w((h2,xf)=>{"use strict";var y0=require("util"),{LEVEL:Ma}=te(),Rf=Oa(),Wr=xf.exports=function(e={}){if(Rf.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(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};y0.inherits(Wr,Rf);Wr.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[Ma]])&&this.transport.log(e[Ma],e.message,e,this._nop),i(null)};Wr.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ma],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Wr.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
|
-
`))};Wr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ur=w((c2,ka)=>{"use strict";ka.exports=Oa();ka.exports.LegacyTransportStream=Aa()});var Mf=w((p2,Of)=>{"use strict";var b0=require("os"),{LEVEL:Tf,MESSAGE:fr}=te(),w0=ur();Of.exports=class extends w0{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:b0.EOL,this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Tf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.error(e[fr]),r&&r();return}else if(this.consoleWarnLevels[e[Tf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.warn(e[fr]),r&&r();return}console._stdout?console._stdout.write(`${e[fr]}${this.eol}`):console.log(e[fr]),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((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var on=w((an,Af)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=v0;function v0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Af.exports=an.default});var Pf=w((ln,kf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};kf.exports=ln.default});var Cf=w(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.fallback=Df;yt.wrap=qf;var _0=yt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,S0=yt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,E0=yt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Df(t){setTimeout(t,0)}function qf(t){return(e,...r)=>t(()=>e(...r))}var Br;_0?Br=queueMicrotask:S0?Br=setImmediate:E0?Br=process.nextTick:Br=Df;yt.default=qf(Br)});var If=w((un,Ff)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=A0;var R0=Pf(),x0=Nf(R0),T0=Cf(),O0=Nf(T0),M0=Bt();function Nf(t){return t&&t.__esModule?t:{default:t}}function A0(t){return(0,M0.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return jf(i,r)}:(0,x0.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return jf(i,r);r(null,i)})}function jf(t,e){return t.then(r=>{Lf(e,null,r)},r=>{Lf(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Lf(t,e,r){try{t(e,r)}catch(i){(0,O0.default)(n=>{throw n},i)}}Ff.exports=un.default});var Bt=w(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.isAsyncIterable=it.isAsyncGenerator=it.isAsync=void 0;var k0=If(),P0=D0(k0);function D0(t){return t&&t.__esModule?t:{default:t}}function $f(t){return t[Symbol.toStringTag]==="AsyncFunction"}function q0(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function C0(t){return typeof t[Symbol.asyncIterator]=="function"}function j0(t){if(typeof t!="function")throw new Error("expected a function");return $f(t)?(0,P0.default)(t):t}it.default=j0;it.isAsync=$f;it.isAsyncGenerator=q0;it.isAsyncIterable=C0});var hr=w((fn,Wf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=L0;function L0(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(a,...o)=>{if(a)return s(a);n(o.length>1?o:o[0])},t.apply(this,i)})}return r}Wf.exports=fn.default});var Uf=w((hn,Bf)=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});var N0=on(),F0=Pa(N0),I0=Bt(),$0=Pa(I0),W0=hr(),B0=Pa(W0);function Pa(t){return t&&t.__esModule?t:{default:t}}hn.default=(0,B0.default)((t,e,r)=>{var i=(0,F0.default)(e)?[]:{};t(e,(n,s,a)=>{(0,$0.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);Bf.exports=hn.default});var Da=w((cn,zf)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.default=U0;function U0(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}zf.exports=cn.default});var Gf=w((dn,Hf)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Hf.exports=dn.default});var Kf=w((pn,Vf)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.default=Z0;var z0=on(),H0=Yf(z0),G0=Gf(),Y0=Yf(G0);function Yf(t){return t&&t.__esModule?t:{default:t}}function V0(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function K0(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function J0(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function Z0(t){if((0,H0.default)(t))return V0(t);var e=(0,Y0.default)(t);return e?K0(e):J0(t)}Vf.exports=pn.default});var qa=w((gn,Jf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.default=Q0;function Q0(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Jf.exports=gn.default});var yn=w((mn,Zf)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var X0={};mn.default=X0;Zf.exports=mn.default});var Xf=w((bn,Qf)=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.default=ib;var eb=yn(),tb=rb(eb);function rb(t){return t&&t.__esModule?t:{default:t}}function ib(t,e,r,i){let n=!1,s=!1,a=!1,o=0,l=0;function u(){o>=e||a||n||(a=!0,t.next().then(({value:d,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(d,l,c),l++,u()}}).catch(h))}function c(d,f){if(o-=1,!s){if(d)return h(d);if(d===!1){n=!0,s=!0;return}if(f===tb.default||n&&o<=0)return n=!0,i(null);u()}}function h(d){s||(a=!1,n=!0,i(d))}u()}Qf.exports=bn.default});var ih=w((wn,rh)=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});var nb=Da(),sb=Ur(nb),ab=Kf(),ob=Ur(ab),lb=qa(),ub=Ur(lb),eh=Bt(),fb=Xf(),th=Ur(fb),hb=yn(),cb=Ur(hb);function Ur(t){return t&&t.__esModule?t:{default:t}}wn.default=t=>(e,r,i)=>{if(i=(0,sb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,eh.isAsyncGenerator)(e))return(0,th.default)(e,t,r,i);if((0,eh.isAsyncIterable)(e))return(0,th.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,ob.default)(e),s=!1,a=!1,o=0,l=!1;function u(h,d){if(!a)if(o-=1,h)s=!0,i(h);else if(h===!1)s=!0,a=!0;else{if(d===cb.default||s&&o<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;o<t&&!s;){var h=n();if(h===null){s=!0,o<=0&&i(null);return}o+=1,r(h.value,h.key,(0,ub.default)(u))}l=!1}c()};rh.exports=wn.default});var ja=w((vn,nh)=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var db=ih(),pb=Ca(db),gb=Bt(),mb=Ca(gb),yb=hr(),bb=Ca(yb);function Ca(t){return t&&t.__esModule?t:{default:t}}function wb(t,e,r,i){return(0,pb.default)(e)(t,(0,mb.default)(r),i)}vn.default=(0,bb.default)(wb,4);nh.exports=vn.default});var oh=w((_n,ah)=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});var vb=ja(),_b=sh(vb),Sb=hr(),Eb=sh(Sb);function sh(t){return t&&t.__esModule?t:{default:t}}function Rb(t,e,r){return(0,_b.default)(t,1,e,r)}_n.default=(0,Eb.default)(Rb,3);ah.exports=_n.default});var fh=w((Sn,uh)=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.default=Ab;var xb=Uf(),Tb=lh(xb),Ob=oh(),Mb=lh(Ob);function lh(t){return t&&t.__esModule?t:{default:t}}function Ab(t,e){return(0,Tb.default)(Mb.default,t,e)}uh.exports=Sn.default});var La=w((y2,hh)=>{hh.exports=require("stream")});var yh=w((b2,mh)=>{"use strict";function ch(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function dh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ch(Object(r),!0).forEach(function(i){kb(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function kb(t,e,r){return e=gh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,gh(i.key),i)}}function Db(t,e,r){return e&&ph(t.prototype,e),r&&ph(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function gh(t){var e=qb(t,"string");return typeof e=="symbol"?e:String(e)}function qb(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Cb=require("buffer"),En=Cb.Buffer,jb=require("util"),Na=jb.inspect,Lb=Na&&Na.custom||"inspect";function Nb(t,e,r){En.prototype.copy.call(t,e,r)}mh.exports=function(){function t(){Pb(this,t),this.head=null,this.tail=null,this.length=0}return Db(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++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 i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return En.alloc(0);for(var i=En.allocUnsafe(r>>>0),n=this.head,s=0;n;)Nb(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=En.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:Lb,value:function(r,i){return Na(this,dh(dh({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Ia=w((w2,wh)=>{"use strict";function Fb(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Fa,this,t)):process.nextTick(Fa,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(Rn,r):(r._writableState.errorEmitted=!0,process.nextTick(bh,r,s)):process.nextTick(bh,r,s):e?(process.nextTick(Rn,r),e(s)):process.nextTick(Rn,r)}),this)}function bh(t,e){Fa(t,e),Rn(t)}function Rn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Ib(){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 Fa(t,e){t.emit("error",e)}function $b(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}wh.exports={destroy:Fb,undestroy:Ib,errorOrDestroy:$b}});var bt=w((v2,Sh)=>{"use strict";var _h={};function qe(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,_h[t]=n}function vh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),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 Wb(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Bb(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Ub(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Wb(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Bb(t," argument"))n=`The ${t} ${i} ${vh(e,"type")}`;else{let s=Ub(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${vh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Sh.exports.codes=_h});var $a=w((_2,Eh)=>{"use strict";var zb=bt().codes.ERR_INVALID_OPT_VALUE;function Hb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Gb(t,e,r,i){var n=Hb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new zb(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Eh.exports={getHighWaterMark:Gb}});var Ua=w((S2,Ah)=>{"use strict";Ah.exports=Y;function xh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ww(e,t)}}var cr;Y.WritableState=Hr;var Yb={deprecate:Qs()},Th=La(),Tn=require("buffer").Buffer,Vb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Kb(t){return Tn.from(t)}function Jb(t){return Tn.isBuffer(t)||t instanceof Vb}var Ba=Ia(),Zb=$a(),Qb=Zb.getHighWaterMark,wt=bt().codes,Xb=wt.ERR_INVALID_ARG_TYPE,ew=wt.ERR_METHOD_NOT_IMPLEMENTED,tw=wt.ERR_MULTIPLE_CALLBACK,rw=wt.ERR_STREAM_CANNOT_PIPE,iw=wt.ERR_STREAM_DESTROYED,nw=wt.ERR_STREAM_NULL_VALUES,sw=wt.ERR_STREAM_WRITE_AFTER_END,aw=wt.ERR_UNKNOWN_ENCODING,dr=Ba.errorOrDestroy;rt()(Y,Th);function ow(){}function Hr(t,e,r){cr=cr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Qb(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){pw(e,n)},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 xh(this)}Hr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Hr.prototype,"buffer",{get:Yb.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var xn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return xn.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof Hr}})):xn=function(e){return e instanceof this};function Y(t){cr=cr||Ut();var e=this instanceof cr;if(!e&&!xn.call(Y,this))return new Y(t);this._writableState=new Hr(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)),Th.call(this)}Y.prototype.pipe=function(){dr(this,new rw)};function lw(t,e){var r=new sw;dr(t,r),process.nextTick(e,r)}function uw(t,e,r,i){var n;return r===null?n=new nw:typeof r!="string"&&!e.objectMode&&(n=new Xb("chunk",["string","Buffer"],r)),n?(dr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Jb(t);return s&&!Tn.isBuffer(t)&&(t=Kb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=ow),i.ending?lw(this,r):(s||uw(this,i,t,r))&&(i.pendingcb++,n=hw(this,i,s,t,e,r)),n};Y.prototype.cork=function(){this._writableState.corked++};Y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Oh(this,t))};Y.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 aw(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function fw(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Tn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function hw(t,e,r,i,n,s){if(!r){var a=fw(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Wa(t,e,!1,o,i,n,s);return l}function Wa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new iw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function cw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(zr,t,e),t._writableState.errorEmitted=!0,dr(t,i)):(n(i),t._writableState.errorEmitted=!0,dr(t,i),zr(t,e))}function dw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function pw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new tw;if(dw(r),e)cw(t,r,i,e,n);else{var s=Mh(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Oh(t,r),i?process.nextTick(Rh,t,r,s,n):Rh(t,r,s,n)}}function Rh(t,e,r,i){r||gw(t,e),e.pendingcb--,i(),zr(t,e)}function gw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Oh(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Wa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new xh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(Wa(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Y.prototype._write=function(t,e,r){r(new ew("_write()"))};Y.prototype._writev=null;Y.prototype.end=function(t,e,r){var i=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),i.corked&&(i.corked=1,this.uncork()),i.ending||bw(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Mh(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function mw(t,e){t._final(function(r){e.pendingcb--,r&&dr(t,r),e.prefinished=!0,t.emit("prefinish"),zr(t,e)})}function yw(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(mw,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function zr(t,e){var r=Mh(e);if(r&&(yw(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function bw(t,e,r){e.ending=!0,zr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ww(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Y.prototype.destroy=Ba.destroy;Y.prototype._undestroy=Ba.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Ut=w((E2,Ph)=>{"use strict";var vw=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Ph.exports=Ve;var kh=Ga(),Ha=Ua();rt()(Ve,kh);for(za=vw(Ha.prototype),On=0;On<za.length;On++)Mn=za[On],Ve.prototype[Mn]||(Ve.prototype[Mn]=Ha.prototype[Mn]);var za,Mn,On;function Ve(t){if(!(this instanceof Ve))return new Ve(t);kh.call(this,t),Ha.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",_w)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _w(){this._writableState.ended||process.nextTick(Sw,this)}function Sw(t){t.end()}Object.defineProperty(Ve.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 Ka=w(qh=>{"use strict";var Va=la().Buffer,Dh=Va.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 Ew(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 Rw(t){var e=Ew(t);if(typeof e!="string"&&(Va.isEncoding===Dh||!Dh(t)))throw new Error("Unknown encoding: "+t);return e||t}qh.StringDecoder=Gr;function Gr(t){this.encoding=Rw(t);var e;switch(this.encoding){case"utf16le":this.text=kw,this.end=Pw,e=4;break;case"utf8":this.fillLast=Ow,e=4;break;case"base64":this.text=Dw,this.end=qw,e=3;break;default:this.write=Cw,this.end=jw;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Va.allocUnsafe(e)}Gr.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||""};Gr.prototype.end=Aw;Gr.prototype.text=Mw;Gr.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 Ya(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function xw(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Ya(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Tw(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 Ow(t){var e=this.lastTotal-this.lastNeed,r=Tw(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 Mw(t,e){var r=xw(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Aw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function kw(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=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 Pw(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 Dw(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 qw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Cw(t){return t.toString(this.encoding)}function jw(t){return t&&t.length?this.write(t):""}});var An=w((x2,Lh)=>{"use strict";var Ch=bt().codes.ERR_STREAM_PREMATURE_CLOSE;function Lw(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Nw(){}function Fw(t){return t.setHeader&&typeof t.abort=="function"}function jh(t,e,r){if(typeof e=="function")return jh(t,null,e);e||(e={}),r=Lw(r||Nw);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Ch),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Ch),r.call(t,y)},d=function(){t.req.on("finish",o)};return Fw(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",h)}}Lh.exports=jh});var Fh=w((T2,Nh)=>{"use strict";var kn;function vt(t,e,r){return e=Iw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iw(t){var e=$w(t,"string");return typeof e=="symbol"?e:String(e)}function $w(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ww=An(),_t=Symbol("lastResolve"),zt=Symbol("lastReject"),Yr=Symbol("error"),Pn=Symbol("ended"),Ht=Symbol("lastPromise"),Ja=Symbol("handlePromise"),Gt=Symbol("stream");function St(t,e){return{value:t,done:e}}function Bw(t){var e=t[_t];if(e!==null){var r=t[Gt].read();r!==null&&(t[Ht]=null,t[_t]=null,t[zt]=null,e(St(r,!1)))}}function Uw(t){process.nextTick(Bw,t)}function zw(t,e){return function(r,i){t.then(function(){if(e[Pn]){r(St(void 0,!0));return}e[Ja](r,i)},i)}}var Hw=Object.getPrototypeOf(function(){}),Gw=Object.setPrototypeOf((kn={get stream(){return this[Gt]},next:function(){var e=this,r=this[Yr];if(r!==null)return Promise.reject(r);if(this[Pn])return Promise.resolve(St(void 0,!0));if(this[Gt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Yr]?o(e[Yr]):a(St(void 0,!0))})});var i=this[Ht],n;if(i)n=new Promise(zw(i,this));else{var s=this[Gt].read();if(s!==null)return Promise.resolve(St(s,!1));n=new Promise(this[Ja])}return this[Ht]=n,n}},vt(kn,Symbol.asyncIterator,function(){return this}),vt(kn,"return",function(){var e=this;return new Promise(function(r,i){e[Gt].destroy(null,function(n){if(n){i(n);return}r(St(void 0,!0))})})}),kn),Hw),Yw=function(e){var r,i=Object.create(Gw,(r={},vt(r,Gt,{value:e,writable:!0}),vt(r,_t,{value:null,writable:!0}),vt(r,zt,{value:null,writable:!0}),vt(r,Yr,{value:null,writable:!0}),vt(r,Pn,{value:e._readableState.endEmitted,writable:!0}),vt(r,Ja,{value:function(s,a){var o=i[Gt].read();o?(i[Ht]=null,i[_t]=null,i[zt]=null,s(St(o,!1))):(i[_t]=s,i[zt]=a)},writable:!0}),r));return i[Ht]=null,Ww(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[zt];s!==null&&(i[Ht]=null,i[_t]=null,i[zt]=null,s(n)),i[Yr]=n;return}var a=i[_t];a!==null&&(i[Ht]=null,i[_t]=null,i[zt]=null,a(St(void 0,!0))),i[Pn]=!0}),e.on("readable",Uw.bind(null,i)),i};Nh.exports=Yw});var Bh=w((O2,Wh)=>{"use strict";function Ih(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function Vw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Ih(s,i,n,a,o,"next",l)}function o(l){Ih(s,i,n,a,o,"throw",l)}a(void 0)})}}function $h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Kw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$h(Object(r),!0).forEach(function(i){Jw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Jw(t,e,r){return e=Zw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zw(t){var e=Qw(t,"string");return typeof e=="symbol"?e:String(e)}function Qw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xw=bt().codes.ERR_INVALID_ARG_TYPE;function ev(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new Xw("iterable",["Iterable"],e);var n=new t(Kw({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Vw(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}Wh.exports=ev});var Ga=w((A2,Qh)=>{"use strict";Qh.exports=B;var pr;B.ReadableState=Gh;var M2=require("events").EventEmitter,Hh=function(e,r){return e.listeners(r).length},Kr=La(),Dn=require("buffer").Buffer,tv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function rv(t){return Dn.from(t)}function iv(t){return Dn.isBuffer(t)||t instanceof tv}var Za=require("util"),j;Za&&Za.debuglog?j=Za.debuglog("stream"):j=function(){};var nv=yh(),no=Ia(),sv=$a(),av=sv.getHighWaterMark,qn=bt().codes,ov=qn.ERR_INVALID_ARG_TYPE,lv=qn.ERR_STREAM_PUSH_AFTER_EOF,uv=qn.ERR_METHOD_NOT_IMPLEMENTED,fv=qn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,gr,Qa,Xa;rt()(B,Kr);var Vr=no.errorOrDestroy,eo=["error","close","destroy","pause","resume"];function hv(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 Gh(t,e,r){pr=pr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof pr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=av(this,t,"readableHighWaterMark",r),this.buffer=new nv,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&&(gr||(gr=Ka().StringDecoder),this.decoder=new gr(t.encoding),this.encoding=t.encoding)}function B(t){if(pr=pr||Ut(),!(this instanceof B))return new B(t);var e=this instanceof pr;this._readableState=new Gh(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});B.prototype.destroy=no.destroy;B.prototype._undestroy=no.undestroy;B.prototype._destroy=function(t,e){e(t)};B.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Dn.from(t,e),e=""),i=!0),Yh(this,t,e,!1,i)};B.prototype.unshift=function(t){return Yh(this,t,null,!0,!1)};function Yh(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,pv(t,s);else{var a;if(n||(a=cv(s,e)),a)Vr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Dn.prototype&&(e=rv(e)),i)s.endEmitted?Vr(t,new fv):to(t,s,e,!0);else if(s.ended)Vr(t,new lv);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?to(t,s,e,!1):io(t,s)):to(t,s,e,!1)}else i||(s.reading=!1,io(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function to(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Cn(t)),io(t,e)}function cv(t,e){var r;return!iv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new ov("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){gr||(gr=Ka().StringDecoder);var e=new gr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Uh=1073741824;function dv(t){return t>=Uh?t=Uh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function zh(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=dv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){j("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 j("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ro(this):Cn(this),null;if(t=zh(t,e),t===0&&e.ended)return e.length===0&&ro(this),null;var i=e.needReadable;j("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,j("length less than watermark",i)),e.ended||e.reading?(i=!1,j("reading or ended",i)):i&&(j("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=zh(r,e)));var n;return t>0?n=Jh(t,e):n=null,n===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&&ro(this)),n!==null&&this.emit("data",n),n};function pv(t,e){if(j("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?Cn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Vh(t)))}}function Cn(t){var e=t._readableState;j("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Vh,t))}function Vh(t){var e=t._readableState;j("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,so(t)}function io(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(gv,t,e))}function gv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(j("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){Vr(this,new uv("_read()"))};B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,j("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(_,E){j("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){j("onend"),t.end()}var l=mv(r);t.on("drain",l);var u=!1;function c(){j("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){j("ondata");var E=t.write(_);j("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Zh(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){j("onerror",_),b(),t.removeListener("error",d),Hh(t,"error")===0&&Vr(t,_)}hv(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){j("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function mv(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Hh(t,"data")&&(r.flowing=!0,so(t))}}B.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 i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Zh(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};B.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,j("on readable",i.length,i.reading),i.length?Cn(this):i.reading||process.nextTick(yv,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Kh,this),r};B.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Kh,this),e};function Kh(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 yv(t){j("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,bv(this,t)),t.paused=!1,this};function bv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(wv,t,e))}function wv(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),so(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function so(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(j("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(j("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<eo.length;s++)t.on(eo[s],this.emit.bind(this,eo[s]));return this._read=function(a){j("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return Qa===void 0&&(Qa=Fh()),Qa(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=Jh;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Jh(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 ro(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(vv,e,t))}function vv(t,e){if(j("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"&&(B.from=function(t,e){return Xa===void 0&&(Xa=Bh()),Xa(B,t,e)});function Zh(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ao=w((k2,ec)=>{"use strict";ec.exports=nt;var jn=bt().codes,_v=jn.ERR_METHOD_NOT_IMPLEMENTED,Sv=jn.ERR_MULTIPLE_CALLBACK,Ev=jn.ERR_TRANSFORM_ALREADY_TRANSFORMING,Rv=jn.ERR_TRANSFORM_WITH_LENGTH_0,Ln=Ut();rt()(nt,Ln);function xv(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Sv);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function nt(t){if(!(this instanceof nt))return new nt(t);Ln.call(this,t),this._transformState={afterTransform:xv.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",Tv)}function Tv(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Xh(t,e,r)}):Xh(this,null,null)}nt.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ln.prototype.push.call(this,t,e)};nt.prototype._transform=function(t,e,r){r(new _v("_transform()"))};nt.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};nt.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};nt.prototype._destroy=function(t,e){Ln.prototype._destroy.call(this,t,function(r){e(r)})};function Xh(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Rv;if(t._transformState.transforming)throw new Ev;return t.push(null)}});var ic=w((P2,rc)=>{"use strict";rc.exports=Jr;var tc=ao();rt()(Jr,tc);function Jr(t){if(!(this instanceof Jr))return new Jr(t);tc.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var lc=w((D2,oc)=>{"use strict";var oo;function Ov(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var ac=bt().codes,Mv=ac.ERR_MISSING_ARGS,Av=ac.ERR_STREAM_DESTROYED;function nc(t){if(t)throw t}function kv(t){return t.setHeader&&typeof t.abort=="function"}function Pv(t,e,r,i){i=Ov(i);var n=!1;t.on("close",function(){n=!0}),oo===void 0&&(oo=An()),oo(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,kv(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Av("pipe"))}}}function sc(t){t()}function Dv(t,e){return t.pipe(e)}function qv(t){return!t.length||typeof t[t.length-1]!="function"?nc:t.pop()}function Cv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=qv(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Mv("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return Pv(a,l,u,function(c){n||(n=c),c&&s.forEach(sc),!l&&(s.forEach(sc),i(n))})});return e.reduce(Dv)}oc.exports=Cv});var Yt=w((Ce,Qr)=>{var Zr=require("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(Ce=Qr.exports=Ga(),Ce.Stream=Zr||Ce,Ce.Readable=Ce,Ce.Writable=Ua(),Ce.Duplex=Ut(),Ce.Transform=ao(),Ce.PassThrough=ic(),Ce.finished=An(),Ce.pipeline=lc())});var go=w((q2,fc)=>{var mr=[],Xr=[],lo=function(){};function fo(t){return~mr.indexOf(t)?!1:(mr.push(t),!0)}function ho(t){lo=t}function jv(t){for(var e=[],r=0;r<mr.length;r++){if(mr[r].async){e.push(mr[r]);continue}if(mr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(a){return a(t)})).then(function(a){n(a.some(Boolean))})}):!1}function co(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function uo(){lo.apply(lo,arguments)}function uc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function po(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function Lv(t){return t.enabled=!1,t.modify=co,t.set=ho,t.use=fo,po(function(){return!1},t)}function Nv(t){function e(){var r=Array.prototype.slice.call(arguments,0);return uo.call(uo,t,uc(r,t)),!0}return t.enabled=!0,t.modify=co,t.set=ho,t.use=fo,po(e,t)}fc.exports=function(e){return e.introduce=po,e.enabled=jv,e.process=uc,e.modify=co,e.write=uo,e.nope=Lv,e.yep=Nv,e.set=ho,e.use=fo,e}});var cc=w((C2,hc)=>{var Fv=go(),Iv=Fv(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)});hc.exports=Iv});var pc=w((j2,dc)=>{"use strict";dc.exports={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]}});var mc=w((L2,gc)=>{gc.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var wc=w((N2,bc)=>{"use strict";var $v=mc(),Wv=Array.prototype.concat,Bv=Array.prototype.slice,yc=bc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];$v(s)?r=Wv.call(r,Bv.call(s)):r.push(s)}return r};yc.wrap=function(t){return function(){return t(yc(arguments))}}});var Ec=w((F2,Sc)=>{var ei=pc(),ti=wc(),vc=Object.hasOwnProperty,_c=Object.create(null);for(Nn in ei)vc.call(ei,Nn)&&(_c[ei[Nn]]=Nn);var Nn,Te=Sc.exports={to:{},get:{}};Te.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Te.get.hsl(t),i="hsl";break;case"hwb":r=Te.get.hwb(t),i="hwb";break;default:r=Te.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Te.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],o,l,u;if(o=t.match(r)){for(u=o[2],o=o[1],l=0;l<3;l++){var c=l*2;a[l]=parseInt(o.slice(c,c+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(o=t.match(e)){for(o=o[1],u=o[3],l=0;l<3;l++)a[l]=parseInt(o[l]+o[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(o=t.match(i)){for(l=0;l<3;l++)a[l]=parseInt(o[l+1],0);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else if(o=t.match(n)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(o[l+1])*2.55);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else return(o=t.match(s))?o[1]==="transparent"?[0,0,0,0]:vc.call(ei,o[1])?(a=ei[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Et(a[l],0,255);return a[3]=Et(a[3],0,1),a};Te.get.hsl=function(t){if(!t)return null;var 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){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Et(parseFloat(r[2]),0,100),a=Et(parseFloat(r[3]),0,100),o=Et(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Te.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\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){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Et(parseFloat(r[2]),0,100),a=Et(parseFloat(r[3]),0,100),o=Et(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Te.to.hex=function(){var t=ti(arguments);return"#"+Fn(t[0])+Fn(t[1])+Fn(t[2])+(t[3]<1?Fn(Math.round(t[3]*255)):"")};Te.to.rgb=function(){var t=ti(arguments);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]+")"};Te.to.rgb.percent=function(){var t=ti(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};Te.to.hsl=function(){var t=ti(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Te.to.hwb=function(){var t=ti(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Te.to.keyword=function(t){return _c[t.slice(0,3)]};function Et(t,e,r){return Math.min(Math.max(e,t),r)}function Fn(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var xc=w((I2,Rc)=>{"use strict";Rc.exports={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]}});var mo=w(($2,Ac)=>{var Vt=xc(),Mc={};for(In in Vt)Vt.hasOwnProperty(In)&&(Mc[Vt[In]]=In);var In,A=Ac.exports={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"},lch:{channels:3,labels:"lch"},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"]}};for(ve in A)if(A.hasOwnProperty(ve)){if(!("channels"in A[ve]))throw new Error("missing channels property: "+ve);if(!("labels"in A[ve]))throw new Error("missing channel labels property: "+ve);if(A[ve].labels.length!==A[ve].channels)throw new Error("channel and label counts mismatch: "+ve);Tc=A[ve].channels,Oc=A[ve].labels,delete A[ve].channels,delete A[ve].labels,Object.defineProperty(A[ve],"channels",{value:Tc}),Object.defineProperty(A[ve],"labels",{value:Oc})}var Tc,Oc,ve;A.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=s-n,o,l,u;return s===n?o=0:e===s?o=(r-i)/a:r===s?o=2+(i-e)/a:i===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),u=(n+s)/2,s===n?l=0:u<=.5?l=a/(s+n):l=a/(2-s-n),[o,l*100,u*100]};A.rgb.hsv=function(t){var e,r,i,n,s,a=t[0]/255,o=t[1]/255,l=t[2]/255,u=Math.max(a,o,l),c=u-Math.min(a,o,l),h=function(d){return(u-d)/6/c+1/2};return c===0?n=s=0:(s=c/u,e=h(a),r=h(o),i=h(l),a===u?n=i-r:o===u?n=1/3+e-i:l===u&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,u*100]};A.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=A.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};A.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n,s,a,o;return o=Math.min(1-e,1-r,1-i),n=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-i-o)/(1-o)||0,[n*100,s*100,a*100,o*100]};function Uv(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}A.rgb.keyword=function(t){var e=Mc[t];if(e)return e;var r=1/0,i;for(var n in Vt)if(Vt.hasOwnProperty(n)){var s=Vt[n],a=Uv(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return Vt[t]};A.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,a=e*.0193+r*.1192+i*.9505;return[n*100,s*100,a*100]};A.rgb.lab=function(t){var e=A.rgb.xyz(t),r=e[0],i=e[1],n=e[2],s,a,o;return r/=95.047,i/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*i-16,a=500*(r-i),o=200*(i-n),[s,a,o]};A.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,a,o,l;if(r===0)return l=i*255,[l,l,l];i<.5?s=i*(1+r):s=i+r-i*r,n=2*i-s,o=[0,0,0];for(var u=0;u<3;u++)a=e+1/3*-(u-1),a<0&&a++,a>1&&a--,6*a<1?l=n+(s-n)*6*a:2*a<1?l=s:3*a<2?l=n+(s-n)*(2/3-a)*6:l=n,o[u]=l*255;return o};A.hsl.hsv=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01),a,o;return i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s,o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r),[e,a*100,o*100]};A.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),a=255*i*(1-r),o=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,a];case 1:return[o,i,a];case 2:return[a,i,l];case 3:return[a,o,i];case 4:return[l,a,i];case 5:return[i,a,o]}};A.hsv.hsl=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,a,o;return o=(2-r)*i,s=(2-r)*n,a=r*n,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};A.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s,a,o,l;n>1&&(r/=n,i/=n),s=Math.floor(6*e),a=1-i,o=6*e-s,s&1&&(o=1-o),l=r+o*(a-r);var u,c,h;switch(s){default:case 6:case 0:u=a,c=l,h=r;break;case 1:u=l,c=a,h=r;break;case 2:u=r,c=a,h=l;break;case 3:u=r,c=l,h=a;break;case 4:u=l,c=r,h=a;break;case 5:u=a,c=r,h=l;break}return[u*255,c*255,h*255]};A.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s,a,o;return s=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,i*(1-n)+n),[s*255,a*255,o*255]};A.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,a;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,a=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[n*255,s*255,a*255]};A.xyz.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return e/=95.047,r/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=116*r-16,s=500*(e-r),a=200*(r-i),[n,s,a]};A.lab.xyz=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;s=(e+16)/116,n=r/500+s,a=s-i/200;var o=Math.pow(s,3),l=Math.pow(n,3),u=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,n*=95.047,s*=100,a*=108.883,[n,s,a]};A.lab.lch=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return n=Math.atan2(i,r),s=n*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(r*r+i*i),[e,a,s]};A.lch.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return a=i/360*2*Math.PI,n=r*Math.cos(a),s=r*Math.sin(a),[e,n,s]};A.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:A.rgb.hsv(t)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return n===2&&(s+=60),s};A.hsv.ansi16=function(t){return A.rgb.ansi16(A.hsv.rgb(t),t[2])};A.rgb.ansi256=function(t){var e=t[0],r=t[1],i=t[2];if(e===r&&r===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};A.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};A.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,i=Math.floor(t/36)/5*255,n=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[i,n,s]};A.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};A.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var i=parseInt(r,16),n=i>>16&255,s=i>>8&255,a=i&255;return[n,s,a]};A.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),a=n-s,o,l;return a<1?o=s/(1-a):o=0,a<=0?l=0:n===e?l=(r-i)/a%6:n===r?l=2+(i-e)/a:l=4+(e-r)/a+4,l/=6,l%=1,[l*360,a*100,o*100]};A.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1,n=0;return r<.5?i=2*e*r:i=2*e*(1-r),i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};A.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};A.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];var n=[0,0,0],s=e%1*6,a=s%1,o=1-a,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};A.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};A.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,i=r*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};A.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};A.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};A.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};A.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};A.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};A.gray.hsl=A.gray.hsv=function(t){return[0,0,t[0]]};A.gray.hwb=function(t){return[0,100,t[0]]};A.gray.cmyk=function(t){return[0,0,0,t[0]]};A.gray.lab=function(t){return[t[0],0,0]};A.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};A.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var Pc=w((W2,kc)=>{var $n=mo();function zv(){for(var t={},e=Object.keys($n),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function Hv(t){var e=zv(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys($n[i]),s=n.length,a=0;a<s;a++){var o=n[a],l=e[o];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(o))}return e}function Gv(t,e){return function(r){return e(t(r))}}function Yv(t,e){for(var r=[e[t].parent,t],i=$n[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=Gv($n[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}kc.exports=function(t){for(var e=Hv(t),r={},i=Object.keys(e),n=i.length,s=0;s<n;s++){var a=i[s],o=e[a];o.parent!==null&&(r[a]=Yv(a,e))}return r}});var qc=w((B2,Dc)=>{var yo=mo(),Vv=Pc(),yr={},Kv=Object.keys(yo);function Jv(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Zv(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var i=t(r);if(typeof i=="object")for(var n=i.length,s=0;s<n;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Kv.forEach(function(t){yr[t]={},Object.defineProperty(yr[t],"channels",{value:yo[t].channels}),Object.defineProperty(yr[t],"labels",{value:yo[t].labels});var e=Vv(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];yr[t][i]=Zv(n),yr[t][i].raw=Jv(n)})});Dc.exports=yr});var Lc=w((U2,jc)=>{"use strict";var ri=Ec(),Oe=qc(),vo=[].slice,Cc=["keyword","gray","hex"],bo={};Object.keys(Oe).forEach(function(t){bo[vo.call(Oe[t].labels).sort().join("")]=t});var Wn={};function ue(t,e){if(!(this instanceof ue))return new ue(t,e);if(e&&e in Cc&&(e=null),e&&!(e in Oe))throw new Error("Unknown model: "+e);var r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ue)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=ri.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Oe[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length){this.model=e||"rgb",i=Oe[this.model].channels;var s=vo.call(t,0,i);this.color=wo(s,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;var a=Object.keys(t);"alpha"in t&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var o=a.sort().join("");if(!(o in bo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=bo[o];var l=Oe[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=wo(u)}if(Wn[this.model])for(i=Oe[this.model].channels,r=0;r<i;r++){var c=Wn[this.model][r];c&&(this.color[r]=c(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ue.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in ri.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Oe[this.model].channels,r=Oe[this.model].labels,i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new ue(this.color.map(Xv(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new ue(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:V("rgb",0,ie(255)),green:V("rgb",1,ie(255)),blue:V("rgb",2,ie(255)),hue:V(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:V("hsl",1,ie(100)),lightness:V("hsl",2,ie(100)),saturationv:V("hsv",1,ie(100)),value:V("hsv",2,ie(100)),chroma:V("hcg",1,ie(100)),gray:V("hcg",2,ie(100)),white:V("hwb",1,ie(100)),wblack:V("hwb",2,ie(100)),cyan:V("cmyk",0,ie(100)),magenta:V("cmyk",1,ie(100)),yellow:V("cmyk",2,ie(100)),black:V("cmyk",3,ie(100)),x:V("xyz",0,ie(100)),y:V("xyz",1,ie(100)),z:V("xyz",2,ie(100)),l:V("lab",0,ie(100)),a:V("lab",1),b:V("lab",2),keyword:function(t){return arguments.length?new ue(t):Oe[this.model].keyword(this.color)},hex:function(t){return arguments.length?new ue(t):ri.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var i=t[r]/255;e[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return ue.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,a=r.alpha()-i.alpha(),o=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,l=1-o;return ue.rgb(o*r.red()+l*i.red(),o*r.green()+l*i.green(),o*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(Oe).forEach(function(t){if(Cc.indexOf(t)===-1){var e=Oe[t].channels;ue.prototype[t]=function(){if(this.model===t)return new ue(this);if(arguments.length)return new ue(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new ue(e1(Oe[this.model][t].raw(this.color)).concat(r),t)},ue[t]=function(r){return typeof r=="number"&&(r=wo(vo.call(arguments),e)),new ue(r,t)}}});function Qv(t,e){return Number(t.toFixed(e))}function Xv(t){return function(e){return Qv(e,t)}}function V(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(Wn[i]||(Wn[i]=[]))[e]=r}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function ie(t){return function(e){return Math.max(0,Math.min(t,e))}}function e1(t){return Array.isArray(t)?t:[t]}function wo(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}jc.exports=ue});var Fc=w((z2,Nc)=>{"use strict";Nc.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n}});var Bc=w((H2,Wc)=>{"use strict";var Ic=Lc(),$c=Fc();Wc.exports=function(e,r){var i=e.split(r||":"),n=$c(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=Ic(n).mix(Ic($c(i[s+1]))).saturate(1).hex();return n}});var zc=w((G2,Uc)=>{"use strict";function $e(t,e){if(e)return new $e(t).style(e);if(!(this instanceof $e))return new $e(t);this.text=t}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.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),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};$e.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,a=i/255*5;return this.ansi(n,s,a)};$e.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),a=Math.round(i);return 16+n*36+s*6+a};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Uc.exports=$e});var Gc=w((Y2,Hc)=>{var t1=Bc(),r1=zc();Hc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?r1(i+":",t1(i)):i+":";return e[0]=n+" "+e[0],e}});var Vc=w((V2,Yc)=>{"use strict";Yc.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].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 Jc=w((K2,Kc)=>{var i1=Vc();Kc.exports=function(e){return function(i){try{return i1(i,e())}catch{}return!1}}});var Qc=w((J2,Zc)=>{var n1=Jc();Zc.exports=n1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var ed=w((Z2,Xc)=>{Xc.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var rd=w((Q2,td)=>{var s1=go(),a1=require("tty").isatty(1),Bn=s1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:a1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Bn.modify(Gc());Bn.use(Qc());Bn.set(ed());td.exports=Bn});var ii=w((X2,_o)=>{process.env.NODE_ENV==="production"?_o.exports=cc():_o.exports=rd()});var nd=w((eR,id)=>{"use strict";var So=require("fs"),{StringDecoder:o1}=require("string_decoder"),{Stream:l1}=Yt();function u1(){}id.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new o1("utf8"),n=new l1,s="",a=0,o=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},So.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){So.close(u,u1);return}return So.read(u,r,0,r.length,a,(h,d)=>{if(h){e?e(h):n.emit("error",h),n.destroy();return}if(!d)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(c,1e3);let f=i.write(r.slice(0,d));e||n.emit("data",f),f=(s+f).split(/\n+/);let y=f.length-1,b=0;for(;b<y;b++)(t.start==null||o>t.start)&&(e?e(null,f[b]):n.emit("line",f[b])),o++;return s=f[y],a+=d,c()})})()}),e?n.destroy:n}});var ld=w((rR,od)=>{"use strict";var Re=require("fs"),ne=require("path"),sd=fh(),f1=require("zlib"),{MESSAGE:h1}=te(),{Stream:c1,PassThrough:ad}=Yt(),d1=ur(),We=ii()("winston:file"),p1=require("os"),g1=nd();od.exports=class extends d1{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new ad,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?ne.basename(e.filename):"winston.log",this.dirname=e.dirname||ne.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=ne.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:p1.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())))}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 i=`${e[h1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,We("logged %s %s",this._size,i),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+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let a=this._stream.write(i,s.bind(this));return a?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),We("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=h(e);let i=ne.join(this.dirname,this.filename),n="",s=[],a=0,o=Re.createReadStream(i,{encoding:"utf8"});o.on("error",d=>{if(o.readable&&o.destroy(),!!r)return d.code!=="ENOENT"?r(d):r(null,s)}),o.on("data",d=>{d=(n+d).split(/\n+/);let f=d.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(d[y]),a++;n=d[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(d,f){try{let y=JSON.parse(d);c(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(d){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(d=e.fields.reduce((f,y)=>(f[y]=d[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(d)}function c(d){if(!d||typeof d!="object")return;let f=new Date(d.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==d.level))return!0}function h(d){return d=d||{},d.rows=d.rows||d.limit||10,d.start=d.start||0,d.until=d.until||new Date,typeof d.until!="object"&&(d.until=new Date(d.until)),d.from=d.from||d.until-24*60*60*1e3,typeof d.from!="object"&&(d.from=new Date(d.from)),d.order=d.order||"desc",d}}stream(e={}){let r=ne.join(this.dirname,this.filename),i=new c1,n={file:r,start:e.start};return i.destroy=g1(n,(s,a)=>{if(s)return i.emit("error",s);try{i.emit("data",a),a=JSON.parse(a),i.emit("log",a)}catch(o){i.emit("error",o)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);We("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.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1})})))}stat(e){let r=this._getFile(),i=ne.join(this.dirname,r);Re.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return We(`err ${n.code} ${i}`),e(n);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=ne.join(this.dirname,this.filename);We("create stream start",r,this.options);let i=Re.createWriteStream(r,this.options).on("error",n=>We(n)).on("close",()=>We("close",i.path,i.bytesWritten)).on("open",()=>{We("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ad,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return We("create stream ok",r),i}_incFile(e){We("_incFile",this.filename);let r=ne.extname(this._basename),i=ne.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(ne.join(this.dirname,`${i}${a}${r}`),ne.join(this.dirname,`${i}${a}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),sd(n,e)}_getFile(){let e=ne.extname(this._basename),r=ne.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",a=this.zippedArchive?".gz":"",o=`${r}${s}${e}${a}`,l=ne.join(this.dirname,o);Re.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let a=this.maxFiles-1;a>1;a--)n.push(function(o,l){let u=`${r}${o-1}${e}${s}`,c=ne.join(this.dirname,u);Re.exists(c,h=>{if(!h)return l(null);u=`${r}${o}${e}${s}`,Re.rename(c,ne.join(this.dirname,u),l)})}.bind(this,a));sd(n,()=>{Re.rename(ne.join(this.dirname,`${r}${e}${s}`),ne.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){Re.access(e,Re.F_OK,n=>{if(n)return i();var s=f1.createGzip(),a=Re.createReadStream(e),o=Re.createWriteStream(r);o.on("finish",()=>{Re.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){Re.existsSync(e)||Re.mkdirSync(e,{recursive:!0})}}});var fd=w((nR,ud)=>{"use strict";var m1=require("http"),y1=require("https"),{Stream:b1}=Yt(),w1=ur(),{configure:v1}=Pr();ud.exports=class extends w1{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,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,a,o)=>{if(a&&a.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${a.statusCode}`)),s)return r(s);if(typeof o=="string")try{o=JSON.parse(o)}catch(l){return r(l)}r(null,o)})}stream(e={}){let r=new b1;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",a=this._request(e,n,i);return r.destroy=()=>a.destroy(),a.on("data",o=>{o=(s+o).split(/\n+/);let l=o.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(o[u]))}catch(c){r.emit("error",c)}s=o[l]}),a.on("error",o=>r.emit("error",o)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){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,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let a=(this.ssl?y1:m1).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});a.on("error",r),a.on("response",l=>l.on("end",()=>r(null,l)).resume());let o=v1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Eo=w((sR,hd)=>{"use strict";var Ke=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Ke.writable=t=>Ke(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Ke.readable=t=>Ke(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Ke.duplex=t=>Ke.writable(t)&&Ke.readable(t);Ke.transform=t=>Ke.duplex(t)&&typeof t._transform=="function";hd.exports=Ke});var dd=w((oR,cd)=>{"use strict";var _1=Eo(),{MESSAGE:S1}=te(),E1=require("os"),R1=ur();cd.exports=class extends R1{constructor(e={}){if(super(e),!e.stream||!_1(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:E1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[S1]}${this.eol}`),r&&r()}}});var pd=w(ni=>{"use strict";Object.defineProperty(ni,"Console",{configurable:!0,enumerable:!0,get(){return Mf()}});Object.defineProperty(ni,"File",{configurable:!0,enumerable:!0,get(){return ld()}});Object.defineProperty(ni,"Http",{configurable:!0,enumerable:!0,get(){return fd()}});Object.defineProperty(ni,"Stream",{configurable:!0,enumerable:!0,get(){return dd()}})});var zn=w(si=>{"use strict";var Un=Js(),{configs:Ro}=te();si.cli=Un.levels(Ro.cli);si.npm=Un.levels(Ro.npm);si.syslog=Un.levels(Ro.syslog);si.addColors=Un.levels});var md=w((Hn,gd)=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});var x1=on(),T1=Kt(x1),O1=yn(),M1=Kt(O1),A1=ja(),k1=Kt(A1),P1=Da(),D1=Kt(P1),q1=qa(),C1=Kt(q1),j1=Bt(),L1=Kt(j1),N1=hr(),F1=Kt(N1);function Kt(t){return t&&t.__esModule?t:{default:t}}function I1(t,e,r){r=(0,D1.default)(r);var i=0,n=0,{length:s}=t,a=!1;s===0&&r(null);function o(l,u){l===!1&&(a=!0),a!==!0&&(l?r(l):(++n===s||u===M1.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,C1.default)(o))}function $1(t,e,r){return(0,k1.default)(t,1/0,e,r)}function W1(t,e,r){var i=(0,T1.default)(t)?I1:$1;return i(t,(0,L1.default)(e),r)}Hn.default=(0,F1.default)(W1,3);gd.exports=Hn.default});var bd=w((Gn,yd)=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.default=B1;function B1(t){return(e,r,i)=>t(e,i)}yd.exports=Gn.default});var Kn=w((Vn,wd)=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});var U1=md(),z1=Yn(U1),H1=bd(),G1=Yn(H1),Y1=Bt(),V1=Yn(Y1),K1=hr(),J1=Yn(K1);function Yn(t){return t&&t.__esModule?t:{default:t}}function Z1(t,e,r){return(0,z1.default)(t,(0,G1.default)((0,V1.default)(e)),r)}Vn.default=(0,J1.default)(Z1,3);wd.exports=Vn.default});var _d=w((fR,vd)=>{"use strict";var Q1=Object.prototype.toString;vd.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(),i=Q1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var xo=w((hR,Sd)=>{"use strict";var X1=_d();Sd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=X1(e),n}});var To=w(oi=>{oi.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,a){return a},Error.captureStackTrace(r,t||oi.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};oi.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
-
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var s=null,a=null,o=null,l=null,u=null,c=n[5]==="native";if(n[1]){o=n[1];var h=o.lastIndexOf(".");if(o[h-1]=="."&&h--,h>0){s=o.substr(0,h),a=o.substr(h+1);var d=s.indexOf(".Module");d>0&&(o=o.substr(d+1),s=s.substr(0,d))}l=null}a&&(l=s,u=a),a==="<anonymous>"&&(u=null,o=null);var f={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:c};return e._createParsedCallSite(f)}}).filter(function(i){return!!i})};function
|
|
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
|
-
`));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=
|
|
32
|
-
`))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Do(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Zn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Fd.exports=Zn});var qo=w((ER,Id)=>{"use strict";var{LEVEL:w_}=te(),v_=zn(),__=Jn(),S_=ii()("winston:create-logger");function E_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Id.exports=function(t={}){t.levels=t.levels||v_.npm.levels;class e extends __{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(S_('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[a]=n,o=a&&a.message&&a||{message:a};return o.level=o[w_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[E_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Wd=w((xR,$d)=>{"use strict";var R_=qo();$d.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 i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=R_(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}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,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Ud=w(H=>{"use strict";var Bd=Js(),{warn:li}=Zs();H.version=xu().version;H.transports=pd();H.config=zn();H.addColors=Bd.levels;H.format=Bd.format;H.createLogger=qo();H.Logger=Jn();H.ExceptionHandler=Mo();H.RejectionHandler=ko();H.Container=Wd();H.Transport=ur();H.loggers=new H.Container;var Ze=H.createLogger();Object.keys(H.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>H[t]=(...e)=>Ze[t](...e));Object.defineProperty(H,"level",{get(){return Ze.level},set(t){Ze.level=t}});Object.defineProperty(H,"exceptions",{get(){return Ze.exceptions}});Object.defineProperty(H,"rejections",{get(){return Ze.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return Ze[t]},set(e){Ze[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:Ze.exceptionHandlers,rejectionHandlers:Ze.rejectionHandlers,transports:Ze.transports}}});li.deprecated(H,"setLevels");li.forFunctions(H,"useFormat",["cli"]);li.forProperties(H,"useFormat",["padLevels","stripColors"]);li.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);li.forProperties(H,"deprecated",["emitErrs","levelLength"])});var es=w((Xn,Gd)=>{(function(t,e){typeof Xn=="object"&&typeof Gd<"u"?e(Xn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Xn,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:D,...$}=g,{path:J}=g,Z=J.length===0?T:`At path: ${J.join(".")} -- ${T}`;super(D??Z),D!=null&&(this.cause=Z),Object.assign(this,$),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(p){return i(p)&&typeof p[Symbol.iterator]=="function"}function i(p){return typeof p=="object"&&p!=null}function n(p){return i(p)&&!Array.isArray(p)}function s(p){if(Object.prototype.toString.call(p)!=="[object Object]")return!1;let g=Object.getPrototypeOf(p);return g===null||g===Object.prototype}function a(p){return typeof p=="symbol"?p.toString():typeof p=="string"?JSON.stringify(p):`${p}`}function o(p){let{done:g,value:m}=p.next();return g?void 0:m}function l(p,g,m,v){if(p===!0)return;p===!1?p={}:typeof p=="string"&&(p={message:p});let{path:T,branch:D}=g,{type:$}=m,{refinement:J,message:Z=`Expected a value of type \`${$}\`${J?` with refinement \`${J}\``:""}, but received: \`${a(v)}\``}=p;return{value:v,type:$,refinement:J,key:T[T.length-1],path:T,branch:D,...p,message:Z}}function*u(p,g,m,v){r(p)||(p=[p]);for(let T of p){let D=l(T,g,m,v);D&&(yield D)}}function*c(p,g,m={}){let{path:v=[],branch:T=[p],coerce:D=!1,mask:$=!1}=m,J={path:v,branch:T,mask:$};D&&(p=g.coercer(p,J));let Z="valid";for(let re of g.validator(p,J))re.explanation=m.message,Z="not_valid",yield[re,void 0];for(let[re,Pe,hg]of g.entries(p,J)){let cg=c(Pe,hg,{path:re===void 0?v:[...v,re],branch:re===void 0?T:[...T,Pe],coerce:D,mask:$,message:m.message});for(let qi of cg)qi[0]?(Z=qi[0].refinement!=null?"not_refined":"not_valid",yield[qi[0],void 0]):D&&(Pe=qi[1],re===void 0?p=Pe:p instanceof Map?p.set(re,Pe):p instanceof Set?p.add(Pe):i(p)&&(Pe!==void 0||re in p)&&(p[re]=Pe))}if(Z!=="not_valid")for(let re of g.refiner(p,J))re.explanation=m.message,Z="not_refined",yield[re,void 0];Z==="valid"&&(yield[void 0,p])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:D,coercer:$=Z=>Z,entries:J=function*(){}}=g;this.type=m,this.schema=v,this.entries=J,this.coercer=$,T?this.validator=(Z,re)=>{let Pe=T(Z,re);return u(Pe,re,this,Z)}:this.validator=()=>[],D?this.refiner=(Z,re)=>{let Pe=D(Z,re);return u(Pe,re,this,Z)}:this.refiner=()=>[]}assert(g,m){return d(g,this,m)}create(g,m){return f(g,this,m)}is(g){return b(g,this)}mask(g,m){return y(g,this,m)}validate(g,m={}){return _(g,this,m)}}function d(p,g,m){let v=_(p,g,{message:m});if(v[0])throw v[0]}function f(p,g,m){let v=_(p,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function y(p,g,m){let v=_(p,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function b(p,g){return!_(p,g)[0]}function _(p,g,m={}){let v=c(p,g,m),T=o(v);return T[0]?[new e(T[0],function*(){for(let $ of v)$[0]&&(yield $[0])}),void 0]:[void 0,T[1]]}function E(...p){let g=p[0].type==="type",m=p.map(T=>T.schema),v=Object.assign({},...m);return g?ft(v):ut(v)}function R(p,g){return new h({type:p,schema:null,validator:g})}function x(p,g){return new h({...p,refiner:(m,v)=>m===void 0||p.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),p.validator(m,v))}})}function O(p){return new h({type:"dynamic",schema:null,*entries(g,m){yield*p(g,m).entries(g,m)},validator(g,m){return p(g,m).validator(g,m)},coercer(g,m){return p(g,m).coercer(g,m)},refiner(g,m){return p(g,m).refiner(g,m)}})}function k(p){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=p()),yield*g.entries(m,v)},validator(m,v){return g??(g=p()),g.validator(m,v)},coercer(m,v){return g??(g=p()),g.coercer(m,v)},refiner(m,v){return g??(g=p()),g.refiner(m,v)}})}function q(p,g){let{schema:m}=p,v={...m};for(let T of g)delete v[T];switch(p.type){case"type":return ft(v);default:return ut(v)}}function F(p){let g=p instanceof h,m=g?{...p.schema}:{...p};for(let v in m)m[v]=kt(m[v]);return g&&p.type==="type"?ft(m):ut(m)}function N(p,g){let{schema:m}=p,v={};for(let T of g)v[T]=m[T];switch(p.type){case"type":return ft(v);default:return ut(v)}}function U(p,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),R(p,g)}function ee(){return R("any",()=>!0)}function K(p){return new h({type:"array",schema:p,*entries(g){if(p&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,p]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${a(g)}`}})}function ye(){return R("bigint",p=>typeof p=="bigint")}function be(){return R("boolean",p=>typeof p=="boolean")}function tt(){return R("date",p=>p instanceof Date&&!isNaN(p.getTime())||`Expected a valid \`Date\` object, but received: ${a(p)}`)}function xs(p){let g={},m=p.map(v=>a(v)).join();for(let v of p)g[v]=v;return new h({type:"enums",schema:g,validator(v){return p.includes(v)||`Expected one of \`${m}\`, but received: ${a(v)}`}})}function S(){return R("func",p=>typeof p=="function"||`Expected a function, but received: ${a(p)}`)}function M(p){return R("instance",g=>g instanceof p||`Expected a \`${p.name}\` instance, but received: ${a(g)}`)}function z(){return R("integer",p=>typeof p=="number"&&!isNaN(p)&&Number.isInteger(p)||`Expected an integer, but received: ${a(p)}`)}function de(p){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of p)yield*v.entries(g,m)},*validator(g,m){for(let v of p)yield*v.validator(g,m)},*refiner(g,m){for(let v of p)yield*v.refiner(g,m)}})}function P(p){let g=a(p),m=typeof p;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?p:null,validator(v){return v===p||`Expected the literal \`${g}\`, but received: ${a(v)}`}})}function ke(p,g){return new h({type:"map",schema:null,*entries(m){if(p&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,p],yield[v,T,g]},coercer(m){return m instanceof Map?new Map(m):m},validator(m){return m instanceof Map||`Expected a \`Map\` object, but received: ${a(m)}`}})}function Fe(){return R("never",()=>!1)}function At(p){return new h({...p,validator:(g,m)=>g===null||p.validator(g,m),refiner:(g,m)=>g===null||p.refiner(g,m)})}function Qt(){return R("number",p=>typeof p=="number"&&!isNaN(p)||`Expected a number, but received: ${a(p)}`)}function ut(p){let g=p?Object.keys(p):[],m=Fe();return new h({type:"object",schema:p||null,*entries(v){if(p&&i(v)){let T=new Set(Object.keys(v));for(let D of g)T.delete(D),yield[D,v[D],p[D]];for(let D of T)yield[D,v[D],m]}},validator(v){return n(v)||`Expected an object, but received: ${a(v)}`},coercer(v,T){if(!n(v))return v;let D={...v};if(T.mask&&p)for(let $ in D)p[$]===void 0&&delete D[$];return D}})}function kt(p){return new h({...p,validator:(g,m)=>g===void 0||p.validator(g,m),refiner:(g,m)=>g===void 0||p.refiner(g,m)})}function Ts(p,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let v in m){let T=m[v];yield[v,v,p],yield[v,T,g]}},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function xe(){return R("regexp",p=>p instanceof RegExp)}function Mi(p){return new h({type:"set",schema:null,*entries(g){if(p&&g instanceof Set)for(let m of g)yield[m,m,p]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${a(g)}`}})}function Ai(){return R("string",p=>typeof p=="string"||`Expected a string, but received: ${a(p)}`)}function ki(p){let g=Fe();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(p.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],p[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${a(m)}`},coercer(m){return Array.isArray(m)?m.slice():m}})}function ft(p){let g=Object.keys(p);return new h({type:"type",schema:p,*entries(m){if(i(m))for(let v of g)yield[v,m[v],p[v]]},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function Xt(p){let g=p.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m,v){for(let T of p){let[D,$]=T.validate(m,{coerce:!0,mask:v.mask});if(!D)return $}return m},validator(m,v){let T=[];for(let D of p){let[...$]=c(m,D,v),[J]=$;if(J[0])for(let[Z]of $)Z&&T.push(Z);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${a(m)}`,...T]}})}function Pt(){return R("unknown",()=>!0)}function Mr(p,g,m){return new h({...p,coercer:(v,T)=>b(v,g)?p.coercer(m(v,T),T):p.coercer(v,T)})}function Dt(p,g,m={}){return Mr(p,Pt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&s(v)&&s(T)){let D={...v},$=!1;for(let J in T)D[J]===void 0&&(D[J]=T[J],$=!0);if($)return D}return v})}function ht(p){return Mr(p,Ai(),g=>g.trim())}function Ar(p){return qt(p,"empty",g=>{let m=Pi(g);return m===0||`Expected an empty ${p.type} but received one with a size of \`${m}\``})}function Pi(p){return p instanceof Map||p instanceof Set?p.size:p.length}function Di(p,g,m={}){let{exclusive:v}=m;return qt(p,"max",T=>v?T<g:T<=g||`Expected a ${p.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function og(p,g,m={}){let{exclusive:v}=m;return qt(p,"min",T=>v?T>g:T>=g||`Expected a ${p.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function lg(p){return qt(p,"nonempty",g=>Pi(g)>0||`Expected a nonempty ${p.type} but received an empty one`)}function ug(p,g){return qt(p,"pattern",m=>g.test(m)||`Expected a ${p.type} matching \`/${g.source}/\` but received "${m}"`)}function fg(p,g,m=g){let v=`Expected a ${p.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return qt(p,"size",D=>{if(typeof D=="number"||D instanceof Date)return g<=D&&D<=m||`${v} ${T} but received \`${D}\``;if(D instanceof Map||D instanceof Set){let{size:$}=D;return g<=$&&$<=m||`${v} with a size ${T} but received one with a size of \`${$}\``}else{let{length:$}=D;return g<=$&&$<=m||`${v} with a length ${T} but received one with a length of \`${$}\``}})}function qt(p,g,m){return new h({...p,*refiner(v,T){yield*p.refiner(v,T);let D=m(v,T),$=u(D,T,p,v);for(let J of $)yield{...J,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=ee,t.array=K,t.assert=d,t.assign=E,t.bigint=ye,t.boolean=be,t.coerce=Mr,t.create=f,t.date=tt,t.defaulted=Dt,t.define=R,t.deprecated=x,t.dynamic=O,t.empty=Ar,t.enums=xs,t.func=S,t.instance=M,t.integer=z,t.intersection=de,t.is=b,t.lazy=k,t.literal=P,t.map=ke,t.mask=y,t.max=Di,t.min=og,t.never=Fe,t.nonempty=lg,t.nullable=At,t.number=Qt,t.object=ut,t.omit=q,t.optional=kt,t.partial=F,t.pattern=ug,t.pick=N,t.record=Ts,t.refine=qt,t.regexp=xe,t.set=Mi,t.size=fg,t.string=Ai,t.struct=U,t.trimmed=ht,t.tuple=ki,t.type=ft,t.union=Xt,t.unknown=Pt,t.validate=_})});var Xd=w(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.validateRequirements=void 0;var A_="[",k_="(<=>!~",P_=";",D_="@",q_=new RegExp(`[${A_+k_+P_+D_}]`);function C_(t){return t.split(q_)[0].trim()}function j_(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>C_(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}ts.validateRequirements=j_});var ep=w(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.parseRequirementsTxt=void 0;var L_=/\s#.*$/;function N_(t){return t.split(`
|
|
33
|
-
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(L_,"")).map(e=>e.trim()).filter(e=>e!=="")}rs.parseRequirementsTxt=N_});var tp=w(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.PromiseDelegate=void 0;var Co=class{promise;resolveInternal;rejectInternal;constructor(){this.promise=new Promise((e,r)=>{this.resolveInternal=e,this.rejectInternal=r})}resolve(e){this.resolveInternal(e)}reject(e){this.rejectInternal(e)}};is.PromiseDelegate=Co});var rp=w(st=>{"use strict";var F_=st&&st.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),jo=st&&st.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&F_(e,t,r)};Object.defineProperty(st,"__esModule",{value:!0});jo(Xd(),st);jo(ep(),st);jo(tp(),st)});var op=w(($R,ap)=>{"use strict";ap.exports=np;function np(t,e,r){t instanceof RegExp&&(t=ip(t,r)),e instanceof RegExp&&(e=ip(e,r));var i=sp(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function ip(t,e){var r=e.match(t);return r?r[0]:null}np.range=sp;function sp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;c>=0&&!o;)c==l?(i.push(c),l=r.indexOf(t,c+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,c+1)),c=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var gp=w((WR,pp)=>{var lp=op();pp.exports=W_;var up="\0SLASH"+Math.random()+"\0",fp="\0OPEN"+Math.random()+"\0",No="\0CLOSE"+Math.random()+"\0",hp="\0COMMA"+Math.random()+"\0",cp="\0PERIOD"+Math.random()+"\0";function Lo(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function I_(t){return t.split("\\\\").join(up).split("\\{").join(fp).split("\\}").join(No).split("\\,").join(hp).split("\\.").join(cp)}function $_(t){return t.split(up).join("\\").split(fp).join("{").split(No).join("}").split(hp).join(",").split(cp).join(".")}function dp(t){if(!t)return[""];var e=[],r=lp("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=dp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function W_(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),fi(I_(t),!0).map($_)):[]}function B_(t){return"{"+t+"}"}function U_(t){return/^-?0\d/.test(t)}function z_(t,e){return t<=e}function H_(t,e){return t>=e}function fi(t,e){var r=[],i=lp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?fi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<s.length;a++){var o=n+"{"+i.body+"}"+s[a];r.push(o)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),c=l||u,h=i.body.indexOf(",")>=0;if(!c&&!h)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+No+i.post,fi(t)):[t];var d;if(c)d=i.body.split(/\.\./);else if(d=dp(i.body),d.length===1&&(d=fi(d[0],!1).map(B_),d.length===1))return s.map(function(ee){return i.pre+d[0]+ee});var f;if(c){var y=Lo(d[0]),b=Lo(d[1]),_=Math.max(d[0].length,d[1].length),E=d.length==3?Math.abs(Lo(d[2])):1,R=z_,x=b<y;x&&(E*=-1,R=H_);var O=d.some(U_);f=[];for(var k=y;R(k,b);k+=E){var q;if(u)q=String.fromCharCode(k),q==="\\"&&(q="");else if(q=String(k),O){var F=_-q.length;if(F>0){var N=new Array(F+1).join("0");k<0?q="-"+N+q.slice(1):q=N+q}}f.push(q)}}else{f=[];for(var U=0;U<d.length;U++)f.push.apply(f,fi(d[U],!1))}for(var U=0;U<f.length;U++)for(var a=0;a<s.length;a++){var o=n+f[U]+s[a];(!e||c||o)&&r.push(o)}}return r}});var ig=pe(require("yargs")),ng=require("yargs/helpers"),ce=pe(require("node:path")),lt=pe(require("node:fs/promises")),tl=pe(require("fs-extra")),Oi=require("pyodide");var zd=pe(require("node:path")),Hd=pe(require("node:fs/promises"));var Rt=pe(Ud()),I=Rt.createLogger({transports:[new Rt.transports.Console({format:Rt.format.combine(Rt.format.splat(),Rt.format.cli())})]});function ui(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Qn=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){let r=zd.default.join(this.sourceUrl,e);if(this.isRemote){I.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{I.debug(`Reading ${r}`);let i=await Hd.default.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;I.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var Vd=pe(require("node:fs/promises")),Kd=pe(es());var Q=pe(es()),Yd=Q.object({entrypoint:Q.string(),embed:Q.defaulted(Q.boolean(),!1),idbfsMountpoints:Q.optional(Q.array(Q.string())),nodeJsWorker:Q.defaulted(Q.boolean(),!1),nodefsMountpoints:Q.optional(Q.record(Q.string(),Q.string()))});function x_(t){let e=Kd.mask(t??{},Yd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Jd(t){let e=x_({...t.packageJsonStliteDesktopField,...t.fallbacks});I.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);I.info(`Dump the manifest file -> ${t.manifestFilePath}`),await Vd.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Zd=pe(require("node:path")),fe=pe(es());async function Qd(t){let{files:e,entrypoint:r}=T_(t),i=await O_(t),n=await M_(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function T_(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ui("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ui("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return fe.assert(n,fe.string(),"The `stlite.desktop.entrypoint` field must be a string."),fe.assert(i,fe.array(fe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function O_(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;fe.assert(i,fe.optional(fe.array(fe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ui("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function M_(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;fe.assert(n,fe.optional(fe.array(fe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Zd.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(ui("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),a=i),[...s??[],...a]}var Rs=pe(rp());var Ep=pe(gp(),1);var hi=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var G_={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ci=t=>t.replace(/[[\]\\-]/g,"\\$&"),Y_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mp=t=>t.join(""),yp=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,a=!1,o=!1,l=!1,u=!1,c=r,h="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){c=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[_,[E,R,x]]of Object.entries(G_))if(t.startsWith(_,s)){if(h)return["$.",!1,t.length-r,!0];s+=_.length,x?n.push(E):i.push(E),o=o||R;continue e}}if(l=!1,h){b>h?i.push(ci(h)+"-"+ci(b)):b===h&&i.push(ci(b)),h="",s++;continue}if(t.startsWith("-]",s+1)){i.push(ci(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=b,s+=2;continue}i.push(ci(b)),s++}if(c<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[Y_(b),!1,c-r,!1]}let d="["+(u?"^":"")+mp(i)+"]",f="["+(u?"":"^")+mp(n)+"]";return[i.length&&n.length?"("+d+"|"+f+")":i.length?d:f,o,c-r,!0]};var Be=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var V_=new Set(["!","?","+","*","@"]),bp=t=>V_.has(t),K_="(?!(?:^|/)\\.\\.?(?:$|/))",ns="(?!\\.)",J_=new Set(["[","."]),Z_=new Set(["..","."]),Q_=new Set("().*{}+?[]^$\\!"),X_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fo="[^/]",wp=Fo+"*?",vp=Fo+"+?",br=class t{type;#e;#r;#s=!1;#i=[];#o;#u;#h;#l=!1;#a;#t;#g=!1;constructor(e,r,i={}){this.type=e,e&&(this.#r=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#l&&this.#h.push(this),this.#u=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#t!==void 0?this.#t:this.type?this.#t=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#t=this.#i.map(e=>String(e)).join("")}#y(){if(this!==this.#e)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#h.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#u+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}r=i,i=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#o===this))throw new Error("invalid part: "+r);this.#i.push(r)}}toJSON(){let e=this.type===null?this.#i.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#i.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#l&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#u===0)return!0;let e=this.#o;for(let r=0;r<this.#u;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#i)r.copyIn(i);return r}static#d(e,r,i,n){let s=!1,a=!1,o=-1,l=!1;if(r.type===null){let f=i,y="";for(;f<e.length;){let b=e.charAt(f++);if(s||b==="\\"){s=!s,y+=b;continue}if(a){f===o+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(f===o+2&&l)&&(a=!1),y+=b;continue}else if(b==="["){a=!0,o=f,l=!1,y+=b;continue}if(!n.noext&&bp(b)&&e.charAt(f)==="("){r.push(y),y="";let _=new t(b,r);f=t.#d(e,_,f,n),r.push(_);continue}y+=b}return r.push(y),f}let u=i+1,c=new t(null,r),h=[],d="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,d+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),d+=f;continue}else if(f==="["){a=!0,o=u,l=!1,d+=f;continue}if(bp(f)&&e.charAt(u)==="("){c.push(d),d="";let y=new t(f,c);c.push(y),u=t.#d(e,y,u,n);continue}if(f==="|"){c.push(d),d="",h.push(c),c=new t(null,r);continue}if(f===")")return d===""&&r.#i.length===0&&(r.#g=!0),c.push(d),d="",r.push(...h,c),u;d+=f}return r.type=null,r.#r=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#d(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#y(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,_,E]=typeof f=="string"?t.#v(f,this.#r,l):f.toRegExpSource(e);return this.#r=this.#r||_,this.#s=this.#s||E,y}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Z_.has(this.#i[0]))){let y=J_,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),_=!r&&!e&&y.has(u.charAt(0));c=b?K_:_?ns:""}let h="";return this.isEnd()&&this.#e.#l&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,Be(u),this.#r=!!this.#r,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#c(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#r=void 0,[l,Be(this.toString()),!1,!1]}let a=!i||e||r||!ns?"":this.#c(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#g)o=(this.isStart()&&!r?ns:"")+vp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?ns:"")+wp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,Be(s),this.#r=!!this.#r,this.#s]}#c(e){return this.#i.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,a]=r.toRegExpSource(e);return this.#s=this.#s||a,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",a=!1;for(let o=0;o<e.length;o++){let l=e.charAt(o);if(n){n=!1,s+=(Q_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,h,d]=yp(e,o);if(h){s+=u,a=a||c,o+=h-1,r=r||d;continue}}if(l==="*"){i&&e==="*"?s+=vp:s+=wp,r=!0;continue}if(l==="?"){s+=Fo,r=!0;continue}s+=X_(l)}return[s,Be(e),!!r,a]}};var wr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var _e=(t,e,r={})=>(hi(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Me(e,r).match(t)),eS=/^\*+([^+@!?\*\[\(]*)$/,tS=t=>e=>!e.startsWith(".")&&e.endsWith(t),rS=t=>e=>e.endsWith(t),iS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),nS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),sS=/^\*+\.\*+$/,aS=t=>!t.startsWith(".")&&t.includes("."),oS=t=>t!=="."&&t!==".."&&t.includes("."),lS=/^\.\*+$/,uS=t=>t!=="."&&t!==".."&&t.startsWith("."),fS=/^\*+$/,hS=t=>t.length!==0&&!t.startsWith("."),cS=t=>t.length!==0&&t!=="."&&t!=="..",dS=/^\?+([^+@!?\*\[\(]*)?$/,pS=([t,e=""])=>{let r=Rp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},gS=([t,e=""])=>{let r=xp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},mS=([t,e=""])=>{let r=xp([t]);return e?i=>r(i)&&i.endsWith(e):r},yS=([t,e=""])=>{let r=Rp([t]);return e?i=>r(i)&&i.endsWith(e):r},Rp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},xp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Tp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_p={win32:{sep:"\\"},posix:{sep:"/"}},bS=Tp==="win32"?_p.win32.sep:_p.posix.sep;_e.sep=bS;var he=Symbol("globstar **");_e.GLOBSTAR=he;var wS="[^/]",vS=wS+"*?",_S="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",SS="(?:(?!(?:\\/|^)\\.).)*?",ES=(t,e={})=>r=>_e(r,t,e);_e.filter=ES;var je=(t,e={})=>Object.assign({},t,e),RS=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return _e;let e=_e;return Object.assign((i,n,s={})=>e(i,n,je(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,je(t,s))}static defaults(n){return e.defaults(je(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,je(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,je(t,s))}},unescape:(i,n={})=>e.unescape(i,je(t,n)),escape:(i,n={})=>e.escape(i,je(t,n)),filter:(i,n={})=>e.filter(i,je(t,n)),defaults:i=>e.defaults(je(t,i)),makeRe:(i,n={})=>e.makeRe(i,je(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,je(t,n)),match:(i,n,s={})=>e.match(i,n,je(t,s)),sep:e.sep,GLOBSTAR:he})};_e.defaults=RS;var Op=(t,e={})=>(hi(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Ep.default)(t));_e.braceExpand=Op;var xS=(t,e={})=>new Me(t,e).makeRe();_e.makeRe=xS;var TS=(t,e,r={})=>{let i=new Me(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};_e.match=TS;var Sp=/[?*]|[+@!]\(.*?\)|\[|\]/,OS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Me=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){hi(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Tp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Sp.test(s[2]))&&!Sp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(c=>this.parse(c))];if(u)return[s[0],...s.slice(1).map(c=>this.parse(c))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let a=n;for(;i[a+1]==="**";)a++;a>n&&i.splice(n+1,a-n);let o=i[n+1],l=i[n+2],u=i[n+3];if(o!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let o=i[a];a===1&&o===""&&i[0]===""||(o==="."||o==="")&&(r=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let a=i[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);n&&(e[r]=n,e[i]=[])}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,a=[],o="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])a.push(o==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])a.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])a.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(r[s]),n++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),_=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),R=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),x=_?3:b?0:void 0,O=R?3:E?0:void 0;if(typeof x=="number"&&typeof O=="number"){let[k,q]=[e[x],r[O]];k.toLowerCase()===q.toLowerCase()&&(r[O]=k,O>x?r=r.slice(O):x>O&&(e=e.slice(x)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,o=0,l=e.length,u=r.length;a<l&&o<u;a++,o++){this.debug("matchOne loop");var c=r[o],h=e[a];if(this.debug(r,c,h),c===!1)return!1;if(c===he){this.debug("GLOBSTAR",[r,c,h]);var d=a,f=o+1;if(f===u){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;d<l;){var y=e[d];if(this.debug(`
|
|
25
|
+
${E}`),y.pop(),`{${k}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function c(d,f,y){switch(typeof f){case"string":return St(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return c(d,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let b="";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f);let M=Math.min(f.length,a),k=0;for(;k<M-1;k++){let F=c(String(k),f[k],y);b+=F!==void 0?F:"null",b+=","}let C=c(String(k),f[k],y);if(b+=C!==void 0?C:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${Ht(F)} not stringified"`}return y.pop(),`[${b}]`}let _=Object.keys(f),E=_.length;if(E===0)return"{}";if(s<y.length+1)return'"[Object]"';let R="",x=Math.min(E,a);fa(f)&&(b+=vu(f,",",a),_=_.slice(f.length),x-=f.length,R=","),n&&(_=ua(_)),y.push(f);for(let M=0;M<x;M++){let k=_[M],C=c(k,f[k],y);C!==void 0&&(b+=`${R}${St(k)}:${C}`,R=",")}if(E>a){let M=E-a;b+=`${R}"...":"${Ht(M)} not stringified"`}return y.pop(),`{${b}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(d,f,y){if(arguments.length>1){let b="";if(typeof y=="number"?b=" ".repeat(Math.min(y,10)):typeof y=="string"&&(b=y.slice(0,10)),f!=null){if(typeof f=="function")return o("",{"":d},[],f,b,"");if(Array.isArray(f))return l("",d,[],vm(f),b,"")}if(b.length!==0)return u("",d,[],b,"")}return c("",d,[])}return h}});var da=w((m2,Ru)=>{"use strict";var Sm=Ae(),{MESSAGE:Em}=re(),Rm=Gr();function xm(t,e){return typeof e=="bigint"?e.toString():e}Ru.exports=Sm((t,e)=>{let r=Rm.configure(e);return t[Em]=r(t,e.replacer||xm,e.space),t})});var Tu=w((y2,xu)=>{"use strict";var Tm=Ae();xu.exports=Tm((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Ou=w((b2,Mu)=>{"use strict";var Mm=Ae(),{MESSAGE:Om}=re(),Am=Gr();Mu.exports=Mm(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[Om]=Am(e),t})});var ku=w((w2,Au)=>{"use strict";var km=Ae();function Dm(t,e,r){let i=e.reduce((s,a)=>(s[a]=t[a],delete t[a],s),{}),n=Object.keys(t).reduce((s,a)=>(s[a]=t[a],delete t[a],s),{});return Object.assign(t,i,{[r]:n}),t}function Pm(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}Au.exports=km((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?Dm(t,i,r):e.fillWith?Pm(t,e.fillWith,r):t})});var Pu=w((v2,Du)=>{var cr=1e3,dr=cr*60,pr=dr*60,Yt=pr*24,Cm=Yt*7,qm=Yt*365.25;Du.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Lm(t);if(r==="number"&&isFinite(t))return e.long?Nm(t):jm(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Lm(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]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*qm;case"weeks":case"week":case"w":return r*Cm;case"days":case"day":case"d":return r*Yt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*pr;case"minutes":case"minute":case"mins":case"min":case"m":return r*dr;case"seconds":case"second":case"secs":case"sec":case"s":return r*cr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function jm(t){var e=Math.abs(t);return e>=Yt?Math.round(t/Yt)+"d":e>=pr?Math.round(t/pr)+"h":e>=dr?Math.round(t/dr)+"m":e>=cr?Math.round(t/cr)+"s":t+"ms"}function Nm(t){var e=Math.abs(t);return e>=Yt?ln(t,e,Yt,"day"):e>=pr?ln(t,e,pr,"hour"):e>=dr?ln(t,e,dr,"minute"):e>=cr?ln(t,e,cr,"second"):t+" ms"}function ln(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var qu=w((Yr,Cu)=>{"use strict";var Fm=Ae(),Im=Pu();Cu.exports=Fm(t=>{let e=+new Date;return Yr.diff=e-(Yr.prevTime||e),Yr.prevTime=e,t.ms=`+${Im(Yr.diff)}`,t})});var Nu=w((_2,ju)=>{"use strict";var $m=require("util").inspect,Wm=Ae(),{LEVEL:Bm,MESSAGE:Lu,SPLAT:Um}=re();ju.exports=Wm((t,e={})=>{let r=Object.assign({},t);return delete r[Bm],delete r[Lu],delete r[Um],t[Lu]=$m(r,!1,e.depth||null,e.colorize),t})});var Fu=w((S2,fn)=>{"use strict";var{MESSAGE:zm}=re(),un=class{constructor(e){this.template=e}transform(e){return e[zm]=this.template(e),e}};fn.exports=t=>new un(t);fn.exports.Printf=fn.exports.Format=un});var Wu=w((E2,$u)=>{"use strict";var Hm=Ae(),{MESSAGE:Iu}=re(),Gm=Gr();$u.exports=Hm(t=>{let e=Gm(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Iu]=`${t.level}:${r} ${t.message} ${e}`:t[Iu]=`${t.level}:${r} ${t.message}`,t})});var zu=w((R2,Uu)=>{"use strict";var Ym=require("util"),{SPLAT:Bu}=re(),Vm=/%[scdjifoO%]/g,Km=/%%/g,pa=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[Bu]||e.splat||[],s=i.match(Km),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],c=u.length;if(c)for(let h=0;h<c;h++)Object.assign(e,u[h]);return e.message=Ym.format(i,...n),e}transform(e){let r=e.message,i=e[Bu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(Vm);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,a=s.length;if(a)for(let o=0;o<a;o++)Object.assign(e,s[o]);return e}return n?this._splat(e,n):e}};Uu.exports=t=>new pa(t)});var Gu=w((hn,Hu)=>{(function(t,e){typeof hn=="object"&&typeof Hu<"u"?e(hn):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(hn,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?",i="\\d\\d",n="\\d{3}",s="\\d{4}",a="[^\\s]+",o=/\[([^]*?)\]/gm;function l(S,O){for(var z=[],ye=0,D=S.length;ye<D;ye++)z.push(S[ye].substr(0,O));return z}var u=function(S){return function(O,z){var ye=z[S].map(function(Ne){return Ne.toLowerCase()}),D=ye.indexOf(O.toLowerCase());return D>-1?D:null}};function c(S){for(var O=[],z=1;z<arguments.length;z++)O[z-1]=arguments[z];for(var ye=0,D=O;ye<D.length;ye++){var Ne=D[ye];for(var He in Ne)S[He]=Ne[He]}return S}var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(d,3),y=l(h,3),b={dayNamesShort:y,dayNames:h,monthNamesShort:f,monthNames:d,amPm:["am","pm"],DoFn:function(S){return S+["th","st","nd","rd"][S%10>3?0:(S-S%10!==10?1:0)*S%10]}},_=c({},b),E=function(S){return _=c(_,S)},R=function(S){return S.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},x=function(S,O){for(O===void 0&&(O=2),S=String(S);S.length<O;)S="0"+S;return S},M={D:function(S){return String(S.getDate())},DD:function(S){return x(S.getDate())},Do:function(S,O){return O.DoFn(S.getDate())},d:function(S){return String(S.getDay())},dd:function(S){return x(S.getDay())},ddd:function(S,O){return O.dayNamesShort[S.getDay()]},dddd:function(S,O){return O.dayNames[S.getDay()]},M:function(S){return String(S.getMonth()+1)},MM:function(S){return x(S.getMonth()+1)},MMM:function(S,O){return O.monthNamesShort[S.getMonth()]},MMMM:function(S,O){return O.monthNames[S.getMonth()]},YY:function(S){return x(String(S.getFullYear()),4).substr(2)},YYYY:function(S){return x(S.getFullYear(),4)},h:function(S){return String(S.getHours()%12||12)},hh:function(S){return x(S.getHours()%12||12)},H:function(S){return String(S.getHours())},HH:function(S){return x(S.getHours())},m:function(S){return String(S.getMinutes())},mm:function(S){return x(S.getMinutes())},s:function(S){return String(S.getSeconds())},ss:function(S){return x(S.getSeconds())},S:function(S){return String(Math.round(S.getMilliseconds()/100))},SS:function(S){return x(Math.round(S.getMilliseconds()/10),2)},SSS:function(S){return x(S.getMilliseconds(),3)},a:function(S,O){return S.getHours()<12?O.amPm[0]:O.amPm[1]},A:function(S,O){return S.getHours()<12?O.amPm[0].toUpperCase():O.amPm[1].toUpperCase()},ZZ:function(S){var O=S.getTimezoneOffset();return(O>0?"-":"+")+x(Math.floor(Math.abs(O)/60)*100+Math.abs(O)%60,4)},Z:function(S){var O=S.getTimezoneOffset();return(O>0?"-":"+")+x(Math.floor(Math.abs(O)/60),2)+":"+x(Math.abs(O)%60,2)}},k=function(S){return+S-1},C=[null,r],F=[null,a],q=["isPm",a,function(S,O){var z=S.toLowerCase();return z===O.amPm[0]?0:z===O.amPm[1]?1:null}],U=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var O=(S+"").match(/([+-]|\d\d)/gi);if(O){var z=+O[1]*60+parseInt(O[2],10);return O[0]==="+"?z:-z}return 0}],te={D:["day",r],DD:["day",i],Do:["day",r+a,function(S){return parseInt(S,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(S){var O=new Date,z=+(""+O.getFullYear()).substr(0,2);return+(""+(+S>68?z-1:z)+S)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(S){return+S*100}],SS:["millisecond",i,function(S){return+S*10}],SSS:["millisecond",n],d:C,dd:C,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:q,A:q,ZZ:U,Z:U},K={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"},Se=function(S){return c(K,S)},Ee=function(S,O,z){if(O===void 0&&(O=K.default),z===void 0&&(z={}),typeof S=="number"&&(S=new Date(S)),Object.prototype.toString.call(S)!=="[object Date]"||isNaN(S.getTime()))throw new Error("Invalid Date pass to format");O=K[O]||O;var ye=[];O=O.replace(o,function(Ne,He){return ye.push(He),"@@@"});var D=c(c({},_),z);return O=O.replace(e,function(Ne){return M[Ne](S,D)}),O.replace(/@@@/g,function(){return ye.shift()})};function ft(S,O,z){if(z===void 0&&(z={}),typeof O!="string")throw new Error("Invalid format in fecha parse");if(O=K[O]||O,S.length>1e3)return null;var ye=new Date,D={year:ye.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ne=[],He=[],It=O.replace(o,function(Bt,_t){return He.push(R(_t)),"@@@"}),ur={},wt={};It=R(It).replace(e,function(Bt){var _t=te[Bt],zr=_t[0],Ji=_t[1],Zi=_t[3];if(ur[zr])throw new Error("Invalid format. "+zr+" specified twice in format");return ur[zr]=!0,Zi&&(wt[Zi]=!0),Ne.push(_t),"("+Ji+")"}),Object.keys(wt).forEach(function(Bt){if(!ur[Bt])throw new Error("Invalid format. "+Bt+" is required in specified format")}),It=It.replace(/@@@/g,function(){return He.shift()});var $t=S.match(new RegExp(It,"i"));if(!$t)return null;for(var Vs=c(c({},_),z),De=1;De<$t.length;De++){var Yi=Ne[De-1],Vi=Yi[0],Ki=Yi[2],vt=Ki?Ki($t[De],Vs):+$t[De];if(vt==null)return null;D[Vi]=vt}D.isPm===1&&D.hour!=null&&+D.hour!=12?D.hour=+D.hour+12:D.isPm===0&&+D.hour==12&&(D.hour=0);var fr;if(D.timezoneOffset==null){fr=new Date(D.year,D.month,D.day,D.hour,D.minute,D.second,D.millisecond);for(var Wt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],De=0,Ur=Wt.length;De<Ur;De++)if(ur[Wt[De][0]]&&D[Wt[De][0]]!==fr[Wt[De][1]]())return null}else if(fr=new Date(Date.UTC(D.year,D.month,D.day,D.hour,D.minute-D.timezoneOffset,D.second,D.millisecond)),D.month>11||D.month<0||D.day>31||D.day<1||D.hour>23||D.hour<0||D.minute>59||D.minute<0||D.second>59||D.second<0)return null;return fr}var Ys={format:Ee,parse:ft,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:Se};t.assign=c,t.default=Ys,t.format=Ee,t.parse=ft,t.defaultI18n=b,t.setGlobalDateI18n=E,t.setGlobalDateMasks=Se,Object.defineProperty(t,"__esModule",{value:!0})})});var Vu=w((x2,Yu)=>{"use strict";var Jm=Gu(),Zm=Ae();Yu.exports=Zm((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Jm.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Ju=w((T2,Ku)=>{"use strict";var ga=Zs(),Qm=Ae(),{MESSAGE:ma}=re();Ku.exports=Qm((t,e)=>(e.level!==!1&&(t.level=ga.strip(t.level)),e.message!==!1&&(t.message=ga.strip(String(t.message))),e.raw!==!1&&t[ma]&&(t[ma]=ga.strip(String(t[ma]))),t))});var ba=w(ya=>{"use strict";var Xm=ya.format=Ae();ya.levels=fu();function ce(t,e){Object.defineProperty(Xm,t,{get(){return e()},configurable:!0})}ce("align",function(){return cu()});ce("errors",function(){return gu()});ce("cli",function(){return yu()});ce("combine",function(){return wu()});ce("colorize",function(){return rn()});ce("json",function(){return da()});ce("label",function(){return Tu()});ce("logstash",function(){return Ou()});ce("metadata",function(){return ku()});ce("ms",function(){return qu()});ce("padLevels",function(){return aa()});ce("prettyPrint",function(){return Nu()});ce("printf",function(){return Fu()});ce("simple",function(){return Wu()});ce("splat",function(){return zu()});ce("timestamp",function(){return Vu()});ce("uncolorize",function(){return Ju()})});var wa=w(cn=>{"use strict";var{format:Zu}=require("util");cn.warn={deprecated(t){return()=>{throw new Error(Zu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Zu("{ %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(i=>{t[i]=cn.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=cn.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var Qu=w((A2,ey)=>{ey.exports={name:"winston",description:"A logger for just about everything.",version:"3.17.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.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",mocha:"^10.3.0",nyc:"^17.1.0",rimraf:"5.0.1",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:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var va=w((k2,Xu)=>{Xu.exports=require("util").deprecate});var _a=w((D2,ef)=>{ef.exports=require("stream")});var Ea=w((P2,rf)=>{"use strict";function ty(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Sa,this,t)):process.nextTick(Sa,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(dn,r):(r._writableState.errorEmitted=!0,process.nextTick(tf,r,s)):process.nextTick(tf,r,s):e?(process.nextTick(dn,r),e(s)):process.nextTick(dn,r)}),this)}function tf(t,e){Sa(t,e),dn(t)}function dn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function ry(){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 Sa(t,e){t.emit("error",e)}function iy(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}rf.exports={destroy:ty,undestroy:ry,errorOrDestroy:iy}});var gr=w((C2,af)=>{"use strict";var sf={};function Ie(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,sf[t]=n}function nf(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),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 ny(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function sy(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function ay(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ie("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ie("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&ny(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(sy(t," argument"))n=`The ${t} ${i} ${nf(e,"type")}`;else{let s=ay(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${nf(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ie("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ie("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ie("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ie("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ie("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ie("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ie("ERR_STREAM_WRITE_AFTER_END","write after end");Ie("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ie("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ie("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");af.exports.codes=sf});var Ra=w((q2,of)=>{"use strict";var oy=gr().codes.ERR_INVALID_OPT_VALUE;function ly(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function uy(t,e,r,i){var n=ly(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new oy(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}of.exports={getHighWaterMark:uy}});var lf=w((L2,xa)=>{typeof Object.create=="function"?xa.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xa.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var ht=w((j2,Ma)=>{try{if(Ta=require("util"),typeof Ta.inherits!="function")throw"";Ma.exports=Ta.inherits}catch{Ma.exports=lf()}var Ta});var pf=w((N2,df)=>{"use strict";function uf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function ff(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(r),!0).forEach(function(i){fy(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function fy(t,e,r){return e=cf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,cf(i.key),i)}}function cy(t,e,r){return e&&hf(t.prototype,e),r&&hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function cf(t){var e=dy(t,"string");return typeof e=="symbol"?e:String(e)}function dy(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var py=require("buffer"),pn=py.Buffer,gy=require("util"),Oa=gy.inspect,my=Oa&&Oa.custom||"inspect";function yy(t,e,r){pn.prototype.copy.call(t,e,r)}df.exports=function(){function t(){hy(this,t),this.head=null,this.tail=null,this.length=0}return cy(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++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 i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return pn.alloc(0);for(var i=pn.allocUnsafe(r>>>0),n=this.head,s=0;n;)yy(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=pn.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:my,value:function(r,i){return Oa(this,ff(ff({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var ka=w((Aa,mf)=>{var gn=require("buffer"),et=gn.Buffer;function gf(t,e){for(var r in t)e[r]=t[r]}et.from&&et.alloc&&et.allocUnsafe&&et.allocUnsafeSlow?mf.exports=gn:(gf(gn,Aa),Aa.Buffer=Vt);function Vt(t,e,r){return et(t,e,r)}Vt.prototype=Object.create(et.prototype);gf(et,Vt);Vt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return et(t,e,r)};Vt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=et(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Vt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return et(t)};Vt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return gn.SlowBuffer(t)}});var Ca=w(bf=>{"use strict";var Pa=ka().Buffer,yf=Pa.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 by(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 wy(t){var e=by(t);if(typeof e!="string"&&(Pa.isEncoding===yf||!yf(t)))throw new Error("Unknown encoding: "+t);return e||t}bf.StringDecoder=Vr;function Vr(t){this.encoding=wy(t);var e;switch(this.encoding){case"utf16le":this.text=xy,this.end=Ty,e=4;break;case"utf8":this.fillLast=Sy,e=4;break;case"base64":this.text=My,this.end=Oy,e=3;break;default:this.write=Ay,this.end=ky;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Pa.allocUnsafe(e)}Vr.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||""};Vr.prototype.end=Ry;Vr.prototype.text=Ey;Vr.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 Da(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function vy(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Da(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Da(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Da(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function _y(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 Sy(t){var e=this.lastTotal-this.lastNeed,r=_y(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 Ey(t,e){var r=vy(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Ry(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function xy(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=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 Ty(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 My(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 Oy(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Ay(t){return t.toString(this.encoding)}function ky(t){return t&&t.length?this.write(t):""}});var Sf=w((I2,_f)=>{"use strict";var wf=gr().codes.ERR_STREAM_PREMATURE_CLOSE;function Dy(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Py(){}function Cy(t){return t.setHeader&&typeof t.abort=="function"}function vf(t,e,r){if(typeof e=="function")return vf(t,null,e);e||(e={}),r=Dy(r||Py);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new wf),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new wf),r.call(t,y)},d=function(){t.req.on("finish",o)};return Cy(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",h)}}_f.exports=vf});var Rf=w(($2,Ef)=>{"use strict";var mn;function Et(t,e,r){return e=qy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qy(t){var e=Ly(t,"string");return typeof e=="symbol"?e:String(e)}function Ly(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var jy=Sf(),Rt=Symbol("lastResolve"),Kt=Symbol("lastReject"),Kr=Symbol("error"),yn=Symbol("ended"),Jt=Symbol("lastPromise"),qa=Symbol("handlePromise"),Zt=Symbol("stream");function xt(t,e){return{value:t,done:e}}function Ny(t){var e=t[Rt];if(e!==null){var r=t[Zt].read();r!==null&&(t[Jt]=null,t[Rt]=null,t[Kt]=null,e(xt(r,!1)))}}function Fy(t){process.nextTick(Ny,t)}function Iy(t,e){return function(r,i){t.then(function(){if(e[yn]){r(xt(void 0,!0));return}e[qa](r,i)},i)}}var $y=Object.getPrototypeOf(function(){}),Wy=Object.setPrototypeOf((mn={get stream(){return this[Zt]},next:function(){var e=this,r=this[Kr];if(r!==null)return Promise.reject(r);if(this[yn])return Promise.resolve(xt(void 0,!0));if(this[Zt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Kr]?o(e[Kr]):a(xt(void 0,!0))})});var i=this[Jt],n;if(i)n=new Promise(Iy(i,this));else{var s=this[Zt].read();if(s!==null)return Promise.resolve(xt(s,!1));n=new Promise(this[qa])}return this[Jt]=n,n}},Et(mn,Symbol.asyncIterator,function(){return this}),Et(mn,"return",function(){var e=this;return new Promise(function(r,i){e[Zt].destroy(null,function(n){if(n){i(n);return}r(xt(void 0,!0))})})}),mn),$y),By=function(e){var r,i=Object.create(Wy,(r={},Et(r,Zt,{value:e,writable:!0}),Et(r,Rt,{value:null,writable:!0}),Et(r,Kt,{value:null,writable:!0}),Et(r,Kr,{value:null,writable:!0}),Et(r,yn,{value:e._readableState.endEmitted,writable:!0}),Et(r,qa,{value:function(s,a){var o=i[Zt].read();o?(i[Jt]=null,i[Rt]=null,i[Kt]=null,s(xt(o,!1))):(i[Rt]=s,i[Kt]=a)},writable:!0}),r));return i[Jt]=null,jy(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Kt];s!==null&&(i[Jt]=null,i[Rt]=null,i[Kt]=null,s(n)),i[Kr]=n;return}var a=i[Rt];a!==null&&(i[Jt]=null,i[Rt]=null,i[Kt]=null,a(xt(void 0,!0))),i[yn]=!0}),e.on("readable",Fy.bind(null,i)),i};Ef.exports=By});var Of=w((W2,Mf)=>{"use strict";function xf(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function Uy(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){xf(s,i,n,a,o,"next",l)}function o(l){xf(s,i,n,a,o,"throw",l)}a(void 0)})}}function Tf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function zy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tf(Object(r),!0).forEach(function(i){Hy(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Hy(t,e,r){return e=Gy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gy(t){var e=Yy(t,"string");return typeof e=="symbol"?e:String(e)}function Yy(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Vy=gr().codes.ERR_INVALID_ARG_TYPE;function Ky(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new Vy("iterable",["Iterable"],e);var n=new t(zy({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Uy(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}Mf.exports=Ky});var If=w((U2,Ff)=>{"use strict";Ff.exports=W;var mr;W.ReadableState=Pf;var B2=require("events").EventEmitter,Df=function(e,r){return e.listeners(r).length},Zr=_a(),bn=require("buffer").Buffer,Jy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Zy(t){return bn.from(t)}function Qy(t){return bn.isBuffer(t)||t instanceof Jy}var La=require("util"),L;La&&La.debuglog?L=La.debuglog("stream"):L=function(){};var Xy=pf(),Ba=Ea(),e0=Ra(),t0=e0.getHighWaterMark,wn=gr().codes,r0=wn.ERR_INVALID_ARG_TYPE,i0=wn.ERR_STREAM_PUSH_AFTER_EOF,n0=wn.ERR_METHOD_NOT_IMPLEMENTED,s0=wn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,yr,ja,Na;ht()(W,Zr);var Jr=Ba.errorOrDestroy,Fa=["error","close","destroy","pause","resume"];function a0(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 Pf(t,e,r){mr=mr||Qr(),t=t||{},typeof r!="boolean"&&(r=e instanceof mr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=t0(this,t,"readableHighWaterMark",r),this.buffer=new Xy,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&&(yr||(yr=Ca().StringDecoder),this.decoder=new yr(t.encoding),this.encoding=t.encoding)}function W(t){if(mr=mr||Qr(),!(this instanceof W))return new W(t);var e=this instanceof mr;this._readableState=new Pf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Zr.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=Ba.destroy;W.prototype._undestroy=Ba.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=bn.from(t,e),e=""),i=!0),Cf(this,t,e,!1,i)};W.prototype.unshift=function(t){return Cf(this,t,null,!0,!1)};function Cf(t,e,r,i,n){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,u0(t,s);else{var a;if(n||(a=o0(s,e)),a)Jr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==bn.prototype&&(e=Zy(e)),i)s.endEmitted?Jr(t,new s0):Ia(t,s,e,!0);else if(s.ended)Jr(t,new i0);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ia(t,s,e,!1):Wa(t,s)):Ia(t,s,e,!1)}else i||(s.reading=!1,Wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ia(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&vn(t)),Wa(t,e)}function o0(t,e){var r;return!Qy(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new r0("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){yr||(yr=Ca().StringDecoder);var e=new yr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Af=1073741824;function l0(t){return t>=Af?t=Af:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function kf(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=l0(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){L("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 L("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?$a(this):vn(this),null;if(t=kf(t,e),t===0&&e.ended)return e.length===0&&$a(this),null;var i=e.needReadable;L("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,L("length less than watermark",i)),e.ended||e.reading?(i=!1,L("reading or ended",i)):i&&(L("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=kf(r,e)));var n;return t>0?n=jf(t,e):n=null,n===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&&$a(this)),n!==null&&this.emit("data",n),n};function u0(t,e){if(L("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?vn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,qf(t)))}}function vn(t){var e=t._readableState;L("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(L("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(qf,t))}function qf(t){var e=t._readableState;L("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,Ua(t)}function Wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(f0,t,e))}function f0(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(L("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){Jr(this,new n0("_read()"))};W.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(_,E){L("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){L("onend"),t.end()}var l=h0(r);t.on("drain",l);var u=!1;function c(){L("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){L("ondata");var E=t.write(_);L("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Nf(i.pipes,t)!==-1)&&!u&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){L("onerror",_),b(),t.removeListener("error",d),Df(t,"error")===0&&Jr(t,_)}a0(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){L("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){L("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),t};function h0(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Df(t,"data")&&(r.flowing=!0,Ua(t))}}W.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 i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Nf(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=Zr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,L("on readable",i.length,i.reading),i.length?vn(this):i.reading||process.nextTick(c0,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Zr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Lf,this),r};W.prototype.removeAllListeners=function(t){var e=Zr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Lf,this),e};function Lf(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 c0(t){L("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(L("resume"),t.flowing=!t.readableListening,d0(this,t)),t.paused=!1,this};function d0(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(p0,t,e))}function p0(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Ua(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ua(t){var e=t._readableState;for(L("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(L("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<Fa.length;s++)t.on(Fa[s],this.emit.bind(this,Fa[s]));return this._read=function(a){L("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return ja===void 0&&(ja=Rf()),ja(this)});Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});W._fromList=jf;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function jf(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 $a(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(g0,e,t))}function g0(t,e){if(L("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"&&(W.from=function(t,e){return Na===void 0&&(Na=Of()),Na(W,t,e)});function Nf(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Qr=w((z2,Wf)=>{"use strict";var m0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Wf.exports=tt;var $f=If(),Ha=Ga();ht()(tt,$f);for(za=m0(Ha.prototype),_n=0;_n<za.length;_n++)Sn=za[_n],tt.prototype[Sn]||(tt.prototype[Sn]=Ha.prototype[Sn]);var za,Sn,_n;function tt(t){if(!(this instanceof tt))return new tt(t);$f.call(this,t),Ha.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",y0)))}Object.defineProperty(tt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(tt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(tt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function y0(){this._writableState.ended||process.nextTick(b0,this)}function b0(t){t.end()}Object.defineProperty(tt.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 Ga=w((H2,Yf)=>{"use strict";Yf.exports=G;function Uf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){H0(e,t)}}var br;G.WritableState=ei;var w0={deprecate:va()},zf=_a(),Rn=require("buffer").Buffer,v0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _0(t){return Rn.from(t)}function S0(t){return Rn.isBuffer(t)||t instanceof v0}var Va=Ea(),E0=Ra(),R0=E0.getHighWaterMark,Tt=gr().codes,x0=Tt.ERR_INVALID_ARG_TYPE,T0=Tt.ERR_METHOD_NOT_IMPLEMENTED,M0=Tt.ERR_MULTIPLE_CALLBACK,O0=Tt.ERR_STREAM_CANNOT_PIPE,A0=Tt.ERR_STREAM_DESTROYED,k0=Tt.ERR_STREAM_NULL_VALUES,D0=Tt.ERR_STREAM_WRITE_AFTER_END,P0=Tt.ERR_UNKNOWN_ENCODING,wr=Va.errorOrDestroy;ht()(G,zf);function C0(){}function ei(t,e,r){br=br||Qr(),t=t||{},typeof r!="boolean"&&(r=e instanceof br),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=R0(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){$0(e,n)},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 Uf(this)}ei.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ei.prototype,"buffer",{get:w0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var En;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(En=Function.prototype[Symbol.hasInstance],Object.defineProperty(G,Symbol.hasInstance,{value:function(e){return En.call(this,e)?!0:this!==G?!1:e&&e._writableState instanceof ei}})):En=function(e){return e instanceof this};function G(t){br=br||Qr();var e=this instanceof br;if(!e&&!En.call(G,this))return new G(t);this._writableState=new ei(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)),zf.call(this)}G.prototype.pipe=function(){wr(this,new O0)};function q0(t,e){var r=new D0;wr(t,r),process.nextTick(e,r)}function L0(t,e,r,i){var n;return r===null?n=new k0:typeof r!="string"&&!e.objectMode&&(n=new x0("chunk",["string","Buffer"],r)),n?(wr(t,n),process.nextTick(i,n),!1):!0}G.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&S0(t);return s&&!Rn.isBuffer(t)&&(t=_0(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=C0),i.ending?q0(this,r):(s||L0(this,i,t,r))&&(i.pendingcb++,n=N0(this,i,s,t,e,r)),n};G.prototype.cork=function(){this._writableState.corked++};G.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Hf(this,t))};G.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 P0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(G.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function j0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Rn.from(e,r)),e}Object.defineProperty(G.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N0(t,e,r,i,n,s){if(!r){var a=j0(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Ya(t,e,!1,o,i,n,s);return l}function Ya(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new A0("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function F0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Xr,t,e),t._writableState.errorEmitted=!0,wr(t,i)):(n(i),t._writableState.errorEmitted=!0,wr(t,i),Xr(t,e))}function I0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function $0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new M0;if(I0(r),e)F0(t,r,i,e,n);else{var s=Gf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Hf(t,r),i?process.nextTick(Bf,t,r,s,n):Bf(t,r,s,n)}}function Bf(t,e,r,i){r||W0(t,e),e.pendingcb--,i(),Xr(t,e)}function W0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Hf(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Ya(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Uf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(Ya(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}G.prototype._write=function(t,e,r){r(new T0("_write()"))};G.prototype._writev=null;G.prototype.end=function(t,e,r){var i=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),i.corked&&(i.corked=1,this.uncork()),i.ending||z0(this,i,r),this};Object.defineProperty(G.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Gf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function B0(t,e){t._final(function(r){e.pendingcb--,r&&wr(t,r),e.prefinished=!0,t.emit("prefinish"),Xr(t,e)})}function U0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(B0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Xr(t,e){var r=Gf(e);if(r&&(U0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function z0(t,e,r){e.ending=!0,Xr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function H0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(G.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});G.prototype.destroy=Va.destroy;G.prototype._undestroy=Va.undestroy;G.prototype._destroy=function(t,e){e(t)}});var Ka=w((G2,Jf)=>{"use strict";var G0=require("util"),Vf=Ga(),{LEVEL:Kf}=re(),ti=Jf.exports=function(e={}){Vf.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())})};G0.inherits(ti,Vf);ti.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[Kf]]){if(e&&!this.format)return this.log(e,i);let s,a;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(o){s=o}if(s||!a){if(i(),s)throw s;return}return this.log(a,i)}return this._writableState.sync=!1,i(null)};ti.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(a){n=a}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};ti.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[Kf]])&&(this.handleExceptions||r.exception!==!0))};ti.prototype._nop=function(){}});var Za=w((Y2,Qf)=>{"use strict";var Y0=require("util"),{LEVEL:Ja}=re(),Zf=Ka(),ri=Qf.exports=function(e={}){if(Zf.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(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};Y0.inherits(ri,Zf);ri.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[Ja]])&&this.transport.log(e[Ja],e.message,e,this._nop),i(null)};ri.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ja],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};ri.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
|
+
`))};ri.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var vr=w((V2,Qa)=>{"use strict";Qa.exports=Ka();Qa.exports.LegacyTransportStream=Za()});var th=w((J2,eh)=>{"use strict";var V0=require("os"),{LEVEL:Xf,MESSAGE:_r}=re(),K0=vr();eh.exports=class extends K0{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:V0.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[Xf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[_r]}${this.eol}`):this._consoleError(e[_r]),r&&r();return}else if(this.consoleWarnLevels[e[Xf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[_r]}${this.eol}`):this._consoleWarn(e[_r]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[_r]}${this.eol}`):this._consoleLog(e[_r]),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((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var Tn=w((xn,rh)=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.default=J0;function J0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}rh.exports=xn.default});var nh=w((Mn,ih)=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};ih.exports=Mn.default});var oh=w(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.fallback=sh;Mt.wrap=ah;var Z0=Mt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Q0=Mt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,X0=Mt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function sh(t){setTimeout(t,0)}function ah(t){return(e,...r)=>t(()=>e(...r))}var ii;Z0?ii=queueMicrotask:Q0?ii=setImmediate:X0?ii=process.nextTick:ii=sh;Mt.default=ah(ii)});var ch=w((On,hh)=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.default=sb;var eb=nh(),tb=fh(eb),rb=oh(),ib=fh(rb),nb=Qt();function fh(t){return t&&t.__esModule?t:{default:t}}function sb(t){return(0,nb.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return lh(i,r)}:(0,tb.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return lh(i,r);r(null,i)})}function lh(t,e){return t.then(r=>{uh(e,null,r)},r=>{uh(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function uh(t,e,r){try{t(e,r)}catch(i){(0,ib.default)(n=>{throw n},i)}}hh.exports=On.default});var Qt=w(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.isAsyncIterable=ct.isAsyncGenerator=ct.isAsync=void 0;var ab=ch(),ob=lb(ab);function lb(t){return t&&t.__esModule?t:{default:t}}function dh(t){return t[Symbol.toStringTag]==="AsyncFunction"}function ub(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function fb(t){return typeof t[Symbol.asyncIterator]=="function"}function hb(t){if(typeof t!="function")throw new Error("expected a function");return dh(t)?(0,ob.default)(t):t}ct.default=hb;ct.isAsync=dh;ct.isAsyncGenerator=ub;ct.isAsyncIterable=fb});var Sr=w((An,ph)=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.default=cb;function cb(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(a,...o)=>{if(a)return s(a);n(o.length>1?o:o[0])},t.apply(this,i)})}return r}ph.exports=An.default});var mh=w((kn,gh)=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var db=Tn(),pb=Xa(db),gb=Qt(),mb=Xa(gb),yb=Sr(),bb=Xa(yb);function Xa(t){return t&&t.__esModule?t:{default:t}}kn.default=(0,bb.default)((t,e,r)=>{var i=(0,pb.default)(e)?[]:{};t(e,(n,s,a)=>{(0,mb.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);gh.exports=kn.default});var eo=w((Dn,yh)=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.default=wb;function wb(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}yh.exports=Dn.default});var wh=w((Pn,bh)=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};bh.exports=Pn.default});var Sh=w((Cn,_h)=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=Mb;var vb=Tn(),_b=vh(vb),Sb=wh(),Eb=vh(Sb);function vh(t){return t&&t.__esModule?t:{default:t}}function Rb(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function xb(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Tb(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function Mb(t){if((0,_b.default)(t))return Rb(t);var e=(0,Eb.default)(t);return e?xb(e):Tb(t)}_h.exports=Cn.default});var to=w((qn,Eh)=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.default=Ob;function Ob(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Eh.exports=qn.default});var jn=w((Ln,Rh)=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});var Ab={};Ln.default=Ab;Rh.exports=Ln.default});var Th=w((Nn,xh)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.default=Cb;var kb=jn(),Db=Pb(kb);function Pb(t){return t&&t.__esModule?t:{default:t}}function Cb(t,e,r,i){let n=!1,s=!1,a=!1,o=0,l=0;function u(){o>=e||a||n||(a=!0,t.next().then(({value:d,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(d,l,c),l++,u()}}).catch(h))}function c(d,f){if(o-=1,!s){if(d)return h(d);if(d===!1){n=!0,s=!0;return}if(f===Db.default||n&&o<=0)return n=!0,i(null);u()}}function h(d){s||(a=!1,n=!0,i(d))}u()}xh.exports=Nn.default});var kh=w((Fn,Ah)=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});var qb=eo(),Lb=ni(qb),jb=Sh(),Nb=ni(jb),Fb=to(),Ib=ni(Fb),Mh=Qt(),$b=Th(),Oh=ni($b),Wb=jn(),Bb=ni(Wb);function ni(t){return t&&t.__esModule?t:{default:t}}Fn.default=t=>(e,r,i)=>{if(i=(0,Lb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Mh.isAsyncGenerator)(e))return(0,Oh.default)(e,t,r,i);if((0,Mh.isAsyncIterable)(e))return(0,Oh.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,Nb.default)(e),s=!1,a=!1,o=0,l=!1;function u(h,d){if(!a)if(o-=1,h)s=!0,i(h);else if(h===!1)s=!0,a=!0;else{if(d===Bb.default||s&&o<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;o<t&&!s;){var h=n();if(h===null){s=!0,o<=0&&i(null);return}o+=1,r(h.value,h.key,(0,Ib.default)(u))}l=!1}c()};Ah.exports=Fn.default});var io=w((In,Dh)=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var Ub=kh(),zb=ro(Ub),Hb=Qt(),Gb=ro(Hb),Yb=Sr(),Vb=ro(Yb);function ro(t){return t&&t.__esModule?t:{default:t}}function Kb(t,e,r,i){return(0,zb.default)(e)(t,(0,Gb.default)(r),i)}In.default=(0,Vb.default)(Kb,4);Dh.exports=In.default});var qh=w(($n,Ch)=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});var Jb=io(),Zb=Ph(Jb),Qb=Sr(),Xb=Ph(Qb);function Ph(t){return t&&t.__esModule?t:{default:t}}function ew(t,e,r){return(0,Zb.default)(t,1,e,r)}$n.default=(0,Xb.default)(ew,3);Ch.exports=$n.default});var Nh=w((Wn,jh)=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.default=sw;var tw=mh(),rw=Lh(tw),iw=qh(),nw=Lh(iw);function Lh(t){return t&&t.__esModule?t:{default:t}}function sw(t,e){return(0,rw.default)(nw.default,t,e)}jh.exports=Wn.default});var no=w((X2,Fh)=>{Fh.exports=require("stream")});var zh=w((eR,Uh)=>{"use strict";function Ih(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function $h(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ih(Object(r),!0).forEach(function(i){aw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ih(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function aw(t,e,r){return e=Bh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ow(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Bh(i.key),i)}}function lw(t,e,r){return e&&Wh(t.prototype,e),r&&Wh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bh(t){var e=uw(t,"string");return typeof e=="symbol"?e:String(e)}function uw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fw=require("buffer"),Bn=fw.Buffer,hw=require("util"),so=hw.inspect,cw=so&&so.custom||"inspect";function dw(t,e,r){Bn.prototype.copy.call(t,e,r)}Uh.exports=function(){function t(){ow(this,t),this.head=null,this.tail=null,this.length=0}return lw(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++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 i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Bn.alloc(0);for(var i=Bn.allocUnsafe(r>>>0),n=this.head,s=0;n;)dw(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Bn.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:cw,value:function(r,i){return so(this,$h($h({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var oo=w((tR,Gh)=>{"use strict";function pw(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ao,this,t)):process.nextTick(ao,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(Un,r):(r._writableState.errorEmitted=!0,process.nextTick(Hh,r,s)):process.nextTick(Hh,r,s):e?(process.nextTick(Un,r),e(s)):process.nextTick(Un,r)}),this)}function Hh(t,e){ao(t,e),Un(t)}function Un(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function gw(){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 ao(t,e){t.emit("error",e)}function mw(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Gh.exports={destroy:pw,undestroy:gw,errorOrDestroy:mw}});var Ot=w((rR,Kh)=>{"use strict";var Vh={};function $e(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,Vh[t]=n}function Yh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),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 yw(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function bw(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function ww(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}$e("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);$e("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&yw(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(bw(t," argument"))n=`The ${t} ${i} ${Yh(e,"type")}`;else{let s=ww(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Yh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);$e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");$e("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});$e("ERR_STREAM_PREMATURE_CLOSE","Premature close");$e("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});$e("ERR_MULTIPLE_CALLBACK","Callback called multiple times");$e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");$e("ERR_STREAM_WRITE_AFTER_END","write after end");$e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);$e("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);$e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Kh.exports.codes=Vh});var lo=w((iR,Jh)=>{"use strict";var vw=Ot().codes.ERR_INVALID_OPT_VALUE;function _w(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Sw(t,e,r,i){var n=_w(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new vw(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Jh.exports={getHighWaterMark:Sw}});var ho=w((nR,rc)=>{"use strict";rc.exports=Y;function Qh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Kw(e,t)}}var Er;Y.WritableState=ai;var Ew={deprecate:va()},Xh=no(),Hn=require("buffer").Buffer,Rw=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function xw(t){return Hn.from(t)}function Tw(t){return Hn.isBuffer(t)||t instanceof Rw}var fo=oo(),Mw=lo(),Ow=Mw.getHighWaterMark,At=Ot().codes,Aw=At.ERR_INVALID_ARG_TYPE,kw=At.ERR_METHOD_NOT_IMPLEMENTED,Dw=At.ERR_MULTIPLE_CALLBACK,Pw=At.ERR_STREAM_CANNOT_PIPE,Cw=At.ERR_STREAM_DESTROYED,qw=At.ERR_STREAM_NULL_VALUES,Lw=At.ERR_STREAM_WRITE_AFTER_END,jw=At.ERR_UNKNOWN_ENCODING,Rr=fo.errorOrDestroy;ht()(Y,Xh);function Nw(){}function ai(t,e,r){Er=Er||Xt(),t=t||{},typeof r!="boolean"&&(r=e instanceof Er),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Ow(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){zw(e,n)},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 Qh(this)}ai.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ai.prototype,"buffer",{get:Ew.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var zn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(zn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return zn.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof ai}})):zn=function(e){return e instanceof this};function Y(t){Er=Er||Xt();var e=this instanceof Er;if(!e&&!zn.call(Y,this))return new Y(t);this._writableState=new ai(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)),Xh.call(this)}Y.prototype.pipe=function(){Rr(this,new Pw)};function Fw(t,e){var r=new Lw;Rr(t,r),process.nextTick(e,r)}function Iw(t,e,r,i){var n;return r===null?n=new qw:typeof r!="string"&&!e.objectMode&&(n=new Aw("chunk",["string","Buffer"],r)),n?(Rr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Tw(t);return s&&!Hn.isBuffer(t)&&(t=xw(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Nw),i.ending?Fw(this,r):(s||Iw(this,i,t,r))&&(i.pendingcb++,n=Ww(this,i,s,t,e,r)),n};Y.prototype.cork=function(){this._writableState.corked++};Y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&ec(this,t))};Y.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 jw(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function $w(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Hn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ww(t,e,r,i,n,s){if(!r){var a=$w(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else uo(t,e,!1,o,i,n,s);return l}function uo(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Cw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function Bw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(si,t,e),t._writableState.errorEmitted=!0,Rr(t,i)):(n(i),t._writableState.errorEmitted=!0,Rr(t,i),si(t,e))}function Uw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function zw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Dw;if(Uw(r),e)Bw(t,r,i,e,n);else{var s=tc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&ec(t,r),i?process.nextTick(Zh,t,r,s,n):Zh(t,r,s,n)}}function Zh(t,e,r,i){r||Hw(t,e),e.pendingcb--,i(),si(t,e)}function Hw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function ec(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,uo(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Qh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(uo(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Y.prototype._write=function(t,e,r){r(new kw("_write()"))};Y.prototype._writev=null;Y.prototype.end=function(t,e,r){var i=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),i.corked&&(i.corked=1,this.uncork()),i.ending||Vw(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tc(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Gw(t,e){t._final(function(r){e.pendingcb--,r&&Rr(t,r),e.prefinished=!0,t.emit("prefinish"),si(t,e)})}function Yw(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(Gw,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function si(t,e){var r=tc(e);if(r&&(Yw(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function Vw(t,e,r){e.ending=!0,si(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Kw(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Y.prototype.destroy=fo.destroy;Y.prototype._undestroy=fo.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Xt=w((sR,nc)=>{"use strict";var Jw=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};nc.exports=rt;var ic=go(),po=ho();ht()(rt,ic);for(co=Jw(po.prototype),Gn=0;Gn<co.length;Gn++)Yn=co[Gn],rt.prototype[Yn]||(rt.prototype[Yn]=po.prototype[Yn]);var co,Yn,Gn;function rt(t){if(!(this instanceof rt))return new rt(t);ic.call(this,t),po.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",Zw)))}Object.defineProperty(rt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(rt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(rt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Zw(){this._writableState.ended||process.nextTick(Qw,this)}function Qw(t){t.end()}Object.defineProperty(rt.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 bo=w(ac=>{"use strict";var yo=ka().Buffer,sc=yo.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 Xw(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 ev(t){var e=Xw(t);if(typeof e!="string"&&(yo.isEncoding===sc||!sc(t)))throw new Error("Unknown encoding: "+t);return e||t}ac.StringDecoder=oi;function oi(t){this.encoding=ev(t);var e;switch(this.encoding){case"utf16le":this.text=av,this.end=ov,e=4;break;case"utf8":this.fillLast=iv,e=4;break;case"base64":this.text=lv,this.end=uv,e=3;break;default:this.write=fv,this.end=hv;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=yo.allocUnsafe(e)}oi.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||""};oi.prototype.end=sv;oi.prototype.text=nv;oi.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 mo(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function tv(t,e,r){var i=e.length-1;if(i<r)return 0;var n=mo(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=mo(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=mo(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function rv(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 iv(t){var e=this.lastTotal-this.lastNeed,r=rv(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 nv(t,e){var r=tv(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function sv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function av(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=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 ov(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 lv(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 uv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function fv(t){return t.toString(this.encoding)}function hv(t){return t&&t.length?this.write(t):""}});var Vn=w((oR,uc)=>{"use strict";var oc=Ot().codes.ERR_STREAM_PREMATURE_CLOSE;function cv(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function dv(){}function pv(t){return t.setHeader&&typeof t.abort=="function"}function lc(t,e,r){if(typeof e=="function")return lc(t,null,e);e||(e={}),r=cv(r||dv);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new oc),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new oc),r.call(t,y)},d=function(){t.req.on("finish",o)};return pv(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",h)}}uc.exports=lc});var hc=w((lR,fc)=>{"use strict";var Kn;function kt(t,e,r){return e=gv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gv(t){var e=mv(t,"string");return typeof e=="symbol"?e:String(e)}function mv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yv=Vn(),Dt=Symbol("lastResolve"),er=Symbol("lastReject"),li=Symbol("error"),Jn=Symbol("ended"),tr=Symbol("lastPromise"),wo=Symbol("handlePromise"),rr=Symbol("stream");function Pt(t,e){return{value:t,done:e}}function bv(t){var e=t[Dt];if(e!==null){var r=t[rr].read();r!==null&&(t[tr]=null,t[Dt]=null,t[er]=null,e(Pt(r,!1)))}}function wv(t){process.nextTick(bv,t)}function vv(t,e){return function(r,i){t.then(function(){if(e[Jn]){r(Pt(void 0,!0));return}e[wo](r,i)},i)}}var _v=Object.getPrototypeOf(function(){}),Sv=Object.setPrototypeOf((Kn={get stream(){return this[rr]},next:function(){var e=this,r=this[li];if(r!==null)return Promise.reject(r);if(this[Jn])return Promise.resolve(Pt(void 0,!0));if(this[rr].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[li]?o(e[li]):a(Pt(void 0,!0))})});var i=this[tr],n;if(i)n=new Promise(vv(i,this));else{var s=this[rr].read();if(s!==null)return Promise.resolve(Pt(s,!1));n=new Promise(this[wo])}return this[tr]=n,n}},kt(Kn,Symbol.asyncIterator,function(){return this}),kt(Kn,"return",function(){var e=this;return new Promise(function(r,i){e[rr].destroy(null,function(n){if(n){i(n);return}r(Pt(void 0,!0))})})}),Kn),_v),Ev=function(e){var r,i=Object.create(Sv,(r={},kt(r,rr,{value:e,writable:!0}),kt(r,Dt,{value:null,writable:!0}),kt(r,er,{value:null,writable:!0}),kt(r,li,{value:null,writable:!0}),kt(r,Jn,{value:e._readableState.endEmitted,writable:!0}),kt(r,wo,{value:function(s,a){var o=i[rr].read();o?(i[tr]=null,i[Dt]=null,i[er]=null,s(Pt(o,!1))):(i[Dt]=s,i[er]=a)},writable:!0}),r));return i[tr]=null,yv(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[er];s!==null&&(i[tr]=null,i[Dt]=null,i[er]=null,s(n)),i[li]=n;return}var a=i[Dt];a!==null&&(i[tr]=null,i[Dt]=null,i[er]=null,a(Pt(void 0,!0))),i[Jn]=!0}),e.on("readable",wv.bind(null,i)),i};fc.exports=Ev});var gc=w((uR,pc)=>{"use strict";function cc(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function Rv(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){cc(s,i,n,a,o,"next",l)}function o(l){cc(s,i,n,a,o,"throw",l)}a(void 0)})}}function dc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function xv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dc(Object(r),!0).forEach(function(i){Tv(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Tv(t,e,r){return e=Mv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mv(t){var e=Ov(t,"string");return typeof e=="symbol"?e:String(e)}function Ov(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Av=Ot().codes.ERR_INVALID_ARG_TYPE;function kv(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new Av("iterable",["Iterable"],e);var n=new t(xv({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Rv(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}pc.exports=kv});var go=w((hR,xc)=>{"use strict";xc.exports=B;var xr;B.ReadableState=wc;var fR=require("events").EventEmitter,bc=function(e,r){return e.listeners(r).length},fi=no(),Zn=require("buffer").Buffer,Dv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Pv(t){return Zn.from(t)}function Cv(t){return Zn.isBuffer(t)||t instanceof Dv}var vo=require("util"),j;vo&&vo.debuglog?j=vo.debuglog("stream"):j=function(){};var qv=zh(),Mo=oo(),Lv=lo(),jv=Lv.getHighWaterMark,Qn=Ot().codes,Nv=Qn.ERR_INVALID_ARG_TYPE,Fv=Qn.ERR_STREAM_PUSH_AFTER_EOF,Iv=Qn.ERR_METHOD_NOT_IMPLEMENTED,$v=Qn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Tr,_o,So;ht()(B,fi);var ui=Mo.errorOrDestroy,Eo=["error","close","destroy","pause","resume"];function Wv(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 wc(t,e,r){xr=xr||Xt(),t=t||{},typeof r!="boolean"&&(r=e instanceof xr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=jv(this,t,"readableHighWaterMark",r),this.buffer=new qv,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&&(Tr||(Tr=bo().StringDecoder),this.decoder=new Tr(t.encoding),this.encoding=t.encoding)}function B(t){if(xr=xr||Xt(),!(this instanceof B))return new B(t);var e=this instanceof xr;this._readableState=new wc(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),fi.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});B.prototype.destroy=Mo.destroy;B.prototype._undestroy=Mo.undestroy;B.prototype._destroy=function(t,e){e(t)};B.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Zn.from(t,e),e=""),i=!0),vc(this,t,e,!1,i)};B.prototype.unshift=function(t){return vc(this,t,null,!0,!1)};function vc(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,zv(t,s);else{var a;if(n||(a=Bv(s,e)),a)ui(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Zn.prototype&&(e=Pv(e)),i)s.endEmitted?ui(t,new $v):Ro(t,s,e,!0);else if(s.ended)ui(t,new Fv);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ro(t,s,e,!1):To(t,s)):Ro(t,s,e,!1)}else i||(s.reading=!1,To(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ro(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Xn(t)),To(t,e)}function Bv(t,e){var r;return!Cv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Nv("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){Tr||(Tr=bo().StringDecoder);var e=new Tr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var mc=1073741824;function Uv(t){return t>=mc?t=mc:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function yc(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=Uv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){j("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 j("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?xo(this):Xn(this),null;if(t=yc(t,e),t===0&&e.ended)return e.length===0&&xo(this),null;var i=e.needReadable;j("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,j("length less than watermark",i)),e.ended||e.reading?(i=!1,j("reading or ended",i)):i&&(j("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=yc(r,e)));var n;return t>0?n=Ec(t,e):n=null,n===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&&xo(this)),n!==null&&this.emit("data",n),n};function zv(t,e){if(j("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?Xn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,_c(t)))}}function Xn(t){var e=t._readableState;j("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(_c,t))}function _c(t){var e=t._readableState;j("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,Oo(t)}function To(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Hv,t,e))}function Hv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(j("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){ui(this,new Iv("_read()"))};B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,j("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(_,E){j("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){j("onend"),t.end()}var l=Gv(r);t.on("drain",l);var u=!1;function c(){j("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){j("ondata");var E=t.write(_);j("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Rc(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){j("onerror",_),b(),t.removeListener("error",d),bc(t,"error")===0&&ui(t,_)}Wv(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){j("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function Gv(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bc(t,"data")&&(r.flowing=!0,Oo(t))}}B.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 i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Rc(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};B.prototype.on=function(t,e){var r=fi.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,j("on readable",i.length,i.reading),i.length?Xn(this):i.reading||process.nextTick(Yv,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=fi.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Sc,this),r};B.prototype.removeAllListeners=function(t){var e=fi.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Sc,this),e};function Sc(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 Yv(t){j("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,Vv(this,t)),t.paused=!1,this};function Vv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Kv,t,e))}function Kv(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Oo(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Oo(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(j("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(j("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<Eo.length;s++)t.on(Eo[s],this.emit.bind(this,Eo[s]));return this._read=function(a){j("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return _o===void 0&&(_o=hc()),_o(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=Ec;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ec(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 xo(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Jv,e,t))}function Jv(t,e){if(j("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"&&(B.from=function(t,e){return So===void 0&&(So=gc()),So(B,t,e)});function Rc(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Ao=w((cR,Mc)=>{"use strict";Mc.exports=dt;var es=Ot().codes,Zv=es.ERR_METHOD_NOT_IMPLEMENTED,Qv=es.ERR_MULTIPLE_CALLBACK,Xv=es.ERR_TRANSFORM_ALREADY_TRANSFORMING,e1=es.ERR_TRANSFORM_WITH_LENGTH_0,ts=Xt();ht()(dt,ts);function t1(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Qv);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function dt(t){if(!(this instanceof dt))return new dt(t);ts.call(this,t),this._transformState={afterTransform:t1.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",r1)}function r1(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Tc(t,e,r)}):Tc(this,null,null)}dt.prototype.push=function(t,e){return this._transformState.needTransform=!1,ts.prototype.push.call(this,t,e)};dt.prototype._transform=function(t,e,r){r(new Zv("_transform()"))};dt.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};dt.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};dt.prototype._destroy=function(t,e){ts.prototype._destroy.call(this,t,function(r){e(r)})};function Tc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new e1;if(t._transformState.transforming)throw new Xv;return t.push(null)}});var kc=w((dR,Ac)=>{"use strict";Ac.exports=hi;var Oc=Ao();ht()(hi,Oc);function hi(t){if(!(this instanceof hi))return new hi(t);Oc.call(this,t)}hi.prototype._transform=function(t,e,r){r(null,t)}});var Lc=w((pR,qc)=>{"use strict";var ko;function i1(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Cc=Ot().codes,n1=Cc.ERR_MISSING_ARGS,s1=Cc.ERR_STREAM_DESTROYED;function Dc(t){if(t)throw t}function a1(t){return t.setHeader&&typeof t.abort=="function"}function o1(t,e,r,i){i=i1(i);var n=!1;t.on("close",function(){n=!0}),ko===void 0&&(ko=Vn()),ko(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,a1(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new s1("pipe"))}}}function Pc(t){t()}function l1(t,e){return t.pipe(e)}function u1(t){return!t.length||typeof t[t.length-1]!="function"?Dc:t.pop()}function f1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=u1(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new n1("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return o1(a,l,u,function(c){n||(n=c),c&&s.forEach(Pc),!l&&(s.forEach(Pc),i(n))})});return e.reduce(l1)}qc.exports=f1});var ir=w((We,di)=>{var ci=require("stream");process.env.READABLE_STREAM==="disable"&&ci?(di.exports=ci.Readable,Object.assign(di.exports,ci),di.exports.Stream=ci):(We=di.exports=go(),We.Stream=ci||We,We.Readable=We,We.Writable=ho(),We.Duplex=Xt(),We.Transform=Ao(),We.PassThrough=kc(),We.finished=Vn(),We.pipeline=Lc())});var No=w((gR,Nc)=>{var Mr=[],pi=[],Do=function(){};function Co(t){return~Mr.indexOf(t)?!1:(Mr.push(t),!0)}function qo(t){Do=t}function h1(t){for(var e=[],r=0;r<Mr.length;r++){if(Mr[r].async){e.push(Mr[r]);continue}if(Mr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(a){return a(t)})).then(function(a){n(a.some(Boolean))})}):!1}function Lo(t){return~pi.indexOf(t)?!1:(pi.push(t),!0)}function Po(){Do.apply(Do,arguments)}function jc(t){for(var e=0;e<pi.length;e++)t=pi[e].apply(pi[e],arguments);return t}function jo(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function c1(t){return t.enabled=!1,t.modify=Lo,t.set=qo,t.use=Co,jo(function(){return!1},t)}function d1(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Po.call(Po,t,jc(r,t)),!0}return t.enabled=!0,t.modify=Lo,t.set=qo,t.use=Co,jo(e,t)}Nc.exports=function(e){return e.introduce=jo,e.enabled=h1,e.process=jc,e.modify=Lo,e.write=Po,e.nope=c1,e.yep=d1,e.set=qo,e.use=Co,e}});var Ic=w((mR,Fc)=>{var p1=No(),g1=p1(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)});Fc.exports=g1});var Wc=w((yR,$c)=>{"use strict";$c.exports={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]}});var Uc=w((bR,Bc)=>{Bc.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var Gc=w((wR,Hc)=>{"use strict";var m1=Uc(),y1=Array.prototype.concat,b1=Array.prototype.slice,zc=Hc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];m1(s)?r=y1.call(r,b1.call(s)):r.push(s)}return r};zc.wrap=function(t){return function(){return t(zc(arguments))}}});var Jc=w((vR,Kc)=>{var gi=Wc(),mi=Gc(),Yc=Object.hasOwnProperty,Vc=Object.create(null);for(rs in gi)Yc.call(gi,rs)&&(Vc[gi[rs]]=rs);var rs,Pe=Kc.exports={to:{},get:{}};Pe.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Pe.get.hsl(t),i="hsl";break;case"hwb":r=Pe.get.hwb(t),i="hwb";break;default:r=Pe.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Pe.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],o,l,u;if(o=t.match(r)){for(u=o[2],o=o[1],l=0;l<3;l++){var c=l*2;a[l]=parseInt(o.slice(c,c+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(o=t.match(e)){for(o=o[1],u=o[3],l=0;l<3;l++)a[l]=parseInt(o[l]+o[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(o=t.match(i)){for(l=0;l<3;l++)a[l]=parseInt(o[l+1],0);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else if(o=t.match(n)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(o[l+1])*2.55);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else return(o=t.match(s))?o[1]==="transparent"?[0,0,0,0]:Yc.call(gi,o[1])?(a=gi[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Ct(a[l],0,255);return a[3]=Ct(a[3],0,1),a};Pe.get.hsl=function(t){if(!t)return null;var 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){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Ct(parseFloat(r[2]),0,100),a=Ct(parseFloat(r[3]),0,100),o=Ct(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Pe.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\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){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Ct(parseFloat(r[2]),0,100),a=Ct(parseFloat(r[3]),0,100),o=Ct(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Pe.to.hex=function(){var t=mi(arguments);return"#"+is(t[0])+is(t[1])+is(t[2])+(t[3]<1?is(Math.round(t[3]*255)):"")};Pe.to.rgb=function(){var t=mi(arguments);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]+")"};Pe.to.rgb.percent=function(){var t=mi(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};Pe.to.hsl=function(){var t=mi(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Pe.to.hwb=function(){var t=mi(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Pe.to.keyword=function(t){return Vc[t.slice(0,3)]};function Ct(t,e,r){return Math.min(Math.max(e,t),r)}function is(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var Qc=w((_R,Zc)=>{"use strict";Zc.exports={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]}});var Fo=w((SR,rd)=>{var nr=Qc(),td={};for(ns in nr)nr.hasOwnProperty(ns)&&(td[nr[ns]]=ns);var ns,A=rd.exports={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"},lch:{channels:3,labels:"lch"},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"]}};for(xe in A)if(A.hasOwnProperty(xe)){if(!("channels"in A[xe]))throw new Error("missing channels property: "+xe);if(!("labels"in A[xe]))throw new Error("missing channel labels property: "+xe);if(A[xe].labels.length!==A[xe].channels)throw new Error("channel and label counts mismatch: "+xe);Xc=A[xe].channels,ed=A[xe].labels,delete A[xe].channels,delete A[xe].labels,Object.defineProperty(A[xe],"channels",{value:Xc}),Object.defineProperty(A[xe],"labels",{value:ed})}var Xc,ed,xe;A.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=s-n,o,l,u;return s===n?o=0:e===s?o=(r-i)/a:r===s?o=2+(i-e)/a:i===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),u=(n+s)/2,s===n?l=0:u<=.5?l=a/(s+n):l=a/(2-s-n),[o,l*100,u*100]};A.rgb.hsv=function(t){var e,r,i,n,s,a=t[0]/255,o=t[1]/255,l=t[2]/255,u=Math.max(a,o,l),c=u-Math.min(a,o,l),h=function(d){return(u-d)/6/c+1/2};return c===0?n=s=0:(s=c/u,e=h(a),r=h(o),i=h(l),a===u?n=i-r:o===u?n=1/3+e-i:l===u&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,u*100]};A.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=A.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};A.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n,s,a,o;return o=Math.min(1-e,1-r,1-i),n=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-i-o)/(1-o)||0,[n*100,s*100,a*100,o*100]};function w1(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}A.rgb.keyword=function(t){var e=td[t];if(e)return e;var r=1/0,i;for(var n in nr)if(nr.hasOwnProperty(n)){var s=nr[n],a=w1(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return nr[t]};A.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,a=e*.0193+r*.1192+i*.9505;return[n*100,s*100,a*100]};A.rgb.lab=function(t){var e=A.rgb.xyz(t),r=e[0],i=e[1],n=e[2],s,a,o;return r/=95.047,i/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*i-16,a=500*(r-i),o=200*(i-n),[s,a,o]};A.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,a,o,l;if(r===0)return l=i*255,[l,l,l];i<.5?s=i*(1+r):s=i+r-i*r,n=2*i-s,o=[0,0,0];for(var u=0;u<3;u++)a=e+1/3*-(u-1),a<0&&a++,a>1&&a--,6*a<1?l=n+(s-n)*6*a:2*a<1?l=s:3*a<2?l=n+(s-n)*(2/3-a)*6:l=n,o[u]=l*255;return o};A.hsl.hsv=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01),a,o;return i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s,o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r),[e,a*100,o*100]};A.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),a=255*i*(1-r),o=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,a];case 1:return[o,i,a];case 2:return[a,i,l];case 3:return[a,o,i];case 4:return[l,a,i];case 5:return[i,a,o]}};A.hsv.hsl=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,a,o;return o=(2-r)*i,s=(2-r)*n,a=r*n,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};A.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s,a,o,l;n>1&&(r/=n,i/=n),s=Math.floor(6*e),a=1-i,o=6*e-s,s&1&&(o=1-o),l=r+o*(a-r);var u,c,h;switch(s){default:case 6:case 0:u=a,c=l,h=r;break;case 1:u=l,c=a,h=r;break;case 2:u=r,c=a,h=l;break;case 3:u=r,c=l,h=a;break;case 4:u=l,c=r,h=a;break;case 5:u=a,c=r,h=l;break}return[u*255,c*255,h*255]};A.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s,a,o;return s=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,i*(1-n)+n),[s*255,a*255,o*255]};A.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,a;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,a=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[n*255,s*255,a*255]};A.xyz.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return e/=95.047,r/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=116*r-16,s=500*(e-r),a=200*(r-i),[n,s,a]};A.lab.xyz=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;s=(e+16)/116,n=r/500+s,a=s-i/200;var o=Math.pow(s,3),l=Math.pow(n,3),u=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,n*=95.047,s*=100,a*=108.883,[n,s,a]};A.lab.lch=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return n=Math.atan2(i,r),s=n*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(r*r+i*i),[e,a,s]};A.lch.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return a=i/360*2*Math.PI,n=r*Math.cos(a),s=r*Math.sin(a),[e,n,s]};A.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:A.rgb.hsv(t)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return n===2&&(s+=60),s};A.hsv.ansi16=function(t){return A.rgb.ansi16(A.hsv.rgb(t),t[2])};A.rgb.ansi256=function(t){var e=t[0],r=t[1],i=t[2];if(e===r&&r===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};A.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};A.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,i=Math.floor(t/36)/5*255,n=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[i,n,s]};A.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};A.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var i=parseInt(r,16),n=i>>16&255,s=i>>8&255,a=i&255;return[n,s,a]};A.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),a=n-s,o,l;return a<1?o=s/(1-a):o=0,a<=0?l=0:n===e?l=(r-i)/a%6:n===r?l=2+(i-e)/a:l=4+(e-r)/a+4,l/=6,l%=1,[l*360,a*100,o*100]};A.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1,n=0;return r<.5?i=2*e*r:i=2*e*(1-r),i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};A.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};A.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];var n=[0,0,0],s=e%1*6,a=s%1,o=1-a,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};A.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};A.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,i=r*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};A.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};A.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};A.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};A.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};A.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};A.gray.hsl=A.gray.hsv=function(t){return[0,0,t[0]]};A.gray.hwb=function(t){return[0,100,t[0]]};A.gray.cmyk=function(t){return[0,0,0,t[0]]};A.gray.lab=function(t){return[t[0],0,0]};A.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};A.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var nd=w((ER,id)=>{var ss=Fo();function v1(){for(var t={},e=Object.keys(ss),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function _1(t){var e=v1(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(ss[i]),s=n.length,a=0;a<s;a++){var o=n[a],l=e[o];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(o))}return e}function S1(t,e){return function(r){return e(t(r))}}function E1(t,e){for(var r=[e[t].parent,t],i=ss[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=S1(ss[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}id.exports=function(t){for(var e=_1(t),r={},i=Object.keys(e),n=i.length,s=0;s<n;s++){var a=i[s],o=e[a];o.parent!==null&&(r[a]=E1(a,e))}return r}});var ad=w((RR,sd)=>{var Io=Fo(),R1=nd(),Or={},x1=Object.keys(Io);function T1(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function M1(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var i=t(r);if(typeof i=="object")for(var n=i.length,s=0;s<n;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}x1.forEach(function(t){Or[t]={},Object.defineProperty(Or[t],"channels",{value:Io[t].channels}),Object.defineProperty(Or[t],"labels",{value:Io[t].labels});var e=R1(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];Or[t][i]=M1(n),Or[t][i].raw=T1(n)})});sd.exports=Or});var ud=w((xR,ld)=>{"use strict";var yi=Jc(),Ce=ad(),Bo=[].slice,od=["keyword","gray","hex"],$o={};Object.keys(Ce).forEach(function(t){$o[Bo.call(Ce[t].labels).sort().join("")]=t});var as={};function de(t,e){if(!(this instanceof de))return new de(t,e);if(e&&e in od&&(e=null),e&&!(e in Ce))throw new Error("Unknown model: "+e);var r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof de)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=yi.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Ce[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length){this.model=e||"rgb",i=Ce[this.model].channels;var s=Bo.call(t,0,i);this.color=Wo(s,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;var a=Object.keys(t);"alpha"in t&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var o=a.sort().join("");if(!(o in $o))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=$o[o];var l=Ce[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=Wo(u)}if(as[this.model])for(i=Ce[this.model].channels,r=0;r<i;r++){var c=as[this.model][r];c&&(this.color[r]=c(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}de.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in yi.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return yi.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return yi.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Ce[this.model].channels,r=Ce[this.model].labels,i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new de(this.color.map(A1(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new de(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:V("rgb",0,ne(255)),green:V("rgb",1,ne(255)),blue:V("rgb",2,ne(255)),hue:V(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:V("hsl",1,ne(100)),lightness:V("hsl",2,ne(100)),saturationv:V("hsv",1,ne(100)),value:V("hsv",2,ne(100)),chroma:V("hcg",1,ne(100)),gray:V("hcg",2,ne(100)),white:V("hwb",1,ne(100)),wblack:V("hwb",2,ne(100)),cyan:V("cmyk",0,ne(100)),magenta:V("cmyk",1,ne(100)),yellow:V("cmyk",2,ne(100)),black:V("cmyk",3,ne(100)),x:V("xyz",0,ne(100)),y:V("xyz",1,ne(100)),z:V("xyz",2,ne(100)),l:V("lab",0,ne(100)),a:V("lab",1),b:V("lab",2),keyword:function(t){return arguments.length?new de(t):Ce[this.model].keyword(this.color)},hex:function(t){return arguments.length?new de(t):yi.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var i=t[r]/255;e[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return de.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,a=r.alpha()-i.alpha(),o=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,l=1-o;return de.rgb(o*r.red()+l*i.red(),o*r.green()+l*i.green(),o*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(Ce).forEach(function(t){if(od.indexOf(t)===-1){var e=Ce[t].channels;de.prototype[t]=function(){if(this.model===t)return new de(this);if(arguments.length)return new de(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new de(k1(Ce[this.model][t].raw(this.color)).concat(r),t)},de[t]=function(r){return typeof r=="number"&&(r=Wo(Bo.call(arguments),e)),new de(r,t)}}});function O1(t,e){return Number(t.toFixed(e))}function A1(t){return function(e){return O1(e,t)}}function V(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(as[i]||(as[i]=[]))[e]=r}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function ne(t){return function(e){return Math.max(0,Math.min(t,e))}}function k1(t){return Array.isArray(t)?t:[t]}function Wo(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}ld.exports=de});var hd=w((TR,fd)=>{"use strict";fd.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n}});var gd=w((MR,pd)=>{"use strict";var cd=ud(),dd=hd();pd.exports=function(e,r){var i=e.split(r||":"),n=dd(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=cd(n).mix(cd(dd(i[s+1]))).saturate(1).hex();return n}});var yd=w((OR,md)=>{"use strict";function Ye(t,e){if(e)return new Ye(t).style(e);if(!(this instanceof Ye))return new Ye(t);this.text=t}Ye.prototype.prefix="\x1B[";Ye.prototype.suffix="m";Ye.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),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};Ye.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,a=i/255*5;return this.ansi(n,s,a)};Ye.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),a=Math.round(i);return 16+n*36+s*6+a};Ye.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ye.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};md.exports=Ye});var wd=w((AR,bd)=>{var D1=gd(),P1=yd();bd.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?P1(i+":",D1(i)):i+":";return e[0]=n+" "+e[0],e}});var _d=w((kR,vd)=>{"use strict";vd.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].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 Ed=w((DR,Sd)=>{var C1=_d();Sd.exports=function(e){return function(i){try{return C1(i,e())}catch{}return!1}}});var xd=w((PR,Rd)=>{var q1=Ed();Rd.exports=q1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Md=w((CR,Td)=>{Td.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var Ad=w((qR,Od)=>{var L1=No(),j1=require("tty").isatty(1),os=L1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:j1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});os.modify(wd());os.use(xd());os.set(Md());Od.exports=os});var bi=w((LR,Uo)=>{process.env.NODE_ENV==="production"?Uo.exports=Ic():Uo.exports=Ad()});var Dd=w((jR,kd)=>{"use strict";var zo=require("fs"),{StringDecoder:N1}=require("string_decoder"),{Stream:F1}=ir();function I1(){}kd.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new N1("utf8"),n=new F1,s="",a=0,o=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},zo.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){zo.close(u,I1);return}return zo.read(u,r,0,r.length,a,(h,d)=>{if(h){e?e(h):n.emit("error",h),n.destroy();return}if(!d)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(c,1e3);let f=i.write(r.slice(0,d));e||n.emit("data",f),f=(s+f).split(/\n+/);let y=f.length-1,b=0;for(;b<y;b++)(t.start==null||o>t.start)&&(e?e(null,f[b]):n.emit("line",f[b])),o++;return s=f[y],a+=d,c()})})()}),e?n.destroy:n}});var Ld=w((FR,qd)=>{"use strict";var ke=require("fs"),se=require("path"),Pd=Nh(),$1=require("zlib"),{MESSAGE:W1}=re(),{Stream:B1,PassThrough:Cd}=ir(),U1=vr(),Ve=bi()("winston:file"),z1=require("os"),H1=Dd();qd.exports=class extends U1{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new Cd,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?se.basename(e.filename):"winston.log",this.dirname=e.dirname||se.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=se.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:z1.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())))}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 i=`${e[W1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,Ve("logged %s %s",this._size,i),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+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let a=this._stream.write(i,s.bind(this));return a?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),Ve("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=h(e);let i=se.join(this.dirname,this.filename),n="",s=[],a=0,o=ke.createReadStream(i,{encoding:"utf8"});o.on("error",d=>{if(o.readable&&o.destroy(),!!r)return d.code!=="ENOENT"?r(d):r(null,s)}),o.on("data",d=>{d=(n+d).split(/\n+/);let f=d.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(d[y]),a++;n=d[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(d,f){try{let y=JSON.parse(d);c(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(d){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(d=e.fields.reduce((f,y)=>(f[y]=d[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(d)}function c(d){if(!d||typeof d!="object")return;let f=new Date(d.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==d.level))return!0}function h(d){return d=d||{},d.rows=d.rows||d.limit||10,d.start=d.start||0,d.until=d.until||new Date,typeof d.until!="object"&&(d.until=new Date(d.until)),d.from=d.from||d.until-24*60*60*1e3,typeof d.from!="object"&&(d.from=new Date(d.from)),d.order=d.order||"desc",d}}stream(e={}){let r=se.join(this.dirname,this.filename),i=new B1,n={file:r,start:e.start};return i.destroy=H1(n,(s,a)=>{if(s)return i.emit("error",s);try{i.emit("data",a),a=JSON.parse(a),i.emit("log",a)}catch(o){i.emit("error",o)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);Ve("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(),i=se.join(this.dirname,r);ke.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return Ve("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return Ve(`err ${n.code} ${i}`),e(n);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=se.join(this.dirname,this.filename);Ve("create stream start",r,this.options);let i=ke.createWriteStream(r,this.options).on("error",n=>Ve(n)).on("close",()=>Ve("close",i.path,i.bytesWritten)).on("open",()=>{Ve("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new Cd,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return Ve("create stream ok",r),i}_incFile(e){Ve("_incFile",this.filename);let r=se.extname(this._basename),i=se.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(se.join(this.dirname,`${i}${a}${r}`),se.join(this.dirname,`${i}${a}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),Pd(n,e)}_getFile(){let e=se.extname(this._basename),r=se.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",a=this.zippedArchive?".gz":"",o=`${r}${s}${e}${a}`,l=se.join(this.dirname,o);ke.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let a=this.maxFiles-1;a>1;a--)n.push(function(o,l){let u=`${r}${o-1}${e}${s}`,c=se.join(this.dirname,u);ke.exists(c,h=>{if(!h)return l(null);u=`${r}${o}${e}${s}`,ke.rename(c,se.join(this.dirname,u),l)})}.bind(this,a));Pd(n,()=>{ke.rename(se.join(this.dirname,`${r}${e}${s}`),se.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){ke.access(e,ke.F_OK,n=>{if(n)return i();var s=$1.createGzip(),a=ke.createReadStream(e),o=ke.createWriteStream(r);o.on("finish",()=>{ke.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){ke.existsSync(e)||ke.mkdirSync(e,{recursive:!0})}}});var Nd=w(($R,jd)=>{"use strict";var G1=require("http"),Y1=require("https"),{Stream:V1}=ir(),K1=vr(),{configure:J1}=Gr();jd.exports=class extends K1{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,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,a,o)=>{if(a&&a.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${a.statusCode}`)),s)return r(s);if(typeof o=="string")try{o=JSON.parse(o)}catch(l){return r(l)}r(null,o)})}stream(e={}){let r=new V1;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",a=this._request(e,n,i);return r.destroy=()=>a.destroy(),a.on("data",o=>{o=(s+o).split(/\n+/);let l=o.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(o[u]))}catch(c){r.emit("error",c)}s=o[l]}),a.on("error",o=>r.emit("error",o)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){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,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let a=(this.ssl?Y1:G1).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});a.on("error",r),a.on("response",l=>l.on("end",()=>r(null,l)).resume());let o=J1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Ho=w((WR,Fd)=>{"use strict";var it=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";it.writable=t=>it(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";it.readable=t=>it(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";it.duplex=t=>it.writable(t)&&it.readable(t);it.transform=t=>it.duplex(t)&&typeof t._transform=="function";Fd.exports=it});var $d=w((UR,Id)=>{"use strict";var Z1=Ho(),{MESSAGE:Q1}=re(),X1=require("os"),e_=vr();Id.exports=class extends e_{constructor(e={}){if(super(e),!e.stream||!Z1(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:X1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[Q1]}${this.eol}`),r&&r()}}});var Wd=w(wi=>{"use strict";Object.defineProperty(wi,"Console",{configurable:!0,enumerable:!0,get(){return th()}});Object.defineProperty(wi,"File",{configurable:!0,enumerable:!0,get(){return Ld()}});Object.defineProperty(wi,"Http",{configurable:!0,enumerable:!0,get(){return Nd()}});Object.defineProperty(wi,"Stream",{configurable:!0,enumerable:!0,get(){return $d()}})});var us=w(vi=>{"use strict";var ls=ba(),{configs:Go}=re();vi.cli=ls.levels(Go.cli);vi.npm=ls.levels(Go.npm);vi.syslog=ls.levels(Go.syslog);vi.addColors=ls.levels});var Ud=w((fs,Bd)=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var t_=Tn(),r_=sr(t_),i_=jn(),n_=sr(i_),s_=io(),a_=sr(s_),o_=eo(),l_=sr(o_),u_=to(),f_=sr(u_),h_=Qt(),c_=sr(h_),d_=Sr(),p_=sr(d_);function sr(t){return t&&t.__esModule?t:{default:t}}function g_(t,e,r){r=(0,l_.default)(r);var i=0,n=0,{length:s}=t,a=!1;s===0&&r(null);function o(l,u){l===!1&&(a=!0),a!==!0&&(l?r(l):(++n===s||u===n_.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,f_.default)(o))}function m_(t,e,r){return(0,a_.default)(t,1/0,e,r)}function y_(t,e,r){var i=(0,r_.default)(t)?g_:m_;return i(t,(0,c_.default)(e),r)}fs.default=(0,p_.default)(y_,3);Bd.exports=fs.default});var Hd=w((hs,zd)=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.default=b_;function b_(t){return(e,r,i)=>t(e,i)}zd.exports=hs.default});var ps=w((ds,Gd)=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var w_=Ud(),v_=cs(w_),__=Hd(),S_=cs(__),E_=Qt(),R_=cs(E_),x_=Sr(),T_=cs(x_);function cs(t){return t&&t.__esModule?t:{default:t}}function M_(t,e,r){return(0,v_.default)(t,(0,S_.default)((0,R_.default)(e)),r)}ds.default=(0,T_.default)(M_,3);Gd.exports=ds.default});var Vd=w((GR,Yd)=>{"use strict";var O_=Object.prototype.toString;Yd.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(),i=O_.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var Yo=w((YR,Kd)=>{"use strict";var A_=Vd();Kd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=A_(e),n}});var Vo=w(Si=>{Si.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,a){return a},Error.captureStackTrace(r,t||Si.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};Si.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
+
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var s=null,a=null,o=null,l=null,u=null,c=n[5]==="native";if(n[1]){o=n[1];var h=o.lastIndexOf(".");if(o[h-1]=="."&&h--,h>0){s=o.substr(0,h),a=o.substr(h+1);var d=s.indexOf(".Module");d>0&&(o=o.substr(d+1),s=s.substr(0,d))}l=null}a&&(l=s,u=a),a==="<anonymous>"&&(u=null,o=null);var f={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:c};return e._createParsedCallSite(f)}}).filter(function(i){return!!i})};function _i(t){for(var e in t)this[e]=t[e]}var k_=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],D_=["topLevel","eval","native","constructor"];k_.forEach(function(t){_i.prototype[t]=null,_i.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});D_.forEach(function(t){_i.prototype[t]=!1,_i.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});Si._createParsedCallSite=function(t){return new _i(t)}});var Zd=w((JR,Jd)=>{"use strict";var{Writable:P_}=ir();Jd.exports=class extends P_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,r,i){return e.exception?this.transport.log(e,i):(i(),!0)}}});var Jo=w((QR,ep)=>{"use strict";var Qd=require("os"),C_=ps(),Ko=bi()("winston:exception"),q_=Yo(),Xd=Vo(),L_=Zd();ep.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(i=>this._addHandler(i));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:Qd.loadavg(),uptime:Qd.uptime()}}getTrace(e){return(e?Xd.parse(e):Xd.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new L_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),i=this._getExceptionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),n=!1);function a(){Ko("doExit",n),Ko("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);C_(i,(o,l)=>{let u=q_(l),c=o.transport||o;function h(d){return()=>{Ko(d),u()}}c._ending=!0,c.once("finish",h("finished")),c.once("error",h("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var rp=w((ex,tp)=>{"use strict";var{Writable:j_}=ir();tp.exports=class extends j_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,i){return e.rejection?this.transport.log(e,i):(i(),!0)}}});var Qo=w((rx,sp)=>{"use strict";var ip=require("os"),N_=ps(),Zo=bi()("winston:rejection"),F_=Yo(),np=Vo(),I_=rp();sp.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(i=>this._addHandler(i));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:ip.loadavg(),uptime:ip.uptime()}}getTrace(e){return(e?np.parse(e):np.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new I_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),i=this._getRejectionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),n=!1);function a(){Zo("doExit",n),Zo("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);N_(i,(o,l)=>{let u=F_(l),c=o.transport||o;function h(d){return()=>{Zo(d),u()}}c._ending=!0,c.once("finish",h("finished")),c.once("error",h("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var op=w((ix,ap)=>{"use strict";var Xo=class{constructor(e){let r=gs();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)}};ap.exports=Xo});var gs=w((nx,hp)=>{"use strict";var{Stream:$_,Transform:W_}=ir(),lp=ps(),{LEVEL:nt,SPLAT:up}=re(),fp=Ho(),B_=Jo(),U_=Qo(),z_=Za(),H_=op(),{warn:G_}=wa(),Y_=us(),V_=/%[scdjifoO%]/g,ms=class extends W_{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(i){let n=Object.assign({},e,i);i instanceof Error&&(n.stack=i.stack,n.message=i.message),r.write(n)}}})}configure({silent:e,format:r,defaultMeta:i,levels:n,level:s="info",exitOnError:a=!0,transports:o,colors:l,emitErrs:u,formatters:c,padLevels:h,rewriters:d,stripColors:f,exceptionHandlers:y,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||da()(),this.defaultMeta=i||null,this.levels=n||this.levels||Y_.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new B_(this),this.rejections=new U_(this),this.profilers={},this.exitOnError=a,o&&(o=Array.isArray(o)?o:[o],o.forEach(_=>this.add(_))),l||u||c||h||d||f)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
|
+
`));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=el(this.levels,e);if(r===null)return!1;let i=el(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=el(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[nt]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[nt]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[nt]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(V_))){let a=Object.assign({},this.defaultMeta,n,{[nt]:e,[up]:i,level:e,message:r});return n.message&&(a.message=`${a.message} ${n.message}`),n.stack&&(a.stack=n.stack),n.cause&&(a.cause=n.cause),this.write(a),this}return this.write(Object.assign({},this.defaultMeta,{[nt]:e,[up]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[nt]||(e[nt]=e.level),!this.levels[e[nt]]&&this.levels[e[nt]]!==0&&console.error("[winston] Unknown logger level: %s",e[nt]),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,i()}}_final(e){let r=this.transports.slice();lp(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!fp(e)||e.log.length>2?new z_({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(!fp(e)||e.log.length>2)&&(r=this.transports.filter(i=>i.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(){G_.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let i={},n=Object.assign({},e.query||{});function s(o,l){e.query&&typeof o.formatQuery=="function"&&(e.query=o.formatQuery(n)),o.query(e,(u,c)=>{if(u)return l(u);typeof o.formatResults=="function"&&(c=o.formatResults(c,e.format)),l(null,c)})}function a(o,l){s(o,(u,c)=>{l&&(c=u||c,c&&(i[o.name]=c),l()),l=null})}lp(this.transports.filter(o=>!!o.query),a,()=>r(null,i))}stream(e={}){let r=new $_,i=[];return r._streams=i,r.destroy=()=>{let n=i.length;for(;n--;)i[n].destroy()},this.transports.filter(n=>!!n.stream).forEach(n=>{let s=n.stream(e);s&&(i.push(s),s.on("log",a=>{a.transport=a.transport||[],a.transport.push(n.name),r.emit("log",a)}),s.on("error",a=>{a.transport=a.transport||[],a.transport.push(n.name),r.emit("error",a)}))}),r}startTimer(){return new H_(this)}profile(e,...r){let i=Date.now();if(this.profilers[e]){let n=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=i-n,s.message=s.message||e,this.write(s)}return this.profilers[e]=i,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 i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function el(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(ms.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});hp.exports=ms});var tl=w((sx,cp)=>{"use strict";var{LEVEL:K_}=re(),J_=us(),Z_=gs(),Q_=bi()("winston:create-logger");function X_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}cp.exports=function(t={}){t.levels=t.levels||J_.npm.levels;class e extends Z_{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(Q_('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[a]=n,o=a&&a.message&&a||{message:a};return o.level=o[K_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[X_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var pp=w((ox,dp)=>{"use strict";var eS=tl();dp.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 i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=eS(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}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,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var mp=w(H=>{"use strict";var gp=ba(),{warn:Ei}=wa();H.version=Qu().version;H.transports=Wd();H.config=us();H.addColors=gp.levels;H.format=gp.format;H.createLogger=tl();H.Logger=gs();H.ExceptionHandler=Jo();H.RejectionHandler=Qo();H.Container=pp();H.Transport=vr();H.loggers=new H.Container;var st=H.createLogger();Object.keys(H.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>H[t]=(...e)=>st[t](...e));Object.defineProperty(H,"level",{get(){return st.level},set(t){st.level=t}});Object.defineProperty(H,"exceptions",{get(){return st.exceptions}});Object.defineProperty(H,"rejections",{get(){return st.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return st[t]},set(e){st[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:st.exceptionHandlers,rejectionHandlers:st.rejectionHandlers,transports:st.transports}}});Ei.deprecated(H,"setLevels");Ei.forFunctions(H,"useFormat",["cli"]);Ei.forProperties(H,"useFormat",["padLevels","stripColors"]);Ei.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);Ei.forProperties(H,"deprecated",["emitErrs","levelLength"])});var ws=w((bs,wp)=>{(function(t,e){typeof bs=="object"&&typeof wp<"u"?e(bs):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(bs,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:P,...$}=g,{path:J}=g,Z=J.length===0?T:`At path: ${J.join(".")} -- ${T}`;super(P??Z),P!=null&&(this.cause=Z),Object.assign(this,$),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(p){return i(p)&&typeof p[Symbol.iterator]=="function"}function i(p){return typeof p=="object"&&p!=null}function n(p){return i(p)&&!Array.isArray(p)}function s(p){if(Object.prototype.toString.call(p)!=="[object Object]")return!1;let g=Object.getPrototypeOf(p);return g===null||g===Object.prototype}function a(p){return typeof p=="symbol"?p.toString():typeof p=="string"?JSON.stringify(p):`${p}`}function o(p){let{done:g,value:m}=p.next();return g?void 0:m}function l(p,g,m,v){if(p===!0)return;p===!1?p={}:typeof p=="string"&&(p={message:p});let{path:T,branch:P}=g,{type:$}=m,{refinement:J,message:Z=`Expected a value of type \`${$}\`${J?` with refinement \`${J}\``:""}, but received: \`${a(v)}\``}=p;return{value:v,type:$,refinement:J,key:T[T.length-1],path:T,branch:P,...p,message:Z}}function*u(p,g,m,v){r(p)||(p=[p]);for(let T of p){let P=l(T,g,m,v);P&&(yield P)}}function*c(p,g,m={}){let{path:v=[],branch:T=[p],coerce:P=!1,mask:$=!1}=m,J={path:v,branch:T,mask:$};P&&(p=g.coercer(p,J));let Z="valid";for(let ie of g.validator(p,J))ie.explanation=m.message,Z="not_valid",yield[ie,void 0];for(let[ie,Fe,Wg]of g.entries(p,J)){let Bg=c(Fe,Wg,{path:ie===void 0?v:[...v,ie],branch:ie===void 0?T:[...T,Fe],coerce:P,mask:$,message:m.message});for(let Qi of Bg)Qi[0]?(Z=Qi[0].refinement!=null?"not_refined":"not_valid",yield[Qi[0],void 0]):P&&(Fe=Qi[1],ie===void 0?p=Fe:p instanceof Map?p.set(ie,Fe):p instanceof Set?p.add(Fe):i(p)&&(Fe!==void 0||ie in p)&&(p[ie]=Fe))}if(Z!=="not_valid")for(let ie of g.refiner(p,J))ie.explanation=m.message,Z="not_refined",yield[ie,void 0];Z==="valid"&&(yield[void 0,p])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:P,coercer:$=Z=>Z,entries:J=function*(){}}=g;this.type=m,this.schema=v,this.entries=J,this.coercer=$,T?this.validator=(Z,ie)=>{let Fe=T(Z,ie);return u(Fe,ie,this,Z)}:this.validator=()=>[],P?this.refiner=(Z,ie)=>{let Fe=P(Z,ie);return u(Fe,ie,this,Z)}:this.refiner=()=>[]}assert(g,m){return d(g,this,m)}create(g,m){return f(g,this,m)}is(g){return b(g,this)}mask(g,m){return y(g,this,m)}validate(g,m={}){return _(g,this,m)}}function d(p,g,m){let v=_(p,g,{message:m});if(v[0])throw v[0]}function f(p,g,m){let v=_(p,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function y(p,g,m){let v=_(p,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function b(p,g){return!_(p,g)[0]}function _(p,g,m={}){let v=c(p,g,m),T=o(v);return T[0]?[new e(T[0],function*(){for(let $ of v)$[0]&&(yield $[0])}),void 0]:[void 0,T[1]]}function E(...p){let g=p[0].type==="type",m=p.map(T=>T.schema),v=Object.assign({},...m);return g?vt(v):wt(v)}function R(p,g){return new h({type:p,schema:null,validator:g})}function x(p,g){return new h({...p,refiner:(m,v)=>m===void 0||p.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),p.validator(m,v))}})}function M(p){return new h({type:"dynamic",schema:null,*entries(g,m){yield*p(g,m).entries(g,m)},validator(g,m){return p(g,m).validator(g,m)},coercer(g,m){return p(g,m).coercer(g,m)},refiner(g,m){return p(g,m).refiner(g,m)}})}function k(p){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=p()),yield*g.entries(m,v)},validator(m,v){return g??(g=p()),g.validator(m,v)},coercer(m,v){return g??(g=p()),g.coercer(m,v)},refiner(m,v){return g??(g=p()),g.refiner(m,v)}})}function C(p,g){let{schema:m}=p,v={...m};for(let T of g)delete v[T];switch(p.type){case"type":return vt(v);default:return wt(v)}}function F(p){let g=p instanceof h,m=g?{...p.schema}:{...p};for(let v in m)m[v]=$t(m[v]);return g&&p.type==="type"?vt(m):wt(m)}function q(p,g){let{schema:m}=p,v={};for(let T of g)v[T]=m[T];switch(p.type){case"type":return vt(v);default:return wt(v)}}function U(p,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),R(p,g)}function te(){return R("any",()=>!0)}function K(p){return new h({type:"array",schema:p,*entries(g){if(p&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,p]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${a(g)}`}})}function Se(){return R("bigint",p=>typeof p=="bigint")}function Ee(){return R("boolean",p=>typeof p=="boolean")}function ft(){return R("date",p=>p instanceof Date&&!isNaN(p.getTime())||`Expected a valid \`Date\` object, but received: ${a(p)}`)}function Ys(p){let g={},m=p.map(v=>a(v)).join();for(let v of p)g[v]=v;return new h({type:"enums",schema:g,validator(v){return p.includes(v)||`Expected one of \`${m}\`, but received: ${a(v)}`}})}function S(){return R("func",p=>typeof p=="function"||`Expected a function, but received: ${a(p)}`)}function O(p){return R("instance",g=>g instanceof p||`Expected a \`${p.name}\` instance, but received: ${a(g)}`)}function z(){return R("integer",p=>typeof p=="number"&&!isNaN(p)&&Number.isInteger(p)||`Expected an integer, but received: ${a(p)}`)}function ye(p){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of p)yield*v.entries(g,m)},*validator(g,m){for(let v of p)yield*v.validator(g,m)},*refiner(g,m){for(let v of p)yield*v.refiner(g,m)}})}function D(p){let g=a(p),m=typeof p;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?p:null,validator(v){return v===p||`Expected the literal \`${g}\`, but received: ${a(v)}`}})}function Ne(p,g){return new h({type:"map",schema:null,*entries(m){if(p&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,p],yield[v,T,g]},coercer(m){return m instanceof Map?new Map(m):m},validator(m){return m instanceof Map||`Expected a \`Map\` object, but received: ${a(m)}`}})}function He(){return R("never",()=>!1)}function It(p){return new h({...p,validator:(g,m)=>g===null||p.validator(g,m),refiner:(g,m)=>g===null||p.refiner(g,m)})}function ur(){return R("number",p=>typeof p=="number"&&!isNaN(p)||`Expected a number, but received: ${a(p)}`)}function wt(p){let g=p?Object.keys(p):[],m=He();return new h({type:"object",schema:p||null,*entries(v){if(p&&i(v)){let T=new Set(Object.keys(v));for(let P of g)T.delete(P),yield[P,v[P],p[P]];for(let P of T)yield[P,v[P],m]}},validator(v){return n(v)||`Expected an object, but received: ${a(v)}`},coercer(v,T){if(!n(v))return v;let P={...v};if(T.mask&&p)for(let $ in P)p[$]===void 0&&delete P[$];return P}})}function $t(p){return new h({...p,validator:(g,m)=>g===void 0||p.validator(g,m),refiner:(g,m)=>g===void 0||p.refiner(g,m)})}function Vs(p,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let v in m){let T=m[v];yield[v,v,p],yield[v,T,g]}},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function De(){return R("regexp",p=>p instanceof RegExp)}function Yi(p){return new h({type:"set",schema:null,*entries(g){if(p&&g instanceof Set)for(let m of g)yield[m,m,p]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${a(g)}`}})}function Vi(){return R("string",p=>typeof p=="string"||`Expected a string, but received: ${a(p)}`)}function Ki(p){let g=He();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(p.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],p[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${a(m)}`},coercer(m){return Array.isArray(m)?m.slice():m}})}function vt(p){let g=Object.keys(p);return new h({type:"type",schema:p,*entries(m){if(i(m))for(let v of g)yield[v,m[v],p[v]]},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function fr(p){let g=p.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m,v){for(let T of p){let[P,$]=T.validate(m,{coerce:!0,mask:v.mask});if(!P)return $}return m},validator(m,v){let T=[];for(let P of p){let[...$]=c(m,P,v),[J]=$;if(J[0])for(let[Z]of $)Z&&T.push(Z);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${a(m)}`,...T]}})}function Wt(){return R("unknown",()=>!0)}function Ur(p,g,m){return new h({...p,coercer:(v,T)=>b(v,g)?p.coercer(m(v,T),T):p.coercer(v,T)})}function Bt(p,g,m={}){return Ur(p,Wt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&s(v)&&s(T)){let P={...v},$=!1;for(let J in T)P[J]===void 0&&(P[J]=T[J],$=!0);if($)return P}return v})}function _t(p){return Ur(p,Vi(),g=>g.trim())}function zr(p){return Ut(p,"empty",g=>{let m=Ji(g);return m===0||`Expected an empty ${p.type} but received one with a size of \`${m}\``})}function Ji(p){return p instanceof Map||p instanceof Set?p.size:p.length}function Zi(p,g,m={}){let{exclusive:v}=m;return Ut(p,"max",T=>v?T<g:T<=g||`Expected a ${p.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Ng(p,g,m={}){let{exclusive:v}=m;return Ut(p,"min",T=>v?T>g:T>=g||`Expected a ${p.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Fg(p){return Ut(p,"nonempty",g=>Ji(g)>0||`Expected a nonempty ${p.type} but received an empty one`)}function Ig(p,g){return Ut(p,"pattern",m=>g.test(m)||`Expected a ${p.type} matching \`/${g.source}/\` but received "${m}"`)}function $g(p,g,m=g){let v=`Expected a ${p.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return Ut(p,"size",P=>{if(typeof P=="number"||P instanceof Date)return g<=P&&P<=m||`${v} ${T} but received \`${P}\``;if(P instanceof Map||P instanceof Set){let{size:$}=P;return g<=$&&$<=m||`${v} with a size ${T} but received one with a size of \`${$}\``}else{let{length:$}=P;return g<=$&&$<=m||`${v} with a length ${T} but received one with a length of \`${$}\``}})}function Ut(p,g,m){return new h({...p,*refiner(v,T){yield*p.refiner(v,T);let P=m(v,T),$=u(P,T,p,v);for(let J of $)yield{...J,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=te,t.array=K,t.assert=d,t.assign=E,t.bigint=Se,t.boolean=Ee,t.coerce=Ur,t.create=f,t.date=ft,t.defaulted=Bt,t.define=R,t.deprecated=x,t.dynamic=M,t.empty=zr,t.enums=Ys,t.func=S,t.instance=O,t.integer=z,t.intersection=ye,t.is=b,t.lazy=k,t.literal=D,t.map=Ne,t.mask=y,t.max=Zi,t.min=Ng,t.never=He,t.nonempty=Fg,t.nullable=It,t.number=ur,t.object=wt,t.omit=C,t.optional=$t,t.partial=F,t.pattern=Ig,t.pick=q,t.record=Vs,t.refine=Ut,t.regexp=De,t.set=Yi,t.size=$g,t.string=Vi,t.struct=U,t.trimmed=_t,t.tuple=Ki,t.type=vt,t.union=fr,t.unknown=Wt,t.validate=_})});var Pp=w((xx,Dp)=>{"use strict";Dp.exports=Ap;function Ap(t,e,r){t instanceof RegExp&&(t=Op(t,r)),e instanceof RegExp&&(e=Op(e,r));var i=kp(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function Op(t,e){var r=e.match(t);return r?r[0]:null}Ap.range=kp;function kp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;c>=0&&!o;)c==l?(i.push(c),l=r.indexOf(t,c+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,c+1)),c=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var $p=w((Tx,Ip)=>{var Cp=Pp();Ip.exports=pS;var qp="\0SLASH"+Math.random()+"\0",Lp="\0OPEN"+Math.random()+"\0",il="\0CLOSE"+Math.random()+"\0",jp="\0COMMA"+Math.random()+"\0",Np="\0PERIOD"+Math.random()+"\0";function rl(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function cS(t){return t.split("\\\\").join(qp).split("\\{").join(Lp).split("\\}").join(il).split("\\,").join(jp).split("\\.").join(Np)}function dS(t){return t.split(qp).join("\\").split(Lp).join("{").split(il).join("}").split(jp).join(",").split(Np).join(".")}function Fp(t){if(!t)return[""];var e=[],r=Cp("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=Fp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function pS(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),xi(cS(t),!0).map(dS)):[]}function gS(t){return"{"+t+"}"}function mS(t){return/^-?0\d/.test(t)}function yS(t,e){return t<=e}function bS(t,e){return t>=e}function xi(t,e){var r=[],i=Cp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?xi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<s.length;a++){var o=n+"{"+i.body+"}"+s[a];r.push(o)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),c=l||u,h=i.body.indexOf(",")>=0;if(!c&&!h)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+il+i.post,xi(t)):[t];var d;if(c)d=i.body.split(/\.\./);else if(d=Fp(i.body),d.length===1&&(d=xi(d[0],!1).map(gS),d.length===1))return s.map(function(te){return i.pre+d[0]+te});var f;if(c){var y=rl(d[0]),b=rl(d[1]),_=Math.max(d[0].length,d[1].length),E=d.length==3?Math.abs(rl(d[2])):1,R=yS,x=b<y;x&&(E*=-1,R=bS);var M=d.some(mS);f=[];for(var k=y;R(k,b);k+=E){var C;if(u)C=String.fromCharCode(k),C==="\\"&&(C="");else if(C=String(k),M){var F=_-C.length;if(F>0){var q=new Array(F+1).join("0");k<0?C="-"+q+C.slice(1):C=q+C}}f.push(C)}}else{f=[];for(var U=0;U<d.length;U++)f.push.apply(f,xi(d[U],!1))}for(var U=0;U<f.length;U++)for(var a=0;a<s.length;a++){var o=n+f[U]+s[a];(!e||c||o)&&r.push(o)}}return r}});var Cg=be(require("yargs")),qg=require("yargs/helpers"),me=be(require("node:path")),bt=be(require("node:fs/promises")),Ol=be(require("fs-extra")),Gi=require("pyodide");var yp=be(require("node:path")),bp=be(require("node:fs/promises"));var qt=be(mp()),I=qt.createLogger({transports:[new qt.transports.Console({format:qt.format.combine(qt.format.splat(),qt.format.cli())})]});function Ri(t){process.emitWarning(t,{type:"DeprecationWarning"})}var ys=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){let r=yp.default.join(this.sourceUrl,e);if(this.isRemote){I.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{I.debug(`Reading ${r}`);let i=await bp.default.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;I.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var _p=be(require("node:fs/promises")),Sp=be(ws());var Q=be(ws()),vp=Q.object({entrypoint:Q.string(),embed:Q.defaulted(Q.boolean(),!1),idbfsMountpoints:Q.optional(Q.array(Q.string())),nodeJsWorker:Q.defaulted(Q.boolean(),!1),nodefsMountpoints:Q.optional(Q.record(Q.string(),Q.string()))});function tS(t){let e=Sp.mask(t??{},vp);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Ep(t){let e=tS({...t.packageJsonStliteDesktopField,...t.fallbacks});I.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);I.info(`Dump the manifest file -> ${t.manifestFilePath}`),await _p.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Rp=be(require("node:path")),pe=be(ws());async function xp(t){let{files:e,entrypoint:r}=rS(t),i=await iS(t),n=await nS(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function rS(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){Ri("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&Ri("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return pe.assert(n,pe.string(),"The `stlite.desktop.entrypoint` field must be a string."),pe.assert(i,pe.array(pe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function iS(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;pe.assert(i,pe.optional(pe.array(pe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(Ri("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function nS(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;pe.assert(n,pe.optional(pe.array(pe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Rp.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(Ri("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),a=i),[...s??[],...a]}var sS="[",aS="(<=>!~",oS=";",lS="@",uS=new RegExp(`[${sS+aS+oS+lS}]`);function fS(t){return t.split(uS)[0].trim()}function Tp(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>fS(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}var hS=/\s#.*$/;function Mp(t){return t.split(`
|
|
33
|
+
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(hS,"")).map(e=>e.trim()).filter(e=>e!=="")}var Vp=be($p(),1);var Ti=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var wS={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Mi=t=>t.replace(/[[\]\\-]/g,"\\$&"),vS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Wp=t=>t.join(""),Bp=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,a=!1,o=!1,l=!1,u=!1,c=r,h="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){c=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[_,[E,R,x]]of Object.entries(wS))if(t.startsWith(_,s)){if(h)return["$.",!1,t.length-r,!0];s+=_.length,x?n.push(E):i.push(E),o=o||R;continue e}}if(l=!1,h){b>h?i.push(Mi(h)+"-"+Mi(b)):b===h&&i.push(Mi(b)),h="",s++;continue}if(t.startsWith("-]",s+1)){i.push(Mi(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=b,s+=2;continue}i.push(Mi(b)),s++}if(c<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[vS(b),!1,c-r,!1]}let d="["+(u?"^":"")+Wp(i)+"]",f="["+(u?"":"^")+Wp(n)+"]";return[i.length&&n.length?"("+d+"|"+f+")":i.length?d:f,o,c-r,!0]};var Ke=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var _S=new Set(["!","?","+","*","@"]),Up=t=>_S.has(t),SS="(?!(?:^|/)\\.\\.?(?:$|/))",vs="(?!\\.)",ES=new Set(["[","."]),RS=new Set(["..","."]),xS=new Set("().*{}+?[]^$\\!"),TS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),nl="[^/]",zp=nl+"*?",Hp=nl+"+?",Ar=class t{type;#e;#t;#s=!1;#i=[];#a;#v;#u;#h=!1;#o;#l;#n=!1;constructor(e,r,i={}){this.type=e,e&&(this.#t=!0),this.#a=r,this.#e=this.#a?this.#a.#e:this,this.#o=this.#e===this?i:this.#e.#o,this.#u=this.#e===this?[]:this.#e.#u,e==="!"&&!this.#e.#h&&this.#u.push(this),this.#v=this.#a?this.#a.#i.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#l=this.#i.map(e=>String(e)).join("")}#m(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let r=e,i=r.#a;for(;i;){for(let n=r.#v+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}r=i,i=r.#a}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#a===this))throw new Error("invalid part: "+r);this.#i.push(r)}}toJSON(){let e=this.type===null?this.#i.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#i.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#a?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#a?.isStart())return!1;if(this.#v===0)return!0;let e=this.#a;for(let r=0;r<this.#v;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#a?.type==="!")return!0;if(!this.#a?.isEnd())return!1;if(!this.type)return this.#a?.isEnd();let e=this.#a?this.#a.#i.length:0;return this.#v===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#i)r.copyIn(i);return r}static#y(e,r,i,n){let s=!1,a=!1,o=-1,l=!1;if(r.type===null){let f=i,y="";for(;f<e.length;){let b=e.charAt(f++);if(s||b==="\\"){s=!s,y+=b;continue}if(a){f===o+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(f===o+2&&l)&&(a=!1),y+=b;continue}else if(b==="["){a=!0,o=f,l=!1,y+=b;continue}if(!n.noext&&Up(b)&&e.charAt(f)==="("){r.push(y),y="";let _=new t(b,r);f=t.#y(e,_,f,n),r.push(_);continue}y+=b}return r.push(y),f}let u=i+1,c=new t(null,r),h=[],d="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,d+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),d+=f;continue}else if(f==="["){a=!0,o=u,l=!1,d+=f;continue}if(Up(f)&&e.charAt(u)==="("){c.push(d),d="";let y=new t(f,c);c.push(y),u=t.#y(e,y,u,n);continue}if(f==="|"){c.push(d),d="",h.push(c),c=new t(null,r);continue}if(f===")")return d===""&&r.#i.length===0&&(r.#n=!0),c.push(d),d="",r.push(...h,c),u;d+=f}return r.type=null,r.#t=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#y(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#t||this.#o.nocase&&!this.#o.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#o.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}get options(){return this.#o}toRegExpSource(e){let r=e??!!this.#o.dot;if(this.#e===this&&this.#m(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,_,E]=typeof f=="string"?t.#c(f,this.#t,l):f.toRegExpSource(e);return this.#t=this.#t||_,this.#s=this.#s||E,y}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&RS.has(this.#i[0]))){let y=ES,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),_=!r&&!e&&y.has(u.charAt(0));c=b?SS:_?vs:""}let h="";return this.isEnd()&&this.#e.#h&&this.#a?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,Ke(u),this.#t=!!this.#t,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#d(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#t=void 0,[l,Ke(this.toString()),!1,!1]}let a=!i||e||r||!vs?"":this.#d(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#n)o=(this.isStart()&&!r?vs:"")+Hp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?vs:"")+zp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,Ke(s),this.#t=!!this.#t,this.#s]}#d(e){return this.#i.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,a]=r.toRegExpSource(e);return this.#s=this.#s||a,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#c(e,r,i=!1){let n=!1,s="",a=!1;for(let o=0;o<e.length;o++){let l=e.charAt(o);if(n){n=!1,s+=(xS.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,h,d]=Bp(e,o);if(h){s+=u,a=a||c,o+=h-1,r=r||d;continue}}if(l==="*"){i&&e==="*"?s+=Hp:s+=zp,r=!0;continue}if(l==="?"){s+=nl,r=!0;continue}s+=TS(l)}return[s,Ke(e),!!r,a]}};var kr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Te=(t,e,r={})=>(Ti(e),!r.nocomment&&e.charAt(0)==="#"?!1:new qe(e,r).match(t)),MS=/^\*+([^+@!?\*\[\(]*)$/,OS=t=>e=>!e.startsWith(".")&&e.endsWith(t),AS=t=>e=>e.endsWith(t),kS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),DS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),PS=/^\*+\.\*+$/,CS=t=>!t.startsWith(".")&&t.includes("."),qS=t=>t!=="."&&t!==".."&&t.includes("."),LS=/^\.\*+$/,jS=t=>t!=="."&&t!==".."&&t.startsWith("."),NS=/^\*+$/,FS=t=>t.length!==0&&!t.startsWith("."),IS=t=>t.length!==0&&t!=="."&&t!=="..",$S=/^\?+([^+@!?\*\[\(]*)?$/,WS=([t,e=""])=>{let r=Kp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},BS=([t,e=""])=>{let r=Jp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},US=([t,e=""])=>{let r=Jp([t]);return e?i=>r(i)&&i.endsWith(e):r},zS=([t,e=""])=>{let r=Kp([t]);return e?i=>r(i)&&i.endsWith(e):r},Kp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},Jp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Zp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Gp={win32:{sep:"\\"},posix:{sep:"/"}},HS=Zp==="win32"?Gp.win32.sep:Gp.posix.sep;Te.sep=HS;var ge=Symbol("globstar **");Te.GLOBSTAR=ge;var GS="[^/]",YS=GS+"*?",VS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",KS="(?:(?!(?:\\/|^)\\.).)*?",JS=(t,e={})=>r=>Te(r,t,e);Te.filter=JS;var Be=(t,e={})=>Object.assign({},t,e),ZS=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Te;let e=Te;return Object.assign((i,n,s={})=>e(i,n,Be(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Be(t,s))}static defaults(n){return e.defaults(Be(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Be(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Be(t,s))}},unescape:(i,n={})=>e.unescape(i,Be(t,n)),escape:(i,n={})=>e.escape(i,Be(t,n)),filter:(i,n={})=>e.filter(i,Be(t,n)),defaults:i=>e.defaults(Be(t,i)),makeRe:(i,n={})=>e.makeRe(i,Be(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Be(t,n)),match:(i,n,s={})=>e.match(i,n,Be(t,s)),sep:e.sep,GLOBSTAR:ge})};Te.defaults=ZS;var Qp=(t,e={})=>(Ti(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Vp.default)(t));Te.braceExpand=Qp;var QS=(t,e={})=>new qe(t,e).makeRe();Te.makeRe=QS;var XS=(t,e,r={})=>{let i=new qe(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};Te.match=XS;var Yp=/[?*]|[+@!]\(.*?\)|\[|\]/,eE=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){Ti(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Zp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Yp.test(s[2]))&&!Yp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(c=>this.parse(c))];if(u)return[s[0],...s.slice(1).map(c=>this.parse(c))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let a=n;for(;i[a+1]==="**";)a++;a>n&&i.splice(n+1,a-n);let o=i[n+1],l=i[n+2],u=i[n+3];if(o!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let o=i[a];a===1&&o===""&&i[0]===""||(o==="."||o==="")&&(r=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let a=i[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);if(n){e[r]=[],e[i]=n;break}}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,a=[],o="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])a.push(o==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])a.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])a.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(r[s]),n++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),_=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),R=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),x=_?3:b?0:void 0,M=R?3:E?0:void 0;if(typeof x=="number"&&typeof M=="number"){let[k,C]=[e[x],r[M]];k.toLowerCase()===C.toLowerCase()&&(r[M]=k,M>x?r=r.slice(M):x>M&&(e=e.slice(x)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,o=0,l=e.length,u=r.length;a<l&&o<u;a++,o++){this.debug("matchOne loop");var c=r[o],h=e[a];if(this.debug(r,c,h),c===!1)return!1;if(c===ge){this.debug("GLOBSTAR",[r,c,h]);var d=a,f=o+1;if(f===u){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;d<l;){var y=e[d];if(this.debug(`
|
|
34
34
|
globstar while`,e,d,r,f,y),this.matchOne(e.slice(d),r.slice(f),i))return this.debug("globstar found match!",d,l,y),!0;if(y==="."||y===".."||!n.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,d,r,f);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(i&&(this.debug(`
|
|
35
|
-
>>> no match, partial?`,e,d,r,f),d===l))}let b;if(typeof c=="string"?(b=h===c,this.debug("string match",c,h,b)):(b=c.test(h),this.debug("pattern match",c,h,b)),!b)return!1}if(a===l&&o===u)return!0;if(a===l)return i;if(o===u)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Op(this.pattern,this.options)}parse(e){hi(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(fS))?n=r.dot?cS:hS:(i=e.match(eS))?n=(r.nocase?r.dot?nS:iS:r.dot?rS:tS)(i[1]):(i=e.match(dS))?n=(r.nocase?r.dot?gS:pS:r.dot?mS:yS)(i):(i=e.match(sS))?n=r.dot?oS:aS:(i=e.match(lS))&&(n=uS);let s=br.fromGlob(e,this.options).toMMPattern();return n?Object.assign(s,{test:n}):s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?vS:r.dot?_S:SS,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(c=>{if(c instanceof RegExp)for(let h of c.flags.split(""))n.add(h);return typeof c=="string"?OS(c):c===he?he:c._src});return u.forEach((c,h)=>{let d=u[h+1],f=u[h-1];c!==he||f===he||(f===void 0?d!==void 0&&d!==he?u[h+1]="(?:\\/|"+i+"\\/)?"+d:u[h]=i:d===void 0?u[h-1]=f+"(?:\\/|"+i+")?":d!==he&&(u[h-1]=f+"(?:\\/|\\/"+i+"\\/)"+d,u[h+1]=he))}),u.filter(c=>c!==he).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return _e.defaults(e).Minimatch}};_e.AST=br;_e.Minimatch=Me;_e.escape=wr;_e.unescape=Be;var vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ap=new Set,Io=typeof process=="object"&&process?process:{},kp=(t,e,r,i)=>{typeof Io.emitWarning=="function"?Io.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},ss=globalThis.AbortController,Mp=globalThis.AbortSignal;if(typeof ss>"u"){Mp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},ss=class{constructor(){e()}signal=new Mp;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=Io.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,kp("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var MS=t=>!Ap.has(t),ox=Symbol("type"),xt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Pp=t=>xt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},$o=class t{heap;length;static#e=!1;static create(e){let r=Pp(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},di=class t{#e;#r;#s;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#l;#a;#t;#g;#y;#d;#c;#v;#m;#x;#T;#_;#w;#M;#p;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#_,sizes:e.#x,keyMap:e.#l,keyList:e.#a,valList:e.#t,next:e.#g,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#v,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#C(r,i,n,s),moveToTail:r=>e.#q(r),indexes:r=>e.#R(r),rindexes:r=>e.#A(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#o}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:c,noDisposeOnSet:h,noUpdateTTL:d,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:_,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=e;if(r!==0&&!xt(r))throw new TypeError("max option must be a nonnegative integer");let q=r?Pp(r):Array;if(!q)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=f,this.maxEntrySize=y||this.#r,this.sizeCalculation=b,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(_!==void 0&&typeof _!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=_,this.#M=!!_,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#g=new q(r),this.#y=new q(r),this.#d=0,this.#c=0,this.#v=$o.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof c=="function"?(this.#i=c,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#w=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#r!==0&&!xt(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!xt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=xt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!xt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#e===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){let F="LRU_CACHE_UNBOUNDED";MS(F)&&(Ap.add(F),kp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,t))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#k(){let e=new _r(this.#e),r=new _r(this.#e);this.#_=e,this.#T=r,this.#n=(s,a,o=vr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.delete(this.#a[s])},a+1);l.unref&&l.unref()}},this.#O=s=>{r[s]=e[s]!==0?vr.now():0},this.#S=(s,a)=>{if(e[a]){let o=e[a],l=r[a];if(!o||!l)return;s.ttl=o,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=o-u}};let i=0,n=()=>{let s=vr.now();if(this.ttlResolution>0){i=s;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{let a=this.#l.get(s);if(a===void 0)return 0;let o=e[a],l=r[a];if(!o||!l)return 1/0;let u=(i||n())-l;return o-u},this.#b=s=>{let a=r[s],o=e[s];return!!o&&!!a&&(i||n())-a>o}}#O=()=>{};#S=()=>{};#n=()=>{};#b=()=>!1;#P(){let e=new _r(this.#e);this.#h=0,this.#x=e,this.#E=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#f(i))return 0;if(!xt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!xt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#j=(r,i,n)=>{if(e[r]=i,this.#r){let s=this.#r-e[r];for(;this.#h>s;)this.#D(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#E=e=>{};#j=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#A({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#g[r]}#N(e){return e!==void 0&&this.#l.get(this.#a[e])===e}*entries(){for(let e of this.#R())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*rentries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*keys(){for(let e of this.#R()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#A()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*values(){for(let e of this.#R())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#a[i],this))return this.get(this.#a[i],r)}}forEach(e,r=this){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}rforEach(e,r=this){for(let i of this.#A()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}purgeStale(){let e=!1;for(let r of this.#A({allowStale:!0}))this.#b(r)&&(this.delete(this.#a[r]),e=!0);return e}info(e){let r=this.#l.get(e);if(r===void 0)return;let i=this.#t[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#_&&this.#T){let a=this.#_[r],o=this.#T[r];if(a&&o){let l=a-(vr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#x&&(s.size=this.#x[r]),s}dump(){let e=[];for(let r of this.#R({allowStale:!0})){let i=this.#a[r],n=this.#t[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#_&&this.#T){a.ttl=this.#_[r];let o=vr.now()-this.#T[r];a.start=Math.floor(Date.now()-o)}this.#x&&(a.size=this.#x[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=vr.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,c=this.#L(e,r,i.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let h=this.#u===0?void 0:this.#l.get(e);if(h===void 0)h=this.#u===0?this.#c:this.#v.length!==0?this.#v.pop():this.#u===this.#e?this.#D(!1):this.#u,this.#a[h]=e,this.#t[h]=r,this.#l.set(e,h),this.#g[this.#c]=h,this.#y[h]=this.#c,this.#c=h,this.#u++,this.#j(h,c,l),l&&(l.set="add"),u=!1;else{this.#q(h);let d=this.#t[h];if(r!==d){if(this.#M&&this.#f(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!a&&(this.#w&&this.#s?.(f,e,"set"),this.#p&&this.#m?.push([f,e,"set"]))}else a||(this.#w&&this.#s?.(d,e,"set"),this.#p&&this.#m?.push([d,e,"set"]));if(this.#E(h),this.#j(h,c,l),this.#t[h]=r,l){l.set="replace";let f=d&&this.#f(d)?d.__staleWhileFetching:d;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#_&&this.#k(),this.#_&&(u||this.#n(h,n,s),l&&this.#S(l,h)),!a&&this.#p&&this.#m){let d=this.#m,f;for(;f=d?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#t[this.#d];if(this.#D(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}}#D(e){let r=this.#d,i=this.#a[r],n=this.#t[r];return this.#M&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,i,"evict"),this.#p&&this.#m?.push([n,i,"evict"])),this.#E(r),e&&(this.#a[r]=void 0,this.#t[r]=void 0,this.#v.push(r)),this.#u===1?(this.#d=this.#c=0,this.#v.length=0):this.#d=this.#g[r],this.#l.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#l.get(e);if(s!==void 0){let a=this.#t[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#S(n,s));else return i&&this.#O(s),n&&(n.has="hit",this.#S(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#l.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#t[n];return this.#f(s)?s.__staleWhileFetching:s}#C(e,r,i,n){let s=r===void 0?void 0:this.#t[r];if(this.#f(s))return s;let a=new ss,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,_=!1)=>{let{aborted:E}=a.signal,R=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(E&&!_?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,R&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),E&&!R&&!_)return h(a.signal.reason);let x=f;return this.#t[r]===f&&(b===void 0?x.__staleWhileFetching?this.#t[r]=x.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},c=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),h(b)),h=b=>{let{aborted:_}=a.signal,E=_&&i.allowStaleOnFetchAbort,R=E||i.allowStaleOnFetchRejection,x=R||i.noDeleteOnFetchRejection,O=f;if(this.#t[r]===f&&(!x||O.__staleWhileFetching===void 0?this.delete(e):E||(this.#t[r]=O.__staleWhileFetching)),R)return i.status&&O.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),O.__staleWhileFetching;if(O.__returned===O)throw b},d=(b,_)=>{let E=this.#o?.(e,s,l);E&&E instanceof Promise&&E.then(R=>b(R===void 0?void 0:R),_),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=R=>u(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(d).then(u,c),y=Object.assign(f,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,y,{...l.options,status:void 0}),r=this.#l.get(e)):this.#t[r]=y,y}#f(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof ss}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:_=!1,status:E,signal:R}=r;if(!this.#M)return E&&(E.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:E});let x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:E,signal:R},O=this.#l.get(e);if(O===void 0){E&&(E.fetch="miss");let k=this.#C(e,O,x,b);return k.__returned=k}else{let k=this.#t[O];if(this.#f(k)){let ee=i&&k.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",ee&&(E.returnedStale=!0)),ee?k.__staleWhileFetching:k.__returned=k}let q=this.#b(O);if(!_&&!q)return E&&(E.fetch="hit"),this.#q(O),n&&this.#O(O),E&&this.#S(E,O),k;let F=this.#C(e,O,x,b),U=F.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=q?"stale":"refresh",U&&q&&(E.returnedStale=!0)),U?F.__staleWhileFetching:F.__returned=F}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#l.get(e);if(o!==void 0){let l=this.#t[o],u=this.#f(l);return a&&this.#S(a,o),this.#b(o)?(a&&(a.get="stale"),u?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#q(o),n&&this.#O(o),l))}else a&&(a.get="miss")}#F(e,r){this.#y[r]=e,this.#g[e]=r}#q(e){e!==this.#c&&(e===this.#d?this.#d=this.#g[e]:this.#F(this.#y[e],this.#g[e]),this.#F(this.#c,e),this.#c=e)}delete(e){let r=!1;if(this.#u!==0){let i=this.#l.get(e);if(i!==void 0)if(r=!0,this.#u===1)this.clear();else{this.#E(i);let n=this.#t[i];if(this.#f(n)?n.__abortController.abort(new Error("deleted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,e,"delete"),this.#p&&this.#m?.push([n,e,"delete"])),this.#l.delete(e),this.#a[i]=void 0,this.#t[i]=void 0,i===this.#c)this.#c=this.#y[i];else if(i===this.#d)this.#d=this.#g[i];else{let s=this.#y[i];this.#g[s]=this.#g[i];let a=this.#g[i];this.#y[a]=this.#y[i]}this.#u--,this.#v.push(i)}}if(this.#p&&this.#m?.length){let i=this.#m,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){for(let e of this.#A({allowStale:!0})){let r=this.#t[e];if(this.#f(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#w&&this.#s?.(r,i,"delete"),this.#p&&this.#m?.push([r,i,"delete"])}}if(this.#l.clear(),this.#t.fill(void 0),this.#a.fill(void 0),this.#_&&this.#T&&(this.#_.fill(0),this.#T.fill(0)),this.#x&&this.#x.fill(0),this.#d=0,this.#c=0,this.#v.length=0,this.#h=0,this.#u=0,this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}};var Rr=require("path"),Wp=require("url"),FS=pe(require("fs"),1),et=require("fs"),Mt=require("fs/promises");var cs=require("events"),Yo=pe(require("stream"),1),Lp=require("string_decoder"),Dp=typeof process=="object"&&process?process:{stdout:null,stderr:null},AS=t=>!!t&&typeof t=="object"&&(t instanceof Ot||t instanceof Yo.default||kS(t)||PS(t)),kS=t=>!!t&&typeof t=="object"&&t instanceof cs.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Yo.default.Writable.prototype.pipe,PS=t=>!!t&&typeof t=="object"&&t instanceof cs.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",at=Symbol("EOF"),ot=Symbol("maybeEmitEnd"),Tt=Symbol("emittedEnd"),as=Symbol("emittingEnd"),pi=Symbol("emittedError"),os=Symbol("closed"),qp=Symbol("read"),ls=Symbol("flush"),Cp=Symbol("flushChunk"),Ue=Symbol("encoding"),Sr=Symbol("decoder"),se=Symbol("flowing"),gi=Symbol("paused"),Er=Symbol("resume"),ae=Symbol("buffer"),Se=Symbol("pipes"),oe=Symbol("bufferLength"),Wo=Symbol("bufferPush"),us=Symbol("bufferShift"),ge=Symbol("objectMode"),X=Symbol("destroyed"),Bo=Symbol("error"),Uo=Symbol("emitData"),jp=Symbol("emitEnd"),zo=Symbol("emitEnd2"),Qe=Symbol("async"),Ho=Symbol("abort"),fs=Symbol("aborted"),mi=Symbol("signal"),Jt=Symbol("dataListeners"),Ae=Symbol("discarded"),yi=t=>Promise.resolve().then(t),DS=t=>t(),qS=t=>t==="end"||t==="finish"||t==="prefinish",CS=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,jS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),hs=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Er](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Go=class extends hs{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},LS=t=>!!t.objectMode,NS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Ot=class extends cs.EventEmitter{[se]=!1;[gi]=!1;[Se]=[];[ae]=[];[ge];[Ue];[Qe];[Sr];[at]=!1;[Tt]=!1;[as]=!1;[os]=!1;[pi]=null;[oe]=0;[X]=!1;[mi];[fs]=!1;[Jt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");LS(r)?(this[ge]=!0,this[Ue]=null):NS(r)?(this[Ue]=r.encoding,this[ge]=!1):(this[ge]=!1,this[Ue]=null),this[Qe]=!!r.async,this[Sr]=this[Ue]?new Lp.StringDecoder(this[Ue]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ae]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[mi]=i,i.aborted?this[Ho]():i.addEventListener("abort",()=>this[Ho]()))}get bufferLength(){return this[oe]}get encoding(){return this[Ue]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ge]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[Ho](){this[fs]=!0,this.emit("abort",this[mi]?.reason),this.destroy(this[mi]?.reason)}get aborted(){return this[fs]}set aborted(e){}write(e,r,i){if(this[fs])return!1;if(this[at])throw new Error("write after end");if(this[X])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?yi:DS;if(!this[ge]&&!Buffer.isBuffer(e)){if(jS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(CS(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ge]?(this[se]&&this[oe]!==0&&this[ls](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):e.length?(typeof e=="string"&&!(r===this[Ue]&&!this[Sr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ue]&&(e=this[Sr].write(e)),this[se]&&this[oe]!==0&&this[ls](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):(this[oe]!==0&&this.emit("readable"),i&&n(i),this[se])}read(e){if(this[X])return null;if(this[Ae]=!1,this[oe]===0||e===0||e&&e>this[oe])return this[ot](),null;this[ge]&&(e=null),this[ae].length>1&&!this[ge]&&(this[ae]=[this[Ue]?this[ae].join(""):Buffer.concat(this[ae],this[oe])]);let r=this[qp](e||null,this[ae][0]);return this[ot](),r}[qp](e,r){if(this[ge])this[us]();else{let i=r;e===i.length||e===null?this[us]():typeof i=="string"?(this[ae][0]=i.slice(e),r=i.slice(0,e),this[oe]-=e):(this[ae][0]=i.subarray(e),r=i.subarray(0,e),this[oe]-=e)}return this.emit("data",r),!this[ae].length&&!this[at]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[at]=!0,this.writable=!1,(this[se]||!this[gi])&&this[ot](),this}[Er](){this[X]||(!this[Jt]&&!this[Se].length&&(this[Ae]=!0),this[gi]=!1,this[se]=!0,this.emit("resume"),this[ae].length?this[ls]():this[at]?this[ot]():this.emit("drain"))}resume(){return this[Er]()}pause(){this[se]=!1,this[gi]=!0,this[Ae]=!1}get destroyed(){return this[X]}get flowing(){return this[se]}get paused(){return this[gi]}[Wo](e){this[ge]?this[oe]+=1:this[oe]+=e.length,this[ae].push(e)}[us](){return this[ge]?this[oe]-=1:this[oe]-=this[ae][0].length,this[ae].shift()}[ls](e=!1){do;while(this[Cp](this[us]())&&this[ae].length);!e&&!this[ae].length&&!this[at]&&this.emit("drain")}[Cp](e){return this.emit("data",e),this[se]}pipe(e,r){if(this[X])return e;this[Ae]=!1;let i=this[Tt];return r=r||{},e===Dp.stdout||e===Dp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new Go(this,e,r):new hs(this,e,r)),this[Qe]?yi(()=>this[Er]()):this[Er]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[se]&&this[Jt]===0&&(this[se]=!1),this[Se]=[]):this[Se].splice(this[Se].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Jt]++,!this[Se].length&&!this[se]&&this[Er]();else if(e==="readable"&&this[oe]!==0)super.emit("readable");else if(qS(e)&&this[Tt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[pi]){let n=r;this[Qe]?yi(()=>n.call(this,this[pi])):n.call(this,this[pi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Jt]=this.listeners("data").length,this[Jt]===0&&!this[Ae]&&!this[Se].length&&(this[se]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jt]=0,!this[Ae]&&!this[Se].length&&(this[se]=!1)),r}get emittedEnd(){return this[Tt]}[ot](){!this[as]&&!this[Tt]&&!this[X]&&this[ae].length===0&&this[at]&&(this[as]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[os]&&this.emit("close"),this[as]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==X&&this[X])return!1;if(e==="data")return!this[ge]&&!i?!1:this[Qe]?(yi(()=>this[Uo](i)),!0):this[Uo](i);if(e==="end")return this[jp]();if(e==="close"){if(this[os]=!0,!this[Tt]&&!this[X])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[pi]=i,super.emit(Bo,i);let s=!this[mi]||this.listeners("error").length?super.emit("error",i):!1;return this[ot](),s}else if(e==="resume"){let s=super.emit("resume");return this[ot](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[ot](),n}[Uo](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[ot](),r}[jp](){return this[Tt]?!1:(this[Tt]=!0,this.readable=!1,this[Qe]?(yi(()=>this[zo]()),!0):this[zo]())}[zo](){if(this[Sr]){let r=this[Sr].end();if(r){for(let i of this[Se])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[Se])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ge]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ge]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ge])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ue]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(X,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[at])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(X,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(X,c),this.pause(),s({value:h,done:!!this[at]})},u=()=>{this.off("error",o),this.off("data",l),this.off(X,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(X,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(Bo,r),this.off(X,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(Bo,r),this.once(X,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[X])return e?this.emit("error",e):this.emit(X),this;this[X]=!0,this[Ae]=!0,this[ae].length=0,this[oe]=0;let r=this;return typeof r.close=="function"&&!this[os]&&r.close(),e?this.emit("error",e):this.emit(X),this}static get isStream(){return AS}};var IS=et.realpathSync.native,wi={lstatSync:et.lstatSync,readdir:et.readdir,readdirSync:et.readdirSync,readlinkSync:et.readlinkSync,realpathSync:IS,promises:{lstat:Mt.lstat,readdir:Mt.readdir,readlink:Mt.readlink,realpath:Mt.realpath}},Bp=t=>!t||t===wi||t===FS?wi:{...wi,...t,promises:{...wi.promises,...t.promises||{}}},Up=/^\\\\\?\\([a-z]:)\\?$/i,$S=t=>t.replace(/\//g,"\\").replace(Up,"$1\\"),WS=/[\\\/]/,Ne=0,zp=1,Hp=2,Xe=4,Gp=6,Yp=8,Zt=10,Vp=12,Le=15,bi=~Le,Vo=16,Np=32,vi=64,ze=128,ds=256,gs=512,Fp=vi|ze|gs,BS=1023,Ko=t=>t.isFile()?Yp:t.isDirectory()?Xe:t.isSymbolicLink()?Zt:t.isCharacterDevice()?Hp:t.isBlockDevice()?Gp:t.isSocket()?Vp:t.isFIFO()?zp:Ne,Ip=new Map,_i=t=>{let e=Ip.get(t);if(e)return e;let r=t.normalize("NFKD");return Ip.set(t,r),r},$p=new Map,ps=t=>{let e=$p.get(t);if(e)return e;let r=_i(t.toLowerCase());return $p.set(t,r),r},ms=class extends di{constructor(){super({max:256})}},Jo=class extends di{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Kp=Symbol("PathScurry setAsCwd"),me=class{name;root;roots;parent;nocase;#e;#r;get dev(){return this.#r}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#u;get gid(){return this.#u}#h;get rdev(){return this.#h}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#t;get size(){return this.#t}#g;get blocks(){return this.#g}#y;get atimeMs(){return this.#y}#d;get mtimeMs(){return this.#d}#c;get ctimeMs(){return this.#c}#v;get birthtimeMs(){return this.#v}#m;get atime(){return this.#m}#x;get mtime(){return this.#x}#T;get ctime(){return this.#T}#_;get birthtime(){return this.#_}#w;#M;#p;#k;#O;#S;#n;#b;#P;#E;get path(){return(this.parent||this).fullpath()}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?ps(e):_i(e),this.#n=r&BS,this.nocase=s,this.roots=n,this.root=i||this,this.#b=a,this.#p=o.fullpath,this.#O=o.relative,this.#S=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=Bp(o.fs)}depth(){return this.#M!==void 0?this.#M:this.parent?this.#M=this.parent.depth()+1:this.#M=0}childrenCache(){return this.#b}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#j(n):this.#j(n)}#j(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#b.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#b.set(this,r),this.#n&=~Vo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?ps(e):_i(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#p?this.#p+s+e:void 0,o=this.newChild(e,Ne,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#n|=ze),i.push(o),o}relative(){if(this.#O!==void 0)return this.#O;let e=this.name,r=this.parent;if(!r)return this.#O=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#p!==void 0)return this.#p;let e=this.name,r=this.parent;if(!r)return this.#p=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#p=n}fullpathPosix(){if(this.#k!==void 0)return this.#k;if(this.sep==="/")return this.#k=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#k=`//?/${n}`:this.#k=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#k=i}isUnknown(){return(this.#n&Le)===Ne}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&Le)===Yp}isDirectory(){return(this.#n&Le)===Xe}isCharacterDevice(){return(this.#n&Le)===Hp}isBlockDevice(){return(this.#n&Le)===Gp}isFIFO(){return(this.#n&Le)===zp}isSocket(){return(this.#n&Le)===Vp}isSymbolicLink(){return(this.#n&Zt)===Zt}lstatCached(){return this.#n&Np?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#E}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#n&Le;return!(e!==Ne&&e!==Zt||this.#n&ds||this.#n&ze)}calledReaddir(){return!!(this.#n&Vo)}isENOENT(){return!!(this.#n&ze)}isNamed(e){return this.nocase?this.#w===ps(e):this.#w===_i(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}#L(e){this.#n|=Vo;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#R()}}#R(){this.#n&ze||(this.#n=(this.#n|ze)&bi,this.#A())}#A(){let e=this.children();e.provisional=0;for(let r of e)r.#R()}#N(){this.#n|=gs,this.#D()}#D(){if(this.#n&vi)return;let e=this.#n;(e&Le)===Xe&&(e&=bi),this.#n=e|vi,this.#A()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#f(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#F(e=""){let r=this.#n;r|=ds,e==="ENOENT"&&(r|=ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=bi),this.#n=r,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#q(e,r){return this.#z(e,r)||this.#U(e,r)}#U(e,r){let i=Ko(e),n=this.newChild(e.name,i,{parent:this}),s=n.#n&Le;return s!==Xe&&s!==Zt&&s!==Ne&&(n.#n|=vi),r.unshift(n),r.provisional++,n}#z(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?ps(e.name):_i(e.name))===n.#w)return this.#H(e,n,i,r)}}#H(e,r,i,n){let s=r.name;return r.#n=r.#n&bi|Ko(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if(!(this.#n&ze))try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#f(e.code)}}lstatSync(){if(!(this.#n&ze))try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#f(e.code)}}#B(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:c,gid:h,ino:d,mode:f,mtime:y,mtimeMs:b,nlink:_,rdev:E,size:R,uid:x}=e;this.#m=r,this.#y=i,this.#_=n,this.#v=s,this.#l=a,this.#g=o,this.#T=l,this.#c=u,this.#r=c,this.#u=h,this.#a=d,this.#s=f,this.#x=y,this.#d=b,this.#i=_,this.#h=E,this.#t=R,this.#o=x;let O=Ko(e);this.#n=this.#n&bi|O|Np,O!==Ne&&O!==Xe&&O!==Zt&&(this.#n|=vi)}#$=[];#W=!1;#G(e){this.#W=!1;let r=this.#$.slice();this.#$.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#$.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#C(s.code),i.provisional=0;else{for(let o of a)this.#q(o,i);this.#L(i)}this.#G(i.slice(0,i.provisional))})}#I;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#I)await this.#I;else{let i=()=>{};this.#I=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#q(n,e);this.#L(e)}catch(n){this.#C(n.code),e.provisional=0}this.#I=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#q(i,e);this.#L(e)}catch(i){this.#C(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Fp)return!1;let e=Le&this.#n;return e===Ne||e===Xe||e===Zt}shouldWalk(e,r){return(this.#n&Xe)===Xe&&!(this.#n&Fp)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#E)return this.#E;if(!((gs|ds|ze)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#E)return this.#E;if(!((gs|ds|ze)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}[Kp](e){if(e===this)return;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#O=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#O=void 0,n.#S=void 0,n=n.parent}},ys=class t extends me{sep="\\";splitSep=WS;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Rr.win32.parse(e).root}getRoot(e){if(e=$S(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new xr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Up,"$1\\"),e===r}},bs=class t extends me{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},ws=class{root;rootPath;roots;cwd;#e;#r;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=wi}={}){this.#i=Bp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Wp.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ms,this.#r=new ms,this.#s=new Jo(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,c=l.length-1,h=r.sep,d=this.rootPath,f=!1;for(let y of l){let b=c--;u=u.child(y,{relative:new Array(b).fill("..").join(h),relativePosix:new Array(b).fill("..").join("/"),fullpath:d+=(f?"":h)+y}),f=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#r.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(h,d)=>{l.add(h),h.readdirCB((f,y)=>{if(f)return d(f);let b=y.length;if(!b)return d();let _=()=>{--b===0&&d()};for(let E of y)(!s||s(E))&&o.push(i?E:E.fullpath()),n&&E.isSymbolicLink()?E.realpath().then(R=>R?.isUnknown()?R.lstat():R).then(R=>R?.shouldWalk(l,a)?u(R,_):_()):E.shouldWalk(l,a)?u(E,_):_()},!0)},c=e;return new Promise((h,d)=>{u(c,f=>{if(f)return d(f);h(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let c=u.readdirSync();for(let h of c){(!s||s(h))&&o.push(i?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(n&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(l,a)&&l.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let c of u){(!s||s(c))&&(yield i?c:c.fullpath());let h=c;if(c.isSymbolicLink()){if(!(n&&(h=c.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(o,a)&&o.add(h)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Ot({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=(_,E,R=!1)=>{if(_)return o.emit("error",_);if(n&&!R){let x=[];for(let O of E)O.isSymbolicLink()&&x.push(O.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(x.length){Promise.all(x).then(()=>y(null,E,!0));return}}for(let x of E)x&&(!s||s(x))&&(o.write(i?x:x.fullpath())||(d=!0));c--;for(let x of E){let O=x.realpathCached()||x;O.shouldWalk(l,a)&&u.push(O)}d&&!o.flowing?o.once("drain",h):b||h()},b=!0;f.readdirCB(y,!0),b=!1}};return h(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Ot({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(d=!0));c--;for(let b of y){let _=b;if(b.isSymbolicLink()){if(!(n&&(_=b.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,a)&&u.push(_)}}d&&!o.flowing&&o.once("drain",h)};return h(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Kp](r)}},xr=class extends ws{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Rr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Rr.win32.parse(e).root.toUpperCase()}newRoot(e){return new ys(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Tr=class extends ws{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,Rr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new bs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Si=class extends Tr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},cx=process.platform==="win32"?ys:bs,Jp=process.platform==="win32"?xr:process.platform==="darwin"?Si:Tr;var Zp=require("url");var US=t=>t.length>=1,zS=t=>t.length>=1,Or=class t{#e;#r;#s;length;#i;#o;#u;#h;#l;#a;#t=!0;constructor(e,r,i,n){if(!US(e))throw new TypeError("empty pattern list");if(!zS(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#r=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[c,h,d,f,...y]=this.#r;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),_=[c,h,d,f,""].join("/");this.#e=[b,...u],this.#r=[_,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#r;a[0]===""&&(a.shift(),l.shift());let u=s+"/",c=o+"/";this.#e=[u,...a],this.#r=[c,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===he}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#u=this.#u||(this.#s===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#r,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#l=this.#l,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#t)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#t?!1:(this.#t=!1,!0)}};var HS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ei=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=HS}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let o={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let l of e){let u=new Me(l,o);for(let c=0;c<u.set.length;c++){let h=u.set[c],d=u.globParts[c];if(!h||!d)throw new Error("invalid pattern object");for(;h[0]==="."&&d[0]===".";)h.shift(),d.shift();let f=new Or(h,d,0,a),y=new Me(f.globString(),o),b=d[d.length-1]==="**",_=f.isAbsolute();_?this.absolute.push(y):this.relative.push(y),b&&(_?this.absoluteChildren.push(y):this.relativeChildren.push(y))}}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(s))return!0;for(let a of this.absolute)if(a.match(r)||a.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Zo=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Qo=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Xo=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ri=class t{hasWalkedCache;matches=new Qo;subwalks=new Xo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Zo}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let a=s.root(),o=s.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let h=s.rest();if(h)s=h;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,c=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,c=!0;if(l=s.pattern(),u=s.rest(),c){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,h);continue}else if(l===he){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let h=u?.pattern(),d=u?.rest();if(!u||(h===""||h===".")&&!d)this.matches.add(n,o,h===""||h===".");else if(h===".."){let f=n.parent||n;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,o,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let a of i){let o=a.isAbsolute(),l=a.pattern(),u=a.rest();l===he?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var GS=(t,e)=>typeof t=="string"?new Ei([t],e):Array.isArray(t)?new Ei(t,e):t,vs=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#r;#s;signal;maxDepth;constructor(e,r,i){this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",i.ignore&&(this.#r=GS(i.ignore,i)),this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#o(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#i(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#i(e))return;let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?a+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new Ri(this.opts),i)}walkCB2(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirCached();o.calledReaddir()?this.walkCB3(o,l,i,a):o.readdirCB((u,c)=>this.walkCB3(o,c,i,a),!0)}a()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let[o,l]of i.subwalks.entries())s++,this.walkCB2(o,l,i.child(),a);a()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new Ri(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirSync();this.walkCB3Sync(o,l,i,a)}a()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let[o,l]of i.subwalks.entries())s++,this.walkCB2Sync(o,l,i.child(),a);a()}},xi=class extends vs{matches;constructor(e,r,i){super(e,r,i),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Ti=class extends vs{results;constructor(e,r,i){super(e,r,i),this.results=new Ot({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var YS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",He=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,Zp.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||YS,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?xr:r.platform==="darwin"?Si:r.platform?Tr:Jp;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new Me(l,n)),[a,o]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=a.map((l,u)=>{let c=o[u];if(!c)throw new Error("invalid pattern object");return new Or(l,c,0,this.platform)})}async walk(){return[...await new xi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new xi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var el=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Me(r,e).hasMagic())return!0;return!1};function Ss(t,e={}){return new He(t,e).streamSync()}function Xp(t,e={}){return new He(t,e).stream()}function eg(t,e={}){return new He(t,e).walkSync()}async function Qp(t,e={}){return new He(t,e).walk()}function Es(t,e={}){return new He(t,e).iterateSync()}function tg(t,e={}){return new He(t,e).iterate()}var VS=Ss,KS=Object.assign(Xp,{sync:Ss}),JS=Es,ZS=Object.assign(tg,{sync:Es}),QS=Object.assign(eg,{stream:Ss,iterate:Es}),_s=Object.assign(Qp,{glob:Qp,globSync:eg,sync:QS,globStream:Xp,stream:KS,globStreamSync:Ss,streamSync:VS,globIterate:tg,iterate:ZS,globIterateSync:Es,iterateSync:JS,Glob:He,hasMagic:el,escape:wr,unescape:Be});_s.glob=_s;var XS="../build",eE="../wheels";async function sg(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
|
|
36
|
-
`))}async function
|
|
35
|
+
>>> no match, partial?`,e,d,r,f),d===l))}let b;if(typeof c=="string"?(b=h===c,this.debug("string match",c,h,b)):(b=c.test(h),this.debug("pattern match",c,h,b)),!b)return!1}if(a===l&&o===u)return!0;if(a===l)return i;if(o===u)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Qp(this.pattern,this.options)}parse(e){Ti(e);let r=this.options;if(e==="**")return ge;if(e==="")return"";let i,n=null;(i=e.match(NS))?n=r.dot?IS:FS:(i=e.match(MS))?n=(r.nocase?r.dot?DS:kS:r.dot?AS:OS)(i[1]):(i=e.match($S))?n=(r.nocase?r.dot?BS:WS:r.dot?US:zS)(i):(i=e.match(PS))?n=r.dot?qS:CS:(i=e.match(LS))&&(n=jS);let s=Ar.fromGlob(e,this.options).toMMPattern();return n&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:n}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?YS:r.dot?VS:KS,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(c=>{if(c instanceof RegExp)for(let h of c.flags.split(""))n.add(h);return typeof c=="string"?eE(c):c===ge?ge:c._src});return u.forEach((c,h)=>{let d=u[h+1],f=u[h-1];c!==ge||f===ge||(f===void 0?d!==void 0&&d!==ge?u[h+1]="(?:\\/|"+i+"\\/)?"+d:u[h]=i:d===void 0?u[h-1]=f+"(?:\\/|"+i+")?":d!==ge&&(u[h-1]=f+"(?:\\/|\\/"+i+"\\/)"+d,u[h+1]=ge))}),u.filter(c=>c!==ge).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Te.defaults(e).Minimatch}};Te.AST=Ar;Te.Minimatch=qe;Te.escape=kr;Te.unescape=Ke;var Mg=require("node:url");var Dr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,eg=new Set,sl=typeof process=="object"&&process?process:{},tg=(t,e,r,i)=>{typeof sl.emitWarning=="function"?sl.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},_s=globalThis.AbortController,Xp=globalThis.AbortSignal;if(typeof _s>"u"){Xp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},_s=class{constructor(){e()}signal=new Xp;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=sl.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,tg("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var tE=t=>!eg.has(t),Gx=Symbol("type"),Lt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),rg=t=>Lt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Pr:null:null,Pr=class extends Array{constructor(e){super(e),this.fill(0)}},al=class t{heap;length;static#e=!1;static create(e){let r=rg(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Oi=class t{#e;#t;#s;#i;#a;#v;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#o;#l;#n;#m;#y;#d;#c;#E;#g;#R;#x;#w;#_;#S;#p;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#w,sizes:e.#R,keyMap:e.#o,keyList:e.#l,valList:e.#n,next:e.#m,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#E,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#F(r,i,n,s),moveToTail:r=>e.#$(r),indexes:r=>e.#M(r),rindexes:r=>e.#O(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#a}get memoMethod(){return this.#v}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:c,noDisposeOnSet:h,noUpdateTTL:d,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:_,memoMethod:E,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:M,allowStaleOnFetchAbort:k,ignoreFetchAbort:C}=e;if(r!==0&&!Lt(r))throw new TypeError("max option must be a nonnegative integer");let F=r?rg(r):Array;if(!F)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=f,this.maxEntrySize=y||this.#t,this.sizeCalculation=b,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(E!==void 0&&typeof E!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#v=E,_!==void 0&&typeof _!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=_,this.#S=!!_,this.#o=new Map,this.#l=new Array(r).fill(void 0),this.#n=new Array(r).fill(void 0),this.#m=new F(r),this.#y=new F(r),this.#d=0,this.#c=0,this.#E=al.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof c=="function"?(this.#i=c,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#_=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!M,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#t!==0&&!Lt(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Lt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Lt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Lt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let q="LRU_CACHE_UNBOUNDED";tE(q)&&(eg.add(q),tg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,t))}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#A(){let e=new Pr(this.#e),r=new Pr(this.#e);this.#w=e,this.#x=r,this.#P=(s,a,o=Dr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.#D(this.#l[s],"expire")},a+1);l.unref&&l.unref()}},this.#T=s=>{r[s]=e[s]!==0?Dr.now():0},this.#r=(s,a)=>{if(e[a]){let o=e[a],l=r[a];if(!o||!l)return;s.ttl=o,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=o-u}};let i=0,n=()=>{let s=Dr.now();if(this.ttlResolution>0){i=s;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{let a=this.#o.get(s);if(a===void 0)return 0;let o=e[a],l=r[a];if(!o||!l)return 1/0;let u=(i||n())-l;return o-u},this.#b=s=>{let a=r[s],o=e[s];return!!o&&!!a&&(i||n())-a>o}}#T=()=>{};#r=()=>{};#P=()=>{};#b=()=>!1;#k(){let e=new Pr(this.#e);this.#h=0,this.#R=e,this.#C=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#f(i))return 0;if(!Lt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Lt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#q=(r,i,n)=>{if(e[r]=i,this.#t){let s=this.#t-e[r];for(;this.#h>s;)this.#N(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#C=e=>{};#q=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#j(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#O({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#j(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#m[r]}#j(e){return e!==void 0&&this.#o.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*rentries(){for(let e of this.#O())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*keys(){for(let e of this.#M()){let r=this.#l[e];r!==void 0&&!this.#f(this.#n[e])&&(yield r)}}*rkeys(){for(let e of this.#O()){let r=this.#l[e];r!==void 0&&!this.#f(this.#n[e])&&(yield r)}}*values(){for(let e of this.#M())this.#n[e]!==void 0&&!this.#f(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#O())this.#n[e]!==void 0&&!this.#f(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#M()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#l[i],this))return this.get(this.#l[i],r)}}forEach(e,r=this){for(let i of this.#M()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}rforEach(e,r=this){for(let i of this.#O()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}purgeStale(){let e=!1;for(let r of this.#O({allowStale:!0}))this.#b(r)&&(this.#D(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#o.get(e);if(r===void 0)return;let i=this.#n[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#w&&this.#x){let a=this.#w[r],o=this.#x[r];if(a&&o){let l=a-(Dr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#R&&(s.size=this.#R[r]),s}dump(){let e=[];for(let r of this.#M({allowStale:!0})){let i=this.#l[r],n=this.#n[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#w&&this.#x){a.ttl=this.#w[r];let o=Dr.now()-this.#x[r];a.start=Math.floor(Date.now()-o)}this.#R&&(a.size=this.#R[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=Dr.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,c=this.#L(e,r,i.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#D(e,"set"),this;let h=this.#u===0?void 0:this.#o.get(e);if(h===void 0)h=this.#u===0?this.#c:this.#E.length!==0?this.#E.pop():this.#u===this.#e?this.#N(!1):this.#u,this.#l[h]=e,this.#n[h]=r,this.#o.set(e,h),this.#m[this.#c]=h,this.#y[h]=this.#c,this.#c=h,this.#u++,this.#q(h,c,l),l&&(l.set="add"),u=!1;else{this.#$(h);let d=this.#n[h];if(r!==d){if(this.#S&&this.#f(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!a&&(this.#_&&this.#s?.(f,e,"set"),this.#p&&this.#g?.push([f,e,"set"]))}else a||(this.#_&&this.#s?.(d,e,"set"),this.#p&&this.#g?.push([d,e,"set"]));if(this.#C(h),this.#q(h,c,l),this.#n[h]=r,l){l.set="replace";let f=d&&this.#f(d)?d.__staleWhileFetching:d;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#w&&this.#A(),this.#w&&(u||this.#P(h,n,s),l&&this.#r(l,h)),!a&&this.#p&&this.#g){let d=this.#g,f;for(;f=d?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#n[this.#d];if(this.#N(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#g){let e=this.#g,r;for(;r=e?.shift();)this.#i?.(...r)}}}#N(e){let r=this.#d,i=this.#l[r],n=this.#n[r];return this.#S&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#_||this.#p)&&(this.#_&&this.#s?.(n,i,"evict"),this.#p&&this.#g?.push([n,i,"evict"])),this.#C(r),e&&(this.#l[r]=void 0,this.#n[r]=void 0,this.#E.push(r)),this.#u===1?(this.#d=this.#c=0,this.#E.length=0):this.#d=this.#m[r],this.#o.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#o.get(e);if(s!==void 0){let a=this.#n[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#r(n,s));else return i&&this.#T(s),n&&(n.has="hit",this.#r(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#o.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#n[n];return this.#f(s)?s.__staleWhileFetching:s}#F(e,r,i,n){let s=r===void 0?void 0:this.#n[r];if(this.#f(s))return s;let a=new _s,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,_=!1)=>{let{aborted:E}=a.signal,R=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(E&&!_?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,R&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),E&&!R&&!_)return h(a.signal.reason);let x=f;return this.#n[r]===f&&(b===void 0?x.__staleWhileFetching?this.#n[r]=x.__staleWhileFetching:this.#D(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},c=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),h(b)),h=b=>{let{aborted:_}=a.signal,E=_&&i.allowStaleOnFetchAbort,R=E||i.allowStaleOnFetchRejection,x=R||i.noDeleteOnFetchRejection,M=f;if(this.#n[r]===f&&(!x||M.__staleWhileFetching===void 0?this.#D(e,"fetch"):E||(this.#n[r]=M.__staleWhileFetching)),R)return i.status&&M.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),M.__staleWhileFetching;if(M.__returned===M)throw b},d=(b,_)=>{let E=this.#a?.(e,s,l);E&&E instanceof Promise&&E.then(R=>b(R===void 0?void 0:R),_),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=R=>u(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(d).then(u,c),y=Object.assign(f,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,y,{...l.options,status:void 0}),r=this.#o.get(e)):this.#n[r]=y,y}#f(e){if(!this.#S)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof _s}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:_=!1,status:E,signal:R}=r;if(!this.#S)return E&&(E.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:E});let x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:E,signal:R},M=this.#o.get(e);if(M===void 0){E&&(E.fetch="miss");let k=this.#F(e,M,x,b);return k.__returned=k}else{let k=this.#n[M];if(this.#f(k)){let te=i&&k.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",te&&(E.returnedStale=!0)),te?k.__staleWhileFetching:k.__returned=k}let C=this.#b(M);if(!_&&!C)return E&&(E.fetch="hit"),this.#$(M),n&&this.#T(M),E&&this.#r(E,M),k;let F=this.#F(e,M,x,b),U=F.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=C?"stale":"refresh",U&&C&&(E.returnedStale=!0)),U?F.__staleWhileFetching:F.__returned=F}}async forceFetch(e,r={}){let i=await this.fetch(e,r);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,r={}){let i=this.#v;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...a}=r,o=this.get(e,a);if(!s&&o!==void 0)return o;let l=i(e,o,{options:a,context:n});return this.set(e,l,a),l}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#o.get(e);if(o!==void 0){let l=this.#n[o],u=this.#f(l);return a&&this.#r(a,o),this.#b(o)?(a&&(a.get="stale"),u?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#D(e,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#$(o),n&&this.#T(o),l))}else a&&(a.get="miss")}#I(e,r){this.#y[r]=e,this.#m[e]=r}#$(e){e!==this.#c&&(e===this.#d?this.#d=this.#m[e]:this.#I(this.#y[e],this.#m[e]),this.#I(this.#c,e),this.#c=e)}delete(e){return this.#D(e,"delete")}#D(e,r){let i=!1;if(this.#u!==0){let n=this.#o.get(e);if(n!==void 0)if(i=!0,this.#u===1)this.#W(r);else{this.#C(n);let s=this.#n[n];if(this.#f(s)?s.__abortController.abort(new Error("deleted")):(this.#_||this.#p)&&(this.#_&&this.#s?.(s,e,r),this.#p&&this.#g?.push([s,e,r])),this.#o.delete(e),this.#l[n]=void 0,this.#n[n]=void 0,n===this.#c)this.#c=this.#y[n];else if(n===this.#d)this.#d=this.#m[n];else{let a=this.#y[n];this.#m[a]=this.#m[n];let o=this.#m[n];this.#y[o]=this.#y[n]}this.#u--,this.#E.push(n)}}if(this.#p&&this.#g?.length){let n=this.#g,s;for(;s=n?.shift();)this.#i?.(...s)}return i}clear(){return this.#W("delete")}#W(e){for(let r of this.#O({allowStale:!0})){let i=this.#n[r];if(this.#f(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#l[r];this.#_&&this.#s?.(i,n,e),this.#p&&this.#g?.push([i,n,e])}}if(this.#o.clear(),this.#n.fill(void 0),this.#l.fill(void 0),this.#w&&this.#x&&(this.#w.fill(0),this.#x.fill(0)),this.#R&&this.#R.fill(0),this.#d=0,this.#c=0,this.#E.length=0,this.#h=0,this.#u=0,this.#p&&this.#g){let r=this.#g,i;for(;i=r?.shift();)this.#i?.(...i)}}};var jr=require("node:path"),cg=require("node:url"),lt=require("fs"),hE=be(require("node:fs"),1),Nt=require("node:fs/promises");var Os=require("node:events"),dl=be(require("node:stream"),1),og=require("node:string_decoder"),ig=typeof process=="object"&&process?process:{stdout:null,stderr:null},rE=t=>!!t&&typeof t=="object"&&(t instanceof Lr||t instanceof dl.default||iE(t)||nE(t)),iE=t=>!!t&&typeof t=="object"&&t instanceof Os.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==dl.default.Writable.prototype.pipe,nE=t=>!!t&&typeof t=="object"&&t instanceof Os.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",pt=Symbol("EOF"),gt=Symbol("maybeEmitEnd"),jt=Symbol("emittedEnd"),Ss=Symbol("emittingEnd"),Ai=Symbol("emittedError"),Es=Symbol("closed"),ng=Symbol("read"),Rs=Symbol("flush"),sg=Symbol("flushChunk"),Je=Symbol("encoding"),Cr=Symbol("decoder"),ae=Symbol("flowing"),ki=Symbol("paused"),qr=Symbol("resume"),oe=Symbol("buffer"),Me=Symbol("pipes"),le=Symbol("bufferLength"),ol=Symbol("bufferPush"),xs=Symbol("bufferShift"),we=Symbol("objectMode"),X=Symbol("destroyed"),ll=Symbol("error"),ul=Symbol("emitData"),ag=Symbol("emitEnd"),fl=Symbol("emitEnd2"),at=Symbol("async"),hl=Symbol("abort"),Ts=Symbol("aborted"),Di=Symbol("signal"),ar=Symbol("dataListeners"),Le=Symbol("discarded"),Pi=t=>Promise.resolve().then(t),sE=t=>t(),aE=t=>t==="end"||t==="finish"||t==="prefinish",oE=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,lE=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Ms=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[qr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},cl=class extends Ms{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},uE=t=>!!t.objectMode,fE=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Lr=class extends Os.EventEmitter{[ae]=!1;[ki]=!1;[Me]=[];[oe]=[];[we];[Je];[at];[Cr];[pt]=!1;[jt]=!1;[Ss]=!1;[Es]=!1;[Ai]=null;[le]=0;[X]=!1;[Di];[Ts]=!1;[ar]=0;[Le]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");uE(r)?(this[we]=!0,this[Je]=null):fE(r)?(this[Je]=r.encoding,this[we]=!1):(this[we]=!1,this[Je]=null),this[at]=!!r.async,this[Cr]=this[Je]?new og.StringDecoder(this[Je]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[oe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Me]});let{signal:i}=r;i&&(this[Di]=i,i.aborted?this[hl]():i.addEventListener("abort",()=>this[hl]()))}get bufferLength(){return this[le]}get encoding(){return this[Je]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[we]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[at]}set async(e){this[at]=this[at]||!!e}[hl](){this[Ts]=!0,this.emit("abort",this[Di]?.reason),this.destroy(this[Di]?.reason)}get aborted(){return this[Ts]}set aborted(e){}write(e,r,i){if(this[Ts])return!1;if(this[pt])throw new Error("write after end");if(this[X])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[at]?Pi:sE;if(!this[we]&&!Buffer.isBuffer(e)){if(lE(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(oE(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[we]?(this[ae]&&this[le]!==0&&this[Rs](!0),this[ae]?this.emit("data",e):this[ol](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):e.length?(typeof e=="string"&&!(r===this[Je]&&!this[Cr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Je]&&(e=this[Cr].write(e)),this[ae]&&this[le]!==0&&this[Rs](!0),this[ae]?this.emit("data",e):this[ol](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):(this[le]!==0&&this.emit("readable"),i&&n(i),this[ae])}read(e){if(this[X])return null;if(this[Le]=!1,this[le]===0||e===0||e&&e>this[le])return this[gt](),null;this[we]&&(e=null),this[oe].length>1&&!this[we]&&(this[oe]=[this[Je]?this[oe].join(""):Buffer.concat(this[oe],this[le])]);let r=this[ng](e||null,this[oe][0]);return this[gt](),r}[ng](e,r){if(this[we])this[xs]();else{let i=r;e===i.length||e===null?this[xs]():typeof i=="string"?(this[oe][0]=i.slice(e),r=i.slice(0,e),this[le]-=e):(this[oe][0]=i.subarray(e),r=i.subarray(0,e),this[le]-=e)}return this.emit("data",r),!this[oe].length&&!this[pt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[pt]=!0,this.writable=!1,(this[ae]||!this[ki])&&this[gt](),this}[qr](){this[X]||(!this[ar]&&!this[Me].length&&(this[Le]=!0),this[ki]=!1,this[ae]=!0,this.emit("resume"),this[oe].length?this[Rs]():this[pt]?this[gt]():this.emit("drain"))}resume(){return this[qr]()}pause(){this[ae]=!1,this[ki]=!0,this[Le]=!1}get destroyed(){return this[X]}get flowing(){return this[ae]}get paused(){return this[ki]}[ol](e){this[we]?this[le]+=1:this[le]+=e.length,this[oe].push(e)}[xs](){return this[we]?this[le]-=1:this[le]-=this[oe][0].length,this[oe].shift()}[Rs](e=!1){do;while(this[sg](this[xs]())&&this[oe].length);!e&&!this[oe].length&&!this[pt]&&this.emit("drain")}[sg](e){return this.emit("data",e),this[ae]}pipe(e,r){if(this[X])return e;this[Le]=!1;let i=this[jt];return r=r||{},e===ig.stdout||e===ig.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Me].push(r.proxyErrors?new cl(this,e,r):new Ms(this,e,r)),this[at]?Pi(()=>this[qr]()):this[qr]()),e}unpipe(e){let r=this[Me].find(i=>i.dest===e);r&&(this[Me].length===1?(this[ae]&&this[ar]===0&&(this[ae]=!1),this[Me]=[]):this[Me].splice(this[Me].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Le]=!1,this[ar]++,!this[Me].length&&!this[ae]&&this[qr]();else if(e==="readable"&&this[le]!==0)super.emit("readable");else if(aE(e)&&this[jt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ai]){let n=r;this[at]?Pi(()=>n.call(this,this[Ai])):n.call(this,this[Ai])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[ar]=this.listeners("data").length,this[ar]===0&&!this[Le]&&!this[Me].length&&(this[ae]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[ar]=0,!this[Le]&&!this[Me].length&&(this[ae]=!1)),r}get emittedEnd(){return this[jt]}[gt](){!this[Ss]&&!this[jt]&&!this[X]&&this[oe].length===0&&this[pt]&&(this[Ss]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Es]&&this.emit("close"),this[Ss]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==X&&this[X])return!1;if(e==="data")return!this[we]&&!i?!1:this[at]?(Pi(()=>this[ul](i)),!0):this[ul](i);if(e==="end")return this[ag]();if(e==="close"){if(this[Es]=!0,!this[jt]&&!this[X])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Ai]=i,super.emit(ll,i);let s=!this[Di]||this.listeners("error").length?super.emit("error",i):!1;return this[gt](),s}else if(e==="resume"){let s=super.emit("resume");return this[gt](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[gt](),n}[ul](e){for(let i of this[Me])i.dest.write(e)===!1&&this.pause();let r=this[Le]?!1:super.emit("data",e);return this[gt](),r}[ag](){return this[jt]?!1:(this[jt]=!0,this.readable=!1,this[at]?(Pi(()=>this[fl]()),!0):this[fl]())}[fl](){if(this[Cr]){let r=this[Cr].end();if(r){for(let i of this[Me])i.dest.write(r);this[Le]||super.emit("data",r)}}for(let r of this[Me])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[we]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[we]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[we])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Je]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(X,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Le]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[pt])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(X,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(X,c),this.pause(),s({value:h,done:!!this[pt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(X,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(X,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Le]=!1;let e=!1,r=()=>(this.pause(),this.off(ll,r),this.off(X,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(ll,r),this.once(X,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[X])return e?this.emit("error",e):this.emit(X),this;this[X]=!0,this[Le]=!0,this[oe].length=0,this[le]=0;let r=this;return typeof r.close=="function"&&!this[Es]&&r.close(),e?this.emit("error",e):this.emit(X),this}static get isStream(){return rE}};var cE=lt.realpathSync.native,qi={lstatSync:lt.lstatSync,readdir:lt.readdir,readdirSync:lt.readdirSync,readlinkSync:lt.readlinkSync,realpathSync:cE,promises:{lstat:Nt.lstat,readdir:Nt.readdir,readlink:Nt.readlink,realpath:Nt.realpath}},dg=t=>!t||t===qi||t===hE?qi:{...qi,...t,promises:{...qi.promises,...t.promises||{}}},pg=/^\\\\\?\\([a-z]:)\\?$/i,dE=t=>t.replace(/\//g,"\\").replace(pg,"$1\\"),pE=/[\\\/]/,ze=0,gg=1,mg=2,ot=4,yg=6,bg=8,or=10,wg=12,Ue=15,Ci=~Ue,pl=16,lg=32,Li=64,Ze=128,As=256,Ds=512,ug=Li|Ze|Ds,gE=1023,gl=t=>t.isFile()?bg:t.isDirectory()?ot:t.isSymbolicLink()?or:t.isCharacterDevice()?mg:t.isBlockDevice()?yg:t.isSocket()?wg:t.isFIFO()?gg:ze,fg=new Map,ji=t=>{let e=fg.get(t);if(e)return e;let r=t.normalize("NFKD");return fg.set(t,r),r},hg=new Map,ks=t=>{let e=hg.get(t);if(e)return e;let r=ji(t.toLowerCase());return hg.set(t,r),r},Ps=class extends Oi{constructor(){super({max:256})}},ml=class extends Oi{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},vg=Symbol("PathScurry setAsCwd"),ve=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#a;get uid(){return this.#a}#v;get gid(){return this.#v}#u;get rdev(){return this.#u}#h;get blksize(){return this.#h}#o;get ino(){return this.#o}#l;get size(){return this.#l}#n;get blocks(){return this.#n}#m;get atimeMs(){return this.#m}#y;get mtimeMs(){return this.#y}#d;get ctimeMs(){return this.#d}#c;get birthtimeMs(){return this.#c}#E;get atime(){return this.#E}#g;get mtime(){return this.#g}#R;get ctime(){return this.#R}#x;get birthtime(){return this.#x}#w;#_;#S;#p;#A;#T;#r;#P;#b;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=ze,i,n,s,a,o){this.name=e,this.#w=s?ks(e):ji(e),this.#r=r&gE,this.nocase=s,this.roots=n,this.root=i||this,this.#P=a,this.#S=o.fullpath,this.#A=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=dg(o.fs)}depth(){return this.#_!==void 0?this.#_:this.parent?this.#_=this.parent.depth()+1:this.#_=0}childrenCache(){return this.#P}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#C(n):this.#C(n)}#C(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#P.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#P.set(this,r),this.#r&=~pl,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?ks(e):ji(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#S?this.#S+s+e:void 0,o=this.newChild(e,ze,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#r|=Ze),i.push(o),o}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,r=this.parent;if(!r)return this.#A=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,r=this.parent;if(!r)return this.#T=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#S=n}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#p=`//?/${n}`:this.#p=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#r&Ue)===ze}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&Ue)===bg}isDirectory(){return(this.#r&Ue)===ot}isCharacterDevice(){return(this.#r&Ue)===mg}isBlockDevice(){return(this.#r&Ue)===yg}isFIFO(){return(this.#r&Ue)===gg}isSocket(){return(this.#r&Ue)===wg}isSymbolicLink(){return(this.#r&or)===or}lstatCached(){return this.#r&lg?this:void 0}readlinkCached(){return this.#b}realpathCached(){return this.#k}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#b)return!0;if(!this.parent)return!1;let e=this.#r&Ue;return!(e!==ze&&e!==or||this.#r&As||this.#r&Ze)}calledReaddir(){return!!(this.#r&pl)}isENOENT(){return!!(this.#r&Ze)}isNamed(e){return this.nocase?this.#w===ks(e):this.#w===ji(e)}async readlink(){let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#b=i}catch(r){this.#f(r.code);return}}readlinkSync(){let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#b=i}catch(r){this.#f(r.code);return}}#q(e){this.#r|=pl;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#L()}}#L(){this.#r&Ze||(this.#r=(this.#r|Ze)&Ci,this.#M())}#M(){let e=this.children();e.provisional=0;for(let r of e)r.#L()}#O(){this.#r|=Ds,this.#j()}#j(){if(this.#r&Li)return;let e=this.#r;(e&Ue)===ot&&(e&=Ci),this.#r=e|Li,this.#M()}#N(e=""){e==="ENOTDIR"||e==="EPERM"?this.#j():e==="ENOENT"?this.#L():this.children().provisional=0}#F(e=""){e==="ENOTDIR"?this.parent.#j():e==="ENOENT"&&this.#L()}#f(e=""){let r=this.#r;r|=As,e==="ENOENT"&&(r|=Ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=Ci),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#j()}#I(e,r){return this.#D(e,r)||this.#$(e,r)}#$(e,r){let i=gl(e),n=this.newChild(e.name,i,{parent:this}),s=n.#r&Ue;return s!==ot&&s!==or&&s!==ze&&(n.#r|=Li),r.unshift(n),r.provisional++,n}#D(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?ks(e.name):ji(e.name))===n.#w)return this.#W(e,n,i,r)}}#W(e,r,i,n){let s=r.name;return r.#r=r.#r&Ci|gl(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if(!(this.#r&Ze))try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#F(e.code)}}lstatSync(){if(!(this.#r&Ze))try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#F(e.code)}}#H(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:c,gid:h,ino:d,mode:f,mtime:y,mtimeMs:b,nlink:_,rdev:E,size:R,uid:x}=e;this.#E=r,this.#m=i,this.#x=n,this.#c=s,this.#h=a,this.#n=o,this.#R=l,this.#d=u,this.#t=c,this.#v=h,this.#o=d,this.#s=f,this.#g=y,this.#y=b,this.#i=_,this.#u=E,this.#l=R,this.#a=x;let M=gl(e);this.#r=this.#r&Ci|M|lg,M!==ze&&M!==ot&&M!==or&&(this.#r|=Li)}#U=[];#z=!1;#G(e){this.#z=!1;let r=this.#U.slice();this.#U.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#U.push(e),this.#z)return;this.#z=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#N(s.code),i.provisional=0;else{for(let o of a)this.#I(o,i);this.#q(i)}this.#G(i.slice(0,i.provisional))})}#B;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#B)await this.#B;else{let i=()=>{};this.#B=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#I(n,e);this.#q(e)}catch(n){this.#N(n.code),e.provisional=0}this.#B=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#I(i,e);this.#q(e)}catch(i){this.#N(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&ug)return!1;let e=Ue&this.#r;return e===ze||e===ot||e===or}shouldWalk(e,r){return(this.#r&ot)===ot&&!(this.#r&ug)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((Ds|As|Ze)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}realpathSync(){if(this.#k)return this.#k;if(!((Ds|As|Ze)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}[vg](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#A=i.join(this.sep),n.#T=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#A=void 0,n.#T=void 0,n=n.parent}},Cs=class t extends ve{sep="\\";splitSep=pE;constructor(e,r=ze,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=ze,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return jr.win32.parse(e).root}getRoot(e){if(e=dE(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new Nr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(pg,"$1\\"),e===r}},qs=class t extends ve{splitSep="/";sep="/";constructor(e,r=ze,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=ze,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Ls=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=qi}={}){this.#i=dg(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,cg.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new Ps,this.#t=new Ps,this.#s=new ml(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,c=l.length-1,h=r.sep,d=this.rootPath,f=!1;for(let y of l){let b=c--;u=u.child(y,{relative:new Array(b).fill("..").join(h),relativePosix:new Array(b).fill("..").join("/"),fullpath:d+=(f?"":h)+y}),f=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#t.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(h,d)=>{l.add(h),h.readdirCB((f,y)=>{if(f)return d(f);let b=y.length;if(!b)return d();let _=()=>{--b===0&&d()};for(let E of y)(!s||s(E))&&o.push(i?E:E.fullpath()),n&&E.isSymbolicLink()?E.realpath().then(R=>R?.isUnknown()?R.lstat():R).then(R=>R?.shouldWalk(l,a)?u(R,_):_()):E.shouldWalk(l,a)?u(E,_):_()},!0)},c=e;return new Promise((h,d)=>{u(c,f=>{if(f)return d(f);h(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let c=u.readdirSync();for(let h of c){(!s||s(h))&&o.push(i?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(n&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(l,a)&&l.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let c of u){(!s||s(c))&&(yield i?c:c.fullpath());let h=c;if(c.isSymbolicLink()){if(!(n&&(h=c.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(o,a)&&o.add(h)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Lr({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=(_,E,R=!1)=>{if(_)return o.emit("error",_);if(n&&!R){let x=[];for(let M of E)M.isSymbolicLink()&&x.push(M.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(x.length){Promise.all(x).then(()=>y(null,E,!0));return}}for(let x of E)x&&(!s||s(x))&&(o.write(i?x:x.fullpath())||(d=!0));c--;for(let x of E){let M=x.realpathCached()||x;M.shouldWalk(l,a)&&u.push(M)}d&&!o.flowing?o.once("drain",h):b||h()},b=!0;f.readdirCB(y,!0),b=!1}};return h(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Lr({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(d=!0));c--;for(let b of y){let _=b;if(b.isSymbolicLink()){if(!(n&&(_=b.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,a)&&u.push(_)}}d&&!o.flowing&&o.once("drain",h)};return h(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[vg](r)}},Nr=class extends Ls{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,jr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return jr.win32.parse(e).root.toUpperCase()}newRoot(e){return new Cs(this.rootPath,ot,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Fr=class extends Ls{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,jr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new qs(this.rootPath,ot,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Ni=class extends Fr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},Zx=process.platform==="win32"?Cs:qs,_g=process.platform==="win32"?Nr:process.platform==="darwin"?Ni:Fr;var mE=t=>t.length>=1,yE=t=>t.length>=1,Ir=class t{#e;#t;#s;length;#i;#a;#v;#u;#h;#o;#l=!0;constructor(e,r,i,n){if(!mE(e))throw new TypeError("empty pattern list");if(!yE(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[c,h,d,f,...y]=this.#t;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),_=[c,h,d,f,""].join("/");this.#e=[b,...u],this.#t=[_,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#t;a[0]===""&&(a.shift(),l.shift());let u=s+"/",c=o+"/";this.#e=[u,...a],this.#t=[c,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===ge}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#v=this.#v||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#a!==void 0?this.#a:this.hasMore()?(this.#a=new t(this.#e,this.#t,this.#s+1,this.#i),this.#a.#o=this.#o,this.#a.#h=this.#h,this.#a.#u=this.#u,this.#a):this.#a=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#o!==void 0?this.#o:this.#o=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};var Bs=require("node:events"),El=be(require("node:stream"),1),Tg=require("node:string_decoder"),Sg=typeof process=="object"&&process?process:{stdout:null,stderr:null},bE=t=>!!t&&typeof t=="object"&&(t instanceof Bi||t instanceof El.default||wE(t)||vE(t)),wE=t=>!!t&&typeof t=="object"&&t instanceof Bs.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==El.default.Writable.prototype.pipe,vE=t=>!!t&&typeof t=="object"&&t instanceof Bs.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",mt=Symbol("EOF"),yt=Symbol("maybeEmitEnd"),Ft=Symbol("emittedEnd"),js=Symbol("emittingEnd"),Fi=Symbol("emittedError"),Ns=Symbol("closed"),Eg=Symbol("read"),Fs=Symbol("flush"),Rg=Symbol("flushChunk"),Qe=Symbol("encoding"),$r=Symbol("decoder"),ue=Symbol("flowing"),Ii=Symbol("paused"),Wr=Symbol("resume"),fe=Symbol("buffer"),Oe=Symbol("pipes"),he=Symbol("bufferLength"),yl=Symbol("bufferPush"),Is=Symbol("bufferShift"),_e=Symbol("objectMode"),ee=Symbol("destroyed"),bl=Symbol("error"),wl=Symbol("emitData"),xg=Symbol("emitEnd"),vl=Symbol("emitEnd2"),ut=Symbol("async"),_l=Symbol("abort"),$s=Symbol("aborted"),$i=Symbol("signal"),lr=Symbol("dataListeners"),je=Symbol("discarded"),Wi=t=>Promise.resolve().then(t),_E=t=>t(),SE=t=>t==="end"||t==="finish"||t==="prefinish",EE=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,RE=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Ws=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Wr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Sl=class extends Ws{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},xE=t=>!!t.objectMode,TE=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Bi=class extends Bs.EventEmitter{[ue]=!1;[Ii]=!1;[Oe]=[];[fe]=[];[_e];[Qe];[ut];[$r];[mt]=!1;[Ft]=!1;[js]=!1;[Ns]=!1;[Fi]=null;[he]=0;[ee]=!1;[$i];[$s]=!1;[lr]=0;[je]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");xE(r)?(this[_e]=!0,this[Qe]=null):TE(r)?(this[Qe]=r.encoding,this[_e]=!1):(this[_e]=!1,this[Qe]=null),this[ut]=!!r.async,this[$r]=this[Qe]?new Tg.StringDecoder(this[Qe]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[fe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Oe]});let{signal:i}=r;i&&(this[$i]=i,i.aborted?this[_l]():i.addEventListener("abort",()=>this[_l]()))}get bufferLength(){return this[he]}get encoding(){return this[Qe]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[_e]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ut]}set async(e){this[ut]=this[ut]||!!e}[_l](){this[$s]=!0,this.emit("abort",this[$i]?.reason),this.destroy(this[$i]?.reason)}get aborted(){return this[$s]}set aborted(e){}write(e,r,i){if(this[$s])return!1;if(this[mt])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[ut]?Wi:_E;if(!this[_e]&&!Buffer.isBuffer(e)){if(RE(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(EE(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[_e]?(this[ue]&&this[he]!==0&&this[Fs](!0),this[ue]?this.emit("data",e):this[yl](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[ue]):e.length?(typeof e=="string"&&!(r===this[Qe]&&!this[$r]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Qe]&&(e=this[$r].write(e)),this[ue]&&this[he]!==0&&this[Fs](!0),this[ue]?this.emit("data",e):this[yl](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[ue]):(this[he]!==0&&this.emit("readable"),i&&n(i),this[ue])}read(e){if(this[ee])return null;if(this[je]=!1,this[he]===0||e===0||e&&e>this[he])return this[yt](),null;this[_e]&&(e=null),this[fe].length>1&&!this[_e]&&(this[fe]=[this[Qe]?this[fe].join(""):Buffer.concat(this[fe],this[he])]);let r=this[Eg](e||null,this[fe][0]);return this[yt](),r}[Eg](e,r){if(this[_e])this[Is]();else{let i=r;e===i.length||e===null?this[Is]():typeof i=="string"?(this[fe][0]=i.slice(e),r=i.slice(0,e),this[he]-=e):(this[fe][0]=i.subarray(e),r=i.subarray(0,e),this[he]-=e)}return this.emit("data",r),!this[fe].length&&!this[mt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[mt]=!0,this.writable=!1,(this[ue]||!this[Ii])&&this[yt](),this}[Wr](){this[ee]||(!this[lr]&&!this[Oe].length&&(this[je]=!0),this[Ii]=!1,this[ue]=!0,this.emit("resume"),this[fe].length?this[Fs]():this[mt]?this[yt]():this.emit("drain"))}resume(){return this[Wr]()}pause(){this[ue]=!1,this[Ii]=!0,this[je]=!1}get destroyed(){return this[ee]}get flowing(){return this[ue]}get paused(){return this[Ii]}[yl](e){this[_e]?this[he]+=1:this[he]+=e.length,this[fe].push(e)}[Is](){return this[_e]?this[he]-=1:this[he]-=this[fe][0].length,this[fe].shift()}[Fs](e=!1){do;while(this[Rg](this[Is]())&&this[fe].length);!e&&!this[fe].length&&!this[mt]&&this.emit("drain")}[Rg](e){return this.emit("data",e),this[ue]}pipe(e,r){if(this[ee])return e;this[je]=!1;let i=this[Ft];return r=r||{},e===Sg.stdout||e===Sg.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Oe].push(r.proxyErrors?new Sl(this,e,r):new Ws(this,e,r)),this[ut]?Wi(()=>this[Wr]()):this[Wr]()),e}unpipe(e){let r=this[Oe].find(i=>i.dest===e);r&&(this[Oe].length===1?(this[ue]&&this[lr]===0&&(this[ue]=!1),this[Oe]=[]):this[Oe].splice(this[Oe].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[je]=!1,this[lr]++,!this[Oe].length&&!this[ue]&&this[Wr]();else if(e==="readable"&&this[he]!==0)super.emit("readable");else if(SE(e)&&this[Ft])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Fi]){let n=r;this[ut]?Wi(()=>n.call(this,this[Fi])):n.call(this,this[Fi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[lr]=this.listeners("data").length,this[lr]===0&&!this[je]&&!this[Oe].length&&(this[ue]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[lr]=0,!this[je]&&!this[Oe].length&&(this[ue]=!1)),r}get emittedEnd(){return this[Ft]}[yt](){!this[js]&&!this[Ft]&&!this[ee]&&this[fe].length===0&&this[mt]&&(this[js]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ns]&&this.emit("close"),this[js]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[_e]&&!i?!1:this[ut]?(Wi(()=>this[wl](i)),!0):this[wl](i);if(e==="end")return this[xg]();if(e==="close"){if(this[Ns]=!0,!this[Ft]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Fi]=i,super.emit(bl,i);let s=!this[$i]||this.listeners("error").length?super.emit("error",i):!1;return this[yt](),s}else if(e==="resume"){let s=super.emit("resume");return this[yt](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[yt](),n}[wl](e){for(let i of this[Oe])i.dest.write(e)===!1&&this.pause();let r=this[je]?!1:super.emit("data",e);return this[yt](),r}[xg](){return this[Ft]?!1:(this[Ft]=!0,this.readable=!1,this[ut]?(Wi(()=>this[vl]()),!0):this[vl]())}[vl](){if(this[$r]){let r=this[$r].end();if(r){for(let i of this[Oe])i.dest.write(r);this[je]||super.emit("data",r)}}for(let r of this[Oe])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[_e]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[_e]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[_e])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Qe]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[je]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[mt])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(ee,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(ee,c),this.pause(),s({value:h,done:!!this[mt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(ee,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(ee,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[je]=!1;let e=!1,r=()=>(this.pause(),this.off(bl,r),this.off(ee,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(bl,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[je]=!0,this[fe].length=0,this[he]=0;let r=this;return typeof r.close=="function"&&!this[Ns]&&r.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return bE}};var ME=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Br=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=ME}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let o of e)this.add(o)}add(e){let r=new qe(e,this.mmopts);for(let i=0;i<r.set.length;i++){let n=r.set[i],s=r.globParts[i];if(!n||!s)throw new Error("invalid pattern object");for(;n[0]==="."&&s[0]===".";)n.shift(),s.shift();let a=new Ir(n,s,0,this.platform),o=new qe(a.globString(),this.mmopts),l=s[s.length-1]==="**",u=a.isAbsolute();u?this.absolute.push(o):this.relative.push(o),l&&(u?this.absoluteChildren.push(o):this.relativeChildren.push(o))}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(s))return!0;for(let a of this.absolute)if(a.match(r)||a.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Rl=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},xl=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Tl=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ui=class t{hasWalkedCache;matches=new xl;subwalks=new Tl;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Rl}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let a=s.root(),o=s.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let h=s.rest();if(h)s=h;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,c=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,c=!0;if(l=s.pattern(),u=s.rest(),c){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,h);continue}else if(l===ge){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let h=u?.pattern(),d=u?.rest();if(!u||(h===""||h===".")&&!d)this.matches.add(n,o,h===""||h===".");else if(h===".."){let f=n.parent||n;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,o,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let a of i){let o=a.isAbsolute(),l=a.pattern(),u=a.rest();l===ge?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var OE=(t,e)=>typeof t=="string"?new Br([t],e):Array.isArray(t)?new Br(t,e):t,Us=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,r,i){if(this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=OE(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#a(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#i(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#i(e))return;if(!this.includeChildMatches&&this.#t?.add){let s=`${e.relativePosix()}/**`;this.#t.add(s)}let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?a+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new Ui(this.opts),i)}walkCB2(e,r,i,n){if(this.#a(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirCached();o.calledReaddir()?this.walkCB3(o,l,i,a):o.readdirCB((u,c)=>this.walkCB3(o,c,i,a),!0)}a()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let[o,l]of i.subwalks.entries())s++,this.walkCB2(o,l,i.child(),a);a()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new Ui(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#a(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirSync();this.walkCB3Sync(o,l,i,a)}a()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let[o,l]of i.subwalks.entries())s++,this.walkCB2Sync(o,l,i.child(),a);a()}},zi=class extends Us{matches=new Set;constructor(e,r,i){super(e,r,i)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Hi=class extends Us{results;constructor(e,r,i){super(e,r,i),this.results=new Bi({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var AE=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Xe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,Mg.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||AE,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?Nr:r.platform==="darwin"?Ni:r.platform?Fr:_g;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new qe(l,n)),[a,o]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=a.map((l,u)=>{let c=o[u];if(!c)throw new Error("invalid pattern object");return new Ir(l,c,0,this.platform)})}async walk(){return[...await new zi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new zi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Hi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Hi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var Ml=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new qe(r,e).hasMagic())return!0;return!1};function Hs(t,e={}){return new Xe(t,e).streamSync()}function Ag(t,e={}){return new Xe(t,e).stream()}function kg(t,e={}){return new Xe(t,e).walkSync()}async function Og(t,e={}){return new Xe(t,e).walk()}function Gs(t,e={}){return new Xe(t,e).iterateSync()}function Dg(t,e={}){return new Xe(t,e).iterate()}var kE=Hs,DE=Object.assign(Ag,{sync:Hs}),PE=Gs,CE=Object.assign(Dg,{sync:Gs}),qE=Object.assign(kg,{stream:Hs,iterate:Gs}),zs=Object.assign(Og,{glob:Og,globSync:kg,sync:qE,globStream:Ag,stream:DE,globStreamSync:Hs,streamSync:kE,globIterate:Dg,iterate:CE,globIterateSync:Gs,iterateSync:PE,Glob:Xe,hasMagic:Ml,escape:kr,unescape:Ke});zs.glob=zs;var LE="../build",jE="../wheels";async function Lg(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
|
|
36
|
+
`))}async function NE(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=me.default.resolve(__dirname,LE);if(!(await bt.default.stat(e)).isDirectory())throw new Error(`The source ${e} does not exist.`);if(e===t.copyTo){I.warn(`sourceDir == destDir (${e}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await bt.default.access(t.copyTo),I.info(`${t.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${t.copyTo} does not exist even though the \`keepOld\` option is specified`)}I.debug(`Copy ${e} to ${t.copyTo}`),await bt.default.rm(t.copyTo,{recursive:!0,force:!0}),await Ol.default.copy(e,t.copyTo,{errorOnExist:!0})}async function FE(t){if(t.requirements.length===0)return[];let e=await(0,Gi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});return e._api.setCdnUrl(t.pyodideSource),await jg(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function Pg(t,e){I.debug("Preparing the local wheel: %s",e);let r=await bt.default.readFile(e),i="/tmp/"+me.default.basename(e);t.FS.writeFile(i,r);let n=`emfs:${i}`;return I.debug("The local wheel %s is prepared as %s",e,n),n}async function jg(t,e){await Lg(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=me.default.join(__dirname,jE),s=await Pg(t,me.default.join(n,"stlite_lib-0.1.0-py3-none-any.whl"));i.push(s);let a=await Pg(t,me.default.join(n,"streamlit-1.41.0-cp312-none-any.whl"));i.push(a),I.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function IE(t){I.info("Create the site-packages snapshot file...");let e=await(0,Gi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});e._api.setCdnUrl(t.pyodideSource),await Lg(e,"micropip");let r=e.pyimport("micropip"),i=new ys(t.pyodideSource),n=[];if(t.usedPrebuiltPackages.length>0){I.info("Mocking prebuilt packages so that they will not be included in the site-packages snapshot because these will be installed from the vendored wheel files at runtime...");for(let o of t.usedPrebuiltPackages){let l=await i.getPackageInfoByName(o);if(l==null)throw new Error(`Package ${o} is not found in the lock file.`);I.debug(`Mock ${l.name} ${l.version}`),r.add_mock_package(l.name,l.version),n.push(l.name)}}I.info("Install the requirements %j",t.requirements),await jg(e,{requirements:t.requirements}),I.info("Remove the mocked packages: %j",n),n.forEach(o=>r.remove_mock_package(o)),I.info("Archive the site-packages director(y|ies)");let s="/tmp/site-packages-snapshot.tar.gz";await e.runPythonAsync(`
|
|
37
37
|
import os
|
|
38
38
|
import tarfile
|
|
39
39
|
import site
|
|
@@ -46,8 +46,8 @@ globstar while`,e,d,r,f,y),this.matchOne(e.slice(d),r.slice(f),i))return this.de
|
|
|
46
46
|
print("Add site-package:", site_packages)
|
|
47
47
|
print(os.listdir(site_packages))
|
|
48
48
|
gzf.add(site_packages)
|
|
49
|
-
`),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await
|
|
50
|
-
`);await
|
|
49
|
+
`),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await bt.default.writeFile(t.saveTo,a)}async function $E(t){I.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await zs(e,{cwd:t.cwd,absolute:!1});if(r.length===0){I.warn(`No files match the pattern "${e}" in "${t.cwd}".`);return}await Promise.all(r.map(async i=>{let n=me.default.resolve(t.cwd,i),s=me.default.resolve(t.destAppDir,i);I.debug(`Copy ${n} to ${s}`),await Ol.default.copy(n,s,{errorOnExist:!0})}))}))}async function WE(t,e){try{await bt.default.access(me.default.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function BE(t){let e=await bt.default.readFile(t,{encoding:"utf-8"});return Mp(e)}async function UE(t,e){let r=e.join(`
|
|
50
|
+
`);await bt.default.writeFile(t,r,{encoding:"utf-8"})}(0,Cg.default)((0,qg.hideBin)(process.argv)).command("* [appHomeDirSource] [packages..]","Put the user code and data and the snapshot of the required packages into the build artifact.",()=>{}).positional("appHomeDirSource",{describe:"[Deprecated] The source directory of the user code and data that will be mounted in the Pyodide file system at app runtime",type:"string",demandOption:!1}).positional("packages",{describe:"[Deprecated] Package names to install.",type:"string",array:!0}).options("project",{describe:"The project directory",type:"string",alias:"p",default:process.cwd()}).options("requirement",{describe:"Install from the given requirements file. This option can be used multiple times.",array:!0,type:"string",alias:"r",default:[],deprecated:!0}).options("keepOldBuild",{type:"boolean",default:!1,alias:"k",describe:"Keep the existing build directory contents except appHomeDir."}).options("pyodideSource",{type:"string",describe:"The base URL or path of the Pyodide files to download or copy, such as the prebuild package wheels and pyodide-lock.json",default:`https://cdn.jsdelivr.net/pyodide/v${Gi.version}/full/`,coerce:t=>(t.endsWith("/")||(t+="/"),t)}).options("logLevel",{type:"string",default:"info",describe:"The log level",choices:["debug","info","warn","error"]}).parseAsync().then(async t=>{I.level=t.logLevel,I.debug("Command line arguments: %j",t);let e=t.project,r=me.default.resolve(e,"./build"),i=me.default.resolve(e,"./package.json"),n=require(i),s=await xp({pathResolutionRoot:e,packageJsonStliteDesktopField:n.stlite?.desktop,fallbacks:{appHomeDirSource:t.appHomeDirSource,packages:t.packages,requirementsTxtFilePaths:t.requirement}});I.info("File/directory patterns to be included: %j",s.files),I.info("Entrypoint: %s",s.entrypoint),I.info("Dependencies: %j",s.dependencies),I.info("`requirements.txt` files: %j",s.requirementsTxtFilePaths);let a=await Promise.all(s.requirementsTxtFilePaths.map(async c=>BE(c))).then(c=>c.flat());I.info("Dependencies from `requirements.txt` files: %j",a);let o=Tp([...s.dependencies,...a]);I.info("Validated dependency list: %j",o),await NE({copyTo:r,keepOld:t.keepOldBuild});let l=await FE({pyodideSource:t.pyodideSource,pyodideRuntimeDir:me.default.resolve(r,"./pyodide"),requirements:o});I.info("The prebuilt packages loaded for the given requirements: %j",l);let u=me.default.resolve(r,"./app_files");await $E({cwd:e,filePathPatterns:s.files,destAppDir:u}),WE(u,s.entrypoint),await IE({requirements:o,usedPrebuiltPackages:l,pyodideSource:t.pyodideSource,pyodideRuntimeDir:me.default.resolve(r,"./pyodide"),saveTo:me.default.resolve(r,"./site-packages-snapshot.tar.gz")}),await UE(me.default.resolve(r,"./prebuilt-packages.txt"),l),await Ep({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:me.default.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
|
|
51
51
|
/*! Bundled license information:
|
|
52
52
|
|
|
53
53
|
safe-buffer/index.js:
|