@stlite/desktop 0.99.1 → 0.100.0

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/bin/dump_artifacts.js +37 -37
  3. package/build/assets/{ArrowVegaLiteChart-B-Kd_jPH-Biiko0Ef.js → ArrowVegaLiteChart-AuhdMhKC-SeC_gJ-J.js} +1 -1
  4. package/build/assets/{Audio-B5gtg70U-Bh9tGjUY.js → Audio-MPOURgx8-aU_D4eY9.js} +1 -1
  5. package/build/assets/{AudioInput-CgFzLi-y-C8cmY_cr.js → AudioInput-D-1IugfD-BGplNYfL.js} +1 -1
  6. package/build/assets/{Balloons-CqQICrNd-BGoQrXhe.js → Balloons-C0le0djA-Rl3P1-Qw.js} +1 -1
  7. package/build/assets/{BidiComponent-CkI6DfPr-CbrqDKKX.js → BidiComponent-BsO32qTF-CaRsffwV.js} +1 -1
  8. package/build/assets/{Button-BOmzB5Yb-Bpnf-WZl.js → Button-AgVrhiWW-CQ3htb45.js} +1 -1
  9. package/build/assets/{ButtonGroup-C5sVTynN-DPa0Tx1x.js → ButtonGroup-DhgjbbBB-UV1LCvdW.js} +1 -1
  10. package/build/assets/{CameraInput-C1f0GN0n-Bo12mEPo.js → CameraInput-CEJ0-YBv-CmSkei37.js} +1 -1
  11. package/build/assets/{ChatInput-ClqoaQw2-PqG4grVV.js → ChatInput-C2YGDsKa-C1FEQeOd.js} +1 -1
  12. package/build/assets/{Checkbox-ClzElazy-D-AYf8eH.js → Checkbox-DpcMXROE-DSO9dPZW.js} +1 -1
  13. package/build/assets/{ColorPicker-mCkrAGPa-CtUHNwYp.js → ColorPicker-DfcSCXdu-BA37Ck4e.js} +1 -1
  14. package/build/assets/{ComponentInstance-B_1vn-IY-BM9ElpU6.js → ComponentInstance-CZJj3rmu-NhIcYIOG.js} +1 -1
  15. package/build/assets/{DataFrame-CXPcdw96-Crfv7wfu.js → DataFrame-BARAH3XB-CnqwPbPm.js} +5 -5
  16. package/build/assets/{DateInput-DzaFFasw-CiMjvLKg.js → DateInput-dJ0HrH9I-DL8FHvR-.js} +1 -1
  17. package/build/assets/{DateTimeInput-WmD8vSCU-K1wv6LRy.js → DateTimeInput-Dc_pZKKa-C7OxzebL.js} +1 -1
  18. package/build/assets/{DeckGlJsonChart-CDmFrnUQ-CKLXTmyf.js → DeckGlJsonChart-dSij3LC8-z_q2cC3l.js} +1 -1
  19. package/build/assets/{DownloadButton-g54AS0W2-qOKvF9wp.js → DownloadButton-5Bz1-AC5-BKem2rXk.js} +1 -1
  20. package/build/assets/{ErrorOutline.esm-B1NqpuZN-D4cKYVYX.js → ErrorOutline.esm-BskdUBnE-7qRVaCY5.js} +1 -1
  21. package/build/assets/{Feedback-DTXGrEzp-Dd_SGEH7.js → Feedback-CQYxHKC--CSr7C1Wx.js} +1 -1
  22. package/build/assets/{FileDownload.esm-B_usFfyI-DvbGAuNe.js → FileDownload.esm-r6GccJGR-bDEy_L2M.js} +1 -1
  23. package/build/assets/{FileUploader-CzCdIxed-CWWB6xZB.js → FileUploader-CFj8fg_u-D1JfDby-.js} +1 -1
  24. package/build/assets/{FormSubmitContent-CstMuKlS-CwJlipqn.js → FormSubmitContent-RGGkQf1N-DmLXheJT.js} +1 -1
  25. package/build/assets/{GraphVizChart-nJ8rg3sZ-B_FsOCth.js → GraphVizChart-BKutiaGH-CUH7s5dq.js} +1 -1
  26. package/build/assets/{Html-CkFoh4ns-BXVZGZ2C.js → Html-D45ILBvq-DbWAwYlg.js} +1 -1
  27. package/build/assets/{IFrame-BklekJPV-_sg-kw0j.js → IFrame-DK-NJrL7-0m_xaaau.js} +1 -1
  28. package/build/assets/{ImageList-l3ue-eW1-CIwYKSdj.js → ImageList-I3kPNHfL-D4nqsHeP.js} +1 -1
  29. package/build/assets/{InputInstructions-C3LBp4_M-BIHPK8ho.js → InputInstructions-C-Zf4oQL-DB03cpCg.js} +1 -1
  30. package/build/assets/{Json-DmaVI2eK-CplwjZhb.js → Json-DSgvYeF6-CGGD4AZF.js} +1 -1
  31. package/build/assets/{LinkButton-D87rEwzB-C31w_f7c.js → LinkButton-DLHHsxjM-CI62E9Lm.js} +1 -1
  32. package/build/assets/{MenuButton-DCWYT9Sm-Cjs_mH64.js → MenuButton-Oq8rRct9-ZWaMUcpm.js} +1 -1
  33. package/build/assets/{Metric-B85kD6qx-D6Bt_A2_.js → Metric-B0YF468a-CFi-iNGW.js} +1 -1
  34. package/build/assets/{Multiselect-Dj9HMUjc-C1tpZV37.js → Multiselect-CVHVCj3g-BAkweYLb.js} +1 -1
  35. package/build/assets/{NumberInput-Bz1Z4Olo-HwfUQwvD.js → NumberInput-eLkJ0pTb-Bm92Kd3x.js} +1 -1
  36. package/build/assets/{PageLink-DxIPOlCu-CAX1QvMp.js → PageLink--V5rxSOF-BYF5Fo3G.js} +1 -1
  37. package/build/assets/{Particles-CgV8FzZe-CZFoM1Ot.js → Particles-DDLlrLpr-LgL3KDiE.js} +1 -1
  38. package/build/assets/{PlotlyChart-DApJXgoh-msWOSLU2.js → PlotlyChart-BVhQF5xf-Bvz7Dcax.js} +1 -1
  39. package/build/assets/{Progress-DXRywIcj-D00Siwwp.js → Progress-BokEk05X-Bv2QkIp3.js} +1 -1
  40. package/build/assets/{ProgressBar-By08lmvS-BN2oE7g_.js → ProgressBar-Buvlf_pb-DyD7N0tJ.js} +1 -1
  41. package/build/assets/{Radio-DZEQy4hT-Cx0uGU2K.js → Radio-CUrfrjvU-B2myln1A.js} +1 -1
  42. package/build/assets/{Selectbox-BywNaXj9-EovVNC_I.js → Selectbox-DwkeQO0S-BhQZidV7.js} +1 -1
  43. package/build/assets/{Slider-sLEYxDUG-Bby7yVsF.js → Slider--afJTFYr-thOxe-ly.js} +1 -1
  44. package/build/assets/{Snow-MxXLnUX_-CCUTgEUd.js → Snow-dqZuIKEv-DME-mG7b.js} +1 -1
  45. package/build/assets/{Spinner-D-YJYPV5-qoM-yuRL.js → Spinner-Bk-w9tKQ-Bwm_Vk6T.js} +1 -1
  46. package/build/assets/{StreamlitSyntaxHighlighter-y_BJ441X-Do55UoZC.js → StreamlitSyntaxHighlighter-U8o3ATK--CsLsQIfZ.js} +1 -1
  47. package/build/assets/{Table-ah-SFAz4-BuzfN8wv.js → Table-JcIvdLi_-D87CQj8k.js} +1 -1
  48. package/build/assets/{TableChart.esm-x67iDGlj-hZSJidLi.js → TableChart.esm-Dpji9oSF-DM4jytuW.js} +1 -1
  49. package/build/assets/{TextArea-COwbG28l-yfu63ssv.js → TextArea-DnpuYIA5-BF6b1Uz8.js} +1 -1
  50. package/build/assets/{TextInput-CPqz-18c-DPGxqoCs.js → TextInput-BOxdqnrF-BhQogAHg.js} +1 -1
  51. package/build/assets/{TimeInput-BQ-fP8Yi-FMCqKedu.js → TimeInput-CjU6O1Hm-BfH2ACHB.js} +1 -1
  52. package/build/assets/{Toast-CGUHIZQI-39x9j5Rs.js → Toast-Dxo0ZqMx-ZaDpGanl.js} +1 -1
  53. package/build/assets/{Video-CWomx7KF-nGUBPGaY.js → Video-CYwcC1JG-ulcwxNbn.js} +1 -1
  54. package/build/assets/{WidgetLabel-DUaobbKW-DD-xWyXR.js → WidgetLabel-DTUHhtk_-EPIQC9md.js} +1 -1
  55. package/build/assets/{WidgetLabelHelpIcon-Dk_Qm9_8-CtMOr4fX.js → WidgetLabelHelpIcon-CfpOYjLN-CUGwBOM8.js} +1 -1
  56. package/build/assets/{WidgetLabelHelpIconInline-CkTH9muE-i_BwkvTR.js → WidgetLabelHelpIconInline-D4j09uRD-MZxp3LdE.js} +1 -1
  57. package/build/assets/{_baseAssignValue-DbpQ8D1L-D2c_-zPN.js → _baseAssignValue-CBJGGLCx-DiCzbxPi.js} +1 -1
  58. package/build/assets/{base-input-CUlWnT-V-BhBQbzWk.js → base-input-YEUHRI4X-r3jc5z5D.js} +1 -1
  59. package/build/assets/{checkbox-CEu7IJmq-3LmskyhR.js → checkbox-iHgvbvtl-BQg_ZqeS.js} +1 -1
  60. package/build/assets/{constants-BFZIinC9-BhIl5GAK.js → constants-PqcOHKIA-Am2_uapM.js} +1 -1
  61. package/build/assets/{createDownloadLinkElement-CO9Q-pa0-BNUtAwjF.js → createDownloadLinkElement-CwAYcc1e-DbJb0I6l.js} +1 -1
  62. package/build/assets/{createSuper-CPupKoXU-C5x8b8jJ.js → createSuper-DwpxHxg4-FoILwayq.js} +1 -1
  63. package/build/assets/{data-grid-overlay-editor-D7_bQukB-DqAp5wnt.js → data-grid-overlay-editor-CLo-w1F9-B0x2Sg0-.js} +1 -1
  64. package/build/assets/{downloader-CZ7qD7NY-DGAnDDXL.js → downloader-CZ7qD7NY-Df1O1edF.js} +1 -1
  65. package/build/assets/{embed-Dc8baQ26-DAsqJZrc.js → embed-Dq8jQdGh-CBVvTzpb.js} +1 -1
  66. package/build/assets/{es6-BxevHr5y-DDD2E1qH.js → es6-BxevHr5y-BuJv1L-s.js} +2 -2
  67. package/build/assets/{formatNumber-DxMjoq14-D-XVTuz9.js → formatNumber-DefaFHuv-BSZLG6Yx.js} +1 -1
  68. package/build/assets/{iconPosition-9UgvX_TD-BzkVt95G.js → iconPosition-BPGPKkjQ-DDZxDFyf.js} +1 -1
  69. package/build/assets/{iframeResizer.contentWindow-CCqu70r3-2dQhJjwY.js → iframeResizer.contentWindow-bVTYWYos-CjhKIaGT.js} +1 -1
  70. package/build/assets/{index-BV2WTlzI-BDu7x5w-.js → index-BxCkce84-CXTDYP74.js} +1 -1
  71. package/build/assets/{index-DJf52eor.js → index-CHE20_1-.js} +6 -6
  72. package/build/assets/{index-CDNzkMOW-Ci5P-rfD.js → index-CeKcUppy-CpcuvBWq.js} +1 -1
  73. package/build/assets/{index-Co96_X1M-Dl06Rnsd.js → index-D1kjTmWN-D-hzXEqP.js} +1 -1
  74. package/build/assets/{index-BoaYS_fk-BOYhDwkq.js → index-DJIbJyKa-D4FORpfO.js} +1 -1
  75. package/build/assets/{index-CJ4tMOMA-DwN410du.js → index-I7jKEriY-B-n9NbT_.js} +1 -1
  76. package/build/assets/{input-HUYzfsf9-BxmLV7Ek.js → input-YNBnpJ12-038QD4s4.js} +1 -1
  77. package/build/assets/{memory-C-LDMFc2-DmYLyk9H.js → memory-C-LDMFc2-CpCm65Br.js} +1 -1
  78. package/build/assets/{number-overlay-editor-BQXyYsVn-Dh7S4LVs.js → number-overlay-editor-Cdnv58wS-HWHegkI_.js} +1 -1
  79. package/build/assets/{pandasStylerUtils-BVB-ECxE-CDURxvwo.js → pandasStylerUtils-DjDsh9Sw-f2V2gA5b.js} +1 -1
  80. package/build/assets/{possibleConstructorReturn-YeRoNy63-B2FGD3ja.js → possibleConstructorReturn-p-fKXom_-BPFgGBwd.js} +1 -1
  81. package/build/assets/{reactJsonViewCompat-CeSrJm8p-le930912.js → reactJsonViewCompat-gGOZBlvq-BHD6wBsT.js} +1 -1
  82. package/build/assets/{sandbox-DbnteG5V-yqy_7sO8.js → sandbox-DbnteG5V-DKMo4DSb.js} +1 -1
  83. package/build/assets/{select-haj_e3M_-P2nevO2w.js → select-DbfjugKJ-C8EDw3eO.js} +1 -1
  84. package/build/assets/{sprintfjs-DwuHM96D-Dbm-A0ro.js → sprintfjs-D5kvUrjM--36qIaY-.js} +1 -1
  85. package/build/assets/{stateful-menu-DhWFcRsJ-hkmyKt6q.js → stateful-menu-DsDbGVB_-C8xJ2Uve.js} +1 -1
  86. package/build/assets/{styled-components-BwoIjXty-eQCTyKeV.js → styled-components-BsL0GiBO-C2azWTC8.js} +1 -1
  87. package/build/assets/{styled-components-CggDa8xh-DRn7YfuV.js → styled-components-CZ4GSHz4-BVEj2YLE.js} +1 -1
  88. package/build/assets/{styled-components-CRl5ROSi-CaifWlLZ.js → styled-components-aeDchaOw-CDmV3dyQ.js} +1 -1
  89. package/build/assets/{timepicker-t1TdfIJG-CM4-XB8w.js → timepicker-BIFo5a1u-DTWDwWXK.js} +1 -1
  90. package/build/assets/{toConsumableArray-DtFGUM3A-BLxO6YGd.js → toConsumableArray-BJ_-nsuo-BPUSYd8M.js} +1 -1
  91. package/build/assets/{useBasicWidgetState-Bd8NTj87-Cqs9ZQAV.js → useBasicWidgetState-oLSfk0mv-C-D-ncQp.js} +1 -1
  92. package/build/assets/{useIntlLocale-CXWYgGQX-B2q3sAu2.js → useIntlLocale-BELAEOpY-BzvvmoUT.js} +1 -1
  93. package/build/assets/{useSelectCommon-O2yZsfjb-6cuQoolB.js → useSelectCommon-_ffsRexw-DbdQDzQX.js} +1 -1
  94. package/build/assets/{useTextInputAutoExpand-BTuNAk3V-5wcrsLsu.js → useTextInputAutoExpand-Coetw41P-BCx9E5Py.js} +1 -1
  95. package/build/assets/{useUpdateUiValue-B574r2my-B36XHNQq.js → useUpdateUiValue-CAsGHNl5-wS4IfynZ.js} +1 -1
  96. package/build/assets/{useWaveformController-EemjKAv5-CT3VAgB8.js → useWaveformController-B-n3rX5g-BppMHOmS.js} +1 -1
  97. package/build/assets/{utils-DNbZWtPr-BHo82ec1.js → utils-CzD7XIpv-COJ6XrrX.js} +1 -1
  98. package/build/assets/{withCalculatedWidth-CswVJ4Re-BeXEmgBt.js → withCalculatedWidth-nNNFed9I-Fzz_WpIw.js} +1 -1
  99. package/build/assets/{withFullScreenWrapper-CKo__VbV-B1HqecCF.js → withFullScreenWrapper-jebSlaHO-C2WriMN7.js} +1 -1
  100. package/build/electron/main.js +2 -2
  101. package/build/electron/manifest.js +1 -0
  102. package/build/index.html +1 -1
  103. package/package.json +34 -39
  104. package/wheels/streamlit-1.56.0-cp313-none-any.whl +0 -0
@@ -3,55 +3,55 @@
3
3
  import { createRequire } from "module";
4
4
  const require = createRequire(import.meta.url);
5
5
 
6
- var rp=Object.create;var da=Object.defineProperty;var ip=Object.getOwnPropertyDescriptor;var np=Object.getOwnPropertyNames;var sp=Object.getPrototypeOf,op=Object.prototype.hasOwnProperty;var C=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ap=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of np(t))!op.call(e,n)&&n!==r&&da(e,n,{get:()=>t[n],enumerable:!(i=ip(t,n))||i.enumerable});return e};var yi=(e,t,r)=>(r=e!=null?rp(sp(e)):{},ap(t||!e||!e.__esModule?da(r,"default",{value:e,enumerable:!0}):r,e));var Re=v((OS,pa)=>{"use strict";var Qn=class e extends Error{constructor(t){super(`Format functions must be synchronous taking a two arguments: (info, opts)
7
- Found: ${t.toString().split(`
6
+ var up=Object.create;var Fa=Object.defineProperty;var fp=Object.getOwnPropertyDescriptor;var cp=Object.getOwnPropertyNames;var hp=Object.getPrototypeOf,dp=Object.prototype.hasOwnProperty;var L=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var pp=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of cp(e))!dp.call(t,n)&&n!==r&&Fa(t,n,{get:()=>e[n],enumerable:!(i=fp(e,n))||i.enumerable});return t};var ds=(t,e,r)=>(r=t!=null?up(hp(t)):{},pp(e||!t||!t.__esModule?Fa(r,"default",{value:t,enumerable:!0}):r,t));var js=_((Zi,jl)=>{(function(t,e){typeof Zi=="object"&&typeof jl<"u"?e(Zi):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Zi,(function(t){"use strict";class e extends TypeError{constructor(g,y){let w,{message:O,explanation:P,...$}=g,{path:Z}=g,Q=Z.length===0?O:`At path: ${Z.join(".")} -- ${O}`;super(P??Q),P!=null&&(this.cause=Q),Object.assign(this,$),this.name=this.constructor.name,this.failures=()=>w??(w=[g,...y()])}}function r(h){return i(h)&&typeof h[Symbol.iterator]=="function"}function i(h){return typeof h=="object"&&h!=null}function n(h){return i(h)&&!Array.isArray(h)}function s(h){if(Object.prototype.toString.call(h)!=="[object Object]")return!1;let g=Object.getPrototypeOf(h);return g===null||g===Object.prototype}function o(h){return typeof h=="symbol"?h.toString():typeof h=="string"?JSON.stringify(h):`${h}`}function a(h){let{done:g,value:y}=h.next();return g?void 0:y}function l(h,g,y,w){if(h===!0)return;h===!1?h={}:typeof h=="string"&&(h={message:h});let{path:O,branch:P}=g,{type:$}=y,{refinement:Z,message:Q=`Expected a value of type \`${$}\`${Z?` with refinement \`${Z}\``:""}, but received: \`${o(w)}\``}=h;return{value:w,type:$,refinement:Z,key:O[O.length-1],path:O,branch:P,...h,message:Q}}function*u(h,g,y,w){r(h)||(h=[h]);for(let O of h){let P=l(O,g,y,w);P&&(yield P)}}function*c(h,g,y={}){let{path:w=[],branch:O=[h],coerce:P=!1,mask:$=!1}=y,Z={path:w,branch:O,mask:$};P&&(h=g.coercer(h,Z));let Q="valid";for(let ie of g.validator(h,Z))ie.explanation=y.message,Q="not_valid",yield[ie,void 0];for(let[ie,ke,ap]of g.entries(h,Z)){let lp=c(ke,ap,{path:ie===void 0?w:[...w,ie],branch:ie===void 0?O:[...O,ke],coerce:P,mask:$,message:y.message});for(let Di of lp)Di[0]?(Q=Di[0].refinement!=null?"not_refined":"not_valid",yield[Di[0],void 0]):P&&(ke=Di[1],ie===void 0?h=ke:h instanceof Map?h.set(ie,ke):h instanceof Set?h.add(ke):i(h)&&(ke!==void 0||ie in h)&&(h[ie]=ke))}if(Q!=="not_valid")for(let ie of g.refiner(h,Z))ie.explanation=y.message,Q="not_refined",yield[ie,void 0];Q==="valid"&&(yield[void 0,h])}class f{constructor(g){let{type:y,schema:w,validator:O,refiner:P,coercer:$=Q=>Q,entries:Z=function*(){}}=g;this.type=y,this.schema=w,this.entries=Z,this.coercer=$,O?this.validator=(Q,ie)=>{let ke=O(Q,ie);return u(ke,ie,this,Q)}:this.validator=()=>[],P?this.refiner=(Q,ie)=>{let ke=P(Q,ie);return u(ke,ie,this,Q)}:this.refiner=()=>[]}assert(g,y){return p(g,this,y)}create(g,y){return m(g,this,y)}is(g){return b(g,this)}mask(g,y){return d(g,this,y)}validate(g,y={}){return v(g,this,y)}}function p(h,g,y){let w=v(h,g,{message:y});if(w[0])throw w[0]}function m(h,g,y){let w=v(h,g,{coerce:!0,message:y});if(w[0])throw w[0];return w[1]}function d(h,g,y){let w=v(h,g,{coerce:!0,mask:!0,message:y});if(w[0])throw w[0];return w[1]}function b(h,g){return!v(h,g)[0]}function v(h,g,y={}){let w=c(h,g,y),O=a(w);return O[0]?[new e(O[0],function*(){for(let $ of w)$[0]&&(yield $[0])}),void 0]:[void 0,O[1]]}function S(...h){let g=h[0].type==="type",y=h.map(O=>O.schema),w=Object.assign({},...y);return g?ut(w):lt(w)}function T(h,g){return new f({type:h,schema:null,validator:g})}function R(h,g){return new f({...h,refiner:(y,w)=>y===void 0||h.refiner(y,w),validator(y,w){return y===void 0?!0:(g(y,w),h.validator(y,w))}})}function x(h){return new f({type:"dynamic",schema:null,*entries(g,y){yield*h(g,y).entries(g,y)},validator(g,y){return h(g,y).validator(g,y)},coercer(g,y){return h(g,y).coercer(g,y)},refiner(g,y){return h(g,y).refiner(g,y)}})}function k(h){let g;return new f({type:"lazy",schema:null,*entries(y,w){g??(g=h()),yield*g.entries(y,w)},validator(y,w){return g??(g=h()),g.validator(y,w)},coercer(y,w){return g??(g=h()),g.coercer(y,w)},refiner(y,w){return g??(g=h()),g.refiner(y,w)}})}function I(h,g){let{schema:y}=h,w={...y};for(let O of g)delete w[O];switch(h.type){case"type":return ut(w);default:return lt(w)}}function C(h){let g=h instanceof f,y=g?{...h.schema}:{...h};for(let w in y)y[w]=At(y[w]);return g&&h.type==="type"?ut(y):lt(y)}function U(h,g){let{schema:y}=h,w={};for(let O of g)w[O]=y[O];switch(h.type){case"type":return ut(w);default:return lt(w)}}function q(h,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),T(h,g)}function G(){return T("any",()=>!0)}function te(h){return new f({type:"array",schema:h,*entries(g){if(h&&Array.isArray(g))for(let[y,w]of g.entries())yield[y,w,h]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${o(g)}`}})}function re(){return T("bigint",h=>typeof h=="bigint")}function we(){return T("boolean",h=>typeof h=="boolean")}function _e(){return T("date",h=>h instanceof Date&&!isNaN(h.getTime())||`Expected a valid \`Date\` object, but received: ${o(h)}`)}function at(h){let g={},y=h.map(w=>o(w)).join();for(let w of h)g[w]=w;return new f({type:"enums",schema:g,validator(w){return h.includes(w)||`Expected one of \`${y}\`, but received: ${o(w)}`}})}function E(){return T("func",h=>typeof h=="function"||`Expected a function, but received: ${o(h)}`)}function A(h){return T("instance",g=>g instanceof h||`Expected a \`${h.name}\` instance, but received: ${o(g)}`)}function z(){return T("integer",h=>typeof h=="number"&&!isNaN(h)&&Number.isInteger(h)||`Expected an integer, but received: ${o(h)}`)}function me(h){return new f({type:"intersection",schema:null,*entries(g,y){for(let w of h)yield*w.entries(g,y)},*validator(g,y){for(let w of h)yield*w.validator(g,y)},*refiner(g,y){for(let w of h)yield*w.refiner(g,y)}})}function D(h){let g=o(h),y=typeof h;return new f({type:"literal",schema:y==="string"||y==="number"||y==="boolean"?h:null,validator(w){return w===h||`Expected the literal \`${g}\`, but received: ${o(w)}`}})}function Ae(h,g){return new f({type:"map",schema:null,*entries(y){if(h&&g&&y instanceof Map)for(let[w,O]of y.entries())yield[w,w,h],yield[w,O,g]},coercer(y){return y instanceof Map?new Map(y):y},validator(y){return y instanceof Map||`Expected a \`Map\` object, but received: ${o(y)}`}})}function je(){return T("never",()=>!1)}function Ot(h){return new f({...h,validator:(g,y)=>g===null||h.validator(g,y),refiner:(g,y)=>g===null||h.refiner(g,y)})}function Qt(){return T("number",h=>typeof h=="number"&&!isNaN(h)||`Expected a number, but received: ${o(h)}`)}function lt(h){let g=h?Object.keys(h):[],y=je();return new f({type:"object",schema:h||null,*entries(w){if(h&&i(w)){let O=new Set(Object.keys(w));for(let P of g)O.delete(P),yield[P,w[P],h[P]];for(let P of O)yield[P,w[P],y]}},validator(w){return n(w)||`Expected an object, but received: ${o(w)}`},coercer(w,O){if(!n(w))return w;let P={...w};if(O.mask&&h)for(let $ in P)h[$]===void 0&&delete P[$];return P}})}function At(h){return new f({...h,validator:(g,y)=>g===void 0||h.validator(g,y),refiner:(g,y)=>g===void 0||h.refiner(g,y)})}function hs(h,g){return new f({type:"record",schema:null,*entries(y){if(i(y))for(let w in y){let O=y[w];yield[w,w,h],yield[w,O,g]}},validator(y){return n(y)||`Expected an object, but received: ${o(y)}`},coercer(y){return n(y)?{...y}:y}})}function Te(){return T("regexp",h=>h instanceof RegExp)}function Ti(h){return new f({type:"set",schema:null,*entries(g){if(h&&g instanceof Set)for(let y of g)yield[y,y,h]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${o(g)}`}})}function Mi(){return T("string",h=>typeof h=="string"||`Expected a string, but received: ${o(h)}`)}function Oi(h){let g=je();return new f({type:"tuple",schema:null,*entries(y){if(Array.isArray(y)){let w=Math.max(h.length,y.length);for(let O=0;O<w;O++)yield[O,y[O],h[O]||g]}},validator(y){return Array.isArray(y)||`Expected an array, but received: ${o(y)}`},coercer(y){return Array.isArray(y)?y.slice():y}})}function ut(h){let g=Object.keys(h);return new f({type:"type",schema:h,*entries(y){if(i(y))for(let w of g)yield[w,y[w],h[w]]},validator(y){return n(y)||`Expected an object, but received: ${o(y)}`},coercer(y){return n(y)?{...y}:y}})}function Xt(h){let g=h.map(y=>y.type).join(" | ");return new f({type:"union",schema:null,coercer(y,w){for(let O of h){let[P,$]=O.validate(y,{coerce:!0,mask:w.mask});if(!P)return $}return y},validator(y,w){let O=[];for(let P of h){let[...$]=c(y,P,w),[Z]=$;if(Z[0])for(let[Q]of $)Q&&O.push(Q);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${o(y)}`,...O]}})}function kt(){return T("unknown",()=>!0)}function Ar(h,g,y){return new f({...h,coercer:(w,O)=>b(w,g)?h.coercer(y(w,O),O):h.coercer(w,O)})}function Dt(h,g,y={}){return Ar(h,kt(),w=>{let O=typeof g=="function"?g():g;if(w===void 0)return O;if(!y.strict&&s(w)&&s(O)){let P={...w},$=!1;for(let Z in O)P[Z]===void 0&&(P[Z]=O[Z],$=!0);if($)return P}return w})}function ft(h){return Ar(h,Mi(),g=>g.trim())}function kr(h){return Pt(h,"empty",g=>{let y=Ai(g);return y===0||`Expected an empty ${h.type} but received one with a size of \`${y}\``})}function Ai(h){return h instanceof Map||h instanceof Set?h.size:h.length}function ki(h,g,y={}){let{exclusive:w}=y;return Pt(h,"max",O=>w?O<g:O<=g||`Expected a ${h.type} less than ${w?"":"or equal to "}${g} but received \`${O}\``)}function ip(h,g,y={}){let{exclusive:w}=y;return Pt(h,"min",O=>w?O>g:O>=g||`Expected a ${h.type} greater than ${w?"":"or equal to "}${g} but received \`${O}\``)}function np(h){return Pt(h,"nonempty",g=>Ai(g)>0||`Expected a nonempty ${h.type} but received an empty one`)}function sp(h,g){return Pt(h,"pattern",y=>g.test(y)||`Expected a ${h.type} matching \`/${g.source}/\` but received "${y}"`)}function op(h,g,y=g){let w=`Expected a ${h.type}`,O=g===y?`of \`${g}\``:`between \`${g}\` and \`${y}\``;return Pt(h,"size",P=>{if(typeof P=="number"||P instanceof Date)return g<=P&&P<=y||`${w} ${O} but received \`${P}\``;if(P instanceof Map||P instanceof Set){let{size:$}=P;return g<=$&&$<=y||`${w} with a size ${O} but received one with a size of \`${$}\``}else{let{length:$}=P;return g<=$&&$<=y||`${w} with a length ${O} but received one with a length of \`${$}\``}})}function Pt(h,g,y){return new f({...h,*refiner(w,O){yield*h.refiner(w,O);let P=y(w,O),$=u(P,O,h,w);for(let Z of $)yield{...Z,refinement:g}}})}t.Struct=f,t.StructError=e,t.any=G,t.array=te,t.assert=p,t.assign=S,t.bigint=re,t.boolean=we,t.coerce=Ar,t.create=m,t.date=_e,t.defaulted=Dt,t.define=T,t.deprecated=R,t.dynamic=x,t.empty=kr,t.enums=at,t.func=E,t.instance=A,t.integer=z,t.intersection=me,t.is=b,t.lazy=k,t.literal=D,t.map=Ae,t.mask=d,t.max=ki,t.min=ip,t.never=je,t.nonempty=np,t.nullable=Ot,t.number=Qt,t.object=lt,t.omit=I,t.optional=At,t.partial=C,t.pattern=sp,t.pick=U,t.record=hs,t.refine=Pt,t.regexp=Te,t.set=Ti,t.size=op,t.string=Mi,t.struct=q,t.trimmed=ft,t.tuple=Oi,t.type=ut,t.union=Xt,t.unknown=kt,t.validate=v}))});var Re=_((s2,Il)=>{"use strict";var Fs=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
7
+ Found: ${e.toString().split(`
8
8
  `)[0]}
9
- `),Error.captureStackTrace(this,e)}};pa.exports=e=>{if(e.length>2)throw new Qn(e);function t(i={}){this.options=i}t.prototype.transform=e;function r(i){return new t(i)}return r.Format=t,r}});var ba=v((TS,ya)=>{var ma={};ya.exports=ma;var ga={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(ga).forEach(function(e){var t=ga[e],r=ma[e]=[];r.open="\x1B["+t[0]+"m",r.close="\x1B["+t[1]+"m"})});var va=v((kS,wa)=>{"use strict";wa.exports=function(e,t){t=t||process.argv||[];var r=t.indexOf("--"),i=/^-{1,2}/.test(e)?"":"--",n=t.indexOf(i+e);return n!==-1&&(r===-1?!0:n<r)}});var Sa=v((AS,_a)=>{"use strict";var lp=C("os"),$e=va(),ve=process.env,Zt=void 0;$e("no-color")||$e("no-colors")||$e("color=false")?Zt=!1:($e("color")||$e("colors")||$e("color=true")||$e("color=always"))&&(Zt=!0);"FORCE_COLOR"in ve&&(Zt=ve.FORCE_COLOR.length===0||parseInt(ve.FORCE_COLOR,10)!==0);function up(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function hp(e){if(Zt===!1)return 0;if($e("color=16m")||$e("color=full")||$e("color=truecolor"))return 3;if($e("color=256"))return 2;if(e&&!e.isTTY&&Zt!==!0)return 0;var t=Zt?1:0;if(process.platform==="win32"){var r=lp.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 ve)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in ve})||ve.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in ve)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ve.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in ve){var i=parseInt((ve.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ve.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ve.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(ve.TERM)||"COLORTERM"in ve?1:(ve.TERM==="dumb",t)}function Xn(e){var t=hp(e);return up(t)}_a.exports={supportsColor:Xn,stdout:Xn(process.stdout),stderr:Xn(process.stderr)}});var Ra=v((PS,Ea)=>{Ea.exports=function(t,r){var i="";t=t||"Run the trap, drop the bass",t=t.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 t.forEach(function(s){s=s.toLowerCase();var o=n[s]||[" "],a=Math.floor(Math.random()*o.length);typeof n[s]<"u"?i+=n[s][a]:i+=s}),i}});var Ma=v((qS,xa)=>{xa.exports=function(t,r){t=t||" 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 o(l){var u=!1;return n.filter(function(d){u=d===l}),u}function a(l,u){var d="",h,p;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(p in l)if(!o(p)){switch(d=d+l[p],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 y=["up","mid","down"];for(var f in y)for(var b=y[f],S=0;S<=h[b];S++)u[b]&&(d=d+i[b][s(i[b].length)])}return d}return a(t,r)}});var Ta=v((jS,Oa)=>{Oa.exports=function(e){return function(t,r,i){if(t===" ")return t;switch(r%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}});var Aa=v((DS,ka)=>{ka.exports=function(e){return function(t,r,i){return r%2===0?t:e.inverse(t)}}});var qa=v((CS,Pa)=>{Pa.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(r,i,n){return r===" "?r:e[t[i++%t.length]](r)}}});var Da=v((LS,ja)=>{ja.exports=function(e){var t=["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:e[t[Math.round(Math.random()*(t.length-2))]](r)}}});var Ia=v((FS,$a)=>{var F={};$a.exports=F;F.themes={};var fp=C("util"),Pt=F.styles=ba(),La=Object.defineProperties,cp=new RegExp(/[\r\n]+/g);F.supportsColor=Sa().supportsColor;typeof F.enabled>"u"&&(F.enabled=F.supportsColor()!==!1);F.enable=function(){F.enabled=!0};F.disable=function(){F.enabled=!1};F.stripColors=F.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var NS=F.stylize=function(t,r){if(!F.enabled)return t+"";var i=Pt[r];return!i&&r in F?F[r](t):i.open+t+i.close},dp=/[|\\{}()[\]^$+*?.]/g,pp=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(dp,"\\$&")};function Na(e){var t=function r(){return mp.apply(r,arguments)};return t._styles=e,t.__proto__=gp,t}var Fa=(function(){var e={};return Pt.grey=Pt.gray,Object.keys(Pt).forEach(function(t){Pt[t].closeRe=new RegExp(pp(Pt[t].close),"g"),e[t]={get:function(){return Na(this._styles.concat(t))}}}),e})(),gp=La(function(){},Fa);function mp(){var e=Array.prototype.slice.call(arguments),t=e.map(function(o){return o!=null&&o.constructor===String?o:fp.inspect(o)}).join(" ");if(!F.enabled||!t)return t;for(var r=t.indexOf(`
10
- `)!=-1,i=this._styles,n=i.length;n--;){var s=Pt[i[n]];t=s.open+t.replace(s.closeRe,s.open)+s.close,r&&(t=t.replace(cp,function(o){return s.close+o+s.open}))}return t}F.setTheme=function(e){if(typeof e=="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 t in e)(function(r){F[r]=function(i){if(typeof e[r]=="object"){var n=i;for(var s in e[r])n=F[e[r][s]](n);return n}return F[e[r]](i)}})(t)};function yp(){var e={};return Object.keys(Fa).forEach(function(t){e[t]={get:function(){return Na([t])}}}),e}var bp=function(t,r){var i=r.split("");return i=i.map(t),i.join("")};F.trap=Ra();F.zalgo=Ma();F.maps={};F.maps.america=Ta()(F);F.maps.zebra=Aa()(F);F.maps.rainbow=qa()(F);F.maps.random=Da()(F);for(Ca in F.maps)(function(e){F[e]=function(t){return bp(F.maps[e],t)}})(Ca);var Ca;La(F,yp())});var es=v(($S,Wa)=>{var wp=Ia();Wa.exports=wp});var Ba=v(ts=>{"use strict";ts.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};ts.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var Ua=v(rs=>{"use strict";rs.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};rs.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var za=v(is=>{"use strict";is.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};is.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var Ha=v(bi=>{"use strict";Object.defineProperty(bi,"cli",{value:Ba()});Object.defineProperty(bi,"npm",{value:Ua()});Object.defineProperty(bi,"syslog",{value:za()})});var te=v(_r=>{"use strict";Object.defineProperty(_r,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(_r,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(_r,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(_r,"configs",{value:Ha()})});var _i=v((HS,vi)=>{"use strict";var os=es(),{LEVEL:ns,MESSAGE:ss}=te();os.enabled=!0;var Ga=/\s+/,wi=class e{constructor(t={}){t.colors&&this.addColors(t.colors),this.options=t}static addColors(t){let r=Object.keys(t).reduce((i,n)=>(i[n]=Ga.test(t[n])?t[n].split(Ga):t[n],i),{});return e.allColors=Object.assign({},e.allColors||{},r),e.allColors}addColors(t){return e.addColors(t)}colorize(t,r,i){if(typeof i>"u"&&(i=r),!Array.isArray(e.allColors[t]))return os[e.allColors[t]](i);for(let n=0,s=e.allColors[t].length;n<s;n++)i=os[e.allColors[t][n]](i);return i}transform(t,r){return r.all&&typeof t[ss]=="string"&&(t[ss]=this.colorize(t[ns],t.level,t[ss])),(r.level||r.all||!r.message)&&(t.level=this.colorize(t[ns],t.level)),(r.all||r.message)&&(t.message=this.colorize(t[ns],t.level,t.message)),t}};vi.exports=e=>new wi(e);vi.exports.Colorizer=vi.exports.Format=wi});var Ya=v((GS,Va)=>{"use strict";var{Colorizer:vp}=_i();Va.exports=e=>(vp.addColors(e.colors||e),e)});var Ka=v((VS,Ja)=>{"use strict";var _p=Re();Ja.exports=_p(e=>(e.message=` ${e.message}`,e))});var Xa=v((YS,Qa)=>{"use strict";var Sp=Re(),{LEVEL:Za,MESSAGE:as}=te();Qa.exports=Sp((e,{stack:t,cause:r})=>{if(e instanceof Error){let n=Object.assign({},e,{level:e.level,[Za]:e[Za]||e.level,message:e.message,[as]:e[as]||e.message});return t&&(n.stack=e.stack),r&&(n.cause=e.cause),n}if(!(e.message instanceof Error))return e;let i=e.message;return Object.assign(e,i),e.message=i.message,e[as]=i.message,t&&(e.stack=i.stack),r&&(e.cause=i.cause),e})});var us=v((JS,Ei)=>{"use strict";var{configs:Ep,LEVEL:el,MESSAGE:ls}=te(),Si=class e{constructor(t={levels:Ep.npm.levels}){this.paddings=e.paddingForLevels(t.levels,t.filler),this.options=t}static getLongestLevel(t){let r=Object.keys(t).map(i=>i.length);return Math.max(...r)}static paddingForLevel(t,r,i){let n=i+1-t.length,s=Math.floor(n/r.length);return`${r}${r.repeat(s)}`.slice(0,n)}static paddingForLevels(t,r=" "){let i=e.getLongestLevel(t);return Object.keys(t).reduce((n,s)=>(n[s]=e.paddingForLevel(s,r,i),n),{})}transform(t,r){return t.message=`${this.paddings[t[el]]}${t.message}`,t[ls]&&(t[ls]=`${this.paddings[t[el]]}${t[ls]}`),t}};Ei.exports=e=>new Si(e);Ei.exports.Padder=Ei.exports.Format=Si});var tl=v((KS,hs)=>{"use strict";var{Colorizer:Rp}=_i(),{Padder:xp}=us(),{configs:Mp,MESSAGE:Op}=te(),Ri=class{constructor(t={}){t.levels||(t.levels=Mp.cli.levels),this.colorizer=new Rp(t),this.padder=new xp(t),this.options=t}transform(t,r){return this.colorizer.transform(this.padder.transform(t,r),r),t[Op]=`${t.level}:${t.message}`,t}};hs.exports=e=>new Ri(e);hs.exports.Format=Ri});var il=v((ZS,fs)=>{"use strict";var Tp=Re();function rl(e){if(e.every(kp))return t=>{let r=t;for(let i=0;i<e.length;i++)if(r=e[i].transform(r,e[i].options),!r)return!1;return r}}function kp(e){if(typeof e.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(`
11
- `));return!0}fs.exports=(...e)=>{let t=Tp(rl(e)),r=t();return r.Format=t.Format,r};fs.exports.cascade=rl});var Er=v((gs,ol)=>{"use strict";var{hasOwnProperty:Sr}=Object.prototype,jt=ps();jt.configure=ps;jt.stringify=jt;jt.default=jt;gs.stringify=jt;gs.configure=ps;ol.exports=jt;var Ap=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ut(e){return e.length<5e3&&!Ap.test(e)?`"${e}"`:JSON.stringify(e)}function cs(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],n=r;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var Pp=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function ds(e){return Pp.call(e)!==void 0&&e.length!==0}function nl(e,t,r){e.length<r&&(r=e.length);let i=t===","?"":" ",n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++)n+=`${t}"${s}":${i}${e[s]}`;return n}function qp(e){if(Sr.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===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 jp(e){let t;if(Sr.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Dp(e,t){let r;if(Sr.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function sl(e,t){let r;if(Sr.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function qt(e){return e===1?"1 item":`${e} items`}function Cp(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Lp(e){if(Sr.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)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 ps(e){e={...e};let t=Lp(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=qp(e),i=Dp(e,"bigint"),n=jp(e),s=typeof n=="function"?n:void 0,o=sl(e,"maximumDepth"),a=sl(e,"maximumBreadth");function l(y,f,b,S,E,x){let R=f[y];switch(typeof R=="object"&&R!==null&&typeof R.toJSON=="function"&&(R=R.toJSON(y)),R=S.call(f,y,R),typeof R){case"string":return ut(R);case"object":{if(R===null)return"null";if(b.indexOf(R)!==-1)return r;let O="",A=",",I=x;if(Array.isArray(R)){if(R.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(R),E!==""&&(x+=E,O+=`
12
- ${x}`,A=`,
13
- ${x}`);let re=Math.min(R.length,a),be=0;for(;be<re-1;be++){let st=l(String(be),R,b,S,E,x);O+=st!==void 0?st:"null",O+=A}let we=l(String(be),R,b,S,E,x);if(O+=we!==void 0?we:"null",R.length-1>a){let st=R.length-a-1;O+=`${A}"... ${qt(st)} not stringified"`}return E!==""&&(O+=`
14
- ${I}`),b.pop(),`[${O}]`}let D=Object.keys(R),z=D.length;if(z===0)return"{}";if(o<b.length+1)return'"[Object]"';let j="",V="";E!==""&&(x+=E,A=`,
15
- ${x}`,j=" ");let ae=Math.min(z,a);n&&!ds(R)&&(D=cs(D,s)),b.push(R);for(let re=0;re<ae;re++){let be=D[re],we=l(be,R,b,S,E,x);we!==void 0&&(O+=`${V}${ut(be)}:${j}${we}`,V=A)}if(z>a){let re=z-a;O+=`${V}"...":${j}"${qt(re)} not stringified"`,V=A}return E!==""&&V.length>1&&(O=`
16
- ${x}${O}
17
- ${I}`),b.pop(),`{${O}}`}case"number":return isFinite(R)?String(R):t?t(R):"null";case"boolean":return R===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(R);default:return t?t(R):void 0}}function u(y,f,b,S,E,x){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(y)),typeof f){case"string":return ut(f);case"object":{if(f===null)return"null";if(b.indexOf(f)!==-1)return r;let R=x,O="",A=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(f),E!==""&&(x+=E,O+=`
18
- ${x}`,A=`,
19
- ${x}`);let z=Math.min(f.length,a),j=0;for(;j<z-1;j++){let ae=u(String(j),f[j],b,S,E,x);O+=ae!==void 0?ae:"null",O+=A}let V=u(String(j),f[j],b,S,E,x);if(O+=V!==void 0?V:"null",f.length-1>a){let ae=f.length-a-1;O+=`${A}"... ${qt(ae)} not stringified"`}return E!==""&&(O+=`
20
- ${R}`),b.pop(),`[${O}]`}b.push(f);let I="";E!==""&&(x+=E,A=`,
21
- ${x}`,I=" ");let D="";for(let z of S){let j=u(z,f[z],b,S,E,x);j!==void 0&&(O+=`${D}${ut(z)}:${I}${j}`,D=A)}return E!==""&&D.length>1&&(O=`
22
- ${x}${O}
23
- ${R}`),b.pop(),`{${O}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function d(y,f,b,S,E){switch(typeof f){case"string":return ut(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(y),typeof f!="object")return d(y,f,b,S,E);if(f===null)return"null"}if(b.indexOf(f)!==-1)return r;let x=E;if(Array.isArray(f)){if(f.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(f),E+=S;let j=`
24
- ${E}`,V=`,
25
- ${E}`,ae=Math.min(f.length,a),re=0;for(;re<ae-1;re++){let we=d(String(re),f[re],b,S,E);j+=we!==void 0?we:"null",j+=V}let be=d(String(re),f[re],b,S,E);if(j+=be!==void 0?be:"null",f.length-1>a){let we=f.length-a-1;j+=`${V}"... ${qt(we)} not stringified"`}return j+=`
26
- ${x}`,b.pop(),`[${j}]`}let R=Object.keys(f),O=R.length;if(O===0)return"{}";if(o<b.length+1)return'"[Object]"';E+=S;let A=`,
27
- ${E}`,I="",D="",z=Math.min(O,a);ds(f)&&(I+=nl(f,A,a),R=R.slice(f.length),z-=f.length,D=A),n&&(R=cs(R,s)),b.push(f);for(let j=0;j<z;j++){let V=R[j],ae=d(V,f[V],b,S,E);ae!==void 0&&(I+=`${D}${ut(V)}: ${ae}`,D=A)}if(O>a){let j=O-a;I+=`${D}"...": "${qt(j)} not stringified"`,D=A}return D!==""&&(I=`
28
- ${E}${I}
29
- ${x}`),b.pop(),`{${I}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function h(y,f,b){switch(typeof f){case"string":return ut(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(y),typeof f!="object")return h(y,f,b);if(f===null)return"null"}if(b.indexOf(f)!==-1)return r;let S="",E=f.length!==void 0;if(E&&Array.isArray(f)){if(f.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(f);let I=Math.min(f.length,a),D=0;for(;D<I-1;D++){let j=h(String(D),f[D],b);S+=j!==void 0?j:"null",S+=","}let z=h(String(D),f[D],b);if(S+=z!==void 0?z:"null",f.length-1>a){let j=f.length-a-1;S+=`,"... ${qt(j)} not stringified"`}return b.pop(),`[${S}]`}let x=Object.keys(f),R=x.length;if(R===0)return"{}";if(o<b.length+1)return'"[Object]"';let O="",A=Math.min(R,a);E&&ds(f)&&(S+=nl(f,",",a),x=x.slice(f.length),A-=f.length,O=","),n&&(x=cs(x,s)),b.push(f);for(let I=0;I<A;I++){let D=x[I],z=h(D,f[D],b);z!==void 0&&(S+=`${O}${ut(D)}:${z}`,O=",")}if(R>a){let I=R-a;S+=`${O}"...":"${qt(I)} not stringified"`}return b.pop(),`{${S}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function p(y,f,b){if(arguments.length>1){let S="";if(typeof b=="number"?S=" ".repeat(Math.min(b,10)):typeof b=="string"&&(S=b.slice(0,10)),f!=null){if(typeof f=="function")return l("",{"":y},[],f,S,"");if(Array.isArray(f))return u("",y,[],Cp(f),S,"")}if(S.length!==0)return d("",y,[],S,"")}return h("",y,[])}return p}});var ms=v((QS,al)=>{"use strict";var Np=Re(),{MESSAGE:Fp}=te(),$p=Er();function Ip(e,t){return typeof t=="bigint"?t.toString():t}al.exports=Np((e,t)=>{let r=$p.configure(t);return e[Fp]=r(e,t.replacer||Ip,t.space),e})});var ul=v((XS,ll)=>{"use strict";var Wp=Re();ll.exports=Wp((e,t)=>t.message?(e.message=`[${t.label}] ${e.message}`,e):(e.label=t.label,e))});var fl=v((eE,hl)=>{"use strict";var Bp=Re(),{MESSAGE:Up}=te(),zp=Er();hl.exports=Bp(e=>{let t={};return e.message&&(t["@message"]=e.message,delete e.message),e.timestamp&&(t["@timestamp"]=e.timestamp,delete e.timestamp),t["@fields"]=e,e[Up]=zp(t),e})});var dl=v((tE,cl)=>{"use strict";var Hp=Re();function Gp(e,t,r){let i=t.reduce((s,o)=>(s[o]=e[o],delete e[o],s),{}),n=Object.keys(e).reduce((s,o)=>(s[o]=e[o],delete e[o],s),{});return Object.assign(e,i,{[r]:n}),e}function Vp(e,t,r){return e[r]=t.reduce((i,n)=>(i[n]=e[n],delete e[n],i),{}),e}cl.exports=Hp((e,t={})=>{let r="metadata";t.key&&(r=t.key);let i=[];return!t.fillExcept&&!t.fillWith&&(i.push("level"),i.push("message")),t.fillExcept&&(i=t.fillExcept),i.length>0?Gp(e,i,r):t.fillWith?Vp(e,t.fillWith,r):e})});var gl=v((rE,pl)=>{var Qt=1e3,Xt=Qt*60,er=Xt*60,Dt=er*24,Yp=Dt*7,Jp=Dt*365.25;pl.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Kp(e);if(r==="number"&&isFinite(e))return t.long?Qp(e):Zp(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Kp(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*Jp;case"weeks":case"week":case"w":return r*Yp;case"days":case"day":case"d":return r*Dt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*er;case"minutes":case"minute":case"mins":case"min":case"m":return r*Xt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Zp(e){var t=Math.abs(e);return t>=Dt?Math.round(e/Dt)+"d":t>=er?Math.round(e/er)+"h":t>=Xt?Math.round(e/Xt)+"m":t>=Qt?Math.round(e/Qt)+"s":e+"ms"}function Qp(e){var t=Math.abs(e);return t>=Dt?xi(e,t,Dt,"day"):t>=er?xi(e,t,er,"hour"):t>=Xt?xi(e,t,Xt,"minute"):t>=Qt?xi(e,t,Qt,"second"):e+" ms"}function xi(e,t,r,i){var n=t>=r*1.5;return Math.round(e/r)+" "+i+(n?"s":"")}});var yl=v((Rr,ml)=>{"use strict";var Xp=Re(),eg=gl();ml.exports=Xp(e=>{let t=+new Date;return Rr.diff=t-(Rr.prevTime||t),Rr.prevTime=t,e.ms=`+${eg(Rr.diff)}`,e})});var vl=v((iE,wl)=>{"use strict";var tg=C("util").inspect,rg=Re(),{LEVEL:ig,MESSAGE:bl,SPLAT:ng}=te();wl.exports=rg((e,t={})=>{let r=Object.assign({},e);return delete r[ig],delete r[bl],delete r[ng],e[bl]=tg(r,!1,t.depth||null,t.colorize),e})});var _l=v((nE,Oi)=>{"use strict";var{MESSAGE:sg}=te(),Mi=class{constructor(t){this.template=t}transform(t){return t[sg]=this.template(t),t}};Oi.exports=e=>new Mi(e);Oi.exports.Printf=Oi.exports.Format=Mi});var Rl=v((sE,El)=>{"use strict";var og=Re(),{MESSAGE:Sl}=te(),ag=Er();El.exports=og(e=>{let t=ag(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";return t!=="{}"?e[Sl]=`${e.level}:${r} ${e.message} ${t}`:e[Sl]=`${e.level}:${r} ${e.message}`,e})});var Ol=v((oE,Ml)=>{"use strict";var lg=C("util"),{SPLAT:xl}=te(),ug=/%[scdjifoO%]/g,hg=/%%/g,ys=class{constructor(t){this.options=t}_splat(t,r){let i=t.message,n=t[xl]||t.splat||[],s=i.match(hg),o=s&&s.length||0,l=r.length-o-n.length,u=l<0?n.splice(l,-1*l):[],d=u.length;if(d)for(let h=0;h<d;h++)Object.assign(t,u[h]);return t.message=lg.format(i,...n),t}transform(t){let r=t.message,i=t[xl]||t.splat;if(!i||!i.length)return t;let n=r&&r.match&&r.match(ug);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,o=s.length;if(o)for(let a=0;a<o;a++)Object.assign(t,s[a]);return t}return n?this._splat(t,n):t}};Ml.exports=e=>new ys(e)});var kl=v((Ti,Tl)=>{(function(e,t){typeof Ti=="object"&&typeof Tl<"u"?t(Ti):typeof define=="function"&&define.amd?define(["exports"],t):t(e.fecha={})})(Ti,(function(e){"use strict";var t=/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}",o="[^\\s]+",a=/\[([^]*?)\]/gm;function l(_,k){for(var H=[],me=0,P=_.length;me<P;me++)H.push(_[me].substr(0,k));return H}var u=function(_){return function(k,H){var me=H[_].map(function(Ae){return Ae.toLowerCase()}),P=me.indexOf(k.toLowerCase());return P>-1?P:null}};function d(_){for(var k=[],H=1;H<arguments.length;H++)k[H-1]=arguments[H];for(var me=0,P=k;me<P.length;me++){var Ae=P[me];for(var Fe in Ae)_[Fe]=Ae[Fe]}return _}var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],y=l(p,3),f=l(h,3),b={dayNamesShort:f,dayNames:h,monthNamesShort:y,monthNames:p,amPm:["am","pm"],DoFn:function(_){return _+["th","st","nd","rd"][_%10>3?0:(_-_%10!==10?1:0)*_%10]}},S=d({},b),E=function(_){return S=d(S,_)},x=function(_){return _.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},R=function(_,k){for(k===void 0&&(k=2),_=String(_);_.length<k;)_="0"+_;return _},O={D:function(_){return String(_.getDate())},DD:function(_){return R(_.getDate())},Do:function(_,k){return k.DoFn(_.getDate())},d:function(_){return String(_.getDay())},dd:function(_){return R(_.getDay())},ddd:function(_,k){return k.dayNamesShort[_.getDay()]},dddd:function(_,k){return k.dayNames[_.getDay()]},M:function(_){return String(_.getMonth()+1)},MM:function(_){return R(_.getMonth()+1)},MMM:function(_,k){return k.monthNamesShort[_.getMonth()]},MMMM:function(_,k){return k.monthNames[_.getMonth()]},YY:function(_){return R(String(_.getFullYear()),4).substr(2)},YYYY:function(_){return R(_.getFullYear(),4)},h:function(_){return String(_.getHours()%12||12)},hh:function(_){return R(_.getHours()%12||12)},H:function(_){return String(_.getHours())},HH:function(_){return R(_.getHours())},m:function(_){return String(_.getMinutes())},mm:function(_){return R(_.getMinutes())},s:function(_){return String(_.getSeconds())},ss:function(_){return R(_.getSeconds())},S:function(_){return String(Math.round(_.getMilliseconds()/100))},SS:function(_){return R(Math.round(_.getMilliseconds()/10),2)},SSS:function(_){return R(_.getMilliseconds(),3)},a:function(_,k){return _.getHours()<12?k.amPm[0]:k.amPm[1]},A:function(_,k){return _.getHours()<12?k.amPm[0].toUpperCase():k.amPm[1].toUpperCase()},ZZ:function(_){var k=_.getTimezoneOffset();return(k>0?"-":"+")+R(Math.floor(Math.abs(k)/60)*100+Math.abs(k)%60,4)},Z:function(_){var k=_.getTimezoneOffset();return(k>0?"-":"+")+R(Math.floor(Math.abs(k)/60),2)+":"+R(Math.abs(k)%60,2)}},A=function(_){return+_-1},I=[null,r],D=[null,o],z=["isPm",o,function(_,k){var H=_.toLowerCase();return H===k.amPm[0]?0:H===k.amPm[1]?1:null}],j=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(_){var k=(_+"").match(/([+-]|\d\d)/gi);if(k){var H=+k[1]*60+parseInt(k[2],10);return k[0]==="+"?H:-H}return 0}],V={D:["day",r],DD:["day",i],Do:["day",r+o,function(_){return parseInt(_,10)}],M:["month",r,A],MM:["month",i,A],YY:["year",i,function(_){var k=new Date,H=+(""+k.getFullYear()).substr(0,2);return+(""+(+_>68?H-1:H)+_)}],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(_){return+_*100}],SS:["millisecond",i,function(_){return+_*10}],SSS:["millisecond",n],d:I,dd:I,ddd:D,dddd:D,MMM:["month",o,u("monthNamesShort")],MMMM:["month",o,u("monthNames")],a:z,A:z,ZZ:j,Z:j},ae={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"},re=function(_){return d(ae,_)},be=function(_,k,H){if(k===void 0&&(k=ae.default),H===void 0&&(H={}),typeof _=="number"&&(_=new Date(_)),Object.prototype.toString.call(_)!=="[object Date]"||isNaN(_.getTime()))throw new Error("Invalid Date pass to format");k=ae[k]||k;var me=[];k=k.replace(a,function(Ae,Fe){return me.push(Fe),"@@@"});var P=d(d({},S),H);return k=k.replace(t,function(Ae){return O[Ae](_,P)}),k.replace(/@@@/g,function(){return me.shift()})};function we(_,k,H){if(H===void 0&&(H={}),typeof k!="string")throw new Error("Invalid format in fecha parse");if(k=ae[k]||k,_.length>1e3)return null;var me=new Date,P={year:me.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ae=[],Fe=[],Mt=k.replace(a,function(kt,lt){return Fe.push(x(lt)),"@@@"}),Jt={},ot={};Mt=x(Mt).replace(t,function(kt){var lt=V[kt],vr=lt[0],pi=lt[1],gi=lt[3];if(Jt[vr])throw new Error("Invalid format. "+vr+" specified twice in format");return Jt[vr]=!0,gi&&(ot[gi]=!0),Ae.push(lt),"("+pi+")"}),Object.keys(ot).forEach(function(kt){if(!Jt[kt])throw new Error("Invalid format. "+kt+" is required in specified format")}),Mt=Mt.replace(/@@@/g,function(){return Fe.shift()});var Ot=_.match(new RegExp(Mt,"i"));if(!Ot)return null;for(var Zn=d(d({},S),H),Oe=1;Oe<Ot.length;Oe++){var fi=Ae[Oe-1],ci=fi[0],di=fi[2],at=di?di(Ot[Oe],Zn):+Ot[Oe];if(at==null)return null;P[ci]=at}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Kt;if(P.timezoneOffset==null){Kt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var Tt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],Oe=0,wr=Tt.length;Oe<wr;Oe++)if(Jt[Tt[Oe][0]]&&P[Tt[Oe][0]]!==Kt[Tt[Oe][1]]())return null}else if(Kt=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 Kt}var st={format:be,parse:we,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:re};e.assign=d,e.default=st,e.format=be,e.parse=we,e.defaultI18n=b,e.setGlobalDateI18n=E,e.setGlobalDateMasks=re,Object.defineProperty(e,"__esModule",{value:!0})}))});var Pl=v((aE,Al)=>{"use strict";var fg=kl(),cg=Re();Al.exports=cg((e,t={})=>(t.format&&(e.timestamp=typeof t.format=="function"?t.format():fg.format(new Date,t.format)),e.timestamp||(e.timestamp=new Date().toISOString()),t.alias&&(e[t.alias]=e.timestamp),e))});var jl=v((lE,ql)=>{"use strict";var bs=es(),dg=Re(),{MESSAGE:ws}=te();ql.exports=dg((e,t)=>(t.level!==!1&&(e.level=bs.strip(e.level)),t.message!==!1&&(e.message=bs.strip(String(e.message))),t.raw!==!1&&e[ws]&&(e[ws]=bs.strip(String(e[ws]))),e))});var _s=v(vs=>{"use strict";var pg=vs.format=Re();vs.levels=Ya();function de(e,t){Object.defineProperty(pg,e,{get(){return t()},configurable:!0})}de("align",function(){return Ka()});de("errors",function(){return Xa()});de("cli",function(){return tl()});de("combine",function(){return il()});de("colorize",function(){return _i()});de("json",function(){return ms()});de("label",function(){return ul()});de("logstash",function(){return fl()});de("metadata",function(){return dl()});de("ms",function(){return yl()});de("padLevels",function(){return us()});de("prettyPrint",function(){return vl()});de("printf",function(){return _l()});de("simple",function(){return Rl()});de("splat",function(){return Ol()});de("timestamp",function(){return Pl()});de("uncolorize",function(){return jl()})});var Ss=v(ki=>{"use strict";var{format:Dl}=C("util");ki.warn={deprecated(e){return()=>{throw new Error(Dl("{ %s } was removed in winston@3.0.0.",e))}},useFormat(e){return()=>{throw new Error([Dl("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join(`
30
- `))}},forFunctions(e,t,r){r.forEach(i=>{e[i]=ki.warn[t](i)})},forProperties(e,t,r){r.forEach(i=>{let n=ki.warn[t](i);Object.defineProperty(e,i,{get:n,set:n})})}}});var Cl=v((fE,gg)=>{gg.exports={name:"winston",description:"A logger for just about everything.",version:"3.18.3",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",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 Es=v((cE,Ll)=>{Ll.exports=C("util").deprecate});var Rs=v((dE,Nl)=>{Nl.exports=C("stream")});var Ms=v((pE,$l)=>{"use strict";function mg(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(xs,this,e)):process.nextTick(xs,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Ai,r):(r._writableState.errorEmitted=!0,process.nextTick(Fl,r,s)):process.nextTick(Fl,r,s):t?(process.nextTick(Ai,r),t(s)):process.nextTick(Ai,r)}),this)}function Fl(e,t){xs(e,t),Ai(e)}function Ai(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function yg(){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 xs(e,t){e.emit("error",t)}function bg(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}$l.exports={destroy:mg,undestroy:yg,errorOrDestroy:bg}});var tr=v((gE,Bl)=>{"use strict";var Wl={};function qe(e,t,r){r||(r=Error);function i(s,o,a){return typeof t=="string"?t:t(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=e,Wl[e]=n}function Il(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function wg(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function vg(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function _g(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&wg(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let n;if(vg(e," argument"))n=`The ${e} ${i} ${Il(t,"type")}`;else{let s=_g(e,".")?"property":"argument";n=`The "${e}" ${s} ${i} ${Il(t,"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(e){return"The "+e+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" 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(e){return"Unknown encoding: "+e},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Bl.exports.codes=Wl});var Os=v((mE,Ul)=>{"use strict";var Sg=tr().codes.ERR_INVALID_OPT_VALUE;function Eg(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Rg(e,t,r,i){var n=Eg(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Sg(s,n)}return Math.floor(n)}return e.objectMode?16:16*1024}Ul.exports={getHighWaterMark:Rg}});var zl=v((yE,Ts)=>{typeof Object.create=="function"?Ts.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Ts.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var Xe=v((bE,As)=>{try{if(ks=C("util"),typeof ks.inherits!="function")throw"";As.exports=ks.inherits}catch{As.exports=zl()}var ks});var Kl=v((wE,Jl)=>{"use strict";function Hl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hl(Object(r),!0).forEach(function(i){xg(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function xg(e,t,r){return t=Yl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vl(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Yl(i.key),i)}}function Og(e,t,r){return t&&Vl(e.prototype,t),r&&Vl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yl(e){var t=Tg(e,"string");return typeof t=="symbol"?t:String(t)}function Tg(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kg=C("buffer"),Pi=kg.Buffer,Ag=C("util"),Ps=Ag.inspect,Pg=Ps&&Ps.custom||"inspect";function qg(e,t,r){Pi.prototype.copy.call(e,t,r)}Jl.exports=(function(){function e(){Mg(this,e),this.head=null,this.tail=null,this.length=0}return Og(e,[{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 Pi.alloc(0);for(var i=Pi.allocUnsafe(r>>>0),n=this.head,s=0;n;)qg(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 o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Pi.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Pg,value:function(r,i){return Ps(this,Gl(Gl({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var Xl=v((qs,Ql)=>{var qi=C("buffer"),ze=qi.Buffer;function Zl(e,t){for(var r in e)t[r]=e[r]}ze.from&&ze.alloc&&ze.allocUnsafe&&ze.allocUnsafeSlow?Ql.exports=qi:(Zl(qi,qs),qs.Buffer=Ct);function Ct(e,t,r){return ze(e,t,r)}Ct.prototype=Object.create(ze.prototype);Zl(ze,Ct);Ct.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ze(e,t,r)};Ct.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ze(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Ct.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ze(e)};Ct.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return qi.SlowBuffer(e)}});var Mr=v(tu=>{"use strict";var Ds=Xl().Buffer,eu=Ds.isEncoding||function(e){switch(e=""+e,e&&e.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 jg(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Dg(e){var t=jg(e);if(typeof t!="string"&&(Ds.isEncoding===eu||!eu(e)))throw new Error("Unknown encoding: "+e);return t||e}tu.StringDecoder=xr;function xr(e){this.encoding=Dg(e);var t;switch(this.encoding){case"utf16le":this.text=Ig,this.end=Wg,t=4;break;case"utf8":this.fillLast=Ng,t=4;break;case"base64":this.text=Bg,this.end=Ug,t=3;break;default:this.write=zg,this.end=Hg;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ds.allocUnsafe(t)}xr.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};xr.prototype.end=$g;xr.prototype.text=Fg;xr.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function js(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Cg(e,t,r){var i=t.length-1;if(i<r)return 0;var n=js(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=js(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=js(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function Lg(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Ng(e){var t=this.lastTotal-this.lastNeed,r=Lg(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Fg(e,t){var r=Cg(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function $g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Ig(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Wg(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Bg(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Ug(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function zg(e){return e.toString(this.encoding)}function Hg(e){return e&&e.length?this.write(e):""}});var su=v((_E,nu)=>{"use strict";var ru=tr().codes.ERR_STREAM_PREMATURE_CLOSE;function Gg(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function Vg(){}function Yg(e){return e.setHeader&&typeof e.abort=="function"}function iu(e,t,r){if(typeof t=="function")return iu(e,null,t);t||(t={}),r=Gg(r||Vg);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,s=function(){e.writable||a()},o=e._writableState&&e._writableState.finished,a=function(){n=!1,o=!0,i||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(e)},d=function(f){r.call(e,f)},h=function(){var f;if(i&&!l)return(!e._readableState||!e._readableState.ended)&&(f=new ru),r.call(e,f);if(n&&!o)return(!e._writableState||!e._writableState.ended)&&(f=new ru),r.call(e,f)},p=function(){e.req.on("finish",a)};return Yg(e)?(e.on("complete",a),e.on("abort",h),e.req?p():e.on("request",p)):n&&!e._writableState&&(e.on("end",s),e.on("close",s)),e.on("end",u),e.on("finish",a),t.error!==!1&&e.on("error",d),e.on("close",h),function(){e.removeListener("complete",a),e.removeListener("abort",h),e.removeListener("request",p),e.req&&e.req.removeListener("finish",a),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",u),e.removeListener("error",d),e.removeListener("close",h)}}nu.exports=iu});var au=v((SE,ou)=>{"use strict";var ji;function ht(e,t,r){return t=Jg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jg(e){var t=Kg(e,"string");return typeof t=="symbol"?t:String(t)}function Kg(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zg=su(),ft=Symbol("lastResolve"),Lt=Symbol("lastReject"),Or=Symbol("error"),Di=Symbol("ended"),Nt=Symbol("lastPromise"),Cs=Symbol("handlePromise"),Ft=Symbol("stream");function ct(e,t){return{value:e,done:t}}function Qg(e){var t=e[ft];if(t!==null){var r=e[Ft].read();r!==null&&(e[Nt]=null,e[ft]=null,e[Lt]=null,t(ct(r,!1)))}}function Xg(e){process.nextTick(Qg,e)}function em(e,t){return function(r,i){e.then(function(){if(t[Di]){r(ct(void 0,!0));return}t[Cs](r,i)},i)}}var tm=Object.getPrototypeOf(function(){}),rm=Object.setPrototypeOf((ji={get stream(){return this[Ft]},next:function(){var t=this,r=this[Or];if(r!==null)return Promise.reject(r);if(this[Di])return Promise.resolve(ct(void 0,!0));if(this[Ft].destroyed)return new Promise(function(o,a){process.nextTick(function(){t[Or]?a(t[Or]):o(ct(void 0,!0))})});var i=this[Nt],n;if(i)n=new Promise(em(i,this));else{var s=this[Ft].read();if(s!==null)return Promise.resolve(ct(s,!1));n=new Promise(this[Cs])}return this[Nt]=n,n}},ht(ji,Symbol.asyncIterator,function(){return this}),ht(ji,"return",function(){var t=this;return new Promise(function(r,i){t[Ft].destroy(null,function(n){if(n){i(n);return}r(ct(void 0,!0))})})}),ji),tm),im=function(t){var r,i=Object.create(rm,(r={},ht(r,Ft,{value:t,writable:!0}),ht(r,ft,{value:null,writable:!0}),ht(r,Lt,{value:null,writable:!0}),ht(r,Or,{value:null,writable:!0}),ht(r,Di,{value:t._readableState.endEmitted,writable:!0}),ht(r,Cs,{value:function(s,o){var a=i[Ft].read();a?(i[Nt]=null,i[ft]=null,i[Lt]=null,s(ct(a,!1))):(i[ft]=s,i[Lt]=o)},writable:!0}),r));return i[Nt]=null,Zg(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Lt];s!==null&&(i[Nt]=null,i[ft]=null,i[Lt]=null,s(n)),i[Or]=n;return}var o=i[ft];o!==null&&(i[Nt]=null,i[ft]=null,i[Lt]=null,o(ct(void 0,!0))),i[Di]=!0}),t.on("readable",Xg.bind(null,i)),i};ou.exports=im});var fu=v((EE,hu)=>{"use strict";function lu(e,t,r,i,n,s,o){try{var a=e[s](o),l=a.value}catch(u){r(u);return}a.done?t(l):Promise.resolve(l).then(i,n)}function nm(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var s=e.apply(t,r);function o(l){lu(s,i,n,o,a,"next",l)}function a(l){lu(s,i,n,o,a,"throw",l)}o(void 0)})}}function uu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function sm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uu(Object(r),!0).forEach(function(i){om(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uu(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function om(e,t,r){return t=am(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function am(e){var t=lm(e,"string");return typeof t=="symbol"?t:String(t)}function lm(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var um=tr().codes.ERR_INVALID_ARG_TYPE;function hm(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new um("iterable",["Iterable"],t);var n=new e(sm({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=nm(function*(){try{var l=yield i.next(),u=l.value,d=l.done;d?n.push(null):n.push(yield u)?o():s=!1}catch(h){n.destroy(h)}}),a.apply(this,arguments)}return n}hu.exports=hm});var Su=v((xE,_u)=>{"use strict";_u.exports=B;var rr;B.ReadableState=gu;var RE=C("events").EventEmitter,pu=function(t,r){return t.listeners(r).length},kr=Rs(),Ci=C("buffer").Buffer,fm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function cm(e){return Ci.from(e)}function dm(e){return Ci.isBuffer(e)||e instanceof fm}var Ls=C("util"),L;Ls&&Ls.debuglog?L=Ls.debuglog("stream"):L=function(){};var pm=Kl(),Us=Ms(),gm=Os(),mm=gm.getHighWaterMark,Li=tr().codes,ym=Li.ERR_INVALID_ARG_TYPE,bm=Li.ERR_STREAM_PUSH_AFTER_EOF,wm=Li.ERR_METHOD_NOT_IMPLEMENTED,vm=Li.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ir,Ns,Fs;Xe()(B,kr);var Tr=Us.errorOrDestroy,$s=["error","close","destroy","pause","resume"];function _m(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function gu(e,t,r){rr=rr||Ar(),e=e||{},typeof r!="boolean"&&(r=t instanceof rr),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=mm(this,e,"readableHighWaterMark",r),this.buffer=new pm,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ir||(ir=Mr().StringDecoder),this.decoder=new ir(e.encoding),this.encoding=e.encoding)}function B(e){if(rr=rr||Ar(),!(this instanceof B))return new B(e);var t=this instanceof rr;this._readableState=new gu(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),kr.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});B.prototype.destroy=Us.destroy;B.prototype._undestroy=Us.undestroy;B.prototype._destroy=function(e,t){t(e)};B.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Ci.from(e,t),t=""),i=!0),mu(this,e,t,!1,i)};B.prototype.unshift=function(e){return mu(this,e,null,!0,!1)};function mu(e,t,r,i,n){L("readableAddChunk",t);var s=e._readableState;if(t===null)s.reading=!1,Rm(e,s);else{var o;if(n||(o=Sm(s,t)),o)Tr(e,o);else if(s.objectMode||t&&t.length>0)if(typeof t!="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==Ci.prototype&&(t=cm(t)),i)s.endEmitted?Tr(e,new vm):Is(e,s,t,!0);else if(s.ended)Tr(e,new bm);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||t.length!==0?Is(e,s,t,!1):Bs(e,s)):Is(e,s,t,!1)}else i||(s.reading=!1,Bs(e,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Is(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ni(e)),Bs(e,t)}function Sm(e,t){var r;return!dm(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new ym("chunk",["string","Buffer","Uint8Array"],t)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(e){ir||(ir=Mr().StringDecoder);var t=new ir(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var cu=1073741824;function Em(e){return e>=cu?e=cu:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function du(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Em(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}B.prototype.read=function(e){L("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return L("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Ws(this):Ni(this),null;if(e=du(e,t),e===0&&t.ended)return t.length===0&&Ws(this),null;var i=t.needReadable;L("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,L("length less than watermark",i)),t.ended||t.reading?(i=!1,L("reading or ended",i)):i&&(L("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=du(r,t)));var n;return e>0?n=wu(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Ws(this)),n!==null&&this.emit("data",n),n};function Rm(e,t){if(L("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Ni(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,yu(e)))}}function Ni(e){var t=e._readableState;L("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(yu,e))}function yu(e){var t=e._readableState;L("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,zs(e)}function Bs(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(xm,e,t))}function xm(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(L("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}B.prototype._read=function(e){Tr(this,new wm("_read()"))};B.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=n?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",o);function o(S,E){L("onunpipe"),S===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,d())}function a(){L("onend"),e.end()}var l=Mm(r);e.on("drain",l);var u=!1;function d(){L("cleanup"),e.removeListener("close",y),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}r.on("data",h);function h(S){L("ondata");var E=e.write(S);L("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&vu(i.pipes,e)!==-1)&&!u&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(S){L("onerror",S),b(),e.removeListener("error",p),pu(e,"error")===0&&Tr(e,S)}_m(e,"error",p);function y(){e.removeListener("finish",f),b()}e.once("close",y);function f(){L("onfinish"),e.removeListener("close",y),b()}e.once("finish",f);function b(){L("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),e};function Mm(e){return function(){var r=e._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&pu(e,"data")&&(r.flowing=!0,zs(e))}}B.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=vu(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};B.prototype.on=function(e,t){var r=kr.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="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?Ni(this):i.reading||process.nextTick(Om,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(e,t){var r=kr.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(bu,this),r};B.prototype.removeAllListeners=function(e){var t=kr.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(bu,this),t};function bu(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Om(e){L("readable nexttick read 0"),e.read(0)}B.prototype.resume=function(){var e=this._readableState;return e.flowing||(L("resume"),e.flowing=!e.readableListening,Tm(this,e)),e.paused=!1,this};function Tm(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(km,e,t))}function km(e,t){L("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),zs(e),t.flowing&&!t.reading&&e.read(0)}B.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 zs(e){var t=e._readableState;for(L("flow",t.flowing);t.flowing&&e.read()!==null;);}B.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(L("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=t.push(o);a||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(a){return function(){return e[a].apply(e,arguments)}})(n));for(var s=0;s<$s.length;s++)e.on($s[s],this.emit.bind(this,$s[s]));return this._read=function(o){L("wrapped _read",o),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return Ns===void 0&&(Ns=au()),Ns(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(t){this._readableState&&(this._readableState.flowing=t)}});B._fromList=wu;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function wu(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Ws(e){var t=e._readableState;L("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(Am,t,e))}function Am(e,t){if(L("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(B.from=function(e,t){return Fs===void 0&&(Fs=fu()),Fs(B,e,t)});function vu(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var Ar=v((ME,Ru)=>{"use strict";var Pm=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Ru.exports=He;var Eu=Su(),Gs=Vs();Xe()(He,Eu);for(Hs=Pm(Gs.prototype),Fi=0;Fi<Hs.length;Fi++)$i=Hs[Fi],He.prototype[$i]||(He.prototype[$i]=Gs.prototype[$i]);var Hs,$i,Fi;function He(e){if(!(this instanceof He))return new He(e);Eu.call(this,e),Gs.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",qm)))}Object.defineProperty(He.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(He.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(He.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function qm(){this._writableState.ended||process.nextTick(jm,this)}function jm(e){e.end()}Object.defineProperty(He.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var Vs=v((OE,Au)=>{"use strict";Au.exports=J;function Mu(e){var t=this;this.next=null,this.entry=null,this.finish=function(){oy(t,e)}}var nr;J.WritableState=qr;var Dm={deprecate:Es()},Ou=Rs(),Wi=C("buffer").Buffer,Cm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Lm(e){return Wi.from(e)}function Nm(e){return Wi.isBuffer(e)||e instanceof Cm}var Js=Ms(),Fm=Os(),$m=Fm.getHighWaterMark,dt=tr().codes,Im=dt.ERR_INVALID_ARG_TYPE,Wm=dt.ERR_METHOD_NOT_IMPLEMENTED,Bm=dt.ERR_MULTIPLE_CALLBACK,Um=dt.ERR_STREAM_CANNOT_PIPE,zm=dt.ERR_STREAM_DESTROYED,Hm=dt.ERR_STREAM_NULL_VALUES,Gm=dt.ERR_STREAM_WRITE_AFTER_END,Vm=dt.ERR_UNKNOWN_ENCODING,sr=Js.errorOrDestroy;Xe()(J,Ou);function Ym(){}function qr(e,t,r){nr=nr||Ar(),e=e||{},typeof r!="boolean"&&(r=t instanceof nr),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=$m(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){ty(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Mu(this)}qr.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(qr.prototype,"buffer",{get:Dm.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Ii;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ii=Function.prototype[Symbol.hasInstance],Object.defineProperty(J,Symbol.hasInstance,{value:function(t){return Ii.call(this,t)?!0:this!==J?!1:t&&t._writableState instanceof qr}})):Ii=function(t){return t instanceof this};function J(e){nr=nr||Ar();var t=this instanceof nr;if(!t&&!Ii.call(J,this))return new J(e);this._writableState=new qr(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ou.call(this)}J.prototype.pipe=function(){sr(this,new Um)};function Jm(e,t){var r=new Gm;sr(e,r),process.nextTick(t,r)}function Km(e,t,r,i){var n;return r===null?n=new Hm:typeof r!="string"&&!t.objectMode&&(n=new Im("chunk",["string","Buffer"],r)),n?(sr(e,n),process.nextTick(i,n),!1):!0}J.prototype.write=function(e,t,r){var i=this._writableState,n=!1,s=!i.objectMode&&Nm(e);return s&&!Wi.isBuffer(e)&&(e=Lm(e)),typeof t=="function"&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Ym),i.ending?Jm(this,r):(s||Km(this,i,e,r))&&(i.pendingcb++,n=Qm(this,i,s,e,t,r)),n};J.prototype.cork=function(){this._writableState.corked++};J.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Tu(this,e))};J.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Vm(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(J.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Zm(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Wi.from(t,r)),t}Object.defineProperty(J.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Qm(e,t,r,i,n,s){if(!r){var o=Zm(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=t.objectMode?1:i.length;t.length+=a;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Ys(e,t,!1,a,i,n,s);return l}function Ys(e,t,r,i,n,s,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new zm("write")):r?e._writev(n,t.onwrite):e._write(n,s,t.onwrite),t.sync=!1}function Xm(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(Pr,e,t),e._writableState.errorEmitted=!0,sr(e,i)):(n(i),e._writableState.errorEmitted=!0,sr(e,i),Pr(e,t))}function ey(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function ty(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Bm;if(ey(r),t)Xm(e,r,i,t,n);else{var s=ku(r)||e.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Tu(e,r),i?process.nextTick(xu,e,r,s,n):xu(e,r,s,n)}}function xu(e,t,r,i){r||ry(e,t),t.pendingcb--,i(),Pr(e,t)}function ry(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Tu(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,Ys(e,t,!0,t.length,n,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new Mu(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,d=r.callback,h=t.objectMode?1:l.length;if(Ys(e,t,!1,h,l,u,d),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}J.prototype._write=function(e,t,r){r(new Wm("_write()"))};J.prototype._writev=null;J.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||sy(this,i,r),this};Object.defineProperty(J.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ku(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function iy(e,t){e._final(function(r){t.pendingcb--,r&&sr(e,r),t.prefinished=!0,e.emit("prefinish"),Pr(e,t)})}function ny(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(iy,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Pr(e,t){var r=ku(t);if(r&&(ny(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function sy(e,t,r){t.ending=!0,Pr(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function oy(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});J.prototype.destroy=Js.destroy;J.prototype._undestroy=Js.undestroy;J.prototype._destroy=function(e,t){t(e)}});var Ks=v((TE,ju)=>{"use strict";var ay=C("util"),Pu=Vs(),{LEVEL:qu}=te(),jr=ju.exports=function(t={}){Pu.call(this,{objectMode:!0,highWaterMark:t.highWaterMark}),this.format=t.format,this.level=t.level,this.handleExceptions=t.handleExceptions,this.handleRejections=t.handleRejections,this.silent=t.silent,t.log&&(this.log=t.log),t.logv&&(this.logv=t.logv),t.close&&(this.close=t.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())})};ay.inherits(jr,Pu);jr.prototype._write=function(t,r,i){if(this.silent||t.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[t[qu]]){if(t&&!this.format)return this.log(t,i);let s,o;try{o=this.format.transform(Object.assign({},t),this.format.options)}catch(a){s=a}if(s||!o){if(i(),s)throw s;return}return this.log(o,i)}return this._writableState.sync=!1,i(null)};jr.prototype._writev=function(t,r){if(this.logv){let i=t.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<t.length;i++){if(!this._accept(t[i]))continue;if(t[i].chunk&&!this.format){this.log(t[i].chunk,t[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},t[i].chunk),this.format.options)}catch(o){n=o}if(n||!s){if(t[i].callback(),n)throw r(null),n}else this.log(s,t[i].callback)}return r(null)};jr.prototype._accept=function(t){let r=t.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[qu]])&&(this.handleExceptions||r.exception!==!0))};jr.prototype._nop=function(){}});var Qs=v((kE,Cu)=>{"use strict";var ly=C("util"),{LEVEL:Zs}=te(),Du=Ks(),Dr=Cu.exports=function(t={}){if(Du.call(this,t),!t.transport||typeof t.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=t.transport,this.level=this.level||t.transport.level,this.handleExceptions=this.handleExceptions||t.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))};ly.inherits(Dr,Du);Dr.prototype._write=function(t,r,i){if(this.silent||t.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[t[Zs]])&&this.transport.log(t[Zs],t.message,t,this._nop),i(null)};Dr.prototype._writev=function(t,r){for(let i=0;i<t.length;i++)this._accept(t[i])&&(this.transport.log(t[i].chunk[Zs],t[i].chunk.message,t[i].chunk,this._nop),t[i].callback());return r(null)};Dr.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(`
31
- `))};Dr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var or=v((AE,Xs)=>{"use strict";Xs.exports=Ks();Xs.exports.LegacyTransportStream=Qs()});var Fu=v((qE,Nu)=>{"use strict";var uy=C("os"),{LEVEL:Lu,MESSAGE:ar}=te(),hy=or();Nu.exports=class extends hy{constructor(t={}){super(t),this.name=t.name||"console",this.stderrLevels=this._stringArrayToSet(t.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(t.consoleWarnLevels),this.eol=typeof t.eol=="string"?t.eol:uy.EOL,this.forceConsole=t.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.stderrLevels[t[Lu]]){console._stderr&&!this.forceConsole?console._stderr.write(`${t[ar]}${this.eol}`):this._consoleError(t[ar]),r&&r();return}else if(this.consoleWarnLevels[t[Lu]]){console._stderr&&!this.forceConsole?console._stderr.write(`${t[ar]}${this.eol}`):this._consoleWarn(t[ar]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${t[ar]}${this.eol}`):this._consoleLog(t[ar]),r&&r()}_stringArrayToSet(t,r){if(!t)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(t))throw new Error(r);return t.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var Ui=v((Bi,$u)=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.default=fy;function fy(e){return e&&typeof e.length=="number"&&e.length>=0&&e.length%1===0}$u.exports=Bi.default});var Wu=v((zi,Iu)=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.default=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}};Iu.exports=zi.default});var zu=v(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.fallback=Bu;pt.wrap=Uu;var cy=pt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,dy=pt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,py=pt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Bu(e){setTimeout(e,0)}function Uu(e){return(t,...r)=>e(()=>t(...r))}var Cr;cy?Cr=queueMicrotask:dy?Cr=setImmediate:py?Cr=process.nextTick:Cr=Bu;pt.default=Uu(Cr)});var Ju=v((Hi,Yu)=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=vy;var gy=Wu(),my=Vu(gy),yy=zu(),by=Vu(yy),wy=$t();function Vu(e){return e&&e.__esModule?e:{default:e}}function vy(e){return(0,wy.isAsync)(e)?function(...t){let r=t.pop(),i=e.apply(this,t);return Hu(i,r)}:(0,my.default)(function(t,r){var i;try{i=e.apply(this,t)}catch(n){return r(n)}if(i&&typeof i.then=="function")return Hu(i,r);r(null,i)})}function Hu(e,t){return e.then(r=>{Gu(t,null,r)},r=>{Gu(t,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Gu(e,t,r){try{e(t,r)}catch(i){(0,by.default)(n=>{throw n},i)}}Yu.exports=Hi.default});var $t=v(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.isAsyncIterable=et.isAsyncGenerator=et.isAsync=void 0;var _y=Ju(),Sy=Ey(_y);function Ey(e){return e&&e.__esModule?e:{default:e}}function Ku(e){return e[Symbol.toStringTag]==="AsyncFunction"}function Ry(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function xy(e){return typeof e[Symbol.asyncIterator]=="function"}function My(e){if(typeof e!="function")throw new Error("expected a function");return Ku(e)?(0,Sy.default)(e):e}et.default=My;et.isAsync=Ku;et.isAsyncGenerator=Ry;et.isAsyncIterable=xy});var lr=v((Gi,Zu)=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=Oy;function Oy(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");function r(...i){return typeof i[t-1]=="function"?e.apply(this,i):new Promise((n,s)=>{i[t-1]=(o,...a)=>{if(o)return s(o);n(a.length>1?a:a[0])},e.apply(this,i)})}return r}Zu.exports=Gi.default});var Xu=v((Vi,Qu)=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var Ty=Ui(),ky=eo(Ty),Ay=$t(),Py=eo(Ay),qy=lr(),jy=eo(qy);function eo(e){return e&&e.__esModule?e:{default:e}}Vi.default=(0,jy.default)((e,t,r)=>{var i=(0,ky.default)(t)?[]:{};e(t,(n,s,o)=>{(0,Py.default)(n)((a,...l)=>{l.length<2&&([l]=l),i[s]=l,o(a)})},n=>r(n,i))},3);Qu.exports=Vi.default});var to=v((Yi,eh)=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=Dy;function Dy(e){function t(...r){if(e!==null){var i=e;e=null,i.apply(this,r)}}return Object.assign(t,e),t}eh.exports=Yi.default});var rh=v((Ji,th)=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()};th.exports=Ji.default});var sh=v((Ki,nh)=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.default=By;var Cy=Ui(),Ly=ih(Cy),Ny=rh(),Fy=ih(Ny);function ih(e){return e&&e.__esModule?e:{default:e}}function $y(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}function Iy(e){var t=-1;return function(){var i=e.next();return i.done?null:(t++,{value:i.value,key:t})}}function Wy(e){var t=e?Object.keys(e):[],r=-1,i=t.length;return function n(){var s=t[++r];return s==="__proto__"?n():r<i?{value:e[s],key:s}:null}}function By(e){if((0,Ly.default)(e))return $y(e);var t=(0,Fy.default)(e);return t?Iy(t):Wy(e)}nh.exports=Ki.default});var ro=v((Zi,oh)=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=Uy;function Uy(e){return function(...t){if(e===null)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}oh.exports=Zi.default});var Xi=v((Qi,ah)=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var zy={};Qi.default=zy;ah.exports=Qi.default});var uh=v((en,lh)=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.default=Yy;var Hy=Xi(),Gy=Vy(Hy);function Vy(e){return e&&e.__esModule?e:{default:e}}function Yy(e,t,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=t||o||n||(o=!0,e.next().then(({value:p,done:y})=>{if(!(s||n)){if(o=!1,y){n=!0,a<=0&&i(null);return}a++,r(p,l,d),l++,u()}}).catch(h))}function d(p,y){if(a-=1,!s){if(p)return h(p);if(p===!1){n=!0,s=!0;return}if(y===Gy.default||n&&a<=0)return n=!0,i(null);u()}}function h(p){s||(o=!1,n=!0,i(p))}u()}lh.exports=en.default});var dh=v((tn,ch)=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var Jy=to(),Ky=Lr(Jy),Zy=sh(),Qy=Lr(Zy),Xy=ro(),e0=Lr(Xy),hh=$t(),t0=uh(),fh=Lr(t0),r0=Xi(),i0=Lr(r0);function Lr(e){return e&&e.__esModule?e:{default:e}}tn.default=e=>(t,r,i)=>{if(i=(0,Ky.default)(i),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return i(null);if((0,hh.isAsyncGenerator)(t))return(0,fh.default)(t,e,r,i);if((0,hh.isAsyncIterable)(t))return(0,fh.default)(t[Symbol.asyncIterator](),e,r,i);var n=(0,Qy.default)(t),s=!1,o=!1,a=0,l=!1;function u(h,p){if(!o)if(a-=1,h)s=!0,i(h);else if(h===!1)s=!0,o=!0;else{if(p===i0.default||s&&a<=0)return s=!0,i(null);l||d()}}function d(){for(l=!0;a<e&&!s;){var h=n();if(h===null){s=!0,a<=0&&i(null);return}a+=1,r(h.value,h.key,(0,e0.default)(u))}l=!1}d()};ch.exports=tn.default});var no=v((rn,ph)=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});var n0=dh(),s0=io(n0),o0=$t(),a0=io(o0),l0=lr(),u0=io(l0);function io(e){return e&&e.__esModule?e:{default:e}}function h0(e,t,r,i){return(0,s0.default)(t)(e,(0,a0.default)(r),i)}rn.default=(0,u0.default)(h0,4);ph.exports=rn.default});var yh=v((nn,mh)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});var f0=no(),c0=gh(f0),d0=lr(),p0=gh(d0);function gh(e){return e&&e.__esModule?e:{default:e}}function g0(e,t,r){return(0,c0.default)(e,1,t,r)}nn.default=(0,p0.default)(g0,3);mh.exports=nn.default});var vh=v((sn,wh)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.default=v0;var m0=Xu(),y0=bh(m0),b0=yh(),w0=bh(b0);function bh(e){return e&&e.__esModule?e:{default:e}}function v0(e,t){return(0,y0.default)(w0.default,e,t)}wh.exports=sn.default});var so=v((CE,_h)=>{_h.exports=C("stream")});var Oh=v((LE,Mh)=>{"use strict";function Sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sh(Object(r),!0).forEach(function(i){_0(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sh(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function _0(e,t,r){return t=xh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rh(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,xh(i.key),i)}}function E0(e,t,r){return t&&Rh(e.prototype,t),r&&Rh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xh(e){var t=R0(e,"string");return typeof t=="symbol"?t:String(t)}function R0(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x0=C("buffer"),on=x0.Buffer,M0=C("util"),oo=M0.inspect,O0=oo&&oo.custom||"inspect";function T0(e,t,r){on.prototype.copy.call(e,t,r)}Mh.exports=(function(){function e(){S0(this,e),this.head=null,this.tail=null,this.length=0}return E0(e,[{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 on.alloc(0);for(var i=on.allocUnsafe(r>>>0),n=this.head,s=0;n;)T0(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 o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=on.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:O0,value:function(r,i){return oo(this,Eh(Eh({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var lo=v((NE,kh)=>{"use strict";function k0(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ao,this,e)):process.nextTick(ao,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(an,r):(r._writableState.errorEmitted=!0,process.nextTick(Th,r,s)):process.nextTick(Th,r,s):t?(process.nextTick(an,r),t(s)):process.nextTick(an,r)}),this)}function Th(e,t){ao(e,t),an(e)}function an(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function A0(){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(e,t){e.emit("error",t)}function P0(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}kh.exports={destroy:k0,undestroy:A0,errorOrDestroy:P0}});var gt=v((FE,qh)=>{"use strict";var Ph={};function je(e,t,r){r||(r=Error);function i(s,o,a){return typeof t=="string"?t:t(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=e,Ph[e]=n}function Ah(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function q0(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function j0(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function D0(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}je("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);je("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&q0(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let n;if(j0(e," argument"))n=`The ${e} ${i} ${Ah(t,"type")}`;else{let s=D0(e,".")?"property":"argument";n=`The "${e}" ${s} ${i} ${Ah(t,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);je("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");je("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});je("ERR_STREAM_PREMATURE_CLOSE","Premature close");je("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});je("ERR_MULTIPLE_CALLBACK","Callback called multiple times");je("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");je("ERR_STREAM_WRITE_AFTER_END","write after end");je("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);je("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);je("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");qh.exports.codes=Ph});var uo=v(($E,jh)=>{"use strict";var C0=gt().codes.ERR_INVALID_OPT_VALUE;function L0(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function N0(e,t,r,i){var n=L0(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new C0(s,n)}return Math.floor(n)}return e.objectMode?16:16*1024}jh.exports={getHighWaterMark:N0}});var co=v((IE,$h)=>{"use strict";$h.exports=K;function Ch(e){var t=this;this.next=null,this.entry=null,this.finish=function(){hb(t,e)}}var ur;K.WritableState=Fr;var F0={deprecate:Es()},Lh=so(),un=C("buffer").Buffer,$0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function I0(e){return un.from(e)}function W0(e){return un.isBuffer(e)||e instanceof $0}var fo=lo(),B0=uo(),U0=B0.getHighWaterMark,mt=gt().codes,z0=mt.ERR_INVALID_ARG_TYPE,H0=mt.ERR_METHOD_NOT_IMPLEMENTED,G0=mt.ERR_MULTIPLE_CALLBACK,V0=mt.ERR_STREAM_CANNOT_PIPE,Y0=mt.ERR_STREAM_DESTROYED,J0=mt.ERR_STREAM_NULL_VALUES,K0=mt.ERR_STREAM_WRITE_AFTER_END,Z0=mt.ERR_UNKNOWN_ENCODING,hr=fo.errorOrDestroy;Xe()(K,Lh);function Q0(){}function Fr(e,t,r){ur=ur||It(),e=e||{},typeof r!="boolean"&&(r=t instanceof ur),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=U0(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){sb(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ch(this)}Fr.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Fr.prototype,"buffer",{get:F0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ln;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ln=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(t){return ln.call(this,t)?!0:this!==K?!1:t&&t._writableState instanceof Fr}})):ln=function(t){return t instanceof this};function K(e){ur=ur||It();var t=this instanceof ur;if(!t&&!ln.call(K,this))return new K(e);this._writableState=new Fr(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Lh.call(this)}K.prototype.pipe=function(){hr(this,new V0)};function X0(e,t){var r=new K0;hr(e,r),process.nextTick(t,r)}function eb(e,t,r,i){var n;return r===null?n=new J0:typeof r!="string"&&!t.objectMode&&(n=new z0("chunk",["string","Buffer"],r)),n?(hr(e,n),process.nextTick(i,n),!1):!0}K.prototype.write=function(e,t,r){var i=this._writableState,n=!1,s=!i.objectMode&&W0(e);return s&&!un.isBuffer(e)&&(e=I0(e)),typeof t=="function"&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Q0),i.ending?X0(this,r):(s||eb(this,i,e,r))&&(i.pendingcb++,n=rb(this,i,s,e,t,r)),n};K.prototype.cork=function(){this._writableState.corked++};K.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Nh(this,e))};K.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Z0(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function tb(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=un.from(t,r)),t}Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function rb(e,t,r,i,n,s){if(!r){var o=tb(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=t.objectMode?1:i.length;t.length+=a;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else ho(e,t,!1,a,i,n,s);return l}function ho(e,t,r,i,n,s,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Y0("write")):r?e._writev(n,t.onwrite):e._write(n,s,t.onwrite),t.sync=!1}function ib(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(Nr,e,t),e._writableState.errorEmitted=!0,hr(e,i)):(n(i),e._writableState.errorEmitted=!0,hr(e,i),Nr(e,t))}function nb(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function sb(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new G0;if(nb(r),t)ib(e,r,i,t,n);else{var s=Fh(r)||e.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Nh(e,r),i?process.nextTick(Dh,e,r,s,n):Dh(e,r,s,n)}}function Dh(e,t,r,i){r||ob(e,t),t.pendingcb--,i(),Nr(e,t)}function ob(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Nh(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,ho(e,t,!0,t.length,n,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new Ch(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,d=r.callback,h=t.objectMode?1:l.length;if(ho(e,t,!1,h,l,u,d),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}K.prototype._write=function(e,t,r){r(new H0("_write()"))};K.prototype._writev=null;K.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||ub(this,i,r),this};Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Fh(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function ab(e,t){e._final(function(r){t.pendingcb--,r&&hr(e,r),t.prefinished=!0,e.emit("prefinish"),Nr(e,t)})}function lb(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(ab,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Nr(e,t){var r=Fh(t);if(r&&(lb(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function ub(e,t,r){t.ending=!0,Nr(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function hb(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});K.prototype.destroy=fo.destroy;K.prototype._undestroy=fo.undestroy;K.prototype._destroy=function(e,t){t(e)}});var It=v((WE,Wh)=>{"use strict";var fb=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Wh.exports=Ge;var Ih=mo(),go=co();Xe()(Ge,Ih);for(po=fb(go.prototype),hn=0;hn<po.length;hn++)fn=po[hn],Ge.prototype[fn]||(Ge.prototype[fn]=go.prototype[fn]);var po,fn,hn;function Ge(e){if(!(this instanceof Ge))return new Ge(e);Ih.call(this,e),go.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",cb)))}Object.defineProperty(Ge.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ge.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ge.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function cb(){this._writableState.ended||process.nextTick(db,this)}function db(e){e.end()}Object.defineProperty(Ge.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var cn=v((BE,zh)=>{"use strict";var Bh=gt().codes.ERR_STREAM_PREMATURE_CLOSE;function pb(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function gb(){}function mb(e){return e.setHeader&&typeof e.abort=="function"}function Uh(e,t,r){if(typeof t=="function")return Uh(e,null,t);t||(t={}),r=pb(r||gb);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,s=function(){e.writable||a()},o=e._writableState&&e._writableState.finished,a=function(){n=!1,o=!0,i||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(e)},d=function(f){r.call(e,f)},h=function(){var f;if(i&&!l)return(!e._readableState||!e._readableState.ended)&&(f=new Bh),r.call(e,f);if(n&&!o)return(!e._writableState||!e._writableState.ended)&&(f=new Bh),r.call(e,f)},p=function(){e.req.on("finish",a)};return mb(e)?(e.on("complete",a),e.on("abort",h),e.req?p():e.on("request",p)):n&&!e._writableState&&(e.on("end",s),e.on("close",s)),e.on("end",u),e.on("finish",a),t.error!==!1&&e.on("error",d),e.on("close",h),function(){e.removeListener("complete",a),e.removeListener("abort",h),e.removeListener("request",p),e.req&&e.req.removeListener("finish",a),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",u),e.removeListener("error",d),e.removeListener("close",h)}}zh.exports=Uh});var Gh=v((UE,Hh)=>{"use strict";var dn;function yt(e,t,r){return t=yb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yb(e){var t=bb(e,"string");return typeof t=="symbol"?t:String(t)}function bb(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wb=cn(),bt=Symbol("lastResolve"),Wt=Symbol("lastReject"),$r=Symbol("error"),pn=Symbol("ended"),Bt=Symbol("lastPromise"),yo=Symbol("handlePromise"),Ut=Symbol("stream");function wt(e,t){return{value:e,done:t}}function vb(e){var t=e[bt];if(t!==null){var r=e[Ut].read();r!==null&&(e[Bt]=null,e[bt]=null,e[Wt]=null,t(wt(r,!1)))}}function _b(e){process.nextTick(vb,e)}function Sb(e,t){return function(r,i){e.then(function(){if(t[pn]){r(wt(void 0,!0));return}t[yo](r,i)},i)}}var Eb=Object.getPrototypeOf(function(){}),Rb=Object.setPrototypeOf((dn={get stream(){return this[Ut]},next:function(){var t=this,r=this[$r];if(r!==null)return Promise.reject(r);if(this[pn])return Promise.resolve(wt(void 0,!0));if(this[Ut].destroyed)return new Promise(function(o,a){process.nextTick(function(){t[$r]?a(t[$r]):o(wt(void 0,!0))})});var i=this[Bt],n;if(i)n=new Promise(Sb(i,this));else{var s=this[Ut].read();if(s!==null)return Promise.resolve(wt(s,!1));n=new Promise(this[yo])}return this[Bt]=n,n}},yt(dn,Symbol.asyncIterator,function(){return this}),yt(dn,"return",function(){var t=this;return new Promise(function(r,i){t[Ut].destroy(null,function(n){if(n){i(n);return}r(wt(void 0,!0))})})}),dn),Eb),xb=function(t){var r,i=Object.create(Rb,(r={},yt(r,Ut,{value:t,writable:!0}),yt(r,bt,{value:null,writable:!0}),yt(r,Wt,{value:null,writable:!0}),yt(r,$r,{value:null,writable:!0}),yt(r,pn,{value:t._readableState.endEmitted,writable:!0}),yt(r,yo,{value:function(s,o){var a=i[Ut].read();a?(i[Bt]=null,i[bt]=null,i[Wt]=null,s(wt(a,!1))):(i[bt]=s,i[Wt]=o)},writable:!0}),r));return i[Bt]=null,wb(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Wt];s!==null&&(i[Bt]=null,i[bt]=null,i[Wt]=null,s(n)),i[$r]=n;return}var o=i[bt];o!==null&&(i[Bt]=null,i[bt]=null,i[Wt]=null,o(wt(void 0,!0))),i[pn]=!0}),t.on("readable",_b.bind(null,i)),i};Hh.exports=xb});var Kh=v((zE,Jh)=>{"use strict";function Vh(e,t,r,i,n,s,o){try{var a=e[s](o),l=a.value}catch(u){r(u);return}a.done?t(l):Promise.resolve(l).then(i,n)}function Mb(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var s=e.apply(t,r);function o(l){Vh(s,i,n,o,a,"next",l)}function a(l){Vh(s,i,n,o,a,"throw",l)}o(void 0)})}}function Yh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Ob(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yh(Object(r),!0).forEach(function(i){Tb(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yh(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Tb(e,t,r){return t=kb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kb(e){var t=Ab(e,"string");return typeof t=="symbol"?t:String(t)}function Ab(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pb=gt().codes.ERR_INVALID_ARG_TYPE;function qb(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new Pb("iterable",["Iterable"],t);var n=new e(Ob({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=Mb(function*(){try{var l=yield i.next(),u=l.value,d=l.done;d?n.push(null):n.push(yield u)?o():s=!1}catch(h){n.destroy(h)}}),a.apply(this,arguments)}return n}Jh.exports=qb});var mo=v((GE,af)=>{"use strict";af.exports=U;var fr;U.ReadableState=ef;var HE=C("events").EventEmitter,Xh=function(t,r){return t.listeners(r).length},Wr=so(),gn=C("buffer").Buffer,jb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Db(e){return gn.from(e)}function Cb(e){return gn.isBuffer(e)||e instanceof jb}var bo=C("util"),N;bo&&bo.debuglog?N=bo.debuglog("stream"):N=function(){};var Lb=Oh(),xo=lo(),Nb=uo(),Fb=Nb.getHighWaterMark,mn=gt().codes,$b=mn.ERR_INVALID_ARG_TYPE,Ib=mn.ERR_STREAM_PUSH_AFTER_EOF,Wb=mn.ERR_METHOD_NOT_IMPLEMENTED,Bb=mn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,cr,wo,vo;Xe()(U,Wr);var Ir=xo.errorOrDestroy,_o=["error","close","destroy","pause","resume"];function Ub(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function ef(e,t,r){fr=fr||It(),e=e||{},typeof r!="boolean"&&(r=t instanceof fr),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Fb(this,e,"readableHighWaterMark",r),this.buffer=new Lb,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(cr||(cr=Mr().StringDecoder),this.decoder=new cr(e.encoding),this.encoding=e.encoding)}function U(e){if(fr=fr||It(),!(this instanceof U))return new U(e);var t=this instanceof fr;this._readableState=new ef(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Wr.call(this)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});U.prototype.destroy=xo.destroy;U.prototype._undestroy=xo.undestroy;U.prototype._destroy=function(e,t){t(e)};U.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=gn.from(e,t),t=""),i=!0),tf(this,e,t,!1,i)};U.prototype.unshift=function(e){return tf(this,e,null,!0,!1)};function tf(e,t,r,i,n){N("readableAddChunk",t);var s=e._readableState;if(t===null)s.reading=!1,Gb(e,s);else{var o;if(n||(o=zb(s,t)),o)Ir(e,o);else if(s.objectMode||t&&t.length>0)if(typeof t!="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==gn.prototype&&(t=Db(t)),i)s.endEmitted?Ir(e,new Bb):So(e,s,t,!0);else if(s.ended)Ir(e,new Ib);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||t.length!==0?So(e,s,t,!1):Ro(e,s)):So(e,s,t,!1)}else i||(s.reading=!1,Ro(e,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function So(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&yn(e)),Ro(e,t)}function zb(e,t){var r;return!Cb(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new $b("chunk",["string","Buffer","Uint8Array"],t)),r}U.prototype.isPaused=function(){return this._readableState.flowing===!1};U.prototype.setEncoding=function(e){cr||(cr=Mr().StringDecoder);var t=new cr(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Zh=1073741824;function Hb(e){return e>=Zh?e=Zh:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Qh(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Hb(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}U.prototype.read=function(e){N("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return N("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Eo(this):yn(this),null;if(e=Qh(e,t),e===0&&t.ended)return t.length===0&&Eo(this),null;var i=t.needReadable;N("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,N("length less than watermark",i)),t.ended||t.reading?(i=!1,N("reading or ended",i)):i&&(N("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Qh(r,t)));var n;return e>0?n=sf(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Eo(this)),n!==null&&this.emit("data",n),n};function Gb(e,t){if(N("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?yn(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,rf(e)))}}function yn(e){var t=e._readableState;N("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(N("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(rf,e))}function rf(e){var t=e._readableState;N("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Mo(e)}function Ro(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Vb,e,t))}function Vb(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(N("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}U.prototype._read=function(e){Ir(this,new Wb("_read()"))};U.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,N("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=n?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",o);function o(S,E){N("onunpipe"),S===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,d())}function a(){N("onend"),e.end()}var l=Yb(r);e.on("drain",l);var u=!1;function d(){N("cleanup"),e.removeListener("close",y),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}r.on("data",h);function h(S){N("ondata");var E=e.write(S);N("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&of(i.pipes,e)!==-1)&&!u&&(N("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(S){N("onerror",S),b(),e.removeListener("error",p),Xh(e,"error")===0&&Ir(e,S)}Ub(e,"error",p);function y(){e.removeListener("finish",f),b()}e.once("close",y);function f(){N("onfinish"),e.removeListener("close",y),b()}e.once("finish",f);function b(){N("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(N("pipe resume"),r.resume()),e};function Yb(e){return function(){var r=e._readableState;N("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Xh(e,"data")&&(r.flowing=!0,Mo(e))}}U.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=of(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};U.prototype.on=function(e,t){var r=Wr.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,N("on readable",i.length,i.reading),i.length?yn(this):i.reading||process.nextTick(Jb,this)),r};U.prototype.addListener=U.prototype.on;U.prototype.removeListener=function(e,t){var r=Wr.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(nf,this),r};U.prototype.removeAllListeners=function(e){var t=Wr.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(nf,this),t};function nf(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Jb(e){N("readable nexttick read 0"),e.read(0)}U.prototype.resume=function(){var e=this._readableState;return e.flowing||(N("resume"),e.flowing=!e.readableListening,Kb(this,e)),e.paused=!1,this};function Kb(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(Zb,e,t))}function Zb(e,t){N("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Mo(e),t.flowing&&!t.reading&&e.read(0)}U.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Mo(e){var t=e._readableState;for(N("flow",t.flowing);t.flowing&&e.read()!==null;);}U.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(N("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(N("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=t.push(o);a||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(a){return function(){return e[a].apply(e,arguments)}})(n));for(var s=0;s<_o.length;s++)e.on(_o[s],this.emit.bind(this,_o[s]));return this._read=function(o){N("wrapped _read",o),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return wo===void 0&&(wo=Gh()),wo(this)});Object.defineProperty(U.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(U.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(U.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});U._fromList=sf;Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function sf(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Eo(e){var t=e._readableState;N("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(Qb,t,e))}function Qb(e,t){if(N("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(U.from=function(e,t){return vo===void 0&&(vo=Kh()),vo(U,e,t)});function of(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var Oo=v((VE,uf)=>{"use strict";uf.exports=tt;var bn=gt().codes,Xb=bn.ERR_METHOD_NOT_IMPLEMENTED,ew=bn.ERR_MULTIPLE_CALLBACK,tw=bn.ERR_TRANSFORM_ALREADY_TRANSFORMING,rw=bn.ERR_TRANSFORM_WITH_LENGTH_0,wn=It();Xe()(tt,wn);function iw(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new ew);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function tt(e){if(!(this instanceof tt))return new tt(e);wn.call(this,e),this._transformState={afterTransform:iw.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",nw)}function nw(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){lf(e,t,r)}):lf(this,null,null)}tt.prototype.push=function(e,t){return this._transformState.needTransform=!1,wn.prototype.push.call(this,e,t)};tt.prototype._transform=function(e,t,r){r(new Xb("_transform()"))};tt.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};tt.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};tt.prototype._destroy=function(e,t){wn.prototype._destroy.call(this,e,function(r){t(r)})};function lf(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new rw;if(e._transformState.transforming)throw new tw;return e.push(null)}});var cf=v((YE,ff)=>{"use strict";ff.exports=Br;var hf=Oo();Xe()(Br,hf);function Br(e){if(!(this instanceof Br))return new Br(e);hf.call(this,e)}Br.prototype._transform=function(e,t,r){r(null,e)}});var yf=v((JE,mf)=>{"use strict";var To;function sw(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var gf=gt().codes,ow=gf.ERR_MISSING_ARGS,aw=gf.ERR_STREAM_DESTROYED;function df(e){if(e)throw e}function lw(e){return e.setHeader&&typeof e.abort=="function"}function uw(e,t,r,i){i=sw(i);var n=!1;e.on("close",function(){n=!0}),To===void 0&&(To=cn()),To(e,{readable:t,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,lw(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(o||new aw("pipe"))}}}function pf(e){e()}function hw(e,t){return e.pipe(t)}function fw(e){return!e.length||typeof e[e.length-1]!="function"?df:e.pop()}function cw(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=fw(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new ow("streams");var n,s=t.map(function(o,a){var l=a<t.length-1,u=a>0;return uw(o,l,u,function(d){n||(n=d),d&&s.forEach(pf),!l&&(s.forEach(pf),i(n))})});return t.reduce(hw)}mf.exports=cw});var zt=v((De,zr)=>{var Ur=C("stream");process.env.READABLE_STREAM==="disable"&&Ur?(zr.exports=Ur.Readable,Object.assign(zr.exports,Ur),zr.exports.Stream=Ur):(De=zr.exports=mo(),De.Stream=Ur||De,De.Readable=De,De.Writable=co(),De.Duplex=It(),De.Transform=Oo(),De.PassThrough=cf(),De.finished=cn(),De.pipeline=yf())});var Co=v((KE,wf)=>{var dr=[],Hr=[],ko=function(){};function Po(e){return~dr.indexOf(e)?!1:(dr.push(e),!0)}function qo(e){ko=e}function dw(e){for(var t=[],r=0;r<dr.length;r++){if(dr[r].async){t.push(dr[r]);continue}if(dr[r](e))return!0}return t.length?new Promise(function(n){Promise.all(t.map(function(o){return o(e)})).then(function(o){n(o.some(Boolean))})}):!1}function jo(e){return~Hr.indexOf(e)?!1:(Hr.push(e),!0)}function Ao(){ko.apply(ko,arguments)}function bf(e){for(var t=0;t<Hr.length;t++)e=Hr[t].apply(Hr[t],arguments);return e}function Do(e,t){var r=Object.prototype.hasOwnProperty;for(var i in t)r.call(t,i)&&(e[i]=t[i]);return e}function pw(e){return e.enabled=!1,e.modify=jo,e.set=qo,e.use=Po,Do(function(){return!1},e)}function gw(e){function t(){var r=Array.prototype.slice.call(arguments,0);return Ao.call(Ao,e,bf(r,e)),!0}return e.enabled=!0,e.modify=jo,e.set=qo,e.use=Po,Do(t,e)}wf.exports=function(t){return t.introduce=Do,t.enabled=dw,t.process=bf,t.modify=jo,t.write=Ao,t.nope=pw,t.yep=gw,t.set=qo,t.use=Po,t}});var _f=v((ZE,vf)=>{var mw=Co(),yw=mw(function e(t,r){return r=r||{},r.namespace=t,r.prod=!0,r.dev=!1,r.force||e.force?e.yep(r):e.nope(r)});vf.exports=yw});var Of=v((QE,Mf)=>{"use strict";var Ve={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]},Ef=Object.create(null);for(let e in Ve)Object.hasOwn(Ve,e)&&(Ef[Ve[e]]=e);var oe={to:{},get:{}};oe.get=function(e){let t=e.slice(0,3).toLowerCase(),r,i;switch(t){case"hsl":{r=oe.get.hsl(e),i="hsl";break}case"hwb":{r=oe.get.hwb(e),i="hwb";break}default:{r=oe.get.rgb(e),i="rgb";break}}return r?{model:i,value:r}:null};oe.get.rgb=function(e){if(!e)return null;let t=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,l,u;if(a=e.match(r)){for(u=a[2],a=a[1],l=0;l<3;l++){let d=l*2;o[l]=Number.parseInt(a.slice(d,d+2),16)}u&&(o[3]=Number.parseInt(u,16)/255)}else if(a=e.match(t)){for(a=a[1],u=a[3],l=0;l<3;l++)o[l]=Number.parseInt(a[l]+a[l],16);u&&(o[3]=Number.parseInt(u+u,16)/255)}else if(a=e.match(i)){for(l=0;l<3;l++)o[l]=Number.parseInt(a[l+1],10);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=e.match(n)){for(l=0;l<3;l++)o[l]=Math.round(Number.parseFloat(a[l+1])*2.55);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=e.match(s))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ve,a[1])?(o=Ve[a[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=vt(o[l],0,255);return o[3]=vt(o[3],0,1),o};oe.get.hsl=function(e){if(!e)return null;let t=/^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=e.match(t);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=vt(Number.parseFloat(r[2]),0,100),o=vt(Number.parseFloat(r[3]),0,100),a=vt(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};oe.get.hwb=function(e){if(!e)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=vt(Number.parseFloat(r[2]),0,100),o=vt(Number.parseFloat(r[3]),0,100),a=vt(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};oe.to.hex=function(...e){return"#"+vn(e[0])+vn(e[1])+vn(e[2])+(e[3]<1?vn(Math.round(e[3]*255)):"")};oe.to.rgb=function(...e){return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};oe.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};oe.to.hsl=function(...e){return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};oe.to.hwb=function(...e){let t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};oe.to.keyword=function(...e){return Ef[e.slice(0,3)]};function vt(e,t,r){return Math.min(Math.max(t,e),r)}function vn(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Rf={};for(let e of Object.keys(Ve))Rf[Ve[e]]=e;var M={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},rt=(6/29)**3;function pr(e){let t=e>.0031308?1.055*e**.4166666666666667-.055:e*12.92;return Math.min(Math.max(0,t),1)}function gr(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(let e of Object.keys(M)){if(!("channels"in M[e]))throw new Error("missing channels property: "+e);if(!("labels"in M[e]))throw new Error("missing channel labels property: "+e);if(M[e].labels.length!==M[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=M[e];delete M[e].channels,delete M[e].labels,Object.defineProperty(M[e],"channels",{value:t}),Object.defineProperty(M[e],"labels",{value:r})}M.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,n=Math.min(t,r,i),s=Math.max(t,r,i),o=s-n,a,l;switch(s){case n:{a=0;break}case t:{a=(r-i)/o;break}case r:{a=2+(i-t)/o;break}case i:{a=4+(t-r)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);let u=(n+s)/2;return s===n?l=0:u<=.5?l=o/(s+n):l=o/(2-s-n),[a,l*100,u*100]};M.rgb.hsv=function(e){let t,r,i,n,s,o=e[0]/255,a=e[1]/255,l=e[2]/255,u=Math.max(o,a,l),d=u-Math.min(o,a,l),h=function(p){return(u-p)/6/d+1/2};if(d===0)n=0,s=0;else{switch(s=d/u,t=h(o),r=h(a),i=h(l),u){case o:{n=i-r;break}case a:{n=1/3+t-i;break}case l:{n=2/3+r-t;break}}n<0?n+=1:n>1&&(n-=1)}return[n*360,s*100,u*100]};M.rgb.hwb=function(e){let t=e[0],r=e[1],i=e[2],n=M.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,i));return i=1-1/255*Math.max(t,Math.max(r,i)),[n,s*100,i*100]};M.rgb.oklab=function(e){let t=gr(e[0]/255),r=gr(e[1]/255),i=gr(e[2]/255),n=Math.cbrt(.4122214708*t+.5363325363*r+.0514459929*i),s=Math.cbrt(.2119034982*t+.6806995451*r+.1073969566*i),o=Math.cbrt(.0883024619*t+.2817188376*r+.6299787005*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,n=Math.min(1-t,1-r,1-i),s=(1-t-n)/(1-n)||0,o=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function bw(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}M.rgb.keyword=function(e){let t=Rf[e];if(t)return t;let r=Number.POSITIVE_INFINITY,i;for(let n of Object.keys(Ve)){let s=Ve[n],o=bw(e,s);o<r&&(r=o,i=n)}return i};M.keyword.rgb=function(e){return Ve[e]};M.rgb.xyz=function(e){let t=gr(e[0]/255),r=gr(e[1]/255),i=gr(e[2]/255),n=t*.4124564+r*.3575761+i*.1804375,s=t*.2126729+r*.7151522+i*.072175,o=t*.0193339+r*.119192+i*.9503041;return[n*100,s*100,o*100]};M.rgb.lab=function(e){let t=M.rgb.xyz(e),r=t[0],i=t[1],n=t[2];r/=95.047,i/=100,n/=108.883,r=r>rt?r**(1/3):7.787*r+16/116,i=i>rt?i**(1/3):7.787*i+16/116,n=n>rt?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(r-i),a=200*(i-n);return[s,o,a]};M.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100,n,s;if(r===0)return s=i*255,[s,s,s];let o=i<.5?i*(1+r):i+r-i*r,a=2*i-o,l=[0,0,0];for(let u=0;u<3;u++)n=t+1/3*-(u-1),n<0&&n++,n>1&&n--,6*n<1?s=a+(o-a)*6*n:2*n<1?s=o:3*n<2?s=a+(o-a)*(2/3-n)*6:s=a,l[u]=s*255;return l};M.hsl.hsv=function(e){let t=e[0],r=e[1]/100,i=e[2]/100,n=r,s=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r);return[t,a*100,o*100]};M.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,i=e[2]/100,n=Math.floor(t)%6,s=t-Math.floor(t),o=255*i*(1-r),a=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};M.hsv.hsl=function(e){let t=e[0],r=e[1]/100,i=e[2]/100,n=Math.max(i,.01),s,o;o=(2-r)*i;let a=(2-r)*n;return s=r*n,s/=a<=1?a:2-a,s=s||0,o/=2,[t,s*100,o*100]};M.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100,n=r+i,s;n>1&&(r/=n,i/=n);let o=Math.floor(6*t),a=1-i;s=6*t-o,(o&1)!==0&&(s=1-s);let l=r+s*(a-r),u,d,h;switch(o){default:case 6:case 0:{u=a,d=l,h=r;break}case 1:{u=l,d=a,h=r;break}case 2:{u=r,d=a,h=l;break}case 3:{u=r,d=l,h=a;break}case 4:{u=l,d=r,h=a;break}case 5:{u=a,d=r,h=l;break}}return[u*255,d*255,h*255]};M.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,n=e[3]/100,s=1-Math.min(1,t*(1-n)+n),o=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};M.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,n,s,o;return n=t*3.2404542+r*-1.5371385+i*-.4985314,s=t*-.969266+r*1.8760108+i*.041556,o=t*.0556434+r*-.2040259+i*1.0572252,n=pr(n),s=pr(s),o=pr(o),[n*255,s*255,o*255]};M.xyz.lab=function(e){let t=e[0],r=e[1],i=e[2];t/=95.047,r/=100,i/=108.883,t=t>rt?t**(1/3):7.787*t+16/116,r=r>rt?r**(1/3):7.787*r+16/116,i=i>rt?i**(1/3):7.787*i+16/116;let n=116*r-16,s=500*(t-r),o=200*(r-i);return[n,s,o]};M.xyz.oklab=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,n=Math.cbrt(.8189330101*t+.3618667424*r-.1288597137*i),s=Math.cbrt(.0329845436*t+.9293118715*r+.0361456387*i),o=Math.cbrt(.0482003018*t+.2643662691*r+.633851707*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.oklab.oklch=function(e){return M.lab.lch(e)};M.oklab.xyz=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,n=(.999999998*t+.396337792*r+.215803758*i)**3,s=(1.000000008*t-.105561342*r-.063854175*i)**3,o=(1.000000055*t-.089484182*r-1.291485538*i)**3,a=1.227013851*n-.55779998*s+.281256149*o,l=-.040580178*n+1.11225687*s-.071676679*o,u=-.076381285*n-.421481978*s+1.58616322*o;return[a*100,l*100,u*100]};M.oklab.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,n=(t+.3963377774*r+.2158037573*i)**3,s=(t-.1055613458*r-.0638541728*i)**3,o=(t-.0894841775*r-1.291485548*i)**3,a=pr(4.0767416621*n-3.3077115913*s+.2309699292*o),l=pr(-1.2684380046*n+2.6097574011*s-.3413193965*o),u=pr(-.0041960863*n-.7034186147*s+1.707614701*o);return[a*255,l*255,u*255]};M.oklch.oklab=function(e){return M.lch.lab(e)};M.lab.xyz=function(e){let t=e[0],r=e[1],i=e[2],n,s,o;s=(t+16)/116,n=r/500+s,o=s-i/200;let a=s**3,l=n**3,u=o**3;return s=a>rt?a:(s-16/116)/7.787,n=l>rt?l:(n-16/116)/7.787,o=u>rt?u:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};M.lab.lch=function(e){let t=e[0],r=e[1],i=e[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(r*r+i*i);return[t,o,n]};M.lch.lab=function(e){let t=e[0],r=e[1],n=e[2]/360*2*Math.PI,s=r*Math.cos(n),o=r*Math.sin(n);return[t,s,o]};M.rgb.ansi16=function(e,t=null){let[r,i,n]=e,s=t===null?M.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};M.hsv.ansi16=function(e){return M.rgb.ansi16(M.hsv.rgb(e),e[2])};M.rgb.ansi256=function(e){let t=e[0],r=e[1],i=e[2];return t>>4===r>>4&&r>>4===i>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};M.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(Math.trunc(e>50)+1)*.5,i=(t&1)*r*255,n=(t>>1&1)*r*255,s=(t>>2&1)*r*255;return[i,n,s]};M.ansi256.rgb=function(e){if(e=e[0],e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let t,r=Math.floor(e/36)/5*255,i=Math.floor((t=e%36)/6)/5*255,n=t%6/5*255;return[r,i,n]};M.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};M.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=[...r].map(a=>a+a).join(""));let i=Number.parseInt(r,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};M.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,n=Math.max(Math.max(t,r),i),s=Math.min(Math.min(t,r),i),o=n-s,a,l=o<1?s/(1-o):0;return o<=0?a=0:n===t?a=(r-i)/o%6:n===r?a=2+(i-t)/o:a=4+(t-r)/o,a/=6,a%=1,[a*360,o*100,l*100]};M.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,i=r<.5?2*t*r:2*t*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[e[0],i*100,n*100]};M.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,i=t*r,n=0;return i<1&&(n=(r-i)/(1-i)),[e[0],i*100,n*100]};M.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100;if(r===0)return[i*255,i*255,i*255];let n=[0,0,0],s=t%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:{n[0]=1,n[1]=o,n[2]=0;break}case 1:{n[0]=a,n[1]=1,n[2]=0;break}case 2:{n[0]=0,n[1]=1,n[2]=o;break}case 3:{n[0]=0,n[1]=a,n[2]=1;break}case 4:{n[0]=o,n[1]=0,n[2]=1;break}default:n[0]=1,n[1]=0,n[2]=a}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};M.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,i=t+r*(1-t),n=0;return i>0&&(n=t/i),[e[0],n*100,i*100]};M.hcg.hsl=function(e){let t=e[1]/100,i=e[2]/100*(1-t)+.5*t,n=0;return i>0&&i<.5?n=t/(2*i):i>=.5&&i<1&&(n=t/(2*(1-i))),[e[0],n*100,i*100]};M.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,i=t+r*(1-t);return[e[0],(i-t)*100,(1-i)*100]};M.hwb.hcg=function(e){let t=e[1]/100,i=1-e[2]/100,n=i-t,s=0;return n<1&&(s=(i-n)/(1-n)),[e[0],n*100,s*100]};M.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};M.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};M.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};M.gray.hsl=function(e){return[0,0,e[0]]};M.gray.hsv=M.gray.hsl;M.gray.hwb=function(e){return[0,100,e[0]]};M.gray.cmyk=function(e){return[0,0,0,e[0]]};M.gray.lab=function(e){return[e[0],0,0]};M.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(i.length)+i};M.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function ww(){let e={},t=Object.keys(M);for(let{length:r}=t,i=0;i<r;i++)e[t[i]]={distance:-1,parent:null};return e}function vw(e){let t=ww(),r=[e];for(t[e].distance=0;r.length>0;){let i=r.pop(),n=Object.keys(M[i]);for(let{length:s}=n,o=0;o<s;o++){let a=n[o],l=t[a];l.distance===-1&&(l.distance=t[i].distance+1,l.parent=i,r.unshift(a))}}return t}function _w(e,t){return function(r){return t(e(r))}}function Sw(e,t){let r=[t[e].parent,e],i=M[t[e].parent][e],n=t[e].parent;for(;t[n].parent;)r.unshift(t[n].parent),i=_w(M[t[n].parent][n],i),n=t[n].parent;return i.conversion=r,i}function Ew(e){let t=vw(e),r={},i=Object.keys(t);for(let{length:n}=i,s=0;s<n;s++){let o=i[s];t[o].parent!==null&&(r[o]=Sw(o,t))}return r}var le={},Rw=Object.keys(M);function xw(e){let t=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function Mw(e){let t=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=e(r);if(typeof n=="object")for(let{length:s}=n,o=0;o<s;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}for(let e of Rw){le[e]={},Object.defineProperty(le[e],"channels",{value:M[e].channels}),Object.defineProperty(le[e],"labels",{value:M[e].labels});let t=Ew(e),r=Object.keys(t);for(let i of r){let n=t[i];le[e][i]=Mw(n),le[e][i].raw=xw(n)}}var xf=["keyword","gray","hex"],Lo={};for(let e of Object.keys(le))Lo[[...le[e].labels].sort().join("")]=e;var No={};function se(e,t){if(!(this instanceof se))return new se(e,t);if(t&&t in xf&&(t=null),t&&!(t in le))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof se)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=oe.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=le[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=le[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=Fo(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let s=n.sort().join("");if(!(s in Lo))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Lo[s];let{labels:o}=le[this.model],a=[];for(r=0;r<o.length;r++)a.push(e[o[r]]);this.color=Fo(a)}if(No[this.model])for(i=le[this.model].channels,r=0;r<i;r++){let n=No[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}se.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in oe.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return oe.to[t.model](...r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return oe.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=le[this.model],{labels:r}=le[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new se([...this.color.map(Tw(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new se([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Z("rgb",0,ne(255)),green:Z("rgb",1,ne(255)),blue:Z("rgb",2,ne(255)),hue:Z(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Z("hsl",1,ne(100)),lightness:Z("hsl",2,ne(100)),saturationv:Z("hsv",1,ne(100)),value:Z("hsv",2,ne(100)),chroma:Z("hcg",1,ne(100)),gray:Z("hcg",2,ne(100)),white:Z("hwb",1,ne(100)),wblack:Z("hwb",2,ne(100)),cyan:Z("cmyk",0,ne(100)),magenta:Z("cmyk",1,ne(100)),yellow:Z("cmyk",2,ne(100)),black:Z("cmyk",3,ne(100)),x:Z("xyz",0,ne(95.047)),y:Z("xyz",1,ne(100)),z:Z("xyz",2,ne(108.833)),l:Z("lab",0,ne(100)),a:Z("lab",1),b:Z("lab",2),keyword(e){return e!==void 0?new se(e):le[this.model].keyword(this.color)},hex(e){return e!==void 0?new se(e):oe.to.hex(...this.rgb().round().color)},hexa(e){if(e!==void 0)return new se(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),oe.to.hex(...t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return se.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,s=2*n-1,o=r.alpha()-i.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,l=1-a;return se.rgb(a*r.red()+l*i.red(),a*r.green()+l*i.green(),a*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(le)){if(xf.includes(e))continue;let{channels:t}=le[e];se.prototype[e]=function(...r){return this.model===e?new se(this):r.length>0?new se(r,e):new se([...kw(le[this.model][e].raw(this.color)),this.valpha],e)},se[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=Fo(r,t)),new se(i,e)}}function Ow(e,t){return Number(e.toFixed(t))}function Tw(e){return function(t){return Ow(t,e)}}function Z(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(No[i]||=[])[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function ne(e){return function(t){return Math.max(0,Math.min(e,t))}}function kw(e){return Array.isArray(e)?e:[e]}function Fo(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}function Aw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pw=function(t){for(var r=0,i=0;r<t.length;i=t.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},Sf=Aw(Pw);function qw(e,t){let r=e.split(t||":"),i=Sf(r[0]);if(!r.length)return i;for(let n=0,s=r.length-1;n<s;n++)i=se(i).mix(se(Sf(r[n+1]))).saturate(1).hex();return i}Mf.exports=qw});var kf=v((XE,Tf)=>{"use strict";function Ie(e,t){if(t)return new Ie(e).style(t);if(!(this instanceof Ie))return new Ie(e);this.text=e}Ie.prototype.prefix="\x1B[";Ie.prototype.suffix="m";Ie.prototype.hex=function(t){t=t[0]==="#"?t.substring(1):t,t.length===3&&(t=t.split(""),t[5]=t[2],t[4]=t[2],t[3]=t[1],t[2]=t[1],t[1]=t[0],t=t.join(""));var r=t.substring(0,2),i=t.substring(2,4),n=t.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};Ie.prototype.rgb=function(t,r,i){var n=t/255*5,s=r/255*5,o=i/255*5;return this.ansi(n,s,o)};Ie.prototype.ansi=function(t,r,i){var n=Math.round(t),s=Math.round(r),o=Math.round(i);return 16+n*36+s*6+o};Ie.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ie.prototype.style=function(t){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(t))+this.suffix+this.text+this.reset()};Tf.exports=Ie});var Pf=v((e2,Af)=>{var jw=Of(),Dw=kf();Af.exports=function(t,r){var i=r.namespace,n=r.colors!==!1?Dw(i+":",jw(i)):i+":";return t[0]=n+" "+t[0],t}});var jf=v((t2,qf)=>{"use strict";qf.exports=function(t,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(t))return!1;continue}if(new RegExp("^"+r+"$").test(t))return!0}return!1}});var Cf=v((r2,Df)=>{var Cw=jf();Df.exports=function(t){return function(i){try{return Cw(i,t())}catch{}return!1}}});var Nf=v((i2,Lf)=>{var Lw=Cf();Lf.exports=Lw(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var $f=v((n2,Ff)=>{Ff.exports=function(e,t){try{Function.prototype.apply.call(console.log,console,t)}catch{}}});var Wf=v((s2,If)=>{var Nw=Co(),Fw=C("tty").isatty(1),_n=Nw(function e(t,r){return r=r||{},r.colors="colors"in r?r.colors:Fw,r.namespace=t,r.prod=!1,r.dev=!0,!e.enabled(t)&&!(r.force||e.force)?e.nope(r):e.yep(r)});_n.modify(Pf());_n.use(Nf());_n.set($f());If.exports=_n});var Gr=v((o2,$o)=>{process.env.NODE_ENV==="production"?$o.exports=_f():$o.exports=Wf()});var Uf=v((a2,Bf)=>{"use strict";var Io=C("fs"),{StringDecoder:$w}=C("string_decoder"),{Stream:Iw}=zt();function Ww(){}Bf.exports=(e,t)=>{let r=Buffer.alloc(65536),i=new $w("utf8"),n=new Iw,s="",o=0,a=0;return e.start===-1&&delete e.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},Io.open(e.file,"a+","0644",(l,u)=>{if(l){t?t(l):n.emit("error",l),n.destroy();return}(function d(){if(n.destroyed){Io.close(u,Ww);return}return Io.read(u,r,0,r.length,o,(h,p)=>{if(h){t?t(h):n.emit("error",h),n.destroy();return}if(!p)return s&&((e.start==null||a>e.start)&&(t?t(null,s):n.emit("line",s)),a++,s=""),setTimeout(d,1e3);let y=i.write(r.slice(0,p));t||n.emit("data",y),y=(s+y).split(/\n+/);let f=y.length-1,b=0;for(;b<f;b++)(e.start==null||a>e.start)&&(t?t(null,y[b]):n.emit("line",y[b])),a++;return s=y[f],o+=p,d()})})()}),t?n.destroy:n}});var Vf=v((u2,Gf)=>{"use strict";var xe=C("fs"),ue=C("path"),zf=vh(),Bw=C("zlib"),{MESSAGE:Uw}=te(),{Stream:zw,PassThrough:Hf}=zt(),Hw=or(),We=Gr()("winston:file"),Gw=C("os"),Vw=Uf();Gf.exports=class extends Hw{constructor(t={}){super(t),this.name=t.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(t[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new Hf,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),t.filename||t.dirname)r("filename or dirname","stream"),this._basename=this.filename=t.filename?ue.basename(t.filename):"winston.log",this.dirname=t.dirname||ue.dirname(t.filename),this.options=t.options||{flags:"a"};else if(t.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(t.stream)),this.dirname=ue.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=t.maxsize||null,this.rotationFormat=t.rotationFormat||!1,this.zippedArchive=t.zippedArchive||!1,this.maxFiles=t.maxFiles||null,this.eol=typeof t.eol=="string"?t.eol:Gw.EOL,this.tailable=t.tailable||!1,this.lazy=t.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(t,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(t,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(t,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(t,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(t,r)})});return}}let i=`${t[Uw]}${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",t),!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 o=this._stream.write(i,s.bind(this));return o?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),We("written",o,this._drain),this.finishIfEnding(),o}query(t,r){typeof t=="function"&&(r=t,t={}),t=h(t);let i=ue.join(this.dirname,this.filename),n="",s=[],o=0,a=xe.createReadStream(i,{encoding:"utf8"});a.on("error",p=>{if(a.readable&&a.destroy(),!!r)return p.code!=="ENOENT"?r(p):r(null,s)}),a.on("data",p=>{p=(n+p).split(/\n+/);let y=p.length-1,f=0;for(;f<y;f++)(!t.start||o>=t.start)&&l(p[f]),o++;n=p[y]}),a.on("close",()=>{n&&l(n,!0),t.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(p,y){try{let f=JSON.parse(p);d(f)&&u(f)}catch(f){y||a.emit("error",f)}}function u(p){if(t.rows&&s.length>=t.rows&&t.order!=="desc"){a.readable&&a.destroy();return}t.fields&&(p=t.fields.reduce((y,f)=>(y[f]=p[f],y),{})),t.order==="desc"&&s.length>=t.rows&&s.shift(),s.push(p)}function d(p){if(!p||typeof p!="object")return;let y=new Date(p.timestamp);if(!(t.from&&y<t.from||t.until&&y>t.until||t.level&&t.level!==p.level))return!0}function h(p){return p=p||{},p.rows=p.rows||p.limit||10,p.start=p.start||0,p.until=p.until||new Date,typeof p.until!="object"&&(p.until=new Date(p.until)),p.from=p.from||p.until-1440*60*1e3,typeof p.from!="object"&&(p.from=new Date(p.from)),p.order=p.order||"desc",p}}stream(t={}){let r=ue.join(this.dirname,this.filename),i=new zw,n={file:r,start:t.start};return i.destroy=Vw(n,(s,o)=>{if(s)return i.emit("error",s);try{i.emit("data",o),o=JSON.parse(o),i.emit("log",o)}catch(a){i.emit("error",a)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((t,r)=>{if(t)return this.emit("error",t);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.emit("rotate")||(this._rotate=!1)})})))}stat(t){let r=this._getFile(),i=ue.join(this.dirname,r);xe.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,t(null,0);if(n)return We(`err ${n.code} ${i}`),t(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(t));this.filename=r,t(null,s.size)})}close(t){this._stream&&this._stream.end(()=>{t&&t(),this.emit("flush"),this.emit("closed")})}_needsNewFile(t){return t=t||this._size,this.maxsize&&t>=this.maxsize}_onError(t){this.emit("error",t)}_setupStream(t){return t.on("error",this._onError),t}_cleanupStream(t){return t.removeListener("error",this._onError),t.destroy(),t}_rotateFile(){this._incFile(()=>this.open())}_endStream(t=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),t()})):t()}_createStream(t){let r=ue.join(this.dirname,this.filename);We("create stream start",r,this.options);let i=xe.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),t.pipe(i),this.rotatedWhileOpening&&(this._stream=new Hf,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),t.end())});return We("create stream ok",r),i}_incFile(t){We("_incFile",this.filename);let r=ue.extname(this._basename),i=ue.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let o=this._created>0&&!this.tailable?this._created:"";this._compressFile(ue.join(this.dirname,`${i}${o}${r}`),ue.join(this.dirname,`${i}${o}${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)),zf(n,t)}_getFile(){let t=ue.extname(this._basename),r=ue.basename(this._basename,t),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${t}`:`${r}${t}`}_checkMaxFilesIncrementing(t,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",o=this.zippedArchive?".gz":"",a=`${r}${s}${t}${o}`,l=ue.join(this.dirname,a);xe.unlink(l,i)}_checkMaxFilesTailable(t,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let o=this.maxFiles-1;o>1;o--)n.push(function(a,l){let u=`${r}${a-1}${t}${s}`,d=ue.join(this.dirname,u);xe.exists(d,h=>{if(!h)return l(null);u=`${r}${a}${t}${s}`,xe.rename(d,ue.join(this.dirname,u),l)})}.bind(this,o));zf(n,()=>{xe.rename(ue.join(this.dirname,`${r}${t}${s}`),ue.join(this.dirname,`${r}1${t}${s}`),i)})}_compressFile(t,r,i){xe.access(t,xe.F_OK,n=>{if(n)return i();var s=Bw.createGzip(),o=xe.createReadStream(t),a=xe.createWriteStream(r);a.on("finish",()=>{xe.unlink(t,i)}),o.pipe(s).pipe(a)})}_createLogDirIfNotExist(t){xe.existsSync(t)||xe.mkdirSync(t,{recursive:!0})}}});var Jf=v((f2,Yf)=>{"use strict";var Yw=C("http"),Jw=C("https"),{Stream:Kw}=zt(),Zw=or(),{configure:Qw}=Er();Yf.exports=class extends Zw{constructor(t={}){super(t),this.options=t,this.name=t.name||"http",this.ssl=!!t.ssl,this.host=t.host||"localhost",this.port=t.port,this.auth=t.auth,this.path=t.path||"",this.maximumDepth=t.maximumDepth,this.agent=t.agent,this.headers=t.headers||{},this.headers["content-type"]="application/json",this.batch=t.batch||!1,this.batchInterval=t.batchInterval||5e3,this.batchCount=t.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(t,r){this._request(t,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",t)}),r&&setImmediate(r)}query(t,r){typeof t=="function"&&(r=t,t={}),t={method:"query",params:this.normalizeQuery(t)};let i=t.params.auth||null;delete t.params.auth;let n=t.params.path||null;delete t.params.path,this._request(t,i,n,(s,o,a)=>{if(o&&o.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${o.statusCode}`)),s)return r(s);if(typeof a=="string")try{a=JSON.parse(a)}catch(l){return r(l)}r(null,a)})}stream(t={}){let r=new Kw;t={method:"stream",params:t};let i=t.params.path||null;delete t.params.path;let n=t.params.auth||null;delete t.params.auth;let s="",o=this._request(t,n,i);return r.destroy=()=>o.destroy(),o.on("data",a=>{a=(s+a).split(/\n+/);let l=a.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(a[u]))}catch(d){r.emit("error",d)}s=a[l]}),o.on("error",a=>r.emit("error",a)),r}_request(t,r,i,n){t=t||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(t,n,r,i):this._doRequest(t,n,r,i)}_doBatch(t,r,i,n){if(this.batchOptions.push(t),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(t,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,t,r,i)}_doRequest(t,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let o=(this.ssl?Jw:Yw).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});o.on("error",r),o.on("response",l=>l.on("end",()=>r(null,l)).resume());let a=Qw({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(t,this.options.replacer),"utf8"))}}});var Wo=v((c2,Kf)=>{"use strict";var Ye=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";Ye.writable=e=>Ye(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";Ye.readable=e=>Ye(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";Ye.duplex=e=>Ye.writable(e)&&Ye.readable(e);Ye.transform=e=>Ye.duplex(e)&&typeof e._transform=="function";Kf.exports=Ye});var Qf=v((p2,Zf)=>{"use strict";var Xw=Wo(),{MESSAGE:ev}=te(),tv=C("os"),rv=or();Zf.exports=class extends rv{constructor(t={}){if(super(t),!t.stream||!Xw(t.stream))throw new Error("options.stream is required.");this._stream=t.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=t.stream._writableState.objectMode,this.eol=typeof t.eol=="string"?t.eol:tv.EOL}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.isObjectMode){this._stream.write(t),r&&r();return}this._stream.write(`${t[ev]}${this.eol}`),r&&r()}}});var Xf=v(Vr=>{"use strict";Object.defineProperty(Vr,"Console",{configurable:!0,enumerable:!0,get(){return Fu()}});Object.defineProperty(Vr,"File",{configurable:!0,enumerable:!0,get(){return Vf()}});Object.defineProperty(Vr,"Http",{configurable:!0,enumerable:!0,get(){return Jf()}});Object.defineProperty(Vr,"Stream",{configurable:!0,enumerable:!0,get(){return Qf()}})});var En=v(Yr=>{"use strict";var Sn=_s(),{configs:Bo}=te();Yr.cli=Sn.levels(Bo.cli);Yr.npm=Sn.levels(Bo.npm);Yr.syslog=Sn.levels(Bo.syslog);Yr.addColors=Sn.levels});var tc=v((Rn,ec)=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});var iv=Ui(),nv=Ht(iv),sv=Xi(),ov=Ht(sv),av=no(),lv=Ht(av),uv=to(),hv=Ht(uv),fv=ro(),cv=Ht(fv),dv=$t(),pv=Ht(dv),gv=lr(),mv=Ht(gv);function Ht(e){return e&&e.__esModule?e:{default:e}}function yv(e,t,r){r=(0,hv.default)(r);var i=0,n=0,{length:s}=e,o=!1;s===0&&r(null);function a(l,u){l===!1&&(o=!0),o!==!0&&(l?r(l):(++n===s||u===ov.default)&&r(null))}for(;i<s;i++)t(e[i],i,(0,cv.default)(a))}function bv(e,t,r){return(0,lv.default)(e,1/0,t,r)}function wv(e,t,r){var i=(0,nv.default)(e)?yv:bv;return i(e,(0,pv.default)(t),r)}Rn.default=(0,mv.default)(wv,3);ec.exports=Rn.default});var ic=v((xn,rc)=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.default=vv;function vv(e){return(t,r,i)=>e(t,i)}rc.exports=xn.default});var Tn=v((On,nc)=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});var _v=tc(),Sv=Mn(_v),Ev=ic(),Rv=Mn(Ev),xv=$t(),Mv=Mn(xv),Ov=lr(),Tv=Mn(Ov);function Mn(e){return e&&e.__esModule?e:{default:e}}function kv(e,t,r){return(0,Sv.default)(e,(0,Rv.default)((0,Mv.default)(t)),r)}On.default=(0,Tv.default)(kv,3);nc.exports=On.default});var oc=v((y2,sc)=>{"use strict";var Av=Object.prototype.toString;sc.exports=function(t){if(typeof t.displayName=="string"&&t.constructor.name)return t.displayName;if(typeof t.name=="string"&&t.name)return t.name;if(typeof t=="object"&&t.constructor&&typeof t.constructor.name=="string")return t.constructor.name;var r=t.toString(),i=Av.call(t).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var Uo=v((b2,ac)=>{"use strict";var Pv=oc();ac.exports=function(t){var r=0,i;function n(){return r||(r=1,i=t.apply(this,arguments),t=null),i}return n.displayName=Pv(t),n}});var zo=v(Kr=>{Kr.get=function(e){var t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o},Error.captureStackTrace(r,e||Kr.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=t,n};Kr.parse=function(e){if(!e.stack)return[];var t=this,r=e.stack.split(`
32
- `).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return t._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,o=null,a=null,l=null,u=null,d=n[5]==="native";if(n[1]){a=n[1];var h=a.lastIndexOf(".");if(a[h-1]=="."&&h--,h>0){s=a.substr(0,h),o=a.substr(h+1);var p=s.indexOf(".Module");p>0&&(a=a.substr(p+1),s=s.substr(0,p))}l=null}o&&(l=s,u=o),o==="<anonymous>"&&(u=null,a=null);var y={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:a,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:d};return t._createParsedCallSite(y)}}).filter(function(i){return!!i})};function Jr(e){for(var t in e)this[t]=e[t]}var qv=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],jv=["topLevel","eval","native","constructor"];qv.forEach(function(e){Jr.prototype[e]=null,Jr.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}});jv.forEach(function(e){Jr.prototype[e]=!1,Jr.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}});Kr._createParsedCallSite=function(e){return new Jr(e)}});var uc=v((_2,lc)=>{"use strict";var{Writable:Dv}=zt();lc.exports=class extends Dv{constructor(t){if(super({objectMode:!0}),!t)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=t}_write(t,r,i){return t.exception?this.transport.log(t,i):(i(),!0)}}});var Go=v((E2,cc)=>{"use strict";var hc=C("os"),Cv=Tn(),Ho=Gr()("winston:exception"),Lv=Uo(),fc=zo(),Nv=uc();cc.exports=class{constructor(t){if(!t)throw new Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}handle(...t){t.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(t=>this.logger.unpipe(t)))}getAllInfo(t){let r=null;return t&&(r=typeof t=="string"?t:t.message),{error:t,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,t&&t.stack||" No stack trace"].join(`
33
- `),stack:t&&t.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:hc.loadavg(),uptime:hc.uptime()}}getTrace(t){return(t?fc.parse(t):fc.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(t){if(!this.handlers.has(t)){t.handleExceptions=!0;let r=new Nv(t);this.handlers.set(t,r),this.logger.pipe(r)}}_uncaughtException(t){let r=this.getAllInfo(t),i=this._getExceptionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(t):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 o(){Ho("doExit",n),Ho("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);Cv(i,(a,l)=>{let u=Lv(l),d=a.transport||a;function h(p){return()=>{Ho(p),u()}}d._ending=!0,d.once("finish",h("finished")),d.once("error",h("error"))},()=>n&&o()),this.logger.log(r),n&&(s=setTimeout(o,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(t=>(t.transport||t).handleExceptions)}}});var pc=v((x2,dc)=>{"use strict";var{Writable:Fv}=zt();dc.exports=class extends Fv{constructor(t){if(super({objectMode:!0}),!t)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=t}_write(t,r,i){return t.rejection?this.transport.log(t,i):(i(),!0)}}});var Yo=v((O2,yc)=>{"use strict";var gc=C("os"),$v=Tn(),Vo=Gr()("winston:rejection"),Iv=Uo(),mc=zo(),Wv=pc();yc.exports=class{constructor(t){if(!t)throw new Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}handle(...t){t.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(t=>this.logger.unpipe(t)))}getAllInfo(t){let r=null;return t&&(r=typeof t=="string"?t:t.message),{error:t,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,t&&t.stack||" No stack trace"].join(`
34
- `),stack:t&&t.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:gc.loadavg(),uptime:gc.uptime()}}getTrace(t){return(t?mc.parse(t):mc.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(t){if(!this.handlers.has(t)){t.handleRejections=!0;let r=new Wv(t);this.handlers.set(t,r),this.logger.pipe(r)}}_unhandledRejection(t){let r=this.getAllInfo(t),i=this._getRejectionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(t):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 o(){Vo("doExit",n),Vo("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);$v(i,(a,l)=>{let u=Iv(l),d=a.transport||a;function h(p){return()=>{Vo(p),u()}}d._ending=!0,d.once("finish",h("finished")),d.once("error",h("error"))},()=>n&&o()),this.logger.log(r),n&&(s=setTimeout(o,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(t=>(t.transport||t).handleRejections)}}});var wc=v((T2,bc)=>{"use strict";var Jo=class{constructor(t){let r=kn();if(typeof t!="object"||Array.isArray(t)||!(t instanceof r))throw new Error("Logger is required for profiling");this.logger=t,this.start=Date.now()}done(...t){typeof t[t.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop());let r=typeof t[t.length-1]=="object"?t.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};bc.exports=Jo});var kn=v((k2,Ec)=>{"use strict";var{Stream:Bv,Transform:Uv}=zt(),vc=Tn(),{LEVEL:Je,SPLAT:_c}=te(),Sc=Wo(),zv=Go(),Hv=Yo(),Gv=Qs(),Vv=wc(),{warn:Yv}=Ss(),Jv=En(),Kv=/%[scdjifoO%]/g,An=class extends Uv{constructor(t){super({objectMode:!0}),this.configure(t)}child(t){let r=this;return Object.create(r,{write:{value:function(i){let n=Object.assign({},t,i);i instanceof Error&&(n.stack=i.stack,n.message=i.message),r.write(n)}}})}configure({silent:t,format:r,defaultMeta:i,levels:n,level:s="info",exitOnError:o=!0,transports:a,colors:l,emitErrs:u,formatters:d,padLevels:h,rewriters:p,stripColors:y,exceptionHandlers:f,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=t,this.format=r||this.format||ms()(),this.defaultMeta=i||null,this.levels=n||this.levels||Jv.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new zv(this),this.rejections=new Hv(this),this.profilers={},this.exitOnError=o,a&&(a=Array.isArray(a)?a:[a],a.forEach(S=>this.add(S))),l||u||d||h||p||y)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(`
35
- `));f&&this.exceptions.handle(f),b&&this.rejections.handle(b)}getHighestLogLevel(){let t=Zr(this.levels,this.level);return!this.transports||this.transports.length===0?t:this.transports.reduce((r,i)=>{let n=Zr(this.levels,i.level);return n!==null&&n>r?n:r},t)}isLevelEnabled(t){let r=Zr(this.levels,t);if(r===null)return!1;let i=Zr(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let o=Zr(this.levels,s.level);return o===null&&(o=i),o>=r})!==-1}log(t,r,...i){if(arguments.length===1)return t[Je]=t.level,this._addDefaultMeta(t),this.write(t),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Je]=r.level=t,this._addDefaultMeta(r),this.write(r),this):(r={[Je]:t,level:t,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(Kv))){let o=Object.assign({},this.defaultMeta,n,{[Je]:t,[_c]:i,level:t,message:r});return n.message&&(o.message=`${o.message} ${n.message}`),n.stack&&(o.stack=n.stack),n.cause&&(o.cause=n.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[Je]:t,[_c]:i,level:t,message:r})),this}_transform(t,r,i){if(this.silent)return i();t[Je]||(t[Je]=t.level),!this.levels[t[Je]]&&this.levels[t[Je]]!==0&&console.error("[winston] Unknown logger level: %s",t[Je]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",t);try{this.push(this.format.transform(t,this.format.options))}finally{this._writableState.sync=!1,i()}}_final(t){let r=this.transports.slice();vc(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},t)}add(t){let r=!Sc(t)||t.log.length>2?new Gv({transport:t}):t;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),t.handleExceptions&&this.exceptions.handle(),t.handleRejections&&this.rejections.handle(),this}remove(t){if(!t)return this;let r=t;return(!Sc(t)||t.log.length>2)&&(r=this.transports.filter(i=>i.transport===t)[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(){Yv.deprecated("setLevels")}query(t,r){typeof t=="function"&&(r=t,t={}),t=t||{};let i={},n=Object.assign({},t.query||{});function s(a,l){t.query&&typeof a.formatQuery=="function"&&(t.query=a.formatQuery(n)),a.query(t,(u,d)=>{if(u)return l(u);typeof a.formatResults=="function"&&(d=a.formatResults(d,t.format)),l(null,d)})}function o(a,l){s(a,(u,d)=>{l&&(d=u||d,d&&(i[a.name]=d),l()),l=null})}vc(this.transports.filter(a=>!!a.query),o,()=>r(null,i))}stream(t={}){let r=new Bv,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(t);s&&(i.push(s),s.on("log",o=>{o.transport=o.transport||[],o.transport.push(n.name),r.emit("log",o)}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(n.name),r.emit("error",o)}))}),r}startTimer(){return new Vv(this)}profile(t,...r){let i=Date.now();if(this.profilers[t]){let n=this.profilers[t];delete this.profilers[t],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||t,this.write(s)}return this.profilers[t]=i,this}handleExceptions(...t){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...t)}unhandleExceptions(...t){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...t)}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(`
36
- `))}_onEvent(t,r){function i(n){t==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(t,n,r)}r["__winston"+t]||(r["__winston"+t]=i.bind(this),r.on(t,r["__winston"+t]))}_addDefaultMeta(t){this.defaultMeta&&Object.assign(t,this.defaultMeta)}};function Zr(e,t){let r=e[t];return!r&&r!==0?null:r}Object.defineProperty(An.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:e}=this._readableState;return Array.isArray(e)?e:[e].filter(Boolean)}});Ec.exports=An});var Ko=v((A2,Rc)=>{"use strict";var{LEVEL:Zv}=te(),Qv=En(),Xv=kn(),e_=Gr()("winston:create-logger");function t_(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}Rc.exports=function(e={}){e.levels=e.levels||Qv.npm.levels;class t extends Xv{constructor(n){super(n)}}let r=new t(e);return Object.keys(e.levels).forEach(function(i){if(e_('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}t.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[o]=n,a=o&&o.message&&o||{message:o};return a.level=a[Zv]=i,s._addDefaultMeta(a),s.write(a),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},t.prototype[t_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Mc=v((q2,xc)=>{"use strict";var r_=Ko();xc.exports=class{constructor(t={}){this.loggers=new Map,this.options=t}add(t,r){if(!this.loggers.has(t)){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(t)),this.loggers.set(t,n)}return this.loggers.get(t)}get(t,r){return this.add(t,r)}has(t){return!!this.loggers.has(t)}close(t){if(t)return this._removeLogger(t);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(t){if(!this.loggers.has(t))return;this.loggers.get(t).close(),this._delete(t)}_delete(t){this.loggers.delete(t)}}});var Tc=v(G=>{"use strict";var Oc=_s(),{warn:Qr}=Ss();G.version=Cl().version;G.transports=Xf();G.config=En();G.addColors=Oc.levels;G.format=Oc.format;G.createLogger=Ko();G.Logger=kn();G.ExceptionHandler=Go();G.RejectionHandler=Yo();G.Container=Mc();G.Transport=or();G.loggers=new G.Container;var Ke=G.createLogger();Object.keys(G.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(e=>G[e]=(...t)=>Ke[e](...t));Object.defineProperty(G,"level",{get(){return Ke.level},set(e){Ke.level=e}});Object.defineProperty(G,"exceptions",{get(){return Ke.exceptions}});Object.defineProperty(G,"rejections",{get(){return Ke.rejections}});["exitOnError"].forEach(e=>{Object.defineProperty(G,e,{get(){return Ke[e]},set(t){Ke[e]=t}})});Object.defineProperty(G,"default",{get(){return{exceptionHandlers:Ke.exceptionHandlers,rejectionHandlers:Ke.rejectionHandlers,transports:Ke.transports}}});Qr.deprecated(G,"setLevels");Qr.forFunctions(G,"useFormat",["cli"]);Qr.forProperties(G,"useFormat",["padLevels","stripColors"]);Qr.forFunctions(G,"deprecated",["addRewriter","addFilter","clone","extend"]);Qr.forProperties(G,"deprecated",["emitErrs","levelLength"])});var jn=v((qn,Ac)=>{(function(e,t){typeof qn=="object"&&typeof Ac<"u"?t(qn):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.Superstruct={}))})(qn,(function(e){"use strict";class t extends TypeError{constructor(g,m){let w,{message:T,explanation:q,...W}=g,{path:Q}=g,X=Q.length===0?T:`At path: ${Q.join(".")} -- ${T}`;super(q??X),q!=null&&(this.cause=X),Object.assign(this,W),this.name=this.constructor.name,this.failures=()=>w??(w=[g,...m()])}}function r(c){return i(c)&&typeof c[Symbol.iterator]=="function"}function i(c){return typeof c=="object"&&c!=null}function n(c){return i(c)&&!Array.isArray(c)}function s(c){if(Object.prototype.toString.call(c)!=="[object Object]")return!1;let g=Object.getPrototypeOf(c);return g===null||g===Object.prototype}function o(c){return typeof c=="symbol"?c.toString():typeof c=="string"?JSON.stringify(c):`${c}`}function a(c){let{done:g,value:m}=c.next();return g?void 0:m}function l(c,g,m,w){if(c===!0)return;c===!1?c={}:typeof c=="string"&&(c={message:c});let{path:T,branch:q}=g,{type:W}=m,{refinement:Q,message:X=`Expected a value of type \`${W}\`${Q?` with refinement \`${Q}\``:""}, but received: \`${o(w)}\``}=c;return{value:w,type:W,refinement:Q,key:T[T.length-1],path:T,branch:q,...c,message:X}}function*u(c,g,m,w){r(c)||(c=[c]);for(let T of c){let q=l(T,g,m,w);q&&(yield q)}}function*d(c,g,m={}){let{path:w=[],branch:T=[c],coerce:q=!1,mask:W=!1}=m,Q={path:w,branch:T,mask:W};q&&(c=g.coercer(c,Q));let X="valid";for(let ie of g.validator(c,Q))ie.explanation=m.message,X="not_valid",yield[ie,void 0];for(let[ie,Pe,ep]of g.entries(c,Q)){let tp=d(Pe,ep,{path:ie===void 0?w:[...w,ie],branch:ie===void 0?T:[...T,Pe],coerce:q,mask:W,message:m.message});for(let mi of tp)mi[0]?(X=mi[0].refinement!=null?"not_refined":"not_valid",yield[mi[0],void 0]):q&&(Pe=mi[1],ie===void 0?c=Pe:c instanceof Map?c.set(ie,Pe):c instanceof Set?c.add(Pe):i(c)&&(Pe!==void 0||ie in c)&&(c[ie]=Pe))}if(X!=="not_valid")for(let ie of g.refiner(c,Q))ie.explanation=m.message,X="not_refined",yield[ie,void 0];X==="valid"&&(yield[void 0,c])}class h{constructor(g){let{type:m,schema:w,validator:T,refiner:q,coercer:W=X=>X,entries:Q=function*(){}}=g;this.type=m,this.schema=w,this.entries=Q,this.coercer=W,T?this.validator=(X,ie)=>{let Pe=T(X,ie);return u(Pe,ie,this,X)}:this.validator=()=>[],q?this.refiner=(X,ie)=>{let Pe=q(X,ie);return u(Pe,ie,this,X)}:this.refiner=()=>[]}assert(g,m){return p(g,this,m)}create(g,m){return y(g,this,m)}is(g){return b(g,this)}mask(g,m){return f(g,this,m)}validate(g,m={}){return S(g,this,m)}}function p(c,g,m){let w=S(c,g,{message:m});if(w[0])throw w[0]}function y(c,g,m){let w=S(c,g,{coerce:!0,message:m});if(w[0])throw w[0];return w[1]}function f(c,g,m){let w=S(c,g,{coerce:!0,mask:!0,message:m});if(w[0])throw w[0];return w[1]}function b(c,g){return!S(c,g)[0]}function S(c,g,m={}){let w=d(c,g,m),T=a(w);return T[0]?[new t(T[0],function*(){for(let W of w)W[0]&&(yield W[0])}),void 0]:[void 0,T[1]]}function E(...c){let g=c[0].type==="type",m=c.map(T=>T.schema),w=Object.assign({},...m);return g?at(w):ot(w)}function x(c,g){return new h({type:c,schema:null,validator:g})}function R(c,g){return new h({...c,refiner:(m,w)=>m===void 0||c.refiner(m,w),validator(m,w){return m===void 0?!0:(g(m,w),c.validator(m,w))}})}function O(c){return new h({type:"dynamic",schema:null,*entries(g,m){yield*c(g,m).entries(g,m)},validator(g,m){return c(g,m).validator(g,m)},coercer(g,m){return c(g,m).coercer(g,m)},refiner(g,m){return c(g,m).refiner(g,m)}})}function A(c){let g;return new h({type:"lazy",schema:null,*entries(m,w){g??(g=c()),yield*g.entries(m,w)},validator(m,w){return g??(g=c()),g.validator(m,w)},coercer(m,w){return g??(g=c()),g.coercer(m,w)},refiner(m,w){return g??(g=c()),g.refiner(m,w)}})}function I(c,g){let{schema:m}=c,w={...m};for(let T of g)delete w[T];switch(c.type){case"type":return at(w);default:return ot(w)}}function D(c){let g=c instanceof h,m=g?{...c.schema}:{...c};for(let w in m)m[w]=Ot(m[w]);return g&&c.type==="type"?at(m):ot(m)}function z(c,g){let{schema:m}=c,w={};for(let T of g)w[T]=m[T];switch(c.type){case"type":return at(w);default:return ot(w)}}function j(c,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),x(c,g)}function V(){return x("any",()=>!0)}function ae(c){return new h({type:"array",schema:c,*entries(g){if(c&&Array.isArray(g))for(let[m,w]of g.entries())yield[m,w,c]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${o(g)}`}})}function re(){return x("bigint",c=>typeof c=="bigint")}function be(){return x("boolean",c=>typeof c=="boolean")}function we(){return x("date",c=>c instanceof Date&&!isNaN(c.getTime())||`Expected a valid \`Date\` object, but received: ${o(c)}`)}function st(c){let g={},m=c.map(w=>o(w)).join();for(let w of c)g[w]=w;return new h({type:"enums",schema:g,validator(w){return c.includes(w)||`Expected one of \`${m}\`, but received: ${o(w)}`}})}function _(){return x("func",c=>typeof c=="function"||`Expected a function, but received: ${o(c)}`)}function k(c){return x("instance",g=>g instanceof c||`Expected a \`${c.name}\` instance, but received: ${o(g)}`)}function H(){return x("integer",c=>typeof c=="number"&&!isNaN(c)&&Number.isInteger(c)||`Expected an integer, but received: ${o(c)}`)}function me(c){return new h({type:"intersection",schema:null,*entries(g,m){for(let w of c)yield*w.entries(g,m)},*validator(g,m){for(let w of c)yield*w.validator(g,m)},*refiner(g,m){for(let w of c)yield*w.refiner(g,m)}})}function P(c){let g=o(c),m=typeof c;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?c:null,validator(w){return w===c||`Expected the literal \`${g}\`, but received: ${o(w)}`}})}function Ae(c,g){return new h({type:"map",schema:null,*entries(m){if(c&&g&&m instanceof Map)for(let[w,T]of m.entries())yield[w,w,c],yield[w,T,g]},coercer(m){return m instanceof Map?new Map(m):m},validator(m){return m instanceof Map||`Expected a \`Map\` object, but received: ${o(m)}`}})}function Fe(){return x("never",()=>!1)}function Mt(c){return new h({...c,validator:(g,m)=>g===null||c.validator(g,m),refiner:(g,m)=>g===null||c.refiner(g,m)})}function Jt(){return x("number",c=>typeof c=="number"&&!isNaN(c)||`Expected a number, but received: ${o(c)}`)}function ot(c){let g=c?Object.keys(c):[],m=Fe();return new h({type:"object",schema:c||null,*entries(w){if(c&&i(w)){let T=new Set(Object.keys(w));for(let q of g)T.delete(q),yield[q,w[q],c[q]];for(let q of T)yield[q,w[q],m]}},validator(w){return n(w)||`Expected an object, but received: ${o(w)}`},coercer(w,T){if(!n(w))return w;let q={...w};if(T.mask&&c)for(let W in q)c[W]===void 0&&delete q[W];return q}})}function Ot(c){return new h({...c,validator:(g,m)=>g===void 0||c.validator(g,m),refiner:(g,m)=>g===void 0||c.refiner(g,m)})}function Zn(c,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let w in m){let T=m[w];yield[w,w,c],yield[w,T,g]}},validator(m){return n(m)||`Expected an object, but received: ${o(m)}`},coercer(m){return n(m)?{...m}:m}})}function Oe(){return x("regexp",c=>c instanceof RegExp)}function fi(c){return new h({type:"set",schema:null,*entries(g){if(c&&g instanceof Set)for(let m of g)yield[m,m,c]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${o(g)}`}})}function ci(){return x("string",c=>typeof c=="string"||`Expected a string, but received: ${o(c)}`)}function di(c){let g=Fe();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let w=Math.max(c.length,m.length);for(let T=0;T<w;T++)yield[T,m[T],c[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${o(m)}`},coercer(m){return Array.isArray(m)?m.slice():m}})}function at(c){let g=Object.keys(c);return new h({type:"type",schema:c,*entries(m){if(i(m))for(let w of g)yield[w,m[w],c[w]]},validator(m){return n(m)||`Expected an object, but received: ${o(m)}`},coercer(m){return n(m)?{...m}:m}})}function Kt(c){let g=c.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m,w){for(let T of c){let[q,W]=T.validate(m,{coerce:!0,mask:w.mask});if(!q)return W}return m},validator(m,w){let T=[];for(let q of c){let[...W]=d(m,q,w),[Q]=W;if(Q[0])for(let[X]of W)X&&T.push(X);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${o(m)}`,...T]}})}function Tt(){return x("unknown",()=>!0)}function wr(c,g,m){return new h({...c,coercer:(w,T)=>b(w,g)?c.coercer(m(w,T),T):c.coercer(w,T)})}function kt(c,g,m={}){return wr(c,Tt(),w=>{let T=typeof g=="function"?g():g;if(w===void 0)return T;if(!m.strict&&s(w)&&s(T)){let q={...w},W=!1;for(let Q in T)q[Q]===void 0&&(q[Q]=T[Q],W=!0);if(W)return q}return w})}function lt(c){return wr(c,ci(),g=>g.trim())}function vr(c){return At(c,"empty",g=>{let m=pi(g);return m===0||`Expected an empty ${c.type} but received one with a size of \`${m}\``})}function pi(c){return c instanceof Map||c instanceof Set?c.size:c.length}function gi(c,g,m={}){let{exclusive:w}=m;return At(c,"max",T=>w?T<g:T<=g||`Expected a ${c.type} less than ${w?"":"or equal to "}${g} but received \`${T}\``)}function Kd(c,g,m={}){let{exclusive:w}=m;return At(c,"min",T=>w?T>g:T>=g||`Expected a ${c.type} greater than ${w?"":"or equal to "}${g} but received \`${T}\``)}function Zd(c){return At(c,"nonempty",g=>pi(g)>0||`Expected a nonempty ${c.type} but received an empty one`)}function Qd(c,g){return At(c,"pattern",m=>g.test(m)||`Expected a ${c.type} matching \`/${g.source}/\` but received "${m}"`)}function Xd(c,g,m=g){let w=`Expected a ${c.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return At(c,"size",q=>{if(typeof q=="number"||q instanceof Date)return g<=q&&q<=m||`${w} ${T} but received \`${q}\``;if(q instanceof Map||q instanceof Set){let{size:W}=q;return g<=W&&W<=m||`${w} with a size ${T} but received one with a size of \`${W}\``}else{let{length:W}=q;return g<=W&&W<=m||`${w} with a length ${T} but received one with a length of \`${W}\``}})}function At(c,g,m){return new h({...c,*refiner(w,T){yield*c.refiner(w,T);let q=m(w,T),W=u(q,T,c,w);for(let Q of W)yield{...Q,refinement:g}}})}e.Struct=h,e.StructError=t,e.any=V,e.array=ae,e.assert=p,e.assign=E,e.bigint=re,e.boolean=be,e.coerce=wr,e.create=y,e.date=we,e.defaulted=kt,e.define=x,e.deprecated=R,e.dynamic=O,e.empty=vr,e.enums=st,e.func=_,e.instance=k,e.integer=H,e.intersection=me,e.is=b,e.lazy=A,e.literal=P,e.map=Ae,e.mask=f,e.max=gi,e.min=Kd,e.never=Fe,e.nonempty=Zd,e.nullable=Mt,e.number=Jt,e.object=ot,e.omit=I,e.optional=Ot,e.partial=D,e.pattern=Qd,e.pick=z,e.record=Zn,e.refine=At,e.regexp=Oe,e.set=fi,e.size=Xd,e.string=ci,e.struct=j,e.trimmed=lt,e.tuple=di,e.type=at,e.union=Kt,e.unknown=Tt,e.validate=S}))});import hS from"yargs";import{hideBin as fS}from"yargs/helpers";import ge from"node:path";import xt from"node:fs/promises";import{fileURLToPath as cS}from"node:url";import ca from"fs-extra";import{loadPyodide as Gd,version as dS}from"pyodide";import kc from"node:path";import i_ from"node:fs/promises";var _t=yi(Tc(),1),$=_t.createLogger({transports:[new _t.transports.Console({format:_t.format.combine(_t.format.splat(),_t.format.cli())})]});function Xr(e){process.emitWarning(e,{type:"DeprecationWarning"})}var Pn=class{sourceUrl;isRemote;_data=null;constructor(t){t.startsWith("file://")&&(t=t.slice(7)),this.sourceUrl=t,this.isRemote=t.includes("://")}async readJson(t){if(this.isRemote){let r=kc.posix.join(this.sourceUrl,t);$.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{let r=kc.join(this.sourceUrl,t);$.debug(`Reading ${r}`);let i=await i_.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;$.info("Load pyodide-lock.json");let t=await this.readJson("pyodide-lock.json");return this._data=t.packages,t.packages}async getPackageInfoByName(t){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===t);if(i==null)throw new Error(`Package ${t} is not found in the lock file.`);return i}};var qc=yi(jn(),1);import n_ from"node:fs/promises";var Y=yi(jn(),1),Pc=Y.object({entrypoint:Y.string(),embed:Y.defaulted(Y.boolean(),!1),idbfsMountpoints:Y.optional(Y.array(Y.string())),nodeJsWorker:Y.defaulted(Y.boolean(),!1),nodefsMountpoints:Y.optional(Y.record(Y.string(),Y.string())),appMenu:Y.defaulted(Y.boolean(),!0)});function s_(e){let t=qc.mask(e??{},Pc);if(t.nodeJsWorker){if(t.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(t.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return t}async function jc(e){let t=s_({...e.packageJsonStliteDesktopField,...e.fallbacks});$.info("App manifest: %j",t);let r=JSON.stringify(t,null,2);$.info(`Dump the manifest file -> ${e.manifestFilePath}`),await n_.writeFile(e.manifestFilePath,r,{encoding:"utf-8"})}var pe=yi(jn(),1);import o_ from"node:path";async function Dc(e){let{files:t,entrypoint:r}=a_(e),i=await l_(e),n=await u_(e);return{files:t,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function a_(e){let{packageJsonStliteDesktopField:t,fallbacks:{appHomeDirSource:r}}=e,i=t?.files,n=t?.entrypoint;if(i==null||n==null){Xr("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&&Xr("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 l_(e){let{packageJsonStliteDesktopField:t,fallbacks:{packages:r}}=e,i=t?.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&&(Xr("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 u_(e){let{pathResolutionRoot:t,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=e,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(a=>o_.resolve(t,a)),o=[];return i!=null&&i.length>0&&(Xr("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),o=i),[...s??[],...o]}var h_="(<=>!~";var f_=new RegExp(`[${"["+h_+";@"}]`);function c_(e){return e.split(f_)[0].trim()}function Cc(e){return e.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})`)}),e.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)}var d_=/\s#.*$/;function Lc(e){return e.split(`
37
- `).filter(t=>!t.startsWith("#")).map(t=>t.replace(d_,"")).map(t=>t.trim()).filter(t=>t!=="")}import{fileURLToPath as m1}from"node:url";import{posix as v1,win32 as oa}from"node:path";import{fileURLToPath as _1}from"node:url";import{lstatSync as S1,readdir as E1,readdirSync as R1,readlinkSync as x1,realpathSync as M1}from"fs";import*as O1 from"node:fs";import{lstat as T1,readdir as k1,readlink as A1,realpath as P1}from"node:fs/promises";import{EventEmitter as ua}from"node:events";import _d from"node:stream";import{StringDecoder as q1}from"node:string_decoder";var sd=(e,t,r)=>{let i=e instanceof RegExp?Nc(e,r):e,n=t instanceof RegExp?Nc(t,r):t,s=i!==null&&n!=null&&p_(i,n,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+i.length,s[1]),post:r.slice(s[1]+n.length)}},Nc=(e,t)=>{let r=t.match(e);return r?r[0]:null},p_=(e,t,r)=>{let i,n,s,o,a,l=r.indexOf(e),u=r.indexOf(t,l+1),d=l;if(l>=0&&u>0){if(e===t)return[l,u];for(i=[],s=r.length;d>=0&&!a;){if(d===l)i.push(d),l=r.indexOf(e,d+1);else if(i.length===1){let h=i.pop();h!==void 0&&(a=[h,u])}else n=i.pop(),n!==void 0&&n<s&&(s=n,o=u),u=r.indexOf(t,d+1);d=l<u&&l>=0?l:u}i.length&&o!==void 0&&(a=[s,o])}return a},od="\0SLASH"+Math.random()+"\0",ad="\0OPEN"+Math.random()+"\0",aa="\0CLOSE"+Math.random()+"\0",ld="\0COMMA"+Math.random()+"\0",ud="\0PERIOD"+Math.random()+"\0",g_=new RegExp(od,"g"),m_=new RegExp(ad,"g"),y_=new RegExp(aa,"g"),b_=new RegExp(ld,"g"),w_=new RegExp(ud,"g"),v_=/\\\\/g,__=/\\{/g,S_=/\\}/g,E_=/\\,/g,R_=/\\./g,x_=1e5;function Zo(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function M_(e){return e.replace(v_,od).replace(__,ad).replace(S_,aa).replace(E_,ld).replace(R_,ud)}function O_(e){return e.replace(g_,"\\").replace(m_,"{").replace(y_,"}").replace(b_,",").replace(w_,".")}function hd(e){if(!e)return[""];let t=[],r=sd("{","}",e);if(!r)return e.split(",");let{pre:i,body:n,post:s}=r,o=i.split(",");o[o.length-1]+="{"+n+"}";let a=hd(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function T_(e,t={}){if(!e)return[];let{max:r=x_}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),oi(M_(e),r,!0).map(O_)}function k_(e){return"{"+e+"}"}function A_(e){return/^-?0\d/.test(e)}function P_(e,t){return e<=t}function q_(e,t){return e>=t}function oi(e,t,r){let i=[],n=sd("{","}",e);if(!n)return[e];let s=n.pre,o=n.post.length?oi(n.post,t,!1):[""];if(/\$$/.test(n.pre))for(let a=0;a<o.length&&a<t;a++){let l=s+"{"+n.body+"}"+o[a];i.push(l)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),u=a||l,d=n.body.indexOf(",")>=0;if(!u&&!d)return n.post.match(/,(?!,).*\}/)?(e=n.pre+"{"+n.body+aa+n.post,oi(e,t,!0)):[e];let h;if(u)h=n.body.split(/\.\./);else if(h=hd(n.body),h.length===1&&h[0]!==void 0&&(h=oi(h[0],t,!1).map(k_),h.length===1))return o.map(y=>n.pre+h[0]+y);let p;if(u&&h[0]!==void 0&&h[1]!==void 0){let y=Zo(h[0]),f=Zo(h[1]),b=Math.max(h[0].length,h[1].length),S=h.length===3&&h[2]!==void 0?Math.abs(Zo(h[2])):1,E=P_;f<y&&(S*=-1,E=q_);let x=h.some(A_);p=[];for(let R=y;E(R,f);R+=S){let O;if(l)O=String.fromCharCode(R),O==="\\"&&(O="");else if(O=String(R),x){let A=b-O.length;if(A>0){let I=new Array(A+1).join("0");R<0?O="-"+I+O.slice(1):O=I+O}}p.push(O)}}else{p=[];for(let y=0;y<h.length;y++)p.push.apply(p,oi(h[y],t,!1))}for(let y=0;y<p.length;y++)for(let f=0;f<o.length&&i.length<t;f++){let b=s+p[y]+o[f];(!r||u||b)&&i.push(b)}}return i}var zn=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},j_={"[: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]},ei=e=>e.replace(/[[\]\\-]/g,"\\$&"),D_=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fc=e=>e.join(""),C_=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,o=!1,a=!1,l=!1,u=!1,d=r,h="";e:for(;s<e.length;){let f=e.charAt(s);if((f==="!"||f==="^")&&s===r+1){u=!0,s++;continue}if(f==="]"&&o&&!l){d=s+1;break}if(o=!0,f==="\\"&&!l){l=!0,s++;continue}if(f==="["&&!l){for(let[b,[S,E,x]]of Object.entries(j_))if(e.startsWith(b,s)){if(h)return["$.",!1,e.length-r,!0];s+=b.length,x?n.push(S):i.push(S),a=a||E;continue e}}if(l=!1,h){f>h?i.push(ei(h)+"-"+ei(f)):f===h&&i.push(ei(f)),h="",s++;continue}if(e.startsWith("-]",s+1)){i.push(ei(f+"-")),s+=2;continue}if(e.startsWith("-",s+1)){h=f,s+=2;continue}i.push(ei(f)),s++}if(d<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let f=i[0].length===2?i[0].slice(-1):i[0];return[D_(f),!1,d-r,!1]}let p="["+(u?"^":"")+Fc(i)+"]",y="["+(u?"":"^")+Fc(n)+"]";return[i.length&&n.length?"("+p+"|"+y+")":i.length?p:y,a,d-r,!0]},br=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),L_=new Set(["!","?","+","*","@"]),$c=e=>L_.has(e),N_="(?!(?:^|/)\\.\\.?(?:$|/))",Dn="(?!\\.)",F_=new Set(["[","."]),$_=new Set(["..","."]),I_=new Set("().*{}+?[]^$\\!"),W_=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),la="[^/]",Ic=la+"*?",Wc=la+"+?",fd=class ke{type;#e;#r;#s=!1;#n=[];#o;#v;#y;#h=!1;#a;#c;#f=!1;constructor(t,r,i={}){this.type=t,t&&(this.#r=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#y=this.#e===this?[]:this.#e.#y,t==="!"&&!this.#e.#h&&this.#y.push(this),this.#v=this.#o?this.#o.#n.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#n)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#n.map(t=>String(t)).join("|")+")":this.#c=this.#n.map(t=>String(t)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let t;for(;t=this.#y.pop();){if(t.type!=="!")continue;let r=t,i=r.#o;for(;i;){for(let n=r.#v+1;!i.type&&n<i.#n.length;n++)for(let s of t.#n){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#n[n])}r=i,i=r.#o}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof ke&&r.#o===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){let t=this.type===null?this.#n.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#v===0)return!0;let t=this.#o;for(let r=0;r<this.#v;r++){let i=t.#n[r];if(!(i instanceof ke&&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 t=this.#o?this.#o.#n.length:0;return this.#v===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new ke(this.type,t);for(let i of this.#n)r.copyIn(i);return r}static#i(t,r,i,n){let s=!1,o=!1,a=-1,l=!1;if(r.type===null){let y=i,f="";for(;y<t.length;){let b=t.charAt(y++);if(s||b==="\\"){s=!s,f+=b;continue}if(o){y===a+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(y===a+2&&l)&&(o=!1),f+=b;continue}else if(b==="["){o=!0,a=y,l=!1,f+=b;continue}if(!n.noext&&$c(b)&&t.charAt(y)==="("){r.push(f),f="";let S=new ke(b,r);y=ke.#i(t,S,y,n),r.push(S);continue}f+=b}return r.push(f),y}let u=i+1,d=new ke(null,r),h=[],p="";for(;u<t.length;){let y=t.charAt(u++);if(s||y==="\\"){s=!s,p+=y;continue}if(o){u===a+1?(y==="^"||y==="!")&&(l=!0):y==="]"&&!(u===a+2&&l)&&(o=!1),p+=y;continue}else if(y==="["){o=!0,a=u,l=!1,p+=y;continue}if($c(y)&&t.charAt(u)==="("){d.push(p),p="";let f=new ke(y,d);d.push(f),u=ke.#i(t,f,u,n);continue}if(y==="|"){d.push(p),p="",h.push(d),d=new ke(null,r);continue}if(y===")")return p===""&&r.#n.length===0&&(r.#f=!0),d.push(p),p="",r.push(...h,d),u;p+=y}return r.type=null,r.#r=void 0,r.#n=[t.substring(i-1)],u}static fromGlob(t,r={}){let i=new ke(null,void 0,r);return ke.#i(t,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let o=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:t})}get options(){return this.#a}toRegExpSource(t){let r=t??!!this.#a.dot;if(this.#e===this&&this.#l(),!this.type){let l=this.isStart()&&this.isEnd()&&!this.#n.some(p=>typeof p!="string"),u=this.#n.map(p=>{let[y,f,b,S]=typeof p=="string"?ke.#_(p,this.#r,l):p.toRegExpSource(t);return this.#r=this.#r||b,this.#s=this.#s||S,y}).join(""),d="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&$_.has(this.#n[0]))){let p=F_,y=r&&p.has(u.charAt(0))||u.startsWith("\\.")&&p.has(u.charAt(2))||u.startsWith("\\.\\.")&&p.has(u.charAt(4)),f=!r&&!t&&p.has(u.charAt(0));d=y?N_:f?Dn:""}let h="";return this.isEnd()&&this.#e.#h&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[d+u+h,br(u),this.#r=!!this.#r,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.#n=[l],this.type=null,this.#r=void 0,[l,br(this.toString()),!1,!1]}let o=!i||t||r||!Dn?"":this.#d(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#f)a=(this.isStart()&&!r?Dn:"")+Wc;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Dn:"")+Ic+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=n+s+l}return[a,br(s),this.#r=!!this.#r,this.#s]}#d(t){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,o]=r.toRegExpSource(t);return this.#s=this.#s||o,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#_(t,r,i=!1){let n=!1,s="",o=!1,a=!1;for(let l=0;l<t.length;l++){let u=t.charAt(l);if(n){n=!1,s+=(I_.has(u)?"\\":"")+u;continue}if(u==="*"){if(a)continue;a=!0,s+=i&&/^[*]+$/.test(t)?Wc:Ic,r=!0;continue}else a=!1;if(u==="\\"){l===t.length-1?s+="\\\\":n=!0;continue}if(u==="["){let[d,h,p,y]=C_(t,l);if(p){s+=d,o=o||h,l+=p-1,r=r||y;continue}}if(u==="?"){s+=la,r=!0;continue}s+=W_(u)}return[s,br(t),!!r,o]}},cd=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Ee=(e,t,r={})=>(zn(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Rt(t,r).match(e)),B_=/^\*+([^+@!?\*\[\(]*)$/,U_=e=>t=>!t.startsWith(".")&&t.endsWith(e),z_=e=>t=>t.endsWith(e),H_=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),G_=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),V_=/^\*+\.\*+$/,Y_=e=>!e.startsWith(".")&&e.includes("."),J_=e=>e!=="."&&e!==".."&&e.includes("."),K_=/^\.\*+$/,Z_=e=>e!=="."&&e!==".."&&e.startsWith("."),Q_=/^\*+$/,X_=e=>e.length!==0&&!e.startsWith("."),e1=e=>e.length!==0&&e!=="."&&e!=="..",t1=/^\?+([^+@!?\*\[\(]*)?$/,r1=([e,t=""])=>{let r=dd([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},i1=([e,t=""])=>{let r=pd([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},n1=([e,t=""])=>{let r=pd([e]);return t?i=>r(i)&&i.endsWith(t):r},s1=([e,t=""])=>{let r=dd([e]);return t?i=>r(i)&&i.endsWith(t):r},dd=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},pd=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},gd=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Bc={win32:{sep:"\\"},posix:{sep:"/"}},o1=gd==="win32"?Bc.win32.sep:Bc.posix.sep;Ee.sep=o1;var Se=Symbol("globstar **");Ee.GLOBSTAR=Se;var a1="[^/]",l1=a1+"*?",u1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",h1="(?:(?!(?:\\/|^)\\.).)*?",f1=(e,t={})=>r=>Ee(r,e,t);Ee.filter=f1;var Ce=(e,t={})=>Object.assign({},e,t),c1=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ee;let t=Ee;return Object.assign((r,i,n={})=>t(r,i,Ce(e,n)),{Minimatch:class extends t.Minimatch{constructor(r,i={}){super(r,Ce(e,i))}static defaults(r){return t.defaults(Ce(e,r)).Minimatch}},AST:class extends t.AST{constructor(r,i,n={}){super(r,i,Ce(e,n))}static fromGlob(r,i={}){return t.AST.fromGlob(r,Ce(e,i))}},unescape:(r,i={})=>t.unescape(r,Ce(e,i)),escape:(r,i={})=>t.escape(r,Ce(e,i)),filter:(r,i={})=>t.filter(r,Ce(e,i)),defaults:r=>t.defaults(Ce(e,r)),makeRe:(r,i={})=>t.makeRe(r,Ce(e,i)),braceExpand:(r,i={})=>t.braceExpand(r,Ce(e,i)),match:(r,i,n={})=>t.match(r,i,Ce(e,n)),sep:t.sep,GLOBSTAR:Se})};Ee.defaults=c1;var md=(e,t={})=>(zn(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:T_(e,{max:t.braceExpandMax}));Ee.braceExpand=md;var d1=(e,t={})=>new Rt(e,t).makeRe();Ee.makeRe=d1;var p1=(e,t,r={})=>{let i=new Rt(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};Ee.match=p1;var Uc=/[?*]|[+@!]\(.*?\)|\[|\]/,g1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Rt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){zn(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||gd,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.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 t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((n,s,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!Uc.test(n[2]))&&!Uc.test(n[3]),l=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(u=>this.parse(u))];if(l)return[n[0],...n.slice(1).map(u=>this.parse(u))]}return n.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let s=this.set[n];s[0]===""&&s[1]===""&&this.globParts[n][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let i=0;i<e[r].length;i++)e[r][i]==="**"&&(e[r][i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let n=r[r.length-1];return i==="**"&&n==="**"?r:i===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let n=e[i];i===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let i=e[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s>i&&r.splice(i+1,s-i);let o=r[i+1],a=r[i+2],l=r[i+3];if(o!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;t=!0,r.splice(i,1);let u=r.slice(0);u[i]="**",e.push(u),i--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let o=r[s];s===1&&o===""&&r[0]===""||(o==="."||o==="")&&(t=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let n=0;for(;(n=r.indexOf("..",n+1))!==-1;){let s=r[n-1];if(s&&s!=="."&&s!==".."&&s!=="**"){t=!0;let o=n===1&&r[n+1]==="**"?["."]:[];r.splice(n-1,2,...o),r.length===0&&r.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){let i=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(i){e[t]=[],e[r]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,r=!1){let i=0,n=0,s=[],o="";for(;i<e.length&&n<t.length;)if(e[i]===t[n])s.push(o==="b"?t[n]:e[i]),i++,n++;else if(r&&e[i]==="**"&&t[n]===e[i+1])s.push(e[i]),i++;else if(r&&t[n]==="**"&&e[i]===t[n+1])s.push(t[n]),n++;else if(e[i]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(o==="b")return!1;o="a",s.push(e[i]),i++,n++}else if(t[n]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(o==="a")return!1;o="b",s.push(t[n]),i++,n++}else return!1;return e.length===t.length&&s}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,r=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let i=this.options;if(this.isWindows){let f=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!f&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),S=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),E=!S&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),x=b?3:f?0:void 0,R=E?3:S?0:void 0;if(typeof x=="number"&&typeof R=="number"){let[O,A]=[e[x],t[R]];O.toLowerCase()===A.toLowerCase()&&(t[R]=O,R>x?t=t.slice(R):x>R&&(e=e.slice(x)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,o=0,a=e.length,l=t.length;s<a&&o<l;s++,o++){this.debug("matchOne loop");var u=t[o],d=e[s];if(this.debug(t,u,d),u===!1)return!1;if(u===Se){this.debug("GLOBSTAR",[t,u,d]);var h=s,p=o+1;if(p===l){for(this.debug("** at the end");s<a;s++)if(e[s]==="."||e[s]===".."||!i.dot&&e[s].charAt(0)===".")return!1;return!0}for(;h<a;){var y=e[h];if(this.debug(`
38
- globstar while`,e,h,t,p,y),this.matchOne(e.slice(h),t.slice(p),r))return this.debug("globstar found match!",h,a,y),!0;if(y==="."||y===".."||!i.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,h,t,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!!(r&&(this.debug(`
39
- >>> no match, partial?`,e,h,t,p),h===a))}let f;if(typeof u=="string"?(f=d===u,this.debug("string match",u,d,f)):(f=u.test(d),this.debug("pattern match",u,d,f)),!f)return!1}if(s===a&&o===l)return!0;if(s===a)return r;if(o===l)return s===a-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return md(this.pattern,this.options)}parse(e){zn(e);let t=this.options;if(e==="**")return Se;if(e==="")return"";let r,i=null;(r=e.match(Q_))?i=t.dot?e1:X_:(r=e.match(B_))?i=(t.nocase?t.dot?G_:H_:t.dot?z_:U_)(r[1]):(r=e.match(t1))?i=(t.nocase?t.dot?i1:r1:t.dot?n1:s1)(r):(r=e.match(V_))?i=t.dot?J_:Y_:(r=e.match(K_))&&(i=Z_);let n=fd.fromGlob(e,this.options).toMMPattern();return i&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:i}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,r=t.noglobstar?l1:t.dot?u1:h1,i=new Set(t.nocase?["i"]:[]),n=e.map(a=>{let l=a.map(d=>{if(d instanceof RegExp)for(let h of d.flags.split(""))i.add(h);return typeof d=="string"?g1(d):d===Se?Se:d._src});l.forEach((d,h)=>{let p=l[h+1],y=l[h-1];d!==Se||y===Se||(y===void 0?p!==void 0&&p!==Se?l[h+1]="(?:\\/|"+r+"\\/)?"+p:l[h]=r:p===void 0?l[h-1]=y+"(?:\\/|\\/"+r+")?":p!==Se&&(l[h-1]=y+"(?:\\/|\\/"+r+"\\/)"+p,l[h+1]=Se))});let u=l.filter(d=>d!==Se);if(this.partial&&u.length>=1){let d=[];for(let h=1;h<=u.length;h++)d.push(u.slice(0,h).join("/"));return"(?:"+d.join("|")+")"}return u.join("/")}).join("|"),[s,o]=e.length>1?["(?:",")"]:["",""];n="^"+s+n+o+"$",this.partial&&(n="^(?:\\/|"+s+n.slice(1,-1)+o+")$"),this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...i].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,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let n=this.set;this.debug(this.pattern,"set",n);let s=i[i.length-1];if(!s)for(let o=i.length-2;!s&&o>=0;o--)s=i[o];for(let o=0;o<n.length;o++){let a=n[o],l=i;if(r.matchBase&&a.length===1&&(l=[s]),this.matchOne(l,a,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return Ee.defaults(e).Minimatch}};Ee.AST=fd;Ee.Minimatch=Rt;Ee.escape=cd;Ee.unescape=br;var y1=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,yd=new Set,sa=typeof process=="object"&&process?process:{},bd=(e,t,r,i)=>{typeof sa.emitWarning=="function"?sa.emitWarning(e,t,r,i):console.error(`[${r}] ${t}: ${e}`)},Hn=globalThis.AbortController,zc=globalThis.AbortSignal;if(typeof Hn>"u"){zc=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(r,i){this._onabort.push(i)}},Hn=class{constructor(){t()}signal=new zc;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let i of this.signal._onabort)i(r);this.signal.onabort?.(r)}}};let e=sa.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{e&&(e=!1,bd("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",t))}}var b1=e=>!yd.has(e),Et=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),wd=e=>Et(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Bn:null:null,Bn=class extends Array{constructor(e){super(e),this.fill(0)}},w1=class ai{heap;length;static#e=!1;static create(t){let r=wd(t);if(!r)return[];ai.#e=!0;let i=new ai(t,r);return ai.#e=!1,i}constructor(t,r){if(!ai.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},Yn=class vd{#e;#r;#s;#n;#o;#v;#y;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#c;#f;#l;#i;#d;#_;#w;#p;#T;#g;#R;#x;#m;#b;#S;#M;#t;#D;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#m,autopurgeTimers:t.#b,sizes:t.#R,keyMap:t.#f,keyList:t.#l,valList:t.#i,next:t.#d,prev:t.#_,get head(){return t.#w},get tail(){return t.#p},free:t.#T,isBackgroundFetch:r=>t.#u(r),backgroundFetch:(r,i,n,s)=>t.#B(r,i,n,s),moveToTail:r=>t.#L(r),indexes:r=>t.#A(r),rindexes:r=>t.#P(r),isStale:r=>t.#E(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#c}get size(){return this.#a}get fetchMethod(){return this.#v}get memoMethod(){return this.#y}get dispose(){return this.#s}get onInsert(){return this.#n}get disposeAfter(){return this.#o}constructor(t){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:u,onInsert:d,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:y,maxSize:f=0,maxEntrySize:b=0,sizeCalculation:S,fetchMethod:E,memoMethod:x,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:I,ignoreFetchAbort:D,perf:z}=t;if(z!==void 0&&typeof z?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=z??y1,r!==0&&!Et(r))throw new TypeError("max option must be a nonnegative integer");let j=r?wd(r):Array;if(!j)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=f,this.maxEntrySize=b||this.#r,this.sizeCalculation=S,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(x!==void 0&&typeof x!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=x,E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#v=E,this.#M=!!E,this.#f=new Map,this.#l=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#d=new j(r),this.#_=new j(r),this.#w=0,this.#p=0,this.#T=w1.create(r),this.#a=0,this.#c=0,typeof u=="function"&&(this.#s=u),typeof d=="function"&&(this.#n=d),typeof h=="function"?(this.#o=h,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#S=!!this.#s,this.#D=!!this.#n,this.#t=!!this.#o,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#r!==0&&!Et(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Et(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#z()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Et(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Et(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#q()}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 V="LRU_CACHE_UNBOUNDED";b1(V)&&(yd.add(V),bd("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",V,vd))}}getRemainingTTL(t){return this.#f.has(t)?1/0:0}#q(){let t=new Bn(this.#e),r=new Bn(this.#e);this.#m=t,this.#x=r;let i=this.ttlAutopurge?new Array(this.#e):void 0;this.#b=i,this.#F=(o,a,l=this.#h.now())=>{if(r[o]=a!==0?l:0,t[o]=a,i?.[o]&&(clearTimeout(i[o]),i[o]=void 0),a!==0&&i){let u=setTimeout(()=>{this.#E(o)&&this.#k(this.#l[o],"expire")},a+1);u.unref&&u.unref(),i[o]=u}},this.#O=o=>{r[o]=t[o]!==0?this.#h.now():0},this.#j=(o,a)=>{if(t[a]){let l=t[a],u=r[a];if(!l||!u)return;o.ttl=l,o.start=u,o.now=n||s();let d=o.now-u;o.remainingTTL=l-d}};let n=0,s=()=>{let o=this.#h.now();if(this.ttlResolution>0){n=o;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{let a=this.#f.get(o);if(a===void 0)return 0;let l=t[a],u=r[a];if(!l||!u)return 1/0;let d=(n||s())-u;return l-d},this.#E=o=>{let a=r[o],l=t[o];return!!l&&!!a&&(n||s())-a>l}}#O=()=>{};#j=()=>{};#F=()=>{};#E=()=>!1;#z(){let t=new Bn(this.#e);this.#c=0,this.#R=t,this.#N=r=>{this.#c-=t[r],t[r]=0},this.#$=(r,i,n,s)=>{if(this.#u(i))return 0;if(!Et(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Et(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.#C=(r,i,n)=>{if(t[r]=i,this.#r){let s=this.#r-t[r];for(;this.#c>s;)this.#W(!0)}this.#c+=t[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#c)}}#N=t=>{};#C=(t,r,i)=>{};#$=(t,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#p;!(!this.#I(r)||((t||!this.#E(r))&&(yield r),r===this.#w));)r=this.#_[r]}*#P({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#w;!(!this.#I(r)||((t||!this.#E(r))&&(yield r),r===this.#p));)r=this.#d[r]}#I(t){return t!==void 0&&this.#f.get(this.#l[t])===t}*entries(){for(let t of this.#A())this.#i[t]!==void 0&&this.#l[t]!==void 0&&!this.#u(this.#i[t])&&(yield[this.#l[t],this.#i[t]])}*rentries(){for(let t of this.#P())this.#i[t]!==void 0&&this.#l[t]!==void 0&&!this.#u(this.#i[t])&&(yield[this.#l[t],this.#i[t]])}*keys(){for(let t of this.#A()){let r=this.#l[t];r!==void 0&&!this.#u(this.#i[t])&&(yield r)}}*rkeys(){for(let t of this.#P()){let r=this.#l[t];r!==void 0&&!this.#u(this.#i[t])&&(yield r)}}*values(){for(let t of this.#A())this.#i[t]!==void 0&&!this.#u(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#P())this.#i[t]!==void 0&&!this.#u(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let i of this.#A()){let n=this.#i[i],s=this.#u(n)?n.__staleWhileFetching:n;if(s!==void 0&&t(s,this.#l[i],this))return this.get(this.#l[i],r)}}forEach(t,r=this){for(let i of this.#A()){let n=this.#i[i],s=this.#u(n)?n.__staleWhileFetching:n;s!==void 0&&t.call(r,s,this.#l[i],this)}}rforEach(t,r=this){for(let i of this.#P()){let n=this.#i[i],s=this.#u(n)?n.__staleWhileFetching:n;s!==void 0&&t.call(r,s,this.#l[i],this)}}purgeStale(){let t=!1;for(let r of this.#P({allowStale:!0}))this.#E(r)&&(this.#k(this.#l[r],"expire"),t=!0);return t}info(t){let r=this.#f.get(t);if(r===void 0)return;let i=this.#i[r],n=this.#u(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#m&&this.#x){let o=this.#m[r],a=this.#x[r];if(o&&a){let l=o-(this.#h.now()-a);s.ttl=l,s.start=Date.now()}}return this.#R&&(s.size=this.#R[r]),s}dump(){let t=[];for(let r of this.#A({allowStale:!0})){let i=this.#l[r],n=this.#i[r],s=this.#u(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let o={value:s};if(this.#m&&this.#x){o.ttl=this.#m[r];let a=this.#h.now()-this.#x[r];o.start=Math.floor(Date.now()-a)}this.#R&&(o.size=this.#R[r]),t.unshift([i,o])}return t}load(t){this.clear();for(let[r,i]of t){if(i.start){let n=Date.now()-i.start;i.start=this.#h.now()-n}this.set(r,i.value,i)}}set(t,r,i={}){if(r===void 0)return this.delete(t),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,d=this.#$(t,r,i.size||0,a);if(this.maxEntrySize&&d>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#k(t,"set"),this;let h=this.#a===0?void 0:this.#f.get(t);if(h===void 0)h=this.#a===0?this.#p:this.#T.length!==0?this.#T.pop():this.#a===this.#e?this.#W(!1):this.#a,this.#l[h]=t,this.#i[h]=r,this.#f.set(t,h),this.#d[this.#p]=h,this.#_[h]=this.#p,this.#p=h,this.#a++,this.#C(h,d,l),l&&(l.set="add"),u=!1,this.#D&&this.#n?.(r,t,"add");else{this.#L(h);let p=this.#i[h];if(r!==p){if(this.#M&&this.#u(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=p;y!==void 0&&!o&&(this.#S&&this.#s?.(y,t,"set"),this.#t&&this.#g?.push([y,t,"set"]))}else o||(this.#S&&this.#s?.(p,t,"set"),this.#t&&this.#g?.push([p,t,"set"]));if(this.#N(h),this.#C(h,d,l),this.#i[h]=r,l){l.set="replace";let y=p&&this.#u(p)?p.__staleWhileFetching:p;y!==void 0&&(l.oldValue=y)}}else l&&(l.set="update");this.#D&&this.onInsert?.(r,t,r===p?"update":"replace")}if(n!==0&&!this.#m&&this.#q(),this.#m&&(u||this.#F(h,n,s),l&&this.#j(l,h)),!o&&this.#t&&this.#g){let p=this.#g,y;for(;y=p?.shift();)this.#o?.(...y)}return this}pop(){try{for(;this.#a;){let t=this.#i[this.#w];if(this.#W(!0),this.#u(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#t&&this.#g){let t=this.#g,r;for(;r=t?.shift();)this.#o?.(...r)}}}#W(t){let r=this.#w,i=this.#l[r],n=this.#i[r];return this.#M&&this.#u(n)?n.__abortController.abort(new Error("evicted")):(this.#S||this.#t)&&(this.#S&&this.#s?.(n,i,"evict"),this.#t&&this.#g?.push([n,i,"evict"])),this.#N(r),this.#b?.[r]&&(clearTimeout(this.#b[r]),this.#b[r]=void 0),t&&(this.#l[r]=void 0,this.#i[r]=void 0,this.#T.push(r)),this.#a===1?(this.#w=this.#p=0,this.#T.length=0):this.#w=this.#d[r],this.#f.delete(i),this.#a--,r}has(t,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#f.get(t);if(s!==void 0){let o=this.#i[s];if(this.#u(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#E(s))n&&(n.has="stale",this.#j(n,s));else return i&&this.#O(s),n&&(n.has="hit",this.#j(n,s)),!0}else n&&(n.has="miss");return!1}peek(t,r={}){let{allowStale:i=this.allowStale}=r,n=this.#f.get(t);if(n===void 0||!i&&this.#E(n))return;let s=this.#i[n];return this.#u(s)?s.__staleWhileFetching:s}#B(t,r,i,n){let s=r===void 0?void 0:this.#i[r];if(this.#u(s))return s;let o=new Hn,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:n},u=(b,S=!1)=>{let{aborted:E}=o.signal,x=i.ignoreFetchAbort&&b!==void 0,R=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&b!==void 0);if(i.status&&(E&&!S?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,x&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),E&&!x&&!S)return h(o.signal.reason,R);let O=y,A=this.#i[r];return(A===y||x&&S&&A===void 0)&&(b===void 0?O.__staleWhileFetching!==void 0?this.#i[r]=O.__staleWhileFetching:this.#k(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,b,l.options))),b},d=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),h(b,!1)),h=(b,S)=>{let{aborted:E}=o.signal,x=E&&i.allowStaleOnFetchAbort,R=x||i.allowStaleOnFetchRejection,O=R||i.noDeleteOnFetchRejection,A=y;if(this.#i[r]===y&&(!O||!S&&A.__staleWhileFetching===void 0?this.#k(t,"fetch"):x||(this.#i[r]=A.__staleWhileFetching)),R)return i.status&&A.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),A.__staleWhileFetching;if(A.__returned===A)throw b},p=(b,S)=>{let E=this.#v?.(t,s,l);E&&E instanceof Promise&&E.then(x=>b(x===void 0?void 0:x),S),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=x=>u(x,!0)))})};i.status&&(i.status.fetchDispatched=!0);let y=new Promise(p).then(u,d),f=Object.assign(y,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(t,f,{...l.options,status:void 0}),r=this.#f.get(t)):this.#i[r]=f,f}#u(t){if(!this.#M)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Hn}async fetch(t,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:b,forceRefresh:S=!1,status:E,signal:x}=r;if(!this.#M)return E&&(E.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:E});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:u,noUpdateTTL:d,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:f,ignoreFetchAbort:y,status:E,signal:x},O=this.#f.get(t);if(O===void 0){E&&(E.fetch="miss");let A=this.#B(t,O,R,b);return A.__returned=A}else{let A=this.#i[O];if(this.#u(A)){let j=i&&A.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",j&&(E.returnedStale=!0)),j?A.__staleWhileFetching:A.__returned=A}let I=this.#E(O);if(!S&&!I)return E&&(E.fetch="hit"),this.#L(O),n&&this.#O(O),E&&this.#j(E,O),A;let D=this.#B(t,O,R,b),z=D.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=I?"stale":"refresh",z&&I&&(E.returnedStale=!0)),z?D.__staleWhileFetching:D.__returned=D}}async forceFetch(t,r={}){let i=await this.fetch(t,r);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,r={}){let i=this.#y;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...o}=r,a=this.get(t,o);if(!s&&a!==void 0)return a;let l=i(t,a,{options:o,context:n});return this.set(t,l,o),l}get(t,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,a=this.#f.get(t);if(a!==void 0){let l=this.#i[a],u=this.#u(l);return o&&this.#j(o,a),this.#E(a)?(o&&(o.get="stale"),u?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#k(t,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),u?l.__staleWhileFetching:(this.#L(a),n&&this.#O(a),l))}else o&&(o.get="miss")}#U(t,r){this.#_[r]=t,this.#d[t]=r}#L(t){t!==this.#p&&(t===this.#w?this.#w=this.#d[t]:this.#U(this.#_[t],this.#d[t]),this.#U(this.#p,t),this.#p=t)}delete(t){return this.#k(t,"delete")}#k(t,r){let i=!1;if(this.#a!==0){let n=this.#f.get(t);if(n!==void 0)if(this.#b?.[n]&&(clearTimeout(this.#b?.[n]),this.#b[n]=void 0),i=!0,this.#a===1)this.#H(r);else{this.#N(n);let s=this.#i[n];if(this.#u(s)?s.__abortController.abort(new Error("deleted")):(this.#S||this.#t)&&(this.#S&&this.#s?.(s,t,r),this.#t&&this.#g?.push([s,t,r])),this.#f.delete(t),this.#l[n]=void 0,this.#i[n]=void 0,n===this.#p)this.#p=this.#_[n];else if(n===this.#w)this.#w=this.#d[n];else{let o=this.#_[n];this.#d[o]=this.#d[n];let a=this.#d[n];this.#_[a]=this.#_[n]}this.#a--,this.#T.push(n)}}if(this.#t&&this.#g?.length){let n=this.#g,s;for(;s=n?.shift();)this.#o?.(...s)}return i}clear(){return this.#H("delete")}#H(t){for(let r of this.#P({allowStale:!0})){let i=this.#i[r];if(this.#u(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#l[r];this.#S&&this.#s?.(i,n,t),this.#t&&this.#g?.push([i,n,t])}}if(this.#f.clear(),this.#i.fill(void 0),this.#l.fill(void 0),this.#m&&this.#x){this.#m.fill(0),this.#x.fill(0);for(let r of this.#b??[])r!==void 0&&clearTimeout(r);this.#b?.fill(void 0)}if(this.#R&&this.#R.fill(0),this.#w=0,this.#p=0,this.#T.length=0,this.#c=0,this.#a=0,this.#t&&this.#g){let r=this.#g,i;for(;i=r?.shift();)this.#o?.(...i)}}},Hc=typeof process=="object"&&process?process:{stdout:null,stderr:null},j1=e=>!!e&&typeof e=="object"&&(e instanceof Gn||e instanceof _d||D1(e)||C1(e)),D1=e=>!!e&&typeof e=="object"&&e instanceof ua&&typeof e.pipe=="function"&&e.pipe!==_d.Writable.prototype.pipe,C1=e=>!!e&&typeof e=="object"&&e instanceof ua&&typeof e.write=="function"&&typeof e.end=="function",it=Symbol("EOF"),nt=Symbol("maybeEmitEnd"),St=Symbol("emittedEnd"),Cn=Symbol("emittingEnd"),ti=Symbol("emittedError"),Ln=Symbol("closed"),Gc=Symbol("read"),Nn=Symbol("flush"),Vc=Symbol("flushChunk"),Be=Symbol("encoding"),mr=Symbol("decoder"),he=Symbol("flowing"),ri=Symbol("paused"),yr=Symbol("resume"),fe=Symbol("buffer"),_e=Symbol("pipes"),ce=Symbol("bufferLength"),Qo=Symbol("bufferPush"),Fn=Symbol("bufferShift"),ye=Symbol("objectMode"),ee=Symbol("destroyed"),Xo=Symbol("error"),ea=Symbol("emitData"),Yc=Symbol("emitEnd"),ta=Symbol("emitEnd2"),Ze=Symbol("async"),ra=Symbol("abort"),$n=Symbol("aborted"),ii=Symbol("signal"),Gt=Symbol("dataListeners"),Te=Symbol("discarded"),ni=e=>Promise.resolve().then(e),L1=e=>e(),N1=e=>e==="end"||e==="finish"||e==="prefinish",F1=e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,$1=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),Sd=class{src;dest;opts;ondrain;constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[yr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},I1=class extends Sd{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=i=>this.dest.emit("error",i),e.on("error",this.proxyErrors)}},W1=e=>!!e.objectMode,B1=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer",Gn=class extends ua{[he]=!1;[ri]=!1;[_e]=[];[fe]=[];[ye];[Be];[Ze];[mr];[it]=!1;[St]=!1;[Cn]=!1;[Ln]=!1;[ti]=null;[ce]=0;[ee]=!1;[ii];[$n]=!1;[Gt]=0;[Te]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");W1(t)?(this[ye]=!0,this[Be]=null):B1(t)?(this[Be]=t.encoding,this[ye]=!1):(this[ye]=!1,this[Be]=null),this[Ze]=!!t.async,this[mr]=this[Be]?new q1(this[Be]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[fe]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[_e]});let{signal:r}=t;r&&(this[ii]=r,r.aborted?this[ra]():r.addEventListener("abort",()=>this[ra]()))}get bufferLength(){return this[ce]}get encoding(){return this[Be]}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[ye]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ze]}set async(e){this[Ze]=this[Ze]||!!e}[ra](){this[$n]=!0,this.emit("abort",this[ii]?.reason),this.destroy(this[ii]?.reason)}get aborted(){return this[$n]}set aborted(e){}write(e,t,r){if(this[$n])return!1;if(this[it])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 t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=this[Ze]?ni:L1;if(!this[ye]&&!Buffer.isBuffer(e)){if($1(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(F1(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ye]?(this[he]&&this[ce]!==0&&this[Nn](!0),this[he]?this.emit("data",e):this[Qo](e),this[ce]!==0&&this.emit("readable"),r&&i(r),this[he]):e.length?(typeof e=="string"&&!(t===this[Be]&&!this[mr]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Be]&&(e=this[mr].write(e)),this[he]&&this[ce]!==0&&this[Nn](!0),this[he]?this.emit("data",e):this[Qo](e),this[ce]!==0&&this.emit("readable"),r&&i(r),this[he]):(this[ce]!==0&&this.emit("readable"),r&&i(r),this[he])}read(e){if(this[ee])return null;if(this[Te]=!1,this[ce]===0||e===0||e&&e>this[ce])return this[nt](),null;this[ye]&&(e=null),this[fe].length>1&&!this[ye]&&(this[fe]=[this[Be]?this[fe].join(""):Buffer.concat(this[fe],this[ce])]);let t=this[Gc](e||null,this[fe][0]);return this[nt](),t}[Gc](e,t){if(this[ye])this[Fn]();else{let r=t;e===r.length||e===null?this[Fn]():typeof r=="string"?(this[fe][0]=r.slice(e),t=r.slice(0,e),this[ce]-=e):(this[fe][0]=r.subarray(e),t=r.subarray(0,e),this[ce]-=e)}return this.emit("data",t),!this[fe].length&&!this[it]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t="utf8"),e!==void 0&&this.write(e,t),r&&this.once("end",r),this[it]=!0,this.writable=!1,(this[he]||!this[ri])&&this[nt](),this}[yr](){this[ee]||(!this[Gt]&&!this[_e].length&&(this[Te]=!0),this[ri]=!1,this[he]=!0,this.emit("resume"),this[fe].length?this[Nn]():this[it]?this[nt]():this.emit("drain"))}resume(){return this[yr]()}pause(){this[he]=!1,this[ri]=!0,this[Te]=!1}get destroyed(){return this[ee]}get flowing(){return this[he]}get paused(){return this[ri]}[Qo](e){this[ye]?this[ce]+=1:this[ce]+=e.length,this[fe].push(e)}[Fn](){return this[ye]?this[ce]-=1:this[ce]-=this[fe][0].length,this[fe].shift()}[Nn](e=!1){do;while(this[Vc](this[Fn]())&&this[fe].length);!e&&!this[fe].length&&!this[it]&&this.emit("drain")}[Vc](e){return this.emit("data",e),this[he]}pipe(e,t){if(this[ee])return e;this[Te]=!1;let r=this[St];return t=t||{},e===Hc.stdout||e===Hc.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[_e].push(t.proxyErrors?new I1(this,e,t):new Sd(this,e,t)),this[Ze]?ni(()=>this[yr]()):this[yr]()),e}unpipe(e){let t=this[_e].find(r=>r.dest===e);t&&(this[_e].length===1?(this[he]&&this[Gt]===0&&(this[he]=!1),this[_e]=[]):this[_e].splice(this[_e].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);if(e==="data")this[Te]=!1,this[Gt]++,!this[_e].length&&!this[he]&&this[yr]();else if(e==="readable"&&this[ce]!==0)super.emit("readable");else if(N1(e)&&this[St])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ti]){let i=t;this[Ze]?ni(()=>i.call(this,this[ti])):i.call(this,this[ti])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){let r=super.off(e,t);return e==="data"&&(this[Gt]=this.listeners("data").length,this[Gt]===0&&!this[Te]&&!this[_e].length&&(this[he]=!1)),r}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Gt]=0,!this[Te]&&!this[_e].length&&(this[he]=!1)),t}get emittedEnd(){return this[St]}[nt](){!this[Cn]&&!this[St]&&!this[ee]&&this[fe].length===0&&this[it]&&(this[Cn]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ln]&&this.emit("close"),this[Cn]=!1)}emit(e,...t){let r=t[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[ye]&&!r?!1:this[Ze]?(ni(()=>this[ea](r)),!0):this[ea](r);if(e==="end")return this[Yc]();if(e==="close"){if(this[Ln]=!0,!this[St]&&!this[ee])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[ti]=r,super.emit(Xo,r);let n=!this[ii]||this.listeners("error").length?super.emit("error",r):!1;return this[nt](),n}else if(e==="resume"){let n=super.emit("resume");return this[nt](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let i=super.emit(e,...t);return this[nt](),i}[ea](e){for(let r of this[_e])r.dest.write(e)===!1&&this.pause();let t=this[Te]?!1:super.emit("data",e);return this[nt](),t}[Yc](){return this[St]?!1:(this[St]=!0,this.readable=!1,this[Ze]?(ni(()=>this[ta]()),!0):this[ta]())}[ta](){if(this[mr]){let t=this[mr].end();if(t){for(let r of this[_e])r.dest.write(t);this[Te]||super.emit("data",t)}}for(let t of this[_e])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ye]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[ye]||(e.dataLength+=r.length)}),await t,e}async concat(){if(this[ye])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Be]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(ee,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Te]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[it])return t();let i,n,s=u=>{this.off("data",o),this.off("end",a),this.off(ee,l),t(),n(u)},o=u=>{this.off("error",s),this.off("end",a),this.off(ee,l),this.pause(),i({value:u,done:!!this[it]})},a=()=>{this.off("error",s),this.off("data",o),this.off(ee,l),t(),i({done:!0,value:void 0})},l=()=>s(new Error("stream destroyed"));return new Promise((u,d)=>{n=d,i=u,this.once(ee,l),this.once("error",s),this.once("end",a),this.once("data",o)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Te]=!1;let e=!1,t=()=>(this.pause(),this.off(Xo,t),this.off(ee,t),this.off("end",t),e=!0,{done:!0,value:void 0}),r=()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}};return this.once("end",t),this.once(Xo,t),this.once(ee,t),{next:r,throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[Te]=!0,this[fe].length=0,this[ce]=0;let t=this;return typeof t.close=="function"&&!this[Ln]&&t.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return j1}},U1=M1.native,li={lstatSync:S1,readdir:E1,readdirSync:R1,readlinkSync:x1,realpathSync:U1,promises:{lstat:T1,readdir:k1,readlink:A1,realpath:P1}},Ed=e=>!e||e===li||e===O1?li:{...li,...e,promises:{...li.promises,...e.promises||{}}},Rd=/^\\\\\?\\([a-z]:)\\?$/i,z1=e=>e.replace(/\//g,"\\").replace(Rd,"$1\\"),H1=/[\\\/]/,Ne=0,xd=1,Md=2,Qe=4,Od=6,Td=8,Vt=10,kd=12,Le=15,si=~Le,ia=16,Jc=32,ui=64,Ue=128,In=256,Un=512,Kc=ui|Ue|Un,G1=1023,na=e=>e.isFile()?Td:e.isDirectory()?Qe:e.isSymbolicLink()?Vt:e.isCharacterDevice()?Md:e.isBlockDevice()?Od:e.isSocket()?kd:e.isFIFO()?xd:Ne,Zc=new Yn({max:2**12}),hi=e=>{let t=Zc.get(e);if(t)return t;let r=e.normalize("NFKD");return Zc.set(e,r),r},Qc=new Yn({max:2**12}),Wn=e=>{let t=Qc.get(e);if(t)return t;let r=hi(e.toLowerCase());return Qc.set(e,r),r},Xc=class extends Yn{constructor(){super({max:256})}},V1=class extends Yn{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Ad=Symbol("PathScurry setAsCwd"),Me=class{name;root;roots;parent;nocase;isCWD=!1;#e;#r;get dev(){return this.#r}#s;get mode(){return this.#s}#n;get nlink(){return this.#n}#o;get uid(){return this.#o}#v;get gid(){return this.#v}#y;get rdev(){return this.#y}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#c;get size(){return this.#c}#f;get blocks(){return this.#f}#l;get atimeMs(){return this.#l}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#_;get birthtimeMs(){return this.#_}#w;get atime(){return this.#w}#p;get mtime(){return this.#p}#T;get ctime(){return this.#T}#g;get birthtime(){return this.#g}#R;#x;#m;#b;#S;#M;#t;#D;#q;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ne,r,i,n,s,o){this.name=e,this.#R=n?Wn(e):hi(e),this.#t=t&G1,this.nocase=n,this.roots=i,this.root=r||this,this.#D=s,this.#m=o.fullpath,this.#S=o.relative,this.#M=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=Ed(o.fs)}depth(){return this.#x!==void 0?this.#x:this.parent?this.#x=this.parent.depth()+1:this.#x=0}childrenCache(){return this.#D}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#j(r):this.#j(r)}#j(e){let t=this;for(let r of e)t=t.child(r);return t}children(){let e=this.#D.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#D.set(this,t),this.#t&=~ia,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let r=this.children(),i=this.nocase?Wn(e):hi(e);for(let a of r)if(a.#R===i)return a;let n=this.parent?this.sep:"",s=this.#m?this.#m+n+e:void 0,o=this.newChild(e,Ne,{...t,parent:this,fullpath:s});return this.canReaddir()||(o.#t|=Ue),r.push(o),o}relative(){if(this.isCWD)return"";if(this.#S!==void 0)return this.#S;let e=this.name,t=this.parent;if(!t)return this.#S=this.name;let r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#M!==void 0)return this.#M;let e=this.name,t=this.parent;if(!t)return this.#M=this.fullpathPosix();let r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#m!==void 0)return this.#m;let e=this.name,t=this.parent;if(!t)return this.#m=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#m=r}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let e=this.parent,t=e.fullpathPosix(),r=t+(!t||!e.parent?"":"/")+this.name;return this.#b=r}isUnknown(){return(this.#t&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.#t&Le)===Td}isDirectory(){return(this.#t&Le)===Qe}isCharacterDevice(){return(this.#t&Le)===Md}isBlockDevice(){return(this.#t&Le)===Od}isFIFO(){return(this.#t&Le)===xd}isSocket(){return(this.#t&Le)===kd}isSymbolicLink(){return(this.#t&Vt)===Vt}lstatCached(){return this.#t&Jc?this:void 0}readlinkCached(){return this.#q}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#q)return!0;if(!this.parent)return!1;let e=this.#t&Le;return!(e!==Ne&&e!==Vt||this.#t&In||this.#t&Ue)}calledReaddir(){return!!(this.#t&ia)}isENOENT(){return!!(this.#t&Ue)}isNamed(e){return this.nocase?this.#R===Wn(e):this.#R===hi(e)}async readlink(){let e=this.#q;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),r=(await this.parent.realpath())?.resolve(t);if(r)return this.#q=r}catch(t){this.#P(t.code);return}}readlinkSync(){let e=this.#q;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),r=this.parent.realpathSync()?.resolve(t);if(r)return this.#q=r}catch(t){this.#P(t.code);return}}#F(e){this.#t|=ia;for(let t=e.provisional;t<e.length;t++){let r=e[t];r&&r.#E()}}#E(){this.#t&Ue||(this.#t=(this.#t|Ue)&si,this.#z())}#z(){let e=this.children();e.provisional=0;for(let t of e)t.#E()}#N(){this.#t|=Un,this.#C()}#C(){if(this.#t&ui)return;let e=this.#t;(e&Le)===Qe&&(e&=si),this.#t=e|ui,this.#z()}#$(e=""){e==="ENOTDIR"||e==="EPERM"?this.#C():e==="ENOENT"?this.#E():this.children().provisional=0}#A(e=""){e==="ENOTDIR"?this.parent.#C():e==="ENOENT"&&this.#E()}#P(e=""){let t=this.#t;t|=In,e==="ENOENT"&&(t|=Ue),(e==="EINVAL"||e==="UNKNOWN")&&(t&=si),this.#t=t,e==="ENOTDIR"&&this.parent&&this.parent.#C()}#I(e,t){return this.#B(e,t)||this.#W(e,t)}#W(e,t){let r=na(e),i=this.newChild(e.name,r,{parent:this}),n=i.#t&Le;return n!==Qe&&n!==Vt&&n!==Ne&&(i.#t|=ui),t.unshift(i),t.provisional++,i}#B(e,t){for(let r=t.provisional;r<t.length;r++){let i=t[r];if((this.nocase?Wn(e.name):hi(e.name))===i.#R)return this.#u(e,i,r,t)}}#u(e,t,r,i){let n=t.name;return t.#t=t.#t&si|na(e),n!==e.name&&(t.name=e.name),r!==i.provisional&&(r===i.length-1?i.pop():i.splice(r,1),i.unshift(t)),i.provisional++,t}async lstat(){if((this.#t&Ue)===0)try{return this.#U(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#A(e.code)}}lstatSync(){if((this.#t&Ue)===0)try{return this.#U(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#A(e.code)}}#U(e){let{atime:t,atimeMs:r,birthtime:i,birthtimeMs:n,blksize:s,blocks:o,ctime:a,ctimeMs:l,dev:u,gid:d,ino:h,mode:p,mtime:y,mtimeMs:f,nlink:b,rdev:S,size:E,uid:x}=e;this.#w=t,this.#l=r,this.#g=i,this.#_=n,this.#h=s,this.#f=o,this.#T=a,this.#d=l,this.#r=u,this.#v=d,this.#a=h,this.#s=p,this.#p=y,this.#i=f,this.#n=b,this.#y=S,this.#c=E,this.#o=x;let R=na(e);this.#t=this.#t&si|R|Jc,R!==Ne&&R!==Qe&&R!==Vt&&(this.#t|=ui)}#L=[];#k=!1;#H(e){this.#k=!1;let t=this.#L.slice();this.#L.length=0,t.forEach(r=>r(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let r=this.children();if(this.calledReaddir()){let n=r.slice(0,r.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#L.push(e),this.#k)return;this.#k=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(n,s)=>{if(n)this.#$(n.code),r.provisional=0;else{for(let o of s)this.#I(o,r);this.#F(r)}this.#H(r.slice(0,r.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#G)await this.#G;else{let r=()=>{};this.#G=new Promise(i=>r=i);try{for(let i of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#I(i,e);this.#F(e)}catch(i){this.#$(i.code),e.provisional=0}this.#G=void 0,r()}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 t=this.fullpath();try{for(let r of this.#e.readdirSync(t,{withFileTypes:!0}))this.#I(r,e);this.#F(e)}catch(r){this.#$(r.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#t&Kc)return!1;let e=Le&this.#t;return e===Ne||e===Qe||e===Vt}shouldWalk(e,t){return(this.#t&Qe)===Qe&&!(this.#t&Kc)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!((Un|In|Ue)&this.#t))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!((Un|In|Ue)&this.#t))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[Ad](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),r=[],i=this;for(;i&&i.parent;)t.add(i),i.#S=r.join(this.sep),i.#M=r.join("/"),i=i.parent,r.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#S=void 0,i.#M=void 0,i=i.parent}},Pd=class qd extends Me{sep="\\";splitSep=H1;constructor(t,r=Ne,i,n,s,o,a){super(t,r,i,n,s,o,a)}newChild(t,r=Ne,i={}){return new qd(t,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(t){return oa.parse(t).root}getRoot(t){if(t=z1(t.toUpperCase()),t===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(t,r))return this.roots[t]=i;return this.roots[t]=new ha(t,this).root}sameRoot(t,r=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(Rd,"$1\\"),t===r}},jd=class Dd extends Me{splitSep="/";sep="/";constructor(t,r=Ne,i,n,s,o,a){super(t,r,i,n,s,o,a)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,r=Ne,i={}){return new Dd(t,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Cd=class{root;rootPath;roots;cwd;#e;#r;#s;nocase;#n;constructor(e=process.cwd(),t,r,{nocase:i,childrenCacheSize:n=16*1024,fs:s=li}={}){this.#n=Ed(s),(e instanceof URL||e.startsWith("file://"))&&(e=_1(e));let o=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new Xc,this.#r=new Xc,this.#s=new V1(n);let a=o.substring(this.rootPath.length).split(r);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let l=this.root,u=a.length-1,d=t.sep,h=this.rootPath,p=!1;for(let y of a){let f=u--;l=l.child(y,{relative:new Array(f).fill("..").join(d),relativePosix:new Array(f).fill("..").join("/"),fullpath:h+=(p?"":d)+y}),p=!0}this.cwd=l}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let s=e[n];if(!(!s||s===".")&&(t=t?`${s}/${t}`:s,this.isAbsolute(s)))break}let r=this.#e.get(t);if(r!==void 0)return r;let i=this.cwd.resolve(t).fullpath();return this.#e.set(t,i),i}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let s=e[n];if(!(!s||s===".")&&(t=t?`${s}/${t}`:s,this.isAbsolute(s)))break}let r=this.#r.get(t);if(r!==void 0)return r;let i=this.cwd.resolve(t).fullpathPosix();return this.#r.set(t,i),i}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,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd);let{withFileTypes:r}=t;if(e.canReaddir()){let i=await e.readdir();return r?i:i.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd);let{withFileTypes:r=!0}=t;return e.canReaddir()?r?e.readdirSync():e.readdirSync().map(i=>i.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:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e.withFileTypes,e=this.cwd);let r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e.withFileTypes,e=this.cwd);let r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e.withFileTypes,e=this.cwd);let r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e.withFileTypes,e=this.cwd);let r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=t,o=[];(!n||n(e))&&o.push(r?e:e.fullpath());let a=new Set,l=(d,h)=>{a.add(d),d.readdirCB((p,y)=>{if(p)return h(p);let f=y.length;if(!f)return h();let b=()=>{--f===0&&h()};for(let S of y)(!n||n(S))&&o.push(r?S:S.fullpath()),i&&S.isSymbolicLink()?S.realpath().then(E=>E?.isUnknown()?E.lstat():E).then(E=>E?.shouldWalk(a,s)?l(E,b):b()):S.shouldWalk(a,s)?l(S,b):b()},!0)},u=e;return new Promise((d,h)=>{l(u,p=>{if(p)return h(p);d(o)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=t,o=[];(!n||n(e))&&o.push(r?e:e.fullpath());let a=new Set([e]);for(let l of a){let u=l.readdirSync();for(let d of u){(!n||n(d))&&o.push(r?d:d.fullpath());let h=d;if(d.isSymbolicLink()){if(!(i&&(h=d.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(a,s)&&a.add(h)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=t;(!n||n(e))&&(yield r?e:e.fullpath());let o=new Set([e]);for(let a of o){let l=a.readdirSync();for(let u of l){(!n||n(u))&&(yield r?u:u.fullpath());let d=u;if(u.isSymbolicLink()){if(!(i&&(d=u.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(o,s)&&o.add(d)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=t,o=new Gn({objectMode:!0});(!n||n(e))&&o.write(r?e:e.fullpath());let a=new Set,l=[e],u=0,d=()=>{let h=!1;for(;!h;){let p=l.shift();if(!p){u===0&&o.end();return}u++,a.add(p);let y=(b,S,E=!1)=>{if(b)return o.emit("error",b);if(i&&!E){let x=[];for(let R of S)R.isSymbolicLink()&&x.push(R.realpath().then(O=>O?.isUnknown()?O.lstat():O));if(x.length){Promise.all(x).then(()=>y(null,S,!0));return}}for(let x of S)x&&(!n||n(x))&&(o.write(r?x:x.fullpath())||(h=!0));u--;for(let x of S){let R=x.realpathCached()||x;R.shouldWalk(a,s)&&l.push(R)}h&&!o.flowing?o.once("drain",d):f||d()},f=!0;p.readdirCB(y,!0),f=!1}};return d(),o}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Me||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=t,o=new Gn({objectMode:!0}),a=new Set;(!n||n(e))&&o.write(r?e:e.fullpath());let l=[e],u=0,d=()=>{let h=!1;for(;!h;){let p=l.shift();if(!p){u===0&&o.end();return}u++,a.add(p);let y=p.readdirSync();for(let f of y)(!n||n(f))&&(o.write(r?f:f.fullpath())||(h=!0));u--;for(let f of y){let b=f;if(f.isSymbolicLink()){if(!(i&&(b=f.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,s)&&l.push(b)}}h&&!o.flowing&&o.once("drain",d)};return d(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Ad](t)}},ha=class extends Cd{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,oa,"\\",{...t,nocase:r}),this.nocase=r;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return oa.parse(e).root.toUpperCase()}newRoot(e){return new Pd(this.rootPath,Qe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},fa=class extends Cd{sep="/";constructor(e=process.cwd(),t={}){let{nocase:r=!1}=t;super(e,v1,"/",{...t,nocase:r}),this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new jd(this.rootPath,Qe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Ld=class extends fa{constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,{...t,nocase:r})}},lR=process.platform==="win32"?Pd:jd,Y1=process.platform==="win32"?ha:process.platform==="darwin"?Ld:fa,J1=e=>e.length>=1,K1=e=>e.length>=1,Z1=Symbol.for("nodejs.util.inspect.custom"),Nd=class Fd{#e;#r;#s;length;#n;#o;#v;#y;#h;#a;#c=!0;constructor(t,r,i,n){if(!J1(t))throw new TypeError("empty pattern list");if(!K1(r))throw new TypeError("empty glob list");if(r.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=t,this.#r=r,this.#s=i,this.#n=n,this.#s===0){if(this.isUNC()){let[s,o,a,l,...u]=this.#e,[d,h,p,y,...f]=this.#r;u[0]===""&&(u.shift(),f.shift());let b=[s,o,a,l,""].join("/"),S=[d,h,p,y,""].join("/");this.#e=[b,...u],this.#r=[S,...f],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#r;o[0]===""&&(o.shift(),l.shift());let u=s+"/",d=a+"/";this.#e=[u,...o],this.#r=[d,...l],this.length=this.#e.length}}}[Z1](){return"Pattern <"+this.#r.slice(this.#s).join("/")+">"}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===Se}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#v=this.#v||(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 Fd(this.#e,this.#r,this.#s+1,this.#n),this.#o.#a=this.#a,this.#o.#h=this.#h,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let t=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#n==="win32"&&this.#s===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#e;return this.#y!==void 0?this.#y:this.#y=this.#n==="win32"&&this.#s===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#e;return this.#a!==void 0?this.#a:this.#a=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#e[0];return typeof t=="string"&&this.isAbsolute()&&this.#s===0?t:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#c)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#c?!1:(this.#c=!1,!0)}},Q1=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ed=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:i,noglobstar:n,platform:s=Q1}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=s,this.mmopts={dot:!0,nobrace:t,nocase:r,noext:i,noglobstar:n,optimizationLevel:2,platform:s,nocomment:!0,nonegate:!0};for(let o of e)this.add(o)}add(e){let t=new Rt(e,this.mmopts);for(let r=0;r<t.set.length;r++){let i=t.set[r],n=t.globParts[r];if(!i||!n)throw new Error("invalid pattern object");for(;i[0]==="."&&n[0]===".";)i.shift(),n.shift();let s=new Nd(i,n,0,this.platform),o=new Rt(s.globString(),this.mmopts),a=n[n.length-1]==="**",l=s.isAbsolute();l?this.absolute.push(o):this.relative.push(o),a&&(l?this.absoluteChildren.push(o):this.relativeChildren.push(o))}}ignored(e){let t=e.fullpath(),r=`${t}/`,i=e.relative()||".",n=`${i}/`;for(let s of this.relative)if(s.match(i)||s.match(n))return!0;for(let s of this.absolute)if(s.match(t)||s.match(r))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(r))return!0;for(let i of this.absoluteChildren)if(i.match(t))return!0;return!1}},X1=class $d{store;constructor(t=new Map){this.store=t}copy(){return new $d(new Map(this.store))}hasWalked(t,r){return this.store.get(t.fullpath())?.has(r.globString())}storeWalked(t,r){let i=t.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},eS=class{store=new Map;add(e,t,r){let i=(t?2:0)|(r?1:0),n=this.store.get(e);this.store.set(e,n===void 0?i:i&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},tS=class{store=new Map;add(e,t){if(!e.canReaddir())return;let r=this.store.get(e);r?r.find(i=>i.globString()===t.globString())||r.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},td=class Id{hasWalkedCache;matches=new eS;subwalks=new tS;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new X1}processPatterns(t,r){this.patterns=r;let i=r.map(n=>[t,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){n=n.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let h=s.rest();if(h)s=h;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,d=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,d=!0;if(l=s.pattern(),u=s.rest(),d){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),a,h);continue}else if(l===Se){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let h=u?.pattern(),p=u?.rest();if(!u||(h===""||h===".")&&!p)this.matches.add(n,a,h===""||h===".");else if(h===".."){let y=n.parent||n;p?this.hasWalkedCache.hasWalked(y,p)||this.subwalks.add(y,p):this.matches.add(y,a,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Id(this.opts,this.hasWalkedCache)}filterEntries(t,r){let i=this.subwalks.get(t),n=this.child();for(let s of r)for(let o of i){let a=o.isAbsolute(),l=o.pattern(),u=o.rest();l===Se?n.testGlobstar(s,o,u,a):l instanceof RegExp?n.testRegExp(s,l,u,a):n.testString(s,l,u,a)}return n}testGlobstar(t,r,i,n){if((this.dot||!t.name.startsWith("."))&&(r.hasMore()||this.matches.add(t,n,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,r):t.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(t,i):r.markFollowGlobstar()&&this.subwalks.add(t,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(t,s,i.rest(),n);else if(s===".."){let o=t.parent||t;this.subwalks.add(o,i)}else s instanceof RegExp&&this.testRegExp(t,s,i.rest(),n)}}testRegExp(t,r,i,n){r.test(t.name)&&(i?this.subwalks.add(t,i):this.matches.add(t,n,!1))}testString(t,r,i,n){t.isNamed(r)&&(i?this.subwalks.add(t,i):this.matches.add(t,n,!1))}},rS=(e,t)=>typeof e=="string"?new ed([e],t):Array.isArray(e)?new ed(e,t):e,Wd=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#r;#s;signal;maxDepth;includeChildMatches;constructor(e,t,r){if(this.patterns=e,this.path=t,this.opts=r,this.#s=!r.posix&&r.platform==="win32"?"\\":"/",this.includeChildMatches=r.includeChildMatches!==!1,(r.ignore||!this.includeChildMatches)&&(this.#r=rS(r.ignore??[],r),!this.includeChildMatches&&typeof this.#r.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(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,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}let i=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){let n=await i.realpath();n&&(n.isUnknown()||this.opts.stat)&&await n.lstat()}return this.matchCheckTest(i,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#n(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}let i=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){let n=i.realpathSync();n&&(n?.isUnknown()||this.opts.stat)&&n.lstatSync()}return this.matchCheckTest(i,t)}matchFinish(e,t){if(this.#n(e))return;if(!this.includeChildMatches&&this.#r?.add){let n=`${e.relativePosix()}/**`;this.#r.add(n)}let r=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){let n=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(n+i)}else{let n=this.opts.posix?e.relativePosix():e.relative(),s=this.opts.dotRelative&&!n.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(n?s+n+i:"."+i)}}async match(e,t,r){let i=await this.matchCheck(e,r);i&&this.matchFinish(i,t)}matchSync(e,t,r){let i=this.matchCheckSync(e,r);i&&this.matchFinish(i,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new td(this.opts),r)}walkCB2(e,t,r,i){if(this.#o(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,t,r,i));return}r.processPatterns(e,t);let n=1,s=()=>{--n===0&&i()};for(let[o,a,l]of r.matches.entries())this.#n(o)||(n++,this.match(o,a,l).then(()=>s()));for(let o of r.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;n++;let a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,r,s):o.readdirCB((l,u)=>this.walkCB3(o,u,r,s),!0)}s()}walkCB3(e,t,r,i){r=r.filterEntries(e,t);let n=1,s=()=>{--n===0&&i()};for(let[o,a,l]of r.matches.entries())this.#n(o)||(n++,this.match(o,a,l).then(()=>s()));for(let[o,a]of r.subwalks.entries())n++,this.walkCB2(o,a,r.child(),s);s()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new td(this.opts),r)}walkCB2Sync(e,t,r,i){if(this.#o(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,r,i));return}r.processPatterns(e,t);let n=1,s=()=>{--n===0&&i()};for(let[o,a,l]of r.matches.entries())this.#n(o)||this.matchSync(o,a,l);for(let o of r.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;n++;let a=o.readdirSync();this.walkCB3Sync(o,a,r,s)}s()}walkCB3Sync(e,t,r,i){r=r.filterEntries(e,t);let n=1,s=()=>{--n===0&&i()};for(let[o,a,l]of r.matches.entries())this.#n(o)||this.matchSync(o,a,l);for(let[o,a]of r.subwalks.entries())n++,this.walkCB2Sync(o,a,r.child(),s);s()}},rd=class extends Wd{matches=new Set;constructor(e,t,r){super(e,t,r)}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,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(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}},id=class extends Wd{results;constructor(e,t,r){super(e,t,r),this.results=new Gn({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}},iS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Yt=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,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=m1(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=e,this.platform=t.platform||iS,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=t.platform==="win32"?ha:t.platform==="darwin"?Ld:t.platform?fa:Y1;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let r=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map(a=>new Rt(a,i)),[s,o]=n.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=s.map((a,l)=>{let u=o[l];if(!u)throw new Error("invalid pattern object");return new Nd(a,u,0,this.platform)})}async walk(){return[...await new rd(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 rd(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 id(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 id(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()}},nS=(e,t={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new Rt(r,t).hasMagic())return!0;return!1};function Jn(e,t={}){return new Yt(e,t).streamSync()}function Bd(e,t={}){return new Yt(e,t).stream()}function Ud(e,t={}){return new Yt(e,t).walkSync()}async function nd(e,t={}){return new Yt(e,t).walk()}function Kn(e,t={}){return new Yt(e,t).iterateSync()}function zd(e,t={}){return new Yt(e,t).iterate()}var sS=Jn,oS=Object.assign(Bd,{sync:Jn}),aS=Kn,lS=Object.assign(zd,{sync:Kn}),uS=Object.assign(Ud,{stream:Jn,iterate:Kn}),Vn=Object.assign(nd,{glob:nd,globSync:Ud,sync:uS,globStream:Bd,stream:oS,globStreamSync:Jn,streamSync:sS,globIterate:zd,iterate:lS,globIterateSync:Kn,iterateSync:aS,Glob:Yt,hasMagic:nS,escape:cd,unescape:br});Vn.glob=Vn;var pS="../build",gS="../wheels",mS="streamlit-1.56.0-cp313-none-any.whl",yS="stlite_lib-0.1.0-py3-none-any.whl",bS=cS(import.meta.url),Vd=ge.dirname(bS);async function Yd(e,t){let r=[],i=n=>{r.push(n)};if(await e.loadPackage(t,{errorCallback:i}),r.length>0)throw new Error(r.join(`
40
- `))}async function wS(e){$.info("Copy the build directory (the bare built app files) to this directory...");let t=ge.resolve(Vd,pS);if(!(await xt.stat(t)).isDirectory())throw new Error(`The source ${t} does not exist.`);if(t===e.copyTo){$.warn(`sourceDir == destDir (${t}). Are you in the development environment? Skip copying the directory.`);return}if(e.keepOld)try{await xt.access(e.copyTo),$.info(`${e.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${e.copyTo} does not exist even though the \`keepOld\` option is specified`)}$.debug(`Copy ${t} to ${e.copyTo}`),await xt.rm(e.copyTo,{recursive:!0,force:!0}),await ca.copy(t,e.copyTo,{errorOnExist:!0})}async function vS(e){if(e.requirements.length===0)return[];let t=await Gd({packageBaseUrl:e.pyodideSource,packageCacheDir:e.pyodideRuntimeDir});return await Jd(t,{requirements:e.requirements}),Object.entries(t.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function Hd(e,t){$.debug("Preparing the local wheel: %s",t);let r=await xt.readFile(t),i="/tmp/"+ge.basename(t);e.FS.writeFile(i,r);let n=`emfs:${i}`;return $.debug("The local wheel %s is prepared as %s",t,n),n}async function Jd(e,t){await Yd(e,"micropip");let r=e.pyimport("micropip"),i=[...t.requirements],n=ge.join(Vd,gS),s=await Hd(e,ge.join(n,yS));i.push(s);let o=await Hd(e,ge.join(n,mS));i.push(o),$.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function _S(e){$.info("Create the site-packages snapshot file...");let t=await Gd({packageBaseUrl:e.pyodideSource,packageCacheDir:e.pyodideRuntimeDir});await Yd(t,"micropip");let r=t.pyimport("micropip"),i=new Pn(e.pyodideSource),n=[];if(e.usedPrebuiltPackages.length>0){$.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 a of e.usedPrebuiltPackages){let l=await i.getPackageInfoByName(a);if(l==null)throw new Error(`Package ${a} is not found in the lock file.`);$.debug(`Mock ${l.name} ${l.version}`),r.add_mock_package(l.name,l.version),n.push(l.name)}}$.info("Install the requirements %j",e.requirements),await Jd(t,{requirements:e.requirements}),$.info("Remove the mocked packages: %j",n),n.forEach(a=>r.remove_mock_package(a)),$.info("Archive the site-packages director(y|ies)");let s="/tmp/site-packages-snapshot.tar.gz";await t.runPythonAsync(`
9
+ `),Error.captureStackTrace(this,t)}};Il.exports=t=>{if(t.length>2)throw new Fs(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var Ul=_((o2,Bl)=>{var Wl={};Bl.exports=Wl;var $l={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($l).forEach(function(t){var e=$l[t],r=Wl[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var Hl=_((a2,zl)=>{"use strict";zl.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 Yl=_((l2,Gl)=>{"use strict";var gm=L("os"),Ue=Hl(),Ee=process.env,fr=void 0;Ue("no-color")||Ue("no-colors")||Ue("color=false")?fr=!1:(Ue("color")||Ue("colors")||Ue("color=true")||Ue("color=always"))&&(fr=!0);"FORCE_COLOR"in Ee&&(fr=Ee.FORCE_COLOR.length===0||parseInt(Ee.FORCE_COLOR,10)!==0);function mm(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function ym(t){if(fr===!1)return 0;if(Ue("color=16m")||Ue("color=full")||Ue("color=truecolor"))return 3;if(Ue("color=256"))return 2;if(t&&!t.isTTY&&fr!==!0)return 0;var e=fr?1:0;if(process.platform==="win32"){var r=gm.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 Ee)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in Ee})||Ee.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Ee)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ee.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Ee){var i=parseInt((Ee.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ee.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ee.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Ee.TERM)||"COLORTERM"in Ee?1:(Ee.TERM==="dumb",e)}function Is(t){var e=ym(t);return mm(e)}Gl.exports={supportsColor:Is,stdout:Is(process.stdout),stderr:Is(process.stderr)}});var Kl=_((u2,Vl)=>{Vl.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 o=n[s]||[" "],a=Math.floor(Math.random()*o.length);typeof n[s]<"u"?i+=n[s][a]:i+=s}),i}});var Zl=_((f2,Jl)=>{Jl.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 o(l){var u=!1;return n.filter(function(c){u=c===l}),u}function a(l,u){var c="",f,p;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(p in l)if(!o(p)){switch(c=c+l[p],f={up:0,down:0,mid:0},u.size){case"mini":f.up=s(8),f.mid=s(2),f.down=s(8);break;case"maxi":f.up=s(16)+3,f.mid=s(4)+1,f.down=s(64)+3;break;default:f.up=s(8)+1,f.mid=s(6)/2,f.down=s(8)+1;break}var m=["up","mid","down"];for(var d in m)for(var b=m[d],v=0;v<=f[b];v++)u[b]&&(c=c+i[b][s(i[b].length)])}return c}return a(e,r)}});var Xl=_((c2,Ql)=>{Ql.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 tu=_((h2,eu)=>{eu.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var iu=_((d2,ru)=>{ru.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 su=_((p2,nu)=>{nu.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 cu=_((m2,fu)=>{var F={};fu.exports=F;F.themes={};var bm=L("util"),Nt=F.styles=Ul(),au=Object.defineProperties,wm=new RegExp(/[\r\n]+/g);F.supportsColor=Yl().supportsColor;typeof F.enabled>"u"&&(F.enabled=F.supportsColor()!==!1);F.enable=function(){F.enabled=!0};F.disable=function(){F.enabled=!1};F.stripColors=F.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var g2=F.stylize=function(e,r){if(!F.enabled)return e+"";var i=Nt[r];return!i&&r in F?F[r](e):i.open+e+i.close},_m=/[|\\{}()[\]^$+*?.]/g,vm=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(_m,"\\$&")};function lu(t){var e=function r(){return Em.apply(r,arguments)};return e._styles=t,e.__proto__=Sm,e}var uu=(function(){var t={};return Nt.grey=Nt.gray,Object.keys(Nt).forEach(function(e){Nt[e].closeRe=new RegExp(vm(Nt[e].close),"g"),t[e]={get:function(){return lu(this._styles.concat(e))}}}),t})(),Sm=au(function(){},uu);function Em(){var t=Array.prototype.slice.call(arguments),e=t.map(function(o){return o!=null&&o.constructor===String?o:bm.inspect(o)}).join(" ");if(!F.enabled||!e)return e;for(var r=e.indexOf(`
10
+ `)!=-1,i=this._styles,n=i.length;n--;){var s=Nt[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(wm,function(o){return s.close+o+s.open}))}return e}F.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){F[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var s in t[r])n=F[t[r][s]](n);return n}return F[t[r]](i)}})(e)};function Rm(){var t={};return Object.keys(uu).forEach(function(e){t[e]={get:function(){return lu([e])}}}),t}var xm=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};F.trap=Kl();F.zalgo=Zl();F.maps={};F.maps.america=Xl()(F);F.maps.zebra=tu()(F);F.maps.rainbow=iu()(F);F.maps.random=su()(F);for(ou in F.maps)(function(t){F[t]=function(e){return xm(F.maps[t],e)}})(ou);var ou;au(F,Rm())});var $s=_((y2,hu)=>{var Tm=cu();hu.exports=Tm});var du=_(Ws=>{"use strict";Ws.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};Ws.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var pu=_(Bs=>{"use strict";Bs.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Bs.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var gu=_(Us=>{"use strict";Us.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Us.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var mu=_(Xi=>{"use strict";Object.defineProperty(Xi,"cli",{value:du()});Object.defineProperty(Xi,"npm",{value:pu()});Object.defineProperty(Xi,"syslog",{value:gu()})});var ee=_(Vr=>{"use strict";Object.defineProperty(Vr,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Vr,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Vr,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Vr,"configs",{value:mu()})});var rn=_((E2,tn)=>{"use strict";var Gs=$s(),{LEVEL:zs,MESSAGE:Hs}=ee();Gs.enabled=!0;var yu=/\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]=yu.test(e[n])?e[n].split(yu):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 Gs[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=Gs[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[Hs]=="string"&&(e[Hs]=this.colorize(e[zs],e.level,e[Hs])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[zs],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[zs],e.level,e.message)),e}};tn.exports=t=>new en(t);tn.exports.Colorizer=tn.exports.Format=en});var wu=_((R2,bu)=>{"use strict";var{Colorizer:Mm}=rn();bu.exports=t=>(Mm.addColors(t.colors||t),t)});var vu=_((x2,_u)=>{"use strict";var Om=Re();_u.exports=Om(t=>(t.message=` ${t.message}`,t))});var Ru=_((T2,Eu)=>{"use strict";var Am=Re(),{LEVEL:Su,MESSAGE:Ys}=ee();Eu.exports=Am((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[Su]:t[Su]||t.level,message:t.message,[Ys]:t[Ys]||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[Ys]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var Ks=_((M2,sn)=>{"use strict";var{configs:km,LEVEL:xu,MESSAGE:Vs}=ee(),nn=class t{constructor(e={levels:km.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[xu]]}${e.message}`,e[Vs]&&(e[Vs]=`${this.paddings[e[xu]]}${e[Vs]}`),e}};sn.exports=t=>new nn(t);sn.exports.Padder=sn.exports.Format=nn});var Tu=_((O2,Js)=>{"use strict";var{Colorizer:Dm}=rn(),{Padder:Pm}=Ks(),{configs:qm,MESSAGE:Cm}=ee(),on=class{constructor(e={}){e.levels||(e.levels=qm.cli.levels),this.colorizer=new Dm(e),this.padder=new Pm(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[Cm]=`${e.level}:${e.message}`,e}};Js.exports=t=>new on(t);Js.exports.Format=on});var Ou=_((A2,Zs)=>{"use strict";var Lm=Re();function Mu(t){if(t.every(Nm))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 Nm(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(`
11
+ `));return!0}Zs.exports=(...t)=>{let e=Lm(Mu(t)),r=e();return r.Format=e.Format,r};Zs.exports.cascade=Mu});var Jr=_((to,Du)=>{"use strict";var{hasOwnProperty:Kr}=Object.prototype,Ft=eo();Ft.configure=eo;Ft.stringify=Ft;Ft.default=Ft;to.stringify=Ft;to.configure=eo;Du.exports=Ft;var jm=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function pt(t){return t.length<5e3&&!jm.test(t)?`"${t}"`:JSON.stringify(t)}function Qs(t,e){if(t.length>200||e)return t.sort(e);for(let r=1;r<t.length;r++){let i=t[r],n=r;for(;n!==0&&t[n-1]>i;)t[n]=t[n-1],n--;t[n]=i}return t}var Fm=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Xs(t){return Fm.call(t)!==void 0&&t.length!==0}function Au(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 Im(t){if(Kr.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 $m(t){let e;if(Kr.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?!0:e}function Wm(t,e){let r;if(Kr.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 ku(t,e){let r;if(Kr.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 jt(t){return t===1?"1 item":`${t} items`}function Bm(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Um(t){if(Kr.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 eo(t){t={...t};let e=Um(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=Im(t),i=Wm(t,"bigint"),n=$m(t),s=typeof n=="function"?n:void 0,o=ku(t,"maximumDepth"),a=ku(t,"maximumBreadth");function l(m,d,b,v,S,T){let R=d[m];switch(typeof R=="object"&&R!==null&&typeof R.toJSON=="function"&&(R=R.toJSON(m)),R=v.call(d,m,R),typeof R){case"string":return pt(R);case"object":{if(R===null)return"null";if(b.indexOf(R)!==-1)return r;let x="",k=",",I=T;if(Array.isArray(R)){if(R.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(R),S!==""&&(T+=S,x+=`
12
+ ${T}`,k=`,
13
+ ${T}`);let re=Math.min(R.length,a),we=0;for(;we<re-1;we++){let at=l(String(we),R,b,v,S,T);x+=at!==void 0?at:"null",x+=k}let _e=l(String(we),R,b,v,S,T);if(x+=_e!==void 0?_e:"null",R.length-1>a){let at=R.length-a-1;x+=`${k}"... ${jt(at)} not stringified"`}return S!==""&&(x+=`
14
+ ${I}`),b.pop(),`[${x}]`}let C=Object.keys(R),U=C.length;if(U===0)return"{}";if(o<b.length+1)return'"[Object]"';let q="",G="";S!==""&&(T+=S,k=`,
15
+ ${T}`,q=" ");let te=Math.min(U,a);n&&!Xs(R)&&(C=Qs(C,s)),b.push(R);for(let re=0;re<te;re++){let we=C[re],_e=l(we,R,b,v,S,T);_e!==void 0&&(x+=`${G}${pt(we)}:${q}${_e}`,G=k)}if(U>a){let re=U-a;x+=`${G}"...":${q}"${jt(re)} not stringified"`,G=k}return S!==""&&G.length>1&&(x=`
16
+ ${T}${x}
17
+ ${I}`),b.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 u(m,d,b,v,S,T){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return pt(d);case"object":{if(d===null)return"null";if(b.indexOf(d)!==-1)return r;let R=T,x="",k=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(d),S!==""&&(T+=S,x+=`
18
+ ${T}`,k=`,
19
+ ${T}`);let U=Math.min(d.length,a),q=0;for(;q<U-1;q++){let te=u(String(q),d[q],b,v,S,T);x+=te!==void 0?te:"null",x+=k}let G=u(String(q),d[q],b,v,S,T);if(x+=G!==void 0?G:"null",d.length-1>a){let te=d.length-a-1;x+=`${k}"... ${jt(te)} not stringified"`}return S!==""&&(x+=`
20
+ ${R}`),b.pop(),`[${x}]`}b.push(d);let I="";S!==""&&(T+=S,k=`,
21
+ ${T}`,I=" ");let C="";for(let U of v){let q=u(U,d[U],b,v,S,T);q!==void 0&&(x+=`${C}${pt(U)}:${I}${q}`,C=k)}return S!==""&&C.length>1&&(x=`
22
+ ${T}${x}
23
+ ${R}`),b.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(d);default:return e?e(d):void 0}}function c(m,d,b,v,S){switch(typeof d){case"string":return pt(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return c(m,d,b,v,S);if(d===null)return"null"}if(b.indexOf(d)!==-1)return r;let T=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(d),S+=v;let q=`
24
+ ${S}`,G=`,
25
+ ${S}`,te=Math.min(d.length,a),re=0;for(;re<te-1;re++){let _e=c(String(re),d[re],b,v,S);q+=_e!==void 0?_e:"null",q+=G}let we=c(String(re),d[re],b,v,S);if(q+=we!==void 0?we:"null",d.length-1>a){let _e=d.length-a-1;q+=`${G}"... ${jt(_e)} not stringified"`}return q+=`
26
+ ${T}`,b.pop(),`[${q}]`}let R=Object.keys(d),x=R.length;if(x===0)return"{}";if(o<b.length+1)return'"[Object]"';S+=v;let k=`,
27
+ ${S}`,I="",C="",U=Math.min(x,a);Xs(d)&&(I+=Au(d,k,a),R=R.slice(d.length),U-=d.length,C=k),n&&(R=Qs(R,s)),b.push(d);for(let q=0;q<U;q++){let G=R[q],te=c(G,d[G],b,v,S);te!==void 0&&(I+=`${C}${pt(G)}: ${te}`,C=k)}if(x>a){let q=x-a;I+=`${C}"...": "${jt(q)} not stringified"`,C=k}return C!==""&&(I=`
28
+ ${S}${I}
29
+ ${T}`),b.pop(),`{${I}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(d);default:return e?e(d):void 0}}function f(m,d,b){switch(typeof d){case"string":return pt(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return f(m,d,b);if(d===null)return"null"}if(b.indexOf(d)!==-1)return r;let v="",S=d.length!==void 0;if(S&&Array.isArray(d)){if(d.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(d);let I=Math.min(d.length,a),C=0;for(;C<I-1;C++){let q=f(String(C),d[C],b);v+=q!==void 0?q:"null",v+=","}let U=f(String(C),d[C],b);if(v+=U!==void 0?U:"null",d.length-1>a){let q=d.length-a-1;v+=`,"... ${jt(q)} not stringified"`}return b.pop(),`[${v}]`}let T=Object.keys(d),R=T.length;if(R===0)return"{}";if(o<b.length+1)return'"[Object]"';let x="",k=Math.min(R,a);S&&Xs(d)&&(v+=Au(d,",",a),T=T.slice(d.length),k-=d.length,x=","),n&&(T=Qs(T,s)),b.push(d);for(let I=0;I<k;I++){let C=T[I],U=f(C,d[C],b);U!==void 0&&(v+=`${x}${pt(C)}:${U}`,x=",")}if(R>a){let I=R-a;v+=`${x}"...":"${jt(I)} not stringified"`}return b.pop(),`{${v}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(d);default:return e?e(d):void 0}}function p(m,d,b){if(arguments.length>1){let v="";if(typeof b=="number"?v=" ".repeat(Math.min(b,10)):typeof b=="string"&&(v=b.slice(0,10)),d!=null){if(typeof d=="function")return l("",{"":m},[],d,v,"");if(Array.isArray(d))return u("",m,[],Bm(d),v,"")}if(v.length!==0)return c("",m,[],v,"")}return f("",m,[])}return p}});var ro=_((k2,Pu)=>{"use strict";var zm=Re(),{MESSAGE:Hm}=ee(),Gm=Jr();function Ym(t,e){return typeof e=="bigint"?e.toString():e}Pu.exports=zm((t,e)=>{let r=Gm.configure(e);return t[Hm]=r(t,e.replacer||Ym,e.space),t})});var Cu=_((D2,qu)=>{"use strict";var Vm=Re();qu.exports=Vm((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Nu=_((P2,Lu)=>{"use strict";var Km=Re(),{MESSAGE:Jm}=ee(),Zm=Jr();Lu.exports=Km(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[Jm]=Zm(e),t})});var Fu=_((q2,ju)=>{"use strict";var Qm=Re();function Xm(t,e,r){let i=e.reduce((s,o)=>(s[o]=t[o],delete t[o],s),{}),n=Object.keys(t).reduce((s,o)=>(s[o]=t[o],delete t[o],s),{});return Object.assign(t,i,{[r]:n}),t}function ey(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}ju.exports=Qm((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?Xm(t,i,r):e.fillWith?ey(t,e.fillWith,r):t})});var $u=_((C2,Iu)=>{var cr=1e3,hr=cr*60,dr=hr*60,It=dr*24,ty=It*7,ry=It*365.25;Iu.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return iy(t);if(r==="number"&&isFinite(t))return e.long?sy(t):ny(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function iy(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*ry;case"weeks":case"week":case"w":return r*ty;case"days":case"day":case"d":return r*It;case"hours":case"hour":case"hrs":case"hr":case"h":return r*dr;case"minutes":case"minute":case"mins":case"min":case"m":return r*hr;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 ny(t){var e=Math.abs(t);return e>=It?Math.round(t/It)+"d":e>=dr?Math.round(t/dr)+"h":e>=hr?Math.round(t/hr)+"m":e>=cr?Math.round(t/cr)+"s":t+"ms"}function sy(t){var e=Math.abs(t);return e>=It?an(t,e,It,"day"):e>=dr?an(t,e,dr,"hour"):e>=hr?an(t,e,hr,"minute"):e>=cr?an(t,e,cr,"second"):t+" ms"}function an(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var Bu=_((Zr,Wu)=>{"use strict";var oy=Re(),ay=$u();Wu.exports=oy(t=>{let e=+new Date;return Zr.diff=e-(Zr.prevTime||e),Zr.prevTime=e,t.ms=`+${ay(Zr.diff)}`,t})});var Hu=_((L2,zu)=>{"use strict";var ly=L("util").inspect,uy=Re(),{LEVEL:fy,MESSAGE:Uu,SPLAT:cy}=ee();zu.exports=uy((t,e={})=>{let r=Object.assign({},t);return delete r[fy],delete r[Uu],delete r[cy],t[Uu]=ly(r,!1,e.depth||null,e.colorize),t})});var Gu=_((N2,un)=>{"use strict";var{MESSAGE:hy}=ee(),ln=class{constructor(e){this.template=e}transform(e){return e[hy]=this.template(e),e}};un.exports=t=>new ln(t);un.exports.Printf=un.exports.Format=ln});var Ku=_((j2,Vu)=>{"use strict";var dy=Re(),{MESSAGE:Yu}=ee(),py=Jr();Vu.exports=dy(t=>{let e=py(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Yu]=`${t.level}:${r} ${t.message} ${e}`:t[Yu]=`${t.level}:${r} ${t.message}`,t})});var Qu=_((F2,Zu)=>{"use strict";var gy=L("util"),{SPLAT:Ju}=ee(),my=/%[scdjifoO%]/g,yy=/%%/g,io=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[Ju]||e.splat||[],s=i.match(yy),o=s&&s.length||0,l=r.length-o-n.length,u=l<0?n.splice(l,-1*l):[],c=u.length;if(c)for(let f=0;f<c;f++)Object.assign(e,u[f]);return e.message=gy.format(i,...n),e}transform(e){let r=e.message,i=e[Ju]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(my);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,o=s.length;if(o)for(let a=0;a<o;a++)Object.assign(e,s[a]);return e}return n?this._splat(e,n):e}};Zu.exports=t=>new io(t)});var ef=_((fn,Xu)=>{(function(t,e){typeof fn=="object"&&typeof Xu<"u"?e(fn):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(fn,(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}",o="[^\\s]+",a=/\[([^]*?)\]/gm;function l(E,A){for(var z=[],me=0,D=E.length;me<D;me++)z.push(E[me].substr(0,A));return z}var u=function(E){return function(A,z){var me=z[E].map(function(Ae){return Ae.toLowerCase()}),D=me.indexOf(A.toLowerCase());return D>-1?D:null}};function c(E){for(var A=[],z=1;z<arguments.length;z++)A[z-1]=arguments[z];for(var me=0,D=A;me<D.length;me++){var Ae=D[me];for(var je in Ae)E[je]=Ae[je]}return E}var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],m=l(p,3),d=l(f,3),b={dayNamesShort:d,dayNames:f,monthNamesShort:m,monthNames:p,amPm:["am","pm"],DoFn:function(E){return E+["th","st","nd","rd"][E%10>3?0:(E-E%10!==10?1:0)*E%10]}},v=c({},b),S=function(E){return v=c(v,E)},T=function(E){return E.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},R=function(E,A){for(A===void 0&&(A=2),E=String(E);E.length<A;)E="0"+E;return E},x={D:function(E){return String(E.getDate())},DD:function(E){return R(E.getDate())},Do:function(E,A){return A.DoFn(E.getDate())},d:function(E){return String(E.getDay())},dd:function(E){return R(E.getDay())},ddd:function(E,A){return A.dayNamesShort[E.getDay()]},dddd:function(E,A){return A.dayNames[E.getDay()]},M:function(E){return String(E.getMonth()+1)},MM:function(E){return R(E.getMonth()+1)},MMM:function(E,A){return A.monthNamesShort[E.getMonth()]},MMMM:function(E,A){return A.monthNames[E.getMonth()]},YY:function(E){return R(String(E.getFullYear()),4).substr(2)},YYYY:function(E){return R(E.getFullYear(),4)},h:function(E){return String(E.getHours()%12||12)},hh:function(E){return R(E.getHours()%12||12)},H:function(E){return String(E.getHours())},HH:function(E){return R(E.getHours())},m:function(E){return String(E.getMinutes())},mm:function(E){return R(E.getMinutes())},s:function(E){return String(E.getSeconds())},ss:function(E){return R(E.getSeconds())},S:function(E){return String(Math.round(E.getMilliseconds()/100))},SS:function(E){return R(Math.round(E.getMilliseconds()/10),2)},SSS:function(E){return R(E.getMilliseconds(),3)},a:function(E,A){return E.getHours()<12?A.amPm[0]:A.amPm[1]},A:function(E,A){return E.getHours()<12?A.amPm[0].toUpperCase():A.amPm[1].toUpperCase()},ZZ:function(E){var A=E.getTimezoneOffset();return(A>0?"-":"+")+R(Math.floor(Math.abs(A)/60)*100+Math.abs(A)%60,4)},Z:function(E){var A=E.getTimezoneOffset();return(A>0?"-":"+")+R(Math.floor(Math.abs(A)/60),2)+":"+R(Math.abs(A)%60,2)}},k=function(E){return+E-1},I=[null,r],C=[null,o],U=["isPm",o,function(E,A){var z=E.toLowerCase();return z===A.amPm[0]?0:z===A.amPm[1]?1:null}],q=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(E){var A=(E+"").match(/([+-]|\d\d)/gi);if(A){var z=+A[1]*60+parseInt(A[2],10);return A[0]==="+"?z:-z}return 0}],G={D:["day",r],DD:["day",i],Do:["day",r+o,function(E){return parseInt(E,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(E){var A=new Date,z=+(""+A.getFullYear()).substr(0,2);return+(""+(+E>68?z-1:z)+E)}],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(E){return+E*100}],SS:["millisecond",i,function(E){return+E*10}],SSS:["millisecond",n],d:I,dd:I,ddd:C,dddd:C,MMM:["month",o,u("monthNamesShort")],MMMM:["month",o,u("monthNames")],a:U,A:U,ZZ:q,Z:q},te={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"},re=function(E){return c(te,E)},we=function(E,A,z){if(A===void 0&&(A=te.default),z===void 0&&(z={}),typeof E=="number"&&(E=new Date(E)),Object.prototype.toString.call(E)!=="[object Date]"||isNaN(E.getTime()))throw new Error("Invalid Date pass to format");A=te[A]||A;var me=[];A=A.replace(a,function(Ae,je){return me.push(je),"@@@"});var D=c(c({},v),z);return A=A.replace(e,function(Ae){return x[Ae](E,D)}),A.replace(/@@@/g,function(){return me.shift()})};function _e(E,A,z){if(z===void 0&&(z={}),typeof A!="string")throw new Error("Invalid format in fecha parse");if(A=te[A]||A,E.length>1e3)return null;var me=new Date,D={year:me.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ae=[],je=[],Ot=A.replace(a,function(Dt,ft){return je.push(T(ft)),"@@@"}),Qt={},lt={};Ot=T(Ot).replace(e,function(Dt){var ft=G[Dt],kr=ft[0],Ai=ft[1],ki=ft[3];if(Qt[kr])throw new Error("Invalid format. "+kr+" specified twice in format");return Qt[kr]=!0,ki&&(lt[ki]=!0),Ae.push(ft),"("+Ai+")"}),Object.keys(lt).forEach(function(Dt){if(!Qt[Dt])throw new Error("Invalid format. "+Dt+" is required in specified format")}),Ot=Ot.replace(/@@@/g,function(){return je.shift()});var At=E.match(new RegExp(Ot,"i"));if(!At)return null;for(var hs=c(c({},v),z),Te=1;Te<At.length;Te++){var Ti=Ae[Te-1],Mi=Ti[0],Oi=Ti[2],ut=Oi?Oi(At[Te],hs):+At[Te];if(ut==null)return null;D[Mi]=ut}D.isPm===1&&D.hour!=null&&+D.hour!=12?D.hour=+D.hour+12:D.isPm===0&&+D.hour==12&&(D.hour=0);var Xt;if(D.timezoneOffset==null){Xt=new Date(D.year,D.month,D.day,D.hour,D.minute,D.second,D.millisecond);for(var kt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],Te=0,Ar=kt.length;Te<Ar;Te++)if(Qt[kt[Te][0]]&&D[kt[Te][0]]!==Xt[kt[Te][1]]())return null}else if(Xt=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 Xt}var at={format:we,parse:_e,defaultI18n:b,setGlobalDateI18n:S,setGlobalDateMasks:re};t.assign=c,t.default=at,t.format=we,t.parse=_e,t.defaultI18n=b,t.setGlobalDateI18n=S,t.setGlobalDateMasks=re,Object.defineProperty(t,"__esModule",{value:!0})}))});var rf=_((I2,tf)=>{"use strict";var by=ef(),wy=Re();tf.exports=wy((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():by.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var sf=_(($2,nf)=>{"use strict";var no=$s(),_y=Re(),{MESSAGE:so}=ee();nf.exports=_y((t,e)=>(e.level!==!1&&(t.level=no.strip(t.level)),e.message!==!1&&(t.message=no.strip(String(t.message))),e.raw!==!1&&t[so]&&(t[so]=no.strip(String(t[so]))),t))});var ao=_(oo=>{"use strict";var vy=oo.format=Re();oo.levels=wu();function de(t,e){Object.defineProperty(vy,t,{get(){return e()},configurable:!0})}de("align",function(){return vu()});de("errors",function(){return Ru()});de("cli",function(){return Tu()});de("combine",function(){return Ou()});de("colorize",function(){return rn()});de("json",function(){return ro()});de("label",function(){return Cu()});de("logstash",function(){return Nu()});de("metadata",function(){return Fu()});de("ms",function(){return Bu()});de("padLevels",function(){return Ks()});de("prettyPrint",function(){return Hu()});de("printf",function(){return Gu()});de("simple",function(){return Ku()});de("splat",function(){return Qu()});de("timestamp",function(){return rf()});de("uncolorize",function(){return sf()})});var lo=_(cn=>{"use strict";var{format:of}=L("util");cn.warn={deprecated(t){return()=>{throw new Error(of("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([of("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
30
+ `))}},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 af=_((U2,Sy)=>{Sy.exports={name:"winston",description:"A logger for just about everything.",version:"3.18.3",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",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 uo=_((z2,lf)=>{lf.exports=L("util").deprecate});var fo=_((H2,uf)=>{uf.exports=L("stream")});var ho=_((G2,cf)=>{"use strict";function Ey(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(co,this,t)):process.nextTick(co,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(hn,r):(r._writableState.errorEmitted=!0,process.nextTick(ff,r,s)):process.nextTick(ff,r,s):e?(process.nextTick(hn,r),e(s)):process.nextTick(hn,r)}),this)}function ff(t,e){co(t,e),hn(t)}function hn(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 co(t,e){t.emit("error",e)}function xy(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}cf.exports={destroy:Ey,undestroy:Ry,errorOrDestroy:xy}});var pr=_((Y2,pf)=>{"use strict";var df={};function Ce(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,df[t]=n}function hf(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 Ty(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function My(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Oy(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ce("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ce("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Ty(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(My(t," argument"))n=`The ${t} ${i} ${hf(e,"type")}`;else{let s=Oy(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${hf(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ce("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ce("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ce("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ce("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ce("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ce("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ce("ERR_STREAM_WRITE_AFTER_END","write after end");Ce("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ce("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ce("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");pf.exports.codes=df});var po=_((V2,gf)=>{"use strict";var Ay=pr().codes.ERR_INVALID_OPT_VALUE;function ky(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Dy(t,e,r,i){var n=ky(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Ay(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}gf.exports={getHighWaterMark:Dy}});var mf=_((K2,go)=>{typeof Object.create=="function"?go.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:go.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 it=_((J2,yo)=>{try{if(mo=L("util"),typeof mo.inherits!="function")throw"";yo.exports=mo.inherits}catch{yo.exports=mf()}var mo});var Sf=_((Z2,vf)=>{"use strict";function yf(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 bf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yf(Object(r),!0).forEach(function(i){Py(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Py(t,e,r){return e=_f(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wf(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,_f(i.key),i)}}function Cy(t,e,r){return e&&wf(t.prototype,e),r&&wf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _f(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 Ny=L("buffer"),dn=Ny.Buffer,jy=L("util"),bo=jy.inspect,Fy=bo&&bo.custom||"inspect";function Iy(t,e,r){dn.prototype.copy.call(t,e,r)}vf.exports=(function(){function t(){qy(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 dn.alloc(0);for(var i=dn.allocUnsafe(r>>>0),n=this.head,s=0;n;)Iy(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 o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=dn.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Fy,value:function(r,i){return bo(this,bf(bf({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var xf=_((wo,Rf)=>{var pn=L("buffer"),Ve=pn.Buffer;function Ef(t,e){for(var r in t)e[r]=t[r]}Ve.from&&Ve.alloc&&Ve.allocUnsafe&&Ve.allocUnsafeSlow?Rf.exports=pn:(Ef(pn,wo),wo.Buffer=$t);function $t(t,e,r){return Ve(t,e,r)}$t.prototype=Object.create(Ve.prototype);Ef(Ve,$t);$t.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ve(t,e,r)};$t.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ve(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};$t.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ve(t)};$t.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return pn.SlowBuffer(t)}});var Xr=_(Mf=>{"use strict";var vo=xf().Buffer,Tf=vo.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 $y(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=$y(t);if(typeof e!="string"&&(vo.isEncoding===Tf||!Tf(t)))throw new Error("Unknown encoding: "+t);return e||t}Mf.StringDecoder=Qr;function Qr(t){this.encoding=Wy(t);var e;switch(this.encoding){case"utf16le":this.text=Yy,this.end=Vy,e=4;break;case"utf8":this.fillLast=zy,e=4;break;case"base64":this.text=Ky,this.end=Jy,e=3;break;default:this.write=Zy,this.end=Qy;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vo.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=Gy;Qr.prototype.text=Hy;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 _o(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function By(t,e,r){var i=e.length-1;if(i<r)return 0;var n=_o(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=_o(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=_o(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Uy(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 zy(t){var e=this.lastTotal-this.lastNeed,r=Uy(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 Hy(t,e){var r=By(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 Gy(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Yy(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 Vy(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 Ky(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 Jy(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Zy(t){return t.toString(this.encoding)}function Qy(t){return t&&t.length?this.write(t):""}});var Df=_((X2,kf)=>{"use strict";var Of=pr().codes.ERR_STREAM_PREMATURE_CLOSE;function Xy(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 eb(){}function tb(t){return t.setHeader&&typeof t.abort=="function"}function Af(t,e,r){if(typeof e=="function")return Af(t,null,e);e||(e={}),r=Xy(r||eb);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(d){r.call(t,d)},f=function(){var d;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(d=new Of),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new Of),r.call(t,d)},p=function(){t.req.on("finish",a)};return tb(t)?(t.on("complete",a),t.on("abort",f),t.req?p():t.on("request",p)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",c),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",f)}}kf.exports=Af});var qf=_((eR,Pf)=>{"use strict";var gn;function gt(t,e,r){return e=rb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rb(t){var e=ib(t,"string");return typeof e=="symbol"?e:String(e)}function ib(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 nb=Df(),mt=Symbol("lastResolve"),Wt=Symbol("lastReject"),ei=Symbol("error"),mn=Symbol("ended"),Bt=Symbol("lastPromise"),So=Symbol("handlePromise"),Ut=Symbol("stream");function yt(t,e){return{value:t,done:e}}function sb(t){var e=t[mt];if(e!==null){var r=t[Ut].read();r!==null&&(t[Bt]=null,t[mt]=null,t[Wt]=null,e(yt(r,!1)))}}function ob(t){process.nextTick(sb,t)}function ab(t,e){return function(r,i){t.then(function(){if(e[mn]){r(yt(void 0,!0));return}e[So](r,i)},i)}}var lb=Object.getPrototypeOf(function(){}),ub=Object.setPrototypeOf((gn={get stream(){return this[Ut]},next:function(){var e=this,r=this[ei];if(r!==null)return Promise.reject(r);if(this[mn])return Promise.resolve(yt(void 0,!0));if(this[Ut].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[ei]?a(e[ei]):o(yt(void 0,!0))})});var i=this[Bt],n;if(i)n=new Promise(ab(i,this));else{var s=this[Ut].read();if(s!==null)return Promise.resolve(yt(s,!1));n=new Promise(this[So])}return this[Bt]=n,n}},gt(gn,Symbol.asyncIterator,function(){return this}),gt(gn,"return",function(){var e=this;return new Promise(function(r,i){e[Ut].destroy(null,function(n){if(n){i(n);return}r(yt(void 0,!0))})})}),gn),lb),fb=function(e){var r,i=Object.create(ub,(r={},gt(r,Ut,{value:e,writable:!0}),gt(r,mt,{value:null,writable:!0}),gt(r,Wt,{value:null,writable:!0}),gt(r,ei,{value:null,writable:!0}),gt(r,mn,{value:e._readableState.endEmitted,writable:!0}),gt(r,So,{value:function(s,o){var a=i[Ut].read();a?(i[Bt]=null,i[mt]=null,i[Wt]=null,s(yt(a,!1))):(i[mt]=s,i[Wt]=o)},writable:!0}),r));return i[Bt]=null,nb(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Wt];s!==null&&(i[Bt]=null,i[mt]=null,i[Wt]=null,s(n)),i[ei]=n;return}var o=i[mt];o!==null&&(i[Bt]=null,i[mt]=null,i[Wt]=null,o(yt(void 0,!0))),i[mn]=!0}),e.on("readable",ob.bind(null,i)),i};Pf.exports=fb});var jf=_((tR,Nf)=>{"use strict";function Cf(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(u){r(u);return}a.done?e(l):Promise.resolve(l).then(i,n)}function cb(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){Cf(s,i,n,o,a,"next",l)}function a(l){Cf(s,i,n,o,a,"throw",l)}o(void 0)})}}function Lf(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 hb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lf(Object(r),!0).forEach(function(i){db(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function db(t,e,r){return e=pb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pb(t){var e=gb(t,"string");return typeof e=="symbol"?e:String(e)}function gb(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 mb=pr().codes.ERR_INVALID_ARG_TYPE;function yb(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 mb("iterable",["Iterable"],e);var n=new t(hb({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=cb(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?o():s=!1}catch(f){n.destroy(f)}}),a.apply(this,arguments)}return n}Nf.exports=yb});var Vf=_((iR,Yf)=>{"use strict";Yf.exports=W;var gr;W.ReadableState=Wf;var rR=L("events").EventEmitter,$f=function(e,r){return e.listeners(r).length},ri=fo(),yn=L("buffer").Buffer,bb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function wb(t){return yn.from(t)}function _b(t){return yn.isBuffer(t)||t instanceof bb}var Eo=L("util"),N;Eo&&Eo.debuglog?N=Eo.debuglog("stream"):N=function(){};var vb=Sf(),ko=ho(),Sb=po(),Eb=Sb.getHighWaterMark,bn=pr().codes,Rb=bn.ERR_INVALID_ARG_TYPE,xb=bn.ERR_STREAM_PUSH_AFTER_EOF,Tb=bn.ERR_METHOD_NOT_IMPLEMENTED,Mb=bn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,mr,Ro,xo;it()(W,ri);var ti=ko.errorOrDestroy,To=["error","close","destroy","pause","resume"];function Ob(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 Wf(t,e,r){gr=gr||ii(),t=t||{},typeof r!="boolean"&&(r=e instanceof gr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Eb(this,t,"readableHighWaterMark",r),this.buffer=new vb,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&&(mr||(mr=Xr().StringDecoder),this.decoder=new mr(t.encoding),this.encoding=t.encoding)}function W(t){if(gr=gr||ii(),!(this instanceof W))return new W(t);var e=this instanceof gr;this._readableState=new Wf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ri.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=ko.destroy;W.prototype._undestroy=ko.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=yn.from(t,e),e=""),i=!0),Bf(this,t,e,!1,i)};W.prototype.unshift=function(t){return Bf(this,t,null,!0,!1)};function Bf(t,e,r,i,n){N("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Db(t,s);else{var o;if(n||(o=Ab(s,e)),o)ti(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==yn.prototype&&(e=wb(e)),i)s.endEmitted?ti(t,new Mb):Mo(t,s,e,!0);else if(s.ended)ti(t,new xb);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Mo(t,s,e,!1):Ao(t,s)):Mo(t,s,e,!1)}else i||(s.reading=!1,Ao(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Mo(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&&wn(t)),Ao(t,e)}function Ab(t,e){var r;return!_b(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Rb("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){mr||(mr=Xr().StringDecoder);var e=new mr(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 Ff=1073741824;function kb(t){return t>=Ff?t=Ff:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function If(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=kb(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){N("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 N("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Oo(this):wn(this),null;if(t=If(t,e),t===0&&e.ended)return e.length===0&&Oo(this),null;var i=e.needReadable;N("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,N("length less than watermark",i)),e.ended||e.reading?(i=!1,N("reading or ended",i)):i&&(N("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=If(r,e)));var n;return t>0?n=Hf(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&&Oo(this)),n!==null&&this.emit("data",n),n};function Db(t,e){if(N("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?wn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Uf(t)))}}function wn(t){var e=t._readableState;N("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(N("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Uf,t))}function Uf(t){var e=t._readableState;N("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,Do(t)}function Ao(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Pb,t,e))}function Pb(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(N("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){ti(this,new Tb("_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,N("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,S){N("onunpipe"),v===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,c())}function a(){N("onend"),t.end()}var l=qb(r);t.on("drain",l);var u=!1;function c(){N("cleanup"),t.removeListener("close",m),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(v){N("ondata");var S=t.write(v);N("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Gf(i.pipes,t)!==-1)&&!u&&(N("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(v){N("onerror",v),b(),t.removeListener("error",p),$f(t,"error")===0&&ti(t,v)}Ob(t,"error",p);function m(){t.removeListener("finish",d),b()}t.once("close",m);function d(){N("onfinish"),t.removeListener("close",m),b()}t.once("finish",d);function b(){N("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(N("pipe resume"),r.resume()),t};function qb(t){return function(){var r=t._readableState;N("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&$f(t,"data")&&(r.flowing=!0,Do(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 o=Gf(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=ri.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,N("on readable",i.length,i.reading),i.length?wn(this):i.reading||process.nextTick(Cb,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=ri.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(zf,this),r};W.prototype.removeAllListeners=function(t){var e=ri.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(zf,this),e};function zf(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 Cb(t){N("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(N("resume"),t.flowing=!t.readableListening,Lb(this,t)),t.paused=!1,this};function Lb(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Nb,t,e))}function Nb(t,e){N("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Do(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Do(t){var e=t._readableState;for(N("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(N("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(N("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<To.length;s++)t.on(To[s],this.emit.bind(this,To[s]));return this._read=function(o){N("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return Ro===void 0&&(Ro=qf()),Ro(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=Hf;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Hf(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 Oo(t){var e=t._readableState;N("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(jb,e,t))}function jb(t,e){if(N("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 xo===void 0&&(xo=jf()),xo(W,t,e)});function Gf(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ii=_((nR,Jf)=>{"use strict";var Fb=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Jf.exports=Ke;var Kf=Vf(),qo=Co();it()(Ke,Kf);for(Po=Fb(qo.prototype),_n=0;_n<Po.length;_n++)vn=Po[_n],Ke.prototype[vn]||(Ke.prototype[vn]=qo.prototype[vn]);var Po,vn,_n;function Ke(t){if(!(this instanceof Ke))return new Ke(t);Kf.call(this,t),qo.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",Ib)))}Object.defineProperty(Ke.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ke.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ke.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ib(){this._writableState.ended||process.nextTick($b,this)}function $b(t){t.end()}Object.defineProperty(Ke.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 Co=_((sR,rc)=>{"use strict";rc.exports=V;function Qf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){d0(e,t)}}var yr;V.WritableState=si;var Wb={deprecate:uo()},Xf=fo(),En=L("buffer").Buffer,Bb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ub(t){return En.from(t)}function zb(t){return En.isBuffer(t)||t instanceof Bb}var No=ho(),Hb=po(),Gb=Hb.getHighWaterMark,bt=pr().codes,Yb=bt.ERR_INVALID_ARG_TYPE,Vb=bt.ERR_METHOD_NOT_IMPLEMENTED,Kb=bt.ERR_MULTIPLE_CALLBACK,Jb=bt.ERR_STREAM_CANNOT_PIPE,Zb=bt.ERR_STREAM_DESTROYED,Qb=bt.ERR_STREAM_NULL_VALUES,Xb=bt.ERR_STREAM_WRITE_AFTER_END,e0=bt.ERR_UNKNOWN_ENCODING,br=No.errorOrDestroy;it()(V,Xf);function t0(){}function si(t,e,r){yr=yr||ii(),t=t||{},typeof r!="boolean"&&(r=e instanceof yr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Gb(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){l0(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 Qf(this)}si.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(si.prototype,"buffer",{get:Wb.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Sn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Sn=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(e){return Sn.call(this,e)?!0:this!==V?!1:e&&e._writableState instanceof si}})):Sn=function(e){return e instanceof this};function V(t){yr=yr||ii();var e=this instanceof yr;if(!e&&!Sn.call(V,this))return new V(t);this._writableState=new si(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)),Xf.call(this)}V.prototype.pipe=function(){br(this,new Jb)};function r0(t,e){var r=new Xb;br(t,r),process.nextTick(e,r)}function i0(t,e,r,i){var n;return r===null?n=new Qb:typeof r!="string"&&!e.objectMode&&(n=new Yb("chunk",["string","Buffer"],r)),n?(br(t,n),process.nextTick(i,n),!1):!0}V.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&zb(t);return s&&!En.isBuffer(t)&&(t=Ub(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=t0),i.ending?r0(this,r):(s||i0(this,i,t,r))&&(i.pendingcb++,n=s0(this,i,s,t,e,r)),n};V.prototype.cork=function(){this._writableState.corked++};V.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&ec(this,t))};V.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 e0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function n0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=En.from(e,r)),e}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function s0(t,e,r,i,n,s){if(!r){var o=n0(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;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 Lo(t,e,!1,a,i,n,s);return l}function Lo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Zb("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function o0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(ni,t,e),t._writableState.errorEmitted=!0,br(t,i)):(n(i),t._writableState.errorEmitted=!0,br(t,i),ni(t,e))}function a0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function l0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Kb;if(a0(r),e)o0(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(Zf,t,r,s,n):Zf(t,r,s,n)}}function Zf(t,e,r,i){r||u0(t,e),e.pendingcb--,i(),ni(t,e)}function u0(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 o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,Lo(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 Qf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(Lo(t,e,!1,f,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}V.prototype._write=function(t,e,r){r(new Vb("_write()"))};V.prototype._writev=null;V.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||h0(this,i,r),this};Object.defineProperty(V.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 f0(t,e){t._final(function(r){e.pendingcb--,r&&br(t,r),e.prefinished=!0,t.emit("prefinish"),ni(t,e)})}function c0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(f0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ni(t,e){var r=tc(e);if(r&&(c0(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 h0(t,e,r){e.ending=!0,ni(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function d0(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(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});V.prototype.destroy=No.destroy;V.prototype._undestroy=No.undestroy;V.prototype._destroy=function(t,e){e(t)}});var jo=_((oR,sc)=>{"use strict";var p0=L("util"),ic=Co(),{LEVEL:nc}=ee(),oi=sc.exports=function(e={}){ic.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())})};p0.inherits(oi,ic);oi.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[nc]]){if(e&&!this.format)return this.log(e,i);let s,o;try{o=this.format.transform(Object.assign({},e),this.format.options)}catch(a){s=a}if(s||!o){if(i(),s)throw s;return}return this.log(o,i)}return this._writableState.sync=!1,i(null)};oi.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(o){n=o}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};oi.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[nc]])&&(this.handleExceptions||r.exception!==!0))};oi.prototype._nop=function(){}});var Io=_((aR,ac)=>{"use strict";var g0=L("util"),{LEVEL:Fo}=ee(),oc=jo(),ai=ac.exports=function(e={}){if(oc.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))};g0.inherits(ai,oc);ai.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[Fo]])&&this.transport.log(e[Fo],e.message,e,this._nop),i(null)};ai.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Fo],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};ai.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(`
31
+ `))};ai.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var wr=_((lR,$o)=>{"use strict";$o.exports=jo();$o.exports.LegacyTransportStream=Io()});var fc=_((fR,uc)=>{"use strict";var m0=L("os"),{LEVEL:lc,MESSAGE:_r}=ee(),y0=wr();uc.exports=class extends y0{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:m0.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[lc]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[_r]}${this.eol}`):this._consoleError(e[_r]),r&&r();return}else if(this.consoleWarnLevels[e[lc]]){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 xn=_((Rn,cc)=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.default=b0;function b0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}cc.exports=Rn.default});var dc=_((Tn,hc)=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};hc.exports=Tn.default});var mc=_(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.fallback=pc;wt.wrap=gc;var w0=wt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,_0=wt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,v0=wt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function pc(t){setTimeout(t,0)}function gc(t){return(e,...r)=>t(()=>e(...r))}var li;w0?li=queueMicrotask:_0?li=setImmediate:v0?li=process.nextTick:li=pc;wt.default=gc(li)});var vc=_((Mn,_c)=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.default=M0;var S0=dc(),E0=wc(S0),R0=mc(),x0=wc(R0),T0=zt();function wc(t){return t&&t.__esModule?t:{default:t}}function M0(t){return(0,T0.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return yc(i,r)}:(0,E0.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return yc(i,r);r(null,i)})}function yc(t,e){return t.then(r=>{bc(e,null,r)},r=>{bc(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function bc(t,e,r){try{t(e,r)}catch(i){(0,x0.default)(n=>{throw n},i)}}_c.exports=Mn.default});var zt=_(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.isAsyncIterable=nt.isAsyncGenerator=nt.isAsync=void 0;var O0=vc(),A0=k0(O0);function k0(t){return t&&t.__esModule?t:{default:t}}function Sc(t){return t[Symbol.toStringTag]==="AsyncFunction"}function D0(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function P0(t){return typeof t[Symbol.asyncIterator]=="function"}function q0(t){if(typeof t!="function")throw new Error("expected a function");return Sc(t)?(0,A0.default)(t):t}nt.default=q0;nt.isAsync=Sc;nt.isAsyncGenerator=D0;nt.isAsyncIterable=P0});var vr=_((On,Ec)=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.default=C0;function C0(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]=(o,...a)=>{if(o)return s(o);n(a.length>1?a:a[0])},t.apply(this,i)})}return r}Ec.exports=On.default});var xc=_((An,Rc)=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});var L0=xn(),N0=Wo(L0),j0=zt(),F0=Wo(j0),I0=vr(),$0=Wo(I0);function Wo(t){return t&&t.__esModule?t:{default:t}}An.default=(0,$0.default)((t,e,r)=>{var i=(0,N0.default)(e)?[]:{};t(e,(n,s,o)=>{(0,F0.default)(n)((a,...l)=>{l.length<2&&([l]=l),i[s]=l,o(a)})},n=>r(n,i))},3);Rc.exports=An.default});var Bo=_((kn,Tc)=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.default=W0;function W0(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}Tc.exports=kn.default});var Oc=_((Dn,Mc)=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Mc.exports=Dn.default});var Dc=_((Pn,kc)=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=K0;var B0=xn(),U0=Ac(B0),z0=Oc(),H0=Ac(z0);function Ac(t){return t&&t.__esModule?t:{default:t}}function G0(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function Y0(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function V0(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 K0(t){if((0,U0.default)(t))return G0(t);var e=(0,H0.default)(t);return e?Y0(e):V0(t)}kc.exports=Pn.default});var Uo=_((qn,Pc)=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.default=J0;function J0(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Pc.exports=qn.default});var Ln=_((Cn,qc)=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});var Z0={};Cn.default=Z0;qc.exports=Cn.default});var Lc=_((Nn,Cc)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.default=tw;var Q0=Ln(),X0=ew(Q0);function ew(t){return t&&t.__esModule?t:{default:t}}function tw(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:p,done:m})=>{if(!(s||n)){if(o=!1,m){n=!0,a<=0&&i(null);return}a++,r(p,l,c),l++,u()}}).catch(f))}function c(p,m){if(a-=1,!s){if(p)return f(p);if(p===!1){n=!0,s=!0;return}if(m===X0.default||n&&a<=0)return n=!0,i(null);u()}}function f(p){s||(o=!1,n=!0,i(p))}u()}Cc.exports=Nn.default});var Ic=_((jn,Fc)=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});var rw=Bo(),iw=ui(rw),nw=Dc(),sw=ui(nw),ow=Uo(),aw=ui(ow),Nc=zt(),lw=Lc(),jc=ui(lw),uw=Ln(),fw=ui(uw);function ui(t){return t&&t.__esModule?t:{default:t}}jn.default=t=>(e,r,i)=>{if(i=(0,iw.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Nc.isAsyncGenerator)(e))return(0,jc.default)(e,t,r,i);if((0,Nc.isAsyncIterable)(e))return(0,jc.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,sw.default)(e),s=!1,o=!1,a=0,l=!1;function u(f,p){if(!o)if(a-=1,f)s=!0,i(f);else if(f===!1)s=!0,o=!0;else{if(p===fw.default||s&&a<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;a<t&&!s;){var f=n();if(f===null){s=!0,a<=0&&i(null);return}a+=1,r(f.value,f.key,(0,aw.default)(u))}l=!1}c()};Fc.exports=jn.default});var Ho=_((Fn,$c)=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});var cw=Ic(),hw=zo(cw),dw=zt(),pw=zo(dw),gw=vr(),mw=zo(gw);function zo(t){return t&&t.__esModule?t:{default:t}}function yw(t,e,r,i){return(0,hw.default)(e)(t,(0,pw.default)(r),i)}Fn.default=(0,mw.default)(yw,4);$c.exports=Fn.default});var Uc=_((In,Bc)=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var bw=Ho(),ww=Wc(bw),_w=vr(),vw=Wc(_w);function Wc(t){return t&&t.__esModule?t:{default:t}}function Sw(t,e,r){return(0,ww.default)(t,1,e,r)}In.default=(0,vw.default)(Sw,3);Bc.exports=In.default});var Gc=_(($n,Hc)=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.default=Mw;var Ew=xc(),Rw=zc(Ew),xw=Uc(),Tw=zc(xw);function zc(t){return t&&t.__esModule?t:{default:t}}function Mw(t,e){return(0,Rw.default)(Tw.default,t,e)}Hc.exports=$n.default});var Go=_((dR,Yc)=>{Yc.exports=L("stream")});var Xc=_((pR,Qc)=>{"use strict";function Vc(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 Kc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vc(Object(r),!0).forEach(function(i){Ow(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Ow(t,e,r){return e=Zc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Aw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jc(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,Zc(i.key),i)}}function kw(t,e,r){return e&&Jc(t.prototype,e),r&&Jc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zc(t){var e=Dw(t,"string");return typeof e=="symbol"?e:String(e)}function Dw(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 Pw=L("buffer"),Wn=Pw.Buffer,qw=L("util"),Yo=qw.inspect,Cw=Yo&&Yo.custom||"inspect";function Lw(t,e,r){Wn.prototype.copy.call(t,e,r)}Qc.exports=(function(){function t(){Aw(this,t),this.head=null,this.tail=null,this.length=0}return kw(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 Wn.alloc(0);for(var i=Wn.allocUnsafe(r>>>0),n=this.head,s=0;n;)Lw(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 o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Wn.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Cw,value:function(r,i){return Yo(this,Kc(Kc({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var Ko=_((gR,th)=>{"use strict";function Nw(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(Vo,this,t)):process.nextTick(Vo,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(Bn,r):(r._writableState.errorEmitted=!0,process.nextTick(eh,r,s)):process.nextTick(eh,r,s):e?(process.nextTick(Bn,r),e(s)):process.nextTick(Bn,r)}),this)}function eh(t,e){Vo(t,e),Bn(t)}function Bn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function jw(){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 Vo(t,e){t.emit("error",e)}function Fw(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}th.exports={destroy:Nw,undestroy:jw,errorOrDestroy:Fw}});var _t=_((mR,nh)=>{"use strict";var ih={};function Le(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,ih[t]=n}function rh(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 Iw(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function $w(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}Le("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Le("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Iw(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if($w(t," argument"))n=`The ${t} ${i} ${rh(e,"type")}`;else{let s=Ww(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${rh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Le("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Le("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Le("ERR_STREAM_PREMATURE_CLOSE","Premature close");Le("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Le("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Le("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Le("ERR_STREAM_WRITE_AFTER_END","write after end");Le("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Le("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Le("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");nh.exports.codes=ih});var Jo=_((yR,sh)=>{"use strict";var Bw=_t().codes.ERR_INVALID_OPT_VALUE;function Uw(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function zw(t,e,r,i){var n=Uw(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Bw(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}sh.exports={getHighWaterMark:zw}});var Xo=_((bR,ch)=>{"use strict";ch.exports=K;function ah(t){var e=this;this.next=null,this.entry=null,this.finish=function(){y_(e,t)}}var Sr;K.WritableState=ci;var Hw={deprecate:uo()},lh=Go(),zn=L("buffer").Buffer,Gw=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Yw(t){return zn.from(t)}function Vw(t){return zn.isBuffer(t)||t instanceof Gw}var Qo=Ko(),Kw=Jo(),Jw=Kw.getHighWaterMark,vt=_t().codes,Zw=vt.ERR_INVALID_ARG_TYPE,Qw=vt.ERR_METHOD_NOT_IMPLEMENTED,Xw=vt.ERR_MULTIPLE_CALLBACK,e_=vt.ERR_STREAM_CANNOT_PIPE,t_=vt.ERR_STREAM_DESTROYED,r_=vt.ERR_STREAM_NULL_VALUES,i_=vt.ERR_STREAM_WRITE_AFTER_END,n_=vt.ERR_UNKNOWN_ENCODING,Er=Qo.errorOrDestroy;it()(K,lh);function s_(){}function ci(t,e,r){Sr=Sr||Ht(),t=t||{},typeof r!="boolean"&&(r=e instanceof Sr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Jw(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){h_(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 ah(this)}ci.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ci.prototype,"buffer",{get:Hw.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Un;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Un=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(e){return Un.call(this,e)?!0:this!==K?!1:e&&e._writableState instanceof ci}})):Un=function(e){return e instanceof this};function K(t){Sr=Sr||Ht();var e=this instanceof Sr;if(!e&&!Un.call(K,this))return new K(t);this._writableState=new ci(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)),lh.call(this)}K.prototype.pipe=function(){Er(this,new e_)};function o_(t,e){var r=new i_;Er(t,r),process.nextTick(e,r)}function a_(t,e,r,i){var n;return r===null?n=new r_:typeof r!="string"&&!e.objectMode&&(n=new Zw("chunk",["string","Buffer"],r)),n?(Er(t,n),process.nextTick(i,n),!1):!0}K.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Vw(t);return s&&!zn.isBuffer(t)&&(t=Yw(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=s_),i.ending?o_(this,r):(s||a_(this,i,t,r))&&(i.pendingcb++,n=u_(this,i,s,t,e,r)),n};K.prototype.cork=function(){this._writableState.corked++};K.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&uh(this,t))};K.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 n_(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function l_(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=zn.from(e,r)),e}Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function u_(t,e,r,i,n,s){if(!r){var o=l_(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;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 Zo(t,e,!1,a,i,n,s);return l}function Zo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new t_("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function f_(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(fi,t,e),t._writableState.errorEmitted=!0,Er(t,i)):(n(i),t._writableState.errorEmitted=!0,Er(t,i),fi(t,e))}function c_(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function h_(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Xw;if(c_(r),e)f_(t,r,i,e,n);else{var s=fh(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&uh(t,r),i?process.nextTick(oh,t,r,s,n):oh(t,r,s,n)}}function oh(t,e,r,i){r||d_(t,e),e.pendingcb--,i(),fi(t,e)}function d_(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function uh(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 o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,Zo(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 ah(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(Zo(t,e,!1,f,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}K.prototype._write=function(t,e,r){r(new Qw("_write()"))};K.prototype._writev=null;K.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||m_(this,i,r),this};Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fh(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function p_(t,e){t._final(function(r){e.pendingcb--,r&&Er(t,r),e.prefinished=!0,t.emit("prefinish"),fi(t,e)})}function g_(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(p_,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function fi(t,e){var r=fh(e);if(r&&(g_(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 m_(t,e,r){e.ending=!0,fi(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function y_(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(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});K.prototype.destroy=Qo.destroy;K.prototype._undestroy=Qo.undestroy;K.prototype._destroy=function(t,e){e(t)}});var Ht=_((wR,dh)=>{"use strict";var b_=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};dh.exports=Je;var hh=ra(),ta=Xo();it()(Je,hh);for(ea=b_(ta.prototype),Hn=0;Hn<ea.length;Hn++)Gn=ea[Hn],Je.prototype[Gn]||(Je.prototype[Gn]=ta.prototype[Gn]);var ea,Gn,Hn;function Je(t){if(!(this instanceof Je))return new Je(t);hh.call(this,t),ta.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(Je.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Je.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Je.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function w_(){this._writableState.ended||process.nextTick(__,this)}function __(t){t.end()}Object.defineProperty(Je.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 Yn=_((_R,mh)=>{"use strict";var ph=_t().codes.ERR_STREAM_PREMATURE_CLOSE;function v_(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 S_(){}function E_(t){return t.setHeader&&typeof t.abort=="function"}function gh(t,e,r){if(typeof e=="function")return gh(t,null,e);e||(e={}),r=v_(r||S_);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(d){r.call(t,d)},f=function(){var d;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(d=new ph),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new ph),r.call(t,d)},p=function(){t.req.on("finish",a)};return E_(t)?(t.on("complete",a),t.on("abort",f),t.req?p():t.on("request",p)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",c),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",f)}}mh.exports=gh});var bh=_((vR,yh)=>{"use strict";var Vn;function St(t,e,r){return e=R_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function R_(t){var e=x_(t,"string");return typeof e=="symbol"?e:String(e)}function x_(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 T_=Yn(),Et=Symbol("lastResolve"),Gt=Symbol("lastReject"),hi=Symbol("error"),Kn=Symbol("ended"),Yt=Symbol("lastPromise"),ia=Symbol("handlePromise"),Vt=Symbol("stream");function Rt(t,e){return{value:t,done:e}}function M_(t){var e=t[Et];if(e!==null){var r=t[Vt].read();r!==null&&(t[Yt]=null,t[Et]=null,t[Gt]=null,e(Rt(r,!1)))}}function O_(t){process.nextTick(M_,t)}function A_(t,e){return function(r,i){t.then(function(){if(e[Kn]){r(Rt(void 0,!0));return}e[ia](r,i)},i)}}var k_=Object.getPrototypeOf(function(){}),D_=Object.setPrototypeOf((Vn={get stream(){return this[Vt]},next:function(){var e=this,r=this[hi];if(r!==null)return Promise.reject(r);if(this[Kn])return Promise.resolve(Rt(void 0,!0));if(this[Vt].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[hi]?a(e[hi]):o(Rt(void 0,!0))})});var i=this[Yt],n;if(i)n=new Promise(A_(i,this));else{var s=this[Vt].read();if(s!==null)return Promise.resolve(Rt(s,!1));n=new Promise(this[ia])}return this[Yt]=n,n}},St(Vn,Symbol.asyncIterator,function(){return this}),St(Vn,"return",function(){var e=this;return new Promise(function(r,i){e[Vt].destroy(null,function(n){if(n){i(n);return}r(Rt(void 0,!0))})})}),Vn),k_),P_=function(e){var r,i=Object.create(D_,(r={},St(r,Vt,{value:e,writable:!0}),St(r,Et,{value:null,writable:!0}),St(r,Gt,{value:null,writable:!0}),St(r,hi,{value:null,writable:!0}),St(r,Kn,{value:e._readableState.endEmitted,writable:!0}),St(r,ia,{value:function(s,o){var a=i[Vt].read();a?(i[Yt]=null,i[Et]=null,i[Gt]=null,s(Rt(a,!1))):(i[Et]=s,i[Gt]=o)},writable:!0}),r));return i[Yt]=null,T_(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Gt];s!==null&&(i[Yt]=null,i[Et]=null,i[Gt]=null,s(n)),i[hi]=n;return}var o=i[Et];o!==null&&(i[Yt]=null,i[Et]=null,i[Gt]=null,o(Rt(void 0,!0))),i[Kn]=!0}),e.on("readable",O_.bind(null,i)),i};yh.exports=P_});var Sh=_((SR,vh)=>{"use strict";function wh(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(u){r(u);return}a.done?e(l):Promise.resolve(l).then(i,n)}function q_(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){wh(s,i,n,o,a,"next",l)}function a(l){wh(s,i,n,o,a,"throw",l)}o(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 C_(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){L_(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 L_(t,e,r){return e=N_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function N_(t){var e=j_(t,"string");return typeof e=="symbol"?e:String(e)}function j_(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 F_=_t().codes.ERR_INVALID_ARG_TYPE;function I_(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 F_("iterable",["Iterable"],e);var n=new t(C_({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=q_(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?o():s=!1}catch(f){n.destroy(f)}}),a.apply(this,arguments)}return n}vh.exports=I_});var ra=_((RR,Ph)=>{"use strict";Ph.exports=B;var Rr;B.ReadableState=Th;var ER=L("events").EventEmitter,xh=function(e,r){return e.listeners(r).length},pi=Go(),Jn=L("buffer").Buffer,$_=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function W_(t){return Jn.from(t)}function B_(t){return Jn.isBuffer(t)||t instanceof $_}var na=L("util"),j;na&&na.debuglog?j=na.debuglog("stream"):j=function(){};var U_=Xc(),ca=Ko(),z_=Jo(),H_=z_.getHighWaterMark,Zn=_t().codes,G_=Zn.ERR_INVALID_ARG_TYPE,Y_=Zn.ERR_STREAM_PUSH_AFTER_EOF,V_=Zn.ERR_METHOD_NOT_IMPLEMENTED,K_=Zn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,xr,sa,oa;it()(B,pi);var di=ca.errorOrDestroy,aa=["error","close","destroy","pause","resume"];function J_(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 Th(t,e,r){Rr=Rr||Ht(),t=t||{},typeof r!="boolean"&&(r=e instanceof Rr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=H_(this,t,"readableHighWaterMark",r),this.buffer=new U_,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&&(xr||(xr=Xr().StringDecoder),this.decoder=new xr(t.encoding),this.encoding=t.encoding)}function B(t){if(Rr=Rr||Ht(),!(this instanceof B))return new B(t);var e=this instanceof Rr;this._readableState=new Th(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),pi.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=ca.destroy;B.prototype._undestroy=ca.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=Jn.from(t,e),e=""),i=!0),Mh(this,t,e,!1,i)};B.prototype.unshift=function(t){return Mh(this,t,null,!0,!1)};function Mh(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,X_(t,s);else{var o;if(n||(o=Z_(s,e)),o)di(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Jn.prototype&&(e=W_(e)),i)s.endEmitted?di(t,new K_):la(t,s,e,!0);else if(s.ended)di(t,new Y_);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?la(t,s,e,!1):fa(t,s)):la(t,s,e,!1)}else i||(s.reading=!1,fa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function la(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&&Qn(t)),fa(t,e)}function Z_(t,e){var r;return!B_(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new G_("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){xr||(xr=Xr().StringDecoder);var e=new xr(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 Eh=1073741824;function Q_(t){return t>=Eh?t=Eh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Rh(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=Q_(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?ua(this):Qn(this),null;if(t=Rh(t,e),t===0&&e.ended)return e.length===0&&ua(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=Rh(r,e)));var n;return t>0?n=kh(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&&ua(this)),n!==null&&this.emit("data",n),n};function X_(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?Qn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Oh(t)))}}function Qn(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(Oh,t))}function Oh(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,ha(t)}function fa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(ev,t,e))}function ev(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){di(this,new V_("_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?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,S){j("onunpipe"),v===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,c())}function a(){j("onend"),t.end()}var l=tv(r);t.on("drain",l);var u=!1;function c(){j("cleanup"),t.removeListener("close",m),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(v){j("ondata");var S=t.write(v);j("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Dh(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(v){j("onerror",v),b(),t.removeListener("error",p),xh(t,"error")===0&&di(t,v)}J_(t,"error",p);function m(){t.removeListener("finish",d),b()}t.once("close",m);function d(){j("onfinish"),t.removeListener("close",m),b()}t.once("finish",d);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function tv(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&xh(t,"data")&&(r.flowing=!0,ha(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 o=Dh(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};B.prototype.on=function(t,e){var r=pi.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?Qn(this):i.reading||process.nextTick(rv,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=pi.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Ah,this),r};B.prototype.removeAllListeners=function(t){var e=pi.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Ah,this),e};function Ah(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 rv(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,iv(this,t)),t.paused=!1,this};function iv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(nv,t,e))}function nv(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),ha(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 ha(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 o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(j("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<aa.length;s++)t.on(aa[s],this.emit.bind(this,aa[s]));return this._read=function(o){j("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return sa===void 0&&(sa=bh()),sa(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=kh;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function kh(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 ua(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(sv,e,t))}function sv(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 oa===void 0&&(oa=Sh()),oa(B,t,e)});function Dh(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var da=_((xR,Ch)=>{"use strict";Ch.exports=st;var Xn=_t().codes,ov=Xn.ERR_METHOD_NOT_IMPLEMENTED,av=Xn.ERR_MULTIPLE_CALLBACK,lv=Xn.ERR_TRANSFORM_ALREADY_TRANSFORMING,uv=Xn.ERR_TRANSFORM_WITH_LENGTH_0,es=Ht();it()(st,es);function fv(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new av);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 st(t){if(!(this instanceof st))return new st(t);es.call(this,t),this._transformState={afterTransform:fv.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",cv)}function cv(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){qh(t,e,r)}):qh(this,null,null)}st.prototype.push=function(t,e){return this._transformState.needTransform=!1,es.prototype.push.call(this,t,e)};st.prototype._transform=function(t,e,r){r(new ov("_transform()"))};st.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)}};st.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};st.prototype._destroy=function(t,e){es.prototype._destroy.call(this,t,function(r){e(r)})};function qh(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new uv;if(t._transformState.transforming)throw new lv;return t.push(null)}});var jh=_((TR,Nh)=>{"use strict";Nh.exports=gi;var Lh=da();it()(gi,Lh);function gi(t){if(!(this instanceof gi))return new gi(t);Lh.call(this,t)}gi.prototype._transform=function(t,e,r){r(null,t)}});var Bh=_((MR,Wh)=>{"use strict";var pa;function hv(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var $h=_t().codes,dv=$h.ERR_MISSING_ARGS,pv=$h.ERR_STREAM_DESTROYED;function Fh(t){if(t)throw t}function gv(t){return t.setHeader&&typeof t.abort=="function"}function mv(t,e,r,i){i=hv(i);var n=!1;t.on("close",function(){n=!0}),pa===void 0&&(pa=Yn()),pa(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,gv(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new pv("pipe"))}}}function Ih(t){t()}function yv(t,e){return t.pipe(e)}function bv(t){return!t.length||typeof t[t.length-1]!="function"?Fh:t.pop()}function wv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=bv(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new dv("streams");var n,s=e.map(function(o,a){var l=a<e.length-1,u=a>0;return mv(o,l,u,function(c){n||(n=c),c&&s.forEach(Ih),!l&&(s.forEach(Ih),i(n))})});return e.reduce(yv)}Wh.exports=wv});var Kt=_((Ne,yi)=>{var mi=L("stream");process.env.READABLE_STREAM==="disable"&&mi?(yi.exports=mi.Readable,Object.assign(yi.exports,mi),yi.exports.Stream=mi):(Ne=yi.exports=ra(),Ne.Stream=mi||Ne,Ne.Readable=Ne,Ne.Writable=Xo(),Ne.Duplex=Ht(),Ne.Transform=da(),Ne.PassThrough=jh(),Ne.finished=Yn(),Ne.pipeline=Bh())});var va=_((OR,zh)=>{var Tr=[],bi=[],ga=function(){};function ya(t){return~Tr.indexOf(t)?!1:(Tr.push(t),!0)}function ba(t){ga=t}function _v(t){for(var e=[],r=0;r<Tr.length;r++){if(Tr[r].async){e.push(Tr[r]);continue}if(Tr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(o){return o(t)})).then(function(o){n(o.some(Boolean))})}):!1}function wa(t){return~bi.indexOf(t)?!1:(bi.push(t),!0)}function ma(){ga.apply(ga,arguments)}function Uh(t){for(var e=0;e<bi.length;e++)t=bi[e].apply(bi[e],arguments);return t}function _a(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function vv(t){return t.enabled=!1,t.modify=wa,t.set=ba,t.use=ya,_a(function(){return!1},t)}function Sv(t){function e(){var r=Array.prototype.slice.call(arguments,0);return ma.call(ma,t,Uh(r,t)),!0}return t.enabled=!0,t.modify=wa,t.set=ba,t.use=ya,_a(e,t)}zh.exports=function(e){return e.introduce=_a,e.enabled=_v,e.process=Uh,e.modify=wa,e.write=ma,e.nope=vv,e.yep=Sv,e.set=ba,e.use=ya,e}});var Gh=_((AR,Hh)=>{var Ev=va(),Rv=Ev(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)});Hh.exports=Rv});var Qh=_((kR,Zh)=>{"use strict";var Ze={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]},Vh=Object.create(null);for(let t in Ze)Object.hasOwn(Ze,t)&&(Vh[Ze[t]]=t);var oe={to:{},get:{}};oe.get=function(t){let e=t.slice(0,3).toLowerCase(),r,i;switch(e){case"hsl":{r=oe.get.hsl(t),i="hsl";break}case"hwb":{r=oe.get.hwb(t),i="hwb";break}default:{r=oe.get.rgb(t),i="rgb";break}}return r?{model:i,value:r}:null};oe.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,l,u;if(a=t.match(r)){for(u=a[2],a=a[1],l=0;l<3;l++){let c=l*2;o[l]=Number.parseInt(a.slice(c,c+2),16)}u&&(o[3]=Number.parseInt(u,16)/255)}else if(a=t.match(e)){for(a=a[1],u=a[3],l=0;l<3;l++)o[l]=Number.parseInt(a[l]+a[l],16);u&&(o[3]=Number.parseInt(u+u,16)/255)}else if(a=t.match(i)){for(l=0;l<3;l++)o[l]=Number.parseInt(a[l+1],10);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(n)){for(l=0;l<3;l++)o[l]=Math.round(Number.parseFloat(a[l+1])*2.55);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ze,a[1])?(o=Ze[a[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=xt(o[l],0,255);return o[3]=xt(o[3],0,1),o};oe.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=xt(Number.parseFloat(r[2]),0,100),o=xt(Number.parseFloat(r[3]),0,100),a=xt(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};oe.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=xt(Number.parseFloat(r[2]),0,100),o=xt(Number.parseFloat(r[3]),0,100),a=xt(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};oe.to.hex=function(...t){return"#"+ts(t[0])+ts(t[1])+ts(t[2])+(t[3]<1?ts(Math.round(t[3]*255)):"")};oe.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};oe.to.rgb.percent=function(...t){let 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]+")"};oe.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};oe.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};oe.to.keyword=function(...t){return Vh[t.slice(0,3)]};function xt(t,e,r){return Math.min(Math.max(e,t),r)}function ts(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var Kh={};for(let t of Object.keys(Ze))Kh[Ze[t]]=t;var M={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},ot=(6/29)**3;function Mr(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function Or(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(M)){if(!("channels"in M[t]))throw new Error("missing channels property: "+t);if(!("labels"in M[t]))throw new Error("missing channel labels property: "+t);if(M[t].labels.length!==M[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=M[t];delete M[t].channels,delete M[t].labels,Object.defineProperty(M[t],"channels",{value:e}),Object.defineProperty(M[t],"labels",{value:r})}M.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),o=s-n,a,l;switch(s){case n:{a=0;break}case e:{a=(r-i)/o;break}case r:{a=2+(i-e)/o;break}case i:{a=4+(e-r)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);let u=(n+s)/2;return s===n?l=0:u<=.5?l=o/(s+n):l=o/(2-s-n),[a,l*100,u*100]};M.rgb.hsv=function(t){let e,r,i,n,s,o=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(o,a,l),c=u-Math.min(o,a,l),f=function(p){return(u-p)/6/c+1/2};if(c===0)n=0,s=0;else{switch(s=c/u,e=f(o),r=f(a),i=f(l),u){case o:{n=i-r;break}case a:{n=1/3+e-i;break}case l:{n=2/3+r-e;break}}n<0?n+=1:n>1&&(n-=1)}return[n*360,s*100,u*100]};M.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=M.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]};M.rgb.oklab=function(t){let e=Or(t[0]/255),r=Or(t[1]/255),i=Or(t[2]/255),n=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*i),s=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*i),o=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(1-e,1-r,1-i),s=(1-e-n)/(1-n)||0,o=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function xv(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}M.rgb.keyword=function(t){let e=Kh[t];if(e)return e;let r=Number.POSITIVE_INFINITY,i;for(let n of Object.keys(Ze)){let s=Ze[n],o=xv(t,s);o<r&&(r=o,i=n)}return i};M.keyword.rgb=function(t){return Ze[t]};M.rgb.xyz=function(t){let e=Or(t[0]/255),r=Or(t[1]/255),i=Or(t[2]/255),n=e*.4124564+r*.3575761+i*.1804375,s=e*.2126729+r*.7151522+i*.072175,o=e*.0193339+r*.119192+i*.9503041;return[n*100,s*100,o*100]};M.rgb.lab=function(t){let e=M.rgb.xyz(t),r=e[0],i=e[1],n=e[2];r/=95.047,i/=100,n/=108.883,r=r>ot?r**(1/3):7.787*r+16/116,i=i>ot?i**(1/3):7.787*i+16/116,n=n>ot?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(r-i),a=200*(i-n);return[s,o,a]};M.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s;if(r===0)return s=i*255,[s,s,s];let o=i<.5?i*(1+r):i+r-i*r,a=2*i-o,l=[0,0,0];for(let u=0;u<3;u++)n=e+1/3*-(u-1),n<0&&n++,n>1&&n--,6*n<1?s=a+(o-a)*6*n:2*n<1?s=o:3*n<2?s=a+(o-a)*(2/3-n)*6:s=a,l[u]=s*255;return l};M.hsl.hsv=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r);return[e,a*100,o*100]};M.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-r),a=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};M.hsv.hsl=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,o;o=(2-r)*i;let a=(2-r)*n;return s=r*n,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};M.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s;n>1&&(r/=n,i/=n);let o=Math.floor(6*e),a=1-i;s=6*e-o,(o&1)!==0&&(s=1-s);let l=r+s*(a-r),u,c,f;switch(o){default:case 6:case 0:{u=a,c=l,f=r;break}case 1:{u=l,c=a,f=r;break}case 2:{u=r,c=a,f=l;break}case 3:{u=r,c=l,f=a;break}case 4:{u=l,c=r,f=a;break}case 5:{u=a,c=r,f=l;break}}return[u*255,c*255,f*255]};M.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s=1-Math.min(1,e*(1-n)+n),o=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};M.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,o;return n=e*3.2404542+r*-1.5371385+i*-.4985314,s=e*-.969266+r*1.8760108+i*.041556,o=e*.0556434+r*-.2040259+i*1.0572252,n=Mr(n),s=Mr(s),o=Mr(o),[n*255,s*255,o*255]};M.xyz.lab=function(t){let e=t[0],r=t[1],i=t[2];e/=95.047,r/=100,i/=108.883,e=e>ot?e**(1/3):7.787*e+16/116,r=r>ot?r**(1/3):7.787*r+16/116,i=i>ot?i**(1/3):7.787*i+16/116;let n=116*r-16,s=500*(e-r),o=200*(r-i);return[n,s,o]};M.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*i),s=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*i),o=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.oklab.oklch=function(t){return M.lab.lch(t)};M.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=(.999999998*e+.396337792*r+.215803758*i)**3,s=(1.000000008*e-.105561342*r-.063854175*i)**3,o=(1.000000055*e-.089484182*r-1.291485538*i)**3,a=1.227013851*n-.55779998*s+.281256149*o,l=-.040580178*n+1.11225687*s-.071676679*o,u=-.076381285*n-.421481978*s+1.58616322*o;return[a*100,l*100,u*100]};M.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=(e+.3963377774*r+.2158037573*i)**3,s=(e-.1055613458*r-.0638541728*i)**3,o=(e-.0894841775*r-1.291485548*i)**3,a=Mr(4.0767416621*n-3.3077115913*s+.2309699292*o),l=Mr(-1.2684380046*n+2.6097574011*s-.3413193965*o),u=Mr(-.0041960863*n-.7034186147*s+1.707614701*o);return[a*255,l*255,u*255]};M.oklch.oklab=function(t){return M.lch.lab(t)};M.lab.xyz=function(t){let e=t[0],r=t[1],i=t[2],n,s,o;s=(e+16)/116,n=r/500+s,o=s-i/200;let a=s**3,l=n**3,u=o**3;return s=a>ot?a:(s-16/116)/7.787,n=l>ot?l:(n-16/116)/7.787,o=u>ot?u:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};M.lab.lch=function(t){let e=t[0],r=t[1],i=t[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(r*r+i*i);return[e,o,n]};M.lch.lab=function(t){let e=t[0],r=t[1],n=t[2]/360*2*Math.PI,s=r*Math.cos(n),o=r*Math.sin(n);return[e,s,o]};M.rgb.ansi16=function(t,e=null){let[r,i,n]=t,s=e===null?M.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};M.hsv.ansi16=function(t){return M.rgb.ansi16(M.hsv.rgb(t),t[2])};M.rgb.ansi256=function(t){let e=t[0],r=t[1],i=t[2];return e>>4===r>>4&&r>>4===i>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};M.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};M.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return[r,i,n]};M.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};M.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let i=Number.parseInt(r,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};M.rgb.hcg=function(t){let 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),o=n-s,a,l=o<1?s/(1-o):0;return o<=0?a=0:n===e?a=(r-i)/o%6:n===r?a=2+(i-e)/o:a=4+(e-r)/o,a/=6,a%=1,[a*360,o*100,l*100]};M.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=r<.5?2*e*r:2*e*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};M.hsv.hcg=function(t){let 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]};M.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];let n=[0,0,0],s=e%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:{n[0]=1,n[1]=o,n[2]=0;break}case 1:{n[0]=a,n[1]=1,n[2]=0;break}case 2:{n[0]=0,n[1]=1,n[2]=o;break}case 3:{n[0]=0,n[1]=a,n[2]=1;break}case 4:{n[0]=o,n[1]=0,n[2]=1;break}default:n[0]=1,n[1]=0,n[2]=a}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};M.hcg.hsv=function(t){let 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]};M.hcg.hsl=function(t){let e=t[1]/100,i=t[2]/100*(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]};M.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};M.hwb.hcg=function(t){let e=t[1]/100,i=1-t[2]/100,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};M.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};M.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};M.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};M.gray.hsl=function(t){return[0,0,t[0]]};M.gray.hsv=M.gray.hsl;M.gray.hwb=function(t){return[0,100,t[0]]};M.gray.cmyk=function(t){return[0,0,0,t[0]]};M.gray.lab=function(t){return[t[0],0,0]};M.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(i.length)+i};M.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function Tv(){let t={},e=Object.keys(M);for(let{length:r}=e,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function Mv(t){let e=Tv(),r=[t];for(e[t].distance=0;r.length>0;){let i=r.pop(),n=Object.keys(M[i]);for(let{length:s}=n,o=0;o<s;o++){let a=n[o],l=e[a];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(a))}}return e}function Ov(t,e){return function(r){return e(t(r))}}function Av(t,e){let r=[e[t].parent,t],i=M[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),i=Ov(M[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}function kv(t){let e=Mv(t),r={},i=Object.keys(e);for(let{length:n}=i,s=0;s<n;s++){let o=i[s];e[o].parent!==null&&(r[o]=Av(o,e))}return r}var fe={},Dv=Object.keys(M);function Pv(t){let e=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function qv(t){let e=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=t(r);if(typeof n=="object")for(let{length:s}=n,o=0;o<s;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of Dv){fe[t]={},Object.defineProperty(fe[t],"channels",{value:M[t].channels}),Object.defineProperty(fe[t],"labels",{value:M[t].labels});let e=kv(t),r=Object.keys(e);for(let i of r){let n=e[i];fe[t][i]=qv(n),fe[t][i].raw=Pv(n)}}var Jh=["keyword","gray","hex"],Sa={};for(let t of Object.keys(fe))Sa[[...fe[t].labels].sort().join("")]=t;var Ea={};function se(t,e){if(!(this instanceof se))return new se(t,e);if(e&&e in Jh&&(e=null),e&&!(e in fe))throw new Error("Unknown model: "+e);let r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof se)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let n=oe.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=fe[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>0){this.model=e||"rgb",i=fe[this.model].channels;let n=Array.prototype.slice.call(t,0,i);this.color=Ra(n,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(t);"alpha"in t&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=n.sort().join("");if(!(s in Sa))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Sa[s];let{labels:o}=fe[this.model],a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=Ra(a)}if(Ea[this.model])for(i=fe[this.model].channels,r=0;r<i;r++){let n=Ea[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}se.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in oe.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return oe.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return oe.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=fe[this.model],{labels:r}=fe[this.model];for(let i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new se([...this.color.map(Lv(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new se([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:J("rgb",0,ne(255)),green:J("rgb",1,ne(255)),blue:J("rgb",2,ne(255)),hue:J(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:J("hsl",1,ne(100)),lightness:J("hsl",2,ne(100)),saturationv:J("hsv",1,ne(100)),value:J("hsv",2,ne(100)),chroma:J("hcg",1,ne(100)),gray:J("hcg",2,ne(100)),white:J("hwb",1,ne(100)),wblack:J("hwb",2,ne(100)),cyan:J("cmyk",0,ne(100)),magenta:J("cmyk",1,ne(100)),yellow:J("cmyk",2,ne(100)),black:J("cmyk",3,ne(100)),x:J("xyz",0,ne(95.047)),y:J("xyz",1,ne(100)),z:J("xyz",2,ne(108.833)),l:J("lab",0,ne(100)),a:J("lab",1),b:J("lab",2),keyword(t){return t!==void 0?new se(t):fe[this.model].keyword(this.color)},hex(t){return t!==void 0?new se(t):oe.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new se(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),oe.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,i]of t.entries()){let n=i/255;e[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return se.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,o=r.alpha()-i.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,l=1-a;return se.rgb(a*r.red()+l*i.red(),a*r.green()+l*i.green(),a*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let t of Object.keys(fe)){if(Jh.includes(t))continue;let{channels:e}=fe[t];se.prototype[t]=function(...r){return this.model===t?new se(this):r.length>0?new se(r,t):new se([...Nv(fe[this.model][t].raw(this.color)),this.valpha],t)},se[t]=function(...r){let i=r[0];return typeof i=="number"&&(i=Ra(r,e)),new se(i,t)}}function Cv(t,e){return Number(t.toFixed(e))}function Lv(t){return function(e){return Cv(e,t)}}function J(t,e,r){t=Array.isArray(t)?t:[t];for(let i of t)(Ea[i]||=[])[e]=r;return t=t[0],function(i){let n;return i!==void 0?(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 Nv(t){return Array.isArray(t)?t:[t]}function Ra(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function jv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fv=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},Yh=jv(Fv);function Iv(t,e){let r=t.split(e||":"),i=Yh(r[0]);if(!r.length)return i;for(let n=0,s=r.length-1;n<s;n++)i=se(i).mix(se(Yh(r[n+1]))).saturate(1).hex();return i}Zh.exports=Iv});var ed=_((DR,Xh)=>{"use strict";function ze(t,e){if(e)return new ze(t).style(e);if(!(this instanceof ze))return new ze(t);this.text=t}ze.prototype.prefix="\x1B[";ze.prototype.suffix="m";ze.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)]};ze.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,o=i/255*5;return this.ansi(n,s,o)};ze.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),o=Math.round(i);return 16+n*36+s*6+o};ze.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};ze.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Xh.exports=ze});var rd=_((PR,td)=>{var $v=Qh(),Wv=ed();td.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?Wv(i+":",$v(i)):i+":";return e[0]=n+" "+e[0],e}});var nd=_((qR,id)=>{"use strict";id.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 od=_((CR,sd)=>{var Bv=nd();sd.exports=function(e){return function(i){try{return Bv(i,e())}catch{}return!1}}});var ld=_((LR,ad)=>{var Uv=od();ad.exports=Uv(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var fd=_((NR,ud)=>{ud.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var hd=_((jR,cd)=>{var zv=va(),Hv=L("tty").isatty(1),rs=zv(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:Hv,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});rs.modify(rd());rs.use(ld());rs.set(fd());cd.exports=rs});var wi=_((FR,xa)=>{process.env.NODE_ENV==="production"?xa.exports=Gh():xa.exports=hd()});var pd=_((IR,dd)=>{"use strict";var Ta=L("fs"),{StringDecoder:Gv}=L("string_decoder"),{Stream:Yv}=Kt();function Vv(){}dd.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new Gv("utf8"),n=new Yv,s="",o=0,a=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},Ta.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){Ta.close(u,Vv);return}return Ta.read(u,r,0,r.length,o,(f,p)=>{if(f){e?e(f):n.emit("error",f),n.destroy();return}if(!p)return s&&((t.start==null||a>t.start)&&(e?e(null,s):n.emit("line",s)),a++,s=""),setTimeout(c,1e3);let m=i.write(r.slice(0,p));e||n.emit("data",m),m=(s+m).split(/\n+/);let d=m.length-1,b=0;for(;b<d;b++)(t.start==null||a>t.start)&&(e?e(null,m[b]):n.emit("line",m[b])),a++;return s=m[d],o+=p,c()})})()}),e?n.destroy:n}});var bd=_((WR,yd)=>{"use strict";var xe=L("fs"),ce=L("path"),gd=Gc(),Kv=L("zlib"),{MESSAGE:Jv}=ee(),{Stream:Zv,PassThrough:md}=Kt(),Qv=wr(),He=wi()("winston:file"),Xv=L("os"),e1=pd();yd.exports=class extends Qv{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 md,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?ce.basename(e.filename):"winston.log",this.dirname=e.dirname||ce.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=ce.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:Xv.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[Jv]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,He("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 o=this._stream.write(i,s.bind(this));return o?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),He("written",o,this._drain),this.finishIfEnding(),o}query(e,r){typeof e=="function"&&(r=e,e={}),e=f(e);let i=ce.join(this.dirname,this.filename),n="",s=[],o=0,a=xe.createReadStream(i,{encoding:"utf8"});a.on("error",p=>{if(a.readable&&a.destroy(),!!r)return p.code!=="ENOENT"?r(p):r(null,s)}),a.on("data",p=>{p=(n+p).split(/\n+/);let m=p.length-1,d=0;for(;d<m;d++)(!e.start||o>=e.start)&&l(p[d]),o++;n=p[m]}),a.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(p,m){try{let d=JSON.parse(p);c(d)&&u(d)}catch(d){m||a.emit("error",d)}}function u(p){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(p=e.fields.reduce((m,d)=>(m[d]=p[d],m),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(p)}function c(p){if(!p||typeof p!="object")return;let m=new Date(p.timestamp);if(!(e.from&&m<e.from||e.until&&m>e.until||e.level&&e.level!==p.level))return!0}function f(p){return p=p||{},p.rows=p.rows||p.limit||10,p.start=p.start||0,p.until=p.until||new Date,typeof p.until!="object"&&(p.until=new Date(p.until)),p.from=p.from||p.until-1440*60*1e3,typeof p.from!="object"&&(p.from=new Date(p.from)),p.order=p.order||"desc",p}}stream(e={}){let r=ce.join(this.dirname,this.filename),i=new Zv,n={file:r,start:e.start};return i.destroy=e1(n,(s,o)=>{if(s)return i.emit("error",s);try{i.emit("data",o),o=JSON.parse(o),i.emit("log",o)}catch(a){i.emit("error",a)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);He("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=ce.join(this.dirname,r);xe.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return He("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return He(`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=ce.join(this.dirname,this.filename);He("create stream start",r,this.options);let i=xe.createWriteStream(r,this.options).on("error",n=>He(n)).on("close",()=>He("close",i.path,i.bytesWritten)).on("open",()=>{He("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new md,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return He("create stream ok",r),i}_incFile(e){He("_incFile",this.filename);let r=ce.extname(this._basename),i=ce.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let o=this._created>0&&!this.tailable?this._created:"";this._compressFile(ce.join(this.dirname,`${i}${o}${r}`),ce.join(this.dirname,`${i}${o}${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)),gd(n,e)}_getFile(){let e=ce.extname(this._basename),r=ce.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:"",o=this.zippedArchive?".gz":"",a=`${r}${s}${e}${o}`,l=ce.join(this.dirname,a);xe.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let o=this.maxFiles-1;o>1;o--)n.push(function(a,l){let u=`${r}${a-1}${e}${s}`,c=ce.join(this.dirname,u);xe.exists(c,f=>{if(!f)return l(null);u=`${r}${a}${e}${s}`,xe.rename(c,ce.join(this.dirname,u),l)})}.bind(this,o));gd(n,()=>{xe.rename(ce.join(this.dirname,`${r}${e}${s}`),ce.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){xe.access(e,xe.F_OK,n=>{if(n)return i();var s=Kv.createGzip(),o=xe.createReadStream(e),a=xe.createWriteStream(r);a.on("finish",()=>{xe.unlink(e,i)}),o.pipe(s).pipe(a)})}_createLogDirIfNotExist(e){xe.existsSync(e)||xe.mkdirSync(e,{recursive:!0})}}});var _d=_((UR,wd)=>{"use strict";var t1=L("http"),r1=L("https"),{Stream:i1}=Kt(),n1=wr(),{configure:s1}=Jr();wd.exports=class extends n1{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,o,a)=>{if(o&&o.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${o.statusCode}`)),s)return r(s);if(typeof a=="string")try{a=JSON.parse(a)}catch(l){return r(l)}r(null,a)})}stream(e={}){let r=new i1;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="",o=this._request(e,n,i);return r.destroy=()=>o.destroy(),o.on("data",a=>{a=(s+a).split(/\n+/);let l=a.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(a[u]))}catch(c){r.emit("error",c)}s=a[l]}),o.on("error",a=>r.emit("error",a)),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 o=(this.ssl?r1:t1).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});o.on("error",r),o.on("response",l=>l.on("end",()=>r(null,l)).resume());let a=s1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var Ma=_((zR,vd)=>{"use strict";var Qe=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Qe.writable=t=>Qe(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Qe.readable=t=>Qe(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Qe.duplex=t=>Qe.writable(t)&&Qe.readable(t);Qe.transform=t=>Qe.duplex(t)&&typeof t._transform=="function";vd.exports=Qe});var Ed=_((GR,Sd)=>{"use strict";var o1=Ma(),{MESSAGE:a1}=ee(),l1=L("os"),u1=wr();Sd.exports=class extends u1{constructor(e={}){if(super(e),!e.stream||!o1(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:l1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[a1]}${this.eol}`),r&&r()}}});var Rd=_(_i=>{"use strict";Object.defineProperty(_i,"Console",{configurable:!0,enumerable:!0,get(){return fc()}});Object.defineProperty(_i,"File",{configurable:!0,enumerable:!0,get(){return bd()}});Object.defineProperty(_i,"Http",{configurable:!0,enumerable:!0,get(){return _d()}});Object.defineProperty(_i,"Stream",{configurable:!0,enumerable:!0,get(){return Ed()}})});var ns=_(vi=>{"use strict";var is=ao(),{configs:Oa}=ee();vi.cli=is.levels(Oa.cli);vi.npm=is.levels(Oa.npm);vi.syslog=is.levels(Oa.syslog);vi.addColors=is.levels});var Td=_((ss,xd)=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});var f1=xn(),c1=Jt(f1),h1=Ln(),d1=Jt(h1),p1=Ho(),g1=Jt(p1),m1=Bo(),y1=Jt(m1),b1=Uo(),w1=Jt(b1),_1=zt(),v1=Jt(_1),S1=vr(),E1=Jt(S1);function Jt(t){return t&&t.__esModule?t:{default:t}}function R1(t,e,r){r=(0,y1.default)(r);var i=0,n=0,{length:s}=t,o=!1;s===0&&r(null);function a(l,u){l===!1&&(o=!0),o!==!0&&(l?r(l):(++n===s||u===d1.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,w1.default)(a))}function x1(t,e,r){return(0,g1.default)(t,1/0,e,r)}function T1(t,e,r){var i=(0,c1.default)(t)?R1:x1;return i(t,(0,v1.default)(e),r)}ss.default=(0,E1.default)(T1,3);xd.exports=ss.default});var Od=_((os,Md)=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.default=M1;function M1(t){return(e,r,i)=>t(e,i)}Md.exports=os.default});var us=_((ls,Ad)=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var O1=Td(),A1=as(O1),k1=Od(),D1=as(k1),P1=zt(),q1=as(P1),C1=vr(),L1=as(C1);function as(t){return t&&t.__esModule?t:{default:t}}function N1(t,e,r){return(0,A1.default)(t,(0,D1.default)((0,q1.default)(e)),r)}ls.default=(0,L1.default)(N1,3);Ad.exports=ls.default});var Dd=_((KR,kd)=>{"use strict";var j1=Object.prototype.toString;kd.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=j1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var Aa=_((JR,Pd)=>{"use strict";var F1=Dd();Pd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=F1(e),n}});var ka=_(Ei=>{Ei.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o},Error.captureStackTrace(r,t||Ei.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};Ei.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
32
+ `).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,o=null,a=null,l=null,u=null,c=n[5]==="native";if(n[1]){a=n[1];var f=a.lastIndexOf(".");if(a[f-1]=="."&&f--,f>0){s=a.substr(0,f),o=a.substr(f+1);var p=s.indexOf(".Module");p>0&&(a=a.substr(p+1),s=s.substr(0,p))}l=null}o&&(l=s,u=o),o==="<anonymous>"&&(u=null,a=null);var m={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:a,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:c};return e._createParsedCallSite(m)}}).filter(function(i){return!!i})};function Si(t){for(var e in t)this[e]=t[e]}var I1=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],$1=["topLevel","eval","native","constructor"];I1.forEach(function(t){Si.prototype[t]=null,Si.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});$1.forEach(function(t){Si.prototype[t]=!1,Si.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});Ei._createParsedCallSite=function(t){return new Si(t)}});var Cd=_((XR,qd)=>{"use strict";var{Writable:W1}=Kt();qd.exports=class extends W1{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 Pa=_((tx,jd)=>{"use strict";var Ld=L("os"),B1=us(),Da=wi()("winston:exception"),U1=Aa(),Nd=ka(),z1=Cd();jd.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(`
33
+ `),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:Ld.loadavg(),uptime:Ld.uptime()}}getTrace(e){return(e?Nd.parse(e):Nd.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 z1(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 o(){Da("doExit",n),Da("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);B1(i,(a,l)=>{let u=U1(l),c=a.transport||a;function f(p){return()=>{Da(p),u()}}c._ending=!0,c.once("finish",f("finished")),c.once("error",f("error"))},()=>n&&o()),this.logger.log(r),n&&(s=setTimeout(o,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var Id=_((ix,Fd)=>{"use strict";var{Writable:H1}=Kt();Fd.exports=class extends H1{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 Ca=_((sx,Bd)=>{"use strict";var $d=L("os"),G1=us(),qa=wi()("winston:rejection"),Y1=Aa(),Wd=ka(),V1=Id();Bd.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(`
34
+ `),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:$d.loadavg(),uptime:$d.uptime()}}getTrace(e){return(e?Wd.parse(e):Wd.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 V1(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 o(){qa("doExit",n),qa("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);G1(i,(a,l)=>{let u=Y1(l),c=a.transport||a;function f(p){return()=>{qa(p),u()}}c._ending=!0,c.once("finish",f("finished")),c.once("error",f("error"))},()=>n&&o()),this.logger.log(r),n&&(s=setTimeout(o,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var zd=_((ox,Ud)=>{"use strict";var La=class{constructor(e){let r=fs();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)}};Ud.exports=La});var fs=_((ax,Vd)=>{"use strict";var{Stream:K1,Transform:J1}=Kt(),Hd=us(),{LEVEL:Xe,SPLAT:Gd}=ee(),Yd=Ma(),Z1=Pa(),Q1=Ca(),X1=Io(),eS=zd(),{warn:tS}=lo(),rS=ns(),iS=/%[scdjifoO%]/g,cs=class extends J1{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:o=!0,transports:a,colors:l,emitErrs:u,formatters:c,padLevels:f,rewriters:p,stripColors:m,exceptionHandlers:d,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||ro()(),this.defaultMeta=i||null,this.levels=n||this.levels||rS.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new Z1(this),this.rejections=new Q1(this),this.profilers={},this.exitOnError=o,a&&(a=Array.isArray(a)?a:[a],a.forEach(v=>this.add(v))),l||u||c||f||p||m)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(`
35
+ `));d&&this.exceptions.handle(d),b&&this.rejections.handle(b)}getHighestLogLevel(){let e=Ri(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,i)=>{let n=Ri(this.levels,i.level);return n!==null&&n>r?n:r},e)}isLevelEnabled(e){let r=Ri(this.levels,e);if(r===null)return!1;let i=Ri(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let o=Ri(this.levels,s.level);return o===null&&(o=i),o>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Xe]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Xe]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Xe]: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(iS))){let o=Object.assign({},this.defaultMeta,n,{[Xe]:e,[Gd]:i,level:e,message:r});return n.message&&(o.message=`${o.message} ${n.message}`),n.stack&&(o.stack=n.stack),n.cause&&(o.cause=n.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[Xe]:e,[Gd]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[Xe]||(e[Xe]=e.level),!this.levels[e[Xe]]&&this.levels[e[Xe]]!==0&&console.error("[winston] Unknown logger level: %s",e[Xe]),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();Hd(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!Yd(e)||e.log.length>2?new X1({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(!Yd(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(){tS.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let i={},n=Object.assign({},e.query||{});function s(a,l){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(n)),a.query(e,(u,c)=>{if(u)return l(u);typeof a.formatResults=="function"&&(c=a.formatResults(c,e.format)),l(null,c)})}function o(a,l){s(a,(u,c)=>{l&&(c=u||c,c&&(i[a.name]=c),l()),l=null})}Hd(this.transports.filter(a=>!!a.query),o,()=>r(null,i))}stream(e={}){let r=new K1,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",o=>{o.transport=o.transport||[],o.transport.push(n.name),r.emit("log",o)}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(n.name),r.emit("error",o)}))}),r}startTimer(){return new eS(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(`
36
+ `))}_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 Ri(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(cs.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Vd.exports=cs});var Na=_((lx,Kd)=>{"use strict";var{LEVEL:nS}=ee(),sS=ns(),oS=fs(),aS=wi()("winston:create-logger");function lS(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Kd.exports=function(t={}){t.levels=t.levels||sS.npm.levels;class e extends oS{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(aS('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[o]=n,a=o&&o.message&&o||{message:o};return a.level=a[nS]=i,s._addDefaultMeta(a),s.write(a),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[lS(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Zd=_((fx,Jd)=>{"use strict";var uS=Na();Jd.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=uS(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 Xd=_(H=>{"use strict";var Qd=ao(),{warn:xi}=lo();H.version=af().version;H.transports=Rd();H.config=ns();H.addColors=Qd.levels;H.format=Qd.format;H.createLogger=Na();H.Logger=fs();H.ExceptionHandler=Pa();H.RejectionHandler=Ca();H.Container=Zd();H.Transport=wr();H.loggers=new H.Container;var et=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)=>et[t](...e));Object.defineProperty(H,"level",{get(){return et.level},set(t){et.level=t}});Object.defineProperty(H,"exceptions",{get(){return et.exceptions}});Object.defineProperty(H,"rejections",{get(){return et.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return et[t]},set(e){et[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:et.exceptionHandlers,rejectionHandlers:et.rejectionHandlers,transports:et.transports}}});xi.deprecated(H,"setLevels");xi.forFunctions(H,"useFormat",["cli"]);xi.forProperties(H,"useFormat",["padLevels","stripColors"]);xi.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);xi.forProperties(H,"deprecated",["emitErrs","levelLength"])});import pS from"yargs";import{hideBin as gS}from"yargs/helpers";import Mt from"node:path";import ja from"node:fs/promises";import{fileURLToPath as mS}from"node:url";import rp from"fs-extra";import Be from"node:path";import ur from"node:fs/promises";import{createHash as nm}from"node:crypto";import sm from"fs-extra";import{loadPyodide as Pl,version as om}from"pyodide";var ps=(t,e,r)=>{let i=t instanceof RegExp?Ia(t,r):t,n=e instanceof RegExp?Ia(e,r):e,s=i!==null&&n!=null&&gp(i,n,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+i.length,s[1]),post:r.slice(s[1]+n.length)}},Ia=(t,e)=>{let r=e.match(t);return r?r[0]:null},gp=(t,e,r)=>{let i,n,s,o,a,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&&!a;){if(c===l)i.push(c),l=r.indexOf(t,c+1);else if(i.length===1){let f=i.pop();f!==void 0&&(a=[f,u])}else n=i.pop(),n!==void 0&&n<s&&(s=n,o=u),u=r.indexOf(e,c+1);c=l<u&&l>=0?l:u}i.length&&o!==void 0&&(a=[s,o])}return a};var $a="\0SLASH"+Math.random()+"\0",Wa="\0OPEN"+Math.random()+"\0",ms="\0CLOSE"+Math.random()+"\0",Ba="\0COMMA"+Math.random()+"\0",Ua="\0PERIOD"+Math.random()+"\0",mp=new RegExp($a,"g"),yp=new RegExp(Wa,"g"),bp=new RegExp(ms,"g"),wp=new RegExp(Ba,"g"),_p=new RegExp(Ua,"g"),vp=/\\\\/g,Sp=/\\{/g,Ep=/\\}/g,Rp=/\\,/g,xp=/\\./g;function gs(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function Tp(t){return t.replace(vp,$a).replace(Sp,Wa).replace(Ep,ms).replace(Rp,Ba).replace(xp,Ua)}function Mp(t){return t.replace(mp,"\\").replace(yp,"{").replace(bp,"}").replace(wp,",").replace(_p,".")}function za(t){if(!t)return[""];let e=[],r=ps("{","}",t);if(!r)return t.split(",");let{pre:i,body:n,post:s}=r,o=i.split(",");o[o.length-1]+="{"+n+"}";let a=za(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function Ha(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),Dr(Tp(t),!0).map(Mp)):[]}function Op(t){return"{"+t+"}"}function Ap(t){return/^-?0\d/.test(t)}function kp(t,e){return t<=e}function Dp(t,e){return t>=e}function Dr(t,e){let r=[],i=ps("{","}",t);if(!i)return[t];let n=i.pre,s=i.post.length?Dr(i.post,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o<s.length;o++){let a=n+"{"+i.body+"}"+s[o];r.push(a)}else{let o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=o||a,u=i.body.indexOf(",")>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+ms+i.post,Dr(t)):[t];let c;if(l)c=i.body.split(/\.\./);else if(c=za(i.body),c.length===1&&c[0]!==void 0&&(c=Dr(c[0],!1).map(Op),c.length===1))return s.map(p=>i.pre+c[0]+p);let f;if(l&&c[0]!==void 0&&c[1]!==void 0){let p=gs(c[0]),m=gs(c[1]),d=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(gs(c[2])):1,v=kp;m<p&&(b*=-1,v=Dp);let T=c.some(Ap);f=[];for(let R=p;v(R,m);R+=b){let x;if(a)x=String.fromCharCode(R),x==="\\"&&(x="");else if(x=String(R),T){let k=d-x.length;if(k>0){let I=new Array(k+1).join("0");R<0?x="-"+I+x.slice(1):x=I+x}}f.push(x)}}else{f=[];for(let p=0;p<c.length;p++)f.push.apply(f,Dr(c[p],!1))}for(let p=0;p<f.length;p++)for(let m=0;m<s.length;m++){let d=n+f[p]+s[m];(!e||l||d)&&r.push(d)}}return r}var Pr=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Pp={"[: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]},qr=t=>t.replace(/[[\]\\-]/g,"\\$&"),qp=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ga=t=>t.join(""),Ya=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,o=!1,a=!1,l=!1,u=!1,c=r,f="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&o&&!l){c=s+1;break}if(o=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[v,[S,T,R]]of Object.entries(Pp))if(t.startsWith(v,s)){if(f)return["$.",!1,t.length-r,!0];s+=v.length,R?n.push(S):i.push(S),a=a||T;continue e}}if(l=!1,f){b>f?i.push(qr(f)+"-"+qr(b)):b===f&&i.push(qr(b)),f="",s++;continue}if(t.startsWith("-]",s+1)){i.push(qr(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){f=b,s+=2;continue}i.push(qr(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[qp(b),!1,c-r,!1]}let p="["+(u?"^":"")+Ga(i)+"]",m="["+(u?"":"^")+Ga(n)+"]";return[i.length&&n.length?"("+p+"|"+m+")":i.length?p:m,a,c-r,!0]};var Fe=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var Cp=new Set(["!","?","+","*","@"]),Va=t=>Cp.has(t),Lp="(?!(?:^|/)\\.\\.?(?:$|/))",Pi="(?!\\.)",Np=new Set(["[","."]),jp=new Set(["..","."]),Fp=new Set("().*{}+?[]^$\\!"),Ip=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ys="[^/]",Ka=ys+"*?",Ja=ys+"+?",er=class t{type;#e;#t;#s=!1;#n=[];#o;#_;#b;#f=!1;#a;#h;#c=!1;constructor(e,r,i={}){this.type=e,e&&(this.#t=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#b=this.#e===this?[]:this.#e.#b,e==="!"&&!this.#e.#f&&this.#b.push(this),this.#_=this.#o?this.#o.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#n)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#n.map(e=>String(e)).join("|")+")":this.#h=this.#n.map(e=>String(e)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#b.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#_+1;!i.type&&n<i.#n.length;n++)for(let s of e.#n){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#n[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.#n.push(r)}}toJSON(){let e=this.type===null?this.#n.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#_===0)return!0;let e=this.#o;for(let r=0;r<this.#_;r++){let i=e.#n[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.#n.length:0;return this.#_===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.#n)r.copyIn(i);return r}static#r(e,r,i,n){let s=!1,o=!1,a=-1,l=!1;if(r.type===null){let m=i,d="";for(;m<e.length;){let b=e.charAt(m++);if(s||b==="\\"){s=!s,d+=b;continue}if(o){m===a+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(m===a+2&&l)&&(o=!1),d+=b;continue}else if(b==="["){o=!0,a=m,l=!1,d+=b;continue}if(!n.noext&&Va(b)&&e.charAt(m)==="("){r.push(d),d="";let v=new t(b,r);m=t.#r(e,v,m,n),r.push(v);continue}d+=b}return r.push(d),m}let u=i+1,c=new t(null,r),f=[],p="";for(;u<e.length;){let m=e.charAt(u++);if(s||m==="\\"){s=!s,p+=m;continue}if(o){u===a+1?(m==="^"||m==="!")&&(l=!0):m==="]"&&!(u===a+2&&l)&&(o=!1),p+=m;continue}else if(m==="["){o=!0,a=u,l=!1,p+=m;continue}if(Va(m)&&e.charAt(u)==="("){c.push(p),p="";let d=new t(m,c);c.push(d),u=t.#r(e,d,u,n);continue}if(m==="|"){c.push(p),p="",f.push(c),c=new t(null,r);continue}if(m===")")return p===""&&r.#n.length===0&&(r.#c=!0),c.push(p),p="",r.push(...f,c),u;p+=m}return r.type=null,r.#t=void 0,r.#n=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#r(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.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,a),{_src:r,_glob:e})}get options(){return this.#a}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#l(),!this.type){let l=this.isStart()&&this.isEnd()&&!this.#n.some(m=>typeof m!="string"),u=this.#n.map(m=>{let[d,b,v,S]=typeof m=="string"?t.#v(m,this.#t,l):m.toRegExpSource(e);return this.#t=this.#t||v,this.#s=this.#s||S,d}).join(""),c="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&jp.has(this.#n[0]))){let d=Np,b=r&&d.has(u.charAt(0))||u.startsWith("\\.")&&d.has(u.charAt(2))||u.startsWith("\\.\\.")&&d.has(u.charAt(4)),v=!r&&!e&&d.has(u.charAt(0));c=b?Lp:v?Pi:""}let f="";return this.isEnd()&&this.#e.#f&&this.#o?.type==="!"&&(f="(?:$|\\/)"),[c+u+f,Fe(u),this.#t=!!this.#t,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#p(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#n=[l],this.type=null,this.#t=void 0,[l,Fe(this.toString()),!1,!1]}let o=!i||e||r||!Pi?"":this.#p(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#c)a=(this.isStart()&&!r?Pi:"")+Ja;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Pi:"")+Ka+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=n+s+l}return[a,Fe(s),this.#t=!!this.#t,this.#s]}#p(e){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,o]=r.toRegExpSource(e);return this.#s=this.#s||o,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",o=!1;for(let a=0;a<e.length;a++){let l=e.charAt(a);if(n){n=!1,s+=(Fp.has(l)?"\\":"")+l;continue}if(l==="\\"){a===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,f,p]=Ya(e,a);if(f){s+=u,o=o||c,a+=f-1,r=r||p;continue}}if(l==="*"){s+=i&&e==="*"?Ja:Ka,r=!0;continue}if(l==="?"){s+=ys,r=!0;continue}s+=Ip(l)}return[s,Fe(e),!!r,o]}};var tr=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var ve=(t,e,r={})=>(Pr(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Me(e,r).match(t)),$p=/^\*+([^+@!?\*\[\(]*)$/,Wp=t=>e=>!e.startsWith(".")&&e.endsWith(t),Bp=t=>e=>e.endsWith(t),Up=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),zp=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Hp=/^\*+\.\*+$/,Gp=t=>!t.startsWith(".")&&t.includes("."),Yp=t=>t!=="."&&t!==".."&&t.includes("."),Vp=/^\.\*+$/,Kp=t=>t!=="."&&t!==".."&&t.startsWith("."),Jp=/^\*+$/,Zp=t=>t.length!==0&&!t.startsWith("."),Qp=t=>t.length!==0&&t!=="."&&t!=="..",Xp=/^\?+([^+@!?\*\[\(]*)?$/,eg=([t,e=""])=>{let r=Xa([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},tg=([t,e=""])=>{let r=el([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},rg=([t,e=""])=>{let r=el([t]);return e?i=>r(i)&&i.endsWith(e):r},ig=([t,e=""])=>{let r=Xa([t]);return e?i=>r(i)&&i.endsWith(e):r},Xa=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},el=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},tl=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Za={win32:{sep:"\\"},posix:{sep:"/"}},ng=tl==="win32"?Za.win32.sep:Za.posix.sep;ve.sep=ng;var he=Symbol("globstar **");ve.GLOBSTAR=he;var sg="[^/]",og=sg+"*?",ag="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",lg="(?:(?!(?:\\/|^)\\.).)*?",ug=(t,e={})=>r=>ve(r,t,e);ve.filter=ug;var De=(t,e={})=>Object.assign({},t,e),fg=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return ve;let e=ve;return Object.assign((i,n,s={})=>e(i,n,De(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,De(t,s))}static defaults(n){return e.defaults(De(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,o={}){super(n,s,De(t,o))}static fromGlob(n,s={}){return e.AST.fromGlob(n,De(t,s))}},unescape:(i,n={})=>e.unescape(i,De(t,n)),escape:(i,n={})=>e.escape(i,De(t,n)),filter:(i,n={})=>e.filter(i,De(t,n)),defaults:i=>e.defaults(De(t,i)),makeRe:(i,n={})=>e.makeRe(i,De(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,De(t,n)),match:(i,n,s={})=>e.match(i,n,De(t,s)),sep:e.sep,GLOBSTAR:he})};ve.defaults=fg;var rl=(t,e={})=>(Pr(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Ha(t));ve.braceExpand=rl;var cg=(t,e={})=>new Me(t,e).makeRe();ve.makeRe=cg;var hg=(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};ve.match=hg;var Qa=/[?*]|[+@!]\(.*?\)|\[|\]/,dg=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={}){Pr(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||tl,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,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Qa.test(s[2]))&&!Qa.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 o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[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 o=n;for(;i[o+1]==="**";)o++;o>n&&i.splice(n+1,o-n);let a=i[n+1],l=i[n+2],u=i[n+3];if(a!==".."||!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 o=1;o<i.length-1;o++){let a=i[o];o===1&&a===""&&i[0]===""||(a==="."||a==="")&&(r=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let o=i[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){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,o=[],a="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])o.push(a==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])o.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])o.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(a==="a")return!1;a="b",o.push(r[s]),n++,s++}else return!1;return e.length===r.length&&o}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]),v=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),S=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),T=!S&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),R=v?3:b?0:void 0,x=T?3:S?0:void 0;if(typeof R=="number"&&typeof x=="number"){let[k,I]=[e[R],r[x]];k.toLowerCase()===I.toLowerCase()&&(r[x]=k,x>R?r=r.slice(x):R>x&&(e=e.slice(R)))}}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 o=0,a=0,l=e.length,u=r.length;o<l&&a<u;o++,a++){this.debug("matchOne loop");var c=r[a],f=e[o];if(this.debug(r,c,f),c===!1)return!1;if(c===he){this.debug("GLOBSTAR",[r,c,f]);var p=o,m=a+1;if(m===u){for(this.debug("** at the end");o<l;o++)if(e[o]==="."||e[o]===".."||!n.dot&&e[o].charAt(0)===".")return!1;return!0}for(;p<l;){var d=e[p];if(this.debug(`
37
+ globstar while`,e,p,r,m,d),this.matchOne(e.slice(p),r.slice(m),i))return this.debug("globstar found match!",p,l,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",e,p,r,m);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(i&&(this.debug(`
38
+ >>> no match, partial?`,e,p,r,m),p===l))}let b;if(typeof c=="string"?(b=f===c,this.debug("string match",c,f,b)):(b=c.test(f),this.debug("pattern match",c,f,b)),!b)return!1}if(o===l&&a===u)return!0;if(o===l)return i;if(a===u)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return rl(this.pattern,this.options)}parse(e){Pr(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(Jp))?n=r.dot?Qp:Zp:(i=e.match($p))?n=(r.nocase?r.dot?zp:Up:r.dot?Bp:Wp)(i[1]):(i=e.match(Xp))?n=(r.nocase?r.dot?tg:eg:r.dot?rg:ig)(i):(i=e.match(Hp))?n=r.dot?Yp:Gp:(i=e.match(Vp))&&(n=Kp);let s=er.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?og:r.dot?ag:lg,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))n.add(p);return typeof f=="string"?dg(f):f===he?he:f._src});u.forEach((f,p)=>{let m=u[p+1],d=u[p-1];f!==he||d===he||(d===void 0?m!==void 0&&m!==he?u[p+1]="(?:\\/|"+i+"\\/)?"+m:u[p]=i:m===void 0?u[p-1]=d+"(?:\\/|\\/"+i+")?":m!==he&&(u[p-1]=d+"(?:\\/|\\/"+i+"\\/)"+m,u[p+1]=he))});let c=u.filter(f=>f!==he);if(this.partial&&c.length>=1){let f=[];for(let p=1;p<=c.length;p++)f.push(c.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return c.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),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 o=n[n.length-1];if(!o)for(let a=n.length-2;!o&&a>=0;a--)o=n[a];for(let a=0;a<s.length;a++){let l=s[a],u=n;if(i.matchBase&&l.length===1&&(u=[o]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return ve.defaults(e).Minimatch}};ve.AST=er;ve.Minimatch=Me;ve.escape=tr;ve.unescape=Fe;import{fileURLToPath as Gg}from"node:url";var pg=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,nl=new Set,bs=typeof process=="object"&&process?process:{},sl=(t,e,r,i)=>{typeof bs.emitWarning=="function"?bs.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},qi=globalThis.AbortController,il=globalThis.AbortSignal;if(typeof qi>"u"){il=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},qi=class{constructor(){e()}signal=new il;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=bs.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,sl("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 gg=t=>!nl.has(t);var ct=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),ol=t=>ct(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?rr:null:null,rr=class extends Array{constructor(e){super(e),this.fill(0)}},ws=class t{heap;length;static#e=!1;static create(e){let r=ol(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]}},qt=class t{#e;#t;#s;#n;#o;#_;#b;#f;get perf(){return this.#f}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#h;#c;#l;#r;#p;#v;#w;#g;#O;#m;#E;#T;#y;#S;#M;#d;#i;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#y,sizes:e.#E,keyMap:e.#c,keyList:e.#l,valList:e.#r,next:e.#p,prev:e.#v,get head(){return e.#w},get tail(){return e.#g},free:e.#O,isBackgroundFetch:r=>e.#u(r),backgroundFetch:(r,i,n,s)=>e.#U(r,i,n,s),moveToTail:r=>e.#j(r),indexes:r=>e.#k(r),rindexes:r=>e.#P(r),isStale:r=>e.#x(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#a}get fetchMethod(){return this.#_}get memoMethod(){return this.#b}get dispose(){return this.#s}get onInsert(){return this.#n}get disposeAfter(){return this.#o}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:u,onInsert:c,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:d=0,maxEntrySize:b=0,sizeCalculation:v,fetchMethod:S,memoMethod:T,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:I,ignoreFetchAbort:C,perf:U}=e;if(U!==void 0&&typeof U?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#f=U??pg,r!==0&&!ct(r))throw new TypeError("max option must be a nonnegative integer");let q=r?ol(r):Array;if(!q)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=d,this.maxEntrySize=b||this.#t,this.sizeCalculation=v,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(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#b=T,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#_=S,this.#M=!!S,this.#c=new Map,this.#l=new Array(r).fill(void 0),this.#r=new Array(r).fill(void 0),this.#p=new q(r),this.#v=new q(r),this.#w=0,this.#g=0,this.#O=ws.create(r),this.#a=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof c=="function"&&(this.#n=c),typeof f=="function"?(this.#o=f,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#S=!!this.#s,this.#i=!!this.#n,this.#d=!!this.#o,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#t!==0&&!ct(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!ct(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#F()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=ct(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!ct(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#q()}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 G="LRU_CACHE_UNBOUNDED";gg(G)&&(nl.add(G),sl("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",G,t))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#q(){let e=new rr(this.#e),r=new rr(this.#e);this.#y=e,this.#T=r,this.#W=(s,o,a=this.#f.now())=>{if(r[s]=o!==0?a:0,e[s]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#x(s)&&this.#D(this.#l[s],"expire")},o+1);l.unref&&l.unref()}},this.#A=s=>{r[s]=e[s]!==0?this.#f.now():0},this.#R=(s,o)=>{if(e[o]){let a=e[o],l=r[o];if(!a||!l)return;s.ttl=a,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=a-u}};let i=0,n=()=>{let s=this.#f.now();if(this.ttlResolution>0){i=s;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{let o=this.#c.get(s);if(o===void 0)return 0;let a=e[o],l=r[o];if(!a||!l)return 1/0;let u=(i||n())-l;return a-u},this.#x=s=>{let o=r[s],a=e[s];return!!a&&!!o&&(i||n())-o>a}}#A=()=>{};#R=()=>{};#W=()=>{};#x=()=>!1;#F(){let e=new rr(this.#e);this.#h=0,this.#E=e,this.#C=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#u(i))return 0;if(!ct(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!ct(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.#I=(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=>{};#I=(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};*#k({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#g;!(!this.#B(r)||((e||!this.#x(r))&&(yield r),r===this.#w));)r=this.#v[r]}*#P({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#w;!(!this.#B(r)||((e||!this.#x(r))&&(yield r),r===this.#g));)r=this.#p[r]}#B(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#k())this.#r[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#l[e],this.#r[e]])}*rentries(){for(let e of this.#P())this.#r[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#l[e],this.#r[e]])}*keys(){for(let e of this.#k()){let r=this.#l[e];r!==void 0&&!this.#u(this.#r[e])&&(yield r)}}*rkeys(){for(let e of this.#P()){let r=this.#l[e];r!==void 0&&!this.#u(this.#r[e])&&(yield r)}}*values(){for(let e of this.#k())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#P())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#k()){let n=this.#r[i],s=this.#u(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.#k()){let n=this.#r[i],s=this.#u(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}rforEach(e,r=this){for(let i of this.#P()){let n=this.#r[i],s=this.#u(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}purgeStale(){let e=!1;for(let r of this.#P({allowStale:!0}))this.#x(r)&&(this.#D(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#c.get(e);if(r===void 0)return;let i=this.#r[r],n=this.#u(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#y&&this.#T){let o=this.#y[r],a=this.#T[r];if(o&&a){let l=o-(this.#f.now()-a);s.ttl=l,s.start=Date.now()}}return this.#E&&(s.size=this.#E[r]),s}dump(){let e=[];for(let r of this.#k({allowStale:!0})){let i=this.#l[r],n=this.#r[r],s=this.#u(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let o={value:s};if(this.#y&&this.#T){o.ttl=this.#y[r];let a=this.#f.now()-this.#T[r];o.start=Math.floor(Date.now()-a)}this.#E&&(o.size=this.#E[r]),e.unshift([i,o])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=this.#f.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:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,c=this.#L(e,r,i.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#D(e,"set"),this;let f=this.#a===0?void 0:this.#c.get(e);if(f===void 0)f=this.#a===0?this.#g:this.#O.length!==0?this.#O.pop():this.#a===this.#e?this.#N(!1):this.#a,this.#l[f]=e,this.#r[f]=r,this.#c.set(e,f),this.#p[this.#g]=f,this.#v[f]=this.#g,this.#g=f,this.#a++,this.#I(f,c,l),l&&(l.set="add"),u=!1,this.#i&&this.#n?.(r,e,"add");else{this.#j(f);let p=this.#r[f];if(r!==p){if(this.#M&&this.#u(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=p;m!==void 0&&!o&&(this.#S&&this.#s?.(m,e,"set"),this.#d&&this.#m?.push([m,e,"set"]))}else o||(this.#S&&this.#s?.(p,e,"set"),this.#d&&this.#m?.push([p,e,"set"]));if(this.#C(f),this.#I(f,c,l),this.#r[f]=r,l){l.set="replace";let m=p&&this.#u(p)?p.__staleWhileFetching:p;m!==void 0&&(l.oldValue=m)}}else l&&(l.set="update");this.#i&&this.onInsert?.(r,e,r===p?"update":"replace")}if(n!==0&&!this.#y&&this.#q(),this.#y&&(u||this.#W(f,n,s),l&&this.#R(l,f)),!o&&this.#d&&this.#m){let p=this.#m,m;for(;m=p?.shift();)this.#o?.(...m)}return this}pop(){try{for(;this.#a;){let e=this.#r[this.#w];if(this.#N(!0),this.#u(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#d&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#o?.(...r)}}}#N(e){let r=this.#w,i=this.#l[r],n=this.#r[r];return this.#M&&this.#u(n)?n.__abortController.abort(new Error("evicted")):(this.#S||this.#d)&&(this.#S&&this.#s?.(n,i,"evict"),this.#d&&this.#m?.push([n,i,"evict"])),this.#C(r),e&&(this.#l[r]=void 0,this.#r[r]=void 0,this.#O.push(r)),this.#a===1?(this.#w=this.#g=0,this.#O.length=0):this.#w=this.#p[r],this.#c.delete(i),this.#a--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#c.get(e);if(s!==void 0){let o=this.#r[s];if(this.#u(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#x(s))n&&(n.has="stale",this.#R(n,s));else return i&&this.#A(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.#c.get(e);if(n===void 0||!i&&this.#x(n))return;let s=this.#r[n];return this.#u(s)?s.__staleWhileFetching:s}#U(e,r,i,n){let s=r===void 0?void 0:this.#r[r];if(this.#u(s))return s;let o=new qi,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:n},u=(b,v=!1)=>{let{aborted:S}=o.signal,T=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(S&&!v?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,T&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),S&&!T&&!v)return f(o.signal.reason);let R=m,x=this.#r[r];return(x===m||T&&v&&x===void 0)&&(b===void 0?R.__staleWhileFetching!==void 0?this.#r[r]=R.__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),f(b)),f=b=>{let{aborted:v}=o.signal,S=v&&i.allowStaleOnFetchAbort,T=S||i.allowStaleOnFetchRejection,R=T||i.noDeleteOnFetchRejection,x=m;if(this.#r[r]===m&&(!R||x.__staleWhileFetching===void 0?this.#D(e,"fetch"):S||(this.#r[r]=x.__staleWhileFetching)),T)return i.status&&x.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),x.__staleWhileFetching;if(x.__returned===x)throw b},p=(b,v)=>{let S=this.#_?.(e,s,l);S&&S instanceof Promise&&S.then(T=>b(T===void 0?void 0:T),v),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=T=>u(T,!0)))})};i.status&&(i.status.fetchDispatched=!0);let m=new Promise(p).then(u,c),d=Object.assign(m,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,d,{...l.options,status:void 0}),r=this.#c.get(e)):this.#r[r]=d,d}#u(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof qi}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:b,forceRefresh:v=!1,status:S,signal:T}=r;if(!this.#M)return S&&(S.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:S});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:m,status:S,signal:T},x=this.#c.get(e);if(x===void 0){S&&(S.fetch="miss");let k=this.#U(e,x,R,b);return k.__returned=k}else{let k=this.#r[x];if(this.#u(k)){let G=i&&k.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",G&&(S.returnedStale=!0)),G?k.__staleWhileFetching:k.__returned=k}let I=this.#x(x);if(!v&&!I)return S&&(S.fetch="hit"),this.#j(x),n&&this.#A(x),S&&this.#R(S,x),k;let C=this.#U(e,x,R,b),q=C.__staleWhileFetching!==void 0&&i;return S&&(S.fetch=I?"stale":"refresh",q&&I&&(S.returnedStale=!0)),q?C.__staleWhileFetching:C.__returned=C}}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.#b;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...o}=r,a=this.get(e,o);if(!s&&a!==void 0)return a;let l=i(e,a,{options:o,context:n});return this.set(e,l,o),l}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,a=this.#c.get(e);if(a!==void 0){let l=this.#r[a],u=this.#u(l);return o&&this.#R(o,a),this.#x(a)?(o&&(o.get="stale"),u?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#D(e,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),u?l.__staleWhileFetching:(this.#j(a),n&&this.#A(a),l))}else o&&(o.get="miss")}#z(e,r){this.#v[r]=e,this.#p[e]=r}#j(e){e!==this.#g&&(e===this.#w?this.#w=this.#p[e]:this.#z(this.#v[e],this.#p[e]),this.#z(this.#g,e),this.#g=e)}delete(e){return this.#D(e,"delete")}#D(e,r){let i=!1;if(this.#a!==0){let n=this.#c.get(e);if(n!==void 0)if(i=!0,this.#a===1)this.#$(r);else{this.#C(n);let s=this.#r[n];if(this.#u(s)?s.__abortController.abort(new Error("deleted")):(this.#S||this.#d)&&(this.#S&&this.#s?.(s,e,r),this.#d&&this.#m?.push([s,e,r])),this.#c.delete(e),this.#l[n]=void 0,this.#r[n]=void 0,n===this.#g)this.#g=this.#v[n];else if(n===this.#w)this.#w=this.#p[n];else{let o=this.#v[n];this.#p[o]=this.#p[n];let a=this.#p[n];this.#v[a]=this.#v[n]}this.#a--,this.#O.push(n)}}if(this.#d&&this.#m?.length){let n=this.#m,s;for(;s=n?.shift();)this.#o?.(...s)}return i}clear(){return this.#$("delete")}#$(e){for(let r of this.#P({allowStale:!0})){let i=this.#r[r];if(this.#u(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#l[r];this.#S&&this.#s?.(i,n,e),this.#d&&this.#m?.push([i,n,e])}}if(this.#c.clear(),this.#r.fill(void 0),this.#l.fill(void 0),this.#y&&this.#T&&(this.#y.fill(0),this.#T.fill(0)),this.#E&&this.#E.fill(0),this.#w=0,this.#g=0,this.#O.length=0,this.#h=0,this.#a=0,this.#d&&this.#m){let r=this.#m,i;for(;i=r?.shift();)this.#o?.(...i)}}};import{posix as Tg,win32 as As}from"node:path";import{fileURLToPath as Mg}from"node:url";import{lstatSync as Og,readdir as Ag,readdirSync as kg,readlinkSync as Dg,realpathSync as Pg}from"fs";import*as qg from"node:fs";import{lstat as Lg,readdir as Ng,readlink as jg,realpath as Fg}from"node:fs/promises";import{EventEmitter as Ts}from"node:events";import cl from"node:stream";import{StringDecoder as mg}from"node:string_decoder";var al=typeof process=="object"&&process?process:{stdout:null,stderr:null},yg=t=>!!t&&typeof t=="object"&&(t instanceof dt||t instanceof cl||bg(t)||wg(t)),bg=t=>!!t&&typeof t=="object"&&t instanceof Ts&&typeof t.pipe=="function"&&t.pipe!==cl.Writable.prototype.pipe,wg=t=>!!t&&typeof t=="object"&&t instanceof Ts&&typeof t.write=="function"&&typeof t.end=="function",tt=Symbol("EOF"),rt=Symbol("maybeEmitEnd"),ht=Symbol("emittedEnd"),Ci=Symbol("emittingEnd"),Cr=Symbol("emittedError"),Li=Symbol("closed"),ll=Symbol("read"),Ni=Symbol("flush"),ul=Symbol("flushChunk"),Ie=Symbol("encoding"),ir=Symbol("decoder"),ae=Symbol("flowing"),Lr=Symbol("paused"),nr=Symbol("resume"),le=Symbol("buffer"),Se=Symbol("pipes"),ue=Symbol("bufferLength"),_s=Symbol("bufferPush"),ji=Symbol("bufferShift"),ye=Symbol("objectMode"),X=Symbol("destroyed"),vs=Symbol("error"),Ss=Symbol("emitData"),fl=Symbol("emitEnd"),Es=Symbol("emitEnd2"),Ge=Symbol("async"),Rs=Symbol("abort"),Fi=Symbol("aborted"),Nr=Symbol("signal"),Ct=Symbol("dataListeners"),Oe=Symbol("discarded"),jr=t=>Promise.resolve().then(t),_g=t=>t(),vg=t=>t==="end"||t==="finish"||t==="prefinish",Sg=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Eg=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Ii=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[nr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},xs=class extends Ii{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)}},Rg=t=>!!t.objectMode,xg=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",dt=class extends Ts{[ae]=!1;[Lr]=!1;[Se]=[];[le]=[];[ye];[Ie];[Ge];[ir];[tt]=!1;[ht]=!1;[Ci]=!1;[Li]=!1;[Cr]=null;[ue]=0;[X]=!1;[Nr];[Fi]=!1;[Ct]=0;[Oe]=!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");Rg(r)?(this[ye]=!0,this[Ie]=null):xg(r)?(this[Ie]=r.encoding,this[ye]=!1):(this[ye]=!1,this[Ie]=null),this[Ge]=!!r.async,this[ir]=this[Ie]?new mg(this[Ie]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[le]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[Nr]=i,i.aborted?this[Rs]():i.addEventListener("abort",()=>this[Rs]()))}get bufferLength(){return this[ue]}get encoding(){return this[Ie]}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[ye]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ge]}set async(e){this[Ge]=this[Ge]||!!e}[Rs](){this[Fi]=!0,this.emit("abort",this[Nr]?.reason),this.destroy(this[Nr]?.reason)}get aborted(){return this[Fi]}set aborted(e){}write(e,r,i){if(this[Fi])return!1;if(this[tt])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[Ge]?jr:_g;if(!this[ye]&&!Buffer.isBuffer(e)){if(Eg(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Sg(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ye]?(this[ae]&&this[ue]!==0&&this[Ni](!0),this[ae]?this.emit("data",e):this[_s](e),this[ue]!==0&&this.emit("readable"),i&&n(i),this[ae]):e.length?(typeof e=="string"&&!(r===this[Ie]&&!this[ir]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ie]&&(e=this[ir].write(e)),this[ae]&&this[ue]!==0&&this[Ni](!0),this[ae]?this.emit("data",e):this[_s](e),this[ue]!==0&&this.emit("readable"),i&&n(i),this[ae]):(this[ue]!==0&&this.emit("readable"),i&&n(i),this[ae])}read(e){if(this[X])return null;if(this[Oe]=!1,this[ue]===0||e===0||e&&e>this[ue])return this[rt](),null;this[ye]&&(e=null),this[le].length>1&&!this[ye]&&(this[le]=[this[Ie]?this[le].join(""):Buffer.concat(this[le],this[ue])]);let r=this[ll](e||null,this[le][0]);return this[rt](),r}[ll](e,r){if(this[ye])this[ji]();else{let i=r;e===i.length||e===null?this[ji]():typeof i=="string"?(this[le][0]=i.slice(e),r=i.slice(0,e),this[ue]-=e):(this[le][0]=i.subarray(e),r=i.subarray(0,e),this[ue]-=e)}return this.emit("data",r),!this[le].length&&!this[tt]&&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[tt]=!0,this.writable=!1,(this[ae]||!this[Lr])&&this[rt](),this}[nr](){this[X]||(!this[Ct]&&!this[Se].length&&(this[Oe]=!0),this[Lr]=!1,this[ae]=!0,this.emit("resume"),this[le].length?this[Ni]():this[tt]?this[rt]():this.emit("drain"))}resume(){return this[nr]()}pause(){this[ae]=!1,this[Lr]=!0,this[Oe]=!1}get destroyed(){return this[X]}get flowing(){return this[ae]}get paused(){return this[Lr]}[_s](e){this[ye]?this[ue]+=1:this[ue]+=e.length,this[le].push(e)}[ji](){return this[ye]?this[ue]-=1:this[ue]-=this[le][0].length,this[le].shift()}[Ni](e=!1){do;while(this[ul](this[ji]())&&this[le].length);!e&&!this[le].length&&!this[tt]&&this.emit("drain")}[ul](e){return this.emit("data",e),this[ae]}pipe(e,r){if(this[X])return e;this[Oe]=!1;let i=this[ht];return r=r||{},e===al.stdout||e===al.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new xs(this,e,r):new Ii(this,e,r)),this[Ge]?jr(()=>this[nr]()):this[nr]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[ae]&&this[Ct]===0&&(this[ae]=!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[Oe]=!1,this[Ct]++,!this[Se].length&&!this[ae]&&this[nr]();else if(e==="readable"&&this[ue]!==0)super.emit("readable");else if(vg(e)&&this[ht])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Cr]){let n=r;this[Ge]?jr(()=>n.call(this,this[Cr])):n.call(this,this[Cr])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Ct]=this.listeners("data").length,this[Ct]===0&&!this[Oe]&&!this[Se].length&&(this[ae]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ct]=0,!this[Oe]&&!this[Se].length&&(this[ae]=!1)),r}get emittedEnd(){return this[ht]}[rt](){!this[Ci]&&!this[ht]&&!this[X]&&this[le].length===0&&this[tt]&&(this[Ci]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Li]&&this.emit("close"),this[Ci]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==X&&this[X])return!1;if(e==="data")return!this[ye]&&!i?!1:this[Ge]?(jr(()=>this[Ss](i)),!0):this[Ss](i);if(e==="end")return this[fl]();if(e==="close"){if(this[Li]=!0,!this[ht]&&!this[X])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Cr]=i,super.emit(vs,i);let s=!this[Nr]||this.listeners("error").length?super.emit("error",i):!1;return this[rt](),s}else if(e==="resume"){let s=super.emit("resume");return this[rt](),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[rt](),n}[Ss](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[Oe]?!1:super.emit("data",e);return this[rt](),r}[fl](){return this[ht]?!1:(this[ht]=!0,this.readable=!1,this[Ge]?(jr(()=>this[Es]()),!0):this[Es]())}[Es](){if(this[ir]){let r=this[ir].end();if(r){for(let i of this[Se])i.dest.write(r);this[Oe]||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[ye]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ye]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ye])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ie]?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[Oe]=!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[tt])return r();let s,o,a=f=>{this.off("data",l),this.off("end",u),this.off(X,c),r(),o(f)},l=f=>{this.off("error",a),this.off("end",u),this.off(X,c),this.pause(),s({value:f,done:!!this[tt]})},u=()=>{this.off("error",a),this.off("data",l),this.off(X,c),r(),s({done:!0,value:void 0})},c=()=>a(new Error("stream destroyed"));return new Promise((f,p)=>{o=p,s=f,this.once(X,c),this.once("error",a),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Oe]=!1;let e=!1,r=()=>(this.pause(),this.off(vs,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(vs,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[Oe]=!0,this[le].length=0,this[ue]=0;let r=this;return typeof r.close=="function"&&!this[Li]&&r.close(),e?this.emit("error",e):this.emit(X),this}static get isStream(){return yg}};var Cg=Pg.native,Ir={lstatSync:Og,readdir:Ag,readdirSync:kg,readlinkSync:Dg,realpathSync:Cg,promises:{lstat:Lg,readdir:Ng,readlink:jg,realpath:Fg}},ml=t=>!t||t===Ir||t===qg?Ir:{...Ir,...t,promises:{...Ir.promises,...t.promises||{}}},yl=/^\\\\\?\\([a-z]:)\\?$/i,Ig=t=>t.replace(/\//g,"\\").replace(yl,"$1\\"),$g=/[\\\/]/,qe=0,bl=1,wl=2,Ye=4,_l=6,vl=8,Lt=10,Sl=12,Pe=15,Fr=~Pe,Ms=16,hl=32,$r=64,$e=128,$i=256,Bi=512,dl=$r|$e|Bi,Wg=1023,Os=t=>t.isFile()?vl:t.isDirectory()?Ye:t.isSymbolicLink()?Lt:t.isCharacterDevice()?wl:t.isBlockDevice()?_l:t.isSocket()?Sl:t.isFIFO()?bl:qe,pl=new qt({max:2**12}),Wr=t=>{let e=pl.get(t);if(e)return e;let r=t.normalize("NFKD");return pl.set(t,r),r},gl=new qt({max:2**12}),Wi=t=>{let e=gl.get(t);if(e)return e;let r=Wr(t.toLowerCase());return gl.set(t,r),r},Ui=class extends qt{constructor(){super({max:256})}},ks=class extends qt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},El=Symbol("PathScurry setAsCwd"),be=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#n;get nlink(){return this.#n}#o;get uid(){return this.#o}#_;get gid(){return this.#_}#b;get rdev(){return this.#b}#f;get blksize(){return this.#f}#a;get ino(){return this.#a}#h;get size(){return this.#h}#c;get blocks(){return this.#c}#l;get atimeMs(){return this.#l}#r;get mtimeMs(){return this.#r}#p;get ctimeMs(){return this.#p}#v;get birthtimeMs(){return this.#v}#w;get atime(){return this.#w}#g;get mtime(){return this.#g}#O;get ctime(){return this.#O}#m;get birthtime(){return this.#m}#E;#T;#y;#S;#M;#d;#i;#q;#A;#R;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=qe,i,n,s,o,a){this.name=e,this.#E=s?Wi(e):Wr(e),this.#i=r&Wg,this.nocase=s,this.roots=n,this.root=i||this,this.#q=o,this.#y=a.fullpath,this.#M=a.relative,this.#d=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=ml(a.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#q}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#W(n):this.#W(n)}#W(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#q.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#q.set(this,r),this.#i&=~Ms,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?Wi(e):Wr(e);for(let l of i)if(l.#E===n)return l;let s=this.parent?this.sep:"",o=this.#y?this.#y+s+e:void 0,a=this.newChild(e,qe,{...r,parent:this,fullpath:o});return this.canReaddir()||(a.#i|=$e),i.push(a),a}relative(){if(this.isCWD)return"";if(this.#M!==void 0)return this.#M;let e=this.name,r=this.parent;if(!r)return this.#M=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.#d!==void 0)return this.#d;let e=this.name,r=this.parent;if(!r)return this.#d=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#y!==void 0)return this.#y;let e=this.name,r=this.parent;if(!r)return this.#y=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#y=n}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep==="/")return this.#S=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#S=`//?/${n}`:this.#S=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#S=i}isUnknown(){return(this.#i&Pe)===qe}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.#i&Pe)===vl}isDirectory(){return(this.#i&Pe)===Ye}isCharacterDevice(){return(this.#i&Pe)===wl}isBlockDevice(){return(this.#i&Pe)===_l}isFIFO(){return(this.#i&Pe)===bl}isSocket(){return(this.#i&Pe)===Sl}isSymbolicLink(){return(this.#i&Lt)===Lt}lstatCached(){return this.#i&hl?this:void 0}readlinkCached(){return this.#A}realpathCached(){return this.#R}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#A)return!0;if(!this.parent)return!1;let e=this.#i&Pe;return!(e!==qe&&e!==Lt||this.#i&$i||this.#i&$e)}calledReaddir(){return!!(this.#i&Ms)}isENOENT(){return!!(this.#i&$e)}isNamed(e){return this.nocase?this.#E===Wi(e):this.#E===Wr(e)}async readlink(){let e=this.#A;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.#A=i}catch(r){this.#B(r.code);return}}readlinkSync(){let e=this.#A;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.#A=i}catch(r){this.#B(r.code);return}}#x(e){this.#i|=Ms;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#F()}}#F(){this.#i&$e||(this.#i=(this.#i|$e)&Fr,this.#C())}#C(){let e=this.children();e.provisional=0;for(let r of e)r.#F()}#I(){this.#i|=Bi,this.#L()}#L(){if(this.#i&$r)return;let e=this.#i;(e&Pe)===Ye&&(e&=Fr),this.#i=e|$r,this.#C()}#k(e=""){e==="ENOTDIR"||e==="EPERM"?this.#L():e==="ENOENT"?this.#F():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#L():e==="ENOENT"&&this.#F()}#B(e=""){let r=this.#i;r|=$i,e==="ENOENT"&&(r|=$e),(e==="EINVAL"||e==="UNKNOWN")&&(r&=Fr),this.#i=r,e==="ENOTDIR"&&this.parent&&this.parent.#L()}#N(e,r){return this.#u(e,r)||this.#U(e,r)}#U(e,r){let i=Os(e),n=this.newChild(e.name,i,{parent:this}),s=n.#i&Pe;return s!==Ye&&s!==Lt&&s!==qe&&(n.#i|=$r),r.unshift(n),r.provisional++,n}#u(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?Wi(e.name):Wr(e.name))===n.#E)return this.#z(e,n,i,r)}}#z(e,r,i,n){let s=r.name;return r.#i=r.#i&Fr|Os(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.#i&$e)===0)try{return this.#j(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#i&$e)===0)try{return this.#j(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#j(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:u,dev:c,gid:f,ino:p,mode:m,mtime:d,mtimeMs:b,nlink:v,rdev:S,size:T,uid:R}=e;this.#w=r,this.#l=i,this.#m=n,this.#v=s,this.#f=o,this.#c=a,this.#O=l,this.#p=u,this.#t=c,this.#_=f,this.#a=p,this.#s=m,this.#g=d,this.#r=b,this.#n=v,this.#b=S,this.#h=T,this.#o=R;let x=Os(e);this.#i=this.#i&Fr|x|hl,x!==qe&&x!==Ye&&x!==Lt&&(this.#i|=$r)}#D=[];#$=!1;#G(e){this.#$=!1;let r=this.#D.slice();this.#D.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.#D.push(e),this.#$)return;this.#$=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,o)=>{if(s)this.#k(s.code),i.provisional=0;else{for(let a of o)this.#N(a,i);this.#x(i)}this.#G(i.slice(0,i.provisional))})}#H;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.#H)await this.#H;else{let i=()=>{};this.#H=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#N(n,e);this.#x(e)}catch(n){this.#k(n.code),e.provisional=0}this.#H=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.#N(i,e);this.#x(e)}catch(i){this.#k(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#i&dl)return!1;let e=Pe&this.#i;return e===qe||e===Ye||e===Lt}shouldWalk(e,r){return(this.#i&Ye)===Ye&&!(this.#i&dl)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#R)return this.#R;if(!((Bi|$i|$e)&this.#i))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#R=this.resolve(e)}catch{this.#I()}}realpathSync(){if(this.#R)return this.#R;if(!((Bi|$i|$e)&this.#i))try{let e=this.#e.realpathSync(this.fullpath());return this.#R=this.resolve(e)}catch{this.#I()}}[El](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.#M=i.join(this.sep),n.#d=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#M=void 0,n.#d=void 0,n=n.parent}},zi=class t extends be{sep="\\";splitSep=$g;constructor(e,r=qe,i,n,s,o,a){super(e,r,i,n,s,o,a)}newChild(e,r=qe,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return As.parse(e).root}getRoot(e){if(e=Ig(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 sr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(yl,"$1\\"),e===r}},Hi=class t extends be{splitSep="/";sep="/";constructor(e,r=qe,i,n,s,o,a){super(e,r,i,n,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=qe,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Gi=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#n;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:o=Ir}={}){this.#n=ml(o),(e instanceof URL||e.startsWith("file://"))&&(e=Mg(e));let a=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new Ui,this.#t=new Ui,this.#s=new ks(s);let l=a.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.#n),this.roots[this.rootPath]=this.root;let u=this.root,c=l.length-1,f=r.sep,p=this.rootPath,m=!1;for(let d of l){let b=c--;u=u.child(d,{relative:new Array(b).fill("..").join(f),relativePosix:new Array(b).fill("..").join("/"),fullpath:p+=(m?"":f)+d}),m=!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 o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))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 o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))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 be||(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 be||(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 be||(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 be||(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 be||(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 be||(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 be||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set,u=(f,p)=>{l.add(f),f.readdirCB((m,d)=>{if(m)return p(m);let b=d.length;if(!b)return p();let v=()=>{--b===0&&p()};for(let S of d)(!s||s(S))&&a.push(i?S:S.fullpath()),n&&S.isSymbolicLink()?S.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(l,o)?u(T,v):v()):S.shouldWalk(l,o)?u(S,v):v()},!0)},c=e;return new Promise((f,p)=>{u(c,m=>{if(m)return p(m);f(a)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof be||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let c=u.readdirSync();for(let f of c){(!s||s(f))&&a.push(i?f:f.fullpath());let p=f;if(f.isSymbolicLink()){if(!(n&&(p=f.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof be||(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 be||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r;(!s||s(e))&&(yield i?e:e.fullpath());let a=new Set([e]);for(let l of a){let u=l.readdirSync();for(let c of u){(!s||s(c))&&(yield i?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(n&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(a,o)&&a.add(f)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof be||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=new dt({objectMode:!0});(!s||s(e))&&a.write(i?e:e.fullpath());let l=new Set,u=[e],c=0,f=()=>{let p=!1;for(;!p;){let m=u.shift();if(!m){c===0&&a.end();return}c++,l.add(m);let d=(v,S,T=!1)=>{if(v)return a.emit("error",v);if(n&&!T){let R=[];for(let x of S)x.isSymbolicLink()&&R.push(x.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(R.length){Promise.all(R).then(()=>d(null,S,!0));return}}for(let R of S)R&&(!s||s(R))&&(a.write(i?R:R.fullpath())||(p=!0));c--;for(let R of S){let x=R.realpathCached()||R;x.shouldWalk(l,o)&&u.push(x)}p&&!a.flowing?a.once("drain",f):b||f()},b=!0;m.readdirCB(d,!0),b=!1}};return f(),a}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof be||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=new dt({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(i?e:e.fullpath());let u=[e],c=0,f=()=>{let p=!1;for(;!p;){let m=u.shift();if(!m){c===0&&a.end();return}c++,l.add(m);let d=m.readdirSync();for(let b of d)(!s||s(b))&&(a.write(i?b:b.fullpath())||(p=!0));c--;for(let b of d){let v=b;if(b.isSymbolicLink()){if(!(n&&(v=b.realpathSync())))continue;v.isUnknown()&&v.lstatSync()}v.shouldWalk(l,o)&&u.push(v)}}p&&!a.flowing&&a.once("drain",f)};return f(),a}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[El](r)}},sr=class extends Gi{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,As,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return As.parse(e).root.toUpperCase()}newRoot(e){return new zi(this.rootPath,Ye,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},or=class extends Gi{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,Tg,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new Hi(this.rootPath,Ye,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Br=class extends or{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},sE=process.platform==="win32"?zi:Hi,Rl=process.platform==="win32"?sr:process.platform==="darwin"?Br:or;var Bg=t=>t.length>=1,Ug=t=>t.length>=1,ar=class t{#e;#t;#s;length;#n;#o;#_;#b;#f;#a;#h=!0;constructor(e,r,i,n){if(!Bg(e))throw new TypeError("empty pattern list");if(!Ug(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.#n=n,this.#s===0){if(this.isUNC()){let[s,o,a,l,...u]=this.#e,[c,f,p,m,...d]=this.#t;u[0]===""&&(u.shift(),d.shift());let b=[s,o,a,l,""].join("/"),v=[c,f,p,m,""].join("/");this.#e=[b,...u],this.#t=[v,...d],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#t;o[0]===""&&(o.shift(),l.shift());let u=s+"/",c=a+"/";this.#e=[u,...o],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]===he}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#_=this.#_||(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.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#t,this.#s+1,this.#n),this.#o.#a=this.#a,this.#o.#f=this.#f,this.#o.#b=this.#b,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#n==="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.#b!==void 0?this.#b:this.#b=this.#n==="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.#h)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}};var zg=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",lr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:o=zg}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let r=new Me(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 o=new ar(n,s,0,this.platform),a=new Me(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(a):this.relative.push(a),l&&(u?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let o of this.relative)if(o.match(n)||o.match(s))return!0;for(let o of this.absolute)if(o.match(r)||o.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 Ds=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()]))}},Ps=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)])}},qs=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())}},Ur=class t{hasWalkedCache;matches=new Ps;subwalks=new qs;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Ds}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 o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){n=n.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let f=s.rest();if(f)s=f;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 f=l===".."||l===""||l===".";this.matches.add(n.resolve(l),a,f);continue}else if(l===he){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let f=u?.pattern(),p=u?.rest();if(!u||(f===""||f===".")&&!p)this.matches.add(n,a,f===""||f===".");else if(f===".."){let m=n.parent||n;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,a,!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 o of i){let a=o.isAbsolute(),l=o.pattern(),u=o.rest();l===he?n.testGlobstar(s,o,u,a):l instanceof RegExp?n.testRegExp(s,l,u,a):n.testString(s,l,u,a)}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 o=e.parent||e;this.subwalks.add(o,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 Hg=(t,e)=>typeof t=="string"?new lr([t],e):Array.isArray(t)?new lr(t,e):t,Yi=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=Hg(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}))}#n(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#o(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 o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.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.#n(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 o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#n(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(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?o+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 Ur(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,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||(s++,this.match(a,l,u).then(()=>o()));for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,i,o):a.readdirCB((u,c)=>this.walkCB3(a,c,i,o),!0)}o()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||(s++,this.match(a,l,u).then(()=>o()));for(let[a,l]of i.subwalks.entries())s++,this.walkCB2(a,l,i.child(),o);o()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new Ur(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,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||this.matchSync(a,l,u);for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirSync();this.walkCB3Sync(a,l,i,o)}o()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||this.matchSync(a,l,u);for(let[a,l]of i.subwalks.entries())s++,this.walkCB2Sync(a,l,i.child(),o);o()}},zr=class extends Yi{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}},Hr=class extends Yi{results;constructor(e,r,i){super(e,r,i),this.results=new dt({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 Yg=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",We=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=Gg(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||Yg,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"?sr:r.platform==="darwin"?Br:r.platform?or:Rl;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)),[o,a]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let c=a[u];if(!c)throw new Error("invalid pattern object");return new ar(l,c,0,this.platform)})}async walk(){return[...await new zr(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 zr(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 Hr(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 Hr(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 Cs=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Me(r,e).hasMagic())return!0;return!1};function Ki(t,e={}){return new We(t,e).streamSync()}function Tl(t,e={}){return new We(t,e).stream()}function Ml(t,e={}){return new We(t,e).walkSync()}async function xl(t,e={}){return new We(t,e).walk()}function Ji(t,e={}){return new We(t,e).iterateSync()}function Ol(t,e={}){return new We(t,e).iterate()}var Vg=Ki,Kg=Object.assign(Tl,{sync:Ki}),Jg=Ji,Zg=Object.assign(Ol,{sync:Ji}),Qg=Object.assign(Ml,{stream:Ki,iterate:Ji}),Vi=Object.assign(xl,{glob:xl,globSync:Ml,sync:Qg,globStream:Tl,stream:Kg,globStreamSync:Ki,streamSync:Vg,globIterate:Ol,iterate:Zg,globIterateSync:Ji,iterateSync:Jg,Glob:We,hasMagic:Cs,escape:tr,unescape:Fe});Vi.glob=Vi;var Xg="(<=>!~";var em=new RegExp(`[${"["+Xg+";@"}]`);function tm(t){return t.split(em)[0].trim()}function Al(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=>tm(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 rm=/\s#.*$/;function kl(t){return t.split(`
39
+ `).filter(e=>!e.startsWith("#")).map(e=>e.replace(rm,"")).map(e=>e.trim()).filter(e=>e!=="")}import Dl from"node:path";import im from"node:fs/promises";var Gr={debug:(t,...e)=>console.debug(t,...e),info:(t,...e)=>console.info(t,...e),warn:(t,...e)=>console.warn(t,...e),error:(t,...e)=>console.error(t,...e)};var Yr=class{sourceUrl;isRemote;logger;_data=null;constructor(e,r=Gr){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://"),this.logger=r}async readJson(e){if(this.isRemote){let r=Dl.posix.join(this.sourceUrl,e);this.logger.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{let r=Dl.join(this.sourceUrl,e);this.logger.debug(`Reading ${r}`);let i=await im.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;this.logger.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 Ls=`https://cdn.jsdelivr.net/pyodide/v${om}/full/`;async function ql(t){let e=t.logger??Gr,r=Ns(t.pyodideSource??Ls),i=Be.resolve(t.destDir,"./pyodide"),n=Be.resolve(t.destDir,"./app_files");await ur.mkdir(t.destDir,{recursive:!0});let s=await am({pyodideSource:r,pyodideRuntimeDir:i,requirements:t.dependencies,localWheelPaths:t.localWheelPaths,logger:e});e.info(`Prebuilt packages loaded for the requirements: ${JSON.stringify(s)}`),await fm({cwd:t.sourceDir,filePathPatterns:t.files,destAppDir:n,logger:e}),await cm(n,t.entrypoint),await um({requirements:t.dependencies,localWheelPaths:t.excludeLocalWheelsFromSnapshot?[]:t.localWheelPaths,usedPrebuiltPackages:s,pyodideSource:r,pyodideRuntimeDir:i,saveTo:Be.resolve(t.destDir,"./site-packages-snapshot.tar.gz"),logger:e}),await hm(Be.resolve(t.destDir,"./prebuilt-packages.txt"),s)}function Ns(t){return t.endsWith("/")?t:t+"/"}async function Cl(t){let e=await ur.readFile(t,{encoding:"utf-8"});return kl(e)}async function am(t){if(t.requirements.length===0&&t.localWheelPaths.length===0)return[];let e=await Pl({packageBaseUrl:t.pyodideSource,packageCacheDir:t.pyodideRuntimeDir});return await Ll(e,{requirements:t.requirements,localWheelPaths:t.localWheelPaths,logger:t.logger}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function Ll(t,e){await Nl(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements];for(let n of e.localWheelPaths){let s=await lm(t,n,e.logger);i.push(s)}e.logger.info(`Install the packages: ${JSON.stringify(i)}`),await r.install.callKwargs(i,{keep_going:!0})}async function lm(t,e,r){r.debug(`Preparing the local wheel: ${e}`);let i=await ur.readFile(e),s=`/tmp/wheels-${nm("sha1").update(e).digest("hex").slice(0,8)}`;t.FS.mkdirTree(s);let o=`${s}/${Be.basename(e)}`;t.FS.writeFile(o,i);let a=`emfs:${o}`;return r.debug(`The local wheel ${e} is prepared as ${a}`),a}async function um(t){let{logger:e}=t;e.info("Create the site-packages snapshot file...");let r=await Pl({packageBaseUrl:t.pyodideSource,packageCacheDir:t.pyodideRuntimeDir});await Nl(r,"micropip");let i=r.pyimport("micropip"),n=new Yr(t.pyodideSource,e),s=[];if(t.usedPrebuiltPackages.length>0){e.info("Mocking prebuilt packages so that they will not be included in the site-packages snapshot \u2014 they get installed from the vendored wheel files at runtime instead.");for(let l of t.usedPrebuiltPackages){let u=await n.getPackageInfoByName(l);if(u==null)throw new Error(`Package ${l} is not found in the lock file.`);e.debug(`Mock ${u.name} ${u.version}`),i.add_mock_package(u.name,u.version),s.push(u.name)}}e.info(`Install the requirements ${JSON.stringify(t.requirements)}`),await Ll(r,{requirements:t.requirements,localWheelPaths:t.localWheelPaths,logger:e}),e.info(`Remove the mocked packages: ${JSON.stringify(s)}`),s.forEach(l=>i.remove_mock_package(l)),e.info("Archive the site-packages director(y|ies)");let o="/tmp/site-packages-snapshot.tar.gz";await r.runPythonAsync(`
41
40
  import os
42
41
  import tarfile
43
42
  import site
44
43
 
45
44
  site_packages_dirs = site.getsitepackages()
46
45
 
47
- tar_file_name = '${s}'
46
+ tar_file_name = '${o}'
48
47
  with tarfile.open(tar_file_name, mode='w:gz') as gzf:
49
48
  for site_packages in site_packages_dirs:
50
49
  print("Add site-package:", site_packages)
51
50
  print(os.listdir(site_packages))
52
51
  gzf.add(site_packages)
53
- `),$.info("Extract the archive file from EMFS");let o=t.FS.readFile(s);$.info(`Save the archive file (${e.saveTo})`),await xt.writeFile(e.saveTo,o)}async function SS(e){$.info("Copy the app directory..."),await Promise.all(e.filePathPatterns.map(async t=>{let r=await Vn(t,{cwd:e.cwd,absolute:!1});if(r.length===0){$.warn(`No files match the pattern "${t}" in "${e.cwd}".`);return}await Promise.all(r.map(async i=>{let n=ge.resolve(e.cwd,i),s=ge.resolve(e.destAppDir,i);$.debug(`Copy ${n} to ${s}`),await ca.copy(n,s,{errorOnExist:!0})}))}))}async function ES(e,t){try{await xt.access(ge.resolve(e,t))}catch{throw new Error(`The entrypoint file "${t}" is not included in the bundled files.`)}}async function RS(e){let t=await xt.readFile(e,{encoding:"utf-8"});return Lc(t)}async function xS(e,t){let r=t.join(`
54
- `);await xt.writeFile(e,r,{encoding:"utf-8"})}hS(fS(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${dS}/full/`,coerce:e=>(e.endsWith("/")||(e+="/"),e)}).options("logLevel",{type:"string",default:"info",describe:"The log level",choices:["debug","info","warn","error"]}).parseAsync().then(async e=>{$.level=e.logLevel,$.debug("Command line arguments: %j",e);let t=e.project,r=ge.resolve(t,"./build"),i=ge.resolve(t,"./package.json"),n=await ca.readJson(i),s=await Dc({pathResolutionRoot:t,packageJsonStliteDesktopField:n.stlite?.desktop,fallbacks:{appHomeDirSource:e.appHomeDirSource,packages:e.packages,requirementsTxtFilePaths:e.requirement}});$.info("File/directory patterns to be included: %j",s.files),$.info("Entrypoint: %s",s.entrypoint),$.info("Dependencies: %j",s.dependencies),$.info("`requirements.txt` files: %j",s.requirementsTxtFilePaths);let o=await Promise.all(s.requirementsTxtFilePaths.map(async d=>RS(d))).then(d=>d.flat());$.info("Dependencies from `requirements.txt` files: %j",o);let a=Cc([...s.dependencies,...o]);$.info("Validated dependency list: %j",a),await wS({copyTo:r,keepOld:e.keepOldBuild});let l=await vS({pyodideSource:e.pyodideSource,pyodideRuntimeDir:ge.resolve(r,"./pyodide"),requirements:a});$.info("The prebuilt packages loaded for the given requirements: %j",l);let u=ge.resolve(r,"./app_files");await SS({cwd:t,filePathPatterns:s.files,destAppDir:u}),ES(u,s.entrypoint),await _S({requirements:a,usedPrebuiltPackages:l,pyodideSource:e.pyodideSource,pyodideRuntimeDir:ge.resolve(r,"./pyodide"),saveTo:ge.resolve(r,"./site-packages-snapshot.tar.gz")}),await xS(ge.resolve(r,"./prebuilt-packages.txt"),l),await jc({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:ge.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
52
+ `),e.info("Extract the archive file from EMFS");let a=r.FS.readFile(o);e.info(`Save the archive file (${t.saveTo})`),await ur.writeFile(t.saveTo,a)}async function fm(t){t.logger.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await Vi(e,{cwd:t.cwd,absolute:!1});if(r.length===0){t.logger.warn(`No files match the pattern "${e}" in "${t.cwd}".`);return}await Promise.all(r.map(async i=>{let n=Be.normalize(i);if(Be.isAbsolute(n)||n===".."||n.startsWith(".."+Be.sep)){t.logger.warn(`Skipping ${i} from "${t.cwd}" \u2014 path escapes destination.`);return}let s=Be.resolve(t.cwd,n),o=Be.resolve(t.destAppDir,n);t.logger.debug(`Copy ${s} to ${o}`),await sm.copy(s,o,{errorOnExist:!0})}))}))}async function cm(t,e){try{await ur.access(Be.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function hm(t,e){await ur.writeFile(t,e.join(`
53
+ `),{encoding:"utf-8"})}async function Nl(t,e){let r=[];if(await t.loadPackage(e,{errorCallback:i=>r.push(i)}),r.length>0)throw new Error(r.join(`
54
+ `))}var Y=ds(js(),1);import*as Qi from"fs/promises";var dm=Y.object({entrypoint:Y.string(),embed:Y.defaulted(Y.boolean(),!1),idbfsMountpoints:Y.optional(Y.array(Y.string())),nodeJsWorker:Y.defaulted(Y.boolean(),!1),nodefsMountpoints:Y.optional(Y.record(Y.string(),Y.string())),appMenu:Y.defaulted(Y.boolean(),!0)});function pm(t){let e=Y.mask(t??{},dm);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 Fl(t){let e=pm({...t.fallbacks,...t.packageJsonStliteDesktopField});await Qi.writeFile(t.manifestFilePath,JSON.stringify(e,null,2),{encoding:"utf-8"})}var ge=ds(js(),1);import fS from"node:path";var Tt=ds(Xd(),1),pe=Tt.createLogger({transports:[new Tt.transports.Console({format:Tt.format.combine(Tt.format.splat(),Tt.format.cli())})]});function Zt(t){process.emitWarning(t,{type:"DeprecationWarning"})}async function ep(t){let{files:e,entrypoint:r}=cS(t),i=await hS(t),n=await dS(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function cS(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){Zt("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&&Zt("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return ge.assert(n,ge.string(),"The `stlite.desktop.entrypoint` field must be a string."),ge.assert(i,ge.array(ge.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function hS(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;ge.assert(i,ge.optional(ge.array(ge.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(Zt("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 dS(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;ge.assert(n,ge.optional(ge.array(ge.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(a=>fS.resolve(e,a)),o=[];return i!=null&&i.length>0&&(Zt("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),o=i),[...s??[],...o]}Zt("`dump-stlite-desktop-artifacts` is deprecated. Use `stlite desktop` from @stlite/cli (`npx @stlite/cli desktop <path>` or `pip install stlite-cli`) instead. This bin will be removed in a future release.");var yS="../build",bS="../wheels",wS="streamlit-1.56.0-cp313-none-any.whl",_S="stlite_lib-0.1.0-py3-none-any.whl",vS=mS(import.meta.url),tp=Mt.dirname(vS),SS={debug:(t,...e)=>pe.debug(t,...e),info:(t,...e)=>pe.info(t,...e),warn:(t,...e)=>pe.warn(t,...e),error:(t,...e)=>pe.error(t,...e)};async function ES(t){if(pe.info("Copy the desktop SPA shell (the bare built app files) to the destination directory..."),!(await ja.stat(t.sourceDir)).isDirectory())throw new Error(`The source ${t.sourceDir} does not exist.`);if(t.sourceDir===t.destDir){pe.warn(`sourceDir == destDir (${t.sourceDir}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await ja.access(t.destDir),pe.info(`${t.destDir} already exists. Use it and skip copying.`);return}catch{throw new Error(`${t.destDir} does not exist even though the \`keepOld\` option is specified`)}pe.debug(`Copy ${t.sourceDir} to ${t.destDir}`),await ja.rm(t.destDir,{recursive:!0,force:!0}),await rp.copy(t.sourceDir,t.destDir,{errorOnExist:!0})}pS(gS(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:Ls,coerce:Ns}).options("logLevel",{type:"string",default:"info",describe:"The log level",choices:["debug","info","warn","error"]}).parseAsync().then(async t=>{pe.level=t.logLevel,pe.debug("Command line arguments: %j",t);let e=t.project,r=Mt.resolve(e,"./build"),i=Mt.resolve(e,"./package.json"),n=await rp.readJson(i),s=await ep({pathResolutionRoot:e,packageJsonStliteDesktopField:n.stlite?.desktop,fallbacks:{appHomeDirSource:t.appHomeDirSource,packages:t.packages,requirementsTxtFilePaths:t.requirement}});pe.info("File/directory patterns to be included: %j",s.files),pe.info("Entrypoint: %s",s.entrypoint),pe.info("Dependencies: %j",s.dependencies),pe.info("`requirements.txt` files: %j",s.requirementsTxtFilePaths);let o=(await Promise.all(s.requirementsTxtFilePaths.map(Cl))).flat();pe.info("Dependencies from `requirements.txt` files: %j",o);let a=Al([...s.dependencies,...o]);pe.info("Validated dependency list: %j",a),await ES({sourceDir:Mt.resolve(tp,yS),destDir:r,keepOld:t.keepOldBuild});let l=Mt.join(tp,bS);await ql({destDir:r,sourceDir:e,files:s.files,entrypoint:s.entrypoint,dependencies:a,localWheelPaths:[Mt.join(l,_S),Mt.join(l,wS)],pyodideSource:t.pyodideSource,logger:SS}),await Fl({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:Mt.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
55
55
  /*! Bundled license information:
56
56
 
57
57
  safe-buffer/index.js: