@stlite/desktop 0.98.1 → 0.99.1

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 (168) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/bin/dump_artifacts.js +36 -36
  3. package/build/assets/ArrowVegaLiteChart-B-Kd_jPH-Biiko0Ef.js +1 -0
  4. package/build/assets/Audio-B5gtg70U-Bh9tGjUY.js +1 -0
  5. package/build/assets/AudioInput-CgFzLi-y-C8cmY_cr.js +1 -0
  6. package/build/assets/{index-CKw_lXVb-3dsfAMaj.js → Balloons-CqQICrNd-BGoQrXhe.js} +2 -2
  7. package/build/assets/BidiComponent-CkI6DfPr-CbrqDKKX.js +2 -0
  8. package/build/assets/Button-BOmzB5Yb-Bpnf-WZl.js +1 -0
  9. package/build/assets/ButtonGroup-C5sVTynN-DPa0Tx1x.js +2 -0
  10. package/build/assets/CameraInput-C1f0GN0n-Bo12mEPo.js +1 -0
  11. package/build/assets/ChatInput-ClqoaQw2-PqG4grVV.js +1 -0
  12. package/build/assets/Checkbox-ClzElazy-D-AYf8eH.js +1 -0
  13. package/build/assets/{index-BXKF9Na4-e8_T7zol.js → ColorPicker-mCkrAGPa-CtUHNwYp.js} +3 -3
  14. package/build/assets/ComponentInstance-B_1vn-IY-BM9ElpU6.js +11 -0
  15. package/build/assets/DataFrame-CXPcdw96-Crfv7wfu.js +198 -0
  16. package/build/assets/DateInput-DzaFFasw-CiMjvLKg.js +1 -0
  17. package/build/assets/DateTimeInput-WmD8vSCU-K1wv6LRy.js +1 -0
  18. package/build/assets/{index-Dxtfs80M-s0TmhiEk.js → DeckGlJsonChart-CDmFrnUQ-CKLXTmyf.js} +217 -215
  19. package/build/assets/{index-D52Jf8Ey-SgTlRv8T.js → DownloadButton-g54AS0W2-qOKvF9wp.js} +1 -1
  20. package/build/assets/{ErrorOutline.esm-DV80JhHP-XkDmlp3T.js → ErrorOutline.esm-B1NqpuZN-D4cKYVYX.js} +1 -1
  21. package/build/assets/Feedback-DTXGrEzp-Dd_SGEH7.js +1 -0
  22. package/build/assets/{FileDownload.esm-Bg0DSX1Z-tYB-VhDd.js → FileDownload.esm-B_usFfyI-DvbGAuNe.js} +1 -1
  23. package/build/assets/FileUploader-CzCdIxed-CWWB6xZB.js +1 -0
  24. package/build/assets/FormSubmitContent-CstMuKlS-CwJlipqn.js +1 -0
  25. package/build/assets/{index-DuuHtz-x-Caurorud.js → GraphVizChart-nJ8rg3sZ-B_FsOCth.js} +2 -2
  26. package/build/assets/{index-B0C1EJi--C9vASPz3.js → Html-CkFoh4ns-BXVZGZ2C.js} +1 -1
  27. package/build/assets/IFrame-BklekJPV-_sg-kw0j.js +49 -0
  28. package/build/assets/ImageList-l3ue-eW1-CIwYKSdj.js +1 -0
  29. package/build/assets/{InputInstructions-GG_DznKT-BTS6NlIa.js → InputInstructions-C3LBp4_M-BIHPK8ho.js} +1 -1
  30. package/build/assets/Json-DmaVI2eK-CplwjZhb.js +2 -0
  31. package/build/assets/LinkButton-D87rEwzB-C31w_f7c.js +1 -0
  32. package/build/assets/MenuButton-DCWYT9Sm-Cjs_mH64.js +1 -0
  33. package/build/assets/Metric-B85kD6qx-D6Bt_A2_.js +1 -0
  34. package/build/assets/Multiselect-Dj9HMUjc-C1tpZV37.js +1 -0
  35. package/build/assets/NumberInput-Bz1Z4Olo-HwfUQwvD.js +1 -0
  36. package/build/assets/PageLink-DxIPOlCu-CAX1QvMp.js +1 -0
  37. package/build/assets/{Particles-ByFZ9kUC-B_aeMYcp.js → Particles-CgV8FzZe-CZFoM1Ot.js} +1 -1
  38. package/build/assets/{index-DlNfwH7j-Ciae2OLh.js → PlotlyChart-DApJXgoh-msWOSLU2.js} +105 -105
  39. package/build/assets/{index-CzaX93h_-B-_1QLd4.js → Progress-DXRywIcj-D00Siwwp.js} +1 -1
  40. package/build/assets/{ProgressBar-uLtuFXoi-C547ZD3U.js → ProgressBar-By08lmvS-BN2oE7g_.js} +2 -2
  41. package/build/assets/{index-C2tfS9CH-BRrFBwHT.js → Radio-DZEQy4hT-Cx0uGU2K.js} +3 -3
  42. package/build/assets/Selectbox-BywNaXj9-EovVNC_I.js +1 -0
  43. package/build/assets/Slider-sLEYxDUG-Bby7yVsF.js +2 -0
  44. package/build/assets/{index-DnMeTGk7-X2HPuQXI.js → Snow-MxXLnUX_-CCUTgEUd.js} +2 -2
  45. package/build/assets/{index-CxYiRuXO-CRK1FQiS.js → Spinner-D-YJYPV5-qoM-yuRL.js} +1 -1
  46. package/build/assets/{StreamlitSyntaxHighlighter-0BOUSobY-CgsoE1gN.js → StreamlitSyntaxHighlighter-y_BJ441X-Do55UoZC.js} +1 -1
  47. package/build/assets/Table-ah-SFAz4-BuzfN8wv.js +1 -0
  48. package/build/assets/{TableChart.esm-CoMoidiP-DrT_rrb0.js → TableChart.esm-x67iDGlj-hZSJidLi.js} +1 -1
  49. package/build/assets/TextArea-COwbG28l-yfu63ssv.js +1 -0
  50. package/build/assets/TextInput-CPqz-18c-DPGxqoCs.js +1 -0
  51. package/build/assets/TimeInput-BQ-fP8Yi-FMCqKedu.js +3 -0
  52. package/build/assets/{index-CrKJRmJv-Bg5NDALn.js → Toast-CGUHIZQI-39x9j5Rs.js} +1 -1
  53. package/build/assets/Video-CWomx7KF-nGUBPGaY.js +1 -0
  54. package/build/assets/{WidgetLabel-CoLw86qs-CNbX-e3H.js → WidgetLabel-DUaobbKW-DD-xWyXR.js} +1 -1
  55. package/build/assets/WidgetLabelHelpIcon-Dk_Qm9_8-CtMOr4fX.js +1 -0
  56. package/build/assets/WidgetLabelHelpIconInline-CkTH9muE-i_BwkvTR.js +1 -0
  57. package/build/assets/{_baseAssignValue-DQhmkaDt-Bl1quFU6.js → _baseAssignValue-DbpQ8D1L-D2c_-zPN.js} +1 -1
  58. package/build/assets/b1c37dc02f43b345-BK8hQpFn.woff2 +0 -0
  59. package/build/assets/{base-input-BdLA32iO-A9B9vy_-.js → base-input-CUlWnT-V-BhBQbzWk.js} +2 -2
  60. package/build/assets/{checkbox-DFREjf9t-Bj1xZr4O.js → checkbox-CEu7IJmq-3LmskyhR.js} +2 -2
  61. package/build/assets/{constants-Dj7RTpUo-BGkidDJo.js → constants-BFZIinC9-BhIl5GAK.js} +2 -2
  62. package/build/assets/{createDownloadLinkElement-DdPyJxB4-BwUogbJk.js → createDownloadLinkElement-CO9Q-pa0-BNUtAwjF.js} +1 -1
  63. package/build/assets/{createSuper-BZpABwIl-CzqIX_hj.js → createSuper-CPupKoXU-C5x8b8jJ.js} +1 -1
  64. package/build/assets/data-grid-overlay-editor-D7_bQukB-DqAp5wnt.js +1 -0
  65. package/build/assets/{downloader-DcCTL3Wz-BV_PV8FK.js → downloader-CZ7qD7NY-DGAnDDXL.js} +1 -1
  66. package/build/assets/{embed-DsUNNyuf-iklb31Eb.js → embed-Dc8baQ26-DAsqJZrc.js} +4 -4
  67. package/build/assets/{es6--XPcqeHG-CHWR2W_o.js → es6-BxevHr5y-DDD2E1qH.js} +2 -2
  68. package/build/assets/{formatNumber-C0_e-CAH-GlcLbdL6.js → formatNumber-DxMjoq14-D-XVTuz9.js} +1 -1
  69. package/build/assets/iconPosition-9UgvX_TD-BzkVt95G.js +1 -0
  70. package/build/assets/iframeResizer.contentWindow-CCqu70r3-2dQhJjwY.js +1 -0
  71. package/build/assets/{index-D8-_3_8b-1KPkAAUR.js → index-BV2WTlzI-BDu7x5w-.js} +1 -1
  72. package/build/assets/{index-rCmWIVzf.css → index-Bdx5V1kE.css} +1 -1
  73. package/build/assets/index-BoaYS_fk-BOYhDwkq.js +1 -0
  74. package/build/assets/{index-D84Izf2I-C_zQnNB2.js → index-CDNzkMOW-Ci5P-rfD.js} +1 -1
  75. package/build/assets/{index-DuHJMwJD-Bsr8Y8w7.js → index-CJ4tMOMA-DwN410du.js} +1 -1
  76. package/build/assets/{index-DXEnufEK-CPeh905k.js → index-Co96_X1M-Dl06Rnsd.js} +1 -1
  77. package/build/assets/index-DJf52eor.js +192 -0
  78. package/build/assets/{input-vJKt6Tqs-D1h27UxA.js → input-HUYzfsf9-BxmLV7Ek.js} +1 -1
  79. package/build/assets/{memory-B3L1Fctl-Cn5y4VWL.js → memory-C-LDMFc2-DmYLyk9H.js} +1 -1
  80. package/build/assets/{moment-CU6QKNej-DcQX_LE0.js → moment-C29_LcvN-BY3oO1nk.js} +1 -1
  81. package/build/assets/number-overlay-editor-BQXyYsVn-Dh7S4LVs.js +9 -0
  82. package/build/assets/{numbro-CBbENDeu-C6X7Pww4.js → numbro-CDdPhOTG-s-4vlRUZ.js} +1 -1
  83. package/build/assets/{pandasStylerUtils-GHHHScPD-CTKMoUtV.js → pandasStylerUtils-BVB-ECxE-CDURxvwo.js} +1 -1
  84. package/build/assets/{possibleConstructorReturn-E3G46ZYb-Lz9Rlt8w.js → possibleConstructorReturn-YeRoNy63-B2FGD3ja.js} +1 -1
  85. package/build/assets/reactJsonViewCompat-CeSrJm8p-le930912.js +13 -0
  86. package/build/assets/resolveDefaultExport-Cy5TTESD-D1yDGtVx.js +1 -0
  87. package/build/assets/{sandbox-ChAzL-i--BIq4nttm.js → sandbox-DbnteG5V-yqy_7sO8.js} +1 -1
  88. package/build/assets/select-haj_e3M_-P2nevO2w.js +11 -0
  89. package/build/assets/{sprintfjs-BB1ejNgh-D_XlFCD8.js → sprintfjs-DwuHM96D-Dbm-A0ro.js} +1 -1
  90. package/build/assets/stateful-menu-DhWFcRsJ-hkmyKt6q.js +4 -0
  91. package/build/assets/{styled-components-UJ_u5XUO-B68esmwJ.js → styled-components-BwoIjXty-eQCTyKeV.js} +1 -1
  92. package/build/assets/{styled-components-BF-9yHWP-Fq0Myn8O.js → styled-components-CRl5ROSi-CaifWlLZ.js} +1 -1
  93. package/build/assets/{styled-components-BPyosp2h-CHa8nolL.js → styled-components-CggDa8xh-DRn7YfuV.js} +1 -1
  94. package/build/assets/{threshold-eWsxmMyL-jpRnj60B.js → threshold-C_rop_uq-CSTNJaOo.js} +1 -1
  95. package/build/assets/timepicker-t1TdfIJG-CM4-XB8w.js +4 -0
  96. package/build/assets/{timer-DAAwtI0i-CB52lra-.js → timer-CuhnLtz1-DD8qTMUW.js} +1 -1
  97. package/build/assets/{toConsumableArray-fI4JT57_-CqtYDc1p.js → toConsumableArray-DtFGUM3A-BLxO6YGd.js} +1 -1
  98. package/build/assets/useBasicWidgetState-Bd8NTj87-Cqs9ZQAV.js +1 -0
  99. package/build/assets/{useIntlLocale-CYWMTZ3s-Bfz8l4j_.js → useIntlLocale-CXWYgGQX-B2q3sAu2.js} +9 -9
  100. package/build/assets/useSelectCommon-O2yZsfjb-6cuQoolB.js +1 -0
  101. package/build/assets/{useTextInputAutoExpand-DKFPNBDa-Cb0YY3m0.js → useTextInputAutoExpand-BTuNAk3V-5wcrsLsu.js} +2 -2
  102. package/build/assets/useUpdateUiValue-B574r2my-B36XHNQq.js +1 -0
  103. package/build/assets/useWaveformController-EemjKAv5-CT3VAgB8.js +1 -0
  104. package/build/assets/utils-DNbZWtPr-BHo82ec1.js +5 -0
  105. package/build/assets/{value-DwxUZIyI-CNuykc50.js → value-FXychKGJ-DfnNAqu8.js} +1 -1
  106. package/build/assets/wavesurfer.esm-BdCEnQA2-Cb5Yveqj.js +74 -0
  107. package/build/assets/withCalculatedWidth-CswVJ4Re-BeXEmgBt.js +1 -0
  108. package/build/assets/withFullScreenWrapper-CKo__VbV-B1HqecCF.js +1 -0
  109. package/build/assets/worker-DSGzx9v2-CeEZF0Hz.js +773 -0
  110. package/build/index.html +2 -2
  111. package/package.json +7 -7
  112. package/wheels/streamlit-1.56.0-cp313-none-any.whl +0 -0
  113. package/build/assets/9897c61aa169e10d-BSbTZIlv.woff2 +0 -0
  114. package/build/assets/FileHelper-6E1AHofU-qrMXF9BJ.js +0 -5
  115. package/build/assets/FormClearHelper-CbmTijuR-BhfBTvx4.js +0 -1
  116. package/build/assets/WidgetLabelHelpIcon-DGQ_r-QQ-BpBcjxpA.js +0 -1
  117. package/build/assets/WidgetLabelHelpIconInline-CBvJmNo2-CLxNkiVd.js +0 -1
  118. package/build/assets/data-grid-overlay-editor-QHhShSfm-3TuDDPoi.js +0 -1
  119. package/build/assets/iconPosition-DC20xXN5-Dq1FtUtw.js +0 -1
  120. package/build/assets/iframeResizer.contentWindow-CK2JqAeV-DqbaJEzN.js +0 -1
  121. package/build/assets/index-9BL32MjC-d0WHvbzb.js +0 -1
  122. package/build/assets/index-B4B1qPeD-B4iZ3Hle.js +0 -1
  123. package/build/assets/index-B5UL-R7r-CWJT9KeA.js +0 -1
  124. package/build/assets/index-BGnBFvx7-CovA4PPU.js +0 -1
  125. package/build/assets/index-BLF4SOe9-BATezQGi.js +0 -1
  126. package/build/assets/index-BVqn7psP-DOIOIfGO.js +0 -1
  127. package/build/assets/index-BWq44yej-BLlqoxJR.js +0 -2
  128. package/build/assets/index-BYY96E5j-Bp1H9cgU.js +0 -1
  129. package/build/assets/index-BZJBZSAA-DFqiOZai.js +0 -2
  130. package/build/assets/index-BjrlCNX2-LTYqrHHV.js +0 -1
  131. package/build/assets/index-BmK3aM70-BtZtyb9b.js +0 -2
  132. package/build/assets/index-BuOHAFyU-CgkpNrjG.js +0 -1
  133. package/build/assets/index-BwVivyUp-BMVGZ9_Q.js +0 -1
  134. package/build/assets/index-CDQEgcT1-DtNnQE5Q.js +0 -3
  135. package/build/assets/index-CSHbNsrd-CaeMETbK.js +0 -1
  136. package/build/assets/index-CStypS2h-ZcgczjKg.js +0 -1
  137. package/build/assets/index-CTUrfAxj--v8quZkn.js +0 -2
  138. package/build/assets/index-CYGEb27Q-2USI782v.js +0 -1
  139. package/build/assets/index-CZIHO3Hi-CIp8gy8I.js +0 -1
  140. package/build/assets/index-Cqst7YJT-C9v2_kdG.js +0 -1
  141. package/build/assets/index-DCNthJH_-DBm0ode_.js +0 -1
  142. package/build/assets/index-DKp3_2FO-qvF0epur.js +0 -1
  143. package/build/assets/index-Dd99Pbav-BGjrs667.js +0 -1
  144. package/build/assets/index-DegoUuPm.js +0 -171
  145. package/build/assets/index-DpazIH3n-D6BMkmZF.js +0 -1
  146. package/build/assets/index-LfSwL_C3-BhFtSxQv.js +0 -1
  147. package/build/assets/index-SfqmeEwF-Dq9F6PRu.js +0 -1
  148. package/build/assets/index-Zh4mTo6Q-BW_atvXh.js +0 -1
  149. package/build/assets/index-dDzvj0X4-DcwcRJ2U.js +0 -1
  150. package/build/assets/index-ebIdPrk5-uPj-BdYi.js +0 -1
  151. package/build/assets/index-glyZT6vh-DgW3Iulb.js +0 -11
  152. package/build/assets/index-hpzROwMA-mo9c0M0y.js +0 -1
  153. package/build/assets/index-t2JVnYeR-CxNAko6c.js +0 -198
  154. package/build/assets/main-B1Ej7gwo-CcTKNe5S.js +0 -13
  155. package/build/assets/number-overlay-editor-DJYV-edd-B_O-Ktcq.js +0 -9
  156. package/build/assets/select-Pj-68ff--fhVXPkd8.js +0 -14
  157. package/build/assets/timepicker-BJ4MpQyD-d8465QWp.js +0 -4
  158. package/build/assets/uniqueId-DvP0IaTe-DffbsNAr.js +0 -1
  159. package/build/assets/useBasicWidgetState-JbPrIror-Bu87DmaN.js +0 -1
  160. package/build/assets/useSelectCommon-DTdQ2TWs-DMezB-1T.js +0 -1
  161. package/build/assets/useUpdateUiValue-DMih0kWV-BWZ6Saew.js +0 -1
  162. package/build/assets/useWaveformController-BeUcMXLl-DLfXFMqt.js +0 -1
  163. package/build/assets/wavesurfer.esm-idh1jvYE-D4Wwdy60.js +0 -74
  164. package/build/assets/withCalculatedWidth-Du6RrD8E-CIxv0z4S.js +0 -1
  165. package/build/assets/withFullScreenWrapper-uh7txjJc-CYEgnXN4.js +0 -1
  166. package/build/assets/worker-DAN7Os1o-BP8Vk1l7.js +0 -106
  167. package/wheels/streamlit-1.55.0-cp313-none-any.whl +0 -0
  168. /package/build/assets/{index-BWXbSx5b-3ZGL6YOx.js → index-BKiUojFK-3ZGL6YOx.js} +0 -0
@@ -3,41 +3,41 @@
3
3
  import { createRequire } from "module";
4
4
  const require = createRequire(import.meta.url);
5
5
 
6
- var np=Object.create;var Ca=Object.defineProperty;var sp=Object.getOwnPropertyDescriptor;var op=Object.getOwnPropertyNames;var ap=Object.getPrototypeOf,lp=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 up=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of op(e))!lp.call(t,n)&&n!==r&&Ca(t,n,{get:()=>e[n],enumerable:!(i=sp(e,n))||i.enumerable});return t};var Ai=(t,e,r)=>(r=t!=null?np(ap(t)):{},up(e||!t||!t.__esModule?Ca(r,"default",{value:t,enumerable:!0}):r,t));var xe=_((yS,qa)=>{"use strict";var hs=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
7
- Found: ${e.toString().split(`
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(`
8
8
  `)[0]}
9
- `),Error.captureStackTrace(this,t)}};qa.exports=t=>{if(t.length>2)throw new hs(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var Fa=_((bS,ja)=>{var Na={};ja.exports=Na;var La={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(La).forEach(function(t){var e=La[t],r=Na[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var $a=_((wS,Ia)=>{"use strict";Ia.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 Ba=_((_S,Wa)=>{"use strict";var fp=L("os"),Ie=$a(),Se=process.env,Xt=void 0;Ie("no-color")||Ie("no-colors")||Ie("color=false")?Xt=!1:(Ie("color")||Ie("colors")||Ie("color=true")||Ie("color=always"))&&(Xt=!0);"FORCE_COLOR"in Se&&(Xt=Se.FORCE_COLOR.length===0||parseInt(Se.FORCE_COLOR,10)!==0);function cp(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function hp(t){if(Xt===!1)return 0;if(Ie("color=16m")||Ie("color=full")||Ie("color=truecolor"))return 3;if(Ie("color=256"))return 2;if(t&&!t.isTTY&&Xt!==!0)return 0;var e=Xt?1:0;if(process.platform==="win32"){var r=fp.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 Se)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in Se})||Se.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Se)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Se.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Se){var i=parseInt((Se.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Se.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Se.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Se.TERM)||"COLORTERM"in Se?1:(Se.TERM==="dumb",e)}function ds(t){var e=hp(t);return cp(e)}Wa.exports={supportsColor:ds,stdout:ds(process.stdout),stderr:ds(process.stderr)}});var za=_((vS,Ua)=>{Ua.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 Ga=_((SS,Ha)=>{Ha.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 Ya=_((ES,Va)=>{Va.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 Ja=_((RS,Ka)=>{Ka.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var Qa=_((xS,Za)=>{Za.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 el=_((TS,Xa)=>{Xa.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 ol=_((OS,sl)=>{var F={};sl.exports=F;F.themes={};var dp=L("util"),Ct=F.styles=Fa(),rl=Object.defineProperties,pp=new RegExp(/[\r\n]+/g);F.supportsColor=Ba().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 MS=F.stylize=function(e,r){if(!F.enabled)return e+"";var i=Ct[r];return!i&&r in F?F[r](e):i.open+e+i.close},gp=/[|\\{}()[\]^$+*?.]/g,mp=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(gp,"\\$&")};function il(t){var e=function r(){return bp.apply(r,arguments)};return e._styles=t,e.__proto__=yp,e}var nl=(function(){var t={};return Ct.grey=Ct.gray,Object.keys(Ct).forEach(function(e){Ct[e].closeRe=new RegExp(mp(Ct[e].close),"g"),t[e]={get:function(){return il(this._styles.concat(e))}}}),t})(),yp=rl(function(){},nl);function bp(){var t=Array.prototype.slice.call(arguments),e=t.map(function(o){return o!=null&&o.constructor===String?o:dp.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=Ct[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(pp,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 wp(){var t={};return Object.keys(nl).forEach(function(e){t[e]={get:function(){return il([e])}}}),t}var _p=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};F.trap=za();F.zalgo=Ga();F.maps={};F.maps.america=Ya()(F);F.maps.zebra=Ja()(F);F.maps.rainbow=Qa()(F);F.maps.random=el()(F);for(tl in F.maps)(function(t){F[t]=function(e){return _p(F.maps[t],e)}})(tl);var tl;rl(F,wp())});var ps=_((AS,al)=>{var vp=ol();al.exports=vp});var ll=_(gs=>{"use strict";gs.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};gs.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var ul=_(ms=>{"use strict";ms.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};ms.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var fl=_(ys=>{"use strict";ys.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};ys.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var cl=_(ki=>{"use strict";Object.defineProperty(ki,"cli",{value:ll()});Object.defineProperty(ki,"npm",{value:ul()});Object.defineProperty(ki,"syslog",{value:fl()})});var te=_(Ar=>{"use strict";Object.defineProperty(Ar,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Ar,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Ar,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Ar,"configs",{value:cl()})});var Ci=_((LS,Di)=>{"use strict";var _s=ps(),{LEVEL:bs,MESSAGE:ws}=te();_s.enabled=!0;var hl=/\s+/,Pi=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]=hl.test(e[n])?e[n].split(hl):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 _s[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=_s[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[ws]=="string"&&(e[ws]=this.colorize(e[bs],e.level,e[ws])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[bs],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[bs],e.level,e.message)),e}};Di.exports=t=>new Pi(t);Di.exports.Colorizer=Di.exports.Format=Pi});var pl=_((NS,dl)=>{"use strict";var{Colorizer:Sp}=Ci();dl.exports=t=>(Sp.addColors(t.colors||t),t)});var ml=_((jS,gl)=>{"use strict";var Ep=xe();gl.exports=Ep(t=>(t.message=` ${t.message}`,t))});var wl=_((FS,bl)=>{"use strict";var Rp=xe(),{LEVEL:yl,MESSAGE:vs}=te();bl.exports=Rp((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[yl]:t[yl]||t.level,message:t.message,[vs]:t[vs]||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[vs]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var Es=_((IS,Li)=>{"use strict";var{configs:xp,LEVEL:_l,MESSAGE:Ss}=te(),qi=class t{constructor(e={levels:xp.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[_l]]}${e.message}`,e[Ss]&&(e[Ss]=`${this.paddings[e[_l]]}${e[Ss]}`),e}};Li.exports=t=>new qi(t);Li.exports.Padder=Li.exports.Format=qi});var vl=_(($S,Rs)=>{"use strict";var{Colorizer:Tp}=Ci(),{Padder:Mp}=Es(),{configs:Op,MESSAGE:Ap}=te(),Ni=class{constructor(e={}){e.levels||(e.levels=Op.cli.levels),this.colorizer=new Tp(e),this.padder=new Mp(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[Ap]=`${e.level}:${e.message}`,e}};Rs.exports=t=>new Ni(t);Rs.exports.Format=Ni});var El=_((WS,xs)=>{"use strict";var kp=xe();function Sl(t){if(t.every(Pp))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 Pp(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}xs.exports=(...t)=>{let e=kp(Sl(t)),r=e();return r.Format=e.Format,r};xs.exports.cascade=Sl});var Pr=_((As,Tl)=>{"use strict";var{hasOwnProperty:kr}=Object.prototype,Lt=Os();Lt.configure=Os;Lt.stringify=Lt;Lt.default=Lt;As.stringify=Lt;As.configure=Os;Tl.exports=Lt;var Dp=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ct(t){return t.length<5e3&&!Dp.test(t)?`"${t}"`:JSON.stringify(t)}function Ts(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 Cp=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Ms(t){return Cp.call(t)!==void 0&&t.length!==0}function Rl(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 qp(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 Lp(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 Np(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 xl(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 qt(t){return t===1?"1 item":`${t} items`}function jp(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Fp(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 Os(t){t={...t};let e=Fp(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=qp(t),i=Np(t,"bigint"),n=Lp(t),s=typeof n=="function"?n:void 0,o=xl(t,"maximumDepth"),a=xl(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 ct(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 ie=Math.min(R.length,a),_e=0;for(;_e<ie-1;_e++){let at=l(String(_e),R,b,v,S,T);x+=at!==void 0?at:"null",x+=k}let ve=l(String(_e),R,b,v,S,T);if(x+=ve!==void 0?ve:"null",R.length-1>a){let at=R.length-a-1;x+=`${k}"... ${qt(at)} not stringified"`}return S!==""&&(x+=`
14
- ${I}`),b.pop(),`[${x}]`}let q=Object.keys(R),z=q.length;if(z===0)return"{}";if(o<b.length+1)return'"[Object]"';let C="",V="";S!==""&&(T+=S,k=`,
15
- ${T}`,C=" ");let re=Math.min(z,a);n&&!Ms(R)&&(q=Ts(q,s)),b.push(R);for(let ie=0;ie<re;ie++){let _e=q[ie],ve=l(_e,R,b,v,S,T);ve!==void 0&&(x+=`${V}${ct(_e)}:${C}${ve}`,V=k)}if(z>a){let ie=z-a;x+=`${V}"...":${C}"${qt(ie)} not stringified"`,V=k}return S!==""&&V.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 ct(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 z=Math.min(d.length,a),C=0;for(;C<z-1;C++){let re=u(String(C),d[C],b,v,S,T);x+=re!==void 0?re:"null",x+=k}let V=u(String(C),d[C],b,v,S,T);if(x+=V!==void 0?V:"null",d.length-1>a){let re=d.length-a-1;x+=`${k}"... ${qt(re)} not stringified"`}return S!==""&&(x+=`
20
- ${R}`),b.pop(),`[${x}]`}b.push(d);let I="";S!==""&&(T+=S,k=`,
21
- ${T}`,I=" ");let q="";for(let z of v){let C=u(z,d[z],b,v,S,T);C!==void 0&&(x+=`${q}${ct(z)}:${I}${C}`,q=k)}return S!==""&&q.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 ct(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 C=`
24
- ${S}`,V=`,
25
- ${S}`,re=Math.min(d.length,a),ie=0;for(;ie<re-1;ie++){let ve=c(String(ie),d[ie],b,v,S);C+=ve!==void 0?ve:"null",C+=V}let _e=c(String(ie),d[ie],b,v,S);if(C+=_e!==void 0?_e:"null",d.length-1>a){let ve=d.length-a-1;C+=`${V}"... ${qt(ve)} not stringified"`}return C+=`
26
- ${T}`,b.pop(),`[${C}]`}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="",q="",z=Math.min(x,a);Ms(d)&&(I+=Rl(d,k,a),R=R.slice(d.length),z-=d.length,q=k),n&&(R=Ts(R,s)),b.push(d);for(let C=0;C<z;C++){let V=R[C],re=c(V,d[V],b,v,S);re!==void 0&&(I+=`${q}${ct(V)}: ${re}`,q=k)}if(x>a){let C=x-a;I+=`${q}"...": "${qt(C)} not stringified"`,q=k}return q!==""&&(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 ct(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),q=0;for(;q<I-1;q++){let C=f(String(q),d[q],b);v+=C!==void 0?C:"null",v+=","}let z=f(String(q),d[q],b);if(v+=z!==void 0?z:"null",d.length-1>a){let C=d.length-a-1;v+=`,"... ${qt(C)} 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&&Ms(d)&&(v+=Rl(d,",",a),T=T.slice(d.length),k-=d.length,x=","),n&&(T=Ts(T,s)),b.push(d);for(let I=0;I<k;I++){let q=T[I],z=f(q,d[q],b);z!==void 0&&(v+=`${x}${ct(q)}:${z}`,x=",")}if(R>a){let I=R-a;v+=`${x}"...":"${qt(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,[],jp(d),v,"")}if(v.length!==0)return c("",m,[],v,"")}return f("",m,[])}return p}});var ks=_((BS,Ml)=>{"use strict";var Ip=xe(),{MESSAGE:$p}=te(),Wp=Pr();function Bp(t,e){return typeof e=="bigint"?e.toString():e}Ml.exports=Ip((t,e)=>{let r=Wp.configure(e);return t[$p]=r(t,e.replacer||Bp,e.space),t})});var Al=_((US,Ol)=>{"use strict";var Up=xe();Ol.exports=Up((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Pl=_((zS,kl)=>{"use strict";var zp=xe(),{MESSAGE:Hp}=te(),Gp=Pr();kl.exports=zp(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[Hp]=Gp(e),t})});var Cl=_((HS,Dl)=>{"use strict";var Vp=xe();function Yp(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 Kp(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}Dl.exports=Vp((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?Yp(t,i,r):e.fillWith?Kp(t,e.fillWith,r):t})});var Ll=_((GS,ql)=>{var er=1e3,tr=er*60,rr=tr*60,Nt=rr*24,Jp=Nt*7,Zp=Nt*365.25;ql.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Qp(t);if(r==="number"&&isFinite(t))return e.long?eg(t):Xp(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Qp(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*Zp;case"weeks":case"week":case"w":return r*Jp;case"days":case"day":case"d":return r*Nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*rr;case"minutes":case"minute":case"mins":case"min":case"m":return r*tr;case"seconds":case"second":case"secs":case"sec":case"s":return r*er;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Xp(t){var e=Math.abs(t);return e>=Nt?Math.round(t/Nt)+"d":e>=rr?Math.round(t/rr)+"h":e>=tr?Math.round(t/tr)+"m":e>=er?Math.round(t/er)+"s":t+"ms"}function eg(t){var e=Math.abs(t);return e>=Nt?ji(t,e,Nt,"day"):e>=rr?ji(t,e,rr,"hour"):e>=tr?ji(t,e,tr,"minute"):e>=er?ji(t,e,er,"second"):t+" ms"}function ji(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var jl=_((Dr,Nl)=>{"use strict";var tg=xe(),rg=Ll();Nl.exports=tg(t=>{let e=+new Date;return Dr.diff=e-(Dr.prevTime||e),Dr.prevTime=e,t.ms=`+${rg(Dr.diff)}`,t})});var $l=_((VS,Il)=>{"use strict";var ig=L("util").inspect,ng=xe(),{LEVEL:sg,MESSAGE:Fl,SPLAT:og}=te();Il.exports=ng((t,e={})=>{let r=Object.assign({},t);return delete r[sg],delete r[Fl],delete r[og],t[Fl]=ig(r,!1,e.depth||null,e.colorize),t})});var Wl=_((YS,Ii)=>{"use strict";var{MESSAGE:ag}=te(),Fi=class{constructor(e){this.template=e}transform(e){return e[ag]=this.template(e),e}};Ii.exports=t=>new Fi(t);Ii.exports.Printf=Ii.exports.Format=Fi});var zl=_((KS,Ul)=>{"use strict";var lg=xe(),{MESSAGE:Bl}=te(),ug=Pr();Ul.exports=lg(t=>{let e=ug(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Bl]=`${t.level}:${r} ${t.message} ${e}`:t[Bl]=`${t.level}:${r} ${t.message}`,t})});var Vl=_((JS,Gl)=>{"use strict";var fg=L("util"),{SPLAT:Hl}=te(),cg=/%[scdjifoO%]/g,hg=/%%/g,Ps=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[Hl]||e.splat||[],s=i.match(hg),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=fg.format(i,...n),e}transform(e){let r=e.message,i=e[Hl]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(cg);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}};Gl.exports=t=>new Ps(t)});var Kl=_(($i,Yl)=>{(function(t,e){typeof $i=="object"&&typeof Yl<"u"?e($i):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})($i,(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 H=[],ye=0,P=E.length;ye<P;ye++)H.push(E[ye].substr(0,A));return H}var u=function(E){return function(A,H){var ye=H[E].map(function(ke){return ke.toLowerCase()}),P=ye.indexOf(A.toLowerCase());return P>-1?P:null}};function c(E){for(var A=[],H=1;H<arguments.length;H++)A[H-1]=arguments[H];for(var ye=0,P=A;ye<P.length;ye++){var ke=P[ye];for(var Fe in ke)E[Fe]=ke[Fe]}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],q=[null,o],z=["isPm",o,function(E,A){var H=E.toLowerCase();return H===A.amPm[0]?0:H===A.amPm[1]?1:null}],C=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(E){var A=(E+"").match(/([+-]|\d\d)/gi);if(A){var H=+A[1]*60+parseInt(A[2],10);return A[0]==="+"?H:-H}return 0}],V={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,H=+(""+A.getFullYear()).substr(0,2);return+(""+(+E>68?H-1:H)+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:q,dddd:q,MMM:["month",o,u("monthNamesShort")],MMMM:["month",o,u("monthNames")],a:z,A:z,ZZ:C,Z:C},re={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"},ie=function(E){return c(re,E)},_e=function(E,A,H){if(A===void 0&&(A=re.default),H===void 0&&(H={}),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=re[A]||A;var ye=[];A=A.replace(a,function(ke,Fe){return ye.push(Fe),"@@@"});var P=c(c({},v),H);return A=A.replace(e,function(ke){return x[ke](E,P)}),A.replace(/@@@/g,function(){return ye.shift()})};function ve(E,A,H){if(H===void 0&&(H={}),typeof A!="string")throw new Error("Invalid format in fecha parse");if(A=re[A]||A,E.length>1e3)return null;var ye=new Date,P={year:ye.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ke=[],Fe=[],Ot=A.replace(a,function(Pt,ft){return Fe.push(T(ft)),"@@@"}),Zt={},lt={};Ot=T(Ot).replace(e,function(Pt){var ft=V[Pt],Or=ft[0],Ti=ft[1],Mi=ft[3];if(Zt[Or])throw new Error("Invalid format. "+Or+" specified twice in format");return Zt[Or]=!0,Mi&&(lt[Mi]=!0),ke.push(ft),"("+Ti+")"}),Object.keys(lt).forEach(function(Pt){if(!Zt[Pt])throw new Error("Invalid format. "+Pt+" is required in specified format")}),Ot=Ot.replace(/@@@/g,function(){return Fe.shift()});var At=E.match(new RegExp(Ot,"i"));if(!At)return null;for(var cs=c(c({},v),H),Me=1;Me<At.length;Me++){var Ei=ke[Me-1],Ri=Ei[0],xi=Ei[2],ut=xi?xi(At[Me],cs):+At[Me];if(ut==null)return null;P[Ri]=ut}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Qt;if(P.timezoneOffset==null){Qt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var kt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],Me=0,Mr=kt.length;Me<Mr;Me++)if(Zt[kt[Me][0]]&&P[kt[Me][0]]!==Qt[kt[Me][1]]())return null}else if(Qt=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 Qt}var at={format:_e,parse:ve,defaultI18n:b,setGlobalDateI18n:S,setGlobalDateMasks:ie};t.assign=c,t.default=at,t.format=_e,t.parse=ve,t.defaultI18n=b,t.setGlobalDateI18n=S,t.setGlobalDateMasks=ie,Object.defineProperty(t,"__esModule",{value:!0})}))});var Zl=_((ZS,Jl)=>{"use strict";var dg=Kl(),pg=xe();Jl.exports=pg((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():dg.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Xl=_((QS,Ql)=>{"use strict";var Ds=ps(),gg=xe(),{MESSAGE:Cs}=te();Ql.exports=gg((t,e)=>(e.level!==!1&&(t.level=Ds.strip(t.level)),e.message!==!1&&(t.message=Ds.strip(String(t.message))),e.raw!==!1&&t[Cs]&&(t[Cs]=Ds.strip(String(t[Cs]))),t))});var Ls=_(qs=>{"use strict";var mg=qs.format=xe();qs.levels=pl();function de(t,e){Object.defineProperty(mg,t,{get(){return e()},configurable:!0})}de("align",function(){return ml()});de("errors",function(){return wl()});de("cli",function(){return vl()});de("combine",function(){return El()});de("colorize",function(){return Ci()});de("json",function(){return ks()});de("label",function(){return Al()});de("logstash",function(){return Pl()});de("metadata",function(){return Cl()});de("ms",function(){return jl()});de("padLevels",function(){return Es()});de("prettyPrint",function(){return $l()});de("printf",function(){return Wl()});de("simple",function(){return zl()});de("splat",function(){return Vl()});de("timestamp",function(){return Zl()});de("uncolorize",function(){return Xl()})});var Ns=_(Wi=>{"use strict";var{format:eu}=L("util");Wi.warn={deprecated(t){return()=>{throw new Error(eu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([eu("{ %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]=Wi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Wi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var tu=_((tE,yg)=>{yg.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 js=_((rE,ru)=>{ru.exports=L("util").deprecate});var Fs=_((iE,iu)=>{iu.exports=L("stream")});var $s=_((nE,su)=>{"use strict";function bg(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(Is,this,t)):process.nextTick(Is,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(Bi,r):(r._writableState.errorEmitted=!0,process.nextTick(nu,r,s)):process.nextTick(nu,r,s):e?(process.nextTick(Bi,r),e(s)):process.nextTick(Bi,r)}),this)}function nu(t,e){Is(t,e),Bi(t)}function Bi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function wg(){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 Is(t,e){t.emit("error",e)}function _g(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}su.exports={destroy:bg,undestroy:wg,errorOrDestroy:_g}});var ir=_((sE,lu)=>{"use strict";var au={};function De(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,au[t]=n}function ou(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 vg(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Sg(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Eg(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&vg(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Sg(t," argument"))n=`The ${t} ${i} ${ou(e,"type")}`;else{let s=Eg(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${ou(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");lu.exports.codes=au});var Ws=_((oE,uu)=>{"use strict";var Rg=ir().codes.ERR_INVALID_OPT_VALUE;function xg(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Tg(t,e,r,i){var n=xg(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Rg(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}uu.exports={getHighWaterMark:Tg}});var fu=_((aE,Bs)=>{typeof Object.create=="function"?Bs.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Bs.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 tt=_((lE,zs)=>{try{if(Us=L("util"),typeof Us.inherits!="function")throw"";zs.exports=Us.inherits}catch{zs.exports=fu()}var Us});var mu=_((uE,gu)=>{"use strict";function cu(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 hu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cu(Object(r),!0).forEach(function(i){Mg(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Mg(t,e,r){return e=pu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Og(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function du(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,pu(i.key),i)}}function Ag(t,e,r){return e&&du(t.prototype,e),r&&du(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pu(t){var e=kg(t,"string");return typeof e=="symbol"?e:String(e)}function kg(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 Pg=L("buffer"),Ui=Pg.Buffer,Dg=L("util"),Hs=Dg.inspect,Cg=Hs&&Hs.custom||"inspect";function qg(t,e,r){Ui.prototype.copy.call(t,e,r)}gu.exports=(function(){function t(){Og(this,t),this.head=null,this.tail=null,this.length=0}return Ag(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 Ui.alloc(0);for(var i=Ui.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=Ui.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:Cg,value:function(r,i){return Hs(this,hu(hu({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var wu=_((Gs,bu)=>{var zi=L("buffer"),Ge=zi.Buffer;function yu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?bu.exports=zi:(yu(zi,Gs),Gs.Buffer=jt);function jt(t,e,r){return Ge(t,e,r)}jt.prototype=Object.create(Ge.prototype);yu(Ge,jt);jt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};jt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};jt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};jt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return zi.SlowBuffer(t)}});var qr=_(vu=>{"use strict";var Ys=wu().Buffer,_u=Ys.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 Lg(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 Ng(t){var e=Lg(t);if(typeof e!="string"&&(Ys.isEncoding===_u||!_u(t)))throw new Error("Unknown encoding: "+t);return e||t}vu.StringDecoder=Cr;function Cr(t){this.encoding=Ng(t);var e;switch(this.encoding){case"utf16le":this.text=Bg,this.end=Ug,e=4;break;case"utf8":this.fillLast=Ig,e=4;break;case"base64":this.text=zg,this.end=Hg,e=3;break;default:this.write=Gg,this.end=Vg;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ys.allocUnsafe(e)}Cr.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||""};Cr.prototype.end=Wg;Cr.prototype.text=$g;Cr.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 Vs(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function jg(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Vs(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Vs(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Vs(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Fg(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 Ig(t){var e=this.lastTotal-this.lastNeed,r=Fg(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 $g(t,e){var r=jg(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 Wg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Bg(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 Ug(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 zg(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 Hg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Gg(t){return t.toString(this.encoding)}function Vg(t){return t&&t.length?this.write(t):""}});var xu=_((cE,Ru)=>{"use strict";var Su=ir().codes.ERR_STREAM_PREMATURE_CLOSE;function Yg(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 Kg(){}function Jg(t){return t.setHeader&&typeof t.abort=="function"}function Eu(t,e,r){if(typeof e=="function")return Eu(t,null,e);e||(e={}),r=Yg(r||Kg);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 Su),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new Su),r.call(t,d)},p=function(){t.req.on("finish",a)};return Jg(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)}}Ru.exports=Eu});var Mu=_((hE,Tu)=>{"use strict";var Hi;function ht(t,e,r){return e=Zg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zg(t){var e=Qg(t,"string");return typeof e=="symbol"?e:String(e)}function Qg(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 Xg=xu(),dt=Symbol("lastResolve"),Ft=Symbol("lastReject"),Lr=Symbol("error"),Gi=Symbol("ended"),It=Symbol("lastPromise"),Ks=Symbol("handlePromise"),$t=Symbol("stream");function pt(t,e){return{value:t,done:e}}function em(t){var e=t[dt];if(e!==null){var r=t[$t].read();r!==null&&(t[It]=null,t[dt]=null,t[Ft]=null,e(pt(r,!1)))}}function tm(t){process.nextTick(em,t)}function rm(t,e){return function(r,i){t.then(function(){if(e[Gi]){r(pt(void 0,!0));return}e[Ks](r,i)},i)}}var im=Object.getPrototypeOf(function(){}),nm=Object.setPrototypeOf((Hi={get stream(){return this[$t]},next:function(){var e=this,r=this[Lr];if(r!==null)return Promise.reject(r);if(this[Gi])return Promise.resolve(pt(void 0,!0));if(this[$t].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Lr]?a(e[Lr]):o(pt(void 0,!0))})});var i=this[It],n;if(i)n=new Promise(rm(i,this));else{var s=this[$t].read();if(s!==null)return Promise.resolve(pt(s,!1));n=new Promise(this[Ks])}return this[It]=n,n}},ht(Hi,Symbol.asyncIterator,function(){return this}),ht(Hi,"return",function(){var e=this;return new Promise(function(r,i){e[$t].destroy(null,function(n){if(n){i(n);return}r(pt(void 0,!0))})})}),Hi),im),sm=function(e){var r,i=Object.create(nm,(r={},ht(r,$t,{value:e,writable:!0}),ht(r,dt,{value:null,writable:!0}),ht(r,Ft,{value:null,writable:!0}),ht(r,Lr,{value:null,writable:!0}),ht(r,Gi,{value:e._readableState.endEmitted,writable:!0}),ht(r,Ks,{value:function(s,o){var a=i[$t].read();a?(i[It]=null,i[dt]=null,i[Ft]=null,s(pt(a,!1))):(i[dt]=s,i[Ft]=o)},writable:!0}),r));return i[It]=null,Xg(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Ft];s!==null&&(i[It]=null,i[dt]=null,i[Ft]=null,s(n)),i[Lr]=n;return}var o=i[dt];o!==null&&(i[It]=null,i[dt]=null,i[Ft]=null,o(pt(void 0,!0))),i[Gi]=!0}),e.on("readable",tm.bind(null,i)),i};Tu.exports=sm});var Pu=_((dE,ku)=>{"use strict";function Ou(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 om(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){Ou(s,i,n,o,a,"next",l)}function a(l){Ou(s,i,n,o,a,"throw",l)}o(void 0)})}}function Au(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 am(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Au(Object(r),!0).forEach(function(i){lm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function lm(t,e,r){return e=um(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function um(t){var e=fm(t,"string");return typeof e=="symbol"?e:String(e)}function fm(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 cm=ir().codes.ERR_INVALID_ARG_TYPE;function hm(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 cm("iterable",["Iterable"],e);var n=new t(am({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=om(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}ku.exports=hm});var Bu=_((gE,Wu)=>{"use strict";Wu.exports=B;var nr;B.ReadableState=Lu;var pE=L("events").EventEmitter,qu=function(e,r){return e.listeners(r).length},jr=Fs(),Vi=L("buffer").Buffer,dm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pm(t){return Vi.from(t)}function gm(t){return Vi.isBuffer(t)||t instanceof dm}var Js=L("util"),N;Js&&Js.debuglog?N=Js.debuglog("stream"):N=function(){};var mm=mu(),io=$s(),ym=Ws(),bm=ym.getHighWaterMark,Yi=ir().codes,wm=Yi.ERR_INVALID_ARG_TYPE,_m=Yi.ERR_STREAM_PUSH_AFTER_EOF,vm=Yi.ERR_METHOD_NOT_IMPLEMENTED,Sm=Yi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,sr,Zs,Qs;tt()(B,jr);var Nr=io.errorOrDestroy,Xs=["error","close","destroy","pause","resume"];function Em(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 Lu(t,e,r){nr=nr||Fr(),t=t||{},typeof r!="boolean"&&(r=e instanceof nr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=bm(this,t,"readableHighWaterMark",r),this.buffer=new mm,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&&(sr||(sr=qr().StringDecoder),this.decoder=new sr(t.encoding),this.encoding=t.encoding)}function B(t){if(nr=nr||Fr(),!(this instanceof B))return new B(t);var e=this instanceof nr;this._readableState=new Lu(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),jr.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=io.destroy;B.prototype._undestroy=io.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=Vi.from(t,e),e=""),i=!0),Nu(this,t,e,!1,i)};B.prototype.unshift=function(t){return Nu(this,t,null,!0,!1)};function Nu(t,e,r,i,n){N("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Tm(t,s);else{var o;if(n||(o=Rm(s,e)),o)Nr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Vi.prototype&&(e=pm(e)),i)s.endEmitted?Nr(t,new Sm):eo(t,s,e,!0);else if(s.ended)Nr(t,new _m);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?eo(t,s,e,!1):ro(t,s)):eo(t,s,e,!1)}else i||(s.reading=!1,ro(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function eo(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&&Ki(t)),ro(t,e)}function Rm(t,e){var r;return!gm(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new wm("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){sr||(sr=qr().StringDecoder);var e=new sr(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 Du=1073741824;function xm(t){return t>=Du?t=Du:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Cu(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=xm(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.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?to(this):Ki(this),null;if(t=Cu(t,e),t===0&&e.ended)return e.length===0&&to(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=Cu(r,e)));var n;return t>0?n=Iu(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&&to(this)),n!==null&&this.emit("data",n),n};function Tm(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?Ki(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,ju(t)))}}function Ki(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(ju,t))}function ju(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,no(t)}function ro(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Mm,t,e))}function Mm(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}B.prototype._read=function(t){Nr(this,new vm("_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,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=Om(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&&$u(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),qu(t,"error")===0&&Nr(t,v)}Em(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 Om(t){return function(){var r=t._readableState;N("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&qu(t,"data")&&(r.flowing=!0,no(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=$u(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=jr.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?Ki(this):i.reading||process.nextTick(Am,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=jr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Fu,this),r};B.prototype.removeAllListeners=function(t){var e=jr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Fu,this),e};function Fu(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 Am(t){N("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(N("resume"),t.flowing=!t.readableListening,km(this,t)),t.paused=!1,this};function km(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Pm,t,e))}function Pm(t,e){N("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),no(t),e.flowing&&!e.reading&&t.read(0)}B.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 no(t){var e=t._readableState;for(N("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(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<Xs.length;s++)t.on(Xs[s],this.emit.bind(this,Xs[s]));return this._read=function(o){N("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return Zs===void 0&&(Zs=Mu()),Zs(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=Iu;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Iu(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 to(t){var e=t._readableState;N("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Dm,e,t))}function Dm(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"&&(B.from=function(t,e){return Qs===void 0&&(Qs=Pu()),Qs(B,t,e)});function $u(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Fr=_((mE,zu)=>{"use strict";var Cm=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};zu.exports=Ve;var Uu=Bu(),oo=ao();tt()(Ve,Uu);for(so=Cm(oo.prototype),Ji=0;Ji<so.length;Ji++)Zi=so[Ji],Ve.prototype[Zi]||(Ve.prototype[Zi]=oo.prototype[Zi]);var so,Zi,Ji;function Ve(t){if(!(this instanceof Ve))return new Ve(t);Uu.call(this,t),oo.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",qm)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function qm(){this._writableState.ended||process.nextTick(Lm,this)}function Lm(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var ao=_((yE,Ju)=>{"use strict";Ju.exports=K;function Gu(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ly(e,t)}}var or;K.WritableState=$r;var Nm={deprecate:js()},Vu=Fs(),Xi=L("buffer").Buffer,jm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fm(t){return Xi.from(t)}function Im(t){return Xi.isBuffer(t)||t instanceof jm}var uo=$s(),$m=Ws(),Wm=$m.getHighWaterMark,gt=ir().codes,Bm=gt.ERR_INVALID_ARG_TYPE,Um=gt.ERR_METHOD_NOT_IMPLEMENTED,zm=gt.ERR_MULTIPLE_CALLBACK,Hm=gt.ERR_STREAM_CANNOT_PIPE,Gm=gt.ERR_STREAM_DESTROYED,Vm=gt.ERR_STREAM_NULL_VALUES,Ym=gt.ERR_STREAM_WRITE_AFTER_END,Km=gt.ERR_UNKNOWN_ENCODING,ar=uo.errorOrDestroy;tt()(K,Vu);function Jm(){}function $r(t,e,r){or=or||Fr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Wm(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){iy(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 Gu(this)}$r.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty($r.prototype,"buffer",{get:Nm.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Qi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Qi=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(e){return Qi.call(this,e)?!0:this!==K?!1:e&&e._writableState instanceof $r}})):Qi=function(e){return e instanceof this};function K(t){or=or||Fr();var e=this instanceof or;if(!e&&!Qi.call(K,this))return new K(t);this._writableState=new $r(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)),Vu.call(this)}K.prototype.pipe=function(){ar(this,new Hm)};function Zm(t,e){var r=new Ym;ar(t,r),process.nextTick(e,r)}function Qm(t,e,r,i){var n;return r===null?n=new Vm:typeof r!="string"&&!e.objectMode&&(n=new Bm("chunk",["string","Buffer"],r)),n?(ar(t,n),process.nextTick(i,n),!1):!0}K.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Im(t);return s&&!Xi.isBuffer(t)&&(t=Fm(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Jm),i.ending?Zm(this,r):(s||Qm(this,i,t,r))&&(i.pendingcb++,n=ey(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&&Yu(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 Km(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Xm(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Xi.from(e,r)),e}Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ey(t,e,r,i,n,s){if(!r){var o=Xm(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 Gm("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function ty(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Ir,t,e),t._writableState.errorEmitted=!0,ar(t,i)):(n(i),t._writableState.errorEmitted=!0,ar(t,i),Ir(t,e))}function ry(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function iy(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new zm;if(ry(r),e)ty(t,r,i,e,n);else{var s=Ku(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Yu(t,r),i?process.nextTick(Hu,t,r,s,n):Hu(t,r,s,n)}}function Hu(t,e,r,i){r||ny(t,e),e.pendingcb--,i(),Ir(t,e)}function ny(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Yu(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 Gu(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}K.prototype._write=function(t,e,r){r(new Um("_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||ay(this,i,r),this};Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ku(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function sy(t,e){t._final(function(r){e.pendingcb--,r&&ar(t,r),e.prefinished=!0,t.emit("prefinish"),Ir(t,e)})}function oy(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(sy,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Ir(t,e){var r=Ku(e);if(r&&(oy(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 ay(t,e,r){e.ending=!0,Ir(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ly(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=uo.destroy;K.prototype._undestroy=uo.undestroy;K.prototype._destroy=function(t,e){e(t)}});var fo=_((bE,Xu)=>{"use strict";var uy=L("util"),Zu=ao(),{LEVEL:Qu}=te(),Wr=Xu.exports=function(e={}){Zu.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())})};uy.inherits(Wr,Zu);Wr.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[Qu]]){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)};Wr.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)};Wr.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[Qu]])&&(this.handleExceptions||r.exception!==!0))};Wr.prototype._nop=function(){}});var ho=_((wE,tf)=>{"use strict";var fy=L("util"),{LEVEL:co}=te(),ef=fo(),Br=tf.exports=function(e={}){if(ef.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))};fy.inherits(Br,ef);Br.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[co]])&&this.transport.log(e[co],e.message,e,this._nop),i(null)};Br.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[co],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Br.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
- `))};Br.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var lr=_((_E,po)=>{"use strict";po.exports=fo();po.exports.LegacyTransportStream=ho()});var sf=_((SE,nf)=>{"use strict";var cy=L("os"),{LEVEL:rf,MESSAGE:ur}=te(),hy=lr();nf.exports=class extends hy{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:cy.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[rf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[ur]}${this.eol}`):this._consoleError(e[ur]),r&&r();return}else if(this.consoleWarnLevels[e[rf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[ur]}${this.eol}`):this._consoleWarn(e[ur]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[ur]}${this.eol}`):this._consoleLog(e[ur]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var tn=_((en,of)=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.default=dy;function dy(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}of.exports=en.default});var lf=_((rn,af)=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};af.exports=rn.default});var cf=_(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.fallback=uf;mt.wrap=ff;var py=mt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,gy=mt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,my=mt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function uf(t){setTimeout(t,0)}function ff(t){return(e,...r)=>t(()=>e(...r))}var Ur;py?Ur=queueMicrotask:gy?Ur=setImmediate:my?Ur=process.nextTick:Ur=uf;mt.default=ff(Ur)});var mf=_((nn,gf)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.default=Sy;var yy=lf(),by=pf(yy),wy=cf(),_y=pf(wy),vy=Wt();function pf(t){return t&&t.__esModule?t:{default:t}}function Sy(t){return(0,vy.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return hf(i,r)}:(0,by.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return hf(i,r);r(null,i)})}function hf(t,e){return t.then(r=>{df(e,null,r)},r=>{df(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function df(t,e,r){try{t(e,r)}catch(i){(0,_y.default)(n=>{throw n},i)}}gf.exports=nn.default});var Wt=_(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.isAsyncIterable=rt.isAsyncGenerator=rt.isAsync=void 0;var Ey=mf(),Ry=xy(Ey);function xy(t){return t&&t.__esModule?t:{default:t}}function yf(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Ty(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function My(t){return typeof t[Symbol.asyncIterator]=="function"}function Oy(t){if(typeof t!="function")throw new Error("expected a function");return yf(t)?(0,Ry.default)(t):t}rt.default=Oy;rt.isAsync=yf;rt.isAsyncGenerator=Ty;rt.isAsyncIterable=My});var fr=_((sn,bf)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.default=Ay;function Ay(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}bf.exports=sn.default});var _f=_((on,wf)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});var ky=tn(),Py=go(ky),Dy=Wt(),Cy=go(Dy),qy=fr(),Ly=go(qy);function go(t){return t&&t.__esModule?t:{default:t}}on.default=(0,Ly.default)((t,e,r)=>{var i=(0,Py.default)(e)?[]:{};t(e,(n,s,o)=>{(0,Cy.default)(n)((a,...l)=>{l.length<2&&([l]=l),i[s]=l,o(a)})},n=>r(n,i))},3);wf.exports=on.default});var mo=_((an,vf)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=Ny;function Ny(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}vf.exports=an.default});var Ef=_((ln,Sf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Sf.exports=ln.default});var Tf=_((un,xf)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=zy;var jy=tn(),Fy=Rf(jy),Iy=Ef(),$y=Rf(Iy);function Rf(t){return t&&t.__esModule?t:{default:t}}function Wy(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function By(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Uy(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 zy(t){if((0,Fy.default)(t))return Wy(t);var e=(0,$y.default)(t);return e?By(e):Uy(t)}xf.exports=un.default});var yo=_((fn,Mf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=Hy;function Hy(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Mf.exports=fn.default});var hn=_((cn,Of)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var Gy={};cn.default=Gy;Of.exports=cn.default});var kf=_((dn,Af)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.default=Jy;var Vy=hn(),Yy=Ky(Vy);function Ky(t){return t&&t.__esModule?t:{default:t}}function Jy(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===Yy.default||n&&a<=0)return n=!0,i(null);u()}}function f(p){s||(o=!1,n=!0,i(p))}u()}Af.exports=dn.default});var qf=_((pn,Cf)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var Zy=mo(),Qy=zr(Zy),Xy=Tf(),eb=zr(Xy),tb=yo(),rb=zr(tb),Pf=Wt(),ib=kf(),Df=zr(ib),nb=hn(),sb=zr(nb);function zr(t){return t&&t.__esModule?t:{default:t}}pn.default=t=>(e,r,i)=>{if(i=(0,Qy.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Pf.isAsyncGenerator)(e))return(0,Df.default)(e,t,r,i);if((0,Pf.isAsyncIterable)(e))return(0,Df.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,eb.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===sb.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,rb.default)(u))}l=!1}c()};Cf.exports=pn.default});var wo=_((gn,Lf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var ob=qf(),ab=bo(ob),lb=Wt(),ub=bo(lb),fb=fr(),cb=bo(fb);function bo(t){return t&&t.__esModule?t:{default:t}}function hb(t,e,r,i){return(0,ab.default)(e)(t,(0,ub.default)(r),i)}gn.default=(0,cb.default)(hb,4);Lf.exports=gn.default});var Ff=_((mn,jf)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var db=wo(),pb=Nf(db),gb=fr(),mb=Nf(gb);function Nf(t){return t&&t.__esModule?t:{default:t}}function yb(t,e,r){return(0,pb.default)(t,1,e,r)}mn.default=(0,mb.default)(yb,3);jf.exports=mn.default});var Wf=_((yn,$f)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.default=Sb;var bb=_f(),wb=If(bb),_b=Ff(),vb=If(_b);function If(t){return t&&t.__esModule?t:{default:t}}function Sb(t,e){return(0,wb.default)(vb.default,t,e)}$f.exports=yn.default});var _o=_((xE,Bf)=>{Bf.exports=L("stream")});var Yf=_((TE,Vf)=>{"use strict";function Uf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function zf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uf(Object(r),!0).forEach(function(i){Eb(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Eb(t,e,r){return e=Gf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Gf(i.key),i)}}function xb(t,e,r){return e&&Hf(t.prototype,e),r&&Hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gf(t){var e=Tb(t,"string");return typeof e=="symbol"?e:String(e)}function Tb(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=L("buffer"),bn=Mb.Buffer,Ob=L("util"),vo=Ob.inspect,Ab=vo&&vo.custom||"inspect";function kb(t,e,r){bn.prototype.copy.call(t,e,r)}Vf.exports=(function(){function t(){Rb(this,t),this.head=null,this.tail=null,this.length=0}return xb(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return bn.alloc(0);for(var i=bn.allocUnsafe(r>>>0),n=this.head,s=0;n;)kb(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=bn.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:Ab,value:function(r,i){return vo(this,zf(zf({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var Eo=_((ME,Jf)=>{"use strict";function Pb(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(So,this,t)):process.nextTick(So,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(wn,r):(r._writableState.errorEmitted=!0,process.nextTick(Kf,r,s)):process.nextTick(Kf,r,s):e?(process.nextTick(wn,r),e(s)):process.nextTick(wn,r)}),this)}function Kf(t,e){So(t,e),wn(t)}function wn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Db(){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 So(t,e){t.emit("error",e)}function Cb(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Jf.exports={destroy:Pb,undestroy:Db,errorOrDestroy:Cb}});var yt=_((OE,Xf)=>{"use strict";var Qf={};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,Qf[t]=n}function Zf(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 qb(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Lb(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Nb(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"&&qb(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Lb(t," argument"))n=`The ${t} ${i} ${Zf(e,"type")}`;else{let s=Nb(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Zf(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");Xf.exports.codes=Qf});var Ro=_((AE,ec)=>{"use strict";var jb=yt().codes.ERR_INVALID_OPT_VALUE;function Fb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Ib(t,e,r,i){var n=Fb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new jb(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ec.exports={getHighWaterMark:Ib}});var Mo=_((kE,oc)=>{"use strict";oc.exports=J;function rc(t){var e=this;this.next=null,this.entry=null,this.finish=function(){h0(e,t)}}var cr;J.WritableState=Gr;var $b={deprecate:js()},ic=_o(),vn=L("buffer").Buffer,Wb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Bb(t){return vn.from(t)}function Ub(t){return vn.isBuffer(t)||t instanceof Wb}var To=Eo(),zb=Ro(),Hb=zb.getHighWaterMark,bt=yt().codes,Gb=bt.ERR_INVALID_ARG_TYPE,Vb=bt.ERR_METHOD_NOT_IMPLEMENTED,Yb=bt.ERR_MULTIPLE_CALLBACK,Kb=bt.ERR_STREAM_CANNOT_PIPE,Jb=bt.ERR_STREAM_DESTROYED,Zb=bt.ERR_STREAM_NULL_VALUES,Qb=bt.ERR_STREAM_WRITE_AFTER_END,Xb=bt.ERR_UNKNOWN_ENCODING,hr=To.errorOrDestroy;tt()(J,ic);function e0(){}function Gr(t,e,r){cr=cr||Bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Hb(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){a0(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 rc(this)}Gr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Gr.prototype,"buffer",{get:$b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var _n;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_n=Function.prototype[Symbol.hasInstance],Object.defineProperty(J,Symbol.hasInstance,{value:function(e){return _n.call(this,e)?!0:this!==J?!1:e&&e._writableState instanceof Gr}})):_n=function(e){return e instanceof this};function J(t){cr=cr||Bt();var e=this instanceof cr;if(!e&&!_n.call(J,this))return new J(t);this._writableState=new Gr(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)),ic.call(this)}J.prototype.pipe=function(){hr(this,new Kb)};function t0(t,e){var r=new Qb;hr(t,r),process.nextTick(e,r)}function r0(t,e,r,i){var n;return r===null?n=new Zb:typeof r!="string"&&!e.objectMode&&(n=new Gb("chunk",["string","Buffer"],r)),n?(hr(t,n),process.nextTick(i,n),!1):!0}J.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Ub(t);return s&&!vn.isBuffer(t)&&(t=Bb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=e0),i.ending?t0(this,r):(s||r0(this,i,t,r))&&(i.pendingcb++,n=n0(this,i,s,t,e,r)),n};J.prototype.cork=function(){this._writableState.corked++};J.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&nc(this,t))};J.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 Xb(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(J.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function i0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=vn.from(e,r)),e}Object.defineProperty(J.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function n0(t,e,r,i,n,s){if(!r){var o=i0(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 xo(t,e,!1,a,i,n,s);return l}function xo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Jb("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function s0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Hr,t,e),t._writableState.errorEmitted=!0,hr(t,i)):(n(i),t._writableState.errorEmitted=!0,hr(t,i),Hr(t,e))}function o0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function a0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Yb;if(o0(r),e)s0(t,r,i,e,n);else{var s=sc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nc(t,r),i?process.nextTick(tc,t,r,s,n):tc(t,r,s,n)}}function tc(t,e,r,i){r||l0(t,e),e.pendingcb--,i(),Hr(t,e)}function l0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nc(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,xo(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 rc(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(xo(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}J.prototype._write=function(t,e,r){r(new Vb("_write()"))};J.prototype._writev=null;J.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||c0(this,i,r),this};Object.defineProperty(J.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function sc(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function u0(t,e){t._final(function(r){e.pendingcb--,r&&hr(t,r),e.prefinished=!0,t.emit("prefinish"),Hr(t,e)})}function f0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(u0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Hr(t,e){var r=sc(e);if(r&&(f0(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 c0(t,e,r){e.ending=!0,Hr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function h0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});J.prototype.destroy=To.destroy;J.prototype._undestroy=To.undestroy;J.prototype._destroy=function(t,e){e(t)}});var Bt=_((PE,lc)=>{"use strict";var d0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};lc.exports=Ye;var ac=ko(),Ao=Mo();tt()(Ye,ac);for(Oo=d0(Ao.prototype),Sn=0;Sn<Oo.length;Sn++)En=Oo[Sn],Ye.prototype[En]||(Ye.prototype[En]=Ao.prototype[En]);var Oo,En,Sn;function Ye(t){if(!(this instanceof Ye))return new Ye(t);ac.call(this,t),Ao.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",p0)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function p0(){this._writableState.ended||process.nextTick(g0,this)}function g0(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Rn=_((DE,cc)=>{"use strict";var uc=yt().codes.ERR_STREAM_PREMATURE_CLOSE;function m0(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 y0(){}function b0(t){return t.setHeader&&typeof t.abort=="function"}function fc(t,e,r){if(typeof e=="function")return fc(t,null,e);e||(e={}),r=m0(r||y0);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 uc),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new uc),r.call(t,d)},p=function(){t.req.on("finish",a)};return b0(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)}}cc.exports=fc});var dc=_((CE,hc)=>{"use strict";var xn;function wt(t,e,r){return e=w0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w0(t){var e=_0(t,"string");return typeof e=="symbol"?e:String(e)}function _0(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 v0=Rn(),_t=Symbol("lastResolve"),Ut=Symbol("lastReject"),Vr=Symbol("error"),Tn=Symbol("ended"),zt=Symbol("lastPromise"),Po=Symbol("handlePromise"),Ht=Symbol("stream");function vt(t,e){return{value:t,done:e}}function S0(t){var e=t[_t];if(e!==null){var r=t[Ht].read();r!==null&&(t[zt]=null,t[_t]=null,t[Ut]=null,e(vt(r,!1)))}}function E0(t){process.nextTick(S0,t)}function R0(t,e){return function(r,i){t.then(function(){if(e[Tn]){r(vt(void 0,!0));return}e[Po](r,i)},i)}}var x0=Object.getPrototypeOf(function(){}),T0=Object.setPrototypeOf((xn={get stream(){return this[Ht]},next:function(){var e=this,r=this[Vr];if(r!==null)return Promise.reject(r);if(this[Tn])return Promise.resolve(vt(void 0,!0));if(this[Ht].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Vr]?a(e[Vr]):o(vt(void 0,!0))})});var i=this[zt],n;if(i)n=new Promise(R0(i,this));else{var s=this[Ht].read();if(s!==null)return Promise.resolve(vt(s,!1));n=new Promise(this[Po])}return this[zt]=n,n}},wt(xn,Symbol.asyncIterator,function(){return this}),wt(xn,"return",function(){var e=this;return new Promise(function(r,i){e[Ht].destroy(null,function(n){if(n){i(n);return}r(vt(void 0,!0))})})}),xn),x0),M0=function(e){var r,i=Object.create(T0,(r={},wt(r,Ht,{value:e,writable:!0}),wt(r,_t,{value:null,writable:!0}),wt(r,Ut,{value:null,writable:!0}),wt(r,Vr,{value:null,writable:!0}),wt(r,Tn,{value:e._readableState.endEmitted,writable:!0}),wt(r,Po,{value:function(s,o){var a=i[Ht].read();a?(i[zt]=null,i[_t]=null,i[Ut]=null,s(vt(a,!1))):(i[_t]=s,i[Ut]=o)},writable:!0}),r));return i[zt]=null,v0(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Ut];s!==null&&(i[zt]=null,i[_t]=null,i[Ut]=null,s(n)),i[Vr]=n;return}var o=i[_t];o!==null&&(i[zt]=null,i[_t]=null,i[Ut]=null,o(vt(void 0,!0))),i[Tn]=!0}),e.on("readable",E0.bind(null,i)),i};hc.exports=M0});var yc=_((qE,mc)=>{"use strict";function pc(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 O0(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){pc(s,i,n,o,a,"next",l)}function a(l){pc(s,i,n,o,a,"throw",l)}o(void 0)})}}function gc(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 A0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(r),!0).forEach(function(i){k0(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function k0(t,e,r){return e=P0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P0(t){var e=D0(t,"string");return typeof e=="symbol"?e:String(e)}function D0(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 C0=yt().codes.ERR_INVALID_ARG_TYPE;function q0(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 C0("iterable",["Iterable"],e);var n=new t(A0({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=O0(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}mc.exports=q0});var ko=_((NE,Mc)=>{"use strict";Mc.exports=U;var dr;U.ReadableState=vc;var LE=L("events").EventEmitter,_c=function(e,r){return e.listeners(r).length},Kr=_o(),Mn=L("buffer").Buffer,L0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function N0(t){return Mn.from(t)}function j0(t){return Mn.isBuffer(t)||t instanceof L0}var Do=L("util"),j;Do&&Do.debuglog?j=Do.debuglog("stream"):j=function(){};var F0=Yf(),Io=Eo(),I0=Ro(),$0=I0.getHighWaterMark,On=yt().codes,W0=On.ERR_INVALID_ARG_TYPE,B0=On.ERR_STREAM_PUSH_AFTER_EOF,U0=On.ERR_METHOD_NOT_IMPLEMENTED,z0=On.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pr,Co,qo;tt()(U,Kr);var Yr=Io.errorOrDestroy,Lo=["error","close","destroy","pause","resume"];function H0(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 vc(t,e,r){dr=dr||Bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof dr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=$0(this,t,"readableHighWaterMark",r),this.buffer=new F0,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&&(pr||(pr=qr().StringDecoder),this.decoder=new pr(t.encoding),this.encoding=t.encoding)}function U(t){if(dr=dr||Bt(),!(this instanceof U))return new U(t);var e=this instanceof dr;this._readableState=new vc(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});U.prototype.destroy=Io.destroy;U.prototype._undestroy=Io.undestroy;U.prototype._destroy=function(t,e){e(t)};U.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=Mn.from(t,e),e=""),i=!0),Sc(this,t,e,!1,i)};U.prototype.unshift=function(t){return Sc(this,t,null,!0,!1)};function Sc(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Y0(t,s);else{var o;if(n||(o=G0(s,e)),o)Yr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Mn.prototype&&(e=N0(e)),i)s.endEmitted?Yr(t,new z0):No(t,s,e,!0);else if(s.ended)Yr(t,new B0);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?No(t,s,e,!1):Fo(t,s)):No(t,s,e,!1)}else i||(s.reading=!1,Fo(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function No(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&&An(t)),Fo(t,e)}function G0(t,e){var r;return!j0(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new W0("chunk",["string","Buffer","Uint8Array"],e)),r}U.prototype.isPaused=function(){return this._readableState.flowing===!1};U.prototype.setEncoding=function(t){pr||(pr=qr().StringDecoder);var e=new pr(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 bc=1073741824;function V0(t){return t>=bc?t=bc:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function wc(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=V0(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}U.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?jo(this):An(this),null;if(t=wc(t,e),t===0&&e.ended)return e.length===0&&jo(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=wc(r,e)));var n;return t>0?n=xc(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&&jo(this)),n!==null&&this.emit("data",n),n};function Y0(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?An(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ec(t)))}}function An(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(Ec,t))}function Ec(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,$o(t)}function Fo(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(K0,t,e))}function K0(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}U.prototype._read=function(t){Yr(this,new U0("_read()"))};U.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=J0(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&&Tc(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),_c(t,"error")===0&&Yr(t,v)}H0(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 J0(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&_c(t,"data")&&(r.flowing=!0,$o(t))}}U.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=Tc(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)};U.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,j("on readable",i.length,i.reading),i.length?An(this):i.reading||process.nextTick(Z0,this)),r};U.prototype.addListener=U.prototype.on;U.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Rc,this),r};U.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Rc,this),e};function Rc(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 Z0(t){j("readable nexttick read 0"),t.read(0)}U.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,Q0(this,t)),t.paused=!1,this};function Q0(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(X0,t,e))}function X0(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),$o(t),e.flowing&&!e.reading&&t.read(0)}U.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 $o(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}U.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<Lo.length;s++)t.on(Lo[s],this.emit.bind(this,Lo[s]));return this._read=function(o){j("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return Co===void 0&&(Co=dc()),Co(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(e){this._readableState&&(this._readableState.flowing=e)}});U._fromList=xc;Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xc(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 jo(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(ew,e,t))}function ew(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"&&(U.from=function(t,e){return qo===void 0&&(qo=yc()),qo(U,t,e)});function Tc(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Wo=_((jE,Ac)=>{"use strict";Ac.exports=it;var kn=yt().codes,tw=kn.ERR_METHOD_NOT_IMPLEMENTED,rw=kn.ERR_MULTIPLE_CALLBACK,iw=kn.ERR_TRANSFORM_ALREADY_TRANSFORMING,nw=kn.ERR_TRANSFORM_WITH_LENGTH_0,Pn=Bt();tt()(it,Pn);function sw(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new rw);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 it(t){if(!(this instanceof it))return new it(t);Pn.call(this,t),this._transformState={afterTransform:sw.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",ow)}function ow(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Oc(t,e,r)}):Oc(this,null,null)}it.prototype.push=function(t,e){return this._transformState.needTransform=!1,Pn.prototype.push.call(this,t,e)};it.prototype._transform=function(t,e,r){r(new tw("_transform()"))};it.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)}};it.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};it.prototype._destroy=function(t,e){Pn.prototype._destroy.call(this,t,function(r){e(r)})};function Oc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new nw;if(t._transformState.transforming)throw new iw;return t.push(null)}});var Dc=_((FE,Pc)=>{"use strict";Pc.exports=Jr;var kc=Wo();tt()(Jr,kc);function Jr(t){if(!(this instanceof Jr))return new Jr(t);kc.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var jc=_((IE,Nc)=>{"use strict";var Bo;function aw(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Lc=yt().codes,lw=Lc.ERR_MISSING_ARGS,uw=Lc.ERR_STREAM_DESTROYED;function Cc(t){if(t)throw t}function fw(t){return t.setHeader&&typeof t.abort=="function"}function cw(t,e,r,i){i=aw(i);var n=!1;t.on("close",function(){n=!0}),Bo===void 0&&(Bo=Rn()),Bo(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,fw(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new uw("pipe"))}}}function qc(t){t()}function hw(t,e){return t.pipe(e)}function dw(t){return!t.length||typeof t[t.length-1]!="function"?Cc:t.pop()}function pw(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=dw(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new lw("streams");var n,s=e.map(function(o,a){var l=a<e.length-1,u=a>0;return cw(o,l,u,function(c){n||(n=c),c&&s.forEach(qc),!l&&(s.forEach(qc),i(n))})});return e.reduce(hw)}Nc.exports=pw});var Gt=_((qe,Qr)=>{var Zr=L("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(qe=Qr.exports=ko(),qe.Stream=Zr||qe,qe.Readable=qe,qe.Writable=Mo(),qe.Duplex=Bt(),qe.Transform=Wo(),qe.PassThrough=Dc(),qe.finished=Rn(),qe.pipeline=jc())});var Ko=_(($E,Ic)=>{var gr=[],Xr=[],Uo=function(){};function Ho(t){return~gr.indexOf(t)?!1:(gr.push(t),!0)}function Go(t){Uo=t}function gw(t){for(var e=[],r=0;r<gr.length;r++){if(gr[r].async){e.push(gr[r]);continue}if(gr[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 Vo(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function zo(){Uo.apply(Uo,arguments)}function Fc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function Yo(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function mw(t){return t.enabled=!1,t.modify=Vo,t.set=Go,t.use=Ho,Yo(function(){return!1},t)}function yw(t){function e(){var r=Array.prototype.slice.call(arguments,0);return zo.call(zo,t,Fc(r,t)),!0}return t.enabled=!0,t.modify=Vo,t.set=Go,t.use=Ho,Yo(e,t)}Ic.exports=function(e){return e.introduce=Yo,e.enabled=gw,e.process=Fc,e.modify=Vo,e.write=zo,e.nope=mw,e.yep=yw,e.set=Go,e.use=Ho,e}});var Wc=_((WE,$c)=>{var bw=Ko(),ww=bw(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)});$c.exports=ww});var Vc=_((BE,Gc)=>{"use strict";var Ke={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]},Uc=Object.create(null);for(let t in Ke)Object.hasOwn(Ke,t)&&(Uc[Ke[t]]=t);var ae={to:{},get:{}};ae.get=function(t){let e=t.slice(0,3).toLowerCase(),r,i;switch(e){case"hsl":{r=ae.get.hsl(t),i="hsl";break}case"hwb":{r=ae.get.hwb(t),i="hwb";break}default:{r=ae.get.rgb(t),i="rgb";break}}return r?{model:i,value:r}:null};ae.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(Ke,a[1])?(o=Ke[a[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=St(o[l],0,255);return o[3]=St(o[3],0,1),o};ae.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=St(Number.parseFloat(r[2]),0,100),o=St(Number.parseFloat(r[3]),0,100),a=St(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ae.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=St(Number.parseFloat(r[2]),0,100),o=St(Number.parseFloat(r[3]),0,100),a=St(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ae.to.hex=function(...t){return"#"+Dn(t[0])+Dn(t[1])+Dn(t[2])+(t[3]<1?Dn(Math.round(t[3]*255)):"")};ae.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]+")"};ae.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]+")"};ae.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]+")"};ae.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};ae.to.keyword=function(...t){return Uc[t.slice(0,3)]};function St(t,e,r){return Math.min(Math.max(e,t),r)}function Dn(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var zc={};for(let t of Object.keys(Ke))zc[Ke[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"]}},nt=(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 yr(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=yr(t[0]/255),r=yr(t[1]/255),i=yr(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 _w(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=zc[t];if(e)return e;let r=Number.POSITIVE_INFINITY,i;for(let n of Object.keys(Ke)){let s=Ke[n],o=_w(t,s);o<r&&(r=o,i=n)}return i};M.keyword.rgb=function(t){return Ke[t]};M.rgb.xyz=function(t){let e=yr(t[0]/255),r=yr(t[1]/255),i=yr(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>nt?r**(1/3):7.787*r+16/116,i=i>nt?i**(1/3):7.787*i+16/116,n=n>nt?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>nt?e**(1/3):7.787*e+16/116,r=r>nt?r**(1/3):7.787*r+16/116,i=i>nt?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>nt?a:(s-16/116)/7.787,n=l>nt?l:(n-16/116)/7.787,o=u>nt?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 vw(){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 Sw(t){let e=vw(),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 Ew(t,e){return function(r){return e(t(r))}}function Rw(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=Ew(M[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}function xw(t){let e=Sw(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]=Rw(o,e))}return r}var le={},Tw=Object.keys(M);function Mw(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 Ow(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 Tw){le[t]={},Object.defineProperty(le[t],"channels",{value:M[t].channels}),Object.defineProperty(le[t],"labels",{value:M[t].labels});let e=xw(t),r=Object.keys(e);for(let i of r){let n=e[i];le[t][i]=Ow(n),le[t][i].raw=Mw(n)}}var Hc=["keyword","gray","hex"],Jo={};for(let t of Object.keys(le))Jo[[...le[t].labels].sort().join("")]=t;var Zo={};function oe(t,e){if(!(this instanceof oe))return new oe(t,e);if(e&&e in Hc&&(e=null),e&&!(e in le))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 oe)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let n=ae.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);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(t.length>0){this.model=e||"rgb",i=le[this.model].channels;let n=Array.prototype.slice.call(t,0,i);this.color=Qo(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 Jo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Jo[s];let{labels:o}=le[this.model],a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=Qo(a)}if(Zo[this.model])for(i=le[this.model].channels,r=0;r<i;r++){let n=Zo[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)}oe.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in ae.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return ae.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 ae.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=le[this.model],{labels:r}=le[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 oe([...this.color.map(kw(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new oe([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:Z("rgb",0,se(255)),green:Z("rgb",1,se(255)),blue:Z("rgb",2,se(255)),hue:Z(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:Z("hsl",1,se(100)),lightness:Z("hsl",2,se(100)),saturationv:Z("hsv",1,se(100)),value:Z("hsv",2,se(100)),chroma:Z("hcg",1,se(100)),gray:Z("hcg",2,se(100)),white:Z("hwb",1,se(100)),wblack:Z("hwb",2,se(100)),cyan:Z("cmyk",0,se(100)),magenta:Z("cmyk",1,se(100)),yellow:Z("cmyk",2,se(100)),black:Z("cmyk",3,se(100)),x:Z("xyz",0,se(95.047)),y:Z("xyz",1,se(100)),z:Z("xyz",2,se(108.833)),l:Z("lab",0,se(100)),a:Z("lab",1),b:Z("lab",2),keyword(t){return t!==void 0?new oe(t):le[this.model].keyword(this.color)},hex(t){return t!==void 0?new oe(t):ae.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new oe(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),ae.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 oe.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 oe.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(le)){if(Hc.includes(t))continue;let{channels:e}=le[t];oe.prototype[t]=function(...r){return this.model===t?new oe(this):r.length>0?new oe(r,t):new oe([...Pw(le[this.model][t].raw(this.color)),this.valpha],t)},oe[t]=function(...r){let i=r[0];return typeof i=="number"&&(i=Qo(r,e)),new oe(i,t)}}function Aw(t,e){return Number(t.toFixed(e))}function kw(t){return function(e){return Aw(e,t)}}function Z(t,e,r){t=Array.isArray(t)?t:[t];for(let i of t)(Zo[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 se(t){return function(e){return Math.max(0,Math.min(t,e))}}function Pw(t){return Array.isArray(t)?t:[t]}function Qo(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function Dw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Cw=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},Bc=Dw(Cw);function qw(t,e){let r=t.split(e||":"),i=Bc(r[0]);if(!r.length)return i;for(let n=0,s=r.length-1;n<s;n++)i=oe(i).mix(oe(Bc(r[n+1]))).saturate(1).hex();return i}Gc.exports=qw});var Kc=_((UE,Yc)=>{"use strict";function $e(t,e){if(e)return new $e(t).style(e);if(!(this instanceof $e))return new $e(t);this.text=t}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};$e.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,o=i/255*5;return this.ansi(n,s,o)};$e.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};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Yc.exports=$e});var Zc=_((zE,Jc)=>{var Lw=Vc(),Nw=Kc();Jc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?Nw(i+":",Lw(i)):i+":";return e[0]=n+" "+e[0],e}});var Xc=_((HE,Qc)=>{"use strict";Qc.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 th=_((GE,eh)=>{var jw=Xc();eh.exports=function(e){return function(i){try{return jw(i,e())}catch{}return!1}}});var ih=_((VE,rh)=>{var Fw=th();rh.exports=Fw(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var sh=_((YE,nh)=>{nh.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var ah=_((KE,oh)=>{var Iw=Ko(),$w=L("tty").isatty(1),Cn=Iw(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:$w,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Cn.modify(Zc());Cn.use(ih());Cn.set(sh());oh.exports=Cn});var ei=_((JE,Xo)=>{process.env.NODE_ENV==="production"?Xo.exports=Wc():Xo.exports=ah()});var uh=_((ZE,lh)=>{"use strict";var ea=L("fs"),{StringDecoder:Ww}=L("string_decoder"),{Stream:Bw}=Gt();function Uw(){}lh.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new Ww("utf8"),n=new Bw,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")},ea.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){ea.close(u,Uw);return}return ea.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 dh=_((XE,hh)=>{"use strict";var Te=L("fs"),ue=L("path"),fh=Wf(),zw=L("zlib"),{MESSAGE:Hw}=te(),{Stream:Gw,PassThrough:ch}=Gt(),Vw=lr(),We=ei()("winston:file"),Yw=L("os"),Kw=uh();hh.exports=class extends Vw{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 ch,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?ue.basename(e.filename):"winston.log",this.dirname=e.dirname||ue.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=ue.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:Yw.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[Hw]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,We("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let 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(e,r){typeof e=="function"&&(r=e,e={}),e=f(e);let i=ue.join(this.dirname,this.filename),n="",s=[],o=0,a=Te.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=ue.join(this.dirname,this.filename),i=new Gw,n={file:r,start:e.start};return i.destroy=Kw(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);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(e){let r=this._getFile(),i=ue.join(this.dirname,r);Te.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return We(`err ${n.code} ${i}`),e(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ue.join(this.dirname,this.filename);We("create stream start",r,this.options);let i=Te.createWriteStream(r,this.options).on("error",n=>We(n)).on("close",()=>We("close",i.path,i.bytesWritten)).on("open",()=>{We("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ch,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return We("create stream ok",r),i}_incFile(e){We("_incFile",this.filename);let r=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)),fh(n,e)}_getFile(){let e=ue.extname(this._basename),r=ue.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=ue.join(this.dirname,a);Te.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=ue.join(this.dirname,u);Te.exists(c,f=>{if(!f)return l(null);u=`${r}${a}${e}${s}`,Te.rename(c,ue.join(this.dirname,u),l)})}.bind(this,o));fh(n,()=>{Te.rename(ue.join(this.dirname,`${r}${e}${s}`),ue.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){Te.access(e,Te.F_OK,n=>{if(n)return i();var s=zw.createGzip(),o=Te.createReadStream(e),a=Te.createWriteStream(r);a.on("finish",()=>{Te.unlink(e,i)}),o.pipe(s).pipe(a)})}_createLogDirIfNotExist(e){Te.existsSync(e)||Te.mkdirSync(e,{recursive:!0})}}});var gh=_((t2,ph)=>{"use strict";var Jw=L("http"),Zw=L("https"),{Stream:Qw}=Gt(),Xw=lr(),{configure:e_}=Pr();ph.exports=class extends Xw{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 Qw;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?Zw:Jw).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=e_({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var ta=_((r2,mh)=>{"use strict";var Je=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Je.writable=t=>Je(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Je.readable=t=>Je(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Je.duplex=t=>Je.writable(t)&&Je.readable(t);Je.transform=t=>Je.duplex(t)&&typeof t._transform=="function";mh.exports=Je});var bh=_((n2,yh)=>{"use strict";var t_=ta(),{MESSAGE:r_}=te(),i_=L("os"),n_=lr();yh.exports=class extends n_{constructor(e={}){if(super(e),!e.stream||!t_(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:i_.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[r_]}${this.eol}`),r&&r()}}});var wh=_(ti=>{"use strict";Object.defineProperty(ti,"Console",{configurable:!0,enumerable:!0,get(){return sf()}});Object.defineProperty(ti,"File",{configurable:!0,enumerable:!0,get(){return dh()}});Object.defineProperty(ti,"Http",{configurable:!0,enumerable:!0,get(){return gh()}});Object.defineProperty(ti,"Stream",{configurable:!0,enumerable:!0,get(){return bh()}})});var Ln=_(ri=>{"use strict";var qn=Ls(),{configs:ra}=te();ri.cli=qn.levels(ra.cli);ri.npm=qn.levels(ra.npm);ri.syslog=qn.levels(ra.syslog);ri.addColors=qn.levels});var vh=_((Nn,_h)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var s_=tn(),o_=Vt(s_),a_=hn(),l_=Vt(a_),u_=wo(),f_=Vt(u_),c_=mo(),h_=Vt(c_),d_=yo(),p_=Vt(d_),g_=Wt(),m_=Vt(g_),y_=fr(),b_=Vt(y_);function Vt(t){return t&&t.__esModule?t:{default:t}}function w_(t,e,r){r=(0,h_.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===l_.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,p_.default)(a))}function __(t,e,r){return(0,f_.default)(t,1/0,e,r)}function v_(t,e,r){var i=(0,o_.default)(t)?w_:__;return i(t,(0,m_.default)(e),r)}Nn.default=(0,b_.default)(v_,3);_h.exports=Nn.default});var Eh=_((jn,Sh)=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.default=S_;function S_(t){return(e,r,i)=>t(e,i)}Sh.exports=jn.default});var $n=_((In,Rh)=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var E_=vh(),R_=Fn(E_),x_=Eh(),T_=Fn(x_),M_=Wt(),O_=Fn(M_),A_=fr(),k_=Fn(A_);function Fn(t){return t&&t.__esModule?t:{default:t}}function P_(t,e,r){return(0,R_.default)(t,(0,T_.default)((0,O_.default)(e)),r)}In.default=(0,k_.default)(P_,3);Rh.exports=In.default});var Th=_((a2,xh)=>{"use strict";var D_=Object.prototype.toString;xh.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=D_.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var ia=_((l2,Mh)=>{"use strict";var C_=Th();Mh.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=C_(e),n}});var na=_(ni=>{ni.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||ni.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};ni.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 ii(t){for(var e in t)this[e]=t[e]}var q_=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],L_=["topLevel","eval","native","constructor"];q_.forEach(function(t){ii.prototype[t]=null,ii.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});L_.forEach(function(t){ii.prototype[t]=!1,ii.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});ni._createParsedCallSite=function(t){return new ii(t)}});var Ah=_((c2,Oh)=>{"use strict";var{Writable:N_}=Gt();Oh.exports=class extends N_{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 oa=_((d2,Dh)=>{"use strict";var kh=L("os"),j_=$n(),sa=ei()("winston:exception"),F_=ia(),Ph=na(),I_=Ah();Dh.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:kh.loadavg(),uptime:kh.uptime()}}getTrace(e){return(e?Ph.parse(e):Ph.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 I_(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(){sa("doExit",n),sa("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);j_(i,(a,l)=>{let u=F_(l),c=a.transport||a;function f(p){return()=>{sa(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 qh=_((g2,Ch)=>{"use strict";var{Writable:$_}=Gt();Ch.exports=class extends $_{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 la=_((y2,jh)=>{"use strict";var Lh=L("os"),W_=$n(),aa=ei()("winston:rejection"),B_=ia(),Nh=na(),U_=qh();jh.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:Lh.loadavg(),uptime:Lh.uptime()}}getTrace(e){return(e?Nh.parse(e):Nh.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 U_(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(){aa("doExit",n),aa("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);W_(i,(a,l)=>{let u=B_(l),c=a.transport||a;function f(p){return()=>{aa(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 Ih=_((b2,Fh)=>{"use strict";var ua=class{constructor(e){let r=Wn();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)}};Fh.exports=ua});var Wn=_((w2,Uh)=>{"use strict";var{Stream:z_,Transform:H_}=Gt(),$h=$n(),{LEVEL:Ze,SPLAT:Wh}=te(),Bh=ta(),G_=oa(),V_=la(),Y_=ho(),K_=Ih(),{warn:J_}=Ns(),Z_=Ln(),Q_=/%[scdjifoO%]/g,Bn=class extends H_{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||ks()(),this.defaultMeta=i||null,this.levels=n||this.levels||Z_.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new G_(this),this.rejections=new V_(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=si(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,i)=>{let n=si(this.levels,i.level);return n!==null&&n>r?n:r},e)}isLevelEnabled(e){let r=si(this.levels,e);if(r===null)return!1;let i=si(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let o=si(this.levels,s.level);return o===null&&(o=i),o>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Ze]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Ze]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Ze]: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(Q_))){let o=Object.assign({},this.defaultMeta,n,{[Ze]:e,[Wh]: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,{[Ze]:e,[Wh]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[Ze]||(e[Ze]=e.level),!this.levels[e[Ze]]&&this.levels[e[Ze]]!==0&&console.error("[winston] Unknown logger level: %s",e[Ze]),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();$h(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!Bh(e)||e.log.length>2?new Y_({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(!Bh(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(){J_.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})}$h(this.transports.filter(a=>!!a.query),o,()=>r(null,i))}stream(e={}){let r=new z_,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 K_(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 si(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Bn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Uh.exports=Bn});var fa=_((_2,zh)=>{"use strict";var{LEVEL:X_}=te(),ev=Ln(),tv=Wn(),rv=ei()("winston:create-logger");function iv(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}zh.exports=function(t={}){t.levels=t.levels||ev.npm.levels;class e extends tv{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(rv('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[X_]=i,s._addDefaultMeta(a),s.write(a),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[iv(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Gh=_((S2,Hh)=>{"use strict";var nv=fa();Hh.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=nv(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 Yh=_(G=>{"use strict";var Vh=Ls(),{warn:oi}=Ns();G.version=tu().version;G.transports=wh();G.config=Ln();G.addColors=Vh.levels;G.format=Vh.format;G.createLogger=fa();G.Logger=Wn();G.ExceptionHandler=oa();G.RejectionHandler=la();G.Container=Gh();G.Transport=lr();G.loggers=new G.Container;var Qe=G.createLogger();Object.keys(G.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>G[t]=(...e)=>Qe[t](...e));Object.defineProperty(G,"level",{get(){return Qe.level},set(t){Qe.level=t}});Object.defineProperty(G,"exceptions",{get(){return Qe.exceptions}});Object.defineProperty(G,"rejections",{get(){return Qe.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(G,t,{get(){return Qe[t]},set(e){Qe[t]=e}})});Object.defineProperty(G,"default",{get(){return{exceptionHandlers:Qe.exceptionHandlers,rejectionHandlers:Qe.rejectionHandlers,transports:Qe.transports}}});oi.deprecated(G,"setLevels");oi.forFunctions(G,"useFormat",["cli"]);oi.forProperties(G,"useFormat",["padLevels","stripColors"]);oi.forFunctions(G,"deprecated",["addRewriter","addFilter","clone","extend"]);oi.forProperties(G,"deprecated",["emitErrs","levelLength"])});var Hn=_((zn,Jh)=>{(function(t,e){typeof zn=="object"&&typeof Jh<"u"?e(zn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(zn,(function(t){"use strict";class e extends TypeError{constructor(g,y){let w,{message:O,explanation:D,...W}=g,{path:Q}=g,X=Q.length===0?O:`At path: ${Q.join(".")} -- ${O}`;super(D??X),D!=null&&(this.cause=X),Object.assign(this,W),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:D}=g,{type:W}=y,{refinement:Q,message:X=`Expected a value of type \`${W}\`${Q?` with refinement \`${Q}\``:""}, but received: \`${o(w)}\``}=h;return{value:w,type:W,refinement:Q,key:O[O.length-1],path:O,branch:D,...h,message:X}}function*u(h,g,y,w){r(h)||(h=[h]);for(let O of h){let D=l(O,g,y,w);D&&(yield D)}}function*c(h,g,y={}){let{path:w=[],branch:O=[h],coerce:D=!1,mask:W=!1}=y,Q={path:w,branch:O,mask:W};D&&(h=g.coercer(h,Q));let X="valid";for(let ne of g.validator(h,Q))ne.explanation=y.message,X="not_valid",yield[ne,void 0];for(let[ne,Pe,rp]of g.entries(h,Q)){let ip=c(Pe,rp,{path:ne===void 0?w:[...w,ne],branch:ne===void 0?O:[...O,Pe],coerce:D,mask:W,message:y.message});for(let Oi of ip)Oi[0]?(X=Oi[0].refinement!=null?"not_refined":"not_valid",yield[Oi[0],void 0]):D&&(Pe=Oi[1],ne===void 0?h=Pe:h instanceof Map?h.set(ne,Pe):h instanceof Set?h.add(Pe):i(h)&&(Pe!==void 0||ne in h)&&(h[ne]=Pe))}if(X!=="not_valid")for(let ne of g.refiner(h,Q))ne.explanation=y.message,X="not_refined",yield[ne,void 0];X==="valid"&&(yield[void 0,h])}class f{constructor(g){let{type:y,schema:w,validator:O,refiner:D,coercer:W=X=>X,entries:Q=function*(){}}=g;this.type=y,this.schema=w,this.entries=Q,this.coercer=W,O?this.validator=(X,ne)=>{let Pe=O(X,ne);return u(Pe,ne,this,X)}:this.validator=()=>[],D?this.refiner=(X,ne)=>{let Pe=D(X,ne);return u(Pe,ne,this,X)}: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 W of w)W[0]&&(yield W[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 q(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 z(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 C(h,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),T(h,g)}function V(){return T("any",()=>!0)}function re(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 ie(){return T("bigint",h=>typeof h=="bigint")}function _e(){return T("boolean",h=>typeof h=="boolean")}function ve(){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 H(){return T("integer",h=>typeof h=="number"&&!isNaN(h)&&Number.isInteger(h)||`Expected an integer, but received: ${o(h)}`)}function ye(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 P(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 ke(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 Fe(){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 Zt(){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=Fe();return new f({type:"object",schema:h||null,*entries(w){if(h&&i(w)){let O=new Set(Object.keys(w));for(let D of g)O.delete(D),yield[D,w[D],h[D]];for(let D of O)yield[D,w[D],y]}},validator(w){return n(w)||`Expected an object, but received: ${o(w)}`},coercer(w,O){if(!n(w))return w;let D={...w};if(O.mask&&h)for(let W in D)h[W]===void 0&&delete D[W];return D}})}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 cs(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 Me(){return T("regexp",h=>h instanceof RegExp)}function Ei(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 Ri(){return T("string",h=>typeof h=="string"||`Expected a string, but received: ${o(h)}`)}function xi(h){let g=Fe();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 Qt(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[D,W]=O.validate(y,{coerce:!0,mask:w.mask});if(!D)return W}return y},validator(y,w){let O=[];for(let D of h){let[...W]=c(y,D,w),[Q]=W;if(Q[0])for(let[X]of W)X&&O.push(X);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${o(y)}`,...O]}})}function kt(){return T("unknown",()=>!0)}function Mr(h,g,y){return new f({...h,coercer:(w,O)=>b(w,g)?h.coercer(y(w,O),O):h.coercer(w,O)})}function Pt(h,g,y={}){return Mr(h,kt(),w=>{let O=typeof g=="function"?g():g;if(w===void 0)return O;if(!y.strict&&s(w)&&s(O)){let D={...w},W=!1;for(let Q in O)D[Q]===void 0&&(D[Q]=O[Q],W=!0);if(W)return D}return w})}function ft(h){return Mr(h,Ri(),g=>g.trim())}function Or(h){return Dt(h,"empty",g=>{let y=Ti(g);return y===0||`Expected an empty ${h.type} but received one with a size of \`${y}\``})}function Ti(h){return h instanceof Map||h instanceof Set?h.size:h.length}function Mi(h,g,y={}){let{exclusive:w}=y;return Dt(h,"max",O=>w?O<g:O<=g||`Expected a ${h.type} less than ${w?"":"or equal to "}${g} but received \`${O}\``)}function Qd(h,g,y={}){let{exclusive:w}=y;return Dt(h,"min",O=>w?O>g:O>=g||`Expected a ${h.type} greater than ${w?"":"or equal to "}${g} but received \`${O}\``)}function Xd(h){return Dt(h,"nonempty",g=>Ti(g)>0||`Expected a nonempty ${h.type} but received an empty one`)}function ep(h,g){return Dt(h,"pattern",y=>g.test(y)||`Expected a ${h.type} matching \`/${g.source}/\` but received "${y}"`)}function tp(h,g,y=g){let w=`Expected a ${h.type}`,O=g===y?`of \`${g}\``:`between \`${g}\` and \`${y}\``;return Dt(h,"size",D=>{if(typeof D=="number"||D instanceof Date)return g<=D&&D<=y||`${w} ${O} but received \`${D}\``;if(D instanceof Map||D instanceof Set){let{size:W}=D;return g<=W&&W<=y||`${w} with a size ${O} but received one with a size of \`${W}\``}else{let{length:W}=D;return g<=W&&W<=y||`${w} with a length ${O} but received one with a length of \`${W}\``}})}function Dt(h,g,y){return new f({...h,*refiner(w,O){yield*h.refiner(w,O);let D=y(w,O),W=u(D,O,h,w);for(let Q of W)yield{...Q,refinement:g}}})}t.Struct=f,t.StructError=e,t.any=V,t.array=re,t.assert=p,t.assign=S,t.bigint=ie,t.boolean=_e,t.coerce=Mr,t.create=m,t.date=ve,t.defaulted=Pt,t.define=T,t.deprecated=R,t.dynamic=x,t.empty=Or,t.enums=at,t.func=E,t.instance=A,t.integer=H,t.intersection=ye,t.is=b,t.lazy=k,t.literal=P,t.map=ke,t.mask=d,t.max=Mi,t.min=Qd,t.never=Fe,t.nonempty=Xd,t.nullable=Ot,t.number=Zt,t.object=lt,t.omit=I,t.optional=At,t.partial=q,t.pattern=ep,t.pick=z,t.record=cs,t.refine=Dt,t.regexp=Me,t.set=Ei,t.size=tp,t.string=Ri,t.struct=C,t.trimmed=ft,t.tuple=xi,t.type=ut,t.union=Qt,t.unknown=kt,t.validate=v}))});import eS from"yargs";import{hideBin as tS}from"yargs/helpers";import me from"node:path";import Mt from"node:fs/promises";import{fileURLToPath as rS}from"node:url";import Da from"fs-extra";import{loadPyodide as Yd,version as iS}from"pyodide";import Kh from"node:path";import sv from"node:fs/promises";var Et=Ai(Yh(),1),$=Et.createLogger({transports:[new Et.transports.Console({format:Et.format.combine(Et.format.splat(),Et.format.cli())})]});function ai(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Un=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){if(this.isRemote){let r=Kh.posix.join(this.sourceUrl,e);$.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=Kh.join(this.sourceUrl,e);$.debug(`Reading ${r}`);let i=await sv.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;$.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 Qh=Ai(Hn(),1);import ov from"node:fs/promises";var Y=Ai(Hn(),1),Zh=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 av(t){let e=Qh.mask(t??{},Zh);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 Xh(t){let e=av({...t.packageJsonStliteDesktopField,...t.fallbacks});$.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);$.info(`Dump the manifest file -> ${t.manifestFilePath}`),await ov.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var pe=Ai(Hn(),1);import lv from"node:path";async function ed(t){let{files:e,entrypoint:r}=uv(t),i=await fv(t),n=await cv(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function uv(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ai("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&&ai("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 fv(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;pe.assert(i,pe.optional(pe.array(pe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ai("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 cv(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;pe.assert(n,pe.optional(pe.array(pe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(a=>lv.resolve(e,a)),o=[];return i!=null&&i.length>0&&(ai("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 hv="(<=>!~";var dv=new RegExp(`[${"["+hv+";@"}]`);function pv(t){return t.split(dv)[0].trim()}function td(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=>pv(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 gv=/\s#.*$/;function rd(t){return t.split(`
37
- `).filter(e=>!e.startsWith("#")).map(e=>e.replace(gv,"")).map(e=>e.trim()).filter(e=>e!=="")}var ca=(t,e,r)=>{let i=t instanceof RegExp?id(t,r):t,n=e instanceof RegExp?id(e,r):e,s=i!==null&&n!=null&&mv(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)}},id=(t,e)=>{let r=e.match(t);return r?r[0]:null},mv=(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 nd="\0SLASH"+Math.random()+"\0",sd="\0OPEN"+Math.random()+"\0",da="\0CLOSE"+Math.random()+"\0",od="\0COMMA"+Math.random()+"\0",ad="\0PERIOD"+Math.random()+"\0",yv=new RegExp(nd,"g"),bv=new RegExp(sd,"g"),wv=new RegExp(da,"g"),_v=new RegExp(od,"g"),vv=new RegExp(ad,"g"),Sv=/\\\\/g,Ev=/\\{/g,Rv=/\\}/g,xv=/\\,/g,Tv=/\\./g;function ha(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function Mv(t){return t.replace(Sv,nd).replace(Ev,sd).replace(Rv,da).replace(xv,od).replace(Tv,ad)}function Ov(t){return t.replace(yv,"\\").replace(bv,"{").replace(wv,"}").replace(_v,",").replace(vv,".")}function ld(t){if(!t)return[""];let e=[],r=ca("{","}",t);if(!r)return t.split(",");let{pre:i,body:n,post:s}=r,o=i.split(",");o[o.length-1]+="{"+n+"}";let a=ld(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function ud(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),li(Mv(t),!0).map(Ov)):[]}function Av(t){return"{"+t+"}"}function kv(t){return/^-?0\d/.test(t)}function Pv(t,e){return t<=e}function Dv(t,e){return t>=e}function li(t,e){let r=[],i=ca("{","}",t);if(!i)return[t];let n=i.pre,s=i.post.length?li(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+da+i.post,li(t)):[t];let c;if(l)c=i.body.split(/\.\./);else if(c=ld(i.body),c.length===1&&c[0]!==void 0&&(c=li(c[0],!1).map(Av),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=ha(c[0]),m=ha(c[1]),d=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(ha(c[2])):1,v=Pv;m<p&&(b*=-1,v=Dv);let T=c.some(kv);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,li(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 ui=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Cv={"[: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]},fi=t=>t.replace(/[[\]\\-]/g,"\\$&"),qv=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fd=t=>t.join(""),cd=(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(Cv))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(fi(f)+"-"+fi(b)):b===f&&i.push(fi(b)),f="",s++;continue}if(t.startsWith("-]",s+1)){i.push(fi(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){f=b,s+=2;continue}i.push(fi(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[qv(b),!1,c-r,!1]}let p="["+(u?"^":"")+fd(i)+"]",m="["+(u?"":"^")+fd(n)+"]";return[i.length&&n.length?"("+p+"|"+m+")":i.length?p:m,a,c-r,!0]};var Be=(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 Lv=new Set(["!","?","+","*","@"]),hd=t=>Lv.has(t),Nv="(?!(?:^|/)\\.\\.?(?:$|/))",Gn="(?!\\.)",jv=new Set(["[","."]),Fv=new Set(["..","."]),Iv=new Set("().*{}+?[]^$\\!"),$v=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),pa="[^/]",dd=pa+"*?",pd=pa+"+?",br=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&&hd(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(hd(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&&Fv.has(this.#n[0]))){let d=jv,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?Nv:v?Gn:""}let f="";return this.isEnd()&&this.#e.#f&&this.#o?.type==="!"&&(f="(?:$|\\/)"),[c+u+f,Be(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,Be(this.toString()),!1,!1]}let o=!i||e||r||!Gn?"":this.#p(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#c)a=(this.isStart()&&!r?Gn:"")+pd;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Gn:"")+dd+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=n+s+l}return[a,Be(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+=(Iv.has(l)?"\\":"")+l;continue}if(l==="\\"){a===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,f,p]=cd(e,a);if(f){s+=u,o=o||c,a+=f-1,r=r||p;continue}}if(l==="*"){s+=i&&e==="*"?pd:dd,r=!0;continue}if(l==="?"){s+=pa,r=!0;continue}s+=$v(l)}return[s,Be(e),!!r,o]}};var wr=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Ee=(t,e,r={})=>(ui(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Oe(e,r).match(t)),Wv=/^\*+([^+@!?\*\[\(]*)$/,Bv=t=>e=>!e.startsWith(".")&&e.endsWith(t),Uv=t=>e=>e.endsWith(t),zv=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Hv=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Gv=/^\*+\.\*+$/,Vv=t=>!t.startsWith(".")&&t.includes("."),Yv=t=>t!=="."&&t!==".."&&t.includes("."),Kv=/^\.\*+$/,Jv=t=>t!=="."&&t!==".."&&t.startsWith("."),Zv=/^\*+$/,Qv=t=>t.length!==0&&!t.startsWith("."),Xv=t=>t.length!==0&&t!=="."&&t!=="..",e1=/^\?+([^+@!?\*\[\(]*)?$/,t1=([t,e=""])=>{let r=yd([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},r1=([t,e=""])=>{let r=bd([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},i1=([t,e=""])=>{let r=bd([t]);return e?i=>r(i)&&i.endsWith(e):r},n1=([t,e=""])=>{let r=yd([t]);return e?i=>r(i)&&i.endsWith(e):r},yd=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},bd=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},wd=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",gd={win32:{sep:"\\"},posix:{sep:"/"}},s1=wd==="win32"?gd.win32.sep:gd.posix.sep;Ee.sep=s1;var ge=Symbol("globstar **");Ee.GLOBSTAR=ge;var o1="[^/]",a1=o1+"*?",l1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",u1="(?:(?!(?:\\/|^)\\.).)*?",f1=(t,e={})=>r=>Ee(r,t,e);Ee.filter=f1;var Le=(t,e={})=>Object.assign({},t,e),c1=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Ee;let e=Ee;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,o={}){super(n,s,Le(t,o))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:ge})};Ee.defaults=c1;var _d=(t,e={})=>(ui(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:ud(t));Ee.braceExpand=_d;var h1=(t,e={})=>new Oe(t,e).makeRe();Ee.makeRe=h1;var d1=(t,e,r={})=>{let i=new Oe(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};Ee.match=d1;var md=/[?*]|[+@!]\(.*?\)|\[|\]/,p1=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Oe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){ui(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||wd,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]==="?"||!md.test(s[2]))&&!md.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===ge){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(`
38
- 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(`
39
- >>> 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 _d(this.pattern,this.options)}parse(e){ui(e);let r=this.options;if(e==="**")return ge;if(e==="")return"";let i,n=null;(i=e.match(Zv))?n=r.dot?Xv:Qv:(i=e.match(Wv))?n=(r.nocase?r.dot?Hv:zv:r.dot?Uv:Bv)(i[1]):(i=e.match(e1))?n=(r.nocase?r.dot?r1:t1:r.dot?i1:n1)(i):(i=e.match(Gv))?n=r.dot?Yv:Vv:(i=e.match(Kv))&&(n=Jv);let s=br.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?a1:r.dot?l1:u1,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"?p1(f):f===ge?ge:f._src});u.forEach((f,p)=>{let m=u[p+1],d=u[p-1];f!==ge||d===ge||(d===void 0?m!==void 0&&m!==ge?u[p+1]="(?:\\/|"+i+"\\/)?"+m:u[p]=i:m===void 0?u[p-1]=d+"(?:\\/|\\/"+i+")?":m!==ge&&(u[p-1]=d+"(?:\\/|\\/"+i+"\\/)"+m,u[p+1]=ge))});let c=u.filter(f=>f!==ge);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 Ee.defaults(e).Minimatch}};Ee.AST=br;Ee.Minimatch=Oe;Ee.escape=wr;Ee.unescape=Be;import{fileURLToPath as V1}from"node:url";var g1=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Sd=new Set,ga=typeof process=="object"&&process?process:{},Ed=(t,e,r,i)=>{typeof ga.emitWarning=="function"?ga.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},Vn=globalThis.AbortController,vd=globalThis.AbortSignal;if(typeof Vn>"u"){vd=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},Vn=class{constructor(){e()}signal=new vd;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=ga.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Ed("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 m1=t=>!Sd.has(t);var Rt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Rd=t=>Rt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},ma=class t{heap;length;static#e=!1;static create(e){let r=Rd(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]}},Yt=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.#D(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:q,perf:z}=e;if(z!==void 0&&typeof z?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#f=z??g1,r!==0&&!Rt(r))throw new TypeError("max option must be a nonnegative integer");let C=r?Rd(r):Array;if(!C)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 C(r),this.#v=new C(r),this.#w=0,this.#g=0,this.#O=ma.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=!!q,this.maxEntrySize!==0){if(this.#t!==0&&!Rt(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Rt(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=Rt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Rt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#C()}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 V="LRU_CACHE_UNBOUNDED";m1(V)&&(Sd.add(V),Ed("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",V,t))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new _r(this.#e),r=new _r(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.#P(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 _r(this.#e);this.#h=0,this.#E=e,this.#q=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#u(i))return 0;if(!Rt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Rt(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)}}#q=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]}*#D({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.#D())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.#D()){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.#D())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.#D()){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.#D({allowStale:!0}))this.#x(r)&&(this.#P(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.#P(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.#q(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.#C(),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.#q(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 Vn,{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.#P(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.#P(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 Vn}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 V=i&&k.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",V&&(S.returnedStale=!0)),V?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 q=this.#U(e,x,R,b),C=q.__staleWhileFetching!==void 0&&i;return S&&(S.fetch=I?"stale":"refresh",C&&I&&(S.returnedStale=!0)),C?q.__staleWhileFetching:q.__returned=q}}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.#P(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.#P(e,"delete")}#P(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.#q(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.#D({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 M1,win32 as Ta}from"node:path";import{fileURLToPath as O1}from"node:url";import{lstatSync as A1,readdir as k1,readdirSync as P1,readlinkSync as D1,realpathSync as C1}from"fs";import*as q1 from"node:fs";import{lstat as N1,readdir as j1,readlink as F1,realpath as I1}from"node:fs/promises";import{EventEmitter as Ea}from"node:events";import Ad from"node:stream";import{StringDecoder as y1}from"node:string_decoder";var xd=typeof process=="object"&&process?process:{stdout:null,stderr:null},b1=t=>!!t&&typeof t=="object"&&(t instanceof Tt||t instanceof Ad||w1(t)||_1(t)),w1=t=>!!t&&typeof t=="object"&&t instanceof Ea&&typeof t.pipe=="function"&&t.pipe!==Ad.Writable.prototype.pipe,_1=t=>!!t&&typeof t=="object"&&t instanceof Ea&&typeof t.write=="function"&&typeof t.end=="function",st=Symbol("EOF"),ot=Symbol("maybeEmitEnd"),xt=Symbol("emittedEnd"),Yn=Symbol("emittingEnd"),ci=Symbol("emittedError"),Kn=Symbol("closed"),Td=Symbol("read"),Jn=Symbol("flush"),Md=Symbol("flushChunk"),Ue=Symbol("encoding"),vr=Symbol("decoder"),fe=Symbol("flowing"),hi=Symbol("paused"),Sr=Symbol("resume"),ce=Symbol("buffer"),Re=Symbol("pipes"),he=Symbol("bufferLength"),ya=Symbol("bufferPush"),Zn=Symbol("bufferShift"),be=Symbol("objectMode"),ee=Symbol("destroyed"),ba=Symbol("error"),wa=Symbol("emitData"),Od=Symbol("emitEnd"),_a=Symbol("emitEnd2"),Xe=Symbol("async"),va=Symbol("abort"),Qn=Symbol("aborted"),di=Symbol("signal"),Kt=Symbol("dataListeners"),Ae=Symbol("discarded"),pi=t=>Promise.resolve().then(t),v1=t=>t(),S1=t=>t==="end"||t==="finish"||t==="prefinish",E1=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,R1=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Xn=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Sr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Sa=class extends Xn{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)}},x1=t=>!!t.objectMode,T1=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Tt=class extends Ea{[fe]=!1;[hi]=!1;[Re]=[];[ce]=[];[be];[Ue];[Xe];[vr];[st]=!1;[xt]=!1;[Yn]=!1;[Kn]=!1;[ci]=null;[he]=0;[ee]=!1;[di];[Qn]=!1;[Kt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");x1(r)?(this[be]=!0,this[Ue]=null):T1(r)?(this[Ue]=r.encoding,this[be]=!1):(this[be]=!1,this[Ue]=null),this[Xe]=!!r.async,this[vr]=this[Ue]?new y1(this[Ue]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ce]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Re]});let{signal:i}=r;i&&(this[di]=i,i.aborted?this[va]():i.addEventListener("abort",()=>this[va]()))}get bufferLength(){return this[he]}get encoding(){return this[Ue]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[be]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Xe]}set async(e){this[Xe]=this[Xe]||!!e}[va](){this[Qn]=!0,this.emit("abort",this[di]?.reason),this.destroy(this[di]?.reason)}get aborted(){return this[Qn]}set aborted(e){}write(e,r,i){if(this[Qn])return!1;if(this[st])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Xe]?pi:v1;if(!this[be]&&!Buffer.isBuffer(e)){if(R1(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(E1(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[be]?(this[fe]&&this[he]!==0&&this[Jn](!0),this[fe]?this.emit("data",e):this[ya](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[fe]):e.length?(typeof e=="string"&&!(r===this[Ue]&&!this[vr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ue]&&(e=this[vr].write(e)),this[fe]&&this[he]!==0&&this[Jn](!0),this[fe]?this.emit("data",e):this[ya](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[fe]):(this[he]!==0&&this.emit("readable"),i&&n(i),this[fe])}read(e){if(this[ee])return null;if(this[Ae]=!1,this[he]===0||e===0||e&&e>this[he])return this[ot](),null;this[be]&&(e=null),this[ce].length>1&&!this[be]&&(this[ce]=[this[Ue]?this[ce].join(""):Buffer.concat(this[ce],this[he])]);let r=this[Td](e||null,this[ce][0]);return this[ot](),r}[Td](e,r){if(this[be])this[Zn]();else{let i=r;e===i.length||e===null?this[Zn]():typeof i=="string"?(this[ce][0]=i.slice(e),r=i.slice(0,e),this[he]-=e):(this[ce][0]=i.subarray(e),r=i.subarray(0,e),this[he]-=e)}return this.emit("data",r),!this[ce].length&&!this[st]&&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[st]=!0,this.writable=!1,(this[fe]||!this[hi])&&this[ot](),this}[Sr](){this[ee]||(!this[Kt]&&!this[Re].length&&(this[Ae]=!0),this[hi]=!1,this[fe]=!0,this.emit("resume"),this[ce].length?this[Jn]():this[st]?this[ot]():this.emit("drain"))}resume(){return this[Sr]()}pause(){this[fe]=!1,this[hi]=!0,this[Ae]=!1}get destroyed(){return this[ee]}get flowing(){return this[fe]}get paused(){return this[hi]}[ya](e){this[be]?this[he]+=1:this[he]+=e.length,this[ce].push(e)}[Zn](){return this[be]?this[he]-=1:this[he]-=this[ce][0].length,this[ce].shift()}[Jn](e=!1){do;while(this[Md](this[Zn]())&&this[ce].length);!e&&!this[ce].length&&!this[st]&&this.emit("drain")}[Md](e){return this.emit("data",e),this[fe]}pipe(e,r){if(this[ee])return e;this[Ae]=!1;let i=this[xt];return r=r||{},e===xd.stdout||e===xd.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Re].push(r.proxyErrors?new Sa(this,e,r):new Xn(this,e,r)),this[Xe]?pi(()=>this[Sr]()):this[Sr]()),e}unpipe(e){let r=this[Re].find(i=>i.dest===e);r&&(this[Re].length===1?(this[fe]&&this[Kt]===0&&(this[fe]=!1),this[Re]=[]):this[Re].splice(this[Re].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Kt]++,!this[Re].length&&!this[fe]&&this[Sr]();else if(e==="readable"&&this[he]!==0)super.emit("readable");else if(S1(e)&&this[xt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ci]){let n=r;this[Xe]?pi(()=>n.call(this,this[ci])):n.call(this,this[ci])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Kt]=this.listeners("data").length,this[Kt]===0&&!this[Ae]&&!this[Re].length&&(this[fe]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Kt]=0,!this[Ae]&&!this[Re].length&&(this[fe]=!1)),r}get emittedEnd(){return this[xt]}[ot](){!this[Yn]&&!this[xt]&&!this[ee]&&this[ce].length===0&&this[st]&&(this[Yn]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Kn]&&this.emit("close"),this[Yn]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[be]&&!i?!1:this[Xe]?(pi(()=>this[wa](i)),!0):this[wa](i);if(e==="end")return this[Od]();if(e==="close"){if(this[Kn]=!0,!this[xt]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[ci]=i,super.emit(ba,i);let s=!this[di]||this.listeners("error").length?super.emit("error",i):!1;return this[ot](),s}else if(e==="resume"){let s=super.emit("resume");return this[ot](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[ot](),n}[wa](e){for(let i of this[Re])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[ot](),r}[Od](){return this[xt]?!1:(this[xt]=!0,this.readable=!1,this[Xe]?(pi(()=>this[_a]()),!0):this[_a]())}[_a](){if(this[vr]){let r=this[vr].end();if(r){for(let i of this[Re])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[Re])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[be]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[be]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[be])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ue]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[st])return r();let s,o,a=f=>{this.off("data",l),this.off("end",u),this.off(ee,c),r(),o(f)},l=f=>{this.off("error",a),this.off("end",u),this.off(ee,c),this.pause(),s({value:f,done:!!this[st]})},u=()=>{this.off("error",a),this.off("data",l),this.off(ee,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(ee,c),this.once("error",a),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(ba,r),this.off(ee,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(ba,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[Ae]=!0,this[ce].length=0,this[he]=0;let r=this;return typeof r.close=="function"&&!this[Kn]&&r.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return b1}};var L1=C1.native,mi={lstatSync:A1,readdir:k1,readdirSync:P1,readlinkSync:D1,realpathSync:L1,promises:{lstat:N1,readdir:j1,readlink:F1,realpath:I1}},qd=t=>!t||t===mi||t===q1?mi:{...mi,...t,promises:{...mi.promises,...t.promises||{}}},Ld=/^\\\\\?\\([a-z]:)\\?$/i,$1=t=>t.replace(/\//g,"\\").replace(Ld,"$1\\"),W1=/[\\\/]/,je=0,Nd=1,jd=2,et=4,Fd=6,Id=8,Jt=10,$d=12,Ne=15,gi=~Ne,Ra=16,kd=32,yi=64,ze=128,es=256,rs=512,Pd=yi|ze|rs,B1=1023,xa=t=>t.isFile()?Id:t.isDirectory()?et:t.isSymbolicLink()?Jt:t.isCharacterDevice()?jd:t.isBlockDevice()?Fd:t.isSocket()?$d:t.isFIFO()?Nd:je,Dd=new Yt({max:2**12}),bi=t=>{let e=Dd.get(t);if(e)return e;let r=t.normalize("NFKD");return Dd.set(t,r),r},Cd=new Yt({max:2**12}),ts=t=>{let e=Cd.get(t);if(e)return e;let r=bi(t.toLowerCase());return Cd.set(t,r),r},is=class extends Yt{constructor(){super({max:256})}},Ma=class extends Yt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Wd=Symbol("PathScurry setAsCwd"),we=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;#C;#A;#R;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=je,i,n,s,o,a){this.name=e,this.#E=s?ts(e):bi(e),this.#i=r&B1,this.nocase=s,this.roots=n,this.root=i||this,this.#C=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=qd(a.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#C}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.#C.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#C.set(this,r),this.#i&=~Ra,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?ts(e):bi(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,je,{...r,parent:this,fullpath:o});return this.canReaddir()||(a.#i|=ze),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&Ne)===je}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&Ne)===Id}isDirectory(){return(this.#i&Ne)===et}isCharacterDevice(){return(this.#i&Ne)===jd}isBlockDevice(){return(this.#i&Ne)===Fd}isFIFO(){return(this.#i&Ne)===Nd}isSocket(){return(this.#i&Ne)===$d}isSymbolicLink(){return(this.#i&Jt)===Jt}lstatCached(){return this.#i&kd?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&Ne;return!(e!==je&&e!==Jt||this.#i&es||this.#i&ze)}calledReaddir(){return!!(this.#i&Ra)}isENOENT(){return!!(this.#i&ze)}isNamed(e){return this.nocase?this.#E===ts(e):this.#E===bi(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|=Ra;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#F()}}#F(){this.#i&ze||(this.#i=(this.#i|ze)&gi,this.#q())}#q(){let e=this.children();e.provisional=0;for(let r of e)r.#F()}#I(){this.#i|=rs,this.#L()}#L(){if(this.#i&yi)return;let e=this.#i;(e&Ne)===et&&(e&=gi),this.#i=e|yi,this.#q()}#k(e=""){e==="ENOTDIR"||e==="EPERM"?this.#L():e==="ENOENT"?this.#F():this.children().provisional=0}#D(e=""){e==="ENOTDIR"?this.parent.#L():e==="ENOENT"&&this.#F()}#B(e=""){let r=this.#i;r|=es,e==="ENOENT"&&(r|=ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=gi),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=xa(e),n=this.newChild(e.name,i,{parent:this}),s=n.#i&Ne;return s!==et&&s!==Jt&&s!==je&&(n.#i|=yi),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?ts(e.name):bi(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&gi|xa(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&ze)===0)try{return this.#j(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#D(e.code)}}lstatSync(){if((this.#i&ze)===0)try{return this.#j(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#D(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=xa(e);this.#i=this.#i&gi|x|kd,x!==je&&x!==et&&x!==Jt&&(this.#i|=yi)}#P=[];#$=!1;#G(e){this.#$=!1;let r=this.#P.slice();this.#P.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.#P.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&Pd)return!1;let e=Ne&this.#i;return e===je||e===et||e===Jt}shouldWalk(e,r){return(this.#i&et)===et&&!(this.#i&Pd)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#R)return this.#R;if(!((rs|es|ze)&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(!((rs|es|ze)&this.#i))try{let e=this.#e.realpathSync(this.fullpath());return this.#R=this.resolve(e)}catch{this.#I()}}[Wd](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}},ns=class t extends we{sep="\\";splitSep=W1;constructor(e,r=je,i,n,s,o,a){super(e,r,i,n,s,o,a)}newChild(e,r=je,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Ta.parse(e).root}getRoot(e){if(e=$1(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 Er(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Ld,"$1\\"),e===r}},ss=class t extends we{splitSep="/";sep="/";constructor(e,r=je,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=je,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},os=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#n;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:o=mi}={}){this.#n=qd(o),(e instanceof URL||e.startsWith("file://"))&&(e=O1(e));let a=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new is,this.#t=new is,this.#s=new Ma(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 we||(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 we||(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 we||(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 we||(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 we||(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 we||(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 we||(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 we||(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 we||(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 we||(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 we||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=new Tt({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 we||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=new Tt({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[Wd](r)}},Er=class extends os{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Ta,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Ta.parse(e).root.toUpperCase()}newRoot(e){return new ns(this.rootPath,et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Rr=class extends os{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,M1,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new ss(this.rootPath,et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},wi=class extends Rr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},RR=process.platform==="win32"?ns:ss,Bd=process.platform==="win32"?Er:process.platform==="darwin"?wi:Rr;var U1=t=>t.length>=1,z1=t=>t.length>=1,xr=class t{#e;#t;#s;length;#n;#o;#_;#b;#f;#a;#h=!0;constructor(e,r,i,n){if(!U1(e))throw new TypeError("empty pattern list");if(!z1(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]===ge}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 H1=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Tr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:o=H1}){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 Oe(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 xr(n,s,0,this.platform),a=new Oe(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 Oa=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()]))}},Aa=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)])}},ka=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())}},_i=class t{hasWalkedCache;matches=new Aa;subwalks=new ka;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Oa}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===ge){(!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===ge?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 G1=(t,e)=>typeof t=="string"?new Tr([t],e):Array.isArray(t)?new Tr(t,e):t,as=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=G1(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 _i(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 _i(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()}},vi=class extends as{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}},Si=class extends as{results;constructor(e,r,i){super(e,r,i),this.results=new Tt({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 Y1=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",He=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;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=V1(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||Y1,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"?Er:r.platform==="darwin"?wi:r.platform?Rr:Bd;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 Oe(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 xr(l,c,0,this.platform)})}async walk(){return[...await new vi(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 vi(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 Si(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 Si(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 Pa=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Oe(r,e).hasMagic())return!0;return!1};function us(t,e={}){return new He(t,e).streamSync()}function zd(t,e={}){return new He(t,e).stream()}function Hd(t,e={}){return new He(t,e).walkSync()}async function Ud(t,e={}){return new He(t,e).walk()}function fs(t,e={}){return new He(t,e).iterateSync()}function Gd(t,e={}){return new He(t,e).iterate()}var K1=us,J1=Object.assign(zd,{sync:us}),Z1=fs,Q1=Object.assign(Gd,{sync:fs}),X1=Object.assign(Hd,{stream:us,iterate:fs}),ls=Object.assign(Ud,{glob:Ud,globSync:Hd,sync:X1,globStream:zd,stream:J1,globStreamSync:us,streamSync:K1,globIterate:Gd,iterate:Q1,globIterateSync:fs,iterateSync:Z1,Glob:He,hasMagic:Pa,escape:wr,unescape:Be});ls.glob=ls;var nS="../build",sS="../wheels",oS="streamlit-1.55.0-cp313-none-any.whl",aS="stlite_lib-0.1.0-py3-none-any.whl",lS=rS(import.meta.url),Kd=me.dirname(lS);async function Jd(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
40
- `))}async function uS(t){$.info("Copy the build directory (the bare built app files) to this directory...");let e=me.resolve(Kd,nS);if(!(await Mt.stat(e)).isDirectory())throw new Error(`The source ${e} does not exist.`);if(e===t.copyTo){$.warn(`sourceDir == destDir (${e}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await Mt.access(t.copyTo),$.info(`${t.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${t.copyTo} does not exist even though the \`keepOld\` option is specified`)}$.debug(`Copy ${e} to ${t.copyTo}`),await Mt.rm(t.copyTo,{recursive:!0,force:!0}),await Da.copy(e,t.copyTo,{errorOnExist:!0})}async function fS(t){if(t.requirements.length===0)return[];let e=await Yd({packageBaseUrl:t.pyodideSource,packageCacheDir:t.pyodideRuntimeDir});return await Zd(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function Vd(t,e){$.debug("Preparing the local wheel: %s",e);let r=await Mt.readFile(e),i="/tmp/"+me.basename(e);t.FS.writeFile(i,r);let n=`emfs:${i}`;return $.debug("The local wheel %s is prepared as %s",e,n),n}async function Zd(t,e){await Jd(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=me.join(Kd,sS),s=await Vd(t,me.join(n,aS));i.push(s);let o=await Vd(t,me.join(n,oS));i.push(o),$.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function cS(t){$.info("Create the site-packages snapshot file...");let e=await Yd({packageBaseUrl:t.pyodideSource,packageCacheDir:t.pyodideRuntimeDir});await Jd(e,"micropip");let r=e.pyimport("micropip"),i=new Un(t.pyodideSource),n=[];if(t.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 t.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",t.requirements),await Zd(e,{requirements:t.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 e.runPythonAsync(`
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(`
41
41
  import os
42
42
  import tarfile
43
43
  import site
@@ -50,8 +50,8 @@ globstar while`,e,p,r,m,d),this.matchOne(e.slice(p),r.slice(m),i))return this.de
50
50
  print("Add site-package:", site_packages)
51
51
  print(os.listdir(site_packages))
52
52
  gzf.add(site_packages)
53
- `),$.info("Extract the archive file from EMFS");let o=e.FS.readFile(s);$.info(`Save the archive file (${t.saveTo})`),await Mt.writeFile(t.saveTo,o)}async function hS(t){$.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await ls(e,{cwd:t.cwd,absolute:!1});if(r.length===0){$.warn(`No files match the pattern "${e}" in "${t.cwd}".`);return}await Promise.all(r.map(async i=>{let n=me.resolve(t.cwd,i),s=me.resolve(t.destAppDir,i);$.debug(`Copy ${n} to ${s}`),await Da.copy(n,s,{errorOnExist:!0})}))}))}async function dS(t,e){try{await Mt.access(me.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function pS(t){let e=await Mt.readFile(t,{encoding:"utf-8"});return rd(e)}async function gS(t,e){let r=e.join(`
54
- `);await Mt.writeFile(t,r,{encoding:"utf-8"})}eS(tS(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${iS}/full/`,coerce:t=>(t.endsWith("/")||(t+="/"),t)}).options("logLevel",{type:"string",default:"info",describe:"The log level",choices:["debug","info","warn","error"]}).parseAsync().then(async t=>{$.level=t.logLevel,$.debug("Command line arguments: %j",t);let e=t.project,r=me.resolve(e,"./build"),i=me.resolve(e,"./package.json"),n=await Da.readJson(i),s=await ed({pathResolutionRoot:e,packageJsonStliteDesktopField:n.stlite?.desktop,fallbacks:{appHomeDirSource:t.appHomeDirSource,packages:t.packages,requirementsTxtFilePaths:t.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 c=>pS(c))).then(c=>c.flat());$.info("Dependencies from `requirements.txt` files: %j",o);let a=td([...s.dependencies,...o]);$.info("Validated dependency list: %j",a),await uS({copyTo:r,keepOld:t.keepOldBuild});let l=await fS({pyodideSource:t.pyodideSource,pyodideRuntimeDir:me.resolve(r,"./pyodide"),requirements:a});$.info("The prebuilt packages loaded for the given requirements: %j",l);let u=me.resolve(r,"./app_files");await hS({cwd:e,filePathPatterns:s.files,destAppDir:u}),dS(u,s.entrypoint),await cS({requirements:a,usedPrebuiltPackages:l,pyodideSource:t.pyodideSource,pyodideRuntimeDir:me.resolve(r,"./pyodide"),saveTo:me.resolve(r,"./site-packages-snapshot.tar.gz")}),await gS(me.resolve(r,"./prebuilt-packages.txt"),l),await Xh({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:me.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
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}})});
55
55
  /*! Bundled license information:
56
56
 
57
57
  safe-buffer/index.js: